scream-code 0.13.3 → 0.13.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,90 @@
1
+ var zu=Object.defineProperty;var Uu=(e,t,n)=>t in e?zu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>Uu(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 ri(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Me={},Vn=[],Dt=()=>{},ha=()=>!1,Mr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Nr=e=>e.startsWith("onUpdate:"),Ke=Object.assign,oi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Hu=Object.prototype.hasOwnProperty,Te=(e,t)=>Hu.call(e,t),fe=Array.isArray,Kn=e=>Os(e)==="[object Map]",Or=e=>Os(e)==="[object Set]",Ki=e=>Os(e)==="[object Date]",ye=e=>typeof e=="function",De=e=>typeof e=="string",jt=e=>typeof e=="symbol",Re=e=>e!==null&&typeof e=="object",pa=e=>(Re(e)||ye(e))&&ye(e.then)&&ye(e.catch),ga=Object.prototype.toString,Os=e=>ga.call(e),qu=e=>Os(e).slice(8,-1),ma=e=>Os(e)==="[object Object]",ii=e=>De(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,gs=ri(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Br=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Wu=/-\w/g,yt=Br(e=>e.replace(Wu,t=>t.slice(1).toUpperCase())),Vu=/\B([A-Z])/g,Cn=Br(e=>e.replace(Vu,"-$1").toLowerCase()),Dr=Br(e=>e.charAt(0).toUpperCase()+e.slice(1)),oo=Br(e=>e?`on${Dr(e)}`:""),Jt=(e,t)=>!Object.is(e,t),sr=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},va=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Gr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ku=e=>{const t=De(e)?Number(e):NaN;return isNaN(t)?e:t};let Zi;const jr=()=>Zi||(Zi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function fn(e){if(fe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=De(s)?Xu(s):fn(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(De(e)||Re(e))return e}const Zu=/;(?![^(]*\))/g,Yu=/:([^]+)/,Ju=/\/\*[^]*?\*\//g;function Xu(e){const t={};return e.replace(Ju,"").split(Zu).forEach(n=>{if(n){const s=n.split(Yu);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function be(e){let t="";if(De(e))t=e;else if(fe(e))for(let n=0;n<e.length;n++){const s=be(e[n]);s&&(t+=s+" ")}else if(Re(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Qu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ef=ri(Qu);function ya(e){return!!e||e===""}function tf(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Bs(e[s],t[s]);return n}function Bs(e,t){if(e===t)return!0;let n=Ki(e),s=Ki(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=jt(e),s=jt(t),n||s)return e===t;if(n=fe(e),s=fe(t),n||s)return n&&s?tf(e,t):!1;if(n=Re(e),s=Re(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||!Bs(e[i],t[i]))return!1}}return String(e)===String(t)}function nf(e,t){return e.findIndex(n=>Bs(n,t))}const ba=e=>!!(e&&e.__v_isRef===!0),E=e=>De(e)?e:e==null?"":fe(e)||Re(e)&&(e.toString===ga||!ye(e.toString))?ba(e)?E(e.value):JSON.stringify(e,ka,2):String(e),ka=(e,t)=>ba(t)?ka(e,t.value):Kn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[io(s,o)+" =>"]=r,n),{})}:Or(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>io(n))}:jt(t)?io(t):Re(t)&&!fe(t)&&!ma(t)?String(t):t,io=(e,t="")=>{var n;return jt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function sf(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 nt;class rf{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&&nt&&(nt.active?(this.parent=nt,this.index=(nt.scopes||(nt.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=nt;try{return nt=this,t()}finally{nt=n}}}on(){++this._on===1&&(this.prevScope=nt,nt=this)}off(){if(this._on>0&&--this._on===0){if(nt===this)nt=this.prevScope;else{let t=nt;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 of(){return nt}let Oe;const lo=new WeakSet;class wa{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,nt&&(nt.active?nt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,lo.has(this)&&(lo.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Sa(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Yi(this),xa(this);const t=Oe,n=Gt;Oe=this,Gt=!0;try{return this.fn()}finally{Ca(this),Oe=t,Gt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ci(t);this.deps=this.depsTail=void 0,Yi(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?lo.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ao(this)&&this.run()}get dirty(){return Ao(this)}}let _a=0,ms,vs;function Sa(e,t=!1){if(e.flags|=8,t){e.next=vs,vs=e;return}e.next=ms,ms=e}function li(){_a++}function ai(){if(--_a>0)return;if(vs){let t=vs;for(vs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ms;){let t=ms;for(ms=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 xa(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ca(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),ci(s),lf(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Ao(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ta(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ta(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ss)||(e.globalVersion=Ss,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ao(e))))return;e.flags|=2;const t=e.dep,n=Oe,s=Gt;Oe=e,Gt=!0;try{xa(e);const r=e.fn(e._value);(t.version===0||Jt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Oe=n,Gt=s,Ca(e),e.flags&=-3}}function ci(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)ci(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function lf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Gt=!0;const $a=[];function hn(){$a.push(Gt),Gt=!1}function pn(){const e=$a.pop();Gt=e===void 0?!0:e}function Yi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Oe;Oe=void 0;try{t()}finally{Oe=n}}}let Ss=0;class af{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 ui{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(!Oe||!Gt||Oe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Oe)n=this.activeLink=new af(Oe,this),Oe.deps?(n.prevDep=Oe.depsTail,Oe.depsTail.nextDep=n,Oe.depsTail=n):Oe.deps=Oe.depsTail=n,Aa(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=Oe.depsTail,n.nextDep=void 0,Oe.depsTail.nextDep=n,Oe.depsTail=n,Oe.deps===n&&(Oe.deps=s)}return n}trigger(t){this.version++,Ss++,this.notify(t)}notify(t){li();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ai()}}}function Aa(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)Aa(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ro=new WeakMap,Mn=Symbol(""),Eo=Symbol(""),xs=Symbol("");function lt(e,t,n){if(Gt&&Oe){let s=Ro.get(e);s||Ro.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new ui),r.map=s,r.key=n),r.track()}}function rn(e,t,n,s,r,o){const i=Ro.get(e);if(!i){Ss++;return}const l=a=>{a&&a.trigger()};if(li(),t==="clear")i.forEach(l);else{const a=fe(e),c=a&&ii(n);if(a&&n==="length"){const u=Number(s);i.forEach((d,g)=>{(g==="length"||g===xs||!jt(g)&&g>=u)&&l(d)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),c&&l(i.get(xs)),t){case"add":a?c&&l(i.get("length")):(l(i.get(Mn)),Kn(e)&&l(i.get(Eo)));break;case"delete":a||(l(i.get(Mn)),Kn(e)&&l(i.get(Eo)));break;case"set":Kn(e)&&l(i.get(Mn));break}}ai()}function Un(e){const t=Se(e);return t===e?t:(lt(t,"iterate",xs),Mt(e)?t:t.map(Ft))}function Fr(e){return lt(e=Se(e),"iterate",xs),e}function Zt(e,t){return gn(e)?es(Nn(e)?Ft(t):t):Ft(t)}const cf={__proto__:null,[Symbol.iterator](){return ao(this,Symbol.iterator,e=>Zt(this,e))},concat(...e){return Un(this).concat(...e.map(t=>fe(t)?Un(t):t))},entries(){return ao(this,"entries",e=>(e[1]=Zt(this,e[1]),e))},every(e,t){return tn(this,"every",e,t,void 0,arguments)},filter(e,t){return tn(this,"filter",e,t,n=>n.map(s=>Zt(this,s)),arguments)},find(e,t){return tn(this,"find",e,t,n=>Zt(this,n),arguments)},findIndex(e,t){return tn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return tn(this,"findLast",e,t,n=>Zt(this,n),arguments)},findLastIndex(e,t){return tn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return tn(this,"forEach",e,t,void 0,arguments)},includes(...e){return co(this,"includes",e)},indexOf(...e){return co(this,"indexOf",e)},join(e){return Un(this).join(e)},lastIndexOf(...e){return co(this,"lastIndexOf",e)},map(e,t){return tn(this,"map",e,t,void 0,arguments)},pop(){return os(this,"pop")},push(...e){return os(this,"push",e)},reduce(e,...t){return Ji(this,"reduce",e,t)},reduceRight(e,...t){return Ji(this,"reduceRight",e,t)},shift(){return os(this,"shift")},some(e,t){return tn(this,"some",e,t,void 0,arguments)},splice(...e){return os(this,"splice",e)},toReversed(){return Un(this).toReversed()},toSorted(e){return Un(this).toSorted(e)},toSpliced(...e){return Un(this).toSpliced(...e)},unshift(...e){return os(this,"unshift",e)},values(){return ao(this,"values",e=>Zt(this,e))}};function ao(e,t,n){const s=Fr(e),r=s[t]();return s!==e&&!Mt(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const uf=Array.prototype;function tn(e,t,n,s,r,o){const i=Fr(e),l=i!==e&&!Mt(e),a=i[t];if(a!==uf[t]){const d=a.apply(e,o);return l?Ft(d):d}let c=n;i!==e&&(l?c=function(d,g){return n.call(this,Zt(e,d),g,e)}:n.length>2&&(c=function(d,g){return n.call(this,d,g,e)}));const u=a.call(i,c,s);return l&&r?r(u):u}function Ji(e,t,n,s){const r=Fr(e),o=r!==e&&!Mt(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(c,u,d){return l&&(l=!1,c=Zt(e,c)),n.call(this,c,Zt(e,u),d,e)}):n.length>3&&(i=function(c,u,d){return n.call(this,c,u,d,e)}));const a=r[t](i,...s);return l?Zt(e,a):a}function co(e,t,n){const s=Se(e);lt(s,"iterate",xs);const r=s[t](...n);return(r===-1||r===!1)&&pi(n[0])?(n[0]=Se(n[0]),s[t](...n)):r}function os(e,t,n=[]){hn(),li();const s=Se(e)[t].apply(e,n);return ai(),pn(),s}const ff=ri("__proto__,__v_isRef,__isVue"),Ra=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(jt));function df(e){jt(e)||(e=String(e));const t=Se(this);return lt(t,"has",e),t.hasOwnProperty(e)}class Ea{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?_f:Ma:o?Pa:La).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=fe(t);if(!r){let a;if(i&&(a=cf[n]))return a;if(n==="hasOwnProperty")return df}const l=Reflect.get(t,n,ft(t)?t:s);if((jt(n)?Ra.has(n):ff(n))||(r||lt(t,"get",n),o))return l;if(ft(l)){const a=i&&ii(n)?l:l.value;return r&&Re(a)?Lo(a):a}return Re(l)?r?Lo(l):di(l):l}}class Ia extends Ea{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=fe(t)&&ii(n);if(!this._isShallow){const c=gn(o);if(!Mt(s)&&!gn(s)&&(o=Se(o),s=Se(s)),!i&&ft(o)&&!ft(s))return c||(o.value=s),!0}const l=i?Number(n)<t.length:Te(t,n),a=Reflect.set(t,n,s,ft(t)?t:r);return t===Se(r)&&a&&(l?Jt(s,o)&&rn(t,"set",n,s):rn(t,"add",n,s)),a}deleteProperty(t,n){const s=Te(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&rn(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!jt(n)||!Ra.has(n))&&lt(t,"has",n),s}ownKeys(t){return lt(t,"iterate",fe(t)?"length":Mn),Reflect.ownKeys(t)}}class hf extends Ea{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const pf=new Ia,gf=new hf,mf=new Ia(!0);const Io=e=>e,Ws=e=>Reflect.getPrototypeOf(e);function vf(e,t,n){return function(...s){const r=this.__v_raw,o=Se(r),i=Kn(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=r[e](...s),u=n?Io:t?es:Ft;return!t&&lt(o,"iterate",a?Eo:Mn),Ke(Object.create(c),{next(){const{value:d,done:g}=c.next();return g?{value:d,done:g}:{value:l?[u(d[0]),u(d[1])]:u(d),done:g}}})}}function Vs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function yf(e,t){const n={get(r){const o=this.__v_raw,i=Se(o),l=Se(r);e||(Jt(r,l)&&lt(i,"get",r),lt(i,"get",l));const{has:a}=Ws(i),c=t?Io:e?es:Ft;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&&lt(Se(r),"iterate",Mn),r.size},has(r){const o=this.__v_raw,i=Se(o),l=Se(r);return e||(Jt(r,l)&&lt(i,"has",r),lt(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=Se(l),c=t?Io:e?es:Ft;return!e&&lt(a,"iterate",Mn),l.forEach((u,d)=>r.call(o,c(u),c(d),i))}};return Ke(n,e?{add:Vs("add"),set:Vs("set"),delete:Vs("delete"),clear:Vs("clear")}:{add(r){const o=Se(this),i=Ws(o),l=Se(r),a=!t&&!Mt(r)&&!gn(r)?l:r;return i.has.call(o,a)||Jt(r,a)&&i.has.call(o,r)||Jt(l,a)&&i.has.call(o,l)||(o.add(a),rn(o,"add",a,a)),this},set(r,o){!t&&!Mt(o)&&!gn(o)&&(o=Se(o));const i=Se(this),{has:l,get:a}=Ws(i);let c=l.call(i,r);c||(r=Se(r),c=l.call(i,r));const u=a.call(i,r);return i.set(r,o),c?Jt(o,u)&&rn(i,"set",r,o):rn(i,"add",r,o),this},delete(r){const o=Se(this),{has:i,get:l}=Ws(o);let a=i.call(o,r);a||(r=Se(r),a=i.call(o,r)),l&&l.call(o,r);const c=o.delete(r);return a&&rn(o,"delete",r,void 0),c},clear(){const r=Se(this),o=r.size!==0,i=r.clear();return o&&rn(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=vf(r,e,t)}),n}function fi(e,t){const n=yf(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Te(n,r)&&r in s?n:s,r,o)}const bf={get:fi(!1,!1)},kf={get:fi(!1,!0)},wf={get:fi(!0,!1)};const La=new WeakMap,Pa=new WeakMap,Ma=new WeakMap,_f=new WeakMap;function Sf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function di(e){return gn(e)?e:hi(e,!1,pf,bf,La)}function xf(e){return hi(e,!1,mf,kf,Pa)}function Lo(e){return hi(e,!0,gf,wf,Ma)}function hi(e,t,n,s,r){if(!Re(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=Sf(qu(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function Nn(e){return gn(e)?Nn(e.__v_raw):!!(e&&e.__v_isReactive)}function gn(e){return!!(e&&e.__v_isReadonly)}function Mt(e){return!!(e&&e.__v_isShallow)}function pi(e){return e?!!e.__v_raw:!1}function Se(e){const t=e&&e.__v_raw;return t?Se(t):e}function Cf(e){return!Te(e,"__v_skip")&&Object.isExtensible(e)&&va(e,"__v_skip",!0),e}const Ft=e=>Re(e)?di(e):e,es=e=>Re(e)?Lo(e):e;function ft(e){return e?e.__v_isRef===!0:!1}function H(e){return Tf(e,!1)}function Tf(e,t){return ft(e)?e:new $f(e,t)}class $f{constructor(t,n){this.dep=new ui,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Se(t),this._value=n?t:Ft(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Mt(t)||gn(t);t=s?t:Se(t),Jt(t,n)&&(this._rawValue=t,this._value=s?t:Ft(t),this.dep.trigger())}}function X(e){return ft(e)?e.value:e}function Af(e){return ye(e)?e():X(e)}const Rf={get:(e,t,n)=>t==="__v_raw"?e:X(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ft(r)&&!ft(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Na(e){return Nn(e)?e:new Proxy(e,Rf)}class Ef{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ui(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ss-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Oe!==this)return Sa(this,!0),!0}get value(){const t=this.dep.track();return Ta(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function If(e,t,n=!1){let s,r;return ye(e)?s=e:(s=e.get,r=e.set),new Ef(s,r,n)}const Ks={},cr=new WeakMap;let Rn;function Lf(e,t=!1,n=Rn){if(n){let s=cr.get(n);s||cr.set(n,s=[]),s.push(e)}}function Pf(e,t,n=Me){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=n,c=w=>r?w:Mt(w)||r===!1||r===0?on(w,1):on(w);let u,d,g,p,f=!1,m=!1;if(ft(e)?(d=()=>e.value,f=Mt(e)):Nn(e)?(d=()=>c(e),f=!0):fe(e)?(m=!0,f=e.some(w=>Nn(w)||Mt(w)),d=()=>e.map(w=>{if(ft(w))return w.value;if(Nn(w))return c(w);if(ye(w))return a?a(w,2):w()})):ye(e)?t?d=a?()=>a(e,2):e:d=()=>{if(g){hn();try{g()}finally{pn()}}const w=Rn;Rn=u;try{return a?a(e,3,[p]):e(p)}finally{Rn=w}}:d=Dt,t&&r){const w=d,P=r===!0?1/0:r;d=()=>on(w(),P)}const k=of(),v=()=>{u.stop(),k&&k.active&&oi(k.effects,u)};if(o&&t){const w=t;t=(...P)=>{const K=w(...P);return v(),K}}let S=m?new Array(e.length).fill(Ks):Ks;const T=w=>{if(!(!(u.flags&1)||!u.dirty&&!w))if(t){const P=u.run();if(w||r||f||(m?P.some((K,D)=>Jt(K,S[D])):Jt(P,S))){g&&g();const K=Rn;Rn=u;try{const D=[P,S===Ks?void 0:m&&S[0]===Ks?[]:S,p];S=P,a?a(t,3,D):t(...D)}finally{Rn=K}}}else u.run()};return l&&l(T),u=new wa(d),u.scheduler=i?()=>i(T,!1):T,p=w=>Lf(w,!1,u),g=u.onStop=()=>{const w=cr.get(u);if(w){if(a)a(w,4);else for(const P of w)P();cr.delete(u)}},t?s?T(!0):S=u.run():i?i(T.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function on(e,t=1/0,n){if(t<=0||!Re(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ft(e))on(e.value,t,n);else if(fe(e))for(let s=0;s<e.length;s++)on(e[s],t,n);else if(Or(e)||Kn(e))e.forEach(s=>{on(s,t,n)});else if(ma(e)){for(const s in e)on(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&on(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 Ds(e,t,n,s){try{return s?e(...s):e()}catch(r){zr(r,t,n)}}function Ot(e,t,n,s){if(ye(e)){const r=Ds(e,t,n,s);return r&&pa(r)&&r.catch(o=>{zr(o,t,n)}),r}if(fe(e)){const r=[];for(let o=0;o<e.length;o++)r.push(Ot(e[o],t,n,s));return r}}function zr(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Me;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 d=0;d<u.length;d++)if(u[d](e,a,c)===!1)return}l=l.parent}if(o){hn(),Ds(o,null,10,[e,a,c]),pn();return}}Mf(e,n,r,s,i)}function Mf(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const mt=[];let Kt=-1;const Zn=[];let _n=null,Hn=0;const Oa=Promise.resolve();let ur=null;function Bt(e){const t=ur||Oa;return e?t.then(this?e.bind(this):e):t}function Nf(e){let t=Kt+1,n=mt.length;for(;t<n;){const s=t+n>>>1,r=mt[s],o=Cs(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function gi(e){if(!(e.flags&1)){const t=Cs(e),n=mt[mt.length-1];!n||!(e.flags&2)&&t>=Cs(n)?mt.push(e):mt.splice(Nf(t),0,e),e.flags|=1,Ba()}}function Ba(){ur||(ur=Oa.then(ja))}function Da(e){fe(e)?Zn.push(...e):_n&&e.id===-1?_n.splice(Hn+1,0,e):e.flags&1||(Zn.push(e),e.flags|=1),Ba()}function Xi(e,t,n=Kt+1){for(;n<mt.length;n++){const s=mt[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;mt.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Ga(e){if(Zn.length){const t=[...new Set(Zn)].sort((n,s)=>Cs(n)-Cs(s));if(Zn.length=0,_n){_n.push(...t);return}for(_n=t,Hn=0;Hn<_n.length;Hn++){const n=_n[Hn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}_n=null,Hn=0}}const Cs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ja(e){try{for(Kt=0;Kt<mt.length;Kt++){const t=mt[Kt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ds(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Kt<mt.length;Kt++){const t=mt[Kt];t&&(t.flags&=-2)}Kt=-1,mt.length=0,Ga(),ur=null,(mt.length||Zn.length)&&ja()}}let rt=null,Fa=null;function fr(e){const t=rt;return rt=e,Fa=e&&e.type.__scopeId||null,t}function et(e,t=rt,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&pr(-1);const o=fr(t),i=dn.length;let l;try{l=e(...r)}finally{for(let a=dn.length;a>i;a--)wi();fr(o),s._d&&pr(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function st(e,t){if(rt===null)return e;const n=Zr(rt),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,i,l,a=Me]=t[r];o&&(ye(o)&&(o={mounted:o,updated:o}),o.deep&&on(i),s.push({dir:o,instance:n,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function Tn(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&&(hn(),Ot(a,n,8,[e.el,l,e,t]),pn())}}function On(e,t){if(ct){let n=ct.provides;const s=ct.parent&&ct.parent.provides;s===n&&(n=ct.provides=Object.create(s)),n[e]=t}}function Nt(e,t,n=!1){const s=Kr();if(s||Jn){let r=Jn?Jn._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&&ye(t)?t.call(s&&s.proxy):t}}const Of=Symbol.for("v-scx"),Bf=()=>Nt(Of);function Ne(e,t,n){return za(e,t,n)}function za(e,t,n=Me){const{immediate:s,deep:r,flush:o,once:i}=n,l=Ke({},n),a=t&&s||!t&&o!=="post";let c;if(Rs){if(o==="sync"){const p=Bf();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Dt,p.resume=Dt,p.pause=Dt,p}}const u=ct;l.call=(p,f,m)=>Ot(p,u,f,m);let d=!1;o==="post"?l.scheduler=p=>{pt(p,u&&u.suspense)}:o!=="sync"&&(d=!0,l.scheduler=(p,f)=>{f?p():gi(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const g=Pf(e,t,l);return Rs&&(c?c.push(g):a&&g()),g}function Df(e,t,n){const s=this.proxy,r=De(e)?e.includes(".")?Ua(s,e):()=>s[e]:e.bind(s,s);let o;ye(t)?o=t:(o=t.handler,n=t);const i=Gs(this),l=za(r,o.bind(s),n);return i(),l}function Ua(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 kn=new WeakMap,Ha=Symbol("_vte"),qa=e=>e.__isTeleport,En=e=>e&&(e.disabled||e.disabled===""),Gf=e=>e&&(e.defer||e.defer===""),Qi=e=>typeof SVGElement<"u"&&e instanceof SVGElement,el=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Po=(e,t)=>{const n=e&&e.to;return De(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:d,pbc:g,o:{insert:p,querySelector:f,createText:m,createComment:k,parentNode:v}}=c,S=En(t.props);let{dynamicChildren:T}=t;const w=(D,ue,q)=>{D.shapeFlag&16&&u(D.children,ue,q,r,o,i,l,a)},P=(D=t)=>{const ue=En(D.props),q=D.target=Po(D.props,f),ee=Mo(q,D,m,p);q&&(i!=="svg"&&Qi(q)?i="svg":i!=="mathml"&&el(q)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(q),ue||(w(D,q,ee),fs(D,!1)))},K=D=>{const ue=()=>{if(kn.get(D)===ue){if(kn.delete(D),En(D.props)){const q=v(D.el)||n;w(D,q,D.anchor),fs(D,!0)}P(D)}};kn.set(D,ue),pt(ue,o)};if(e==null){const D=t.el=m(""),ue=t.anchor=m("");if(p(D,n,s),p(ue,n,s),Gf(t.props)||o&&o.pendingBranch){K(t);return}S&&(w(t,n,ue),fs(t,!0)),P()}else{t.el=e.el;const D=t.anchor=e.anchor,ue=kn.get(e);if(ue){ue.flags|=8,kn.delete(e),K(t);return}t.targetStart=e.targetStart;const q=t.target=e.target,ee=t.targetAnchor=e.targetAnchor,he=En(e.props),j=he?n:q,pe=he?D:ee;if(i==="svg"||Qi(q)?i="svg":(i==="mathml"||el(q))&&(i="mathml"),T?(g(e.dynamicChildren,T,j,r,o,i,l),ki(e,t,!0)):a||d(e,t,j,pe,r,o,i,l,!1),S)he?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Zs(t,n,D,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const M=Po(t.props,f);M&&(t.target=M,Zs(t,M,null,c,0))}else he&&Zs(t,q,ee,c,1);fs(t,S)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:a,targetStart:c,targetAnchor:u,target:d,props:g}=e,p=En(g),f=o||!p,m=kn.get(e);if(m&&(m.flags|=8,kn.delete(e)),d&&(r(c),r(u)),o&&r(a),!m&&(p||d)&&i&16)for(let k=0;k<l.length;k++){const v=l[k];s(v,t,n,f,!!v.dynamicChildren)}},move:Zs,hydrate:Ff};function Zs(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,d=o===2;if(d&&s(i,t,n),!kn.has(e)&&(!d||En(u))&&a&16)for(let g=0;g<c.length;g++)r(c[g],t,n,2);d&&s(l,t,n)}function Ff(e,t,n,s,r,o,{o:{nextSibling:i,parentNode:l,querySelector:a,insert:c,createText:u}},d){function g(k,v){let S=v;for(;S;){if(S&&S.nodeType===8){if(S.data==="teleport start anchor")t.targetStart=S;else if(S.data==="teleport anchor"){t.targetAnchor=S,k._lpa=t.targetAnchor&&i(t.targetAnchor);break}}S=i(S)}}function p(k,v){v.anchor=d(i(k),v,l(k),n,s,r,o)}const f=t.target=Po(t.props,a),m=En(t.props);if(f){const k=f._lpa||f.firstChild;t.shapeFlag&16&&(m?(p(e,t),g(f,k),t.targetAnchor||Mo(f,t,u,c,l(e)===f?e:null)):(t.anchor=i(e),g(f,k),t.targetAnchor||Mo(f,t,u,c),d(k&&i(k),t,f,n,s,r,o))),fs(t,m)}else m&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const mi=jf;function fs(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 Mo(e,t,n,s,r=null){const o=t.targetStart=n(""),i=t.targetAnchor=n("");return o[Ha]=i,e&&(s(o,e,r),s(i,e,r)),i}const Lt=Symbol("_leaveCb"),is=Symbol("_enterCb");function Wa(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Xt(()=>{e.isMounted=!0}),vn(()=>{e.isUnmounting=!0}),e}const Rt=[Function,Array],Va={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Rt,onEnter:Rt,onAfterEnter:Rt,onEnterCancelled:Rt,onBeforeLeave:Rt,onLeave:Rt,onAfterLeave:Rt,onLeaveCancelled:Rt,onBeforeAppear:Rt,onAppear:Rt,onAfterAppear:Rt,onAppearCancelled:Rt},Ka=e=>{const t=e.subTree;return t.component?Ka(t.component):t},zf={name:"BaseTransition",props:Va,setup(e,{slots:t}){const n=Kr(),s=Wa();return()=>{const r=t.default&&vi(t.default(),!0),o=r&&r.length?Za(r):n.subTree?Z():void 0;if(!o)return;const i=Se(e),{mode:l}=i;if(s.isLeaving)return uo(o);const a=tl(o);if(!a)return uo(o);let c=Ts(a,i,s,n,d=>c=d);a.type!==at&&Dn(a,c);let u=n.subTree&&tl(n.subTree);if(u&&u.type!==at&&!In(u,a)&&Ka(n).type!==at){let d=Ts(u,i,s,n);if(Dn(u,d),l==="out-in"&&a.type!==at)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},uo(o);l==="in-out"&&a.type!==at?d.delayLeave=(g,p,f)=>{const m=Ya(s,u);m[String(u.key)]=u,g[Lt]=()=>{p(),g[Lt]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{f(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Za(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==at){t=n;break}}return t}const Uf=zf;function Ya(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 Ts(e,t,n,s,r){const{appear:o,mode:i,persisted:l=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:g,onLeave:p,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:k,onAppear:v,onAfterAppear:S,onAppearCancelled:T}=t,w=String(e.key),P=Ya(n,e),K=(q,ee)=>{q&&Ot(q,s,9,ee)},D=(q,ee)=>{const he=ee[1];K(q,ee),fe(q)?q.every(j=>j.length<=1)&&he():q.length<=1&&he()},ue={mode:i,persisted:l,beforeEnter(q){let ee=a;if(!n.isMounted)if(o)ee=k||a;else return;q[Lt]&&q[Lt](!0);const he=P[w];he&&In(e,he)&&he.el[Lt]&&he.el[Lt](),K(ee,[q])},enter(q){if(P[w]===e)return;let ee=c,he=u,j=d;if(!n.isMounted)if(o)ee=v||c,he=S||u,j=T||d;else return;let pe=!1;q[is]=A=>{pe||(pe=!0,A?K(j,[q]):K(he,[q]),ue.delayedLeave&&ue.delayedLeave(),q[is]=void 0)};const M=q[is].bind(null,!1);ee?D(ee,[q,M]):M()},leave(q,ee){const he=String(e.key);if(q[is]&&q[is](!0),n.isUnmounting)return ee();K(g,[q]);let j=!1;q[Lt]=M=>{j||(j=!0,ee(),M?K(m,[q]):K(f,[q]),q[Lt]=void 0,P[he]===e&&delete P[he])};const pe=q[Lt].bind(null,!1);P[he]=e,p?D(p,[q,pe]):pe()},clone(q){const ee=Ts(q,t,n,s,r);return r&&r(ee),ee}};return ue}function uo(e){if(Ur(e))return e=xn(e),e.children=null,e}function tl(e){if(!Ur(e))return qa(e.type)&&e.children?Za(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&&ye(n.default))return n.default()}}function Dn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dn(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 vi(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===re?(i.patchFlag&128&&r++,s=s.concat(vi(i.children,t,l))):(t||i.type!==at)&&s.push(l!=null?xn(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 ye(e)?Ke({name:e.name},t,{setup:e}):e}function Ja(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function nl(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const dr=new WeakMap;function ys(e,t,n,s,r=!1){if(fe(e)){e.forEach((m,k)=>ys(m,t&&(fe(t)?t[k]:t),n,s,r));return}if(Yn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ys(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?Zr(s.component):s.el,i=r?null:o,{i:l,r:a}=e,c=t&&t.r,u=l.refs===Me?l.refs={}:l.refs,d=l.setupState,g=Se(d),p=d===Me?ha:m=>nl(u,m)?!1:Te(g,m),f=(m,k)=>!(k&&nl(u,k));if(c!=null&&c!==a){if(sl(t),De(c))u[c]=null,p(c)&&(d[c]=null);else if(ft(c)){const m=t;f(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(ye(a))Ds(a,l,12,[i,u]);else{const m=De(a),k=ft(a);if(m||k){const v=()=>{if(e.f){const S=m?p(a)?d[a]:u[a]:f()||!e.k?a.value:u[e.k];if(r)fe(S)&&oi(S,o);else if(fe(S))S.includes(o)||S.push(o);else if(m)u[a]=[o],p(a)&&(d[a]=u[a]);else{const T=[o];f(a,e.k)&&(a.value=T),e.k&&(u[e.k]=T)}}else m?(u[a]=i,p(a)&&(d[a]=i)):k&&(f(a,e.k)&&(a.value=i),e.k&&(u[e.k]=i))};if(i){const S=()=>{v(),dr.delete(e)};S.id=-1,dr.set(e,S),pt(S,n)}else sl(e),v()}}}function sl(e){const t=dr.get(e);t&&(t.flags|=8,dr.delete(e))}jr().requestIdleCallback;jr().cancelIdleCallback;const Yn=e=>!!e.type.__asyncLoader,Ur=e=>e.type.__isKeepAlive;function Hf(e,t){Xa(e,"a",t)}function qf(e,t){Xa(e,"da",t)}function Xa(e,t,n=ct){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Hr(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Ur(r.parent.vnode)&&Wf(s,t,n,r),r=r.parent}}function Wf(e,t,n,s){const r=Hr(t,e,s,!0);qr(()=>{oi(s[t],r)},n)}function Hr(e,t,n=ct,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{hn();const l=Gs(n),a=Ot(t,n,e,i);return l(),pn(),a});return s?r.unshift(o):r.push(o),o}}const mn=e=>(t,n=ct)=>{(!Rs||e==="sp")&&Hr(e,(...s)=>t(...s),n)},Vf=mn("bm"),Xt=mn("m"),Qa=mn("bu"),ec=mn("u"),vn=mn("bum"),qr=mn("um"),Kf=mn("sp"),Zf=mn("rtg"),Yf=mn("rtc");function Jf(e,t=ct){Hr("ec",e,t)}const Xf="components",tc=Symbol.for("v-ndc");function Qf(e){return De(e)?ed(Xf,e,!1)||e:e||tc}function ed(e,t,n=!0,s=!1){const r=rt||ct;if(r){const o=r.type;{const l=Dd(o,!1);if(l&&(l===t||l===yt(t)||l===Dr(yt(t))))return o}const i=rl(r[e]||o[e],t)||rl(r.appContext[e],t);return!i&&s?o:i}}function rl(e,t){return e&&(e[t]||e[yt(t)]||e[Dr(yt(t))])}function Ve(e,t,n,s){let r;const o=n,i=fe(e);if(i||De(e)){const l=i&&Nn(e);let a=!1,c=!1;l&&(a=!Mt(e),c=gn(e),e=Fr(e)),r=new Array(e.length);for(let u=0,d=e.length;u<d;u++)r[u]=t(a?c?es(Ft(e[u])):Ft(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(Re(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 rr(e,t,n={},s,r,o){if(rt.ce||rt.parent&&Yn(rt.parent)&&rt.parent.ce){const c=n,u=Object.keys(c).length>0;return t!=="default"&&(c.name=t),b(),Ue(re,null,[V("slot",c,s&&s())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=dn.length;b();let a;try{const c=i&&nc(i(n)),u=n.key||o||c&&c.key;a=Ue(re,{key:(u&&!jt(u)?u:`_${t}`)+(!c&&s?"_fb":"")},c||(s?s():[]),c&&e._===1?64:-2)}catch(c){for(let u=dn.length;u>l;u--)wi();throw c}finally{i&&i._c&&(i._d=!0)}return a}function nc(e){return e.some(t=>As(t)?!(t.type===at||t.type===re&&!nc(t.children)):!0)?e:null}const No=e=>e?wc(e)?Zr(e):No(e.parent):null,bs=Ke(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=>No(e.parent),$root:e=>No(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>rc(e),$forceUpdate:e=>e.f||(e.f=()=>{gi(e.update)}),$nextTick:e=>e.n||(e.n=Bt.bind(e.proxy)),$watch:e=>Df.bind(e)}),fo=(e,t)=>e!==Me&&!e.__isScriptSetup&&Te(e,t),td={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(fo(s,t))return i[t]=1,s[t];if(r!==Me&&Te(r,t))return i[t]=2,r[t];if(Te(o,t))return i[t]=3,o[t];if(n!==Me&&Te(n,t))return i[t]=4,n[t];Oo&&(i[t]=0)}}const c=bs[t];let u,d;if(c)return t==="$attrs"&&lt(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==Me&&Te(n,t))return i[t]=4,n[t];if(d=a.config.globalProperties,Te(d,t))return d[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return fo(r,t)?(r[t]=n,!0):s!==Me&&Te(s,t)?(s[t]=n,!0):Te(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!==Me&&l[0]!=="$"&&Te(e,l)||fo(t,l)||Te(o,l)||Te(s,l)||Te(bs,l)||Te(r.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Te(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ol(e){return fe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Oo=!0;function nd(e){const t=rc(e),n=e.proxy,s=e.ctx;Oo=!1,t.beforeCreate&&il(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:c,created:u,beforeMount:d,mounted:g,beforeUpdate:p,updated:f,activated:m,deactivated:k,beforeDestroy:v,beforeUnmount:S,destroyed:T,unmounted:w,render:P,renderTracked:K,renderTriggered:D,errorCaptured:ue,serverPrefetch:q,expose:ee,inheritAttrs:he,components:j,directives:pe,filters:M}=t;if(c&&sd(c,s,null),i)for(const ae in i){const te=i[ae];ye(te)&&(s[ae]=te.bind(n))}if(r){const ae=r.call(n,n);Re(ae)&&(e.data=di(ae))}if(Oo=!0,o)for(const ae in o){const te=o[ae],qe=ye(te)?te.bind(n,n):ye(te.get)?te.get.bind(n,n):Dt,He=!ye(te)&&ye(te.set)?te.set.bind(n):Dt,Ge=Q({get:qe,set:He});Object.defineProperty(s,ae,{enumerable:!0,configurable:!0,get:()=>Ge.value,set:je=>Ge.value=je})}if(l)for(const ae in l)sc(l[ae],s,n,ae);if(a){const ae=ye(a)?a.call(n):a;Reflect.ownKeys(ae).forEach(te=>{On(te,ae[te])})}u&&il(u,e,"c");function Y(ae,te){fe(te)?te.forEach(qe=>ae(qe.bind(n))):te&&ae(te.bind(n))}if(Y(Vf,d),Y(Xt,g),Y(Qa,p),Y(ec,f),Y(Hf,m),Y(qf,k),Y(Jf,ue),Y(Yf,K),Y(Zf,D),Y(vn,S),Y(qr,w),Y(Kf,q),fe(ee))if(ee.length){const ae=e.exposed||(e.exposed={});ee.forEach(te=>{Object.defineProperty(ae,te,{get:()=>n[te],set:qe=>n[te]=qe,enumerable:!0})})}else e.exposed||(e.exposed={});P&&e.render===Dt&&(e.render=P),he!=null&&(e.inheritAttrs=he),j&&(e.components=j),pe&&(e.directives=pe),q&&Ja(e)}function sd(e,t,n=Dt){fe(e)&&(e=Bo(e));for(const s in e){const r=e[s];let o;Re(r)?"default"in r?o=Nt(r.from||s,r.default,!0):o=Nt(r.from||s):o=Nt(r),ft(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function il(e,t,n){Ot(fe(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function sc(e,t,n,s){let r=s.includes(".")?Ua(n,s):()=>n[s];if(De(e)){const o=t[e];ye(o)&&Ne(r,o)}else if(ye(e))Ne(r,e.bind(n));else if(Re(e))if(fe(e))e.forEach(o=>sc(o,t,n,s));else{const o=ye(e.handler)?e.handler.bind(n):t[e.handler];ye(o)&&Ne(r,o,e)}}function rc(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=>hr(a,c,i,!0)),hr(a,t,i)),Re(t)&&o.set(t,a),a}function hr(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&hr(e,o,n,!0),r&&r.forEach(i=>hr(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=rd[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const rd={data:ll,props:al,emits:al,methods:ds,computed:ds,beforeCreate:ht,created:ht,beforeMount:ht,mounted:ht,beforeUpdate:ht,updated:ht,beforeDestroy:ht,beforeUnmount:ht,destroyed:ht,unmounted:ht,activated:ht,deactivated:ht,errorCaptured:ht,serverPrefetch:ht,components:ds,directives:ds,watch:id,provide:ll,inject:od};function ll(e,t){return t?e?function(){return Ke(ye(e)?e.call(this,this):e,ye(t)?t.call(this,this):t)}:t:e}function od(e,t){return ds(Bo(e),Bo(t))}function Bo(e){if(fe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ht(e,t){return e?[...new Set([].concat(e,t))]:t}function ds(e,t){return e?Ke(Object.create(null),e,t):t}function al(e,t){return e?fe(e)&&fe(t)?[...new Set([...e,...t])]:Ke(Object.create(null),ol(e),ol(t??{})):t}function id(e,t){if(!e)return t;if(!t)return e;const n=Ke(Object.create(null),e);for(const s in t)n[s]=ht(e[s],t[s]);return n}function oc(){return{app:null,config:{isNativeTag:ha,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 ld=0;function ad(e,t){return function(s,r=null){ye(s)||(s=Ke({},s)),r!=null&&!Re(r)&&(r=null);const o=oc(),i=new WeakSet,l=[];let a=!1;const c=o.app={_uid:ld++,_component:s,_props:r,_container:null,_context:o,_instance:null,version:jd,get config(){return o.config},set config(u){},use(u,...d){return i.has(u)||(u&&ye(u.install)?(i.add(u),u.install(c,...d)):ye(u)&&(i.add(u),u(c,...d))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,d){return d?(o.components[u]=d,c):o.components[u]},directive(u,d){return d?(o.directives[u]=d,c):o.directives[u]},mount(u,d,g){if(!a){const p=c._ceVNode||V(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,Zr(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,d){return o.provides[u]=d,c},runWithContext(u){const d=Jn;Jn=c;try{return u()}finally{Jn=d}}};return c}}let Jn=null;const cd=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${yt(t)}Modifiers`]||e[`${Cn(t)}Modifiers`];function ud(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Me;let r=n;const o=t.startsWith("update:"),i=o&&cd(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>De(u)?u.trim():u)),i.number&&(r=n.map(Gr)));let l,a=s[l=oo(t)]||s[l=oo(yt(t))];!a&&o&&(a=s[l=oo(Cn(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 fd=new WeakMap;function ic(e,t,n=!1){const s=n?fd:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!ye(e)){const a=c=>{const u=ic(c,t,!0);u&&(l=!0,Ke(i,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(Re(e)&&s.set(e,null),null):(fe(o)?o.forEach(a=>i[a]=null):Ke(i,o),Re(e)&&s.set(e,i),i)}function Wr(e,t){return!e||!Mr(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Te(e,t[0].toLowerCase()+t.slice(1))||Te(e,Cn(t))||Te(e,t))}function cl(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:a,render:c,renderCache:u,props:d,data:g,setupState:p,ctx:f,inheritAttrs:m}=e,k=fr(e);let v,S;try{if(n.shapeFlag&4){const w=r||s,P=w;v=Yt(c.call(P,w,u,d,p,g,f)),S=l}else{const w=t;v=Yt(w.length>1?w(d,{attrs:l,slots:i,emit:a}):w(d,null)),S=t.props?l:dd(l)}}catch(w){dn.length=0,zr(w,e,1),v=V(at)}let T=v;if(S&&m!==!1){const w=Object.keys(S),{shapeFlag:P}=T;w.length&&P&7&&(o&&w.some(Nr)&&(S=hd(S,o)),T=xn(T,S,!1,!0))}return n.dirs&&(T=xn(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&Dn(T,n.transition),v=T,fr(k),v}const dd=e=>{let t;for(const n in e)(n==="class"||n==="style"||Mr(n))&&((t||(t={}))[n]=e[n]);return t},hd=(e,t)=>{const n={};for(const s in e)(!Nr(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function pd(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?ul(s,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const g=u[d];if(lc(i,s,g)&&!Wr(c,g))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?ul(s,i,c):!0:!!i;return!1}function ul(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(lc(t,e,o)&&!Wr(n,o))return!0}return!1}function lc(e,t,n){const s=e[n],r=t[n];return n==="style"&&Re(s)&&Re(r)?!Bs(s,r):s!==r}function gd({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 ac={},cc=()=>Object.create(ac),uc=e=>Object.getPrototypeOf(e)===ac;function md(e,t,n,s=!1){const r={},o=cc();e.propsDefaults=Object.create(null),fc(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:xf(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function vd(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=Se(r),[a]=e.propsOptions;let c=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let g=u[d];if(Wr(e.emitsOptions,g))continue;const p=t[g];if(a)if(Te(o,g))p!==o[g]&&(o[g]=p,c=!0);else{const f=yt(g);r[f]=Do(a,l,f,p,e,!1)}else p!==o[g]&&(o[g]=p,c=!0)}}}else{fc(e,t,r,o)&&(c=!0);let u;for(const d in l)(!t||!Te(t,d)&&((u=Cn(d))===d||!Te(t,u)))&&(a?n&&(n[d]!==void 0||n[u]!==void 0)&&(r[d]=Do(a,l,d,void 0,e,!0)):delete r[d]);if(o!==l)for(const d in o)(!t||!Te(t,d))&&(delete o[d],c=!0)}c&&rn(e.attrs,"set","")}function fc(e,t,n,s){const[r,o]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(gs(a))continue;const c=t[a];let u;r&&Te(r,u=yt(a))?!o||!o.includes(u)?n[u]=c:(l||(l={}))[u]=c:Wr(e.emitsOptions,a)||(!(a in s)||c!==s[a])&&(s[a]=c,i=!0)}if(o){const a=Se(n),c=l||Me;for(let u=0;u<o.length;u++){const d=o[u];n[d]=Do(r,a,d,c[d],e,!Te(c,d))}}return i}function Do(e,t,n,s,r,o){const i=e[n];if(i!=null){const l=Te(i,"default");if(l&&s===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&ye(a)){const{propsDefaults:c}=r;if(n in c)s=c[n];else{const u=Gs(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===Cn(n))&&(s=!0))}return s}const yd=new WeakMap;function dc(e,t,n=!1){const s=n?yd:t.propsCache,r=s.get(e);if(r)return r;const o=e.props,i={},l=[];let a=!1;if(!ye(e)){const u=d=>{a=!0;const[g,p]=dc(d,t,!0);Ke(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 Re(e)&&s.set(e,Vn),Vn;if(fe(o))for(let u=0;u<o.length;u++){const d=yt(o[u]);fl(d)&&(i[d]=Me)}else if(o)for(const u in o){const d=yt(u);if(fl(d)){const g=o[u],p=i[d]=fe(g)||ye(g)?{type:g}:Ke({},g),f=p.type;let m=!1,k=!0;if(fe(f))for(let v=0;v<f.length;++v){const S=f[v],T=ye(S)&&S.name;if(T==="Boolean"){m=!0;break}else T==="String"&&(k=!1)}else m=ye(f)&&f.name==="Boolean";p[0]=m,p[1]=k,(m||Te(p,"default"))&&l.push(d)}}const c=[i,l];return Re(e)&&s.set(e,c),c}function fl(e){return e[0]!=="$"&&!gs(e)}const yi=e=>e==="_"||e==="_ctx"||e==="$stable",bi=e=>fe(e)?e.map(Yt):[Yt(e)],bd=(e,t,n)=>{if(t._n)return t;const s=et((...r)=>bi(t(...r)),n);return s._c=!1,s},hc=(e,t,n)=>{const s=e._ctx;for(const r in e){if(yi(r))continue;const o=e[r];if(ye(o))t[r]=bd(r,o,s);else if(o!=null){const i=bi(o);t[r]=()=>i}}},pc=(e,t)=>{const n=bi(t);e.slots.default=()=>n},gc=(e,t,n)=>{for(const s in t)(n||!yi(s))&&(e[s]=t[s])},kd=(e,t,n)=>{const s=e.slots=cc();if(e.vnode.shapeFlag&32){const r=t._;r?(gc(s,t,n),n&&va(s,"_",r,!0)):hc(t,s)}else t&&pc(e,t)},wd=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=Me;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:gc(r,t,n):(o=!t.$stable,hc(t,r)),i=t}else t&&(pc(e,t),i={default:1});if(o)for(const l in r)!yi(l)&&i[l]==null&&delete r[l]},pt=Td;function _d(e){return Sd(e)}function Sd(e,t){const n=jr();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:g,setScopeId:p=Dt,insertStaticContent:f}=e,m=(y,_,R,B=null,O=null,I=null,W=void 0,U=null,F=!!_.dynamicChildren)=>{if(y===_)return;y&&!In(y,_)&&(B=bt(y),je(y,O,I,!0),y=null),_.patchFlag===-2&&(F=!1,_.dynamicChildren=null);const{type:L,ref:le,shapeFlag:J}=_;switch(L){case Vr:k(y,_,R,B);break;case at:v(y,_,R,B);break;case ks:y==null&&S(_,R,B,W);break;case re:j(y,_,R,B,O,I,W,U,F);break;default:J&1?P(y,_,R,B,O,I,W,U,F):J&6?pe(y,_,R,B,O,I,W,U,F):(J&64||J&128)&&L.process(y,_,R,B,O,I,W,U,F,se)}le!=null&&O?ys(le,y&&y.ref,I,_||y,!_):le==null&&y&&y.ref!=null&&ys(y.ref,null,I,y,!0)},k=(y,_,R,B)=>{if(y==null)s(_.el=l(_.children),R,B);else{const O=_.el=y.el;_.children!==y.children&&c(O,_.children)}},v=(y,_,R,B)=>{y==null?s(_.el=a(_.children||""),R,B):_.el=y.el},S=(y,_,R,B)=>{[y.el,y.anchor]=f(y.children,_,R,B,y.el,y.anchor)},T=({el:y,anchor:_},R,B)=>{let O;for(;y&&y!==_;)O=g(y),s(y,R,B),y=O;s(_,R,B)},w=({el:y,anchor:_})=>{let R;for(;y&&y!==_;)R=g(y),r(y),y=R;r(_)},P=(y,_,R,B,O,I,W,U,F)=>{if(_.type==="svg"?W="svg":_.type==="math"&&(W="mathml"),y==null)K(_,R,B,O,I,W,U,F);else{const L=y.el&&y.el._isVueCE?y.el:null;try{L&&L._beginPatch(),q(y,_,O,I,W,U,F)}finally{L&&L._endPatch()}}},K=(y,_,R,B,O,I,W,U)=>{let F,L;const{props:le,shapeFlag:J,transition:oe,dirs:ie}=y;if(F=y.el=i(y.type,I,le&&le.is,le),J&8?u(F,y.children):J&16&&ue(y.children,F,null,B,O,ho(y,I),W,U),ie&&Tn(y,null,B,"created"),D(F,y,y.scopeId,W,B),le){for(const _e in le)_e!=="value"&&!gs(_e)&&o(F,_e,null,le[_e],I,B);"value"in le&&o(F,"value",null,le.value,I),(L=le.onVnodeBeforeMount)&&Ut(L,B,y)}ie&&Tn(y,null,B,"beforeMount");const me=xd(O,oe);me&&oe.beforeEnter(F),s(F,_,R),((L=le&&le.onVnodeMounted)||me||ie)&&pt(()=>{try{L&&Ut(L,B,y),me&&oe.enter(F),ie&&Tn(y,null,B,"mounted")}finally{}},O)},D=(y,_,R,B,O)=>{if(R&&p(y,R),B)for(let I=0;I<B.length;I++)p(y,B[I]);if(O){let I=O.subTree;if(_===I||yc(I.type)&&(I.ssContent===_||I.ssFallback===_)){const W=O.vnode;D(y,W,W.scopeId,W.slotScopeIds,O.parent)}}},ue=(y,_,R,B,O,I,W,U,F=0)=>{for(let L=F;L<y.length;L++){const le=y[L]=U?sn(y[L]):Yt(y[L]);m(null,le,_,R,B,O,I,W,U)}},q=(y,_,R,B,O,I,W)=>{const U=_.el=y.el;let{patchFlag:F,dynamicChildren:L,dirs:le}=_;F|=y.patchFlag&16;const J=y.props||Me,oe=_.props||Me;let ie;if(R&&$n(R,!1),(ie=oe.onVnodeBeforeUpdate)&&Ut(ie,R,_,y),le&&Tn(_,y,R,"beforeUpdate"),R&&$n(R,!0),L&&(!y.dynamicChildren||y.dynamicChildren.length!==L.length)&&(F=0,W=!1,L=null),(J.innerHTML&&oe.innerHTML==null||J.textContent&&oe.textContent==null)&&u(U,""),L?ee(y.dynamicChildren,L,U,R,B,ho(_,O),I):W||te(y,_,U,null,R,B,ho(_,O),I,!1),F>0){if(F&16)he(U,J,oe,R,O);else if(F&2&&J.class!==oe.class&&o(U,"class",null,oe.class,O),F&4&&o(U,"style",J.style,oe.style,O),F&8){const me=_.dynamicProps;for(let _e=0;_e<me.length;_e++){const ce=me[_e],de=J[ce],Le=oe[ce];(Le!==de||ce==="value")&&o(U,ce,de,Le,O,R)}}F&1&&y.children!==_.children&&u(U,_.children)}else!W&&L==null&&he(U,J,oe,R,O);((ie=oe.onVnodeUpdated)||le)&&pt(()=>{ie&&Ut(ie,R,_,y),le&&Tn(_,y,R,"updated")},B)},ee=(y,_,R,B,O,I,W)=>{for(let U=0;U<_.length;U++){const F=y[U],L=_[U],le=F.el&&(F.type===re||!In(F,L)||F.shapeFlag&198)?d(F.el):R;m(F,L,le,null,B,O,I,W,!0)}},he=(y,_,R,B,O)=>{if(_!==R){if(_!==Me)for(const I in _)!gs(I)&&!(I in R)&&o(y,I,_[I],null,O,B);for(const I in R){if(gs(I))continue;const W=R[I],U=_[I];W!==U&&I!=="value"&&o(y,I,U,W,O,B)}"value"in R&&o(y,"value",_.value,R.value,O)}},j=(y,_,R,B,O,I,W,U,F)=>{const L=_.el=y?y.el:l(""),le=_.anchor=y?y.anchor:l("");let{patchFlag:J,dynamicChildren:oe,slotScopeIds:ie}=_;ie&&(U=U?U.concat(ie):ie),y==null?(s(L,R,B),s(le,R,B),ue(_.children||[],R,le,O,I,W,U,F)):J>0&&J&64&&oe&&y.dynamicChildren&&y.dynamicChildren.length===oe.length?(ee(y.dynamicChildren,oe,R,O,I,W,U),(_.key!=null||O&&_===O.subTree)&&ki(y,_,!0)):te(y,_,R,le,O,I,W,U,F)},pe=(y,_,R,B,O,I,W,U,F)=>{_.slotScopeIds=U,y==null?_.shapeFlag&512?O.ctx.activate(_,R,B,W,F):M(_,R,B,O,I,W,F):A(y,_,F)},M=(y,_,R,B,O,I,W)=>{const U=y.component=Pd(y,B,O);if(Ur(y)&&(U.ctx.renderer=se),Md(U,!1,W),U.asyncDep){if(O&&O.registerDep(U,Y,W),!y.el){const F=U.subTree=V(at);v(null,F,_,R),y.placeholder=F.el}}else Y(U,y,_,R,O,I,W)},A=(y,_,R)=>{const B=_.component=y.component;if(pd(y,_,R))if(B.asyncDep&&!B.asyncResolved){ae(B,_,R);return}else B.next=_,B.update();else _.el=y.el,B.vnode=_},Y=(y,_,R,B,O,I,W)=>{const U=()=>{if(y.isMounted){let{next:J,bu:oe,u:ie,parent:me,vnode:_e}=y;{const $t=mc(y);if($t){J&&(J.el=_e.el,ae(y,J,W)),$t.asyncDep.then(()=>{pt(()=>{y.isUnmounted||L()},O)});return}}let ce=J,de;$n(y,!1),J?(J.el=_e.el,ae(y,J,W)):J=_e,oe&&sr(oe),(de=J.props&&J.props.onVnodeBeforeUpdate)&&Ut(de,me,J,_e),$n(y,!0);const Le=cl(y),wt=y.subTree;y.subTree=Le,m(wt,Le,d(wt.el),bt(wt),y,O,I),J.el=Le.el,ce===null&&gd(y,Le.el),ie&&pt(ie,O),(de=J.props&&J.props.onVnodeUpdated)&&pt(()=>Ut(de,me,J,_e),O)}else{let J;const{el:oe,props:ie}=_,{bm:me,m:_e,parent:ce,root:de,type:Le}=y,wt=Yn(_);$n(y,!1),me&&sr(me),!wt&&(J=ie&&ie.onVnodeBeforeMount)&&Ut(J,ce,_),$n(y,!0);{de.ce&&de.ce._hasShadowRoot()&&de.ce._injectChildStyle(Le,y.parent?y.parent.type:void 0);const $t=y.subTree=cl(y);m(null,$t,R,B,y,O,I),_.el=$t.el}if(_e&&pt(_e,O),!wt&&(J=ie&&ie.onVnodeMounted)){const $t=_;pt(()=>Ut(J,ce,$t),O)}(_.shapeFlag&256||ce&&Yn(ce.vnode)&&ce.vnode.shapeFlag&256)&&y.a&&pt(y.a,O),y.isMounted=!0,_=R=B=null}};y.scope.on();const F=y.effect=new wa(U);y.scope.off();const L=y.update=F.run.bind(F),le=y.job=F.runIfDirty.bind(F);le.i=y,le.id=y.uid,F.scheduler=()=>gi(le),$n(y,!0),L()},ae=(y,_,R)=>{_.component=y;const B=y.vnode.props;y.vnode=_,y.next=null,vd(y,_.props,B,R),wd(y,_.children,R),hn(),Xi(y),pn()},te=(y,_,R,B,O,I,W,U,F=!1)=>{const L=y&&y.children,le=y?y.shapeFlag:0,J=_.children,{patchFlag:oe,shapeFlag:ie}=_;if(oe>0){if(oe&128){He(L,J,R,B,O,I,W,U,F);return}else if(oe&256){qe(L,J,R,B,O,I,W,U,F);return}}ie&8?(le&16&&tt(L,O,I),J!==L&&u(R,J)):le&16?ie&16?He(L,J,R,B,O,I,W,U,F):tt(L,O,I,!0):(le&8&&u(R,""),ie&16&&ue(J,R,B,O,I,W,U,F))},qe=(y,_,R,B,O,I,W,U,F)=>{y=y||Vn,_=_||Vn;const L=y.length,le=_.length,J=Math.min(L,le);let oe;for(oe=0;oe<J;oe++){const ie=_[oe]=F?sn(_[oe]):Yt(_[oe]);m(y[oe],ie,R,null,O,I,W,U,F)}L>le?tt(y,O,I,!0,!1,J):ue(_,R,B,O,I,W,U,F,J)},He=(y,_,R,B,O,I,W,U,F)=>{let L=0;const le=_.length;let J=y.length-1,oe=le-1;for(;L<=J&&L<=oe;){const ie=y[L],me=_[L]=F?sn(_[L]):Yt(_[L]);if(In(ie,me))m(ie,me,R,null,O,I,W,U,F);else break;L++}for(;L<=J&&L<=oe;){const ie=y[J],me=_[oe]=F?sn(_[oe]):Yt(_[oe]);if(In(ie,me))m(ie,me,R,null,O,I,W,U,F);else break;J--,oe--}if(L>J){if(L<=oe){const ie=oe+1,me=ie<le?_[ie].el:B;for(;L<=oe;)m(null,_[L]=F?sn(_[L]):Yt(_[L]),R,me,O,I,W,U,F),L++}}else if(L>oe)for(;L<=J;)je(y[L],O,I,!0),L++;else{const ie=L,me=L,_e=new Map;for(L=me;L<=oe;L++){const Je=_[L]=F?sn(_[L]):Yt(_[L]);Je.key!=null&&_e.set(Je.key,L)}let ce,de=0;const Le=oe-me+1;let wt=!1,$t=0;const At=new Array(Le);for(L=0;L<Le;L++)At[L]=0;for(L=ie;L<=J;L++){const Je=y[L];if(de>=Le){je(Je,O,I,!0);continue}let _t;if(Je.key!=null)_t=_e.get(Je.key);else for(ce=me;ce<=oe;ce++)if(At[ce-me]===0&&In(Je,_[ce])){_t=ce;break}_t===void 0?je(Je,O,I,!0):(At[_t-me]=L+1,_t>=$t?$t=_t:wt=!0,m(Je,_[_t],R,null,O,I,W,U,F),de++)}const Us=wt?Cd(At):Vn;for(ce=Us.length-1,L=Le-1;L>=0;L--){const Je=me+L,_t=_[Je],zn=_[Je+1],Hs=Je+1<le?zn.el||vc(zn):B;At[L]===0?m(null,_t,R,Hs,O,I,W,U,F):wt&&(ce<0||L!==Us[ce]?Ge(_t,R,Hs,2):ce--)}}},Ge=(y,_,R,B,O=null)=>{const{el:I,type:W,transition:U,children:F,shapeFlag:L}=y;if(L&6){Ge(y.component.subTree,_,R,B);return}if(L&128){y.suspense.move(_,R,B);return}if(L&64){W.move(y,_,R,se);return}if(W===re){s(I,_,R);for(let J=0;J<F.length;J++)Ge(F[J],_,R,B);s(y.anchor,_,R);return}if(W===ks){T(y,_,R);return}if(B!==2&&L&1&&U)if(B===0)U.persisted&&!I[Lt]?s(I,_,R):(U.beforeEnter(I),s(I,_,R),pt(()=>U.enter(I),O));else{const{leave:J,delayLeave:oe,afterLeave:ie}=U,me=()=>{y.ctx.isUnmounted?r(I):s(I,_,R)},_e=()=>{const ce=I._isLeaving||!!I[Lt];I._isLeaving&&I[Lt](!0),U.persisted&&!ce?me():J(I,()=>{me(),ie&&ie()})};oe?oe(I,me,_e):_e()}else s(I,_,R)},je=(y,_,R,B=!1,O=!1)=>{const{type:I,props:W,ref:U,children:F,dynamicChildren:L,shapeFlag:le,patchFlag:J,dirs:oe,cacheIndex:ie,memo:me}=y;if(J===-2&&(O=!1),U!=null&&(hn(),ys(U,null,R,y,!0),pn()),ie!=null&&(_.renderCache[ie]=void 0),le&256){_.ctx.deactivate(y);return}const _e=le&1&&oe,ce=!Yn(y);let de;if(ce&&(de=W&&W.onVnodeBeforeUnmount)&&Ut(de,_,y),le&6)ot(y.component,R,B);else{if(le&128){y.suspense.unmount(R,B);return}_e&&Tn(y,null,_,"beforeUnmount"),le&64?y.type.remove(y,_,R,se,B):L&&!L.hasOnce&&(I!==re||J>0&&J&64)?tt(L,_,R,!1,!0):(I===re&&J&384||!O&&le&16)&&tt(F,_,R),B&&Fe(y)}const Le=me!=null&&ie==null;(ce&&(de=W&&W.onVnodeUnmounted)||_e||Le)&&pt(()=>{de&&Ut(de,_,y),_e&&Tn(y,null,_,"unmounted"),Le&&(y.el=null)},R)},Fe=y=>{const{type:_,el:R,anchor:B,transition:O}=y;if(_===re){Qt(R,B);return}if(_===ks){w(y);return}const I=()=>{r(R),O&&!O.persisted&&O.afterLeave&&O.afterLeave()};if(y.shapeFlag&1&&O&&!O.persisted){const{leave:W,delayLeave:U}=O,F=()=>W(R,I);U?U(y.el,I,F):F()}else I()},Qt=(y,_)=>{let R;for(;y!==_;)R=g(y),r(y),y=R;r(_)},ot=(y,_,R)=>{const{bum:B,scope:O,job:I,subTree:W,um:U,m:F,a:L}=y;dl(F),dl(L),B&&sr(B),O.stop(),I&&(I.flags|=8,je(W,y,_,R)),U&&pt(U,_),pt(()=>{y.isUnmounted=!0},_)},tt=(y,_,R,B=!1,O=!1,I=0)=>{for(let W=I;W<y.length;W++)je(y[W],_,R,B,O)},bt=y=>{if(y.shapeFlag&6)return bt(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const _=g(y.anchor||y.el),R=_&&_[Ha];return R?g(R):_};let Tt=!1;const N=(y,_,R)=>{let B;y==null?_._vnode&&(je(_._vnode,null,null,!0),B=_._vnode.component):m(_._vnode||null,y,_,null,null,null,R),_._vnode=y,Tt||(Tt=!0,Xi(B),Ga(),Tt=!1)},se={p:m,um:je,m:Ge,r:Fe,mt:M,mc:ue,pc:te,pbc:ee,n:bt,o:e};return{render:N,hydrate:void 0,createApp:ad(N)}}function ho({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 $n({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function xd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ki(e,t,n=!1){const s=e.children,r=t.children;if(fe(s)&&fe(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]=sn(r[o]),l.el=i.el),!n&&l.patchFlag!==-2&&ki(i,l)),l.type===Vr&&(l.patchFlag===-1&&(l=r[o]=sn(l)),l.el=i.el),l.type===at&&!l.el&&(l.el=i.el)}}function Cd(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 mc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:mc(t)}function dl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function vc(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?vc(t.subTree):null}const yc=e=>e.__isSuspense;function Td(e,t){t&&t.pendingBranch?fe(e)?t.effects.push(...e):t.effects.push(e):Da(e)}const re=Symbol.for("v-fgt"),Vr=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),ks=Symbol.for("v-stc"),dn=[];let Ct=null;function b(e=!1){dn.push(Ct=e?null:[])}function wi(){dn.pop(),Ct=dn[dn.length-1]||null}let $s=1;function pr(e,t=!1){$s+=e,e<0&&Ct&&t&&(Ct.hasOnce=!0)}function bc(e){return e.dynamicChildren=$s>0?Ct||Vn:null,wi(),$s>0&&Ct&&Ct.push(e),e}function x(e,t,n,s,r,o){return bc(h(e,t,n,s,r,o,!0))}function Ue(e,t,n,s,r){return bc(V(e,t,n,s,r,!0))}function As(e){return e?e.__v_isVNode===!0:!1}function In(e,t){return e.type===t.type&&e.key===t.key}const kc=({key:e})=>e??null,or=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?De(e)||ft(e)||ye(e)?{i:rt,r:e,k:t,f:!!n}:e:null);function h(e,t=null,n=null,s=0,r=null,o=e===re?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&kc(t),ref:t&&or(t),scopeId:Fa,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:rt};return l?(gr(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=De(n)?8:16),$s>0&&!i&&Ct&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&Ct.push(a),a}const V=$d;function $d(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===tc)&&(e=at),As(e)){const l=xn(e,t,!0);return n&&gr(l,n),$s>0&&!o&&Ct&&(l.shapeFlag&6?Ct[Ct.indexOf(e)]=l:Ct.push(l)),l.patchFlag=-2,l}if(Gd(e)&&(e=e.__vccOpts),t){t=Ad(t);let{class:l,style:a}=t;l&&!De(l)&&(t.class=be(l)),Re(a)&&(pi(a)&&!fe(a)&&(a=Ke({},a)),t.style=fn(a))}const i=De(e)?1:yc(e)?128:qa(e)?64:Re(e)?4:ye(e)?2:0;return h(e,t,n,s,r,i,o,!0)}function Ad(e){return e?pi(e)||uc(e)?Ke({},e):e:null}function xn(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,c=t?Ed(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&kc(c),ref:t&&t.ref?n&&o?fe(o)?o.concat(or(t)):[o,or(t)]:or(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!==re?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&&xn(e.ssContent),ssFallback:e.ssFallback&&xn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&Dn(u,a.clone(u)),u}function Ie(e=" ",t=0){return V(Vr,null,e,t)}function Rd(e,t){const n=V(ks,null,e);return n.staticCount=t,n}function Z(e="",t=!1){return t?(b(),Ue(at,null,e)):V(at,null,e)}function Yt(e){return e==null||typeof e=="boolean"?V(at):fe(e)?V(re,null,e.slice()):As(e)?sn(e):V(Vr,null,String(e))}function sn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:xn(e)}function gr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(fe(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),gr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!uc(t)?t._ctx=rt:r===3&&rt&&(rt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(ye(t)){if(s&65){gr(e,{default:t});return}t={default:t,_ctx:rt},n=32}else t=String(t),s&64?(n=16,t=[Ie(t)]):n=8;e.children=t,e.shapeFlag|=n}function Ed(...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=fn([t.style,s.style]);else if(Mr(r)){const o=t[r],i=s[r];i&&o!==i&&!(fe(o)&&o.includes(i))?t[r]=o?[].concat(o,i):i:i==null&&o==null&&!Nr(r)&&(t[r]=i)}else r!==""&&(t[r]=s[r])}return t}function Ut(e,t,n,s=null){Ot(e,t,7,[n,s])}const Id=oc();let Ld=0;function Pd(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||Id,o={uid:Ld++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new rf(!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:dc(s,r),emitsOptions:ic(s,r),emit:null,emitted:null,propsDefaults:Me,inheritAttrs:s.inheritAttrs,ctx:Me,data:Me,props:Me,attrs:Me,slots:Me,refs:Me,setupState:Me,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=ud.bind(null,o),e.ce&&e.ce(o),o}let ct=null;const Kr=()=>ct||rt;let mr,Go;{const e=jr(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};mr=t("__VUE_INSTANCE_SETTERS__",n=>ct=n),Go=t("__VUE_SSR_SETTERS__",n=>Rs=n)}const Gs=e=>{const t=ct;return mr(e),e.scope.on(),()=>{e.scope.off(),mr(t)}},hl=()=>{ct&&ct.scope.off(),mr(null)};function wc(e){return e.vnode.shapeFlag&4}let Rs=!1;function Md(e,t=!1,n=!1){t&&Go(t);const{props:s,children:r}=e.vnode,o=wc(e);md(e,s,o,t),kd(e,r,n||t);const i=o?Nd(e,t):void 0;return t&&Go(!1),i}function Nd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,td);const{setup:s}=n;if(s){hn();const r=e.setupContext=s.length>1?Bd(e):null,o=Gs(e),i=Ds(s,e,0,[e.props,r]),l=pa(i);if(pn(),o(),(l||e.sp)&&!Yn(e)&&Ja(e),l){if(i.then(hl,hl),t)return i.then(a=>{pl(e,a)}).catch(a=>{zr(a,e,0)});e.asyncDep=i}else pl(e,i)}else _c(e)}function pl(e,t,n){ye(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Re(t)&&(e.setupState=Na(t)),_c(e)}function _c(e,t,n){const s=e.type;e.render||(e.render=s.render||Dt);{const r=Gs(e);hn();try{nd(e)}finally{pn(),r()}}}const Od={get(e,t){return lt(e,"get",""),e[t]}};function Bd(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Od),slots:e.slots,emit:e.emit,expose:t}}function Zr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Na(Cf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in bs)return bs[n](e)},has(t,n){return n in t||n in bs}})):e.proxy}function Dd(e,t=!0){return ye(e)?e.displayName||e.name:e.name||t&&e.__name}function Gd(e){return ye(e)&&"__vccOpts"in e}const Q=(e,t)=>If(e,t,Rs);function $e(e,t,n){try{pr(-1);const s=arguments.length;return s===2?Re(t)&&!fe(t)?As(t)?V(e,null,[t]):V(e,t):V(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&As(n)&&(n=[n]),V(e,t,n))}finally{pr(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 jo;const gl=typeof window<"u"&&window.trustedTypes;if(gl)try{jo=gl.createPolicy("vue",{createHTML:e=>e})}catch{}const Sc=jo?e=>jo.createHTML(e):e=>e,Fd="http://www.w3.org/2000/svg",zd="http://www.w3.org/1998/Math/MathML",nn=typeof document<"u"?document:null,ml=nn&&nn.createElement("template"),Ud={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"?nn.createElementNS(Fd,e):t==="mathml"?nn.createElementNS(zd,e):n?nn.createElement(e,{is:n}):nn.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>nn.createTextNode(e),createComment:e=>nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>nn.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{ml.innerHTML=Sc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=ml.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]}},bn="transition",ls="animation",ts=Symbol("_vtc"),xc={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},Cc=Ke({},Va,xc),Hd=e=>(e.displayName="Transition",e.props=Cc,e),_i=Hd((e,{slots:t})=>$e(Uf,Tc(e),t)),An=(e,t=[])=>{fe(e)?e.forEach(n=>n(...t)):e&&e(...t)},vl=e=>e?fe(e)?e.some(t=>t.length>1):e.length>1:!1;function Tc(e){const t={};for(const j in e)j in xc||(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:d=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,f=qd(r),m=f&&f[0],k=f&&f[1],{onBeforeEnter:v,onEnter:S,onEnterCancelled:T,onLeave:w,onLeaveCancelled:P,onBeforeAppear:K=v,onAppear:D=S,onAppearCancelled:ue=T}=t,q=(j,pe,M,A)=>{j._enterCancelled=A,wn(j,pe?u:l),wn(j,pe?c:i),M&&M()},ee=(j,pe)=>{j._isLeaving=!1,wn(j,d),wn(j,p),wn(j,g),pe&&pe()},he=j=>(pe,M)=>{const A=j?D:S,Y=()=>q(pe,j,M);An(A,[pe,Y]),yl(()=>{wn(pe,j?a:o),Ht(pe,j?u:l),vl(A)||bl(pe,s,m,Y)})};return Ke(t,{onBeforeEnter(j){An(v,[j]),Ht(j,o),Ht(j,i)},onBeforeAppear(j){An(K,[j]),Ht(j,a),Ht(j,c)},onEnter:he(!1),onAppear:he(!0),onLeave(j,pe){j._isLeaving=!0;const M=()=>ee(j,pe);Ht(j,d),j._enterCancelled?(Ht(j,g),Fo(j)):(Fo(j),Ht(j,g)),yl(()=>{j._isLeaving&&(wn(j,d),Ht(j,p),vl(w)||bl(j,s,k,M))}),An(w,[j,M])},onEnterCancelled(j){q(j,!1,void 0,!0),An(T,[j])},onAppearCancelled(j){q(j,!0,void 0,!0),An(ue,[j])},onLeaveCancelled(j){ee(j),An(P,[j])}})}function qd(e){if(e==null)return null;if(Re(e))return[po(e.enter),po(e.leave)];{const t=po(e);return[t,t]}}function po(e){return Ku(e)}function Ht(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ts]||(e[ts]=new Set)).add(t)}function wn(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[ts];n&&(n.delete(t),n.size||(e[ts]=void 0))}function yl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Wd=0;function bl(e,t,n,s){const r=e._endId=++Wd,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:l,propCount:a}=$c(e,t);if(!i)return s();const c=i+"end";let u=0;const d=()=>{e.removeEventListener(c,g),o()},g=p=>{p.target===e&&++u>=a&&d()};setTimeout(()=>{u<a&&d()},l+1),e.addEventListener(c,g)}function $c(e,t){const n=window.getComputedStyle(e),s=f=>(n[f]||"").split(", "),r=s(`${bn}Delay`),o=s(`${bn}Duration`),i=kl(r,o),l=s(`${ls}Delay`),a=s(`${ls}Duration`),c=kl(l,a);let u=null,d=0,g=0;t===bn?i>0&&(u=bn,d=i,g=o.length):t===ls?c>0&&(u=ls,d=c,g=a.length):(d=Math.max(i,c),u=d>0?i>c?bn:ls:null,g=u?u===bn?o.length:a.length:0);const p=u===bn&&/\b(?:transform|all)(?:,|$)/.test(s(`${bn}Property`).toString());return{type:u,timeout:d,propCount:g,hasTransform:p}}function kl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>wl(n)+wl(e[s])))}function wl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Fo(e){return(e?e.ownerDocument:document).body.offsetHeight}function Vd(e,t,n){const s=e[ts];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const _l=Symbol("_vod"),Ac=Symbol("_vsh"),Rc=Symbol("");function Kd(e){const t=Kr();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>vr(o,r))},s=()=>{const r=e(t.proxy);t.ce?vr(t.ce,r):zo(t.subTree,r),n(r)};Qa(()=>{Da(s)}),Xt(()=>{Ne(s,Dt,{flush:"post"});const r=new MutationObserver(s);r.observe(t.subTree.el.parentNode,{childList:!0}),qr(()=>r.disconnect())})}function zo(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{zo(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)vr(e.el,t);else if(e.type===re)e.children.forEach(n=>zo(n,t));else if(e.type===ks){let{el:n,anchor:s}=e;for(;n&&(vr(n,t),n!==s);)n=n.nextSibling}}function vr(e,t){if(e.nodeType===1){const n=e.style;let s="";for(const r in t){const o=sf(t[r]);n.setProperty(`--${r}`,o),s+=`--${r}: ${o};`}n[Rc]=s}}const Zd=/(?:^|;)\s*display\s*:/;function Yd(e,t,n){const s=e.style,r=De(n);let o=!1;if(n&&!r){if(t)if(De(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&hs(s,l,"")}else for(const i in t)n[i]==null&&hs(s,i,"");for(const i in n){i==="display"&&(o=!0);const l=n[i];l!=null?Xd(e,i,!De(t)&&t?t[i]:void 0,l)||hs(s,i,l):hs(s,i,"")}}else if(r){if(t!==n){const i=s[Rc];i&&(n+=";"+i),s.cssText=n,o=Zd.test(n)}}else t&&e.removeAttribute("style");_l in e&&(e[_l]=o?s.display:"",e[Ac]&&(s.display="none"))}const Sl=/\s*!important$/;function hs(e,t,n){if(fe(n))n.forEach(s=>hs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Jd(e,t);Sl.test(n)?e.setProperty(Cn(s),n.replace(Sl,""),"important"):e[s]=n}}const xl=["Webkit","Moz","ms"],go={};function Jd(e,t){const n=go[t];if(n)return n;let s=yt(t);if(s!=="filter"&&s in e)return go[t]=s;s=Dr(s);for(let r=0;r<xl.length;r++){const o=xl[r]+s;if(o in e)return go[t]=o}return t}function Xd(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&De(s)&&n===s}const Cl="http://www.w3.org/1999/xlink";function Tl(e,t,n,s,r,o=ef(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Cl,t.slice(6,t.length)):e.setAttributeNS(Cl,t,n):n==null||o&&!ya(n)?e.removeAttribute(t):e.setAttribute(t,o?"":jt(n)?String(n):n)}function $l(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Sc(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=ya(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 Ln(e,t,n,s){e.addEventListener(t,n,s)}function Qd(e,t,n,s){e.removeEventListener(t,n,s)}const Al=Symbol("_vei");function eh(e,t,n,s,r=null){const o=e[Al]||(e[Al]={}),i=o[t];if(s&&i)i.value=s;else{const[l,a]=sh(t);if(s){const c=o[t]=ih(s,r);Ln(e,l,c,a)}else i&&(Qd(e,l,i,a),o[t]=void 0)}}const th=/(Once|Passive|Capture)$/,nh=/^on:?(?:Once|Passive|Capture)$/;function sh(e){let t,n;for(;(n=e.match(th))&&!nh.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Cn(e.slice(2)),t]}let mo=0;const rh=Promise.resolve(),oh=()=>mo||(rh.then(()=>mo=0),mo=Date.now());function ih(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(fe(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=oh(),n}const Rl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,lh=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?Vd(e,s,i):t==="style"?Yd(e,n,s):Mr(t)?Nr(t)||eh(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ah(e,t,s,i))?($l(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Tl(e,t,s,i,o,t!=="value")):e._isVueCE&&(ch(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!De(s)))?$l(e,yt(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Tl(e,t,s,i))};function ah(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Rl(t)&&ye(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 Rl(t)&&De(n)?!1:t in e}function ch(e,t){const n=e._def.props;if(!n)return!1;const s=yt(t);return Array.isArray(n)?n.some(r=>yt(r)===s):Object.keys(n).some(r=>yt(r)===s)}const Ec=new WeakMap,Ic=new WeakMap,yr=Symbol("_moveCb"),El=Symbol("_enterCb"),uh=e=>(delete e.props.mode,e),fh=uh({name:"TransitionGroup",props:Ke({},Cc,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Kr(),s=Wa();let r,o;return ec(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!mh(r[0].el,n.vnode.el,i)){r=[];return}r.forEach(hh),r.forEach(ph);const l=r.filter(gh);Fo(n.vnode.el),l.forEach(a=>{const c=a.el,u=c.style;Ht(c,i),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[yr]=g=>{g&&g.target!==c||(!g||g.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[yr]=null,wn(c,i))};c.addEventListener("transitionend",d)}),r=[]}),()=>{const i=Se(e),l=Tc(i);let a=i.tag||re;if(r=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&!u.el[Ac]&&(r.push(u),Dn(u,Ts(u,l,s,n)),Ec.set(u,Lc(u.el)))}o=t.default?vi(t.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&Dn(u,Ts(u,l,s,n))}return V(a,null,o)}}}),dh=fh;function hh(e){const t=e.el;t[yr]&&t[yr](),t[El]&&t[El]()}function ph(e){Ic.set(e,Lc(e.el))}function gh(e){const t=Ec.get(e),n=Ic.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 Lc(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function mh(e,t,n){const s=e.cloneNode(),r=e[ts];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}=$c(s);return o.removeChild(s),i}const br=e=>{const t=e.props["onUpdate:modelValue"]||!1;return fe(t)?n=>sr(t,n):t};function vh(e){e.target.composing=!0}function Il(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Xn=Symbol("_assign");function Ll(e,t,n){return t&&(e=e.trim()),n&&(e=Gr(e)),e}const gt={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Xn]=br(r);const o=s||r.props&&r.props.type==="number";Ln(e,t?"change":"input",i=>{i.target.composing||e[Xn](Ll(e.value,n,o))}),(n||o)&&Ln(e,"change",()=>{e.value=Ll(e.value,n,o)}),t||(Ln(e,"compositionstart",vh),Ln(e,"compositionend",Il),Ln(e,"change",Il))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[Xn]=br(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Gr(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)}},Pl={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Ln(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Gr(kr(o)):kr(o));e[Xn](e.multiple?Or(e._modelValue)?new Set(r):r:r[0]),e._assigning=!0,Bt(()=>{e._assigning=!1})}),e[Xn]=br(s)},mounted(e,{value:t}){Ml(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Xn]=br(n)},updated(e,{value:t}){e._assigning||Ml(e,t)}};function Ml(e,t){const n=e.multiple,s=fe(t);if(!(n&&!s&&!Or(t))){for(let r=0,o=e.options.length;r<o;r++){const i=e.options[r],l=kr(i);if(n)if(s){const a=typeof l;a==="string"||a==="number"?i.selected=t.some(c=>String(c)===String(l)):i.selected=nf(t,l)>-1}else i.selected=t.has(l);else if(Bs(kr(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function kr(e){return"_value"in e?e._value:e.value}const yh=["ctrl","shift","alt","meta"],bh={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)=>yh.some(n=>e[`${n}Key`]&&!t.includes(n))},zt=(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=bh[t[i]];if(l&&l(r,t))return}return e(r,...o)}))},kh={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Es=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(r=>{if(!("key"in r))return;const o=Cn(r.key);if(t.some(i=>i===o||kh[i]===o))return e(r)}))},wh=Ke({patchProp:lh},Ud);let Nl;function _h(){return Nl||(Nl=_d(wh))}const Sh=((...e)=>{const t=_h().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Ch(s);if(!r)return;const o=t._component;!ye(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,xh(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function xh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ch(e){return De(e)?document.querySelector(e):e}function Ys(e,t,n,s){return e===n&&t===s}function Th(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 $h(e){return{objective:e.objective,completionCriterion:e.completionCriterion,replace:e.replace,budgets:e.budgets}}function Ah(e){return{objective:e.objective,budgets:e.budgets}}function Rh(e,t,n){return e!==0&&n.epoch!==e?"resync":n.seq<=t?"duplicate":"apply"}function Eh(e,t){return t.type==="goal.updated"?{...e,goal:t.snapshot}:t.type==="todo.updated"?{...e,todos:t.todos}:e}function Ih(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 Is=H([]);let Lh=0;function Ph(e,t="info",n=3500){const s=`toast_${++Lh}`;Is.value=[...Is.value,{id:s,type:t,message:e}],n>0&&window.setTimeout(()=>Pc(s),n)}function Pc(e){Is.value=Is.value.filter(t=>t.id!==e)}function Mc(){return{toasts:Is,showToast:Ph,removeToast:Pc}}function Mh(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 Et="/api/v1",Nh=2*3e4;function Oh(){const{showToast:e}=Mc(),t=H("connecting"),n=H([]),s=H([]),r=H({busy:!1}),o=H(null),i=H([]),l=H(!1),a=H(null),c=H(!1),u=H(null),d=H(null),g=H(null),p=Q(()=>r.value.busy||c.value),f=H([]),m=H(null),k=H(!1),v=Q(()=>d.value!==null&&!k.value),S=H(null),T=H([]);let w=null,P=null,K=null,D=null,ue=Date.now(),q=0,ee=0,he=0,j=0,pe=0,M=0,A=0,Y=0,ae=0,te=null,qe=!1,He=null,Ge=!1,je=!1;const Fe=new Map;function Qt(){const G=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/v1/ws`;return m.value?`${G}?sessionId=${encodeURIComponent(m.value)}`:G}function ot(C){t.value=C}function tt(C){(w==null?void 0:w.readyState)===WebSocket.OPEN&&w.send(JSON.stringify(C))}function bt(){l.value=qe||te!==null}function Tt(){ae++,te=null,qe=!1,He=null,l.value=!1,a.value=null}function N(C,G){if(C!==null&&typeof C=="object"){const ne=C.message;if(typeof ne=="string")return ne}return G}function se(){je||D!==null||(D=window.setTimeout(()=>{D=null;const C=He;He=null,ke(C??void 0)},250))}async function ke(C){const G=d.value;if(!G)return;const ne=j,we=pe,Be=M,St=A;try{const dt=await fetch(`${Et}/sessions/${G}/snapshot`);if(!dt.ok){C!==void 0&&(te==null?void 0:te.generation)===C&&(He=C,se());return}const ze=await dt.json();if(!Th({snapshot:ze,targetSessionId:G,currentSessionId:d.value,targetSessionGeneration:ne,currentSessionGeneration:j,targetConnectionGeneration:we,currentConnectionGeneration:pe,targetPromptGeneration:Be,currentPromptGeneration:M,targetLiveGeneration:St,currentLiveGeneration:A,currentEpoch:ee,currentSeq:q})){C!==void 0&&(He=C),se();return}y(ze,C)}catch{C!==void 0&&(te==null?void 0:te.generation)===C&&(He=C,se())}}function y(C,G){W="",U="",F.clear();const ne=n.value.filter(yn=>yn.local),we=Fe.keys().next().value,Be=we?Fe.get(we):void 0,St=Be?n.value.find(yn=>yn.id===Be.messageId):void 0,dt=!!(we&&C.messages.some(yn=>yn.clientMessageId===we)),ze=!!(Be&&!dt&&Be.connectionGeneration<pe);ze&&St&&(St.isError=!0);const en=St&&!dt?[St]:[];n.value=[...C.messages.map(yn=>({...yn,id:yn.id??_()})),...ne,...en],s.value=C.pendingApprovals,r.value={...C.status,busy:C.busy},o.value=C.goal,i.value=C.todos,G!==void 0&&te!==null&&te.generation===G&&ae===G&&(te=null,bt()),(dt||ze)&&(c.value=!1,Ge=!1,Fe.clear(),ze&&e("消息未送达,已恢复连接。","error")),q=C.seq,ee=C.epoch,g.value=C.workDir}function _(){return`msg_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function R(C){B(),ue=Date.now(),P=window.setInterval(()=>{if(Date.now()-ue>Nh){w==null||w.close();return}tt({type:"ping"})},C)}function B(){P!==null&&(clearInterval(P),P=null)}function O(){if(je||K!==null)return;ot("reconnecting"),he++;const C=Math.min(1e3*2**he,3e4);K=window.setTimeout(()=>{K=null,me()},C)}function I(C){switch(C.type){case"server_hello":{const G=C;d.value=G.sessionId,g.value=G.workDir,m.value=G.sessionId,k.value=G.active;const ne=ee;ee=G.epoch,R(G.heartbeat_ms),tt({type:"client_hello",lastSeq:q,epoch:ne}),ne!==0&&ne!==G.epoch&&(q=0),ot("connected"),he=0,G.active?(ke(),At(),Je()):Us(G.sessionId).then(we=>{we&&d.value===G.sessionId&&(k.value=!0),ke(),At(),Je()});break}case"event":{const G=Rh(ee,q,C);if(G==="resync"){ee=C.epoch,q=0,ke();break}if(G==="duplicate")break;q=C.seq,ee=C.epoch,A++,oe(C.payload);break}case"user_message":{if(A++,C.clientMessageId&&Fe.has(C.clientMessageId)){Ge=!0;break}n.value.push({id:_(),role:"user",content:C.text,clientMessageId:C.clientMessageId,tools:[],ts:Date.now()});break}case"approval_request":{A++,s.value=[...s.value,{id:C.id,toolName:C.toolName,action:C.action,display:C.display}];break}case"approval_resolved":{A++,s.value=s.value.filter(G=>G.id!==C.id);break}case"command_result":{const G=C.pendingMsgId?n.value.findIndex(ne=>ne.id===C.pendingMsgId):-1;if(G>=0){const ne=n.value[G];n.value[G]={...ne,content:C.message,isError:!C.ok,pending:!1}}else n.value.push({id:_(),role:"system",content:C.message,tools:[],isError:!C.ok,ts:Date.now(),local:!0});(C.command==="fork"||C.command==="title")&&At(),C.ok&&C.command==="compact"&&ke();break}case"resync_required":{q=0,ke();break}case"status":{A++,r.value={...r.value,...C.status};break}case"error":{if(u.value=C.message,C.clientMessageId){const G=Fe.get(C.clientMessageId);if(G){Fe.delete(C.clientMessageId),c.value=!1,Ge=!1;const ne=n.value.find(we=>we.id===G.messageId);ne&&(ne.isError=!0),e(`消息未发送:${C.message}`,"error")}}break}case"server_empty":{ot("idle");break}}}let W="",U="";const F=new Map;let L=!1;function le(){if(L)return;const C=ie();if(!C){W="",U="",F.clear();return}if(W&&(C.content+=W,W=""),U){const G=C.tools.find(ne=>ne.name==="thinking");G?G.output=(G.output??"")+U:C.tools.push({toolCallId:"thinking",name:"thinking",output:U}),U=""}if(F.size>0){for(const[G,ne]of F){const we=C.tools.find(Be=>Be.toolCallId===G);we&&(we.output=ne)}F.clear()}}const J=Mh(le);function oe(C){const G=Eh({goal:o.value,todos:i.value},C);switch(o.value=G.goal,i.value=G.todos,C.type==="goal.updated"&&te!==null&&te.generation===ae&&(te=null,He=null,bt()),C.type){case"turn.started":{Ge&&(c.value=!1,Ge=!1,Fe.clear()),J.flushNow(),r.value={...r.value,busy:!0},n.value.push({id:_(),role:"assistant",content:"",tools:[],ts:Date.now()});break}case"assistant.delta":{W+=String(C.delta),J.schedule();break}case"thinking.delta":{U+=String(C.delta),J.schedule();break}case"tool.call.started":{const ne=ie();ne&&ne.tools.push({toolCallId:String(C.toolCallId),name:String(C.name),args:C.args});break}case"tool.result":{F.delete(String(C.toolCallId));const ne=ie();if(ne){const we=ne.tools.find(Be=>Be.toolCallId===C.toolCallId);we&&(we.output=String(C.output),we.isError=!!C.isError)}break}case"tool.progress":{F.set(String(C.toolCallId),String(C.message??C.output)),J.schedule();break}case"turn.ended":{if(J.flushNow(),r.value={...r.value,busy:!1},C.reason==="failed"){const ne=ie();ne&&(ne.isError=!0),u.value=N(C.error,"Turn failed")}At(),Je();break}case"session.meta.updated":{const ne={};C.model!==void 0&&(ne.model=C.model),C.contextTokens!==void 0&&(ne.contextTokens=C.contextTokens),C.maxContextTokens!==void 0&&(ne.maxContextTokens=C.maxContextTokens),C.contextUsage!==void 0&&(ne.contextUsage=C.contextUsage),r.value={...r.value,...ne};break}case"error":{u.value=N(C.error,"Unknown error");break}}}function ie(){for(let C=n.value.length-1;C>=0;C--)if(n.value[C].role==="assistant")return n.value[C];return null}function me(){if(je||w&&(w.readyState===WebSocket.CONNECTING||w.readyState===WebSocket.OPEN))return;ot("connecting"),u.value=null,Tt(),pe++;const C=new WebSocket(Qt());w=C,C.onclose=G=>{if(w===C&&(w=null,B(),t.value!=="idle")){if(G.code===1008){j++,Tt(),d.value=null,m.value=null,k.value=!1,o.value=null,i.value=[],ot("idle");return}ot("disconnected"),O()}},C.onerror=()=>{w===C&&ot("reconnecting")},C.onmessage=G=>{if(w!==C)return;ue=Date.now();let ne;try{ne=JSON.parse(G.data)}catch{return}I(ne)}}function _e(C){if(!C||p.value)return;if(t.value==="idle"){e("暂无会话,请先新建会话。","warning");return}if(t.value!=="connected"){e("连接已断开,正在尝试重连...","error"),me();return}const G=`client_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,ne=_();Fe.set(G,{messageId:ne,connectionGeneration:pe}),M++,Ge=!1,c.value=!0,n.value.push({id:ne,role:"user",content:C,clientMessageId:G,tools:[],ts:Date.now()}),tt({type:"prompt",text:C,clientMessageId:G})}function ce(){tt({type:"abort"})}function de(C,G){if(t.value==="idle"){e("暂无会话,请先新建会话。","warning");return}if(t.value!=="connected"){e("连接已断开,命令未发送。","error"),me();return}if(p.value&&C!=="btw"){e(`会话忙碌中,无法执行 /${C},请稍后再试。`,"warning");return}const ne=["compact","plan","auto","yes","fork","title"];let we=null;ne.includes(C)&&(we=_(),n.value.push({id:we,role:"system",content:`正在执行 /${C}${G?` ${G}`:""}...`,tools:[],pending:!0,ts:Date.now(),local:!0})),tt({type:"command",command:C,...G?{args:G}:{},...we?{pendingMsgId:we}:{}})}function Le(){n.value=[],s.value=[]}function wt(C){n.value.push({id:_(),role:"system",content:C,tools:[],ts:Date.now(),local:!0})}function $t(C,G,ne,we){if(t.value!=="connected"){e("连接已断开,审批结果未发送。","error"),me();return}s.value=s.value.filter(Be=>Be.id!==C),tt({type:"approval_response",id:C,decision:G,...ne?{feedback:ne}:{},...we?{scope:we}:{}})}async function At(){try{const C=await fetch(`${Et}/sessions`);if(!C.ok)return;f.value=await C.json()}catch{}}async function Us(C){const G=j,ne=pe;try{return(await fetch(`${Et}/sessions/${C}/activate`,{method:"POST"})).ok&&pe===ne&&Ys(d.value,j,C,G)}catch{return!1}}async function Je(){try{const C=await fetch(`${Et}/git/status`);if(!C.ok)return;const G=await C.json();S.value=G.isRepo?G:null}catch{}}async function _t(){try{const C=await fetch(`${Et}/models`);if(!C.ok)return;const G=await C.json();T.value=G.models}catch{}}const zn=H({});async function Hs(){try{const C=await fetch(`${Et}/like`);if(!C.ok)return;zn.value=await C.json()}catch{}}async function Eu(C){try{return(await fetch(`${Et}/like`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(C)})).ok?(zn.value=C,!0):!1}catch{return!1}}async function qi(C,G,ne){const we=d.value;if(!we)return;const Be=j,St=pe,dt=++Y;try{const ze=await fetch(`${Et}/sessions/${we}/${C}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G)}),en=await ze.json();if(d.value!==we||j!==Be||pe!==St||Y!==dt)return;if(!ze.ok){e(en.message??`请求失败(HTTP ${ze.status})`,"error");return}en.status&&(r.value={...r.value,...en.status}),wt(ne)}catch(ze){if(d.value!==we||j!==Be||pe!==St||Y!==dt)return;e(`请求失败:${ze instanceof Error?ze.message:String(ze)}`,"error")}}async function Iu(C){C!==r.value.model&&await qi("model",{model:C},`已切换模型:${C}`)}async function Lu(C){C!==r.value.thinkingLevel&&await qi("thinking",{level:C},`思考强度已切换为 ${C}`)}async function qs(C,G,ne,we){const Be=d.value;if(!Be)return a.value="暂无可操作的会话。",null;if(t.value!=="connected")return a.value="连接已断开,请等待重连后再试。",null;if(v.value)return a.value="当前会话已归档,无法修改 Goal。",null;if(qe)return a.value="正在处理上一个请求,请稍候。",null;te!==null&&(te=null,bt());const St=j,dt=++ae;qe=!0,bt(),a.value=null;try{const ze=await fetch(`${Et}/sessions/${Be}/goal${C}`,{method:G,headers:{"Content-Type":"application/json"},body:JSON.stringify(ne)}),en=await ze.json().catch(()=>({}));return!Ys(d.value,j,Be,St)||ae!==dt?null:ze.ok?(we&&(te={generation:dt},He=dt),en):(a.value=typeof en.message=="string"?en.message:`请求失败(HTTP ${ze.status})`,null)}catch(ze){return Ys(d.value,j,Be,St)&&ae===dt&&(a.value=`请求失败:${ze instanceof Error?ze.message:String(ze)}`),null}finally{Ys(d.value,j,Be,St)&&ae===dt&&(qe=!1,bt())}}async function Pu(C){const G=await qs("/refine","POST",{description:C},!1);return typeof(G==null?void 0:G.objective)=="string"?G.objective:null}async function Mu(C){return await qs("","POST",$h(C),!0)===null?!1:(te!==null&&ke(te.generation),!0)}async function Nu(C){return await qs("","PATCH",Ah(C),!0)===null?!1:(te!==null&&ke(te.generation),!0)}async function so(C){return await qs(C,"POST",{},!0)===null?!1:(te!==null&&ke(te.generation),!0)}function Ou(){return so("/pause")}function Bu(){return so("/resume")}function Du(){return so("/cancel")}async function Gu(){try{const C=await fetch(`${Et}/sessions`,{method:"POST"});if(!C.ok){e(`新建会话失败(HTTP ${C.status})`,"error");return}const G=await C.json();f.value=[G,...f.value],await ro(G.sessionId)}catch(C){e(`新建会话失败:${C instanceof Error?C.message:String(C)}`,"error")}}async function ro(C){m.value===C&&t.value==="connected"||(m.value=C,d.value=C,j++,Tt(),q=0,ee=0,n.value=[],s.value=[],r.value={busy:!1},o.value=null,i.value=[],k.value=!1,c.value=!1,Ge=!1,Fe.clear(),K!==null&&(clearTimeout(K),K=null),D!==null&&(clearTimeout(D),D=null),w&&(w.onclose=null,w.close(),w=null),B(),me())}async function ju(C){try{const G=await fetch(`${Et}/sessions/${C}`,{method:"DELETE"});if(!G.ok){e(`删除会话失败(HTTP ${G.status})`,"error");return}if(f.value=f.value.filter(ne=>ne.sessionId!==C),m.value===C){const ne=f.value[0];ne?await ro(ne.sessionId):(j++,Tt(),d.value=null,m.value=null,k.value=!1,q=0,ee=0,n.value=[],s.value=[],r.value={busy:!1},o.value=null,i.value=[],c.value=!1,Ge=!1,Fe.clear(),w&&(w.onclose=null,w.close(),w=null),B(),ot("idle"))}}catch(G){e(`删除会话失败:${G instanceof Error?G.message:String(G)}`,"error")}}async function Fu(C){try{const G=await fetch(`${Et}/sessions/${C}/export`);if(!G.ok){e(`导出会话失败(HTTP ${G.status})`,"error");return}const ne=await G.blob(),we=URL.createObjectURL(ne),Be=document.createElement("a");Be.href=we,Be.download=`${C}.md`,Be.click(),URL.revokeObjectURL(we)}catch(G){e(`导出会话失败:${G instanceof Error?G.message:String(G)}`,"error")}}me(),At(),_t();const Wi=()=>{me()},Vi=()=>{!document.hidden&&t.value!=="connected"&&me()};return window.addEventListener("online",Wi),document.addEventListener("visibilitychange",Vi),vn(()=>{je=!0,L=!0,J.dispose(),window.removeEventListener("online",Wi),document.removeEventListener("visibilitychange",Vi),B(),K!==null&&(clearTimeout(K),K=null),D!==null&&(clearTimeout(D),D=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:d,workDir:g,isBusy:p,isArchived:v,sessions:f,currentSessionId:m,gitStatus:S,models:T,like:zn,fetchLike:Hs,updateLike:Eu,sendPrompt:_e,sendCommand:de,clearMessages:Le,appendSystemMessage:wt,abort:ce,resolveApproval:$t,fetchSessions:At,fetchGitStatus:Je,fetchModels:_t,switchModel:Iu,switchThinking:Lu,refineGoal:Pu,createGoal:Mu,updateGoal:Nu,pauseGoal:Ou,resumeGoal:Bu,cancelGoal:Du,createSession:Gu,switchSession:ro,deleteSession:ju,exportSession:Fu,fetchSnapshot:ke}}function Bh(e){const{storageKey:t,defaultWidth:n,min:s,max:r}=e;function o(S){return Number.isFinite(S)?Math.min(Af(r),Math.max(s,Math.round(S))):n}function i(){try{const S=localStorage.getItem(t);if(S===null)return n;const T=Number(S);return Number.isFinite(T)?o(T):n}catch{return n}}function l(S){try{localStorage.setItem(t,String(S))}catch{}}const a=H(i()),c=H(!1);function u(S){const T=o(S);a.value=T,l(T)}let d=0,g=0,p=null,f=-1;function m(S){if(!c.value)return;const T=S.clientX-d;u(g+T)}function k(){if(c.value){if(c.value=!1,document.body.style.userSelect="",document.body.style.cursor="",p){try{p.releasePointerCapture(f)}catch{}p.removeEventListener("pointermove",m),p.removeEventListener("pointerup",k),p.removeEventListener("pointercancel",k)}p=null,f=-1}}function v(S){S.preventDefault(),c.value=!0,d=S.clientX,g=o(a.value),p=S.currentTarget,f=S.pointerId,document.body.style.userSelect="none",document.body.style.cursor="col-resize";try{p.setPointerCapture(S.pointerId)}catch{}p.addEventListener("pointermove",m),p.addEventListener("pointerup",k),p.addEventListener("pointercancel",k)}return vn(k),{width:a,dragging:c,clamp:o,setWidth:u,onPointerDown:v}}const Si=[{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 Dh(e){const t=e.toLowerCase();return Si.filter(n=>{var s;return n.name.startsWith(t)||((s=n.aliases)==null?void 0:s.some(r=>r.startsWith(t)))})}function Gh(e){const t=e.toLowerCase(),n=Si.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["可用命令:",...Si.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 Fh=["title","aria-label"],zh=["width","height","viewBox"],Uh=["cx","cy","r"],Hh=["cx","cy","r","stroke-dasharray","stroke-dashoffset","transform"],vo=2,qh=xe({__name:"ContextRing",props:{usage:{default:void 0},size:{default:16}},setup(e){Kd(a=>({v1d95ffa8:l.value}));const t=e,n=Q(()=>{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=Q(()=>Math.round(n.value*100)),r=Q(()=>(t.size-vo)/2),o=Q(()=>2*Math.PI*r.value),i=Q(()=>o.value*(1-n.value)),l=Q(()=>n.value>=.9?"var(--color-danger)":n.value>=.7?"var(--color-warning)":"var(--color-accent)");return(a,c)=>(b(),x("span",{class:"context-ring",role:"img",title:`上下文占用 ${s.value}%`,"aria-label":`上下文占用 ${s.value}%`},[(b(),x("svg",{width:e.size,height:e.size,viewBox:`0 0 ${e.size} ${e.size}`},[h("circle",{class:"ring-track",cx:e.size/2,cy:e.size/2,r:r.value,"stroke-width":vo,fill:"none"},null,8,Uh),h("circle",{class:"ring-value",cx:e.size/2,cy:e.size/2,r:r.value,"stroke-width":vo,fill:"none","stroke-linecap":"round","stroke-dasharray":o.value,"stroke-dashoffset":i.value,transform:`rotate(-90 ${e.size/2} ${e.size/2})`},null,8,Hh)],8,zh))],8,Fh))}}),Ce=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Nc=Ce(qh,[["__scopeId","data-v-3ffc343b"]]),Wh={key:0,class:"ui-dialog-header"},Vh={class:"ui-dialog-title"},Kh={class:"ui-dialog-body"},Zh={key:1,class:"ui-dialog-footer"},Yh=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 Xt(()=>window.addEventListener("keydown",r,!0)),vn(()=>window.removeEventListener("keydown",r,!0)),(o,i)=>(b(),Ue(mi,{to:"body"},[V(_i,{name:"dialog"},{default:et(()=>[e.open?(b(),x("div",{key:0,class:"ui-dialog-overlay",onClick:i[1]||(i[1]=zt(l=>e.closable!==!1&&s("close"),["self"]))},[h("div",{class:"ui-dialog",style:fn(e.maxWidth?{maxWidth:e.maxWidth}:void 0),role:"dialog","aria-modal":"true"},[e.title||o.$slots.header?(b(),x("div",Wh,[rr(o.$slots,"header",{},()=>[h("span",Vh,E(e.title),1)],!0),e.closable!==!1?(b(),x("button",{key:0,class:"ui-dialog-close","aria-label":"关闭",onClick:i[0]||(i[0]=l=>s("close"))},"✕")):Z("",!0)])):Z("",!0),h("div",Kh,[rr(o.$slots,"default",{},void 0,!0)]),o.$slots.footer?(b(),x("div",Zh,[rr(o.$slots,"footer",{},void 0,!0)])):Z("",!0)],4)])):Z("",!0)]),_:3})]))}}),Yr=Ce(Yh,[["__scopeId","data-v-4562f775"]]),Jh=["width","height"],Xh={key:0,d:"M4 7h16M4 12h16M4 17h16"},Qh={key:1,d:"M12 5v14M5 12h14"},ep={key:5,d:"M4 6h16M7 12h10M10 18h4"},tp={key:6,d:"M12 3v12m0 0 4-4m-4 4-4-4M5 20h14"},np={key:7,d:"M4 7h16M9 7V4h6v3m3 0-1 13H7L6 7m4 4v5m4-5v5"},sp={key:8,d:"M3 12h4l2-7 4 14 2-7h6"},rp={key:10,d:"m15 18-6-6 6-6"},op={key:11,d:"m9 18 6-6-6-6"},ip={key:12,d:"m6 9 6 6 6-6"},lp={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"},ap={key:18,d:"M5 9a11 11 0 0 1 14 0M8.5 12.5a6 6 0 0 1 7 0M12 17h.01"},cp={key:19,d:"M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z"},up={key:20,d:"M12 16V4m0 0-4 4m4-4 4 4M5 20h14"},fp={key:21,d:"m15 4 5 5M17.5 6.5 10 14m-2-2 4 4-3 4H3l1-6Z"},dp={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"},hp={key:24,d:"m22 2-7 20-4-9-9-4ZM22 2 11 13"},pp={key:25,x:"6",y:"6",width:"12",height:"12",rx:"2"},gp={key:26,d:"m8 3 4 4 4-4M8 21l4-4 4 4M12 7v10"},mp={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"},vp={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"},yp={key:31,d:"M20 13 13 20l-9-9V4h7ZM8.5 8.5h.01"},bp={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"},kp={key:34,d:"M3 6h7l2 2h9v11H3Z"},wp={key:35,d:"m5 12 4 4L19 6"},_p=xe({__name:"SvgIcon",props:{name:{},size:{default:20}},setup(e){return(t,n)=>(b(),x("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"?(b(),x("path",Xh)):e.name==="plus"?(b(),x("path",Qh)):e.name==="panel-left"?(b(),x(re,{key:2},[n[0]||(n[0]=h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[1]||(n[1]=h("path",{d:"M9 4v16"},null,-1))],64)):e.name==="panel-right"?(b(),x(re,{key:3},[n[2]||(n[2]=h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[3]||(n[3]=h("path",{d:"M15 4v16"},null,-1))],64)):e.name==="search"?(b(),x(re,{key:4},[n[4]||(n[4]=h("circle",{cx:"11",cy:"11",r:"7"},null,-1)),n[5]||(n[5]=h("path",{d:"m20 20-4-4"},null,-1))],64)):e.name==="filter"?(b(),x("path",ep)):e.name==="download"?(b(),x("path",tp)):e.name==="trash"?(b(),x("path",np)):e.name==="activity"?(b(),x("path",sp)):e.name==="help"?(b(),x(re,{key:9},[n[6]||(n[6]=h("circle",{cx:"12",cy:"12",r:"9"},null,-1)),n[7]||(n[7]=h("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"?(b(),x("path",rp)):e.name==="chevron-right"?(b(),x("path",op)):e.name==="chevron-down"?(b(),x("path",ip)):e.name==="bot"?(b(),x(re,{key:13},[n[8]||(n[8]=h("rect",{x:"4",y:"7",width:"16",height:"12",rx:"3"},null,-1)),n[9]||(n[9]=h("path",{d:"M12 3v4M8 12h.01M16 12h.01M9 16h6"},null,-1))],64)):e.name==="git-branch"?(b(),x(re,{key:14},[n[10]||(n[10]=h("circle",{cx:"6",cy:"5",r:"2"},null,-1)),n[11]||(n[11]=h("circle",{cx:"18",cy:"7",r:"2"},null,-1)),n[12]||(n[12]=h("circle",{cx:"6",cy:"19",r:"2"},null,-1)),n[13]||(n[13]=h("path",{d:"M6 7v10M8 10c5 0 3-3 8-3"},null,-1))],64)):e.name==="sun"?(b(),x(re,{key:15},[n[14]||(n[14]=h("circle",{cx:"12",cy:"12",r:"4"},null,-1)),n[15]||(n[15]=h("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"?(b(),x("path",lp)):e.name==="monitor"?(b(),x(re,{key:17},[n[16]||(n[16]=h("rect",{x:"3",y:"4",width:"18",height:"13",rx:"2"},null,-1)),n[17]||(n[17]=h("path",{d:"M8 21h8M12 17v4"},null,-1))],64)):e.name==="wifi"?(b(),x("path",ap)):e.name==="edit"?(b(),x("path",cp)):e.name==="upload"?(b(),x("path",up)):e.name==="broom"?(b(),x("path",fp)):e.name==="command"?(b(),x("path",dp)):e.name==="at"?(b(),x(re,{key:23},[n[18]||(n[18]=h("circle",{cx:"12",cy:"12",r:"4"},null,-1)),n[19]||(n[19]=h("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"?(b(),x("path",hp)):e.name==="stop"?(b(),x("rect",pp)):e.name==="compact"?(b(),x("path",gp)):e.name==="brain"?(b(),x("path",mp)):e.name==="clipboard"?(b(),x(re,{key:28},[n[20]||(n[20]=h("rect",{x:"5",y:"4",width:"14",height:"17",rx:"2"},null,-1)),n[21]||(n[21]=h("path",{d:"M9 4V2h6v2M9 10h6M9 14h6"},null,-1))],64)):e.name==="fork"?(b(),x(re,{key:29},[n[22]||(n[22]=h("circle",{cx:"6",cy:"4",r:"2"},null,-1)),n[23]||(n[23]=h("circle",{cx:"18",cy:"6",r:"2"},null,-1)),n[24]||(n[24]=h("circle",{cx:"6",cy:"20",r:"2"},null,-1)),n[25]||(n[25]=h("path",{d:"M6 6v12M8 10c6 0 4-4 8-4"},null,-1))],64)):e.name==="message-circle"?(b(),x("path",vp)):e.name==="tag"?(b(),x("path",yp)):e.name==="sparkles"?(b(),x("path",bp)):e.name==="terminal"?(b(),x(re,{key:33},[n[26]||(n[26]=h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[27]||(n[27]=h("path",{d:"m7 9 3 3-3 3m5 0h5"},null,-1))],64)):e.name==="folder"?(b(),x("path",kp)):e.name==="check"?(b(),x("path",wp)):e.name==="speaker"?(b(),x(re,{key:36},[n[28]||(n[28]=h("path",{d:"M11 5 6 9H3v6h3l5 4V5z"},null,-1)),n[29]||(n[29]=h("path",{d:"M15.5 8.5a5 5 0 0 1 0 7"},null,-1)),n[30]||(n[30]=h("path",{d:"M18 6a8.5 8.5 0 0 1 0 12"},null,-1))],64)):e.name==="speaker-off"?(b(),x(re,{key:37},[n[31]||(n[31]=h("path",{d:"M11 5 6 9H3v6h3l5 4V5z"},null,-1)),n[32]||(n[32]=h("path",{d:"m16 9 5 6M21 9l-5 6"},null,-1))],64)):e.name==="copy"?(b(),x(re,{key:38},[n[33]||(n[33]=h("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1)),n[34]||(n[34]=h("path",{d:"M16 8V4H4v12h4"},null,-1))],64)):Z("",!0)],8,Jh))}}),ge=Ce(_p,[["__scopeId","data-v-62f07b99"]]),Sp={class:"topbar"},xp={class:"agent-heading"},Cp={class:"agent-mark"},Tp={class:"agent-copy"},$p={class:"actions"},Ap={key:0,class:"status-chip"},Rp=["title"],Ep={class:"truncate"},Ip={key:0},Lp={key:1},Pp=["disabled","title"],Mp={class:"truncate"},Np=["title"],Op={class:"theme-toggle",role:"group","aria-label":"主题切换"},Bp=["title","aria-pressed","onClick"],Dp=["title"],Gp={key:0,class:"diff-body"},jp={key:1,class:"diff-empty"},Fp=xe({__name:"TopBar",props:{connectionStatus:{},status:{},busy:{type:Boolean,default:!1},gitStatus:{default:null}},emits:["refresh-git","toggle-sidebar","open-model-picker"],setup(e,{emit:t}){const n=e,s=t,r=Nt("theme",H("system")),o=Nt("setTheme",()=>{}),i=[{value:"light",icon:"sun",label:"浅色主题"},{value:"dark",icon:"moon",label:"深色主题"},{value:"system",icon:"monitor",label:"跟随系统"}],l={connecting:"连接中",connected:"已连接",reconnecting:"重连中",disconnected:"已断开",idle:"空闲"},a=Nt("modelSwitchable",H(!1)),c=H(!1),u=Q(()=>{const f=n.status.contextUsage;return f===void 0?null:Math.round((f>1?f/100:f)*100)}),d=Q(()=>{var f,m;return`Tokens: ${((f=n.status.contextTokens)==null?void 0:f.toLocaleString())??"-"} / ${((m=n.status.maxContextTokens)==null?void 0:m.toLocaleString())??"-"}`}),g=Q(()=>n.gitStatus?[n.gitStatus.ahead?`↑${n.gitStatus.ahead}`:"",n.gitStatus.behind?`↓${n.gitStatus.behind}`:""].filter(Boolean).join(" "):"");function p(){c.value=!c.value,c.value&&s("refresh-git")}return(f,m)=>{var k;return b(),x("header",Sp,[h("div",xp,[h("button",{class:"mobile-menu","aria-label":"打开会话列表",title:"打开会话列表",onClick:m[0]||(m[0]=v=>s("toggle-sidebar"))},[V(ge,{name:"menu"})]),h("span",Cp,[V(ge,{name:"bot",size:22})]),h("div",Tp,[m[3]||(m[3]=h("strong",null,"Scream Code Agent",-1)),h("span",null,[h("i",{class:be({busy:e.busy})},null,2),Ie(E(e.busy?"正在处理会话":"已就绪,等待任务"),1)])])]),h("div",$p,[e.status.planMode?(b(),x("span",Ap,[V(ge,{name:"clipboard",size:16}),m[4]||(m[4]=Ie("计划模式",-1))])):Z("",!0),e.gitStatus?(b(),x("button",{key:1,class:"action-chip git",title:`分支:${e.gitStatus.branch??"detached"},点击查看变更统计`,onClick:p},[V(ge,{name:"git-branch",size:17}),h("span",Ep,E(e.gitStatus.branch??"detached"),1),g.value?(b(),x("span",Ip,E(g.value),1)):Z("",!0),e.gitStatus.changed?(b(),x("span",Lp,E(e.gitStatus.changed)+" 项变更",1)):Z("",!0)],8,Rp)):Z("",!0),e.status.model?(b(),x("button",{key:2,class:"action-chip model",disabled:!X(a),title:e.status.model,onClick:m[1]||(m[1]=v=>s("open-model-picker"))},[V(ge,{name:"brain",size:17}),h("span",Mp,E(e.status.model),1)],8,Pp)):Z("",!0),u.value!==null?(b(),x("span",{key:3,class:"action-chip context",title:d.value},[V(Nc,{usage:e.status.contextUsage,size:18},null,8,["usage"]),Ie(E(u.value)+"%",1)],8,Np)):Z("",!0),h("div",Op,[(b(),x(re,null,Ve(i,v=>h("button",{key:v.value,class:be({active:X(r)===v.value}),title:v.label,"aria-pressed":X(r)===v.value,onClick:S=>X(o)(v.value)},[V(ge,{name:v.icon,size:17},null,8,["name"])],10,Bp)),64))]),h("div",{class:be(["connection",e.connectionStatus]),title:l[e.connectionStatus]},[V(ge,{name:"wifi",size:18}),h("span",null,E(l[e.connectionStatus]),1)],10,Dp)]),V(Yr,{open:c.value&&!!e.gitStatus,title:`${((k=e.gitStatus)==null?void 0:k.branch)??"detached"} · diff 统计`,onClose:m[2]||(m[2]=v=>c.value=!1)},{default:et(()=>{var v;return[(v=e.gitStatus)!=null&&v.diffStat?(b(),x("pre",Gp,E(e.gitStatus.diffStat),1)):(b(),x("div",jp,"工作区干净,没有变更。"))]}),_:1},8,["open","title"])])}}}),zp=Ce(Fp,[["__scopeId","data-v-6c220d1f"]]),Up={class:"chat-header"},Hp={class:"title-area"},qp=["onKeydown"],Wp={key:1,class:"title-copy"},Vp={class:"title-line"},Kp=["title"],Zp={class:"status-line"},Yp={class:"header-actions"},Jp=["title"],Xp=["title"],Qp=xe({__name:"ChatHeader",props:{title:{default:null},busy:{type:Boolean,default:!1}},emits:["rename","export","clear","toggle-rightbar"],setup(e,{emit:t}){const n=e,s=t,r=H(!1),o=H(""),i=H(null);Ne(()=>n.title,()=>{r.value||(o.value=n.title??"")},{immediate:!0});function l(){o.value=n.title??"",r.value=!0,Bt(()=>{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=Nt("showThinking",H(!0)),d=Nt("showTools",H(!0));return(g,p)=>(b(),x("div",Up,[h("div",Hp,[r.value?st((b(),x("input",{key:0,id:"session-title-input",ref_key:"inputRef",ref:i,"onUpdate:modelValue":p[0]||(p[0]=f=>o.value=f),name:"session-title",class:"title-input",maxlength:"80",onKeydown:[Es(zt(a,["prevent"]),["enter"]),Es(zt(c,["prevent"]),["esc"])],onBlur:a},null,40,qp)),[[gt,o.value]]):(b(),x("div",Wp,[h("div",Vp,[h("h1",{title:e.title??void 0},E(e.title||"新会话"),9,Kp),h("button",{class:"icon-action edit",title:"重命名会话","aria-label":"重命名会话",onClick:l},[V(ge,{name:"edit",size:17})])]),h("div",Zp,[h("span",{class:be(["status-dot",{busy:e.busy}])},null,2),Ie(E(e.busy?"Agent 正在运行并处理工具调用":"Agent 已就绪"),1)])]))]),h("div",Yp,[h("button",{class:"text-action",title:"导出会话为 Markdown",onClick:p[1]||(p[1]=f=>s("export"))},[V(ge,{name:"upload",size:18}),p[6]||(p[6]=h("span",null,"导出",-1))]),h("button",{class:"text-action",title:"清空本地消息列表",onClick:p[2]||(p[2]=f=>s("clear"))},[V(ge,{name:"broom",size:18}),p[7]||(p[7]=h("span",null,"清空",-1))]),h("button",{class:be(["text-action",{dimmed:!X(u)}]),title:X(u)?"隐藏思考链":"显示思考链",onClick:p[3]||(p[3]=f=>u.value=!X(u))},[V(ge,{name:"brain",size:18}),p[8]||(p[8]=h("span",null,"思考",-1))],10,Jp),h("button",{class:be(["text-action",{dimmed:!X(d)}]),title:X(d)?"隐藏工具链":"显示工具链",onClick:p[4]||(p[4]=f=>d.value=!X(d))},[V(ge,{name:"terminal",size:18}),p[9]||(p[9]=h("span",null,"工具",-1))],10,Xp),h("button",{class:"icon-action",title:"显示或隐藏右侧面板","aria-label":"显示或隐藏右侧面板",onClick:p[5]||(p[5]=f=>s("toggle-rightbar"))},[V(ge,{name:"panel-right",size:19})])])]))}}),eg=Ce(Qp,[["__scopeId","data-v-5addc6d6"]]),xi=""+new URL("../icon.ico",import.meta.url).href;function Ci(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var jn=Ci();function Oc(e){jn=e}var ws={exec:()=>null};function Ee(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(vt.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,t)};return s}var vt={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")},tg=/^(?:[ \t]*(?:\n|$))+/,ng=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,sg=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,js=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rg=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ti=/(?:[*+-]|\d{1,9}[.)])/,Bc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Dc=Ee(Bc).replace(/bull/g,Ti).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(),og=Ee(Bc).replace(/bull/g,Ti).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(),$i=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ig=/^[^\n]+/,Ai=/(?!\s*\])(?:\\.|[^\[\]\\])+/,lg=Ee(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ai).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ag=Ee(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ti).getRegex(),Jr="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",Ri=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,cg=Ee("^ {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",Ri).replace("tag",Jr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gc=Ee($i).replace("hr",js).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",Jr).getRegex(),ug=Ee(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Gc).getRegex(),Ei={blockquote:ug,code:ng,def:lg,fences:sg,heading:rg,hr:js,html:cg,lheading:Dc,list:ag,newline:tg,paragraph:Gc,table:ws,text:ig},Ol=Ee("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",js).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",Jr).getRegex(),fg={...Ei,lheading:og,table:Ol,paragraph:Ee($i).replace("hr",js).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ol).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",Jr).getRegex()},dg={...Ei,html:Ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ri).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:ws,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ee($i).replace("hr",js).replace("heading",` *#{1,6} *[^
19
+ ]`).replace("lheading",Dc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hg=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,pg=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,jc=/^( {2,}|\\)\n(?!\s*$)/,gg=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Xr=/[\p{P}\p{S}]/u,Ii=/[\s\p{P}\p{S}]/u,Fc=/[^\s\p{P}\p{S}]/u,mg=Ee(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ii).getRegex(),zc=/(?!~)[\p{P}\p{S}]/u,vg=/(?!~)[\s\p{P}\p{S}]/u,yg=/(?:[^\s\p{P}\p{S}]|~)/u,bg=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Uc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,kg=Ee(Uc,"u").replace(/punct/g,Xr).getRegex(),wg=Ee(Uc,"u").replace(/punct/g,zc).getRegex(),Hc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_g=Ee(Hc,"gu").replace(/notPunctSpace/g,Fc).replace(/punctSpace/g,Ii).replace(/punct/g,Xr).getRegex(),Sg=Ee(Hc,"gu").replace(/notPunctSpace/g,yg).replace(/punctSpace/g,vg).replace(/punct/g,zc).getRegex(),xg=Ee("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Fc).replace(/punctSpace/g,Ii).replace(/punct/g,Xr).getRegex(),Cg=Ee(/\\(punct)/,"gu").replace(/punct/g,Xr).getRegex(),Tg=Ee(/^<(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(),$g=Ee(Ri).replace("(?:-->|$)","-->").getRegex(),Ag=Ee("^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",$g).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),wr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Rg=Ee(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",wr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),qc=Ee(/^!?\[(label)\]\[(ref)\]/).replace("label",wr).replace("ref",Ai).getRegex(),Wc=Ee(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ai).getRegex(),Eg=Ee("reflink|nolink(?!\\()","g").replace("reflink",qc).replace("nolink",Wc).getRegex(),Li={_backpedal:ws,anyPunctuation:Cg,autolink:Tg,blockSkip:bg,br:jc,code:pg,del:ws,emStrongLDelim:kg,emStrongRDelimAst:_g,emStrongRDelimUnd:xg,escape:hg,link:Rg,nolink:Wc,punctuation:mg,reflink:qc,reflinkSearch:Eg,tag:Ag,text:gg,url:ws},Ig={...Li,link:Ee(/^!?\[(label)\]\((.*?)\)/).replace("label",wr).getRegex(),reflink:Ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wr).getRegex()},Uo={...Li,emStrongRDelimAst:Sg,emStrongLDelim:wg,url:Ee(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Lg={...Uo,br:Ee(jc).replace("{2,}","*").getRegex(),text:Ee(Uo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Js={normal:Ei,gfm:fg,pedantic:dg},as={normal:Li,gfm:Uo,breaks:Lg,pedantic:Ig},Pg={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Bl=e=>Pg[e];function qt(e,t){if(t){if(vt.escapeTest.test(e))return e.replace(vt.escapeReplace,Bl)}else if(vt.escapeTestNoEncode.test(e))return e.replace(vt.escapeReplaceNoEncode,Bl);return e}function Dl(e){try{e=encodeURI(e).replace(vt.percentDecode,"%")}catch{return null}return e}function Gl(e,t){var o;const n=e.replace(vt.findPipe,(i,l,a)=>{let c=!1,u=l;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),s=n.split(vt.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(vt.slashPipe,"|");return s}function cs(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 jl(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 Ng(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){$(this,"options");$(this,"rules");$(this,"lexer");this.options=e||jn}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:cs(n,`
22
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=Ng(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=cs(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:cs(t[0],`
23
+ `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=cs(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 d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=d,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,f=p.raw+`
30
+ `+n.join(`
31
+ `),m=this.blockquote(f);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,f=p.raw+`
32
+ `+n.join(`
33
+ `),m=this.list(f);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=f.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 d=t[2].split(`
35
+ `,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),g=e.split(`
36
+ `,1)[0],p=!d.trim(),f=0;if(this.options.pedantic?(f=2,u=d.trimStart()):p?f=t[1].length+1:(f=t[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,u=d.slice(f),f+=t[1].length),p&&this.rules.other.blankLine.test(g)&&(c+=g+`
37
+ `,e=e.substring(g.length+1),a=!0),!a){const v=this.rules.other.nextBulletRegex(f),S=this.rules.other.hrRegex(f),T=this.rules.other.fencesBeginRegex(f),w=this.rules.other.headingBeginRegex(f),P=this.rules.other.htmlBeginRegex(f);for(;e;){const K=e.split(`
38
+ `,1)[0];let D;if(g=K,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),D=g):D=g.replace(this.rules.other.tabCharGlobal," "),T.test(g)||w.test(g)||P.test(g)||v.test(g)||S.test(g))break;if(D.search(this.rules.other.nonSpaceChar)>=f||!g.trim())u+=`
39
+ `+D.slice(f);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(d)||w.test(d)||S.test(d))break;u+=`
40
+ `+g}!p&&!g.trim()&&(p=!0),c+=K+`
41
+ `,e=e.substring(K.length+1),d=D.slice(f)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0));let m=null,k;this.options.gfm&&(m=this.rules.other.listIsTask.exec(u),m&&(k=m[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:c,task:!!m,checked:k,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(d=>d.type==="space"),u=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.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=Gl(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(Gl(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=cs(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)),jl(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 jl(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 d=[...s[0]][0].length,g=e.slice(0,o+s.index+d+l);if(Math.min(o,l)%2){const f=g.slice(1,-1);return{type:"em",raw:g,text:f,tokens:this.lexer.inlineTokens(f)}}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}}}},an=class Ho{constructor(t){$(this,"tokens");$(this,"options");$(this,"state");$(this,"tokenizer");$(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||jn,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:vt,block:Js.normal,inline:as.normal};this.options.pedantic?(n.block=Js.pedantic,n.inline=as.pedantic):this.options.gfm&&(n.block=Js.gfm,this.options.breaks?n.inline=as.breaks:n.inline=as.gfm),this.tokenizer.rules=n}static get rules(){return{block:Js,inline:as}}static lex(t,n){return new Ho(n).lex(t)}static lexInline(t,n){return new Ho(n).inlineTokens(t)}lex(t){t=t.replace(vt.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(vt.tabCharGlobal," ").replace(vt.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 d;this.options.extensions.startBlock.forEach(g=>{d=g.call({lexer:this},u),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),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 d=t;if((c=this.options.extensions)!=null&&c.startInline){let g=1/0;const p=t.slice(1);let f;this.options.extensions.startInline.forEach(m=>{f=m.call({lexer:this},p),typeof f=="number"&&f>=0&&(g=Math.min(g,f))}),g<1/0&&g>=0&&(d=t.substring(0,g+1))}if(u=this.tokenizer.inlineText(d)){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}},Sr=class{constructor(e){$(this,"options");$(this,"parser");this.options=e||jn}space(e){return""}code({text:e,lang:t,escaped:n}){var o;const s=(o=(t||"").match(vt.notSpaceStart))==null?void 0:o[0],r=e.replace(vt.endingNewline,"")+`
54
+ `;return s?'<pre><code class="language-'+qt(s)+'">'+(n?r:qt(r,!0))+`</code></pre>
55
+ `:"<pre><code>"+(n?r:qt(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+" "+qt(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>${qt(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=Dl(e);if(r===null)return s;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+qt(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=Dl(e);if(r===null)return qt(n);e=r;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${qt(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:qt(e.text)}},Pi=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""}},cn=class qo{constructor(t){$(this,"options");$(this,"renderer");$(this,"textRenderer");this.options=t||jn,this.options.renderer=this.options.renderer||new Sr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Pi}static parse(t,n){return new qo(n).parse(t)}static parseInline(t,n){return new qo(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}},$o,ir=($o=class{constructor(e){$(this,"options");$(this,"block");this.options=e||jn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?an.lex:an.lexInline}provideParser(){return this.block?cn.parse:cn.parseInline}},$($o,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),$o),Og=class{constructor(...e){$(this,"defaults",Ci());$(this,"options",this.setOptions);$(this,"parse",this.parseMarkdown(!0));$(this,"parseInline",this.parseMarkdown(!1));$(this,"Parser",cn);$(this,"Renderer",Sr);$(this,"TextRenderer",Pi);$(this,"Lexer",an);$(this,"Tokenizer",_r);$(this,"Hooks",ir);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 Sr(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 ir;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];ir.passThroughHooks.has(o)?r[i]=c=>{if(this.defaults.async)return Promise.resolve(l.call(r,c)).then(d=>a.call(r,d));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 an.lex(e,t??this.defaults)}parser(e,t){return cn.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?an.lex:an.lexInline,a=o.hooks?o.hooks.provideParser():e?cn.parse:cn.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>"+qt(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},Gn=new Og;function Ae(e,t){return Gn.parse(e,t)}Ae.options=Ae.setOptions=function(e){return Gn.setOptions(e),Ae.defaults=Gn.defaults,Oc(Ae.defaults),Ae};Ae.getDefaults=Ci;Ae.defaults=jn;Ae.use=function(...e){return Gn.use(...e),Ae.defaults=Gn.defaults,Oc(Ae.defaults),Ae};Ae.walkTokens=function(e,t){return Gn.walkTokens(e,t)};Ae.parseInline=Gn.parseInline;Ae.Parser=cn;Ae.parser=cn.parse;Ae.Renderer=Sr;Ae.TextRenderer=Pi;Ae.Lexer=an;Ae.lexer=an.lex;Ae.Tokenizer=_r;Ae.Hooks=ir;Ae.parse=Ae;Ae.options;Ae.setOptions;Ae.use;Ae.walkTokens;Ae.parseInline;cn.parse;an.lex;const Bg="modulepreload",Dg=function(e,t){return new URL(e,t).href},Fl={},Xs=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(d=>Promise.resolve(d).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=Dg(u,s),u in Fl)return;Fl[u]=!0;const d=u.endsWith(".css"),g=d?'[rel="stylesheet"]':"";if(!!s)for(let m=l.length-1;m>=0;m--){const k=l[m];if(k.href===u&&(!d||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${g}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":Bg,d||(f.as="script"),f.crossOrigin="",f.href=u,c&&f.setAttribute("nonce",c),document.head.appendChild(f),d)return new Promise((m,k)=>{f.addEventListener("load",m),f.addEventListener("error",()=>k(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 Qe=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Gg(e){return Mi(e)}function Mi(e){return Array.isArray(e)?jg(e):e instanceof RegExp?e:typeof e=="object"?Fg(e):e}function jg(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=Mi(e[n]);return t}function Fg(e){let t={};for(let n in e)t[n]=Mi(e[n]);return t}function Vc(e,...t){return t.forEach(n=>{for(let s in n)e[s]=n[s]}),e}function Kc(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Kc(e.substring(0,e.length-1)):e.substr(~t+1)}var yo=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Qs=class{static hasCaptures(e){return e===null?!1:(yo.lastIndex=0,yo.test(e))}static replaceCaptures(e,t,n){return e.replace(yo,(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 Zc(e,t){return e<t?-1:e>t?1:0}function Yc(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=Zc(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 Jc(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Xc=class{constructor(e){$(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}},xr=class{constructor(e,t,n){$(this,"_cachedMatchRoot",new Xc(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Hg(e),t)}static createFromParsedTheme(e,t){return Wg(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=>zg(e.parent,r.parentScopes));return s?new Qc(s.fontStyle,s.foreground,s.background):null}},bo=class lr{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const s of n)t=new lr(t,s);return t}static from(...t){let n=null;for(let s=0;s<t.length;s++)n=new lr(n,t[s]);return n}push(t){return new lr(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 zg(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&&!Ug(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ug(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Qc=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Hg(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 d=i.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),l=d.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let d=i.settings.fontStyle.split(" ");for(let g=0,p=d.length;g<p;g++)switch(d[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 d=0,g=l.length;d<g;d++){let f=l[d].trim().split(" "),m=f[f.length-1],k=null;f.length>1&&(k=f.slice(0,f.length-1),k.reverse()),n[s++]=new qg(m,k,r,a,c,u)}}return n}var qg=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}},ut=(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))(ut||{});function Wg(e,t){e.sort((a,c)=>{let u=Zc(a.scope,c.scope);return u!==0||(u=Yc(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 Vg(t),i=new Qc(n,o.getId(s),o.getId(r)),l=new Zg(new Wo(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 xr(o,i,l)}var Vg=class{constructor(e){$(this,"_isFrozen");$(this,"_lastColorId");$(this,"_id2color");$(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)}},Kg=Object.freeze([]),Wo=class eu{constructor(t,n,s,r,o){$(this,"scopeDepth");$(this,"parentScopes");$(this,"fontStyle");$(this,"foreground");$(this,"background");this.scopeDepth=t,this.parentScopes=n||Kg,this.fontStyle=s,this.foreground=r,this.background=o}clone(){return new eu(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)}},Zg=class Vo{constructor(t,n=[],s={}){$(this,"_rulesWithParentScopes");this._mainRule=t,this._children=s,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let s=0,r=0;for(;t.parentScopes[s]===">"&&s++,n.parentScopes[r]===">"&&r++,!(s>=t.parentScopes.length||r>=n.parentScopes.length);){const o=n.parentScopes[r].length-t.parentScopes[s].length;if(o!==0)return o;s++,r++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let s=t.indexOf("."),r,o;if(s===-1?(r=t,o=""):(r=t.substring(0,s),o=t.substring(s+1)),this._children.hasOwnProperty(r))return this._children[r].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Vo._cmpBySpecificity),n}insert(t,n,s,r,o,i){if(n===""){this._doInsertHere(t,s,r,o,i);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Vo(this._mainRule.clone(),Wo.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(Yc(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 Wo(t,n,s,r,o))}},ns=class It{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=It.getLanguageId(t),s=It.getTokenType(t),r=It.getFontStyle(t),o=It.getForeground(t),i=It.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=It.getLanguageId(t),c=It.getTokenType(t),u=It.containsBalancedBrackets(t)?1:0,d=It.getFontStyle(t),g=It.getForeground(t),p=It.getBackground(t);return n!==0&&(a=n),s!==8&&(c=s),r!==null&&(u=r?1:0),o!==-1&&(d=o),i!==0&&(g=i),l!==0&&(p=l),(a<<0|c<<8|u<<10|d<<11|g<<15|p<<24)>>>0}};function Cr(e,t){const n=[],s=Yg(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(Ul(r)){const a=[];do a.push(r),r=s.next();while(Ul(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(d=>d(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(d=>d(u))}}function Ul(e){return!!e&&!!e.match(/[\w\.:]+/)}function Yg(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 tu(e){typeof e.dispose=="function"&&e.dispose()}var Ls=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Jg=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Xg=class{constructor(){$(this,"_references",[]);$(this,"_seenReferenceKeys",new Set);$(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Qg=class{constructor(e,t){$(this,"seenFullScopeRequests",new Set);$(this,"seenPartialScopeRequests",new Set);$(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ls(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new Xg;for(const n of e)em(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Ls){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 em(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 Ls?ar({baseGrammar:o,selfGrammar:r},s):Ko(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 Ls(l))}function Ko(e,t,n){if(t.repository&&t.repository[e]){const s=t.repository[e];Tr([s],t,n)}}function ar(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Tr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Tr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Tr(e,t,n){for(const s of e){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?Vc({},t.repository,s.repository):t.repository;Array.isArray(s.patterns)&&Tr(s.patterns,{...t,repository:r},n);const o=s.include;if(!o)continue;const i=nu(o);switch(i.kind){case 0:ar({...t,selfGrammar:t.baseGrammar},n);break;case 1:ar(t,n);break;case 2:Ko(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?Ko(i.ruleName,a,n):ar(a,n)}else i.kind===4?n.add(new Jg(i.scopeName,i.ruleName)):n.add(new Ls(i.scopeName));break}}}var tm=class{constructor(){$(this,"kind",0)}},nm=class{constructor(){$(this,"kind",1)}},sm=class{constructor(e){$(this,"kind",2);this.ruleName=e}},rm=class{constructor(e){$(this,"kind",3);this.scopeName=e}},om=class{constructor(e,t){$(this,"kind",4);this.scopeName=e,this.ruleName=t}};function nu(e){if(e==="$base")return new tm;if(e==="$self")return new nm;const t=e.indexOf("#");if(t===-1)return new rm(e);if(t===0)return new sm(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new om(n,s)}}var im=/\\(\d+)/,Hl=/\\(\d+)/g,lm=-1,su=-2;var Fs=class{constructor(e,t,n,s){$(this,"$location");$(this,"id");$(this,"_nameIsCapturing");$(this,"_name");$(this,"_contentNameIsCapturing");$(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Qs.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=Qs.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Kc(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:Qs.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Qs.replaceCaptures(this._contentName,e,t)}},am=class extends Fs{constructor(t,n,s,r,o){super(t,n,s,r);$(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!")}},cm=class extends Fs{constructor(t,n,s,r,o){super(t,n,s,null);$(this,"_match");$(this,"captures");$(this,"_cachedCompiledPatterns");this._match=new Ps(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 Ms,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ql=class extends Fs{constructor(t,n,s,r,o){super(t,n,s,r);$(this,"hasMissingPatterns");$(this,"patterns");$(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 Ms,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Zo=class extends Fs{constructor(t,n,s,r,o,i,l,a,c,u){super(t,n,s,r);$(this,"_begin");$(this,"beginCaptures");$(this,"_end");$(this,"endHasBackReferences");$(this,"endCaptures");$(this,"applyEndPatternLast");$(this,"hasMissingPatterns");$(this,"patterns");$(this,"_cachedCompiledPatterns");this._begin=new Ps(o,this.id),this.beginCaptures=i,this._end=new Ps(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 Ms;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}},$r=class extends Fs{constructor(t,n,s,r,o,i,l,a,c){super(t,n,s,r);$(this,"_begin");$(this,"beginCaptures");$(this,"whileCaptures");$(this,"_while");$(this,"whileHasBackReferences");$(this,"hasMissingPatterns");$(this,"patterns");$(this,"_cachedCompiledPatterns");$(this,"_cachedCompiledWhilePatterns");this._begin=new Ps(o,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new Ps(l,su),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 Ms;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 Ms,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},ru=class it{static createCaptureRule(t,n,s,r,o){return t.registerRule(i=>new am(n,i,s,r,o))}static getCompiledRuleId(t,n,s){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new cm(t.$vscodeTextmateLocation,t.id,t.name,t.match,it._compileCaptures(t.captures,n,s));if(typeof t.begin>"u"){t.repository&&(s=Vc({},s,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new ql(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,it._compilePatterns(o,n,s))}return t.while?new $r(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,it._compileCaptures(t.beginCaptures||t.captures,n,s),t.while,it._compileCaptures(t.whileCaptures||t.captures,n,s),it._compilePatterns(t.patterns,n,s)):new Zo(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,it._compileCaptures(t.beginCaptures||t.captures,n,s),t.end,it._compileCaptures(t.endCaptures||t.captures,n,s),t.applyEndPatternLast,it._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=it.getCompiledRuleId(t[i],n,s)),r[l]=it.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=nu(l.include);switch(c.kind){case 0:case 1:a=it.getCompiledRuleId(s[l.include],n,s);break;case 2:let u=s[c.ruleName];u&&(a=it.getCompiledRuleId(u,n,s));break;case 3:case 4:const d=c.scopeName,g=c.kind===4?c.ruleName:null,p=n.getExternalGrammar(d,s);if(p)if(g){let f=p.repository[g];f&&(a=it.getCompiledRuleId(f,n,p.repository))}else a=it.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else a=it.getCompiledRuleId(l,n,s);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof ql||c instanceof Zo||c instanceof $r)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},Ps=class ou{constructor(t,n){$(this,"source");$(this,"ruleId");$(this,"hasAnchor");$(this,"hasBackReferences");$(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=im.test(this.source):this.hasBackReferences=!1}clone(){return new ou(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 Hl.lastIndex=0,this.source.replace(Hl,(r,o)=>Jc(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}},Ms=class{constructor(){$(this,"_items");$(this,"_hasAnchors");$(this,"_cached");$(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 Wl(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 Wl(e,s,this._items.map(r=>r.ruleId))}},Wl=class{constructor(e,t,n){$(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}},ko=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ln,um=(ln=class{constructor(t,n){$(this,"_defaultAttributes");$(this,"_embeddedLanguagesMatcher");$(this,"_getBasicScopeAttributes",new Xc(t=>{const n=this._scopeToLanguage(t),s=this._toStandardTokenType(t);return new ko(n,s)}));this._defaultAttributes=new ko(t,8),this._embeddedLanguagesMatcher=new fm(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?ln._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(ln.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!")}},$(ln,"_NULL_SCOPE_METADATA",new ko(0,0)),$(ln,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),ln),fm=class{constructor(e){$(this,"values");$(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,s])=>Jc(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])}},Vl=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function iu(e,t,n,s,r,o,i,l){const a=t.content.length;let c=!1,u=-1;if(i){const p=dm(e,t,n,s,r,o);r=p.stack,s=p.linePos,n=p.isFirstLine,u=p.anchorPosition}const d=Date.now();for(;!c;){if(l!==0&&Date.now()-d>l)return new Vl(r,!0);g()}return new Vl(r,!1);function g(){const p=hm(e,t,n,s,r,u);if(!p){o.produce(r,a),c=!0;return}const f=p.captureIndices,m=p.matchedRuleId,k=f&&f.length>0?f[0].end>s:!1;if(m===lm){const v=r.getRule(e);o.produce(r,f[0].start),r=r.withContentNameScopesList(r.nameScopesList),ps(e,t,n,r,o,v.endCaptures,f),o.produce(r,f[0].end);const S=r;if(r=r.parent,u=S.getAnchorPos(),!k&&S.getEnterPos()===s){r=S,o.produce(r,a),c=!0;return}}else{const v=e.getRule(m);o.produce(r,f[0].start);const S=r,T=v.getName(t.content,f),w=r.contentNameScopesList.pushAttributed(T,e);if(r=r.push(m,s,u,f[0].end===a,null,w,w),v instanceof Zo){const P=v;ps(e,t,n,r,o,P.beginCaptures,f),o.produce(r,f[0].end),u=f[0].end;const K=P.getContentName(t.content,f),D=w.pushAttributed(K,e);if(r=r.withContentNameScopesList(D),P.endHasBackReferences&&(r=r.withEndRule(P.getEndWithResolvedBackReferences(t.content,f))),!k&&S.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(v instanceof $r){const P=v;ps(e,t,n,r,o,P.beginCaptures,f),o.produce(r,f[0].end),u=f[0].end;const K=P.getContentName(t.content,f),D=w.pushAttributed(K,e);if(r=r.withContentNameScopesList(D),P.whileHasBackReferences&&(r=r.withEndRule(P.getWhileWithResolvedBackReferences(t.content,f))),!k&&S.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(ps(e,t,n,r,o,v.captures,f),o.produce(r,f[0].end),r=r.pop(),!k){r=r.safePop(),o.produce(r,a),c=!0;return}}f[0].end>s&&(s=f[0].end,n=!1)}}function dm(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 $r&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=mm(a.rule,e,a.stack.endRule,n,s===i),d=c.findNextMatchSync(t,s,u);if(d){if(d.ruleId!==su){r=a.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(a.stack,d.captureIndices[0].start),ps(e,t,n,a.stack,o,a.rule.whileCaptures,d.captureIndices),o.produce(a.stack,d.captureIndices[0].end),i=d.captureIndices[0].end,d.captureIndices[0].end>s&&(s=d.captureIndices[0].end,n=!1))}else{r=a.stack.pop();break}}return{stack:r,linePos:s,anchorPosition:i,isFirstLine:n}}function hm(e,t,n,s,r,o){const i=pm(e,t,n,s,r,o),l=e.getInjections();if(l.length===0)return i;const a=gm(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 pm(e,t,n,s,r,o){const i=r.getRule(e),{ruleScanner:l,findOptions:a}=lu(i,e,r.endRule,n,s===o),c=l.findNextMatchSync(t,s,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function gm(e,t,n,s,r,o,i){let l=Number.MAX_VALUE,a=null,c,u=0;const d=o.contentNameScopesList.getScopeNames();for(let g=0,p=e.length;g<p;g++){const f=e[g];if(!f.matcher(d))continue;const m=t.getRule(f.ruleId),{ruleScanner:k,findOptions:v}=lu(m,t,null,s,r===i),S=k.findNextMatchSync(n,r,v);if(!S)continue;const T=S.captureIndices[0].start;if(!(T>=l)&&(l=T,a=S.captureIndices,c=S.ruleId,u=f.priority,l===r))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function lu(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function mm(e,t,n,s,r){return{ruleScanner:e.compileWhileAG(t,n,s,r),findOptions:0}}function ps(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 d=0;d<a;d++){const g=o[d];if(g===null)continue;const p=i[d];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),k=s.contentNameScopesList.pushAttributed(m,e),v=g.getContentName(l,i),S=k.pushAttributed(v,e),T=s.push(g.retokenizeCapturedWithRuleId,p.start,-1,!1,null,k,S),w=e.createOnigString(l.substring(0,p.end));iu(e,w,n&&p.start===0,p.start,T,r,!1,0),tu(w);continue}const f=g.getName(l,i);if(f!==null){const k=(c.length>0?c[c.length-1].scopes:s.contentNameScopesList).pushAttributed(f,e);c.push(new vm(k,p.end))}}for(;c.length>0;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var vm=class{constructor(e,t){$(this,"scopes");$(this,"endPos");this.scopes=e,this.endPos=t}};function ym(e,t,n,s,r,o,i,l){return new km(e,t,n,s,r,o,i,l)}function Kl(e,t,n,s,r){const o=Cr(t,Ar),i=ru.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 Ar(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(bm(t[r],s))return n=r+1,!0;return!1})}function bm(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 km=class{constructor(e,t,n,s,r,o,i,l){$(this,"_rootId");$(this,"_lastRuleId");$(this,"_ruleId2desc");$(this,"_includedGrammars");$(this,"_grammarRepository");$(this,"_grammar");$(this,"_injections");$(this,"_basicScopeAttributesProvider");$(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new um(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=Zl(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const a of Object.keys(r)){const c=Cr(a,Ar);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)Kl(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&&Kl(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]=Zl(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=ru.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!t||t===Yo.NULL){r=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),d=ns.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=_s.createRootAndLookUpScopeName(g,d,this):p=_s.createRoot("unknown",d),t=new Yo(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 _m(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=iu(this,o,r,0,t,l,!0,s);return tu(o),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Zl(e,t){return e=Gg(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 _s=class Wt{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=bo.push(r,o.scopeNames),s=new Wt(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new Wt(null,new bo(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new bo(null,t),i=s.themeProvider.themeMatch(o),l=Wt.mergeAttributes(n,r,i);return new Wt(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Wt.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),ns.set(t,n.languageId,n.tokenType,null,r,o,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Wt._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=Wt._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=Wt.mergeAttributes(t.tokenAttributes,r,i);return new Wt(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}},Pt,Yo=(Pt=class{constructor(t,n,s,r,o,i,l,a){$(this,"_stackElementBrand");$(this,"_enterPos");$(this,"_anchorPos");$(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:Pt._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?_s.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(){Pt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,s,r,o,i,l){return new Pt(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 Pt(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=_s.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new Pt(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,_s.fromExtension(s,n.contentNameScopesList))}},$(Pt,"NULL",new Pt(null,0,0,0,!1,null,null,null)),Pt),wm=class{constructor(e,t){$(this,"balancedBracketScopes");$(this,"unbalancedBracketScopes");$(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Cr(n,Ar).map(s=>s.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Cr(n,Ar).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}},_m=class{constructor(e,t,n,s){$(this,"_emitBinaryTokens");$(this,"_lineText");$(this,"_tokens");$(this,"_binaryTokens");$(this,"_lastTokenEndIndex");$(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=ns.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(r=ns.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}},Sm=class{constructor(e,t){$(this,"_grammars",new Map);$(this,"_rawGrammars",new Map);$(this,"_injectionGrammars",new Map);$(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,ym(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},xm=class{constructor(t){$(this,"_options");$(this,"_syncRegistry");$(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new Sm(xr.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(xr.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 wm(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,s,r,o){const i=new Qg(this._syncRegistry,t);for(;i.Q.length>0;)i.Q.map(l=>this._loadSingleGrammar(l.scopeName)),i.processQueue();return this._grammarForScopeName(t,n,s,r,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const s=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,s)}}addGrammar(t,n=[],s=0,r=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,s,r)}_grammarForScopeName(t,n=0,s=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,s,r,o)}},Jo=Yo.NULL;const Cm=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class zs{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}zs.prototype.normal={};zs.prototype.property={};zs.prototype.space=void 0;function au(e,t){const n={},s={};for(const r of e)Object.assign(n,r.property),Object.assign(s,r.normal);return new zs(n,s,t)}function Xo(e){return e.toLowerCase()}class kt{constructor(t,n){this.attribute=n,this.property=t}}kt.prototype.attribute="";kt.prototype.booleanish=!1;kt.prototype.boolean=!1;kt.prototype.commaOrSpaceSeparated=!1;kt.prototype.commaSeparated=!1;kt.prototype.defined=!1;kt.prototype.mustUseProperty=!1;kt.prototype.number=!1;kt.prototype.overloadedBoolean=!1;kt.prototype.property="";kt.prototype.spaceSeparated=!1;kt.prototype.space=void 0;let Tm=0;const ve=Fn(),We=Fn(),Qo=Fn(),z=Fn(),Pe=Fn(),Bn=Fn(),xt=Fn();function Fn(){return 2**++Tm}const ei=Object.freeze(Object.defineProperty({__proto__:null,boolean:ve,booleanish:We,commaOrSpaceSeparated:xt,commaSeparated:Bn,number:z,overloadedBoolean:Qo,spaceSeparated:Pe},Symbol.toStringTag,{value:"Module"})),wo=Object.keys(ei);class Ni extends kt{constructor(t,n,s,r){let o=-1;if(super(t,n),Yl(this,"space",r),typeof s=="number")for(;++o<wo.length;){const i=wo[o];Yl(this,wo[o],(s&ei[i])===ei[i])}}}Ni.prototype.defined=!0;function Yl(e,t,n){n&&(e[t]=n)}function ss(e){const t={},n={};for(const[s,r]of Object.entries(e.properties)){const o=new Ni(s,e.transform(e.attributes||{},s),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[Xo(s)]=s,n[Xo(o.attribute)]=s}return new zs(t,n,e.space)}const cu=ss({properties:{ariaActiveDescendant:null,ariaAtomic:We,ariaAutoComplete:null,ariaBusy:We,ariaChecked:We,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:Pe,ariaCurrent:null,ariaDescribedBy:Pe,ariaDetails:null,ariaDisabled:We,ariaDropEffect:Pe,ariaErrorMessage:null,ariaExpanded:We,ariaFlowTo:Pe,ariaGrabbed:We,ariaHasPopup:null,ariaHidden:We,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Pe,ariaLevel:z,ariaLive:null,ariaModal:We,ariaMultiLine:We,ariaMultiSelectable:We,ariaOrientation:null,ariaOwns:Pe,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:We,ariaReadOnly:We,ariaRelevant:null,ariaRequired:We,ariaRoleDescription:Pe,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:We,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 uu(e,t){return t in e?e[t]:t}function fu(e,t){return uu(e,t.toLowerCase())}const $m=ss({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Bn,acceptCharset:Pe,accessKey:Pe,action:null,allow:null,allowFullScreen:ve,allowPaymentRequest:ve,allowUserMedia:ve,alpha:ve,alt:null,as:null,async:ve,autoCapitalize:null,autoComplete:Pe,autoFocus:ve,autoPlay:ve,blocking:Pe,capture:null,charSet:null,checked:ve,cite:null,className:Pe,closedBy:null,colorSpace:null,cols:z,colSpan:z,command:null,commandFor:null,content:null,contentEditable:We,controls:ve,controlsList:Pe,coords:z|Bn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ve,defer:ve,dir:null,dirName:null,disabled:ve,download:Qo,draggable:We,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ve,formTarget:null,headers:Pe,height:z,hidden:Qo,high:z,href:null,hrefLang:null,htmlFor:Pe,httpEquiv:Pe,id:null,imageSizes:null,imageSrcSet:null,inert:ve,inputMode:null,integrity:null,is:null,isMap:ve,itemId:null,itemProp:Pe,itemRef:Pe,itemScope:ve,itemType:Pe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ve,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:ve,muted:ve,name:null,nonce:null,noModule:ve,noValidate:ve,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:ve,optimum:z,pattern:null,ping:Pe,placeholder:null,playsInline:ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ve,referrerPolicy:null,rel:Pe,required:ve,reversed:ve,rows:z,rowSpan:z,sandbox:Pe,scope:null,scoped:ve,seamless:ve,selected:ve,shadowRootClonable:ve,shadowRootCustomElementRegistry:ve,shadowRootDelegatesFocus:ve,shadowRootMode:null,shadowRootSerializable:ve,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:We,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:ve,useMap:null,value:We,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Pe,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:ve,declare:ve,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:ve,noHref:ve,noShade:ve,noWrap:ve,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:We,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:ve,disablePictureInPicture:ve,disableRemotePlayback:ve,exportParts:Bn,part:Pe,prefix:null,property:null,results:z,security:null,unselectable:null},space:"html",transform:fu}),Am=ss({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:xt,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:Pe,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:ve,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:Bn,g2:Bn,glyphName:Bn,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:xt,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:Pe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xt,rev:xt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xt,requiredFeatures:xt,requiredFonts:xt,requiredFormats:xt,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:xt,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:xt,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:xt,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:uu}),du=ss({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()}}),hu=ss({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fu}),pu=ss({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Rm=/[A-Z]/g,Jl=/-[a-z]/g,Em=/^data[-\w.:]+$/i;function Im(e,t){const n=Xo(t);let s=t,r=kt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Em.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Jl,Pm);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Jl.test(o)){let i=o.replace(Rm,Lm);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}r=Ni}return new r(s,t)}function Lm(e){return"-"+e.toLowerCase()}function Pm(e){return e.charAt(1).toUpperCase()}const Mm=au([cu,$m,du,hu,pu],"html"),gu=au([cu,Am,du,hu,pu],"svg"),Xl={}.hasOwnProperty;function Nm(e,t){const n=t||{};function s(r,...o){let i=s.invalid;const l=s.handlers;if(r&&Xl.call(r,e)){const a=String(r[e]);i=Xl.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 Om=/["&'<>`]/g,Bm=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Dm=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Gm=/[|\\{}()[\]^$+*?.]/g,Ql=new WeakMap;function jm(e,t){if(e=e.replace(t.subset?Fm(t.subset):Om,s),t.subset||t.escapeOnly)return e;return e.replace(Bm,n).replace(Dm,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 Fm(e){let t=Ql.get(e);return t||(t=zm(e),Ql.set(e,t)),t}function zm(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Gm,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Um=/[\dA-Fa-f]/;function Hm(e,t,n){const s="&#x"+e.toString(16).toUpperCase();return n&&t&&!Um.test(String.fromCharCode(t))?s:s+";"}const qm=/\d/;function Wm(e,t,n){const s="&#"+String(e);return n&&t&&!qm.test(String.fromCharCode(t))?s:s+";"}const Vm=["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"],_o={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:"€"},Km=["cent","copy","divide","gt","lt","not","para","times"],mu={}.hasOwnProperty,ti={};let er;for(er in _o)mu.call(_o,er)&&(ti[_o[er]]=er);const Zm=/[^\dA-Za-z]/;function Ym(e,t,n,s){const r=String.fromCharCode(e);if(mu.call(ti,r)){const o=ti[r],i="&"+o;return n&&Vm.includes(o)&&!Km.includes(o)&&(!s||t&&t!==61&&Zm.test(String.fromCharCode(t)))?i:i+";"}return""}function Jm(e,t,n){let s=Hm(e,t,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=Ym(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const o=Wm(e,t,n.omitOptionalSemicolons);o.length<s.length&&(s=o)}return r&&(!n.useShortestReferences||r.length<s.length)?r:s}function Qn(e,t){return jm(e,Object.assign({format:Jm},t))}const Xm=/^>|^->|<!--|-->|--!>|<!-$/g,Qm=[">"],ev=["<",">"];function tv(e,t,n,s){return s.settings.bogusComments?"<?"+Qn(e.value,Object.assign({},s.settings.characterReferences,{subset:Qm}))+">":"<!--"+e.value.replace(Xm,r)+"-->";function r(o){return Qn(o,Object.assign({},s.settings.characterReferences,{subset:ev}))}}function nv(e,t,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}function ea(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 sv(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function rv(e){return e.join(" ").trim()}const ov=/[ \t\n\f\r]/g;function Oi(e){return typeof e=="object"?e.type==="text"?ta(e.value):!1:ta(e)}function ta(e){return e.replace(ov,"")===""}const Ye=yu(1),vu=yu(-1),iv=[];function yu(e){return t;function t(n,s,r){const o=n?n.children:iv;let i=(s||0)+e,l=o[i];if(!r)for(;l&&Oi(l);)i+=e,l=o[i];return l}}const lv={}.hasOwnProperty;function bu(e){return t;function t(n,s,r){return lv.call(e,n.tagName)&&e[n.tagName](n,s,r)}}const Bi=bu({body:cv,caption:So,colgroup:So,dd:hv,dt:dv,head:So,html:av,li:fv,optgroup:pv,option:gv,p:uv,rp:na,rt:na,tbody:vv,td:sa,tfoot:yv,th:sa,thead:mv,tr:bv});function So(e,t,n){const s=Ye(n,t,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&Oi(s.value.charAt(0)))}function av(e,t,n){const s=Ye(n,t);return!s||s.type!=="comment"}function cv(e,t,n){const s=Ye(n,t);return!s||s.type!=="comment"}function uv(e,t,n){const s=Ye(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 fv(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&s.tagName==="li"}function dv(e,t,n){const s=Ye(n,t);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function hv(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function na(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function pv(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&s.tagName==="optgroup"}function gv(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function mv(e,t,n){const s=Ye(n,t);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function vv(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function yv(e,t,n){return!Ye(n,t)}function bv(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&s.tagName==="tr"}function sa(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const kv=bu({body:Sv,colgroup:xv,head:_v,html:wv,tbody:Cv});function wv(e){const t=Ye(e,-1);return!t||t.type!=="comment"}function _v(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 Sv(e){const t=Ye(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Oi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function xv(e,t,n){const s=vu(n,t),r=Ye(e,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&Bi(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function Cv(e,t,n){const s=vu(n,t),r=Ye(e,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&Bi(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const tr={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 Tv(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=gu);const c=$v(s,e.properties),u=s.all(r.space==="html"&&e.tagName==="template"?e.content:e);return s.schema=r,u&&(i=!1),(c||!o||!kv(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||!Bi(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function $v(e,t){const n=[];let s=-1,r;if(t){for(r in t)if(t[r]!==null&&t[r]!==void 0){const o=Av(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 Av(e,t,n){const s=Im(e.schema,t),r=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let i=e.quote,l;if(s.overloadedBoolean&&(n===s.attribute||n==="")?n=!0:(s.boolean||s.overloadedBoolean)&&(typeof n!="string"||n===s.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const a=Qn(s.attribute,Object.assign({},e.settings.characterReferences,{subset:tr.name[r][o]}));return n===!0||(n=Array.isArray(n)?(s.commaSeparated?sv:rv)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?a:(e.settings.preferUnquoted&&(l=Qn(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:tr.unquoted[r][o]}))),l!==n&&(e.settings.quoteSmart&&ea(n,i)>ea(n,e.alternative)&&(i=e.alternative),l=i+Qn(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?tr.single:tr.double)[r][o],attribute:!0}))+i),a+(l&&"="+l))}const Rv=["<","&"];function ku(e,t,n,s){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Qn(e.value,Object.assign({},s.settings.characterReferences,{subset:Rv}))}function Ev(e,t,n,s){return s.settings.allowDangerousHtml?e.value:ku(e,t,n,s)}function Iv(e,t,n,s){return s.all(e)}const Lv=Nm("type",{invalid:Pv,unknown:Mv,handlers:{comment:tv,doctype:nv,element:Tv,raw:Ev,root:Iv,text:ku}});function Pv(e){throw new Error("Expected node, not `"+e+"`")}function Mv(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Nv={},Ov={},Bv=[];function Dv(e,t){const n=t||Nv,s=n.quote||'"',r=s==='"'?"'":'"';if(s!=='"'&&s!=="'")throw new Error("Invalid quote `"+s+"`, expected `'` or `\"`");return{one:Gv,all:jv,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||Cm,characterReferences:n.characterReferences||Ov,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?gu:Mm,quote:s,alternative:r}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Gv(e,t,n){return Lv(e,t,n,this)}function jv(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 Rr(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 Sn(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function Fv(e){return Array.isArray(e)?e:[e]}async function wu(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Di(e){return!e||["plaintext","txt","text","plain"].includes(e)}function zv(e){return e==="ansi"||Di(e)}function Gi(e){return e==="none"}function Uv(e){return Gi(e)}function _u(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 Qr(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 Hv(e){const t=Qr(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 ji="light-dark()",qv=["color","background-color"];function Wv(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 Vv(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?Wv(r,o):r})):e}function Kv(e,t,n,s,r="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},i=t.map(u=>Er(e.variants[u])),l=new Set(i.flatMap(u=>Object.keys(u))),a={},c=(u,d)=>{const g=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[u]+(d==="color"?"":g)};return i.forEach((u,d)=>{for(const g of l){const p=u[g]||"inherit";if(d===0&&s&&qv.includes(g))if(s===ji&&i.length>1){const f=t.findIndex(S=>S==="light"),m=t.findIndex(S=>S==="dark");if(f===-1||m===-1)throw new Qe('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const k=i[f][g]||"inherit",v=i[m][g]||"inherit";a[g]=`light-dark(${k}, ${v})`,r==="css-vars"&&(a[c(d,g)]=p)}else a[g]=p;else r==="css-vars"&&(a[c(d,g)]=p)}}),o.htmlStyle=a,o}function Er(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&ut.Italic&&(t["font-style"]="italic"),e.fontStyle&ut.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&ut.Underline&&n.push("underline"),e.fontStyle&ut.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function ni(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const Su=new WeakMap;function eo(e,t){Su.set(e,t)}function Ns(e){return Su.get(e)}class rs{constructor(...t){$(this,"_stacks",{});$(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 rs(Object.fromEntries(Fv(n).map(s=>[s,Jo])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Zv(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Zv(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 Yv(e,t){if(!(e instanceof rs))throw new Qe("Invalid grammar state");return e.getInternalStack(t)}function Jv(){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 Qe(`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 Qe(`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 Qe(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${l.length}`);return{...i,character:a,offset:r.posToIndex(i.line,a)}}};const r=Hv(n.source),o=(n.options.decorations||[]).map(i=>({...i,start:s(i.start),end:s(i.end)}));Xv(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 Vv(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(d=>d.type==="element"&&d.tagName==="span");if(r.length!==s.converter.lines.length)throw new Qe(`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(d,g,p,f){const m=r[d];let k="",v=-1,S=-1;if(g===0&&(v=0),p===0&&(S=0),p===Number.POSITIVE_INFINITY&&(S=m.children.length),v===-1||S===-1)for(let w=0;w<m.children.length;w++)k+=xu(m.children[w]),v===-1&&k.length===g&&(v=w+1),S===-1&&k.length===p&&(S=w+1);if(v===-1)throw new Qe(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);if(S===-1)throw new Qe(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);const T=m.children.slice(v,S);if(!f.alwaysWrap&&T.length===m.children.length)l(m,f,"line");else if(!f.alwaysWrap&&T.length===1&&T[0].type==="element")l(T[0],f,"token");else{const w={type:"element",tagName:"span",properties:{},children:T};l(w,f,"wrapper"),m.children.splice(v,T.length,w)}}function i(d,g){r[d]=l(r[d],g,"line")}function l(d,g,p){var k;const f=g.properties||{},m=g.transform||(v=>v);return d.tagName=g.tagName||"span",d.properties={...d.properties,...f,class:d.properties.class},(k=g.properties)!=null&&k.class&&_u(d,g.properties.class),d=m(d,p)||d,d}const a=[],c=s.decorations.sort((d,g)=>g.start.offset-d.start.offset||d.end.offset-g.end.offset);for(const d of c){const{start:g,end:p}=d;if(g.line===p.line)o(g.line,g.character,p.character,d);else if(g.line<p.line){o(g.line,g.character,Number.POSITIVE_INFINITY,d);for(let f=g.line+1;f<p.line;f++)a.unshift(()=>i(f,d));o(p.line,0,p.character,d)}}a.forEach(d=>d())}}}function Xv(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Qe(`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 Qe(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(r.start)} intersect.`)}}}}function xu(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(xu).join(""):""}const Qv=[Jv()];function Ir(e){const t=ey(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Qv]}function ey(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 Pn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],xo={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function ty(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 ra(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 ny(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)xo[s]&&t.push({type:"setDecoration",value:xo[s]});else if(s<=29){const r=xo[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:Pn[s-30]}});else if(s===38){const r=ra(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:Pn[s-40]}});else if(s===48){const r=ra(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:Pn[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Pn[s-100+8]}})}return t}function sy(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let o=0;do{const i=ty(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=ny(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 ry={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 oy(e=ry){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<Pn.length;c++)s.push(t(Pn[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 d=0;d<6;d++)s.push(n([l[c],l[u],l[d]]));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 iy={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 ly(e,t,n){const s=Rr(e,n),r=Qr(t),o=Object.fromEntries(Pn.map(a=>{var d;const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=(d=e.colors)==null?void 0:d[c];return[a,u||iy[a]]})),i=oy(o),l=sy();return r.map(a=>l.parse(a[0]).map(c=>{let u,d;c.decorations.has("reverse")?(u=c.background?i.value(c.background):e.bg,d=c.foreground?i.value(c.foreground):e.fg):(u=c.foreground?i.value(c.foreground):e.fg,d=c.background?i.value(c.background):void 0),u=Sn(u,s),d=Sn(d,s),c.decorations.has("dim")&&(u=ay(u));let g=ut.None;return c.decorations.has("bold")&&(g|=ut.Bold),c.decorations.has("italic")&&(g|=ut.Italic),c.decorations.has("underline")&&(g|=ut.Underline),c.decorations.has("strikethrough")&&(g|=ut.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:d,fontStyle:g}}))}function ay(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 Fi(e,t,n={}){const{theme:s=e.getLoadedThemes()[0]}=n,r=e.resolveLangAlias(n.lang||"text");if(Di(r)||Gi(s))return Qr(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:i}=e.setTheme(s);if(r==="ansi")return ly(o,t,n);const l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new Qe(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new Qe(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return uy(t,l,o,i,n)}function cy(...e){if(e.length===2)return Ns(e[1]);const[t,n,s={}]=e,{lang:r="text",theme:o=t.getLoadedThemes()[0]}=s;if(Di(r)||Gi(o))throw new Qe("Plain language does not have grammar state");if(r==="ansi")throw new Qe("ANSI language does not have grammar state");const{theme:i,colorMap:l}=t.setTheme(o),a=t.getLanguage(r);return new rs(zi(n,a,i,l,s).stateStack,a.name,i.name)}function uy(e,t,n,s,r){const o=zi(e,t,n,s,r),i=new rs(o.stateStack,t.name,n.name);return eo(o.tokens,i),o.tokens}function zi(e,t,n,s,r){const o=Rr(n,r),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:l=500}=r,a=Qr(e);let c=r.grammarState?Yv(r.grammarState,n.name)??Jo:r.grammarContextCode!=null?zi(r.grammarContextCode,t,n,s,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Jo,u=[];const d=[];for(let g=0,p=a.length;g<p;g++){const[f,m]=a[g];if(f===""){u=[],d.push([]);continue}if(i>0&&f.length>=i){u=[],d.push([{content:f,offset:m,color:"",fontStyle:0}]);continue}let k,v,S;r.includeExplanation&&(k=t.tokenizeLine(f,c,l),v=k.tokens,S=0);const T=t.tokenizeLine2(f,c,l),w=T.tokens.length/2;for(let P=0;P<w;P++){const K=T.tokens[2*P],D=P+1<w?T.tokens[2*P+2]:f.length;if(K===D)continue;const ue=T.tokens[2*P+1],q=Sn(s[ns.getForeground(ue)],o),ee=ns.getFontStyle(ue),he={content:f.substring(K,D),offset:m+K,color:q,fontStyle:ee};if(r.includeExplanation){const j=[];if(r.includeExplanation!=="scopeName")for(const M of n.settings){let A;switch(typeof M.scope){case"string":A=M.scope.split(/,/).map(Y=>Y.trim());break;case"object":A=M.scope;break;default:continue}j.push({settings:M,selectors:A.map(Y=>Y.split(/ /))})}he.explanation=[];let pe=0;for(;K+pe<D;){const M=v[S],A=f.substring(M.startIndex,M.endIndex);pe+=A.length,he.explanation.push({content:A,scopes:r.includeExplanation==="scopeName"?fy(M.scopes):dy(j,M.scopes)}),S+=1}}u.push(he)}d.push(u),u=[],c=T.ruleStack}return{tokens:d,stateStack:c}}function fy(e){return e.map(t=>({scopeName:t}))}function dy(e,t){const n=[];for(let s=0,r=t.length;s<r;s++){const o=t[s];n[s]={scopeName:o,themeMatches:py(e,o,t.slice(0,s))}}return n}function oa(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function hy(e,t,n){if(!oa(e[e.length-1],t))return!1;let s=e.length-2,r=n.length-1;for(;s>=0&&r>=0;)oa(e[s],n[r])&&(s-=1),r-=1;return s===-1}function py(e,t,n){const s=[];for(const{selectors:r,settings:o}of e)for(const i of r)if(hy(i,t,n)){s.push(o);break}return s}function Cu(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=Fi(e,t,{...n,theme:a.theme}),u=Ns(c),d=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:d}}),o=gy(...r.map(a=>a.tokens)),i=o[0].map((a,c)=>a.map((u,d)=>{const g={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=u.explanation),o.forEach((p,f)=>{const{content:m,explanation:k,offset:v,...S}=p[c][d];g.variants[s[f].color]=S}),g})),l=r[0].state?new rs(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&&eo(i,l),i}function gy(...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 Lr(e,t,n){let s,r,o,i,l,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=n,g=Object.entries(n.themes).filter(v=>v[1]).map(v=>({color:v[0],theme:v[1]})).sort((v,S)=>v.color===c?-1:S.color===c?1:0);if(g.length===0)throw new Qe("`themes` option must not be empty");const p=Cu(e,t,n);if(a=Ns(p),c&&ji!==c&&!g.find(v=>v.color===c))throw new Qe(`\`themes\` option must contain the defaultColor key \`${c}\``);const f=g.map(v=>e.getTheme(v.theme)),m=g.map(v=>v.color);o=p.map(v=>v.map(S=>Kv(S,m,u,c,d))),a&&eo(o,a);const k=g.map(v=>Rr(v.theme,n));r=ia(g,f,k,u,c,"fg",d),s=ia(g,f,k,u,c,"bg",d),i=`shiki-themes ${f.map(v=>v.name).join(" ")}`,l=c?void 0:[r,s].join(";")}else if("theme"in n){const c=Rr(n.theme,n);o=Fi(e,t,n);const u=e.getTheme(n.theme);s=Sn(u.bg,c),r=Sn(u.fg,c),i=u.name,a=Ns(o)}else throw new Qe("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:r,bg:s,themeName:i,rootStyle:l,grammarState:a}}function ia(e,t,n,s,r,o,i){return e.map((l,a)=>{const c=Sn(t[a][o],n[a])||"inherit",u=`${s+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&r){if(r===ji&&e.length>1){const d=e.findIndex(m=>m.color==="light"),g=e.findIndex(m=>m.color==="dark");if(d===-1||g===-1)throw new Qe('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const p=Sn(t[d][o],n[d])||"inherit",f=Sn(t[g][o],n[g])||"inherit";return`light-dark(${p}, ${f});${u}`}return c}return i==="css-vars"?u:null}).filter(l=>!!l).join(";")}function Pr(e,t,n,s={meta:{},options:n,codeToHast:(r,o)=>Pr(e,r,o),codeToTokens:(r,o)=>Lr(e,r,o)}){var f,m;let r=t;for(const k of Ir(n))r=((f=k.preprocess)==null?void 0:f.call(s,r,n))||r;let{tokens:o,fg:i,bg:l,themeName:a,rootStyle:c,grammarState:u}=Lr(e,r,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:g=!1}=n;d===!0?o=vy(o):d==="never"&&(o=yy(o)),g&&(o=by(o));const p={...s,get source(){return r}};for(const k of Ir(n))o=((m=k.tokens)==null?void 0:m.call(p,o))||o;return my(o,{...n,fg:i,bg:l,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},p,u)}function my(e,t,n,s=Ns(e)){var m,k,v,S;const r=Ir(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[T,w]of Object.entries(t.meta||{}))T.startsWith("_")||(c[T]=w);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:o};const g=[],p={...n,structure:l,addClassToHast:_u,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return i},get pre(){return u},get code(){return d},get lines(){return g}};if(e.forEach((T,w)=>{var D,ue;w&&(l==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
84
+ `}));let P={type:"element",tagName:"span",properties:{class:"line"},children:[]},K=0;for(const q of T){let ee={type:"element",tagName:"span",properties:{...q.htmlAttrs},children:[{type:"text",value:q.content}]};const he=ni(q.htmlStyle||Er(q));he&&(ee.properties.style=he);for(const j of r)ee=((D=j==null?void 0:j.span)==null?void 0:D.call(p,ee,w+1,K,P,q))||ee;l==="inline"?i.children.push(ee):l==="classic"&&P.children.push(ee),K+=q.content.length}if(l==="classic"){for(const q of r)P=((ue=q==null?void 0:q.line)==null?void 0:ue.call(p,P,w+1))||P;g.push(P),o.push(P)}else l==="inline"&&g.push(P)}),l==="classic"){for(const T of r)d=((m=T==null?void 0:T.code)==null?void 0:m.call(p,d))||d;u.children.push(d);for(const T of r)u=((k=T==null?void 0:T.pre)==null?void 0:k.call(p,u))||u;i.children.push(u)}else if(l==="inline"){const T=[];let w={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const D of i.children)D.type==="element"&&D.tagName==="br"?(T.push(w),w={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(D.type==="element"||D.type==="text")&&w.children.push(D);T.push(w);let K={type:"element",tagName:"code",properties:{},children:T};for(const D of r)K=((v=D==null?void 0:D.code)==null?void 0:v.call(p,K))||K;i.children=[];for(let D=0;D<K.children.length;D++){D>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});const ue=K.children[D];ue.type==="element"&&i.children.push(...ue.children)}}let f=i;for(const T of r)f=((S=T==null?void 0:T.root)==null?void 0:S.call(p,f))||f;return s&&eo(f,s),f}function vy(e){return e.map(t=>{const n=[];let s="",r;return t.forEach((o,i)=>{const a=!(o.fontStyle&&(o.fontStyle&ut.Underline||o.fontStyle&ut.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 yy(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 by(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=ni(r.htmlStyle||Er(r)),i=ni(s.htmlStyle||Er(s)),l=r.fontStyle&&(r.fontStyle&ut.Underline||r.fontStyle&ut.Strikethrough),a=s.fontStyle&&(s.fontStyle&ut.Underline||s.fontStyle&ut.Strikethrough);!l&&!a&&o===i?r.content+=s.content:n.push({...s})}return n})}const ky=Dv;function wy(e,t,n){var o;const s={meta:{},options:n,codeToHast:(i,l)=>Pr(e,i,l),codeToTokens:(i,l)=>Lr(e,i,l)};let r=ky(Pr(e,t,n,s));for(const i of Ir(n))r=((o=i.postprocess)==null?void 0:o.call(s,r,n))||r;return r}const la={light:"#333333",dark:"#bbbbbb"},aa={light:"#fffffe",dark:"#1e1e1e"},ca="__shiki_resolved";function Ui(e){var l,a,c,u,d;if(e!=null&&e[ca])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"?la.light:la.dark),n||(n=t.type==="light"?aa.light:aa.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 f;if(o.has(g))return o.get(g);r+=1;const p=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return(f=t.colorReplacements)!=null&&f[`#${p}`]?i(g):(o.set(g,p),p)}t.settings=t.settings.map(g=>{var k,v;const p=((k=g.settings)==null?void 0:k.foreground)&&!g.settings.foreground.startsWith("#"),f=((v=g.settings)==null?void 0:v.background)&&!g.settings.background.startsWith("#");if(!p&&!f)return g;const m={...g,settings:{...g.settings}};if(p){const S=i(g.settings.foreground);t.colorReplacements[S]=g.settings.foreground,m.settings.foreground=S}if(f){const S=i(g.settings.background);t.colorReplacements[S]=g.settings.background,m.settings.background=S}return m});for(const g of Object.keys(t.colors||{}))if((g==="editor.foreground"||g==="editor.background"||g.startsWith("terminal.ansi"))&&!((d=t.colors[g])!=null&&d.startsWith("#"))){const p=i(t.colors[g]);t.colorReplacements[p]=t.colors[g],t.colors[g]=p}return Object.defineProperty(t,ca,{enumerable:!1,writable:!1,value:!0}),t}async function Tu(e){return Array.from(new Set((await Promise.all(e.filter(t=>!zv(t)).map(async t=>await wu(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function $u(e){return(await Promise.all(e.map(async n=>Uv(n)?null:Ui(await wu(n))))).filter(n=>!!n)}let _y=3;function Sy(e,t=3){t>_y||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let qn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Au(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 qn(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class xy extends xm{constructor(n,s,r,o={}){super(n);$(this,"_resolvedThemes",new Map);$(this,"_resolvedGrammars",new Map);$(this,"_langMap",new Map);$(this,"_langGraph",new Map);$(this,"_textmateThemeCache",new WeakMap);$(this,"_loadedThemesCache",null);$(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=Ui(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=xr.createFromRawTheme(n),this._textmateThemeCache.set(n,s)),this._syncRegistry.setTheme(s)}getGrammar(n){return n=Au(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 d;return(d=u.embeddedLangsLazy)==null?void 0:d.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 qn(`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 Cy{constructor(t,n){$(this,"_langs",new Map);$(this,"_scopeToLang",new Map);$(this,"_injections",new Map);$(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 us=0;function Ty(e){us+=1,e.warnings!==!1&&us>=10&&us%10===0&&console.warn(`[Shiki] ${us} 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 qn("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),s=(e.themes||[]).flat(1).map(Ui),r=new Cy(e.engine,n),o=new xy(r,s,n,e.langAlias);let i;function l(T){return Au(T,e.langAlias)}function a(T){v();const w=o.getGrammar(typeof T=="string"?T:T.name);if(!w)throw new qn(`Language \`${T}\` not found, you may need to load it first`);return w}function c(T){if(T==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};v();const w=o.getTheme(T);if(!w)throw new qn(`Theme \`${T}\` not found, you may need to load it first`);return w}function u(T){v();const w=c(T);i!==T&&(o.setTheme(w),i=T);const P=o.getColorMap();return{theme:w,colorMap:P}}function d(){return v(),o.getLoadedThemes()}function g(){return v(),o.getLoadedLanguages()}function p(...T){v(),o.loadLanguages(T.flat(1))}async function f(...T){return p(await Tu(T))}function m(...T){v();for(const w of T.flat(1))o.loadTheme(w)}async function k(...T){return v(),m(await $u(T))}function v(){if(t)throw new qn("Shiki instance has been disposed")}function S(){t||(t=!0,o.dispose(),us-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:d,getLoadedLanguages:g,resolveLangAlias:l,loadLanguage:f,loadLanguageSync:p,loadTheme:k,loadThemeSync:m,dispose:S,[Symbol.dispose]:S}}async function $y(e){e.engine||Sy("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,s]=await Promise.all([$u(e.themes||[]),Tu(e.langs||[]),e.engine]);return Ty({...e,themes:t,langs:n,engine:s})}async function Ay(e){const t=await $y(e);return{getLastGrammarState:(...n)=>cy(t,...n),codeToTokensBase:(n,s)=>Fi(t,n,s),codeToTokensWithThemes:(n,s)=>Cu(t,n,s),codeToTokens:(n,s)=>Lr(t,n,s),codeToHast:(n,s)=>Pr(t,n,s),codeToHtml:(n,s)=>wy(t,n,s),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}class Hi extends Error{constructor(t){super(t),this.name="ShikiError"}}function Ry(){return 2147483648}function Ey(){return typeof performance<"u"?performance.now():Date.now()}const Iy=(e,t)=>e+(t-e%t)%t;async function Ly(e){let t,n;const s={};function r(p){n=p,s.HEAPU8=new Uint8Array(p),s.HEAPU32=new Uint32Array(p)}function o(p,f,m){s.HEAPU8.copyWithin(p,f,f+m)}function i(p){try{return t.grow(p-n.byteLength+65535>>>16),r(t.buffer),1}catch{}}function l(p){const f=s.HEAPU8.length;p=p>>>0;const m=Ry();if(p>m)return!1;for(let k=1;k<=4;k*=2){let v=f*(1+.2/k);v=Math.min(v,p+100663296);const S=Math.min(m,Iy(Math.max(p,v),65536));if(i(S))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(p,f,m=1024){const k=f+m;let v=f;for(;p[v]&&!(v>=k);)++v;if(v-f>16&&p.buffer&&a)return a.decode(p.subarray(f,v));let S="";for(;f<v;){let T=p[f++];if(!(T&128)){S+=String.fromCharCode(T);continue}const w=p[f++]&63;if((T&224)===192){S+=String.fromCharCode((T&31)<<6|w);continue}const P=p[f++]&63;if((T&240)===224?T=(T&15)<<12|w<<6|P:T=(T&7)<<18|w<<12|P<<6|p[f++]&63,T<65536)S+=String.fromCharCode(T);else{const K=T-65536;S+=String.fromCharCode(55296|K>>10,56320|K&1023)}}return S}function u(p,f){return p?c(s.HEAPU8,p,f):""}const d={emscripten_get_now:Ey,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function g(){const f=await e({env:d,wasi_snapshot_preview1:d});t=f.memory,r(t.buffer),Object.assign(s,f),s.UTF8ToString=u}return await g(),s}var Py=Object.defineProperty,My=(e,t,n)=>t in e?Py(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ze=(e,t,n)=>My(e,typeof t!="symbol"?t+"":t,n);let Xe=null;function Ny(e){throw new Hi(e.UTF8ToString(e.getLastOnigError()))}class to{constructor(t){Ze(this,"utf16Length"),Ze(this,"utf8Length"),Ze(this,"utf16Value"),Ze(this,"utf8Value"),Ze(this,"utf16OffsetToUtf8"),Ze(this,"utf8OffsetToUtf16");const n=t.length,s=to._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 d=u,g=!1;if(u>=55296&&u<=56319&&c+1<n){const p=t.charCodeAt(c+1);p>=56320&&p<=57343&&(d=(u-55296<<10)+65536|p-56320,g=!0)}r&&(o[c]=a,g&&(o[c+1]=a),d<=127?i[a+0]=c:d<=2047?(i[a+0]=c,i[a+1]=c):d<=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)),d<=127?l[a++]=d:d<=2047?(l[a++]=192|(d&1984)>>>6,l[a++]=128|(d&63)>>>0):d<=65535?(l[a++]=224|(d&61440)>>>12,l[a++]=128|(d&4032)>>>6,l[a++]=128|(d&63)>>>0):(l[a++]=240|(d&1835008)>>>18,l[a++]=128|(d&258048)>>>12,l[a++]=128|(d&4032)>>>6,l[a++]=128|(d&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 no=class Vt{constructor(t){if(Ze(this,"id",++Vt.LAST_ID),Ze(this,"_onigBinding"),Ze(this,"content"),Ze(this,"utf16Length"),Ze(this,"utf8Length"),Ze(this,"utf16OffsetToUtf8"),Ze(this,"utf8OffsetToUtf16"),Ze(this,"ptr"),!Xe)throw new Hi("Must invoke loadWasm first.");this._onigBinding=Xe,this.content=t;const n=new to(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Vt._sharedPtrInUse?(Vt._sharedPtr||(Vt._sharedPtr=Xe.omalloc(1e4)),Vt._sharedPtrInUse=!0,Xe.HEAPU8.set(n.utf8Value,Vt._sharedPtr),this.ptr=Vt._sharedPtr):this.ptr=n.createString(Xe)}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===Vt._sharedPtr?Vt._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Ze(no,"LAST_ID",0);Ze(no,"_sharedPtr",0);Ze(no,"_sharedPtrInUse",!1);let Ru=no;class Oy{constructor(t){if(Ze(this,"_onigBinding"),Ze(this,"_ptr"),!Xe)throw new Hi("Must invoke loadWasm first.");const n=[],s=[];for(let l=0,a=t.length;l<a;l++){const c=new to(t[l]);n[l]=c.createString(Xe),s[l]=c.utf8Length}const r=Xe.omalloc(4*t.length);Xe.HEAPU32.set(n,r/4);const o=Xe.omalloc(4*t.length);Xe.HEAPU32.set(s,o/4);const i=Xe.createOnigScanner(r,o,t.length);for(let l=0,a=t.length;l<a;l++)Xe.ofree(n[l]);Xe.ofree(o),Xe.ofree(r),i===0&&Ny(Xe),this._onigBinding=Xe,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 Ru(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++],d=[];for(let g=0;g<u;g++){const p=t.convertUtf8OffsetToUtf16(l[a++]),f=t.convertUtf8OffsetToUtf16(l[a++]);d[g]={start:p,end:f,length:f-p}}return{index:c,captureIndices:d}}}function By(e){return typeof e.instantiator=="function"}function Dy(e){return typeof e.default=="function"}function Gy(e){return typeof e.data<"u"}function jy(e){return typeof Response<"u"&&e instanceof Response}function Fy(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 nr;function zy(e){if(nr)return nr;async function t(){Xe=await Ly(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):Dy(s)?s=await s.default(n):(Gy(s)&&(s=s.data),jy(s)?typeof WebAssembly.instantiateStreaming=="function"?s=await Uy(s)(n):s=await Hy(s)(n):Fy(s)?s=await Co(s)(n):s instanceof WebAssembly.Module?s=await Co(s)(n):"default"in s&&s.default instanceof WebAssembly.Module&&(s=await Co(s.default)(n))),"instance"in s&&(s=s.instance),"exports"in s&&(s=s.exports),s})}return nr=t(),nr}function Co(e){return t=>WebAssembly.instantiate(e,t)}function Uy(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Hy(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function qy(e){return e&&await zy(e),{createScanner(t){return new Oy(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Ru(t)}}}const Wy={class:"code-block"},Vy={class:"code-header"},Ky={class:"code-lang"},Zy=["innerHTML"],Yy=xe({__name:"CodeBlock",props:{code:{},lang:{},streaming:{type:Boolean}},setup(e){const t=e,n=Nt("effectiveTheme",H(typeof document<"u"&&document.documentElement.dataset.theme==="dark"?"dark":"light")),s=H(""),r=H(""),o=H(!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[k,v]=await Promise.all([Xs(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url),Xs(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url)]);return i=await Ay({themes:[k.default,v.default],langs:[],engine:qy(()=>Xs(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url))}),i}async function d(k){if(l.has(k))return!0;if(a.has(k))return await a.get(k),l.has(k);const v=(async()=>{try{const S=await u(),T=await Xs(()=>import(`shiki/langs/${k}.mjs`),[],import.meta.url);await S.loadLanguage(T.default),l.add(k)}catch{}})();return a.set(k,v),await v,a.delete(k),l.has(k)}function g(k){const v=k.toLowerCase();return c[v]??v}async function p(){var T;const k=((T=t.lang)==null?void 0:T.toLowerCase())??"text",v=g(k),S=n.value==="light"?"github-light":"github-dark";try{const w=await u();await d(v)?s.value=w.codeToHtml(t.code,{lang:v,theme:S}):s.value=`<pre class="shiki-fallback"><code>${f(t.code)}</code></pre>`}catch{s.value=`<pre class="shiki-fallback"><code>${f(t.code)}</code></pre>`}}function f(k){return k.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")}function m(){navigator.clipboard.writeText(t.code).then(()=>{o.value=!0,setTimeout(()=>o.value=!1,1500)})}return Ne(()=>[t.code,t.lang,n.value],([k])=>{t.streaming?r.value=`<pre class="shiki-fallback"><code>${f(k)}</code></pre>`:p()},{immediate:!0}),Ne(()=>t.streaming,(k,v)=>{v&&!k&&p()}),(k,v)=>(b(),x("div",Wy,[h("div",Vy,[h("span",Ky,E(e.lang||"text"),1),h("button",{class:"code-copy",onClick:m},E(o.value?"已复制":"复制"),1)]),h("div",{class:"code-content",innerHTML:t.streaming?r.value:s.value||r.value},null,8,Zy)]))}}),Jy=Ce(Yy,[["__scopeId","data-v-95a13158"]]);Ae.setOptions({gfm:!0,breaks:!1});const Xy=xe({props:{content:{type:String,required:!0},streaming:{type:Boolean,default:!1}},setup(e){const t=H(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=Q(()=>{const r=Qy(t.value);return Ae.lexer(r).flatMap(i=>si(i,e.streaming))});return()=>$e("div",{class:"markdown-body"},s.value)}});function Qy(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 si(e,t=!1){switch(e.type){case"paragraph":return[$e("p",{class:"md-p"},un(e.tokens))];case"heading":return[$e(`h${e.depth}`,{class:`md-h${e.depth}`},un(e.tokens))];case"code":return[$e(Jy,{code:e.text,lang:e.lang??"text",streaming:t})];case"blockquote":return[$e("blockquote",{class:"md-blockquote"},e.tokens.flatMap(n=>si(n,t)))];case"list":{const n=e.items.map(s=>{const r=[];return s.task&&r.push($e("input",{type:"checkbox",checked:s.checked,disabled:!0,class:"md-checkbox"})),r.push(...s.tokens.flatMap(o=>si(o,t))),$e("li",{class:["md-li",s.task?"md-task":""]},r)});return[$e(e.ordered?"ol":"ul",{class:e.ordered?"md-ol":"md-ul"},n)]}case"hr":return[$e("hr",{class:"md-hr"})];case"space":return[];case"html":return[$e("div",{class:"md-html",innerHTML:e.text})];case"table":return[$e("div",{class:"md-table-wrap",style:"overflow-x:auto"},[eb(e)])];case"br":return[$e("br")];case"text":return[$e("span",{class:"md-text"},e.tokens?un(e.tokens):e.text)];case"def":return[];default:return[$e("p",{class:"md-p"},e.raw??"")]}}function eb(e){const t=e,n=(t.header??[]).map((r,o)=>{var l;const i=(l=t.align)==null?void 0:l[o];return $e("th",{class:"md-th",style:i?`text-align:${i}`:""},r.tokens?un(r.tokens):String(r.text??""))}),s=(t.rows??[]).map(r=>$e("tr",{},r.map((o,i)=>{var a;const l=(a=t.align)==null?void 0:a[i];return $e("td",{class:"md-td",style:l?`text-align:${l}`:""},o.tokens?un(o.tokens):String(o.text??""))})));return $e("table",{class:"md-table"},[$e("thead",{},[$e("tr",{},n)]),$e("tbody",{},s)])}function un(e){return e.map(t=>{switch(t.type){case"text":return t.text;case"codespan":return $e("code",{class:"md-code"},t.text);case"strong":return $e("strong",{class:"md-strong"},un(t.tokens));case"em":return $e("em",{class:"md-em"},un(t.tokens));case"del":return $e("del",{class:"md-del"},un(t.tokens));case"link":{const n=t.href;return n&&!/^(https?:|mailto:|#|\/)/i.test(n)?t.raw??"":$e("a",{class:"md-a",href:n,target:"_blank",rel:"noopener"},un(t.tokens))}case"image":return $e("img",{class:"md-img",src:t.href,alt:t.text??"",loading:"lazy"});case"br":return $e("br");case"html":return $e("span",{innerHTML:t.text});case"escape":return t.text;default:return t.raw??""}})}const tb=Ce(Xy,[["__scopeId","data-v-fbbbffca"]]),nb=new Set(["edit","str_replace","replace","write","multi_edit","create_file","edit_file","apply_patch"]);function sb(e){return nb.has(e.toLowerCase())}function ua(e){return e.suspended?"suspended":e.isError?"error":e.output===void 0?"running":"ok"}function rb(e){return e.some(t=>ua(t)==="running")?"running":e.some(t=>ua(t)==="error")?"error":"ok"}const ob=["onKeydown"],ib={class:"tool-name"},lb=["title"],ab={class:"tool-collapse-inner"},cb={class:"tool-body"},ub={key:0,class:"tool-args"},fb={key:1,class:"tool-result"},db={key:2,class:"tool-running-hint"},hb=xe({__name:"GenericToolCard",props:{tool:{}},setup(e){const t=e,n=Q(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=Q(()=>{switch(n.value){case"ok":return"✓";case"error":return"✗";default:return""}}),r=H(!1);let o=!1;Ne(n,u=>{o||(r.value=u==="running")},{immediate:!0});function i(){o=!0,r.value=!r.value}const l=Q(()=>{const u=t.tool.args;if(!u||typeof u!="object")return u===void 0?"":String(u);const d=[];for(const[g,p]of Object.entries(u)){let f;if(typeof p=="string")f=p.length>40?`${p.slice(0,40)}…`:p;else{try{f=JSON.stringify(p)}catch{f=String(p)}f.length>40&&(f=`${f.slice(0,40)}…`)}if(d.push(`${g}=${f}`),d.length>=3)break}return d.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,d)=>(b(),x("div",{class:be(["tool-card",`is-${n.value}`])},[h("div",{class:"tool-header",role:"button",tabindex:"0",onClick:i,onKeydown:Es(zt(i,["prevent"]),["enter"])},[h("span",{class:be(["status-dot",n.value])},[s.value?(b(),x(re,{key:0},[Ie(E(s.value),1)],64)):Z("",!0)],2),h("span",ib,E(e.tool.name),1),l.value?(b(),x("span",{key:0,class:"tool-params",title:l.value},E(l.value),9,lb)):Z("",!0),h("span",{class:be(["tool-chevron",{open:r.value}])},"▸",2)],40,ob),h("div",{class:be(["tool-collapse",{open:r.value}])},[h("div",ab,[h("div",cb,[a()?(b(),x("pre",ub,[h("code",null,E(a()),1)])):Z("",!0),e.tool.output!==void 0?(b(),x("pre",fb,[h("code",null,E(c(e.tool.output)||"(无输出)"),1)])):(b(),x("div",db,"执行中…"))])])],2)],2))}}),pb=Ce(hb,[["__scopeId","data-v-5d0f42c5"]]),gb=500;function mb(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 vb(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 yb(e,t){const n=e.split(`
85
+ `),s=t.split(`
86
+ `);if(n.length+s.length>gb){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=mb(n,s);return vb(r,n,s,n.length,s.length)}function bb(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 kb=["old_string","oldString","old_str","old_text","oldText","old","search"],wb=["new_string","newString","new_str","new_text","newText","new","replace","content"],_b=["path","file_path","filePath","file","filename"];function To(e,t){for(const n of t){const s=e[n];if(typeof s=="string"&&s.length>0)return s}}function Sb(e){if(!e||typeof e!="object")return null;const t=e,n=To(t,_b),s=To(t,kb),r=To(t,wb);if(!r&&!s)return null;const o=yb(s??"",r??""),i=bb(o);return{path:n,diff:o,stats:i}}const xb={class:"diff-lines"},Cb={class:"dl-gutter old"},Tb={class:"dl-gutter new"},$b={class:"dl-sign"},Ab={class:"dl-text"},Rb=xe({__name:"DiffLines",props:{lines:{}},setup(e){return(t,n)=>(b(),x("div",xb,[(b(!0),x(re,null,Ve(e.lines,(s,r)=>(b(),x("div",{key:r,class:be(["dl",`dl-${s.type}`])},[h("span",Cb,E(s.oldNo??""),1),h("span",Tb,E(s.newNo??""),1),h("span",$b,E(s.type==="add"?"+":s.type==="del"?"−":" "),1),h("span",Ab,E(s.text),1)],2))),128))]))}}),Eb=Ce(Rb,[["__scopeId","data-v-147edc06"]]),Ib=["onKeydown"],Lb={class:"tool-name"},Pb=["title"],Mb={key:1,class:"diff-chip"},Nb={class:"tool-collapse-inner"},Ob={class:"tool-body"},Bb={key:1,class:"tool-result"},Db={key:2,class:"tool-running-hint"},Gb=xe({__name:"EditToolCard",props:{tool:{}},setup(e){const t=e,n=Q(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=Q(()=>{switch(n.value){case"ok":return"✓";case"error":return"✗";default:return""}}),r=Q(()=>Sb(t.tool.args)),o=Q(()=>{const g=r.value;if(!g||n.value==="error")return"";const{added:p,removed:f}=g.stats;return!p&&!f?"":`+${p} −${f}`}),i=Q(()=>{var g;return(g=r.value)==null?void 0:g.path}),l=H(!1);let a=!1;Ne(n,g=>{a||(l.value=g==="running")},{immediate:!0});function c(){a=!0,l.value=!l.value}const u=Q(()=>{var g;return((g=r.value)==null?void 0:g.diff)??[]}),d=Q(()=>u.value.length>0);return(g,p)=>(b(),x("div",{class:be(["tool-card",`is-${n.value}`,"edit-tool-card"])},[h("div",{class:"tool-header",role:"button",tabindex:"0",onClick:c,onKeydown:Es(zt(c,["prevent"]),["enter"])},[h("span",{class:be(["status-dot",n.value])},[s.value?(b(),x(re,{key:0},[Ie(E(s.value),1)],64)):Z("",!0)],2),h("span",Lb,E(e.tool.name),1),i.value?(b(),x("span",{key:0,class:"tool-filepath",title:i.value},E(i.value),9,Pb)):Z("",!0),o.value?(b(),x("span",Mb,E(o.value),1)):Z("",!0),h("span",{class:be(["tool-chevron",{open:l.value}])},"▸",2)],40,Ib),h("div",{class:be(["tool-collapse",{open:l.value}])},[h("div",Nb,[h("div",Ob,[d.value?(b(),Ue(Eb,{key:0,lines:u.value},null,8,["lines"])):Z("",!0),e.tool.output!==void 0?(b(),x("pre",Bb,[h("code",null,E(e.tool.output||"(无输出)"),1)])):(b(),x("div",Db,"执行中…"))])])],2)],2))}}),jb=Ce(Gb,[["__scopeId","data-v-95ab1624"]]),Fb=["aria-expanded"],zb={class:"process-copy"},Ub=["title"],Hb={class:"count"},qb={class:"process-collapse"},Wb={class:"process-inner"},Vb=xe({__name:"ToolGroup",props:{name:{},tools:{}},setup(e){const t=e,n=H(!1),s=H(!1),r=Q(()=>rb(t.tools)),o=Q(()=>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)=>(b(),x("section",{class:be(["tool-process",{open:n.value,error:r.value==="error"}])},[h("button",{class:"process-head",type:"button","aria-expanded":n.value,onClick:i},[h("span",{class:be(["process-icon",r.value])},[V(ge,{name:r.value==="ok"?"check":"terminal",size:18},null,8,["name"])],2),h("span",zb,[a[0]||(a[0]=h("strong",null,"工具调用过程",-1)),h("small",null,E(r.value==="running"?"正在执行":r.value==="error"?"包含失败调用":`已完成 ${o.value} 项`),1)]),h("span",{class:"tool-names",title:e.tools.map(c=>c.name).join("、")},E(e.tools.map(c=>c.name).join(" · ")),9,Ub),h("span",Hb,E(e.tools.length),1),V(ge,{name:"chevron-down",size:17,class:"chevron"})],8,Fb),h("div",qb,[h("div",Wb,[(b(!0),x(re,null,Ve(e.tools,c=>(b(),Ue(Qf(X(sb)(c.name)?jb:pb),{key:c.toolCallId,tool:c},null,8,["tool"]))),128))])])],2))}}),Kb=Ce(Vb,[["__scopeId","data-v-a044c3b3"]]),Zb={class:"thinking-block"},Yb={class:"teaser-text"},Jb={key:1,class:"thinking-stream"},Xb={class:"thinking-panel",role:"dialog","aria-label":"思考过程"},Qb={class:"panel-body"},e1=xe({__name:"ThinkingBlock",props:{tool:{},active:{type:Boolean,default:!1}},setup(e){const t=e,n=H(!1),s=H(null),r=Q(()=>t.tool.output??""),o=Q(()=>r.value.split(/\n+/).map(c=>c.trim()).filter(Boolean).at(-1)??"");Ne(r,()=>{t.active&&Bt(()=>{const a=s.value;a&&(a.scrollTop=a.scrollHeight)})});function i(){n.value=!0}function l(){n.value=!1}return(a,c)=>(b(),x("div",Zb,[e.active?(b(),x("div",Jb,[c[2]||(c[2]=h("div",{class:"stream-header"},[h("span",{class:"stream-icon"},"💭"),h("span",{class:"stream-title"},"思考中…"),h("span",{class:"stream-dot"})],-1)),h("div",{ref_key:"streamRef",ref:s,class:"stream-body"},E(r.value),513)])):(b(),x("button",{key:0,class:"thinking-teaser",title:"点击查看完整思考过程",onClick:i},[c[0]||(c[0]=h("span",{class:"teaser-icon"},"💭",-1)),h("span",Yb,E(o.value||"思考过程"),1),c[1]||(c[1]=h("span",{class:"teaser-open"},"展开",-1))])),(b(),Ue(mi,{to:"body"},[n.value?(b(),x("div",{key:0,class:"thinking-overlay",onClick:zt(l,["self"])},[h("aside",Xb,[h("header",{class:"panel-header"},[c[3]||(c[3]=h("span",null,"💭 思考过程",-1)),h("button",{class:"panel-close","aria-label":"关闭",onClick:l},"✕")]),h("div",Qb,E(r.value||"(空)"),1)])])):Z("",!0)]))]))}}),t1=Ce(e1,[["__scopeId","data-v-890e0460"]]),n1={key:0,class:"user-wrap"},s1={class:"user-bubble"},r1={class:"message-meta user-meta"},o1={key:0},i1={key:1,class:"assistant-wrap"},l1={key:0,class:"assistant-brand"},a1={class:"assistant-avatar"},c1={key:0},u1={class:"assistant-body"},f1={key:3,class:"streaming-cursor","aria-label":"正在生成"},d1={key:4,class:"message-meta"},h1=["title"],p1=["title"],g1=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=H(!1);let o=null;const i=Q(()=>n.message.role==="user"),l=Q(()=>n.message.role==="assistant"),a=Q(()=>n.message.tools.filter(S=>S.name==="thinking")),c=Q(()=>n.message.tools.filter(S=>S.name!=="thinking")),u=Q(()=>n.message.ts?new Date(n.message.ts).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):""),d=Q(()=>i.value&&n.isLatestUser&&n.idle),g=Nt("showThinking",H(!0)),p=Nt("showTools",H(!0)),f=H(!1);let m=null;function k(){if(typeof window>"u"||!("speechSynthesis"in window))return;if(f.value){window.speechSynthesis.cancel(),f.value=!1,m=null;return}const S=n.message.content;if(!S)return;const T=new SpeechSynthesisUtterance(S);T.lang="zh-CN";const w=()=>{m===w&&(f.value=!1,m=null)};m=w,T.addEventListener("end",w),T.addEventListener("error",w),window.speechSynthesis.cancel(),requestAnimationFrame(()=>{window.speechSynthesis.speak(T)}),f.value=!0}vn(()=>{f.value&&"speechSynthesis"in window&&window.speechSynthesis.cancel()});async function v(){try{await navigator.clipboard.writeText(n.message.content)}catch{const S=document.createElement("textarea");S.value=n.message.content,document.body.append(S),S.select(),document.execCommand("copy"),S.remove()}r.value=!0,o!==null&&clearTimeout(o),o=window.setTimeout(()=>{r.value=!1},1500)}return(S,T)=>(b(),x("article",{class:be(["message",e.message.role,{error:e.message.isError}])},[i.value?(b(),x("div",n1,[h("div",s1,E(e.message.content),1),h("div",r1,[u.value?(b(),x("span",o1,E(u.value),1)):Z("",!0),d.value?(b(),x("button",{key:1,title:"编辑并重新发送",onClick:T[0]||(T[0]=w=>s("edit",e.message.content))},[V(ge,{name:"edit",size:14}),T[3]||(T[3]=Ie("编辑重发",-1))])):Z("",!0)])])):(b(),x("div",i1,[l.value?(b(),x("div",l1,[h("span",a1,[h("img",{src:xi,alt:"",draggable:"false",onError:T[1]||(T[1]=w=>w.target.style.visibility="hidden"),onLoad:T[2]||(T[2]=w=>w.target.style.visibility="visible"),style:{visibility:"hidden"}},null,32)]),h("div",null,[T[4]||(T[4]=h("strong",null,"Scream Code",-1)),h("span",null,[h("i",{class:be({streaming:e.streaming})},null,2),Ie(E(e.streaming?"正在生成回复":"Agent 回复"),1)])]),u.value?(b(),x("time",c1,E(u.value),1)):Z("",!0)])):Z("",!0),h("div",u1,[X(g)?(b(!0),x(re,{key:0},Ve(a.value,w=>(b(),Ue(t1,{key:w.toolCallId,tool:w,active:e.streaming},null,8,["tool","active"]))),128)):Z("",!0),c.value.length&&X(p)?(b(),Ue(Kb,{key:1,name:"工具调用过程",tools:c.value},null,8,["tools"])):Z("",!0),e.message.content?(b(),Ue(tb,{key:2,class:"assistant-content",content:e.message.content,streaming:e.streaming},null,8,["content","streaming"])):e.streaming?(b(),x("span",f1)):Z("",!0),e.message.content?(b(),x("div",d1,[h("button",{title:r.value?"已复制":"复制内容",onClick:v},[V(ge,{name:r.value?"check":"copy",size:14},null,8,["name"]),Ie(E(r.value?"已复制":"复制"),1)],8,h1),h("button",{title:f.value?"停止朗读":"朗读",onClick:k},[V(ge,{name:f.value?"speaker-off":"speaker",size:14},null,8,["name"]),Ie(E(f.value?"停止":"朗读"),1)],8,p1)])):Z("",!0)])]))],2))}}),m1=Ce(g1,[["__scopeId","data-v-cea82a97"]]),v1={class:"empty-state"},y1={class:"suggestions"},b1=["onClick"],k1={class:"suggestion-icon"},w1={class:"suggestion-title"},_1=["title"],S1={class:"workdir-path"},x1=xe({__name:"EmptyState",props:{workDir:{default:null}},emits:["pick"],setup(e,{emit:t}){const n=t,s=[{icon:"edit",title:"帮我写一个函数",prompt:"帮我写一个函数"},{icon:"clipboard",title:"解释这段代码",prompt:"解释这段代码"},{icon:"activity",title:"调试这个问题",prompt:"调试这个问题"}];return(r,o)=>(b(),x("div",v1,[o[1]||(o[1]=h("div",{class:"empty-logo"},[h("img",{src:xi,alt:"Scream",class:"logo-img"})],-1)),o[2]||(o[2]=h("h1",{class:"empty-title"},"Scream Web UI",-1)),o[3]||(o[3]=h("p",{class:"empty-subtitle"},"给 Scream 发消息,开始处理你的任务",-1)),h("div",y1,[(b(),x(re,null,Ve(s,i=>h("button",{key:i.title,class:"suggestion-card",onClick:l=>n("pick",i.prompt)},[h("span",k1,[V(ge,{name:i.icon,size:22},null,8,["name"])]),h("span",w1,E(i.title),1)],8,b1)),64))]),e.workDir?(b(),x("div",{key:0,class:"empty-workdir",title:e.workDir},[o[0]||(o[0]=h("span",{class:"workdir-label"},"工作目录",-1)),h("span",S1,E(e.workDir),1)],8,_1)):Z("",!0)]))}}),C1=Ce(x1,[["__scopeId","data-v-e4fea2d2"]]),T1={class:"message-list-wrapper"},$1={key:1,class:"message-skeleton","aria-hidden":"true"},A1=xe({__name:"MessageList",props:{messages:{},busy:{type:Boolean,default:!1},workDir:{default:null},sessionId:{default:""}},emits:["edit","pick"],setup(e,{emit:t}){const n=e,s=t,r=H(null),o=Q(()=>{for(let w=n.messages.length-1;w>=0;w--)if(n.messages[w].role==="user")return n.messages[w].id;return null}),i=Q(()=>{var w;return((w=n.messages.at(-1))==null?void 0:w.id)??null}),l=Q(()=>{var K;const w=n.messages.at(-1);if(!w)return 0;let P=w.content.length;for(const D of w.tools)P+=((K=D.output)==null?void 0:K.length)??0;return P});let a=!1;const c=H(!1);function u(){const w=r.value;return w?w.scrollHeight-w.scrollTop-w.clientHeight<80:!0}function d(){return typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function g(w){requestAnimationFrame(()=>{const P=r.value;if(!P)return;const K=d()?"auto":w;P.scrollTo({top:P.scrollHeight,behavior:K})})}let p=null;function f(){const w=r.value,P=n.sessionId;!w||!P||p===null&&(p=requestAnimationFrame(()=>{p=null;try{localStorage.setItem(`scream-scroll:${P}`,String(w.scrollTop))}catch{}}))}function m(){const w=r.value,P=n.sessionId;if(!w||!P)return;let K=null;try{K=localStorage.getItem(`scream-scroll:${P}`)}catch{}K&&(w.scrollTop=Number(K))}function k(){const w=r.value;if(!w)return;const P=w.scrollHeight-w.scrollTop-w.clientHeight>80;c.value=P,P&&a&&(a=!1),n.busy||f()}let v="";Ne(()=>n.sessionId,()=>{v=""}),Ne(()=>[n.messages.length,l.value],([w],[P])=>{if(w!==P){if(w>0&&v!==n.sessionId){v=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 S(){a=!0,c.value=!1,g("smooth")}const T=Q(()=>!n.busy||n.messages.length===0?!1:n.messages.at(-1).role==="user");return Xt(()=>{var w;(w=r.value)==null||w.addEventListener("scroll",k,{passive:!0}),requestAnimationFrame(()=>requestAnimationFrame(m))}),qr(()=>{var w;(w=r.value)==null||w.removeEventListener("scroll",k),p!==null&&(cancelAnimationFrame(p),p=null)}),(w,P)=>(b(),x("div",T1,[h("div",{ref_key:"listRef",ref:r,class:"message-list"},[e.messages.length===0?(b(),Ue(C1,{key:0,"work-dir":e.workDir,onPick:P[0]||(P[0]=K=>s("pick",K))},null,8,["work-dir"])):Z("",!0),(b(!0),x(re,null,Ve(e.messages,K=>(b(),Ue(m1,{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:P[1]||(P[1]=D=>s("edit",D))},null,8,["message","is-latest-user","idle","streaming"]))),128)),T.value?(b(),x("div",$1,[...P[2]||(P[2]=[Rd('<div class="sk-avatar" data-v-c6f0e3bd></div><div class="sk-body" data-v-c6f0e3bd><div class="sk-line sk-w-60" data-v-c6f0e3bd></div><div class="sk-line sk-w-90" data-v-c6f0e3bd></div><div class="sk-line sk-w-40" data-v-c6f0e3bd></div></div>',2)])])):Z("",!0)],512),V(_i,{name:"scroll-btn"},{default:et(()=>[c.value?(b(),x("button",{key:0,class:"scroll-to-bottom",title:"滚动到最新消息",onClick:S},[V(ge,{name:"chevron-down",size:18})])):Z("",!0)]),_:1})]))}}),R1=Ce(A1,[["__scopeId","data-v-c6f0e3bd"]]),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"},B1={class:"row-alias"},D1={class:"row-meta"},G1={key:0,class:"row-check"},j1={class:"picker-thinking"},F1={class:"thinking-options"},z1=["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=H(""),l=H(null);Xt(()=>{var v;(v=l.value)==null||v.focus()});const a=Q(()=>{const v=i.value.trim().toLowerCase();return v?n.models.filter(S=>S.alias.toLowerCase().includes(v)||S.provider.toLowerCase().includes(v)||(S.displayName??"").toLowerCase().includes(v)):n.models}),c=Q(()=>{const v=new Map;for(const S of a.value){const T=v.get(S.provider)??[];T.push(S),v.set(S.provider,T)}return[...v.entries()].map(([S,T])=>({provider:S,models:T}))}),u=Q(()=>n.models.find(v=>v.alias===n.currentModel)),d=Q(()=>{var v;return((v=u.value)==null?void 0:v.thinkingLevels)??r});function g(v){return o[v]??v}function p(v){return v>=1e3?`${Math.round(v/1e3)}k`:String(v)}function f(v){return v.displayName??v.model}function m(v){v!==n.currentModel&&s("apply-model",v),s("close")}function k(v){v!==n.currentThinking&&s("apply-thinking",v)}return(v,S)=>(b(),x("div",E1,[h("div",{class:"picker-backdrop",onClick:S[0]||(S[0]=T=>s("close"))}),h("div",{class:"model-picker",role:"dialog","aria-label":"模型选择",onKeydown:S[2]||(S[2]=Es(T=>s("close"),["esc"]))},[st(h("input",{ref_key:"searchRef",ref:l,"onUpdate:modelValue":S[1]||(S[1]=T=>i.value=T),class:"picker-search",type:"text",placeholder:"搜索模型…"},null,512),[[gt,i.value]]),h("div",I1,[c.value.length===0?(b(),x("div",L1,"无匹配模型")):Z("",!0),(b(!0),x(re,null,Ve(c.value,T=>(b(),x("div",{key:T.provider,class:"picker-group"},[h("div",P1,E(T.provider),1),(b(!0),x(re,null,Ve(T.models,w=>(b(),x("button",{key:w.alias,class:be(["picker-row",{active:w.alias===e.currentModel}]),onClick:P=>m(w.alias)},[h("span",N1,[h("span",O1,E(f(w)),1),h("span",B1,E(w.alias),1)]),h("span",D1,E(p(w.maxContextSize)),1),w.alias===e.currentModel?(b(),x("span",G1,"✓")):Z("",!0)],10,M1))),128))]))),128))]),h("div",j1,[S[3]||(S[3]=h("span",{class:"thinking-label"},"思考强度",-1)),h("div",F1,[(b(!0),x(re,null,Ve(d.value,T=>(b(),x("button",{key:T,class:be(["thinking-btn",{active:T===e.currentThinking}]),onClick:w=>k(T)},E(g(T)),11,z1))),128))])])],32)]))}}),H1=Ce(U1,[["__scopeId","data-v-af964b7d"]]),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)=>(b(),x("div",q1,[(b(!0),x(re,null,Ve(e.commands,(o,i)=>{var l;return b(),x("button",{key:o.name,class:be(["slash-item",{active:i===e.activeIndex}]),role:"option","aria-selected":i===e.activeIndex,onMousedown:zt(a=>n("select",o),["prevent"]),onMouseenter:a=>n("hover",i)},[h("span",V1,[Ie("/"+E(o.name),1),(l=o.aliases)!=null&&l.length?(b(),x("span",K1,E(o.aliases.map(a=>`/${a}`).join(" ")),1)):Z("",!0)]),h("span",Z1,E(o.description),1),o.acceptsInput?(b(),x("span",Y1,"输入参数")):Z("",!0),o.target==="backend"?(b(),x("span",J1,"服务端")):Z("",!0)],42,W1)}),128)),r[0]||(r[0]=h("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=H(""),i=H(null),l=H(0),a=H(!1),c=Q(()=>{const N=o.value;return!N.startsWith("/")||N.includes(`
87
+ `)||/\s/.test(N.slice(1))?null:N.slice(1)}),u=Q(()=>c.value===null?[]:Dh(c.value)),d=Q(()=>c.value!==null&&u.value.length>0&&!a.value);Ne(c,()=>{l.value=0,a.value=!1});function g(N){const se=N??u.value[l.value];if(se){if(se.acceptsInput){o.value=`/${se.name} `,a.value=!0,Bt(()=>{var ke;(ke=i.value)==null||ke.focus(),D()});return}T(`/${se.name}`),ue(),r("command",se.name)}}const p=H([]);Ne(()=>s.sessionId,()=>{p.value=[]}),Ne(()=>s.busy,N=>{if(!N&&p.value.length>0){const[se,...ke]=p.value;p.value=ke,se&&r("send",se)}});const f=H([]),m=H(-1),k=H("");function v(){return`scream-history:${s.sessionId??"default"}`}function S(){try{const N=localStorage.getItem(v());f.value=N?JSON.parse(N):[]}catch{f.value=[]}m.value=-1}function T(N){if(f.value.at(-1)!==N){f.value=[...f.value,N].slice(-50);try{localStorage.setItem(v(),JSON.stringify(f.value))}catch{}}m.value=-1,k.value=""}function w(N,se){const ke=i.value;if(!ke)return;const y=ke.value.slice(0,ke.selectionStart??0),_=ke.value.slice(ke.selectionEnd??0);if(!(N===-1&&y.includes(`
88
+ `))&&!(N===1&&_.includes(`
89
+ `))){if(N===-1){if(f.value.length===0)return;se.preventDefault(),m.value===-1?(k.value=o.value,m.value=f.value.length-1):m.value>0&&m.value--,o.value=f.value[m.value]??""}else{if(m.value===-1)return;se.preventDefault(),m.value<f.value.length-1?(m.value++,o.value=f.value[m.value]??""):(m.value=-1,o.value=k.value)}Bt(()=>{ke.selectionStart=ke.selectionEnd=ke.value.length})}}function P(){return`scream-draft:${s.sessionId??"default"}`}let K;Ne(o,()=>{D(),clearTimeout(K),K=setTimeout(()=>{try{o.value?localStorage.setItem(P(),o.value):localStorage.removeItem(P())}catch{}},300)}),Ne(()=>s.sessionId,()=>{clearTimeout(K),S();let N="";try{N=localStorage.getItem(P())??""}catch{N=""}o.value=N,Bt(D)},{immediate:!0});function D(){const N=i.value;if(!N)return;N.style.height="auto";const se=Math.round(window.innerHeight*.25);N.style.height=`${Math.min(Math.max(N.scrollHeight,36),se)}px`}function ue(){o.value="",Bt(()=>{i.value&&(i.value.style.height="auto")})}function q(){const N=o.value.trim();if(N){if(N.startsWith("/")){const se=N.indexOf(" "),ke=(se===-1?N.slice(1):N.slice(1,se)).toLowerCase(),y=Gh(ke),_=se===-1?"":N.slice(se+1).trim();T(N),r("command",y,_),ue();return}if(s.busy){ee();return}T(N),r("send",N),ue()}}function ee(){const N=o.value.trim();N&&(p.value=[...p.value,N],ue())}function he(N){if(d.value){if(N.key==="ArrowUp"){N.preventDefault(),l.value=(l.value-1+u.value.length)%u.value.length;return}if(N.key==="ArrowDown"){N.preventDefault(),l.value=(l.value+1)%u.value.length;return}if(N.key==="Tab"||N.key==="Enter"&&!N.shiftKey){if(N.key==="Enter"&&N.isComposing)return;N.preventDefault(),g();return}if(N.key==="Escape"){N.preventDefault(),a.value=!0;return}}if((N.ctrlKey||N.metaKey)&&N.key.toLowerCase()==="s"){N.preventDefault(),ee();return}if(N.key==="Enter"&&!N.shiftKey){if(N.isComposing)return;N.preventDefault(),q();return}N.key==="ArrowUp"?w(-1,N):N.key==="ArrowDown"&&w(1,N)}function j(){p.value=[],r("abort")}function pe(N){o.value=N,Bt(()=>{var se;D(),(se=i.value)==null||se.focus()})}function M(N){o.value+=N,Bt(()=>{var se;D(),(se=i.value)==null||se.focus()})}t({insertText:pe,openModelPicker:Fe});const A=Q(()=>{var N;return(N=s.status)==null?void 0:N.model}),Y=Q(()=>{var N;return(N=s.status)==null?void 0:N.permission}),ae=Q(()=>{var N;return(N=s.status)==null?void 0:N.contextUsage}),te=H(!1),qe={off:"关闭",low:"低",medium:"中",high:"高",xhigh:"超高",max:"最大"},He=Q(()=>{var N;return(N=s.status)==null?void 0:N.thinkingLevel}),Ge=Q(()=>{const N=He.value;return!N||N==="none"?"":qe[N]??N}),je=Q(()=>s.models.length>0);function Fe(){return je.value?(te.value=!0,!0):!1}function Qt(){je.value&&(te.value=!te.value)}function ot(N){r("switch-model",N)}function tt(N){r("switch-thinking",N)}const bt=Q(()=>{switch(Y.value){case"auto":return"perm-auto";case"yolo":return"perm-yolo";default:return"perm-manual"}}),Tt=Q(()=>{switch(Y.value){case"auto":return"自动";case"yolo":return"YOLO";default:return"手动"}});return(N,se)=>(b(),x("div",ek,[V(_i,{name:"picker"},{default:et(()=>[te.value?(b(),Ue(H1,{key:0,models:e.models,"current-model":A.value,"current-thinking":He.value,onApplyModel:ot,onApplyThinking:tt,onClose:se[0]||(se[0]=ke=>te.value=!1)},null,8,["models","current-model","current-thinking"])):Z("",!0)]),_:1}),d.value?(b(),Ue(Q1,{key:0,commands:u.value,"active-index":l.value,onSelect:g,onHover:se[1]||(se[1]=ke=>l.value=ke)},null,8,["commands","active-index"])):Z("",!0),st(h("textarea",{ref_key:"textareaRef",ref:i,"onUpdate:modelValue":se[2]||(se[2]=ke=>o.value=ke),id:"composer-input",name:"message",class:"composer-input",rows:"1",placeholder:e.busy?"回合进行中:Enter/Ctrl+S 排队消息,随下一轮注入":"输入消息,@ 提及,/ 触发指令",onKeydown:he},null,40,tk),[[gt,o.value]]),h("div",nk,[h("div",sk,[h("button",{class:"quick-action",title:"插入 @ 提及",onClick:se[3]||(se[3]=ke=>M("@"))},[V(ge,{name:"at",size:18}),se[5]||(se[5]=h("span",null,"提及",-1))]),h("button",{class:"quick-action",title:"插入 / 触发指令",onClick:se[4]||(se[4]=ke=>M("/"))},[V(ge,{name:"command",size:18}),se[6]||(se[6]=h("span",null,"指令",-1))]),Y.value?(b(),x("span",{key:0,class:be(["permission-label",bt.value]),title:`权限模式:${Y.value}`},E(Tt.value),11,rk)):Z("",!0),p.value.length?(b(),x("span",ok,"已排队 "+E(p.value.length)+" 条",1)):Z("",!0)]),h("div",ik,[A.value?(b(),x("button",{key:0,class:be(["model-select",{clickable:je.value}]),disabled:!je.value,title:`当前模型:${A.value}`,onClick:Qt},[V(ge,{name:"brain",size:17}),h("span",null,E(A.value),1),Ge.value?(b(),x(re,{key:0},[Ie(" · "+E(Ge.value),1)],64)):Z("",!0),je.value?(b(),Ue(ge,{key:1,name:"chevron-down",size:14})):Z("",!0)],10,lk)):Z("",!0),ae.value!==void 0?(b(),x("span",ak,[V(Nc,{usage:ae.value,size:17},null,8,["usage"])])):Z("",!0),e.busy?(b(),x("button",{key:2,class:"stop-btn",title:"停止当前回合",onClick:j},[V(ge,{name:"stop",size:17}),se[7]||(se[7]=h("span",null,"停止",-1))])):(b(),x("button",{key:3,class:"send-btn",disabled:!o.value.trim(),title:"发送 (Enter)","aria-label":"发送",onClick:q},[V(ge,{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)=>(b(),x("button",{class:be(["ui-btn",[`ui-btn--${e.variant}`,`ui-btn--${e.size}`]]),type:e.type,disabled:e.disabled},[rr(t.$slots,"default",{},void 0)],10,dk))}}),Wn=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"},_k={class:"approval-buttons"},Sk={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=H(!1),o=H(!1),i=H(""),l=H(new Set),a=Q(()=>n.approvals[0]);Ne(()=>n.approvals.map(f=>f.id).join(","),()=>{o.value=!1,i.value="";const f=new Set(n.approvals.map(m=>m.id));l.value=new Set([...l.value].filter(m=>f.has(m)))});function c(f){return typeof f.display=="string"?f.display:f.display&&typeof f.display=="object"&&"description"in f.display?String(f.display.description??""):f.action??"执行该操作"}function u(f){return l.value.has(f)}function d(f,m,k){const v=a.value;!v||u(v.id)||(l.value=new Set([...l.value,v.id]),s("resolve",v.id,f,m,k))}function g(){const f=i.value.trim();f&&d("rejected",f)}function p(f){if(!a.value||r.value)return;const k=f.target;if(k&&(k.tagName==="TEXTAREA"||k.tagName==="INPUT")){o.value&&f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),g());return}switch(f.key){case"1":f.preventDefault(),d("approved",void 0,"once");break;case"2":f.preventDefault(),d("approved",void 0,"session");break;case"3":f.preventDefault(),d("rejected");break;case"4":f.preventDefault(),o.value=!o.value;break}}return Xt(()=>window.addEventListener("keydown",p)),vn(()=>window.removeEventListener("keydown",p)),(f,m)=>e.approvals.length?(b(),x("div",pk,[r.value?(b(),x("button",{key:0,class:"approval-minibar",onClick:m[0]||(m[0]=k=>r.value=!1)}," ⚠ "+E(e.approvals.length)+" 个待审批请求 — 点击展开 ",1)):a.value?(b(),x(re,{key:1},[h("div",gk,[m[7]||(m[7]=h("span",{class:"approval-icon"},"⚠",-1)),h("span",mk,[h("span",vk,E(a.value.toolName),1),h("span",yk,E(c(a.value)),1)]),e.approvals.length>1?(b(),x("span",bk,"+"+E(e.approvals.length-1),1)):Z("",!0),h("button",{class:"icon-btn",title:"最小化","aria-label":"最小化",onClick:m[1]||(m[1]=k=>r.value=!0)},"—")]),h("pre",kk,E(c(a.value)),1),o.value?(b(),x("div",wk,[st(h("textarea",{"onUpdate:modelValue":m[2]||(m[2]=k=>i.value=k),class:"feedback-input",rows:"2",placeholder:"输入反馈,Enter 提交(将作为拒绝原因反馈给 Agent)"},null,512),[[gt,i.value]])])):Z("",!0),h("div",_k,[V(Wn,{variant:"primary",disabled:u(a.value.id),onClick:m[3]||(m[3]=k=>d("approved",void 0,"once"))},{default:et(()=>[...m[8]||(m[8]=[h("kbd",null,"1",-1),Ie(" 批准 ",-1)])]),_:1},8,["disabled"]),V(Wn,{variant:"secondary",disabled:u(a.value.id),onClick:m[4]||(m[4]=k=>d("approved",void 0,"session"))},{default:et(()=>[...m[9]||(m[9]=[h("kbd",null,"2",-1),Ie(" 会话批准 ",-1)])]),_:1},8,["disabled"]),V(Wn,{variant:"danger",disabled:u(a.value.id),onClick:m[5]||(m[5]=k=>d("rejected"))},{default:et(()=>[...m[10]||(m[10]=[h("kbd",null,"3",-1),Ie(" 拒绝 ",-1)])]),_:1},8,["disabled"]),V(Wn,{variant:"secondary",class:be({"feedback-active":o.value}),disabled:u(a.value.id),onClick:m[6]||(m[6]=k=>o.value=!o.value)},{default:et(()=>[...m[11]||(m[11]=[h("kbd",null,"4",-1),Ie(" 反馈 ",-1)])]),_:1},8,["class","disabled"]),u(a.value.id)?(b(),x("span",Sk,[...m[12]||(m[12]=[h("span",{class:"spinner"},null,-1),Ie(" 处理中… ",-1)])])):Z("",!0)])],64)):Z("",!0)])):Z("",!0)}}),Ck=Ce(xk,[["__scopeId","data-v-b031b650"]]),Tk={class:"brand-head"},$k=["title","aria-label"],Ak={class:"primary-actions"},Rk={class:"search-row"},Ek={class:"list-heading"},Ik={class:"session-list"},Lk={class:"group-label"},Pk=["title","onClick"],Mk={class:"session-icon"},Nk={class:"session-info"},Ok={class:"session-title-row"},Bk={class:"session-meta"},Dk={key:0,class:"live"},Gk=["onClick"],jk=["onClick"],Fk={key:0,class:"empty"},zk={class:"agent-card"},Uk={class:"agent-card-head"},Hk={class:"agent-avatar"},qk={key:0},Wk=["title"],Vk={key:1},Kk=["title"],Zk={key:0,class:"usage-track"},Yk={class:"sidebar-footer","aria-label":"辅助导航"},Jk=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=H(null),o=Q(()=>{const p=new Date,f=new Date(p.getFullYear(),p.getMonth(),p.getDate()).getTime(),m=f-864e5,k=new Map;for(const v of n.sessions){const S=new Date(v.createdAt),T=v.createdAt>=f?"今天":v.createdAt>=m?"昨天":`${String(S.getMonth()+1).padStart(2,"0")}-${String(S.getDate()).padStart(2,"0")}`;k.set(T,[...k.get(T)??[],v])}return[...k].map(([v,S])=>({label:v,items:S}))});function i(p){const f=new Date(p);return f.toDateString()===new Date().toDateString()?f.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):f.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}const l=Q(()=>{var f;const p=(f=n.status)==null?void 0:f.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=Q(()=>{var p,f;return a((f=(p=n.status)==null?void 0:p.usage)==null?void 0:f.total)});function u(p){return p>=1e6?`${(p/1e6).toFixed(1)}M`:p>=1e3?`${(p/1e3).toFixed(1)}k`:String(p)}const d=Q(()=>{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,f)=>{var m;return b(),x("aside",{class:be(["sidebar",{collapsed:e.collapsed,"mobile-open":e.mobileOpen}])},[h("div",Tk,[f[12]||(f[12]=h("div",{class:"brand-symbol"},[h("img",{src:xi,alt:""})],-1)),f[13]||(f[13]=h("div",{class:"brand-copy"},[h("strong",null,"Scream Code"),h("span",null,"智能开发工作台")],-1)),h("button",{class:"collapse-btn",title:e.collapsed?"展开侧栏":"收起侧栏","aria-label":e.collapsed?"展开侧栏":"收起侧栏",onClick:f[0]||(f[0]=k=>s("toggle"))},[V(ge,{name:e.collapsed?"chevron-right":"chevron-left",size:19},null,8,["name"])],8,$k)]),h("div",Ak,[h("button",{class:"new-session",title:"新建会话",onClick:f[1]||(f[1]=k=>s("create"))},[V(ge,{name:"plus",size:21}),f[14]||(f[14]=h("span",null,"新建会话",-1))]),h("button",{class:"square-action",title:"搜索会话","aria-label":"搜索会话",onClick:f[2]||(f[2]=k=>s("open-search"))},[V(ge,{name:"search"})])]),h("div",Rk,[h("button",{class:"search-box",title:"搜索会话 (⌘K)",onClick:f[3]||(f[3]=k=>s("open-search"))},[V(ge,{name:"search",size:18}),f[15]||(f[15]=h("span",null,"搜索会话",-1)),f[16]||(f[16]=h("kbd",null,"⌘K",-1))]),h("button",{class:"filter-btn",title:"筛选和搜索会话","aria-label":"筛选和搜索会话",onClick:f[4]||(f[4]=k=>s("open-search"))},[V(ge,{name:"filter",size:18})])]),h("div",Ek,[f[17]||(f[17]=h("span",null,"最近会话",-1)),h("span",null,E(e.sessions.length),1)]),h("div",Ik,[(b(!0),x(re,null,Ve(o.value,k=>(b(),x(re,{key:k.label},[h("div",Lk,E(k.label),1),(b(!0),x(re,null,Ve(k.items,v=>(b(),x("article",{key:v.sessionId,class:be(["session-item",{active:v.sessionId===e.currentSessionId}]),title:v.title||"新会话",onClick:S=>s("switch",v.sessionId)},[h("span",Mk,[V(ge,{name:"message-circle",size:18})]),h("div",Nk,[h("div",Ok,[h("strong",null,E(v.title||"新会话"),1),h("time",null,E(i(v.createdAt)),1)]),h("div",Bk,[h("span",null,E(v.messageCount)+" 条消息",1),v.active?(b(),x("span",Dk,[...f[18]||(f[18]=[h("i",null,null,-1),Ie("活跃",-1)])])):Z("",!0)])]),h("div",{class:"session-actions",onClick:f[5]||(f[5]=zt(()=>{},["stop"]))},[h("button",{title:"导出 Markdown","aria-label":"导出 Markdown",onClick:S=>s("export",v.sessionId)},[V(ge,{name:"download",size:16})],8,Gk),h("button",{class:"danger",title:"删除会话","aria-label":"删除会话",onClick:S=>r.value=v.sessionId},[V(ge,{name:"trash",size:16})],8,jk)])],10,Pk))),128))],64))),128)),e.sessions.length===0?(b(),x("div",Fk,[V(ge,{name:"message-circle",size:28}),f[19]||(f[19]=h("strong",null,"暂无会话",-1)),f[20]||(f[20]=h("span",null,"新建会话后将在这里显示",-1))])):Z("",!0),e.sessions.length?(b(),x("button",{key:1,class:"view-all",onClick:f[6]||(f[6]=k=>s("open-search"))},[f[21]||(f[21]=Ie("查看全部会话 ",-1)),V(ge,{name:"chevron-right",size:16})])):Z("",!0)]),h("section",zk,[h("div",Uk,[h("span",Hk,[V(ge,{name:"bot",size:20})]),h("div",null,[f[22]||(f[22]=h("strong",null,"Scream Agent",-1)),h("span",null,[h("i",{class:be({busy:e.busy})},null,2),Ie(E(e.busy?"正在运行":"当前空闲"),1)])])]),h("dl",null,[(m=e.status)!=null&&m.model?(b(),x("div",qk,[f[23]||(f[23]=h("dt",null,"当前模型",-1)),h("dd",{title:e.status.model},E(e.status.model),9,Wk)])):Z("",!0),l.value!==null?(b(),x("div",Vk,[f[24]||(f[24]=h("dt",null,"上下文",-1)),h("dd",{title:d.value||void 0},E(l.value)+"%",9,Kk)])):Z("",!0),h("div",null,[f[25]||(f[25]=h("dt",null,"Token 消耗",-1)),h("dd",null,E(c.value?u(c.value):"-"),1)])]),l.value!==null?(b(),x("div",Zk,[h("i",{style:fn({width:`${l.value}%`})},null,4)])):Z("",!0),h("button",{onClick:f[7]||(f[7]=k=>s("show-info","status"))},[V(ge,{name:"activity",size:17}),f[26]||(f[26]=Ie("查看详细状态",-1))])]),h("nav",Yk,[h("button",{onClick:f[8]||(f[8]=k=>s("show-info","usage"))},[V(ge,{name:"activity",size:19}),f[27]||(f[27]=h("span",null,"用量",-1))]),h("button",{onClick:f[9]||(f[9]=k=>s("help"))},[V(ge,{name:"help",size:19}),f[28]||(f[28]=h("span",null,"帮助",-1))])]),V(Yr,{open:r.value!==null,title:"删除会话",onClose:f[11]||(f[11]=k=>r.value=null)},{footer:et(()=>[V(Wn,{variant:"ghost",size:"sm",onClick:f[10]||(f[10]=k=>r.value=null)},{default:et(()=>[...f[29]||(f[29]=[Ie("取消",-1)])]),_:1}),V(Wn,{variant:"danger",size:"sm",onClick:g},{default:et(()=>[...f[30]||(f[30]=[Ie("删除",-1)])]),_:1})]),default:et(()=>[f[31]||(f[31]=h("p",{class:"dialog-copy"},"确定删除这个会话吗?此操作不可恢复。",-1))]),_:1},8,["open"])],2)}}}),Xk=Ce(Jk,[["__scopeId","data-v-a4c1783b"]]),Qk={class:"goal-panel panel-section"},e0={class:"section-heading"},t0={key:0,class:"empty-state"},n0=["disabled"],s0={class:"refine-row"},r0=["disabled"],o0={key:0},i0=["disabled"],l0={class:"budget-grid"},a0=["disabled"],c0=["disabled"],u0={class:"time-budget"},f0=["disabled"],d0=["disabled"],h0=["disabled"],p0={key:0,class:"goal-summary"},g0={class:"objective"},m0={class:"criterion"},v0={key:0,class:"reason"},y0={class:"metrics"},b0={class:"metric"},k0={key:0},w0={class:"metric"},_0={key:0},S0={class:"metric"},x0={key:0},C0={key:1,class:"budget-warning"},T0={key:2,class:"notes"},$0={class:"actions"},A0=["disabled"],R0=["disabled"],E0=["disabled"],I0=["disabled"],L0=["disabled"],P0={class:"budget-grid"},M0=["disabled"],N0=["disabled"],O0={class:"time-budget"},B0=["disabled"],D0=["disabled"],G0={class:"edit-actions"},j0=["disabled"],F0=["disabled"],z0={key:3,class:"form-error"},U0={key:4,class:"pending-copy"},H0=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=H(""),s=H(""),r=H(""),o=H(""),i=H(""),l=H("minutes"),a=H(!1),c=H(null),u=H(!1),d=Q(()=>t.connectionStatus==="connected"),g=Q(()=>!t.sessionId||!d.value||t.archived||t.pending),p=Q(()=>g.value),f=Q(()=>{var M;return{active:"进行中",paused:"已暂停",blocked:"受阻",complete:"已完成"}[((M=t.goal)==null?void 0:M.status)??"active"]}),m=Q(()=>t.sessionId?t.archived?"归档会话为只读状态":d.value?t.pending?"正在提交请求…":t.goal?"状态由核心事件实时同步":"创建后 Agent 将自动开始执行":"连接恢复后可继续管理":"选择或新建会话后即可配置");Ne(()=>t.sessionId,()=>{a.value=!1,k()}),Ne(()=>{var M;return(M=t.goal)==null?void 0:M.goalId},(M,A)=>{a.value=!1,M!==A&&k()});function k(){n.value="",s.value="",r.value="",o.value="",i.value="",l.value="minutes",u.value=!1,c.value=null}function v(M,A){const Y=M.trim();if(!Y)return null;const ae=Number(Y);if(!Number.isSafeInteger(ae)||ae<=0){c.value=`${A}必须是正整数。`;return}return ae}function S(){c.value=null;const M=v(r.value,"轮次预算");if(M===void 0)return null;const A=v(o.value,"Token 预算");if(A===void 0)return null;const Y=v(i.value,"时间预算");if(Y===void 0)return null;const ae=[];return M!==null&&ae.push({value:M,unit:"turns"}),A!==null&&ae.push({value:A,unit:"tokens"}),Y!==null&&ae.push({value:Y,unit:l.value}),ae}async function T(){const M=n.value.trim();if(!M){c.value="请先输入需要优化的目标描述。";return}c.value=null,u.value=!1;const A=await t.refineGoal(M);A!==null&&(n.value=A,u.value=!0)}async function w(){const M=n.value.trim();if(!M){c.value="目标内容不能为空。";return}const A=S();if(A===null)return;await t.createGoal({objective:M,completionCriterion:s.value.trim()||void 0,replace:!1,budgets:A})&&(u.value=!1)}function P(M){M===null?(i.value="",l.value="minutes"):M%36e5===0?(i.value=String(M/36e5),l.value="hours"):M%6e4===0?(i.value=String(M/6e4),l.value="minutes"):M%1e3===0?(i.value=String(M/1e3),l.value="seconds"):(i.value=String(M),l.value="milliseconds")}function K(){const M=t.goal;M&&(n.value=M.objective,r.value=M.budget.turnBudget===null?"":String(M.budget.turnBudget),o.value=M.budget.tokenBudget===null?"":String(M.budget.tokenBudget),P(M.budget.wallClockBudgetMs),c.value=null,a.value=!0)}function D(M,A){return A==="hours"?M*36e5:A==="minutes"?M*6e4:A==="seconds"?M*1e3:M}async function ue(){const M=t.goal;if(!M)return;const A=n.value.trim();if(!A){c.value="目标内容不能为空。";return}const Y=S();if(Y===null)return;const ae=v(r.value,"轮次预算"),te=v(o.value,"Token 预算"),qe=v(i.value,"时间预算");if(ae===void 0||te===void 0||qe===void 0)return;if(M.budget.turnBudget!==null&&ae===null){c.value="当前协议不支持清除已有轮次预算,请填写新的正整数。";return}if(M.budget.tokenBudget!==null&&te===null){c.value="当前协议不支持清除已有 Token 预算,请填写新的正整数。";return}if(M.budget.wallClockBudgetMs!==null&&qe===null){c.value="当前协议不支持清除已有时间预算,请填写新的正整数。";return}const He=Y.filter(Fe=>Fe.unit==="turns"?Fe.value!==M.budget.turnBudget:Fe.unit==="tokens"?Fe.value!==M.budget.tokenBudget:D(Fe.value,Fe.unit)!==M.budget.wallClockBudgetMs),Ge=A===M.objective?void 0:A;if(Ge===void 0&&He.length===0){c.value="目标与预算没有变化。";return}await t.updateGoal({objective:Ge,budgets:He})&&(a.value=!1)}async function q(M){c.value=null,!(M==="cancel"&&!window.confirm("确定取消当前 Goal?当前 Goal 状态将被清除。"))&&(M==="pause"?await t.pauseGoal():M==="resume"?await t.resumeGoal():await t.cancelGoal())}function ee(M){return M.toLocaleString("zh-CN")}function he(M){if(M<1e3)return`${M} 毫秒`;const A=Math.floor(M/1e3);if(A<60)return`${A} 秒`;const Y=Math.floor(A/3600),ae=Math.floor(A%3600/60);return Y>0?`${Y} 小时 ${ae} 分钟`:`${ae} 分钟`}function j(M,A){return A===null||A<=0?0:Math.min(100,Math.round(M/A*100))}function pe(M){return new Date(M).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}return(M,A)=>(b(),x("section",Qk,[h("div",e0,[h("div",null,[A[15]||(A[15]=h("span",null,"Goal 管理",-1)),h("small",null,E(m.value),1)]),e.goal?(b(),x("span",{key:0,class:be(["status-pill",`is-${e.goal.status}`])},E(f.value),3)):(b(),Ue(ge,{key:1,name:"activity",size:19}))]),e.sessionId?e.goal?(b(),x(re,{key:2},[a.value?(b(),x("form",{key:1,class:"goal-form edit-form",onSubmit:zt(ue,["prevent"])},[h("label",null,[A[31]||(A[31]=h("span",null,"目标内容",-1)),st(h("textarea",{"onUpdate:modelValue":A[9]||(A[9]=Y=>n.value=Y),rows:"3",maxlength:"4000",disabled:g.value||e.busy},null,8,L0),[[gt,n.value]])]),A[36]||(A[36]=h("div",{class:"budget-title"},[Ie("更新预算 "),h("small",null,"仅提交发生变化的预算")],-1)),h("div",P0,[h("label",null,[A[32]||(A[32]=h("span",null,"轮次",-1)),st(h("input",{"onUpdate:modelValue":A[10]||(A[10]=Y=>r.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value||e.busy},null,8,M0),[[gt,r.value]])]),h("label",null,[A[33]||(A[33]=h("span",null,"Token",-1)),st(h("input",{"onUpdate:modelValue":A[11]||(A[11]=Y=>o.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value||e.busy},null,8,N0),[[gt,o.value]])])]),h("div",O0,[h("label",null,[A[34]||(A[34]=h("span",null,"时间",-1)),st(h("input",{"onUpdate:modelValue":A[12]||(A[12]=Y=>i.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value||e.busy},null,8,B0),[[gt,i.value]])]),st(h("select",{"onUpdate:modelValue":A[13]||(A[13]=Y=>l.value=Y),"aria-label":"时间预算单位",disabled:g.value||e.busy},[...A[35]||(A[35]=[h("option",{value:"minutes"},"分钟",-1),h("option",{value:"hours"},"小时",-1),h("option",{value:"seconds"},"秒",-1),h("option",{value:"milliseconds"},"毫秒",-1)])],8,D0),[[Pl,l.value]])]),h("div",G0,[h("button",{type:"button",class:"secondary",disabled:e.pending,onClick:A[14]||(A[14]=Y=>a.value=!1)},"返回",8,j0),h("button",{class:"primary small",type:"submit",disabled:g.value||e.busy},"保存修改",8,F0)])],32)):(b(),x("div",p0,[h("div",g0,[A[24]||(A[24]=h("small",null,"目标",-1)),h("p",null,E(e.goal.objective),1)]),h("div",m0,[A[25]||(A[25]=h("small",null,"完成标准",-1)),h("p",null,E(e.goal.completionCriterion??"未设置,由 Agent 根据目标判断完成。"),1)]),e.goal.terminalReason?(b(),x("div",v0,[A[26]||(A[26]=h("strong",null,"状态原因",-1)),h("span",null,E(e.goal.terminalReason),1)])):Z("",!0),h("div",y0,[h("div",b0,[h("div",null,[A[27]||(A[27]=h("span",null,"轮次",-1)),h("strong",null,E(e.goal.turnsUsed)+" / "+E(e.goal.budget.turnBudget??"不限"),1)]),e.goal.budget.turnBudget!==null?(b(),x("i",k0,[h("b",{style:fn({width:`${j(e.goal.turnsUsed,e.goal.budget.turnBudget)}%`})},null,4)])):Z("",!0)]),h("div",w0,[h("div",null,[A[28]||(A[28]=h("span",null,"Token",-1)),h("strong",null,E(ee(e.goal.tokensUsed))+" / "+E(e.goal.budget.tokenBudget===null?"不限":ee(e.goal.budget.tokenBudget)),1)]),e.goal.budget.tokenBudget!==null?(b(),x("i",_0,[h("b",{style:fn({width:`${j(e.goal.tokensUsed,e.goal.budget.tokenBudget)}%`})},null,4)])):Z("",!0)]),h("div",S0,[h("div",null,[A[29]||(A[29]=h("span",null,"时间",-1)),h("strong",null,E(he(e.goal.wallClockMs))+" / "+E(e.goal.budget.wallClockBudgetMs===null?"不限":he(e.goal.budget.wallClockBudgetMs)),1)]),e.goal.budget.wallClockBudgetMs!==null?(b(),x("i",x0,[h("b",{style:fn({width:`${j(e.goal.wallClockMs,e.goal.budget.wallClockBudgetMs)}%`})},null,4)])):Z("",!0)])]),e.goal.budget.overBudget?(b(),x("div",C0,"已达到或超过执行预算。")):Z("",!0),e.goal.notes.length?(b(),x("details",T0,[h("summary",null,"工作记录("+E(e.goal.notes.length)+")",1),h("ol",null,[(b(!0),x(re,null,Ve(e.goal.notes,Y=>(b(),x("li",{key:`${Y.time}-${Y.content}`},[h("time",null,E(pe(Y.time)),1),h("span",null,E(Y.content),1)]))),128))])])):Z("",!0),h("div",$0,[e.goal.status!=="complete"?(b(),x("button",{key:0,class:"secondary",disabled:g.value||e.busy,onClick:K},[V(ge,{name:"edit",size:15}),A[30]||(A[30]=Ie("编辑",-1))],8,A0)):Z("",!0),e.goal.status==="active"?(b(),x("button",{key:1,class:"secondary",disabled:g.value,onClick:A[6]||(A[6]=Y=>q("pause"))},"暂停",8,R0)):Z("",!0),e.goal.status==="paused"||e.goal.status==="blocked"?(b(),x("button",{key:2,class:"primary small",disabled:g.value||e.busy,onClick:A[7]||(A[7]=Y=>q("resume"))},"继续",8,E0)):Z("",!0),h("button",{class:"danger",disabled:g.value,onClick:A[8]||(A[8]=Y=>q("cancel"))},"取消 Goal",8,I0)])]))],64)):(b(),x("form",{key:1,class:"goal-form",onSubmit:zt(w,["prevent"])},[h("label",null,[A[16]||(A[16]=h("span",null,"目标内容",-1)),st(h("textarea",{"onUpdate:modelValue":A[0]||(A[0]=Y=>n.value=Y),rows:"3",maxlength:"4000",placeholder:"描述希望 Agent 持续完成的目标",disabled:p.value},null,8,n0),[[gt,n.value]])]),h("div",s0,[h("button",{type:"button",class:"secondary",disabled:p.value||!n.value.trim(),onClick:T},[V(ge,{name:"sparkles",size:15}),A[17]||(A[17]=Ie(" AI 优化 ",-1))],8,r0),u.value?(b(),x("small",o0,"已优化,请确认或继续编辑后再创建。")):Z("",!0)]),h("label",null,[A[18]||(A[18]=h("span",null,[Ie("完成标准 "),h("small",null,"可选")],-1)),st(h("textarea",{"onUpdate:modelValue":A[1]||(A[1]=Y=>s.value=Y),rows:"2",placeholder:"例如:聚焦测试、类型检查与 Web 构建全部通过",disabled:p.value},null,8,i0),[[gt,s.value]])]),A[23]||(A[23]=h("div",{class:"budget-title"},[Ie("执行预算 "),h("small",null,"留空表示不限制")],-1)),h("div",l0,[h("label",null,[A[19]||(A[19]=h("span",null,"轮次",-1)),st(h("input",{"onUpdate:modelValue":A[2]||(A[2]=Y=>r.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:p.value},null,8,a0),[[gt,r.value]])]),h("label",null,[A[20]||(A[20]=h("span",null,"Token",-1)),st(h("input",{"onUpdate:modelValue":A[3]||(A[3]=Y=>o.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:p.value},null,8,c0),[[gt,o.value]])])]),h("div",u0,[h("label",null,[A[21]||(A[21]=h("span",null,"时间",-1)),st(h("input",{"onUpdate:modelValue":A[4]||(A[4]=Y=>i.value=Y),type:"number",min:"1",step:"1",placeholder:"不限",disabled:p.value},null,8,f0),[[gt,i.value]])]),st(h("select",{"onUpdate:modelValue":A[5]||(A[5]=Y=>l.value=Y),"aria-label":"时间预算单位",disabled:p.value},[...A[22]||(A[22]=[h("option",{value:"minutes"},"分钟",-1),h("option",{value:"hours"},"小时",-1),h("option",{value:"seconds"},"秒",-1),h("option",{value:"milliseconds"},"毫秒",-1)])],8,d0),[[Pl,l.value]])]),h("button",{class:"primary",type:"submit",disabled:p.value||!n.value.trim()},E(e.pending?"正在创建…":"创建并开始执行"),9,h0)],32)):(b(),x("div",t0,"暂无会话,Goal 管理暂不可用。")),c.value||e.error?(b(),x("p",z0,E(c.value??e.error),1)):e.pending?(b(),x("p",U0,"请求处理中,状态将在核心事件到达后同步。")):Z("",!0)]))}}),q0=Ce(H0,[["__scopeId","data-v-de9e6346"]]),W0={class:"todo-panel panel-section"},V0={class:"section-heading"},K0={class:"count-pill"},Z0={key:0,class:"empty-state"},Y0={key:1,class:"todo-groups"},J0=["title"],X0={class:"todo-title"},Q0=xe({__name:"TodoPanel",props:{todos:{}},setup(e){const t=e,n=Q(()=>Ih(t.todos)),s=Q(()=>t.todos.filter(o=>o.status==="done").length),r={pending:{label:"待处理",symbol:"○"},in_progress:{label:"进行中",symbol:"●"},done:{label:"已完成",symbol:"✓"}};return(o,i)=>(b(),x("section",W0,[h("div",V0,[i[0]||(i[0]=h("div",null,[h("span",null,"核心 Todo"),h("small",null,"直接来自 Agent 核心状态")],-1)),h("span",K0,E(s.value)+"/"+E(e.todos.length),1)]),e.todos.length===0?(b(),x("div",Z0,[V(ge,{name:"check",size:18}),i[1]||(i[1]=h("span",null,"暂无 Todo",-1)),i[2]||(i[2]=h("small",null,"Agent 创建任务清单后会在这里实时显示。",-1))])):(b(),x("div",Y0,[(b(!0),x(re,null,Ve(n.value,(l,a)=>(b(),x("section",{key:l.phase??`unphased-${a}`,class:"todo-group"},[h("h4",null,E(l.phase??"未分阶段"),1),h("ol",null,[(b(!0),x(re,null,Ve(l.items,(c,u)=>(b(),x("li",{key:`${a}-${u}-${c.title}`,class:be(`is-${c.status}`)},[h("span",{class:"status-symbol",title:r[c.status].label},E(r[c.status].symbol),9,J0),h("span",X0,E(c.title),1),h("small",null,E(r[c.status].label),1)],2))),128))])]))),128))]))]))}}),ew=Ce(Q0,[["__scopeId","data-v-e8a85d5d"]]),tw={class:"panel-section like-section"},nw={class:"section-heading"},sw={class:"like-fields"},rw={class:"like-label"},ow={class:"like-value"},iw={class:"dialog"},lw=["onUpdate:modelValue","placeholder"],aw={key:0,class:"dialog-error"},cw={class:"dialog-actions"},uw=["disabled"],fw=xe({__name:"LikePanel",props:{like:{},updateLike:{type:Function}},setup(e){const t=e,n=H(!1),s=H(!1),r=H(""),o=H({}),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)=>(b(),x("section",tw,[h("div",nw,[u[2]||(u[2]=h("div",null,[h("span",null,"偏好设置"),h("small",null,"/like 用户偏好")],-1)),V(ge,{name:"heart",size:19})]),h("div",sw,[(b(),x(re,null,Ve(i,d=>h("div",{key:d.key,class:"like-field"},[h("span",rw,E(d.label),1),h("span",ow,E((e.like[d.key]??"").trim()||"未设置"),1)])),64))]),h("button",{class:"like-edit",onClick:l},"编辑偏好"),n.value?(b(),x("div",{key:0,class:"dialog-overlay",onClick:u[1]||(u[1]=zt(d=>n.value=!1,["self"]))},[h("div",iw,[u[3]||(u[3]=h("div",{class:"dialog-title"},"编辑用户偏好",-1)),(b(),x(re,null,Ve(i,d=>h("label",{key:d.key,class:"dialog-field"},[h("span",null,E(d.label),1),st(h("input",{"onUpdate:modelValue":g=>o.value[d.key]=g,placeholder:d.placeholder},null,8,lw),[[gt,o.value[d.key]]])])),64)),r.value?(b(),x("div",aw,E(r.value),1)):Z("",!0),h("div",cw,[h("button",{onClick:u[0]||(u[0]=d=>n.value=!1)},"取消"),h("button",{disabled:s.value,onClick:a},E(s.value?"保存中…":"确认"),9,uw)])])])):Z("",!0)]))}}),dw=Ce(fw,[["__scopeId","data-v-a384266d"]]),hw={class:"rightbar"},pw=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:{}},emits:["insert"],setup(e,{emit:t}){return(n,s)=>(b(),x("aside",hw,[V(ew,{todos:e.todos},null,8,["todos"]),V(dw,{like:e.like,"update-like":e.updateLike},null,8,["like","update-like"]),V(q0,{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"])]))}}),gw=Ce(pw,[["__scopeId","data-v-8e2d795e"]]),mw={class:"info-row"},vw={class:"info-val mono"},yw={class:"info-row"},bw={class:"info-val mono"},kw={class:"info-row"},ww={class:"info-val"},_w={class:"info-row"},Sw={class:"info-val"},xw={class:"info-row"},Cw={class:"info-val"},Tw={class:"info-row"},$w={class:"info-val"},Aw={class:"info-row"},Rw={class:"info-val"},Ew={class:"info-row"},Iw={class:"info-val"},Lw={class:"info-row"},Pw={class:"info-val"},Mw={class:"info-row"},Nw={class:"info-val"},Ow={key:0,class:"info-row"},Bw={class:"info-val"},Dw={key:1,class:"info-row"},Gw={class:"info-val"},jw={class:"info-val mono"},Fw={class:"info-val"},zw={key:3,class:"info-empty"},Uw=xe({__name:"InfoPanel",props:{mode:{},status:{},sessionId:{},workDir:{}},emits:["close"],setup(e,{emit:t}){const n=e,s=t,r=Q(()=>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 d(p){return p!=null&&p.byModel?Object.entries(p.byModel).map(([f,m])=>({model:f,tokens:u(m),output:m.output,cacheRead:m.inputCacheRead})):[]}const g=Q(()=>l(n.status.usage)||l(n.status.contextTokens));return(p,f)=>(b(),Ue(Yr,{open:!0,title:r.value,onClose:f[0]||(f[0]=m=>s("close"))},{default:et(()=>{var m,k;return[e.mode==="status"?(b(),x(re,{key:0},[h("div",mw,[f[1]||(f[1]=h("span",{class:"info-key"},"会话 ID",-1)),h("span",vw,E(e.sessionId??"-"),1)]),h("div",yw,[f[2]||(f[2]=h("span",{class:"info-key"},"工作目录",-1)),h("span",bw,E(e.workDir??"-"),1)]),h("div",kw,[f[3]||(f[3]=h("span",{class:"info-key"},"模型",-1)),h("span",ww,E(e.status.model??"-"),1)]),h("div",_w,[f[4]||(f[4]=h("span",{class:"info-key"},"权限模式",-1)),h("span",Sw,E(o(e.status.permission)),1)]),h("div",xw,[f[5]||(f[5]=h("span",{class:"info-key"},"思考级别",-1)),h("span",Cw,E(e.status.thinkingLevel??"-"),1)]),h("div",Tw,[f[6]||(f[6]=h("span",{class:"info-key"},"计划模式",-1)),h("span",$w,E(i(e.status.planMode)),1)]),h("div",Aw,[f[7]||(f[7]=h("span",{class:"info-key"},"WolfPack 模式",-1)),h("span",Rw,E(i(e.status.wolfpackMode)),1)]),h("div",Ew,[f[8]||(f[8]=h("span",{class:"info-key"},"上下文",-1)),h("span",Iw,E(a(e.status.contextTokens))+" / "+E(a(e.status.maxContextTokens))+" ("+E(c(e.status.contextUsage))+")",1)])],64)):(b(),x(re,{key:1},[h("div",Lw,[f[9]||(f[9]=h("span",{class:"info-key"},"上下文 Token",-1)),h("span",Pw,E(a(e.status.contextTokens))+" / "+E(a(e.status.maxContextTokens)),1)]),h("div",Mw,[f[10]||(f[10]=h("span",{class:"info-key"},"上下文占比",-1)),h("span",Nw,E(c(e.status.contextUsage)),1)]),(m=e.status.usage)!=null&&m.total?(b(),x("div",Ow,[f[11]||(f[11]=h("span",{class:"info-key"},"累计 Token",-1)),h("span",Bw,E(a(u(e.status.usage.total))),1)])):Z("",!0),(k=e.status.usage)!=null&&k.currentTurn?(b(),x("div",Dw,[f[12]||(f[12]=h("span",{class:"info-key"},"当前回合",-1)),h("span",Gw,E(a(u(e.status.usage.currentTurn))),1)])):Z("",!0),d(e.status.usage).length?(b(),x(re,{key:2},[f[13]||(f[13]=h("div",{class:"info-subhead"},"按模型",-1)),(b(!0),x(re,null,Ve(d(e.status.usage),v=>(b(),x("div",{key:v.model,class:"info-row info-row-model"},[h("span",jw,E(v.model),1),h("span",Fw,E(a(v.tokens))+"(输出 "+E(a(v.output))+" · 缓存读 "+E(a(v.cacheRead))+")",1)]))),128))],64)):Z("",!0),g.value?Z("",!0):(b(),x("div",zw,"暂无用量数据"))],64))]}),_:1},8,["title"]))}}),Hw=Ce(Uw,[["__scopeId","data-v-407030a3"]]),qw={class:"sd-search-wrap"},Ww={class:"sd-icon"},Vw=["aria-selected","onClick","onMousemove"],Kw={class:"sd-title"},Zw={class:"sd-meta"},Yw={class:"sd-time"},Jw={class:"sd-count"},Xw={key:0,class:"sd-active"},Qw={key:0,class:"sd-empty"},e_=xe({__name:"SearchSessionsDialog",props:{sessions:{},activeId:{}},emits:["select","close"],setup(e,{emit:t}){const n=e,s=t,r=H(""),o=H(null),i=H(null),l=Q(()=>{const m=r.value.trim().toLowerCase();return m?n.sessions.filter(k=>k.title.toLowerCase().includes(m)||k.sessionId.toLowerCase().includes(m)):n.sessions}),a=H(0);Ne(r,()=>{a.value=0}),Ne(l,()=>{a.value=0});function c(m){const k=l.value.length;return k===0?0:Math.max(0,Math.min(k-1,m))}async function u(){var k;await Bt();const m=(k=i.value)==null?void 0:k.querySelector('[aria-selected="true"]');m==null||m.scrollIntoView({block:"nearest"})}function d(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(),d(1)):m.key==="ArrowUp"?(m.preventDefault(),d(-1)):m.key==="Enter"&&(m.preventDefault(),g())}function f(m){const k=new Date(m),v=new Date;return k.toDateString()===v.toDateString()?k.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):k.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}return Xt(()=>{var m;(m=o.value)==null||m.focus()}),(m,k)=>(b(),Ue(Yr,{open:!0,onClose:k[1]||(k[1]=v=>s("close"))},{header:et(()=>[h("div",qw,[h("span",Ww,[V(ge,{name:"search",size:19})]),st(h("input",{ref_key:"inputRef",ref:o,"onUpdate:modelValue":k[0]||(k[0]=v=>r.value=v),class:"sd-input",type:"text",placeholder:"搜索会话...",id:"session-search-input",name:"session-search",autocomplete:"off",spellcheck:"false",onKeydown:p},null,544),[[gt,r.value]])])]),footer:et(()=>[...k[2]||(k[2]=[h("span",{class:"sd-hint"},"↑↓ 导航 · Enter 切换 · Esc 关闭",-1)])]),default:et(()=>[h("div",{ref_key:"listRef",ref:i,class:"sd-list",role:"listbox"},[(b(!0),x(re,null,Ve(l.value,(v,S)=>(b(),x("button",{key:v.sessionId,class:be(["sd-row",{on:S===a.value,active:v.sessionId===e.activeId}]),role:"option","aria-selected":S===a.value,onClick:T=>{s("select",v.sessionId),s("close")},onMousemove:T=>a.value=S},[h("span",Kw,E(v.title||"New Session"),1),h("span",Zw,[h("span",Yw,E(f(v.createdAt)),1),h("span",Jw,E(v.messageCount)+" 条",1),v.active?(b(),x("span",Xw,"●")):Z("",!0)])],42,Vw))),128)),l.value.length===0?(b(),x("div",Qw,"没有匹配的会话")):Z("",!0)],512)]),_:1}))}}),t_=Ce(e_,[["__scopeId","data-v-62760c4c"]]),n_=xe({__name:"ResizeHandle",props:{dragging:{type:Boolean}},setup(e){return(t,n)=>(b(),x("div",{class:be(["resize-handle",{dragging:e.dragging}]),role:"separator","aria-orientation":"vertical","aria-label":"拖拽调整宽度"},null,2))}}),s_=Ce(n_,[["__scopeId","data-v-11060aea"]]),r_={class:"workbench-body"},o_={class:"chat-main chat-inset"},i_={class:"composer-dock"},fa="scream-sidebar-collapsed-v2",da="scream-rightbar-open",l_=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:d,isArchived:g,sessions:p,currentSessionId:f,gitStatus:m,models:k,sendPrompt:v,sendCommand:S,clearMessages:T,appendSystemMessage:w,abort:P,resolveApproval:K,createSession:D,switchSession:ue,deleteSession:q,exportSession:ee,fetchGitStatus:he,fetchSnapshot:j,switchModel:pe,switchThinking:M,refineGoal:A,createGoal:Y,updateGoal:ae,pauseGoal:te,resumeGoal:qe,cancelGoal:He,like:Ge,fetchLike:je,updateLike:Fe}=Oh(),Qt=H(null),ot=H(!1),tt=H("status"),bt=Q(()=>k.value.length>0);On("modelSwitchable",bt);const Tt=Q(()=>{const ce=p.value.find(de=>de.sessionId===f.value);return(ce==null?void 0:ce.title)??null}),N=H(!1),se=H(!1);try{N.value=localStorage.getItem(fa)==="1"}catch{}function ke(){return window.innerWidth<=640}function y(){if(ke()){se.value=!se.value;return}N.value=!N.value;try{localStorage.setItem(fa,N.value?"1":"0")}catch{}}function _(ce){se.value=!1,ue(ce)}const R=H(!0);try{R.value=localStorage.getItem(da)!=="0"}catch{}function B(){R.value=!R.value;try{localStorage.setItem(da,R.value?"1":"0")}catch{}}const O=H(!0),I=H(!0);On("showThinking",O),On("showTools",I);const W=H(!1);function U(ce){(ce.metaKey||ce.ctrlKey)&&ce.key==="k"&&(ce.preventDefault(),W.value=!W.value)}Xt(()=>{window.addEventListener("keydown",U),je()}),vn(()=>window.removeEventListener("keydown",U));const{width:F,dragging:L,onPointerDown:le}=Bh({storageKey:"scream-sidebar-width",defaultWidth:360,min:300,max:440});function J(){se.value=!1,D()}function oe(ce){var de;(de=Qt.value)==null||de.insertText(ce)}function ie(ce){j(),tt.value=ce,ot.value=!0}function me(){var de;(((de=Qt.value)==null?void 0:de.openModelPicker())??!1)||w(`当前模型:${r.value.model??"unknown"}`)}function _e(ce,de){switch(ce){case"compact":S("compact");break;case"model":me();break;case"clear":T();break;case"new":D();break;case"help":w(jh());break;case"auto":case"yes":case"plan":case"fork":case"title":case"btw":S(ce,de);break;case"status":ie("status");break;case"usage":ie("usage");break;default:w(`未知命令:/${ce}`)}}return(ce,de)=>(b(),x("div",{class:be(["workbench",{"sidebar-is-collapsed":N.value}]),style:fn({"--sidebar-width":X(F)+"px"})},[V(Xk,{sessions:X(p),"current-session-id":X(f),status:X(r),busy:X(d),collapsed:N.value,"mobile-open":se.value,onCreate:J,onSwitch:_,onDelete:X(q),onExport:X(ee),onToggle:y,onOpenSearch:de[0]||(de[0]=Le=>W.value=!0),onShowInfo:ie,onHelp:de[1]||(de[1]=Le=>_e("help"))},null,8,["sessions","current-session-id","status","busy","collapsed","mobile-open","onDelete","onExport"]),N.value?Z("",!0):(b(),Ue(s_,{key:0,class:"sidebar-resize",dragging:X(L),onPointerdown:X(le)},null,8,["dragging","onPointerdown"])),se.value?(b(),x("div",{key:1,class:"sidebar-backdrop","aria-hidden":"true",onClick:de[2]||(de[2]=Le=>se.value=!1)})):Z("",!0),V(zp,{"connection-status":X(t),status:X(r),busy:X(d),"git-status":X(m),onRefreshGit:X(he),onToggleSidebar:y,onOpenModelPicker:me},null,8,["connection-status","status","busy","git-status","onRefreshGit"]),h("main",r_,[h("div",o_,[V(eg,{title:Tt.value,busy:X(d),onRename:de[3]||(de[3]=Le=>X(S)("title",Le)),onExport:de[4]||(de[4]=Le=>X(f)&&X(ee)(X(f))),onClear:X(T),onToggleRightbar:B},null,8,["title","busy","onClear"]),V(R1,{messages:X(n),busy:X(d),"work-dir":X(u),"session-id":X(f)??"",onEdit:oe,onPick:X(v)},null,8,["messages","busy","work-dir","session-id","onPick"]),h("div",i_,[V(Ck,{approvals:X(s),onResolve:X(K)},null,8,["approvals","onResolve"]),V(fk,{ref_key:"composerRef",ref:Qt,busy:X(d),status:X(r),"session-id":X(c),models:X(k),onSend:X(v),onAbort:X(P),onCommand:_e,onSwitchModel:X(pe),onSwitchThinking:X(M)},null,8,["busy","status","session-id","models","onSend","onAbort","onSwitchModel","onSwitchThinking"])])]),h("div",{class:be(["rightbar-host",{"rightbar-collapsed":!R.value}])},[V(gw,{busy:X(d),"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(A),"create-goal":X(Y),"update-goal":X(ae),"pause-goal":X(te),"resume-goal":X(qe),"cancel-goal":X(He),like:X(Ge),"update-like":X(Fe),onInsert:oe},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"])],2)]),ot.value?(b(),Ue(Hw,{key:2,mode:tt.value,status:X(r),"session-id":X(c),"work-dir":X(u),onClose:de[5]||(de[5]=Le=>ot.value=!1)},null,8,["mode","status","session-id","work-dir"])):Z("",!0),W.value?(b(),Ue(t_,{key:3,sessions:X(p),"active-id":X(f),onSelect:_,onClose:de[6]||(de[6]=Le=>W.value=!1)},null,8,["sessions","active-id"])):Z("",!0)],6))}}),a_=Ce(l_,[["__scopeId","data-v-a0b2068b"]]),c_={class:"toast-container"},u_=["onClick"],f_={class:"toast-icon"},d_={class:"toast-msg"},h_=xe({__name:"Toast",setup(e){const{toasts:t,removeToast:n}=Mc(),s={info:"ℹ",success:"✓",error:"✗",warning:"⚠"};return(r,o)=>(b(),Ue(mi,{to:"body"},[h("div",c_,[V(dh,{name:"toast"},{default:et(()=>[(b(!0),x(re,null,Ve(X(t),i=>(b(),x("div",{key:i.id,class:be(["toast",`toast--${i.type}`]),onClick:l=>X(n)(i.id)},[h("span",f_,E(s[i.type]),1),h("span",d_,E(i.message),1)],10,u_))),128))]),_:1})])]))}}),p_=Ce(h_,[["__scopeId","data-v-7200727f"]]),g_={class:"app"},m_=xe({__name:"App",setup(e){const t=H("system"),n=H("dark");On("effectiveTheme",n),On("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 d=document.querySelector('meta[name="theme-color"]');d&&d.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)}On("setTheme",i),Xt(()=>{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),vn(()=>{l.removeEventListener("change",r),o!==null&&clearTimeout(o),document.documentElement.classList.remove("theme-transition")}),(a,c)=>(b(),x("div",g_,[V(a_),V(p_)]))}}),v_=Ce(m_,[["__scopeId","data-v-ba168d5b"]]);function y_(){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})}y_();Sh(v_).mount("#app");
90
+ //# sourceMappingURL=index-D4xKtk0T.js.map