MindMap/frontend/dist/assets/index-baaa8619.js

1790 lines
1.5 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var F2=Object.defineProperty;var q2=(t,e,n)=>e in t?F2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var mn=(t,e,n)=>(q2(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();/**
* @vue/shared v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function Ap(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const gn={},Jo=[],xi=()=>{},h4=()=>!1,Ac=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Mp=t=>t.startsWith("onUpdate:"),sr=Object.assign,Cp=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},j2=Object.prototype.hasOwnProperty,rn=(t,e)=>j2.call(t,e),It=Array.isArray,Qo=t=>Mc(t)==="[object Map]",p4=t=>Mc(t)==="[object Set]",Bt=t=>typeof t=="function",Vn=t=>typeof t=="string",io=t=>typeof t=="symbol",Rn=t=>t!==null&&typeof t=="object",f4=t=>(Rn(t)||Bt(t))&&Bt(t.then)&&Bt(t.catch),m4=Object.prototype.toString,Mc=t=>m4.call(t),$2=t=>Mc(t).slice(8,-1),g4=t=>Mc(t)==="[object Object]",Lp=t=>Vn(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,gl=Ap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Cc=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},U2=/-(\w)/g,Xa=Cc(t=>t.replace(U2,(e,n)=>n?n.toUpperCase():"")),V2=/\B([A-Z])/g,ao=Cc(t=>t.replace(V2,"-$1").toLowerCase()),v4=Cc(t=>t.charAt(0).toUpperCase()+t.slice(1)),Dd=Cc(t=>t?`on${v4(t)}`:""),Ka=(t,e)=>!Object.is(t,e),L0=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},b4=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},Ch=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let E1;const Lc=()=>E1||(E1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function os(t){if(It(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],o=Vn(r)?X2(r):os(r);if(o)for(const l in o)e[l]=o[l]}return e}else if(Vn(t)||Rn(t))return t}const W2=/;(?![^(]*\))/g,G2=/:([^]+)/,K2=/\/\*[^]*?\*\//g;function X2(t){const e={};return t.replace(K2,"").split(W2).forEach(n=>{if(n){const r=n.split(G2);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function ss(t){let e="";if(Vn(t))e=t;else if(It(t))for(let n=0;n<t.length;n++){const r=ss(t[n]);r&&(e+=r+" ")}else if(Rn(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const Z2="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Y2=Ap(Z2);function y4(t){return!!t||t===""}const w4=t=>!!(t&&t.__v_isRef===!0),Jr=t=>Vn(t)?t:t==null?"":It(t)||Rn(t)&&(t.toString===m4||!Bt(t.toString))?w4(t)?Jr(t.value):JSON.stringify(t,x4,2):String(t),x4=(t,e)=>w4(e)?x4(t,e.value):Qo(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,o],l)=>(n[Rd(r,l)+" =>"]=o,n),{})}:p4(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Rd(n))}:io(e)?Rd(e):Rn(e)&&!It(e)&&!g4(e)?String(e):e,Rd=(t,e="")=>{var n;return io(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/**
* @vue/reactivity v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Cr;class J2{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Cr,!e&&Cr&&(this.index=(Cr.scopes||(Cr.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){const n=Cr;try{return Cr=this,e()}finally{Cr=n}}}on(){++this._on===1&&(this.prevScope=Cr,Cr=this)}off(){this._on>0&&--this._on===0&&(Cr=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Q2(){return Cr}let yn;const Id=new WeakSet;class k4{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Cr&&Cr.active&&Cr.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Id.has(this)&&(Id.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||E4(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,T1(this),T4(this);const e=yn,n=ki;yn=this,ki=!0;try{return this.fn()}finally{A4(this),yn=e,ki=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Dp(e);this.deps=this.depsTail=void 0,T1(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Id.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Lh(this)&&this.run()}get dirty(){return Lh(this)}}let S4=0,vl,bl;function E4(t,e=!1){if(t.flags|=8,e){t.next=bl,bl=t;return}t.next=vl,vl=t}function _p(){S4++}function Np(){if(--S4>0)return;if(bl){let e=bl;for(bl=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;vl;){let e=vl;for(vl=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}function T4(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function A4(t){let e,n=t.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),Dp(r),e5(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}t.deps=e,t.depsTail=n}function Lh(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(M4(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function M4(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Ll)||(t.globalVersion=Ll,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Lh(t))))return;t.flags|=2;const e=t.dep,n=yn,r=ki;yn=t,ki=!0;try{T4(t);const o=t.fn(t._value);(e.version===0||Ka(o,t._value))&&(t.flags|=128,t._value=o,e.version++)}catch(o){throw e.version++,o}finally{yn=n,ki=r,A4(t),t.flags&=-3}}function Dp(t,e=!1){const{dep:n,prevSub:r,nextSub:o}=t;if(r&&(r.nextSub=o,t.prevSub=void 0),o&&(o.prevSub=r,t.nextSub=void 0),n.subs===t&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)Dp(l,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function e5(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let ki=!0;const C4=[];function Sa(){C4.push(ki),ki=!1}function Ea(){const t=C4.pop();ki=t===void 0?!0:t}function T1(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=yn;yn=void 0;try{e()}finally{yn=n}}}let Ll=0;class t5{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Rp{constructor(e){this.computed=e,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(e){if(!yn||!ki||yn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==yn)n=this.activeLink=new t5(yn,this),yn.deps?(n.prevDep=yn.depsTail,yn.depsTail.nextDep=n,yn.depsTail=n):yn.deps=yn.depsTail=n,L4(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=yn.depsTail,n.nextDep=void 0,yn.depsTail.nextDep=n,yn.depsTail=n,yn.deps===n&&(yn.deps=r)}return n}trigger(e){this.version++,Ll++,this.notify(e)}notify(e){_p();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Np()}}}function L4(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let r=e.deps;r;r=r.nextDep)L4(r)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const _h=new WeakMap,No=Symbol(""),Nh=Symbol(""),_l=Symbol("");function hr(t,e,n){if(ki&&yn){let r=_h.get(t);r||_h.set(t,r=new Map);let o=r.get(n);o||(r.set(n,o=new Rp),o.map=r,o.key=n),o.track()}}function da(t,e,n,r,o,l){const h=_h.get(t);if(!h){Ll++;return}const c=p=>{p&&p.trigger()};if(_p(),e==="clear")h.forEach(c);else{const p=It(t),v=p&&Lp(n);if(p&&n==="length"){const b=Number(r);h.forEach((g,m)=>{(m==="length"||m===_l||!io(m)&&m>=b)&&c(g)})}else switch((n!==void 0||h.has(void 0))&&c(h.get(n)),v&&c(h.get(_l)),e){case"add":p?v&&c(h.get("length")):(c(h.get(No)),Qo(t)&&c(h.get(Nh)));break;case"delete":p||(c(h.get(No)),Qo(t)&&c(h.get(Nh)));break;case"set":Qo(t)&&c(h.get(No));break}}Np()}function $o(t){const e=nn(t);return e===t?e:(hr(e,"iterate",_l),ni(t)?e:e.map(or))}function _c(t){return hr(t=nn(t),"iterate",_l),t}const n5={__proto__:null,[Symbol.iterator](){return Od(this,Symbol.iterator,or)},concat(...t){return $o(this).concat(...t.map(e=>It(e)?$o(e):e))},entries(){return Od(this,"entries",t=>(t[1]=or(t[1]),t))},every(t,e){return aa(this,"every",t,e,void 0,arguments)},filter(t,e){return aa(this,"filter",t,e,n=>n.map(or),arguments)},find(t,e){return aa(this,"find",t,e,or,arguments)},findIndex(t,e){return aa(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return aa(this,"findLast",t,e,or,arguments)},findLastIndex(t,e){return aa(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return aa(this,"forEach",t,e,void 0,arguments)},includes(...t){return Hd(this,"includes",t)},indexOf(...t){return Hd(this,"indexOf",t)},join(t){return $o(this).join(t)},lastIndexOf(...t){return Hd(this,"lastIndexOf",t)},map(t,e){return aa(this,"map",t,e,void 0,arguments)},pop(){return Qs(this,"pop")},push(...t){return Qs(this,"push",t)},reduce(t,...e){return A1(this,"reduce",t,e)},reduceRight(t,...e){return A1(this,"reduceRight",t,e)},shift(){return Qs(this,"shift")},some(t,e){return aa(this,"some",t,e,void 0,arguments)},splice(...t){return Qs(this,"splice",t)},toReversed(){return $o(this).toReversed()},toSorted(t){return $o(this).toSorted(t)},toSpliced(...t){return $o(this).toSpliced(...t)},unshift(...t){return Qs(this,"unshift",t)},values(){return Od(this,"values",or)}};function Od(t,e,n){const r=_c(t),o=r[e]();return r!==t&&!ni(t)&&(o._next=o.next,o.next=()=>{const l=o._next();return l.value&&(l.value=n(l.value)),l}),o}const r5=Array.prototype;function aa(t,e,n,r,o,l){const h=_c(t),c=h!==t&&!ni(t),p=h[e];if(p!==r5[e]){const g=p.apply(t,l);return c?or(g):g}let v=n;h!==t&&(c?v=function(g,m){return n.call(this,or(g),m,t)}:n.length>2&&(v=function(g,m){return n.call(this,g,m,t)}));const b=p.call(h,v,r);return c&&o?o(b):b}function A1(t,e,n,r){const o=_c(t);let l=n;return o!==t&&(ni(t)?n.length>3&&(l=function(h,c,p){return n.call(this,h,c,p,t)}):l=function(h,c,p){return n.call(this,h,or(c),p,t)}),o[e](l,...r)}function Hd(t,e,n){const r=nn(t);hr(r,"iterate",_l);const o=r[e](...n);return(o===-1||o===!1)&&Pp(n[0])?(n[0]=nn(n[0]),r[e](...n)):o}function Qs(t,e,n=[]){Sa(),_p();const r=nn(t)[e].apply(t,n);return Np(),Ea(),r}const i5=Ap("__proto__,__v_isRef,__isVue"),_4=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(io));function a5(t){io(t)||(t=String(t));const e=nn(this);return hr(e,"has",t),e.hasOwnProperty(t)}class N4{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;const o=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return l;if(n==="__v_raw")return r===(o?l?m5:O4:l?I4:R4).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const h=It(e);if(!o){let p;if(h&&(p=n5[n]))return p;if(n==="hasOwnProperty")return a5}const c=Reflect.get(e,n,fr(e)?e:r);return(io(n)?_4.has(n):i5(n))||(o||hr(e,"get",n),l)?c:fr(c)?h&&Lp(n)?c:c.value:Rn(c)?o?H4(c):Op(c):c}}class D4 extends N4{constructor(e=!1){super(!1,e)}set(e,n,r,o){let l=e[n];if(!this._isShallow){const p=Za(l);if(!ni(r)&&!Za(r)&&(l=nn(l),r=nn(r)),!It(e)&&fr(l)&&!fr(r))return p||(l.value=r),!0}const h=It(e)&&Lp(n)?Number(n)<e.length:rn(e,n),c=Reflect.set(e,n,r,fr(e)?e:o);return e===nn(o)&&(h?Ka(r,l)&&da(e,"set",n,r):da(e,"add",n,r)),c}deleteProperty(e,n){const r=rn(e,n);e[n];const o=Reflect.deleteProperty(e,n);return o&&r&&da(e,"delete",n,void 0),o}has(e,n){const r=Reflect.has(e,n);return(!io(n)||!_4.has(n))&&hr(e,"has",n),r}ownKeys(e){return hr(e,"iterate",It(e)?"length":No),Reflect.ownKeys(e)}}class o5 extends N4{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const s5=new D4,l5=new o5,c5=new D4(!0);const Dh=t=>t,t0=t=>Reflect.getPrototypeOf(t);function u5(t,e,n){return function(...r){const o=this.__v_raw,l=nn(o),h=Qo(l),c=t==="entries"||t===Symbol.iterator&&h,p=t==="keys"&&h,v=o[t](...r),b=n?Dh:e?V0:or;return!e&&hr(l,"iterate",p?Nh:No),{next(){const{value:g,done:m}=v.next();return m?{value:g,done:m}:{value:c?[b(g[0]),b(g[1])]:b(g),done:m}},[Symbol.iterator](){return this}}}}function n0(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function d5(t,e){const n={get(o){const l=this.__v_raw,h=nn(l),c=nn(o);t||(Ka(o,c)&&hr(h,"get",o),hr(h,"get",c));const{has:p}=t0(h),v=e?Dh:t?V0:or;if(p.call(h,o))return v(l.get(o));if(p.call(h,c))return v(l.get(c));l!==h&&l.get(o)},get size(){const o=this.__v_raw;return!t&&hr(nn(o),"iterate",No),o.size},has(o){const l=this.__v_raw,h=nn(l),c=nn(o);return t||(Ka(o,c)&&hr(h,"has",o),hr(h,"has",c)),o===c?l.has(o):l.has(o)||l.has(c)},forEach(o,l){const h=this,c=h.__v_raw,p=nn(c),v=e?Dh:t?V0:or;return!t&&hr(p,"iterate",No),c.forEach((b,g)=>o.call(l,v(b),v(g),h))}};return sr(n,t?{add:n0("add"),set:n0("set"),delete:n0("delete"),clear:n0("clear")}:{add(o){!e&&!ni(o)&&!Za(o)&&(o=nn(o));const l=nn(this);return t0(l).has.call(l,o)||(l.add(o),da(l,"add",o,o)),this},set(o,l){!e&&!ni(l)&&!Za(l)&&(l=nn(l));const h=nn(this),{has:c,get:p}=t0(h);let v=c.call(h,o);v||(o=nn(o),v=c.call(h,o));const b=p.call(h,o);return h.set(o,l),v?Ka(l,b)&&da(h,"set",o,l):da(h,"add",o,l),this},delete(o){const l=nn(this),{has:h,get:c}=t0(l);let p=h.call(l,o);p||(o=nn(o),p=h.call(l,o)),c&&c.call(l,o);const v=l.delete(o);return p&&da(l,"delete",o,void 0),v},clear(){const o=nn(this),l=o.size!==0,h=o.clear();return l&&da(o,"clear",void 0,void 0),h}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=u5(o,t,e)}),n}function Ip(t,e){const n=d5(t,e);return(r,o,l)=>o==="__v_isReactive"?!t:o==="__v_isReadonly"?t:o==="__v_raw"?r:Reflect.get(rn(n,o)&&o in r?n:r,o,l)}const h5={get:Ip(!1,!1)},p5={get:Ip(!1,!0)},f5={get:Ip(!0,!1)};const R4=new WeakMap,I4=new WeakMap,O4=new WeakMap,m5=new WeakMap;function g5(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function v5(t){return t.__v_skip||!Object.isExtensible(t)?0:g5($2(t))}function Op(t){return Za(t)?t:Hp(t,!1,s5,h5,R4)}function b5(t){return Hp(t,!1,c5,p5,I4)}function H4(t){return Hp(t,!0,l5,f5,O4)}function Hp(t,e,n,r,o){if(!Rn(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const l=v5(t);if(l===0)return t;const h=o.get(t);if(h)return h;const c=new Proxy(t,l===2?r:n);return o.set(t,c),c}function es(t){return Za(t)?es(t.__v_raw):!!(t&&t.__v_isReactive)}function Za(t){return!!(t&&t.__v_isReadonly)}function ni(t){return!!(t&&t.__v_isShallow)}function Pp(t){return t?!!t.__v_raw:!1}function nn(t){const e=t&&t.__v_raw;return e?nn(e):t}function y5(t){return!rn(t,"__v_skip")&&Object.isExtensible(t)&&b4(t,"__v_skip",!0),t}const or=t=>Rn(t)?Op(t):t,V0=t=>Rn(t)?H4(t):t;function fr(t){return t?t.__v_isRef===!0:!1}function yt(t){return w5(t,!1)}function w5(t,e){return fr(t)?t:new x5(t,e)}class x5{constructor(e,n){this.dep=new Rp,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:nn(e),this._value=n?e:or(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,r=this.__v_isShallow||ni(e)||Za(e);e=r?e:nn(e),Ka(e,n)&&(this._rawValue=e,this._value=r?e:or(e),this.dep.trigger())}}function k5(t){return fr(t)?t.value:t}const S5={get:(t,e,n)=>e==="__v_raw"?t:k5(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const o=t[e];return fr(o)&&!fr(n)?(o.value=n,!0):Reflect.set(t,e,n,r)}};function P4(t){return es(t)?t:new Proxy(t,S5)}class E5{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new Rp(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ll-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&yn!==this)return E4(this,!0),!0}get value(){const e=this.dep.track();return M4(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function T5(t,e,n=!1){let r,o;return Bt(t)?r=t:(r=t.get,o=t.set),new E5(r,o,n)}const r0={},W0=new WeakMap;let Lo;function A5(t,e=!1,n=Lo){if(n){let r=W0.get(n);r||W0.set(n,r=[]),r.push(t)}}function M5(t,e,n=gn){const{immediate:r,deep:o,once:l,scheduler:h,augmentJob:c,call:p}=n,v=M=>o?M:ni(M)||o===!1||o===0?ha(M,1):ha(M);let b,g,m,x,w=!1,S=!1;if(fr(t)?(g=()=>t.value,w=ni(t)):es(t)?(g=()=>v(t),w=!0):It(t)?(S=!0,w=t.some(M=>es(M)||ni(M)),g=()=>t.map(M=>{if(fr(M))return M.value;if(es(M))return v(M);if(Bt(M))return p?p(M,2):M()})):Bt(t)?e?g=p?()=>p(t,2):t:g=()=>{if(m){Sa();try{m()}finally{Ea()}}const M=Lo;Lo=b;try{return p?p(t,3,[x]):t(x)}finally{Lo=M}}:g=xi,e&&o){const M=g,y=o===!0?1/0:o;g=()=>ha(M(),y)}const k=Q2(),C=()=>{b.stop(),k&&k.active&&Cp(k.effects,b)};if(l&&e){const M=e;e=(...y)=>{M(...y),C()}}let T=S?new Array(t.length).fill(r0):r0;const A=M=>{if(!(!(b.flags&1)||!b.dirty&&!M))if(e){const y=b.run();if(o||w||(S?y.some((N,z)=>Ka(N,T[z])):Ka(y,T))){m&&m();const N=Lo;Lo=b;try{const z=[y,T===r0?void 0:S&&T[0]===r0?[]:T,x];T=y,p?p(e,3,z):e(...z)}finally{Lo=N}}}else b.run()};return c&&c(A),b=new k4(g),b.scheduler=h?()=>h(A,!1):A,x=M=>A5(M,!1,b),m=b.onStop=()=>{const M=W0.get(b);if(M){if(p)p(M,4);else for(const y of M)y();W0.delete(b)}},e?r?A(!0):T=b.run():h?h(A.bind(null,!0),!0):b.run(),C.pause=b.pause.bind(b),C.resume=b.resume.bind(b),C.stop=C,C}function ha(t,e=1/0,n){if(e<=0||!Rn(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,fr(t))ha(t.value,e,n);else if(It(t))for(let r=0;r<t.length;r++)ha(t[r],e,n);else if(p4(t)||Qo(t))t.forEach(r=>{ha(r,e,n)});else if(g4(t)){for(const r in t)ha(t[r],e,n);for(const r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&ha(t[r],e,n)}return t}/**
* @vue/runtime-core v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Bl(t,e,n,r){try{return r?t(...r):t()}catch(o){Nc(o,e,n)}}function Ui(t,e,n,r){if(Bt(t)){const o=Bl(t,e,n,r);return o&&f4(o)&&o.catch(l=>{Nc(l,e,n)}),o}if(It(t)){const o=[];for(let l=0;l<t.length;l++)o.push(Ui(t[l],e,n,r));return o}}function Nc(t,e,n,r=!0){const o=e?e.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:h}=e&&e.appContext.config||gn;if(e){let c=e.parent;const p=e.proxy,v=`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const b=c.ec;if(b){for(let g=0;g<b.length;g++)if(b[g](t,p,v)===!1)return}c=c.parent}if(l){Sa(),Bl(l,null,10,[t,p,v]),Ea();return}}C5(t,n,o,r,h)}function C5(t,e,n,r=!0,o=!1){if(o)throw t;console.error(t)}const yr=[];let Hi=-1;const ts=[];let $a=null,Xo=0;const z4=Promise.resolve();let G0=null;function ja(t){const e=G0||z4;return t?e.then(this?t.bind(this):t):e}function L5(t){let e=Hi+1,n=yr.length;for(;e<n;){const r=e+n>>>1,o=yr[r],l=Nl(o);l<t||l===t&&o.flags&2?e=r+1:n=r}return e}function zp(t){if(!(t.flags&1)){const e=Nl(t),n=yr[yr.length-1];!n||!(t.flags&2)&&e>=Nl(n)?yr.push(t):yr.splice(L5(e),0,t),t.flags|=1,B4()}}function B4(){G0||(G0=z4.then(q4))}function _5(t){It(t)?ts.push(...t):$a&&t.id===-1?$a.splice(Xo+1,0,t):t.flags&1||(ts.push(t),t.flags|=1),B4()}function M1(t,e,n=Hi+1){for(;n<yr.length;n++){const r=yr[n];if(r&&r.flags&2){if(t&&r.id!==t.uid)continue;yr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function F4(t){if(ts.length){const e=[...new Set(ts)].sort((n,r)=>Nl(n)-Nl(r));if(ts.length=0,$a){$a.push(...e);return}for($a=e,Xo=0;Xo<$a.length;Xo++){const n=$a[Xo];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}$a=null,Xo=0}}const Nl=t=>t.id==null?t.flags&2?-1:1/0:t.id;function q4(t){const e=xi;try{for(Hi=0;Hi<yr.length;Hi++){const n=yr[Hi];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Bl(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Hi<yr.length;Hi++){const n=yr[Hi];n&&(n.flags&=-2)}Hi=-1,yr.length=0,F4(),G0=null,(yr.length||ts.length)&&q4()}}let Qr=null,j4=null;function K0(t){const e=Qr;return Qr=t,j4=t&&t.type.__scopeId||null,e}function N5(t,e=Qr,n){if(!e||t._n)return t;const r=(...o)=>{r._d&&O1(-1);const l=K0(e);let h;try{h=t(...o)}finally{K0(l),r._d&&O1(1)}return h};return r._n=!0,r._c=!0,r._d=!0,r}function X0(t,e){if(Qr===null)return t;const n=Hc(Qr),r=t.dirs||(t.dirs=[]);for(let o=0;o<e.length;o++){let[l,h,c,p=gn]=e[o];l&&(Bt(l)&&(l={mounted:l,updated:l}),l.deep&&ha(h),r.push({dir:l,instance:n,value:h,oldValue:void 0,arg:c,modifiers:p}))}return t}function ko(t,e,n,r){const o=t.dirs,l=e&&e.dirs;for(let h=0;h<o.length;h++){const c=o[h];l&&(c.oldValue=l[h].value);let p=c.dir[r];p&&(Sa(),Ui(p,n,8,[t.el,c,t,e]),Ea())}}const D5=Symbol("_vte"),R5=t=>t.__isTeleport,I5=Symbol("_leaveCb");function Bp(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Bp(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function $4(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function yl(t,e,n,r,o=!1){if(It(t)){t.forEach((w,S)=>yl(w,e&&(It(e)?e[S]:e),n,r,o));return}if(wl(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&yl(t,e,n,r.component.subTree);return}const l=r.shapeFlag&4?Hc(r.component):r.el,h=o?null:l,{i:c,r:p}=t,v=e&&e.r,b=c.refs===gn?c.refs={}:c.refs,g=c.setupState,m=nn(g),x=g===gn?h4:w=>rn(m,w);if(v!=null&&v!==p){if(Vn(v))b[v]=null,x(v)&&(g[v]=null);else if(fr(v)){v.value=null;const w=e;w.k&&(b[w.k]=null)}}if(Bt(p))Bl(p,c,12,[h,b]);else{const w=Vn(p),S=fr(p);if(w||S){const k=()=>{if(t.f){const C=w?x(p)?g[p]:b[p]:p.value;if(o)It(C)&&Cp(C,l);else if(It(C))C.includes(l)||C.push(l);else if(w)b[p]=[l],x(p)&&(g[p]=b[p]);else{const T=[l];p.value=T,t.k&&(b[t.k]=T)}}else w?(b[p]=h,x(p)&&(g[p]=h)):S&&(p.value=h,t.k&&(b[t.k]=h))};h?(k.id=-1,qr(k,n)):k()}}}Lc().requestIdleCallback;Lc().cancelIdleCallback;const wl=t=>!!t.type.__asyncLoader,U4=t=>t.type.__isKeepAlive;function O5(t,e){V4(t,"a",e)}function H5(t,e){V4(t,"da",e)}function V4(t,e,n=wr){const r=t.__wdc||(t.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return t()});if(Dc(e,r,n),n){let o=n.parent;for(;o&&o.parent;)U4(o.parent.vnode)&&P5(r,e,n,o),o=o.parent}}function P5(t,e,n,r){const o=Dc(e,t,r,!0);Rc(()=>{Cp(r[e],o)},n)}function Dc(t,e,n=wr,r=!1){if(n){const o=n[t]||(n[t]=[]),l=e.__weh||(e.__weh=(...h)=>{Sa();const c=Fl(n),p=Ui(e,n,t,h);return c(),Ea(),p});return r?o.unshift(l):o.push(l),l}}const Na=t=>(e,n=wr)=>{(!Rl||t==="sp")&&Dc(t,(...r)=>e(...r),n)},z5=Na("bm"),Fp=Na("m"),B5=Na("bu"),F5=Na("u"),q5=Na("bum"),Rc=Na("um"),j5=Na("sp"),$5=Na("rtg"),U5=Na("rtc");function V5(t,e=wr){Dc("ec",t,e)}const W5=Symbol.for("v-ndc");function W4(t,e,n,r){let o;const l=n&&n[r],h=It(t);if(h||Vn(t)){const c=h&&es(t);let p=!1,v=!1;c&&(p=!ni(t),v=Za(t),t=_c(t)),o=new Array(t.length);for(let b=0,g=t.length;b<g;b++)o[b]=e(p?v?V0(or(t[b])):or(t[b]):t[b],b,void 0,l&&l[b])}else if(typeof t=="number"){o=new Array(t);for(let c=0;c<t;c++)o[c]=e(c+1,c,void 0,l&&l[c])}else if(Rn(t))if(t[Symbol.iterator])o=Array.from(t,(c,p)=>e(c,p,void 0,l&&l[p]));else{const c=Object.keys(t);o=new Array(c.length);for(let p=0,v=c.length;p<v;p++){const b=c[p];o[p]=e(t[b],b,p,l&&l[p])}}else o=[];return n&&(n[r]=o),o}const Rh=t=>t?hv(t)?Hc(t):Rh(t.parent):null,xl=sr(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Rh(t.parent),$root:t=>Rh(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>qp(t),$forceUpdate:t=>t.f||(t.f=()=>{zp(t.update)}),$nextTick:t=>t.n||(t.n=ja.bind(t.proxy)),$watch:t=>fb.bind(t)}),Pd=(t,e)=>t!==gn&&!t.__isScriptSetup&&rn(t,e),G5={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:l,accessCache:h,type:c,appContext:p}=t;let v;if(e[0]!=="$"){const x=h[e];if(x!==void 0)switch(x){case 1:return r[e];case 2:return o[e];case 4:return n[e];case 3:return l[e]}else{if(Pd(r,e))return h[e]=1,r[e];if(o!==gn&&rn(o,e))return h[e]=2,o[e];if((v=t.propsOptions[0])&&rn(v,e))return h[e]=3,l[e];if(n!==gn&&rn(n,e))return h[e]=4,n[e];Ih&&(h[e]=0)}}const b=xl[e];let g,m;if(b)return e==="$attrs"&&hr(t.attrs,"get",""),b(t);if((g=c.__cssModules)&&(g=g[e]))return g;if(n!==gn&&rn(n,e))return h[e]=4,n[e];if(m=p.config.globalProperties,rn(m,e))return m[e]},set({_:t},e,n){const{data:r,setupState:o,ctx:l}=t;return Pd(o,e)?(o[e]=n,!0):r!==gn&&rn(r,e)?(r[e]=n,!0):rn(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(l[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:o,propsOptions:l,type:h}},c){let p,v;return!!(n[c]||t!==gn&&c[0]!=="$"&&rn(t,c)||Pd(e,c)||(p=l[0])&&rn(p,c)||rn(r,c)||rn(xl,c)||rn(o.config.globalProperties,c)||(v=h.__cssModules)&&v[c])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:rn(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function C1(t){return It(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let Ih=!0;function K5(t){const e=qp(t),n=t.proxy,r=t.ctx;Ih=!1,e.beforeCreate&&L1(e.beforeCreate,t,"bc");const{data:o,computed:l,methods:h,watch:c,provide:p,inject:v,created:b,beforeMount:g,mounted:m,beforeUpdate:x,updated:w,activated:S,deactivated:k,beforeDestroy:C,beforeUnmount:T,destroyed:A,unmounted:M,render:y,renderTracked:N,renderTriggered:z,errorCaptured:F,serverPrefetch:P,expose:Y,inheritAttrs:te,components:ce,directives:Me,filters:Fe}=e;if(v&&X5(v,r,null),h)for(const je in h){const Ne=h[je];Bt(Ne)&&(r[je]=Ne.bind(n))}if(o){const je=o.call(n,n);Rn(je)&&(t.data=Op(je))}if(Ih=!0,l)for(const je in l){const Ne=l[je],nt=Bt(Ne)?Ne.bind(n,n):Bt(Ne.get)?Ne.get.bind(n,n):xi,ct=!Bt(Ne)&&Bt(Ne.set)?Ne.set.bind(n):xi,tt=fv({get:nt,set:ct});Object.defineProperty(r,je,{enumerable:!0,configurable:!0,get:()=>tt.value,set:q=>tt.value=q})}if(c)for(const je in c)G4(c[je],r,n,je);if(p){const je=Bt(p)?p.call(n):p;Reflect.ownKeys(je).forEach(Ne=>{tb(Ne,je[Ne])})}b&&L1(b,t,"c");function rt(je,Ne){It(Ne)?Ne.forEach(nt=>je(nt.bind(n))):Ne&&je(Ne.bind(n))}if(rt(z5,g),rt(Fp,m),rt(B5,x),rt(F5,w),rt(O5,S),rt(H5,k),rt(V5,F),rt(U5,N),rt($5,z),rt(q5,T),rt(Rc,M),rt(j5,P),It(Y))if(Y.length){const je=t.exposed||(t.exposed={});Y.forEach(Ne=>{Object.defineProperty(je,Ne,{get:()=>n[Ne],set:nt=>n[Ne]=nt,enumerable:!0})})}else t.exposed||(t.exposed={});y&&t.render===xi&&(t.render=y),te!=null&&(t.inheritAttrs=te),ce&&(t.components=ce),Me&&(t.directives=Me),P&&$4(t)}function X5(t,e,n=xi){It(t)&&(t=Oh(t));for(const r in t){const o=t[r];let l;Rn(o)?"default"in o?l=_0(o.from||r,o.default,!0):l=_0(o.from||r):l=_0(o),fr(l)?Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>l.value,set:h=>l.value=h}):e[r]=l}}function L1(t,e,n){Ui(It(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function G4(t,e,n,r){let o=r.includes(".")?ov(n,r):()=>n[r];if(Vn(t)){const l=e[t];Bt(l)&&kl(o,l)}else if(Bt(t))kl(o,t.bind(n));else if(Rn(t))if(It(t))t.forEach(l=>G4(l,e,n,r));else{const l=Bt(t.handler)?t.handler.bind(n):e[t.handler];Bt(l)&&kl(o,l,t)}}function qp(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:o,optionsCache:l,config:{optionMergeStrategies:h}}=t.appContext,c=l.get(e);let p;return c?p=c:!o.length&&!n&&!r?p=e:(p={},o.length&&o.forEach(v=>Z0(p,v,h,!0)),Z0(p,e,h)),Rn(e)&&l.set(e,p),p}function Z0(t,e,n,r=!1){const{mixins:o,extends:l}=e;l&&Z0(t,l,n,!0),o&&o.forEach(h=>Z0(t,h,n,!0));for(const h in e)if(!(r&&h==="expose")){const c=Z5[h]||n&&n[h];t[h]=c?c(t[h],e[h]):e[h]}return t}const Z5={data:_1,props:N1,emits:N1,methods:hl,computed:hl,beforeCreate:br,created:br,beforeMount:br,mounted:br,beforeUpdate:br,updated:br,beforeDestroy:br,beforeUnmount:br,destroyed:br,unmounted:br,activated:br,deactivated:br,errorCaptured:br,serverPrefetch:br,components:hl,directives:hl,watch:J5,provide:_1,inject:Y5};function _1(t,e){return e?t?function(){return sr(Bt(t)?t.call(this,this):t,Bt(e)?e.call(this,this):e)}:e:t}function Y5(t,e){return hl(Oh(t),Oh(e))}function Oh(t){if(It(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function br(t,e){return t?[...new Set([].concat(t,e))]:e}function hl(t,e){return t?sr(Object.create(null),t,e):e}function N1(t,e){return t?It(t)&&It(e)?[...new Set([...t,...e])]:sr(Object.create(null),C1(t),C1(e??{})):e}function J5(t,e){if(!t)return e;if(!e)return t;const n=sr(Object.create(null),t);for(const r in e)n[r]=br(t[r],e[r]);return n}function K4(){return{app:null,config:{isNativeTag:h4,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 Q5=0;function eb(t,e){return function(r,o=null){Bt(r)||(r=sr({},r)),o!=null&&!Rn(o)&&(o=null);const l=K4(),h=new WeakSet,c=[];let p=!1;const v=l.app={_uid:Q5++,_component:r,_props:o,_container:null,_context:l,_instance:null,version:Hb,get config(){return l.config},set config(b){},use(b,...g){return h.has(b)||(b&&Bt(b.install)?(h.add(b),b.install(v,...g)):Bt(b)&&(h.add(b),b(v,...g))),v},mixin(b){return l.mixins.includes(b)||l.mixins.push(b),v},component(b,g){return g?(l.components[b]=g,v):l.components[b]},directive(b,g){return g?(l.directives[b]=g,v):l.directives[b]},mount(b,g,m){if(!p){const x=v._ceVNode||Gr(r,o);return x.appContext=l,m===!0?m="svg":m===!1&&(m=void 0),g&&e?e(x,b):t(x,b,m),p=!0,v._container=b,b.__vue_app__=v,Hc(x.component)}},onUnmount(b){c.push(b)},unmount(){p&&(Ui(c,v._instance,16),t(null,v._container),delete v._container.__vue_app__)},provide(b,g){return l.provides[b]=g,v},runWithContext(b){const g=ns;ns=v;try{return b()}finally{ns=g}}};return v}}let ns=null;function tb(t,e){if(wr){let n=wr.provides;const r=wr.parent&&wr.parent.provides;r===n&&(n=wr.provides=Object.create(r)),n[t]=e}}function _0(t,e,n=!1){const r=_b();if(r||ns){let o=ns?ns._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&t in o)return o[t];if(arguments.length>1)return n&&Bt(e)?e.call(r&&r.proxy):e}}const X4={},Z4=()=>Object.create(X4),Y4=t=>Object.getPrototypeOf(t)===X4;function nb(t,e,n,r=!1){const o={},l=Z4();t.propsDefaults=Object.create(null),J4(t,e,o,l);for(const h in t.propsOptions[0])h in o||(o[h]=void 0);n?t.props=r?o:b5(o):t.type.props?t.props=o:t.props=l,t.attrs=l}function rb(t,e,n,r){const{props:o,attrs:l,vnode:{patchFlag:h}}=t,c=nn(o),[p]=t.propsOptions;let v=!1;if((r||h>0)&&!(h&16)){if(h&8){const b=t.vnode.dynamicProps;for(let g=0;g<b.length;g++){let m=b[g];if(Ic(t.emitsOptions,m))continue;const x=e[m];if(p)if(rn(l,m))x!==l[m]&&(l[m]=x,v=!0);else{const w=Xa(m);o[w]=Hh(p,c,w,x,t,!1)}else x!==l[m]&&(l[m]=x,v=!0)}}}else{J4(t,e,o,l)&&(v=!0);let b;for(const g in c)(!e||!rn(e,g)&&((b=ao(g))===g||!rn(e,b)))&&(p?n&&(n[g]!==void 0||n[b]!==void 0)&&(o[g]=Hh(p,c,g,void 0,t,!0)):delete o[g]);if(l!==c)for(const g in l)(!e||!rn(e,g))&&(delete l[g],v=!0)}v&&da(t.attrs,"set","")}function J4(t,e,n,r){const[o,l]=t.propsOptions;let h=!1,c;if(e)for(let p in e){if(gl(p))continue;const v=e[p];let b;o&&rn(o,b=Xa(p))?!l||!l.includes(b)?n[b]=v:(c||(c={}))[b]=v:Ic(t.emitsOptions,p)||(!(p in r)||v!==r[p])&&(r[p]=v,h=!0)}if(l){const p=nn(n),v=c||gn;for(let b=0;b<l.length;b++){const g=l[b];n[g]=Hh(o,p,g,v[g],t,!rn(v,g))}}return h}function Hh(t,e,n,r,o,l){const h=t[n];if(h!=null){const c=rn(h,"default");if(c&&r===void 0){const p=h.default;if(h.type!==Function&&!h.skipFactory&&Bt(p)){const{propsDefaults:v}=o;if(n in v)r=v[n];else{const b=Fl(o);r=v[n]=p.call(null,e),b()}}else r=p;o.ce&&o.ce._setProp(n,r)}h[0]&&(l&&!c?r=!1:h[1]&&(r===""||r===ao(n))&&(r=!0))}return r}const ib=new WeakMap;function Q4(t,e,n=!1){const r=n?ib:e.propsCache,o=r.get(t);if(o)return o;const l=t.props,h={},c=[];let p=!1;if(!Bt(t)){const b=g=>{p=!0;const[m,x]=Q4(g,e,!0);sr(h,m),x&&c.push(...x)};!n&&e.mixins.length&&e.mixins.forEach(b),t.extends&&b(t.extends),t.mixins&&t.mixins.forEach(b)}if(!l&&!p)return Rn(t)&&r.set(t,Jo),Jo;if(It(l))for(let b=0;b<l.length;b++){const g=Xa(l[b]);D1(g)&&(h[g]=gn)}else if(l)for(const b in l){const g=Xa(b);if(D1(g)){const m=l[b],x=h[g]=It(m)||Bt(m)?{type:m}:sr({},m),w=x.type;let S=!1,k=!0;if(It(w))for(let C=0;C<w.length;++C){const T=w[C],A=Bt(T)&&T.name;if(A==="Boolean"){S=!0;break}else A==="String"&&(k=!1)}else S=Bt(w)&&w.name==="Boolean";x[0]=S,x[1]=k,(S||rn(x,"default"))&&c.push(g)}}const v=[h,c];return Rn(t)&&r.set(t,v),v}function D1(t){return t[0]!=="$"&&!gl(t)}const jp=t=>t==="_"||t==="_ctx"||t==="$stable",$p=t=>It(t)?t.map(Pi):[Pi(t)],ab=(t,e,n)=>{if(e._n)return e;const r=N5((...o)=>$p(e(...o)),n);return r._c=!1,r},ev=(t,e,n)=>{const r=t._ctx;for(const o in t){if(jp(o))continue;const l=t[o];if(Bt(l))e[o]=ab(o,l,r);else if(l!=null){const h=$p(l);e[o]=()=>h}}},tv=(t,e)=>{const n=$p(e);t.slots.default=()=>n},nv=(t,e,n)=>{for(const r in e)(n||!jp(r))&&(t[r]=e[r])},ob=(t,e,n)=>{const r=t.slots=Z4();if(t.vnode.shapeFlag&32){const o=e._;o?(nv(r,e,n),n&&b4(r,"_",o,!0)):ev(e,r)}else e&&tv(t,e)},sb=(t,e,n)=>{const{vnode:r,slots:o}=t;let l=!0,h=gn;if(r.shapeFlag&32){const c=e._;c?n&&c===1?l=!1:nv(o,e,n):(l=!e.$stable,ev(e,o)),h=e}else e&&(tv(t,e),h={default:1});if(l)for(const c in o)!jp(c)&&h[c]==null&&delete o[c]},qr=xb;function lb(t){return cb(t)}function cb(t,e){const n=Lc();n.__VUE__=!0;const{insert:r,remove:o,patchProp:l,createElement:h,createText:c,createComment:p,setText:v,setElementText:b,parentNode:g,nextSibling:m,setScopeId:x=xi,insertStaticContent:w}=t,S=(G,X,be,le=null,ye=null,Ae=null,ze=void 0,Xe=null,Ke=!!X.dynamicChildren)=>{if(G===X)return;G&&!el(G,X)&&(le=oe(G),q(G,ye,Ae,!0),G=null),X.patchFlag===-2&&(Ke=!1,X.dynamicChildren=null);const{type:Be,ref:st,shapeFlag:qe}=X;switch(Be){case Oc:k(G,X,be,le);break;case Ya:C(G,X,be,le);break;case N0:G==null&&T(X,be,le,ze);break;case wi:ce(G,X,be,le,ye,Ae,ze,Xe,Ke);break;default:qe&1?y(G,X,be,le,ye,Ae,ze,Xe,Ke):qe&6?Me(G,X,be,le,ye,Ae,ze,Xe,Ke):(qe&64||qe&128)&&Be.process(G,X,be,le,ye,Ae,ze,Xe,Ke,ee)}st!=null&&ye?yl(st,G&&G.ref,Ae,X||G,!X):st==null&&G&&G.ref!=null&&yl(G.ref,null,Ae,G,!0)},k=(G,X,be,le)=>{if(G==null)r(X.el=c(X.children),be,le);else{const ye=X.el=G.el;X.children!==G.children&&v(ye,X.children)}},C=(G,X,be,le)=>{G==null?r(X.el=p(X.children||""),be,le):X.el=G.el},T=(G,X,be,le)=>{[G.el,G.anchor]=w(G.children,X,be,le,G.el,G.anchor)},A=({el:G,anchor:X},be,le)=>{let ye;for(;G&&G!==X;)ye=m(G),r(G,be,le),G=ye;r(X,be,le)},M=({el:G,anchor:X})=>{let be;for(;G&&G!==X;)be=m(G),o(G),G=be;o(X)},y=(G,X,be,le,ye,Ae,ze,Xe,Ke)=>{X.type==="svg"?ze="svg":X.type==="math"&&(ze="mathml"),G==null?N(X,be,le,ye,Ae,ze,Xe,Ke):P(G,X,ye,Ae,ze,Xe,Ke)},N=(G,X,be,le,ye,Ae,ze,Xe)=>{let Ke,Be;const{props:st,shapeFlag:qe,transition:Re,dirs:mt}=G;if(Ke=G.el=h(G.type,Ae,st&&st.is,st),qe&8?b(Ke,G.children):qe&16&&F(G.children,Ke,null,le,ye,zd(G,Ae),ze,Xe),mt&&ko(G,null,le,"created"),z(Ke,G,G.scopeId,ze,le),st){for(const Ut in st)Ut!=="value"&&!gl(Ut)&&l(Ke,Ut,null,st[Ut],Ae,le);"value"in st&&l(Ke,"value",null,st.value,Ae),(Be=st.onVnodeBeforeMount)&&Ni(Be,le,G)}mt&&ko(G,null,le,"beforeMount");const Dt=ub(ye,Re);Dt&&Re.beforeEnter(Ke),r(Ke,X,be),((Be=st&&st.onVnodeMounted)||Dt||mt)&&qr(()=>{Be&&Ni(Be,le,G),Dt&&Re.enter(Ke),mt&&ko(G,null,le,"mounted")},ye)},z=(G,X,be,le,ye)=>{if(be&&x(G,be),le)for(let Ae=0;Ae<le.length;Ae++)x(G,le[Ae]);if(ye){let Ae=ye.subTree;if(X===Ae||lv(Ae.type)&&(Ae.ssContent===X||Ae.ssFallback===X)){const ze=ye.vnode;z(G,ze,ze.scopeId,ze.slotScopeIds,ye.parent)}}},F=(G,X,be,le,ye,Ae,ze,Xe,Ke=0)=>{for(let Be=Ke;Be<G.length;Be++){const st=G[Be]=Xe?Ua(G[Be]):Pi(G[Be]);S(null,st,X,be,le,ye,Ae,ze,Xe)}},P=(G,X,be,le,ye,Ae,ze)=>{const Xe=X.el=G.el;let{patchFlag:Ke,dynamicChildren:Be,dirs:st}=X;Ke|=G.patchFlag&16;const qe=G.props||gn,Re=X.props||gn;let mt;if(be&&So(be,!1),(mt=Re.onVnodeBeforeUpdate)&&Ni(mt,be,X,G),st&&ko(X,G,be,"beforeUpdate"),be&&So(be,!0),(qe.innerHTML&&Re.innerHTML==null||qe.textContent&&Re.textContent==null)&&b(Xe,""),Be?Y(G.dynamicChildren,Be,Xe,be,le,zd(X,ye),Ae):ze||Ne(G,X,Xe,null,be,le,zd(X,ye),Ae,!1),Ke>0){if(Ke&16)te(Xe,qe,Re,be,ye);else if(Ke&2&&qe.class!==Re.class&&l(Xe,"class",null,Re.class,ye),Ke&4&&l(Xe,"style",qe.style,Re.style,ye),Ke&8){const Dt=X.dynamicProps;for(let Ut=0;Ut<Dt.length;Ut++){const jt=Dt[Ut],Hn=qe[jt],Mn=Re[jt];(Mn!==Hn||jt==="value")&&l(Xe,jt,Hn,Mn,ye,be)}}Ke&1&&G.children!==X.children&&b(Xe,X.children)}else!ze&&Be==null&&te(Xe,qe,Re,be,ye);((mt=Re.onVnodeUpdated)||st)&&qr(()=>{mt&&Ni(mt,be,X,G),st&&ko(X,G,be,"updated")},le)},Y=(G,X,be,le,ye,Ae,ze)=>{for(let Xe=0;Xe<X.length;Xe++){const Ke=G[Xe],Be=X[Xe],st=Ke.el&&(Ke.type===wi||!el(Ke,Be)||Ke.shapeFlag&198)?g(Ke.el):be;S(Ke,Be,st,null,le,ye,Ae,ze,!0)}},te=(G,X,be,le,ye)=>{if(X!==be){if(X!==gn)for(const Ae in X)!gl(Ae)&&!(Ae in be)&&l(G,Ae,X[Ae],null,ye,le);for(const Ae in be){if(gl(Ae))continue;const ze=be[Ae],Xe=X[Ae];ze!==Xe&&Ae!=="value"&&l(G,Ae,Xe,ze,ye,le)}"value"in be&&l(G,"value",X.value,be.value,ye)}},ce=(G,X,be,le,ye,Ae,ze,Xe,Ke)=>{const Be=X.el=G?G.el:c(""),st=X.anchor=G?G.anchor:c("");let{patchFlag:qe,dynamicChildren:Re,slotScopeIds:mt}=X;mt&&(Xe=Xe?Xe.concat(mt):mt),G==null?(r(Be,be,le),r(st,be,le),F(X.children||[],be,st,ye,Ae,ze,Xe,Ke)):qe>0&&qe&64&&Re&&G.dynamicChildren?(Y(G.dynamicChildren,Re,be,ye,Ae,ze,Xe),(X.key!=null||ye&&X===ye.subTree)&&rv(G,X,!0)):Ne(G,X,be,st,ye,Ae,ze,Xe,Ke)},Me=(G,X,be,le,ye,Ae,ze,Xe,Ke)=>{X.slotScopeIds=Xe,G==null?X.shapeFlag&512?ye.ctx.activate(X,be,le,ze,Ke):Fe(X,be,le,ye,Ae,ze,Ke):We(G,X,Ke)},Fe=(G,X,be,le,ye,Ae,ze)=>{const Xe=G.component=Lb(G,le,ye);if(U4(G)&&(Xe.ctx.renderer=ee),Nb(Xe,!1,ze),Xe.asyncDep){if(ye&&ye.registerDep(Xe,rt,ze),!G.el){const Ke=Xe.subTree=Gr(Ya);C(null,Ke,X,be),G.placeholder=Ke.el}}else rt(Xe,G,X,be,ye,Ae,ze)},We=(G,X,be)=>{const le=X.component=G.component;if(yb(G,X,be))if(le.asyncDep&&!le.asyncResolved){je(le,X,be);return}else le.next=X,le.update();else X.el=G.el,le.vnode=X},rt=(G,X,be,le,ye,Ae,ze)=>{const Xe=()=>{if(G.isMounted){let{next:qe,bu:Re,u:mt,parent:Dt,vnode:Ut}=G;{const kn=iv(G);if(kn){qe&&(qe.el=Ut.el,je(G,qe,ze)),kn.asyncDep.then(()=>{G.isUnmounted||Xe()});return}}let jt=qe,Hn;So(G,!1),qe?(qe.el=Ut.el,je(G,qe,ze)):qe=Ut,Re&&L0(Re),(Hn=qe.props&&qe.props.onVnodeBeforeUpdate)&&Ni(Hn,Dt,qe,Ut),So(G,!0);const Mn=Bd(G),Pn=G.subTree;G.subTree=Mn,S(Pn,Mn,g(Pn.el),oe(Pn),G,ye,Ae),qe.el=Mn.el,jt===null&&wb(G,Mn.el),mt&&qr(mt,ye),(Hn=qe.props&&qe.props.onVnodeUpdated)&&qr(()=>Ni(Hn,Dt,qe,Ut),ye)}else{let qe;const{el:Re,props:mt}=X,{bm:Dt,m:Ut,parent:jt,root:Hn,type:Mn}=G,Pn=wl(X);if(So(G,!1),Dt&&L0(Dt),!Pn&&(qe=mt&&mt.onVnodeBeforeMount)&&Ni(qe,jt,X),So(G,!0),Re&&se){const kn=()=>{G.subTree=Bd(G),se(Re,G.subTree,G,ye,null)};Pn&&Mn.__asyncHydrate?Mn.__asyncHydrate(Re,G,kn):kn()}else{Hn.ce&&Hn.ce._def.shadowRoot!==!1&&Hn.ce._injectChildStyle(Mn);const kn=G.subTree=Bd(G);S(null,kn,be,le,G,ye,Ae),X.el=kn.el}if(Ut&&qr(Ut,ye),!Pn&&(qe=mt&&mt.onVnodeMounted)){const kn=X;qr(()=>Ni(qe,jt,kn),ye)}(X.shapeFlag&256||jt&&wl(jt.vnode)&&jt.vnode.shapeFlag&256)&&G.a&&qr(G.a,ye),G.isMounted=!0,X=be=le=null}};G.scope.on();const Ke=G.effect=new k4(Xe);G.scope.off();const Be=G.update=Ke.run.bind(Ke),st=G.job=Ke.runIfDirty.bind(Ke);st.i=G,st.id=G.uid,Ke.scheduler=()=>zp(st),So(G,!0),Be()},je=(G,X,be)=>{X.component=G;const le=G.vnode.props;G.vnode=X,G.next=null,rb(G,X.props,le,be),sb(G,X.children,be),Sa(),M1(G),Ea()},Ne=(G,X,be,le,ye,Ae,ze,Xe,Ke=!1)=>{const Be=G&&G.children,st=G?G.shapeFlag:0,qe=X.children,{patchFlag:Re,shapeFlag:mt}=X;if(Re>0){if(Re&128){ct(Be,qe,be,le,ye,Ae,ze,Xe,Ke);return}else if(Re&256){nt(Be,qe,be,le,ye,Ae,ze,Xe,Ke);return}}mt&8?(st&16&&Nt(Be,ye,Ae),qe!==Be&&b(be,qe)):st&16?mt&16?ct(Be,qe,be,le,ye,Ae,ze,Xe,Ke):Nt(Be,ye,Ae,!0):(st&8&&b(be,""),mt&16&&F(qe,be,le,ye,Ae,ze,Xe,Ke))},nt=(G,X,be,le,ye,Ae,ze,Xe,Ke)=>{G=G||Jo,X=X||Jo;const Be=G.length,st=X.length,qe=Math.min(Be,st);let Re;for(Re=0;Re<qe;Re++){const mt=X[Re]=Ke?Ua(X[Re]):Pi(X[Re]);S(G[Re],mt,be,null,ye,Ae,ze,Xe,Ke)}Be>st?Nt(G,ye,Ae,!0,!1,qe):F(X,be,le,ye,Ae,ze,Xe,Ke,qe)},ct=(G,X,be,le,ye,Ae,ze,Xe,Ke)=>{let Be=0;const st=X.length;let qe=G.length-1,Re=st-1;for(;Be<=qe&&Be<=Re;){const mt=G[Be],Dt=X[Be]=Ke?Ua(X[Be]):Pi(X[Be]);if(el(mt,Dt))S(mt,Dt,be,null,ye,Ae,ze,Xe,Ke);else break;Be++}for(;Be<=qe&&Be<=Re;){const mt=G[qe],Dt=X[Re]=Ke?Ua(X[Re]):Pi(X[Re]);if(el(mt,Dt))S(mt,Dt,be,null,ye,Ae,ze,Xe,Ke);else break;qe--,Re--}if(Be>qe){if(Be<=Re){const mt=Re+1,Dt=mt<st?X[mt].el:le;for(;Be<=Re;)S(null,X[Be]=Ke?Ua(X[Be]):Pi(X[Be]),be,Dt,ye,Ae,ze,Xe,Ke),Be++}}else if(Be>Re)for(;Be<=qe;)q(G[Be],ye,Ae,!0),Be++;else{const mt=Be,Dt=Be,Ut=new Map;for(Be=Dt;Be<=Re;Be++){const zn=X[Be]=Ke?Ua(X[Be]):Pi(X[Be]);zn.key!=null&&Ut.set(zn.key,Be)}let jt,Hn=0;const Mn=Re-Dt+1;let Pn=!1,kn=0;const lr=new Array(Mn);for(Be=0;Be<Mn;Be++)lr[Be]=0;for(Be=mt;Be<=qe;Be++){const zn=G[Be];if(Hn>=Mn){q(zn,ye,Ae,!0);continue}let Ot;if(zn.key!=null)Ot=Ut.get(zn.key);else for(jt=Dt;jt<=Re;jt++)if(lr[jt-Dt]===0&&el(zn,X[jt])){Ot=jt;break}Ot===void 0?q(zn,ye,Ae,!0):(lr[Ot-Dt]=Be+1,Ot>=kn?kn=Ot:Pn=!0,S(zn,X[Ot],be,null,ye,Ae,ze,Xe,Ke),Hn++)}const cr=Pn?db(lr):Jo;for(jt=cr.length-1,Be=Mn-1;Be>=0;Be--){const zn=Dt+Be,Ot=X[zn],jn=X[zn+1],en=zn+1<st?jn.el||jn.placeholder:le;lr[Be]===0?S(null,Ot,be,en,ye,Ae,ze,Xe,Ke):Pn&&(jt<0||Be!==cr[jt]?tt(Ot,be,en,2):jt--)}}},tt=(G,X,be,le,ye=null)=>{const{el:Ae,type:ze,transition:Xe,children:Ke,shapeFlag:Be}=G;if(Be&6){tt(G.component.subTree,X,be,le);return}if(Be&128){G.suspense.move(X,be,le);return}if(Be&64){ze.move(G,X,be,ee);return}if(ze===wi){r(Ae,X,be);for(let qe=0;qe<Ke.length;qe++)tt(Ke[qe],X,be,le);r(G.anchor,X,be);return}if(ze===N0){A(G,X,be);return}if(le!==2&&Be&1&&Xe)if(le===0)Xe.beforeEnter(Ae),r(Ae,X,be),qr(()=>Xe.enter(Ae),ye);else{const{leave:qe,delayLeave:Re,afterLeave:mt}=Xe,Dt=()=>{G.ctx.isUnmounted?o(Ae):r(Ae,X,be)},Ut=()=>{Ae._isLeaving&&Ae[I5](!0),qe(Ae,()=>{Dt(),mt&&mt()})};Re?Re(Ae,Dt,Ut):Ut()}else r(Ae,X,be)},q=(G,X,be,le=!1,ye=!1)=>{const{type:Ae,props:ze,ref:Xe,children:Ke,dynamicChildren:Be,shapeFlag:st,patchFlag:qe,dirs:Re,cacheIndex:mt}=G;if(qe===-2&&(ye=!1),Xe!=null&&(Sa(),yl(Xe,null,be,G,!0),Ea()),mt!=null&&(X.renderCache[mt]=void 0),st&256){X.ctx.deactivate(G);return}const Dt=st&1&&Re,Ut=!wl(G);let jt;if(Ut&&(jt=ze&&ze.onVnodeBeforeUnmount)&&Ni(jt,X,G),st&6)$t(G.component,be,le);else{if(st&128){G.suspense.unmount(be,le);return}Dt&&ko(G,null,X,"beforeUnmount"),st&64?G.type.remove(G,X,be,ee,le):Be&&!Be.hasOnce&&(Ae!==wi||qe>0&&qe&64)?Nt(Be,X,be,!1,!0):(Ae===wi&&qe&384||!ye&&st&16)&&Nt(Ke,X,be),le&&Ht(G)}(Ut&&(jt=ze&&ze.onVnodeUnmounted)||Dt)&&qr(()=>{jt&&Ni(jt,X,G),Dt&&ko(G,null,X,"unmounted")},be)},Ht=G=>{const{type:X,el:be,anchor:le,transition:ye}=G;if(X===wi){Rt(be,le);return}if(X===N0){M(G);return}const Ae=()=>{o(be),ye&&!ye.persisted&&ye.afterLeave&&ye.afterLeave()};if(G.shapeFlag&1&&ye&&!ye.persisted){const{leave:ze,delayLeave:Xe}=ye,Ke=()=>ze(be,Ae);Xe?Xe(G.el,Ae,Ke):Ke()}else Ae()},Rt=(G,X)=>{let be;for(;G!==X;)be=m(G),o(G),G=be;o(X)},$t=(G,X,be)=>{const{bum:le,scope:ye,job:Ae,subTree:ze,um:Xe,m:Ke,a:Be}=G;R1(Ke),R1(Be),le&&L0(le),ye.stop(),Ae&&(Ae.flags|=8,q(ze,G,X,be)),Xe&&qr(Xe,X),qr(()=>{G.isUnmounted=!0},X)},Nt=(G,X,be,le=!1,ye=!1,Ae=0)=>{for(let ze=Ae;ze<G.length;ze++)q(G[ze],X,be,le,ye)},oe=G=>{if(G.shapeFlag&6)return oe(G.component.subTree);if(G.shapeFlag&128)return G.suspense.next();const X=m(G.anchor||G.el),be=X&&X[D5];return be?m(be):X};let he=!1;const J=(G,X,be)=>{G==null?X._vnode&&q(X._vnode,null,null,!0):S(X._vnode||null,G,X,null,null,null,be),X._vnode=G,he||(he=!0,M1(),F4(),he=!1)},ee={p:S,um:q,m:tt,r:Ht,mt:Fe,mc:F,pc:Ne,pbc:Y,n:oe,o:t};let Ce,se;return e&&([Ce,se]=e(ee)),{render:J,hydrate:Ce,createApp:eb(J,Ce)}}function zd({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function So({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function ub(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function rv(t,e,n=!1){const r=t.children,o=e.children;if(It(r)&&It(o))for(let l=0;l<r.length;l++){const h=r[l];let c=o[l];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=o[l]=Ua(o[l]),c.el=h.el),!n&&c.patchFlag!==-2&&rv(h,c)),c.type===Oc&&c.patchFlag!==-1&&(c.el=h.el),c.type===Ya&&!c.el&&(c.el=h.el)}}function db(t){const e=t.slice(),n=[0];let r,o,l,h,c;const p=t.length;for(r=0;r<p;r++){const v=t[r];if(v!==0){if(o=n[n.length-1],t[o]<v){e[r]=o,n.push(r);continue}for(l=0,h=n.length-1;l<h;)c=l+h>>1,t[n[c]]<v?l=c+1:h=c;v<t[n[l]]&&(l>0&&(e[r]=n[l-1]),n[l]=r)}}for(l=n.length,h=n[l-1];l-- >0;)n[l]=h,h=e[h];return n}function iv(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:iv(e)}function R1(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}const hb=Symbol.for("v-scx"),pb=()=>_0(hb);function kl(t,e,n){return av(t,e,n)}function av(t,e,n=gn){const{immediate:r,deep:o,flush:l,once:h}=n,c=sr({},n),p=e&&r||!e&&l!=="post";let v;if(Rl){if(l==="sync"){const x=pb();v=x.__watcherHandles||(x.__watcherHandles=[])}else if(!p){const x=()=>{};return x.stop=xi,x.resume=xi,x.pause=xi,x}}const b=wr;c.call=(x,w,S)=>Ui(x,b,w,S);let g=!1;l==="post"?c.scheduler=x=>{qr(x,b&&b.suspense)}:l!=="sync"&&(g=!0,c.scheduler=(x,w)=>{w?x():zp(x)}),c.augmentJob=x=>{e&&(x.flags|=4),g&&(x.flags|=2,b&&(x.id=b.uid,x.i=b))};const m=M5(t,e,c);return Rl&&(v?v.push(m):p&&m()),m}function fb(t,e,n){const r=this.proxy,o=Vn(t)?t.includes(".")?ov(r,t):()=>r[t]:t.bind(r,r);let l;Bt(e)?l=e:(l=e.handler,n=e);const h=Fl(this),c=av(o,l.bind(r),n);return h(),c}function ov(t,e){const n=e.split(".");return()=>{let r=t;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}const mb=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Xa(e)}Modifiers`]||t[`${ao(e)}Modifiers`];function gb(t,e,...n){if(t.isUnmounted)return;const r=t.vnode.props||gn;let o=n;const l=e.startsWith("update:"),h=l&&mb(r,e.slice(7));h&&(h.trim&&(o=n.map(b=>Vn(b)?b.trim():b)),h.number&&(o=n.map(Ch)));let c,p=r[c=Dd(e)]||r[c=Dd(Xa(e))];!p&&l&&(p=r[c=Dd(ao(e))]),p&&Ui(p,t,6,o);const v=r[c+"Once"];if(v){if(!t.emitted)t.emitted={};else if(t.emitted[c])return;t.emitted[c]=!0,Ui(v,t,6,o)}}function sv(t,e,n=!1){const r=e.emitsCache,o=r.get(t);if(o!==void 0)return o;const l=t.emits;let h={},c=!1;if(!Bt(t)){const p=v=>{const b=sv(v,e,!0);b&&(c=!0,sr(h,b))};!n&&e.mixins.length&&e.mixins.forEach(p),t.extends&&p(t.extends),t.mixins&&t.mixins.forEach(p)}return!l&&!c?(Rn(t)&&r.set(t,null),null):(It(l)?l.forEach(p=>h[p]=null):sr(h,l),Rn(t)&&r.set(t,h),h)}function Ic(t,e){return!t||!Ac(e)?!1:(e=e.slice(2).replace(/Once$/,""),rn(t,e[0].toLowerCase()+e.slice(1))||rn(t,ao(e))||rn(t,e))}function Bd(t){const{type:e,vnode:n,proxy:r,withProxy:o,propsOptions:[l],slots:h,attrs:c,emit:p,render:v,renderCache:b,props:g,data:m,setupState:x,ctx:w,inheritAttrs:S}=t,k=K0(t);let C,T;try{if(n.shapeFlag&4){const M=o||r,y=M;C=Pi(v.call(y,M,b,g,x,m,w)),T=c}else{const M=e;C=Pi(M.length>1?M(g,{attrs:c,slots:h,emit:p}):M(g,null)),T=e.props?c:vb(c)}}catch(M){Sl.length=0,Nc(M,t,1),C=Gr(Ya)}let A=C;if(T&&S!==!1){const M=Object.keys(T),{shapeFlag:y}=A;M.length&&y&7&&(l&&M.some(Mp)&&(T=bb(T,l)),A=ls(A,T,!1,!0))}return n.dirs&&(A=ls(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&Bp(A,n.transition),C=A,K0(k),C}const vb=t=>{let e;for(const n in t)(n==="class"||n==="style"||Ac(n))&&((e||(e={}))[n]=t[n]);return e},bb=(t,e)=>{const n={};for(const r in t)(!Mp(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n};function yb(t,e,n){const{props:r,children:o,component:l}=t,{props:h,children:c,patchFlag:p}=e,v=l.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&p>=0){if(p&1024)return!0;if(p&16)return r?I1(r,h,v):!!h;if(p&8){const b=e.dynamicProps;for(let g=0;g<b.length;g++){const m=b[g];if(h[m]!==r[m]&&!Ic(v,m))return!0}}}else return(o||c)&&(!c||!c.$stable)?!0:r===h?!1:r?h?I1(r,h,v):!0:!!h;return!1}function I1(t,e,n){const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!0;for(let o=0;o<r.length;o++){const l=r[o];if(e[l]!==t[l]&&!Ic(n,l))return!0}return!1}function wb({vnode:t,parent:e},n){for(;e;){const r=e.subTree;if(r.suspense&&r.suspense.activeBranch===t&&(r.el=t.el),r===t)(t=e.vnode).el=n,e=e.parent;else break}}const lv=t=>t.__isSuspense;function xb(t,e){e&&e.pendingBranch?It(t)?e.effects.push(...t):e.effects.push(t):_5(t)}const wi=Symbol.for("v-fgt"),Oc=Symbol.for("v-txt"),Ya=Symbol.for("v-cmt"),N0=Symbol.for("v-stc"),Sl=[];let Wr=null;function Kt(t=!1){Sl.push(Wr=t?null:[])}function kb(){Sl.pop(),Wr=Sl[Sl.length-1]||null}let Dl=1;function O1(t,e=!1){Dl+=t,t<0&&Wr&&e&&(Wr.hasOnce=!0)}function cv(t){return t.dynamicChildren=Dl>0?Wr||Jo:null,kb(),Dl>0&&Wr&&Wr.push(t),t}function Xt(t,e,n,r,o,l){return cv(De(t,e,n,r,o,l,!0))}function Sb(t,e,n,r,o){return cv(Gr(t,e,n,r,o,!0))}function uv(t){return t?t.__v_isVNode===!0:!1}function el(t,e){return t.type===e.type&&t.key===e.key}const dv=({key:t})=>t??null,D0=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Vn(t)||fr(t)||Bt(t)?{i:Qr,r:t,k:e,f:!!n}:t:null);function De(t,e=null,n=null,r=0,o=null,l=t===wi?0:1,h=!1,c=!1){const p={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&dv(e),ref:e&&D0(e),scopeId:j4,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:l,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Qr};return c?(Vp(p,n),l&128&&t.normalize(p)):n&&(p.shapeFlag|=Vn(n)?8:16),Dl>0&&!h&&Wr&&(p.patchFlag>0||l&6)&&p.patchFlag!==32&&Wr.push(p),p}const Gr=Eb;function Eb(t,e=null,n=null,r=0,o=null,l=!1){if((!t||t===W5)&&(t=Ya),uv(t)){const c=ls(t,e,!0);return n&&Vp(c,n),Dl>0&&!l&&Wr&&(c.shapeFlag&6?Wr[Wr.indexOf(t)]=c:Wr.push(c)),c.patchFlag=-2,c}if(Ob(t)&&(t=t.__vccOpts),e){e=Tb(e);let{class:c,style:p}=e;c&&!Vn(c)&&(e.class=ss(c)),Rn(p)&&(Pp(p)&&!It(p)&&(p=sr({},p)),e.style=os(p))}const h=Vn(t)?1:lv(t)?128:R5(t)?64:Rn(t)?4:Bt(t)?2:0;return De(t,e,n,r,o,h,l,!0)}function Tb(t){return t?Pp(t)||Y4(t)?sr({},t):t:null}function ls(t,e,n=!1,r=!1){const{props:o,ref:l,patchFlag:h,children:c,transition:p}=t,v=e?Ab(o||{},e):o,b={__v_isVNode:!0,__v_skip:!0,type:t.type,props:v,key:v&&dv(v),ref:e&&e.ref?n&&l?It(l)?l.concat(D0(e)):[l,D0(e)]:D0(e):l,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:c,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==wi?h===-1?16:h|16:h,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:p,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&ls(t.ssContent),ssFallback:t.ssFallback&&ls(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return p&&r&&Bp(b,p.clone(b)),b}function Up(t=" ",e=0){return Gr(Oc,null,t,e)}function H1(t,e){const n=Gr(N0,null,t);return n.staticCount=e,n}function Yr(t="",e=!1){return e?(Kt(),Sb(Ya,null,t)):Gr(Ya,null,t)}function Pi(t){return t==null||typeof t=="boolean"?Gr(Ya):It(t)?Gr(wi,null,t.slice()):uv(t)?Ua(t):Gr(Oc,null,String(t))}function Ua(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:ls(t)}function Vp(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(It(e))n=16;else if(typeof e=="object")if(r&65){const o=e.default;o&&(o._c&&(o._d=!1),Vp(t,o()),o._c&&(o._d=!0));return}else{n=32;const o=e._;!o&&!Y4(e)?e._ctx=Qr:o===3&&Qr&&(Qr.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Bt(e)?(e={default:e,_ctx:Qr},n=32):(e=String(e),r&64?(n=16,e=[Up(e)]):n=8);t.children=e,t.shapeFlag|=n}function Ab(...t){const e={};for(let n=0;n<t.length;n++){const r=t[n];for(const o in r)if(o==="class")e.class!==r.class&&(e.class=ss([e.class,r.class]));else if(o==="style")e.style=os([e.style,r.style]);else if(Ac(o)){const l=e[o],h=r[o];h&&l!==h&&!(It(l)&&l.includes(h))&&(e[o]=l?[].concat(l,h):h)}else o!==""&&(e[o]=r[o])}return e}function Ni(t,e,n,r=null){Ui(t,e,7,[n,r])}const Mb=K4();let Cb=0;function Lb(t,e,n){const r=t.type,o=(e?e.appContext:t.appContext)||Mb,l={uid:Cb++,vnode:t,type:r,parent:e,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new J2(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(o.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Q4(r,o),emitsOptions:sv(r,o),emit:null,emitted:null,propsDefaults:gn,inheritAttrs:r.inheritAttrs,ctx:gn,data:gn,props:gn,attrs:gn,slots:gn,refs:gn,setupState:gn,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 l.ctx={_:l},l.root=e?e.root:l,l.emit=gb.bind(null,l),t.ce&&t.ce(l),l}let wr=null;const _b=()=>wr||Qr;let Y0,Ph;{const t=Lc(),e=(n,r)=>{let o;return(o=t[n])||(o=t[n]=[]),o.push(r),l=>{o.length>1?o.forEach(h=>h(l)):o[0](l)}};Y0=e("__VUE_INSTANCE_SETTERS__",n=>wr=n),Ph=e("__VUE_SSR_SETTERS__",n=>Rl=n)}const Fl=t=>{const e=wr;return Y0(t),t.scope.on(),()=>{t.scope.off(),Y0(e)}},P1=()=>{wr&&wr.scope.off(),Y0(null)};function hv(t){return t.vnode.shapeFlag&4}let Rl=!1;function Nb(t,e=!1,n=!1){e&&Ph(e);const{props:r,children:o}=t.vnode,l=hv(t);nb(t,r,l,e),ob(t,o,n||e);const h=l?Db(t,e):void 0;return e&&Ph(!1),h}function Db(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,G5);const{setup:r}=n;if(r){Sa();const o=t.setupContext=r.length>1?Ib(t):null,l=Fl(t),h=Bl(r,t,0,[t.props,o]),c=f4(h);if(Ea(),l(),(c||t.sp)&&!wl(t)&&$4(t),c){if(h.then(P1,P1),e)return h.then(p=>{z1(t,p,e)}).catch(p=>{Nc(p,t,0)});t.asyncDep=h}else z1(t,h,e)}else pv(t,e)}function z1(t,e,n){Bt(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Rn(e)&&(t.setupState=P4(e)),pv(t,n)}let B1;function pv(t,e,n){const r=t.type;if(!t.render){if(!e&&B1&&!r.render){const o=r.template||qp(t).template;if(o){const{isCustomElement:l,compilerOptions:h}=t.appContext.config,{delimiters:c,compilerOptions:p}=r,v=sr(sr({isCustomElement:l,delimiters:c},h),p);r.render=B1(o,v)}}t.render=r.render||xi}{const o=Fl(t);Sa();try{K5(t)}finally{Ea(),o()}}}const Rb={get(t,e){return hr(t,"get",""),t[e]}};function Ib(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,Rb),slots:t.slots,emit:t.emit,expose:e}}function Hc(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(P4(y5(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in xl)return xl[n](t)},has(e,n){return n in e||n in xl}})):t.proxy}function Ob(t){return Bt(t)&&"__vccOpts"in t}const fv=(t,e)=>T5(t,e,Rl),Hb="3.5.20";/**
* @vue/runtime-dom v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let zh;const F1=typeof window<"u"&&window.trustedTypes;if(F1)try{zh=F1.createPolicy("vue",{createHTML:t=>t})}catch{}const mv=zh?t=>zh.createHTML(t):t=>t,Pb="http://www.w3.org/2000/svg",zb="http://www.w3.org/1998/Math/MathML",la=typeof document<"u"?document:null,q1=la&&la.createElement("template"),Bb={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const o=e==="svg"?la.createElementNS(Pb,t):e==="mathml"?la.createElementNS(zb,t):n?la.createElement(t,{is:n}):la.createElement(t);return t==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:t=>la.createTextNode(t),createComment:t=>la.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>la.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,o,l){const h=n?n.previousSibling:e.lastChild;if(o&&(o===l||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),n),!(o===l||!(o=o.nextSibling)););else{q1.innerHTML=mv(r==="svg"?`<svg>${t}</svg>`:r==="mathml"?`<math>${t}</math>`:t);const c=q1.content;if(r==="svg"||r==="mathml"){const p=c.firstChild;for(;p.firstChild;)c.appendChild(p.firstChild);c.removeChild(p)}e.insertBefore(c,n)}return[h?h.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Fb=Symbol("_vtc");function qb(t,e,n){const r=t[Fb];r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const J0=Symbol("_vod"),gv=Symbol("_vsh"),jb={name:"show",beforeMount(t,{value:e},{transition:n}){t[J0]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):tl(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:r}){!e!=!n&&(r?e?(r.beforeEnter(t),tl(t,!0),r.enter(t)):r.leave(t,()=>{tl(t,!1)}):tl(t,e))},beforeUnmount(t,{value:e}){tl(t,e)}};function tl(t,e){t.style.display=e?t[J0]:"none",t[gv]=!e}const $b=Symbol(""),Ub=/(^|;)\s*display\s*:/;function Vb(t,e,n){const r=t.style,o=Vn(n);let l=!1;if(n&&!o){if(e)if(Vn(e))for(const h of e.split(";")){const c=h.slice(0,h.indexOf(":")).trim();n[c]==null&&R0(r,c,"")}else for(const h in e)n[h]==null&&R0(r,h,"");for(const h in n)h==="display"&&(l=!0),R0(r,h,n[h])}else if(o){if(e!==n){const h=r[$b];h&&(n+=";"+h),r.cssText=n,l=Ub.test(n)}}else e&&t.removeAttribute("style");J0 in t&&(t[J0]=l?r.display:"",t[gv]&&(r.display="none"))}const j1=/\s*!important$/;function R0(t,e,n){if(It(n))n.forEach(r=>R0(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=Wb(t,e);j1.test(n)?t.setProperty(ao(r),n.replace(j1,""),"important"):t[r]=n}}const $1=["Webkit","Moz","ms"],Fd={};function Wb(t,e){const n=Fd[e];if(n)return n;let r=Xa(e);if(r!=="filter"&&r in t)return Fd[e]=r;r=v4(r);for(let o=0;o<$1.length;o++){const l=$1[o]+r;if(l in t)return Fd[e]=l}return e}const U1="http://www.w3.org/1999/xlink";function V1(t,e,n,r,o,l=Y2(e)){r&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(U1,e.slice(6,e.length)):t.setAttributeNS(U1,e,n):n==null||l&&!y4(n)?t.removeAttribute(e):t.setAttribute(e,l?"":io(n)?String(n):n)}function W1(t,e,n,r,o){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?mv(n):n);return}const l=t.tagName;if(e==="value"&&l!=="PROGRESS"&&!l.includes("-")){const c=l==="OPTION"?t.getAttribute("value")||"":t.value,p=n==null?t.type==="checkbox"?"on":"":String(n);(c!==p||!("_value"in t))&&(t.value=p),n==null&&t.removeAttribute(e),t._value=n;return}let h=!1;if(n===""||n==null){const c=typeof t[e];c==="boolean"?n=y4(n):n==null&&c==="string"?(n="",h=!0):c==="number"&&(n=0,h=!0)}try{t[e]=n}catch{}h&&t.removeAttribute(o||e)}function Zo(t,e,n,r){t.addEventListener(e,n,r)}function Gb(t,e,n,r){t.removeEventListener(e,n,r)}const G1=Symbol("_vei");function Kb(t,e,n,r,o=null){const l=t[G1]||(t[G1]={}),h=l[e];if(r&&h)h.value=r;else{const[c,p]=Xb(e);if(r){const v=l[e]=Jb(r,o);Zo(t,c,v,p)}else h&&(Gb(t,c,h,p),l[e]=void 0)}}const K1=/(?:Once|Passive|Capture)$/;function Xb(t){let e;if(K1.test(t)){e={};let r;for(;r=t.match(K1);)t=t.slice(0,t.length-r[0].length),e[r[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):ao(t.slice(2)),e]}let qd=0;const Zb=Promise.resolve(),Yb=()=>qd||(Zb.then(()=>qd=0),qd=Date.now());function Jb(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ui(Qb(r,n.value),e,5,[r])};return n.value=t,n.attached=Yb(),n}function Qb(t,e){if(It(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>o=>!o._stopped&&r&&r(o))}else return e}const X1=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,ey=(t,e,n,r,o,l)=>{const h=o==="svg";e==="class"?qb(t,r,h):e==="style"?Vb(t,n,r):Ac(e)?Mp(e)||Kb(t,e,n,r,l):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):ty(t,e,r,h))?(W1(t,e,r),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&V1(t,e,r,h,l,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Vn(r))?W1(t,Xa(e),r,l,e):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),V1(t,e,r,h))};function ty(t,e,n,r){if(r)return!!(e==="innerHTML"||e==="textContent"||e in t&&X1(e)&&Bt(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const o=t.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return X1(e)&&Vn(n)?!1:e in t}const Z1=t=>{const e=t.props["onUpdate:modelValue"]||!1;return It(e)?n=>L0(e,n):e};function ny(t){t.target.composing=!0}function Y1(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const jd=Symbol("_assign"),Wp={created(t,{modifiers:{lazy:e,trim:n,number:r}},o){t[jd]=Z1(o);const l=r||o.props&&o.props.type==="number";Zo(t,e?"change":"input",h=>{if(h.target.composing)return;let c=t.value;n&&(c=c.trim()),l&&(c=Ch(c)),t[jd](c)}),n&&Zo(t,"change",()=>{t.value=t.value.trim()}),e||(Zo(t,"compositionstart",ny),Zo(t,"compositionend",Y1),Zo(t,"change",Y1))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:r,trim:o,number:l}},h){if(t[jd]=Z1(h),t.composing)return;const c=(l||t.type==="number")&&!/^0\d/.test(t.value)?Ch(t.value):t.value,p=e??"";c!==p&&(document.activeElement===t&&t.type!=="range"&&(r&&e===n||o&&t.value.trim()===p)||(t.value=p))}},ry=["ctrl","shift","alt","meta"],iy={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>ry.some(n=>t[`${n}Key`]&&!e.includes(n))},Uo=(t,e)=>{const n=t._withMods||(t._withMods={}),r=e.join(".");return n[r]||(n[r]=(o,...l)=>{for(let h=0;h<e.length;h++){const c=iy[e[h]];if(c&&c(o,e))return}return t(o,...l)})},ay={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},$d=(t,e)=>{const n=t._withKeys||(t._withKeys={}),r=e.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const l=ao(o.key);if(e.some(h=>h===l||ay[h]===l))return t(o)})},oy=sr({patchProp:ey},Bb);let J1;function sy(){return J1||(J1=lb(oy))}const ly=(...t)=>{const e=sy().createApp(...t),{mount:n}=e;return e.mount=r=>{const o=uy(r);if(!o)return;const l=e._component;!Bt(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const h=n(o,!1,cy(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),h},e};function cy(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function uy(t){return Vn(t)?document.querySelector(t):t}var Bh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function iC(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var bv={exports:{}};/*!
* Vditor v3.11.2 - A markdown editor written in TypeScript.
*
* MIT License
*
* Copyright (c) 2018-present B3log 开源, b3log.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/(function(t,e){(function(r,o){t.exports=o()})(Bh,function(){return(()=>{var n={173:h=>{var c=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},p=-1,v=1,b=0;c.Diff=function(g,m){return[g,m]},c.prototype.diff_main=function(g,m,x,w){typeof w>"u"&&(this.Diff_Timeout<=0?w=Number.MAX_VALUE:w=new Date().getTime()+this.Diff_Timeout*1e3);var S=w;if(g==null||m==null)throw new Error("Null input. (diff_main)");if(g==m)return g?[new c.Diff(b,g)]:[];typeof x>"u"&&(x=!0);var k=x,C=this.diff_commonPrefix(g,m),T=g.substring(0,C);g=g.substring(C),m=m.substring(C),C=this.diff_commonSuffix(g,m);var A=g.substring(g.length-C);g=g.substring(0,g.length-C),m=m.substring(0,m.length-C);var M=this.diff_compute_(g,m,k,S);return T&&M.unshift(new c.Diff(b,T)),A&&M.push(new c.Diff(b,A)),this.diff_cleanupMerge(M),M},c.prototype.diff_compute_=function(g,m,x,w){var S;if(!g)return[new c.Diff(v,m)];if(!m)return[new c.Diff(p,g)];var k=g.length>m.length?g:m,C=g.length>m.length?m:g,T=k.indexOf(C);if(T!=-1)return S=[new c.Diff(v,k.substring(0,T)),new c.Diff(b,C),new c.Diff(v,k.substring(T+C.length))],g.length>m.length&&(S[0][0]=S[2][0]=p),S;if(C.length==1)return[new c.Diff(p,g),new c.Diff(v,m)];var A=this.diff_halfMatch_(g,m);if(A){var M=A[0],y=A[1],N=A[2],z=A[3],F=A[4],P=this.diff_main(M,N,x,w),Y=this.diff_main(y,z,x,w);return P.concat([new c.Diff(b,F)],Y)}return x&&g.length>100&&m.length>100?this.diff_lineMode_(g,m,w):this.diff_bisect_(g,m,w)},c.prototype.diff_lineMode_=function(g,m,x){var w=this.diff_linesToChars_(g,m);g=w.chars1,m=w.chars2;var S=w.lineArray,k=this.diff_main(g,m,!1,x);this.diff_charsToLines_(k,S),this.diff_cleanupSemantic(k),k.push(new c.Diff(b,""));for(var C=0,T=0,A=0,M="",y="";C<k.length;){switch(k[C][0]){case v:A++,y+=k[C][1];break;case p:T++,M+=k[C][1];break;case b:if(T>=1&&A>=1){k.splice(C-T-A,T+A),C=C-T-A;for(var N=this.diff_main(M,y,!1,x),z=N.length-1;z>=0;z--)k.splice(C,0,N[z]);C=C+N.length}A=0,T=0,M="",y="";break}C++}return k.pop(),k},c.prototype.diff_bisect_=function(g,m,x){for(var w=g.length,S=m.length,k=Math.ceil((w+S)/2),C=k,T=2*k,A=new Array(T),M=new Array(T),y=0;y<T;y++)A[y]=-1,M[y]=-1;A[C+1]=0,M[C+1]=0;for(var N=w-S,z=N%2!=0,F=0,P=0,Y=0,te=0,ce=0;ce<k&&!(new Date().getTime()>x);ce++){for(var Me=-ce+F;Me<=ce-P;Me+=2){var Fe=C+Me,We;Me==-ce||Me!=ce&&A[Fe-1]<A[Fe+1]?We=A[Fe+1]:We=A[Fe-1]+1;for(var rt=We-Me;We<w&&rt<S&&g.charAt(We)==m.charAt(rt);)We++,rt++;if(A[Fe]=We,We>w)P+=2;else if(rt>S)F+=2;else if(z){var je=C+N-Me;if(je>=0&&je<T&&M[je]!=-1){var Ne=w-M[je];if(We>=Ne)return this.diff_bisectSplit_(g,m,We,rt,x)}}}for(var nt=-ce+Y;nt<=ce-te;nt+=2){var je=C+nt,Ne;nt==-ce||nt!=ce&&M[je-1]<M[je+1]?Ne=M[je+1]:Ne=M[je-1]+1;for(var ct=Ne-nt;Ne<w&&ct<S&&g.charAt(w-Ne-1)==m.charAt(S-ct-1);)Ne++,ct++;if(M[je]=Ne,Ne>w)te+=2;else if(ct>S)Y+=2;else if(!z){var Fe=C+N-nt;if(Fe>=0&&Fe<T&&A[Fe]!=-1){var We=A[Fe],rt=C+We-Fe;if(Ne=w-Ne,We>=Ne)return this.diff_bisectSplit_(g,m,We,rt,x)}}}}return[new c.Diff(p,g),new c.Diff(v,m)]},c.prototype.diff_bisectSplit_=function(g,m,x,w,S){var k=g.substring(0,x),C=m.substring(0,w),T=g.substring(x),A=m.substring(w),M=this.diff_main(k,C,!1,S),y=this.diff_main(T,A,!1,S);return M.concat(y)},c.prototype.diff_linesToChars_=function(g,m){var x=[],w={};x[0]="";function S(A){for(var M="",y=0,N=-1,z=x.length;N<A.length-1;){N=A.indexOf(`
`,y),N==-1&&(N=A.length-1);var F=A.substring(y,N+1);(w.hasOwnProperty?w.hasOwnProperty(F):w[F]!==void 0)?M+=String.fromCharCode(w[F]):(z==k&&(F=A.substring(y),N=A.length),M+=String.fromCharCode(z),w[F]=z,x[z++]=F),y=N+1}return M}var k=4e4,C=S(g);k=65535;var T=S(m);return{chars1:C,chars2:T,lineArray:x}},c.prototype.diff_charsToLines_=function(g,m){for(var x=0;x<g.length;x++){for(var w=g[x][1],S=[],k=0;k<w.length;k++)S[k]=m[w.charCodeAt(k)];g[x][1]=S.join("")}},c.prototype.diff_commonPrefix=function(g,m){if(!g||!m||g.charAt(0)!=m.charAt(0))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(k,S)==m.substring(k,S)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonSuffix=function(g,m){if(!g||!m||g.charAt(g.length-1)!=m.charAt(m.length-1))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(g.length-S,g.length-k)==m.substring(m.length-S,m.length-k)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonOverlap_=function(g,m){var x=g.length,w=m.length;if(x==0||w==0)return 0;x>w?g=g.substring(x-w):x<w&&(m=m.substring(0,x));var S=Math.min(x,w);if(g==m)return S;for(var k=0,C=1;;){var T=g.substring(S-C),A=m.indexOf(T);if(A==-1)return k;C+=A,(A==0||g.substring(S-C)==m.substring(0,C))&&(k=C,C++)}},c.prototype.diff_halfMatch_=function(g,m){if(this.Diff_Timeout<=0)return null;var x=g.length>m.length?g:m,w=g.length>m.length?m:g;if(x.length<4||w.length*2<x.length)return null;var S=this;function k(P,Y,te){for(var ce=P.substring(te,te+Math.floor(P.length/4)),Me=-1,Fe="",We,rt,je,Ne;(Me=Y.indexOf(ce,Me+1))!=-1;){var nt=S.diff_commonPrefix(P.substring(te),Y.substring(Me)),ct=S.diff_commonSuffix(P.substring(0,te),Y.substring(0,Me));Fe.length<ct+nt&&(Fe=Y.substring(Me-ct,Me)+Y.substring(Me,Me+nt),We=P.substring(0,te-ct),rt=P.substring(te+nt),je=Y.substring(0,Me-ct),Ne=Y.substring(Me+nt))}return Fe.length*2>=P.length?[We,rt,je,Ne,Fe]:null}var C=k(x,w,Math.ceil(x.length/4)),T=k(x,w,Math.ceil(x.length/2)),A;if(!C&&!T)return null;T?C?A=C[4].length>T[4].length?C:T:A=T:A=C;var M,y,N,z;g.length>m.length?(M=A[0],y=A[1],N=A[2],z=A[3]):(N=A[0],z=A[1],M=A[2],y=A[3]);var F=A[4];return[M,y,N,z,F]},c.prototype.diff_cleanupSemantic=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=0,T=0,A=0,M=0;k<g.length;)g[k][0]==b?(x[w++]=k,C=A,T=M,A=0,M=0,S=g[k][1]):(g[k][0]==v?A+=g[k][1].length:M+=g[k][1].length,S&&S.length<=Math.max(C,T)&&S.length<=Math.max(A,M)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,w--,k=w>0?x[w-1]:-1,C=0,T=0,A=0,M=0,S=null,m=!0)),k++;for(m&&this.diff_cleanupMerge(g),this.diff_cleanupSemanticLossless(g),k=1;k<g.length;){if(g[k-1][0]==p&&g[k][0]==v){var y=g[k-1][1],N=g[k][1],z=this.diff_commonOverlap_(y,N),F=this.diff_commonOverlap_(N,y);z>=F?(z>=y.length/2||z>=N.length/2)&&(g.splice(k,0,new c.Diff(b,N.substring(0,z))),g[k-1][1]=y.substring(0,y.length-z),g[k+1][1]=N.substring(z),k++):(F>=y.length/2||F>=N.length/2)&&(g.splice(k,0,new c.Diff(b,y.substring(0,F))),g[k-1][0]=v,g[k-1][1]=N.substring(0,N.length-F),g[k+1][0]=p,g[k+1][1]=y.substring(F),k++),k++}k++}},c.prototype.diff_cleanupSemanticLossless=function(g){function m(F,P){if(!F||!P)return 6;var Y=F.charAt(F.length-1),te=P.charAt(0),ce=Y.match(c.nonAlphaNumericRegex_),Me=te.match(c.nonAlphaNumericRegex_),Fe=ce&&Y.match(c.whitespaceRegex_),We=Me&&te.match(c.whitespaceRegex_),rt=Fe&&Y.match(c.linebreakRegex_),je=We&&te.match(c.linebreakRegex_),Ne=rt&&F.match(c.blanklineEndRegex_),nt=je&&P.match(c.blanklineStartRegex_);return Ne||nt?5:rt||je?4:ce&&!Fe&&We?3:Fe||We?2:ce||Me?1:0}for(var x=1;x<g.length-1;){if(g[x-1][0]==b&&g[x+1][0]==b){var w=g[x-1][1],S=g[x][1],k=g[x+1][1],C=this.diff_commonSuffix(w,S);if(C){var T=S.substring(S.length-C);w=w.substring(0,w.length-C),S=T+S.substring(0,S.length-C),k=T+k}for(var A=w,M=S,y=k,N=m(w,S)+m(S,k);S.charAt(0)===k.charAt(0);){w+=S.charAt(0),S=S.substring(1)+k.charAt(0),k=k.substring(1);var z=m(w,S)+m(S,k);z>=N&&(N=z,A=w,M=S,y=k)}g[x-1][1]!=A&&(A?g[x-1][1]=A:(g.splice(x-1,1),x--),g[x][1]=M,y?g[x+1][1]=y:(g.splice(x+1,1),x--))}x++}},c.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,c.whitespaceRegex_=/\s/,c.linebreakRegex_=/[\r\n]/,c.blanklineEndRegex_=/\n\r?\n$/,c.blanklineStartRegex_=/^\r?\n\r?\n/,c.prototype.diff_cleanupEfficiency=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=!1,T=!1,A=!1,M=!1;k<g.length;)g[k][0]==b?(g[k][1].length<this.Diff_EditCost&&(A||M)?(x[w++]=k,C=A,T=M,S=g[k][1]):(w=0,S=null),A=M=!1):(g[k][0]==p?M=!0:A=!0,S&&(C&&T&&A&&M||S.length<this.Diff_EditCost/2&&C+T+A+M==3)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,S=null,C&&T?(A=M=!0,w=0):(w--,k=w>0?x[w-1]:-1,A=M=!1),m=!0)),k++;m&&this.diff_cleanupMerge(g)},c.prototype.diff_cleanupMerge=function(g){g.push(new c.Diff(b,""));for(var m=0,x=0,w=0,S="",k="",C;m<g.length;)switch(g[m][0]){case v:w++,k+=g[m][1],m++;break;case p:x++,S+=g[m][1],m++;break;case b:x+w>1?(x!==0&&w!==0&&(C=this.diff_commonPrefix(k,S),C!==0&&(m-x-w>0&&g[m-x-w-1][0]==b?g[m-x-w-1][1]+=k.substring(0,C):(g.splice(0,0,new c.Diff(b,k.substring(0,C))),m++),k=k.substring(C),S=S.substring(C)),C=this.diff_commonSuffix(k,S),C!==0&&(g[m][1]=k.substring(k.length-C)+g[m][1],k=k.substring(0,k.length-C),S=S.substring(0,S.length-C))),m-=x+w,g.splice(m,x+w),S.length&&(g.splice(m,0,new c.Diff(p,S)),m++),k.length&&(g.splice(m,0,new c.Diff(v,k)),m++),m++):m!==0&&g[m-1][0]==b?(g[m-1][1]+=g[m][1],g.splice(m,1)):m++,w=0,x=0,S="",k="";break}g[g.length-1][1]===""&&g.pop();var T=!1;for(m=1;m<g.length-1;)g[m-1][0]==b&&g[m+1][0]==b&&(g[m][1].substring(g[m][1].length-g[m-1][1].length)==g[m-1][1]?(g[m][1]=g[m-1][1]+g[m][1].substring(0,g[m][1].length-g[m-1][1].length),g[m+1][1]=g[m-1][1]+g[m+1][1],g.splice(m-1,1),T=!0):g[m][1].substring(0,g[m+1][1].length)==g[m+1][1]&&(g[m-1][1]+=g[m+1][1],g[m][1]=g[m][1].substring(g[m+1][1].length)+g[m+1][1],g.splice(m+1,1),T=!0)),m++;T&&this.diff_cleanupMerge(g)},c.prototype.diff_xIndex=function(g,m){var x=0,w=0,S=0,k=0,C;for(C=0;C<g.length&&(g[C][0]!==v&&(x+=g[C][1].length),g[C][0]!==p&&(w+=g[C][1].length),!(x>m));C++)S=x,k=w;return g.length!=C&&g[C][0]===p?k:k+(m-S)},c.prototype.diff_prettyHtml=function(g){for(var m=[],x=/&/g,w=/</g,S=/>/g,k=/\n/g,C=0;C<g.length;C++){var T=g[C][0],A=g[C][1],M=A.replace(x,"&amp;").replace(w,"&lt;").replace(S,"&gt;").replace(k,"&para;<br>");switch(T){case v:m[C]='<ins style="background:#e6ffe6;">'+M+"</ins>";break;case p:m[C]='<del style="background:#ffe6e6;">'+M+"</del>";break;case b:m[C]="<span>"+M+"</span>";break}}return m.join("")},c.prototype.diff_text1=function(g){for(var m=[],x=0;x<g.length;x++)g[x][0]!==v&&(m[x]=g[x][1]);return m.join("")},c.prototype.diff_text2=function(g){for(var m=[],x=0;x<g.length;x++)g[x][0]!==p&&(m[x]=g[x][1]);return m.join("")},c.prototype.diff_levenshtein=function(g){for(var m=0,x=0,w=0,S=0;S<g.length;S++){var k=g[S][0],C=g[S][1];switch(k){case v:x+=C.length;break;case p:w+=C.length;break;case b:m+=Math.max(x,w),x=0,w=0;break}}return m+=Math.max(x,w),m},c.prototype.diff_toDelta=function(g){for(var m=[],x=0;x<g.length;x++)switch(g[x][0]){case v:m[x]="+"+encodeURI(g[x][1]);break;case p:m[x]="-"+g[x][1].length;break;case b:m[x]="="+g[x][1].length;break}return m.join(" ").replace(/%20/g," ")},c.prototype.diff_fromDelta=function(g,m){for(var x=[],w=0,S=0,k=m.split(/\t/g),C=0;C<k.length;C++){var T=k[C].substring(1);switch(k[C].charAt(0)){case"+":try{x[w++]=new c.Diff(v,decodeURI(T))}catch{throw new Error("Illegal escape in diff_fromDelta: "+T)}break;case"-":case"=":var A=parseInt(T,10);if(isNaN(A)||A<0)throw new Error("Invalid number in diff_fromDelta: "+T);var M=g.substring(S,S+=A);k[C].charAt(0)=="="?x[w++]=new c.Diff(b,M):x[w++]=new c.Diff(p,M);break;default:if(k[C])throw new Error("Invalid diff operation in diff_fromDelta: "+k[C])}}if(S!=g.length)throw new Error("Delta length ("+S+") does not equal source text length ("+g.length+").");return x},c.prototype.match_main=function(g,m,x){if(g==null||m==null||x==null)throw new Error("Null input. (match_main)");return x=Math.max(0,Math.min(x,g.length)),g==m?0:g.length?g.substring(x,x+m.length)==m?x:this.match_bitap_(g,m,x):-1},c.prototype.match_bitap_=function(g,m,x){if(m.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var w=this.match_alphabet_(m),S=this;function k(We,rt){var je=We/m.length,Ne=Math.abs(x-rt);return S.Match_Distance?je+Ne/S.Match_Distance:Ne?1:je}var C=this.Match_Threshold,T=g.indexOf(m,x);T!=-1&&(C=Math.min(k(0,T),C),T=g.lastIndexOf(m,x+m.length),T!=-1&&(C=Math.min(k(0,T),C)));var A=1<<m.length-1;T=-1;for(var M,y,N=m.length+g.length,z,F=0;F<m.length;F++){for(M=0,y=N;M<y;)k(F,x+y)<=C?M=y:N=y,y=Math.floor((N-M)/2+M);N=y;var P=Math.max(1,x-y+1),Y=Math.min(x+y,g.length)+m.length,te=Array(Y+2);te[Y+1]=(1<<F)-1;for(var ce=Y;ce>=P;ce--){var Me=w[g.charAt(ce-1)];if(F===0?te[ce]=(te[ce+1]<<1|1)&Me:te[ce]=(te[ce+1]<<1|1)&Me|((z[ce+1]|z[ce])<<1|1)|z[ce+1],te[ce]&A){var Fe=k(F,ce-1);if(Fe<=C)if(C=Fe,T=ce-1,T>x)P=Math.max(1,2*x-T);else break}}if(k(F+1,x)>C)break;z=te}return T},c.prototype.match_alphabet_=function(g){for(var m={},x=0;x<g.length;x++)m[g.charAt(x)]=0;for(var x=0;x<g.length;x++)m[g.charAt(x)]|=1<<g.length-x-1;return m},c.prototype.patch_addContext_=function(g,m){if(m.length!=0){if(g.start2===null)throw Error("patch not initialized");for(var x=m.substring(g.start2,g.start2+g.length1),w=0;m.indexOf(x)!=m.lastIndexOf(x)&&x.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)w+=this.Patch_Margin,x=m.substring(g.start2-w,g.start2+g.length1+w);w+=this.Patch_Margin;var S=m.substring(g.start2-w,g.start2);S&&g.diffs.unshift(new c.Diff(b,S));var k=m.substring(g.start2+g.length1,g.start2+g.length1+w);k&&g.diffs.push(new c.Diff(b,k)),g.start1-=S.length,g.start2-=S.length,g.length1+=S.length+k.length,g.length2+=S.length+k.length}},c.prototype.patch_make=function(g,m,x){var w,S;if(typeof g=="string"&&typeof m=="string"&&typeof x>"u")w=g,S=this.diff_main(w,m,!0),S.length>2&&(this.diff_cleanupSemantic(S),this.diff_cleanupEfficiency(S));else if(g&&typeof g=="object"&&typeof m>"u"&&typeof x>"u")S=g,w=this.diff_text1(S);else if(typeof g=="string"&&m&&typeof m=="object"&&typeof x>"u")w=g,S=m;else if(typeof g=="string"&&typeof m=="string"&&x&&typeof x=="object")w=g,S=x;else throw new Error("Unknown call format to patch_make.");if(S.length===0)return[];for(var k=[],C=new c.patch_obj,T=0,A=0,M=0,y=w,N=w,z=0;z<S.length;z++){var F=S[z][0],P=S[z][1];switch(!T&&F!==b&&(C.start1=A,C.start2=M),F){case v:C.diffs[T++]=S[z],C.length2+=P.length,N=N.substring(0,M)+P+N.substring(M);break;case p:C.length1+=P.length,C.diffs[T++]=S[z],N=N.substring(0,M)+N.substring(M+P.length);break;case b:P.length<=2*this.Patch_Margin&&T&&S.length!=z+1?(C.diffs[T++]=S[z],C.length1+=P.length,C.length2+=P.length):P.length>=2*this.Patch_Margin&&T&&(this.patch_addContext_(C,y),k.push(C),C=new c.patch_obj,T=0,y=N,A=M);break}F!==v&&(A+=P.length),F!==p&&(M+=P.length)}return T&&(this.patch_addContext_(C,y),k.push(C)),k},c.prototype.patch_deepCopy=function(g){for(var m=[],x=0;x<g.length;x++){var w=g[x],S=new c.patch_obj;S.diffs=[];for(var k=0;k<w.diffs.length;k++)S.diffs[k]=new c.Diff(w.diffs[k][0],w.diffs[k][1]);S.start1=w.start1,S.start2=w.start2,S.length1=w.length1,S.length2=w.length2,m[x]=S}return m},c.prototype.patch_apply=function(g,m){if(g.length==0)return[m,[]];g=this.patch_deepCopy(g);var x=this.patch_addPadding(g);m=x+m+x,this.patch_splitMax(g);for(var w=0,S=[],k=0;k<g.length;k++){var C=g[k].start2+w,T=this.diff_text1(g[k].diffs),A,M=-1;if(T.length>this.Match_MaxBits?(A=this.match_main(m,T.substring(0,this.Match_MaxBits),C),A!=-1&&(M=this.match_main(m,T.substring(T.length-this.Match_MaxBits),C+T.length-this.Match_MaxBits),(M==-1||A>=M)&&(A=-1))):A=this.match_main(m,T,C),A==-1)S[k]=!1,w-=g[k].length2-g[k].length1;else{S[k]=!0,w=A-C;var y;if(M==-1?y=m.substring(A,A+T.length):y=m.substring(A,M+this.Match_MaxBits),T==y)m=m.substring(0,A)+this.diff_text2(g[k].diffs)+m.substring(A+T.length);else{var N=this.diff_main(T,y,!1);if(T.length>this.Match_MaxBits&&this.diff_levenshtein(N)/T.length>this.Patch_DeleteThreshold)S[k]=!1;else{this.diff_cleanupSemanticLossless(N);for(var z=0,F,P=0;P<g[k].diffs.length;P++){var Y=g[k].diffs[P];Y[0]!==b&&(F=this.diff_xIndex(N,z)),Y[0]===v?m=m.substring(0,A+F)+Y[1]+m.substring(A+F):Y[0]===p&&(m=m.substring(0,A+F)+m.substring(A+this.diff_xIndex(N,z+Y[1].length))),Y[0]!==p&&(z+=Y[1].length)}}}}}return m=m.substring(x.length,m.length-x.length),[m,S]},c.prototype.patch_addPadding=function(g){for(var m=this.Patch_Margin,x="",w=1;w<=m;w++)x+=String.fromCharCode(w);for(var w=0;w<g.length;w++)g[w].start1+=m,g[w].start2+=m;var S=g[0],k=S.diffs;if(k.length==0||k[0][0]!=b)k.unshift(new c.Diff(b,x)),S.start1-=m,S.start2-=m,S.length1+=m,S.length2+=m;else if(m>k[0][1].length){var C=m-k[0][1].length;k[0][1]=x.substring(k[0][1].length)+k[0][1],S.start1-=C,S.start2-=C,S.length1+=C,S.length2+=C}if(S=g[g.length-1],k=S.diffs,k.length==0||k[k.length-1][0]!=b)k.push(new c.Diff(b,x)),S.length1+=m,S.length2+=m;else if(m>k[k.length-1][1].length){var C=m-k[k.length-1][1].length;k[k.length-1][1]+=x.substring(0,C),S.length1+=C,S.length2+=C}return x},c.prototype.patch_splitMax=function(g){for(var m=this.Match_MaxBits,x=0;x<g.length;x++)if(!(g[x].length1<=m)){var w=g[x];g.splice(x--,1);for(var S=w.start1,k=w.start2,C="";w.diffs.length!==0;){var T=new c.patch_obj,A=!0;for(T.start1=S-C.length,T.start2=k-C.length,C!==""&&(T.length1=T.length2=C.length,T.diffs.push(new c.Diff(b,C)));w.diffs.length!==0&&T.length1<m-this.Patch_Margin;){var M=w.diffs[0][0],y=w.diffs[0][1];M===v?(T.length2+=y.length,k+=y.length,T.diffs.push(w.diffs.shift()),A=!1):M===p&&T.diffs.length==1&&T.diffs[0][0]==b&&y.length>2*m?(T.length1+=y.length,S+=y.length,A=!1,T.diffs.push(new c.Diff(M,y)),w.diffs.shift()):(y=y.substring(0,m-T.length1-this.Patch_Margin),T.length1+=y.length,S+=y.length,M===b?(T.length2+=y.length,k+=y.length):A=!1,T.diffs.push(new c.Diff(M,y)),y==w.diffs[0][1]?w.diffs.shift():w.diffs[0][1]=w.diffs[0][1].substring(y.length))}C=this.diff_text2(T.diffs),C=C.substring(C.length-this.Patch_Margin);var N=this.diff_text1(w.diffs).substring(0,this.Patch_Margin);N!==""&&(T.length1+=N.length,T.length2+=N.length,T.diffs.length!==0&&T.diffs[T.diffs.length-1][0]===b?T.diffs[T.diffs.length-1][1]+=N:T.diffs.push(new c.Diff(b,N))),A||g.splice(++x,0,T)}}},c.prototype.patch_toText=function(g){for(var m=[],x=0;x<g.length;x++)m[x]=g[x];return m.join("")},c.prototype.patch_fromText=function(g){var m=[];if(!g)return m;for(var x=g.split(`
`),w=0,S=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;w<x.length;){var k=x[w].match(S);if(!k)throw new Error("Invalid patch string: "+x[w]);var C=new c.patch_obj;for(m.push(C),C.start1=parseInt(k[1],10),k[2]===""?(C.start1--,C.length1=1):k[2]=="0"?C.length1=0:(C.start1--,C.length1=parseInt(k[2],10)),C.start2=parseInt(k[3],10),k[4]===""?(C.start2--,C.length2=1):k[4]=="0"?C.length2=0:(C.start2--,C.length2=parseInt(k[4],10)),w++;w<x.length;){var T=x[w].charAt(0);try{var A=decodeURI(x[w].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+A)}if(T=="-")C.diffs.push(new c.Diff(p,A));else if(T=="+")C.diffs.push(new c.Diff(v,A));else if(T==" ")C.diffs.push(new c.Diff(b,A));else{if(T=="@")break;if(T!=="")throw new Error('Invalid patch mode "'+T+'" in: '+A)}w++}}return m},c.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},c.patch_obj.prototype.toString=function(){var g,m;this.length1===0?g=this.start1+",0":this.length1==1?g=this.start1+1:g=this.start1+1+","+this.length1,this.length2===0?m=this.start2+",0":this.length2==1?m=this.start2+1:m=this.start2+1+","+this.length2;for(var x=["@@ -"+g+" +"+m+` @@
`],w,S=0;S<this.diffs.length;S++){switch(this.diffs[S][0]){case v:w="+";break;case p:w="-";break;case b:w=" ";break}x[S+1]=w+encodeURI(this.diffs[S][1])+`
`}return x.join("").replace(/%20/g," ")},h.exports=c,h.exports.diff_match_patch=c,h.exports.DIFF_DELETE=p,h.exports.DIFF_INSERT=v,h.exports.DIFF_EQUAL=b},408:(h,c,p)=>{p.d(c,{default:()=>Nt});var v=p(135),b=p(840),g=p(775),m=p(428),x=p(325),w=p(483),S=p(999),k=function(oe){oe===void 0&&(oe=document);var he=function(J){var ee=document.createElement("img");ee.src=J.getAttribute("data-src"),ee.addEventListener("load",function(){!J.getAttribute("style")&&!J.getAttribute("class")&&!J.getAttribute("width")&&!J.getAttribute("height")&&ee.naturalHeight>ee.naturalWidth&&ee.naturalWidth/ee.naturalHeight<document.querySelector(".vditor-reset").clientWidth/(window.innerHeight-40)&&ee.naturalHeight>window.innerHeight-40&&(J.style.height=window.innerHeight-40+"px"),J.src=ee.src}),J.removeAttribute("data-src")};if(!("IntersectionObserver"in window))return oe.querySelectorAll("img").forEach(function(J){J.getAttribute("data-src")&&he(J)}),!1;window.vditorImageIntersectionObserver?(window.vditorImageIntersectionObserver.disconnect(),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)})):(window.vditorImageIntersectionObserver=new IntersectionObserver(function(J){J.forEach(function(ee){(typeof ee.isIntersecting>"u"?ee.intersectionRatio!==0:ee.isIntersecting)&&ee.target.getAttribute("data-src")&&he(ee.target)})}),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)}))},C=p(472),T=p(280),A=p(637),M=p(825),y=p(11),N=p(194),z=p(436),F=p(229),P=p(145),Y=p(538),te=p(413),ce=p(106),Me=p(673),Fe=function(oe){document.querySelectorAll(".vditor-anchor").forEach(function(he){oe===1&&he.classList.add("vditor-anchor--left"),he.onclick=function(){var J=he.getAttribute("href").substr(1),ee=document.getElementById("vditorAnchor-"+J).offsetTop;document.querySelector("html").scrollTop=ee}}),window.onhashchange=function(){var he=document.getElementById("vditorAnchor-"+decodeURIComponent(window.location.hash.substr(1)));he&&(document.querySelector("html").scrollTop=he.offsetTop)}},We=p(214),rt=p(810),je=function(oe,he){if(he===void 0&&(he="zh_CN"),!(typeof speechSynthesis>"u"||typeof SpeechSynthesisUtterance>"u")){var J=function(){var be=speechSynthesis.getVoices(),le,ye;return be.forEach(function(Ae){Ae.lang===he.replace("_","-")&&(le=Ae),Ae.default&&(ye=Ae)}),le||(le=ye),le},ee='<svg><use xlink:href="#vditor-icon-play"></use></svg>',Ce='<svg><use xlink:href="#vditor-icon-pause"></use></svg>';document.getElementById("vditorIconScript")||(ee='<svg viewBox="0 0 32 32"><path d="M3.436 0l25.128 16-25.128 16v-32z"></path></svg>',Ce='<svg viewBox="0 0 32 32"><path d="M20.617 0h9.128v32h-9.128v-32zM2.255 32v-32h9.128v32h-9.128z"></path></svg>');var se=document.querySelector(".vditor-speech");se||(se=document.createElement("button"),se.className="vditor-speech",oe.insertAdjacentElement("beforeend",se),speechSynthesis.onvoiceschanged!==void 0&&(speechSynthesis.onvoiceschanged=J));var G=J(),X=new SpeechSynthesisUtterance;X.voice=G,X.onend=X.onerror=function(){se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee},oe.addEventListener(window.ontouchstart!==void 0?"touchend":"click",function(be){var le=be.target;if(le.classList.contains("vditor-speech")||le.parentElement.classList.contains("vditor-speech")){se.classList.contains("vditor-speech--current")?speechSynthesis.speaking&&(speechSynthesis.paused?(speechSynthesis.resume(),se.innerHTML=Ce):(speechSynthesis.pause(),se.innerHTML=ee)):(X.text=se.getAttribute("data-text"),speechSynthesis.speak(X),se.classList.add("vditor-speech--current"),se.innerHTML=Ce),(0,rt.Hc)(window.vditorSpeechRange),oe.focus();return}if(se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee,getSelection().rangeCount!==0){var ye=getSelection().getRangeAt(0),Ae=ye.toString().trim();if(Ae){window.vditorSpeechRange=ye.cloneRange();var ze=ye.getBoundingClientRect();se.innerHTML=ee,se.style.display="block",se.style.top=ze.top+ze.height+document.querySelector("html").scrollTop-20+"px",window.ontouchstart!==void 0?se.style.left=be.changedTouches[be.changedTouches.length-1].pageX+2+"px":se.style.left=be.clientX+2+"px",se.setAttribute("data-text",Ae)}}})}},Ne=function(oe,he,J,ee){function Ce(se){return se instanceof J?se:new J(function(G){G(se)})}return new(J||(J=Promise))(function(se,G){function X(ye){try{le(ee.next(ye))}catch(Ae){G(Ae)}}function be(ye){try{le(ee.throw(ye))}catch(Ae){G(Ae)}}function le(ye){ye.done?se(ye.value):Ce(ye.value).then(X,be)}le((ee=ee.apply(oe,he||[])).next())})},nt=function(oe,he){var J={label:0,sent:function(){if(se[0]&1)throw se[1];return se[1]},trys:[],ops:[]},ee,Ce,se,G;return G={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(G[Symbol.iterator]=function(){return this}),G;function X(le){return function(ye){return be([le,ye])}}function be(le){if(ee)throw new TypeError("Generator is already executing.");for(;G&&(G=0,le[0]&&(J=0)),J;)try{if(ee=1,Ce&&(se=le[0]&2?Ce.return:le[0]?Ce.throw||((se=Ce.return)&&se.call(Ce),0):Ce.next)&&!(se=se.call(Ce,le[1])).done)return se;switch(Ce=0,se&&(le=[le[0]&2,se.value]),le[0]){case 0:case 1:se=le;break;case 4:return J.label++,{value:le[1],done:!1};case 5:J.label++,Ce=le[1],le=[0];continue;case 7:le=J.ops.pop(),J.trys.pop();continue;default:if(se=J.trys,!(se=se.length>0&&se[se.length-1])&&(le[0]===6||le[0]===2)){J=0;continue}if(le[0]===3&&(!se||le[1]>se[0]&&le[1]<se[3])){J.label=le[1];break}if(le[0]===6&&J.label<se[1]){J.label=se[1],se=le;break}if(se&&J.label<se[2]){J.label=se[2],J.ops.push(le);break}se[2]&&J.ops.pop(),J.trys.pop();continue}le=he.call(oe,J)}catch(ye){le=[6,ye],Ce=0}finally{ee=se=0}if(le[0]&5)throw le[1];return{value:le[0]?le[1]:void 0,done:!0}}},ct=function(oe){var he,J={anchor:0,cdn:P.g.CDN,customEmoji:{},emojiPath:"".concat(P.g.CDN,"/dist/images/emoji"),hljs:P.g.HLJS_OPTIONS,icon:"ant",lang:"zh_CN",markdown:P.g.MARKDOWN_OPTIONS,math:P.g.MATH_OPTIONS,mode:"light",speech:{enable:!1},render:{media:{enable:!0}},theme:P.g.THEME_OPTIONS};return oe.cdn&&(!((he=oe.theme)===null||he===void 0)&&he.path||(J.theme.path="".concat(oe.cdn,"/dist/css/content-theme")),oe.emojiPath||(J.emojiPath="".concat(oe.cdn,"/dist/images/emoji"))),(0,Me.T)(J,oe)},tt=function(oe,he){var J=ct(he);return(0,te.G)("".concat(J.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){var ee=(0,We.X)({autoSpace:J.markdown.autoSpace,gfmAutoLink:J.markdown.gfmAutoLink,codeBlockPreview:J.markdown.codeBlockPreview,emojiSite:J.emojiPath,emojis:J.customEmoji,fixTermTypo:J.markdown.fixTermTypo,footnotes:J.markdown.footnotes,headingAnchor:J.anchor!==0,inlineMathDigit:J.math.inlineDigit,lazyLoadImage:J.lazyLoadImage,linkBase:J.markdown.linkBase,linkPrefix:J.markdown.linkPrefix,listStyle:J.markdown.listStyle,mark:J.markdown.mark,mathBlockPreview:J.markdown.mathBlockPreview,paragraphBeginningSpace:J.markdown.paragraphBeginningSpace,sanitize:J.markdown.sanitize,toc:J.markdown.toc});return he!=null&&he.renderers&&ee.SetJSRenderers({renderers:{Md2HTML:he.renderers}}),ee.SetHeadingID(!0),ee.Md2HTML(oe)})},q=function(oe,he,J){return Ne(void 0,void 0,void 0,function(){var ee,Ce,se,G;return nt(this,function(X){switch(X.label){case 0:return ee=ct(J),[4,tt(he,ee)];case 1:if(Ce=X.sent(),ee.transform&&(Ce=ee.transform(Ce)),oe.innerHTML=Ce,oe.classList.add("vditor-reset"),ee.i18n)return[3,5];if(["de_DE","en_US","es_ES","fr_FR","ja_JP","ko_KR","pt_BR","ru_RU","sv_SE","vi_VN","zh_CN","zh_TW"].includes(ee.lang))return[3,2];throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");case 2:return se="vditorI18nScript",G=se+ee.lang,document.querySelectorAll('head script[id^="'.concat(se,'"]')).forEach(function(be){be.id!==G&&document.head.removeChild(be)}),[4,(0,te.G)("".concat(ee.cdn,"/dist/js/i18n/").concat(ee.lang,".js"),G)];case 3:X.sent(),X.label=4;case 4:return[3,6];case 5:window.VditorI18n=ee.i18n,X.label=6;case 6:return ee.icon?[4,(0,te.G)("".concat(ee.cdn,"/dist/js/icons/").concat(ee.icon,".js"),"vditorIconScript")]:[3,8];case 7:X.sent(),X.label=8;case 8:return(0,Y.Z)(ee.theme.current,ee.theme.path),ee.anchor===1&&oe.classList.add("vditor-reset--anchor"),(0,m.O)(oe,ee.hljs),(0,S.s)(ee.hljs,oe,ee.cdn),(0,C.H)(oe,{cdn:ee.cdn,math:ee.math}),(0,A.i)(oe,ee.cdn,ee.mode),(0,M.J)(oe,ee.cdn,ee.mode),(0,y.K)(oe,ee.cdn),(0,x.P)(oe,ee.cdn),(0,w.v)(oe,ee.cdn),(0,g.p)(oe,ee.cdn,ee.mode),(0,N.P)(oe,ee.cdn,ee.mode),(0,F.B)(oe,ee.cdn),(0,v.Q)(oe,ee.cdn),ee.render.media.enable&&(0,T.Y)(oe),ee.speech.enable&&je(oe),ee.anchor!==0&&Fe(ee.anchor),ee.after&&ee.after(),ee.lazyLoadImage&&k(oe),oe.addEventListener("click",function(be){var le=(0,ce.lG)(be.target,"SPAN");if(le&&(0,ce.fb)(le,"vditor-toc")){var ye=oe.querySelector("#"+le.getAttribute("data-target-id"));ye&&window.scrollTo(window.scrollX,ye.offsetTop);return}}),[2]}})})},Ht=p(190),Rt=p(580),$t=function(){function oe(){}return oe.adapterRender=b,oe.previewImage=Ht.E,oe.codeRender=m.O,oe.graphvizRender=w.v,oe.highlightRender=S.s,oe.mathRender=C.H,oe.mermaidRender=A.i,oe.SMILESRender=M.J,oe.markmapRender=y.K,oe.flowchartRender=x.P,oe.chartRender=g.p,oe.abcRender=v.Q,oe.mindmapRender=N.P,oe.plantumlRender=F.B,oe.outlineRender=z.k,oe.mediaRender=T.Y,oe.speechRender=je,oe.lazyLoadImageRender=k,oe.md2html=tt,oe.preview=q,oe.setCodeTheme=Rt.Y,oe.setContentTheme=Y.Z,oe}();const Nt=$t},145:(h,c,p)=>{p.d(c,{H:()=>v,g:()=>b});var v="3.11.2",b=function(){function g(){}return g.ZWSP="",g.DROP_EDITOR="application/editor",g.MOBILE_WIDTH=520,g.CLASS_MENU_DISABLED="vditor-menu--disabled",g.EDIT_TOOLBARS=["emoji","headings","bold","italic","strike","link","list","ordered-list","outdent","indent","check","line","quote","code","inline-code","insert-after","insert-before","upload","record","table"],g.CODE_THEME=["a11y-dark","agate","an-old-hope","androidstudio","arta","atom-one-dark","atom-one-dark-reasonable","base16/3024","base16/apathy","base16/apprentice","base16/ashes","base16/atelier-cave","base16/atelier-dune","base16/atelier-estuary","base16/atelier-forest","base16/atelier-heath","base16/atelier-lakeside","base16/atelier-plateau","base16/atelier-savanna","base16/atelier-seaside","base16/atelier-sulphurpool","base16/atlas","base16/bespin","base16/black-metal","base16/black-metal-bathory","base16/black-metal-burzum","base16/black-metal-dark-funeral","base16/black-metal-gorgoroth","base16/black-metal-immortal","base16/black-metal-khold","base16/black-metal-marduk","base16/black-metal-mayhem","base16/black-metal-nile","base16/black-metal-venom","base16/brewer","base16/bright","base16/brogrammer","base16/brush-trees-dark","base16/chalk","base16/circus","base16/classic-dark","base16/codeschool","base16/colors","base16/danqing","base16/darcula","base16/dark-violet","base16/darkmoss","base16/darktooth","base16/decaf","base16/default-dark","base16/dracula","base16/edge-dark","base16/eighties","base16/embers","base16/equilibrium-dark","base16/equilibrium-gray-dark","base16/espresso","base16/eva","base16/eva-dim","base16/flat","base16/framer","base16/gigavolt","base16/google-dark","base16/grayscale-dark","base16/green-screen","base16/gruvbox-dark-hard","base16/gruvbox-dark-medium","base16/gruvbox-dark-pale","base16/gruvbox-dark-soft","base16/hardcore","base16/harmonic16-dark","base16/heetch-dark","base16/helios","base16/hopscotch","base16/horizon-dark","base16/humanoid-dark","base16/ia-dark","base16/icy-dark","base16/ir-black","base16/isotope","base16/kimber","base16/london-tube","base16/macintosh","base16/marrakesh","base16/materia","base16/material","base16/material-darker","base16/material-palenight","base16/material-vivid","base16/mellow-purple","base16/mocha","base16/monokai","base16/nebula","base16/nord","base16/nova","base16/ocean","base16/oceanicnext","base16/onedark","base16/outrun-dark","base16/papercolor-dark","base16/paraiso","base16/pasque","base16/phd","base16/pico","base16/pop","base16/porple","base16/qualia","base16/railscasts","base16/rebecca","base16/ros-pine","base16/ros-pine-moon","base16/sandcastle","base16/seti-ui","base16/silk-dark","base16/snazzy","base16/solar-flare","base16/solarized-dark","base16/spacemacs","base16/summercamp","base16/summerfruit-dark","base16/synth-midnight-terminal-dark","base16/tango","base16/tender","base16/tomorrow-night","base16/twilight","base16/unikitty-dark","base16/vulcan","base16/windows-10","base16/windows-95","base16/windows-high-contrast","base16/windows-nt","base16/woodland","base16/xcode-dusk","base16/zenburn","codepen-embed","dark","devibeans","far","felipec","github-dark","github-dark-dimmed","gml","gradient-dark","hybrid","ir-black","isbl-editor-dark","kimbie-dark","lioshi","monokai","monokai-sublime","night-owl","nnfx-dark","nord","obsidian","panda-syntax-dark","paraiso-dark","pojoaque","qtcreator-dark","rainbow","shades-of-purple","srcery","stackoverflow-dark","sunburst","tomorrow-night-blue","tomorrow-night-bright","tokyo-night-dark","vs2015","xt256","ant-design","a11y-light","arduino-light","ascetic","atom-one-light","base16/atelier-cave-light","base16/atelier-dune-light","base16/atelier-estuary-light","base16/atelier-forest-light","base16/atelier-heath-light","base16/atelier-lakeside-light","base16/atelier-plateau-light","base16/atelier-savanna-light","base16/atelier-seaside-light","base16/atelier-sulphurpool-light","base16/brush-trees","base16/classic-light","base16/cupcake","base16/cupertino","base16/default-light","base16/dirtysea","base16/edge-light","base16/equilibrium-gray-light","base16/equilibrium-light","base16/fruit-soda","base16/github","base16/google-light","base16/grayscale-light","base16/gruvbox-light-hard","base16/gruvbox-light-medium","base16/gruvbox-light-soft","base16/harmonic16-light","base16/heetch-light","base16/humanoid-light","base16/horizon-light","base16/ia-light","base16/material-lighter","base16/mexico-light","base16/one-light","base16/papercolor-light","base16/ros-pine-dawn","base16/sagelight","base16/shapeshifter","base16/silk-light","base16/solar-flare-light","base16/solarized-light","base16/summerfruit-light","base16/synth-midnight-terminal-light","base16/tomorrow","base16/unikitty-light","base16/windows-10-light","base16/windows-95-light","base16/windows-high-contrast-light","brown-paper","base16/windows-nt-light","color-brewer","docco","foundation","github","googlecode","gradient-light","grayscale","idea","intellij-light","isbl-editor-light","kimbie-light","lightfair","magula","mono-blue","nnfx-light","panda-syntax-light","paraiso-light","purebasic","qtcreator-light","routeros","school-book","stackoverflow-light","tokyo-night-light","vs","xcode","default"],g.ALIAS_CODE_LANGUAGES=["abc","plantuml","mermaid","flowchart","echarts","mindmap","graphviz","math","markmap","smiles","js","ts","html","toml","c#","bat"],g.CDN="https://unpkg.com/vditor@".concat("3.11.2"),g.MARKDOWN_OPTIONS={autoSpace:!1,gfmAutoLink:!0,codeBlockPreview:!0,fixTermTypo:!1,footnotes:!0,linkBase:"",linkPrefix:"",listStyle:!1,mark:!1,mathBlockPreview:!0,paragraphBeginningSpace:!1,sanitize:!0,toc:!1},g.HLJS_OPTIONS={enable:!0,lineNumber:!1,defaultLang:"",style:"github"},g.MATH_OPTIONS={engine:"KaTeX",inlineDigit:!1,macros:{}},g.THEME_OPTIONS={current:"light",list:{"ant-design":"Ant Design",dark:"Dark",light:"Light",wechat:"WeChat"},path:"".concat(g.CDN,"/dist/css/content-theme")},g}()},825:(h,c,p)=>{p.d(c,{J:()=>x});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(w,S,k){w===void 0&&(w=document),S===void 0&&(S=v.g.CDN);var C=g.SMILESRenderAdapter.getElements(w);C.length>0&&(0,b.G)("".concat(S,"/dist/js/smiles-drawer/smiles-drawer.min.js?v=2.1.7"),"vditorAbcjsScript").then(function(){var T=new SmiDrawer({},{});C.forEach(function(A){var M=g.SMILESRenderAdapter.getCode(A).trim();if(!(A.getAttribute("data-processed")==="true"||M.trim()==="")){var y="smiles"+(0,m.Wb)();A.innerHTML='<svg id="'.concat(y,'"></svg>'),T.draw(M,"#"+y,k==="dark"?"dark":void 0),A.setAttribute("data-processed","true")}})})}},135:(h,c,p)=>{p.d(c,{Q:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var S=g.abcRenderAdapter.getElements(x);S.length>0&&(0,b.G)("".concat(w,"/dist/js/abcjs/abcjs_basic.min.js"),"vditorAbcjsScript").then(function(){S.forEach(function(k){k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre")||k.getAttribute("data-processed")!=="true"&&(ABCJS.renderAbc(k,g.abcRenderAdapter.getCode(k).trim()),k.style.overflowX="auto",k.setAttribute("data-processed","true"))})})}},840:(h,c,p)=>{p.r(c),p.d(c,{mathRenderAdapter:()=>v,SMILESRenderAdapter:()=>b,mermaidRenderAdapter:()=>g,markmapRenderAdapter:()=>m,mindmapRenderAdapter:()=>x,chartRenderAdapter:()=>w,abcRenderAdapter:()=>S,graphvizRenderAdapter:()=>k,flowchartRenderAdapter:()=>C,plantumlRenderAdapter:()=>T});var v={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-math")}},b={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-smiles")}},g={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-mermaid")}},m={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-markmap")}},x={getCode:function(A){return A.getAttribute("data-code")},getElements:function(A){return A.querySelectorAll(".language-mindmap")}},w={getCode:function(A){return A.innerText},getElements:function(A){return A.querySelectorAll(".language-echarts")}},S={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-abc")}},k={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-graphviz")}},C={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-flowchart")}},T={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-plantuml")}}},775:(h,c,p)=>{p.d(c,{p:()=>S});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(k,C,T,A){function M(y){return y instanceof T?y:new T(function(N){N(y)})}return new(T||(T=Promise))(function(y,N){function z(Y){try{P(A.next(Y))}catch(te){N(te)}}function F(Y){try{P(A.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,F)}P((A=A.apply(k,C||[])).next())})},w=function(k,C){var T={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},A,M,y,N;return N={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function z(P){return function(Y){return F([P,Y])}}function F(P){if(A)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(T=0)),T;)try{if(A=1,M&&(y=P[0]&2?M.return:P[0]?M.throw||((y=M.return)&&y.call(M),0):M.next)&&!(y=y.call(M,P[1])).done)return y;switch(M=0,y&&(P=[P[0]&2,y.value]),P[0]){case 0:case 1:y=P;break;case 4:return T.label++,{value:P[1],done:!1};case 5:T.label++,M=P[1],P=[0];continue;case 7:P=T.ops.pop(),T.trys.pop();continue;default:if(y=T.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){T=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){T.label=P[1];break}if(P[0]===6&&T.label<y[1]){T.label=y[1],y=P;break}if(y&&T.label<y[2]){T.label=y[2],T.ops.push(P);break}y[2]&&T.ops.pop(),T.trys.pop();continue}P=C.call(k,T)}catch(Y){P=[6,Y],M=0}finally{A=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,T){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.chartRenderAdapter.getElements(k);A.length>0&&(0,b.G)("".concat(C,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){A.forEach(function(M){return x(void 0,void 0,void 0,function(){var y,N,z;return w(this,function(F){switch(F.label){case 0:if(M.parentElement.classList.contains("vditor-wysiwyg__pre")||M.parentElement.classList.contains("vditor-ir__marker--pre"))return[2];if(y=g.chartRenderAdapter.getCode(M).trim(),!y)return[2];F.label=1;case 1:return F.trys.push([1,3,,4]),M.getAttribute("data-processed")==="true"?[2]:[4,(0,m.Qf)(y)];case 2:return N=F.sent(),echarts.init(M,T==="dark"?"dark":void 0).setOption(N),M.setAttribute("data-processed","true"),[3,4];case 3:return z=F.sent(),M.className="vditor-reset--error",M.innerHTML="echarts render error: <br>".concat(z),[3,4];case 4:return[2]}})})})})}},428:(h,c,p)=>{p.d(c,{O:()=>g});var v=p(105),b=p(145),g=function(m,x){Array.from(m.querySelectorAll("pre > code")).filter(function(w,S){return!(w.parentElement.classList.contains("vditor-wysiwyg__pre")||w.parentElement.classList.contains("vditor-ir__marker--pre")||w.classList.contains("language-mermaid")||w.classList.contains("language-flowchart")||w.classList.contains("language-echarts")||w.classList.contains("language-mindmap")||w.classList.contains("language-plantuml")||w.classList.contains("language-markmap")||w.classList.contains("language-abc")||w.classList.contains("language-graphviz")||w.classList.contains("language-math")||w.classList.contains("language-smiles")||w.style.maxHeight.indexOf("px")>-1||m.classList.contains("vditor-preview")&&S>5)}).forEach(function(w){var S,k,C,T=w.innerText;if(w.classList.contains("highlight-chroma")){var A=w.cloneNode(!0);A.querySelectorAll(".highlight-ln").forEach(function(z){z.remove()}),T=A.innerText}else T.endsWith(`
`)&&(T=T.substr(0,T.length-1));var M='<svg><use xlink:href="#vditor-icon-copy"></use></svg>';document.getElementById("vditorIconScript")||(M='<svg viewBox="0 0 32 32"><path d="M22.545-0h-17.455c-1.6 0-2.909 1.309-2.909 2.909v20.364h2.909v-20.364h17.455v-2.909zM26.909 5.818h-16c-1.6 0-2.909 1.309-2.909 2.909v20.364c0 1.6 1.309 2.909 2.909 2.909h16c1.6 0 2.909-1.309 2.909-2.909v-20.364c0-1.6-1.309-2.909-2.909-2.909zM26.909 29.091h-16v-20.364h16v20.364z"></path></svg>');var y=document.createElement("div");y.className="vditor-copy",y.innerHTML='<span aria-label="'.concat(((S=window.VditorI18n)===null||S===void 0?void 0:S.copy)||"复制",`"
onmouseover="this.setAttribute('aria-label', '`).concat(((k=window.VditorI18n)===null||k===void 0?void 0:k.copy)||"复制",`')"
class="vditor-tooltipped vditor-tooltipped__w"
onclick="event.stopPropagation();this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '`).concat(((C=window.VditorI18n)===null||C===void 0?void 0:C.copied)||"已复制",`');this.previousElementSibling.blur()">`).concat(M,"</span>");var N=document.createElement("textarea");N.value=(0,v.X)(T),y.insertAdjacentElement("afterbegin",N),x&&x.renderMenu&&x.renderMenu(w,y),w.before(y),w.style.maxHeight=window.outerHeight-40+"px",w.insertAdjacentHTML("afterend",'<span style="position: absolute">'.concat(b.g.ZWSP,"</span>"))})}},325:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.flowchartRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/flowchart.js/flowchart.min.js"),"vditorFlowchartScript").then(function(){S.forEach(function(k){if(k.getAttribute("data-processed")!=="true"){var C=flowchart.parse(g.flowchartRenderAdapter.getCode(k));k.innerHTML="",C.drawSVG(k),k.setAttribute("data-processed","true")}})})}},483:(h,c,p)=>{p.d(c,{v:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.graphvizRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/graphviz/viz.js"),"vditorGraphVizScript").then(function(){S.forEach(function(k){var C=g.graphvizRenderAdapter.getCode(k);if(!(k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre"))&&!(k.getAttribute("data-processed")==="true"||C.trim()==="")){try{var T=new Blob(["importScripts('".concat(document.getElementById("vditorGraphVizScript").src.replace("viz.js","full.render.js"),"');")],{type:"application/javascript"}),A=window.URL||window.webkitURL,M=A.createObjectURL(T),y=new Worker(M);new Viz({worker:y}).renderSVGElement(C).then(function(N){k.innerHTML=N.outerHTML}).catch(function(N){k.innerHTML="graphviz render error: <br>".concat(N),k.className="vditor-reset--error"})}catch(N){console.error("graphviz error",N)}k.setAttribute("data-processed","true")}})})}},999:(h,c,p)=>{p.d(c,{s:()=>m});var v=p(145),b=p(413),g=p(290),m=function(x,w,S){w===void 0&&(w=document),S===void 0&&(S=v.g.CDN);var k=x.style;v.g.CODE_THEME.includes(k)||(k="github");var C=document.getElementById("vditorHljsStyle"),T="".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css");if(C&&C.getAttribute("href")!==T&&C.remove(),(0,g.c)("".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css"),"vditorHljsStyle"),x.enable!==!1){var A=w.querySelectorAll("pre > code");A.length!==0&&(0,b.G)("".concat(S,"/dist/js/highlight.js/highlight.min.js?v=11.7.0"),"vditorHljsScript").then(function(){(0,b.G)("".concat(S,"/dist/js/highlight.js/third-languages.js?v=1.0.1"),"vditorHljsThirdScript").then(function(){w.querySelectorAll("pre > code").forEach(function(M){if(!(M.parentElement.classList.contains("vditor-ir__marker--pre")||M.parentElement.classList.contains("vditor-wysiwyg__pre"))&&!(M.classList.contains("language-mermaid")||M.classList.contains("language-flowchart")||M.classList.contains("language-echarts")||M.classList.contains("language-mindmap")||M.classList.contains("language-plantuml")||M.classList.contains("language-smiles")||M.classList.contains("language-abc")||M.classList.contains("language-graphviz")||M.classList.contains("language-math"))){x.defaultLang!==""&&M.className.indexOf("language-")===-1&&M.classList.add("language-"+x.defaultLang);var y=M.className.replace("language-","");if(window.hljs.getLanguage(y)||(y="plaintext"),M.innerHTML=window.hljs.highlight(M.textContent,{language:y,ignoreIllegals:!0}).value,M.classList.add("hljs"),!!x.lineNumber){M.classList.add("vditor-linenumber");var N=M.querySelector(".vditor-linenumber__temp");N||(N=document.createElement("div"),N.className="vditor-linenumber__temp",M.insertAdjacentElement("beforeend",N));var z=getComputedStyle(M).whiteSpace,F=!1;(z==="pre-wrap"||z==="pre-line")&&(F=!0);var P="",Y=M.textContent.split(/\r\n|\r|\n/g);Y.pop(),Y.map(function(te){var ce="";F&&(N.textContent=te||`
`,ce=' style="height:'.concat(N.getBoundingClientRect().height,'px"')),P+="<span".concat(ce,"></span>")}),N.style.display="none",P='<span class="vditor-linenumber__rows">'.concat(P,"</span>"),M.insertAdjacentHTML("beforeend",P)}}})})})}}},11:(h,c,p)=>{p.d(c,{K:()=>S});var v=p(145),b=p(413),g=p(840),m={},x=function(k,C){var T=k.transform(C),A=Object.keys(T.features).filter(function(F){return!m[F]});A.forEach(function(F){m[F]=!0});var M=k.getAssets(A),y=M.styles,N=M.scripts,z=window.markmap;return y&&z.loadCSS(y),N&&z.loadJS(N),T},w=function(k,C){var T=window.markmap,A=T.Transformer,M=T.Markmap,y=T.deriveOptions;T.globalCSS;var N=new A;k.innerHTML='<svg style="width:100%"></svg>';var z=k.firstChild,F=M.create(z,null),P=x(N,C),Y=P.root,te=P.frontmatter,ce=te==null?void 0:te.markmap,Me=y(ce);F.setData(Y,Me),F.fit()},S=function(k,C){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var T=g.markmapRenderAdapter.getElements(k);T.length!==0&&(0,b.G)("".concat(C,"/dist/js/markmap/markmap.min.js"),"vditorMarkerScript").then(function(){T.forEach(function(A){var M=g.markmapRenderAdapter.getCode(A);if(!(A.getAttribute("data-processed")==="true"||M.trim()==="")){var y=document.createElement("div");y.className="language-markmap",A.parentNode.appendChild(y),w(y,M),A.parentNode.childNodes[0].nodeName=="CODE"&&A.parentNode.removeChild(A.parentNode.childNodes[0])}})})}},472:(h,c,p)=>{p.d(c,{H:()=>w});var v=p(145),b=p(413),g=p(290),m=p(105),x=p(840),w=function(S,k){S===void 0&&(S=document);var C=x.mathRenderAdapter.getElements(S);if(C.length!==0){var T={cdn:v.g.CDN,math:{engine:"KaTeX",inlineDigit:!1,macros:{}}};if(k&&k.math&&(k.math=Object.assign({},T.math,k.math)),k=Object.assign({},T,k),k.math.engine==="KaTeX")(0,g.c)("".concat(k.cdn,"/dist/js/katex/katex.min.css?v=0.16.9"),"vditorKatexStyle"),(0,b.G)("".concat(k.cdn,"/dist/js/katex/katex.min.js?v=0.16.9"),"vditorKatexScript").then(function(){(0,b.G)("".concat(k.cdn,"/dist/js/katex/mhchem.min.js?v=0.16.9"),"vditorKatexChemScript").then(function(){C.forEach(function(y){if(!(y.parentElement.classList.contains("vditor-wysiwyg__pre")||y.parentElement.classList.contains("vditor-ir__marker--pre"))&&!y.getAttribute("data-math")){var N=(0,m.X)(x.mathRenderAdapter.getCode(y));y.setAttribute("data-math",N);try{y.innerHTML=katex.renderToString(N,{displayMode:y.tagName==="DIV",output:"html",macros:k.math.macros})}catch(z){y.innerHTML=z.message,y.className="language-math vditor-reset--error"}y.addEventListener("copy",function(z){z.stopPropagation(),z.preventDefault();var F=z.currentTarget.closest(".language-math");z.clipboardData.setData("text/html",F.innerHTML),z.clipboardData.setData("text/plain",F.getAttribute("data-math"))})}})})});else if(k.math.engine==="MathJax"){var A=function(y){if(y.length!==0){var N=0,z=y[y.length-1],F=function(){var P=y[N++];P===z?P():P(F)};F()}};window.MathJax||(window.MathJax={loader:{paths:{mathjax:"".concat(k.cdn,"/dist/js/mathjax")}},startup:{typeset:!1},tex:{macros:k.math.macros}},Object.assign(window.MathJax,k.math.mathJaxOptions)),(0,b.J)("".concat(k.cdn,"/dist/js/mathjax/tex-svg-full.js"),"protyleMathJaxScript");var M=function(y,N){var z=(0,m.X)(y.textContent).trim(),F=window.MathJax.getMetricsFor(y);F.display=y.tagName==="DIV",window.MathJax.tex2svgPromise(z,F).then(function(P){y.innerHTML="",y.setAttribute("data-math",z),y.append(P),window.MathJax.startup.document.clear(),window.MathJax.startup.document.updateDocument();var Y=P.querySelector('[data-mml-node="merror"]');Y&&Y.textContent.trim()!==""&&(y.innerHTML=Y.textContent.trim(),y.className="vditor-reset--error"),N&&N()})};window.MathJax.startup.promise.then(function(){for(var y=[],N=function(F){var P=C[F];!P.parentElement.classList.contains("vditor-wysiwyg__pre")&&!P.parentElement.classList.contains("vditor-ir__marker--pre")&&!P.getAttribute("data-math")&&(0,m.X)(P.textContent).trim()&&y.push(function(Y){F===C.length-1?M(P):M(P,Y)})},z=0;z<C.length;z++)N(z);A(y)})}}}},280:(h,c,p)=>{p.d(c,{Y:()=>x});var v=p(494),b=function(w,S){w.insertAdjacentHTML("afterend",'<video controls="controls" src="'.concat(S,'"></video>')),w.remove()},g=function(w,S){w.insertAdjacentHTML("afterend",'<audio controls="controls" src="'.concat(S,'"></audio>')),w.remove()},m=function(w,S){var k=S.match(/\/\/(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?/),C=S.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),T=S.match(/\/\/v\.qq\.com\/x\/cover\/.*\/([^\/]+)\.html\??.*/),A=S.match(/(?:www\.|\/\/)coub\.com\/view\/(\w+)/),M=S.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/),y=S.match(/.+dailymotion.com\/(video|hub)\/(\w+)\?/),N=S.match(/(?:www\.|\/\/)bilibili\.com\/video\/(\w+)/),z=S.match(/(?:www\.|\/\/)ted\.com\/talks\/(\w+)/);if(k&&k[1].length===11)w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//www.youtube.com/embed/'.concat(k[1]+(k[2]?"?start="+k[2]:""),'"></iframe>')),w.remove();else if(C&&C[1])w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//player.youku.com/embed/'.concat(C[1],'"></iframe>')),w.remove();else if(T&&T[1])w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="https://v.qq.com/txp/iframe/player.html?vid='.concat(T[1],'"></iframe>')),w.remove();else if(A&&A[1])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
src="//coub.com/embed/`.concat(A[1],'?muted=false&autostart=false&originalSize=true&startWithHD=true"></iframe>')),w.remove();else if(M&&M[0])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
src="https://www.facebook.com/plugins/video.php?href=`.concat(encodeURIComponent(M[0]),'"></iframe>')),w.remove();else if(y&&y[2])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
src="https://www.dailymotion.com/embed/video/`.concat(y[2],'"></iframe>')),w.remove();else if(S.indexOf("bilibili.com")>-1&&(S.indexOf("bvid=")>-1||N&&N[1])){var F={bvid:(0,v.on)("bvid",S)||N&&N[1],page:"1",high_quality:"1",as_wide:"1",allowfullscreen:"true",autoplay:"0"};new URL(S.startsWith("http")?S:"https:"+S).search.split("&").forEach(function(te,ce){if(te){ce===0&&(te=te.substr(1));var Me=te.split("=");F[Me[0]]=Me[1]}});var P="https://player.bilibili.com/player.html?",Y=Object.keys(F);Y.forEach(function(te,ce){P+="".concat(te,"=").concat(F[te]),ce<Y.length-1&&(P+="&")}),w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="'.concat(P,'"></iframe>')),w.remove()}else z&&z[1]&&(w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//embed.ted.com/talks/'.concat(z[1],'"></iframe>')),w.remove())},x=function(w){w&&w.querySelectorAll("a").forEach(function(S){var k=S.getAttribute("href");k&&(k.match(/^.+.(mp4|m4v|ogg|ogv|webm)$/)?b(S,k):k.match(/^.+.(mp3|wav|flac)$/)?g(S,k):m(S,k))})}},637:(h,c,p)=>{p.d(c,{i:()=>S});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(k,C,T,A){function M(y){return y instanceof T?y:new T(function(N){N(y)})}return new(T||(T=Promise))(function(y,N){function z(Y){try{P(A.next(Y))}catch(te){N(te)}}function F(Y){try{P(A.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,F)}P((A=A.apply(k,C||[])).next())})},w=function(k,C){var T={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},A,M,y,N;return N={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function z(P){return function(Y){return F([P,Y])}}function F(P){if(A)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(T=0)),T;)try{if(A=1,M&&(y=P[0]&2?M.return:P[0]?M.throw||((y=M.return)&&y.call(M),0):M.next)&&!(y=y.call(M,P[1])).done)return y;switch(M=0,y&&(P=[P[0]&2,y.value]),P[0]){case 0:case 1:y=P;break;case 4:return T.label++,{value:P[1],done:!1};case 5:T.label++,M=P[1],P=[0];continue;case 7:P=T.ops.pop(),T.trys.pop();continue;default:if(y=T.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){T=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){T.label=P[1];break}if(P[0]===6&&T.label<y[1]){T.label=y[1],y=P;break}if(y&&T.label<y[2]){T.label=y[2],T.ops.push(P);break}y[2]&&T.ops.pop(),T.trys.pop();continue}P=C.call(k,T)}catch(Y){P=[6,Y],M=0}finally{A=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,T){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.mermaidRenderAdapter.getElements(k);A.length!==0&&(0,b.G)("".concat(C,"/dist/js/mermaid/mermaid.min.js?v=11.6.0"),"vditorMermaidScript").then(function(){var M={securityLevel:"loose",altFontFamily:"sans-serif",fontFamily:"sans-serif",startOnLoad:!1,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequence:{useMaxWidth:!0,diagramMarginX:8,diagramMarginY:8,boxMargin:8,showSequenceNumbers:!0},gantt:{leftPadding:75,rightPadding:20}};T==="dark"&&(M.theme="dark"),mermaid.initialize(M),A.forEach(function(y){return x(void 0,void 0,void 0,function(){var N,z,F,P,Y;return w(this,function(te){switch(te.label){case 0:if(N=g.mermaidRenderAdapter.getCode(y),y.getAttribute("data-processed")==="true"||N.trim()==="")return[2];z="mermaid"+(0,m.Wb)(),te.label=1;case 1:return te.trys.push([1,3,,4]),[4,mermaid.render(z,y.textContent)];case 2:return F=te.sent(),y.innerHTML=F.svg,[3,4];case 3:return P=te.sent(),Y=document.querySelector("#"+z),y.innerHTML="".concat(Y.outerHTML,`<br>
<div style="text-align: left"><small>`).concat(P.message.replace(/\n/,"<br>"),"</small></div>"),Y.parentElement.remove(),[3,4];case 4:return y.setAttribute("data-processed","true"),[2]}})})})})}},194:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w,S){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var k=g.mindmapRenderAdapter.getElements(x);k.length>0&&(0,b.G)("".concat(w,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){k.forEach(function(C){if(!(C.parentElement.classList.contains("vditor-wysiwyg__pre")||C.parentElement.classList.contains("vditor-ir__marker--pre"))){var T=g.mindmapRenderAdapter.getCode(C);if(T)try{if(C.getAttribute("data-processed")==="true")return;echarts.init(C,S==="dark"?"dark":void 0).setOption({series:[{data:[JSON.parse(decodeURIComponent(T))],initialTreeDepth:-1,itemStyle:{borderWidth:0,color:"#4285f4"},label:{backgroundColor:"#f6f8fa",borderColor:"#d1d5da",borderRadius:5,borderWidth:.5,color:"#586069",lineHeight:20,offset:[-5,0],padding:[0,5],position:"insideRight"},lineStyle:{color:"#d1d5da",width:1},roam:!0,symbol:function(A,M){var y;return!((y=M==null?void 0:M.data)===null||y===void 0)&&y.children?"circle":"path://"},type:"tree"}],tooltip:{trigger:"item",triggerOn:"mousemove"}}),C.setAttribute("data-processed","true")}catch(A){C.className="vditor-reset--error",C.innerHTML="mindmap render error: <br>".concat(A)}}})})}},436:(h,c,p)=>{p.d(c,{k:()=>g});var v=p(771),b=p(472),g=function(m,x,w){var S="",k=[];if(Array.from(m.children).forEach(function(M,y){if((0,v.W)(M)){if(w){var N=M.id.lastIndexOf("_");M.id=M.id.substring(0,N===-1?void 0:N)+"_"+y}k.push(M.id),S+=M.outerHTML.replace("<wbr>","")}}),S==="")return x.innerHTML="","";var C=document.createElement("div");if(w)w.lute.SetToC(!0),w.currentMode==="wysiwyg"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorDOM("<p>[ToC]</p>"+S):w.currentMode==="ir"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorIRDOM("<p>[ToC]</p>"+S):C.innerHTML=w.lute.HTML2VditorDOM("<p>[ToC]</p>"+S),w.lute.SetToC(w.options.preview.markdown.toc);else{x.classList.add("vditor-outline");var T=Lute.New();T.SetToC(!0),C.innerHTML=T.HTML2VditorDOM("<p>[ToC]</p>"+S)}var A=C.firstElementChild.querySelectorAll("li > span[data-target-id]");return A.forEach(function(M,y){if(M.nextElementSibling&&M.nextElementSibling.tagName==="UL"){var N="<svg class='vditor-outline__action'><use xlink:href='#vditor-icon-down'></use></svg>";document.getElementById("vditorIconScript")||(N='<svg class="vditor-outline__action" viewBox="0 0 32 32"><path d="M3.76 6.12l12.24 12.213 12.24-12.213 3.76 3.76-16 16-16-16 3.76-3.76z"></path></svg>'),M.innerHTML="".concat(N,"<span>").concat(M.innerHTML,"</span>")}else M.innerHTML="<svg></svg><span>".concat(M.innerHTML,"</span>");M.setAttribute("data-target-id",k[y])}),S=C.firstElementChild.innerHTML,A.length===0?(x.innerHTML="",S):(x.innerHTML=S,w&&(0,b.H)(x,{cdn:w.options.cdn,math:w.options.preview.math}),x.firstElementChild.addEventListener("click",function(M){for(var y=M.target;y&&!y.isEqualNode(x);){if(y.classList.contains("vditor-outline__action")){y.classList.contains("vditor-outline__action--close")?(y.classList.remove("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:block")):(y.classList.add("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:none")),M.preventDefault(),M.stopPropagation();break}else if(y.getAttribute("data-target-id")){M.preventDefault(),M.stopPropagation();var N=document.getElementById(y.getAttribute("data-target-id"));if(!N)return;if(w)if(w.options.height==="auto"){var z=N.offsetTop+w.element.offsetTop;w.options.toolbarConfig.pin||(z+=w.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,z)}else w.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,w.element.offsetTop),w.preview.element.contains(m)?m.parentElement.scrollTop=N.offsetTop:m.scrollTop=N.offsetTop;else window.scrollTo(window.scrollX,N.offsetTop);break}y=y.parentElement}}),S)}},229:(h,c,p)=>{p.d(c,{B:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var S=g.plantumlRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/plantuml/plantuml-encoder.min.js"),"vditorPlantumlScript").then(function(){S.forEach(function(k){if(!(k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre"))){var C=g.plantumlRenderAdapter.getCode(k).trim();if(C)try{k.innerHTML='<object type="image/svg+xml" data="https://www.plantuml.com/plantuml/svg/~1'.concat(plantumlEncoder.encode(C),'"/>')}catch(T){k.className="vditor-reset--error",k.innerHTML="plantuml render error: <br>".concat(T)}}})})}},214:(h,c,p)=>{p.d(c,{X:()=>v});var v=function(b){var g=Lute.New();return g.PutEmojis(b.emojis),g.SetEmojiSite(b.emojiSite),g.SetHeadingAnchor(b.headingAnchor),g.SetInlineMathAllowDigitAfterOpenMarker(b.inlineMathDigit),g.SetAutoSpace(b.autoSpace),g.SetToC(b.toc),g.SetFootnotes(b.footnotes),g.SetFixTermTypo(b.fixTermTypo),g.SetVditorCodeBlockPreview(b.codeBlockPreview),g.SetVditorMathBlockPreview(b.mathBlockPreview),g.SetSanitize(b.sanitize),g.SetChineseParagraphBeginningSpace(b.paragraphBeginningSpace),g.SetRenderListStyle(b.listStyle),g.SetLinkBase(b.linkBase),g.SetLinkPrefix(b.linkPrefix),g.SetMark(b.mark),g.SetGFMAutoLink(b.gfmAutoLink),b.lazyLoadImage&&g.SetImageLazyLoading(b.lazyLoadImage),g}},190:(h,c,p)=>{p.d(c,{E:()=>v});var v=function(b,g,m){m===void 0&&(m="classic");var x=b.getBoundingClientRect(),w=36;document.body.insertAdjacentHTML("beforeend",'<div class="vditor vditor-img'.concat(m==="dark"?" vditor--dark":"",`">
<div class="vditor-img__bar">
<span class="vditor-img__btn" data-deg="0">
<svg><use xlink:href="#vditor-icon-redo"></use></svg>
`).concat(window.VditorI18n.spin,`
</span>
<span class="vditor-img__btn" onclick="this.parentElement.parentElement.outerHTML = '';document.body.style.overflow = ''">
X &nbsp;`).concat(window.VditorI18n.close,`
</span>
</div>
<div class="vditor-img__img" onclick="this.parentElement.outerHTML = '';document.body.style.overflow = ''">
<img style="width: `).concat(b.width,"px;height:").concat(b.height,"px;transform: translate3d(").concat(x.left,"px, ").concat(x.top-w,'px, 0)" src="').concat(b.getAttribute("src"),`">
</div>
</div>`)),document.body.style.overflow="hidden";var S=document.querySelector(".vditor-img img"),k="translate3d(".concat(Math.max(0,window.innerWidth-b.naturalWidth)/2,"px, ").concat(Math.max(0,window.innerHeight-w-b.naturalHeight)/2,"px, 0)");setTimeout(function(){S.setAttribute("style","transition: transform .3s ease-in-out;transform: ".concat(k)),setTimeout(function(){S.parentElement.scrollTo((S.parentElement.scrollWidth-S.parentElement.clientWidth)/2,(S.parentElement.scrollHeight-S.parentElement.clientHeight)/2)},400)});var C=document.querySelector(".vditor-img__btn");C.addEventListener("click",function(){var T=parseInt(C.getAttribute("data-deg"),10)+90;T/90%2===1&&b.naturalWidth>S.parentElement.clientHeight?S.style.transform="translate3d(".concat(Math.max(0,window.innerWidth-b.naturalWidth)/2,"px, ").concat(b.naturalWidth/2-b.naturalHeight/2,"px, 0) rotateZ(").concat(T,"deg)"):S.style.transform="".concat(k," rotateZ(").concat(T,"deg)"),C.setAttribute("data-deg",T.toString()),setTimeout(function(){S.parentElement.scrollTo((S.parentElement.scrollWidth-S.parentElement.clientWidth)/2,(S.parentElement.scrollHeight-S.parentElement.clientHeight)/2)},400)})}},580:(h,c,p)=>{p.d(c,{Y:()=>g});var v=p(145),b=p(290),g=function(m,x){x===void 0&&(x=v.g.CDN),v.g.CODE_THEME.includes(m)||(m="github");var w=document.getElementById("vditorHljsStyle"),S="".concat(x,"/dist/js/highlight.js/styles/").concat(m,".min.css");w?w.getAttribute("href")!==S&&(w.remove(),(0,b.c)(S,"vditorHljsStyle")):(0,b.c)(S,"vditorHljsStyle")}},538:(h,c,p)=>{p.d(c,{Z:()=>b});var v=p(290),b=function(g,m){if(!(!g||!m)){var x=document.getElementById("vditorContentTheme"),w="".concat(m,"/").concat(g,".css");x?x.getAttribute("href")!==w&&(x.remove(),(0,v.c)(w,"vditorContentTheme")):(0,v.c)(w,"vditorContentTheme")}}},413:(h,c,p)=>{p.d(c,{J:()=>v,G:()=>b});var v=function(g,m){if(document.getElementById(m))return!1;var x=new XMLHttpRequest;x.open("GET",g,!1),x.setRequestHeader("Accept","text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01"),x.send("");var w=document.createElement("script");w.type="text/javascript",w.text=x.responseText,w.id=m,document.head.appendChild(w)},b=function(g,m){return new Promise(function(x,w){if(document.getElementById(m))return x(!0),!1;var S=document.createElement("script");S.src=g,S.async=!0,document.head.appendChild(S),S.onerror=function(k){w(k)},S.onload=function(){if(document.getElementById(m))return S.remove(),x(!0),!1;S.id=m,x(!0)}})}},290:(h,c,p)=>{p.d(c,{c:()=>v});var v=function(b,g){if(!document.getElementById(g)){var m=document.createElement("link");m.id=g,m.rel="stylesheet",m.type="text/css",m.href=b,document.getElementsByTagName("head")[0].appendChild(m)}}},105:(h,c,p)=>{p.d(c,{X:()=>v});var v=function(b){return b.replace(/\u00a0/g," ")}},410:(h,c,p)=>{p.d(c,{G6:()=>v,vU:()=>b,pK:()=>g,Le:()=>m,yl:()=>x,ns:()=>w,i7:()=>S});var v=function(){return navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")===-1},b=function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1},g=function(){try{return typeof localStorage<"u"}catch{return!1}},m=function(){return navigator.userAgent.indexOf("iPhone")>-1?"touchstart":"click"},x=function(k){return navigator.platform.toUpperCase().indexOf("MAC")>=0?!!(k.metaKey&&!k.ctrlKey):!!(!k.metaKey&&k.ctrlKey)},w=function(k){return/Mac/.test(navigator.platform)||navigator.platform==="iPhone"?k.indexOf("⇧")>-1&&b()&&(k=k.replace(";",":").replace("=","+").replace("-","_")):(k.startsWith("⌘")?k=k.replace("⌘","⌘+"):k.startsWith("⌥")&&k.substr(1,1)!=="⌘"?k=k.replace("⌥","⌥+"):k=k.replace("⇧⌘","⌘+⇧+").replace("⌥⌘","⌥+⌘+"),k=k.replace("⌘","Ctrl").replace("⇧","Shift").replace("⌥","Alt"),k.indexOf("Shift")>-1&&(k=k.replace(";",":").replace("=","+").replace("-","_"))),k},S=function(){return/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}},494:(h,c,p)=>{p.d(c,{Wb:()=>v,on:()=>b,Qf:()=>g});var v=function(){return([1e7].toString()+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(m){return(parseInt(m,10)^window.crypto.getRandomValues(new Uint32Array(1))[0]&15>>parseInt(m,10)/4).toString(16)})},b=function(m,x){x===void 0&&(x=window.location.search);var w=x.substring(x.indexOf("?")),S=w.indexOf("#"),k=new URLSearchParams(w.substring(0,S>=0?S:void 0));return k.get(m)},g=function(m){return Function('"use strict";return ('.concat(m,")"))()}},106:(h,c,p)=>{p.d(c,{JQ:()=>b,E2:()=>g,O9:()=>m,a1:()=>x,F9:()=>w,lG:()=>S,fb:()=>k,DX:()=>C});var v=p(771),b=function(T,A){for(var M=k(T,A),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=k(M.parentElement,A),y?M=y:N=!0;return M||!1},g=function(T,A){for(var M=(0,v.S)(T,A),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=(0,v.S)(M.parentElement,A),y?M=y:N=!0;return M||!1},m=function(T){var A=g(T,"UL"),M=g(T,"OL"),y=A;return M&&(!A||A&&M.contains(A))&&(y=M),y},x=function(T,A,M){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var y=T,N=!1;y&&!N&&!y.classList.contains("vditor-reset");)y.getAttribute(A)===M?N=!0:y=y.parentElement;return N&&y},w=function(T){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);var A=T,M=!1,y=x(T,"data-block","0");if(y)return y;for(;A&&!M&&!A.classList.contains("vditor-reset");)A.tagName==="H1"||A.tagName==="H2"||A.tagName==="H3"||A.tagName==="H4"||A.tagName==="H5"||A.tagName==="H6"||A.tagName==="P"||A.tagName==="BLOCKQUOTE"||A.tagName==="OL"||A.tagName==="UL"?M=!0:A=A.parentElement;return M&&A},S=function(T,A){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var M=T,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.nodeName===A?y=!0:M=M.parentElement;return y&&M},k=function(T,A){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var M=T,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.classList.contains(A)?y=!0:M=M.parentElement;return y&&M},C=function(T){for(;T&&T.lastChild;)T=T.lastChild;return T}},771:(h,c,p)=>{p.d(c,{S:()=>v,W:()=>b});var v=function(g,m){if(!g)return!1;g.nodeType===3&&(g=g.parentElement);for(var x=g,w=!1;x&&!w&&!x.classList.contains("vditor-reset");)x.nodeName.indexOf(m)===0?w=!0:x=x.parentElement;return w&&x},b=function(g){var m=v(g,"H");return m&&m.tagName.length===2&&m.tagName!=="HR"?m:!1}},673:(h,c,p)=>{p.d(c,{T:()=>v});var v=function(){for(var b=[],g=0;g<arguments.length;g++)b[g]=arguments[g];for(var m={},x=function(S){for(var k in S)S.hasOwnProperty(k)&&(Object.prototype.toString.call(S[k])==="[object Object]"?m[k]=v(m[k],S[k]):m[k]=S[k])},w=0;w<b.length;w++)x(b[w]);return m}},810:(h,c,p)=>{p.d(c,{zh:()=>m,Ny:()=>x,Gb:()=>w,Hc:()=>S,im:()=>k,$j:()=>C,ib:()=>T,oC:()=>A});var v=p(145),b=p(410),g=p(106),m=function(M){var y,N=M[M.currentMode].element;return getSelection().rangeCount>0&&(y=getSelection().getRangeAt(0),N.isEqualNode(y.startContainer)||N.contains(y.startContainer))?y:M[M.currentMode].range?M[M.currentMode].range:(N.focus(),y=N.ownerDocument.createRange(),y.setStart(N,0),y.collapse(!0),y)},x=function(M){var y=window.getSelection().getRangeAt(0);if(!M.contains(y.startContainer)&&!(0,g.fb)(y.startContainer,"vditor-panel--none"))return{left:0,top:0};var N=M.parentElement.getBoundingClientRect(),z;if(y.getClientRects().length===0)if(y.startContainer.nodeType===3){var F=y.startContainer.parentElement;if(F&&F.getClientRects().length>0)z=F.getClientRects()[0];else return{left:0,top:0}}else{var P=y.startContainer.children;if(P[y.startOffset]&&P[y.startOffset].getClientRects().length>0)z=P[y.startOffset].getClientRects()[0];else if(y.startContainer.childNodes.length>0){var Y=y.cloneRange();y.selectNode(y.startContainer.childNodes[Math.max(0,y.startOffset-1)]),z=y.getClientRects()[0],y.setEnd(Y.endContainer,Y.endOffset),y.setStart(Y.startContainer,Y.startOffset)}else z=y.startContainer.getClientRects()[0];if(!z){for(var te=y.startContainer.childNodes[y.startOffset];!te.getClientRects||te.getClientRects&&te.getClientRects().length===0;)te=te.parentElement;z=te.getClientRects()[0]}}else z=y.getClientRects()[0];return{left:z.left-N.left,top:z.top-N.top}},w=function(M,y){if(!y){if(getSelection().rangeCount===0)return!1;y=getSelection().getRangeAt(0)}var N=y.commonAncestorContainer;return M.isEqualNode(N)||M.contains(N)},S=function(M){var y=window.getSelection();y.removeAllRanges(),y.addRange(M)},k=function(M,y,N){var z={end:0,start:0};if(!N){if(getSelection().rangeCount===0)return z;N=window.getSelection().getRangeAt(0)}if(w(y,N)){var F=N.cloneRange();M.childNodes[0]&&M.childNodes[0].childNodes[0]?F.setStart(M.childNodes[0].childNodes[0],0):F.selectNodeContents(M),F.setEnd(N.startContainer,N.startOffset),z.start=F.toString().length,z.end=z.start+N.toString().length}return z},C=function(M,y,N){var z=0,F=0,P=N.childNodes[F],Y=!1,te=!1;M=Math.max(0,M),y=Math.max(0,y);var ce=N.ownerDocument.createRange();for(ce.setStart(P||N,0),ce.collapse(!0);!te&&P;){var Me=z+P.textContent.length;if(!Y&&M>=z&&M<=Me&&(M===0?ce.setStart(P,0):P.childNodes[0].nodeType===3?ce.setStart(P.childNodes[0],M-z):P.nextSibling?ce.setStartBefore(P.nextSibling):ce.setStartAfter(P),Y=!0,M===y)){te=!0;break}Y&&y>=z&&y<=Me&&(y===0?ce.setEnd(P,0):P.childNodes[0].nodeType===3?ce.setEnd(P.childNodes[0],y-z):P.nextSibling?ce.setEndBefore(P.nextSibling):ce.setEndAfter(P),te=!0),z=Me,P=N.childNodes[++F]}return!te&&N.childNodes[F-1]&&ce.setStartBefore(N.childNodes[F-1]),S(ce),ce},T=function(M,y){var N=M.querySelector("wbr");if(N){if(!N.previousElementSibling)N.previousSibling?y.setStart(N.previousSibling,N.previousSibling.textContent.length):N.nextSibling?N.nextSibling.nodeType===3?y.setStart(N.nextSibling,0):y.setStartBefore(N.nextSibling):y.setStart(N.parentElement,0);else if(N.previousElementSibling.isSameNode(N.previousSibling))if(N.previousElementSibling.lastChild){y.setStartBefore(N),y.collapse(!0),S(y),(0,b.i7)()&&(N.previousElementSibling.tagName==="EM"||N.previousElementSibling.tagName==="STRONG"||N.previousElementSibling.tagName==="S")&&(y.insertNode(document.createTextNode(v.g.ZWSP)),y.collapse(!1)),N.remove();return}else y.setStartAfter(N.previousElementSibling);else y.setStart(N.previousSibling,N.previousSibling.textContent.length);y.collapse(!0),N.remove(),S(y)}},A=function(M,y){var N=document.createElement("div");N.innerHTML=M;var z=N.querySelectorAll("p");z.length===1&&!z[0].previousSibling&&!z[0].nextSibling&&y[y.currentMode].element.children.length>0&&N.firstElementChild.tagName==="P"&&(M=z[0].innerHTML.trim());var F=document.createElement("div");F.innerHTML=M;var P=m(y);if(P.toString()!==""&&(y[y.currentMode].preventInput=!0,document.execCommand("delete",!1,"")),F.firstElementChild&&F.firstElementChild.getAttribute("data-block")==="0"){F.lastElementChild.insertAdjacentHTML("beforeend","<wbr>");var Y=(0,g.F9)(P.startContainer);if(!Y)y[y.currentMode].element.insertAdjacentHTML("beforeend",F.innerHTML);else{var te=(0,g.lG)(P.startContainer,"LI");te&&F.firstElementChild.tagName==="UL"?te.insertAdjacentHTML("afterend",F.firstElementChild.innerHTML):Y.insertAdjacentHTML("afterend",F.innerHTML)}T(y[y.currentMode].element,P)}else{var ce=document.createElement("template");ce.innerHTML=M,P.insertNode(ce.content.cloneNode(!0)),P.collapse(!1),S(P)}}}},r={};function o(h){var c=r[h];if(c!==void 0)return c.exports;var p=r[h]={exports:{}};return n[h](p,p.exports,o),p.exports}o.d=(h,c)=>{for(var p in c)o.o(c,p)&&!o.o(h,p)&&Object.defineProperty(h,p,{enumerable:!0,get:c[p]})},o.o=(h,c)=>Object.prototype.hasOwnProperty.call(h,c),o.r=h=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})};var l={};return(()=>{o.d(l,{default:()=>Nd});var h=o(408),c=o(145),p=o(105),v=function(i){return i.currentMode==="sv"?(0,p.X)("".concat(i.sv.element.textContent,`
`).replace(/\n\n$/,`
`)):i.currentMode==="wysiwyg"?i.lute.VditorDOM2Md(i.wysiwyg.element.innerHTML):i.currentMode==="ir"?i.lute.VditorIRDOM2Md(i.ir.element.innerHTML):""},b=o(413),g=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-devtools",this.element.innerHTML='<div class="vditor-reset--error"></div><div style="height: 100%;"></div>'}return i.prototype.renderEchart=function(a){var s=this;a.devtools.element.style.display==="block"&&(0,b.G)("".concat(a.options.cdn,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){s.ASTChart||(s.ASTChart=echarts.init(a.devtools.element.lastElementChild));try{s.element.lastElementChild.style.display="block",s.element.firstElementChild.innerHTML="",s.ASTChart.setOption({series:[{data:JSON.parse(a.lute.RenderEChartsJSON(v(a))),initialTreeDepth:-1,label:{align:"left",backgroundColor:"rgba(68, 77, 86, .68)",borderRadius:3,color:"#d1d5da",fontSize:12,lineHeight:12,offset:[9,12],padding:[2,4,2,4],position:"top",verticalAlign:"middle"},lineStyle:{color:"#4285f4",type:"curve",width:1},orient:"vertical",roam:!0,type:"tree"}],toolbox:{bottom:25,emphasis:{iconStyle:{color:"#4285f4"}},feature:{restore:{show:!0},saveAsImage:{show:!0}},right:15,show:!0}}),s.ASTChart.resize()}catch(u){s.element.lastElementChild.style.display="none",s.element.firstElementChild.innerHTML=u}})},i}(),m=o(410),x=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains("vditor-menu--current")&&u.classList.remove("vditor-menu--current")}})},w=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains("vditor-menu--current")&&u.classList.add("vditor-menu--current")}})},S=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.remove(c.g.CLASS_MENU_DISABLED)}})},k=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.add(c.g.CLASS_MENU_DISABLED)}})},C=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="none")})},T=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="block")})},A=function(i,a,s){a.includes("subToolbar")&&(i.toolbar.element.querySelectorAll(".vditor-hint").forEach(function(u){s&&u.isEqualNode(s)||(u.style.display="none")}),i.toolbar.elements.emoji&&(i.toolbar.elements.emoji.lastElementChild.style.display="none")),a.includes("hint")&&(i.hint.element.style.display="none"),i.wysiwyg.popover&&a.includes("popover")&&(i.wysiwyg.popover.style.display="none")},M=function(i,a,s,u){s.addEventListener((0,m.Le)(),function(d){d.preventDefault(),d.stopPropagation(),!s.classList.contains(c.g.CLASS_MENU_DISABLED)&&(i.toolbar.element.querySelectorAll(".vditor-hint--current").forEach(function(f){f.classList.remove("vditor-hint--current")}),a.style.display==="block"?a.style.display="none":(A(i,["subToolbar","hint","popover"],s.parentElement.parentElement),s.classList.contains("vditor-tooltipped")||s.classList.add("vditor-hint--current"),a.style.display="block",i.toolbar.element.getBoundingClientRect().right-s.getBoundingClientRect().right<250?a.classList.add("vditor-panel--left"):a.classList.remove("vditor-panel--left")))})},y=o(106),N=o(771),z=function(i,a,s,u){u&&console.log("".concat(i," - ").concat(s,": ").concat(a))},F=o(135),P=o(775),Y=o(428),te=o(325),ce=o(483),Me=o(999),Fe=o(472),We=o(637),rt=o(11),je=o(194),Ne=o(229),nt=o(825),ct=function(i,a,s){s===void 0&&(s="sv");var u=document.createElement("div");u.innerHTML=i;var d=!1;u.childElementCount===1&&u.lastElementChild.style.fontFamily.indexOf("monospace")>-1&&(d=!0);var f=u.querySelectorAll("pre");if(u.childElementCount===1&&f.length===1&&f[0].className!=="vditor-wysiwyg"&&f[0].className!=="vditor-sv"&&(d=!0),i.indexOf(`
<p class="p1">`)===0&&(d=!0),u.childElementCount===1&&u.firstElementChild.tagName==="TABLE"&&u.querySelector(".line-number")&&u.querySelector(".line-content")&&(d=!0),d){var E=a||i;return/\n/.test(E)||f.length===1?s==="wysiwyg"?'<div class="vditor-wysiwyg__block" data-block="0" data-type="code-block"><pre><code>'.concat(E.replace(/&/g,"&amp;").replace(/</g,"&lt;"),"<wbr></code></pre></div>"):"\n```\n"+E.replace(/&/g,"&amp;").replace(/</g,"&lt;")+"\n```":s==="wysiwyg"?"<code>".concat(E.replace(/&/g,"&amp;").replace(/</g,"&lt;"),"</code><wbr>"):"`".concat(E,"`")}return!1},tt=function(i,a){if(i){if(i.parentElement.getAttribute("data-type")==="html-block"){i.setAttribute("data-render","1");return}var s=i.firstElementChild.className.replace("language-","");if(s==="abc")(0,F.Q)(i,a.options.cdn);else if(s==="mermaid")(0,We.i)(i,a.options.cdn,a.options.theme);else if(s==="smiles")(0,nt.J)(i,a.options.cdn,a.options.theme);else if(s==="markmap")(0,rt.K)(i,a.options.cdn);else if(s==="flowchart")(0,te.P)(i,a.options.cdn);else if(s==="echarts")(0,P.p)(i,a.options.cdn,a.options.theme);else if(s==="mindmap")(0,je.P)(i,a.options.cdn,a.options.theme);else if(s==="plantuml")(0,Ne.B)(i,a.options.cdn);else if(s==="graphviz")(0,ce.v)(i,a.options.cdn);else if(s==="math")(0,Fe.H)(i,{cdn:a.options.cdn,math:a.options.preview.math});else{var u=a.options.customRenders.find(function(d){if(d.language===s)return d.render(i,a),!0});u||((0,Me.s)(Object.assign({},a.options.preview.hljs),i,a.options.cdn),(0,Y.O)(i,a.options.preview.hljs))}i.setAttribute("data-render","1")}},q=o(810),Ht=function(i){if(i.currentMode!=="sv"){var a=i[i.currentMode].element,s=i.outline.render(i);s===""&&(s="[ToC]"),a.querySelectorAll('[data-type="toc-block"]').forEach(function(u){u.innerHTML=s,(0,Fe.H)(u,{cdn:i.options.cdn,math:i.options.preview.math})})}},Rt=function(i,a){var s=(0,y.lG)(i.target,"SPAN");if(s&&(0,y.fb)(s,"vditor-toc")){var u=a[a.currentMode].element.querySelector("#"+s.getAttribute("data-target-id"));if(u)if(a.options.height==="auto"){var d=u.offsetTop+a.element.offsetTop;a.options.toolbarConfig.pin||(d+=a.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,d)}else a.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,a.element.offsetTop),a[a.currentMode].element.scrollTop=u.offsetTop;return}},$t=function(i,a,s,u){if(i.previousElementSibling&&i.previousElementSibling.classList.contains("vditor-toc")){if(s.key==="Backspace"&&(0,q.im)(i,a[a.currentMode].element,u).start===0)return i.previousElementSibling.remove(),lt(a),!0;if(Pr(a,s,u,i,i.previousElementSibling))return!0}if(i.nextElementSibling&&i.nextElementSibling.classList.contains("vditor-toc")){if(s.key==="Delete"&&(0,q.im)(i,a[a.currentMode].element,u).start>=i.textContent.trimRight().length)return i.nextElementSibling.remove(),lt(a),!0;if(pi(a,s,u,i,i.nextElementSibling))return!0}if(s.key==="Backspace"||s.key==="Delete"){var d=(0,y.fb)(u.startContainer,"vditor-toc");if(d)return d.remove(),lt(a),!0}},Nt=function(i,a,s,u){s===void 0&&(s=!1);var d=(0,y.F9)(a.startContainer);if(d&&!s&&d.getAttribute("data-type")!=="code-block"){if(fo(d.innerHTML)&&d.previousElementSibling||mo(d.innerHTML))return;for(var f=(0,q.im)(d,i.ir.element,a).start,E=!0,L=f-1;L>d.textContent.substr(0,f).lastIndexOf(`
`);L--)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!==" "){E=!1;break}f===0&&(E=!1);for(var D=!0,L=f-1;L<d.textContent.length;L++)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!==`
`){D=!1;break}if(E){typeof i.options.input=="function"&&i.options.input(v(i));return}if(D&&/^#{1,6} $/.test(d.textContent)&&(D=!1),D){var _=(0,y.fb)(a.startContainer,"vditor-ir__marker");if(!_){var B=a.startContainer.previousSibling;B&&B.nodeType!==3&&B.classList.contains("vditor-ir__node--expand")&&B.classList.remove("vditor-ir__node--expand"),typeof i.options.input=="function"&&i.options.input(v(i));return}}}if(i.ir.element.querySelectorAll(".vditor-ir__node--expand").forEach(function(it){it.classList.remove("vditor-ir__node--expand")}),d||(d=i.ir.element),!d.querySelector("wbr")){var K=(0,y.fb)(a.startContainer,"vditor-ir__preview");K?K.previousElementSibling.insertAdjacentHTML("beforeend","<wbr>"):a.insertNode(document.createElement("wbr"))}d.querySelectorAll("[style]").forEach(function(it){it.removeAttribute("style")}),d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.ir.element);var fe=d.isEqualNode(i.ir.element),ve=(0,y.a1)(d,"data-type","footnotes-block"),ue="";if(fe)ue=d.innerHTML;else{var ke=(0,N.S)(a.startContainer,"BLOCKQUOTE"),we=(0,y.O9)(a.startContainer);if(we&&(d=we),ke&&(!we||we&&!ke.contains(we))&&(d=ke),ve&&(d=ve),ue=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var de=d.previousElementSibling,Ie=d.nextElementSibling;de&&(de.tagName==="UL"||de.tagName==="OL")&&(ue=de.outerHTML+ue,de.remove()),Ie&&(Ie.tagName==="UL"||Ie.tagName==="OL")&&(ue=ue+Ie.outerHTML,Ie.remove()),ue=ue.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}else d.previousElementSibling&&d.previousElementSibling.textContent.replace(c.g.ZWSP,"")!==""&&u&&u.inputType==="insertParagraph"&&(ue=d.previousElementSibling.outerHTML+ue,d.previousElementSibling.remove());d.innerText.startsWith("```")||(i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(it){it&&!d.isEqualNode(it)&&(ue+=it.outerHTML,it.remove())}),i.ir.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(it){it&&!d.isEqualNode(it)&&(ue+=it.outerHTML,it.remove())}))}if(z("SpinVditorIRDOM",ue,"argument",i.options.debugger),ue=i.lute.SpinVditorIRDOM(ue),z("SpinVditorIRDOM",ue,"result",i.options.debugger),fe)d.innerHTML=ue;else if(d.outerHTML=ue,ve){var Te=(0,y.a1)(i.ir.element.querySelector("wbr"),"data-type","footnotes-def");if(Te){var $e=Te.textContent,bt=$e.substring(1,$e.indexOf("]:")),gt=i.ir.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(bt,'"]'));gt&&gt.setAttribute("aria-label",$e.substr(bt.length+3).trim().substr(0,24))}}var kt,dn=i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']");dn.forEach(function(it,zt){zt===0?kt=it:(kt.insertAdjacentHTML("beforeend",it.innerHTML),it.remove())}),dn.length>0&&i.ir.element.insertAdjacentElement("beforeend",dn[0]);var Wt,hn=i.ir.element.querySelectorAll("[data-type='footnotes-block']");hn.forEach(function(it,zt){zt===0?Wt=it:(Wt.insertAdjacentHTML("beforeend",it.innerHTML),it.remove())}),hn.length>0&&i.ir.element.insertAdjacentElement("beforeend",hn[0]),(0,q.ib)(i.ir.element,a),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(it){tt(it,i)}),Ht(i),Xn(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},oe=function(i,a){if(i==="")return!1;if(i.indexOf("⇧")===-1&&i.indexOf("⌘")===-1&&i.indexOf("⌥")===-1)return!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&a.code===i;if(i==="⇧Tab")return!!(!(0,m.yl)(a)&&!a.altKey&&a.shiftKey&&a.code==="Tab");var s=i.split("");if(i.startsWith("⌥")){var u=s.length===3?s[2]:s[1];return!!((s.length===3?(0,m.yl)(a):!(0,m.yl)(a))&&a.altKey&&!a.shiftKey&&a.code===(/^[0-9]$/.test(u)?"Digit":"Key")+u)}i==="⌘Enter"&&(s=["⌘","Enter"]);var d=s.length>2&&s[0]==="⇧",f=d?s[2]:s[1];return d&&((0,m.vU)()||!/Mac/.test(navigator.platform))&&(f==="-"?f="_":f==="="&&(f="+")),!!((0,m.yl)(a)&&a.key.toLowerCase()===f.toLowerCase()&&!a.altKey&&(!d&&!a.shiftKey||d&&a.shiftKey))},he=function(i){var a=i.startContainer;if(a.nodeType===3&&a.nodeValue.length!==i.startOffset)return!1;for(var s=a.nextSibling;s&&s.textContent==="";)s=s.nextSibling;if(s){if(s&&s.nodeType!==3&&s.classList.contains("vditor-ir__node")&&!s.getAttribute("data-block"))return s}else{var u=(0,y.fb)(a,"vditor-ir__marker");if(u&&!u.nextSibling){var d=a.parentElement.parentElement.nextSibling;if(d&&d.nodeType!==3&&d.classList.contains("vditor-ir__node"))return d}return!1}return!1},J=function(i){var a=i.startContainer,s=a.previousSibling;return a.nodeType===3&&i.startOffset===0&&s&&s.nodeType!==3&&s.classList.contains("vditor-ir__node")&&!s.getAttribute("data-block")?s:!1},ee=function(i,a){a.ir.element.querySelectorAll(".vditor-ir__node--expand").forEach(function(E){E.classList.remove("vditor-ir__node--expand")});var s=(0,y.JQ)(i.startContainer,"vditor-ir__node"),u=!i.collapsed&&(0,y.JQ)(i.endContainer,"vditor-ir__node");if(!(!i.collapsed&&(!s||s!==u))){s&&(s.classList.add("vditor-ir__node--expand"),s.classList.remove("vditor-ir__node--hidden"),(0,q.Hc)(i));var d=he(i);if(d){d.classList.add("vditor-ir__node--expand"),d.classList.remove("vditor-ir__node--hidden");return}var f=J(i);if(f){f.classList.add("vditor-ir__node--expand"),f.classList.remove("vditor-ir__node--hidden");return}}},Ce=function(i,a){if(i.ir.composingLock=a.isComposing,a.isComposing)return!1;a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a);var s=(0,q.zh)(i),u=s.startContainer;if(!Ss(a,i,u)||(Es(s,i,a),Bs(s),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"&&a.key!=="Delete"))return!1;var d=(0,y.a1)(u,"data-newline","1");if(!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&a.key==="Enter"&&d&&s.startOffset<d.textContent.length){var f=d.previousElementSibling;f&&(s.insertNode(document.createTextNode(f.textContent)),s.collapse(!1));var E=d.nextSibling;E&&(s.insertNode(document.createTextNode(E.textContent)),s.collapse(!0))}var L=(0,y.lG)(u,"P");if(Ls(a,i,L,s)||Cs(s,i,L,a)||Hs(i,s,a,L))return!0;var D=(0,y.fb)(u,"vditor-ir__marker--pre");if(D&&D.tagName==="PRE"){var _=D.firstChild;if(Os(i,a,D,s)||(_.getAttribute("data-type")==="math-block"||_.getAttribute("data-type")==="html-block")&&Pr(i,a,s,_,D.parentElement)||pi(i,a,s,_,D.parentElement))return!0}var B=(0,y.a1)(u,"data-type","code-block-info");if(B){if(a.key==="Enter"||a.key==="Tab")return s.selectNodeContents(B.nextElementSibling.firstChild),s.collapse(!0),a.preventDefault(),A(i,["hint"]),!0;if(a.key==="Backspace"){var K=(0,q.im)(B,i.ir.element).start;K===1&&s.setStart(u,0),K===2&&(i.hint.recentLanguage="")}if(Pr(i,a,s,B,B.parentElement))return A(i,["hint"]),!0}var fe=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(a.key.indexOf("Arrow")>-1&&fe){var ve=fu(fe);if(ve&&Pr(i,a,s,fe,ve))return!0;var ue=mu(fe);if(ue&&pi(i,a,s,fe,ue))return!0}if(Is(i,a,s)||Ps(i,s,a)||go(i,s,a))return!0;var ke=(0,N.W)(u);if(ke){if(oe("⌘=",a)){var we=ke.querySelector(".vditor-ir__marker--heading");return we&&we.textContent.trim().length>1&&fi(i,we.textContent.substr(1)),a.preventDefault(),!0}if(oe("⌘-",a)){var we=ke.querySelector(".vditor-ir__marker--heading");return we&&we.textContent.trim().length<6&&fi(i,we.textContent.trim()+"# "),a.preventDefault(),!0}}var de=(0,y.F9)(u);if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&s.toString()===""){if(zs(i,s,a,L))return!0;if(de&&de.previousElementSibling&&de.tagName!=="UL"&&de.tagName!=="OL"&&(de.previousElementSibling.getAttribute("data-type")==="code-block"||de.previousElementSibling.getAttribute("data-type")==="math-block")){var Ie=(0,q.im)(de,i.ir.element,s).start;if(Ie===0||Ie===1&&de.innerText.startsWith(c.g.ZWSP))return s.selectNodeContents(de.previousElementSibling.querySelector(".vditor-ir__marker--pre code")),s.collapse(!1),ee(s,i),de.textContent.trim().replace(c.g.ZWSP,"")===""&&(de.remove(),Xn(i)),a.preventDefault(),!0}if(ke){var Te=ke.firstElementChild.textContent.length;(0,q.im)(ke,i.ir.element).start===Te&&Te!==0&&(s.setStart(ke.firstElementChild.firstChild,Te-1),s.collapse(!0),(0,q.Hc)(s))}}return(a.key==="ArrowUp"||a.key==="ArrowDown")&&de&&(de.querySelectorAll(".vditor-ir__node").forEach(function($e){$e.contains(u)||$e.classList.add("vditor-ir__node--hidden")}),Fs(a,de,s))?!0:(Ts(s,a.key),de&&$t(de,i,a,s)?(a.preventDefault(),!0):!1)},se=o(190),G=function(i,a){i.querySelectorAll("[data-type=footnotes-link]").forEach(function(s){for(var u=s.parentElement,d=u.nextSibling;d&&d.textContent.startsWith(" ");){var f=d;f.childNodes.forEach(function(E){u.append(E.cloneNode(!0))}),d=d.nextSibling,f.remove()}a&&a(u)})},X=function(i,a){var s,u=getSelection().getRangeAt(0).cloneRange(),d=u.startContainer;u.startContainer.nodeType!==3&&u.startContainer.tagName==="DIV"&&(d=u.startContainer.childNodes[u.startOffset-1]);var f=(0,y.a1)(d,"data-block","0");if(f&&a&&(a.inputType==="deleteContentBackward"||a.data===" ")){for(var E=(0,q.im)(f,i.sv.element,u).start,L=!0,D=E-1;D>f.textContent.substr(0,E).lastIndexOf(`
`);D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}if(E===0&&(L=!1),L){Ge(i);return}if(a.inputType==="deleteContentBackward"){var _=(0,y.a1)(d,"data-type","code-block-open-marker")||(0,y.a1)(d,"data-type","code-block-close-marker");if(_){if(_.getAttribute("data-type")==="code-block-close-marker"){var B=pe(d,"code-block-open-marker");if(B){B.textContent=_.textContent,Ge(i);return}}if(_.getAttribute("data-type")==="code-block-open-marker"){var B=pe(d,"code-block-close-marker",!1);if(B){B.textContent=_.textContent,Ge(i);return}}}var K=(0,y.a1)(d,"data-type","math-block-open-marker");if(K){var fe=K.nextElementSibling.nextElementSibling;fe&&fe.getAttribute("data-type")==="math-block-close-marker"&&(fe.remove(),Ge(i));return}f.querySelectorAll('[data-type="code-block-open-marker"]').forEach(function(de){de.textContent.length===1&&de.remove()}),f.querySelectorAll('[data-type="code-block-close-marker"]').forEach(function(de){de.textContent.length===1&&de.remove()});var ve=(0,y.a1)(d,"data-type","heading-marker");if(ve&&ve.textContent.indexOf("#")===-1){Ge(i);return}}if((a.data===" "||a.inputType==="deleteContentBackward")&&((0,y.a1)(d,"data-type","padding")||(0,y.a1)(d,"data-type","li-marker")||(0,y.a1)(d,"data-type","task-marker")||(0,y.a1)(d,"data-type","blockquote-marker"))){Ge(i);return}}if(f&&f.textContent.trimRight()==="$$"){Ge(i);return}f||(f=i.sv.element),((s=f.firstElementChild)===null||s===void 0?void 0:s.getAttribute("data-type"))==="link-ref-defs-block"&&(f=i.sv.element),(0,y.a1)(d,"data-type","footnotes-link")&&(f=i.sv.element),f.textContent.indexOf(Lute.Caret)===-1&&u.insertNode(document.createTextNode(Lute.Caret)),f.querySelectorAll("[style]").forEach(function(de){de.removeAttribute("style")}),f.querySelectorAll("font").forEach(function(de){de.outerHTML=de.innerHTML});var ue=f.textContent,ke=f.isEqualNode(i.sv.element);if(ke)ue=f.textContent;else{f.previousElementSibling&&(ue=f.previousElementSibling.textContent+ue,f.previousElementSibling.remove()),f.previousElementSibling&&ue.indexOf(`---
`)===0&&(ue=f.previousElementSibling.textContent+ue,f.previousElementSibling.remove());var we="";i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(de,Ie){de&&!f.isEqualNode(de.parentElement)&&(we+=de.parentElement.textContent+`
`,de.parentElement.remove())}),i.sv.element.querySelectorAll("[data-type='footnotes-link']").forEach(function(de,Ie){de&&!f.isEqualNode(de.parentElement)&&(we+=de.parentElement.textContent+`
`,de.parentElement.remove())}),ue=we+ue}ue=Oe(ue,i),ke?f.innerHTML=ue:f.outerHTML=ue,i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(de){i.sv.element.insertAdjacentElement("beforeend",de.parentElement)}),G(i.sv.element,function(de){i.sv.element.insertAdjacentElement("beforeend",de)}),(0,q.ib)(i.sv.element,u),Z(i),Ge(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},be=function(i,a){var s,u,d,f,E;if(i.sv.composingLock=a.isComposing,a.isComposing||(a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"))return!1;var L=(0,q.zh)(i),D=L.startContainer;L.startContainer.nodeType!==3&&L.startContainer.tagName==="DIV"&&(D=L.startContainer.childNodes[L.startOffset-1]);var _=(0,y.a1)(D,"data-type","text"),B=(0,y.a1)(D,"data-type","blockquote-marker");if(!B&&L.startOffset===0&&_&&_.previousElementSibling&&_.previousElementSibling.getAttribute("data-type")==="blockquote-marker"&&(B=_.previousElementSibling),B&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&B.nextElementSibling.textContent.trim()===""&&(0,q.im)(B,i.sv.element,L).start===B.textContent.length)return((s=B.previousElementSibling)===null||s===void 0?void 0:s.getAttribute("data-type"))==="padding"&&B.previousElementSibling.setAttribute("data-action","enter-remove"),B.remove(),Ge(i),a.preventDefault(),!0;var K=(0,y.a1)(D,"data-type","li-marker"),fe=(0,y.a1)(D,"data-type","task-marker"),ve=K;if(ve||fe&&fe.nextElementSibling.getAttribute("data-type")!=="task-marker"&&(ve=fe),!ve&&L.startOffset===0&&_&&_.previousElementSibling&&(_.previousElementSibling.getAttribute("data-type")==="li-marker"||_.previousElementSibling.getAttribute("data-type")==="task-marker")&&(ve=_.previousElementSibling),ve){var ue=(0,q.im)(ve,i.sv.element,L).start,ke=ve.getAttribute("data-type")==="task-marker",we=ve;if(ke&&(we=ve.previousElementSibling.previousElementSibling.previousElementSibling),ue===ve.textContent.length){if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&ve.nextElementSibling.textContent.trim()==="")return((u=we.previousElementSibling)===null||u===void 0?void 0:u.getAttribute("data-type"))==="padding"?(we.previousElementSibling.remove(),X(i)):(ke&&(we.remove(),ve.previousElementSibling.previousElementSibling.remove(),ve.previousElementSibling.remove()),ve.nextElementSibling.remove(),ve.remove(),Ge(i)),a.preventDefault(),!0;if(a.key==="Tab")return a.shiftKey?we.previousElementSibling.getAttribute("data-type")==="padding"&&we.previousElementSibling.remove():we.insertAdjacentHTML("beforebegin",'<span data-type="padding">'.concat(we.textContent.replace(/\S/g," "),"</span>")),/^\d/.test(we.textContent)&&(we.textContent=we.textContent.replace(/^\d{1,}/,"1"),L.selectNodeContents(ve.firstChild),L.collapse(!1)),X(i),a.preventDefault(),!0}}if(go(i,L,a))return!0;var de=(0,y.a1)(D,"data-block","0"),Ie=(0,N.S)(D,"SPAN");if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&de){var Te=!1,$e=de.textContent.match(/^\n+/);(0,q.im)(de,i.sv.element).start<=($e?$e[0].length:0)&&(Te=!0);var bt=`
`;if(Ie){if(((d=Ie.previousElementSibling)===null||d===void 0?void 0:d.getAttribute("data-action"))==="enter-remove")return Ie.previousElementSibling.remove(),Ge(i),a.preventDefault(),!0;bt+=Je(Ie)}return L.insertNode(document.createTextNode(bt)),L.collapse(!1),de&&de.textContent.trim()!==""&&!Te?X(i):Ge(i),a.preventDefault(),!0}if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey){if(Ie&&((f=Ie.previousElementSibling)===null||f===void 0?void 0:f.getAttribute("data-type"))==="newline"&&(0,q.im)(Ie,i.sv.element,L).start===1&&Ie.getAttribute("data-type").indexOf("code-block-")===-1)return L.setStart(Ie,0),L.extractContents(),Ie.textContent.trim()!==""?X(i):Ge(i),a.preventDefault(),!0;if(de&&(0,q.im)(de,i.sv.element,L).start===0&&de.previousElementSibling){L.extractContents();var gt=de.previousElementSibling.lastElementChild;return gt.getAttribute("data-type")==="newline"&&(gt.remove(),gt=de.previousElementSibling.lastElementChild),gt.getAttribute("data-type")!=="newline"&&(gt.insertAdjacentHTML("afterend",de.innerHTML),de.remove()),de.textContent.trim()!==""&&!(!((E=de.previousElementSibling)===null||E===void 0)&&E.querySelector('[data-type="code-block-open-marker"]'))?X(i):(gt.getAttribute("data-type")!=="newline"&&(L.selectNodeContents(gt.lastChild),L.collapse(!1)),Ge(i)),a.preventDefault(),!0}}return!1},le=o(538),ye=function(i){i.options.theme==="dark"?i.element.classList.add("vditor--dark"):i.element.classList.remove("vditor--dark")},Ae=function(i){i.element.innerHTML="",i.element.classList.add("vditor"),i.options.rtl&&i.element.setAttribute("dir","rtl"),ye(i),(0,le.Z)(i.options.preview.theme.current,i.options.preview.theme.path),typeof i.options.height=="number"?i.element.style.height=i.options.height+"px":i.element.style.height=i.options.height,typeof i.options.minHeight=="number"&&(i.element.style.minHeight=i.options.minHeight+"px"),typeof i.options.width=="number"?i.element.style.width=i.options.width+"px":i.element.style.width=i.options.width,i.element.appendChild(i.toolbar.element);var a=document.createElement("div");if(a.className="vditor-content",i.options.outline.position==="left"&&a.appendChild(i.outline.element),a.appendChild(i.wysiwyg.element.parentElement),a.appendChild(i.sv.element),a.appendChild(i.ir.element.parentElement),a.appendChild(i.preview.element),i.toolbar.elements.devtools&&a.appendChild(i.devtools.element),i.options.outline.position==="right"&&(i.outline.element.classList.add("vditor-outline--right"),a.appendChild(i.outline.element)),i.upload&&a.appendChild(i.upload.element),i.options.resize.enable&&a.appendChild(i.resize.element),a.appendChild(i.hint.element),a.appendChild(i.tip.element),i.element.appendChild(a),a.addEventListener("click",function(){A(i,["subToolbar"])}),i.toolbar.elements.export&&i.element.insertAdjacentHTML("beforeend",'<iframe id="vditorExportIframe" style="width: 100%;height: 0;border: 0"></iframe>'),er(i,i.options.mode,st(i)),document.execCommand("DefaultParagraphSeparator",!1,"p"),navigator.userAgent.indexOf("iPhone")>-1&&typeof window.visualViewport<"u"){var s=!1,u=function(d){s||(s=!0,requestAnimationFrame(function(){s=!1;var f=i.toolbar.element;f.style.transform="none",f.getBoundingClientRect().top<0&&(f.style.transform="translate(0, ".concat(-f.getBoundingClientRect().top,"px)"))}))};window.visualViewport.addEventListener("scroll",u),window.visualViewport.addEventListener("resize",u)}},ze=function(i){var a=window.innerWidth<=c.g.MOBILE_WIDTH?10:35;if(i.wysiwyg.element.parentElement.style.display!=="none"){var s=(i.wysiwyg.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.wysiwyg.element.style.padding="10px ".concat(Math.max(a,s),"px")}if(i.ir.element.parentElement.style.display!=="none"){var s=(i.ir.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.ir.element.style.padding="10px ".concat(Math.max(a,s),"px")}i.preview.element.style.display!=="block"?i.toolbar.element.style.paddingLeft=Math.max(5,parseInt(i[i.currentMode].element.style.paddingLeft||"0",10)+(i.options.outline.position==="left"?i.outline.element.offsetWidth:0))+"px":i.toolbar.element.style.paddingLeft=5+(i.options.outline.position==="left"?i.outline.element.offsetWidth:0)+"px"},Xe=function(i){if(i.options.typewriterMode){var a=window.innerHeight;typeof i.options.height=="number"?(a=i.options.height,typeof i.options.minHeight=="number"&&(a=Math.max(a,i.options.minHeight)),a=Math.min(window.innerHeight,a)):a=i.element.clientHeight,i.element.classList.contains("vditor--fullscreen")&&(a=window.innerHeight),i[i.currentMode].element.style.setProperty("--editor-bottom",(a-i.toolbar.element.offsetHeight)/2+"px")}},Ke;function Be(){window.removeEventListener("resize",Ke)}var st=function(i){Xe(i),Be(),window.addEventListener("resize",Ke=function(){ze(i),Xe(i)});var a=(0,m.pK)()&&localStorage.getItem(i.options.cache.id);return(!i.options.cache.enable||!a)&&(i.options.value?a=i.options.value:i.originalInnerHTML?a=i.lute.HTML2Md(i.originalInnerHTML):i.options.cache.enable||(a="")),a||""},qe=function(i){clearTimeout(i[i.currentMode].hlToolbarTimeoutId),i[i.currentMode].hlToolbarTimeoutId=window.setTimeout(function(){if(i[i.currentMode].element.getAttribute("contenteditable")!=="false"&&(0,q.Gb)(i[i.currentMode].element)){x(i.toolbar.elements,c.g.EDIT_TOOLBARS),S(i.toolbar.elements,c.g.EDIT_TOOLBARS);var a=(0,q.zh)(i),s=a.startContainer;a.startContainer.nodeType===3&&(s=a.startContainer.parentElement),s.classList.contains("vditor-reset")&&(s=s.childNodes[a.startOffset]);var u=i.currentMode==="sv"?(0,y.a1)(s,"data-type","heading"):(0,N.W)(s);u&&w(i.toolbar.elements,["headings"]);var d=i.currentMode==="sv"?(0,y.a1)(s,"data-type","blockquote"):(0,y.lG)(s,"BLOCKQUOTE");d&&w(i.toolbar.elements,["quote"]);var f=(0,y.a1)(s,"data-type","strong");f&&w(i.toolbar.elements,["bold"]);var E=(0,y.a1)(s,"data-type","em");E&&w(i.toolbar.elements,["italic"]);var L=(0,y.a1)(s,"data-type","s");L&&w(i.toolbar.elements,["strike"]);var D=(0,y.a1)(s,"data-type","a");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"LI");_?(_.classList.contains("vditor-task")?w(i.toolbar.elements,["check"]):_.parentElement.tagName==="OL"?w(i.toolbar.elements,["ordered-list"]):_.parentElement.tagName==="UL"&&w(i.toolbar.elements,["list"]),S(i.toolbar.elements,["outdent","indent"])):k(i.toolbar.elements,["outdent","indent"]);var B=(0,y.a1)(s,"data-type","code-block");B&&(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","inline-code","upload","link","table","record"]),w(i.toolbar.elements,["code"]));var K=(0,y.a1)(s,"data-type","code");K&&(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","upload","link","table","record"]),w(i.toolbar.elements,["inline-code"]));var fe=(0,y.a1)(s,"data-type","table");fe&&k(i.toolbar.elements,["headings","list","ordered-list","check","line","quote","code","table"])}},200)},Re=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&i.hint.render(i),clearTimeout(i.wysiwyg.afterRenderTimeoutId),i.wysiwyg.afterRenderTimeoutId=window.setTimeout(function(){if(!i.wysiwyg.composingLock){var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),a.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},mt=function(i){for(var a=i.previousSibling;a;){if(a.nodeType!==3&&a.tagName==="A"&&!a.previousSibling&&a.innerHTML.replace(c.g.ZWSP,"")===""&&a.nextSibling)return a;a=a.previousSibling}return!1},Dt=function(i){for(var a=i.startContainer.nextSibling;a&&a.textContent==="";)a=a.nextSibling;return!!(a&&a.nodeType!==3&&(a.tagName==="CODE"||a.getAttribute("data-type")==="math-inline"||a.getAttribute("data-type")==="html-entity"||a.getAttribute("data-type")==="html-inline"))},Ut=function(i){for(var a="",s=i.nextSibling;s;)s.nodeType===3?a+=s.textContent:a+=s.outerHTML,s=s.nextSibling;return a},jt=function(i){for(var a="",s=i.previousSibling;s;)s.nodeType===3?a=s.textContent+a:a=s.outerHTML+a,s=s.previousSibling;return a},Hn=function(i){for(var a=i;a&&!a.nextSibling;)a=a.parentElement;return a.nextSibling},Mn=function(i){var a=jt(i.startContainer),s=Ut(i.startContainer),u=i.startContainer.textContent,d=i.startOffset,f="",E="";return(u.substr(0,d)!==""&&u.substr(0,d)!==c.g.ZWSP||a)&&(f="".concat(a).concat(u.substr(0,d))),(u.substr(d)!==""&&u.substr(d)!==c.g.ZWSP||s)&&(E="".concat(u.substr(d)).concat(s)),{afterHTML:E,beforeHTML:f}},Pn=function(i,a){Array.from(i.wysiwyg.element.childNodes).find(function(s){if(s.nodeType===3){var u=document.createElement("p");u.setAttribute("data-block","0"),u.textContent=s.textContent;var d=a.startContainer.nodeType===3?a.startOffset:s.textContent.length;return s.parentNode.insertBefore(u,s),s.remove(),a.setStart(u.firstChild,Math.min(u.firstChild.textContent.length,d)),a.collapse(!0),(0,q.Hc)(a),!0}else if(!s.getAttribute("data-block"))return s.tagName==="P"?s.remove():(s.tagName==="DIV"?(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.innerHTML,"</p>")):s.tagName==="BR"?s.outerHTML='<p data-block="0">'.concat(s.outerHTML,"<wbr></p>"):(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.outerHTML,"</p>")),(0,q.ib)(i.wysiwyg.element,a),a=getSelection().getRangeAt(0)),!0})},kn=function(i,a){var s=(0,q.zh)(i),u=(0,y.F9)(s.startContainer);u||(u=s.startContainer.childNodes[s.startOffset]),!u&&i.wysiwyg.element.children.length===0&&(u=i.wysiwyg.element),u&&!u.classList.contains("vditor-wysiwyg__block")&&(s.insertNode(document.createElement("wbr")),u.innerHTML.trim()==="<wbr>"&&(u.innerHTML="<wbr><br>"),u.tagName==="BLOCKQUOTE"||u.classList.contains("vditor-reset")?u.innerHTML="<".concat(a,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(a,">"):u.outerHTML="<".concat(a,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(a,">"),(0,q.ib)(i.wysiwyg.element,s),Ht(i))},lr=function(i){var a=getSelection().getRangeAt(0),s=(0,y.F9)(a.startContainer);s||(s=a.startContainer.childNodes[a.startOffset]),s&&(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.innerHTML,"</p>"),(0,q.ib)(i.wysiwyg.element,a)),i.wysiwyg.popover.style.display="none"},cr=function(i,a,s){s===void 0&&(s=!0);var u=i.previousElementSibling,d=u.ownerDocument.createRange();u.tagName==="CODE"?(u.style.display="inline-block",s?d.setStart(u.firstChild,1):d.selectNodeContents(u)):(u.style.display="block",u.firstChild.firstChild||u.firstChild.appendChild(document.createTextNode("")),d.selectNodeContents(u.firstChild)),s?d.collapse(!0):d.collapse(!1),(0,q.Hc)(d),!i.firstElementChild.classList.contains("language-mindmap")&&Z(a)},zn=function(i,a){if(i.wysiwyg.composingLock=a.isComposing,a.isComposing)return!1;a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a);var s=(0,q.zh)(i),u=s.startContainer;if(!Ss(a,i,u)||(Es(s,i,a),Bs(s),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"&&a.key!=="Delete"))return!1;var d=(0,y.F9)(u),f=(0,y.lG)(u,"P");if(Ls(a,i,f,s)||Cs(s,i,f,a)||Is(i,a,s))return!0;var E=(0,y.fb)(u,"vditor-wysiwyg__block");if(E){if(a.key==="Escape"&&E.children.length===2)return i.wysiwyg.popover.style.display="none",E.firstElementChild.style.display="none",i.wysiwyg.element.blur(),a.preventDefault(),!0;if(!(0,m.yl)(a)&&!a.shiftKey&&a.altKey&&a.key==="Enter"&&E.getAttribute("data-type")==="code-block"){var L=i.wysiwyg.popover.querySelector(".vditor-input");return L.focus(),L.select(),a.preventDefault(),!0}if(E.getAttribute("data-block")==="0"&&(Os(i,a,E.firstElementChild,s)||pi(i,a,s,E.firstElementChild,E)||E.getAttribute("data-type")!=="yaml-front-matter"&&Pr(i,a,s,E.firstElementChild,E)))return!0}if(Hs(i,s,a,f))return!0;var D=(0,y.E2)(u,"BLOCKQUOTE");if(D&&!a.shiftKey&&a.altKey&&a.key==="Enter"){(0,m.yl)(a)?s.setStartBefore(D):s.setStartAfter(D),(0,q.Hc)(s);var _=document.createElement("p");return _.setAttribute("data-block","0"),_.innerHTML=`
`,s.insertNode(_),s.collapse(!0),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0}var B=(0,N.W)(u);if(B){if(B.tagName==="H6"&&u.textContent.length===s.startOffset&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"){var K=document.createElement("p");return K.textContent=`
`,K.setAttribute("data-block","0"),u.parentElement.insertAdjacentElement("afterend",K),s.setStart(K,0),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0}if(oe("⌘=",a)){var fe=parseInt(B.tagName.substr(1),10)-1;return fe>0&&(kn(i,"h".concat(fe)),Re(i)),a.preventDefault(),!0}if(oe("⌘-",a)){var fe=parseInt(B.tagName.substr(1),10)+1;return fe<7&&(kn(i,"h".concat(fe)),Re(i)),a.preventDefault(),!0}a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&B.textContent.length===1&&lr(i)}if(Ps(i,s,a))return!0;if(a.altKey&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.shiftKey){var ve=(0,y.lG)(u,"A"),ue=(0,y.a1)(u,"data-type","link-ref"),ke=(0,y.a1)(u,"data-type","footnotes-ref");if(ve||ue||ke||B&&B.tagName.length===2){var we=i.wysiwyg.popover.querySelector("input");we.focus(),we.select()}}if(Ot(i,a))return!0;if(oe("⇧⌘U",a)){var de=i.wysiwyg.popover.querySelector('[data-type="up"]');if(de)return de.click(),a.preventDefault(),!0}if(oe("⇧⌘D",a)){var de=i.wysiwyg.popover.querySelector('[data-type="down"]');if(de)return de.click(),a.preventDefault(),!0}if(go(i,s,a))return!0;if(!(0,m.yl)(a)&&a.shiftKey&&!a.altKey&&a.key==="Enter"&&u.parentElement.tagName!=="LI"&&u.parentElement.tagName!=="P")return["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName)?s.insertNode(document.createTextNode(`
`+c.g.ZWSP)):s.insertNode(document.createTextNode(`
`)),s.collapse(!1),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0;if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&s.toString()===""){if(zs(i,s,a,f))return!0;if(d){if(d.previousElementSibling&&d.previousElementSibling.classList.contains("vditor-wysiwyg__block")&&d.previousElementSibling.getAttribute("data-block")==="0"&&d.tagName!=="UL"&&d.tagName!=="OL"){var Ie=(0,q.im)(d,i.wysiwyg.element,s).start;if(Ie===0&&s.startOffset===0||Ie===1&&d.innerText.startsWith(c.g.ZWSP))return cr(d.previousElementSibling.lastElementChild,i,!1),d.innerHTML.trim().replace(c.g.ZWSP,"")===""&&(d.remove(),Re(i)),a.preventDefault(),!0}var Te=s.startOffset;if(s.toString()===""&&u.nodeType===3&&u.textContent.charAt(Te-2)===`
`&&u.textContent.charAt(Te-1)!==c.g.ZWSP&&["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName))return u.textContent=u.textContent.substring(0,Te-1)+c.g.ZWSP,s.setStart(u,Te),s.collapse(!0),Re(i),a.preventDefault(),!0;u.textContent===c.g.ZWSP&&s.startOffset===1&&!u.previousSibling&&Dt(s)&&(u.textContent=""),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='math-inline']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"}),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='html-entity']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"})}}if((0,m.vU)()&&s.startOffset===1&&u.textContent.indexOf(c.g.ZWSP)>-1&&u.previousSibling&&u.previousSibling.nodeType!==3&&u.previousSibling.tagName==="CODE"&&(a.key==="Backspace"||a.key==="ArrowLeft"))return s.selectNodeContents(u.previousSibling),s.collapse(!1),a.preventDefault(),!0;if(Fs(a,d,s))return a.preventDefault(),!0;if(Ts(s,a.key),a.key==="ArrowDown"){var $e=u.nextSibling;$e&&$e.nodeType!==3&&$e.getAttribute("data-type")==="math-inline"&&s.setStartAfter($e)}return d&&$t(d,i,a,s)?(a.preventDefault(),!0):!1},Ot=function(i,a){if(oe("⇧⌘X",a)){var s=i.wysiwyg.popover.querySelector('[data-type="remove"]');return s&&s.click(),a.preventDefault(),!0}},jn=function(i){clearTimeout(i.wysiwyg.hlToolbarTimeoutId),i.wysiwyg.hlToolbarTimeoutId=window.setTimeout(function(){if(i.wysiwyg.element.getAttribute("contenteditable")!=="false"&&(0,q.Gb)(i.wysiwyg.element)){x(i.toolbar.elements,c.g.EDIT_TOOLBARS),S(i.toolbar.elements,c.g.EDIT_TOOLBARS);var a=getSelection().getRangeAt(0),s=a.startContainer;a.startContainer.nodeType===3?s=a.startContainer.parentElement:s=s.childNodes[a.startOffset>=s.childNodes.length?s.childNodes.length-1:a.startOffset];var u=(0,y.a1)(s,"data-type","footnotes-block");if(u){i.wysiwyg.popover.innerHTML="",pn(u,i),tn(i,"footnotes-block"),en(i,u);return}var d=(0,y.lG)(s,"LI");d?(d.classList.contains("vditor-task")?w(i.toolbar.elements,["check"]):d.parentElement.tagName==="OL"?w(i.toolbar.elements,["ordered-list"]):d.parentElement.tagName==="UL"&&w(i.toolbar.elements,["list"]),S(i.toolbar.elements,["outdent","indent"])):k(i.toolbar.elements,["outdent","indent"]),(0,y.lG)(s,"BLOCKQUOTE")&&w(i.toolbar.elements,["quote"]),((0,y.lG)(s,"B")||(0,y.lG)(s,"STRONG"))&&w(i.toolbar.elements,["bold"]),((0,y.lG)(s,"I")||(0,y.lG)(s,"EM"))&&w(i.toolbar.elements,["italic"]),((0,y.lG)(s,"STRIKE")||(0,y.lG)(s,"S"))&&w(i.toolbar.elements,["strike"]),i.wysiwyg.element.querySelectorAll(".vditor-comment--focus").forEach(function(Le){Le.classList.remove("vditor-comment--focus")});var f=(0,y.fb)(s,"vditor-comment");if(f){var E=f.getAttribute("data-cmtids").split(" ");if(E.length>1&&f.nextSibling.isSameNode(f.nextElementSibling)){var L=f.nextElementSibling.getAttribute("data-cmtids").split(" ");E.find(function(Le){if(L.includes(Le))return E=[Le],!0})}i.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(Le){Le.getAttribute("data-cmtids").indexOf(E[0])>-1&&Le.classList.add("vditor-comment--focus")})}var D=(0,y.lG)(s,"A");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"TABLE"),B=(0,N.W)(s);(0,y.lG)(s,"CODE")?(0,y.lG)(s,"PRE")?(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","inline-code","upload","link","table","record"]),w(i.toolbar.elements,["code"])):(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","upload","link","table","record"]),w(i.toolbar.elements,["inline-code"])):B?(k(i.toolbar.elements,["bold"]),w(i.toolbar.elements,["headings"])):_&&k(i.toolbar.elements,["table"]);var K=(0,y.fb)(s,"vditor-toc");if(K){i.wysiwyg.popover.innerHTML="",pn(K,i),tn(i,"vditor-toc"),en(i,K);return}var fe=(0,N.S)(s,"BLOCKQUOTE");if(fe&&(i.wysiwyg.popover.innerHTML="",ur(a,fe,i),nr(a,fe,i),pn(fe,i),tn(i,"blockquote"),en(i,fe)),d&&(i.wysiwyg.popover.innerHTML="",ur(a,d,i),nr(a,d,i),pn(d,i),tn(i,"li"),en(i,d)),_){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var ve=function(){var Le=_.rows.length,ut=_.rows[0].cells.length,ir=parseInt(zt.value,10)||Le,ar=parseInt(fn.value,10)||ut;if(!(ir===Le&&ut===ar)){if(ut!==ar)for(var gi=ar-ut,Bn=0;Bn<_.rows.length;Bn++)if(gi>0)for(var Zs=0;Zs<gi;Zs++)Bn===0?_.rows[Bn].lastElementChild.insertAdjacentHTML("afterend","<th> </th>"):_.rows[Bn].lastElementChild.insertAdjacentHTML("afterend","<td> </td>");else for(var wo=ut-1;wo>=ar;wo--)_.rows[Bn].cells[wo].remove();if(Le!==ir){var Ys=ir-Le;if(Ys>0){for(var xo="<tr>",Fr=0;Fr<ar;Fr++)xo+="<td> </td>";for(var Js=0;Js<Ys;Js++)_.querySelector("tbody")?_.querySelector("tbody").insertAdjacentHTML("beforeend",xo):_.querySelector("thead").insertAdjacentHTML("afterend",xo+"</tr>")}else for(var Fr=Le-1;Fr>=ir;Fr--)_.rows[Fr].remove(),_.rows.length===1&&_.querySelector("tbody").remove()}typeof i.options.input=="function"&&i.options.input(v(i))}},ue=function(Le){Qi(_,Le),Le==="right"?(Ie.classList.remove("vditor-icon--current"),Te.classList.remove("vditor-icon--current"),$e.classList.add("vditor-icon--current")):Le==="center"?(Ie.classList.remove("vditor-icon--current"),$e.classList.remove("vditor-icon--current"),Te.classList.add("vditor-icon--current")):(Te.classList.remove("vditor-icon--current"),$e.classList.remove("vditor-icon--current"),Ie.classList.add("vditor-icon--current")),(0,q.Hc)(a),Re(i)},ke=(0,y.lG)(s,"TD"),we=(0,y.lG)(s,"TH"),de="left";ke?de=ke.getAttribute("align")||"left":we&&(de=we.getAttribute("align")||"center");var Ie=document.createElement("button");Ie.setAttribute("type","button"),Ie.setAttribute("aria-label",window.VditorI18n.alignLeft+"<"+(0,m.ns)("⇧⌘L")+">"),Ie.setAttribute("data-type","left"),Ie.innerHTML='<svg><use xlink:href="#vditor-icon-align-left"></use></svg>',Ie.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(de==="left"?" vditor-icon--current":""),Ie.onclick=function(){ue("left")};var Te=document.createElement("button");Te.setAttribute("type","button"),Te.setAttribute("aria-label",window.VditorI18n.alignCenter+"<"+(0,m.ns)("⇧⌘C")+">"),Te.setAttribute("data-type","center"),Te.innerHTML='<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',Te.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(de==="center"?" vditor-icon--current":""),Te.onclick=function(){ue("center")};var $e=document.createElement("button");$e.setAttribute("type","button"),$e.setAttribute("aria-label",window.VditorI18n.alignRight+"<"+(0,m.ns)("⇧⌘R")+">"),$e.setAttribute("data-type","right"),$e.innerHTML='<svg><use xlink:href="#vditor-icon-align-right"></use></svg>',$e.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(de==="right"?" vditor-icon--current":""),$e.onclick=function(){ue("right")};var bt=document.createElement("button");bt.setAttribute("type","button"),bt.setAttribute("aria-label",window.VditorI18n.insertRowBelow+"<"+(0,m.ns)("⌘=")+">"),bt.setAttribute("data-type","insertRow"),bt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-row"></use></svg>',bt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",bt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&_s(i,a,ut)};var gt=document.createElement("button");gt.setAttribute("type","button"),gt.setAttribute("aria-label",window.VditorI18n.insertRowAbove+"<"+(0,m.ns)("⇧⌘F")+">"),gt.setAttribute("data-type","insertRow"),gt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-rowb"></use></svg>',gt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",gt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&Ns(i,a,ut)};var kt=document.createElement("button");kt.setAttribute("type","button"),kt.setAttribute("aria-label",window.VditorI18n.insertColumnRight+"<"+(0,m.ns)("⇧⌘=")+">"),kt.setAttribute("data-type","insertColumn"),kt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-column"></use></svg>',kt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",kt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&ea(i,_,ut)};var dn=document.createElement("button");dn.setAttribute("type","button"),dn.setAttribute("aria-label",window.VditorI18n.insertColumnLeft+"<"+(0,m.ns)("⇧⌘G")+">"),dn.setAttribute("data-type","insertColumn"),dn.innerHTML='<svg><use xlink:href="#vditor-icon-insert-columnb"></use></svg>',dn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",dn.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&ea(i,_,ut,"beforebegin")};var Wt=document.createElement("button");Wt.setAttribute("type","button"),Wt.setAttribute("aria-label",window.VditorI18n["delete-row"]+"<"+(0,m.ns)("⌘-")+">"),Wt.setAttribute("data-type","deleteRow"),Wt.innerHTML='<svg><use xlink:href="#vditor-icon-delete-row"></use></svg>',Wt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",Wt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&Ds(i,a,ut)};var hn=document.createElement("button");hn.setAttribute("type","button"),hn.setAttribute("aria-label",window.VditorI18n["delete-column"]+"<"+(0,m.ns)("⇧⌘-")+">"),hn.setAttribute("data-type","deleteColumn"),hn.innerHTML='<svg><use xlink:href="#vditor-icon-delete-column"></use></svg>',hn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",hn.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&Rs(i,a,_,ut)};var it=document.createElement("span");it.setAttribute("aria-label",window.VditorI18n.row),it.className="vditor-tooltipped vditor-tooltipped__n";var zt=document.createElement("input");it.appendChild(zt),zt.type="number",zt.min="1",zt.className="vditor-input",zt.style.width="42px",zt.style.textAlign="center",zt.setAttribute("placeholder",window.VditorI18n.row),zt.value=_.rows.length.toString(),zt.oninput=function(){ve()},zt.onkeydown=function(Le){if(!Le.isComposing){if(Le.key==="Tab"){fn.focus(),fn.select(),Le.preventDefault();return}Ot(i,Le)||cn(Le,a)}};var ra=document.createElement("span");ra.setAttribute("aria-label",window.VditorI18n.column),ra.className="vditor-tooltipped vditor-tooltipped__n";var fn=document.createElement("input");ra.appendChild(fn),fn.type="number",fn.min="1",fn.className="vditor-input",fn.style.width="42px",fn.style.textAlign="center",fn.setAttribute("placeholder",window.VditorI18n.column),fn.value=_.rows[0].cells.length.toString(),fn.oninput=function(){ve()},fn.onkeydown=function(Le){if(!Le.isComposing){if(Le.key==="Tab"){zt.focus(),zt.select(),Le.preventDefault();return}Ot(i,Le)||cn(Le,a)}},ur(a,_,i),nr(a,_,i),pn(_,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",Ie),i.wysiwyg.popover.insertAdjacentElement("beforeend",Te),i.wysiwyg.popover.insertAdjacentElement("beforeend",$e),i.wysiwyg.popover.insertAdjacentElement("beforeend",gt),i.wysiwyg.popover.insertAdjacentElement("beforeend",bt),i.wysiwyg.popover.insertAdjacentElement("beforeend",dn),i.wysiwyg.popover.insertAdjacentElement("beforeend",kt),i.wysiwyg.popover.insertAdjacentElement("beforeend",Wt),i.wysiwyg.popover.insertAdjacentElement("beforeend",hn),i.wysiwyg.popover.insertAdjacentElement("beforeend",it),i.wysiwyg.popover.insertAdjacentHTML("beforeend"," x "),i.wysiwyg.popover.insertAdjacentElement("beforeend",ra),tn(i,"table"),en(i,_)}var yo=(0,y.a1)(s,"data-type","link-ref");yo&&co(i,yo,a);var zr=(0,y.a1)(s,"data-type","footnotes-ref");if(zr){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var it=document.createElement("span");it.setAttribute("aria-label",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),it.className="vditor-tooltipped vditor-tooltipped__n";var Zn=document.createElement("input");it.appendChild(Zn),Zn.className="vditor-input",Zn.setAttribute("placeholder",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),Zn.style.width="120px",Zn.value=zr.getAttribute("data-footnotes-label"),Zn.oninput=function(){Zn.value.trim()!==""&&zr.setAttribute("data-footnotes-label",Zn.value),typeof i.options.input=="function"&&i.options.input(v(i))},Zn.onkeydown=function(ut){ut.isComposing||Ot(i,ut)||cn(ut,a)},pn(zr,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",it),tn(i,"footnotes-ref"),en(i,zr)}var Vt=(0,y.fb)(s,"vditor-wysiwyg__block"),Ks=Vt?Vt.getAttribute("data-type").indexOf("block")>-1:!1;if(i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(Le){if(!Vt||Vt&&Ks&&!Vt.contains(Le)){var ut=Le.previousElementSibling;ut.style.display="none"}}),Vt&&Ks){if(i.wysiwyg.popover.innerHTML="",ur(a,Vt,i),nr(a,Vt,i),pn(Vt,i),Vt.getAttribute("data-type")==="code-block"){var ia=document.createElement("span");ia.setAttribute("aria-label",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),ia.className="vditor-tooltipped vditor-tooltipped__n";var Cn=document.createElement("input");ia.appendChild(Cn);var mi=Vt.firstElementChild.firstElementChild;Cn.className="vditor-input",Cn.setAttribute("placeholder",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),Cn.value=mi.className.indexOf("language-")>-1?mi.className.split("-")[1].split(" ")[0]:"",Cn.oninput=function(Le){Cn.value.trim()!==""?mi.className="language-".concat(Cn.value):(mi.className="",i.hint.recentLanguage=""),Vt.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(Vt.lastElementChild.innerHTML=Vt.firstElementChild.innerHTML,tt(Vt.lastElementChild,i)),Re(i),Le.detail===1&&(a.setStart(mi.firstChild,0),a.collapse(!0),(0,q.Hc)(a))},Cn.onkeydown=function(Le){if(!Le.isComposing&&!Ot(i,Le)){if(Le.key==="Escape"&&i.hint.element.style.display==="block"){i.hint.element.style.display="none",Le.preventDefault();return}i.hint.select(Le,i),cn(Le,a)}},Cn.onkeyup=function(Le){var ut,ir;if(!(Le.isComposing||Le.key==="Enter"||Le.key==="ArrowUp"||Le.key==="Escape"||Le.key==="ArrowDown")){var ar=[],gi=Cn.value.substring(0,Cn.selectionStart);(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((ir=(ut=window.hljs)===null||ut===void 0?void 0:ut.listLanguages())!==null&&ir!==void 0?ir:[]).sort())).forEach(function(Bn){Bn.indexOf(gi.toLowerCase())>-1&&ar.push({html:Bn,value:Bn})}),i.hint.genHTML(ar,gi,i),Le.preventDefault()}},i.wysiwyg.popover.insertAdjacentElement("beforeend",ia),tn(i,"code-block")}else tn(i,"block");en(i,Vt)}else Vt=void 0;if(B){i.wysiwyg.popover.innerHTML="";var it=document.createElement("span");it.setAttribute("aria-label","ID<"+(0,m.ns)("⌥Enter")+">"),it.className="vditor-tooltipped vditor-tooltipped__n";var rr=document.createElement("input");it.appendChild(rr),rr.className="vditor-input",rr.setAttribute("placeholder","ID<"+(0,m.ns)("⌥Enter")+">"),rr.style.width="120px",rr.value=B.getAttribute("data-id")||"",rr.oninput=function(){B.setAttribute("data-id",rr.value),typeof i.options.input=="function"&&i.options.input(v(i))},rr.onkeydown=function(ut){ut.isComposing||Ot(i,ut)||cn(ut,a)},ur(a,B,i),nr(a,B,i),pn(B,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",it),tn(i,"heading"),en(i,B)}if(D&&Ti(i,D,a),!fe&&!d&&!_&&!Vt&&!D&&!yo&&!zr&&!B&&!K){var Br=(0,y.a1)(s,"data-block","0");Br&&Br.parentElement.isEqualNode(i.wysiwyg.element)?(i.wysiwyg.popover.innerHTML="",ur(a,Br,i),nr(a,Br,i),pn(Br,i),tn(i,"block"),en(i,Br)):i.wysiwyg.popover.style.display="none"}i.wysiwyg.element.querySelectorAll('span[data-type="backslash"] > span').forEach(function(Le){Le.style.display="none"});var Xs=(0,y.a1)(a.startContainer,"data-type","backslash");Xs&&(Xs.querySelector("span").style.display="inline")}},200)},en=function(i,a){var s=a,u=(0,y.lG)(a,"TABLE");u&&(s=u),i.wysiwyg.popover.style.left="0",i.wysiwyg.popover.style.display="block",i.wysiwyg.popover.style.top=Math.max(-8,s.offsetTop-21-i.wysiwyg.element.scrollTop)+"px",i.wysiwyg.popover.style.left=Math.min(s.offsetLeft,i.wysiwyg.element.clientWidth-i.wysiwyg.popover.clientWidth)+"px",i.wysiwyg.popover.setAttribute("data-top",(s.offsetTop-21).toString())},co=function(i,a,s){s===void 0&&(s=getSelection().getRangeAt(0)),i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(a.tagName==="IMG"?a.setAttribute("alt",f.value):a.textContent=f.value),L.value.trim()!==""&&a.setAttribute("data-link-label",L.value),typeof i.options.input=="function"&&i.options.input(v(i))},d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.textIsNotEmpty),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.textIsNotEmpty),f.style.width="120px",f.value=a.getAttribute("alt")||a.textContent,f.oninput=function(){u()},f.onkeydown=function(D){Ot(i,D)||cn(D,s)||Ir(i,a,D,L)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.linkRef),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.linkRef),L.value=a.getAttribute("data-link-label"),L.oninput=function(){u()},L.onkeydown=function(D){Ot(i,D)||cn(D,s)||Ir(i,a,D,f)},pn(a,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),tn(i,"link-ref"),en(i,a)},ur=function(i,a,s){var u=a.previousElementSibling;if(!(!u||!a.parentElement.isEqualNode(s.wysiwyg.element)&&a.tagName!=="LI")){var d=document.createElement("button");d.setAttribute("type","button"),d.setAttribute("data-type","up"),d.setAttribute("aria-label",window.VditorI18n.up+"<"+(0,m.ns)("⇧⌘U")+">"),d.innerHTML='<svg><use xlink:href="#vditor-icon-up"></use></svg>',d.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",d.onclick=function(){i.insertNode(document.createElement("wbr")),u.insertAdjacentElement("beforebegin",a),(0,q.ib)(s.wysiwyg.element,i),Re(s),jn(s),Z(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},nr=function(i,a,s){var u=a.nextElementSibling;if(!(!u||!a.parentElement.isEqualNode(s.wysiwyg.element)&&a.tagName!=="LI")){var d=document.createElement("button");d.setAttribute("type","button"),d.setAttribute("data-type","down"),d.setAttribute("aria-label",window.VditorI18n.down+"<"+(0,m.ns)("⇧⌘D")+">"),d.innerHTML='<svg><use xlink:href="#vditor-icon-down"></use></svg>',d.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",d.onclick=function(){i.insertNode(document.createElement("wbr")),u.insertAdjacentElement("afterend",a),(0,q.ib)(s.wysiwyg.element,i),Re(s),jn(s),Z(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},pn=function(i,a){var s=document.createElement("button");s.setAttribute("type","button"),s.setAttribute("data-type","remove"),s.setAttribute("aria-label",window.VditorI18n.remove+"<"+(0,m.ns)("⇧⌘X")+">"),s.innerHTML='<svg><use xlink:href="#vditor-icon-trashcan"></use></svg>',s.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",s.onclick=function(){var u=(0,q.zh)(a);u.setStartAfter(i),(0,q.Hc)(u),i.remove(),Re(a),jn(a),["H1","H2","H3","H4","H5","H6"].includes(i.tagName)&&Ht(a)},a.wysiwyg.popover.insertAdjacentElement("beforeend",s)},Ir=function(i,a,s,u){if(!s.isComposing){if(s.key==="Tab"){u.focus(),u.select(),s.preventDefault();return}if(!(0,m.yl)(s)&&!s.shiftKey&&s.altKey&&s.key==="Enter"){var d=(0,q.zh)(i);a.insertAdjacentHTML("afterend",c.g.ZWSP),d.setStartAfter(a.nextSibling),d.collapse(!0),(0,q.Hc)(d),s.preventDefault()}}},Ti=function(i,a,s){i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(a.innerHTML=f.value),a.setAttribute("href",L.value),a.setAttribute("title",_.value),Re(i)};a.querySelectorAll("[data-marker]").forEach(function(B){B.removeAttribute("data-marker")});var d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.textIsNotEmpty),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.textIsNotEmpty),f.style.width="120px",f.value=a.innerHTML||"",f.oninput=function(){u()},f.onkeydown=function(B){Ot(i,B)||cn(B,s)||Ir(i,a,B,L)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.link),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.link),L.value=a.getAttribute("href")||"",L.oninput=function(){u()},L.onkeydown=function(B){Ot(i,B)||cn(B,s)||Ir(i,a,B,_)};var D=document.createElement("span");D.setAttribute("aria-label",window.VditorI18n.tooltipText),D.className="vditor-tooltipped vditor-tooltipped__n";var _=document.createElement("input");D.appendChild(_),_.className="vditor-input",_.setAttribute("placeholder",window.VditorI18n.tooltipText),_.style.width="60px",_.value=a.getAttribute("title")||"",_.oninput=function(){u()},_.onkeydown=function(B){Ot(i,B)||cn(B,s)||Ir(i,a,B,f)},pn(a,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),i.wysiwyg.popover.insertAdjacentElement("beforeend",D),tn(i,"a"),en(i,a)},di=function(i,a){var s=i.target;a.wysiwyg.popover.innerHTML="";var u=function(){s.setAttribute("src",f.value),s.setAttribute("alt",L.value),s.setAttribute("title",_.value),typeof a.options.input=="function"&&a.options.input(v(a))},d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.imageURL),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.imageURL),f.value=s.getAttribute("src")||"",f.oninput=function(){u()},f.onkeydown=function(B){Ot(a,B)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.alternateText),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.alternateText),L.style.width="52px",L.value=s.getAttribute("alt")||"",L.oninput=function(){u()},L.onkeydown=function(B){Ot(a,B)};var D=document.createElement("span");D.setAttribute("aria-label",window.VditorI18n.title),D.className="vditor-tooltipped vditor-tooltipped__n";var _=document.createElement("input");D.appendChild(_),_.className="vditor-input",_.setAttribute("placeholder",window.VditorI18n.title),_.value=s.getAttribute("title")||"",_.oninput=function(){u()},_.onkeydown=function(B){Ot(a,B)},pn(s,a),a.wysiwyg.popover.insertAdjacentElement("beforeend",d),a.wysiwyg.popover.insertAdjacentElement("beforeend",E),a.wysiwyg.popover.insertAdjacentElement("beforeend",D),tn(a,"image"),en(a,s)},cn=function(i,a){if(!(0,m.yl)(i)&&!i.shiftKey&&i.key==="Enter"||i.key==="Escape")return a&&(0,q.Hc)(a),i.preventDefault(),i.stopPropagation(),!0},tn=function(i,a){i.options.customWysiwygToolbar(a,i.wysiwyg.popover)},dr=function(i){i.currentMode==="wysiwyg"?jn(i):i.currentMode==="ir"&&qe(i)},uo=function(i,a,s){s===void 0&&(s={enableAddUndoStack:!0,enableHint:!1,enableInput:!0});var u=i.wysiwyg.element;u.innerHTML=i.lute.Md2VditorDOM(a),u.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(d){tt(d,i),d.previousElementSibling.setAttribute("style","display:none")}),Re(i,s)},Yi=function(i,a,s){for(var u=i.startContainer.parentElement,d=!1,f="",E="",L=Mn(i),D=L.beforeHTML,_=L.afterHTML;u&&!d;){var B=u.tagName;if(B==="STRIKE"&&(B="S"),B==="I"&&(B="EM"),B==="B"&&(B="STRONG"),B==="S"||B==="STRONG"||B==="EM"){var K="",fe="",ve="";u.parentElement.getAttribute("data-block")!=="0"&&(fe=jt(u),ve=Ut(u)),(D||fe)&&(K="".concat(fe,"<").concat(B,">").concat(D,"</").concat(B,">"),D=K),(s==="bold"&&B==="STRONG"||s==="italic"&&B==="EM"||s==="strikeThrough"&&B==="S")&&(K+="".concat(f).concat(c.g.ZWSP,"<wbr>").concat(E),d=!0),(_||ve)&&(_="<".concat(B,">").concat(_,"</").concat(B,">").concat(ve),K+=_),u.parentElement.getAttribute("data-block")!=="0"?(u=u.parentElement,u.innerHTML=K):(u.outerHTML=K,u=u.parentElement),f="<".concat(B,">")+f,E="</".concat(B,">")+E}else d=!0}(0,q.ib)(a.wysiwyg.element,i)},bs=function(i,a,s){if(!(i.wysiwyg.composingLock&&s instanceof CustomEvent)){var u=!0,d=!0;i.wysiwyg.element.querySelector("wbr")&&i.wysiwyg.element.querySelector("wbr").remove();var f=(0,q.zh)(i),E=a.getAttribute("data-type");if(a.classList.contains("vditor-menu--current"))if(E==="strike"&&(E="strikeThrough"),E==="quote"){var L=(0,y.lG)(f.startContainer,"BLOCKQUOTE");L||(L=f.startContainer.childNodes[f.startOffset]),L&&(u=!1,a.classList.remove("vditor-menu--current"),f.insertNode(document.createElement("wbr")),L.outerHTML=L.innerHTML.trim()===""?'<p data-block="0">'.concat(L.innerHTML,"</p>"):L.innerHTML,(0,q.ib)(i.wysiwyg.element,f))}else if(E==="inline-code"){var D=(0,y.lG)(f.startContainer,"CODE");D||(D=f.startContainer.childNodes[f.startOffset]),D&&(D.outerHTML=D.innerHTML.replace(c.g.ZWSP,"")+"<wbr>",(0,q.ib)(i.wysiwyg.element,f))}else E==="link"?(f.collapsed&&f.selectNode(f.startContainer.parentElement),document.execCommand("unlink",!1,"")):E==="check"||E==="list"||E==="ordered-list"?(Ji(i,f,E),(0,q.ib)(i.wysiwyg.element,f),u=!1,a.classList.remove("vditor-menu--current")):(u=!1,a.classList.remove("vditor-menu--current"),f.toString()===""?Yi(f,i,E):document.execCommand(E,!1,""));else{i.wysiwyg.element.childNodes.length===0&&(i.wysiwyg.element.innerHTML='<p data-block="0"><wbr></p>',(0,q.ib)(i.wysiwyg.element,f));var _=(0,y.F9)(f.startContainer);if(E==="quote"){if(_||(_=f.startContainer.childNodes[f.startOffset]),_){u=!1,a.classList.add("vditor-menu--current"),f.insertNode(document.createElement("wbr"));var B=(0,y.lG)(f.startContainer,"LI");B&&_.contains(B)?B.innerHTML='<blockquote data-block="0">'.concat(B.innerHTML,"</blockquote>"):_.outerHTML='<blockquote data-block="0">'.concat(_.outerHTML,"</blockquote>"),(0,q.ib)(i.wysiwyg.element,f)}}else if(E==="check"||E==="list"||E==="ordered-list")Ji(i,f,E,!1),(0,q.ib)(i.wysiwyg.element,f),u=!1,x(i.toolbar.elements,["check","list","ordered-list"]),a.classList.add("vditor-menu--current");else if(E==="inline-code"){if(f.toString()===""){var K=document.createElement("code");K.textContent=c.g.ZWSP,f.insertNode(K),f.setStart(K.firstChild,1),f.collapse(!0),(0,q.Hc)(f)}else if(f.startContainer.nodeType===3){var K=document.createElement("code");f.surroundContents(K),f.insertNode(K),(0,q.Hc)(f)}a.classList.add("vditor-menu--current")}else if(E==="code"){var K=document.createElement("div");K.className="vditor-wysiwyg__block",K.setAttribute("data-type","code-block"),K.setAttribute("data-block","0"),K.setAttribute("data-marker","```"),f.toString()===""?K.innerHTML=`<pre><code><wbr>
</code></pre>`:(K.innerHTML="<pre><code>".concat(f.toString(),"<wbr></code></pre>"),f.deleteContents()),f.insertNode(K),_&&(_.outerHTML=i.lute.SpinVditorDOM(_.outerHTML)),(0,q.ib)(i.wysiwyg.element,f),i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(bt){tt(bt,i)}),a.classList.add("vditor-menu--disabled")}else if(E==="link"){if(f.toString()===""){var fe=document.createElement("a");fe.innerText=c.g.ZWSP,f.insertNode(fe),f.setStart(fe.firstChild,1),f.collapse(!0),Ti(i,fe,f);var ve=i.wysiwyg.popover.querySelector("input");ve.value="",ve.focus(),d=!1}else{var K=document.createElement("a");K.setAttribute("href",""),K.innerHTML=f.toString(),f.surroundContents(K),f.insertNode(K),(0,q.Hc)(f),Ti(i,K,f);var ue=i.wysiwyg.popover.querySelectorAll("input");ue[0].value=K.innerText,ue[1].focus()}u=!1,a.classList.add("vditor-menu--current")}else if(E==="table"){var ke='<table data-block="0"><thead><tr><th>col1<wbr></th><th>col2</th><th>col3</th></tr></thead><tbody><tr><td> </td><td> </td><td> </td></tr><tr><td> </td><td> </td><td> </td></tr></tbody></table>';if(f.toString().trim()==="")_&&_.innerHTML.trim().replace(c.g.ZWSP,"")===""?_.outerHTML=ke:document.execCommand("insertHTML",!1,ke),f.selectNode(i.wysiwyg.element.querySelector("wbr").previousSibling),i.wysiwyg.element.querySelector("wbr").remove(),(0,q.Hc)(f);else{ke='<table data-block="0"><thead><tr>';var we=f.toString().split(`
`),de=we[0].split(",").length>we[0].split(" ").length?",":" ";we.forEach(function($e,bt){bt===0?($e.split(de).forEach(function(gt,kt){kt===0?ke+="<th>".concat(gt,"<wbr></th>"):ke+="<th>".concat(gt,"</th>")}),ke+="</tr></thead>"):(bt===1?ke+="<tbody><tr>":ke+="<tr>",$e.split(de).forEach(function(gt){ke+="<td>".concat(gt,"</td>")}),ke+="</tr>")}),ke+="</tbody></table>",document.execCommand("insertHTML",!1,ke),(0,q.ib)(i.wysiwyg.element,f)}u=!1,a.classList.add("vditor-menu--disabled")}else if(E==="line"){if(_){var Ie=`<hr data-block="0"><p data-block="0"><wbr>
</p>`;_.innerHTML.trim()===""?_.outerHTML=Ie:_.insertAdjacentHTML("afterend",Ie),(0,q.ib)(i.wysiwyg.element,f)}}else if(u=!1,a.classList.add("vditor-menu--current"),E==="strike"&&(E="strikeThrough"),f.toString()===""&&(E==="bold"||E==="italic"||E==="strikeThrough")){var Te="strong";E==="italic"?Te="em":E==="strikeThrough"&&(Te="s");var K=document.createElement(Te);K.textContent=c.g.ZWSP,f.insertNode(K),K.previousSibling&&K.previousSibling.textContent===c.g.ZWSP&&(K.previousSibling.textContent=""),f.setStart(K.firstChild,1),f.collapse(!0),(0,q.Hc)(f)}else document.execCommand(E,!1,"")}u&&jn(i),d&&Re(i)}},Mt=function(){function i(a,s){var u,d=this;this.element=document.createElement("div"),s.className&&(u=this.element.classList).add.apply(u,s.className.split(" "));var f=s.hotkey?" <".concat((0,m.ns)(s.hotkey),">"):"";s.level===2&&(f=s.hotkey?" &lt;".concat((0,m.ns)(s.hotkey),"&gt;"):"");var E=s.tip?s.tip+f:"".concat(window.VditorI18n[s.name]).concat(f),L=s.name==="upload"?"div":"button";if(s.level===2)this.element.innerHTML="<".concat(L,' data-type="').concat(s.name,'">').concat(E,"</").concat(L,">");else{this.element.classList.add("vditor-toolbar__item");var D=document.createElement(L);D.setAttribute("data-type",s.name),D.className="vditor-tooltipped vditor-tooltipped__".concat(s.tipPosition),D.setAttribute("aria-label",E),D.innerHTML=s.icon,this.element.appendChild(D)}s.prefix&&this.element.children[0].addEventListener((0,m.Le)(),function(_){_.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&(a.currentMode==="wysiwyg"?bs(a,d.element.children[0],_):a.currentMode==="ir"?vu(a,d.element.children[0],s.prefix||"",s.suffix||""):Gt(a,d.element.children[0],s.prefix||"",s.suffix||""))})}return i}(),ys=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),er=function(i,a,s){var u;if(typeof s!="string"?(A(i,["subToolbar","hint"]),s.preventDefault(),u=v(i)):u=s,!(i.currentMode===a&&typeof s!="string")){if(i.devtools&&i.devtools.renderEchart(i),i.options.preview.mode==="both"&&a==="sv"?i.preview.element.style.display="block":i.preview.element.style.display="none",S(i.toolbar.elements,c.g.EDIT_TOOLBARS),x(i.toolbar.elements,c.g.EDIT_TOOLBARS),k(i.toolbar.elements,["outdent","indent"]),a==="ir")C(i.toolbar.elements,["both"]),T(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.sv.element.style.display="none",i.wysiwyg.element.parentElement.style.display="none",i.ir.element.parentElement.style.display="block",i.lute.SetVditorIR(!0),i.lute.SetVditorWYSIWYG(!1),i.lute.SetVditorSV(!1),i.currentMode="ir",i.ir.element.innerHTML=i.lute.Md2VditorIRDOM(u),Xn(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),ze(i),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(f){tt(f,i)}),i.ir.element.querySelectorAll(".vditor-toc").forEach(function(f){(0,Fe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})});else if(a==="wysiwyg")C(i.toolbar.elements,["both"]),T(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.sv.element.style.display="none",i.wysiwyg.element.parentElement.style.display="block",i.ir.element.parentElement.style.display="none",i.lute.SetVditorIR(!1),i.lute.SetVditorWYSIWYG(!0),i.lute.SetVditorSV(!1),i.currentMode="wysiwyg",ze(i),uo(i,u,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),i.wysiwyg.element.querySelectorAll(".vditor-toc").forEach(function(f){(0,Fe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})}),i.wysiwyg.popover.style.display="none";else if(a==="sv"){T(i.toolbar.elements,["both"]),C(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.wysiwyg.element.parentElement.style.display="none",i.ir.element.parentElement.style.display="none",(i.options.preview.mode==="both"||i.options.preview.mode==="editor")&&(i.sv.element.style.display="block"),i.lute.SetVditorIR(!1),i.lute.SetVditorWYSIWYG(!1),i.lute.SetVditorSV(!0),i.currentMode="sv";var d=Oe(u,i);d==="<div data-block='0'></div>"&&(d=""),i.sv.element.innerHTML=d,G(i.sv.element),Ge(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),ze(i)}i.undo.resetIcon(i),typeof s!="string"&&(i[i.currentMode].element.focus(),dr(i)),Ht(i),Xe(i),i.toolbar.elements["edit-mode"]&&(i.toolbar.elements["edit-mode"].querySelectorAll("button").forEach(function(f){f.classList.remove("vditor-menu--current")}),i.toolbar.elements["edit-mode"].querySelector('button[data-mode="'.concat(i.currentMode,'"]')).classList.add("vditor-menu--current")),i.outline.toggle(i,i.currentMode!=="sv"&&i.options.outline.enable,typeof s!="string")}},ws=function(i){ys(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");return f.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow"),f.innerHTML='<button data-mode="wysiwyg">'.concat(window.VditorI18n.wysiwyg," &lt;").concat((0,m.ns)("⌥⌘7"),`></button>
<button data-mode="ir">`).concat(window.VditorI18n.instantRendering," &lt;").concat((0,m.ns)("⌥⌘8"),`></button>
<button data-mode="sv">`).concat(window.VditorI18n.splitView," &lt;").concat((0,m.ns)("⌥⌘9"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f,u),d}return a.prototype._bindEvent=function(s,u,d){var f=this.element.children[0];M(s,u,f,d.level),u.children.item(0).addEventListener((0,m.Le)(),function(E){er(s,"wysiwyg",E),E.preventDefault(),E.stopPropagation()}),u.children.item(1).addEventListener((0,m.Le)(),function(E){er(s,"ir",E),E.preventDefault(),E.stopPropagation()}),u.children.item(2).addEventListener((0,m.Le)(),function(E){er(s,"sv",E),E.preventDefault(),E.stopPropagation()})},a}(Mt),Or=function(i,a){return(0,q.Gb)(i,a)?getSelection().toString():""},Ai=function(i,a){a.addEventListener("focus",function(){i.options.focus&&i.options.focus(v(i)),A(i,["subToolbar","hint"])})},ho=function(i,a){a.addEventListener("dblclick",function(s){s.target.tagName==="IMG"&&(i.options.image.preview?i.options.image.preview(s.target):i.options.image.isPreview&&(0,se.E)(s.target,i.options.lang,i.options.theme))})},Mi=function(i,a){a.addEventListener("blur",function(s){if(i.currentMode==="ir"){var u=i.ir.element.querySelector(".vditor-ir__node--expand");u&&u.classList.remove("vditor-ir__node--expand")}else i.currentMode==="wysiwyg"&&!i.wysiwyg.selectPopover.contains(s.relatedTarget)&&i.wysiwyg.hideComment();i[i.currentMode].range=(0,q.zh)(i),i.options.blur&&i.options.blur(v(i))})},Ci=function(i,a){a.addEventListener("dragstart",function(s){s.dataTransfer.setData(c.g.DROP_EDITOR,c.g.DROP_EDITOR)}),a.addEventListener("drop",function(s){s.dataTransfer.getData(c.g.DROP_EDITOR)?lt(i):(s.dataTransfer.types.includes("Files")||s.dataTransfer.types.includes("text/html"))&&ta(i,s,{pasteCode:function(u){document.execCommand("insertHTML",!1,u)}})})},U=function(i,a,s){a.addEventListener("copy",function(u){return s(u,i)})},Q=function(i,a,s){a.addEventListener("cut",function(u){s(u,i),i.options.comment.enable&&i.currentMode==="wysiwyg"&&i.wysiwyg.getComments(i),document.execCommand("delete")})},Z=function(i){if(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)),!!i.options.typewriterMode){var a=i[i.currentMode].element,s=(0,q.Ny)(a).top;i.options.height==="auto"&&!i.element.classList.contains("vditor--fullscreen")&&window.scrollTo(window.scrollX,s+i.element.offsetTop+i.toolbar.element.offsetHeight-window.innerHeight/2+10),(i.options.height!=="auto"||i.element.classList.contains("vditor--fullscreen"))&&(a.scrollTop=s+a.scrollTop-a.clientHeight/2+10)}},xe=function(i,a){a.addEventListener("keydown",function(s){if(!s.isComposing&&i.options.keydown&&i.options.keydown(s),!((i.options.hint.extend.length>1||i.toolbar.elements.emoji)&&i.hint.select(s,i))){if(i.options.comment.enable&&i.currentMode==="wysiwyg"&&(s.key==="Backspace"||oe("⌘X",s))&&i.wysiwyg.getComments(i),i.currentMode==="sv"){if(be(i,s))return}else if(i.currentMode==="wysiwyg"){if(zn(i,s))return}else if(i.currentMode==="ir"&&Ce(i,s))return;if(i.options.ctrlEnter&&oe("⌘Enter",s)){i.options.ctrlEnter(v(i)),s.preventDefault();return}if(oe("⌘Z",s)&&!i.toolbar.elements.undo){i.undo.undo(i),s.preventDefault();return}if(oe("⌘Y",s)&&!i.toolbar.elements.redo){i.undo.redo(i),s.preventDefault();return}if(s.key==="Escape"){i.hint.element.style.display==="block"?i.hint.element.style.display="none":i.options.esc&&!s.isComposing&&i.options.esc(v(i)),s.preventDefault();return}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[1-6]$/.test(s.code)){if(i.currentMode==="wysiwyg"){var u=s.code.replace("Digit","H");(0,y.lG)(getSelection().getRangeAt(0).startContainer,u)?lr(i):kn(i,u),Re(i)}else i.currentMode==="sv"?Ct(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" "):i.currentMode==="ir"&&fi(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" ");return s.preventDefault(),!0}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[7-9]$/.test(s.code))return s.code==="Digit7"?er(i,"wysiwyg",s):s.code==="Digit8"?er(i,"ir",s):s.code==="Digit9"&&er(i,"sv",s),!0;i.options.toolbar.find(function(d){if(!d.hotkey||d.toolbar){if(d.toolbar){var f=d.toolbar.find(function(E){if(!E.hotkey)return!1;if(oe(E.hotkey,s))return i.toolbar.elements[E.name].children[0].dispatchEvent(new CustomEvent((0,m.Le)())),s.preventDefault(),!0});return!!f}return!1}if(oe(d.hotkey,s))return i.toolbar.elements[d.name].children[0].dispatchEvent(new CustomEvent((0,m.Le)())),s.preventDefault(),!0})}})},He=function(i,a){a.addEventListener("selectstart",function(s){a.onmouseup=function(){setTimeout(function(){var u=Or(i[i.currentMode].element);u.trim()?(i.currentMode==="wysiwyg"&&i.options.comment.enable&&(!(0,y.a1)(s.target,"data-type","footnotes-block")&&!(0,y.a1)(s.target,"data-type","link-ref-defs-block")?i.wysiwyg.showComment():i.wysiwyg.hideComment()),i.options.select&&i.options.select(u)):(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.wysiwyg.hideComment(),typeof i.options.unSelect=="function"&&i.options.unSelect())})}})},Pe=function(i,a){var s=(0,q.zh)(i);s.extractContents(),s.insertNode(document.createTextNode(Lute.Caret)),s.insertNode(document.createTextNode(a));var u=(0,y.a1)(s.startContainer,"data-block","0");u||(u=i.sv.element);var d=i.lute.SpinVditorSVDOM(u.textContent);d="<div data-block='0'>"+d.replace(/<span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span><span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span></g,`<span data-type="newline"><br /><span style="display: none">
</span></span><span data-type="newline"><br /><span style="display: none">
</span></span></div><div data-block="0"><`)+"</div>",u.isEqualNode(i.sv.element)?u.innerHTML=d:u.outerHTML=d,G(i.sv.element),(0,q.ib)(i.sv.element,s),Z(i)},pe=function(i,a,s){s===void 0&&(s=!0);var u=i;for(u.nodeType===3&&(u=u.parentElement);u;){if(u.getAttribute("data-type")===a)return u;s?u=u.previousElementSibling:u=u.nextElementSibling}return!1},Oe=function(i,a){z("SpinVditorSVDOM",i,"argument",a.options.debugger);var s=a.lute.SpinVditorSVDOM(i);return i="<div data-block='0'>"+s.replace(/<span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span><span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span></g,`<span data-type="newline"><br /><span style="display: none">
</span></span><span data-type="newline"><br /><span style="display: none">
</span></span></div><div data-block="0"><`)+"</div>",z("SpinVditorSVDOM",i,"result",a.options.debugger),i},Je=function(i){var a=i.getAttribute("data-type"),s=i.previousElementSibling,u=a&&a!=="text"&&a!=="table"&&a!=="heading-marker"&&a!=="newline"&&a!=="yaml-front-matter-open-marker"&&a!=="yaml-front-matter-close-marker"&&a!=="code-block-info"&&a!=="code-block-close-marker"&&a!=="code-block-open-marker"?i.textContent:"",d=!1;for(a==="newline"&&(d=!0);s&&!d;){var f=s.getAttribute("data-type");if(f==="li-marker"||f==="blockquote-marker"||f==="task-marker"||f==="padding"){var E=s.textContent;if(f==="li-marker"&&(a==="code-block-open-marker"||a==="code-block-info"))u=E.replace(/\S/g," ")+u;else if(a==="code-block-close-marker"&&s.nextElementSibling.isSameNode(i)){var L=pe(i,"code-block-open-marker");L&&L.previousElementSibling&&(s=L.previousElementSibling,u=E+u)}else u=E+u}else f==="newline"&&(d=!0);s=s.previousElementSibling}return u},Ge=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&i.hint.render(i),i.preview.render(i);var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),clearTimeout(i.sv.processTimeoutId),i.sv.processTimeoutId=window.setTimeout(function(){a.enableAddUndoStack&&!i.sv.composingLock&&i.undo.addToUndoStack(i)},i.options.undoDelay)},Ct=function(i,a){var s=(0,q.zh)(i),u=(0,N.S)(s.startContainer,"SPAN");u&&u.textContent.trim()!==""&&(a=`
`+a),s.collapse(!0),document.execCommand("insertHTML",!1,a)},Gt=function(i,a,s,u){var d=(0,q.zh)(i),f=a.getAttribute("data-type");i.sv.element.childNodes.length===0&&(i.sv.element.innerHTML=`<span data-type="p" data-block="0"><span data-type="text"><wbr></span></span><span data-type="newline"><br><span style="display: none">
</span></span>`,(0,q.ib)(i.sv.element,d));var E=(0,y.F9)(d.startContainer),L=(0,N.S)(d.startContainer,"SPAN");if(E){if(f==="link"){var D=void 0;d.toString()===""?D="".concat(s).concat(Lute.Caret).concat(u):D="".concat(s).concat(d.toString()).concat(u.replace(")",Lute.Caret+")")),document.execCommand("insertHTML",!1,D);return}else if(f==="italic"||f==="bold"||f==="strike"||f==="inline-code"||f==="code"||f==="table"||f==="line"){var D=void 0;d.toString()===""?D="".concat(s).concat(Lute.Caret).concat(f==="code"?"":u):D="".concat(s).concat(d.toString()).concat(Lute.Caret).concat(f==="code"?"":u),f==="table"||f==="code"&&L&&L.textContent!==""?D=`
`+D:f==="line"&&(D=`
`.concat(s,`
`).concat(Lute.Caret)),document.execCommand("insertHTML",!1,D);return}else if((f==="check"||f==="list"||f==="ordered-list"||f==="quote")&&L){var _="* ";f==="check"?_="* [ ] ":f==="ordered-list"?_="1. ":f==="quote"&&(_="> ");var B=pe(L,"newline");B?B.insertAdjacentText("afterend",_):E.insertAdjacentText("afterbegin",_),X(i);return}(0,q.ib)(i.sv.element,d),Ge(i)}},un=function(i){switch(i.currentMode){case"ir":return i.ir.element;case"wysiwyg":return i.wysiwyg.element;case"sv":return i.sv.element}},$n=function(i,a){i.options.upload.setHeaders&&(i.options.upload.headers=i.options.upload.setHeaders()),i.options.upload.headers&&Object.keys(i.options.upload.headers).forEach(function(s){a.setRequestHeader(s,i.options.upload.headers[s])})},mr=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(K){E(K)}}function D(B){try{_(u.throw(B))}catch(K){E(K)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},Hr=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Ia=function(){function i(){this.isUploading=!1,this.element=document.createElement("div"),this.element.className="vditor-upload"}return i}(),Li=function(i,a){i.tip.hide();var s=[],u="",d="";i.options.lang,i.options;for(var f=function(_,B){var K=a[B],fe=!0;K.name||(u+="<li>".concat(window.VditorI18n.nameEmpty,"</li>"),fe=!1),K.size>i.options.upload.max&&(u+="<li>".concat(K.name," ").concat(window.VditorI18n.over," ").concat(i.options.upload.max/1024/1024,"M</li>"),fe=!1);var ve=K.name.lastIndexOf("."),ue=K.name.substr(ve),ke=i.options.upload.filename(K.name.substr(0,ve))+ue;if(i.options.upload.accept){var we=i.options.upload.accept.split(",").some(function(de){var Ie=de.trim();if(Ie.indexOf(".")===0){if(ue.toLowerCase()===Ie.toLowerCase())return!0}else if(K.type.split("/")[0]===Ie.split("/")[0])return!0;return!1});we||(u+="<li>".concat(K.name," ").concat(window.VditorI18n.fileTypeError,"</li>"),fe=!1)}fe&&(s.push(K),d+="<li>".concat(ke," ").concat(window.VditorI18n.uploading,' <a class="vditorCancelUpload" href="javascript:void(0)">').concat(window.VditorI18n.cancelUpload,"</a></li>"))},E=a.length,L=0;L<E;L++)f(E,L);if(i.tip.show("<ul>".concat(u).concat(d,"</ul>")),i.options.upload.cancel){var D=i.tip.element.querySelector(".vditorCancelUpload");D&&D.addEventListener("click",function(){i.options.upload.cancel(s),i.tip.hide(),i.upload.isUploading=!1})}return s},Oa=function(i,a){var s=un(a);s.focus();var u=JSON.parse(i),d="";u.code===1&&(d="".concat(u.msg)),u.data.errFiles&&u.data.errFiles.length>0&&(d="<ul><li>".concat(d,"</li>"),u.data.errFiles.forEach(function(E){var L=E.lastIndexOf("."),D=a.options.upload.filename(E.substr(0,L))+E.substr(L);d+="<li>".concat(D," ").concat(window.VditorI18n.uploadError,"</li>")}),d+="</ul>"),d?a.tip.show(d):a.tip.hide();var f="";Object.keys(u.data.succMap).forEach(function(E){var L=u.data.succMap[E],D=E.lastIndexOf("."),_=E.substr(D),B=a.options.upload.filename(E.substr(0,D))+_;_=_.toLowerCase(),_.indexOf(".wav")===0||_.indexOf(".mp3")===0||_.indexOf(".ogg")===0?a.currentMode==="wysiwyg"?f+=`<div class="vditor-wysiwyg__block" data-type="html-block"
data-block="0"><pre><code>&lt;audio controls="controls" src="`.concat(L,'"&gt;&lt;/audio&gt;</code></pre><pre class="vditor-wysiwyg__preview" data-render="1"><audio controls="controls" src="').concat(L,`"></audio></pre></div>
`):a.currentMode==="ir"?f+='<audio controls="controls" src="'.concat(L,`"></audio>
`):f+="[".concat(B,"](").concat(L,`)
`):_.indexOf(".apng")===0||_.indexOf(".bmp")===0||_.indexOf(".gif")===0||_.indexOf(".ico")===0||_.indexOf(".cur")===0||_.indexOf(".jpg")===0||_.indexOf(".jpeg")===0||_.indexOf(".jfif")===0||_.indexOf(".pjp")===0||_.indexOf(".pjpeg")===0||_.indexOf(".png")===0||_.indexOf(".svg")===0||_.indexOf(".webp")===0?a.currentMode==="wysiwyg"?f+='<img alt="'.concat(B,'" src="').concat(L,`">
`):f+="![".concat(B,"](").concat(L,`)
`):a.currentMode==="wysiwyg"?f+='<a href="'.concat(L,'">').concat(B,`</a>
`):f+="[".concat(B,"](").concat(L,`)
`)}),(0,q.Hc)(a.upload.range),document.execCommand("insertHTML",!1,f),a.upload.range=getSelection().getRangeAt(0).cloneRange()},_i=function(i,a,s){return mr(void 0,void 0,void 0,function(){var u,d,ue,f,E,E,L,D,_,B,K,fe,ve,ue,ke,we;return Hr(this,function(de){switch(de.label){case 0:for(u=[],d=i.options.upload.multiple===!0?a.length:1,ue=0;ue<d;ue++)f=a[ue],f instanceof DataTransferItem&&(f=f.getAsFile()),u.push(f);return i.options.upload.handler?[4,i.options.upload.handler(u)]:[3,2];case 1:return E=de.sent(),s&&(s.value=""),typeof E=="string"?(i.tip.show(E),[2]):[2];case 2:return!i.options.upload.url||!i.upload?(s&&(s.value=""),i.tip.show("please config: options.upload.url"),[2]):i.options.upload.file?[4,i.options.upload.file(u)]:[3,4];case 3:u=de.sent(),de.label=4;case 4:if(i.options.upload.validate&&(E=i.options.upload.validate(u),typeof E=="string"))return i.tip.show(E),[2];if(L=un(i),i.upload.range=(0,q.zh)(i),D=Li(i,u),D.length===0)return s&&(s.value=""),[2];for(_=new FormData,B=i.options.upload.extraData,K=0,fe=Object.keys(B);K<fe.length;K++)ve=fe[K],_.append(ve,B[ve]);for(ue=0,ke=D.length;ue<ke;ue++)_.append(i.options.upload.fieldName,D[ue]);return we=new XMLHttpRequest,i.upload.xhr=we,we.open("POST",i.options.upload.url),i.options.upload.token&&we.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(we.withCredentials=!0),$n(i,we),i.upload.isUploading=!0,L.setAttribute("contenteditable","false"),we.onreadystatechange=function(){if(we.readyState===XMLHttpRequest.DONE){if(i.upload.isUploading=!1,L.setAttribute("contenteditable","true"),we.status>=200&&we.status<300)if(i.options.upload.success)i.options.upload.success(L,we.responseText);else{var Ie=we.responseText;i.options.upload.format&&(Ie=i.options.upload.format(a,we.responseText)),Oa(Ie,i)}else i.options.upload.error?i.options.upload.error(we.responseText):i.tip.show(we.responseText);s&&(s.value=""),i.upload.element.style.display="none",i.upload.xhr=void 0}},we.upload.onprogress=function(Ie){if(Ie.lengthComputable){var Te=Ie.loaded/Ie.total*100;i.upload.element.style.display="block";var $e=i.upload.element;$e.style.width=Te+"%"}},we.send(_),[2]}})})},Zr=function(i,a,s){var u,d=(0,y.F9)(a.startContainer);if(d||(d=i.wysiwyg.element),s&&s.inputType!=="formatItalic"&&s.inputType!=="deleteByDrag"&&s.inputType!=="insertFromDrop"&&s.inputType!=="formatBold"&&s.inputType!=="formatRemove"&&s.inputType!=="formatStrikeThrough"&&s.inputType!=="insertUnorderedList"&&s.inputType!=="insertOrderedList"&&s.inputType!=="formatOutdent"&&s.inputType!=="formatIndent"&&s.inputType!==""||!s){var f=mt(a.startContainer);f&&f.remove(),i.wysiwyg.element.querySelectorAll("wbr").forEach(function(Te){Te.remove()}),a.insertNode(document.createElement("wbr")),d.querySelectorAll("[style]").forEach(function(Te){Te.removeAttribute("style")}),d.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))}),(u=d.previousElementSibling)===null||u===void 0||u.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))});var E="";d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.wysiwyg.element);var L=d.isEqualNode(i.wysiwyg.element),D=(0,y.a1)(d,"data-type","footnotes-block");if(L)E=d.innerHTML;else{var _=(0,y.O9)(a.startContainer);if(_&&!D){var B=(0,N.S)(a.startContainer,"BLOCKQUOTE");B?d=(0,y.F9)(a.startContainer)||d:d=_}if(D&&(d=D),E=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var K=d.previousElementSibling,fe=d.nextElementSibling;K&&(K.tagName==="UL"||K.tagName==="OL")&&(E=K.outerHTML+E,K.remove()),fe&&(fe.tagName==="UL"||fe.tagName==="OL")&&(E=E+fe.outerHTML,fe.remove()),E=E.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}d.innerText.startsWith("```")||(i.wysiwyg.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(Te){Te&&!d.isEqualNode(Te)&&(E+=Te.outerHTML,Te.remove())}),i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(Te){Te&&!d.isEqualNode(Te)&&(E+=Te.outerHTML,Te.remove())}))}if(E=E.replace(/<\/(strong|b)><strong data-marker="\W{2}">/g,"").replace(/<\/(em|i)><em data-marker="\W{1}">/g,"").replace(/<\/(s|strike)><s data-marker="~{1,2}">/g,""),E==='<p data-block="0">```<wbr></p>'&&i.hint.recentLanguage&&(E='<p data-block="0">```<wbr></p>'.replace("```","```"+i.hint.recentLanguage)),z("SpinVditorDOM",E,"argument",i.options.debugger),E=i.lute.SpinVditorDOM(E),z("SpinVditorDOM",E,"result",i.options.debugger),L)d.innerHTML=E;else if(d.outerHTML=E,D){var ve=(0,y.E2)(i.wysiwyg.element.querySelector("wbr"),"LI");if(ve){var ue=i.wysiwyg.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(ve.getAttribute("data-marker"),'"]'));ue&&ue.setAttribute("aria-label",ve.textContent.trim().substr(0,24))}}var ke,we=i.wysiwyg.element.querySelectorAll("[data-type='link-ref-defs-block']");we.forEach(function(Te,$e){$e===0?ke=Te:(ke.insertAdjacentHTML("beforeend",Te.innerHTML),Te.remove())}),we.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",we[0]);var de,Ie=i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']");Ie.forEach(function(Te,$e){$e===0?de=Te:(de.insertAdjacentHTML("beforeend",Te.innerHTML),Te.remove())}),Ie.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",Ie[0]),(0,q.ib)(i.wysiwyg.element,a),i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(Te){tt(Te,i)}),s&&(s.inputType==="deleteContentBackward"||s.inputType==="deleteContentForward")&&i.options.comment.enable&&(i.wysiwyg.triggerRemoveComment(i),i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)))}Ht(i),Re(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},pu=function(i,a){return Object.defineProperty?Object.defineProperty(i,"raw",{value:a}):i.raw=a,i},xs=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(K){E(K)}}function D(B){try{_(u.throw(B))}catch(K){E(K)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},ks=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Ss=function(i,a,s){if(i.keyCode===229&&i.code===""&&i.key==="Unidentified"&&a.currentMode!=="sv"){var u=(0,y.F9)(s);if(u&&u.textContent.trim()==="")return a[a.currentMode].composingLock=!0,!1}return!0},Es=function(i,a,s){if(!(s.key==="Enter"||s.key==="Tab"||s.key==="Backspace"||s.key.indexOf("Arrow")>-1||(0,m.yl)(s)||s.key==="Escape"||s.shiftKey||s.altKey)){var u=(0,y.lG)(i.startContainer,"P")||(0,y.lG)(i.startContainer,"LI");if(u&&(0,q.im)(u,a[a.currentMode].element,i).start===0){u.nodeValue&&(u.nodeValue=u.nodeValue.replace(/\u2006/g,""));var d=document.createTextNode(c.g.ZWSP);i.insertNode(d),i.setStartAfter(d)}}},Ts=function(i,a){if(a==="ArrowDown"||a==="ArrowUp"){var s=(0,y.a1)(i.startContainer,"data-type","math-inline")||(0,y.a1)(i.startContainer,"data-type","html-entity")||(0,y.a1)(i.startContainer,"data-type","html-inline");s&&(a==="ArrowDown"&&i.setStartAfter(s.parentElement),a==="ArrowUp"&&i.setStartBefore(s.parentElement))}},hi=function(i,a){var s=(0,q.zh)(i),u=(0,y.F9)(s.startContainer);u&&(u.insertAdjacentHTML(a,'<p data-block="0">'.concat(c.g.ZWSP,`<wbr>
</p>`)),(0,q.ib)(i[i.currentMode].element,s),dr(i),lt(i))},fu=function(i){var a=(0,y.lG)(i,"TABLE");return a&&a.rows[0].cells[0].isSameNode(i)?a:!1},mu=function(i){var a=(0,y.lG)(i,"TABLE");return a&&a.lastElementChild.lastElementChild.lastElementChild.isSameNode(i)?a:!1},As=function(i,a,s){s===void 0&&(s=!0);var u=i.previousElementSibling;return u||(i.parentElement.previousElementSibling?u=i.parentElement.previousElementSibling.lastElementChild:i.parentElement.parentElement.tagName==="TBODY"&&i.parentElement.parentElement.previousElementSibling?u=i.parentElement.parentElement.previousElementSibling.lastElementChild.lastElementChild:u=null),u&&(a.selectNodeContents(u),s||a.collapse(!1),(0,q.Hc)(a)),u},pi=function(i,a,s,u,d){var f=(0,q.im)(u,i[i.currentMode].element,s);if(a.key==="ArrowDown"&&u.textContent.trimRight().substr(f.start).indexOf(`
`)===-1||a.key==="ArrowRight"&&f.start>=u.textContent.trimRight().length){var E=d.nextElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!0),(0,q.Hc)(s)),a.preventDefault(),!0}return!1},Pr=function(i,a,s,u,d){var f=(0,q.im)(u,i[i.currentMode].element,s);if(a.key==="ArrowUp"&&u.textContent.substr(0,f.start).indexOf(`
`)===-1||(a.key==="ArrowLeft"||a.key==="Backspace"&&s.toString()==="")&&f.start===0){var E=d.previousElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("beforebegin",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!1),(0,q.Hc)(s)),a.preventDefault(),!0}return!1},Ji=function(i,a,s,u){u===void 0&&(u=!0);var d=(0,y.lG)(a.startContainer,"LI");if(i[i.currentMode].element.querySelectorAll("wbr").forEach(function(B){B.remove()}),a.insertNode(document.createElement("wbr")),u&&d){for(var f="",E=0;E<d.parentElement.childElementCount;E++){var L=d.parentElement.children[E].querySelector("input");L&&L.remove(),f+='<p data-block="0">'.concat(d.parentElement.children[E].innerHTML.trimLeft(),"</p>")}d.parentElement.insertAdjacentHTML("beforebegin",f),d.parentElement.remove()}else if(d)if(s==="check")d.parentElement.querySelectorAll("li").forEach(function(B){B.insertAdjacentHTML("afterbegin",'<input type="checkbox" />'.concat(B.textContent.indexOf(" ")===0?"":" ")),B.classList.add("vditor-task")});else{d.querySelector("input")&&d.parentElement.querySelectorAll("li").forEach(function(B){B.querySelector("input").remove(),B.classList.remove("vditor-task")});var _=void 0;s==="list"?(_=document.createElement("ul"),_.setAttribute("data-marker","*")):(_=document.createElement("ol"),_.setAttribute("data-marker","1.")),_.setAttribute("data-block","0"),_.setAttribute("data-tight",d.parentElement.getAttribute("data-tight")),_.innerHTML=d.parentElement.innerHTML,d.parentElement.parentNode.replaceChild(_,d.parentElement)}else{var D=(0,y.a1)(a.startContainer,"data-block","0");D||(i[i.currentMode].element.querySelector("wbr").remove(),D=i[i.currentMode].element.querySelector("p"),D.innerHTML="<wbr>"),s==="check"?(D.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li class="vditor-task"><input type="checkbox" /> '.concat(D.innerHTML,"</li></ul>")),D.remove()):s==="list"?(D.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li>'.concat(D.innerHTML,"</li></ul>")),D.remove()):s==="ordered-list"&&(D.insertAdjacentHTML("beforebegin",'<ol data-block="0"><li>'.concat(D.innerHTML,"</li></ol>")),D.remove())}},Ms=function(i,a,s){var u=a.previousElementSibling;if(a&&u){var d=[a];Array.from(s.cloneContents().children).forEach(function(D,_){D.nodeType!==3&&a&&D.textContent.trim()!==""&&a.getAttribute("data-node-id")===D.getAttribute("data-node-id")&&(_!==0&&d.push(a),a=a.nextElementSibling)}),i[i.currentMode].element.querySelectorAll("wbr").forEach(function(D){D.remove()}),s.insertNode(document.createElement("wbr"));var f=u.parentElement,E="";d.forEach(function(D){var _=D.getAttribute("data-marker");_.length!==1&&(_="1".concat(_.slice(-1))),E+='<li data-node-id="'.concat(D.getAttribute("data-node-id"),'" data-marker="').concat(_,'">').concat(D.innerHTML,"</li>"),D.remove()}),u.insertAdjacentHTML("beforeend","<".concat(f.tagName,' data-block="0">').concat(E,"</").concat(f.tagName,">")),i.currentMode==="wysiwyg"?f.outerHTML=i.lute.SpinVditorDOM(f.outerHTML):f.outerHTML=i.lute.SpinVditorIRDOM(f.outerHTML),(0,q.ib)(i[i.currentMode].element,s);var L=(0,y.O9)(s.startContainer);L&&L.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(D){tt(D,i),i.currentMode==="wysiwyg"&&D.previousElementSibling.setAttribute("style","display:none")}),lt(i),dr(i)}else i[i.currentMode].element.focus()},po=function(i,a,s,u){var d=(0,y.lG)(a.parentElement,"LI");if(d){i[i.currentMode].element.querySelectorAll("wbr").forEach(function(K){K.remove()}),s.insertNode(document.createElement("wbr"));var f=a.parentElement,E=f.cloneNode(),L=[a];Array.from(s.cloneContents().children).forEach(function(K,fe){K.nodeType!==3&&a&&K.textContent.trim()!==""&&a.getAttribute("data-node-id")===K.getAttribute("data-node-id")&&(fe!==0&&L.push(a),a=a.nextElementSibling)});var D=!1,_="";f.querySelectorAll("li").forEach(function(K){D&&(_+=K.outerHTML,!K.nextElementSibling&&!K.previousElementSibling?K.parentElement.remove():K.remove()),K.isSameNode(L[L.length-1])&&(D=!0)}),L.reverse().forEach(function(K){d.insertAdjacentElement("afterend",K)}),_&&(E.innerHTML=_,L[0].insertAdjacentElement("beforeend",E)),i.currentMode==="wysiwyg"?u.outerHTML=i.lute.SpinVditorDOM(u.outerHTML):u.outerHTML=i.lute.SpinVditorIRDOM(u.outerHTML),(0,q.ib)(i[i.currentMode].element,s);var B=(0,y.O9)(s.startContainer);B&&B.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(K){tt(K,i),i.currentMode==="wysiwyg"&&K.previousElementSibling.setAttribute("style","display:none")}),lt(i),dr(i)}else i[i.currentMode].element.focus()},Qi=function(i,a){for(var s=getSelection().getRangeAt(0).startContainer.parentElement,u=i.rows[0].cells.length,d=i.rows.length,f=0,E=0;E<d;E++)for(var L=0;L<u;L++)if(i.rows[E].cells[L].isSameNode(s)){f=L;break}for(var D=0;D<d;D++)i.rows[D].cells[f].setAttribute("align",a)},fo=function(i){var a=i.trimRight().split(`
`).pop();return a===""?!1:(a.replace(/ |-/g,"")===""||a.replace(/ |_/g,"")===""||a.replace(/ |\*/g,"")==="")&&a.replace(/ /g,"").length>2?!(a.indexOf("-")>-1&&a.trimLeft().indexOf(" ")===-1&&i.trimRight().split(`
`).length>1||a.indexOf(" ")===0||a.indexOf(" ")===0):!1},mo=function(i){var a=i.trimRight().split(`
`);return i=a.pop(),i.indexOf(" ")===0||i.indexOf(" ")===0||(i=i.trimLeft(),i===""||a.length===0)?!1:i.replace(/-/g,"")===""||i.replace(/=/g,"")===""},lt=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),i.currentMode==="wysiwyg"?Re(i,a):i.currentMode==="ir"?Xn(i,a):i.currentMode==="sv"&&Ge(i,a)},Cs=function(i,a,s,u){var d,f=i.startContainer,E=(0,y.lG)(f,"LI");if(E){if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Enter"&&!u.shiftKey&&s&&E.contains(s)&&s.nextElementSibling)return E&&!E.textContent.endsWith(`
`)&&E.insertAdjacentText("beforeend",`
`),i.insertNode(document.createTextNode(`
`)),i.collapse(!1),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&!E.previousElementSibling&&i.toString()===""&&(0,q.im)(E,a[a.currentMode].element,i).start===0)return E.nextElementSibling?(E.parentElement.insertAdjacentHTML("beforebegin",'<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>")),E.remove()):E.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>"),(0,q.ib)(a[a.currentMode].element,i),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&E.textContent.trim().replace(c.g.ZWSP,"")===""&&i.toString()===""&&((d=E.previousElementSibling)===null||d===void 0?void 0:d.tagName)==="LI")return E.previousElementSibling.insertAdjacentText("beforeend",`
`),i.selectNodeContents(E.previousElementSibling),i.collapse(!1),E.remove(),(0,q.ib)(a[a.currentMode].element,i),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Tab"){var L=!1;if((i.startOffset===0&&(f.nodeType===3&&!f.previousSibling||f.nodeType!==3&&f.nodeName==="LI")||E.classList.contains("vditor-task")&&i.startOffset===1&&f.previousSibling.nodeType!==3&&f.previousSibling.tagName==="INPUT")&&(L=!0),L||i.toString()!=="")return u.shiftKey?po(a,E,i,E.parentElement):Ms(a,E,i),u.preventDefault(),!0}}return!1},go=function(i,a,s){if(i.options.tab&&s.key==="Tab")return s.shiftKey||(a.toString()===""?(a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1)):(a.extractContents(),a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1))),(0,q.Hc)(a),lt(i),s.preventDefault(),!0},Ls=function(i,a,s,u){if(s){if(!(0,m.yl)(i)&&!i.altKey&&i.key==="Enter"){var d=String.raw(qs||(qs=pu(["",""],["",""])),s.textContent).replace(/\\\|/g,"").trim(),f=d.split("|");if(d.startsWith("|")&&d.endsWith("|")&&f.length>3){var E=f.map(function(){return"---"}).join("|");return E=s.textContent+`
`+E.substring(3,E.length-3)+`
|<wbr>`,s.outerHTML=a.lute.SpinVditorDOM(E),(0,q.ib)(a[a.currentMode].element,u),lt(a),Z(a),i.preventDefault(),!0}if(fo(s.innerHTML)&&s.previousElementSibling){var L="",D=s.innerHTML.trimRight().split(`
`);return D.length>1&&(D.pop(),L='<p data-block="0">'.concat(D.join(`
`),"</p>")),s.insertAdjacentHTML("afterend","".concat(L,`<hr data-block="0"><p data-block="0"><wbr>
</p>`)),s.remove(),(0,q.ib)(a[a.currentMode].element,u),lt(a),Z(a),i.preventDefault(),!0}if(mo(s.innerHTML))return a.currentMode==="wysiwyg"?s.outerHTML=a.lute.SpinVditorDOM(s.innerHTML+`<p data-block="0"><wbr>
</p>`):s.outerHTML=a.lute.SpinVditorIRDOM(s.innerHTML+`<p data-block="0"><wbr>
</p>`),(0,q.ib)(a[a.currentMode].element,u),lt(a),Z(a),i.preventDefault(),!0}if(u.collapsed&&s.previousElementSibling&&i.key==="Backspace"&&!(0,m.yl)(i)&&!i.altKey&&!i.shiftKey&&s.textContent.trimRight().split(`
`).length>1&&(0,q.im)(s,a[a.currentMode].element,u).start===0){var _=(0,y.DX)(s.previousElementSibling);return _.textContent.endsWith(`
`)||(_.textContent=_.textContent+`
`),_.parentElement.insertAdjacentHTML("beforeend","<wbr>".concat(s.innerHTML)),s.remove(),(0,q.ib)(a[a.currentMode].element,u),!1}return!1}},_s=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');s.tagName==="TH"?s.parentElement.parentElement.insertAdjacentHTML("afterend","<tbody><tr>".concat(u,"</tr></tbody>")):s.parentElement.insertAdjacentHTML("afterend","<tr>".concat(u,"</tr>")),lt(i)},Ns=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)s.tagName==="TH"?u+='<th align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </th>'):u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');if(s.tagName==="TH"){s.parentElement.parentElement.insertAdjacentHTML("beforebegin","<thead><tr>".concat(u,"</tr></thead>")),a.insertNode(document.createElement("wbr"));var f=s.parentElement.innerHTML.replace(/<th>/g,"<td>").replace(/<\/th>/g,"</td>");s.parentElement.parentElement.nextElementSibling.insertAdjacentHTML("afterbegin",f),s.parentElement.parentElement.remove(),(0,q.ib)(i.ir.element,a)}else s.parentElement.insertAdjacentHTML("beforebegin","<tr>".concat(u,"</tr>"));lt(i)},ea=function(i,a,s,u){u===void 0&&(u="afterend");for(var d=0,f=s.previousElementSibling;f;)d++,f=f.previousElementSibling;for(var E=0;E<a.rows.length;E++)E===0?a.rows[E].cells[d].insertAdjacentHTML(u,"<th> </th>"):a.rows[E].cells[d].insertAdjacentHTML(u,"<td> </td>");lt(i)},Ds=function(i,a,s){if(s.tagName==="TD"){var u=s.parentElement.parentElement;s.parentElement.previousElementSibling?a.selectNodeContents(s.parentElement.previousElementSibling.lastElementChild):a.selectNodeContents(u.previousElementSibling.lastElementChild.lastElementChild),u.childElementCount===1?u.remove():s.parentElement.remove(),a.collapse(!1),(0,q.Hc)(a),lt(i)}},Rs=function(i,a,s,u){for(var d=0,f=u.previousElementSibling;f;)d++,f=f.previousElementSibling;(u.previousElementSibling||u.nextElementSibling)&&(a.selectNodeContents(u.previousElementSibling||u.nextElementSibling),a.collapse(!0));for(var E=0;E<s.rows.length;E++){var L=s.rows[E].cells;if(L.length===1){s.remove(),dr(i);break}L[d].remove()}(0,q.Hc)(a),lt(i)},Is=function(i,a,s){var u=s.startContainer,d=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(d){if(!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"){(!d.lastElementChild||d.lastElementChild&&(!d.lastElementChild.isSameNode(d.lastChild)||d.lastElementChild.tagName!=="BR"))&&d.insertAdjacentHTML("beforeend","<br>");var f=document.createElement("br");return s.insertNode(f),s.setStartAfter(f),lt(i),Z(i),a.preventDefault(),!0}if(a.key==="Tab"){if(a.shiftKey)return As(d,s),a.preventDefault(),!0;var E=d.nextElementSibling;return E||(d.parentElement.nextElementSibling?E=d.parentElement.nextElementSibling.firstElementChild:d.parentElement.parentElement.tagName==="THEAD"&&d.parentElement.parentElement.nextElementSibling?E=d.parentElement.parentElement.nextElementSibling.firstElementChild.firstElementChild:E=null),E&&(s.selectNodeContents(E),(0,q.Hc)(s)),a.preventDefault(),!0}var L=d.parentElement.parentElement.parentElement;if(a.key==="ArrowUp"){if(a.preventDefault(),d.tagName==="TH")return L.previousElementSibling?(s.selectNodeContents(L.previousElementSibling),s.collapse(!1),(0,q.Hc)(s)):hi(i,"beforebegin"),!0;for(var D=0,_=d.parentElement;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var B=_.previousElementSibling;return B||(B=_.parentElement.previousElementSibling.firstChild),s.selectNodeContents(B.cells[D]),s.collapse(!1),(0,q.Hc)(s),!0}if(a.key==="ArrowDown"){a.preventDefault();var _=d.parentElement;if(!_.nextElementSibling&&d.tagName==="TD")return L.nextElementSibling?(s.selectNodeContents(L.nextElementSibling),s.collapse(!0),(0,q.Hc)(s)):hi(i,"afterend"),!0;for(var D=0;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var E=_.nextElementSibling;return E||(E=_.parentElement.nextElementSibling.firstChild),s.selectNodeContents(E.cells[D]),s.collapse(!0),(0,q.Hc)(s),!0}if(i.currentMode==="wysiwyg"&&!(0,m.yl)(a)&&a.key==="Enter"&&!a.shiftKey&&a.altKey){var K=i.wysiwyg.popover.querySelector(".vditor-input");return K.focus(),K.select(),a.preventDefault(),!0}if(!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Backspace"&&s.startOffset===0&&s.toString()===""){var fe=As(d,s,!1);return!fe&&L&&(L.textContent.trim()===""?(L.outerHTML=`<p data-block="0"><wbr>
</p>`,(0,q.ib)(i[i.currentMode].element,s)):(s.setStartBefore(L),s.collapse(!0)),lt(i)),a.preventDefault(),!0}if(oe("⇧⌘F",a))return Ns(i,s,d),a.preventDefault(),!0;if(oe("⌘=",a))return _s(i,s,d),a.preventDefault(),!0;if(oe("⇧⌘G",a))return ea(i,L,d,"beforebegin"),a.preventDefault(),!0;if(oe("⇧⌘=",a))return ea(i,L,d),a.preventDefault(),!0;if(oe("⌘-",a))return Ds(i,s,d),a.preventDefault(),!0;if(oe("⇧⌘-",a))return Rs(i,s,L,d),a.preventDefault(),!0;if(oe("⇧⌘L",a)){if(i.currentMode==="ir")return Qi(L,"left"),lt(i),a.preventDefault(),!0;var ve=i.wysiwyg.popover.querySelector('[data-type="left"]');if(ve)return ve.click(),a.preventDefault(),!0}if(oe("⇧⌘C",a)){if(i.currentMode==="ir")return Qi(L,"center"),lt(i),a.preventDefault(),!0;var ve=i.wysiwyg.popover.querySelector('[data-type="center"]');if(ve)return ve.click(),a.preventDefault(),!0}if(oe("⇧⌘R",a)){if(i.currentMode==="ir")return Qi(L,"right"),lt(i),a.preventDefault(),!0;var ve=i.wysiwyg.popover.querySelector('[data-type="right"]');if(ve)return ve.click(),a.preventDefault(),!0}}return!1},Os=function(i,a,s,u){if(s.tagName==="PRE"&&oe("⌘A",a))return u.selectNodeContents(s.firstElementChild),a.preventDefault(),!0;if(i.options.tab&&a.key==="Tab"&&!a.shiftKey&&u.toString()==="")return u.insertNode(document.createTextNode(i.options.tab)),u.collapse(!1),lt(i),a.preventDefault(),!0;if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey){var d=(0,q.im)(s,i[i.currentMode].element,u);if((d.start===0||d.start===1&&s.innerText===`
`)&&u.toString()==="")return s.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(s.firstElementChild.innerHTML,"</p>"),(0,q.ib)(i[i.currentMode].element,u),lt(i),a.preventDefault(),!0}return!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"?(s.firstElementChild.textContent.endsWith(`
`)||s.firstElementChild.insertAdjacentText("beforeend",`
`),u.extractContents(),u.insertNode(document.createTextNode(`
`)),u.collapse(!1),(0,q.Hc)(u),(0,m.vU)()||(i.currentMode==="wysiwyg"?Zr(i,u):Nt(i,u)),Z(i),a.preventDefault(),!0):!1},Hs=function(i,a,s,u){var d=a.startContainer,f=(0,y.lG)(d,"BLOCKQUOTE");if(f&&a.toString()===""){if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&(0,q.im)(f,i[i.currentMode].element,a).start===0)return a.insertNode(document.createElement("wbr")),f.outerHTML=f.innerHTML,(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0;if(u&&s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&u.parentElement.tagName==="BLOCKQUOTE"){var E=!1;if(u.innerHTML.replace(c.g.ZWSP,"")===`
`||u.innerHTML.replace(c.g.ZWSP,"")===""?(E=!0,u.remove()):u.innerHTML.endsWith(`
`)&&(0,q.im)(u,i[i.currentMode].element,a).start===u.textContent.length-1&&(u.innerHTML=u.innerHTML.substr(0,u.innerHTML.length-2),E=!0),E)return f.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP,`<wbr>
</p>`)),(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0}var L=(0,y.F9)(d);if(i.currentMode==="wysiwyg"&&L&&oe("⇧⌘;",s))return a.insertNode(document.createElement("wbr")),L.outerHTML='<blockquote data-block="0">'.concat(L.outerHTML,"</blockquote>"),(0,q.ib)(i.wysiwyg.element,a),Re(i),s.preventDefault(),!0;if(pi(i,s,a,f,f)||Pr(i,s,a,f,f))return!0}return!1},Ps=function(i,a,s){var u=a.startContainer,d=(0,y.lG)(u,"LI");if(d&&d.classList.contains("vditor-task")){if(oe("⇧⌘J",s)){var f=d.firstElementChild;return f.checked?f.removeAttribute("checked"):f.setAttribute("checked","checked"),lt(i),s.preventDefault(),!0}if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&a.toString()===""&&a.startOffset===1&&(u.nodeType===3&&u.previousSibling&&u.previousSibling.tagName==="INPUT"||u.nodeType!==3)){var E=d.previousElementSibling;if(d.querySelector("input").remove(),E){var L=(0,y.DX)(E);L.parentElement.insertAdjacentHTML("beforeend","<wbr>"+d.innerHTML.trim()),d.remove()}else d.parentElement.insertAdjacentHTML("beforebegin",'<p data-block="0"><wbr>'.concat(d.innerHTML.trim()||`
`,"</p>")),d.nextElementSibling?d.remove():d.parentElement.remove();return(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0}if(s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey){if(d.textContent.trim()==="")if((0,y.fb)(d.parentElement,"vditor-task")){var D=(0,y.O9)(u);D&&po(i,d,a,D)}else if(d.nextElementSibling){var _="",B="",K=!1;Array.from(d.parentElement.children).forEach(function(ke){d.isSameNode(ke)?K=!0:K?_+=ke.outerHTML:B+=ke.outerHTML});var fe=d.parentElement.tagName,ve=d.parentElement.tagName==="OL"?"":' data-marker="'.concat(d.parentElement.getAttribute("data-marker"),'"'),ue="";B&&(ue=d.parentElement.tagName==="UL"?"":' start="1"',B="<".concat(fe,' data-tight="true"').concat(ve,' data-block="0">').concat(B,"</").concat(fe,">")),d.parentElement.outerHTML="".concat(B,`<p data-block="0"><wbr>
</p><`).concat(fe,`
data-tight="true"`).concat(ve,' data-block="0"').concat(ue,">").concat(_,"</").concat(fe,">")}else d.parentElement.insertAdjacentHTML("afterend",`<p data-block="0"><wbr>
</p>`),d.parentElement.querySelectorAll("li").length===1?d.parentElement.remove():d.remove();else u.nodeType!==3&&a.startOffset===0&&u.firstChild.tagName==="INPUT"?a.setStart(u.childNodes[1],1):(a.setEndAfter(d.lastChild),d.insertAdjacentHTML("afterend",'<li class="vditor-task" data-marker="'.concat(d.getAttribute("data-marker"),'"><input type="checkbox"> <wbr></li>')),document.querySelector("wbr").after(a.extractContents()));return(0,q.ib)(i[i.currentMode].element,a),lt(i),Z(i),s.preventDefault(),!0}}return!1},zs=function(i,a,s,u){if(a.startContainer.nodeType!==3){var d=a.startContainer.children[a.startOffset];if(d&&d.tagName==="HR")return a.selectNodeContents(d.previousElementSibling),a.collapse(!1),s.preventDefault(),!0}if(u){var f=u.previousElementSibling;if(f&&(0,q.im)(u,i[i.currentMode].element,a).start===0&&((0,m.vU)()&&f.tagName==="HR"||f.tagName==="TABLE")){if(f.tagName==="TABLE"){var E=f.lastElementChild.lastElementChild.lastElementChild;E.innerHTML=E.innerHTML.trimLeft()+"<wbr>"+u.textContent.trim(),u.remove()}else f.remove();return(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0}}return!1},Bs=function(i){(0,m.vU)()&&i.startContainer.nodeType!==3&&i.startContainer.tagName==="HR"&&i.setStartBefore(i.startContainer)},Fs=function(i,a,s){var u,d;if(!(0,m.vU)())return!1;if(i.key==="ArrowUp"&&a&&((u=a.previousElementSibling)===null||u===void 0?void 0:u.tagName)==="TABLE"){var f=a.previousElementSibling;return s.selectNodeContents(f.rows[f.rows.length-1].lastElementChild),s.collapse(!1),i.preventDefault(),!0}return i.key==="ArrowDown"&&a&&((d=a.nextElementSibling)===null||d===void 0?void 0:d.tagName)==="TABLE"?(s.selectNodeContents(a.nextElementSibling.rows[0].cells[0]),s.collapse(!0),i.preventDefault(),!0):!1},ta=function(i,a,s){return xs(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,B,K,fe,ve,ue,ke,de,we,de,Ie;return ks(this,function(Te){switch(Te.label){case 0:return i[i.currentMode].element.getAttribute("contenteditable")!=="true"?[2]:(a.stopPropagation(),a.preventDefault(),"clipboardData"in a?(u=a.clipboardData.getData("text/html"),d=a.clipboardData.getData("text/plain"),f=a.clipboardData.files):(u=a.dataTransfer.getData("text/html"),d=a.dataTransfer.getData("text/plain"),a.dataTransfer.types.includes("Files")&&(f=a.dataTransfer.items)),E={},L=function($e,bt){if(!bt)return["",Lute.WalkContinue];if(i.options.upload.renderLinkDest)return i.options.upload.renderLinkDest(i,$e,bt);var gt=$e.TokensStr();if($e.__internal_object__.Parent.Type===34&&gt&&gt.indexOf("file://")===-1&&i.options.upload.linkToImgUrl){var kt=new XMLHttpRequest;kt.open("POST",i.options.upload.linkToImgUrl),i.options.upload.token&&kt.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(kt.withCredentials=!0),$n(i,kt),kt.setRequestHeader("Content-Type","application/json; charset=utf-8"),kt.onreadystatechange=function(){if(kt.readyState===XMLHttpRequest.DONE){if(kt.status===200){var dn=kt.responseText;i.options.upload.linkToImgFormat&&(dn=i.options.upload.linkToImgFormat(kt.responseText));var Wt=JSON.parse(dn);if(Wt.code!==0){i.tip.show(Wt.msg);return}var hn=Wt.data.originalURL;if(i.currentMode==="sv")i.sv.element.querySelectorAll(".vditor-sv__marker--link").forEach(function(zt){zt.textContent===hn&&(zt.textContent=Wt.data.url)});else{var it=i[i.currentMode].element.querySelector('img[src="'.concat(hn,'"]'));it.src=Wt.data.url,i.currentMode==="ir"&&(it.previousElementSibling.previousElementSibling.innerHTML=Wt.data.url)}lt(i)}else i.tip.show(kt.responseText);i.options.upload.linkToImgCallback&&i.options.upload.linkToImgCallback(kt.responseText)}},kt.send(JSON.stringify({url:gt}))}return i.currentMode==="ir"?['<span class="vditor-ir__marker vditor-ir__marker--link">'.concat(Lute.EscapeHTMLStr(gt),"</span>"),Lute.WalkContinue]:i.currentMode==="wysiwyg"?["",Lute.WalkContinue]:['<span class="vditor-sv__marker--link">'.concat(Lute.EscapeHTMLStr(gt),"</span>"),Lute.WalkContinue]},(u.replace(/&amp;/g,"&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig,"").trim()==='<a href="'.concat(d,'">').concat(d,"</a>")||u.replace(/&amp;/g,"&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig,"").trim()==='<!--StartFragment--><a href="'.concat(d,'">').concat(d,"</a><!--EndFragment-->"))&&(u=""),D=new DOMParser().parseFromString(u,"text/html"),D.body&&(u=D.body.innerHTML),u=Lute.Sanitize(u),i.wysiwyg.getComments(i),_=i[i.currentMode].element.scrollHeight,B=ct(u,d,i.currentMode),K=i.currentMode==="sv"?(0,y.a1)(a.target,"data-type","code-block"):(0,y.lG)(a.target,"CODE"),K?(i.currentMode==="sv"?document.execCommand("insertHTML",!1,d.replace(/&/g,"&amp;").replace(/</g,"&lt;")):(fe=(0,q.im)(a.target,i[i.currentMode].element),K.parentElement.tagName!=="PRE"&&(d+=c.g.ZWSP),K.textContent=K.textContent.substring(0,fe.start)+d+K.textContent.substring(fe.end),(0,q.$j)(fe.start+d.length,fe.start+d.length,K.parentElement),!((Ie=K.parentElement)===null||Ie===void 0)&&Ie.nextElementSibling.classList.contains("vditor-".concat(i.currentMode,"__preview"))&&(K.parentElement.nextElementSibling.innerHTML=K.outerHTML,tt(K.parentElement.nextElementSibling,i))),[3,10]):[3,1]);case 1:return B?(s.pasteCode(B),[3,10]):[3,2];case 2:return u.trim()===""?[3,5]:(ve=document.createElement("div"),ve.innerHTML=u,i.options.upload.base64ToLink?[3,4]:[4,gu(i,ve,("clipboardData"in a?a.clipboardData:a.dataTransfer).getData("text/rtf"))]);case 3:Te.sent(),Te.label=4;case 4:return ve.querySelectorAll("[style]").forEach(function($e){$e.removeAttribute("style")}),ve.querySelectorAll(".vditor-copy").forEach(function($e){$e.remove()}),i.currentMode==="ir"?(E.HTML2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(i.lute.HTML2VditorIRDOM(ve.innerHTML),i)):i.currentMode==="wysiwyg"?(E.HTML2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(i.lute.HTML2VditorDOM(ve.innerHTML),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),Pe(i,i.lute.HTML2Md(ve.innerHTML).trimRight())),i.outline.render(i),[3,10];case 5:return f.length>0?i.options.upload.url||i.options.upload.handler?[4,_i(i,f)]:[3,7]:[3,9];case 6:return Te.sent(),[3,8];case 7:ue=new FileReader,"clipboardData"in a?(f=a.clipboardData.files,ke=f[0]):a.dataTransfer.types.includes("Files")&&(f=a.dataTransfer.items,ke=f[0].getAsFile()),ke&&ke.type.startsWith("image")&&(ue.readAsDataURL(ke),ue.onload=function(){var $e="";i.currentMode==="wysiwyg"?$e+='<img alt="'.concat(ke.name,'" src="').concat(ue.result.toString(),`">
`):$e+="![".concat(ke.name,"](").concat(ue.result.toString(),`)
`),document.execCommand("insertHTML",!1,$e)}),Te.label=8;case 8:return[3,10];case 9:d.trim()!==""&&f.length===0&&(de=(0,q.zh)(i),de.toString()!==""&&i.lute.IsValidLinkDest(d)&&(d="[".concat(de.toString(),"](").concat(d,")")),i.currentMode==="ir"?(E.Md2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(Lute.Sanitize(i.lute.Md2VditorIRDOM(d)),i)):i.currentMode==="wysiwyg"?(E.Md2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(Lute.Sanitize(i.lute.Md2VditorDOM(d)),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),Pe(i,d)),i.outline.render(i)),Te.label=10;case 10:return i.currentMode!=="sv"&&(we=(0,y.F9)((0,q.zh)(i).startContainer),we&&(de=(0,q.zh)(i),i[i.currentMode].element.querySelectorAll("wbr").forEach(function($e){$e.remove()}),de.insertNode(document.createElement("wbr")),i.currentMode==="wysiwyg"?we.outerHTML=i.lute.SpinVditorDOM(we.outerHTML):we.outerHTML=i.lute.SpinVditorIRDOM(we.outerHTML),(0,q.ib)(i[i.currentMode].element,de)),i[i.currentMode].element.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function($e){tt($e,i)})),i.wysiwyg.triggerRemoveComment(i),lt(i),i[i.currentMode].element.scrollHeight-_>Math.min(i[i.currentMode].element.clientHeight,window.innerHeight)/2&&Z(i),[2]}})})},gu=function(i,a,s){return xs(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,B,K,ke,fe,ve,ue,ke,we,de;return ks(this,function(Ie){switch(Ie.label){case 0:if(!s)return[2];if(u=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,d=new RegExp("(?:("+u.source+"))([\\da-fA-F\\s]+)\\}","g"),f=s.match(d),E=[],f)for(L=0,D=f;L<D.length;L++)_=D[L],B=void 0,_.includes("\\pngblip")?B="image/png":_.includes("\\jpegblip")&&(B="image/jpeg"),B&&E.push({hex:_.replace(u,"").replace(/[^\da-fA-F]/g,""),type:B});for(K=[],vo(a,function(Te){if(Te.tagName==="V:SHAPE")return vo(Te,function($e){$e.tagName==="V:IMAGEDATA"&&K.push({shape:Te,img:$e})}),!1}),ke=0;ke<K.length;ke++)fe=document.createElement("img"),ve="data:"+E[ke].type+";base64,"+btoa((E[ke].hex.match(/\w{2}/g)||[]).map(function(Te){return String.fromCharCode(parseInt(Te,16))}).join("")),fe.src=ve,fe.title=K[ke].img.getAttribute("title"),K[ke].shape.parentNode.replaceChild(fe,K[ke].shape);ue=a.querySelectorAll("img"),ke=0,Ie.label=1;case 1:return ke<ue.length?(we=ue[ke].src||"",we?(de=ue[ke],[4,i.options.upload.base64ToLink(we)]):[3,3]):[3,4];case 2:de.src=Ie.sent(),Ie.label=3;case 3:return ke++,[3,1];case 4:return[2]}})})},vo=function(i,a){var s=a(i);if(s!==!1)for(var u=0;u<i.children.length;u++)vo(i.children[u],a)},qs,js=function(i){var a,s;i.hint.render(i);var u=(0,q.zh)(i).startContainer,d=(0,y.a1)(u,"data-type","code-block-info");if(d)if(d.textContent.replace(c.g.ZWSP,"")===""&&i.hint.recentLanguage){d.textContent=c.g.ZWSP+i.hint.recentLanguage;var f=(0,q.zh)(i);f.selectNodeContents(d)}else{var E=[],L=d.textContent.substring(0,(0,q.im)(d,i.ir.element).start).replace(c.g.ZWSP,"");(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((s=(a=window.hljs)===null||a===void 0?void 0:a.listLanguages())!==null&&s!==void 0?s:[]).sort())).forEach(function(D){D.indexOf(L.toLowerCase())>-1&&E.push({html:D,value:D})}),i.hint.genHTML(E,L,i)}},Xn=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&js(i),clearTimeout(i.ir.processTimeoutId),i.ir.processTimeoutId=window.setTimeout(function(){if(!i.ir.composingLock){var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),a.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},fi=function(i,a){var s=(0,q.zh)(i),u=(0,y.F9)(s.startContainer)||s.startContainer;if(u){var d=u.querySelector(".vditor-ir__marker--heading");d?d.innerHTML=a:(u.insertAdjacentText("afterbegin",a),s.selectNodeContents(u),s.collapse(!1)),Nt(i,s.cloneRange()),qe(i)}},na=function(i,a,s){var u=(0,y.a1)(i.startContainer,"data-type",s);if(u){u.firstElementChild.remove(),u.lastElementChild.remove(),i.insertNode(document.createElement("wbr"));var d=document.createElement("div");d.innerHTML=a.lute.SpinVditorIRDOM(u.outerHTML),u.outerHTML=d.firstElementChild.innerHTML.trim()}},vu=function(i,a,s,u){var d=(0,q.zh)(i),f=a.getAttribute("data-type"),E=d.startContainer;E.nodeType===3&&(E=E.parentElement);var L=!0;if(a.classList.contains("vditor-menu--current"))if(f==="quote"){var D=(0,y.lG)(E,"BLOCKQUOTE");D&&(d.insertNode(document.createElement("wbr")),D.outerHTML=D.innerHTML.trim()===""?'<p data-block="0">'.concat(D.innerHTML,"</p>"):D.innerHTML)}else if(f==="link"){var _=(0,y.a1)(d.startContainer,"data-type","a");if(_){var B=(0,y.fb)(d.startContainer,"vditor-ir__link");B?(d.insertNode(document.createElement("wbr")),_.outerHTML=B.innerHTML):_.outerHTML=_.querySelector(".vditor-ir__link").innerHTML+"<wbr>"}}else f==="italic"?na(d,i,"em"):f==="bold"?na(d,i,"strong"):f==="strike"?na(d,i,"s"):f==="inline-code"?na(d,i,"code"):(f==="check"||f==="list"||f==="ordered-list")&&(Ji(i,d,f),L=!1,a.classList.remove("vditor-menu--current"));else{i.ir.element.childNodes.length===0&&(i.ir.element.innerHTML='<p data-block="0"><wbr></p>',(0,q.ib)(i.ir.element,d));var K=(0,y.F9)(d.startContainer);if(f==="line"){if(K){var fe=`<hr data-block="0"><p data-block="0"><wbr>
</p>`;K.innerHTML.trim()===""?K.outerHTML=fe:K.insertAdjacentHTML("afterend",fe)}}else if(f==="quote")K&&(d.insertNode(document.createElement("wbr")),K.outerHTML='<blockquote data-block="0">'.concat(K.outerHTML,"</blockquote>"),L=!1,a.classList.add("vditor-menu--current"));else if(f==="link"){var ve=void 0;d.toString()===""?ve="".concat(s,"<wbr>").concat(u):ve="".concat(s).concat(d.toString()).concat(u.replace(")","<wbr>)")),document.execCommand("insertHTML",!1,ve),L=!1,a.classList.add("vditor-menu--current")}else if(f==="italic"||f==="bold"||f==="strike"||f==="inline-code"||f==="code"||f==="table"){var ve=void 0;d.toString()===""?ve="".concat(s,"<wbr>").concat(u):(f==="code"?ve="".concat(s,`
`).concat(d.toString(),"<wbr>").concat(u):f==="table"?ve="".concat(s).concat(d.toString(),"<wbr>").concat(u):ve="".concat(s).concat(d.toString()).concat(u,"<wbr>"),d.deleteContents()),(f==="table"||f==="code")&&(ve=`
`+ve+`
`);var ue=document.createElement("span");ue.innerHTML=ve,d.insertNode(ue),Nt(i,d),f==="table"&&(d.selectNodeContents(getSelection().getRangeAt(0).startContainer.parentElement),(0,q.Hc)(d))}else(f==="check"||f==="list"||f==="ordered-list")&&(Ji(i,d,f,!1),L=!1,x(i.toolbar.elements,["check","list","ordered-list"]),a.classList.add("vditor-menu--current"))}(0,q.ib)(i.ir.element,d),Xn(i),L&&qe(i)},bu=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(K){E(K)}}function D(B){try{_(u.throw(B))}catch(K){E(K)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},yu=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},wu=function(){function i(a){var s=this;this.splitChar="",this.lastIndex=-1,this.fillEmoji=function(u,d){s.element.style.display="none";var f=decodeURIComponent(u.getAttribute("data-value")),E=window.getSelection().getRangeAt(0);if(d.currentMode==="ir"){var L=(0,y.a1)(E.startContainer,"data-type","code-block-info");if(L){L.textContent=c.g.ZWSP+f.trimRight(),E.selectNodeContents(L),E.collapse(!1),Xn(d),L.parentElement.querySelectorAll("code").forEach(function(K){K.className="language-"+f.trimRight()}),tt(L.parentElement.querySelector(".vditor-ir__preview"),d),s.recentLanguage=f.trimRight();return}}if(d.currentMode==="wysiwyg"&&E.startContainer.nodeType!==3){var D=E.startContainer,_=void 0;if(D.classList.contains("vditor-input")?_=D:_=D.firstElementChild,_&&_.classList.contains("vditor-input")){_.value=f.trimRight(),E.selectNodeContents(_),E.collapse(!1),_.dispatchEvent(new CustomEvent("input",{detail:1})),s.recentLanguage=f.trimRight();return}}if(E.setStart(E.startContainer,s.lastIndex),E.deleteContents(),d.options.hint.parse?d.currentMode==="sv"?(0,q.oC)(d.lute.SpinVditorSVDOM(f),d):d.currentMode==="wysiwyg"?(0,q.oC)(d.lute.SpinVditorDOM(f),d):(0,q.oC)(d.lute.SpinVditorIRDOM(f),d):(0,q.oC)(f,d),s.splitChar===":"&&f.indexOf(":")>-1&&d.currentMode!=="sv"&&E.insertNode(document.createTextNode(" ")),E.collapse(!1),(0,q.Hc)(E),d.currentMode==="wysiwyg"){var B=(0,y.fb)(E.startContainer,"vditor-wysiwyg__block");B&&B.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(B.lastElementChild.innerHTML=B.firstElementChild.innerHTML,tt(B.lastElementChild,d))}else if(d.currentMode==="ir"){var B=(0,y.fb)(E.startContainer,"vditor-ir__marker--pre");B&&B.nextElementSibling.classList.contains("vditor-ir__preview")&&(B.nextElementSibling.innerHTML=B.innerHTML,tt(B.nextElementSibling,d))}lt(d)},this.timeId=-1,this.element=document.createElement("div"),this.element.className="vditor-hint",this.recentLanguage="",a.push({key:":"})}return i.prototype.render=function(a){var s=this;if(window.getSelection().focusNode){var u,d=getSelection().getRangeAt(0);u=d.startContainer.textContent.substring(0,d.startOffset)||"";var f=this.getKey(u,a.options.hint.extend);if(typeof f>"u")this.element.style.display="none",clearTimeout(this.timeId);else if(this.splitChar===":"){var E=f===""?a.options.hint.emoji:a.lute.GetEmojis(),L=[];Object.keys(E).forEach(function(D){D.indexOf(f.toLowerCase())===0&&(E[D].indexOf(".")>-1?L.push({html:'<img src="'.concat(E[D],'" title=":').concat(D,':"/> :').concat(D,":"),value:":".concat(D,":")}):L.push({html:'<span class="vditor-hint__emoji">'.concat(E[D],"</span>").concat(D),value:E[D]}))}),this.genHTML(L,f,a)}else a.options.hint.extend.forEach(function(D){D.key===s.splitChar&&(clearTimeout(s.timeId),s.timeId=window.setTimeout(function(){return bu(s,void 0,void 0,function(){var _;return yu(this,function(B){switch(B.label){case 0:return _=this.genHTML,[4,D.hint(f)];case 1:return _.apply(this,[B.sent(),f,a]),[2]}})})},a.options.hint.delay))})}},i.prototype.genHTML=function(a,s,u){var d=this;if(a.length===0){this.element.style.display="none";return}var f=u[u.currentMode].element,E=(0,q.Ny)(f),L=E.left+(u.options.outline.position==="left"?u.outline.element.offsetWidth:0),D=E.top,_="";a.forEach(function(K,fe){if(!(fe>7)){var ve=K.html;if(s!==""){var ue=ve.lastIndexOf(">")+1,ke=ve.substr(ue),we=ke.toLowerCase().indexOf(s.toLowerCase());we>-1&&(ke=ke.substring(0,we)+"<b>"+ke.substring(we,we+s.length)+"</b>"+ke.substring(we+s.length),ve=ve.substr(0,ue)+ke)}_+='<button type="button" data-value="'.concat(encodeURIComponent(K.value),` "
`).concat(fe===0?"class='vditor-hint--current'":"","> ").concat(ve,"</button>")}}),this.element.innerHTML=_;var B=parseInt(document.defaultView.getComputedStyle(f,null).getPropertyValue("line-height"),10);this.element.style.top="".concat(D+(B||22),"px"),this.element.style.left="".concat(L,"px"),this.element.style.display="block",this.element.style.right="auto",this.element.querySelectorAll("button").forEach(function(K){K.addEventListener("click",function(fe){d.fillEmoji(K,u),fe.preventDefault()})}),this.element.getBoundingClientRect().bottom>window.innerHeight&&(this.element.style.top="".concat(D-this.element.offsetHeight,"px")),this.element.getBoundingClientRect().right>window.innerWidth&&(this.element.style.left="auto",this.element.style.right="0")},i.prototype.select=function(a,s){if(this.element.querySelectorAll("button").length===0||this.element.style.display==="none")return!1;var u=this.element.querySelector(".vditor-hint--current");if(a.key==="ArrowDown")return a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.nextElementSibling?u.nextElementSibling.className="vditor-hint--current":this.element.children[0].className="vditor-hint--current",!0;if(a.key==="ArrowUp"){if(a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.previousElementSibling)u.previousElementSibling.className="vditor-hint--current";else{var d=this.element.children.length;this.element.children[d-1].className="vditor-hint--current"}return!0}else if(!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"&&!a.isComposing)return a.preventDefault(),a.stopPropagation(),this.fillEmoji(u,s),!0;return!1},i.prototype.getKey=function(a,s){var u=this;this.lastIndex=-1,this.splitChar="",s.forEach(function(_){var B=a.lastIndexOf(_.key);u.lastIndex<B&&(u.splitChar=_.key,u.lastIndex=B)});var d;if(this.lastIndex===-1)return d;var f=a.split(this.splitChar),E=f[f.length-1],L=32;if(f.length>1&&E.trim()===E)if(f.length===2&&f[0]===""&&f[1].length<L)d=f[1];else{var D=f[f.length-2].slice(-1);(0,p.X)(D)===" "&&E.length<L&&(d=E)}return d},i}(),xu=function(){function i(a){this.composingLock=!1;var s=document.createElement("div");s.className="vditor-ir",s.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder,`"
contenteditable="true" spellcheck="false"></pre>`),this.element=s.firstElementChild,this.bindEvent(a),Ai(a,this.element),ho(a,this.element),Mi(a,this.element),xe(a,this.element),He(a,this.element),Ci(a,this.element),U(a,this.element,this.copy),Q(a,this.element,this.copy)}return i.prototype.copy=function(a,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){a.stopPropagation(),a.preventDefault();var d=document.createElement("div");d.appendChild(u.cloneContents()),a.clipboardData.setData("text/plain",s.lute.VditorIRDOM2Md(d.innerHTML).trim()),a.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("paste",function(u){ta(a,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){A(a,["hint"])}),this.element.addEventListener("compositionstart",function(u){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){(0,m.vU)()||Nt(a,getSelection().getRangeAt(0).cloneRange()),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")){if(s.preventInput){s.preventInput=!1,Xn(a,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}s.composingLock||u.data===""||u.data==="“"||u.data==="《"||Nt(a,getSelection().getRangeAt(0).cloneRange(),!1,u)}}),this.element.addEventListener("click",function(u){if(u.target.tagName==="INPUT"){u.target.checked?u.target.setAttribute("checked","checked"):u.target.removeAttribute("checked"),s.preventInput=!0,Xn(a);return}var d=(0,q.zh)(a),f=(0,y.fb)(u.target,"vditor-ir__preview");if(f||(f=(0,y.fb)(d.startContainer,"vditor-ir__preview")),f&&(f.previousElementSibling.firstElementChild?d.selectNodeContents(f.previousElementSibling.firstElementChild):d.selectNodeContents(f.previousElementSibling),d.collapse(!0),(0,q.Hc)(d),Z(a)),u.target.tagName==="IMG"){var E=u.target.parentElement.querySelector(".vditor-ir__marker--link");E&&(d.selectNode(E),(0,q.Hc)(d))}var L=(0,y.a1)(u.target,"data-type","a");if(L&&!L.classList.contains("vditor-ir__node--expand")){a.options.link.click?a.options.link.click(L.querySelector(":scope > .vditor-ir__marker--link")):a.options.link.isOpen&&window.open(L.querySelector(":scope > .vditor-ir__marker--link").textContent);return}if(u.target.isEqualNode(s.element)&&s.element.lastElementChild&&d.collapsed){var D=s.element.lastElementChild.getBoundingClientRect();u.y>D.top+D.height&&(s.element.lastElementChild.tagName==="P"&&s.element.lastElementChild.textContent.trim().replace(c.g.ZWSP,"")===""?(d.selectNodeContents(s.element.lastElementChild),d.collapse(!1)):(s.element.insertAdjacentHTML("beforeend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(s.element,d)))}d.toString()===""?ee(d,a):setTimeout(function(){ee((0,q.zh)(a),a)}),Rt(u,a),qe(a)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if(u.key==="Enter"&&Z(a),qe(a),(u.key==="Backspace"||u.key==="Delete")&&a.ir.element.innerHTML!==""&&a.ir.element.childNodes.length===1&&a.ir.element.firstElementChild&&a.ir.element.firstElementChild.tagName==="P"&&a.ir.element.firstElementChild.childElementCount===0&&(a.ir.element.textContent===""||a.ir.element.textContent===`
`)){a.ir.element.innerHTML="";return}var d=(0,q.zh)(a);u.key==="Backspace"?((0,m.vU)()&&d.startContainer.textContent===`
`&&d.startOffset===1&&(d.startContainer.textContent="",ee(d,a)),s.element.querySelectorAll(".language-math").forEach(function(E){var L=E.querySelector("br");L&&L.remove()})):u.key.indexOf("Arrow")>-1?((u.key==="ArrowLeft"||u.key==="ArrowRight")&&js(a),ee(d,a)):u.keyCode===229&&u.code===""&&u.key==="Unidentified"&&ee(d,a);var f=(0,y.fb)(d.startContainer,"vditor-ir__preview");if(f){if(u.key==="ArrowUp"||u.key==="ArrowLeft")return f.previousElementSibling.firstElementChild?d.selectNodeContents(f.previousElementSibling.firstElementChild):d.selectNodeContents(f.previousElementSibling),d.collapse(!1),u.preventDefault(),!0;if(f.tagName==="SPAN"&&(u.key==="ArrowDown"||u.key==="ArrowRight"))return f.parentElement.getAttribute("data-type")==="html-entity"?(f.parentElement.insertAdjacentText("afterend",c.g.ZWSP),d.setStart(f.parentElement.nextSibling,1)):d.selectNodeContents(f.parentElement.lastElementChild),d.collapse(!1),u.preventDefault(),!0}}})},i}(),$s=function(i){if(i.currentMode==="sv")return i.lute.Md2HTML(v(i));if(i.currentMode==="wysiwyg")return i.lute.VditorDOM2HTML(i.wysiwyg.element.innerHTML);if(i.currentMode==="ir")return i.lute.VditorIRDOM2HTML(i.ir.element.innerHTML)},ku=o(214),Us=o(436),Su=function(){function i(a){this.element=document.createElement("div"),this.element.className="vditor-outline",this.element.innerHTML='<div class="vditor-outline__title">'.concat(a,`</div>
<div class="vditor-outline__content"></div>`)}return i.prototype.render=function(a){var s="";return a.preview.element.style.display==="block"?s=(0,Us.k)(a.preview.previewElement,this.element.lastElementChild,a):s=(0,Us.k)(a[a.currentMode].element,this.element.lastElementChild,a),s},i.prototype.toggle=function(a,s,u){var d;s===void 0&&(s=!0),u===void 0&&(u=!0);var f=(d=a.toolbar.elements.outline)===null||d===void 0?void 0:d.firstElementChild;if(s&&window.innerWidth>=c.g.MOBILE_WIDTH?(this.element.style.display="block",this.render(a),f==null||f.classList.add("vditor-menu--current")):(this.element.style.display="none",f==null||f.classList.remove("vditor-menu--current")),u&&getSelection().rangeCount>0){var E=getSelection().getRangeAt(0);a[a.currentMode].element.contains(E.startContainer)&&(0,q.Hc)(E)}ze(a)},i}(),Eu=o(280),Tu=function(){function i(a){var s=this;this.element=document.createElement("div"),this.element.className="vditor-preview",this.previewElement=document.createElement("div"),this.previewElement.className="vditor-reset",a.options.classes.preview&&this.previewElement.classList.add(a.options.classes.preview),this.previewElement.style.maxWidth=a.options.preview.maxWidth+"px",this.previewElement.addEventListener("copy",function(D){if(D.target.tagName!=="TEXTAREA"){var _=document.createElement("div");_.className="vditor-reset",_.appendChild(getSelection().getRangeAt(0).cloneContents()),s.copyToX(a,_,"default"),D.preventDefault()}}),this.previewElement.addEventListener("click",function(D){var _=(0,y.lG)(D.target,"SPAN");if(_&&(0,y.fb)(_,"vditor-toc")){var B=s.previewElement.querySelector("#"+_.getAttribute("data-target-id"));B&&(s.element.scrollTop=B.offsetTop);return}if(D.target.tagName==="A"){a.options.link.click?a.options.link.click(D.target):a.options.link.isOpen&&window.open(D.target.getAttribute("href")),D.preventDefault();return}D.target.tagName==="IMG"&&(a.options.image.preview?a.options.image.preview(D.target):a.options.image.isPreview&&(0,se.E)(D.target,a.options.lang,a.options.theme))}),this.element.appendChild(this.previewElement);var u=a.options.preview.actions;if(u.length!==0){var d=document.createElement("div");d.className="vditor-preview__action";for(var f=[],E=0;E<u.length;E++){var L=u[E];if(typeof L=="object"){f.push('<button type="button" data-type="'.concat(L.key,'" class="').concat(L.className,'"').concat(L.tooltip?' aria-label="'.concat(L.tooltip,'"'):"",'">').concat(L.text,"</button>"));continue}switch(L){case"desktop":f.push('<button type="button" class="vditor-preview__action--current" data-type="desktop">Desktop</button>');break;case"tablet":f.push('<button type="button" data-type="tablet">Tablet</button>');break;case"mobile":f.push('<button type="button" data-type="mobile">Mobile/Wechat</button>');break;case"mp-wechat":f.push('<button type="button" data-type="mp-wechat" class="vditor-tooltipped vditor-tooltipped__w" aria-label="复制到公众号"><svg><use xlink:href="#vditor-icon-mp-wechat"></use></svg></button>');break;case"zhihu":f.push('<button type="button" data-type="zhihu" class="vditor-tooltipped vditor-tooltipped__w" aria-label="复制到知乎"><svg><use xlink:href="#vditor-icon-zhihu"></use></svg></button>');break}}d.innerHTML=f.join(""),d.addEventListener((0,m.Le)(),function(D){var _=(0,N.S)(D.target,"BUTTON");if(_){var B=_.getAttribute("data-type"),K=u.find(function(fe){return(fe==null?void 0:fe.key)===B});if(K){K.click(B);return}if(B==="mp-wechat"||B==="zhihu"){s.copyToX(a,s.previewElement.cloneNode(!0),B);return}B==="desktop"?s.previewElement.style.width="auto":B==="tablet"?s.previewElement.style.width="780px":s.previewElement.style.width="360px",s.previewElement.scrollWidth>s.previewElement.parentElement.clientWidth&&(s.previewElement.style.width="auto"),s.render(a),d.querySelectorAll("button").forEach(function(fe){fe.classList.remove("vditor-preview__action--current")}),_.classList.add("vditor-preview__action--current")}}),this.element.insertBefore(d,this.previewElement)}}return i.prototype.render=function(a,s){var u=this;if(clearTimeout(this.mdTimeoutId),this.element.style.display==="none"){this.element.getAttribute("data-type")==="renderPerformance"&&a.tip.hide();return}if(s){this.previewElement.innerHTML=s;return}if(v(a).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")===""){this.previewElement.innerHTML="";return}var d=new Date().getTime(),f=v(a);this.mdTimeoutId=window.setTimeout(function(){if(a.options.preview.url){var E=new XMLHttpRequest;E.open("POST",a.options.preview.url),E.setRequestHeader("Content-Type","application/json;charset=UTF-8"),E.onreadystatechange=function(){if(E.readyState===XMLHttpRequest.DONE)if(E.status===200){var D=JSON.parse(E.responseText);if(D.code!==0){a.tip.show(D.msg);return}a.options.preview.transform&&(D.data=a.options.preview.transform(D.data)),u.previewElement.innerHTML=D.data,u.afterRender(a,d)}else{var _=a.lute.Md2HTML(f);a.options.preview.transform&&(_=a.options.preview.transform(_)),u.previewElement.innerHTML=_,u.afterRender(a,d)}},E.send(JSON.stringify({markdownText:f}))}else{var L=a.lute.Md2HTML(f);a.options.preview.transform&&(L=a.options.preview.transform(L)),u.previewElement.innerHTML=L,u.afterRender(a,d)}},a.options.preview.delay)},i.prototype.afterRender=function(a,s){a.options.preview.parse&&a.options.preview.parse(this.element);var u=new Date().getTime()-s;new Date().getTime()-s>2600?(a.tip.show(window.VditorI18n.performanceTip.replace("${x}",u.toString())),a.preview.element.setAttribute("data-type","renderPerformance")):a.preview.element.getAttribute("data-type")==="renderPerformance"&&(a.tip.hide(),a.preview.element.removeAttribute("data-type"));var d=a.preview.element.querySelector(".vditor-comment--focus");d&&d.classList.remove("vditor-comment--focus"),(0,Y.O)(a.preview.previewElement,a.options.preview.hljs),(0,Me.s)(a.options.preview.hljs,a.preview.previewElement,a.options.cdn),(0,We.i)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,rt.K)(a.preview.previewElement,a.options.cdn),(0,nt.J)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,te.P)(a.preview.previewElement,a.options.cdn),(0,ce.v)(a.preview.previewElement,a.options.cdn),(0,P.p)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,je.P)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,Ne.B)(a.preview.previewElement,a.options.cdn),(0,F.Q)(a.preview.previewElement,a.options.cdn),a.options.preview.render.media.enable&&(0,Eu.Y)(a.preview.previewElement),a.options.customRenders.forEach(function(L){L.render(a.preview.previewElement,a)});var f=a.preview.element,E=a.outline.render(a);E===""&&(E="[ToC]"),f.querySelectorAll('[data-type="toc-block"]').forEach(function(L){L.innerHTML=E,(0,Fe.H)(L,{cdn:a.options.cdn,math:a.options.preview.math})}),(0,Fe.H)(a.preview.previewElement,{cdn:a.options.cdn,math:a.options.preview.math})},i.prototype.copyToX=function(a,s,u){u===void 0&&(u="mp-wechat"),u!=="zhihu"?s.querySelectorAll(".katex-html .base").forEach(function(f){f.style.display="initial"}):s.querySelectorAll(".language-math").forEach(function(f){f.outerHTML='<img class="Formula-image" data-eeimg="true" src="//www.zhihu.com/equation?tex=" alt="'.concat(f.getAttribute("data-math"),'\\" style="display: block; margin: 0 auto; max-width: 100%;">')}),s.style.backgroundColor="#fff",s.querySelectorAll("code").forEach(function(f){f.style.backgroundImage="none"}),this.element.append(s);var d=s.ownerDocument.createRange();d.selectNode(s),(0,q.Hc)(d),document.execCommand("copy"),s.remove(),a.tip.show(["zhihu","mp-wechat"].includes(u)?"已复制,可到".concat(u==="zhihu"?"知乎":"微信公众号平台","进行粘贴"):"已复制到剪切板")},i}(),Au=function(){function i(a){this.element=document.createElement("div"),this.element.className="vditor-resize vditor-resize--".concat(a.options.resize.position),this.element.innerHTML='<div><svg><use xlink:href="#vditor-icon-resize"></use></svg></div>',this.bindEvent(a)}return i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("mousedown",function(u){var d=document,f=u.clientY,E=a.element.offsetHeight,L=63+a.element.querySelector(".vditor-toolbar").clientHeight;d.ondragstart=function(){return!1},window.captureEvents&&window.captureEvents(),s.element.classList.add("vditor-resize--selected"),d.onmousemove=function(D){a.options.resize.position==="top"?a.element.style.height=Math.max(L,E+(f-D.clientY))+"px":a.element.style.height=Math.max(L,E+(D.clientY-f))+"px",a.options.typewriterMode&&(a.sv.element.style.paddingBottom=a.sv.element.parentElement.offsetHeight/2+"px")},d.onmouseup=function(){a.options.resize.after&&a.options.resize.after(a.element.offsetHeight-E),window.captureEvents&&window.captureEvents(),d.onmousemove=null,d.onmouseup=null,d.ondragstart=null,d.onselectstart=null,d.onselect=null,s.element.classList.remove("vditor-resize--selected")}})},i}(),Mu=function(){function i(a){this.composingLock=!1,this.element=document.createElement("pre"),this.element.className="vditor-sv vditor-reset",this.element.setAttribute("placeholder",a.options.placeholder),this.element.setAttribute("contenteditable","true"),this.element.setAttribute("spellcheck","false"),this.bindEvent(a),Ai(a,this.element),Mi(a,this.element),xe(a,this.element),He(a,this.element),Ci(a,this.element),U(a,this.element,this.copy),Q(a,this.element,this.copy)}return i.prototype.copy=function(a,s){a.stopPropagation(),a.preventDefault(),a.clipboardData.setData("text/plain",Or(s[s.currentMode].element))},i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("paste",function(u){ta(a,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){if(a.preview.element.style.display==="block"){var u=s.element.scrollTop,d=s.element.clientHeight,f=s.element.scrollHeight-parseFloat(s.element.style.paddingBottom||"0"),E=a.preview.element;u/d>.5?E.scrollTop=(u+d)*E.scrollHeight/f-d:E.scrollTop=u*E.scrollHeight/f}}),this.element.addEventListener("compositionstart",function(u){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){(0,m.vU)()||X(a,u),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")&&!(s.composingLock||u.data===""||u.data==="“"||u.data==="《")){if(s.preventInput){s.preventInput=!1,Ge(a,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}X(a,u)}}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if((u.key==="Backspace"||u.key==="Delete")&&a.sv.element.innerHTML!==""&&a.sv.element.childNodes.length===1&&a.sv.element.firstElementChild&&a.sv.element.firstElementChild.tagName==="DIV"&&a.sv.element.firstElementChild.childElementCount===2&&(a.sv.element.firstElementChild.textContent===""||a.sv.element.textContent===`
`)){a.sv.element.innerHTML="";return}u.key==="Enter"&&Z(a)}})},i}(),Vs=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-tip"}return i.prototype.show=function(a,s){var u=this;s===void 0&&(s=6e3),this.element.className="vditor-tip vditor-tip--show",s===0?(this.element.innerHTML='<div class="vditor-tip__content">'.concat(a,`
<div class="vditor-tip__close">X</div></div>`),this.element.querySelector(".vditor-tip__close").addEventListener("click",function(){u.hide()})):(this.element.innerHTML='<div class="vditor-tip__content">'.concat(a,"</div>"),setTimeout(function(){u.hide()},s)),this.element.removeAttribute("style"),setTimeout(function(){var d=u.element.getBoundingClientRect();d.top<46&&(u.element.style.position="fixed",u.element.style.top="46px")},150)},i.prototype.hide=function(){this.element.className="vditor-messageElementtip",this.element.innerHTML=""},i}(),bo=function(i,a){if(a.options.preview.mode!==i){switch(a.options.preview.mode=i,i){case"both":a.sv.element.style.display="block",a.preview.element.style.display="block",a.preview.render(a),w(a.toolbar.elements,["both"]);break;case"editor":a.sv.element.style.display="block",a.preview.element.style.display="none",x(a.toolbar.elements,["both"]);break}a.devtools&&a.devtools.renderEchart(a)}},Cu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Lu=function(i){Cu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return s.options.preview.mode==="both"&&d.element.children[0].classList.add("vditor-menu--current"),d.element.children[0].addEventListener((0,m.Le)(),function(f){var E=d.element.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(f.preventDefault(),s.currentMode==="sv"&&(s.options.preview.mode==="both"?bo("editor",s):bo("both",s)))}),d}return a}(Mt),_u=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__br"}return i}(),Ws=o(580),Nu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Du=function(i){Nu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow");var L="";return c.g.CODE_THEME.forEach(function(D){L+="<button>".concat(D,"</button>")}),E.innerHTML='<div style="overflow: auto;max-height:'.concat(window.innerHeight/2,'px">').concat(L,"</div>"),E.addEventListener((0,m.Le)(),function(D){D.target.tagName==="BUTTON"&&(A(s,["subToolbar"]),s.options.preview.hljs.style=D.target.textContent,(0,Ws.Y)(D.target.textContent,s.options.cdn),D.preventDefault(),D.stopPropagation())}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ru=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Iu=function(i){Ru(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow");var L="";return Object.keys(s.options.preview.theme.list).forEach(function(D){L+='<button data-type="'.concat(D,'">').concat(s.options.preview.theme.list[D],"</button>")}),E.innerHTML='<div style="overflow: auto;max-height:'.concat(window.innerHeight/2,'px">').concat(L,"</div>"),E.addEventListener((0,m.Le)(),function(D){D.target.tagName==="BUTTON"&&(A(s,["subToolbar"]),s.options.preview.theme.current=D.target.getAttribute("data-type"),(0,le.Z)(s.options.preview.theme.current,s.options.preview.theme.path),D.preventDefault(),D.stopPropagation())}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ou=function(){function i(a){this.element=document.createElement("span"),this.element.className="vditor-counter vditor-tooltipped vditor-tooltipped__nw",this.render(a,"")}return i.prototype.render=function(a,s){var u=s.endsWith(`
`)?s.length-1:s.length;if(a.options.counter.type==="text"&&a[a.currentMode]){var d=a[a.currentMode].element.cloneNode(!0);d.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(f){f.remove()}),u=d.textContent.length}typeof a.options.counter.max=="number"?(u>a.options.counter.max?this.element.className="vditor-counter vditor-counter--error":this.element.className="vditor-counter",this.element.innerHTML="".concat(u,"/").concat(a.options.counter.max)):this.element.innerHTML="".concat(u),this.element.setAttribute("aria-label",a.options.counter.type),a.options.counter.after&&a.options.counter.after(u,{enable:a.options.counter.enable,max:a.options.counter.max,type:a.options.counter.type})},i}(),Hu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Pu=function(i){Hu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].innerHTML=u.icon,d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!f.currentTarget.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.click(f,s)}),d}return a}(Mt),zu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Bu=function(i){zu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.firstElementChild.addEventListener((0,m.Le)(),function(f){var E=d.element.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(f.preventDefault(),E.classList.contains("vditor-menu--current")?(E.classList.remove("vditor-menu--current"),s.devtools.element.style.display="none",ze(s)):(E.classList.add("vditor-menu--current"),s.devtools.element.style.display="block",ze(s),s.devtools.renderEchart(s)))}),d}return a}(Mt),Fu=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__divider"}return i}(),qu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ju=function(i){qu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");f.className="vditor-panel vditor-panel--arrow";var E="";return Object.keys(s.options.hint.emoji).forEach(function(L){var D=s.options.hint.emoji[L];D.indexOf(".")>-1?E+='<button data-value=":'.concat(L,': " data-key=":').concat(L,`:"><img
data-value=":`).concat(L,': " data-key=":').concat(L,':" class="vditor-emojis__icon" src="').concat(D,'"/></button>'):E+='<button data-value="'.concat(D,` "
data-key="`).concat(L,'"><span class="vditor-emojis__icon">').concat(D,"</span></button>")}),f.innerHTML='<div class="vditor-emojis" style="max-height: '.concat(s.options.height==="auto"?"auto":s.options.height-80,'px">').concat(E,`</div><div class="vditor-emojis__tail">
<span class="vditor-emojis__tip"></span><span>`).concat(s.options.hint.emojiTail||"",`</span>
</div>`),d.element.appendChild(f),M(s,f,d.element.firstElementChild,u.level),d.bindEvent(s),d}return a.prototype.bindEvent=function(s){var u=this;this.element.lastElementChild.addEventListener((0,m.Le)(),function(d){var f=(0,N.S)(d.target,"BUTTON");if(f){d.preventDefault();var E=f.getAttribute("data-value"),L=(0,q.zh)(s),D=E;if(s.currentMode==="wysiwyg"?D=s.lute.SpinVditorDOM(E):s.currentMode==="ir"&&(D=s.lute.SpinVditorIRDOM(E)),E.indexOf(":")>-1&&s.currentMode!=="sv"){var _=document.createElement("div");_.innerHTML=D,D=_.firstElementChild.firstElementChild.outerHTML+" ",(0,q.oC)(D,s)}else L.extractContents(),L.insertNode(document.createTextNode(E)),(0,y.F9)(L.startContainer)||Pn(s,L);L.collapse(!1),(0,q.Hc)(L),u.element.lastElementChild.style.display="none",lt(s)}}),this.element.lastElementChild.addEventListener("mouseover",function(d){var f=(0,N.S)(d.target,"BUTTON");f&&(u.element.querySelector(".vditor-emojis__tip").innerHTML=f.getAttribute("data-key"))})},a}(Mt),Gs=function(i,a,s){var u=document.createElement("a");"download"in u?(u.download=s,u.style.display="none",u.href=URL.createObjectURL(new Blob([a])),document.body.appendChild(u),u.click(),u.remove()):i.tip.show(window.VditorI18n.downloadTip,0)},$u=function(i){var a=v(i);Gs(i,a,a.substr(0,10)+".md")},Uu=function(i){i.tip.show(window.VditorI18n.generate,3800);var a=document.querySelector("#vditorExportIframe");a.contentDocument.open(),a.contentDocument.write('<link rel="stylesheet" href="'.concat(i.options.cdn,`/dist/index.css"/>
<script src="`).concat(i.options.cdn,`/dist/method.min.js"><\/script>
<div id="preview" style="width: 800px"></div>
<script>
window.addEventListener("message", (e) => {
if(!e.data) {
return;
}
Vditor.preview(document.getElementById('preview'), e.data, {
cdn: "`).concat(i.options.cdn,`",
markdown: {
theme: `).concat(JSON.stringify(i.options.preview.theme),`
},
hljs: {
style: "`).concat(i.options.preview.hljs.style,`"
}
});
setTimeout(() => {
window.print();
}, 3600);
}, false);
<\/script>`)),a.contentDocument.close(),setTimeout(function(){a.contentWindow.postMessage(v(i),"*")},200)},Vu=function(i){var a=$s(i),s='<html><head><link rel="stylesheet" type="text/css" href="'.concat(i.options.cdn,`/dist/index.css"/>
<script src="`).concat(i.options.cdn,"/dist/js/i18n/").concat(i.options.lang,`.js"><\/script>
<script src="`).concat(i.options.cdn,`/dist/method.min.js"><\/script></head>
<body><div class="vditor-reset" id="preview">`).concat(a,`</div>
<script>
const previewElement = document.getElementById('preview')
Vditor.setContentTheme('`).concat(i.options.preview.theme.current,"', '").concat(i.options.preview.theme.path,`');
Vditor.codeRender(previewElement);
Vditor.highlightRender(`).concat(JSON.stringify(i.options.preview.hljs),", previewElement, '").concat(i.options.cdn,`');
Vditor.mathRender(previewElement, {
cdn: '`).concat(i.options.cdn,`',
math: `).concat(JSON.stringify(i.options.preview.math),`,
});
Vditor.mermaidRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
Vditor.SMILESRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
Vditor.markmapRender(previewElement, '`).concat(i.options.cdn,`');
Vditor.flowchartRender(previewElement, '`).concat(i.options.cdn,`');
Vditor.graphvizRender(previewElement, '`).concat(i.options.cdn,`');
Vditor.chartRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
Vditor.mindmapRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
Vditor.abcRender(previewElement, '`).concat(i.options.cdn,`');
`).concat(i.options.preview.render.media.enable?"Vditor.mediaRender(previewElement);":"",`
Vditor.speechRender(previewElement);
<\/script>
<script src="`).concat(i.options.cdn,"/dist/js/icons/").concat(i.options.icon,'.js"><\/script></body></html>');Gs(i,s,a.substr(0,10)+".html")},Wu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Gu=function(i){Wu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");return E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow"),E.innerHTML=`<button data-type="markdown">Markdown</button>
<button data-type="pdf">PDF</button>
<button data-type="html">HTML</button>`,E.addEventListener((0,m.Le)(),function(L){var D=L.target;if(D.tagName==="BUTTON"){switch(D.getAttribute("data-type")){case"markdown":$u(s);break;case"pdf":Uu(s);break;case"html":Vu(s);break}A(s,["subToolbar"]),L.preventDefault(),L.stopPropagation()}}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ku=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Xu=function(i){Ku(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s,u),d}return a.prototype._bindEvent=function(s,u){this.element.children[0].addEventListener((0,m.Le)(),function(d){d.preventDefault(),s.element.className.includes("vditor--fullscreen")?(u.level||(this.innerHTML=u.icon),s.element.style.zIndex="",document.body.style.overflow="",s.element.classList.remove("vditor--fullscreen"),Object.keys(s.toolbar.elements).forEach(function(f){var E=s.toolbar.elements[f].firstChild;E&&(E.className=E.className.replace("__s","__n"),s.options.toolbar.forEach(function(L){typeof L!="string"&&L.tipPosition&&L.name===E.dataset.type&&(E.className="vditor-tooltipped vditor-tooltipped__".concat(L.tipPosition))}))}),s.counter&&(s.counter.element.className=s.counter.element.className.replace("__s","__n"))):(u.level||(this.innerHTML='<svg><use xlink:href="#vditor-icon-contract"></use></svg>'),s.element.style.zIndex=s.options.fullscreen.index.toString(),document.body.style.overflow="hidden",s.element.classList.add("vditor--fullscreen"),Object.keys(s.toolbar.elements).forEach(function(f){var E=s.toolbar.elements[f].firstChild;E&&(E.className=E.className.replace("__n","__s"))}),s.counter&&(s.counter.element.className=s.counter.element.className.replace("__n","__s"))),s.devtools&&s.devtools.renderEchart(s),u.click&&u.click(d,s),ze(s),Xe(s)})},a}(Mt),Zu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Yu=function(i){Zu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");return f.className="vditor-hint vditor-panel--arrow",f.innerHTML='<button data-tag="h1" data-value="# ">'.concat(window.VditorI18n.heading1," ").concat((0,m.ns)("&lt;⌥⌘1>"),`</button>
<button data-tag="h2" data-value="## ">`).concat(window.VditorI18n.heading2," &lt;").concat((0,m.ns)("⌥⌘2"),`></button>
<button data-tag="h3" data-value="### ">`).concat(window.VditorI18n.heading3," &lt;").concat((0,m.ns)("⌥⌘3"),`></button>
<button data-tag="h4" data-value="#### ">`).concat(window.VditorI18n.heading4," &lt;").concat((0,m.ns)("⌥⌘4"),`></button>
<button data-tag="h5" data-value="##### ">`).concat(window.VditorI18n.heading5," &lt;").concat((0,m.ns)("⌥⌘5"),`></button>
<button data-tag="h6" data-value="###### ">`).concat(window.VditorI18n.heading6," &lt;").concat((0,m.ns)("⌥⌘6"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f),d}return a.prototype._bindEvent=function(s,u){var d=this.element.children[0];d.addEventListener((0,m.Le)(),function(E){E.preventDefault(),clearTimeout(s.wysiwyg.afterRenderTimeoutId),clearTimeout(s.ir.processTimeoutId),clearTimeout(s.sv.processTimeoutId),!d.classList.contains(c.g.CLASS_MENU_DISABLED)&&(d.blur(),d.classList.contains("vditor-menu--current")?(s.currentMode==="wysiwyg"?(lr(s),Re(s)):s.currentMode==="ir"&&fi(s,""),d.classList.remove("vditor-menu--current")):(A(s,["subToolbar"]),u.style.display="block"))});for(var f=0;f<6;f++)u.children.item(f).addEventListener((0,m.Le)(),function(E){E.preventDefault(),s.currentMode==="wysiwyg"?(kn(s,E.target.getAttribute("data-tag")),Re(s),d.classList.add("vditor-menu--current")):s.currentMode==="ir"?(fi(s,E.target.getAttribute("data-value")),d.classList.add("vditor-menu--current")):Ct(s,E.target.getAttribute("data-value")),u.style.display="none"})},a}(Mt),Ju=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Qu=function(i){Ju(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),s.tip.show(`<div style="margin-bottom:14px;font-size: 14px;line-height: 22px;min-width:300px;max-width: 360px;display: flex;">
<div style="margin-top: 14px;flex: 1">
<div>Markdown 使用指南</div>
<ul style="list-style: none">
<li><a href="https://ld246.com/article/1583308420519" target="_blank">语法速查手册</a></li>
<li><a href="https://ld246.com/article/1583129520165" target="_blank">基础语法</a></li>
<li><a href="https://ld246.com/article/1583305480675" target="_blank">扩展语法</a></li>
<li><a href="https://ld246.com/article/1582778815353" target="_blank">键盘快捷键</a></li>
</ul>
</div>
<div style="margin-top: 14px;flex: 1">
<div>Vditor 支持</div>
<ul style="list-style: none">
<li><a href="https://github.com/Vanessa219/vditor/issues" target="_blank">Issues</a></li>
<li><a href="https://ld246.com/tag/vditor" target="_blank">官方讨论区</a></li>
<li><a href="https://ld246.com/article/1549638745630" target="_blank">开发手册</a></li>
<li><a href="https://ld246.com/guide/markdown" target="_blank">演示地址</a></li>
</ul>
</div></div>`,0)}),d}return a}(Mt),ed=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),td=function(i){ed(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")){var E=(0,q.zh)(s),L=(0,y.lG)(E.startContainer,"LI");L&&Ms(s,L,E)}}),d}return a}(Mt),nd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),rd=function(i){nd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),s.tip.show(`<div style="max-width: 520px; font-size: 14px;line-height: 22px;margin-bottom: 14px;">
<p style="text-align: center;margin: 14px 0">
<em>下一代的 Markdown 编辑器,为未来而构建</em>
</p>
<div style="display: flex;margin-bottom: 14px;flex-wrap: wrap;align-items: center">
<img src="https://unpkg.com/vditor/dist/images/logo.png" style="margin: 0 auto;height: 68px"/>
<div>&nbsp;&nbsp;</div>
<div style="flex: 1;min-width: 250px">
Vditor 是一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora和分屏预览模式。
它使用 TypeScript 实现,支持原生 JavaScript 以及 Vue、React、Angular 和 Svelte 等框架。
</div>
</div>
<div style="display: flex;flex-wrap: wrap;">
<ul style="list-style: none;flex: 1;min-width:148px">
<li>
项目地址:<a href="https://b3log.org/vditor" target="_blank">b3log.org/vditor</a>
</li>
<li>
开源协议MIT
</li>
</ul>
<ul style="list-style: none;margin-right: 18px">
<li>
组件版本Vditor v`.concat(c.H," / Lute v").concat(Lute.Version,`
</li>
<li>
赞助捐赠:<a href="https://ld246.com/sponsor" target="_blank">https://ld246.com/sponsor</a>
</li>
</ul>
</div>
</div>`),0)}),d}return a}(Mt),id=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ad=function(i){id(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")&&hi(s,"afterend")}),d}return a}(Mt),od=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),sd=function(i){od(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")&&hi(s,"beforebegin")}),d}return a}(Mt),ld=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),cd=function(i){ld(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")){var E=(0,q.zh)(s),L=(0,y.lG)(E.startContainer,"LI");L&&po(s,L,E,L.parentElement)}}),d}return a}(Mt),ud=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),dd=function(i){ud(a,i);function a(s,u){var d=i.call(this,s,u)||this;return s.options.outline&&d.element.firstElementChild.classList.add("vditor-menu--current"),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault();var E=s.toolbar.elements.outline.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(s.options.outline.enable=!d.element.firstElementChild.classList.contains("vditor-menu--current"),s.outline.toggle(s,s.options.outline.enable))}),d}return a}(Mt),hd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),pd=function(i){hd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this;this.element.children[0].addEventListener((0,m.Le)(),function(d){d.preventDefault();var f=u.element.firstElementChild;if(!f.classList.contains(c.g.CLASS_MENU_DISABLED)){var E=c.g.EDIT_TOOLBARS.concat(["both","edit-mode","devtools"]);f.classList.contains("vditor-menu--current")?(f.classList.remove("vditor-menu--current"),s.currentMode==="sv"?(s.sv.element.style.display="block",s.options.preview.mode==="both"?s.preview.element.style.display="block":s.preview.element.style.display="none"):(s[s.currentMode].element.parentElement.style.display="block",s.preview.element.style.display="none"),S(s.toolbar.elements,E),s.outline.render(s)):(k(s.toolbar.elements,E),s.preview.element.style.display="block",s.currentMode==="sv"?s.sv.element.style.display="none":s[s.currentMode].element.parentElement.style.display="none",s.preview.render(s),f.classList.add("vditor-menu--current"),A(s,["subToolbar","hint","popover"]),setTimeout(function(){s.outline.render(s)},s.options.preview.delay+10)),ze(s)}})},a}(Mt),fd=function(){function i(a){this.SAMPLE_RATE=5e3,this.isRecording=!1,this.readyFlag=!1,this.leftChannel=[],this.rightChannel=[],this.recordingLength=0;var s;if(typeof AudioContext<"u")s=new AudioContext;else if(webkitAudioContext)s=new webkitAudioContext;else return;this.DEFAULT_SAMPLE_RATE=s.sampleRate;var u=s.createGain(),d=s.createMediaStreamSource(a);d.connect(u),this.recorder=s.createScriptProcessor(2048,2,1),this.recorder.onaudioprocess=null,u.connect(this.recorder),this.recorder.connect(s.destination),this.readyFlag=!0}return i.prototype.cloneChannelData=function(a,s){this.leftChannel.push(new Float32Array(a)),this.rightChannel.push(new Float32Array(s)),this.recordingLength+=2048},i.prototype.startRecordingNewWavFile=function(){this.readyFlag&&(this.isRecording=!0,this.leftChannel.length=this.rightChannel.length=0,this.recordingLength=0)},i.prototype.stopRecording=function(){this.isRecording=!1},i.prototype.buildWavFileBlob=function(){for(var a=this.mergeBuffers(this.leftChannel),s=this.mergeBuffers(this.rightChannel),u=new Float32Array(a.length),d=0;d<a.length;++d)u[d]=.5*(a[d]+s[d]);this.DEFAULT_SAMPLE_RATE>this.SAMPLE_RATE&&(u=this.downSampleBuffer(u,this.SAMPLE_RATE));var f=44+u.length*2,E=new ArrayBuffer(f),L=new DataView(E);this.writeUTFBytes(L,0,"RIFF"),L.setUint32(4,f,!0),this.writeUTFBytes(L,8,"WAVE"),this.writeUTFBytes(L,12,"fmt "),L.setUint32(16,16,!0),L.setUint16(20,1,!0),L.setUint16(22,1,!0),L.setUint32(24,this.SAMPLE_RATE,!0),L.setUint32(28,this.SAMPLE_RATE*2,!0),L.setUint16(32,2,!0),L.setUint16(34,16,!0);var D=u.length*2;this.writeUTFBytes(L,36,"data"),L.setUint32(40,D,!0);for(var _=u.length,B=44,K=1,fe=0;fe<_;fe++)L.setInt16(B,u[fe]*(32767*K),!0),B+=2;return new Blob([L],{type:"audio/wav"})},i.prototype.downSampleBuffer=function(a,s){if(s===this.DEFAULT_SAMPLE_RATE||s>this.DEFAULT_SAMPLE_RATE)return a;for(var u=this.DEFAULT_SAMPLE_RATE/s,d=Math.round(a.length/u),f=new Float32Array(d),E=0,L=0;E<f.length;){for(var D=Math.round((E+1)*u),_=0,B=0,K=L;K<D&&K<a.length;K++)_+=a[K],B++;f[E]=_/B,E++,L=D}return f},i.prototype.mergeBuffers=function(a){for(var s=new Float32Array(this.recordingLength),u=0,d=a.length,f=0;f<d;++f){var E=a[f];s.set(E,u),u+=E.length}return s},i.prototype.writeUTFBytes=function(a,s,u){for(var d=u.length,f=0;f<d;f++)a.setUint8(s+f,u.charCodeAt(f))},i}(),md=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),gd=function(i){md(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this,d;this.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){var E=s[s.currentMode].element;if(!d){navigator.mediaDevices.getUserMedia({audio:!0}).then(function(D){d=new fd(D),d.recorder.onaudioprocess=function(_){if(d.isRecording){var B=_.inputBuffer.getChannelData(0),K=_.inputBuffer.getChannelData(1);d.cloneChannelData(B,K)}},d.startRecordingNewWavFile(),s.tip.show(window.VditorI18n.recording),E.setAttribute("contenteditable","false"),u.element.children[0].classList.add("vditor-menu--current")}).catch(function(){s.tip.show(window.VditorI18n["record-tip"])});return}if(d.isRecording){d.stopRecording(),s.tip.hide();var L=new File([d.buildWavFileBlob()],"record".concat(new Date().getTime(),".wav"),{type:"video/webm"});_i(s,[L]),u.element.children[0].classList.remove("vditor-menu--current")}else s.tip.show(window.VditorI18n.recording),E.setAttribute("contenteditable","false"),d.startRecordingNewWavFile(),u.element.children[0].classList.add("vditor-menu--current")}})},a}(Mt),vd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),bd=function(i){vd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return k({redo:d.element},["redo"]),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&s.undo.redo(s)}),d}return a}(Mt),yd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),wd=function(i){yd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return k({undo:d.element},["undo"]),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&s.undo.undo(s)}),d}return a}(Mt),xd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),kd=function(i){xd(a,i);function a(s,u){var d=i.call(this,s,u)||this,f='<input type="file"';return s.options.upload.multiple&&(f+=' multiple="multiple"'),s.options.upload.accept&&(f+=' accept="'.concat(s.options.upload.accept,'"')),d.element.children[0].innerHTML="".concat(u.icon||'<svg><use xlink:href="#vditor-icon-upload"></use></svg>').concat(f,">"),d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this;this.element.children[0].addEventListener((0,m.Le)(),function(d){if(u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){d.stopPropagation(),d.preventDefault();return}}),this.element.querySelector("input").addEventListener("change",function(d){if(u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){d.stopPropagation(),d.preventDefault();return}d.target.files.length!==0&&_i(s,d.target.files,d.target)})},a}(Mt),Sd=function(){function i(a){var s=this,u=a.options;this.elements={},this.element=document.createElement("div"),this.element.className="vditor-toolbar",u.toolbar.forEach(function(d,f){var E=s.genItem(a,d,f);if(s.element.appendChild(E),d.toolbar){var L=document.createElement("div");L.className="vditor-hint vditor-panel--arrow",L.addEventListener((0,m.Le)(),function(D){L.style.display="none"}),d.toolbar.forEach(function(D,_){D.level=2,L.appendChild(s.genItem(a,D,f+_))}),E.appendChild(L),M(a,L,E.children[0])}}),a.options.toolbarConfig.hide&&this.element.classList.add("vditor-toolbar--hide"),a.options.toolbarConfig.pin&&this.element.classList.add("vditor-toolbar--pin"),a.options.counter.enable&&(a.counter=new Ou(a),this.element.appendChild(a.counter.element))}return i.prototype.updateConfig=function(a,s){a.options.toolbarConfig=Object.assign({hide:!1,pin:!1},s),a.options.toolbarConfig.hide?this.element.classList.add("vditor-toolbar--hide"):this.element.classList.remove("vditor-toolbar--hide"),a.options.toolbarConfig.pin?this.element.classList.add("vditor-toolbar--pin"):this.element.classList.remove("vditor-toolbar--pin")},i.prototype.genItem=function(a,s,u){var d;switch(s.name){case"bold":case"italic":case"more":case"strike":case"line":case"quote":case"list":case"ordered-list":case"check":case"code":case"inline-code":case"link":case"table":d=new Mt(a,s);break;case"emoji":d=new ju(a,s);break;case"headings":d=new Yu(a,s);break;case"|":d=new Fu;break;case"br":d=new _u;break;case"undo":d=new wd(a,s);break;case"redo":d=new bd(a,s);break;case"help":d=new Qu(a,s);break;case"both":d=new Lu(a,s);break;case"preview":d=new pd(a,s);break;case"fullscreen":d=new Xu(a,s);break;case"upload":d=new kd(a,s);break;case"record":d=new gd(a,s);break;case"info":d=new rd(a,s);break;case"edit-mode":d=new ws(a,s);break;case"devtools":d=new Bu(a,s);break;case"outdent":d=new cd(a,s);break;case"indent":d=new td(a,s);break;case"outline":d=new dd(a,s);break;case"insert-after":d=new ad(a,s);break;case"insert-before":d=new sd(a,s);break;case"code-theme":d=new Du(a,s);break;case"content-theme":d=new Iu(a,s);break;case"export":d=new Gu(a,s);break;default:d=new Pu(a,s);break}if(d){var f=s.name;return(f==="br"||f==="|")&&(f=f+u),this.elements[f]=d.element,d.element}},i}(),Ed=o(173),Td=function(){function i(){this.stackSize=50,this.resetStack(),this.dmp=new Ed}return i.prototype.clearStack=function(a){this.resetStack(),this.resetIcon(a)},i.prototype.resetIcon=function(a){a.toolbar&&(this[a.currentMode].undoStack.length>1?S(a.toolbar.elements,["undo"]):k(a.toolbar.elements,["undo"]),this[a.currentMode].redoStack.length!==0?S(a.toolbar.elements,["redo"]):k(a.toolbar.elements,["redo"]))},i.prototype.undo=function(a){if(a[a.currentMode].element.getAttribute("contenteditable")!=="false"&&!(this[a.currentMode].undoStack.length<2)){var s=this[a.currentMode].undoStack.pop();s&&(this[a.currentMode].redoStack.push(s),this.renderDiff(s,a),this[a.currentMode].hasUndo=!0,A(a,["hint"]))}},i.prototype.redo=function(a){if(a[a.currentMode].element.getAttribute("contenteditable")!=="false"){var s=this[a.currentMode].redoStack.pop();s&&(this[a.currentMode].undoStack.push(s),this.renderDiff(s,a,!0))}},i.prototype.recordFirstPosition=function(a,s){if(getSelection().rangeCount!==0&&!(this[a.currentMode].undoStack.length!==1||this[a.currentMode].undoStack[0].length===0||this[a.currentMode].redoStack.length>0)&&!((0,m.vU)()&&s.key==="Backspace")&&!(0,m.G6)()){var u=this.addCaret(a);u.replace("<wbr>","").replace(" vditor-ir__node--expand","")===this[a.currentMode].undoStack[0][0].diffs[0][1].replace("<wbr>","")&&(this[a.currentMode].undoStack[0][0].diffs[0][1]=u,this[a.currentMode].lastText=u)}},i.prototype.addToUndoStack=function(a){var s=this.addCaret(a,!0),u=this.dmp.diff_main(s,this[a.currentMode].lastText,!0),d=this.dmp.patch_make(s,this[a.currentMode].lastText,u);d.length===0&&this[a.currentMode].undoStack.length>0||(this[a.currentMode].lastText=s,this[a.currentMode].undoStack.push(d),this[a.currentMode].undoStack.length>this.stackSize&&this[a.currentMode].undoStack.shift(),this[a.currentMode].hasUndo&&(this[a.currentMode].redoStack=[],this[a.currentMode].hasUndo=!1,k(a.toolbar.elements,["redo"])),this[a.currentMode].undoStack.length>1&&S(a.toolbar.elements,["undo"]))},i.prototype.renderDiff=function(a,s,u){u===void 0&&(u=!1);var d;if(u){var f=this.dmp.patch_deepCopy(a).reverse();f.forEach(function(L){L.diffs.forEach(function(D){D[0]=-D[0]})}),d=this.dmp.patch_apply(f,this[s.currentMode].lastText)[0]}else d=this.dmp.patch_apply(a,this[s.currentMode].lastText)[0];if(this[s.currentMode].lastText=d,s[s.currentMode].element.innerHTML=d,s.currentMode!=="sv"&&(s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview")).forEach(function(L){L.parentElement.querySelector(".language-echarts")&&(s.currentMode==="ir"?L.parentElement.outerHTML=s.lute.SpinVditorIRDOM(L.parentElement.outerHTML):L.parentElement.outerHTML=s.lute.SpinVditorDOM(L.parentElement.outerHTML))}),s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview[data-render='2']")).forEach(function(L){tt(L,s)})),s[s.currentMode].element.querySelector("wbr"))(0,q.ib)(s[s.currentMode].element,s[s.currentMode].element.ownerDocument.createRange()),Z(s);else{var E=getSelection().getRangeAt(0);E.setEndBefore(s[s.currentMode].element),E.collapse(!1)}Ht(s),lt(s,{enableAddUndoStack:!1,enableHint:!1,enableInput:!0}),dr(s),s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview[data-render='2']")).forEach(function(L){tt(L,s)}),this[s.currentMode].undoStack.length>1?S(s.toolbar.elements,["undo"]):k(s.toolbar.elements,["undo"]),this[s.currentMode].redoStack.length!==0?S(s.toolbar.elements,["redo"]):k(s.toolbar.elements,["redo"])},i.prototype.resetStack=function(){this.ir={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]},this.sv={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]},this.wysiwyg={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]}},i.prototype.addCaret=function(a,s){s===void 0&&(s=!1);var u;if(getSelection().rangeCount!==0&&!a[a.currentMode].element.querySelector("wbr")){var d=getSelection().getRangeAt(0);if(a[a.currentMode].element.contains(d.startContainer)){u=d.cloneRange();var f=document.createElement("span");f.className="vditor-wbr",d.insertNode(f)}}var E=a[a.currentMode].element.cloneNode(!0);E.querySelectorAll(".vditor-".concat(a.currentMode,"__preview[data-render='1']")).forEach(function(D){D.firstElementChild&&(D.firstElementChild.classList.contains("language-echarts")||D.firstElementChild.classList.contains("language-plantuml")||D.firstElementChild.classList.contains("language-mindmap")?(D.firstElementChild.removeAttribute("_echarts_instance_"),D.firstElementChild.removeAttribute("data-processed"),D.firstElementChild.innerHTML=D.previousElementSibling.firstElementChild.innerHTML,D.setAttribute("data-render","2")):D.firstElementChild.classList.contains("language-math")&&(D.setAttribute("data-render","2"),D.firstElementChild.textContent=D.firstElementChild.getAttribute("data-math"),D.firstElementChild.removeAttribute("data-math")))});var L=E.innerHTML;return a[a.currentMode].element.querySelectorAll(".vditor-wbr").forEach(function(D){D.remove()}),s&&u&&(0,q.Hc)(u),L.replace('<span class="vditor-wbr"></span>',"<wbr>")},i}(),Ad=o(673),Md=function(){function i(a){this.defaultOptions={rtl:!1,after:void 0,cache:{enable:!0},cdn:c.g.CDN,classes:{preview:""},comment:{enable:!1},counter:{enable:!1,type:"markdown"},customRenders:[],debugger:!1,fullscreen:{index:90},height:"auto",hint:{delay:200,emoji:{"+1":"👍","-1":"👎",confused:"😕",eyes:"👀️",heart:"❤️",rocket:"🚀️",smile:"😄",tada:"🎉️"},emojiPath:"".concat(c.g.CDN,"/dist/images/emoji"),extend:[],parse:!0},icon:"ant",lang:"zh_CN",mode:"ir",outline:{enable:!1,position:"left"},placeholder:"",preview:{actions:["desktop","tablet","mobile","mp-wechat","zhihu"],delay:1e3,hljs:c.g.HLJS_OPTIONS,markdown:c.g.MARKDOWN_OPTIONS,math:c.g.MATH_OPTIONS,maxWidth:800,mode:"both",theme:c.g.THEME_OPTIONS,render:{media:{enable:!0}}},link:{isOpen:!0},image:{isPreview:!0},resize:{enable:!1,position:"bottom"},theme:"classic",toolbar:["emoji","headings","bold","italic","strike","link","|","list","ordered-list","check","outdent","indent","|","quote","line","code","inline-code","insert-before","insert-after","|","upload","record","table","|","undo","redo","|","fullscreen","edit-mode",{name:"more",toolbar:["both","code-theme","content-theme","export","outline","preview","devtools","info","help"]}],toolbarConfig:{hide:!1,pin:!1},typewriterMode:!1,undoDelay:800,upload:{extraData:{},fieldName:"file[]",filename:function(s){return s.replace(/\W/g,"")},linkToImgUrl:"",max:10*1024*1024,multiple:!0,url:"",withCredentials:!1},value:"",width:"auto"},this.options=a}return i.prototype.merge=function(){var a,s,u,d,f,E,L,D,_;this.options&&(this.options.toolbar?this.options.toolbar=this.mergeToolbar(this.options.toolbar):this.options.toolbar=this.mergeToolbar(this.defaultOptions.toolbar),!((s=(a=this.options.preview)===null||a===void 0?void 0:a.theme)===null||s===void 0)&&s.list&&(this.defaultOptions.preview.theme.list=this.options.preview.theme.list),!((f=(d=(u=this.options.preview)===null||u===void 0?void 0:u.render)===null||d===void 0?void 0:d.media)===null||f===void 0)&&f.enable&&(this.defaultOptions.preview.render.media.enable=this.options.preview.render.media.enable),!((E=this.options.hint)===null||E===void 0)&&E.emoji&&(this.defaultOptions.hint.emoji=this.options.hint.emoji),this.options.comment&&(this.defaultOptions.comment=this.options.comment),this.options.cdn&&(!((D=(L=this.options.preview)===null||L===void 0?void 0:L.theme)===null||D===void 0)&&D.path||(this.defaultOptions.preview.theme.path="".concat(this.options.cdn,"/dist/css/content-theme")),!((_=this.options.hint)===null||_===void 0)&&_.emojiPath||(this.defaultOptions.hint.emojiPath="".concat(this.options.cdn,"/dist/images/emoji"))));var B=(0,Ad.T)(this.defaultOptions,this.options);if(B.cache.enable&&!B.cache.id)throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");return B},i.prototype.mergeToolbar=function(a){var s=this,u=[{icon:'<svg><use xlink:href="#vditor-icon-export"></use></svg>',name:"export",tipPosition:"ne"},{hotkey:"⌘E",icon:'<svg><use xlink:href="#vditor-icon-emoji"></use></svg>',name:"emoji",tipPosition:"ne"},{hotkey:"⌘H",icon:'<svg><use xlink:href="#vditor-icon-headings"></use></svg>',name:"headings",tipPosition:"ne"},{hotkey:"⌘B",icon:'<svg><use xlink:href="#vditor-icon-bold"></use></svg>',name:"bold",prefix:"**",suffix:"**",tipPosition:"ne"},{hotkey:"⌘I",icon:'<svg><use xlink:href="#vditor-icon-italic"></use></svg>',name:"italic",prefix:"*",suffix:"*",tipPosition:"ne"},{hotkey:"⌘D",icon:'<svg><use xlink:href="#vditor-icon-strike"></use></svg>',name:"strike",prefix:"~~",suffix:"~~",tipPosition:"ne"},{hotkey:"⌘K",icon:'<svg><use xlink:href="#vditor-icon-link"></use></svg>',name:"link",prefix:"[",suffix:"](https://)",tipPosition:"n"},{name:"|"},{hotkey:"⌘L",icon:'<svg><use xlink:href="#vditor-icon-list"></use></svg>',name:"list",prefix:"* ",tipPosition:"n"},{hotkey:"⌘O",icon:'<svg><use xlink:href="#vditor-icon-ordered-list"></use></svg>',name:"ordered-list",prefix:"1. ",tipPosition:"n"},{hotkey:"⌘J",icon:'<svg><use xlink:href="#vditor-icon-check"></use></svg>',name:"check",prefix:"* [ ] ",tipPosition:"n"},{hotkey:"⇧⌘I",icon:'<svg><use xlink:href="#vditor-icon-outdent"></use></svg>',name:"outdent",tipPosition:"n"},{hotkey:"⇧⌘O",icon:'<svg><use xlink:href="#vditor-icon-indent"></use></svg>',name:"indent",tipPosition:"n"},{name:"|"},{hotkey:"⌘;",icon:'<svg><use xlink:href="#vditor-icon-quote"></use></svg>',name:"quote",prefix:"> ",tipPosition:"n"},{hotkey:"⇧⌘H",icon:'<svg><use xlink:href="#vditor-icon-line"></use></svg>',name:"line",prefix:"---",tipPosition:"n"},{hotkey:"⌘U",icon:'<svg><use xlink:href="#vditor-icon-code"></use></svg>',name:"code",prefix:"```",suffix:"\n```",tipPosition:"n"},{hotkey:"⌘G",icon:'<svg><use xlink:href="#vditor-icon-inline-code"></use></svg>',name:"inline-code",prefix:"`",suffix:"`",tipPosition:"n"},{hotkey:"⇧⌘B",icon:'<svg><use xlink:href="#vditor-icon-before"></use></svg>',name:"insert-before",tipPosition:"n"},{hotkey:"⇧⌘E",icon:'<svg><use xlink:href="#vditor-icon-after"></use></svg>',name:"insert-after",tipPosition:"n"},{name:"|"},{icon:'<svg><use xlink:href="#vditor-icon-upload"></use></svg>',name:"upload",tipPosition:"n"},{icon:'<svg><use xlink:href="#vditor-icon-record"></use></svg>',name:"record",tipPosition:"n"},{hotkey:"⌘M",icon:'<svg><use xlink:href="#vditor-icon-table"></use></svg>',name:"table",prefix:"| col1",suffix:` | col2 | col3 |
| --- | --- | --- |
| | | |
| | | |`,tipPosition:"n"},{name:"|"},{hotkey:"⌘Z",icon:'<svg><use xlink:href="#vditor-icon-undo"></use></svg>',name:"undo",tipPosition:"nw"},{hotkey:"⌘Y",icon:'<svg><use xlink:href="#vditor-icon-redo"></use></svg>',name:"redo",tipPosition:"nw"},{name:"|"},{icon:'<svg><use xlink:href="#vditor-icon-more"></use></svg>',name:"more",tipPosition:"e"},{hotkey:"⌘'",icon:'<svg><use xlink:href="#vditor-icon-fullscreen"></use></svg>',name:"fullscreen",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-edit"></use></svg>',name:"edit-mode",tipPosition:"nw"},{hotkey:"⌘P",icon:'<svg><use xlink:href="#vditor-icon-both"></use></svg>',name:"both",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-preview"></use></svg>',name:"preview",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',name:"outline",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-theme"></use></svg>',name:"content-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-code-theme"></use></svg>',name:"code-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-bug"></use></svg>',name:"devtools",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-info"></use></svg>',name:"info",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-help"></use></svg>',name:"help",tipPosition:"nw"},{name:"br"}],d=[];return a.forEach(function(f){var E=f;u.forEach(function(L){typeof f=="string"&&L.name===f&&(E=L),typeof f=="object"&&L.name===f.name&&(E=Object.assign({},L,f))}),f.toolbar&&(E.toolbar=s.mergeToolbar(f.toolbar)),d.push(E)}),d},i}(),Cd=function(){function i(a){var s=this;this.composingLock=!1,this.commentIds=[];var u=document.createElement("div");u.className="vditor-wysiwyg",u.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder,`"
contenteditable="true" spellcheck="false"></pre>
<div class="vditor-panel vditor-panel--none"></div>
<div class="vditor-panel vditor-panel--none">
<button type="button" aria-label="`).concat(window.VditorI18n.comment,`" class="vditor-icon vditor-tooltipped vditor-tooltipped__n">
<svg><use xlink:href="#vditor-icon-comment"></use></svg>
</button>
</div>`),this.element=u.firstElementChild,this.popover=u.firstElementChild.nextElementSibling,this.selectPopover=u.lastElementChild,this.bindEvent(a),Ai(a,this.element),ho(a,this.element),Mi(a,this.element),xe(a,this.element),He(a,this.element),Ci(a,this.element),U(a,this.element,this.copy),Q(a,this.element,this.copy),a.options.comment.enable&&(this.selectPopover.querySelector("button").onclick=function(){var d=Lute.NewNodeID(),f=getSelection().getRangeAt(0),E=f.cloneRange(),L=f.extractContents(),D,_,B=!1,K=!1;L.childNodes.forEach(function(ue,ke){var we=!1;if(ue.nodeType===3?we=!0:ue.classList.contains("vditor-comment")?ue.classList.contains("vditor-comment")&&ue.setAttribute("data-cmtids",ue.getAttribute("data-cmtids")+" "+d):we=!0,we)if(ue.nodeType!==3&&ue.getAttribute("data-block")==="0"&&ke===0&&E.startOffset>0)ue.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ue.innerHTML,"</span>"),D=ue;else if(ue.nodeType!==3&&ue.getAttribute("data-block")==="0"&&ke===L.childNodes.length-1&&E.endOffset<E.endContainer.textContent.length)ue.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ue.innerHTML,"</span>"),_=ue;else if(ue.nodeType!==3&&ue.getAttribute("data-block")==="0")ke===0?B=!0:ke===L.childNodes.length-1&&(K=!0),ue.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ue.innerHTML,"</span>");else{var de=document.createElement("span");de.classList.add("vditor-comment"),de.setAttribute("data-cmtids",d),ue.parentNode.insertBefore(de,ue),de.appendChild(ue)}});var fe=(0,y.F9)(E.startContainer);fe&&(D?(fe.insertAdjacentHTML("beforeend",D.innerHTML),D.remove()):fe.textContent.trim().replace(c.g.ZWSP,"")===""&&B&&fe.remove());var ve=(0,y.F9)(E.endContainer);ve&&(_?(ve.insertAdjacentHTML("afterbegin",_.innerHTML),_.remove()):ve.textContent.trim().replace(c.g.ZWSP,"")===""&&K&&ve.remove()),f.insertNode(L),a.options.comment.add(d,f.toString(),s.getComments(a,!0)),Re(a,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),s.hideComment()})}return i.prototype.getComments=function(a,s){var u=this;if(s===void 0&&(s=!1),a.currentMode==="wysiwyg"&&a.options.comment.enable){this.commentIds=[],this.element.querySelectorAll(".vditor-comment").forEach(function(f){u.commentIds=u.commentIds.concat(f.getAttribute("data-cmtids").split(" "))}),this.commentIds=Array.from(new Set(this.commentIds));var d=[];if(s)return this.commentIds.forEach(function(f){d.push({id:f,top:u.element.querySelector('.vditor-comment[data-cmtids="'.concat(f,'"]')).offsetTop})}),d}else return[]},i.prototype.triggerRemoveComment=function(a){var s=function(f,E){var L=new Set(E);return f.filter(function(D){return!L.has(D)})};if(a.currentMode==="wysiwyg"&&a.options.comment.enable&&a.wysiwyg.commentIds.length>0){var u=JSON.parse(JSON.stringify(this.commentIds));this.getComments(a);var d=s(u,this.commentIds);d.length>0&&a.options.comment.remove(d)}},i.prototype.showComment=function(){var a=(0,q.Ny)(this.element);this.selectPopover.setAttribute("style","left:".concat(a.left,"px;display:block;top:").concat(Math.max(-8,a.top-21),"px"))},i.prototype.hideComment=function(){this.selectPopover.setAttribute("style","display:none")},i.prototype.unbindListener=function(){window.removeEventListener("scroll",this.scrollListener)},i.prototype.copy=function(a,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){a.stopPropagation(),a.preventDefault();var d=(0,y.lG)(u.startContainer,"CODE"),f=(0,y.lG)(u.endContainer,"CODE");if(d&&f&&f.isSameNode(d)){var E="";d.parentElement.tagName==="PRE"?E=u.toString():E="`"+u.toString()+"`",a.clipboardData.setData("text/plain",E),a.clipboardData.setData("text/html","");return}var L=(0,y.lG)(u.startContainer,"A"),D=(0,y.lG)(u.endContainer,"A");if(L&&D&&D.isSameNode(L)){var _=L.getAttribute("title")||"";_&&(_=' "'.concat(_,'"')),a.clipboardData.setData("text/plain","[".concat(u.toString(),"](").concat(L.getAttribute("href")).concat(_,")")),a.clipboardData.setData("text/html","");return}var B=document.createElement("div");B.appendChild(u.cloneContents()),a.clipboardData.setData("text/plain",s.lute.VditorDOM2Md(B.innerHTML).trim()),a.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(a){var s=this;this.unbindListener(),window.addEventListener("scroll",this.scrollListener=function(){if(A(a,["hint"]),!(s.popover.style.display!=="block"||s.selectPopover.style.display!=="block")){var u=parseInt(s.popover.getAttribute("data-top"),10);if(a.options.height!=="auto"){if(a.options.toolbarConfig.pin&&a.toolbar.element.getBoundingClientRect().top===0){var d=Math.max(window.scrollY-a.element.offsetTop-8,Math.min(u-a.wysiwyg.element.scrollTop,s.element.clientHeight-21))+"px";s.popover.style.display==="block"&&(s.popover.style.top=d),s.selectPopover.style.display==="block"&&(s.selectPopover.style.top=d)}return}else if(!a.options.toolbarConfig.pin)return;var f=Math.max(u,window.scrollY-a.element.offsetTop-8)+"px";s.popover.style.display==="block"&&(s.popover.style.top=f),s.selectPopover.style.display==="block"&&(s.selectPopover.style.top=f)}}),this.element.addEventListener("scroll",function(){if(A(a,["hint"]),a.options.comment&&a.options.comment.enable&&a.options.comment.scroll&&a.options.comment.scroll(a.wysiwyg.element.scrollTop),s.popover.style.display==="block"){var u=parseInt(s.popover.getAttribute("data-top"),10)-a.wysiwyg.element.scrollTop,d=-8;a.options.toolbarConfig.pin&&a.toolbar.element.getBoundingClientRect().top===0&&(d=window.scrollY-a.element.offsetTop+d);var f=Math.max(d,Math.min(u,s.element.clientHeight-21))+"px";s.popover.style.top=f,s.selectPopover.style.top=f}}),this.element.addEventListener("paste",function(u){ta(a,u,{pasteCode:function(d){var f=(0,q.zh)(a),E=document.createElement("template");E.innerHTML=d,f.insertNode(E.content.cloneNode(!0));var L=(0,y.a1)(f.startContainer,"data-block","0");L?L.outerHTML=a.lute.SpinVditorDOM(L.outerHTML):a.wysiwyg.element.innerHTML=a.lute.SpinVditorDOM(a.wysiwyg.element.innerHTML),(0,q.ib)(a.wysiwyg.element,f)}})}),this.element.addEventListener("compositionstart",function(){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){var d=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(d&&d.textContent===""){Ht(a);return}(0,m.vU)()||Zr(a,getSelection().getRangeAt(0).cloneRange(),u),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")){if(s.preventInput){s.preventInput=!1,Re(a);return}if(s.composingLock||u.data===""||u.data==="“"||u.data==="《"){Re(a);return}var d=getSelection().getRangeAt(0),f=(0,y.F9)(d.startContainer);if(f||(Pn(a,d),f=(0,y.F9)(d.startContainer)),!!f){for(var E=(0,q.im)(f,a.wysiwyg.element,d).start,L=!0,D=E-1;D>f.textContent.substr(0,E).lastIndexOf(`
`);D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}E===0&&(L=!1);for(var _=!0,D=E-1;D<f.textContent.length;D++)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==`
`){_=!1;break}_&&/^#{1,6} $/.test(f.textContent)&&(_=!1);var B=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(B&&B.textContent===""&&(Ht(a),B.remove()),L&&f.getAttribute("data-type")!=="code-block"||_||mo(f.innerHTML)||fo(f.innerHTML)&&f.previousElementSibling){typeof a.options.input=="function"&&a.options.input(v(a));return}u.inputType==="insertParagraph"&&s.element.innerHTML==="<p><br></p><p><br></p>"&&f.previousElementSibling.remove(),Zr(a,d,u)}}}),this.element.addEventListener("click",function(u){if(u.target.tagName==="INPUT"){var d=u.target;d.checked?d.setAttribute("checked","checked"):d.removeAttribute("checked"),s.preventInput=!0,getSelection().rangeCount>0&&(0,q.Hc)(getSelection().getRangeAt(0)),Re(a);return}if(u.target.tagName==="IMG"&&!u.target.parentElement.classList.contains("vditor-wysiwyg__preview")){u.target.getAttribute("data-type")==="link-ref"?co(a,u.target):di(u,a);return}var f=(0,y.lG)(u.target,"A");if(f){a.options.link.click?a.options.link.click(f):a.options.link.isOpen&&window.open(f.getAttribute("href")),u.preventDefault();return}var E=(0,q.zh)(a);if(u.target.isEqualNode(s.element)&&s.element.lastElementChild&&E.collapsed){var L=s.element.lastElementChild.getBoundingClientRect();u.y>L.top+L.height&&(s.element.lastElementChild.tagName==="P"&&s.element.lastElementChild.textContent.trim().replace(c.g.ZWSP,"")===""?(E.selectNodeContents(s.element.lastElementChild),E.collapse(!1)):(s.element.insertAdjacentHTML("beforeend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(s.element,E)))}jn(a);var D=(0,y.fb)(u.target,"vditor-wysiwyg__preview");D||(D=(0,y.fb)((0,q.zh)(a).startContainer,"vditor-wysiwyg__preview")),D&&cr(D,a),Rt(u,a)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){u.key==="Enter"&&Z(a),(u.key==="Backspace"||u.key==="Delete")&&a.wysiwyg.element.innerHTML!==""&&a.wysiwyg.element.childNodes.length===1&&a.wysiwyg.element.firstElementChild&&a.wysiwyg.element.firstElementChild.tagName==="P"&&a.wysiwyg.element.firstElementChild.childElementCount===0&&(a.wysiwyg.element.textContent===""||a.wysiwyg.element.textContent===`
`)&&(a.wysiwyg.element.innerHTML="");var d=(0,q.zh)(a);if(u.key==="Backspace"&&(0,m.vU)()&&d.startContainer.textContent===`
`&&d.startOffset===1&&(d.startContainer.textContent=""),Pn(a,d),jn(a),!(u.key!=="ArrowDown"&&u.key!=="ArrowRight"&&u.key!=="Backspace"&&u.key!=="ArrowLeft"&&u.key!=="ArrowUp")){(u.key==="ArrowLeft"||u.key==="ArrowRight")&&a.hint.render(a);var f=(0,y.fb)(d.startContainer,"vditor-wysiwyg__preview");if(!f&&d.startContainer.nodeType!==3&&d.startOffset>0){var E=d.startContainer;E.classList.contains("vditor-wysiwyg__block")&&(f=E.lastElementChild)}if(f){var L=f.previousElementSibling;if(L.style.display==="none"){u.key==="ArrowDown"||u.key==="ArrowRight"?cr(f,a):cr(f,a,!1);return}var D=f.previousElementSibling;if(D.tagName==="PRE"&&(D=D.firstElementChild),u.key==="ArrowDown"||u.key==="ArrowRight"){var E=f.parentElement,_=Hn(E);if(_&&_.nodeType!==3){var B=_.querySelector(".vditor-wysiwyg__preview");if(B){cr(B,a);return}}if(_.nodeType===3){for(;_.textContent.length===0&&_.nextSibling;)_=_.nextSibling;d.setStart(_,1)}else d.setStart(_.firstChild,0)}else d.selectNodeContents(D),d.collapse(!1)}}}})},i}(),Ld=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),_d=function(i){Ld(a,i);function a(s,u){var d=i.call(this)||this;if(d.isDestroyed=!1,d.version=c.H,typeof s=="string"){if(u?u.cache?u.cache.id||(u.cache.id="vditor".concat(s)):u.cache={id:"vditor".concat(s)}:u={cache:{id:"vditor".concat(s)}},!document.getElementById(s))return d.showErrorTip("Failed to get element by id: ".concat(s)),d;s=document.getElementById(s)}var f=new Md(u),E=f.merge();if(E.i18n)window.VditorI18n=E.i18n,d.init(s,E);else if(["de_DE","en_US","es_ES","fr_FR","ja_JP","ko_KR","pt_BR","ru_RU","sv_SE","vi_VN","zh_CN","zh_TW"].includes(E.lang)){var L="vditorI18nScript",D=L+E.lang;document.querySelectorAll('head script[id^="'.concat(L,'"]')).forEach(function(_){_.id!==D&&document.head.removeChild(_)}),(0,b.G)("".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js"),D).then(function(){d.init(s,E)}).catch(function(_){d.showErrorTip("GET ".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js net::ERR_ABORTED 404 (Not Found)"))})}else throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");return d}return a.prototype.showErrorTip=function(s){var u=new Vs;document.body.appendChild(u.element),u.show(s,0)},a.prototype.updateToolbarConfig=function(s){this.vditor.toolbar.updateConfig(this.vditor,s)},a.prototype.setTheme=function(s,u,d,f){this.vditor.options.theme=s,ye(this.vditor),u&&(this.vditor.options.preview.theme.current=u,(0,le.Z)(u,f||this.vditor.options.preview.theme.path)),d&&(this.vditor.options.preview.hljs.style=d,(0,Ws.Y)(d,this.vditor.options.cdn))},a.prototype.getValue=function(){return v(this.vditor)},a.prototype.getCurrentMode=function(){return this.vditor.currentMode},a.prototype.focus=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.focus():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.focus():this.vditor.currentMode==="ir"&&this.vditor.ir.element.focus()},a.prototype.blur=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.blur():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.blur():this.vditor.currentMode==="ir"&&this.vditor.ir.element.blur()},a.prototype.disabled=function(){A(this.vditor,["subToolbar","hint","popover"]),k(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","false")},a.prototype.enable=function(){S(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor.undo.resetIcon(this.vditor),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","true")},a.prototype.getSelection=function(){if(this.vditor.currentMode==="wysiwyg")return Or(this.vditor.wysiwyg.element);if(this.vditor.currentMode==="sv")return Or(this.vditor.sv.element);if(this.vditor.currentMode==="ir")return Or(this.vditor.ir.element)},a.prototype.renderPreview=function(s){this.vditor.preview.render(this.vditor,s)},a.prototype.getCursorPosition=function(){return(0,q.Ny)(this.vditor[this.vditor.currentMode].element)},a.prototype.isUploading=function(){return this.vditor.upload.isUploading},a.prototype.clearCache=function(){this.vditor.options.cache.enable&&(0,m.pK)()&&localStorage.removeItem(this.vditor.options.cache.id)},a.prototype.disabledCache=function(){this.vditor.options.cache.enable=!1},a.prototype.enableCache=function(){if(!this.vditor.options.cache.id)throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");this.vditor.options.cache.enable=!0},a.prototype.html2md=function(s){return this.vditor.lute.HTML2Md(s)},a.prototype.exportJSON=function(s){return this.vditor.lute.RenderJSON(s)},a.prototype.getHTML=function(){return $s(this.vditor)},a.prototype.tip=function(s,u){this.vditor.tip.show(s,u)},a.prototype.setPreviewMode=function(s){bo(s,this.vditor)},a.prototype.deleteValue=function(){window.getSelection().isCollapsed||document.execCommand("delete",!1)},a.prototype.updateValue=function(s){document.execCommand("insertHTML",!1,s)},a.prototype.insertValue=function(s,u){u===void 0&&(u=!0);var d=(0,q.zh)(this.vditor);d.collapse(!0);var f=document.createElement("template");f.innerHTML=s,d.insertNode(f.content.cloneNode(!0)),d.collapse(!1),this.vditor.currentMode==="sv"?(this.vditor.sv.preventInput=!0,u&&X(this.vditor)):this.vditor.currentMode==="wysiwyg"?u&&Zr(this.vditor,getSelection().getRangeAt(0)):this.vditor.currentMode==="ir"&&(this.vditor.ir.preventInput=!0,u&&Nt(this.vditor,getSelection().getRangeAt(0),!0))},a.prototype.insertMD=function(s){this.vditor.currentMode==="ir"?(0,q.oC)(this.vditor.lute.Md2VditorIRDOM(s),this.vditor):this.vditor.currentMode==="wysiwyg"?(0,q.oC)(this.vditor.lute.Md2VditorDOM(s),this.vditor):Pe(this.vditor,s),this.vditor.outline.render(this.vditor),lt(this.vditor)},a.prototype.setValue=function(s,u){var d=this;u===void 0&&(u=!1),this.vditor.currentMode==="sv"?(this.vditor.sv.element.innerHTML="<div data-block='0'>".concat(this.vditor.lute.SpinVditorSVDOM(s),"</div>"),Ge(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})):this.vditor.currentMode==="wysiwyg"?uo(this.vditor,s,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}):(this.vditor.ir.element.innerHTML=this.vditor.lute.Md2VditorIRDOM(s),this.vditor.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(f){tt(f,d.vditor)}),Xn(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})),this.vditor.outline.render(this.vditor),s||(A(this.vditor,["emoji","headings","submenu","hint"]),this.vditor.wysiwyg.popover&&(this.vditor.wysiwyg.popover.style.display="none"),this.clearCache()),u&&this.clearStack()},a.prototype.insertEmptyBlock=function(s){hi(this.vditor,s)},a.prototype.clearStack=function(){this.vditor.undo.clearStack(this.vditor),this.vditor.undo.addToUndoStack(this.vditor)},a.prototype.destroy=function(){this.vditor.element.innerHTML=this.vditor.originalInnerHTML,this.vditor.element.classList.remove("vditor"),this.vditor.element.removeAttribute("style");var s=document.getElementById("vditorIconScript");s&&s.remove(),this.clearCache(),Be(),this.vditor.wysiwyg.unbindListener(),this.vditor.options.after=void 0,this.isDestroyed=!0},a.prototype.getCommentIds=function(){return this.vditor.currentMode!=="wysiwyg"?[]:this.vditor.wysiwyg.getComments(this.vditor,!0)},a.prototype.hlCommentIds=function(s){if(this.vditor.currentMode==="wysiwyg"){var u=function(d){d.classList.remove("vditor-comment--hover"),s.forEach(function(f){d.getAttribute("data-cmtids").indexOf(f)>-1&&d.classList.add("vditor-comment--hover")})};this.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)}),this.vditor.preview.element.style.display!=="none"&&this.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)})}},a.prototype.unHlCommentIds=function(s){if(this.vditor.currentMode==="wysiwyg"){var u=function(d){s.forEach(function(f){d.getAttribute("data-cmtids").indexOf(f)>-1&&d.classList.remove("vditor-comment--hover")})};this.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)}),this.vditor.preview.element.style.display!=="none"&&this.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)})}},a.prototype.removeCommentIds=function(s){var u=this;if(this.vditor.currentMode==="wysiwyg"){var d=function(f,E){var L=f.getAttribute("data-cmtids").split(" ");L.find(function(D,_){if(D===E)return L.splice(_,1),!0}),L.length===0?(f.outerHTML=f.innerHTML,(0,q.zh)(u.vditor).collapse(!0)):f.setAttribute("data-cmtids",L.join(" "))};s.forEach(function(f){u.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(E){d(E,f)}),u.vditor.preview.element.style.display!=="none"&&u.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(E){d(E,f)})}),Re(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})}},a.prototype.init=function(s,u){var d=this;this.isDestroyed||(this.vditor={currentMode:u.mode,element:s,hint:new wu(u.hint.extend),lute:void 0,options:u,originalInnerHTML:s.innerHTML,outline:new Su(window.VditorI18n.outline),tip:new Vs},this.vditor.sv=new Mu(this.vditor),this.vditor.undo=new Td,this.vditor.wysiwyg=new Cd(this.vditor),this.vditor.ir=new xu(this.vditor),this.vditor.toolbar=new Sd(this.vditor),u.resize.enable&&(this.vditor.resize=new Au(this.vditor)),this.vditor.toolbar.elements.devtools&&(this.vditor.devtools=new g),(u.upload.url||u.upload.handler)&&(this.vditor.upload=new Ia),(0,b.G)(u._lutePath||"".concat(u.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){d.vditor.lute=(0,ku.X)({autoSpace:d.vditor.options.preview.markdown.autoSpace,gfmAutoLink:d.vditor.options.preview.markdown.gfmAutoLink,codeBlockPreview:d.vditor.options.preview.markdown.codeBlockPreview,emojiSite:d.vditor.options.hint.emojiPath,emojis:d.vditor.options.hint.emoji,fixTermTypo:d.vditor.options.preview.markdown.fixTermTypo,footnotes:d.vditor.options.preview.markdown.footnotes,headingAnchor:!1,inlineMathDigit:d.vditor.options.preview.math.inlineDigit,linkBase:d.vditor.options.preview.markdown.linkBase,linkPrefix:d.vditor.options.preview.markdown.linkPrefix,listStyle:d.vditor.options.preview.markdown.listStyle,mark:d.vditor.options.preview.markdown.mark,mathBlockPreview:d.vditor.options.preview.markdown.mathBlockPreview,paragraphBeginningSpace:d.vditor.options.preview.markdown.paragraphBeginningSpace,sanitize:d.vditor.options.preview.markdown.sanitize,toc:d.vditor.options.preview.markdown.toc}),d.vditor.preview=new Tu(d.vditor),Ae(d.vditor),u.after&&u.after(),u.icon&&(0,b.J)("".concat(u.cdn,"/dist/js/icons/").concat(u.icon,".js"),"vditorIconScript")}))},a}(h.default);const Nd=_d})(),l=l.default,l})()})})(bv);var dy=bv.exports;const nl=vv(dy);const Gp=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n};var hy=Object.defineProperty,py=(t,e,n)=>e in t?hy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vt=(t,e,n)=>(py(t,typeof e!="symbol"?e+"":e,n),n);const Kp={name:"Latte",type:"light",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#4c4f69","--root-border-color":"rgba(0, 0, 0, 0)","--main-color":"#444446","--main-bgcolor":"#ffffff","--topic-padding":"3px","--color":"#777777","--bgcolor":"#f6f6f6","--selected":"#4dc4ff","--accent-color":"#e64553","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea","--map-padding":"50px"}},Xp={name:"Dark",type:"dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#2d3748","--root-border-color":"rgba(255, 255, 255, 0.1)","--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--topic-padding":"3px","--color":"#cccccc","--bgcolor":"#252526","--selected":"#4dc4ff","--accent-color":"#789AFA","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969","--map-padding":"50px 80px"}};function Fh(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}const Q0=function(t,e){if(e.id===t)return e;if(e.children&&e.children.length){for(let n=0;n<e.children.length;n++){const r=Q0(t,e.children[n]);if(r)return r}return null}else return null},oo=(t,e)=>{if(t.parent=e,t.children)for(let n=0;n<t.children.length;n++)oo(t.children[n],t)},rs=(t,e,n)=>{if(t.expanded=e,t.children)if(n===void 0||n>0){const r=n!==void 0?n-1:void 0;t.children.forEach(o=>{rs(o,e,r)})}else t.children.forEach(r=>{rs(r,!1)})};function Zp(t){if(t.id=Po(),t.children)for(let e=0;e<t.children.length;e++)Zp(t.children[e])}function ec(t,e,n,r){const o=r-e,l=t-n;let h=Math.atan(Math.abs(o)/Math.abs(l))/3.14*180;if(isNaN(h))return;l<0&&o>0&&(h=180-h),l<0&&o<0&&(h=180+h),l>0&&o<0&&(h=360-h);const c=12,p=30,v=h+p,b=h-p;return{x1:n+Math.cos(Math.PI*v/180)*c,y1:r-Math.sin(Math.PI*v/180)*c,x2:n+Math.cos(Math.PI*b/180)*c,y2:r-Math.sin(Math.PI*b/180)*c}}function Po(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}const fy=function(){const t=Po();return{topic:this.newTopicName,id:t}};function Yp(t){return JSON.parse(JSON.stringify(t,(e,n)=>{if(e!=="parent")return n}))}const ql=(t,e)=>{let n=0,r=0;for(;e&&e!==t;)n+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{offsetLeft:n,offsetTop:r}},En=(t,e)=>{for(const n in e)t.setAttribute(n,e[n])},qh=t=>t?t.tagName==="ME-TPC":!1,Pc=t=>t.filter(e=>e.nodeObj.parent).filter((e,n,r)=>{for(let o=0;o<r.length;o++){if(e===r[o])continue;const{parent:l}=e.nodeObj;if(l===r[o].nodeObj)return!1}return!0}),yv=t=>{const e=/translate\(([^,]+),\s*([^)]+)\)/,n=t.match(e);return n?{x:parseFloat(n[1]),y:parseFloat(n[2])}:{x:0,y:0}},Jp=function(t){for(let e=0;e<t.length;e++){const{dom:n,evt:r,func:o}=t[e];n.addEventListener(r,o)}return function(){for(let e=0;e<t.length;e++){const{dom:n,evt:r,func:o}=t[e];n.removeEventListener(r,o)}}},my=t=>{const e=t.getBoundingClientRect();return getComputedStyle(t),{width:e.width,height:e.height,top:e.top,left:e.left,offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight,offsetTop:t.offsetTop,offsetLeft:t.offsetLeft}},Qp=(t,e)=>{try{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{offsetLeft:r.left-n.left,offsetTop:r.top-n.top}}catch{return ql(t,e)}};var oi=(t=>(t.LHS="lhs",t.RHS="rhs",t))(oi||{});const gy=t=>{const e=t.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},vy=t=>{const e=t.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},by=t=>{t.selectNode(t.map.querySelector("me-root>me-tpc"))},yy=function(t,e){const n=e.parentElement.parentElement.parentElement.previousSibling;if(n){const r=n.firstChild;t.selectNode(r)}},wy=function(t,e){const n=e.parentElement.nextSibling;if(n&&n.firstChild){const r=n.firstChild.firstChild.firstChild;t.selectNode(r)}},Q1=function(t,e){var n,r;const o=t.currentNode||((n=t.currentNodes)==null?void 0:n[0]);if(!o)return;const l=o.nodeObj,h=o.offsetParent.offsetParent.parentElement;l.parent?h.className===e?wy(t,o):(r=l.parent)!=null&&r.parent?yy(t,o):by(t):e===oi.LHS?gy(t):vy(t)},em=function(t,e){const n=t.currentNode;if(!n||!n.nodeObj.parent)return;const r=e+"Sibling",o=n.parentElement.parentElement[r];o?t.selectNode(o.firstChild.firstChild):t.selectNode(n)},tc=function(t,e,n){const{scaleVal:r,scaleSensitivity:o}=t;switch(e){case"in":t.scale(r+o,n);break;case"out":t.scale(r-o,n)}};function xy(t,e){e=e===!0?{}:e;const n=()=>{t.currentArrow?t.removeArrow():t.currentSummary?t.removeSummary(t.currentSummary.summaryObj.id):t.currentNodes&&t.removeNodes(t.currentNodes)};let r=!1,o=null;const l=c=>{const p=t.nodeData;if(c.key==="0")for(const v of p.children)rs(v,!1);if(c.key==="=")for(const v of p.children)rs(v,!0);if(["1","2","3","4","5","6","7","8","9"].includes(c.key))for(const v of p.children)rs(v,!0,Number(c.key)-1);t.refresh(),t.toCenter(),r=!1,o&&(clearTimeout(o),o=null,t.container.removeEventListener("keydown",l))},h={Enter:c=>{c.shiftKey?t.insertSibling("before"):c.ctrlKey||c.metaKey?t.insertParent():t.insertSibling("after")},Tab:()=>{t.addChild()},F1:()=>{t.toCenter()},F2:()=>{t.beginEdit()},ArrowUp:c=>{if(c.altKey)t.moveUpNode();else{if(c.metaKey||c.ctrlKey)return t.initSide();em(t,"previous")}},ArrowDown:c=>{c.altKey?t.moveDownNode():em(t,"next")},ArrowLeft:c=>{if(c.metaKey||c.ctrlKey)return t.initLeft();Q1(t,oi.LHS)},ArrowRight:c=>{if(c.metaKey||c.ctrlKey)return t.initRight();Q1(t,oi.RHS)},PageUp:()=>t.moveUpNode(),PageDown:()=>{t.moveDownNode()},c:c=>{(c.metaKey||c.ctrlKey)&&(t.waitCopy=t.currentNodes)},x:c=>{(c.metaKey||c.ctrlKey)&&(t.waitCopy=t.currentNodes,n())},v:c=>{!t.waitCopy||!t.currentNode||(c.metaKey||c.ctrlKey)&&(t.waitCopy.length===1?t.copyNode(t.waitCopy[0],t.currentNode):t.copyNodes(t.waitCopy,t.currentNode))},"=":c=>{(c.metaKey||c.ctrlKey)&&tc(t,"in")},"-":c=>{(c.metaKey||c.ctrlKey)&&tc(t,"out")},0:c=>{if(c.metaKey||c.ctrlKey){if(r)return;t.scale(1)}},k:c=>{(c.metaKey||c.ctrlKey)&&(r=!0,o&&(clearTimeout(o),t.container.removeEventListener("keydown",l)),o=window.setTimeout(()=>{r=!1,o=null},2e3),t.container.addEventListener("keydown",l))},Delete:n,Backspace:n,...e};t.container.onkeydown=c=>{if(c.preventDefault(),!t.editable)return;const p=h[c.key];p&&p(c)}}function ky(t){const{dragMoveHelper:e}=t,n=m=>{var x,w,S;if(m.button!==0)return;if((x=t.helper1)!=null&&x.moved){t.helper1.clear();return}if((w=t.helper2)!=null&&w.moved){t.helper2.clear();return}if(e.moved){e.clear();return}const k=m.target;if(k.tagName==="ME-EPD")m.ctrlKey||m.metaKey?t.expandNodeAll(k.previousSibling):t.expandNode(k.previousSibling);else if(k.tagName==="ME-TPC"&&t.currentNodes.length>1)t.selectNode(k);else if(!t.editable)return;const C=(S=k.parentElement)==null?void 0:S.parentElement;C.getAttribute("class")==="topiclinks"?t.selectArrow(k.parentElement):C.getAttribute("class")==="summary"&&t.selectSummary(k.parentElement)},r=m=>{var x,w,S,k;const C=m.target;if(C.tagName==="IMG"){const T=C;T.src,T.alt||T.title;const A=C.closest(".me-tpc");A&&A.nodeObj&&t.bus.fire("showRichTextEditor",A.nodeObj,A);return}if(qh(C)){const T=C;if((x=T.nodeObj)!=null&&x.dangerouslySetInnerHTML&&T.innerHTML.includes("<table")){t.editable&&t.beginEdit(C);return}if((w=T.nodeObj)!=null&&w.image){typeof T.nodeObj.image=="string"?T.nodeObj.image:T.nodeObj.image.url,t.bus.fire("showRichTextEditor",T.nodeObj,T);return}if((S=T.nodeObj)!=null&&S.dangerouslySetInnerHTML&&!T.innerHTML.includes("<table")){t.bus.fire("showRichTextEditor",T.nodeObj,T);return}t.editable&&t.beginEdit(C)}if(t.editable){const T=(k=C.parentElement)==null?void 0:k.parentElement;T.getAttribute("class")==="topiclinks"?t.editArrowLabel(C.parentElement):T.getAttribute("class")==="summary"&&t.editSummary(C.parentElement)}};let o=0;const l=m=>{if(m.pointerType==="mouse")return;const x=new Date().getTime(),w=x-o;w<300&&w>0&&r(m),o=x},h=m=>{e.moved=!1;const x=t.mouseSelectionButton===0?2:0;if(m.button!==x&&m.pointerType==="mouse")return;e.x=m.clientX,e.y=m.clientY;const w=m.target;w.className!=="circle"&&w.contentEditable!=="plaintext-only"&&(e.mousedown=!0,w.setPointerCapture(m.pointerId))},c=m=>{if(m.target.contentEditable!=="plaintext-only"){const x=m.clientX-e.x,w=m.clientY-e.y;e.onMove(x,w)}e.x=m.clientX,e.y=m.clientY},p=m=>{const x=t.mouseSelectionButton===0?2:0;if(m.button!==x&&m.pointerType==="mouse")return;const w=m.target;w.hasPointerCapture&&w.hasPointerCapture(m.pointerId)&&w.releasePointerCapture(m.pointerId),e.clear()},v=m=>{if(m.preventDefault(),m.button!==2||!t.editable)return;const x=m.target;qh(x)&&!x.classList.contains("selected")&&t.selectNode(x),setTimeout(()=>{t.dragMoveHelper.moved||t.bus.fire("showContextMenu",m)},200)},b=m=>{m.stopPropagation(),m.preventDefault(),m.ctrlKey||m.metaKey?m.deltaY<0?tc(t,"in",t.dragMoveHelper):t.scaleVal-t.scaleSensitivity>0&&tc(t,"out",t.dragMoveHelper):m.shiftKey?t.move(-m.deltaY,0):t.move(-m.deltaX,-m.deltaY)},{container:g}=t;return Jp([{dom:g,evt:"pointerdown",func:h},{dom:g,evt:"pointermove",func:c},{dom:g,evt:"pointerup",func:p},{dom:g,evt:"pointerup",func:l},{dom:g,evt:"click",func:n},{dom:g,evt:"dblclick",func:r},{dom:g,evt:"contextmenu",func:v},{dom:g,evt:"wheel",func:typeof t.handleWheel=="function"?t.handleWheel:b}])}function Sy(){return{handlers:{},addListener:function(t,e){this.handlers[t]===void 0&&(this.handlers[t]=[]),this.handlers[t].push(e)},fire:function(t,...e){if(this.handlers[t]instanceof Array){const n=this.handlers[t];for(let r=0;r<n.length;r++)n[r](...e)}},removeListener:function(t,e){if(!this.handlers[t])return;const n=this.handlers[t];if(!e)n.length=0;else if(n.length)for(let r=0;r<n.length;r++)n[r]===e&&this.handlers[t].splice(r,1)}}}const nc=document,Ey=function(){this.nodes.innerHTML="";const t=this.createTopic(this.nodeData);Fc.call(this,t,this.nodeData),t.draggable=!1;const e=nc.createElement("me-root");e.appendChild(t);const n=this.nodeData.children||[];if(this.direction===2){let r=0,o=0;n.map(l=>{l.direction===0?r+=1:l.direction===1?o+=1:r<=o?(l.direction=0,r+=1):(l.direction=1,o+=1)})}Ty(this,n,e)},Ty=function(t,e,n){const r=nc.createElement("me-main");r.className=oi.LHS;const o=nc.createElement("me-main");o.className=oi.RHS;for(let l=0;l<e.length;l++){const h=e[l],{grp:c}=t.createWrapper(h);t.direction===2?h.direction===0?r.appendChild(c):o.appendChild(c):t.direction===0?r.appendChild(c):o.appendChild(c)}t.nodes.appendChild(r),t.nodes.appendChild(n),t.nodes.appendChild(o),t.nodes.appendChild(t.lines)},Ay=function(t,e){const n=nc.createElement("me-children");for(let r=0;r<e.length;r++){const o=e[r],{grp:l}=t.createWrapper(o);n.appendChild(l)}return n};function ef(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zo=ef();function wv(t){zo=t}var El={exec:()=>null};function on(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(o,l)=>{let h=typeof l=="string"?l:l.source;return h=h.replace(xr.caret,"$1"),n=n.replace(o,h),r},getRegex:()=>new RegExp(n,e)};return r}var xr={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:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},My=/^(?:[ \t]*(?:\n|$))+/,Cy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ly=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,jl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_y=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tf=/(?:[*+-]|\d{1,9}[.)])/,xv=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,kv=on(xv).replace(/bull/g,tf).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(),Ny=on(xv).replace(/bull/g,tf).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(),nf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Dy=/^[^\n]+/,rf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ry=on(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Iy=on(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tf).getRegex(),zc="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",af=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Oy=on("^ {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",af).replace("tag",zc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Sv=on(nf).replace("hr",jl).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",zc).getRegex(),Hy=on(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Sv).getRegex(),of={blockquote:Hy,code:Cy,def:Ry,fences:Ly,heading:_y,hr:jl,html:Oy,lheading:kv,list:Iy,newline:My,paragraph:Sv,table:El,text:Dy},tm=on("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",jl).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",zc).getRegex(),Py={...of,lheading:Ny,table:tm,paragraph:on(nf).replace("hr",jl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",tm).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",zc).getRegex()},zy={...of,html:on(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",af).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:El,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:on(nf).replace("hr",jl).replace("heading",` *#{1,6} *[^
]`).replace("lheading",kv).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},By=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Fy=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ev=/^( {2,}|\\)\n(?!\s*$)/,qy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Bc=/[\p{P}\p{S}]/u,sf=/[\s\p{P}\p{S}]/u,Tv=/[^\s\p{P}\p{S}]/u,jy=on(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,sf).getRegex(),Av=/(?!~)[\p{P}\p{S}]/u,$y=/(?!~)[\s\p{P}\p{S}]/u,Uy=/(?:[^\s\p{P}\p{S}]|~)/u,Vy=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Mv=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Wy=on(Mv,"u").replace(/punct/g,Bc).getRegex(),Gy=on(Mv,"u").replace(/punct/g,Av).getRegex(),Cv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ky=on(Cv,"gu").replace(/notPunctSpace/g,Tv).replace(/punctSpace/g,sf).replace(/punct/g,Bc).getRegex(),Xy=on(Cv,"gu").replace(/notPunctSpace/g,Uy).replace(/punctSpace/g,$y).replace(/punct/g,Av).getRegex(),Zy=on("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Tv).replace(/punctSpace/g,sf).replace(/punct/g,Bc).getRegex(),Yy=on(/\\(punct)/,"gu").replace(/punct/g,Bc).getRegex(),Jy=on(/^<(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(),Qy=on(af).replace("(?:-->|$)","-->").getRegex(),e7=on("^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",Qy).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),rc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,t7=on(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",rc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Lv=on(/^!?\[(label)\]\[(ref)\]/).replace("label",rc).replace("ref",rf).getRegex(),_v=on(/^!?\[(ref)\](?:\[\])?/).replace("ref",rf).getRegex(),n7=on("reflink|nolink(?!\\()","g").replace("reflink",Lv).replace("nolink",_v).getRegex(),lf={_backpedal:El,anyPunctuation:Yy,autolink:Jy,blockSkip:Vy,br:Ev,code:Fy,del:El,emStrongLDelim:Wy,emStrongRDelimAst:Ky,emStrongRDelimUnd:Zy,escape:By,link:t7,nolink:_v,punctuation:jy,reflink:Lv,reflinkSearch:n7,tag:e7,text:qy,url:El},r7={...lf,link:on(/^!?\[(label)\]\((.*?)\)/).replace("label",rc).getRegex(),reflink:on(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rc).getRegex()},jh={...lf,emStrongRDelimAst:Xy,emStrongLDelim:Gy,url:on(/^((?: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\S]|[^\\])*?(?:\\[\s\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.!#$%&'*+\/=?_`{\|}~-]+@)))/},i7={...jh,br:on(Ev).replace("{2,}","*").getRegex(),text:on(jh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},i0={normal:of,gfm:Py,pedantic:zy},rl={normal:lf,gfm:jh,breaks:i7,pedantic:r7},a7={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nm=t=>a7[t];function Ri(t,e){if(e){if(xr.escapeTest.test(t))return t.replace(xr.escapeReplace,nm)}else if(xr.escapeTestNoEncode.test(t))return t.replace(xr.escapeReplaceNoEncode,nm);return t}function rm(t){try{t=encodeURI(t).replace(xr.percentDecode,"%")}catch{return null}return t}function im(t,e){var n;let r=t.replace(xr.findPipe,(h,c,p)=>{let v=!1,b=c;for(;--b>=0&&p[b]==="\\";)v=!v;return v?"|":" |"}),o=r.split(xr.splitPipe),l=0;if(o[0].trim()||o.shift(),o.length>0&&!((n=o.at(-1))!=null&&n.trim())&&o.pop(),e)if(o.length>e)o.splice(e);else for(;o.length<e;)o.push("");for(;l<o.length;l++)o[l]=o[l].trim().replace(xr.slashPipe,"|");return o}function il(t,e,n){let r=t.length;if(r===0)return"";let o=0;for(;o<r;){let l=t.charAt(r-o-1);if(l===e&&!n)o++;else if(l!==e&&n)o++;else break}return t.slice(0,r-o)}function o7(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function am(t,e,n,r,o){let l=e.href,h=e.title||null,c=t[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let p={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:h,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,p}function s7(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let o=r[1];return e.split(`
`).map(l=>{let h=l.match(n.other.beginningSpace);if(h===null)return l;let[c]=h;return c.length>=o.length?l.slice(o.length):l}).join(`
`)}var ic=class{constructor(t){vt(this,"options"),vt(this,"rules"),vt(this,"lexer"),this.options=t||zo}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:il(n,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=s7(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=il(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:il(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=il(e[0],`
`).split(`
`),r="",o="",l=[];for(;n.length>0;){let h=!1,c=[],p;for(p=0;p<n.length;p++)if(this.rules.other.blockquoteStart.test(n[p]))c.push(n[p]),h=!0;else if(!h)c.push(n[p]);else break;n=n.slice(p);let v=c.join(`
`),b=v.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
${v}`:v,o=o?`${o}
${b}`:b;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,l,!0),this.lexer.state.top=g,n.length===0)break;let m=l.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let x=m,w=x.raw+`
`+n.join(`
`),S=this.blockquote(w);l[l.length-1]=S,r=r.substring(0,r.length-x.raw.length)+S.raw,o=o.substring(0,o.length-x.text.length)+S.text;break}else if((m==null?void 0:m.type)==="list"){let x=m,w=x.raw+`
`+n.join(`
`),S=this.list(w);l[l.length-1]=S,r=r.substring(0,r.length-m.raw.length)+S.raw,o=o.substring(0,o.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:r,tokens:l,text:o}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let l=this.rules.other.listItemRegex(n),h=!1;for(;t;){let p=!1,v="",b="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;v=e[0],t=t.substring(v.length);let g=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),m=t.split(`
`,1)[0],x=!g.trim(),w=0;if(this.options.pedantic?(w=2,b=g.trimStart()):x?w=e[1].length+1:(w=e[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=g.slice(w),w+=e[1].length),x&&this.rules.other.blankLine.test(m)&&(v+=m+`
`,t=t.substring(m.length+1),p=!0),!p){let C=this.rules.other.nextBulletRegex(w),T=this.rules.other.hrRegex(w),A=this.rules.other.fencesBeginRegex(w),M=this.rules.other.headingBeginRegex(w),y=this.rules.other.htmlBeginRegex(w);for(;t;){let N=t.split(`
`,1)[0],z;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),z=m):z=m.replace(this.rules.other.tabCharGlobal," "),A.test(m)||M.test(m)||y.test(m)||C.test(m)||T.test(m))break;if(z.search(this.rules.other.nonSpaceChar)>=w||!m.trim())b+=`
`+z.slice(w);else{if(x||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(g)||M.test(g)||T.test(g))break;b+=`
`+m}!x&&!m.trim()&&(x=!0),v+=N+`
`,t=t.substring(N.length+1),g=z.slice(w)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(h=!0));let S=null,k;this.options.gfm&&(S=this.rules.other.listIsTask.exec(b),S&&(k=S[0]!=="[ ] ",b=b.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),o.raw+=v}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let p=0;p<o.items.length;p++)if(this.lexer.state.top=!1,o.items[p].tokens=this.lexer.blockTokens(o.items[p].text,[]),!o.loose){let v=o.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));o.loose=b}if(o.loose)for(let p=0;p<o.items.length;p++)o.items[p].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:o}}}table(t){var e;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=im(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(e=n[3])!=null&&e.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],h={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(let c of o)this.rules.other.tableAlignRight.test(c)?h.align.push("right"):this.rules.other.tableAlignCenter.test(c)?h.align.push("center"):this.rules.other.tableAlignLeft.test(c)?h.align.push("left"):h.align.push(null);for(let c=0;c<r.length;c++)h.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:h.align[c]});for(let c of l)h.rows.push(im(c,h.header.length).map((p,v)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:h.align[v]})));return h}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=il(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{let l=o7(e[2],"()");if(l===-2)return;if(l>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let r=e[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],o=l[3])}else o=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),am(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[r.toLowerCase()];if(!o){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return am(n,o,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,l,h,c=o,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+o);(r=v.exec(e))!=null;){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(h=[...l].length,r[3]||r[4]){c+=h;continue}else if((r[5]||r[6])&&o%3&&!((o+h)%3)){p+=h;continue}if(c-=h,c>0)continue;h=Math.min(h,h+c+p);let b=[...r[0]][0].length,g=t.slice(0,o+r.index+b+h);if(Math.min(o,h)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var e;let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=n[0],o="mailto:"+r;else{let l;do l=n[0],n[0]=((e=this.rules.inline._backpedal.exec(n[0]))==null?void 0:e[0])??"";while(l!==n[0]);r=n[0],n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},pa=class $h{constructor(e){vt(this,"tokens"),vt(this,"options"),vt(this,"state"),vt(this,"tokenizer"),vt(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||zo,this.options.tokenizer=this.options.tokenizer||new ic,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:xr,block:i0.normal,inline:rl.normal};this.options.pedantic?(n.block=i0.pedantic,n.inline=rl.pedantic):this.options.gfm&&(n.block=i0.gfm,this.options.breaks?n.inline=rl.breaks:n.inline=rl.gfm),this.tokenizer.rules=n}static get rules(){return{block:i0,inline:rl}}static lex(e,n){return new $h(n).lex(e)}static lexInline(e,n){return new $h(n).inlineTokens(e)}lex(e){e=e.replace(xr.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){var o,l,h;for(this.options.pedantic&&(e=e.replace(xr.tabCharGlobal," ").replace(xr.spaceLine,""));e;){let c;if((l=(o=this.options.extensions)==null?void 0:o.block)!=null&&l.some(v=>(c=v.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let v=n.at(-1);c.raw.length===1&&v!==void 0?v.raw+=`
`:n.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.text,this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.raw,this.inlineQueue.at(-1).src=v.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),n.push(c);continue}let p=e;if((h=this.options.extensions)!=null&&h.startBlock){let v=1/0,b=e.slice(1),g;this.options.extensions.startBlock.forEach(m=>{g=m.call({lexer:this},b),typeof g=="number"&&g>=0&&(v=Math.min(v,g))}),v<1/0&&v>=0&&(p=e.substring(0,v+1))}if(this.state.top&&(c=this.tokenizer.paragraph(p))){let v=n.at(-1);r&&(v==null?void 0:v.type)==="paragraph"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c),r=p.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(v)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var r,o,l;let h=e,c=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(h))!=null;)b.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.anyPunctuation.exec(h))!=null;)h=h.slice(0,c.index)+"++"+h.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(c=this.tokenizer.rules.inline.blockSkip.exec(h))!=null;)h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let p=!1,v="";for(;e;){p||(v=""),p=!1;let b;if((o=(r=this.options.extensions)==null?void 0:r.inline)!=null&&o.some(m=>(b=m.call({lexer:this},e,n))?(e=e.substring(b.raw.length),n.push(b),!0):!1))continue;if(b=this.tokenizer.escape(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.tag(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.link(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(b.raw.length);let m=n.at(-1);b.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(b=this.tokenizer.emStrong(e,h,v)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.codespan(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.br(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.del(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.autolink(e)){e=e.substring(b.raw.length),n.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(e))){e=e.substring(b.raw.length),n.push(b);continue}let g=e;if((l=this.options.extensions)!=null&&l.startInline){let m=1/0,x=e.slice(1),w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},x),typeof w=="number"&&w>=0&&(m=Math.min(m,w))}),m<1/0&&m>=0&&(g=e.substring(0,m+1))}if(b=this.tokenizer.inlineText(g)){e=e.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(v=b.raw.slice(-1)),p=!0;let m=n.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(e){let m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(m)}}return n}},ac=class{constructor(t){vt(this,"options"),vt(this,"parser"),this.options=t||zo}space(t){return""}code({text:t,lang:e,escaped:n}){var r;let o=(r=(e||"").match(xr.notSpaceStart))==null?void 0:r[0],l=t.replace(xr.endingNewline,"")+`
`;return o?'<pre><code class="language-'+Ri(o)+'">'+(n?l:Ri(l,!0))+`</code></pre>
`:"<pre><code>"+(n?l:Ri(l,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(t){let e=t.ordered,n=t.start,r="";for(let h=0;h<t.items.length;h++){let c=t.items[h];r+=this.listitem(c)}let o=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+o+l+`>
`+r+"</"+o+`>
`}listitem(t){var e;let n="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?((e=t.tokens[0])==null?void 0:e.type)==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+Ri(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):n+=r+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let e="",n="";for(let o=0;o<t.header.length;o++)n+=this.tablecell(t.header[o]);e+=this.tablerow({text:n});let r="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];n="";for(let h=0;h<l.length;h++)n+=this.tablecell(l[h]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+r+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ri(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),o=rm(t);if(o===null)return r;t=o;let l='<a href="'+t+'"';return e&&(l+=' title="'+Ri(e)+'"'),l+=">"+r+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=rm(t);if(o===null)return Ri(n);t=o;let l=`<img src="${t}" alt="${n}"`;return e&&(l+=` title="${Ri(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ri(t.text)}},cf=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},fa=class Uh{constructor(e){vt(this,"options"),vt(this,"renderer"),vt(this,"textRenderer"),this.options=e||zo,this.options.renderer=this.options.renderer||new ac,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new cf}static parse(e,n){return new Uh(n).parse(e)}static parseInline(e,n){return new Uh(n).parseInline(e)}parse(e,n=!0){var r,o;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[c.type]){let v=c,b=this.options.extensions.renderers[v.type].call({parser:this},v);if(b!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(v.type)){l+=b||"";continue}}let p=c;switch(p.type){case"space":{l+=this.renderer.space(p);continue}case"hr":{l+=this.renderer.hr(p);continue}case"heading":{l+=this.renderer.heading(p);continue}case"code":{l+=this.renderer.code(p);continue}case"table":{l+=this.renderer.table(p);continue}case"blockquote":{l+=this.renderer.blockquote(p);continue}case"list":{l+=this.renderer.list(p);continue}case"html":{l+=this.renderer.html(p);continue}case"def":{l+=this.renderer.def(p);continue}case"paragraph":{l+=this.renderer.paragraph(p);continue}case"text":{let v=p,b=this.renderer.text(v);for(;h+1<e.length&&e[h+1].type==="text";)v=e[++h],b+=`
`+this.renderer.text(v);n?l+=this.renderer.paragraph({type:"paragraph",raw:b,text:b,tokens:[{type:"text",raw:b,text:b,escaped:!0}]}):l+=b;continue}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}parseInline(e,n=this.renderer){var r,o;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[c.type]){let v=this.options.extensions.renderers[c.type].call({parser:this},c);if(v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){l+=v||"";continue}}let p=c;switch(p.type){case"escape":{l+=n.text(p);break}case"html":{l+=n.html(p);break}case"link":{l+=n.link(p);break}case"image":{l+=n.image(p);break}case"strong":{l+=n.strong(p);break}case"em":{l+=n.em(p);break}case"codespan":{l+=n.codespan(p);break}case"br":{l+=n.br(p);break}case"del":{l+=n.del(p);break}case"text":{l+=n.text(p);break}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}},Ud,I0=(Ud=class{constructor(t){vt(this,"options"),vt(this,"block"),this.options=t||zo}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?pa.lex:pa.lexInline}provideParser(){return this.block?fa.parse:fa.parseInline}},vt(Ud,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Ud),l7=class{constructor(...t){vt(this,"defaults",ef()),vt(this,"options",this.setOptions),vt(this,"parse",this.parseMarkdown(!0)),vt(this,"parseInline",this.parseMarkdown(!1)),vt(this,"Parser",fa),vt(this,"Renderer",ac),vt(this,"TextRenderer",cf),vt(this,"Lexer",pa),vt(this,"Tokenizer",ic),vt(this,"Hooks",I0),this.use(...t)}walkTokens(t,e){var n,r;let o=[];for(let l of t)switch(o=o.concat(e.call(this,l)),l.type){case"table":{let h=l;for(let c of h.header)o=o.concat(this.walkTokens(c.tokens,e));for(let c of h.rows)for(let p of c)o=o.concat(this.walkTokens(p.tokens,e));break}case"list":{let h=l;o=o.concat(this.walkTokens(h.items,e));break}default:{let h=l;(r=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&r[h.type]?this.defaults.extensions.childTokens[h.type].forEach(c=>{let p=h[c].flat(1/0);o=o.concat(this.walkTokens(p,e))}):h.tokens&&(o=o.concat(this.walkTokens(h.tokens,e)))}}return o}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=e.renderers[o.name];l?e.renderers[o.name]=function(...h){let c=o.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[o.level];l?l.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){let o=this.defaults.renderer||new ac(this.defaults);for(let l in n.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new ic(this.defaults);for(let l in n.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new I0;for(let l in n.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let h=l,c=n.hooks[h],p=o[h];I0.passThroughHooks.has(l)?o[h]=v=>{if(this.defaults.async)return Promise.resolve(c.call(o,v)).then(g=>p.call(o,g));let b=c.call(o,v);return p.call(o,b)}:o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,l=n.walkTokens;r.walkTokens=function(h){let c=[];return c.push(l.call(this,h)),o&&(c=c.concat(o.call(this,h))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return pa.lex(t,e??this.defaults)}parser(t,e){return fa.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},o={...this.defaults,...r},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return l(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 e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=t);let h=o.hooks?o.hooks.provideLexer():t?pa.lex:pa.lexInline,c=o.hooks?o.hooks.provideParser():t?fa.parse:fa.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(p=>h(p,o)).then(p=>o.hooks?o.hooks.processAllTokens(p):p).then(p=>o.walkTokens?Promise.all(this.walkTokens(p,o.walkTokens)).then(()=>p):p).then(p=>c(p,o)).then(p=>o.hooks?o.hooks.postprocess(p):p).catch(l);try{o.hooks&&(e=o.hooks.preprocess(e));let p=h(e,o);o.hooks&&(p=o.hooks.processAllTokens(p)),o.walkTokens&&this.walkTokens(p,o.walkTokens);let v=c(p,o);return o.hooks&&(v=o.hooks.postprocess(v)),v}catch(p){return l(p)}}}onError(t,e){return n=>{if(n.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Ri(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},Ro=new l7;function an(t,e){return Ro.parse(t,e)}an.options=an.setOptions=function(t){return Ro.setOptions(t),an.defaults=Ro.defaults,wv(an.defaults),an};an.getDefaults=ef;an.defaults=zo;an.use=function(...t){return Ro.use(...t),an.defaults=Ro.defaults,wv(an.defaults),an};an.walkTokens=function(t,e){return Ro.walkTokens(t,e)};an.parseInline=Ro.parseInline;an.Parser=fa;an.parser=fa.parse;an.Renderer=ac;an.TextRenderer=cf;an.Lexer=pa;an.lexer=pa.lex;an.Tokenizer=ic;an.Hooks=I0;an.parse=an;an.options;an.setOptions;an.use;an.walkTokens;an.parseInline;fa.parse;pa.lex;const Sn=document,Nv=function(t,e){const n=(this!=null&&this.el?this.el:e||document).querySelector(`[data-nodeid="me${t}"]`);if(!n)throw new Error(`FindEle: Node ${t} not found, maybe it's collapsed.`);return n},Fc=function(t,e){if(t.innerHTML="",e.style){const r=e.style;for(const o in r)t.style[o]=r[o]}if(e.dangerouslySetInnerHTML){const r=e.dangerouslySetInnerHTML;if(r.includes("|")&&r.includes("-")||r.includes("![")||r.includes("#")||r.includes("**")||r.includes("`")){t.innerHTML='<div class="node-loading"><div class="loading-spinner"></div><span>渲染中...</span></div>',t.classList.add("mindmap-node-rendering");try{Promise.resolve().then(()=>sk).then(({default:o})=>{o.preview(t,r,{mode:"dark",hljs:{style:"github"},after:()=>{t.classList.remove("mindmap-node-rendering"),t.classList.add("mindmap-node-completed")}})}).catch(o=>{n(t,r)})}catch{n(t,r)}return}n(t,r);return}function n(r,o){let l=o;l.includes("<table")||l.includes("<td>")||l.includes("<th>")?(l=l.replace(/•\s*【/g,"【"),l=l.replace(/•\s*\[/g,"["),l=l.replace(/•\s*/g,""),l=l.replace(/•\s*\(/g,"(")):(l=l.replace(/•\s*【/g,"【"),l=l.replace(/•\s*\[/g,"["),l=l.replace(/•\s*/g,""),l=l.replace(/•\s*\(/g,"("),l=l.replace(/^(\s*)•\s*(.+)$/gm,"<li>$2</li>").replace(/(<li>.*<\/li>)/gs,h=>l.includes("<ul>")?h:`<ul>${h}</ul>`).replace(/\n/g,"<br>")),r.innerHTML=l,l.includes("<img"),e.image,r.classList.add("no-image"),r.classList.remove("has-image")}if(e.image){const r=e.image;if(r.url&&r.width&&r.height){const o=Sn.createElement("img");o.src=this.imageProxy?this.imageProxy(r.url):r.url,o.style.width=r.width+"px",o.style.height=r.height+"px",r.fit&&(o.style.objectFit=r.fit),t.appendChild(o),t.image=o}}else t.image&&(t.image=void 0);{const r=Sn.createElement("span");r.className="text";let o="";this.markdown?o=this.markdown(e.topic,e):o=e.topic||"",o=o.replace(/•\s*【/g,"【"),o=o.replace(/•\s*\[/g,"["),o=o.replace(/•\s*/g,""),o=o.replace(/•\s*\(/g,"("),r.innerHTML=o,t.appendChild(r),t.text=r,e.image,o.includes("<img"),t.classList.add("no-image"),t.classList.remove("has-image")}if(e.hyperLink){const r=Sn.createElement("a");r.className="hyper-link",r.target="_blank",r.innerText="🔗",r.href=e.hyperLink,t.appendChild(r),t.link=r}else t.link&&(t.link=void 0);if(e.icons&&e.icons.length){const r=Sn.createElement("span");r.className="icons",r.innerHTML=e.icons.map(o=>`<span>${Fh(o)}</span>`).join(""),t.appendChild(r),t.icons=r}else t.icons&&(t.icons=void 0);if(e.tags&&e.tags.length){const r=Sn.createElement("div");r.className="tags",e.tags.forEach(o=>{const l=Sn.createElement("span");typeof o=="string"?l.textContent=o:(l.textContent=o.text,o.className&&(l.className=o.className),o.style&&Object.assign(l.style,o.style)),r.appendChild(l)}),t.appendChild(r),t.tags=r}else t.tags&&(t.tags=void 0)},c7=function(t,e){const n=Sn.createElement("me-wrapper"),{p:r,tpc:o}=this.createParent(t);if(n.appendChild(r),!e&&t.children&&t.children.length>0){const l=uf(t.expanded);if(r.appendChild(l),t.expanded!==!1){const h=Ay(this,t.children);n.appendChild(h)}}return{grp:n,top:r,tpc:o}},u7=function(t){const e=Sn.createElement("me-parent"),n=this.createTopic(t);return Fc.call(this,n,t),e.appendChild(n),{p:e,tpc:n}},d7=function(t){const e=Sn.createElement("me-children");return e.append(...t),e},h7=function(t){const e=Sn.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e.draggable=this.draggable,e};function Dv(t){const e=Sn.createRange();e.selectNodeContents(t);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(e))}const p7=function(t){if(!t)return;const e=Sn.createElement("div"),n=t.nodeObj,r=n.topic;t.appendChild(e),e.id="input-box",e.textContent=r,e.contentEditable="plaintext-only",e.spellcheck=!1;const o=getComputedStyle(t);e.style.cssText=`min-width:${t.offsetWidth-8}px;
color:${o.color};
padding:${o.padding};
margin:${o.margin};
font:${o.font};
background-color:${o.backgroundColor!=="rgba(0, 0, 0, 0)"&&o.backgroundColor};
border-radius:${o.borderRadius};`,this.direction===0&&(e.style.right="0"),Dv(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",l=>{l.stopPropagation();const h=l.key;if(h==="Enter"||h==="Tab"){if(l.shiftKey)return;l.preventDefault(),e.blur(),this.container.focus()}}),e.addEventListener("blur",()=>{var l;if(!e)return;const h=((l=e.textContent)==null?void 0:l.trim())||"";h===""?n.topic=r:(n.topic=h,this.markdown?t.text.innerHTML=this.markdown(n.topic,n):t.text.textContent=h),e.remove(),Fc.call(this,t,n),h!==r&&(this.linkDiv(),this.bus.fire("operation",{name:"finishEdit",obj:n,origin:r}))})},uf=function(t){const e=Sn.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},f7=function(t){if(!t)return;const e=t.nodeObj,n=e.dangerouslySetInnerHTML||"",r=Sn.createElement("div");r.id="table-edit-overlay",r.style.cssText=`
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 9999;
`;const o=Sn.createElement("div");o.id="table-edit-container",o.style.cssText=`
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 600px;
min-height: 400px;
max-height: 80vh;
background: white;
border: 2px solid #660874;
border-radius: 8px;
padding: 15px;
z-index: 10000;
box-shadow: 0 8px 24px rgba(0,0,0,0.3);
display: flex;
flex-direction: column;
`;const l=Sn.createElement("div");l.textContent="编辑表格Markdown格式",l.style.cssText=`
font-size: 14px;
font-weight: 600;
color: #333;
margin-bottom: 10px;
padding-bottom: 8px;
border-bottom: 1px solid #e0e0e0;
`;const h=Sn.createElement("textarea");h.value=this.convertTableHTMLToMarkdown(n),h.style.cssText=`
flex: 1;
min-height: 300px;
border: 1px solid #ddd;
border-radius: 4px;
padding: 12px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
font-size: 13px;
line-height: 1.5;
resize: vertical;
outline: none;
background: #fafafa;
color: #333;
caret-color: #660874;
`,h.setAttribute("spellcheck","false"),h.setAttribute("autocomplete","off"),h.setAttribute("autocorrect","off"),h.setAttribute("autocapitalize","off");const c=Sn.createElement("div");c.style.cssText=`
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid #e0e0e0;
`;const p=Sn.createElement("span");p.textContent="提示: Ctrl+Enter保存, Esc取消",p.style.cssText=`
font-size: 11px;
color: #999;
`;const v=Sn.createElement("div");v.style.cssText=`
display: flex;
gap: 8px;
`;const b=Sn.createElement("button");b.textContent="取消",b.style.cssText=`
padding: 8px 20px;
background: #6c757d;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
transition: background 0.2s;
`,b.addEventListener("mouseenter",()=>{b.style.background="#5a6268"}),b.addEventListener("mouseleave",()=>{b.style.background="#6c757d"});const g=Sn.createElement("button");g.textContent="保存",g.style.cssText=`
padding: 8px 20px;
background: #660874;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
font-weight: 500;
transition: background 0.2s;
`,g.addEventListener("mouseenter",()=>{g.style.background="#4d0655"}),g.addEventListener("mouseleave",()=>{g.style.background="#660874"}),v.appendChild(b),v.appendChild(g),c.appendChild(p),c.appendChild(v),o.appendChild(l),o.appendChild(h),o.appendChild(c),Sn.body.appendChild(r),Sn.body.appendChild(o),r.addEventListener("click",()=>{r.remove(),o.remove()}),setTimeout(()=>{h.focus(),h.setSelectionRange(0,0)},50);const m=()=>{const w=h.value.trim();if(w===this.convertTableHTMLToMarkdown(n)){r.remove(),o.remove();return}an.setOptions({breaks:!1,gfm:!0});const S=an.parse(w).replace(/<table>/g,'<table class="markdown-table">');r.remove(),o.remove(),e.dangerouslySetInnerHTML=S,e.topic=w,t.innerHTML=S,this.bus.fire("operation",{name:"finishEditTable",obj:e,origin:n}),t.classList.add("no-image"),t.classList.remove("has-image"),this.bus.fire("operation",{name:"finishEditTable",obj:e,origin:n}),this.linkDiv()},x=()=>{r.remove(),o.remove()};g.addEventListener("click",m),b.addEventListener("click",x),h.addEventListener("keydown",w=>{w.stopPropagation(),w.key==="Escape"?(w.preventDefault(),x()):w.key==="Enter"&&w.ctrlKey&&(w.preventDefault(),m())})},m7=function(t){const e=Sn.createElement("div");e.innerHTML=t;const n=e.querySelector("table");if(!n)return t;let r="";const o=n.querySelector("thead");if(o){const h=o.querySelector("tr");if(h){const c=Array.from(h.querySelectorAll("th")).map(p=>{var v;return((v=p.textContent)==null?void 0:v.trim())||""});r+="| "+c.join(" | ")+` |
`,r+="| "+c.map(()=>"---").join(" | ")+` |
`}}const l=n.querySelector("tbody");return l&&l.querySelectorAll("tr").forEach(h=>{const c=Array.from(h.querySelectorAll("td")).map(p=>{var v;return((v=p.textContent)==null?void 0:v.trim())||""});r+="| "+c.join(" | ")+` |
`}),r.trim()},Do=document,ri="http://www.w3.org/2000/svg",Vh=function(t,e,n,r={}){const{anchor:o="middle",color:l,dataType:h}=r,c=document.createElementNS(ri,"text");return En(c,{"text-anchor":o,x:e+"",y:n+"",fill:l||(o==="middle"?"rgb(235, 95, 82)":"#666")}),h&&(c.dataset.type=h),c.innerHTML=t,c},Rv=function(t,e,n){const r=Do.createElementNS(ri,"path");return En(r,{d:t,stroke:e||"#666",fill:"none","stroke-width":n}),r},pl=function(t){const e=Do.createElementNS(ri,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},om=function(){const t=Do.createElementNS(ri,"line");return t.setAttribute("stroke","#4dc4ff"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t.setAttribute("opacity","0.45"),t},g7=function(t,e,n,r){const o=Do.createElementNS(ri,"g");return[{name:"line",d:t},{name:"arrow1",d:e},{name:"arrow2",d:n}].forEach((l,h)=>{const c=l.d,p=Do.createElementNS(ri,"path"),v={d:c,stroke:(r==null?void 0:r.stroke)||"rgb(235, 95, 82)",fill:"none","stroke-linecap":(r==null?void 0:r.strokeLinecap)||"cap","stroke-width":String((r==null?void 0:r.strokeWidth)||"2")};(r==null?void 0:r.opacity)!==void 0&&(v.opacity=String(r.opacity)),En(p,v),h===0&&p.setAttribute("stroke-dasharray",(r==null?void 0:r.strokeDasharray)||"8,2");const b=Do.createElementNS(ri,"path");En(b,{d:c,stroke:"transparent",fill:"none","stroke-width":"15"}),o.appendChild(b),o.appendChild(p),o[l.name]=p}),o},Iv=function(t,e,n){if(!e)return;const r=Do.createElement("div");t.nodes.appendChild(r);const o=e.innerHTML;r.id="input-box",r.textContent=o,r.contentEditable="plaintext-only",r.spellcheck=!1;const l=e.getBBox();r.style.cssText=`
min-width:${Math.max(88,l.width)}px;
position:absolute;
left:${l.x}px;
top:${l.y}px;
padding: 2px 4px;
margin: -2px -4px;
`,Dv(r),t.scrollIntoView(r),r.addEventListener("keydown",h=>{h.stopPropagation();const c=h.key;if(c==="Enter"||c==="Tab"){if(h.shiftKey)return;h.preventDefault(),r.blur(),t.container.focus()}}),r.addEventListener("blur",()=>{var h;if(!r)return;const c=((h=r.textContent)==null?void 0:h.trim())||"";c===""?n.label=o:n.label=c,r.remove(),c!==o&&(e.innerHTML=n.label,"parent"in n?t.bus.fire("operation",{name:"finishEditSummary",obj:n}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},v7=function(t){const e=this.map.querySelector("me-root"),n=e.offsetTop,r=e.offsetLeft,o=e.offsetWidth,l=e.offsetHeight,h=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let c=0;c<h.length;c++){const p=h[c],v=p.querySelector("me-tpc"),{offsetLeft:b,offsetTop:g}=ql(this.nodes,v),m=v.offsetWidth,x=v.offsetHeight,w=p.parentNode.className,S=this.generateMainBranch({pT:n,pL:r,pW:o,pH:l,cT:g,cL:b,cW:m,cH:x,direction:w,containerHeight:this.nodes.offsetHeight}),k=this.theme.palette,C=v.nodeObj.branchColor||k[c%k.length];if(v.style.borderColor=C,this.lines.appendChild(Rv(S,C,"3")),t&&t!==p)continue;const T=pl("subLines"),A=p.lastChild;A.tagName==="svg"&&A.remove(),p.appendChild(T),Ov(this,T,C,p,w,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},Ov=function(t,e,n,r,o,l){const h=r.firstChild,c=r.children[1].children;if(c.length===0)return;const p=h.offsetTop,v=h.offsetLeft,b=h.offsetWidth,g=h.offsetHeight;for(let m=0;m<c.length;m++){const x=c[m],w=x.firstChild,S=w.offsetTop,k=w.offsetLeft,C=w.offsetWidth,T=w.offsetHeight,A=w.firstChild.nodeObj.branchColor||n,M=t.generateSubBranch({pT:p,pL:v,pW:b,pH:g,cT:S,cL:k,cW:C,cH:T,direction:o,isFirst:l});e.appendChild(Rv(M,A,"2"));const y=w.children[1];if(y){if(!y.expanded)continue}else continue;Ov(t,e,A,x,o)}},sm={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",linkBidirectional:"双向连接",clickTips:"请点击目标节点",summary:"摘要"},lm={cn:sm,zh_CN:sm,zh_TW:{addChild:"插入子節點",addParent:"插入父節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",linkBidirectional:"雙向連接",clickTips:"請點擊目標節點",summary:"摘要"},en:{addChild:"Add child",addParent:"Add parent",addSibling:"Add sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",linkBidirectional:"Bidirectional Link",clickTips:"Please click the target node",summary:"Summary"},ru:{addChild:"Добавить дочерний элемент",addParent:"Добавить родительский элемент",addSibling:"Добавить на этом уровне",removeNode:"Удалить узел",focus:"Режим фокусировки",cancelFocus:"Отменить режим фокусировки",moveUp:"Поднять выше",moveDown:"Опустить ниже",link:"Ссылка",linkBidirectional:"Двунаправленная ссылка",clickTips:"Пожалуйста, нажмите на целевой узел",summary:"Описание"},ja:{addChild:"子ノードを追加する",addParent:"親ノードを追加します",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",linkBidirectional:"双方向リンク",clickTips:"ターゲットノードをクリックしてください",summary:"概要"},pt:{addChild:"Adicionar item filho",addParent:"Adicionar item pai",addSibling:"Adicionar item irmao",removeNode:"Remover item",focus:"Modo Foco",cancelFocus:"Cancelar Modo Foco",moveUp:"Mover para cima",moveDown:"Mover para baixo",link:"Link",linkBidirectional:"Link bidirecional",clickTips:"Favor clicar no item alvo",summary:"Resumo"},it:{addChild:"Aggiungi figlio",addParent:"Aggiungi genitore",addSibling:"Aggiungi fratello",removeNode:"Rimuovi nodo",focus:"Modalità Focus",cancelFocus:"Annulla Modalità Focus",moveUp:"Sposta su",moveDown:"Sposta giù",link:"Collega",linkBidirectional:"Collegamento bidirezionale",clickTips:"Si prega di fare clic sul nodo di destinazione",summary:"Unisci nodi"},es:{addChild:"Agregar hijo",addParent:"Agregar padre",addSibling:"Agregar hermano",removeNode:"Eliminar nodo",focus:"Modo Enfoque",cancelFocus:"Cancelar Modo Enfoque",moveUp:"Mover hacia arriba",moveDown:"Mover hacia abajo",link:"Enlace",linkBidirectional:"Enlace bidireccional",clickTips:"Por favor haga clic en el nodo de destino",summary:"Resumen"},fr:{addChild:"Ajout enfant",addParent:"Ajout parent",addSibling:"Ajout voisin",removeNode:"Supprimer",focus:"Cibler",cancelFocus:"Retour",moveUp:"Monter",moveDown:"Descendre",link:"Lier",linkBidirectional:"Lien bidirectionnel",clickTips:"Cliquer sur le noeud cible",summary:"Annoter"},ko:{addChild:"자식 추가",addParent:"부모 추가",addSibling:"형제 추가",removeNode:"노드 삭제",focus:"포커스 모드",cancelFocus:"포커스 모드 취소",moveUp:"위로 이동",moveDown:"아래로 이동",link:"연결",linkBidirectional:"양방향 연결",clickTips:"대상 노드를 클릭하십시오",summary:"요약"}};function b7(t,e){e=e===!0?{focus:!0,link:!0}:e;const n=F=>{const P=document.createElement("div");return P.innerText=F,P.className="tips",P},r=(F,P,Y)=>{const te=document.createElement("li");return te.id=F,te.innerHTML=`<span>${Fh(P)}</span><span ${Y?'class="key"':""}>${Fh(Y)}</span>`,te},o=lm[t.locale]?t.locale:"en",l=lm[o],h=r("cm-add_child",l.addChild,"Tab"),c=r("cm-add_parent",l.addParent,"Ctrl + Enter"),p=r("cm-add_sibling",l.addSibling,"Enter"),v=r("cm-remove_child",l.removeNode,"Delete"),b=r("cm-fucus",l.focus,""),g=r("cm-unfucus",l.cancelFocus,""),m=r("cm-up",l.moveUp,"PgUp"),x=r("cm-down",l.moveDown,"Pgdn"),w=r("cm-link",l.link,""),S=r("cm-link-bidirectional",l.linkBidirectional,""),k=r("cm-summary",l.summary,""),C=r("cm-image-preview","预览图片",""),T=r("cm-rich-text-edit","编辑内容",""),A=document.createElement("ul");if(A.className="menu-list",A.appendChild(h),A.appendChild(c),A.appendChild(p),A.appendChild(v),e.focus&&(A.appendChild(b),A.appendChild(g)),A.appendChild(m),A.appendChild(x),A.appendChild(k),A.appendChild(C),A.appendChild(T),e.link&&(A.appendChild(w),A.appendChild(S)),e&&e.extend)for(let F=0;F<e.extend.length;F++){const P=e.extend[F],Y=r(P.name,P.name,P.key||"");A.appendChild(Y),Y.onclick=te=>{P.onclick(te)}}const M=document.createElement("div");M.className="context-menu",M.appendChild(A),M.hidden=!0,t.container.append(M);let y=!0;const N=F=>{var P,Y;const te=F.target;if(qh(te)){te.parentElement.tagName==="ME-ROOT"?y=!0:y=!1;const ce=te;(P=ce.nodeObj)!=null&&P.image||(Y=ce.nodeObj)!=null&&Y.dangerouslySetInnerHTML||ce.querySelector("img")?(C.style.display="block",C.className="",T.style.display="block",T.className=""):(C.style.display="none",T.style.display="none"),y?(b.className="disabled",m.className="disabled",x.className="disabled",c.className="disabled",p.className="disabled",v.className="disabled"):(b.className="",m.className="",x.className="",c.className="",p.className="",v.className=""),M.hidden=!1,A.style.top="",A.style.bottom="",A.style.left="",A.style.right="";const Me=A.getBoundingClientRect(),Fe=A.offsetHeight,We=A.offsetWidth,rt=F.clientY-Me.top,je=F.clientX-Me.left;Fe+rt>window.innerHeight?(A.style.top="",A.style.bottom="0px"):(A.style.bottom="",A.style.top=rt+15+"px"),We+je>window.innerWidth?(A.style.left="",A.style.right="0px"):(A.style.right="",A.style.left=je+10+"px")}};t.bus.addListener("showContextMenu",N),M.onclick=F=>{F.target===M&&(M.hidden=!0)},h.onclick=()=>{t.addChild(),M.hidden=!0},c.onclick=()=>{t.insertParent(),M.hidden=!0},p.onclick=()=>{y||(t.insertSibling("after"),M.hidden=!0)},v.onclick=()=>{y||(t.removeNodes(t.currentNodes||[]),M.hidden=!0)},b.onclick=()=>{y||(t.focusNode(t.currentNode),M.hidden=!0)},g.onclick=()=>{t.cancelFocus(),M.hidden=!0},m.onclick=()=>{y||(t.moveUpNode(),M.hidden=!0)},x.onclick=()=>{y||(t.moveDownNode(),M.hidden=!0)};const z=F=>{M.hidden=!0;const P=t.currentNode,Y=n(l.clickTips);t.container.appendChild(Y),t.map.addEventListener("click",te=>{te.preventDefault(),Y.remove();const ce=te.target;(ce.parentElement.tagName==="ME-PARENT"||ce.parentElement.tagName==="ME-ROOT")&&t.createArrow(P,ce,F)},{once:!0})};return w.onclick=()=>z(),S.onclick=()=>z({bidirectional:!0}),k.onclick=()=>{M.hidden=!0,t.createSummary(),t.unselectNodes(t.currentNodes)},C.onclick=()=>{var F,P;M.hidden=!0;const Y=t.currentNode;if(Y)if((F=Y.nodeObj)!=null&&F.image){const te=typeof Y.nodeObj.image=="string"?Y.nodeObj.image:Y.nodeObj.image.url;t.bus.fire("showImagePreview",te,Y.nodeObj.topic||"")}else{const te=Y.querySelector("img");if(te){const ce=te.src,Me=te.alt||te.title||((P=Y.nodeObj)==null?void 0:P.topic)||"";t.bus.fire("showImagePreview",ce,Me)}}},T.onclick=()=>{M.hidden=!0;const F=t.currentNode;F&&t.bus.fire("showRichTextEditor",F.nodeObj,F)},()=>{h.onclick=null,c.onclick=null,p.onclick=null,v.onclick=null,b.onclick=null,g.onclick=null,m.onclick=null,x.onclick=null,w.onclick=null,k.onclick=null,M.onclick=null,t.container.oncontextmenu=null}}const Wh=document,y7=function(t,e){if(!e)return Gh(t),t;let n=t.querySelector(".insert-preview");const r=`insert-preview ${e} show`;return n||(n=Wh.createElement("div"),t.appendChild(n)),n.className=r,t},Gh=function(t){if(!t)return;const e=t.querySelectorAll(".insert-preview");for(const n of e||[])n.remove()},cm=function(t,e){for(const n of e){const r=n.parentElement.parentElement.contains(t);if(!(t&&t.tagName==="ME-TPC"&&t!==n&&!r&&t.nodeObj.parent))return!1}return!0},w7=function(t){const e=document.createElement("div");return e.className="mind-elixir-ghost",t.container.appendChild(e),e};class x7{constructor(e){vt(this,"mind"),vt(this,"isMoving",!1),vt(this,"interval",null),vt(this,"speed",20),this.mind=e}move(e,n){this.isMoving||(this.isMoving=!0,this.interval=setInterval(()=>{this.mind.move(e*this.speed*this.mind.scaleVal,n*this.speed*this.mind.scaleVal)},100))}stop(){this.isMoving=!1,clearInterval(this.interval)}}function k7(t){let e=null,n=null;const r=w7(t),o=new x7(t),l=p=>{t.selection.cancel();const v=p.target;if((v==null?void 0:v.tagName)!=="ME-TPC"){p.preventDefault();return}let b=t.currentNodes;b!=null&&b.includes(v)||(t.selectNode(v),b=t.currentNodes),t.dragged=b,b.length>1?r.innerHTML=b.length+"":r.innerHTML=v.innerHTML;for(const g of b)g.parentElement.parentElement.style.opacity="0.5";p.dataTransfer.setDragImage(r,0,0),p.dataTransfer.dropEffect="move",t.dragMoveHelper.clear()},h=p=>{const{dragged:v}=t;if(!v)return;o.stop();for(const g of v)g.parentElement.parentElement.style.opacity="1";const b=p.target;b.style.opacity="",n&&(Gh(n),e==="before"?t.moveNodeBefore(v,n):e==="after"?t.moveNodeAfter(v,n):e==="in"&&t.moveNodeIn(v,n),t.dragged=null,r.innerHTML="")},c=p=>{p.preventDefault();const v=12*t.scaleVal,{dragged:b}=t;if(!b)return;const g=t.container.getBoundingClientRect();p.clientX<g.x+50?o.move(1,0):p.clientX>g.x+g.width-50?o.move(-1,0):p.clientY<g.y+50?o.move(0,1):p.clientY>g.y+g.height-50?o.move(0,-1):o.stop(),Gh(n);const m=Wh.elementFromPoint(p.clientX,p.clientY-v);if(cm(m,b)){n=m;const x=m.getBoundingClientRect(),w=x.y;p.clientY>w+x.height?e="after":e="in"}else{const x=Wh.elementFromPoint(p.clientX,p.clientY+v),w=x.getBoundingClientRect();if(cm(x,b)){n=x;const S=w.y;p.clientY<S?e="before":e="in"}else e=n=null}n&&y7(n,e)};return Jp([{dom:t.map,evt:"dragstart",func:l},{dom:t.map,evt:"dragend",func:h},{dom:t.map,evt:"dragover",func:c}])}const S7=function(t){return["createSummary","removeSummary","finishEditSummary"].includes(t.name)?{type:"summary",value:t.obj.id}:["createArrow","removeArrow","finishEditArrowLabel"].includes(t.name)?{type:"arrow",value:t.obj.id}:["removeNodes","copyNodes","moveNodeBefore","moveNodeAfter","moveNodeIn"].includes(t.name)?{type:"nodes",value:t.objs.map(e=>e.id)}:{type:"nodes",value:[t.obj.id]}};function E7(t){let e=[],n=-1,r=t.getData(),o=[];t.undo=function(){if(n>-1){const p=e[n];r=p.prev,t.refresh(p.prev);try{p.currentTarget.type==="nodes"&&(p.operation==="removeNodes"?t.selectNodes(p.currentTarget.value.map(v=>this.findEle(v))):t.selectNodes(p.currentSelected.map(v=>this.findEle(v))))}catch{}finally{n--}}},t.redo=function(){if(n<e.length-1){n++;const p=e[n];r=p.next,t.refresh(p.next);try{p.currentTarget.type==="nodes"&&(p.operation==="removeNodes"?t.selectNodes(p.currentSelected.map(v=>this.findEle(v))):t.selectNodes(p.currentTarget.value.map(v=>this.findEle(v))))}catch{}}};const l=function(p){if(p.name==="beginEdit")return;e=e.slice(0,n+1);const v=t.getData(),b={prev:r,operation:p.name,currentSelected:o.map(g=>g.id),currentTarget:S7(p),next:v};e.push(b),r=v,n=e.length-1},h=function(p){(p.metaKey||p.ctrlKey)&&(p.shiftKey&&p.key==="Z"||p.key==="y")?t.redo():(p.metaKey||p.ctrlKey)&&p.key==="z"&&t.undo()},c=function(p){o=t.currentNodes.map(v=>v.nodeObj)};return t.bus.addListener("operation",l),t.bus.addListener("selectNodes",c),t.container.addEventListener("keydown",h),()=>{t.bus.removeListener("operation",l),t.bus.removeListener("selectNodes",c),t.container.removeEventListener("keydown",h)}}const T7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>',A7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>',M7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>',C7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>',L7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>',_7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>',N7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>',D7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M896 128H128c-35.3 0-64 28.7-64 64v640c0 35.3 28.7 64 64 64h768c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64zM832 832H192V192h640v640z" p-id="2481"></path><path d="M192 256h640v64H192v-64zM192 384h640v64H192v-64zM192 512h640v64H192v-64zM192 640h448v64H192v-64zM192 768h320v64H192v-64z" p-id="2482"></path></svg>',R7=t=>async e=>{var n;try{const r=`${((n=e.nodeData)==null?void 0:n.topic)||"思维导图"}_${new Date().toISOString().slice(0,10)}`,o=`
.topic { font-family: Arial, sans-serif; font-size: 14px; color: #333; }
.markdown-content { font-size: 12px; line-height: 1.3; }
/* 表格样式 */
.markdown-table {
border-collapse: collapse;
width: 100%;
margin: 4px 0;
font-size: 11px;
border: 1px solid #e0e0e0;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
background-color: #fafafa;
overflow: hidden;
white-space: normal;
}
.markdown-table th,
.markdown-table td {
border: 1px solid #e0e0e0;
padding: 8px 12px;
text-align: left;
vertical-align: top;
position: relative;
white-space: normal;
}
.markdown-table th {
background-color: #f5f5f5;
font-weight: 600;
color: #333;
text-align: center;
border-bottom: 1px solid #d0d0d0;
}
.markdown-table td {
background-color: #fff;
}
.markdown-table tr:nth-child(even) td {
background-color: #f8f8f8;
}
.markdown-table tr:hover td {
background-color: #f0f8ff;
}
/* 移除多余的边框,保持简洁 */
.markdown-table th:not(:last-child),
.markdown-table td:not(:last-child) {
border-right: 1px solid #e0e0e0;
}
.markdown-table tr:not(:last-child) td {
border-bottom: 1px solid #e0e0e0;
}
`,l=await e.exportSvg(!0,o);if(!l)return;const h=URL.createObjectURL(l),c=document.createElement("a");c.href=h,c.download=`${r}.${t}`,c.click(),URL.revokeObjectURL(h)}catch{alert(`导出${t.toUpperCase()}失败,请重试`)}},I7={side:T7,left:A7,right:M7,full:C7,living:L7,zoomin:_7,zoomout:N7,exportSvg:D7},Va=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=I7[e],n};function O7(t){try{const e=document.createElement("div"),n=Va("fullscreen","full"),r=Va("toCenter","living"),o=Va("zoomout","zoomout"),l=Va("zoomin","zoomin"),h=Va("exportSvg","exportSvg");h.title="导出SVG矢量图";const c=document.createElement("span");return c.innerText="100%",e.appendChild(n),e.appendChild(r),e.appendChild(o),e.appendChild(l),e.appendChild(h),e.className="mind-elixir-toolbar rb",n.onclick=()=>{document.fullscreenElement===t.el?(document.exitFullscreen(),setTimeout(()=>{t.el.focus()},100)):(t.el.requestFullscreen(),setTimeout(()=>{},100))},r.onclick=()=>{t.toCenter()},o.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},l.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},h.onclick=()=>{R7("svg")(t)},setTimeout(()=>{const p=document.getElementById("exportSvg")},1e3),e}catch{const e=document.createElement("div");return e.className="mind-elixir-toolbar rb",e}}function H7(t){const e=document.createElement("div"),n=Va("tbltl","left"),r=Va("tbltr","right"),o=Va("tblts","side");return e.appendChild(n),e.appendChild(r),e.appendChild(o),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},r.onclick=()=>{t.initRight()},o.onclick=()=>{t.initSide()},e}function P7(t){try{if(!t.container)return;const e=O7(t),n=H7(t);t.container.append(e),t.container.append(n)}catch{}}/*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */let z7=class{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(t,e){const n=this._listeners.get(t)??new Set;return this._listeners.set(t,n),n.add(e),this}removeEventListener(t,e){var n;return(n=this._listeners.get(t))==null||n.delete(e),this}dispatchEvent(t,...e){let n=!0;for(const r of this._listeners.get(t)??[])n=r(...e)!==!1&&n;return n}unbindAllListeners(){this._listeners.clear()}};const um=(t,e="px")=>typeof t=="number"?t+e:t,Ha=({style:t},e,n)=>{if(typeof e=="object")for(const[r,o]of Object.entries(e))o!==void 0&&(t[r]=um(o));else n!==void 0&&(t[e]=um(n))},dm=(t=0,e=0,n=0,r=0)=>{const o={x:t,y:e,width:n,height:r,top:e,left:t,right:t+n,bottom:e+r};return{...o,toJSON:()=>JSON.stringify(o)}},B7=t=>{let e,n=-1,r=!1;return{next:(...o)=>{e=o,r||(r=!0,n=requestAnimationFrame(()=>{t(...e),r=!1}))},cancel:()=>{cancelAnimationFrame(n),r=!1}}},hm=(t,e,n="touch")=>{switch(n){case"center":{const r=e.left+e.width/2,o=e.top+e.height/2;return r>=t.left&&r<=t.right&&o>=t.top&&o<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}},F7=()=>matchMedia("(hover: none), (pointer: coarse)").matches,q7=()=>"safari"in window,Kh=t=>Array.isArray(t)?t:[t],Hv=t=>(e,n,r,o={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),n=Kh(n),e=Kh(e);for(const l of e)if(l)for(const h of n)l[t](h,r,{capture:!1,...o})},Pa=Hv("addEventListener"),vi=Hv("removeEventListener"),a0=t=>{var e;const{clientX:n,clientY:r,target:o}=((e=t.touches)==null?void 0:e[0])??t;return{x:n,y:r,target:o}},Vo=(t,e=document)=>Kh(t).map(n=>typeof n=="string"?Array.from(e.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),j7=(t,e)=>e.some(n=>typeof n=="number"?t.button===n:typeof n=="object"?n.button!==t.button?!1:n.modifiers.every(r=>{switch(r){case"alt":return t.altKey;case"ctrl":return t.ctrlKey||t.metaKey;case"shift":return t.shiftKey}}):!1),{abs:Eo,max:pm,min:fm,ceil:mm}=Math,gm=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),Pv=class extends z7{constructor(t){var e,n,r,o,l;super(),this._selection=gm(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=dm(),this._singleClick=!0,this._scrollAvailable=!0,this._scrollingActive=!1,this._scrollSpeed={x:0,y:0},this._scrollDelta={x:0,y:0},this._lastMousePosition={x:0,y:0},this.enable=this._toggleStartEvents,this.disable=this._toggleStartEvents.bind(this,!1),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:(e=t.behaviour)!=null&&e.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(n=t.behaviour)==null?void 0:n.scrolling,startScrollMargins:{x:0,y:0,...(o=(r=t.behaviour)==null?void 0:r.scrolling)==null?void 0:o.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...(l=t.features)==null?void 0:l.singleTap}}};for(const v of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[v]=="function"&&(this[v]=this[v].bind(this));const{document:h,selectionAreaClass:c,selectionContainerClass:p}=this._options;this._area=h.createElement("div"),this._clippingElement=h.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(c),p&&this._clippingElement.classList.add(p),Ha(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),Ha(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=B7(v=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",v),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:e,features:n}=this._options,r=t?Pa:vi;r(e,"mousedown",this._onTapStart),n.touch&&r(e,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,e=!1){const{x:n,y:r,target:o}=a0(t),{document:l,startAreas:h,boundaries:c,features:p,behaviour:v}=this._options,b=o.getBoundingClientRect();if(t instanceof MouseEvent&&!j7(t,v.triggers))return;const g=Vo(h,l),m=Vo(c,l);this._targetElement=m.find(k=>hm(k.getBoundingClientRect(),b));const x=t.composedPath(),w=g.find(k=>x.includes(k));if(this._targetBoundary=m.find(k=>x.includes(k)),!this._targetElement||!w||!this._targetBoundary||!e&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:n,y1:r,x2:0,y2:0};const S=l.scrollingElement??l.body;this._scrollDelta={x:S.scrollLeft,y:S.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),Pa(l,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),Pa(l,["mouseup","touchcancel","touchend"],this._onTapStop),Pa(l,"scroll",this._onScroll),p.deselectOnBlur&&(this._targetBoundaryScrolled=!1,Pa(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:e},range:n}=this._options.features,r=a0(t);let o;if(e==="native")o=r.target;else if(e==="touch"){this.resolveSelectables();const{x:h,y:c}=r;o=this._selectables.find(p=>{const{right:v,left:b,top:g,bottom:m}=p.getBoundingClientRect();return h<v&&h>b&&c<m&&c>g})}if(!o)return;for(this.resolveSelectables();!this._selectables.includes(o);)if(o.parentElement)o=o.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:l}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&n&&this._latestElement){const h=this._latestElement,[c,p]=h.compareDocumentPosition(o)&4?[o,h]:[h,o],v=[...this._selectables.filter(b=>b.compareDocumentPosition(c)&4&&b.compareDocumentPosition(p)&2),c,p];this.select(v),this._latestElement=h}else l.includes(o)&&(l.length===1||t.ctrlKey||l.every(h=>this._selection.stored.includes(h)))?this.deselect(o):(this.select(o),this._latestElement=o)}_delayedTapMove(t){const{container:e,document:n,behaviour:{startThreshold:r}}=this._options,{x1:o,y1:l}=this._areaLocation,{x:h,y:c}=a0(t);if(typeof r=="number"&&Eo(h+c-(o+l))>=r||typeof r=="object"&&Eo(h-o)>=r.x||Eo(c-l)>=r.y){if(vi(n,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){vi(n,["mouseup","touchcancel","touchend"],this._onTapStop);return}Pa(n,["mousemove","touchmove"],this._onTapMove,{passive:!1}),Ha(this._area,"display","block"),Vo(e,n)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(Pa(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),Pa(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(p=>this._targetElement.contains(p))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:e,_area:n}=this,r=this._targetRect=e.getBoundingClientRect();this._scrollAvailable?(Ha(t,{top:r.top,left:r.left,width:r.width,height:r.height}),Ha(n,{marginTop:-r.top,marginLeft:-r.left})):(Ha(t,{top:0,left:0,width:"100%",height:"100%"}),Ha(n,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:e,_areaLocation:n,_options:r,_frame:o}=this,{speedDivider:l}=r.behaviour.scrolling,h=this._targetElement,{x:c,y:p}=a0(t);if(n.x2=c,n.y2=p,this._lastMousePosition.x=c,this._lastMousePosition.y=p,this._scrollAvailable&&!this._scrollingActive&&(e.y||e.x)){this._scrollingActive=!0;const v=()=>{if(!e.x&&!e.y){this._scrollingActive=!1;return}const{scrollTop:b,scrollLeft:g}=h;e.y&&(h.scrollTop+=mm(e.y/l),n.y1-=h.scrollTop-b),e.x&&(h.scrollLeft+=mm(e.x/l),n.x1-=h.scrollLeft-g),o.next(t),requestAnimationFrame(v)};requestAnimationFrame(v)}else o.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:e}=this._options;(e.touch&&F7()||this._scrollAvailable&&q7())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:e}}=this,{scrollTop:n,scrollLeft:r}=e.scrollingElement??e.body;this._areaLocation.x1+=t.x-r,this._areaLocation.y1+=t.y-n,t.x=r,t.y=n,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,vi(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:e}=this._options.behaviour.scrolling,n=t.deltaY?t.deltaY>0?1:-1:0,r=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=n*e,this._scrollSpeed.x+=r*e,this._onTapMove(t),t.preventDefault()}_keyboardScroll(t){const{manualSpeed:e}=this._options.behaviour.scrolling,n=t.key==="ArrowLeft"?-1:t.key==="ArrowRight"?1:0,r=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(n)*e,this._scrollSpeed.y+=Math.sign(r)*e,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:e,_targetElement:n,_options:r}=this,{scrollTop:o,scrollHeight:l,clientHeight:h,scrollLeft:c,scrollWidth:p,clientWidth:v}=n,b=this._targetRect,{x1:g,y1:m}=e;let{x2:x,y2:w}=e;const{behaviour:{scrolling:{startScrollMargins:S}}}=r;x<b.left+S.x?(t.x=c?-Eo(b.left-x+S.x):0,x=x<b.left?b.left:x):x>b.right-S.x?(t.x=p-c-v?Eo(b.left+b.width-x-S.x):0,x=x>b.right?b.right:x):t.x=0,w<b.top+S.y?(t.y=o?-Eo(b.top-w+S.y):0,w=w<b.top?b.top:w):w>b.bottom-S.y?(t.y=l-o-h?Eo(b.top+b.height-w-S.y):0,w=w>b.bottom?b.bottom:w):t.y=0;const k=fm(g,x),C=fm(m,w),T=pm(g,x),A=pm(m,w);this._areaRect=dm(k,C,T-k,A-C)}_redrawSelectionArea(){const{x:t,y:e,width:n,height:r}=this._areaRect,{style:o}=this._area;o.left=`${t}px`,o.top=`${e}px`,o.width=`${n}px`,o.height=`${r}px`}_onTapStop(t,e){var n;const{document:r,features:o}=this._options,{_singleClick:l}=this;vi(this._targetElement,"scroll",this._onStartAreaScroll),vi(r,["mousemove","touchmove"],this._delayedTapMove),vi(r,["touchmove","mousemove"],this._onTapMove),vi(r,["mouseup","touchcancel","touchend"],this._onTapStop),vi(r,"scroll",this._onScroll),this._keepSelection(),t&&l&&o.singleTap.allow?this._onSingleTap(t):!l&&!e&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,vi(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),vi(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(n=this._frame)==null||n.cancel(),Ha(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:e,_selection:n,_areaRect:r}=this,{stored:o,selected:l,touched:h}=n,{intersect:c,overlap:p}=e.behaviour,v=p==="invert",b=[],g=[],m=[];for(let w=0;w<t.length;w++){const S=t[w];if(hm(r,S.getBoundingClientRect(),c)){if(l.includes(S))o.includes(S)&&!h.includes(S)&&h.push(S);else if(v&&o.includes(S)){m.push(S);continue}else g.push(S);b.push(S)}}v&&g.push(...o.filter(w=>!l.includes(w)));const x=p==="keep";for(let w=0;w<l.length;w++){const S=l[w];!b.includes(S)&&!(x&&o.includes(S))&&m.push(S)}n.selected=b,n.changed={added:g,removed:m},this._latestElement=void 0}_emitEvent(t,e){return this.emit(t,{event:e,store:this._selection,selection:this})}_keepSelection(){const{_options:t,_selection:e}=this,{selected:n,changed:r,touched:o,stored:l}=e,h=n.filter(c=>!l.includes(c));switch(t.behaviour.overlap){case"drop":{e.stored=[...h,...l.filter(c=>!o.includes(c))];break}case"invert":{e.stored=[...h,...l.filter(c=>!r.removed.includes(c))];break}case"keep":{e.stored=[...l,...n.filter(c=>!l.includes(c))];break}}}trigger(t,e=!0){this._onTapStart(t,e)}resolveSelectables(){this._selectables=Vo(this._options.selectables,this._options.document)}clearSelection(t=!0,e=!1){const{selected:n,stored:r,changed:o}=this._selection;o.added=[],o.removed.push(...n,...t?r:[]),e||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=gm(t?[]:r)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(t){Object.assign(this._areaLocation,t),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(t,e=!1){const{changed:n,selected:r,stored:o}=this._selection,l=Vo(t,this._options.document).filter(h=>!r.includes(h)&&!o.includes(h));return o.push(...l),r.push(...l),n.added.push(...l),n.removed=[],this._latestElement=void 0,e||(this._emitEvent("move",null),this._emitEvent("stop",null)),l}deselect(t,e=!1){const{selected:n,stored:r,changed:o}=this._selection,l=Vo(t,this._options.document).filter(h=>n.includes(h)||r.includes(h));this._selection.stored=r.filter(h=>!l.includes(h)),this._selection.selected=n.filter(h=>!l.includes(h)),this._selection.changed.added=[],this._selection.changed.removed.push(...l.filter(h=>!o.removed.includes(h))),this._latestElement=void 0,e||(this._emitEvent("move",null),this._emitEvent("stop",null))}};Pv.version="3.9.0";let $7=Pv;function U7(t){const e=t.mouseSelectionButton===2?[2]:[0],n=new $7({selectables:[".map-container me-tpc"],boundaries:[t.container],container:t.selectionContainer,features:{touch:!1},behaviour:{triggers:e,scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:10,y:10}}}}).on("beforestart",({event:r})=>{var o;const l=r.target;if(l.id==="input-box"||l.className==="circle"||(o=t.container.querySelector(".context-menu"))!=null&&o.contains(l))return!1;if(!r.ctrlKey&&!r.metaKey){if(l.tagName==="ME-TPC"&&l.classList.contains("selected"))return!1;t.clearSelection()}const h=n.getSelectionArea();return h.style.background="#4f90f22d",h.style.border="1px solid #4f90f2",h.parentElement&&(h.parentElement.style.zIndex="9999"),!0}).on("move",({store:{changed:{added:r,removed:o}}})=>{if(r.length>0||o.length>0,r.length>0){for(const l of r)l.className="selected";t.currentNodes=[...t.currentNodes,...r],t.bus.fire("selectNodes",r.map(l=>l.nodeObj))}if(o.length>0){for(const l of o)l.classList.remove("selected");t.currentNodes=t.currentNodes.filter(l=>!(o!=null&&o.includes(l))),t.bus.fire("unselectNodes",o.map(l=>l.nodeObj))}});t.selection=n}const V7=function(t,e=!0){this.theme=t;const n={...(t.type==="dark"?Xp:Kp).cssVar,...t.cssVar},r=Object.keys(n);for(let o=0;o<r.length;o++){const l=r[o];this.container.style.setProperty(l,n[l])}e&&this.refresh()},ds=t=>{var e;const n=(e=t.parent)==null?void 0:e.children,r=(n==null?void 0:n.indexOf(t))??0;return{siblings:n,index:r}};function W7(t){const{siblings:e,index:n}=ds(t);if(e===void 0)return;const r=e[n];n===0?(e[n]=e[e.length-1],e[e.length-1]=r):(e[n]=e[n-1],e[n-1]=r)}function G7(t){const{siblings:e,index:n}=ds(t);if(e===void 0)return;const r=e[n];n===e.length-1?(e[n]=e[0],e[0]=r):(e[n]=e[n+1],e[n+1]=r)}function zv(t){const{siblings:e,index:n}=ds(t);return e===void 0?0:(e.splice(n,1),e.length)}function K7(t,e,n){const{siblings:r,index:o}=ds(n);r!==void 0&&(e==="before"?r.splice(o,0,t):r.splice(o+1,0,t))}function X7(t,e){const{siblings:n,index:r}=ds(t);n!==void 0&&(n[r]=e,e.children=[t])}function Bv(t,e,n){var r;if(zv(e),(r=n.parent)!=null&&r.parent||(e.direction=n.direction),t==="in")n.children?n.children.push(e):n.children=[e];else{e.direction!==void 0&&(e.direction=n.direction);const{siblings:o,index:l}=ds(n);if(o===void 0)return;t==="before"?o.splice(l,0,e):o.splice(l+1,0,e)}}const Z7=function({map:t,direction:e},n){var r,o;if(e===0)return 0;if(e===1)return 1;if(e===2){const l=((r=t.querySelector(".lhs"))==null?void 0:r.childElementCount)||0,h=((o=t.querySelector(".rhs"))==null?void 0:o.childElementCount)||0;return l<=h?(n.direction=0,0):(n.direction=1,1)}},Fv=function(t,e,n){var r,o;const l=n.children[0].children[0],h=e.parentElement;if(h.tagName==="ME-PARENT"){if($l(l),h.children[1])h.nextSibling.appendChild(n);else{const c=t.createChildren([n]);h.appendChild(uf(!0)),h.insertAdjacentElement("afterend",c)}t.linkDiv(n.offsetParent)}else h.tagName==="ME-ROOT"&&(Z7(t,l.nodeObj)===0?(r=t.container.querySelector(".lhs"))==null||r.appendChild(n):(o=t.container.querySelector(".rhs"))==null||o.appendChild(n),t.linkDiv())},Y7=function(t,e){const n=t.parentNode;if(e===0){const r=n.parentNode.parentNode;r.tagName!=="ME-MAIN"&&(r.previousSibling.children[1].remove(),r.remove())}n.parentNode.remove()},qv={before:"beforebegin",after:"afterend"},$l=function(t){const e=t.parentElement.parentElement.lastElementChild;(e==null?void 0:e.tagName)==="svg"&&(e==null||e.remove())},J7=function(t,e){const n=t.nodeObj,r=Yp(n);r.style&&e.style&&(e.style=Object.assign(r.style,e.style));const o=Object.assign(n,e);Fc.call(this,t,o),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:o,origin:r})},df=function(t,e,n){if(!e)return null;const r=e.nodeObj;r.expanded===!1&&(t.expandNode(e,!0),e=t.findEle(r.id));const o=n||t.generateNewObj();r.children?r.children.push(o):r.children=[o],oo(t.nodeData);const{grp:l,top:h}=t.createWrapper(o);return Fv(t,e,l),{newTop:h,newNodeObj:o}},Q7=function(t,e,n){var r,o,l,h;const c=e||this.currentNode;if(!c)return;const p=c.nodeObj;if(p.parent){if(!((r=p.parent)!=null&&r.parent)&&((l=(o=p.parent)==null?void 0:o.children)==null?void 0:l.length)===1&&this.direction===2){this.addChild(this.findEle(p.parent.id),n);return}}else{this.addChild();return}const v=n||this.generateNewObj();if(!((h=p.parent)!=null&&h.parent)){const x=c.closest("me-main").className===oi.LHS?0:1;v.direction=x}K7(v,t,p),oo(this.nodeData);const b=c.parentElement,{grp:g,top:m}=this.createWrapper(v);b.parentElement.insertAdjacentElement(qv[t],g),this.linkDiv(g.offsetParent),n||this.editTopic(m.firstChild),this.bus.fire("operation",{name:"insertSibling",type:t,obj:v}),this.selectNode(m.firstChild,!0)},e8=function(t,e){const n=t||this.currentNode;if(!n)return;$l(n);const r=n.nodeObj;if(!r.parent)return;const o=e||this.generateNewObj();X7(r,o),oo(this.nodeData);const l=n.parentElement.parentElement,{grp:h,top:c}=this.createWrapper(o,!0);c.appendChild(uf(!0)),l.insertAdjacentElement("afterend",h);const p=this.createChildren([l]);c.insertAdjacentElement("afterend",p),this.linkDiv(),e||this.editTopic(c.firstChild),this.selectNode(c.firstChild,!0),this.bus.fire("operation",{name:"insertParent",obj:o})},t8=function(t,e){const n=t||this.currentNode;if(!n)return;const r=df(this,n,e);if(!r)return;const{newTop:o,newNodeObj:l}=r;this.bus.fire("operation",{name:"addChild",obj:l}),e||this.editTopic(o.firstChild),this.selectNode(o.firstChild,!0)},n8=function(t,e){const n=Yp(t.nodeObj);Zp(n);const r=df(this,e,n);if(!r)return;const{newNodeObj:o}=r;this.selectNode(this.findEle(o.id)),this.bus.fire("operation",{name:"copyNode",obj:o})},r8=function(t,e){t=Pc(t);const n=[];for(let r=0;r<t.length;r++){const o=t[r],l=Yp(o.nodeObj);Zp(l);const h=df(this,e,l);if(!h)return;const{newNodeObj:c}=h;n.push(c)}this.unselectNodes(this.currentNodes),this.selectNodes(n.map(r=>this.findEle(r.id))),this.bus.fire("operation",{name:"copyNodes",objs:n})},i8=function(t){const e=t||this.currentNode;if(!e)return;const n=e.nodeObj;W7(n);const r=e.parentNode.parentNode;r.parentNode.insertBefore(r,r.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:n})},a8=function(t){const e=t||this.currentNode;if(!e)return;const n=e.nodeObj;G7(n);const r=e.parentNode.parentNode;r.nextSibling?r.nextSibling.insertAdjacentElement("afterend",r):r.parentNode.prepend(r),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:n})},o8=function(t){if(t.length===0)return;t=Pc(t);for(const n of t){const r=n.nodeObj,o=zv(r);Y7(n,o)}const e=t[t.length-1];this.selectNode(this.findEle(e.nodeObj.parent.id)),this.linkDiv(),this.bus.fire("operation",{name:"removeNodes",objs:t.map(n=>n.nodeObj)})},s8=function(t,e){t=Pc(t);const n=e.nodeObj;n.expanded===!1&&(this.expandNode(e,!0),e=this.findEle(n.id));for(const r of t){const o=r.nodeObj;Bv("in",o,n),oo(this.nodeData);const l=r.parentElement;Fv(this,e,l.parentElement)}this.linkDiv(),this.bus.fire("operation",{name:"moveNodeIn",objs:t.map(r=>r.nodeObj),toObj:n})},jv=(t,e,n,r)=>{t=Pc(t),e==="after"&&(t=t.reverse());const o=n.nodeObj,l=[];for(const h of t){const c=h.nodeObj;Bv(e,c,o),oo(r.nodeData),$l(h);const p=h.parentElement.parentNode;l.includes(p.parentElement)||l.push(p.parentElement),n.parentElement.parentNode.insertAdjacentElement(qv[e],p)}for(const h of l)h.childElementCount===0&&h.tagName!=="ME-MAIN"&&(h.previousSibling.children[1].remove(),h.remove());r.linkDiv(),r.bus.fire("operation",{name:e==="before"?"moveNodeBefore":"moveNodeAfter",objs:t.map(h=>h.nodeObj),toObj:o})},l8=function(t,e){jv(t,"before",e,this)},c8=function(t,e){jv(t,"after",e,this)},u8=function(t){const e=t||this.currentNode;if(e){if(e.nodeObj.dangerouslySetInnerHTML){if(e.innerHTML.includes("<table")){this.editTableNode(e);return}return}this.editTopic(e)}},d8=function(t,e){t.text.textContent=e,t.nodeObj.topic=e,this.linkDiv()},$v=Object.freeze(Object.defineProperty({__proto__:null,addChild:t8,beginEdit:u8,copyNode:n8,copyNodes:r8,insertParent:e8,insertSibling:Q7,moveDownNode:a8,moveNodeAfter:c8,moveNodeBefore:l8,moveNodeIn:s8,moveUpNode:i8,removeNodes:o8,reshapeNode:J7,rmSubline:$l,setNodeTopic:d8},Symbol.toStringTag,{value:"Module"}));function h8(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,arrows:t.arrows,summaries:t.summaries,direction:t.direction,theme:t.theme}}const p8=function(t){const e=this.container,n=t.getBoundingClientRect(),r=e.getBoundingClientRect();if(n.top>r.bottom||n.bottom<r.top||n.left>r.right||n.right<r.left){const o=n.left+n.width/2,l=n.top+n.height/2,h=r.left+r.width/2,c=r.top+r.height/2,p=o-h,v=l-c;this.move(-p,-v,!0)}},f8=function(t,e,n){this.clearSelection(),this.scrollIntoView(t),this.selection.select(t),e&&this.bus.fire("selectNewNode",t.nodeObj)},m8=function(t){this.selection.select(t)},g8=function(t){this.selection.deselect(t)},v8=function(){this.unselectNodes(this.currentNodes),this.unselectSummary(),this.unselectArrow()},b8=function(){const t=h8(this);return JSON.stringify(t,(e,n)=>{if(!(e==="parent"&&typeof n!="string"))return n})},y8=function(){return JSON.parse(this.getDataString())},w8=function(){this.editable=!0},x8=function(){this.editable=!1},k8=function(t,e={x:0,y:0}){if(t<this.scaleMin||t>this.scaleMax)return;const n=this.container.getBoundingClientRect(),r=e.x?e.x-n.left-n.width/2:0,o=e.y?e.y-n.top-n.height/2:0,{dx:l,dy:h}=Uv(this),c=this.map.style.transform,{x:p,y:v}=yv(c),b=p-l,g=v-h,m=this.scaleVal,x=(-r+b)*(1-t/m),w=(-o+g)*(1-t/m);this.map.style.transform=`translate(${p-x}px, ${v-w}px) scale(${t})`,this.scaleVal=t,this.bus.fire("scale",t)},S8=function(){const t=this.nodes.offsetHeight/this.container.offsetHeight,e=this.nodes.offsetWidth/this.container.offsetWidth,n=1/Math.max(1,Math.max(t,e));this.scaleVal=n,this.map.style.transform="scale("+n+")",this.bus.fire("scale",n)},E8=function(t,e,n=!1){const{map:r,scaleVal:o,bus:l}=this,h=r.style.transform;let{x:c,y:p}=yv(h);c+=t,p+=e,n&&(r.style.transition="transform 0.3s",setTimeout(()=>{r.style.transition="none"},300)),r.style.transform=`translate(${c}px, ${p}px) scale(${o})`,l.fire("move",{dx:t,dy:e})},Uv=t=>{const{container:e,map:n,nodes:r}=t,o=n.querySelector("me-root"),l=o.offsetTop,h=o.offsetLeft,c=o.offsetWidth,p=o.offsetHeight;let v,b;return t.alignment==="root"?(v=e.offsetWidth/2-h-c/2,b=e.offsetHeight/2-l-p/2,n.style.transformOrigin=`${h+c/2}px 50%`):(v=(e.offsetWidth-r.offsetWidth)/2,b=(e.offsetHeight-r.offsetHeight)/2,n.style.transformOrigin="50% 50%"),{dx:v,dy:b}},T8=function(){const{map:t}=this,{dx:e,dy:n}=Uv(this);t.style.transform=`translate(${e}px, ${n}px) scale(${this.scaleVal})`},A8=function(t){t(this)},M8=function(t){t.nodeObj.parent&&(this.clearSelection(),this.tempDirection===null&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=t.nodeObj,this.initRight(),this.toCenter())},C8=function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},L8=function(){this.direction=0,this.refresh(),this.toCenter()},_8=function(){this.direction=1,this.refresh(),this.toCenter()},N8=function(){this.direction=2,this.refresh(),this.toCenter()},D8=function(t){this.locale=t,this.refresh()},R8=function(t,e){const n=t.nodeObj;typeof e=="boolean"?n.expanded=e:n.expanded!==!1?n.expanded=!1:n.expanded=!0;const r=t.getBoundingClientRect(),o={x:r.left,y:r.top},l=t.parentNode,h=l.children[1];if(h.expanded=n.expanded,h.className=n.expanded?"minus":"",$l(t),n.expanded){const g=this.createChildren(n.children.map(m=>this.createWrapper(m).grp));l.parentNode.appendChild(g)}else l.parentNode.children[1].remove();this.linkDiv(t.closest("me-main > me-wrapper"));const c=t.getBoundingClientRect(),p={x:c.left,y:c.top},v=o.x-p.x,b=o.y-p.y;this.move(v,b),this.bus.fire("expandNode",n)},I8=function(t,e){const n=t.nodeObj,r=t.getBoundingClientRect(),o={x:r.left,y:r.top};rs(n,e??!n.expanded),this.refresh();const l=this.findEle(n.id).getBoundingClientRect(),h={x:l.left,y:l.top},c=o.x-h.x,p=o.y-h.y;this.move(c,p)},O8=function(t){this.clearSelection(),t&&(t=JSON.parse(JSON.stringify(t)),this.nodeData=t.nodeData,this.arrows=t.arrows||[],this.summaries=t.summaries||[],t.theme&&this.changeTheme(t.theme)),oo(this.nodeData),this.layout(),this.linkDiv()},H8=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:C8,clearSelection:v8,disableEdit:x8,enableEdit:w8,expandNode:R8,expandNodeAll:I8,focusNode:M8,getData:y8,getDataString:b8,initLeft:L8,initRight:_8,initSide:N8,install:A8,move:E8,refresh:O8,scale:k8,scaleFit:S8,scrollIntoView:p8,selectNode:f8,selectNodes:m8,setLocale:D8,toCenter:T8,unselectNodes:g8},Symbol.toStringTag,{value:"Module"})),P8=function(t){return{dom:t,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(e){if(this.pointerdown){this.moved=!0;const n=e.clientX-this.lastX,r=e.clientY-this.lastY;this.lastX=e.clientX,this.lastY=e.clientY,this.cb&&this.cb(n,r)}},handlePointerDown(e){e.button===0&&(this.pointerdown=!0,this.lastX=e.clientX,this.lastY=e.clientY,this.dom.setPointerCapture(e.pointerId))},handleClear(e){this.pointerdown=!1,e.pointerId!==void 0&&this.dom.releasePointerCapture(e.pointerId)},cb:null,init(e,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=Jp([{dom:e,evt:"pointermove",func:this.handlePointerMove},{dom:e,evt:"pointerleave",func:this.handleClear},{dom:e,evt:"pointerup",func:this.handleClear},{dom:this.dom,evt:"pointerdown",func:this.handlePointerDown}])},destroy:null,clear(){this.moved=!1,this.pointerdown=!1}}},vm={create:P8},z8="#4dc4ff";function Vv(t,e,n,r,o,l,h,c){return{x:t/8+n*3/8+o*3/8+h/8,y:e/8+r*3/8+l*3/8+c/8}}function B8(t,e,n){En(t,{x:e+"",y:n+""})}function o0(t,e,n,r,o){En(t,{x1:e+"",y1:n+"",x2:r+"",y2:o+""})}function bm(t,e,n,r,o,l,h,c,p,v){var b;const g=`M ${e} ${n} C ${r} ${o} ${l} ${h} ${c} ${p}`;if(t.line.setAttribute("d",g),v.style){const k=v.style;k.stroke&&t.line.setAttribute("stroke",k.stroke),k.strokeWidth&&t.line.setAttribute("stroke-width",String(k.strokeWidth)),k.strokeDasharray&&t.line.setAttribute("stroke-dasharray",k.strokeDasharray),k.strokeLinecap&&t.line.setAttribute("stroke-linecap",k.strokeLinecap),k.opacity!==void 0&&t.line.setAttribute("opacity",String(k.opacity))}const m=t.querySelectorAll('path[stroke="transparent"]');m.length>0&&m[0].setAttribute("d",g);const x=ec(l,h,c,p);if(x){const k=`M ${x.x1} ${x.y1} L ${c} ${p} L ${x.x2} ${x.y2}`;if(t.arrow1.setAttribute("d",k),m.length>1&&m[1].setAttribute("d",k),v.style){const C=v.style;C.stroke&&t.arrow1.setAttribute("stroke",C.stroke),C.strokeWidth&&t.arrow1.setAttribute("stroke-width",String(C.strokeWidth)),C.strokeLinecap&&t.arrow1.setAttribute("stroke-linecap",C.strokeLinecap),C.opacity!==void 0&&t.arrow1.setAttribute("opacity",String(C.opacity))}}if(v.bidirectional){const k=ec(r,o,e,n);if(k){const C=`M ${k.x1} ${k.y1} L ${e} ${n} L ${k.x2} ${k.y2}`;if(t.arrow2.setAttribute("d",C),m.length>2&&m[2].setAttribute("d",C),v.style){const T=v.style;T.stroke&&t.arrow2.setAttribute("stroke",T.stroke),T.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(T.strokeWidth)),T.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",T.strokeLinecap),T.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(T.opacity))}}}const{x:w,y:S}=Vv(e,n,r,o,l,h,c,p);B8(t.label,w,S),(b=v.style)!=null&&b.labelColor&&t.label.setAttribute("fill",v.style.labelColor),G8(t)}function oc(t,e,n){const{offsetLeft:r,offsetTop:o}=ql(t.nodes,e),l=e.offsetWidth,h=e.offsetHeight,c=r+l/2,p=o+h/2,v=c+n.x,b=p+n.y;return{w:l,h,cx:c,cy:p,ctrlX:v,ctrlY:b}}function Yo(t){let e,n;const r=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);return r>t.h/t.w||r<-t.h/t.w?t.cy-t.ctrlY<0?(e=t.cx-t.h/2/r,n=t.cy+t.h/2):(e=t.cx+t.h/2/r,n=t.cy-t.h/2):t.cx-t.ctrlX<0?(e=t.cx+t.w/2,n=t.cy-t.w*r/2):(e=t.cx-t.w/2,n=t.cy+t.w*r/2),{x:e,y:n}}const hf=function(t,e,n,r,o){var l;if(!e||!n)return;const h=oc(t,e,r.delta1),c=oc(t,n,r.delta2),{x:p,y:v}=Yo(h),{ctrlX:b,ctrlY:g}=h,{ctrlX:m,ctrlY:x}=c,{x:w,y:S}=Yo(c),k=ec(m,x,w,S);if(!k)return;const C=`M ${k.x1} ${k.y1} L ${w} ${S} L ${k.x2} ${k.y2}`;let T="";if(r.bidirectional){const F=ec(b,g,p,v);if(!F)return;T=`M ${F.x1} ${F.y1} L ${p} ${v} L ${F.x2} ${F.y2}`}const A=g7(`M ${p} ${v} C ${b} ${g} ${m} ${x} ${w} ${S}`,C,T,r.style),{x:M,y}=Vv(p,v,b,g,m,x,w,S),N=(l=r.style)==null?void 0:l.labelColor,z=Vh(r.label,M,y,{anchor:"middle",color:N,dataType:"custom-link"});A.appendChild(z),A.label=z,A.arrowObj=r,A.dataset.linkid=r.id,t.linkSvgGroup.appendChild(A),o||(t.arrows.push(r),t.currentArrow=A,Wv(t,r,h,c))},F8=function(t,e,n={}){const r={id:Po(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,delta1:{x:t.offsetWidth/2+100,y:0},delta2:{x:e.offsetWidth/2+100,y:0},...n};hf(this,t,e,r),this.bus.fire("operation",{name:"createArrow",obj:r})},q8=function(t){qc(this);const e={...t,id:Po()};hf(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},j8=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;qc(this);const n=e.arrowObj.id;this.arrows=this.arrows.filter(r=>r.id!==n),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},$8=function(t){this.currentArrow=t;const e=t.arrowObj,n=this.findEle(e.from),r=this.findEle(e.to),o=oc(this,n,e.delta1),l=oc(this,r,e.delta2);Wv(this,e,o,l)},U8=function(){qc(this),this.currentArrow=null},Vd=function(t,e){const n=document.createElementNS(ri,"path");return En(n,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},V8=function(t,e){const n=document.createElementNS(ri,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const r=Vd(t.line.getAttribute("d"),e);n.appendChild(r);const o=Vd(t.arrow1.getAttribute("d"),e);if(n.appendChild(o),t.arrow2.getAttribute("d")){const l=Vd(t.arrow2.getAttribute("d"),e);n.appendChild(l)}t.insertBefore(n,t.firstChild)},W8=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},G8=function(t){const e=t.querySelector(".arrow-highlight");if(!e)return;const n=e.querySelectorAll("path");n.length>=1&&n[0].setAttribute("d",t.line.getAttribute("d")),n.length>=2&&n[1].setAttribute("d",t.arrow1.getAttribute("d")),n.length>=3&&t.arrow2.getAttribute("d")&&n[2].setAttribute("d",t.arrow2.getAttribute("d"))},qc=function(t){var e,n;(e=t.helper1)==null||e.destroy(),(n=t.helper2)==null||n.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&W8(t.currentArrow)},Wv=function(t,e,n,r){const{linkController:o,P2:l,P3:h,line1:c,line2:p,nodes:v,map:b,currentArrow:g,bus:m}=t;if(!g)return;o.style.display="initial",l.style.display="initial",h.style.display="initial",v.appendChild(o),v.appendChild(l),v.appendChild(h),V8(g,z8);let{x,y:w}=Yo(n),{ctrlX:S,ctrlY:k}=n,{ctrlX:C,ctrlY:T}=r,{x:A,y:M}=Yo(r);l.style.cssText=`top:${k}px;left:${S}px;`,h.style.cssText=`top:${T}px;left:${C}px;`,o0(c,x,w,S,k),o0(p,C,T,A,M),t.helper1=vm.create(l),t.helper2=vm.create(h),t.helper1.init(b,(y,N)=>{S=S+y/t.scaleVal,k=k+N/t.scaleVal;const z=Yo({...n,ctrlX:S,ctrlY:k});x=z.x,w=z.y,l.style.top=k+"px",l.style.left=S+"px",bm(g,x,w,S,k,C,T,A,M,e),o0(c,x,w,S,k),e.delta1.x=S-n.cx,e.delta1.y=k-n.cy,m.fire("updateArrowDelta",e)}),t.helper2.init(b,(y,N)=>{C=C+y/t.scaleVal,T=T+N/t.scaleVal;const z=Yo({...r,ctrlX:C,ctrlY:T});A=z.x,M=z.y,h.style.top=T+"px",h.style.left=C+"px",bm(g,x,w,S,k,C,T,A,M,e),o0(p,C,T,A,M),e.delta2.x=C-r.cx,e.delta2.y=T-r.cy,m.fire("updateArrowDelta",e)})};function K8(){this.linkSvgGroup.innerHTML="";for(let t=0;t<this.arrows.length;t++){const e=this.arrows[t];try{hf(this,this.findEle(e.from),this.findEle(e.to),e,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function X8(t){if(qc(this),!t)return;const e=t.label;Iv(this,e,t.arrowObj)}function Z8(){this.arrows=this.arrows.filter(t=>Q0(t.from,this.nodeData)&&Q0(t.to,this.nodeData))}const Y8=Object.freeze(Object.defineProperty({__proto__:null,createArrow:F8,createArrowFrom:q8,editArrowLabel:X8,removeArrow:j8,renderArrow:K8,selectArrow:$8,tidyArrow:Z8,unselectArrow:U8},Symbol.toStringTag,{value:"Module"})),J8=function(t){var e,n;if(t.length===0)throw new Error("No selected node.");if(t.length===1){const b=t[0].nodeObj,g=t[0].nodeObj.parent;if(!g)throw new Error("Can not select root node.");const m=g.children.findIndex(x=>b===x);return{parent:g.id,start:m,end:m}}let r=0;const o=t.map(b=>{let g=b.nodeObj;const m=[];for(;g.parent;){const x=g.parent,w=x.children,S=w==null?void 0:w.indexOf(g);g=x,m.unshift({node:g,index:S})}return m.length>r&&(r=m.length),m});let l=0;e:for(;l<r;l++){const b=(e=o[0][l])==null?void 0:e.node;for(let g=1;g<o.length;g++)if(((n=o[g][l])==null?void 0:n.node)!==b)break e}if(!l)throw new Error("Can not select root node.");const h=o.map(b=>b[l-1].index).sort(),c=h[0]||0,p=h[h.length-1]||0,v=o[0][l-1].node;if(!v.parent)throw new Error("Please select nodes in the same main topic.");return{parent:v.id,start:c,end:p}},Q8=function(t){const e=document.createElementNS(ri,"g");return e.setAttribute("id",t),e},ym=function(t,e){const n=document.createElementNS(ri,"path");return En(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},ew=t=>t.parentElement.parentElement,tw=function(t,{parent:e,start:n}){const r=t.findEle(e),o=r.nodeObj;let l;return o.parent?l=r.closest("me-main").className:l=t.findEle(o.children[n].id).closest("me-main").className,l},pf=function(t,e){var n;const{id:r,label:o,parent:l,start:h,end:c}=e,{nodes:p,theme:v,summarySvg:b}=t,g=t.findEle(l).nodeObj,m=tw(t,e);let x=1/0,w=0,S=0,k=0;for(let F=h;F<=c;F++){const P=(n=g.children)==null?void 0:n[F];if(!P)return t.removeSummary(r),null;const Y=ew(t.findEle(P.id)),{offsetLeft:te,offsetTop:ce}=ql(p,Y),Me=h===c?10:20;F===h&&(S=ce+Me),F===c&&(k=ce+Y.offsetHeight-Me),te<x&&(x=te),Y.offsetWidth+te>w&&(w=Y.offsetWidth+te)}let C,T;const A=S+10,M=k+10,y=(A+M)/2,N=v.cssVar["--color"];m===oi.LHS?(C=ym(`M ${x+10} ${A} c -5 0 -10 5 -10 10 L ${x} ${M-10} c 0 5 5 10 10 10 M ${x} ${y} h -10`,N),T=Vh(o,x-20,y+6,{anchor:"end",color:N})):(C=ym(`M ${w-10} ${A} c 5 0 10 5 10 10 L ${w} ${M-10} c 0 5 -5 10 -10 10 M ${w} ${y} h 10`,N),T=Vh(o,w+20,y+6,{anchor:"start",color:N}));const z=Q8("s-"+r);return z.appendChild(C),z.appendChild(T),z.summaryObj=e,b.appendChild(z),z},nw=function(){if(!this.currentNodes)return;const{currentNodes:t,summaries:e,bus:n}=this,{parent:r,start:o,end:l}=J8(t),h={id:Po(),parent:r,start:o,end:l,label:"summary"},c=pf(this,h);e.push(h),this.editSummary(c),n.fire("operation",{name:"createSummary",obj:h})},rw=function(t){const e=Po(),n={...t,id:e};pf(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},iw=function(t){var e;const n=this.summaries.findIndex(r=>r.id===t);n>-1&&(this.summaries.splice(n,1),(e=document.querySelector("#s-"+t))==null||e.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},aw=function(t){const e=t.children[1].getBBox(),n=6,r=3,o=document.createElementNS(ri,"rect");En(o,{x:e.x-n+"",y:e.y-n+"",width:e.width+n*2+"",height:e.height+n*2+"",rx:r+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),t.appendChild(o),this.currentSummary=t},ow=function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null},sw=function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{pf(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},lw=function(t){if(!t)return;const e=t.childNodes[1];Iv(this,e,t.summaryObj)},cw=Object.freeze(Object.defineProperty({__proto__:null,createSummary:nw,createSummaryFrom:rw,editSummary:lw,removeSummary:iw,renderSummary:sw,selectSummary:aw,unselectSummary:ow},Symbol.toStringTag,{value:"Module"})),Yn="http://www.w3.org/2000/svg";function uw(t,e){const n=document.createElementNS(Yn,"svg");return En(n,{version:"1.1",xmlns:Yn,height:t,width:e}),n}function Gv(t,e,n,r){const o=document.createElementNS(Yn,"g");let l="";t.text?l=t.text.textContent:l=t.childNodes[0].textContent;const h=l.split(`
`),c=parseFloat(e.lineHeight)||parseFloat(e.fontSize)*1.2,p=parseFloat(e.fontSize),v=parseInt(e.paddingTop)||8,b=parseInt(e.paddingLeft)||8,g=t.offsetWidth||200,m=n+b,x=(h.length-1)*c+p+v+(parseInt(e.paddingBottom)||8),w=t.offsetHeight||100,S=Math.min(x,w),k=document.createElementNS(Yn,"rect");return En(k,{x:n+"",y:r+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:g+"px",height:S+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),o.appendChild(k),h.forEach((C,T)=>{const A=document.createElementNS(Yn,"text");En(A,{x:m+"",y:r+v+p+c*T+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),A.innerHTML=C,o.appendChild(A)}),o}function wm(t){if(!t)return t;let e=t.replace(/<td[^>]*>([^<]*)<br\s*\/?>([^<]*)<\/td>/gi,(n,r,o)=>`<td>${r} ${o}</td>`);return e=e.replace(/<th[^>]*>([^<]*)<br\s*\/?>([^<]*)<\/th>/gi,(n,r,o)=>`<th>${r} ${o}</th>`),e=e.replace(/<br\s*\/?>/gi," "),e=e.replace(/•\s*【/g,"【"),e=e.replace(/•\s*\[/g,"["),e=e.replace(/•\s*/g,""),e=e.replace(/•\s*\(/g,"("),e=e.replace(/<([^>]+)>/g,(n,r)=>{const o=["br","hr","img","input","meta","link"],l=r.split(" ")[0].toLowerCase();return o.includes(l)?`<${r} />`:n}),e}function Wd(t,e,n,r,o=!1){const l=document.createElementNS(Yn,"g");o||l.setAttribute("transform",`translate(${n}, ${r})`);const h=t;let c="";h.nodeObj&&h.nodeObj.dangerouslySetInnerHTML?c=h.nodeObj.dangerouslySetInnerHTML:h.text&&h.text.innerHTML&&(c=h.text.innerHTML);const p=c&&c!==t.textContent,v=c&&c.includes("<table");if(v){const b=t.offsetWidth||400,g=t.offsetHeight||200,m=document.createElementNS(Yn,"rect");En(m,{x:n+"",y:r+"",width:b+"",height:g+"",fill:"white",stroke:"#ccc","stroke-width":"1"}),l.appendChild(m);const x=document.createElementNS(Yn,"foreignObject");En(x,{x:o?n+"":"0",y:o?r+"":"0",width:b+"",height:g+""});const w=`
<div xmlns="http://www.w3.org/1999/xhtml" style="
width: 100%;
height: 100%;
padding: 8px;
box-sizing: border-box;
overflow: hidden;
font-family: '${(e.fontFamily||"Arial, sans-serif").replace(/"/g,"&quot;")}';
font-size: ${e.fontSize||"14px"};
line-height: 1.4;
">
${wm(c)}
</div>
`;return x.innerHTML=w,l.appendChild(x),l}if(p&&!v){const b=wm(c),g=t.getBoundingClientRect(),m=g.width,x=g.height;b.includes("<img"),h.nodeObj&&h.nodeObj.image;try{const N=document.createElement("div");N.innerHTML=b,N.style.cssText=`
position: absolute;
top: -9999px;
left: -9999px;
width: ${m}px;
font-family: '${(e.fontFamily||"Arial").replace(/"/g,"&quot;")}';
font-size: ${e.fontSize};
color: ${e.color};
`,document.body.appendChild(N);const z=(N.textContent||N.innerText||"").split(`
`).filter(F=>F.trim());if(z.length>0){const F=parseFloat(e.fontSize)||14,P=F*1.4,Y=parseInt(e.paddingTop)||8,te=parseInt(e.paddingBottom)||8,ce=parseInt(e.paddingLeft)||8,Me=(z.length-1)*P+F+Y+te,Fe=Math.min(Me,x),We=b.includes("<img"),rt=We?n+m/2:n+ce,je=r+F+Y;z.forEach((nt,ct)=>{const tt=document.createElementNS(Yn,"text");En(tt,{x:rt+"",y:je+P*ct+"","text-anchor":We?"middle":"start","font-family":e.fontFamily,"font-size":e.fontSize,"font-weight":e.fontWeight,fill:e.color}),tt.innerHTML=nt.trim(),l.appendChild(tt)});const Ne=document.createElementNS(Yn,"rect");return En(Ne,{x:n+"",y:r+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:m+"px",height:Fe+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),l.insertBefore(Ne,l.firstChild),document.body.removeChild(N),l}document.body.removeChild(N)}catch{}const w=document.createElementNS(Yn,"foreignObject");En(w,{x:n+"",y:r+"",width:m+"px",height:x+"px"});const S=document.createElement("div");S.innerHTML=b;const k=15,C=15,T=parseInt(e.paddingLeft)||8,A=parseInt(e.paddingRight)||8;S.style.cssText=`
width: 100%;
height: 100%;
font-family: '${(e.fontFamily||"Arial").replace(/"/g,"&quot;")}';
font-size: ${e.fontSize};
color: ${e.color};
background: transparent;
padding: ${k}px ${A}px ${C}px ${T}px;
box-sizing: border-box;
overflow: visible;
text-align: center !important;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
`,S.querySelectorAll("table").forEach(N=>{const z=N;z.style.cssText=`
width: 100%;
border-collapse: collapse;
font-size: ${e.fontSize};
font-family: '${(e.fontFamily||"Arial").replace(/"/g,"&quot;")}';
margin: 0 auto 0px auto;
border: 1px solid #ccc;
`,N.querySelectorAll("td, th").forEach(F=>{const P=F;P.style.cssText=`
border: 1px solid #ccc;
padding: 4px 8px;
text-align: center;
vertical-align: top;
font-size: ${parseFloat(e.fontSize)*.9}px;
background: white;
`})}),S.querySelectorAll("ul, ol").forEach(N=>{const z=N;z.style.cssText=`
margin: 2px 0 4px 0 !important;
padding-left: 0 !important;
text-align: center !important;
list-style-position: inside !important;
`}),S.querySelectorAll("li").forEach(N=>{const z=N;z.style.cssText=`
margin: 1px 0 !important;
line-height: 1.2 !important;
padding: 0 !important;
text-align: center !important;
list-style-position: inside !important;
`}),S.querySelectorAll("p").forEach(N=>{const z=N;z.style.cssText=`
margin: 2px 0 !important;
line-height: 1.4 !important;
padding: 0 !important;
text-align: center !important;
`}),S.querySelectorAll("span, div, strong, em").forEach(N=>{const z=N;z.style.cssText=`
text-align: center !important;
display: block !important;
margin-left: auto !important;
margin-right: auto !important;
`});const M=document.createElement("style");M.textContent=`
* {
text-align: center !important;
margin-left: auto !important;
margin-right: auto !important;
}
`,S.appendChild(M),S.querySelectorAll("img").forEach((N,z)=>{const F=N,P=m-T-A-5,Y=Math.floor(x*.7);F.style.cssText=`
max-width: ${P}px !important;
max-height: ${Y}px !important;
width: auto !important;
height: auto !important;
display: block !important;
margin: 8px auto 0px auto !important;
border-radius: 4px;
object-fit: contain !important;
flex-shrink: 0 !important;
box-sizing: border-box !important;
position: relative !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
`}),w.appendChild(S);const y=document.createElementNS(Yn,"rect");En(y,{x:n+"",y:r+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:m+"px",height:x+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),l.insertBefore(y,l.firstChild),l.appendChild(w)}else return Gv(t,e,n,r);return l}function s0(t,e,n=!1,r){var o;const l=getComputedStyle(e);let h,c;if(r)h=r.x,c=r.y;else{const{offsetLeft:x,offsetTop:w}=Qp(t.nodes,e);h=x,c=w}my(e);const p=e;p.nodeObj&&p.nodeObj.dangerouslySetInnerHTML&&((o=p.nodeObj.dangerouslySetInnerHTML)==null||o.includes("<img")),p.nodeObj&&p.nodeObj.image;const v=document.createElementNS(Yn,"g");r||v.setAttribute("transform",`translate(${h}, ${c})`);let b=null;const g=e,m=g.nodeObj&&g.nodeObj.dangerouslySetInnerHTML&&g.nodeObj.dangerouslySetInnerHTML.includes("<table");if(g.nodeObj&&g.nodeObj.dangerouslySetInnerHTML){if(m)return Wd(e,l,h,c);b=Wd(e,l,h,c)}else n?b=Wd(e,l,h,c):b=Gv(e,l,h,c);return b&&v.appendChild(b),v}function dw(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:o}=ql(t.nodes,e),l=document.createElementNS(Yn,"a"),h=document.createElementNS(Yn,"text");return En(h,{x:r+"",y:o+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),h.innerHTML=e.textContent,l.appendChild(h),l.setAttribute("href",e.href),l}async function hw(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:o}=Qp(t.nodes,e);if(!e.nodeObj.image)return null;const l=e.nodeObj.image,h=document.createElementNS(Yn,"image"),c=parseInt(n.width),p=parseInt(n.height),v=Math.min(c-10,300),b=Math.min(p*.6,150),g=Math.min(l.width||200,v),m=Math.min(l.height||150,b);let x=0;if(e.text&&e.text.textContent){const k=e.text.textContent.trim();if(k){const C=k.split(`
`).length,T=parseFloat(n.lineHeight)||parseFloat(n.fontSize)*1.2;parseFloat(n.fontSize);const A=parseInt(n.paddingTop)||8,M=parseInt(n.paddingBottom)||8;x=C*T+A+M}}const w=r+(c-g)/2,S=o+x+0;try{const k=await Kv(l.url);En(h,{x:w+"",y:S+"",width:g+"",height:m+"",href:k})}catch{En(h,{x:w+"",y:S+"",width:g+"",height:m+"",href:l.url})}return h}async function pw(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:o}=Qp(t.nodes,e),l=document.createElementNS(Yn,"image"),h=t.imageProxy?t.imageProxy(e.src):e.src,c=Math.min(parseInt(n.width)||300,300),p=Math.min(parseInt(n.height)||200,200);try{const v=await Kv(h);En(l,{x:r+"",y:o+"",width:c+"",height:p+"",href:v})}catch{En(l,{x:r+"",y:o+"",width:c+"",height:p+"",href:h})}return l}function Kv(t){return new Promise((e,n)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>{try{const o=document.createElement("canvas");o.width=r.width,o.height=r.height;const l=o.getContext("2d");if(!l){n(new Error("Failed to get canvas context"));return}l.drawImage(r,0,0);const h=o.toDataURL("image/png");e(h)}catch(o){n(o)}},r.onerror=()=>{n(new Error("Failed to load image"))},r.src=t})}const l0=100,fw='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',xm=(t,e)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return window.getComputedStyle(e).transform,{x:n.left-r.left,y:n.top-r.top,width:n.width,height:n.height}},mw=async()=>{await new Promise(t=>setTimeout(t,0)),await document.fonts.ready,await new Promise(t=>requestAnimationFrame(t)),await new Promise(t=>setTimeout(t,100))},gw=async(t,e=!1)=>{var n,r,o;await mw();const l=t.nodes;l.getBoundingClientRect();const h=l.offsetHeight+l0*2,c=l.offsetWidth+l0*2,p=uw(h+"px",c+"px"),v=document.createElementNS(Yn,"svg"),b=document.createElementNS(Yn,"rect");En(b,{x:"0",y:"0",width:`${c}`,height:`${h}`,fill:t.theme.cssVar["--bgcolor"]}),p.appendChild(b),l.querySelectorAll(".subLines").forEach(k=>{const C=k.cloneNode(!0),T=k.parentElement,A=xm(T,l);C.setAttribute("x",`${A.x}`),C.setAttribute("y",`${A.y}`),v.appendChild(C)});const g=(n=l.querySelector(".lines"))==null?void 0:n.cloneNode(!0);g&&v.appendChild(g);const m=(r=l.querySelector(".topiclinks"))==null?void 0:r.cloneNode(!0);m&&v.appendChild(m);const x=(o=l.querySelector(".summary"))==null?void 0:o.cloneNode(!0);x&&v.appendChild(x);const w=Array.from(l.querySelectorAll("me-tpc")).map(async k=>{const C=xm(k,l),T=k.nodeObj.dangerouslySetInnerHTML,A=!!(k.text&&k.text.innerHTML&&k.text.innerHTML!==k.text.textContent),M=k.nodeObj.image;if(T||A){const y=s0(t,k,!e,C);v.appendChild(y)}else v.appendChild(s0(t,k,!1,C));if(M)try{const y=await hw(t,k);y&&v.appendChild(y)}catch{}});await Promise.all(w),l.querySelectorAll(".tags > span").forEach(k=>{v.appendChild(s0(t,k))}),l.querySelectorAll(".icons > span").forEach(k=>{v.appendChild(s0(t,k))}),l.querySelectorAll(".hyper-link").forEach(k=>{v.appendChild(dw(t,k))});const S=Array.from(l.querySelectorAll("img")).map(async(k,C)=>{const T=k.closest("me-tpc"),A=k.closest("foreignObject");return T||A?null:await pw(t,k)});return(await Promise.all(S)).filter(k=>k!==null).forEach(k=>{k&&v.appendChild(k)}),En(v,{x:l0+"",y:l0+"",overflow:"visible"}),p.appendChild(v),p},vw=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),fw+t.outerHTML);function bw(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=o=>{e(o.target.result)},r.onerror=o=>{n(o)},r.readAsDataURL(t)})}const yw=async function(t=!1,e){const n=await gw(this,t),r=vw(n,e);return new Blob([r],{type:"image/svg+xml"})},ww=async function(t=!1,e){const n=await this.exportSvg(t,e),r=await bw(n);return new Promise((o,l)=>{const h=new Image;h.setAttribute("crossOrigin","anonymous");const c=setTimeout(()=>{l(new Error("Image loading timeout"))},1e4);h.onload=()=>{clearTimeout(c);try{const p=document.createElement("canvas");p.width=h.width,p.height=h.height;const v=p.getContext("2d");v.fillStyle="#ffffff",v.fillRect(0,0,p.width,p.height),v.drawImage(h,0,0),p.toBlob(o,"image/png",1)}catch(p){l(p)}},h.onerror=p=>{clearTimeout(c),l(p)},h.src=r})},xw=Object.freeze(Object.defineProperty({__proto__:null,exportPng:ww,exportSvg:yw},Symbol.toStringTag,{value:"Module"}));function ff(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Bo=ff();function Xv(t){Bo=t}var Tl={exec:()=>null};function sn(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(o,l)=>{let h=typeof l=="string"?l:l.source;return h=h.replace(kr.caret,"$1"),n=n.replace(o,h),r},getRegex:()=>new RegExp(n,e)};return r}var kr={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:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},kw=/^(?:[ \t]*(?:\n|$))+/,Sw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ew=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ul=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Tw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,mf=/(?:[*+-]|\d{1,9}[.)])/,Zv=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Yv=sn(Zv).replace(/bull/g,mf).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(),Aw=sn(Zv).replace(/bull/g,mf).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(),gf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Mw=/^[^\n]+/,vf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Cw=sn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Lw=sn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,mf).getRegex(),jc="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",bf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_w=sn("^ {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",bf).replace("tag",jc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Jv=sn(gf).replace("hr",Ul).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",jc).getRegex(),Nw=sn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Jv).getRegex(),yf={blockquote:Nw,code:Sw,def:Cw,fences:Ew,heading:Tw,hr:Ul,html:_w,lheading:Yv,list:Lw,newline:kw,paragraph:Jv,table:Tl,text:Mw},km=sn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ul).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",jc).getRegex(),Dw={...yf,lheading:Aw,table:km,paragraph:sn(gf).replace("hr",Ul).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",km).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",jc).getRegex()},Rw={...yf,html:sn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",bf).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:Tl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:sn(gf).replace("hr",Ul).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Yv).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Iw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ow=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qv=/^( {2,}|\\)\n(?!\s*$)/,Hw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,$c=/[\p{P}\p{S}]/u,wf=/[\s\p{P}\p{S}]/u,e6=/[^\s\p{P}\p{S}]/u,Pw=sn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,wf).getRegex(),t6=/(?!~)[\p{P}\p{S}]/u,zw=/(?!~)[\s\p{P}\p{S}]/u,Bw=/(?:[^\s\p{P}\p{S}]|~)/u,Fw=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,n6=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,qw=sn(n6,"u").replace(/punct/g,$c).getRegex(),jw=sn(n6,"u").replace(/punct/g,t6).getRegex(),r6="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",$w=sn(r6,"gu").replace(/notPunctSpace/g,e6).replace(/punctSpace/g,wf).replace(/punct/g,$c).getRegex(),Uw=sn(r6,"gu").replace(/notPunctSpace/g,Bw).replace(/punctSpace/g,zw).replace(/punct/g,t6).getRegex(),Vw=sn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,e6).replace(/punctSpace/g,wf).replace(/punct/g,$c).getRegex(),Ww=sn(/\\(punct)/,"gu").replace(/punct/g,$c).getRegex(),Gw=sn(/^<(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(),Kw=sn(bf).replace("(?:-->|$)","-->").getRegex(),Xw=sn("^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",Kw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,Zw=sn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",sc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),i6=sn(/^!?\[(label)\]\[(ref)\]/).replace("label",sc).replace("ref",vf).getRegex(),a6=sn(/^!?\[(ref)\](?:\[\])?/).replace("ref",vf).getRegex(),Yw=sn("reflink|nolink(?!\\()","g").replace("reflink",i6).replace("nolink",a6).getRegex(),xf={_backpedal:Tl,anyPunctuation:Ww,autolink:Gw,blockSkip:Fw,br:Qv,code:Ow,del:Tl,emStrongLDelim:qw,emStrongRDelimAst:$w,emStrongRDelimUnd:Vw,escape:Iw,link:Zw,nolink:a6,punctuation:Pw,reflink:i6,reflinkSearch:Yw,tag:Xw,text:Hw,url:Tl},Jw={...xf,link:sn(/^!?\[(label)\]\((.*?)\)/).replace("label",sc).getRegex(),reflink:sn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sc).getRegex()},Xh={...xf,emStrongRDelimAst:Uw,emStrongLDelim:jw,url:sn(/^((?: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\S]|[^\\])*?(?:\\[\s\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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Qw={...Xh,br:sn(Qv).replace("{2,}","*").getRegex(),text:sn(Xh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},c0={normal:yf,gfm:Dw,pedantic:Rw},al={normal:xf,gfm:Xh,breaks:Qw,pedantic:Jw},e9={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Sm=t=>e9[t];function Ii(t,e){if(e){if(kr.escapeTest.test(t))return t.replace(kr.escapeReplace,Sm)}else if(kr.escapeTestNoEncode.test(t))return t.replace(kr.escapeReplaceNoEncode,Sm);return t}function Em(t){try{t=encodeURI(t).replace(kr.percentDecode,"%")}catch{return null}return t}function Tm(t,e){var n;let r=t.replace(kr.findPipe,(h,c,p)=>{let v=!1,b=c;for(;--b>=0&&p[b]==="\\";)v=!v;return v?"|":" |"}),o=r.split(kr.splitPipe),l=0;if(o[0].trim()||o.shift(),o.length>0&&!((n=o.at(-1))!=null&&n.trim())&&o.pop(),e)if(o.length>e)o.splice(e);else for(;o.length<e;)o.push("");for(;l<o.length;l++)o[l]=o[l].trim().replace(kr.slashPipe,"|");return o}function ol(t,e,n){let r=t.length;if(r===0)return"";let o=0;for(;o<r;){let l=t.charAt(r-o-1);if(l===e&&!n)o++;else if(l!==e&&n)o++;else break}return t.slice(0,r-o)}function t9(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function Am(t,e,n,r,o){let l=e.href,h=e.title||null,c=t[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let p={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:h,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,p}function n9(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let o=r[1];return e.split(`
`).map(l=>{let h=l.match(n.other.beginningSpace);if(h===null)return l;let[c]=h;return c.length>=o.length?l.slice(o.length):l}).join(`
`)}var lc=class{constructor(t){vt(this,"options"),vt(this,"rules"),vt(this,"lexer"),this.options=t||Bo}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:ol(n,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=n9(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=ol(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:ol(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=ol(e[0],`
`).split(`
`),r="",o="",l=[];for(;n.length>0;){let h=!1,c=[],p;for(p=0;p<n.length;p++)if(this.rules.other.blockquoteStart.test(n[p]))c.push(n[p]),h=!0;else if(!h)c.push(n[p]);else break;n=n.slice(p);let v=c.join(`
`),b=v.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
${v}`:v,o=o?`${o}
${b}`:b;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,l,!0),this.lexer.state.top=g,n.length===0)break;let m=l.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let x=m,w=x.raw+`
`+n.join(`
`),S=this.blockquote(w);l[l.length-1]=S,r=r.substring(0,r.length-x.raw.length)+S.raw,o=o.substring(0,o.length-x.text.length)+S.text;break}else if((m==null?void 0:m.type)==="list"){let x=m,w=x.raw+`
`+n.join(`
`),S=this.list(w);l[l.length-1]=S,r=r.substring(0,r.length-m.raw.length)+S.raw,o=o.substring(0,o.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:r,tokens:l,text:o}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let l=this.rules.other.listItemRegex(n),h=!1;for(;t;){let p=!1,v="",b="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;v=e[0],t=t.substring(v.length);let g=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),m=t.split(`
`,1)[0],x=!g.trim(),w=0;if(this.options.pedantic?(w=2,b=g.trimStart()):x?w=e[1].length+1:(w=e[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=g.slice(w),w+=e[1].length),x&&this.rules.other.blankLine.test(m)&&(v+=m+`
`,t=t.substring(m.length+1),p=!0),!p){let C=this.rules.other.nextBulletRegex(w),T=this.rules.other.hrRegex(w),A=this.rules.other.fencesBeginRegex(w),M=this.rules.other.headingBeginRegex(w),y=this.rules.other.htmlBeginRegex(w);for(;t;){let N=t.split(`
`,1)[0],z;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),z=m):z=m.replace(this.rules.other.tabCharGlobal," "),A.test(m)||M.test(m)||y.test(m)||C.test(m)||T.test(m))break;if(z.search(this.rules.other.nonSpaceChar)>=w||!m.trim())b+=`
`+z.slice(w);else{if(x||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(g)||M.test(g)||T.test(g))break;b+=`
`+m}!x&&!m.trim()&&(x=!0),v+=N+`
`,t=t.substring(N.length+1),g=z.slice(w)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(h=!0));let S=null,k;this.options.gfm&&(S=this.rules.other.listIsTask.exec(b),S&&(k=S[0]!=="[ ] ",b=b.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),o.raw+=v}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let p=0;p<o.items.length;p++)if(this.lexer.state.top=!1,o.items[p].tokens=this.lexer.blockTokens(o.items[p].text,[]),!o.loose){let v=o.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));o.loose=b}if(o.loose)for(let p=0;p<o.items.length;p++)o.items[p].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:o}}}table(t){var e;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=Tm(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(e=n[3])!=null&&e.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],h={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(let c of o)this.rules.other.tableAlignRight.test(c)?h.align.push("right"):this.rules.other.tableAlignCenter.test(c)?h.align.push("center"):this.rules.other.tableAlignLeft.test(c)?h.align.push("left"):h.align.push(null);for(let c=0;c<r.length;c++)h.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:h.align[c]});for(let c of l)h.rows.push(Tm(c,h.header.length).map((p,v)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:h.align[v]})));return h}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=ol(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{let l=t9(e[2],"()");if(l===-2)return;if(l>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let r=e[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],o=l[3])}else o=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Am(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[r.toLowerCase()];if(!o){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return Am(n,o,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,l,h,c=o,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+o);(r=v.exec(e))!=null;){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(h=[...l].length,r[3]||r[4]){c+=h;continue}else if((r[5]||r[6])&&o%3&&!((o+h)%3)){p+=h;continue}if(c-=h,c>0)continue;h=Math.min(h,h+c+p);let b=[...r[0]][0].length,g=t.slice(0,o+r.index+b+h);if(Math.min(o,h)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var e;let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=n[0],o="mailto:"+r;else{let l;do l=n[0],n[0]=((e=this.rules.inline._backpedal.exec(n[0]))==null?void 0:e[0])??"";while(l!==n[0]);r=n[0],n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},ma=class Zh{constructor(e){vt(this,"tokens"),vt(this,"options"),vt(this,"state"),vt(this,"tokenizer"),vt(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Bo,this.options.tokenizer=this.options.tokenizer||new lc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:kr,block:c0.normal,inline:al.normal};this.options.pedantic?(n.block=c0.pedantic,n.inline=al.pedantic):this.options.gfm&&(n.block=c0.gfm,this.options.breaks?n.inline=al.breaks:n.inline=al.gfm),this.tokenizer.rules=n}static get rules(){return{block:c0,inline:al}}static lex(e,n){return new Zh(n).lex(e)}static lexInline(e,n){return new Zh(n).inlineTokens(e)}lex(e){e=e.replace(kr.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){var o,l,h;for(this.options.pedantic&&(e=e.replace(kr.tabCharGlobal," ").replace(kr.spaceLine,""));e;){let c;if((l=(o=this.options.extensions)==null?void 0:o.block)!=null&&l.some(v=>(c=v.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let v=n.at(-1);c.raw.length===1&&v!==void 0?v.raw+=`
`:n.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.text,this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.raw,this.inlineQueue.at(-1).src=v.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),n.push(c);continue}let p=e;if((h=this.options.extensions)!=null&&h.startBlock){let v=1/0,b=e.slice(1),g;this.options.extensions.startBlock.forEach(m=>{g=m.call({lexer:this},b),typeof g=="number"&&g>=0&&(v=Math.min(v,g))}),v<1/0&&v>=0&&(p=e.substring(0,v+1))}if(this.state.top&&(c=this.tokenizer.paragraph(p))){let v=n.at(-1);r&&(v==null?void 0:v.type)==="paragraph"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c),r=p.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(v)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var r,o,l;let h=e,c=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(h))!=null;)b.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.anyPunctuation.exec(h))!=null;)h=h.slice(0,c.index)+"++"+h.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(c=this.tokenizer.rules.inline.blockSkip.exec(h))!=null;)h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let p=!1,v="";for(;e;){p||(v=""),p=!1;let b;if((o=(r=this.options.extensions)==null?void 0:r.inline)!=null&&o.some(m=>(b=m.call({lexer:this},e,n))?(e=e.substring(b.raw.length),n.push(b),!0):!1))continue;if(b=this.tokenizer.escape(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.tag(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.link(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(b.raw.length);let m=n.at(-1);b.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(b=this.tokenizer.emStrong(e,h,v)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.codespan(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.br(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.del(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.autolink(e)){e=e.substring(b.raw.length),n.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(e))){e=e.substring(b.raw.length),n.push(b);continue}let g=e;if((l=this.options.extensions)!=null&&l.startInline){let m=1/0,x=e.slice(1),w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},x),typeof w=="number"&&w>=0&&(m=Math.min(m,w))}),m<1/0&&m>=0&&(g=e.substring(0,m+1))}if(b=this.tokenizer.inlineText(g)){e=e.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(v=b.raw.slice(-1)),p=!0;let m=n.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(e){let m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(m)}}return n}},cc=class{constructor(t){vt(this,"options"),vt(this,"parser"),this.options=t||Bo}space(t){return""}code({text:t,lang:e,escaped:n}){var r;let o=(r=(e||"").match(kr.notSpaceStart))==null?void 0:r[0],l=t.replace(kr.endingNewline,"")+`
`;return o?'<pre><code class="language-'+Ii(o)+'">'+(n?l:Ii(l,!0))+`</code></pre>
`:"<pre><code>"+(n?l:Ii(l,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(t){let e=t.ordered,n=t.start,r="";for(let h=0;h<t.items.length;h++){let c=t.items[h];r+=this.listitem(c)}let o=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+o+l+`>
`+r+"</"+o+`>
`}listitem(t){var e;let n="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?((e=t.tokens[0])==null?void 0:e.type)==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+Ii(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):n+=r+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let e="",n="";for(let o=0;o<t.header.length;o++)n+=this.tablecell(t.header[o]);e+=this.tablerow({text:n});let r="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];n="";for(let h=0;h<l.length;h++)n+=this.tablecell(l[h]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+r+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ii(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),o=Em(t);if(o===null)return r;t=o;let l='<a href="'+t+'"';return e&&(l+=' title="'+Ii(e)+'"'),l+=">"+r+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=Em(t);if(o===null)return Ii(n);t=o;let l=`<img src="${t}" alt="${n}"`;return e&&(l+=` title="${Ii(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ii(t.text)}},kf=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},ga=class Yh{constructor(e){vt(this,"options"),vt(this,"renderer"),vt(this,"textRenderer"),this.options=e||Bo,this.options.renderer=this.options.renderer||new cc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new kf}static parse(e,n){return new Yh(n).parse(e)}static parseInline(e,n){return new Yh(n).parseInline(e)}parse(e,n=!0){var r,o;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[c.type]){let v=c,b=this.options.extensions.renderers[v.type].call({parser:this},v);if(b!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(v.type)){l+=b||"";continue}}let p=c;switch(p.type){case"space":{l+=this.renderer.space(p);continue}case"hr":{l+=this.renderer.hr(p);continue}case"heading":{l+=this.renderer.heading(p);continue}case"code":{l+=this.renderer.code(p);continue}case"table":{l+=this.renderer.table(p);continue}case"blockquote":{l+=this.renderer.blockquote(p);continue}case"list":{l+=this.renderer.list(p);continue}case"html":{l+=this.renderer.html(p);continue}case"def":{l+=this.renderer.def(p);continue}case"paragraph":{l+=this.renderer.paragraph(p);continue}case"text":{let v=p,b=this.renderer.text(v);for(;h+1<e.length&&e[h+1].type==="text";)v=e[++h],b+=`
`+this.renderer.text(v);n?l+=this.renderer.paragraph({type:"paragraph",raw:b,text:b,tokens:[{type:"text",raw:b,text:b,escaped:!0}]}):l+=b;continue}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}parseInline(e,n=this.renderer){var r,o;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[c.type]){let v=this.options.extensions.renderers[c.type].call({parser:this},c);if(v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){l+=v||"";continue}}let p=c;switch(p.type){case"escape":{l+=n.text(p);break}case"html":{l+=n.html(p);break}case"link":{l+=n.link(p);break}case"image":{l+=n.image(p);break}case"strong":{l+=n.strong(p);break}case"em":{l+=n.em(p);break}case"codespan":{l+=n.codespan(p);break}case"br":{l+=n.br(p);break}case"del":{l+=n.del(p);break}case"text":{l+=n.text(p);break}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}},Gd,O0=(Gd=class{constructor(t){vt(this,"options"),vt(this,"block"),this.options=t||Bo}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?ma.lex:ma.lexInline}provideParser(){return this.block?ga.parse:ga.parseInline}},vt(Gd,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Gd),r9=class{constructor(...t){vt(this,"defaults",ff()),vt(this,"options",this.setOptions),vt(this,"parse",this.parseMarkdown(!0)),vt(this,"parseInline",this.parseMarkdown(!1)),vt(this,"Parser",ga),vt(this,"Renderer",cc),vt(this,"TextRenderer",kf),vt(this,"Lexer",ma),vt(this,"Tokenizer",lc),vt(this,"Hooks",O0),this.use(...t)}walkTokens(t,e){var n,r;let o=[];for(let l of t)switch(o=o.concat(e.call(this,l)),l.type){case"table":{let h=l;for(let c of h.header)o=o.concat(this.walkTokens(c.tokens,e));for(let c of h.rows)for(let p of c)o=o.concat(this.walkTokens(p.tokens,e));break}case"list":{let h=l;o=o.concat(this.walkTokens(h.items,e));break}default:{let h=l;(r=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&r[h.type]?this.defaults.extensions.childTokens[h.type].forEach(c=>{let p=h[c].flat(1/0);o=o.concat(this.walkTokens(p,e))}):h.tokens&&(o=o.concat(this.walkTokens(h.tokens,e)))}}return o}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=e.renderers[o.name];l?e.renderers[o.name]=function(...h){let c=o.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[o.level];l?l.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){let o=this.defaults.renderer||new cc(this.defaults);for(let l in n.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new lc(this.defaults);for(let l in n.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new O0;for(let l in n.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let h=l,c=n.hooks[h],p=o[h];O0.passThroughHooks.has(l)?o[h]=v=>{if(this.defaults.async)return Promise.resolve(c.call(o,v)).then(g=>p.call(o,g));let b=c.call(o,v);return p.call(o,b)}:o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,l=n.walkTokens;r.walkTokens=function(h){let c=[];return c.push(l.call(this,h)),o&&(c=c.concat(o.call(this,h))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return ma.lex(t,e??this.defaults)}parser(t,e){return ga.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},o={...this.defaults,...r},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return l(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 e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=t);let h=o.hooks?o.hooks.provideLexer():t?ma.lex:ma.lexInline,c=o.hooks?o.hooks.provideParser():t?ga.parse:ga.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(p=>h(p,o)).then(p=>o.hooks?o.hooks.processAllTokens(p):p).then(p=>o.walkTokens?Promise.all(this.walkTokens(p,o.walkTokens)).then(()=>p):p).then(p=>c(p,o)).then(p=>o.hooks?o.hooks.postprocess(p):p).catch(l);try{o.hooks&&(e=o.hooks.preprocess(e));let p=h(e,o);o.hooks&&(p=o.hooks.processAllTokens(p)),o.walkTokens&&this.walkTokens(p,o.walkTokens);let v=c(p,o);return o.hooks&&(v=o.hooks.postprocess(v)),v}catch(p){return l(p)}}}onError(t,e){return n=>{if(n.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Ii(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},Io=new r9;function Jt(t,e){return Io.parse(t,e)}Jt.options=Jt.setOptions=function(t){return Io.setOptions(t),Jt.defaults=Io.defaults,Xv(Jt.defaults),Jt};Jt.getDefaults=ff;Jt.defaults=Bo;Jt.use=function(...t){return Io.use(...t),Jt.defaults=Io.defaults,Xv(Jt.defaults),Jt};Jt.walkTokens=function(t,e){return Io.walkTokens(t,e)};Jt.parseInline=Io.parseInline;Jt.Parser=ga;Jt.parser=ga.parse;Jt.Renderer=cc;Jt.TextRenderer=kf;Jt.Lexer=ma;Jt.lexer=ma.lex;Jt.Tokenizer=lc;Jt.Hooks=O0;Jt.parse=Jt;Jt.options;Jt.setOptions;Jt.use;Jt.walkTokens;Jt.parseInline;ga.parse;ma.lex;var Jh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function o6(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s6={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,h={},c={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function T(A){return A instanceof p?new p(A.type,T(A.content),A.alias):Array.isArray(A)?A.map(T):A.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(T){return Object.prototype.toString.call(T).slice(8,-1)},objId:function(T){return T.__id||Object.defineProperty(T,"__id",{value:++l}),T.__id},clone:function T(A,M){M=M||{};var y,N;switch(c.util.type(A)){case"Object":if(N=c.util.objId(A),M[N])return M[N];y={},M[N]=y;for(var z in A)A.hasOwnProperty(z)&&(y[z]=T(A[z],M));return y;case"Array":return N=c.util.objId(A),M[N]?M[N]:(y=[],M[N]=y,A.forEach(function(F,P){y[P]=T(F,M)}),y);default:return A}},getLanguage:function(T){for(;T;){var A=o.exec(T.className);if(A)return A[1].toLowerCase();T=T.parentElement}return"none"},setLanguage:function(T,A){T.className=T.className.replace(RegExp(o,"gi"),""),T.classList.add("language-"+A)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT"&&1<2)return document.currentScript;try{throw new Error}catch(y){var T=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack)||[])[1];if(T){var A=document.getElementsByTagName("script");for(var M in A)if(A[M].src==T)return A[M]}return null}},isActive:function(T,A,M){for(var y="no-"+A;T;){var N=T.classList;if(N.contains(A))return!0;if(N.contains(y))return!1;T=T.parentElement}return!!M}},languages:{plain:h,plaintext:h,text:h,txt:h,extend:function(T,A){var M=c.util.clone(c.languages[T]);for(var y in A)M[y]=A[y];return M},insertBefore:function(T,A,M,y){y=y||c.languages;var N=y[T],z={};for(var F in N)if(N.hasOwnProperty(F)){if(F==A)for(var P in M)M.hasOwnProperty(P)&&(z[P]=M[P]);M.hasOwnProperty(F)||(z[F]=N[F])}var Y=y[T];return y[T]=z,c.languages.DFS(c.languages,function(te,ce){ce===Y&&te!=T&&(this[te]=z)}),z},DFS:function T(A,M,y,N){N=N||{};var z=c.util.objId;for(var F in A)if(A.hasOwnProperty(F)){M.call(A,F,A[F],y||F);var P=A[F],Y=c.util.type(P);Y==="Object"&&!N[z(P)]?(N[z(P)]=!0,T(P,M,null,N)):Y==="Array"&&!N[z(P)]&&(N[z(P)]=!0,T(P,M,F,N))}}},plugins:{},highlightAll:function(T,A){c.highlightAllUnder(document,T,A)},highlightAllUnder:function(T,A,M){var y={callback:M,container:T,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};c.hooks.run("before-highlightall",y),y.elements=Array.prototype.slice.apply(y.container.querySelectorAll(y.selector)),c.hooks.run("before-all-elements-highlight",y);for(var N=0,z;z=y.elements[N++];)c.highlightElement(z,A===!0,y.callback)},highlightElement:function(T,A,M){var y=c.util.getLanguage(T),N=c.languages[y];c.util.setLanguage(T,y);var z=T.parentElement;z&&z.nodeName.toLowerCase()==="pre"&&c.util.setLanguage(z,y);var F=T.textContent,P={element:T,language:y,grammar:N,code:F};function Y(ce){P.highlightedCode=ce,c.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,c.hooks.run("after-highlight",P),c.hooks.run("complete",P),M&&M.call(P.element)}if(c.hooks.run("before-sanity-check",P),z=P.element.parentElement,z&&z.nodeName.toLowerCase()==="pre"&&!z.hasAttribute("tabindex")&&z.setAttribute("tabindex","0"),!P.code){c.hooks.run("complete",P),M&&M.call(P.element);return}if(c.hooks.run("before-highlight",P),!P.grammar){Y(c.util.encode(P.code));return}if(A&&r.Worker){var te=new Worker(c.filename);te.onmessage=function(ce){Y(ce.data)},te.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else Y(c.highlight(P.code,P.grammar,P.language))},highlight:function(T,A,M){var y={code:T,grammar:A,language:M};if(c.hooks.run("before-tokenize",y),!y.grammar)throw new Error('The language "'+y.language+'" has no grammar.');return y.tokens=c.tokenize(y.code,y.grammar),c.hooks.run("after-tokenize",y),p.stringify(c.util.encode(y.tokens),y.language)},tokenize:function(T,A){var M=A.rest;if(M){for(var y in M)A[y]=M[y];delete A.rest}var N=new g;return m(N,N.head,T),b(T,N,A,N.head,0),w(N)},hooks:{all:{},add:function(T,A){var M=c.hooks.all;M[T]=M[T]||[],M[T].push(A)},run:function(T,A){var M=c.hooks.all[T];if(!(!M||!M.length))for(var y=0,N;N=M[y++];)N(A)}},Token:p};r.Prism=c;function p(T,A,M,y){this.type=T,this.content=A,this.alias=M,this.length=(y||"").length|0}p.stringify=function T(A,M){if(typeof A=="string")return A;if(Array.isArray(A)){var y="";return A.forEach(function(Y){y+=T(Y,M)}),y}var N={type:A.type,content:T(A.content,M),tag:"span",classes:["token",A.type],attributes:{},language:M},z=A.alias;z&&(Array.isArray(z)?Array.prototype.push.apply(N.classes,z):N.classes.push(z)),c.hooks.run("wrap",N);var F="";for(var P in N.attributes)F+=" "+P+'="'+(N.attributes[P]||"").replace(/"/g,"&quot;")+'"';return"<"+N.tag+' class="'+N.classes.join(" ")+'"'+F+">"+N.content+"</"+N.tag+">"};function v(T,A,M,y){T.lastIndex=A;var N=T.exec(M);if(N&&y&&N[1]){var z=N[1].length;N.index+=z,N[0]=N[0].slice(z)}return N}function b(T,A,M,y,N,z){for(var F in M)if(!(!M.hasOwnProperty(F)||!M[F])){var P=M[F];P=Array.isArray(P)?P:[P];for(var Y=0;Y<P.length;++Y){if(z&&z.cause==F+","+Y)return;var te=P[Y],ce=te.inside,Me=!!te.lookbehind,Fe=!!te.greedy,We=te.alias;if(Fe&&!te.pattern.global){var rt=te.pattern.toString().match(/[imsuy]*$/)[0];te.pattern=RegExp(te.pattern.source,rt+"g")}for(var je=te.pattern||te,Ne=y.next,nt=N;Ne!==A.tail&&!(z&&nt>=z.reach);nt+=Ne.value.length,Ne=Ne.next){var ct=Ne.value;if(A.length>T.length)return;if(!(ct instanceof p)){var tt=1,q;if(Fe){if(q=v(je,nt,T,Me),!q||q.index>=T.length)break;var Nt=q.index,Ht=q.index+q[0].length,Rt=nt;for(Rt+=Ne.value.length;Nt>=Rt;)Ne=Ne.next,Rt+=Ne.value.length;if(Rt-=Ne.value.length,nt=Rt,Ne.value instanceof p)continue;for(var $t=Ne;$t!==A.tail&&(Rt<Ht||typeof $t.value=="string");$t=$t.next)tt++,Rt+=$t.value.length;tt--,ct=T.slice(nt,Rt),q.index-=nt}else if(q=v(je,0,ct,Me),!q)continue;var Nt=q.index,oe=q[0],he=ct.slice(0,Nt),J=ct.slice(Nt+oe.length),ee=nt+ct.length;z&&ee>z.reach&&(z.reach=ee);var Ce=Ne.prev;he&&(Ce=m(A,Ce,he),nt+=he.length),x(A,Ce,tt);var se=new p(F,ce?c.tokenize(oe,ce):oe,We,oe);if(Ne=m(A,Ce,se),J&&m(A,Ne,J),tt>1){var G={cause:F+","+Y,reach:ee};b(T,A,M,Ne.prev,nt,G),z&&G.reach>z.reach&&(z.reach=G.reach)}}}}}}function g(){var T={value:null,prev:null,next:null},A={value:null,prev:T,next:null};T.next=A,this.head=T,this.tail=A,this.length=0}function m(T,A,M){var y=A.next,N={value:M,prev:A,next:y};return A.next=N,y.prev=N,T.length++,N}function x(T,A,M){for(var y=A.next,N=0;N<M&&y!==T.tail;N++)y=y.next;A.next=y,y.prev=A,T.length-=N}function w(T){for(var A=[],M=T.head.next;M!==T.tail;)A.push(M.value),M=M.next;return A}if(!r.document)return r.addEventListener&&(c.disableWorkerMessageHandler||r.addEventListener("message",function(T){var A=JSON.parse(T.data),M=A.language,y=A.code,N=A.immediateClose;r.postMessage(c.highlight(y,c.languages[M],M)),N&&r.close()},!1)),c;var S=c.util.currentScript();S&&(c.filename=S.src,S.hasAttribute("data-manual")&&(c.manual=!0));function k(){c.manual||c.highlightAll()}if(!c.manual){var C=document.readyState;C==="loading"||C==="interactive"&&S&&S.defer?document.addEventListener("DOMContentLoaded",k):window.requestAnimationFrame?window.requestAnimationFrame(k):window.setTimeout(k,16)}return c}(e);t.exports&&(t.exports=n),typeof Jh<"u"&&(Jh.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,o){var l={};l["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},l.cdata=/^<!\[CDATA\[|\]\]>$/i;var h={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:l}};h["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var c={};c[r]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:h},n.languages.insertBefore("markup","cdata",c)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var l=r.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(w,S){return"✖ Error "+w+" while fetching file: "+S},l="✖ Error: File does not exist or is empty",h={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},c="data-src-status",p="loading",v="loaded",b="failed",g="pre[data-src]:not(["+c+'="'+v+'"]):not(['+c+'="'+p+'"])';function m(w,S,k){var C=new XMLHttpRequest;C.open("GET",w,!0),C.onreadystatechange=function(){C.readyState==4&&(C.status<400&&C.responseText?S(C.responseText):C.status>=400?k(o(C.status,C.statusText)):k(l))},C.send(null)}function x(w){var S=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(w||"");if(S){var k=Number(S[1]),C=S[2],T=S[3];return C?T?[k,Number(T)]:[k,void 0]:[k,k]}}n.hooks.add("before-highlightall",function(w){w.selector+=", "+g}),n.hooks.add("before-sanity-check",function(w){var S=w.element;if(S.matches(g)){w.code="",S.setAttribute(c,p);var k=S.appendChild(document.createElement("CODE"));k.textContent=r;var C=S.getAttribute("data-src"),T=w.language;if(T==="none"){var A=(/\.(\w+)$/.exec(C)||[,"none"])[1];T=h[A]||A}n.util.setLanguage(k,T),n.util.setLanguage(S,T);var M=n.plugins.autoloader;M&&M.loadLanguages(T),m(C,function(y){S.setAttribute(c,v);var N=x(S.getAttribute("data-range"));if(N){var z=y.split(/\r\n?|\n/g),F=N[0],P=N[1]==null?z.length:N[1];F<0&&(F+=z.length),F=Math.max(0,Math.min(F-1,z.length)),P<0&&(P+=z.length),P=Math.max(0,Math.min(P,z.length)),y=z.slice(F,P).join(`
`),S.hasAttribute("data-start")||S.setAttribute("data-start",String(F+1))}k.textContent=y,n.highlightElement(k)},function(y){S.setAttribute(c,b),k.textContent=y})}}),n.plugins.fileHighlight={highlight:function(w){for(var S=(w||document).querySelectorAll(g),k=0,C;C=S[k++];)n.highlightElement(C)}},n.fileHighlight=function(){n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(s6);var i9=s6.exports;const Mm=o6(i9);class jr{constructor(e,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=n,this.end=r}static range(e,n){return n?!e||!e.loc||!n.loc||e.loc.lexer!==n.loc.lexer?null:new jr(e.loc.lexer,e.loc.start,n.loc.end):e&&e.loc}}class ii{constructor(e,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=n}range(e,n){return new ii(n,jr.range(this,e))}}let et=class l6{constructor(e,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+e,o,l,h=n&&n.loc;if(h&&h.start<=h.end){var c=h.lexer.input;o=h.start,l=h.end,o===c.length?r+=" at end of input: ":r+=" at position "+(o+1)+": ";var p=c.slice(o,l).replace(/[^]/g,"$&̲"),v;o>15?v="…"+c.slice(o-15,o):v=c.slice(0,o);var b;l+15<c.length?b=c.slice(l,l+15)+"…":b=c.slice(l),r+=v+p+b}var g=new Error(r);return g.name="ParseError",g.__proto__=l6.prototype,g.position=o,o!=null&&l!=null&&(g.length=l-o),g.rawMessage=e,g}};et.prototype.__proto__=Error.prototype;var a9=function(t,e){return t.indexOf(e)!==-1},o9=function(t,e){return t===void 0?e:t},s9=/([A-Z])/g,l9=function(t){return t.replace(s9,"-$1").toLowerCase()},c9={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},u9=/[&><"']/g;function d9(t){return String(t).replace(u9,e=>c9[e])}var c6=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},h9=function(t){var e=c6(t);return e.type==="mathord"||e.type==="textord"||e.type==="atom"},p9=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},f9=function(t){var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},wt={contains:a9,deflt:o9,escape:d9,hyphenate:l9,getBaseElem:c6,isCharacterBox:h9,protocolFromUrl:f9},H0={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function m9(t){if(t.default)return t.default;var e=t.type,n=Array.isArray(e)?e[0]:e;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Sf{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var n in H0)if(H0.hasOwnProperty(n)){var r=H0[n];this[n]=e[n]!==void 0?r.processor?r.processor(e[n]):e[n]:m9(r)}}reportNonstrict(e,n,r){var o=this.strict;if(typeof o=="function"&&(o=o(e,n,r)),!(!o||o==="ignore")){if(o===!0||o==="error")throw new et("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+e+"]"),r);o==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+o+"': "+n+" ["+e+"]"))}}useStrictBehavior(e,n,r){var o=this.strict;if(typeof o=="function")try{o=o(e,n,r)}catch{o="error"}return!o||o==="ignore"?!1:o===!0||o==="error"?!0:o==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+o+"': "+n+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var n=wt.protocolFromUrl(e.url);if(n==null)return!1;e.protocol=n}var r=typeof this.trust=="function"?this.trust(e):this.trust;return!!r}}class za{constructor(e,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=n,this.cramped=r}sup(){return zi[g9[this.id]]}sub(){return zi[v9[this.id]]}fracNum(){return zi[b9[this.id]]}fracDen(){return zi[y9[this.id]]}cramp(){return zi[w9[this.id]]}text(){return zi[x9[this.id]]}isTight(){return this.size>=2}}var Ef=0,uc=1,is=2,ya=3,Il=4,ei=5,cs=6,Sr=7,zi=[new za(Ef,0,!1),new za(uc,0,!0),new za(is,1,!1),new za(ya,1,!0),new za(Il,2,!1),new za(ei,2,!0),new za(cs,3,!1),new za(Sr,3,!0)],g9=[Il,ei,Il,ei,cs,Sr,cs,Sr],v9=[ei,ei,ei,ei,Sr,Sr,Sr,Sr],b9=[is,ya,Il,ei,cs,Sr,cs,Sr],y9=[ya,ya,ei,ei,Sr,Sr,Sr,Sr],w9=[uc,uc,ya,ya,ei,ei,Sr,Sr],x9=[Ef,uc,is,ya,is,ya,is,ya],Tt={DISPLAY:zi[Ef],TEXT:zi[is],SCRIPT:zi[Il],SCRIPTSCRIPT:zi[cs]},Qh=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function k9(t){for(var e=0;e<Qh.length;e++)for(var n=Qh[e],r=0;r<n.blocks.length;r++){var o=n.blocks[r];if(t>=o[0]&&t<=o[1])return n.name}return null}var P0=[];Qh.forEach(t=>t.blocks.forEach(e=>P0.push(...e)));function u6(t){for(var e=0;e<P0.length;e+=2)if(t>=P0[e]&&t<=P0[e+1])return!0;return!1}var Wo=80,S9=function(t,e){return"M95,"+(622+t+e)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+t/2.075+" -"+t+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+t)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},E9=function(t,e){return"M263,"+(601+t+e)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+t/2.084+" -"+t+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+t)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},T9=function(t,e){return"M983 "+(10+t+e)+`
l`+t/3.13+" -"+t+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},A9=function(t,e){return"M424,"+(2398+t+e)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+t)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+e+`
h400000v`+(40+t)+"h-400000z"},M9=function(t,e){return"M473,"+(2713+t+e)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"},C9=function(t){var e=t/2;return"M400000 "+t+" H0 L"+e+" 0 l65 45 L145 "+(t-80)+" H400000z"},L9=function(t,e,n){var r=n-54-e-t;return"M702 "+(t+e)+"H400000"+(40+t)+`
H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+e+"H400000v"+(40+t)+"H742z"},_9=function(t,e,n){e=1e3*e;var r="";switch(t){case"sqrtMain":r=S9(e,Wo);break;case"sqrtSize1":r=E9(e,Wo);break;case"sqrtSize2":r=T9(e,Wo);break;case"sqrtSize3":r=A9(e,Wo);break;case"sqrtSize4":r=M9(e,Wo);break;case"sqrtTall":r=L9(e,Wo,n)}return r},N9=function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z"+("M367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z");case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257z"+("M478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z");default:return""}},Cm={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},D9=function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+` v585 h43z
M367 15 v585 v`+e+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v602 h84z
M403 1759 V0 H319 V1759 v`+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v602 h84z
M347 1759 V0 h-84 V1759 v`+e+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(e+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(e+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(e+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class Vl{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return wt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){for(var e="",n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e}toText(){var e=n=>n.toText();return this.children.map(e).join("")}}var Fi={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},u0={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Lm={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function R9(t,e){Fi[t]=e}function Tf(t,e,n){if(!Fi[e])throw new Error("Font metrics not found for font: "+e+".");var r=t.charCodeAt(0),o=Fi[e][r];if(!o&&t[0]in Lm&&(r=Lm[t[0]].charCodeAt(0),o=Fi[e][r]),!o&&n==="text"&&u6(r)&&(o=Fi[e][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var Kd={};function I9(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!Kd[e]){var n=Kd[e]={cssEmPerMu:u0.quad[e]/18};for(var r in u0)u0.hasOwnProperty(r)&&(n[r]=u0[r][e])}return Kd[e]}var O9=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],_m=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Nm=function(t,e){return e.size<2?t:O9[t-1][e.size-1]};class ca{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||ca.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=_m[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return new ca(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Nm(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:_m[e-1]})}havingBaseStyle(e){e=e||this.style.text();var n=Nm(ca.BASESIZE,e);return this.size===n&&this.textSize===ca.BASESIZE&&this.style===e?this:this.extend({style:e,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==ca.BASESIZE?["sizing","reset-size"+this.size,"size"+ca.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=I9(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ca.BASESIZE=6;var ep={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},H9={ex:!0,em:!0,mu:!0},d6=function(t){return typeof t!="string"&&(t=t.unit),t in ep||t in H9||t==="ex"},Nn=function(t,e){var n;if(t.unit in ep)n=ep[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if(t.unit==="mu")n=e.fontMetrics().cssEmPerMu;else{var r;if(e.style.isTight()?r=e.havingStyle(e.style.text()):r=e,t.unit==="ex")n=r.fontMetrics().xHeight;else if(t.unit==="em")n=r.fontMetrics().quad;else throw new et("Invalid unit: '"+t.unit+"'");r!==e&&(n*=r.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*n,e.maxSize)},at=function(t){return+t.toFixed(4)+"em"},Ja=function(t){return t.filter(e=>e).join(" ")},h6=function(t,e,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},e){e.style.isTight()&&this.classes.push("mtight");var r=e.getColor();r&&(this.style.color=r)}},p6=function(t){var e=document.createElement(t);e.className=Ja(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(e.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&e.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)e.appendChild(this.children[o].toNode());return e},P9=/[\s"'>/=\x00-\x1f]/,f6=function(t){var e="<"+t;this.classes.length&&(e+=' class="'+wt.escape(Ja(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=wt.hyphenate(r)+":"+this.style[r]+";");n&&(e+=' style="'+wt.escape(n)+'"');for(var o in this.attributes)if(this.attributes.hasOwnProperty(o)){if(P9.test(o))throw new et("Invalid attribute name '"+o+"'");e+=" "+o+'="'+wt.escape(this.attributes[o])+'"'}e+=">";for(var l=0;l<this.children.length;l++)e+=this.children[l].toMarkup();return e+="</"+t+">",e};class Wl{constructor(e,n,r,o){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,h6.call(this,e,r,o),this.children=n||[]}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return wt.contains(this.classes,e)}toNode(){return p6.call(this,"span")}toMarkup(){return f6.call(this,"span")}}class Af{constructor(e,n,r,o){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,h6.call(this,n,o),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return wt.contains(this.classes,e)}toNode(){return p6.call(this,"a")}toMarkup(){return f6.call(this,"a")}}class z9{constructor(e,n,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return wt.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(e.style[n]=this.style[n]);return e}toMarkup(){var e='<img src="'+wt.escape(this.src)+'"'+(' alt="'+wt.escape(this.alt)+'"'),n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=wt.hyphenate(r)+":"+this.style[r]+";");return n&&(e+=' style="'+wt.escape(n)+'"'),e+="'/>",e}}var B9={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class si{constructor(e,n,r,o,l,h,c,p){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=n||0,this.depth=r||0,this.italic=o||0,this.skew=l||0,this.width=h||0,this.classes=c||[],this.style=p||{},this.maxFontSize=0;var v=k9(this.text.charCodeAt(0));v&&this.classes.push(v+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=B9[this.text])}hasClass(e){return wt.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),n=null;this.italic>0&&(n=document.createElement("span"),n.style.marginRight=at(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=Ja(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(n=n||document.createElement("span"),n.style[r]=this.style[r]);return n?(n.appendChild(e),n):e}toMarkup(){var e=!1,n="<span";this.classes.length&&(e=!0,n+=' class="',n+=wt.escape(Ja(this.classes)),n+='"');var r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(var o in this.style)this.style.hasOwnProperty(o)&&(r+=wt.hyphenate(o)+":"+this.style[o]+";");r&&(e=!0,n+=' style="'+wt.escape(r)+'"');var l=wt.escape(this.text);return e?(n+=">",n+=l,n+="</span>",n):l}}class Ta{constructor(e,n){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=n||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"svg");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)n.appendChild(this.children[o].toNode());return n}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="'+wt.escape(this.attributes[n])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>",e}}class Qa{constructor(e,n){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=n}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",Cm[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+wt.escape(this.alternate)+'"/>':'<path d="'+wt.escape(Cm[this.pathName])+'"/>'}}class tp{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"line");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var e="<line";for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="'+wt.escape(this.attributes[n])+'"');return e+="/>",e}}function Dm(t){if(t instanceof si)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function F9(t){if(t instanceof Wl)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}var q9={bin:1,close:1,inner:1,open:1,punct:1,rel:1},j9={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},wn={math:{},text:{}};function R(t,e,n,r,o,l){wn[t][o]={font:e,group:n,replace:r},l&&r&&(wn[t][r]=wn[t][o])}var O="math",Ue="text",j="main",ne="ams",Tn="accent-token",pt="bin",Ar="close",hs="inner",St="mathord",Gn="op-token",Kr="open",Uc="punct",ie="rel",Da="spacing",me="textord";R(O,j,ie,"≡","\\equiv",!0);R(O,j,ie,"≺","\\prec",!0);R(O,j,ie,"≻","\\succ",!0);R(O,j,ie,"","\\sim",!0);R(O,j,ie,"⊥","\\perp");R(O,j,ie,"⪯","\\preceq",!0);R(O,j,ie,"⪰","\\succeq",!0);R(O,j,ie,"≃","\\simeq",!0);R(O,j,ie,"","\\mid",!0);R(O,j,ie,"≪","\\ll",!0);R(O,j,ie,"≫","\\gg",!0);R(O,j,ie,"≍","\\asymp",!0);R(O,j,ie,"∥","\\parallel");R(O,j,ie,"⋈","\\bowtie",!0);R(O,j,ie,"⌣","\\smile",!0);R(O,j,ie,"⊑","\\sqsubseteq",!0);R(O,j,ie,"⊒","\\sqsupseteq",!0);R(O,j,ie,"≐","\\doteq",!0);R(O,j,ie,"⌢","\\frown",!0);R(O,j,ie,"∋","\\ni",!0);R(O,j,ie,"∝","\\propto",!0);R(O,j,ie,"⊢","\\vdash",!0);R(O,j,ie,"⊣","\\dashv",!0);R(O,j,ie,"∋","\\owns");R(O,j,Uc,".","\\ldotp");R(O,j,Uc,"⋅","\\cdotp");R(O,j,me,"#","\\#");R(Ue,j,me,"#","\\#");R(O,j,me,"&","\\&");R(Ue,j,me,"&","\\&");R(O,j,me,"ℵ","\\aleph",!0);R(O,j,me,"∀","\\forall",!0);R(O,j,me,"ℏ","\\hbar",!0);R(O,j,me,"∃","\\exists",!0);R(O,j,me,"∇","\\nabla",!0);R(O,j,me,"♭","\\flat",!0);R(O,j,me,"","\\ell",!0);R(O,j,me,"♮","\\natural",!0);R(O,j,me,"♣","\\clubsuit",!0);R(O,j,me,"℘","\\wp",!0);R(O,j,me,"♯","\\sharp",!0);R(O,j,me,"♢","\\diamondsuit",!0);R(O,j,me,"","\\Re",!0);R(O,j,me,"♡","\\heartsuit",!0);R(O,j,me,"","\\Im",!0);R(O,j,me,"♠","\\spadesuit",!0);R(O,j,me,"§","\\S",!0);R(Ue,j,me,"§","\\S");R(O,j,me,"¶","\\P",!0);R(Ue,j,me,"¶","\\P");R(O,j,me,"†","\\dag");R(Ue,j,me,"†","\\dag");R(Ue,j,me,"†","\\textdagger");R(O,j,me,"‡","\\ddag");R(Ue,j,me,"‡","\\ddag");R(Ue,j,me,"‡","\\textdaggerdbl");R(O,j,Ar,"⎱","\\rmoustache",!0);R(O,j,Kr,"⎰","\\lmoustache",!0);R(O,j,Ar,"⟯","\\rgroup",!0);R(O,j,Kr,"⟮","\\lgroup",!0);R(O,j,pt,"∓","\\mp",!0);R(O,j,pt,"⊖","\\ominus",!0);R(O,j,pt,"⊎","\\uplus",!0);R(O,j,pt,"⊓","\\sqcap",!0);R(O,j,pt,"","\\ast");R(O,j,pt,"⊔","\\sqcup",!0);R(O,j,pt,"◯","\\bigcirc",!0);R(O,j,pt,"∙","\\bullet",!0);R(O,j,pt,"‡","\\ddagger");R(O,j,pt,"≀","\\wr",!0);R(O,j,pt,"⨿","\\amalg");R(O,j,pt,"&","\\And");R(O,j,ie,"⟵","\\longleftarrow",!0);R(O,j,ie,"⇐","\\Leftarrow",!0);R(O,j,ie,"⟸","\\Longleftarrow",!0);R(O,j,ie,"⟶","\\longrightarrow",!0);R(O,j,ie,"⇒","\\Rightarrow",!0);R(O,j,ie,"⟹","\\Longrightarrow",!0);R(O,j,ie,"↔","\\leftrightarrow",!0);R(O,j,ie,"⟷","\\longleftrightarrow",!0);R(O,j,ie,"⇔","\\Leftrightarrow",!0);R(O,j,ie,"⟺","\\Longleftrightarrow",!0);R(O,j,ie,"↦","\\mapsto",!0);R(O,j,ie,"⟼","\\longmapsto",!0);R(O,j,ie,"↗","\\nearrow",!0);R(O,j,ie,"↩","\\hookleftarrow",!0);R(O,j,ie,"↪","\\hookrightarrow",!0);R(O,j,ie,"↘","\\searrow",!0);R(O,j,ie,"↼","\\leftharpoonup",!0);R(O,j,ie,"⇀","\\rightharpoonup",!0);R(O,j,ie,"↙","\\swarrow",!0);R(O,j,ie,"↽","\\leftharpoondown",!0);R(O,j,ie,"⇁","\\rightharpoondown",!0);R(O,j,ie,"↖","\\nwarrow",!0);R(O,j,ie,"⇌","\\rightleftharpoons",!0);R(O,ne,ie,"≮","\\nless",!0);R(O,ne,ie,"","\\@nleqslant");R(O,ne,ie,"","\\@nleqq");R(O,ne,ie,"⪇","\\lneq",!0);R(O,ne,ie,"≨","\\lneqq",!0);R(O,ne,ie,"","\\@lvertneqq");R(O,ne,ie,"⋦","\\lnsim",!0);R(O,ne,ie,"⪉","\\lnapprox",!0);R(O,ne,ie,"⊀","\\nprec",!0);R(O,ne,ie,"⋠","\\npreceq",!0);R(O,ne,ie,"⋨","\\precnsim",!0);R(O,ne,ie,"⪹","\\precnapprox",!0);R(O,ne,ie,"≁","\\nsim",!0);R(O,ne,ie,"","\\@nshortmid");R(O,ne,ie,"∤","\\nmid",!0);R(O,ne,ie,"⊬","\\nvdash",!0);R(O,ne,ie,"⊭","\\nvDash",!0);R(O,ne,ie,"⋪","\\ntriangleleft");R(O,ne,ie,"⋬","\\ntrianglelefteq",!0);R(O,ne,ie,"⊊","\\subsetneq",!0);R(O,ne,ie,"","\\@varsubsetneq");R(O,ne,ie,"⫋","\\subsetneqq",!0);R(O,ne,ie,"","\\@varsubsetneqq");R(O,ne,ie,"≯","\\ngtr",!0);R(O,ne,ie,"","\\@ngeqslant");R(O,ne,ie,"","\\@ngeqq");R(O,ne,ie,"⪈","\\gneq",!0);R(O,ne,ie,"≩","\\gneqq",!0);R(O,ne,ie,"","\\@gvertneqq");R(O,ne,ie,"⋧","\\gnsim",!0);R(O,ne,ie,"⪊","\\gnapprox",!0);R(O,ne,ie,"⊁","\\nsucc",!0);R(O,ne,ie,"⋡","\\nsucceq",!0);R(O,ne,ie,"⋩","\\succnsim",!0);R(O,ne,ie,"⪺","\\succnapprox",!0);R(O,ne,ie,"≆","\\ncong",!0);R(O,ne,ie,"","\\@nshortparallel");R(O,ne,ie,"∦","\\nparallel",!0);R(O,ne,ie,"⊯","\\nVDash",!0);R(O,ne,ie,"⋫","\\ntriangleright");R(O,ne,ie,"⋭","\\ntrianglerighteq",!0);R(O,ne,ie,"","\\@nsupseteqq");R(O,ne,ie,"⊋","\\supsetneq",!0);R(O,ne,ie,"","\\@varsupsetneq");R(O,ne,ie,"⫌","\\supsetneqq",!0);R(O,ne,ie,"","\\@varsupsetneqq");R(O,ne,ie,"⊮","\\nVdash",!0);R(O,ne,ie,"⪵","\\precneqq",!0);R(O,ne,ie,"⪶","\\succneqq",!0);R(O,ne,ie,"","\\@nsubseteqq");R(O,ne,pt,"⊴","\\unlhd");R(O,ne,pt,"⊵","\\unrhd");R(O,ne,ie,"↚","\\nleftarrow",!0);R(O,ne,ie,"↛","\\nrightarrow",!0);R(O,ne,ie,"⇍","\\nLeftarrow",!0);R(O,ne,ie,"⇏","\\nRightarrow",!0);R(O,ne,ie,"↮","\\nleftrightarrow",!0);R(O,ne,ie,"⇎","\\nLeftrightarrow",!0);R(O,ne,ie,"△","\\vartriangle");R(O,ne,me,"ℏ","\\hslash");R(O,ne,me,"▽","\\triangledown");R(O,ne,me,"◊","\\lozenge");R(O,ne,me,"Ⓢ","\\circledS");R(O,ne,me,"®","\\circledR");R(Ue,ne,me,"®","\\circledR");R(O,ne,me,"∡","\\measuredangle",!0);R(O,ne,me,"∄","\\nexists");R(O,ne,me,"℧","\\mho");R(O,ne,me,"Ⅎ","\\Finv",!0);R(O,ne,me,"⅁","\\Game",!0);R(O,ne,me,"","\\backprime");R(O,ne,me,"▲","\\blacktriangle");R(O,ne,me,"▼","\\blacktriangledown");R(O,ne,me,"■","\\blacksquare");R(O,ne,me,"⧫","\\blacklozenge");R(O,ne,me,"★","\\bigstar");R(O,ne,me,"∢","\\sphericalangle",!0);R(O,ne,me,"∁","\\complement",!0);R(O,ne,me,"ð","\\eth",!0);R(Ue,j,me,"ð","ð");R(O,ne,me,"","\\diagup");R(O,ne,me,"╲","\\diagdown");R(O,ne,me,"□","\\square");R(O,ne,me,"□","\\Box");R(O,ne,me,"◊","\\Diamond");R(O,ne,me,"¥","\\yen",!0);R(Ue,ne,me,"¥","\\yen",!0);R(O,ne,me,"✓","\\checkmark",!0);R(Ue,ne,me,"✓","\\checkmark");R(O,ne,me,"ℶ","\\beth",!0);R(O,ne,me,"ℸ","\\daleth",!0);R(O,ne,me,"ℷ","\\gimel",!0);R(O,ne,me,"ϝ","\\digamma",!0);R(O,ne,me,"ϰ","\\varkappa");R(O,ne,Kr,"┌","\\@ulcorner",!0);R(O,ne,Ar,"┐","\\@urcorner",!0);R(O,ne,Kr,"└","\\@llcorner",!0);R(O,ne,Ar,"┘","\\@lrcorner",!0);R(O,ne,ie,"≦","\\leqq",!0);R(O,ne,ie,"⩽","\\leqslant",!0);R(O,ne,ie,"⪕","\\eqslantless",!0);R(O,ne,ie,"≲","\\lesssim",!0);R(O,ne,ie,"⪅","\\lessapprox",!0);R(O,ne,ie,"≊","\\approxeq",!0);R(O,ne,pt,"⋖","\\lessdot");R(O,ne,ie,"⋘","\\lll",!0);R(O,ne,ie,"≶","\\lessgtr",!0);R(O,ne,ie,"⋚","\\lesseqgtr",!0);R(O,ne,ie,"⪋","\\lesseqqgtr",!0);R(O,ne,ie,"≑","\\doteqdot");R(O,ne,ie,"≓","\\risingdotseq",!0);R(O,ne,ie,"≒","\\fallingdotseq",!0);R(O,ne,ie,"∽","\\backsim",!0);R(O,ne,ie,"⋍","\\backsimeq",!0);R(O,ne,ie,"⫅","\\subseteqq",!0);R(O,ne,ie,"⋐","\\Subset",!0);R(O,ne,ie,"⊏","\\sqsubset",!0);R(O,ne,ie,"≼","\\preccurlyeq",!0);R(O,ne,ie,"⋞","\\curlyeqprec",!0);R(O,ne,ie,"≾","\\precsim",!0);R(O,ne,ie,"⪷","\\precapprox",!0);R(O,ne,ie,"⊲","\\vartriangleleft");R(O,ne,ie,"⊴","\\trianglelefteq");R(O,ne,ie,"⊨","\\vDash",!0);R(O,ne,ie,"⊪","\\Vvdash",!0);R(O,ne,ie,"⌣","\\smallsmile");R(O,ne,ie,"⌢","\\smallfrown");R(O,ne,ie,"≏","\\bumpeq",!0);R(O,ne,ie,"≎","\\Bumpeq",!0);R(O,ne,ie,"≧","\\geqq",!0);R(O,ne,ie,"⩾","\\geqslant",!0);R(O,ne,ie,"⪖","\\eqslantgtr",!0);R(O,ne,ie,"≳","\\gtrsim",!0);R(O,ne,ie,"⪆","\\gtrapprox",!0);R(O,ne,pt,"⋗","\\gtrdot");R(O,ne,ie,"⋙","\\ggg",!0);R(O,ne,ie,"≷","\\gtrless",!0);R(O,ne,ie,"⋛","\\gtreqless",!0);R(O,ne,ie,"⪌","\\gtreqqless",!0);R(O,ne,ie,"≖","\\eqcirc",!0);R(O,ne,ie,"≗","\\circeq",!0);R(O,ne,ie,"≜","\\triangleq",!0);R(O,ne,ie,"","\\thicksim");R(O,ne,ie,"≈","\\thickapprox");R(O,ne,ie,"⫆","\\supseteqq",!0);R(O,ne,ie,"⋑","\\Supset",!0);R(O,ne,ie,"⊐","\\sqsupset",!0);R(O,ne,ie,"≽","\\succcurlyeq",!0);R(O,ne,ie,"⋟","\\curlyeqsucc",!0);R(O,ne,ie,"≿","\\succsim",!0);R(O,ne,ie,"⪸","\\succapprox",!0);R(O,ne,ie,"⊳","\\vartriangleright");R(O,ne,ie,"⊵","\\trianglerighteq");R(O,ne,ie,"⊩","\\Vdash",!0);R(O,ne,ie,"","\\shortmid");R(O,ne,ie,"∥","\\shortparallel");R(O,ne,ie,"≬","\\between",!0);R(O,ne,ie,"⋔","\\pitchfork",!0);R(O,ne,ie,"∝","\\varpropto");R(O,ne,ie,"◀","\\blacktriangleleft");R(O,ne,ie,"∴","\\therefore",!0);R(O,ne,ie,"∍","\\backepsilon");R(O,ne,ie,"▶","\\blacktriangleright");R(O,ne,ie,"∵","\\because",!0);R(O,ne,ie,"⋘","\\llless");R(O,ne,ie,"⋙","\\gggtr");R(O,ne,pt,"⊲","\\lhd");R(O,ne,pt,"⊳","\\rhd");R(O,ne,ie,"≂","\\eqsim",!0);R(O,j,ie,"⋈","\\Join");R(O,ne,ie,"≑","\\Doteq",!0);R(O,ne,pt,"∔","\\dotplus",!0);R(O,ne,pt,"","\\smallsetminus");R(O,ne,pt,"⋒","\\Cap",!0);R(O,ne,pt,"⋓","\\Cup",!0);R(O,ne,pt,"⩞","\\doublebarwedge",!0);R(O,ne,pt,"⊟","\\boxminus",!0);R(O,ne,pt,"⊞","\\boxplus",!0);R(O,ne,pt,"⋇","\\divideontimes",!0);R(O,ne,pt,"⋉","\\ltimes",!0);R(O,ne,pt,"⋊","\\rtimes",!0);R(O,ne,pt,"⋋","\\leftthreetimes",!0);R(O,ne,pt,"⋌","\\rightthreetimes",!0);R(O,ne,pt,"⋏","\\curlywedge",!0);R(O,ne,pt,"⋎","\\curlyvee",!0);R(O,ne,pt,"⊝","\\circleddash",!0);R(O,ne,pt,"⊛","\\circledast",!0);R(O,ne,pt,"⋅","\\centerdot");R(O,ne,pt,"⊺","\\intercal",!0);R(O,ne,pt,"⋒","\\doublecap");R(O,ne,pt,"⋓","\\doublecup");R(O,ne,pt,"⊠","\\boxtimes",!0);R(O,ne,ie,"⇢","\\dashrightarrow",!0);R(O,ne,ie,"⇠","\\dashleftarrow",!0);R(O,ne,ie,"⇇","\\leftleftarrows",!0);R(O,ne,ie,"⇆","\\leftrightarrows",!0);R(O,ne,ie,"⇚","\\Lleftarrow",!0);R(O,ne,ie,"↞","\\twoheadleftarrow",!0);R(O,ne,ie,"↢","\\leftarrowtail",!0);R(O,ne,ie,"↫","\\looparrowleft",!0);R(O,ne,ie,"⇋","\\leftrightharpoons",!0);R(O,ne,ie,"↶","\\curvearrowleft",!0);R(O,ne,ie,"↺","\\circlearrowleft",!0);R(O,ne,ie,"↰","\\Lsh",!0);R(O,ne,ie,"⇈","\\upuparrows",!0);R(O,ne,ie,"↿","\\upharpoonleft",!0);R(O,ne,ie,"⇃","\\downharpoonleft",!0);R(O,j,ie,"⊶","\\origof",!0);R(O,j,ie,"⊷","\\imageof",!0);R(O,ne,ie,"⊸","\\multimap",!0);R(O,ne,ie,"↭","\\leftrightsquigarrow",!0);R(O,ne,ie,"⇉","\\rightrightarrows",!0);R(O,ne,ie,"⇄","\\rightleftarrows",!0);R(O,ne,ie,"↠","\\twoheadrightarrow",!0);R(O,ne,ie,"↣","\\rightarrowtail",!0);R(O,ne,ie,"↬","\\looparrowright",!0);R(O,ne,ie,"↷","\\curvearrowright",!0);R(O,ne,ie,"↻","\\circlearrowright",!0);R(O,ne,ie,"↱","\\Rsh",!0);R(O,ne,ie,"⇊","\\downdownarrows",!0);R(O,ne,ie,"↾","\\upharpoonright",!0);R(O,ne,ie,"⇂","\\downharpoonright",!0);R(O,ne,ie,"⇝","\\rightsquigarrow",!0);R(O,ne,ie,"⇝","\\leadsto");R(O,ne,ie,"⇛","\\Rrightarrow",!0);R(O,ne,ie,"↾","\\restriction");R(O,j,me,"","`");R(O,j,me,"$","\\$");R(Ue,j,me,"$","\\$");R(Ue,j,me,"$","\\textdollar");R(O,j,me,"%","\\%");R(Ue,j,me,"%","\\%");R(O,j,me,"_","\\_");R(Ue,j,me,"_","\\_");R(Ue,j,me,"_","\\textunderscore");R(O,j,me,"∠","\\angle",!0);R(O,j,me,"∞","\\infty",!0);R(O,j,me,"","\\prime");R(O,j,me,"△","\\triangle");R(O,j,me,"Γ","\\Gamma",!0);R(O,j,me,"Δ","\\Delta",!0);R(O,j,me,"Θ","\\Theta",!0);R(O,j,me,"Λ","\\Lambda",!0);R(O,j,me,"Ξ","\\Xi",!0);R(O,j,me,"Π","\\Pi",!0);R(O,j,me,"Σ","\\Sigma",!0);R(O,j,me,"Υ","\\Upsilon",!0);R(O,j,me,"Φ","\\Phi",!0);R(O,j,me,"Ψ","\\Psi",!0);R(O,j,me,"Ω","\\Omega",!0);R(O,j,me,"A","Α");R(O,j,me,"B","Β");R(O,j,me,"E","Ε");R(O,j,me,"Z","Ζ");R(O,j,me,"H","Η");R(O,j,me,"I","Ι");R(O,j,me,"K","Κ");R(O,j,me,"M","Μ");R(O,j,me,"N","Ν");R(O,j,me,"O","Ο");R(O,j,me,"P","Ρ");R(O,j,me,"T","Τ");R(O,j,me,"X","Χ");R(O,j,me,"¬","\\neg",!0);R(O,j,me,"¬","\\lnot");R(O,j,me,"","\\top");R(O,j,me,"⊥","\\bot");R(O,j,me,"∅","\\emptyset");R(O,ne,me,"∅","\\varnothing");R(O,j,St,"α","\\alpha",!0);R(O,j,St,"β","\\beta",!0);R(O,j,St,"γ","\\gamma",!0);R(O,j,St,"δ","\\delta",!0);R(O,j,St,"ϵ","\\epsilon",!0);R(O,j,St,"ζ","\\zeta",!0);R(O,j,St,"η","\\eta",!0);R(O,j,St,"θ","\\theta",!0);R(O,j,St,"ι","\\iota",!0);R(O,j,St,"κ","\\kappa",!0);R(O,j,St,"λ","\\lambda",!0);R(O,j,St,"μ","\\mu",!0);R(O,j,St,"ν","\\nu",!0);R(O,j,St,"ξ","\\xi",!0);R(O,j,St,"ο","\\omicron",!0);R(O,j,St,"π","\\pi",!0);R(O,j,St,"ρ","\\rho",!0);R(O,j,St,"σ","\\sigma",!0);R(O,j,St,"τ","\\tau",!0);R(O,j,St,"υ","\\upsilon",!0);R(O,j,St,"ϕ","\\phi",!0);R(O,j,St,"χ","\\chi",!0);R(O,j,St,"ψ","\\psi",!0);R(O,j,St,"ω","\\omega",!0);R(O,j,St,"ε","\\varepsilon",!0);R(O,j,St,"ϑ","\\vartheta",!0);R(O,j,St,"ϖ","\\varpi",!0);R(O,j,St,"ϱ","\\varrho",!0);R(O,j,St,"ς","\\varsigma",!0);R(O,j,St,"φ","\\varphi",!0);R(O,j,pt,"","*",!0);R(O,j,pt,"+","+");R(O,j,pt,"","-",!0);R(O,j,pt,"⋅","\\cdot",!0);R(O,j,pt,"∘","\\circ",!0);R(O,j,pt,"÷","\\div",!0);R(O,j,pt,"±","\\pm",!0);R(O,j,pt,"×","\\times",!0);R(O,j,pt,"∩","\\cap",!0);R(O,j,pt,"","\\cup",!0);R(O,j,pt,"","\\setminus",!0);R(O,j,pt,"∧","\\land");R(O,j,pt,"","\\lor");R(O,j,pt,"∧","\\wedge",!0);R(O,j,pt,"","\\vee",!0);R(O,j,me,"√","\\surd");R(O,j,Kr,"⟨","\\langle",!0);R(O,j,Kr,"","\\lvert");R(O,j,Kr,"∥","\\lVert");R(O,j,Ar,"?","?");R(O,j,Ar,"!","!");R(O,j,Ar,"⟩","\\rangle",!0);R(O,j,Ar,"","\\rvert");R(O,j,Ar,"∥","\\rVert");R(O,j,ie,"=","=");R(O,j,ie,":",":");R(O,j,ie,"≈","\\approx",!0);R(O,j,ie,"≅","\\cong",!0);R(O,j,ie,"≥","\\ge");R(O,j,ie,"≥","\\geq",!0);R(O,j,ie,"←","\\gets");R(O,j,ie,">","\\gt",!0);R(O,j,ie,"∈","\\in",!0);R(O,j,ie,"","\\@not");R(O,j,ie,"⊂","\\subset",!0);R(O,j,ie,"⊃","\\supset",!0);R(O,j,ie,"⊆","\\subseteq",!0);R(O,j,ie,"⊇","\\supseteq",!0);R(O,ne,ie,"⊈","\\nsubseteq",!0);R(O,ne,ie,"⊉","\\nsupseteq",!0);R(O,j,ie,"⊨","\\models");R(O,j,ie,"←","\\leftarrow",!0);R(O,j,ie,"≤","\\le");R(O,j,ie,"≤","\\leq",!0);R(O,j,ie,"<","\\lt",!0);R(O,j,ie,"→","\\rightarrow",!0);R(O,j,ie,"→","\\to");R(O,ne,ie,"≱","\\ngeq",!0);R(O,ne,ie,"≰","\\nleq",!0);R(O,j,Da," ","\\ ");R(O,j,Da," ","\\space");R(O,j,Da," ","\\nobreakspace");R(Ue,j,Da," ","\\ ");R(Ue,j,Da," "," ");R(Ue,j,Da," ","\\space");R(Ue,j,Da," ","\\nobreakspace");R(O,j,Da,null,"\\nobreak");R(O,j,Da,null,"\\allowbreak");R(O,j,Uc,",",",");R(O,j,Uc,";",";");R(O,ne,pt,"⊼","\\barwedge",!0);R(O,ne,pt,"⊻","\\veebar",!0);R(O,j,pt,"⊙","\\odot",!0);R(O,j,pt,"⊕","\\oplus",!0);R(O,j,pt,"⊗","\\otimes",!0);R(O,j,me,"∂","\\partial",!0);R(O,j,pt,"⊘","\\oslash",!0);R(O,ne,pt,"⊚","\\circledcirc",!0);R(O,ne,pt,"⊡","\\boxdot",!0);R(O,j,pt,"△","\\bigtriangleup");R(O,j,pt,"▽","\\bigtriangledown");R(O,j,pt,"†","\\dagger");R(O,j,pt,"⋄","\\diamond");R(O,j,pt,"⋆","\\star");R(O,j,pt,"◃","\\triangleleft");R(O,j,pt,"▹","\\triangleright");R(O,j,Kr,"{","\\{");R(Ue,j,me,"{","\\{");R(Ue,j,me,"{","\\textbraceleft");R(O,j,Ar,"}","\\}");R(Ue,j,me,"}","\\}");R(Ue,j,me,"}","\\textbraceright");R(O,j,Kr,"{","\\lbrace");R(O,j,Ar,"}","\\rbrace");R(O,j,Kr,"[","\\lbrack",!0);R(Ue,j,me,"[","\\lbrack",!0);R(O,j,Ar,"]","\\rbrack",!0);R(Ue,j,me,"]","\\rbrack",!0);R(O,j,Kr,"(","\\lparen",!0);R(O,j,Ar,")","\\rparen",!0);R(Ue,j,me,"<","\\textless",!0);R(Ue,j,me,">","\\textgreater",!0);R(O,j,Kr,"⌊","\\lfloor",!0);R(O,j,Ar,"⌋","\\rfloor",!0);R(O,j,Kr,"⌈","\\lceil",!0);R(O,j,Ar,"⌉","\\rceil",!0);R(O,j,me,"\\","\\backslash");R(O,j,me,"","|");R(O,j,me,"","\\vert");R(Ue,j,me,"|","\\textbar",!0);R(O,j,me,"∥","\\|");R(O,j,me,"∥","\\Vert");R(Ue,j,me,"∥","\\textbardbl");R(Ue,j,me,"~","\\textasciitilde");R(Ue,j,me,"\\","\\textbackslash");R(Ue,j,me,"^","\\textasciicircum");R(O,j,ie,"↑","\\uparrow",!0);R(O,j,ie,"⇑","\\Uparrow",!0);R(O,j,ie,"↓","\\downarrow",!0);R(O,j,ie,"⇓","\\Downarrow",!0);R(O,j,ie,"↕","\\updownarrow",!0);R(O,j,ie,"⇕","\\Updownarrow",!0);R(O,j,Gn,"∐","\\coprod");R(O,j,Gn,"","\\bigvee");R(O,j,Gn,"⋀","\\bigwedge");R(O,j,Gn,"⨄","\\biguplus");R(O,j,Gn,"⋂","\\bigcap");R(O,j,Gn,"","\\bigcup");R(O,j,Gn,"∫","\\int");R(O,j,Gn,"∫","\\intop");R(O,j,Gn,"∬","\\iint");R(O,j,Gn,"∭","\\iiint");R(O,j,Gn,"∏","\\prod");R(O,j,Gn,"∑","\\sum");R(O,j,Gn,"⨂","\\bigotimes");R(O,j,Gn,"⨁","\\bigoplus");R(O,j,Gn,"⨀","\\bigodot");R(O,j,Gn,"∮","\\oint");R(O,j,Gn,"∯","\\oiint");R(O,j,Gn,"∰","\\oiiint");R(O,j,Gn,"⨆","\\bigsqcup");R(O,j,Gn,"∫","\\smallint");R(Ue,j,hs,"…","\\textellipsis");R(O,j,hs,"…","\\mathellipsis");R(Ue,j,hs,"…","\\ldots",!0);R(O,j,hs,"…","\\ldots",!0);R(O,j,hs,"⋯","\\@cdots",!0);R(O,j,hs,"⋱","\\ddots",!0);R(O,j,me,"⋮","\\varvdots");R(Ue,j,me,"⋮","\\varvdots");R(O,j,Tn,"ˊ","\\acute");R(O,j,Tn,"ˋ","\\grave");R(O,j,Tn,"¨","\\ddot");R(O,j,Tn,"~","\\tilde");R(O,j,Tn,"ˉ","\\bar");R(O,j,Tn,"˘","\\breve");R(O,j,Tn,"ˇ","\\check");R(O,j,Tn,"^","\\hat");R(O,j,Tn,"⃗","\\vec");R(O,j,Tn,"˙","\\dot");R(O,j,Tn,"˚","\\mathring");R(O,j,St,"","\\@imath");R(O,j,St,"","\\@jmath");R(O,j,me,"ı","ı");R(O,j,me,"ȷ","ȷ");R(Ue,j,me,"ı","\\i",!0);R(Ue,j,me,"ȷ","\\j",!0);R(Ue,j,me,"ß","\\ss",!0);R(Ue,j,me,"æ","\\ae",!0);R(Ue,j,me,"œ","\\oe",!0);R(Ue,j,me,"ø","\\o",!0);R(Ue,j,me,"Æ","\\AE",!0);R(Ue,j,me,"Œ","\\OE",!0);R(Ue,j,me,"Ø","\\O",!0);R(Ue,j,Tn,"ˊ","\\'");R(Ue,j,Tn,"ˋ","\\`");R(Ue,j,Tn,"ˆ","\\^");R(Ue,j,Tn,"˜","\\~");R(Ue,j,Tn,"ˉ","\\=");R(Ue,j,Tn,"˘","\\u");R(Ue,j,Tn,"˙","\\.");R(Ue,j,Tn,"¸","\\c");R(Ue,j,Tn,"˚","\\r");R(Ue,j,Tn,"ˇ","\\v");R(Ue,j,Tn,"¨",'\\"');R(Ue,j,Tn,"˝","\\H");R(Ue,j,Tn,"◯","\\textcircled");var m6={"--":!0,"---":!0,"``":!0,"''":!0};R(Ue,j,me,"","--",!0);R(Ue,j,me,"","\\textendash");R(Ue,j,me,"—","---",!0);R(Ue,j,me,"—","\\textemdash");R(Ue,j,me,"","`",!0);R(Ue,j,me,"","\\textquoteleft");R(Ue,j,me,"","'",!0);R(Ue,j,me,"","\\textquoteright");R(Ue,j,me,"“","``",!0);R(Ue,j,me,"“","\\textquotedblleft");R(Ue,j,me,"”","''",!0);R(Ue,j,me,"”","\\textquotedblright");R(O,j,me,"°","\\degree",!0);R(Ue,j,me,"°","\\degree");R(Ue,j,me,"°","\\textdegree",!0);R(O,j,me,"£","\\pounds");R(O,j,me,"£","\\mathsterling",!0);R(Ue,j,me,"£","\\pounds");R(Ue,j,me,"£","\\textsterling",!0);R(O,ne,me,"✠","\\maltese");R(Ue,ne,me,"✠","\\maltese");var Rm='0123456789/@."';for(var Xd=0;Xd<Rm.length;Xd++){var Im=Rm.charAt(Xd);R(O,j,me,Im,Im)}var Om='0123456789!@*()-=+";:?/.,';for(var Zd=0;Zd<Om.length;Zd++){var Hm=Om.charAt(Zd);R(Ue,j,me,Hm,Hm)}var dc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Yd=0;Yd<dc.length;Yd++){var d0=dc.charAt(Yd);R(O,j,St,d0,d0),R(Ue,j,me,d0,d0)}R(O,ne,me,"C","");R(Ue,ne,me,"C","");R(O,ne,me,"H","");R(Ue,ne,me,"H","");R(O,ne,me,"N","");R(Ue,ne,me,"N","");R(O,ne,me,"P","");R(Ue,ne,me,"P","");R(O,ne,me,"Q","");R(Ue,ne,me,"Q","");R(O,ne,me,"R","");R(Ue,ne,me,"R","");R(O,ne,me,"Z","");R(Ue,ne,me,"Z","");R(O,j,St,"h","");R(Ue,j,St,"h","");var Lt="";for(var gr=0;gr<dc.length;gr++){var In=dc.charAt(gr);Lt=String.fromCharCode(55349,56320+gr),R(O,j,St,In,Lt),R(Ue,j,me,In,Lt),Lt=String.fromCharCode(55349,56372+gr),R(O,j,St,In,Lt),R(Ue,j,me,In,Lt),Lt=String.fromCharCode(55349,56424+gr),R(O,j,St,In,Lt),R(Ue,j,me,In,Lt),Lt=String.fromCharCode(55349,56580+gr),R(O,j,St,In,Lt),R(Ue,j,me,In,Lt),Lt=String.fromCharCode(55349,56684+gr),R(O,j,St,In,Lt),R(Ue,j,me,In,Lt),Lt=String.fromCharCode(55349,56736+gr),R(O,j,St,In,Lt),R(Ue,j,me,In,Lt),Lt=String.fromCharCode(55349,56788+gr),R(O,j,St,In,Lt),R(Ue,j,me,In,Lt),Lt=String.fromCharCode(55349,56840+gr),R(O,j,St,In,Lt),R(Ue,j,me,In,Lt),Lt=String.fromCharCode(55349,56944+gr),R(O,j,St,In,Lt),R(Ue,j,me,In,Lt),gr<26&&(Lt=String.fromCharCode(55349,56632+gr),R(O,j,St,In,Lt),R(Ue,j,me,In,Lt),Lt=String.fromCharCode(55349,56476+gr),R(O,j,St,In,Lt),R(Ue,j,me,In,Lt))}Lt=String.fromCharCode(55349,56668);R(O,j,St,"k",Lt);R(Ue,j,me,"k",Lt);for(var To=0;To<10;To++){var Ba=To.toString();Lt=String.fromCharCode(55349,57294+To),R(O,j,St,Ba,Lt),R(Ue,j,me,Ba,Lt),Lt=String.fromCharCode(55349,57314+To),R(O,j,St,Ba,Lt),R(Ue,j,me,Ba,Lt),Lt=String.fromCharCode(55349,57324+To),R(O,j,St,Ba,Lt),R(Ue,j,me,Ba,Lt),Lt=String.fromCharCode(55349,57334+To),R(O,j,St,Ba,Lt),R(Ue,j,me,Ba,Lt)}var np="ÐÞþ";for(var Jd=0;Jd<np.length;Jd++){var h0=np.charAt(Jd);R(O,j,St,h0,h0),R(Ue,j,me,h0,h0)}var p0=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Pm=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],$9=function(t,e){var n=t.charCodeAt(0),r=t.charCodeAt(1),o=(n-55296)*1024+(r-56320)+65536,l=e==="math"?0:1;if(119808<=o&&o<120484){var h=Math.floor((o-119808)/26);return[p0[h][2],p0[h][l]]}else if(120782<=o&&o<=120831){var c=Math.floor((o-120782)/10);return[Pm[c][2],Pm[c][l]]}else{if(o===120485||o===120486)return[p0[0][2],p0[0][l]];if(120486<o&&o<120782)return["",""];throw new et("Unsupported character: "+t)}},Vc=function(t,e,n){return wn[n][t]&&wn[n][t].replace&&(t=wn[n][t].replace),{value:t,metrics:Tf(t,e,n)}},bi=function(t,e,n,r,o){var l=Vc(t,e,n),h=l.metrics;t=l.value;var c;if(h){var p=h.italic;(n==="text"||r&&r.font==="mathit")&&(p=0),c=new si(t,h.height,h.depth,p,h.skew,h.width,o)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+e+"' and mode '"+n+"'")),c=new si(t,0,0,0,0,0,o);if(r){c.maxFontSize=r.sizeMultiplier,r.style.isTight()&&c.classes.push("mtight");var v=r.getColor();v&&(c.style.color=v)}return c},U9=function(t,e,n,r){return r===void 0&&(r=[]),n.font==="boldsymbol"&&Vc(t,"Main-Bold",e).metrics?bi(t,"Main-Bold",e,n,r.concat(["mathbf"])):t==="\\"||wn[e][t].font==="main"?bi(t,"Main-Regular",e,n,r):bi(t,"AMS-Regular",e,n,r.concat(["amsrm"]))},V9=function(t,e,n,r,o){return o!=="textord"&&Vc(t,"Math-BoldItalic",e).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},W9=function(t,e,n){var r=t.mode,o=t.text,l=["mord"],h=r==="math"||r==="text"&&e.font,c=h?e.font:e.fontFamily,p="",v="";if(o.charCodeAt(0)===55349&&([p,v]=$9(o,r)),p.length>0)return bi(o,p,r,e,l.concat(v));if(c){var b,g;if(c==="boldsymbol"){var m=V9(o,r,e,l,n);b=m.fontName,g=[m.fontClass]}else h?(b=b6[c].fontName,g=[c]):(b=f0(c,e.fontWeight,e.fontShape),g=[c,e.fontWeight,e.fontShape]);if(Vc(o,b,r).metrics)return bi(o,b,r,e,l.concat(g));if(m6.hasOwnProperty(o)&&b.slice(0,10)==="Typewriter"){for(var x=[],w=0;w<o.length;w++)x.push(bi(o[w],b,r,e,l.concat(g)));return v6(x)}}if(n==="mathord")return bi(o,"Math-Italic",r,e,l.concat(["mathnormal"]));if(n==="textord"){var S=wn[r][o]&&wn[r][o].font;if(S==="ams"){var k=f0("amsrm",e.fontWeight,e.fontShape);return bi(o,k,r,e,l.concat("amsrm",e.fontWeight,e.fontShape))}else if(S==="main"||!S){var C=f0("textrm",e.fontWeight,e.fontShape);return bi(o,C,r,e,l.concat(e.fontWeight,e.fontShape))}else{var T=f0(S,e.fontWeight,e.fontShape);return bi(o,T,r,e,l.concat(T,e.fontWeight,e.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},G9=(t,e)=>{if(Ja(t.classes)!==Ja(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var n=t.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r in t.style)if(t.style.hasOwnProperty(r)&&t.style[r]!==e.style[r])return!1;for(var o in e.style)if(e.style.hasOwnProperty(o)&&t.style[o]!==e.style[o])return!1;return!0},K9=t=>{for(var e=0;e<t.length-1;e++){var n=t[e],r=t[e+1];n instanceof si&&r instanceof si&&G9(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,t.splice(e+1,1),e--)}return t},Mf=function(t){for(var e=0,n=0,r=0,o=0;o<t.children.length;o++){var l=t.children[o];l.height>e&&(e=l.height),l.depth>n&&(n=l.depth),l.maxFontSize>r&&(r=l.maxFontSize)}t.height=e,t.depth=n,t.maxFontSize=r},Lr=function(t,e,n,r){var o=new Wl(t,e,n,r);return Mf(o),o},g6=(t,e,n,r)=>new Wl(t,e,n,r),X9=function(t,e,n){var r=Lr([t],[],e);return r.height=Math.max(n||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),r.style.borderBottomWidth=at(r.height),r.maxFontSize=1,r},Z9=function(t,e,n,r){var o=new Af(t,e,n,r);return Mf(o),o},v6=function(t){var e=new Vl(t);return Mf(e),e},Y9=function(t,e){return t instanceof Vl?Lr([],[t],e):t},J9=function(t){if(t.positionType==="individualShift"){for(var e=t.children,n=[e[0]],r=-e[0].shift-e[0].elem.depth,o=r,l=1;l<e.length;l++){var h=-e[l].shift-o-e[l].elem.depth,c=h-(e[l-1].elem.height+e[l-1].elem.depth);o=o+h,n.push({type:"kern",size:c}),n.push(e[l])}return{children:n,depth:r}}var p;if(t.positionType==="top"){for(var v=t.positionData,b=0;b<t.children.length;b++){var g=t.children[b];v-=g.type==="kern"?g.size:g.elem.height+g.elem.depth}p=v}else if(t.positionType==="bottom")p=-t.positionData;else{var m=t.children[0];if(m.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")p=-m.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")p=-m.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:p}},Q9=function(t,e){for(var{children:n,depth:r}=J9(t),o=0,l=0;l<n.length;l++){var h=n[l];if(h.type==="elem"){var c=h.elem;o=Math.max(o,c.maxFontSize,c.height)}}o+=2;var p=Lr(["pstrut"],[]);p.style.height=at(o);for(var v=[],b=r,g=r,m=r,x=0;x<n.length;x++){var w=n[x];if(w.type==="kern")m+=w.size;else{var S=w.elem,k=w.wrapperClasses||[],C=w.wrapperStyle||{},T=Lr(k,[p,S],void 0,C);T.style.top=at(-o-m-S.depth),w.marginLeft&&(T.style.marginLeft=w.marginLeft),w.marginRight&&(T.style.marginRight=w.marginRight),v.push(T),m+=S.height+S.depth}b=Math.min(b,m),g=Math.max(g,m)}var A=Lr(["vlist"],v);A.style.height=at(g);var M;if(b<0){var y=Lr([],[]),N=Lr(["vlist"],[y]);N.style.height=at(-b);var z=Lr(["vlist-s"],[new si("")]);M=[Lr(["vlist-r"],[A,z]),Lr(["vlist-r"],[N])]}else M=[Lr(["vlist-r"],[A])];var F=Lr(["vlist-t"],M);return M.length===2&&F.classes.push("vlist-t2"),F.height=g,F.depth=-b,F},ex=(t,e)=>{var n=Lr(["mspace"],[],e),r=Nn(t,e);return n.style.marginRight=at(r),n},f0=function(t,e,n){var r="";switch(t){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=t}var o;return e==="textbf"&&n==="textit"?o="BoldItalic":e==="textbf"?o="Bold":e==="textit"?o="Italic":o="Regular",r+"-"+o},b6={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},y6={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},tx=function(t,e){var[n,r,o]=y6[t],l=new Qa(n),h=new Ta([l],{width:at(r),height:at(o),style:"width:"+at(r),viewBox:"0 0 "+1e3*r+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),c=g6(["overlay"],[h],e);return c.height=o,c.style.height=at(o),c.style.width=at(r),c},Se={fontMap:b6,makeSymbol:bi,mathsym:U9,makeSpan:Lr,makeSvgSpan:g6,makeLineSpan:X9,makeAnchor:Z9,makeFragment:v6,wrapFragment:Y9,makeVList:Q9,makeOrd:W9,makeGlue:ex,staticSvg:tx,svgData:y6,tryCombineChars:K9},Ln={number:3,unit:"mu"},Ao={number:4,unit:"mu"},oa={number:5,unit:"mu"},nx={mord:{mop:Ln,mbin:Ao,mrel:oa,minner:Ln},mop:{mord:Ln,mop:Ln,mrel:oa,minner:Ln},mbin:{mord:Ao,mop:Ao,mopen:Ao,minner:Ao},mrel:{mord:oa,mop:oa,mopen:oa,minner:oa},mopen:{},mclose:{mop:Ln,mbin:Ao,mrel:oa,minner:Ln},mpunct:{mord:Ln,mop:Ln,mrel:oa,mopen:Ln,mclose:Ln,mpunct:Ln,minner:Ln},minner:{mord:Ln,mop:Ln,mbin:Ao,mrel:oa,mopen:Ln,mpunct:Ln,minner:Ln}},rx={mord:{mop:Ln},mop:{mord:Ln,mop:Ln},mbin:{},mrel:{},mopen:{},mclose:{mop:Ln},mpunct:{},minner:{mop:Ln}},w6={},hc={},pc={};function dt(t){for(var{type:e,names:n,props:r,handler:o,htmlBuilder:l,mathmlBuilder:h}=t,c={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:o},p=0;p<n.length;++p)w6[n[p]]=c;e&&(l&&(hc[e]=l),h&&(pc[e]=h))}function Fo(t){var{type:e,htmlBuilder:n,mathmlBuilder:r}=t;dt({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var fc=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Fn=function(t){return t.type==="ordgroup"?t.body:[t]},Aa=Se.makeSpan,ix=["leftmost","mbin","mopen","mrel","mop","mpunct"],ax=["rightmost","mrel","mclose","mpunct"],ox={display:Tt.DISPLAY,text:Tt.TEXT,script:Tt.SCRIPT,scriptscript:Tt.SCRIPTSCRIPT},sx={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Jn=function(t,e,n,r){r===void 0&&(r=[null,null]);for(var o=[],l=0;l<t.length;l++){var h=Zt(t[l],e);if(h instanceof Vl){var c=h.children;o.push(...c)}else o.push(h)}if(Se.tryCombineChars(o),!n)return o;var p=e;if(t.length===1){var v=t[0];v.type==="sizing"?p=e.havingSize(v.size):v.type==="styling"&&(p=e.havingStyle(ox[v.style]))}var b=Aa([r[0]||"leftmost"],[],e),g=Aa([r[1]||"rightmost"],[],e),m=n==="root";return zm(o,(x,w)=>{var S=w.classes[0],k=x.classes[0];S==="mbin"&&wt.contains(ax,k)?w.classes[0]="mord":k==="mbin"&&wt.contains(ix,S)&&(x.classes[0]="mord")},{node:b},g,m),zm(o,(x,w)=>{var S=rp(w),k=rp(x),C=S&&k?x.hasClass("mtight")?rx[S][k]:nx[S][k]:null;if(C)return Se.makeGlue(C,p)},{node:b},g,m),o},zm=function t(e,n,r,o,l){o&&e.push(o);for(var h=0;h<e.length;h++){var c=e[h],p=x6(c);if(p){t(p.children,n,r,null,l);continue}var v=!c.hasClass("mspace");if(v){var b=n(c,r.node);b&&(r.insertAfter?r.insertAfter(b):(e.unshift(b),h++))}v?r.node=c:l&&c.hasClass("newline")&&(r.node=Aa(["leftmost"])),r.insertAfter=(g=>m=>{e.splice(g+1,0,m),h++})(h)}o&&e.pop()},x6=function(t){return t instanceof Vl||t instanceof Af||t instanceof Wl&&t.hasClass("enclosing")?t:null},lx=function t(e,n){var r=x6(e);if(r){var o=r.children;if(o.length){if(n==="right")return t(o[o.length-1],"right");if(n==="left")return t(o[0],"left")}}return e},rp=function(t,e){return t?(e&&(t=lx(t,e)),sx[t.classes[0]]||null):null},Ol=function(t,e){var n=["nulldelimiter"].concat(t.baseSizingClasses());return Aa(e.concat(n))},Zt=function(t,e,n){if(!t)return Aa();if(hc[t.type]){var r=hc[t.type](t,e);if(n&&e.size!==n.size){r=Aa(e.sizingClasses(n),[r],e);var o=e.sizeMultiplier/n.sizeMultiplier;r.height*=o,r.depth*=o}return r}else throw new et("Got group of unknown type: '"+t.type+"'")};function m0(t,e){var n=Aa(["base"],t,e),r=Aa(["strut"]);return r.style.height=at(n.height+n.depth),n.depth&&(r.style.verticalAlign=at(-n.depth)),n.children.unshift(r),n}function ip(t,e){var n=null;t.length===1&&t[0].type==="tag"&&(n=t[0].tag,t=t[0].body);var r=Jn(t,e,"root"),o;r.length===2&&r[1].hasClass("tag")&&(o=r.pop());for(var l=[],h=[],c=0;c<r.length;c++)if(h.push(r[c]),r[c].hasClass("mbin")||r[c].hasClass("mrel")||r[c].hasClass("allowbreak")){for(var p=!1;c<r.length-1&&r[c+1].hasClass("mspace")&&!r[c+1].hasClass("newline");)c++,h.push(r[c]),r[c].hasClass("nobreak")&&(p=!0);p||(l.push(m0(h,e)),h=[])}else r[c].hasClass("newline")&&(h.pop(),h.length>0&&(l.push(m0(h,e)),h=[]),l.push(r[c]));h.length>0&&l.push(m0(h,e));var v;n?(v=m0(Jn(n,e,!0)),v.classes=["tag"],l.push(v)):o&&l.push(o);var b=Aa(["katex-html"],l);if(b.setAttribute("aria-hidden","true"),v){var g=v.children[0];g.style.height=at(b.height+b.depth),b.depth&&(g.style.verticalAlign=at(-b.depth))}return b}function k6(t){return new Vl(t)}class Ur{constructor(e,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(e,n){this.attributes[e]=n}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&e.setAttribute(n,this.attributes[n]);this.classes.length>0&&(e.className=Ja(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof qi&&this.children[r+1]instanceof qi){for(var o=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof qi;)o+=this.children[++r].toText();e.appendChild(new qi(o).toNode())}else e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="',e+=wt.escape(this.attributes[n]),e+='"');this.classes.length>0&&(e+=' class ="'+wt.escape(Ja(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}}class qi{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return wt.escape(this.toText())}toText(){return this.text}}class cx{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="":e>=.1666&&e<=.1667?this.character="":e>=.2222&&e<=.2223?this.character="":e>=.2777&&e<=.2778?this.character="":e>=-.05556&&e<=-.05555?this.character="":e>=-.1667&&e<=-.1666?this.character="":e>=-.2223&&e<=-.2222?this.character="":e>=-.2778&&e<=-.2777?this.character="":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",at(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+at(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ze={MathNode:Ur,TextNode:qi,SpaceNode:cx,newDocumentFragment:k6},li=function(t,e,n){return wn[e][t]&&wn[e][t].replace&&t.charCodeAt(0)!==55349&&!(m6.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=wn[e][t].replace),new Ze.TextNode(t)},Cf=function(t){return t.length===1?t[0]:new Ze.MathNode("mrow",t)},Lf=function(t,e){if(e.fontFamily==="texttt")return"monospace";if(e.fontFamily==="textsf")return e.fontShape==="textit"&&e.fontWeight==="textbf"?"sans-serif-bold-italic":e.fontShape==="textit"?"sans-serif-italic":e.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(e.fontShape==="textit"&&e.fontWeight==="textbf")return"bold-italic";if(e.fontShape==="textit")return"italic";if(e.fontWeight==="textbf")return"bold";var n=e.font;if(!n||n==="mathnormal")return null;var r=t.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var o=t.text;if(wt.contains(["\\imath","\\jmath"],o))return null;wn[r][o]&&wn[r][o].replace&&(o=wn[r][o].replace);var l=Se.fontMap[n].fontName;return Tf(o,l,r)?Se.fontMap[n].variant:null};function Qd(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof qi&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var n=t.children[0];return n instanceof qi&&n.text===","}else return!1}var Dr=function(t,e,n){if(t.length===1){var r=vn(t[0],e);return n&&r instanceof Ur&&r.type==="mo"&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var o=[],l,h=0;h<t.length;h++){var c=vn(t[h],e);if(c instanceof Ur&&l instanceof Ur){if(c.type==="mtext"&&l.type==="mtext"&&c.getAttribute("mathvariant")===l.getAttribute("mathvariant")){l.children.push(...c.children);continue}else if(c.type==="mn"&&l.type==="mn"){l.children.push(...c.children);continue}else if(Qd(c)&&l.type==="mn"){l.children.push(...c.children);continue}else if(c.type==="mn"&&Qd(l))c.children=[...l.children,...c.children],o.pop();else if((c.type==="msup"||c.type==="msub")&&c.children.length>=1&&(l.type==="mn"||Qd(l))){var p=c.children[0];p instanceof Ur&&p.type==="mn"&&(p.children=[...l.children,...p.children],o.pop())}else if(l.type==="mi"&&l.children.length===1){var v=l.children[0];if(v instanceof qi&&v.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var b=c.children[0];b instanceof qi&&b.text.length>0&&(b.text=b.text.slice(0,1)+"̸"+b.text.slice(1),o.pop())}}}o.push(c),l=c}return o},eo=function(t,e,n){return Cf(Dr(t,e,n))},vn=function(t,e){if(!t)return new Ze.MathNode("mrow");if(pc[t.type]){var n=pc[t.type](t,e);return n}else throw new et("Got group of unknown type: '"+t.type+"'")};function Bm(t,e,n,r,o){var l=Dr(t,n),h;l.length===1&&l[0]instanceof Ur&&wt.contains(["mrow","mtable"],l[0].type)?h=l[0]:h=new Ze.MathNode("mrow",l);var c=new Ze.MathNode("annotation",[new Ze.TextNode(e)]);c.setAttribute("encoding","application/x-tex");var p=new Ze.MathNode("semantics",[h,c]),v=new Ze.MathNode("math",[p]);v.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&v.setAttribute("display","block");var b=o?"katex":"katex-mathml";return Se.makeSpan([b],[v])}var S6=function(t){return new ca({style:t.displayMode?Tt.DISPLAY:Tt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},E6=function(t,e){if(e.displayMode){var n=["katex-display"];e.leqno&&n.push("leqno"),e.fleqn&&n.push("fleqn"),t=Se.makeSpan(n,[t])}return t},ux=function(t,e,n){var r=S6(n),o;if(n.output==="mathml")return Bm(t,e,r,n.displayMode,!0);if(n.output==="html"){var l=ip(t,r);o=Se.makeSpan(["katex"],[l])}else{var h=Bm(t,e,r,n.displayMode,!1),c=ip(t,r);o=Se.makeSpan(["katex"],[h,c])}return E6(o,n)},dx=function(t,e,n){var r=S6(n),o=ip(t,r),l=Se.makeSpan(["katex"],[o]);return E6(l,n)},hx={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},px=function(t){var e=new Ze.MathNode("mo",[new Ze.TextNode(hx[t.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e},fx={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},mx=function(t){return t.type==="ordgroup"?t.body.length:1},gx=function(t,e){function n(){var h=4e5,c=t.label.slice(1);if(wt.contains(["widehat","widecheck","widetilde","utilde"],c)){var p=t,v=mx(p.base),b,g,m;if(v>5)c==="widehat"||c==="widecheck"?(b=420,h=2364,m=.42,g=c+"4"):(b=312,h=2340,m=.34,g="tilde4");else{var x=[1,1,2,2,3,3][v];c==="widehat"||c==="widecheck"?(h=[0,1062,2364,2364,2364][x],b=[0,239,300,360,420][x],m=[0,.24,.3,.3,.36,.42][x],g=c+x):(h=[0,600,1033,2339,2340][x],b=[0,260,286,306,312][x],m=[0,.26,.286,.3,.306,.34][x],g="tilde"+x)}var w=new Qa(g),S=new Ta([w],{width:"100%",height:at(m),viewBox:"0 0 "+h+" "+b,preserveAspectRatio:"none"});return{span:Se.makeSvgSpan([],[S],e),minWidth:0,height:m}}else{var k=[],C=fx[c],[T,A,M]=C,y=M/1e3,N=T.length,z,F;if(N===1){var P=C[3];z=["hide-tail"],F=[P]}else if(N===2)z=["halfarrow-left","halfarrow-right"],F=["xMinYMin","xMaxYMin"];else if(N===3)z=["brace-left","brace-center","brace-right"],F=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
`+N+" children.");for(var Y=0;Y<N;Y++){var te=new Qa(T[Y]),ce=new Ta([te],{width:"400em",height:at(y),viewBox:"0 0 "+h+" "+M,preserveAspectRatio:F[Y]+" slice"}),Me=Se.makeSvgSpan([z[Y]],[ce],e);if(N===1)return{span:Me,minWidth:A,height:y};Me.style.height=at(y),k.push(Me)}return{span:Se.makeSpan(["stretchy"],k,e),minWidth:A,height:y}}}var{span:r,minWidth:o,height:l}=n();return r.height=l,r.style.height=at(l),o>0&&(r.style.minWidth=at(o)),r},vx=function(t,e,n,r,o){var l,h=t.height+t.depth+n+r;if(/fbox|color|angl/.test(e)){if(l=Se.makeSpan(["stretchy",e],[],o),e==="fbox"){var c=o.color&&o.getColor();c&&(l.style.borderColor=c)}}else{var p=[];/^[bx]cancel$/.test(e)&&p.push(new tp({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&p.push(new tp({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var v=new Ta(p,{width:"100%",height:at(h)});l=Se.makeSvgSpan([],[v],o)}return l.height=h,l.style.height=at(h),l},Ma={encloseSpan:vx,mathMLnode:px,svgSpan:gx};function Ft(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function _f(t){var e=Wc(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function Wc(t){return t&&(t.type==="atom"||j9.hasOwnProperty(t.type))?t:null}var Nf=(t,e)=>{var n,r,o;t&&t.type==="supsub"?(r=Ft(t.base,"accent"),n=r.base,t.base=n,o=F9(Zt(t,e)),t.base=r):(r=Ft(t,"accent"),n=r.base);var l=Zt(n,e.havingCrampedStyle()),h=r.isShifty&&wt.isCharacterBox(n),c=0;if(h){var p=wt.getBaseElem(n),v=Zt(p,e.havingCrampedStyle());c=Dm(v).skew}var b=r.label==="\\c",g=b?l.height+l.depth:Math.min(l.height,e.fontMetrics().xHeight),m;if(r.isStretchy)m=Ma.svgSpan(r,e),m=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:c>0?{width:"calc(100% - "+at(2*c)+")",marginLeft:at(2*c)}:void 0}]},e);else{var x,w;r.label==="\\vec"?(x=Se.staticSvg("vec",e),w=Se.svgData.vec[1]):(x=Se.makeOrd({mode:r.mode,text:r.label},e,"textord"),x=Dm(x),x.italic=0,w=x.width,b&&(g+=x.depth)),m=Se.makeSpan(["accent-body"],[x]);var S=r.label==="\\textcircled";S&&(m.classes.push("accent-full"),g=l.height);var k=c;S||(k-=w/2),m.style.left=at(k),r.label==="\\textcircled"&&(m.style.top=".2em"),m=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:-g},{type:"elem",elem:m}]},e)}var C=Se.makeSpan(["mord","accent"],[m],e);return o?(o.children[0]=C,o.height=Math.max(C.height,o.height),o.classes[0]="mord",o):C},T6=(t,e)=>{var n=t.isStretchy?Ma.mathMLnode(t.label):new Ze.MathNode("mo",[li(t.label,t.mode)]),r=new Ze.MathNode("mover",[vn(t.base,e),n]);return r.setAttribute("accent","true"),r},bx=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));dt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var n=fc(e[0]),r=!bx.test(t.funcName),o=!r||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:o,base:n}},htmlBuilder:Nf,mathmlBuilder:T6});dt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var n=e[0],r=t.parser.mode;return r==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Nf,mathmlBuilder:T6});dt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"accentUnder",mode:n.mode,label:r,base:o}},htmlBuilder:(t,e)=>{var n=Zt(t.base,e),r=Ma.svgSpan(t,e),o=t.label==="\\utilde"?.12:0,l=Se.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:n}]},e);return Se.makeSpan(["mord","accentunder"],[l],e)},mathmlBuilder:(t,e)=>{var n=Ma.mathMLnode(t.label),r=new Ze.MathNode("munder",[vn(t.base,e),n]);return r.setAttribute("accentunder","true"),r}});var g0=t=>{var e=new Ze.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};dt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r,funcName:o}=t;return{type:"xArrow",mode:r.mode,label:o,body:e[0],below:n[0]}},htmlBuilder(t,e){var n=e.style,r=e.havingStyle(n.sup()),o=Se.wrapFragment(Zt(t.body,r,e),e),l=t.label.slice(0,2)==="\\x"?"x":"cd";o.classes.push(l+"-arrow-pad");var h;t.below&&(r=e.havingStyle(n.sub()),h=Se.wrapFragment(Zt(t.below,r,e),e),h.classes.push(l+"-arrow-pad"));var c=Ma.svgSpan(t,e),p=-e.fontMetrics().axisHeight+.5*c.height,v=-e.fontMetrics().axisHeight-.5*c.height-.111;(o.depth>.25||t.label==="\\xleftequilibrium")&&(v-=o.depth);var b;if(h){var g=-e.fontMetrics().axisHeight+h.height+.5*c.height+.111;b=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:v},{type:"elem",elem:c,shift:p},{type:"elem",elem:h,shift:g}]},e)}else b=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:v},{type:"elem",elem:c,shift:p}]},e);return b.children[0].children[0].children[1].classes.push("svg-align"),Se.makeSpan(["mrel","x-arrow"],[b],e)},mathmlBuilder(t,e){var n=Ma.mathMLnode(t.label);n.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(t.body){var o=g0(vn(t.body,e));if(t.below){var l=g0(vn(t.below,e));r=new Ze.MathNode("munderover",[n,l,o])}else r=new Ze.MathNode("mover",[n,o])}else if(t.below){var h=g0(vn(t.below,e));r=new Ze.MathNode("munder",[n,h])}else r=g0(),r=new Ze.MathNode("mover",[n,r]);return r}});var yx=Se.makeSpan;function A6(t,e){var n=Jn(t.body,e,!0);return yx([t.mclass],n,e)}function M6(t,e){var n,r=Dr(t.body,e);return t.mclass==="minner"?n=new Ze.MathNode("mpadded",r):t.mclass==="mord"?t.isCharacterBox?(n=r[0],n.type="mi"):n=new Ze.MathNode("mi",r):(t.isCharacterBox?(n=r[0],n.type="mo"):n=new Ze.MathNode("mo",r),t.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):t.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):t.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}dt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Fn(o),isCharacterBox:wt.isCharacterBox(o)}},htmlBuilder:A6,mathmlBuilder:M6});var Gc=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};dt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:n}=t;return{type:"mclass",mode:n.mode,mclass:Gc(e[0]),body:Fn(e[1]),isCharacterBox:wt.isCharacterBox(e[1])}}});dt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:n,funcName:r}=t,o=e[1],l=e[0],h;r!=="\\stackrel"?h=Gc(o):h="mrel";var c={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Fn(o)},p={type:"supsub",mode:l.mode,base:c,sup:r==="\\underset"?null:l,sub:r==="\\underset"?l:null};return{type:"mclass",mode:n.mode,mclass:h,body:[p],isCharacterBox:wt.isCharacterBox(p)}},htmlBuilder:A6,mathmlBuilder:M6});dt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"pmb",mode:n.mode,mclass:Gc(e[0]),body:Fn(e[0])}},htmlBuilder(t,e){var n=Jn(t.body,e,!0),r=Se.makeSpan([t.mclass],n,e);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(t,e){var n=Dr(t.body,e),r=new Ze.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var wx={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Fm=()=>({type:"styling",body:[],mode:"math",style:"display"}),qm=t=>t.type==="textord"&&t.text==="@",xx=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function kx(t,e,n){var r=wx[t];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var o=n.callFunction("\\\\cdleft",[e[0]],[]),l={type:"atom",text:r,mode:"math",family:"rel"},h=n.callFunction("\\Big",[l],[]),c=n.callFunction("\\\\cdright",[e[1]],[]),p={type:"ordgroup",mode:"math",body:[o,h,c]};return n.callFunction("\\\\cdparent",[p],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var v={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[v],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Sx(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var n=t.fetch().text;if(n==="&"||n==="\\\\")t.consume();else if(n==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new et("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var r=[],o=[r],l=0;l<e.length;l++){for(var h=e[l],c=Fm(),p=0;p<h.length;p++)if(!qm(h[p]))c.body.push(h[p]);else{r.push(c),p+=1;var v=_f(h[p]).text,b=new Array(2);if(b[0]={type:"ordgroup",mode:"math",body:[]},b[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(v)>-1))if("<>AV".indexOf(v)>-1)for(var g=0;g<2;g++){for(var m=!0,x=p+1;x<h.length;x++){if(xx(h[x],v)){m=!1,p=x;break}if(qm(h[x]))throw new et("Missing a "+v+" character to complete a CD arrow.",h[x]);b[g].body.push(h[x])}if(m)throw new et("Missing a "+v+" character to complete a CD arrow.",h[p])}else throw new et('Expected one of "<>AV=|." after @',h[p]);var w=kx(v,b,t),S={type:"styling",body:[w],mode:"math",style:"display"};r.push(S),c=Fm()}l%2===0?r.push(c):r.shift(),r=[],o.push(r)}t.gullet.endGroup(),t.gullet.endGroup();var k=new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:k,colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}dt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:e[0]}},htmlBuilder(t,e){var n=e.havingStyle(e.style.sup()),r=Se.wrapFragment(Zt(t.label,n,e),e);return r.classes.push("cd-label-"+t.side),r.style.bottom=at(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){var n=new Ze.MathNode("mrow",[vn(t.label,e)]);return n=new Ze.MathNode("mpadded",[n]),n.setAttribute("width","0"),t.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Ze.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});dt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:n}=t;return{type:"cdlabelparent",mode:n.mode,fragment:e[0]}},htmlBuilder(t,e){var n=Se.wrapFragment(Zt(t.fragment,e),e);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(t,e){return new Ze.MathNode("mrow",[vn(t.fragment,e)])}});dt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:n}=t,r=Ft(e[0],"ordgroup"),o=r.body,l="",h=0;h<o.length;h++){var c=Ft(o[h],"textord");l+=c.text}var p=parseInt(l),v;if(isNaN(p))throw new et("\\@char has non-numeric argument "+l);if(p<0||p>=1114111)throw new et("\\@char with invalid code point "+l);return p<=65535?v=String.fromCharCode(p):(p-=65536,v=String.fromCharCode((p>>10)+55296,(p&1023)+56320)),{type:"textord",mode:n.mode,text:v}}});var C6=(t,e)=>{var n=Jn(t.body,e.withColor(t.color),!1);return Se.makeFragment(n)},L6=(t,e)=>{var n=Dr(t.body,e.withColor(t.color)),r=new Ze.MathNode("mstyle",n);return r.setAttribute("mathcolor",t.color),r};dt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:n}=t,r=Ft(e[0],"color-token").color,o=e[1];return{type:"color",mode:n.mode,color:r,body:Fn(o)}},htmlBuilder:C6,mathmlBuilder:L6});dt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:n,breakOnTokenText:r}=t,o=Ft(e[0],"color-token").color;n.gullet.macros.set("\\current@color",o);var l=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:o,body:l}},htmlBuilder:C6,mathmlBuilder:L6});dt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,n){var{parser:r}=t,o=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,l=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:l,size:o&&Ft(o,"size").value}},htmlBuilder(t,e){var n=Se.makeSpan(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=at(Nn(t.size,e)))),n},mathmlBuilder(t,e){var n=new Ze.MathNode("mspace");return t.newLine&&(n.setAttribute("linebreak","newline"),t.size&&n.setAttribute("height",at(Nn(t.size,e)))),n}});var ap={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},_6=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new et("Expected a control sequence",t);return e},Ex=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},N6=(t,e,n,r)=>{var o=t.gullet.macros.get(n.text);o==null&&(n.noexpand=!0,o={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,o,r)};dt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:n}=t;e.consumeSpaces();var r=e.fetch();if(ap[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=ap[r.text]),Ft(e.parseFunction(),"internal");throw new et("Invalid token after macro prefix",r)}});dt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=e.gullet.popToken(),o=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new et("Expected a control sequence",r);for(var l=0,h,c=[[]];e.gullet.future().text!=="{";)if(r=e.gullet.popToken(),r.text==="#"){if(e.gullet.future().text==="{"){h=e.gullet.future(),c[l].push("{");break}if(r=e.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new et('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==l+1)throw new et('Argument number "'+r.text+'" out of order');l++,c.push([])}else{if(r.text==="EOF")throw new et("Expected a macro definition");c[l].push(r.text)}var{tokens:p}=e.gullet.consumeArg();return h&&p.unshift(h),(n==="\\edef"||n==="\\xdef")&&(p=e.gullet.expandTokens(p),p.reverse()),e.gullet.macros.set(o,{tokens:p,numArgs:l,delimiters:c},n===ap[n]),{type:"internal",mode:e.mode}}});dt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=_6(e.gullet.popToken());e.gullet.consumeSpaces();var o=Ex(e);return N6(e,r,o,n==="\\\\globallet"),{type:"internal",mode:e.mode}}});dt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=_6(e.gullet.popToken()),o=e.gullet.popToken(),l=e.gullet.popToken();return N6(e,r,l,n==="\\\\globalfuture"),e.gullet.pushToken(l),e.gullet.pushToken(o),{type:"internal",mode:e.mode}}});var fl=function(t,e,n){var r=wn.math[t]&&wn.math[t].replace,o=Tf(r||t,e,n);if(!o)throw new Error("Unsupported symbol "+t+" and font size "+e+".");return o},Df=function(t,e,n,r){var o=n.havingBaseStyle(e),l=Se.makeSpan(r.concat(o.sizingClasses(n)),[t],n),h=o.sizeMultiplier/n.sizeMultiplier;return l.height*=h,l.depth*=h,l.maxFontSize=o.sizeMultiplier,l},D6=function(t,e,n){var r=e.havingBaseStyle(n),o=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=at(o),t.height-=o,t.depth+=o},Tx=function(t,e,n,r,o,l){var h=Se.makeSymbol(t,"Main-Regular",o,r),c=Df(h,e,r,l);return n&&D6(c,r,e),c},Ax=function(t,e,n,r){return Se.makeSymbol(t,"Size"+e+"-Regular",n,r)},R6=function(t,e,n,r,o,l){var h=Ax(t,e,o,r),c=Df(Se.makeSpan(["delimsizing","size"+e],[h],r),Tt.TEXT,r,l);return n&&D6(c,r,Tt.TEXT),c},eh=function(t,e,n){var r;e==="Size1-Regular"?r="delim-size1":r="delim-size4";var o=Se.makeSpan(["delimsizinginner",r],[Se.makeSpan([],[Se.makeSymbol(t,e,n)])]);return{type:"elem",elem:o}},th=function(t,e,n){var r=Fi["Size4-Regular"][t.charCodeAt(0)]?Fi["Size4-Regular"][t.charCodeAt(0)][4]:Fi["Size1-Regular"][t.charCodeAt(0)][4],o=new Qa("inner",N9(t,Math.round(1e3*e))),l=new Ta([o],{width:at(r),height:at(e),style:"width:"+at(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),h=Se.makeSvgSpan([],[l],n);return h.height=e,h.style.height=at(e),h.style.width=at(r),{type:"elem",elem:h}},op=.008,v0={type:"kern",size:-1*op},Mx=["|","\\lvert","\\rvert","\\vert"],Cx=["\\|","\\lVert","\\rVert","\\Vert"],I6=function(t,e,n,r,o,l){var h,c,p,v,b="",g=0;h=p=v=t,c=null;var m="Size1-Regular";t==="\\uparrow"?p=v="⏐":t==="\\Uparrow"?p=v="‖":t==="\\downarrow"?h=p="⏐":t==="\\Downarrow"?h=p="‖":t==="\\updownarrow"?(h="\\uparrow",p="⏐",v="\\downarrow"):t==="\\Updownarrow"?(h="\\Uparrow",p="‖",v="\\Downarrow"):wt.contains(Mx,t)?(p="",b="vert",g=333):wt.contains(Cx,t)?(p="∥",b="doublevert",g=556):t==="["||t==="\\lbrack"?(h="⎡",p="⎢",v="⎣",m="Size4-Regular",b="lbrack",g=667):t==="]"||t==="\\rbrack"?(h="⎤",p="⎥",v="⎦",m="Size4-Regular",b="rbrack",g=667):t==="\\lfloor"||t==="⌊"?(p=h="⎢",v="⎣",m="Size4-Regular",b="lfloor",g=667):t==="\\lceil"||t==="⌈"?(h="⎡",p=v="⎢",m="Size4-Regular",b="lceil",g=667):t==="\\rfloor"||t==="⌋"?(p=h="⎥",v="⎦",m="Size4-Regular",b="rfloor",g=667):t==="\\rceil"||t==="⌉"?(h="⎤",p=v="⎥",m="Size4-Regular",b="rceil",g=667):t==="("||t==="\\lparen"?(h="⎛",p="⎜",v="⎝",m="Size4-Regular",b="lparen",g=875):t===")"||t==="\\rparen"?(h="⎞",p="⎟",v="⎠",m="Size4-Regular",b="rparen",g=875):t==="\\{"||t==="\\lbrace"?(h="⎧",c="⎨",v="⎩",p="⎪",m="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(h="⎫",c="⎬",v="⎭",p="⎪",m="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(h="⎧",v="⎩",p="⎪",m="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(h="⎫",v="⎭",p="⎪",m="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(h="⎧",v="⎭",p="⎪",m="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(h="⎫",v="⎩",p="⎪",m="Size4-Regular");var x=fl(h,m,o),w=x.height+x.depth,S=fl(p,m,o),k=S.height+S.depth,C=fl(v,m,o),T=C.height+C.depth,A=0,M=1;if(c!==null){var y=fl(c,m,o);A=y.height+y.depth,M=2}var N=w+T+A,z=Math.max(0,Math.ceil((e-N)/(M*k))),F=N+z*M*k,P=r.fontMetrics().axisHeight;n&&(P*=r.sizeMultiplier);var Y=F/2-P,te=[];if(b.length>0){var ce=F-w-T,Me=Math.round(F*1e3),Fe=D9(b,Math.round(ce*1e3)),We=new Qa(b,Fe),rt=(g/1e3).toFixed(3)+"em",je=(Me/1e3).toFixed(3)+"em",Ne=new Ta([We],{width:rt,height:je,viewBox:"0 0 "+g+" "+Me}),nt=Se.makeSvgSpan([],[Ne],r);nt.height=Me/1e3,nt.style.width=rt,nt.style.height=je,te.push({type:"elem",elem:nt})}else{if(te.push(eh(v,m,o)),te.push(v0),c===null){var ct=F-w-T+2*op;te.push(th(p,ct,r))}else{var tt=(F-w-T-A)/2+2*op;te.push(th(p,tt,r)),te.push(v0),te.push(eh(c,m,o)),te.push(v0),te.push(th(p,tt,r))}te.push(v0),te.push(eh(h,m,o))}var q=r.havingBaseStyle(Tt.TEXT),Ht=Se.makeVList({positionType:"bottom",positionData:Y,children:te},q);return Df(Se.makeSpan(["delimsizing","mult"],[Ht],q),Tt.TEXT,r,l)},nh=80,rh=.08,ih=function(t,e,n,r,o){var l=_9(t,r,n),h=new Qa(t,l),c=new Ta([h],{width:"400em",height:at(e),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Se.makeSvgSpan(["hide-tail"],[c],o)},Lx=function(t,e){var n=e.havingBaseSizing(),r=z6("\\surd",t*n.sizeMultiplier,P6,n),o=n.sizeMultiplier,l=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),h,c=0,p=0,v=0,b;return r.type==="small"?(v=1e3+1e3*l+nh,t<1?o=1:t<1.4&&(o=.7),c=(1+l+rh)/o,p=(1+l)/o,h=ih("sqrtMain",c,v,l,e),h.style.minWidth="0.853em",b=.833/o):r.type==="large"?(v=(1e3+nh)*Al[r.size],p=(Al[r.size]+l)/o,c=(Al[r.size]+l+rh)/o,h=ih("sqrtSize"+r.size,c,v,l,e),h.style.minWidth="1.02em",b=1/o):(c=t+l+rh,p=t+l,v=Math.floor(1e3*t+l)+nh,h=ih("sqrtTall",c,v,l,e),h.style.minWidth="0.742em",b=1.056),h.height=p,h.style.height=at(c),{span:h,advanceWidth:b,ruleWidth:(e.fontMetrics().sqrtRuleThickness+l)*o}},O6=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],_x=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],H6=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Al=[0,1.2,1.8,2.4,3],Nx=function(t,e,n,r,o){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),wt.contains(O6,t)||wt.contains(H6,t))return R6(t,e,!1,n,r,o);if(wt.contains(_x,t))return I6(t,Al[e],!1,n,r,o);throw new et("Illegal delimiter: '"+t+"'")},Dx=[{type:"small",style:Tt.SCRIPTSCRIPT},{type:"small",style:Tt.SCRIPT},{type:"small",style:Tt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Rx=[{type:"small",style:Tt.SCRIPTSCRIPT},{type:"small",style:Tt.SCRIPT},{type:"small",style:Tt.TEXT},{type:"stack"}],P6=[{type:"small",style:Tt.SCRIPTSCRIPT},{type:"small",style:Tt.SCRIPT},{type:"small",style:Tt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ix=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},z6=function(t,e,n,r){for(var o=Math.min(2,3-r.style.size),l=o;l<n.length&&n[l].type!=="stack";l++){var h=fl(t,Ix(n[l]),"math"),c=h.height+h.depth;if(n[l].type==="small"){var p=r.havingBaseStyle(n[l].style);c*=p.sizeMultiplier}if(c>e)return n[l]}return n[n.length-1]},B6=function(t,e,n,r,o,l){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var h;wt.contains(H6,t)?h=Dx:wt.contains(O6,t)?h=P6:h=Rx;var c=z6(t,e,h,r);return c.type==="small"?Tx(t,c.style,n,r,o,l):c.type==="large"?R6(t,c.size,n,r,o,l):I6(t,e,n,r,o,l)},Ox=function(t,e,n,r,o,l){var h=r.fontMetrics().axisHeight*r.sizeMultiplier,c=901,p=5/r.fontMetrics().ptPerEm,v=Math.max(e-h,n+h),b=Math.max(v/500*c,2*v-p);return B6(t,b,!0,r,o,l)},wa={sqrtImage:Lx,sizedDelim:Nx,sizeToMaxHeight:Al,customSizedDelim:B6,leftRightDelim:Ox},jm={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Hx=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Kc(t,e){var n=Wc(t);if(n&&wt.contains(Hx,n.text))return n;throw n?new et("Invalid delimiter '"+n.text+"' after '"+e.funcName+"'",t):new et("Invalid delimiter type '"+t.type+"'",t)}dt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var n=Kc(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:jm[t.funcName].size,mclass:jm[t.funcName].mclass,delim:n.text}},htmlBuilder:(t,e)=>t.delim==="."?Se.makeSpan([t.mclass]):wa.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(li(t.delim,t.mode));var n=new Ze.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=at(wa.sizeToMaxHeight[t.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function $m(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}dt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=t.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new et("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:Kc(e[0],t).text,color:n}}});dt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=Kc(e[0],t),r=t.parser;++r.leftrightDepth;var o=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var l=Ft(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:o,left:n.text,right:l.delim,rightColor:l.color}},htmlBuilder:(t,e)=>{$m(t);for(var n=Jn(t.body,e,!0,["mopen","mclose"]),r=0,o=0,l=!1,h=0;h<n.length;h++)n[h].isMiddle?l=!0:(r=Math.max(n[h].height,r),o=Math.max(n[h].depth,o));r*=e.sizeMultiplier,o*=e.sizeMultiplier;var c;if(t.left==="."?c=Ol(e,["mopen"]):c=wa.leftRightDelim(t.left,r,o,e,t.mode,["mopen"]),n.unshift(c),l)for(var p=1;p<n.length;p++){var v=n[p],b=v.isMiddle;b&&(n[p]=wa.leftRightDelim(b.delim,r,o,b.options,t.mode,[]))}var g;if(t.right===".")g=Ol(e,["mclose"]);else{var m=t.rightColor?e.withColor(t.rightColor):e;g=wa.leftRightDelim(t.right,r,o,m,t.mode,["mclose"])}return n.push(g),Se.makeSpan(["minner"],n,e)},mathmlBuilder:(t,e)=>{$m(t);var n=Dr(t.body,e);if(t.left!=="."){var r=new Ze.MathNode("mo",[li(t.left,t.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(t.right!=="."){var o=new Ze.MathNode("mo",[li(t.right,t.mode)]);o.setAttribute("fence","true"),t.rightColor&&o.setAttribute("mathcolor",t.rightColor),n.push(o)}return Cf(n)}});dt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=Kc(e[0],t);if(!t.parser.leftrightDepth)throw new et("\\middle without preceding \\left",n);return{type:"middle",mode:t.parser.mode,delim:n.text}},htmlBuilder:(t,e)=>{var n;if(t.delim===".")n=Ol(e,[]);else{n=wa.sizedDelim(t.delim,1,e,t.mode,[]);var r={delim:t.delim,options:e};n.isMiddle=r}return n},mathmlBuilder:(t,e)=>{var n=t.delim==="\\vert"||t.delim==="|"?li("|","text"):li(t.delim,t.mode),r=new Ze.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Rf=(t,e)=>{var n=Se.wrapFragment(Zt(t.body,e),e),r=t.label.slice(1),o=e.sizeMultiplier,l,h=0,c=wt.isCharacterBox(t.body);if(r==="sout")l=Se.makeSpan(["stretchy","sout"]),l.height=e.fontMetrics().defaultRuleThickness/o,h=-.5*e.fontMetrics().xHeight;else if(r==="phase"){var p=Nn({number:.6,unit:"pt"},e),v=Nn({number:.35,unit:"ex"},e),b=e.havingBaseSizing();o=o/b.sizeMultiplier;var g=n.height+n.depth+p+v;n.style.paddingLeft=at(g/2+p);var m=Math.floor(1e3*g*o),x=C9(m),w=new Ta([new Qa("phase",x)],{width:"400em",height:at(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});l=Se.makeSvgSpan(["hide-tail"],[w],e),l.style.height=at(g),h=n.depth+p+v}else{/cancel/.test(r)?c||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var S=0,k=0,C=0;/box/.test(r)?(C=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),S=e.fontMetrics().fboxsep+(r==="colorbox"?0:C),k=S):r==="angl"?(C=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),S=4*C,k=Math.max(0,.25-n.depth)):(S=c?.2:0,k=S),l=Ma.encloseSpan(n,r,S,k,e),/fbox|boxed|fcolorbox/.test(r)?(l.style.borderStyle="solid",l.style.borderWidth=at(C)):r==="angl"&&C!==.049&&(l.style.borderTopWidth=at(C),l.style.borderRightWidth=at(C)),h=n.depth+k,t.backgroundColor&&(l.style.backgroundColor=t.backgroundColor,t.borderColor&&(l.style.borderColor=t.borderColor))}var T;if(t.backgroundColor)T=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:h},{type:"elem",elem:n,shift:0}]},e);else{var A=/cancel|phase/.test(r)?["svg-align"]:[];T=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:l,shift:h,wrapperClasses:A}]},e)}return/cancel/.test(r)&&(T.height=n.height,T.depth=n.depth),/cancel/.test(r)&&!c?Se.makeSpan(["mord","cancel-lap"],[T],e):Se.makeSpan(["mord"],[T],e)},If=(t,e)=>{var n=0,r=new Ze.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[vn(t.body,e)]);switch(t.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),t.label==="\\fcolorbox"){var o=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);r.setAttribute("style","border: "+o+"em solid "+String(t.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&r.setAttribute("mathbackground",t.backgroundColor),r};dt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,n){var{parser:r,funcName:o}=t,l=Ft(e[0],"color-token").color,h=e[1];return{type:"enclose",mode:r.mode,label:o,backgroundColor:l,body:h}},htmlBuilder:Rf,mathmlBuilder:If});dt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,n){var{parser:r,funcName:o}=t,l=Ft(e[0],"color-token").color,h=Ft(e[1],"color-token").color,c=e[2];return{type:"enclose",mode:r.mode,label:o,backgroundColor:h,borderColor:l,body:c}},htmlBuilder:Rf,mathmlBuilder:If});dt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\fbox",body:e[0]}}});dt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"enclose",mode:n.mode,label:r,body:o}},htmlBuilder:Rf,mathmlBuilder:If});dt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\angl",body:e[0]}}});var F6={};function Vi(t){for(var{type:e,names:n,props:r,handler:o,htmlBuilder:l,mathmlBuilder:h}=t,c={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o},p=0;p<n.length;++p)F6[n[p]]=c;l&&(hc[e]=l),h&&(pc[e]=h)}var q6={};function V(t,e){q6[t]=e}function Um(t){var e=[];t.consumeSpaces();var n=t.fetch().text;for(n==="\\relax"&&(t.consume(),t.consumeSpaces(),n=t.fetch().text);n==="\\hline"||n==="\\hdashline";)t.consume(),e.push(n==="\\hdashline"),t.consumeSpaces(),n=t.fetch().text;return e}var Xc=t=>{var e=t.parser.settings;if(!e.displayMode)throw new et("{"+t.envName+"} can be used only in display mode.")};function Of(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function so(t,e,n){var{hskipBeforeAndAfter:r,addJot:o,cols:l,arraystretch:h,colSeparationType:c,autoTag:p,singleRow:v,emptySingleRow:b,maxNumCols:g,leqno:m}=e;if(t.gullet.beginGroup(),v||t.gullet.macros.set("\\cr","\\\\\\relax"),!h){var x=t.gullet.expandMacroAsText("\\arraystretch");if(x==null)h=1;else if(h=parseFloat(x),!h||h<0)throw new et("Invalid \\arraystretch: "+x)}t.gullet.beginGroup();var w=[],S=[w],k=[],C=[],T=p!=null?[]:void 0;function A(){p&&t.gullet.macros.set("\\@eqnsw","1",!0)}function M(){T&&(t.gullet.macros.get("\\df@tag")?(T.push(t.subparse([new ii("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):T.push(!!p&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(A(),C.push(Um(t));;){var y=t.parseExpression(!1,v?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),y={type:"ordgroup",mode:t.mode,body:y},n&&(y={type:"styling",mode:t.mode,style:n,body:[y]}),w.push(y);var N=t.fetch().text;if(N==="&"){if(g&&w.length===g){if(v||c)throw new et("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(N==="\\end"){M(),w.length===1&&y.type==="styling"&&y.body[0].body.length===0&&(S.length>1||!b)&&S.pop(),C.length<S.length+1&&C.push([]);break}else if(N==="\\\\"){t.consume();var z=void 0;t.gullet.future().text!==" "&&(z=t.parseSizeGroup(!0)),k.push(z?z.value:null),M(),C.push(Um(t)),w=[],S.push(w),A()}else throw new et("Expected & or \\\\ or \\cr or \\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:o,arraystretch:h,body:S,cols:l,rowGaps:k,hskipBeforeAndAfter:r,hLinesBeforeRow:C,colSeparationType:c,tags:T,leqno:m}}function Hf(t){return t.slice(0,1)==="d"?"display":"text"}var Wi=function(t,e){var n,r,o=t.body.length,l=t.hLinesBeforeRow,h=0,c=new Array(o),p=[],v=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),b=1/e.fontMetrics().ptPerEm,g=5*b;if(t.colSeparationType&&t.colSeparationType==="small"){var m=e.havingStyle(Tt.SCRIPT).sizeMultiplier;g=.2778*(m/e.sizeMultiplier)}var x=t.colSeparationType==="CD"?Nn({number:3,unit:"ex"},e):12*b,w=3*b,S=t.arraystretch*x,k=.7*S,C=.3*S,T=0;function A(ye){for(var Ae=0;Ae<ye.length;++Ae)Ae>0&&(T+=.25),p.push({pos:T,isDashed:ye[Ae]})}for(A(l[0]),n=0;n<t.body.length;++n){var M=t.body[n],y=k,N=C;h<M.length&&(h=M.length);var z=new Array(M.length);for(r=0;r<M.length;++r){var F=Zt(M[r],e);N<F.depth&&(N=F.depth),y<F.height&&(y=F.height),z[r]=F}var P=t.rowGaps[n],Y=0;P&&(Y=Nn(P,e),Y>0&&(Y+=C,N<Y&&(N=Y),Y=0)),t.addJot&&(N+=w),z.height=y,z.depth=N,T+=y,z.pos=T,T+=N+Y,c[n]=z,A(l[n+1])}var te=T/2+e.fontMetrics().axisHeight,ce=t.cols||[],Me=[],Fe,We,rt=[];if(t.tags&&t.tags.some(ye=>ye))for(n=0;n<o;++n){var je=c[n],Ne=je.pos-te,nt=t.tags[n],ct=void 0;nt===!0?ct=Se.makeSpan(["eqn-num"],[],e):nt===!1?ct=Se.makeSpan([],[],e):ct=Se.makeSpan([],Jn(nt,e,!0),e),ct.depth=je.depth,ct.height=je.height,rt.push({type:"elem",elem:ct,shift:Ne})}for(r=0,We=0;r<h||We<ce.length;++r,++We){for(var tt=ce[We]||{},q=!0;tt.type==="separator";){if(q||(Fe=Se.makeSpan(["arraycolsep"],[]),Fe.style.width=at(e.fontMetrics().doubleRuleSep),Me.push(Fe)),tt.separator==="|"||tt.separator===":"){var Ht=tt.separator==="|"?"solid":"dashed",Rt=Se.makeSpan(["vertical-separator"],[],e);Rt.style.height=at(T),Rt.style.borderRightWidth=at(v),Rt.style.borderRightStyle=Ht,Rt.style.margin="0 "+at(-v/2);var $t=T-te;$t&&(Rt.style.verticalAlign=at(-$t)),Me.push(Rt)}else throw new et("Invalid separator type: "+tt.separator);We++,tt=ce[We]||{},q=!1}if(!(r>=h)){var Nt=void 0;(r>0||t.hskipBeforeAndAfter)&&(Nt=wt.deflt(tt.pregap,g),Nt!==0&&(Fe=Se.makeSpan(["arraycolsep"],[]),Fe.style.width=at(Nt),Me.push(Fe)));var oe=[];for(n=0;n<o;++n){var he=c[n],J=he[r];if(J){var ee=he.pos-te;J.depth=he.depth,J.height=he.height,oe.push({type:"elem",elem:J,shift:ee})}}oe=Se.makeVList({positionType:"individualShift",children:oe},e),oe=Se.makeSpan(["col-align-"+(tt.align||"c")],[oe]),Me.push(oe),(r<h-1||t.hskipBeforeAndAfter)&&(Nt=wt.deflt(tt.postgap,g),Nt!==0&&(Fe=Se.makeSpan(["arraycolsep"],[]),Fe.style.width=at(Nt),Me.push(Fe)))}}if(c=Se.makeSpan(["mtable"],Me),p.length>0){for(var Ce=Se.makeLineSpan("hline",e,v),se=Se.makeLineSpan("hdashline",e,v),G=[{type:"elem",elem:c,shift:0}];p.length>0;){var X=p.pop(),be=X.pos-te;X.isDashed?G.push({type:"elem",elem:se,shift:be}):G.push({type:"elem",elem:Ce,shift:be})}c=Se.makeVList({positionType:"individualShift",children:G},e)}if(rt.length===0)return Se.makeSpan(["mord"],[c],e);var le=Se.makeVList({positionType:"individualShift",children:rt},e);return le=Se.makeSpan(["tag"],[le],e),Se.makeFragment([c,le])},Px={c:"center ",l:"left ",r:"right "},Gi=function(t,e){for(var n=[],r=new Ze.MathNode("mtd",[],["mtr-glue"]),o=new Ze.MathNode("mtd",[],["mml-eqn-num"]),l=0;l<t.body.length;l++){for(var h=t.body[l],c=[],p=0;p<h.length;p++)c.push(new Ze.MathNode("mtd",[vn(h[p],e)]));t.tags&&t.tags[l]&&(c.unshift(r),c.push(r),t.leqno?c.unshift(o):c.push(o)),n.push(new Ze.MathNode("mtr",c))}var v=new Ze.MathNode("mtable",n),b=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);v.setAttribute("rowspacing",at(b));var g="",m="";if(t.cols&&t.cols.length>0){var x=t.cols,w="",S=!1,k=0,C=x.length;x[0].type==="separator"&&(g+="top ",k=1),x[x.length-1].type==="separator"&&(g+="bottom ",C-=1);for(var T=k;T<C;T++)x[T].type==="align"?(m+=Px[x[T].align],S&&(w+="none "),S=!0):x[T].type==="separator"&&S&&(w+=x[T].separator==="|"?"solid ":"dashed ",S=!1);v.setAttribute("columnalign",m.trim()),/[sd]/.test(w)&&v.setAttribute("columnlines",w.trim())}if(t.colSeparationType==="align"){for(var A=t.cols||[],M="",y=1;y<A.length;y++)M+=y%2?"0em ":"1em ";v.setAttribute("columnspacing",M.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?v.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?v.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?v.setAttribute("columnspacing","0.5em"):v.setAttribute("columnspacing","1em");var N="",z=t.hLinesBeforeRow;g+=z[0].length>0?"left ":"",g+=z[z.length-1].length>0?"right ":"";for(var F=1;F<z.length-1;F++)N+=z[F].length===0?"none ":z[F][0]?"dashed ":"solid ";return/[sd]/.test(N)&&v.setAttribute("rowlines",N.trim()),g!==""&&(v=new Ze.MathNode("menclose",[v]),v.setAttribute("notation",g.trim())),t.arraystretch&&t.arraystretch<1&&(v=new Ze.MathNode("mstyle",[v]),v.setAttribute("scriptlevel","1")),v},j6=function(t,e){t.envName.indexOf("ed")===-1&&Xc(t);var n=[],r=t.envName.indexOf("at")>-1?"alignat":"align",o=t.envName==="split",l=so(t.parser,{cols:n,addJot:!0,autoTag:o?void 0:Of(t.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:o?2:void 0,leqno:t.parser.settings.leqno},"display"),h,c=0,p={type:"ordgroup",mode:t.mode,body:[]};if(e[0]&&e[0].type==="ordgroup"){for(var v="",b=0;b<e[0].body.length;b++){var g=Ft(e[0].body[b],"textord");v+=g.text}h=Number(v),c=h*2}var m=!c;l.body.forEach(function(k){for(var C=1;C<k.length;C+=2){var T=Ft(k[C],"styling"),A=Ft(T.body[0],"ordgroup");A.body.unshift(p)}if(m)c<k.length&&(c=k.length);else{var M=k.length/2;if(h<M)throw new et("Too many math in a row: "+("expected "+h+", but got "+M),k[0])}});for(var x=0;x<c;++x){var w="r",S=0;x%2===1?w="l":x>0&&m&&(S=1),n[x]={type:"align",align:w,pregap:S,postgap:0}}return l.colSeparationType=m?"align":"alignat",l};Vi({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var n=Wc(e[0]),r=n?[e[0]]:Ft(e[0],"ordgroup").body,o=r.map(function(h){var c=_f(h),p=c.text;if("lcr".indexOf(p)!==-1)return{type:"align",align:p};if(p==="|")return{type:"separator",separator:"|"};if(p===":")return{type:"separator",separator:":"};throw new et("Unknown column alignment: "+p,h)}),l={cols:o,hskipBeforeAndAfter:!0,maxNumCols:o.length};return so(t.parser,l,Hf(t.envName))},htmlBuilder:Wi,mathmlBuilder:Gi});Vi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(t.envName.charAt(t.envName.length-1)==="*"){var o=t.parser;if(o.consumeSpaces(),o.fetch().text==="["){if(o.consume(),o.consumeSpaces(),n=o.fetch().text,"lcr".indexOf(n)===-1)throw new et("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),r.cols=[{type:"align",align:n}]}}var l=so(t.parser,r,Hf(t.envName)),h=Math.max(0,...l.body.map(c=>c.length));return l.cols=new Array(h).fill({type:"align",align:n}),e?{type:"leftright",mode:t.mode,body:[l],left:e[0],right:e[1],rightColor:void 0}:l},htmlBuilder:Wi,mathmlBuilder:Gi});Vi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},n=so(t.parser,e,"script");return n.colSeparationType="small",n},htmlBuilder:Wi,mathmlBuilder:Gi});Vi({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var n=Wc(e[0]),r=n?[e[0]]:Ft(e[0],"ordgroup").body,o=r.map(function(h){var c=_f(h),p=c.text;if("lc".indexOf(p)!==-1)return{type:"align",align:p};throw new et("Unknown column alignment: "+p,h)});if(o.length>1)throw new et("{subarray} can contain only one column");var l={cols:o,hskipBeforeAndAfter:!1,arraystretch:.5};if(l=so(t.parser,l,"script"),l.body.length>0&&l.body[0].length>1)throw new et("{subarray} can contain only one column");return l},htmlBuilder:Wi,mathmlBuilder:Gi});Vi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=so(t.parser,e,Hf(t.envName));return{type:"leftright",mode:t.mode,body:[n],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Wi,mathmlBuilder:Gi});Vi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:j6,htmlBuilder:Wi,mathmlBuilder:Gi});Vi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){wt.contains(["gather","gather*"],t.envName)&&Xc(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Of(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return so(t.parser,e,"display")},htmlBuilder:Wi,mathmlBuilder:Gi});Vi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:j6,htmlBuilder:Wi,mathmlBuilder:Gi});Vi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){Xc(t);var e={autoTag:Of(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return so(t.parser,e,"display")},htmlBuilder:Wi,mathmlBuilder:Gi});Vi({type:"array",names:["CD"],props:{numArgs:0},handler(t){return Xc(t),Sx(t.parser)},htmlBuilder:Wi,mathmlBuilder:Gi});V("\\nonumber","\\gdef\\@eqnsw{0}");V("\\notag","\\nonumber");dt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new et(t.funcName+" valid only within array environment")}});var Vm=F6;dt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];if(o.type!=="ordgroup")throw new et("Invalid environment name",o);for(var l="",h=0;h<o.body.length;++h)l+=Ft(o.body[h],"textord").text;if(r==="\\begin"){if(!Vm.hasOwnProperty(l))throw new et("No such environment: "+l,o);var c=Vm[l],{args:p,optArgs:v}=n.parseArguments("\\begin{"+l+"}",c),b={mode:n.mode,envName:l,parser:n},g=c.handler(b,p,v);n.expect("\\end",!1);var m=n.nextToken,x=Ft(n.parseFunction(),"environment");if(x.name!==l)throw new et("Mismatch: \\begin{"+l+"} matched by \\end{"+x.name+"}",m);return g}return{type:"environment",mode:n.mode,name:l,nameGroup:o}}});var $6=(t,e)=>{var n=t.font,r=e.withFont(n);return Zt(t.body,r)},U6=(t,e)=>{var n=t.font,r=e.withFont(n);return vn(t.body,r)},Wm={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};dt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=fc(e[0]),l=r;return l in Wm&&(l=Wm[l]),{type:"font",mode:n.mode,font:l.slice(1),body:o}},htmlBuilder:$6,mathmlBuilder:U6});dt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:n}=t,r=e[0],o=wt.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Gc(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:o}}});dt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,breakOnTokenText:o}=t,{mode:l}=n,h=n.parseExpression(!0,o),c="math"+r.slice(1);return{type:"font",mode:l,font:c,body:{type:"ordgroup",mode:n.mode,body:h}}},htmlBuilder:$6,mathmlBuilder:U6});var V6=(t,e)=>{var n=e;return t==="display"?n=n.id>=Tt.SCRIPT.id?n.text():Tt.DISPLAY:t==="text"&&n.size===Tt.DISPLAY.size?n=Tt.TEXT:t==="script"?n=Tt.SCRIPT:t==="scriptscript"&&(n=Tt.SCRIPTSCRIPT),n},Pf=(t,e)=>{var n=V6(t.size,e.style),r=n.fracNum(),o=n.fracDen(),l;l=e.havingStyle(r);var h=Zt(t.numer,l,e);if(t.continued){var c=8.5/e.fontMetrics().ptPerEm,p=3.5/e.fontMetrics().ptPerEm;h.height=h.height<c?c:h.height,h.depth=h.depth<p?p:h.depth}l=e.havingStyle(o);var v=Zt(t.denom,l,e),b,g,m;t.hasBarLine?(t.barSize?(g=Nn(t.barSize,e),b=Se.makeLineSpan("frac-line",e,g)):b=Se.makeLineSpan("frac-line",e),g=b.height,m=b.height):(b=null,g=0,m=e.fontMetrics().defaultRuleThickness);var x,w,S;n.size===Tt.DISPLAY.size||t.size==="display"?(x=e.fontMetrics().num1,g>0?w=3*m:w=7*m,S=e.fontMetrics().denom1):(g>0?(x=e.fontMetrics().num2,w=m):(x=e.fontMetrics().num3,w=3*m),S=e.fontMetrics().denom2);var k;if(b){var C=e.fontMetrics().axisHeight;x-h.depth-(C+.5*g)<w&&(x+=w-(x-h.depth-(C+.5*g))),C-.5*g-(v.height-S)<w&&(S+=w-(C-.5*g-(v.height-S)));var T=-(C-.5*g);k=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:S},{type:"elem",elem:b,shift:T},{type:"elem",elem:h,shift:-x}]},e)}else{var A=x-h.depth-(v.height-S);A<w&&(x+=.5*(w-A),S+=.5*(w-A)),k=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:S},{type:"elem",elem:h,shift:-x}]},e)}l=e.havingStyle(n),k.height*=l.sizeMultiplier/e.sizeMultiplier,k.depth*=l.sizeMultiplier/e.sizeMultiplier;var M;n.size===Tt.DISPLAY.size?M=e.fontMetrics().delim1:n.size===Tt.SCRIPTSCRIPT.size?M=e.havingStyle(Tt.SCRIPT).fontMetrics().delim2:M=e.fontMetrics().delim2;var y,N;return t.leftDelim==null?y=Ol(e,["mopen"]):y=wa.customSizedDelim(t.leftDelim,M,!0,e.havingStyle(n),t.mode,["mopen"]),t.continued?N=Se.makeSpan([]):t.rightDelim==null?N=Ol(e,["mclose"]):N=wa.customSizedDelim(t.rightDelim,M,!0,e.havingStyle(n),t.mode,["mclose"]),Se.makeSpan(["mord"].concat(l.sizingClasses(e)),[y,Se.makeSpan(["mfrac"],[k]),N],e)},zf=(t,e)=>{var n=new Ze.MathNode("mfrac",[vn(t.numer,e),vn(t.denom,e)]);if(!t.hasBarLine)n.setAttribute("linethickness","0px");else if(t.barSize){var r=Nn(t.barSize,e);n.setAttribute("linethickness",at(r))}var o=V6(t.size,e.style);if(o.size!==e.style.size){n=new Ze.MathNode("mstyle",[n]);var l=o.size===Tt.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",l),n.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var h=[];if(t.leftDelim!=null){var c=new Ze.MathNode("mo",[new Ze.TextNode(t.leftDelim.replace("\\",""))]);c.setAttribute("fence","true"),h.push(c)}if(h.push(n),t.rightDelim!=null){var p=new Ze.MathNode("mo",[new Ze.TextNode(t.rightDelim.replace("\\",""))]);p.setAttribute("fence","true"),h.push(p)}return Cf(h)}return n};dt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=e[1],h,c=null,p=null,v="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":h=!0;break;case"\\\\atopfrac":h=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":h=!1,c="(",p=")";break;case"\\\\bracefrac":h=!1,c="\\{",p="\\}";break;case"\\\\brackfrac":h=!1,c="[",p="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":v="display";break;case"\\tfrac":case"\\tbinom":v="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:o,denom:l,hasBarLine:h,leftDelim:c,rightDelim:p,size:v,barSize:null}},htmlBuilder:Pf,mathmlBuilder:zf});dt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=e[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:o,denom:l,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});dt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:n,token:r}=t,o;switch(n){case"\\over":o="\\frac";break;case"\\choose":o="\\binom";break;case"\\atop":o="\\\\atopfrac";break;case"\\brace":o="\\\\bracefrac";break;case"\\brack":o="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:o,token:r}}});var Gm=["display","text","script","scriptscript"],Km=function(t){var e=null;return t.length>0&&(e=t,e=e==="."?null:e),e};dt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:n}=t,r=e[4],o=e[5],l=fc(e[0]),h=l.type==="atom"&&l.family==="open"?Km(l.text):null,c=fc(e[1]),p=c.type==="atom"&&c.family==="close"?Km(c.text):null,v=Ft(e[2],"size"),b,g=null;v.isBlank?b=!0:(g=v.value,b=g.number>0);var m="auto",x=e[3];if(x.type==="ordgroup"){if(x.body.length>0){var w=Ft(x.body[0],"textord");m=Gm[Number(w.text)]}}else x=Ft(x,"textord"),m=Gm[Number(x.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:o,continued:!1,hasBarLine:b,barSize:g,leftDelim:h,rightDelim:p,size:m}},htmlBuilder:Pf,mathmlBuilder:zf});dt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:n,funcName:r,token:o}=t;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Ft(e[0],"size").value,token:o}}});dt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=p9(Ft(e[1],"infix").size),h=e[2],c=l.number>0;return{type:"genfrac",mode:n.mode,numer:o,denom:h,continued:!1,hasBarLine:c,barSize:l,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Pf,mathmlBuilder:zf});var W6=(t,e)=>{var n=e.style,r,o;t.type==="supsub"?(r=t.sup?Zt(t.sup,e.havingStyle(n.sup()),e):Zt(t.sub,e.havingStyle(n.sub()),e),o=Ft(t.base,"horizBrace")):o=Ft(t,"horizBrace");var l=Zt(o.base,e.havingBaseStyle(Tt.DISPLAY)),h=Ma.svgSpan(o,e),c;if(o.isOver?(c=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:h}]},e),c.children[0].children[0].children[1].classes.push("svg-align")):(c=Se.makeVList({positionType:"bottom",positionData:l.depth+.1+h.height,children:[{type:"elem",elem:h},{type:"kern",size:.1},{type:"elem",elem:l}]},e),c.children[0].children[0].children[0].classes.push("svg-align")),r){var p=Se.makeSpan(["mord",o.isOver?"mover":"munder"],[c],e);o.isOver?c=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:p},{type:"kern",size:.2},{type:"elem",elem:r}]},e):c=Se.makeVList({positionType:"bottom",positionData:p.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:p}]},e)}return Se.makeSpan(["mord",o.isOver?"mover":"munder"],[c],e)},zx=(t,e)=>{var n=Ma.mathMLnode(t.label);return new Ze.MathNode(t.isOver?"mover":"munder",[vn(t.base,e),n])};dt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:W6,mathmlBuilder:zx});dt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[1],o=Ft(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:n.mode,href:o,body:Fn(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var n=Jn(t.body,e,!1);return Se.makeAnchor(t.href,[],n,e)},mathmlBuilder:(t,e)=>{var n=eo(t.body,e);return n instanceof Ur||(n=new Ur("mrow",[n])),n.setAttribute("href",t.href),n}});dt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=Ft(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var o=[],l=0;l<r.length;l++){var h=r[l];h==="~"&&(h="\\textasciitilde"),o.push({type:"textord",mode:"text",text:h})}var c={type:"text",mode:n.mode,font:"\\texttt",body:o};return{type:"href",mode:n.mode,href:r,body:Fn(c)}}});dt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:n}=t;return{type:"hbox",mode:n.mode,body:Fn(e[0])}},htmlBuilder(t,e){var n=Jn(t.body,e,!1);return Se.makeFragment(n)},mathmlBuilder(t,e){return new Ze.MathNode("mrow",Dr(t.body,e))}});dt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,token:o}=t,l=Ft(e[0],"raw").string,h=e[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c,p={};switch(r){case"\\htmlClass":p.class=l,c={command:"\\htmlClass",class:l};break;case"\\htmlId":p.id=l,c={command:"\\htmlId",id:l};break;case"\\htmlStyle":p.style=l,c={command:"\\htmlStyle",style:l};break;case"\\htmlData":{for(var v=l.split(","),b=0;b<v.length;b++){var g=v[b].split("=");if(g.length!==2)throw new et("Error parsing key-value for \\htmlData");p["data-"+g[0].trim()]=g[1].trim()}c={command:"\\htmlData",attributes:p};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(c)?{type:"html",mode:n.mode,attributes:p,body:Fn(h)}:n.formatUnsupportedCmd(r)},htmlBuilder:(t,e)=>{var n=Jn(t.body,e,!1),r=["enclosing"];t.attributes.class&&r.push(...t.attributes.class.trim().split(/\s+/));var o=Se.makeSpan(r,n,e);for(var l in t.attributes)l!=="class"&&t.attributes.hasOwnProperty(l)&&o.setAttribute(l,t.attributes[l]);return o},mathmlBuilder:(t,e)=>eo(t.body,e)});dt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"htmlmathml",mode:n.mode,html:Fn(e[0]),mathml:Fn(e[1])}},htmlBuilder:(t,e)=>{var n=Jn(t.html,e,!1);return Se.makeFragment(n)},mathmlBuilder:(t,e)=>eo(t.mathml,e)});var ah=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new et("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(e[1]+e[2]),unit:e[3]};if(!d6(n))throw new et("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};dt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{var{parser:r}=t,o={number:0,unit:"em"},l={number:.9,unit:"em"},h={number:0,unit:"em"},c="";if(n[0])for(var p=Ft(n[0],"raw").string,v=p.split(","),b=0;b<v.length;b++){var g=v[b].split("=");if(g.length===2){var m=g[1].trim();switch(g[0].trim()){case"alt":c=m;break;case"width":o=ah(m);break;case"height":l=ah(m);break;case"totalheight":h=ah(m);break;default:throw new et("Invalid key: '"+g[0]+"' in \\includegraphics.")}}}var x=Ft(e[0],"url").url;return c===""&&(c=x,c=c.replace(/^.*[\\/]/,""),c=c.substring(0,c.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:x})?{type:"includegraphics",mode:r.mode,alt:c,width:o,height:l,totalheight:h,src:x}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var n=Nn(t.height,e),r=0;t.totalheight.number>0&&(r=Nn(t.totalheight,e)-n);var o=0;t.width.number>0&&(o=Nn(t.width,e));var l={height:at(n+r)};o>0&&(l.width=at(o)),r>0&&(l.verticalAlign=at(-r));var h=new z9(t.src,t.alt,l);return h.height=n,h.depth=r,h},mathmlBuilder:(t,e)=>{var n=new Ze.MathNode("mglyph",[]);n.setAttribute("alt",t.alt);var r=Nn(t.height,e),o=0;if(t.totalheight.number>0&&(o=Nn(t.totalheight,e)-r,n.setAttribute("valign",at(-o))),n.setAttribute("height",at(r+o)),t.width.number>0){var l=Nn(t.width,e);n.setAttribute("width",at(l))}return n.setAttribute("src",t.src),n}});dt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,o=Ft(e[0],"size");if(n.settings.strict){var l=r[1]==="m",h=o.value.unit==="mu";l?(h||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+o.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):h&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:o.value}},htmlBuilder(t,e){return Se.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var n=Nn(t.dimension,e);return new Ze.SpaceNode(n)}});dt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:o}},htmlBuilder:(t,e)=>{var n;t.alignment==="clap"?(n=Se.makeSpan([],[Zt(t.body,e)]),n=Se.makeSpan(["inner"],[n],e)):n=Se.makeSpan(["inner"],[Zt(t.body,e)]);var r=Se.makeSpan(["fix"],[]),o=Se.makeSpan([t.alignment],[n,r],e),l=Se.makeSpan(["strut"]);return l.style.height=at(o.height+o.depth),o.depth&&(l.style.verticalAlign=at(-o.depth)),o.children.unshift(l),o=Se.makeSpan(["thinbox"],[o],e),Se.makeSpan(["mord","vbox"],[o],e)},mathmlBuilder:(t,e)=>{var n=new Ze.MathNode("mpadded",[vn(t.body,e)]);if(t.alignment!=="rlap"){var r=t.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});dt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:n,parser:r}=t,o=r.mode;r.switchMode("math");var l=n==="\\("?"\\)":"$",h=r.parseExpression(!1,l);return r.expect(l),r.switchMode(o),{type:"styling",mode:r.mode,style:"text",body:h}}});dt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new et("Mismatched "+t.funcName)}});var Xm=(t,e)=>{switch(e.style.size){case Tt.DISPLAY.size:return t.display;case Tt.TEXT.size:return t.text;case Tt.SCRIPT.size:return t.script;case Tt.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};dt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"mathchoice",mode:n.mode,display:Fn(e[0]),text:Fn(e[1]),script:Fn(e[2]),scriptscript:Fn(e[3])}},htmlBuilder:(t,e)=>{var n=Xm(t,e),r=Jn(n,e,!1);return Se.makeFragment(r)},mathmlBuilder:(t,e)=>{var n=Xm(t,e);return eo(n,e)}});var G6=(t,e,n,r,o,l,h)=>{t=Se.makeSpan([],[t]);var c=n&&wt.isCharacterBox(n),p,v;if(e){var b=Zt(e,r.havingStyle(o.sup()),r);v={elem:b,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-b.depth)}}if(n){var g=Zt(n,r.havingStyle(o.sub()),r);p={elem:g,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-g.height)}}var m;if(v&&p){var x=r.fontMetrics().bigOpSpacing5+p.elem.height+p.elem.depth+p.kern+t.depth+h;m=Se.makeVList({positionType:"bottom",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:at(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:at(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(p){var w=t.height-h;m=Se.makeVList({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:at(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t}]},r)}else if(v){var S=t.depth+h;m=Se.makeVList({positionType:"bottom",positionData:S,children:[{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:at(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return t;var k=[m];if(p&&l!==0&&!c){var C=Se.makeSpan(["mspace"],[],r);C.style.marginRight=at(l),k.unshift(C)}return Se.makeSpan(["mop","op-limits"],k,r)},K6=["\\smallint"],ps=(t,e)=>{var n,r,o=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=Ft(t.base,"op"),o=!0):l=Ft(t,"op");var h=e.style,c=!1;h.size===Tt.DISPLAY.size&&l.symbol&&!wt.contains(K6,l.name)&&(c=!0);var p;if(l.symbol){var v=c?"Size2-Regular":"Size1-Regular",b="";if((l.name==="\\oiint"||l.name==="\\oiiint")&&(b=l.name.slice(1),l.name=b==="oiint"?"\\iint":"\\iiint"),p=Se.makeSymbol(l.name,v,"math",e,["mop","op-symbol",c?"large-op":"small-op"]),b.length>0){var g=p.italic,m=Se.staticSvg(b+"Size"+(c?"2":"1"),e);p=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:p,shift:0},{type:"elem",elem:m,shift:c?.08:0}]},e),l.name="\\"+b,p.classes.unshift("mop"),p.italic=g}}else if(l.body){var x=Jn(l.body,e,!0);x.length===1&&x[0]instanceof si?(p=x[0],p.classes[0]="mop"):p=Se.makeSpan(["mop"],x,e)}else{for(var w=[],S=1;S<l.name.length;S++)w.push(Se.mathsym(l.name[S],l.mode,e));p=Se.makeSpan(["mop"],w,e)}var k=0,C=0;return(p instanceof si||l.name==="\\oiint"||l.name==="\\oiiint")&&!l.suppressBaseShift&&(k=(p.height-p.depth)/2-e.fontMetrics().axisHeight,C=p.italic),o?G6(p,n,r,e,h,C,k):(k&&(p.style.position="relative",p.style.top=at(k)),p)},Gl=(t,e)=>{var n;if(t.symbol)n=new Ur("mo",[li(t.name,t.mode)]),wt.contains(K6,t.name)&&n.setAttribute("largeop","false");else if(t.body)n=new Ur("mo",Dr(t.body,e));else{n=new Ur("mi",[new qi(t.name.slice(1))]);var r=new Ur("mo",[li("","text")]);t.parentIsSupSub?n=new Ur("mrow",[n,r]):n=k6([n,r])}return n},Bx={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","":"\\bigvee","⋂":"\\bigcap","":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};dt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","","⋂","","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=r;return o.length===1&&(o=Bx[o]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:ps,mathmlBuilder:Gl});dt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Fn(r)}},htmlBuilder:ps,mathmlBuilder:Gl});var Fx={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};dt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ps,mathmlBuilder:Gl});dt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ps,mathmlBuilder:Gl});dt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t,r=n;return r.length===1&&(r=Fx[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:ps,mathmlBuilder:Gl});var X6=(t,e)=>{var n,r,o=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=Ft(t.base,"operatorname"),o=!0):l=Ft(t,"operatorname");var h;if(l.body.length>0){for(var c=l.body.map(g=>{var m=g.text;return typeof m=="string"?{type:"textord",mode:g.mode,text:m}:g}),p=Jn(c,e.withFont("mathrm"),!0),v=0;v<p.length;v++){var b=p[v];b instanceof si&&(b.text=b.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}h=Se.makeSpan(["mop"],p,e)}else h=Se.makeSpan(["mop"],[],e);return o?G6(h,n,r,e,e.style,0,0):h},qx=(t,e)=>{for(var n=Dr(t.body,e.withFont("mathrm")),r=!0,o=0;o<n.length;o++){var l=n[o];if(!(l instanceof Ze.SpaceNode))if(l instanceof Ze.MathNode)switch(l.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var h=l.children[0];l.children.length===1&&h instanceof Ze.TextNode?h.text=h.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){var c=n.map(b=>b.toText()).join("");n=[new Ze.TextNode(c)]}var p=new Ze.MathNode("mi",n);p.setAttribute("mathvariant","normal");var v=new Ze.MathNode("mo",[li("","text")]);return t.parentIsSupSub?new Ze.MathNode("mrow",[p,v]):Ze.newDocumentFragment([p,v])};dt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"operatorname",mode:n.mode,body:Fn(o),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:X6,mathmlBuilder:qx});V("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Fo({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Se.makeFragment(Jn(t.body,e,!1)):Se.makeSpan(["mord"],Jn(t.body,e,!0),e)},mathmlBuilder(t,e){return eo(t.body,e,!0)}});dt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:n}=t,r=e[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(t,e){var n=Zt(t.body,e.havingCrampedStyle()),r=Se.makeLineSpan("overline-line",e),o=e.fontMetrics().defaultRuleThickness,l=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r},{type:"kern",size:o}]},e);return Se.makeSpan(["mord","overline"],[l],e)},mathmlBuilder(t,e){var n=new Ze.MathNode("mo",[new Ze.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ze.MathNode("mover",[vn(t.body,e),n]);return r.setAttribute("accent","true"),r}});dt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"phantom",mode:n.mode,body:Fn(r)}},htmlBuilder:(t,e)=>{var n=Jn(t.body,e.withPhantom(),!1);return Se.makeFragment(n)},mathmlBuilder:(t,e)=>{var n=Dr(t.body,e);return new Ze.MathNode("mphantom",n)}});dt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(t,e)=>{var n=Se.makeSpan([],[Zt(t.body,e.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e),Se.makeSpan(["mord"],[n],e)},mathmlBuilder:(t,e)=>{var n=Dr(Fn(t.body),e),r=new Ze.MathNode("mphantom",n),o=new Ze.MathNode("mpadded",[r]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}});dt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(t,e)=>{var n=Se.makeSpan(["inner"],[Zt(t.body,e.withPhantom())]),r=Se.makeSpan(["fix"],[]);return Se.makeSpan(["mord","rlap"],[n,r],e)},mathmlBuilder:(t,e)=>{var n=Dr(Fn(t.body),e),r=new Ze.MathNode("mphantom",n),o=new Ze.MathNode("mpadded",[r]);return o.setAttribute("width","0px"),o}});dt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t,r=Ft(e[0],"size").value,o=e[1];return{type:"raisebox",mode:n.mode,dy:r,body:o}},htmlBuilder(t,e){var n=Zt(t.body,e),r=Nn(t.dy,e);return Se.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){var n=new Ze.MathNode("mpadded",[vn(t.body,e)]),r=t.dy.number+t.dy.unit;return n.setAttribute("voffset",r),n}});dt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});dt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,n){var{parser:r}=t,o=n[0],l=Ft(e[0],"size"),h=Ft(e[1],"size");return{type:"rule",mode:r.mode,shift:o&&Ft(o,"size").value,width:l.value,height:h.value}},htmlBuilder(t,e){var n=Se.makeSpan(["mord","rule"],[],e),r=Nn(t.width,e),o=Nn(t.height,e),l=t.shift?Nn(t.shift,e):0;return n.style.borderRightWidth=at(r),n.style.borderTopWidth=at(o),n.style.bottom=at(l),n.width=r,n.height=o+l,n.depth=-l,n.maxFontSize=o*1.125*e.sizeMultiplier,n},mathmlBuilder(t,e){var n=Nn(t.width,e),r=Nn(t.height,e),o=t.shift?Nn(t.shift,e):0,l=e.color&&e.getColor()||"black",h=new Ze.MathNode("mspace");h.setAttribute("mathbackground",l),h.setAttribute("width",at(n)),h.setAttribute("height",at(r));var c=new Ze.MathNode("mpadded",[h]);return o>=0?c.setAttribute("height",at(o)):(c.setAttribute("height",at(o)),c.setAttribute("depth",at(-o))),c.setAttribute("voffset",at(o)),c}});function Z6(t,e,n){for(var r=Jn(t,e,!1),o=e.sizeMultiplier/n.sizeMultiplier,l=0;l<r.length;l++){var h=r[l].classes.indexOf("sizing");h<0?Array.prototype.push.apply(r[l].classes,e.sizingClasses(n)):r[l].classes[h+1]==="reset-size"+e.size&&(r[l].classes[h+1]="reset-size"+n.size),r[l].height*=o,r[l].depth*=o}return Se.makeFragment(r)}var Zm=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],jx=(t,e)=>{var n=e.havingSize(t.size);return Z6(t.body,n,e)};dt({type:"sizing",names:Zm,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:n,funcName:r,parser:o}=t,l=o.parseExpression(!1,n);return{type:"sizing",mode:o.mode,size:Zm.indexOf(r)+1,body:l}},htmlBuilder:jx,mathmlBuilder:(t,e)=>{var n=e.havingSize(t.size),r=Dr(t.body,n),o=new Ze.MathNode("mstyle",r);return o.setAttribute("mathsize",at(n.sizeMultiplier)),o}});dt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,n)=>{var{parser:r}=t,o=!1,l=!1,h=n[0]&&Ft(n[0],"ordgroup");if(h)for(var c="",p=0;p<h.body.length;++p){var v=h.body[p];if(c=v.text,c==="t")o=!0;else if(c==="b")l=!0;else{o=!1,l=!1;break}}else o=!0,l=!0;var b=e[0];return{type:"smash",mode:r.mode,body:b,smashHeight:o,smashDepth:l}},htmlBuilder:(t,e)=>{var n=Se.makeSpan([],[Zt(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return n;if(t.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(t.smashDepth&&(n.depth=0,n.children))for(var o=0;o<n.children.length;o++)n.children[o].depth=0;var l=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e);return Se.makeSpan(["mord"],[l],e)},mathmlBuilder:(t,e)=>{var n=new Ze.MathNode("mpadded",[vn(t.body,e)]);return t.smashHeight&&n.setAttribute("height","0px"),t.smashDepth&&n.setAttribute("depth","0px"),n}});dt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r}=t,o=n[0],l=e[0];return{type:"sqrt",mode:r.mode,body:l,index:o}},htmlBuilder(t,e){var n=Zt(t.body,e.havingCrampedStyle());n.height===0&&(n.height=e.fontMetrics().xHeight),n=Se.wrapFragment(n,e);var r=e.fontMetrics(),o=r.defaultRuleThickness,l=o;e.style.id<Tt.TEXT.id&&(l=e.fontMetrics().xHeight);var h=o+l/4,c=n.height+n.depth+h+o,{span:p,ruleWidth:v,advanceWidth:b}=wa.sqrtImage(c,e),g=p.height-v;g>n.height+n.depth+h&&(h=(h+g-n.height-n.depth)/2);var m=p.height-n.height-h-v;n.style.paddingLeft=at(b);var x=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+m)},{type:"elem",elem:p},{type:"kern",size:v}]},e);if(t.index){var w=e.havingStyle(Tt.SCRIPTSCRIPT),S=Zt(t.index,w,e),k=.6*(x.height-x.depth),C=Se.makeVList({positionType:"shift",positionData:-k,children:[{type:"elem",elem:S}]},e),T=Se.makeSpan(["root"],[C]);return Se.makeSpan(["mord","sqrt"],[T,x],e)}else return Se.makeSpan(["mord","sqrt"],[x],e)},mathmlBuilder(t,e){var{body:n,index:r}=t;return r?new Ze.MathNode("mroot",[vn(n,e),vn(r,e)]):new Ze.MathNode("msqrt",[vn(n,e)])}});var Ym={display:Tt.DISPLAY,text:Tt.TEXT,script:Tt.SCRIPT,scriptscript:Tt.SCRIPTSCRIPT};dt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:n,funcName:r,parser:o}=t,l=o.parseExpression(!0,n),h=r.slice(1,r.length-5);return{type:"styling",mode:o.mode,style:h,body:l}},htmlBuilder(t,e){var n=Ym[t.style],r=e.havingStyle(n).withFont("");return Z6(t.body,r,e)},mathmlBuilder(t,e){var n=Ym[t.style],r=e.havingStyle(n),o=Dr(t.body,r),l=new Ze.MathNode("mstyle",o),h={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},c=h[t.style];return l.setAttribute("scriptlevel",c[0]),l.setAttribute("displaystyle",c[1]),l}});var $x=function(t,e){var n=t.base;if(n)if(n.type==="op"){var r=n.limits&&(e.style.size===Tt.DISPLAY.size||n.alwaysHandleSupSub);return r?ps:null}else if(n.type==="operatorname"){var o=n.alwaysHandleSupSub&&(e.style.size===Tt.DISPLAY.size||n.limits);return o?X6:null}else{if(n.type==="accent")return wt.isCharacterBox(n.base)?Nf:null;if(n.type==="horizBrace"){var l=!t.sub;return l===n.isOver?W6:null}else return null}else return null};Fo({type:"supsub",htmlBuilder(t,e){var n=$x(t,e);if(n)return n(t,e);var{base:r,sup:o,sub:l}=t,h=Zt(r,e),c,p,v=e.fontMetrics(),b=0,g=0,m=r&&wt.isCharacterBox(r);if(o){var x=e.havingStyle(e.style.sup());c=Zt(o,x,e),m||(b=h.height-x.fontMetrics().supDrop*x.sizeMultiplier/e.sizeMultiplier)}if(l){var w=e.havingStyle(e.style.sub());p=Zt(l,w,e),m||(g=h.depth+w.fontMetrics().subDrop*w.sizeMultiplier/e.sizeMultiplier)}var S;e.style===Tt.DISPLAY?S=v.sup1:e.style.cramped?S=v.sup3:S=v.sup2;var k=e.sizeMultiplier,C=at(.5/v.ptPerEm/k),T=null;if(p){var A=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(h instanceof si||A)&&(T=at(-h.italic))}var M;if(c&&p){b=Math.max(b,S,c.depth+.25*v.xHeight),g=Math.max(g,v.sub2);var y=v.defaultRuleThickness,N=4*y;if(b-c.depth-(p.height-g)<N){g=N-(b-c.depth)+p.height;var z=.8*v.xHeight-(b-c.depth);z>0&&(b+=z,g-=z)}var F=[{type:"elem",elem:p,shift:g,marginRight:C,marginLeft:T},{type:"elem",elem:c,shift:-b,marginRight:C}];M=Se.makeVList({positionType:"individualShift",children:F},e)}else if(p){g=Math.max(g,v.sub1,p.height-.8*v.xHeight);var P=[{type:"elem",elem:p,marginLeft:T,marginRight:C}];M=Se.makeVList({positionType:"shift",positionData:g,children:P},e)}else if(c)b=Math.max(b,S,c.depth+.25*v.xHeight),M=Se.makeVList({positionType:"shift",positionData:-b,children:[{type:"elem",elem:c,marginRight:C}]},e);else throw new Error("supsub must have either sup or sub.");var Y=rp(h,"right")||"mord";return Se.makeSpan([Y],[h,Se.makeSpan(["msupsub"],[M])],e)},mathmlBuilder(t,e){var n=!1,r,o;t.base&&t.base.type==="horizBrace"&&(o=!!t.sup,o===t.base.isOver&&(n=!0,r=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var l=[vn(t.base,e)];t.sub&&l.push(vn(t.sub,e)),t.sup&&l.push(vn(t.sup,e));var h;if(n)h=r?"mover":"munder";else if(t.sub)if(t.sup){var c=t.base;c&&c.type==="op"&&c.limits&&e.style===Tt.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===Tt.DISPLAY||c.limits)?h="munderover":h="msubsup"}else{var p=t.base;p&&p.type==="op"&&p.limits&&(e.style===Tt.DISPLAY||p.alwaysHandleSupSub)||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(p.limits||e.style===Tt.DISPLAY)?h="munder":h="msub"}else{var v=t.base;v&&v.type==="op"&&v.limits&&(e.style===Tt.DISPLAY||v.alwaysHandleSupSub)||v&&v.type==="operatorname"&&v.alwaysHandleSupSub&&(v.limits||e.style===Tt.DISPLAY)?h="mover":h="msup"}return new Ze.MathNode(h,l)}});Fo({type:"atom",htmlBuilder(t,e){return Se.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var n=new Ze.MathNode("mo",[li(t.text,t.mode)]);if(t.family==="bin"){var r=Lf(t,e);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else t.family==="punct"?n.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&n.setAttribute("stretchy","false");return n}});var Y6={mi:"italic",mn:"normal",mtext:"normal"};Fo({type:"mathord",htmlBuilder(t,e){return Se.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var n=new Ze.MathNode("mi",[li(t.text,t.mode,e)]),r=Lf(t,e)||"italic";return r!==Y6[n.type]&&n.setAttribute("mathvariant",r),n}});Fo({type:"textord",htmlBuilder(t,e){return Se.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var n=li(t.text,t.mode,e),r=Lf(t,e)||"normal",o;return t.mode==="text"?o=new Ze.MathNode("mtext",[n]):/[0-9]/.test(t.text)?o=new Ze.MathNode("mn",[n]):t.text==="\\prime"?o=new Ze.MathNode("mo",[n]):o=new Ze.MathNode("mi",[n]),r!==Y6[o.type]&&o.setAttribute("mathvariant",r),o}});var oh={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},sh={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Fo({type:"spacing",htmlBuilder(t,e){if(sh.hasOwnProperty(t.text)){var n=sh[t.text].className||"";if(t.mode==="text"){var r=Se.makeOrd(t,e,"textord");return r.classes.push(n),r}else return Se.makeSpan(["mspace",n],[Se.mathsym(t.text,t.mode,e)],e)}else{if(oh.hasOwnProperty(t.text))return Se.makeSpan(["mspace",oh[t.text]],[],e);throw new et('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var n;if(sh.hasOwnProperty(t.text))n=new Ze.MathNode("mtext",[new Ze.TextNode(" ")]);else{if(oh.hasOwnProperty(t.text))return new Ze.MathNode("mspace");throw new et('Unknown type of space "'+t.text+'"')}return n}});var Jm=()=>{var t=new Ze.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};Fo({type:"tag",mathmlBuilder(t,e){var n=new Ze.MathNode("mtable",[new Ze.MathNode("mtr",[Jm(),new Ze.MathNode("mtd",[eo(t.body,e)]),Jm(),new Ze.MathNode("mtd",[eo(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var Qm={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},eg={"\\textbf":"textbf","\\textmd":"textmd"},Ux={"\\textit":"textit","\\textup":"textup"},tg=(t,e)=>{var n=t.font;if(n){if(Qm[n])return e.withTextFontFamily(Qm[n]);if(eg[n])return e.withTextFontWeight(eg[n]);if(n==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(Ux[n])};dt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"text",mode:n.mode,body:Fn(o),font:r}},htmlBuilder(t,e){var n=tg(t,e),r=Jn(t.body,n,!0);return Se.makeSpan(["mord","text"],r,n)},mathmlBuilder(t,e){var n=tg(t,e);return eo(t.body,n)}});dt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"underline",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Zt(t.body,e),r=Se.makeLineSpan("underline-line",e),o=e.fontMetrics().defaultRuleThickness,l=Se.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:o},{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n}]},e);return Se.makeSpan(["mord","underline"],[l],e)},mathmlBuilder(t,e){var n=new Ze.MathNode("mo",[new Ze.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ze.MathNode("munder",[vn(t.body,e),n]);return r.setAttribute("accentunder","true"),r}});dt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"vcenter",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Zt(t.body,e),r=e.fontMetrics().axisHeight,o=.5*(n.height-r-(n.depth+r));return Se.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){return new Ze.MathNode("mpadded",[vn(t.body,e)],["vcenter"])}});dt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,n){throw new et("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var n=ng(t),r=[],o=e.havingStyle(e.style.text()),l=0;l<n.length;l++){var h=n[l];h==="~"&&(h="\\textasciitilde"),r.push(Se.makeSymbol(h,"Typewriter-Regular",t.mode,o,["mord","texttt"]))}return Se.makeSpan(["mord","text"].concat(o.sizingClasses(e)),Se.tryCombineChars(r),o)},mathmlBuilder(t,e){var n=new Ze.TextNode(ng(t)),r=new Ze.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var ng=t=>t.body.replace(/ /g,t.star?"␣":" "),Wa=w6,J6=`[ \r
]`,Vx="\\\\[a-zA-Z@]+",Wx="\\\\[^\uD800-\uDFFF]",Gx="("+Vx+")"+J6+"*",Kx=`\\\\(
|[ \r ]+
?)[ \r ]*`,sp="[̀-ͯ]",Xx=new RegExp(sp+"+$"),Zx="("+J6+"+)|"+(Kx+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(sp+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(sp+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Gx)+("|"+Wx+")");class rg{constructor(e,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=n,this.tokenRegex=new RegExp(Zx,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,n){this.catcodes[e]=n}lex(){var e=this.input,n=this.tokenRegex.lastIndex;if(n===e.length)return new ii("EOF",new jr(this,n,n));var r=this.tokenRegex.exec(e);if(r===null||r.index!==n)throw new et("Unexpected character: '"+e[n]+"'",new ii(e[n],new jr(this,n,n+1)));var o=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[o]===14){var l=e.indexOf(`
`,this.tokenRegex.lastIndex);return l===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=l+1,this.lex()}return new ii(o,new jr(this,n,this.tokenRegex.lastIndex))}}class Yx{constructor(e,n){e===void 0&&(e={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new et("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var n in e)e.hasOwnProperty(n)&&(e[n]==null?delete this.current[n]:this.current[n]=e[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,n,r){if(r===void 0&&(r=!1),r){for(var o=0;o<this.undefStack.length;o++)delete this.undefStack[o][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=n)}else{var l=this.undefStack[this.undefStack.length-1];l&&!l.hasOwnProperty(e)&&(l[e]=this.current[e])}n==null?delete this.current[e]:this.current[e]=n}}var Jx=q6;V("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});V("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});V("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});V("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});V("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var n=t.future();return e[0].length===1&&e[0][0].text===n.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});V("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");V("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var ig={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};V("\\char",function(t){var e=t.popToken(),n,r="";if(e.text==="'")n=8,e=t.popToken();else if(e.text==='"')n=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")r=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new et("\\char` missing argument");r=e.text.charCodeAt(0)}else n=10;if(n){if(r=ig[e.text],r==null||r>=n)throw new et("Invalid base-"+n+" digit "+e.text);for(var o;(o=ig[t.future().text])!=null&&o<n;)r*=n,r+=o,t.popToken()}return"\\@char{"+r+"}"});var Bf=(t,e,n,r)=>{var o=t.consumeArg().tokens;if(o.length!==1)throw new et("\\newcommand's first argument must be a macro name");var l=o[0].text,h=t.isDefined(l);if(h&&!e)throw new et("\\newcommand{"+l+"} attempting to redefine "+(l+"; use \\renewcommand"));if(!h&&!n)throw new et("\\renewcommand{"+l+"} when command "+l+" does not yet exist; use \\newcommand");var c=0;if(o=t.consumeArg().tokens,o.length===1&&o[0].text==="["){for(var p="",v=t.expandNextToken();v.text!=="]"&&v.text!=="EOF";)p+=v.text,v=t.expandNextToken();if(!p.match(/^\s*[0-9]+\s*$/))throw new et("Invalid number of arguments: "+p);c=parseInt(p),o=t.consumeArg().tokens}return h&&r||t.macros.set(l,{tokens:o,numArgs:c}),""};V("\\newcommand",t=>Bf(t,!1,!0,!1));V("\\renewcommand",t=>Bf(t,!0,!1,!1));V("\\providecommand",t=>Bf(t,!0,!0,!0));V("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(n=>n.text).join("")),""});V("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(n=>n.text).join("")),""});V("\\show",t=>{var e=t.popToken(),n=e.text;return console.log(e,t.macros.get(n),Wa[n],wn.math[n],wn.text[n]),""});V("\\bgroup","{");V("\\egroup","}");V("~","\\nobreakspace");V("\\lq","`");V("\\rq","'");V("\\aa","\\r a");V("\\AA","\\r A");V("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");V("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");V("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");V("","\\mathscr{B}");V("","\\mathscr{E}");V("","\\mathscr{F}");V("","\\mathscr{H}");V("","\\mathscr{I}");V("","\\mathscr{L}");V("","\\mathscr{M}");V("","\\mathscr{R}");V("","\\mathfrak{C}");V("","\\mathfrak{H}");V("","\\mathfrak{Z}");V("\\Bbbk","\\Bbb{k}");V("·","\\cdotp");V("\\llap","\\mathllap{\\textrm{#1}}");V("\\rlap","\\mathrlap{\\textrm{#1}}");V("\\clap","\\mathclap{\\textrm{#1}}");V("\\mathstrut","\\vphantom{(}");V("\\underbar","\\underline{\\text{#1}}");V("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');V("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");V("\\ne","\\neq");V("≠","\\neq");V("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");V("∉","\\notin");V("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");V("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");V("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");V("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");V("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");V("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");V("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");V("⟂","\\perp");V("‼","\\mathclose{!\\mkern-0.8mu!}");V("∌","\\notni");V("⌜","\\ulcorner");V("⌝","\\urcorner");V("⌞","\\llcorner");V("⌟","\\lrcorner");V("©","\\copyright");V("®","\\textregistered");V("","\\textregistered");V("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');V("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');V("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');V("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');V("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");V("⋮","\\vdots");V("\\varGamma","\\mathit{\\Gamma}");V("\\varDelta","\\mathit{\\Delta}");V("\\varTheta","\\mathit{\\Theta}");V("\\varLambda","\\mathit{\\Lambda}");V("\\varXi","\\mathit{\\Xi}");V("\\varPi","\\mathit{\\Pi}");V("\\varSigma","\\mathit{\\Sigma}");V("\\varUpsilon","\\mathit{\\Upsilon}");V("\\varPhi","\\mathit{\\Phi}");V("\\varPsi","\\mathit{\\Psi}");V("\\varOmega","\\mathit{\\Omega}");V("\\substack","\\begin{subarray}{c}#1\\end{subarray}");V("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");V("\\boxed","\\fbox{$\\displaystyle{#1}$}");V("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");V("\\implies","\\DOTSB\\;\\Longrightarrow\\;");V("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");V("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");V("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var ag={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};V("\\dots",function(t){var e="\\dotso",n=t.expandAfterFuture().text;return n in ag?e=ag[n]:(n.slice(0,4)==="\\not"||n in wn.math&&wt.contains(["bin","rel"],wn.math[n].group))&&(e="\\dotsb"),e});var Ff={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};V("\\dotso",function(t){var e=t.future().text;return e in Ff?"\\ldots\\,":"\\ldots"});V("\\dotsc",function(t){var e=t.future().text;return e in Ff&&e!==","?"\\ldots\\,":"\\ldots"});V("\\cdots",function(t){var e=t.future().text;return e in Ff?"\\@cdots\\,":"\\@cdots"});V("\\dotsb","\\cdots");V("\\dotsm","\\cdots");V("\\dotsi","\\!\\cdots");V("\\dotsx","\\ldots\\,");V("\\DOTSI","\\relax");V("\\DOTSB","\\relax");V("\\DOTSX","\\relax");V("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");V("\\,","\\tmspace+{3mu}{.1667em}");V("\\thinspace","\\,");V("\\>","\\mskip{4mu}");V("\\:","\\tmspace+{4mu}{.2222em}");V("\\medspace","\\:");V("\\;","\\tmspace+{5mu}{.2777em}");V("\\thickspace","\\;");V("\\!","\\tmspace-{3mu}{.1667em}");V("\\negthinspace","\\!");V("\\negmedspace","\\tmspace-{4mu}{.2222em}");V("\\negthickspace","\\tmspace-{5mu}{.277em}");V("\\enspace","\\kern.5em ");V("\\enskip","\\hskip.5em\\relax");V("\\quad","\\hskip1em\\relax");V("\\qquad","\\hskip2em\\relax");V("\\tag","\\@ifstar\\tag@literal\\tag@paren");V("\\tag@paren","\\tag@literal{({#1})}");V("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new et("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});V("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");V("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");V("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");V("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");V("\\newline","\\\\\\relax");V("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Q6=at(Fi["Main-Regular"]["T".charCodeAt(0)][1]-.7*Fi["Main-Regular"]["A".charCodeAt(0)][1]);V("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Q6+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");V("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Q6+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");V("\\hspace","\\@ifstar\\@hspacer\\@hspace");V("\\@hspace","\\hskip #1\\relax");V("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");V("\\ordinarycolon",":");V("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");V("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');V("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');V("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');V("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');V("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');V("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');V("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');V("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');V("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');V("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');V("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');V("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');V("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');V("∷","\\dblcolon");V("∹","\\eqcolon");V("≔","\\coloneqq");V("≕","\\eqqcolon");V("⩴","\\Coloneqq");V("\\ratio","\\vcentcolon");V("\\coloncolon","\\dblcolon");V("\\colonequals","\\coloneqq");V("\\coloncolonequals","\\Coloneqq");V("\\equalscolon","\\eqqcolon");V("\\equalscoloncolon","\\Eqqcolon");V("\\colonminus","\\coloneq");V("\\coloncolonminus","\\Coloneq");V("\\minuscolon","\\eqcolon");V("\\minuscoloncolon","\\Eqcolon");V("\\coloncolonapprox","\\Colonapprox");V("\\coloncolonsim","\\Colonsim");V("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");V("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");V("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");V("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");V("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");V("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");V("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");V("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");V("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");V("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");V("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");V("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");V("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");V("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");V("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");V("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");V("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");V("\\nleqq","\\html@mathml{\\@nleqq}{≰}");V("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");V("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");V("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");V("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");V("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");V("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");V("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");V("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");V("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");V("\\imath","\\html@mathml{\\@imath}{ı}");V("\\jmath","\\html@mathml{\\@jmath}{ȷ}");V("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");V("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");V("⟦","\\llbracket");V("⟧","\\rrbracket");V("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");V("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");V("⦃","\\lBrace");V("⦄","\\rBrace");V("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");V("⦵","\\minuso");V("\\darr","\\downarrow");V("\\dArr","\\Downarrow");V("\\Darr","\\Downarrow");V("\\lang","\\langle");V("\\rang","\\rangle");V("\\uarr","\\uparrow");V("\\uArr","\\Uparrow");V("\\Uarr","\\Uparrow");V("\\N","\\mathbb{N}");V("\\R","\\mathbb{R}");V("\\Z","\\mathbb{Z}");V("\\alef","\\aleph");V("\\alefsym","\\aleph");V("\\Alpha","\\mathrm{A}");V("\\Beta","\\mathrm{B}");V("\\bull","\\bullet");V("\\Chi","\\mathrm{X}");V("\\clubs","\\clubsuit");V("\\cnums","\\mathbb{C}");V("\\Complex","\\mathbb{C}");V("\\Dagger","\\ddagger");V("\\diamonds","\\diamondsuit");V("\\empty","\\emptyset");V("\\Epsilon","\\mathrm{E}");V("\\Eta","\\mathrm{H}");V("\\exist","\\exists");V("\\harr","\\leftrightarrow");V("\\hArr","\\Leftrightarrow");V("\\Harr","\\Leftrightarrow");V("\\hearts","\\heartsuit");V("\\image","\\Im");V("\\infin","\\infty");V("\\Iota","\\mathrm{I}");V("\\isin","\\in");V("\\Kappa","\\mathrm{K}");V("\\larr","\\leftarrow");V("\\lArr","\\Leftarrow");V("\\Larr","\\Leftarrow");V("\\lrarr","\\leftrightarrow");V("\\lrArr","\\Leftrightarrow");V("\\Lrarr","\\Leftrightarrow");V("\\Mu","\\mathrm{M}");V("\\natnums","\\mathbb{N}");V("\\Nu","\\mathrm{N}");V("\\Omicron","\\mathrm{O}");V("\\plusmn","\\pm");V("\\rarr","\\rightarrow");V("\\rArr","\\Rightarrow");V("\\Rarr","\\Rightarrow");V("\\real","\\Re");V("\\reals","\\mathbb{R}");V("\\Reals","\\mathbb{R}");V("\\Rho","\\mathrm{P}");V("\\sdot","\\cdot");V("\\sect","\\S");V("\\spades","\\spadesuit");V("\\sub","\\subset");V("\\sube","\\subseteq");V("\\supe","\\supseteq");V("\\Tau","\\mathrm{T}");V("\\thetasym","\\vartheta");V("\\weierp","\\wp");V("\\Zeta","\\mathrm{Z}");V("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");V("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");V("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");V("\\bra","\\mathinner{\\langle{#1}|}");V("\\ket","\\mathinner{|{#1}\\rangle}");V("\\braket","\\mathinner{\\langle{#1}\\rangle}");V("\\Bra","\\left\\langle#1\\right|");V("\\Ket","\\left|#1\\right\\rangle");var e3=t=>e=>{var n=e.consumeArg().tokens,r=e.consumeArg().tokens,o=e.consumeArg().tokens,l=e.consumeArg().tokens,h=e.macros.get("|"),c=e.macros.get("\\|");e.macros.beginGroup();var p=g=>m=>{t&&(m.macros.set("|",h),o.length&&m.macros.set("\\|",c));var x=g;if(!g&&o.length){var w=m.future();w.text==="|"&&(m.popToken(),x=!0)}return{tokens:x?o:r,numArgs:0}};e.macros.set("|",p(!1)),o.length&&e.macros.set("\\|",p(!0));var v=e.consumeArg().tokens,b=e.expandTokens([...l,...v,...n]);return e.macros.endGroup(),{tokens:b.reverse(),numArgs:0}};V("\\bra@ket",e3(!1));V("\\bra@set",e3(!0));V("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");V("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");V("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");V("\\angln","{\\angl n}");V("\\blue","\\textcolor{##6495ed}{#1}");V("\\orange","\\textcolor{##ffa500}{#1}");V("\\pink","\\textcolor{##ff00af}{#1}");V("\\red","\\textcolor{##df0030}{#1}");V("\\green","\\textcolor{##28ae7b}{#1}");V("\\gray","\\textcolor{gray}{#1}");V("\\purple","\\textcolor{##9d38bd}{#1}");V("\\blueA","\\textcolor{##ccfaff}{#1}");V("\\blueB","\\textcolor{##80f6ff}{#1}");V("\\blueC","\\textcolor{##63d9ea}{#1}");V("\\blueD","\\textcolor{##11accd}{#1}");V("\\blueE","\\textcolor{##0c7f99}{#1}");V("\\tealA","\\textcolor{##94fff5}{#1}");V("\\tealB","\\textcolor{##26edd5}{#1}");V("\\tealC","\\textcolor{##01d1c1}{#1}");V("\\tealD","\\textcolor{##01a995}{#1}");V("\\tealE","\\textcolor{##208170}{#1}");V("\\greenA","\\textcolor{##b6ffb0}{#1}");V("\\greenB","\\textcolor{##8af281}{#1}");V("\\greenC","\\textcolor{##74cf70}{#1}");V("\\greenD","\\textcolor{##1fab54}{#1}");V("\\greenE","\\textcolor{##0d923f}{#1}");V("\\goldA","\\textcolor{##ffd0a9}{#1}");V("\\goldB","\\textcolor{##ffbb71}{#1}");V("\\goldC","\\textcolor{##ff9c39}{#1}");V("\\goldD","\\textcolor{##e07d10}{#1}");V("\\goldE","\\textcolor{##a75a05}{#1}");V("\\redA","\\textcolor{##fca9a9}{#1}");V("\\redB","\\textcolor{##ff8482}{#1}");V("\\redC","\\textcolor{##f9685d}{#1}");V("\\redD","\\textcolor{##e84d39}{#1}");V("\\redE","\\textcolor{##bc2612}{#1}");V("\\maroonA","\\textcolor{##ffbde0}{#1}");V("\\maroonB","\\textcolor{##ff92c6}{#1}");V("\\maroonC","\\textcolor{##ed5fa6}{#1}");V("\\maroonD","\\textcolor{##ca337c}{#1}");V("\\maroonE","\\textcolor{##9e034e}{#1}");V("\\purpleA","\\textcolor{##ddd7ff}{#1}");V("\\purpleB","\\textcolor{##c6b9fc}{#1}");V("\\purpleC","\\textcolor{##aa87ff}{#1}");V("\\purpleD","\\textcolor{##7854ab}{#1}");V("\\purpleE","\\textcolor{##543b78}{#1}");V("\\mintA","\\textcolor{##f5f9e8}{#1}");V("\\mintB","\\textcolor{##edf2df}{#1}");V("\\mintC","\\textcolor{##e0e5cc}{#1}");V("\\grayA","\\textcolor{##f6f7f7}{#1}");V("\\grayB","\\textcolor{##f0f1f2}{#1}");V("\\grayC","\\textcolor{##e3e5e6}{#1}");V("\\grayD","\\textcolor{##d6d8da}{#1}");V("\\grayE","\\textcolor{##babec2}{#1}");V("\\grayF","\\textcolor{##888d93}{#1}");V("\\grayG","\\textcolor{##626569}{#1}");V("\\grayH","\\textcolor{##3b3e40}{#1}");V("\\grayI","\\textcolor{##21242c}{#1}");V("\\kaBlue","\\textcolor{##314453}{#1}");V("\\kaGreen","\\textcolor{##71B307}{#1}");var t3={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Qx{constructor(e,n,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(e),this.macros=new Yx(Jx,n.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new rg(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var n,r,o;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:o,end:r}=this.consumeArg(["]"])}else({tokens:o,start:n,end:r}=this.consumeArg());return this.pushToken(new ii("EOF",r.loc)),this.pushTokens(o),n.range(r,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var n=[],r=e&&e.length>0;r||this.consumeSpaces();var o=this.future(),l,h=0,c=0;do{if(l=this.popToken(),n.push(l),l.text==="{")++h;else if(l.text==="}"){if(--h,h===-1)throw new et("Extra }",l)}else if(l.text==="EOF")throw new et("Unexpected end of input in a macro argument, expected '"+(e&&r?e[c]:"}")+"'",l);if(e&&r)if((h===0||h===1&&e[c]==="{")&&l.text===e[c]){if(++c,c===e.length){n.splice(-c,c);break}}else c=0}while(h!==0||r);return o.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:o,end:l}}consumeArgs(e,n){if(n){if(n.length!==e+1)throw new et("The length of delimiters doesn't match the number of args!");for(var r=n[0],o=0;o<r.length;o++){var l=this.popToken();if(r[o]!==l.text)throw new et("Use of the macro doesn't match its definition",l)}}for(var h=[],c=0;c<e;c++)h.push(this.consumeArg(n&&n[c+1]).tokens);return h}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new et("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var n=this.popToken(),r=n.text,o=n.noexpand?null:this._getExpansion(r);if(o==null||e&&o.unexpandable){if(e&&o==null&&r[0]==="\\"&&!this.isDefined(r))throw new et("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var l=o.tokens,h=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs){l=l.slice();for(var c=l.length-1;c>=0;--c){var p=l[c];if(p.text==="#"){if(c===0)throw new et("Incomplete placeholder at end of macro body",p);if(p=l[--c],p.text==="#")l.splice(c+1,1);else if(/^[1-9]$/.test(p.text))l.splice(c,2,...h[+p.text-1]);else throw new et("Not a valid argument number",p)}}}return this.pushTokens(l),l.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ii(e)]):void 0}expandTokens(e){var n=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(this.expandOnce(!0)===!1){var o=this.stack.pop();o.treatAsRelax&&(o.noexpand=!1,o.treatAsRelax=!1),n.push(o)}return this.countExpansion(n.length),n}expandMacroAsText(e){var n=this.expandMacro(e);return n&&n.map(r=>r.text).join("")}_getExpansion(e){var n=this.macros.get(e);if(n==null)return n;if(e.length===1){var r=this.lexer.catcodes[e];if(r!=null&&r!==13)return}var o=typeof n=="function"?n(this):n;if(typeof o=="string"){var l=0;if(o.indexOf("#")!==-1)for(var h=o.replace(/##/g,"");h.indexOf("#"+(l+1))!==-1;)++l;for(var c=new rg(o,this.settings),p=[],v=c.lex();v.text!=="EOF";)p.push(v),v=c.lex();p.reverse();var b={tokens:p,numArgs:l};return b}return o}isDefined(e){return this.macros.has(e)||Wa.hasOwnProperty(e)||wn.math.hasOwnProperty(e)||wn.text.hasOwnProperty(e)||t3.hasOwnProperty(e)}isExpandable(e){var n=this.macros.get(e);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Wa.hasOwnProperty(e)&&!Wa[e].primitive}}var og=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,b0=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),lh={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},sg={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Zc{constructor(e,n){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Qx(e,n,this.mode),this.settings=n,this.leftrightDepth=0}expect(e,n){if(n===void 0&&(n=!0),this.fetch().text!==e)throw new et("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var n=this.nextToken;this.consume(),this.gullet.pushToken(new ii("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(e,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var o=this.fetch();if(Zc.endOfExpression.indexOf(o.text)!==-1||n&&o.text===n||e&&Wa[o.text]&&Wa[o.text].infix)break;var l=this.parseAtom(n);if(l){if(l.type==="internal")continue}else break;r.push(l)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var n=-1,r,o=0;o<e.length;o++)if(e[o].type==="infix"){if(n!==-1)throw new et("only one infix operator per group",e[o].token);n=o,r=e[o].replaceWith}if(n!==-1&&r){var l,h,c=e.slice(0,n),p=e.slice(n+1);c.length===1&&c[0].type==="ordgroup"?l=c[0]:l={type:"ordgroup",mode:this.mode,body:c},p.length===1&&p[0].type==="ordgroup"?h=p[0]:h={type:"ordgroup",mode:this.mode,body:p};var v;return r==="\\\\abovefrac"?v=this.callFunction(r,[l,e[n],h],[]):v=this.callFunction(r,[l,h],[]),[v]}else return e}handleSupSubscript(e){var n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();var o;do{var l;o=this.parseGroup(e)}while(((l=o)==null?void 0:l.type)==="internal");if(!o)throw new et("Expected group after '"+r+"'",n);return o}formatUnsupportedCmd(e){for(var n=[],r=0;r<e.length;r++)n.push({type:"textord",mode:"text",text:e[r]});var o={type:"text",mode:this.mode,body:n},l={type:"color",mode:this.mode,color:this.settings.errorColor,body:[o]};return l}parseAtom(e){var n=this.parseGroup("atom",e);if((n==null?void 0:n.type)==="internal"||this.mode==="text")return n;for(var r,o;;){this.consumeSpaces();var l=this.fetch();if(l.text==="\\limits"||l.text==="\\nolimits"){if(n&&n.type==="op"){var h=l.text==="\\limits";n.limits=h,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=l.text==="\\limits");else throw new et("Limit controls must follow a math operator",l);this.consume()}else if(l.text==="^"){if(r)throw new et("Double superscript",l);r=this.handleSupSubscript("superscript")}else if(l.text==="_"){if(o)throw new et("Double subscript",l);o=this.handleSupSubscript("subscript")}else if(l.text==="'"){if(r)throw new et("Double superscript",l);var c={type:"textord",mode:this.mode,text:"\\prime"},p=[c];for(this.consume();this.fetch().text==="'";)p.push(c),this.consume();this.fetch().text==="^"&&p.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:p}}else if(b0[l.text]){var v=og.test(l.text),b=[];for(b.push(new ii(b0[l.text])),this.consume();;){var g=this.fetch().text;if(!b0[g]||og.test(g)!==v)break;b.unshift(new ii(b0[g])),this.consume()}var m=this.subparse(b);v?o={type:"ordgroup",mode:"math",body:m}:r={type:"ordgroup",mode:"math",body:m}}else break}return r||o?{type:"supsub",mode:this.mode,base:n,sup:r,sub:o}:n}parseFunction(e,n){var r=this.fetch(),o=r.text,l=Wa[o];if(!l)return null;if(this.consume(),n&&n!=="atom"&&!l.allowedInArgument)throw new et("Got function '"+o+"' with no arguments"+(n?" as "+n:""),r);if(this.mode==="text"&&!l.allowedInText)throw new et("Can't use function '"+o+"' in text mode",r);if(this.mode==="math"&&l.allowedInMath===!1)throw new et("Can't use function '"+o+"' in math mode",r);var{args:h,optArgs:c}=this.parseArguments(o,l);return this.callFunction(o,h,c,r,e)}callFunction(e,n,r,o,l){var h={funcName:e,parser:this,token:o,breakOnTokenText:l},c=Wa[e];if(c&&c.handler)return c.handler(h,n,r);throw new et("No function handler for "+e)}parseArguments(e,n){var r=n.numArgs+n.numOptionalArgs;if(r===0)return{args:[],optArgs:[]};for(var o=[],l=[],h=0;h<r;h++){var c=n.argTypes&&n.argTypes[h],p=h<n.numOptionalArgs;(n.primitive&&c==null||n.type==="sqrt"&&h===1&&l[0]==null)&&(c="primitive");var v=this.parseGroupOfType("argument to '"+e+"'",c,p);if(p)l.push(v);else if(v!=null)o.push(v);else throw new et("Null argument, please report this as a bug")}return{args:o,optArgs:l}}parseGroupOfType(e,n,r){switch(n){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,n);case"hbox":{var o=this.parseArgumentGroup(r,"text");return o!=null?{type:"styling",mode:o.mode,body:[o],style:"text"}:null}case"raw":{var l=this.parseStringGroup("raw",r);return l!=null?{type:"raw",mode:"text",string:l.text}:null}case"primitive":{if(r)throw new et("A primitive argument cannot be optional");var h=this.parseGroup(e);if(h==null)throw new et("Expected group as "+e,this.fetch());return h}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new et("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,n){var r=this.gullet.scanArgument(n);if(r==null)return null;for(var o="",l;(l=this.fetch()).text!=="EOF";)o+=l.text,this.consume();return this.consume(),r.text=o,r}parseRegexGroup(e,n){for(var r=this.fetch(),o=r,l="",h;(h=this.fetch()).text!=="EOF"&&e.test(l+h.text);)o=h,l+=o.text,this.consume();if(l==="")throw new et("Invalid "+n+": '"+r.text+"'",r);return r.range(o,l)}parseColorGroup(e){var n=this.parseStringGroup("color",e);if(n==null)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!r)throw new et("Invalid color: '"+n.text+"'",n);var o=r[0];return/^[0-9a-f]{6}$/i.test(o)&&(o="#"+o),{type:"color-token",mode:this.mode,color:o}}parseSizeGroup(e){var n,r=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?n=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):n=this.parseStringGroup("size",e),!n)return null;!e&&n.text.length===0&&(n.text="0pt",r=!0);var o=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!o)throw new et("Invalid size: '"+n.text+"'",n);var l={number:+(o[1]+o[2]),unit:o[3]};if(!d6(l))throw new et("Invalid unit: '"+l.unit+"'",n);return{type:"size",mode:this.mode,value:l,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var n=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),n==null)return null;var r=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,n){var r=this.gullet.scanArgument(e);if(r==null)return null;var o=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var l=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var h={type:"ordgroup",mode:this.mode,loc:r.loc,body:l};return n&&this.switchMode(o),h}parseGroup(e,n){var r=this.fetch(),o=r.text,l;if(o==="{"||o==="\\begingroup"){this.consume();var h=o==="{"?"}":"\\endgroup";this.gullet.beginGroup();var c=this.parseExpression(!1,h),p=this.fetch();this.expect(h),this.gullet.endGroup(),l={type:"ordgroup",mode:this.mode,loc:jr.range(r,p),body:c,semisimple:o==="\\begingroup"||void 0}}else if(l=this.parseFunction(n,e)||this.parseSymbol(),l==null&&o[0]==="\\"&&!t3.hasOwnProperty(o)){if(this.settings.throwOnError)throw new et("Undefined control sequence: "+o,r);l=this.formatUnsupportedCmd(o),this.consume()}return l}formLigatures(e){for(var n=e.length-1,r=0;r<n;++r){var o=e[r],l=o.text;l==="-"&&e[r+1].text==="-"&&(r+1<n&&e[r+2].text==="-"?(e.splice(r,3,{type:"textord",mode:"text",loc:jr.range(o,e[r+2]),text:"---"}),n-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:jr.range(o,e[r+1]),text:"--"}),n-=1)),(l==="'"||l==="`")&&e[r+1].text===l&&(e.splice(r,2,{type:"textord",mode:"text",loc:jr.range(o,e[r+1]),text:l+l}),n-=1)}}parseSymbol(){var e=this.fetch(),n=e.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var r=n.slice(5),o=r.charAt(0)==="*";if(o&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new et(`\\verb assertion failed --
please report what input caused this bug`);return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:o}}sg.hasOwnProperty(n[0])&&!wn[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',e),n=sg[n[0]]+n.slice(1));var l=Xx.exec(n);l&&(n=n.substring(0,l.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var h;if(wn[this.mode][n]){this.settings.strict&&this.mode==="math"&&np.indexOf(n)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',e);var c=wn[this.mode][n].group,p=jr.range(e),v;if(q9.hasOwnProperty(c)){var b=c;v={type:"atom",mode:this.mode,family:b,loc:p,text:n}}else v={type:c,mode:this.mode,loc:p,text:n};h=v}else if(n.charCodeAt(0)>=128)this.settings.strict&&(u6(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),e)),h={type:"textord",mode:"text",loc:jr.range(e),text:n};else return null;if(this.consume(),l)for(var g=0;g<l[0].length;g++){var m=l[0][g];if(!lh[m])throw new et("Unknown accent ' "+m+"'",e);var x=lh[m][this.mode]||lh[m].text;if(!x)throw new et("Accent "+m+" unsupported in "+this.mode+" mode",e);h={type:"accent",mode:this.mode,loc:jr.range(e),label:x,isStretchy:!1,isShifty:!0,base:h}}return h}}Zc.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var qf=function(t,e){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Zc(t,e);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!e.displayMode)throw new et("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new ii("\\df@tag")])}]}return r},n3=function(t,e,n){e.textContent="";var r=jf(t,n).toNode();e.appendChild(r)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),n3=function(){throw new et("KaTeX doesn't work in quirks mode.")});var ek=function(t,e){var n=jf(t,e).toMarkup();return n},tk=function(t,e){var n=new Sf(e);return qf(t,n)},r3=function(t,e,n){if(n.throwOnError||!(t instanceof et))throw t;var r=Se.makeSpan(["katex-error"],[new si(e)]);return r.setAttribute("title",t.toString()),r.setAttribute("style","color:"+n.errorColor),r},jf=function(t,e){var n=new Sf(e);try{var r=qf(t,n);return ux(r,t,n)}catch(o){return r3(o,t,n)}},nk=function(t,e){var n=new Sf(e);try{var r=qf(t,n);return dx(r,t,n)}catch(o){return r3(o,t,n)}},rk="0.16.22",ik={Span:Wl,Anchor:Af,SymbolNode:si,SvgNode:Ta,PathNode:Qa,LineNode:tp},lg={version:rk,render:n3,renderToString:ek,ParseError:et,SETTINGS_SCHEMA:H0,__parse:tk,__renderToDomTree:jf,__renderToHTMLTree:nk,__setFontMetrics:R9,__defineSymbol:R,__defineFunction:dt,__defineMacro:V,__domTree:ik},i3={exports:{}};/*!
* Vditor v3.11.2 - A markdown editor written in TypeScript.
*
* MIT License
*
* Copyright (c) 2018-present B3log 开源, b3log.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/(function(t,e){(function(n,r){t.exports=r()})(Jh,function(){return(()=>{var n={173:h=>{var c=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},p=-1,v=1,b=0;c.Diff=function(g,m){return[g,m]},c.prototype.diff_main=function(g,m,x,w){typeof w>"u"&&(this.Diff_Timeout<=0?w=Number.MAX_VALUE:w=new Date().getTime()+this.Diff_Timeout*1e3);var S=w;if(g==null||m==null)throw new Error("Null input. (diff_main)");if(g==m)return g?[new c.Diff(b,g)]:[];typeof x>"u"&&(x=!0);var k=x,C=this.diff_commonPrefix(g,m),T=g.substring(0,C);g=g.substring(C),m=m.substring(C),C=this.diff_commonSuffix(g,m);var A=g.substring(g.length-C);g=g.substring(0,g.length-C),m=m.substring(0,m.length-C);var M=this.diff_compute_(g,m,k,S);return T&&M.unshift(new c.Diff(b,T)),A&&M.push(new c.Diff(b,A)),this.diff_cleanupMerge(M),M},c.prototype.diff_compute_=function(g,m,x,w){var S;if(!g)return[new c.Diff(v,m)];if(!m)return[new c.Diff(p,g)];var k=g.length>m.length?g:m,C=g.length>m.length?m:g,T=k.indexOf(C);if(T!=-1)return S=[new c.Diff(v,k.substring(0,T)),new c.Diff(b,C),new c.Diff(v,k.substring(T+C.length))],g.length>m.length&&(S[0][0]=S[2][0]=p),S;if(C.length==1)return[new c.Diff(p,g),new c.Diff(v,m)];var A=this.diff_halfMatch_(g,m);if(A){var M=A[0],y=A[1],N=A[2],z=A[3],F=A[4],P=this.diff_main(M,N,x,w),Y=this.diff_main(y,z,x,w);return P.concat([new c.Diff(b,F)],Y)}return x&&g.length>100&&m.length>100?this.diff_lineMode_(g,m,w):this.diff_bisect_(g,m,w)},c.prototype.diff_lineMode_=function(g,m,x){var w=this.diff_linesToChars_(g,m);g=w.chars1,m=w.chars2;var S=w.lineArray,k=this.diff_main(g,m,!1,x);this.diff_charsToLines_(k,S),this.diff_cleanupSemantic(k),k.push(new c.Diff(b,""));for(var C=0,T=0,A=0,M="",y="";C<k.length;){switch(k[C][0]){case v:A++,y+=k[C][1];break;case p:T++,M+=k[C][1];break;case b:if(T>=1&&A>=1){k.splice(C-T-A,T+A),C=C-T-A;for(var N=this.diff_main(M,y,!1,x),z=N.length-1;z>=0;z--)k.splice(C,0,N[z]);C=C+N.length}A=0,T=0,M="",y="";break}C++}return k.pop(),k},c.prototype.diff_bisect_=function(g,m,x){for(var w=g.length,S=m.length,k=Math.ceil((w+S)/2),C=k,T=2*k,A=new Array(T),M=new Array(T),y=0;y<T;y++)A[y]=-1,M[y]=-1;A[C+1]=0,M[C+1]=0;for(var N=w-S,z=N%2!=0,F=0,P=0,Y=0,te=0,ce=0;ce<k&&!(new Date().getTime()>x);ce++){for(var Me=-ce+F;Me<=ce-P;Me+=2){var Fe=C+Me,We;Me==-ce||Me!=ce&&A[Fe-1]<A[Fe+1]?We=A[Fe+1]:We=A[Fe-1]+1;for(var rt=We-Me;We<w&&rt<S&&g.charAt(We)==m.charAt(rt);)We++,rt++;if(A[Fe]=We,We>w)P+=2;else if(rt>S)F+=2;else if(z){var je=C+N-Me;if(je>=0&&je<T&&M[je]!=-1){var Ne=w-M[je];if(We>=Ne)return this.diff_bisectSplit_(g,m,We,rt,x)}}}for(var nt=-ce+Y;nt<=ce-te;nt+=2){var je=C+nt,Ne;nt==-ce||nt!=ce&&M[je-1]<M[je+1]?Ne=M[je+1]:Ne=M[je-1]+1;for(var ct=Ne-nt;Ne<w&&ct<S&&g.charAt(w-Ne-1)==m.charAt(S-ct-1);)Ne++,ct++;if(M[je]=Ne,Ne>w)te+=2;else if(ct>S)Y+=2;else if(!z){var Fe=C+N-nt;if(Fe>=0&&Fe<T&&A[Fe]!=-1){var We=A[Fe],rt=C+We-Fe;if(Ne=w-Ne,We>=Ne)return this.diff_bisectSplit_(g,m,We,rt,x)}}}}return[new c.Diff(p,g),new c.Diff(v,m)]},c.prototype.diff_bisectSplit_=function(g,m,x,w,S){var k=g.substring(0,x),C=m.substring(0,w),T=g.substring(x),A=m.substring(w),M=this.diff_main(k,C,!1,S),y=this.diff_main(T,A,!1,S);return M.concat(y)},c.prototype.diff_linesToChars_=function(g,m){var x=[],w={};x[0]="";function S(A){for(var M="",y=0,N=-1,z=x.length;N<A.length-1;){N=A.indexOf(`
`,y),N==-1&&(N=A.length-1);var F=A.substring(y,N+1);(w.hasOwnProperty?w.hasOwnProperty(F):w[F]!==void 0)?M+=String.fromCharCode(w[F]):(z==k&&(F=A.substring(y),N=A.length),M+=String.fromCharCode(z),w[F]=z,x[z++]=F),y=N+1}return M}var k=4e4,C=S(g);k=65535;var T=S(m);return{chars1:C,chars2:T,lineArray:x}},c.prototype.diff_charsToLines_=function(g,m){for(var x=0;x<g.length;x++){for(var w=g[x][1],S=[],k=0;k<w.length;k++)S[k]=m[w.charCodeAt(k)];g[x][1]=S.join("")}},c.prototype.diff_commonPrefix=function(g,m){if(!g||!m||g.charAt(0)!=m.charAt(0))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(k,S)==m.substring(k,S)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonSuffix=function(g,m){if(!g||!m||g.charAt(g.length-1)!=m.charAt(m.length-1))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(g.length-S,g.length-k)==m.substring(m.length-S,m.length-k)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonOverlap_=function(g,m){var x=g.length,w=m.length;if(x==0||w==0)return 0;x>w?g=g.substring(x-w):x<w&&(m=m.substring(0,x));var S=Math.min(x,w);if(g==m)return S;for(var k=0,C=1;;){var T=g.substring(S-C),A=m.indexOf(T);if(A==-1)return k;C+=A,(A==0||g.substring(S-C)==m.substring(0,C))&&(k=C,C++)}},c.prototype.diff_halfMatch_=function(g,m){if(this.Diff_Timeout<=0)return null;var x=g.length>m.length?g:m,w=g.length>m.length?m:g;if(x.length<4||w.length*2<x.length)return null;var S=this;function k(P,Y,te){for(var ce=P.substring(te,te+Math.floor(P.length/4)),Me=-1,Fe="",We,rt,je,Ne;(Me=Y.indexOf(ce,Me+1))!=-1;){var nt=S.diff_commonPrefix(P.substring(te),Y.substring(Me)),ct=S.diff_commonSuffix(P.substring(0,te),Y.substring(0,Me));Fe.length<ct+nt&&(Fe=Y.substring(Me-ct,Me)+Y.substring(Me,Me+nt),We=P.substring(0,te-ct),rt=P.substring(te+nt),je=Y.substring(0,Me-ct),Ne=Y.substring(Me+nt))}return Fe.length*2>=P.length?[We,rt,je,Ne,Fe]:null}var C=k(x,w,Math.ceil(x.length/4)),T=k(x,w,Math.ceil(x.length/2)),A;if(!C&&!T)return null;T?C?A=C[4].length>T[4].length?C:T:A=T:A=C;var M,y,N,z;g.length>m.length?(M=A[0],y=A[1],N=A[2],z=A[3]):(N=A[0],z=A[1],M=A[2],y=A[3]);var F=A[4];return[M,y,N,z,F]},c.prototype.diff_cleanupSemantic=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=0,T=0,A=0,M=0;k<g.length;)g[k][0]==b?(x[w++]=k,C=A,T=M,A=0,M=0,S=g[k][1]):(g[k][0]==v?A+=g[k][1].length:M+=g[k][1].length,S&&S.length<=Math.max(C,T)&&S.length<=Math.max(A,M)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,w--,k=w>0?x[w-1]:-1,C=0,T=0,A=0,M=0,S=null,m=!0)),k++;for(m&&this.diff_cleanupMerge(g),this.diff_cleanupSemanticLossless(g),k=1;k<g.length;){if(g[k-1][0]==p&&g[k][0]==v){var y=g[k-1][1],N=g[k][1],z=this.diff_commonOverlap_(y,N),F=this.diff_commonOverlap_(N,y);z>=F?(z>=y.length/2||z>=N.length/2)&&(g.splice(k,0,new c.Diff(b,N.substring(0,z))),g[k-1][1]=y.substring(0,y.length-z),g[k+1][1]=N.substring(z),k++):(F>=y.length/2||F>=N.length/2)&&(g.splice(k,0,new c.Diff(b,y.substring(0,F))),g[k-1][0]=v,g[k-1][1]=N.substring(0,N.length-F),g[k+1][0]=p,g[k+1][1]=y.substring(F),k++),k++}k++}},c.prototype.diff_cleanupSemanticLossless=function(g){function m(F,P){if(!F||!P)return 6;var Y=F.charAt(F.length-1),te=P.charAt(0),ce=Y.match(c.nonAlphaNumericRegex_),Me=te.match(c.nonAlphaNumericRegex_),Fe=ce&&Y.match(c.whitespaceRegex_),We=Me&&te.match(c.whitespaceRegex_),rt=Fe&&Y.match(c.linebreakRegex_),je=We&&te.match(c.linebreakRegex_),Ne=rt&&F.match(c.blanklineEndRegex_),nt=je&&P.match(c.blanklineStartRegex_);return Ne||nt?5:rt||je?4:ce&&!Fe&&We?3:Fe||We?2:ce||Me?1:0}for(var x=1;x<g.length-1;){if(g[x-1][0]==b&&g[x+1][0]==b){var w=g[x-1][1],S=g[x][1],k=g[x+1][1],C=this.diff_commonSuffix(w,S);if(C){var T=S.substring(S.length-C);w=w.substring(0,w.length-C),S=T+S.substring(0,S.length-C),k=T+k}for(var A=w,M=S,y=k,N=m(w,S)+m(S,k);S.charAt(0)===k.charAt(0);){w+=S.charAt(0),S=S.substring(1)+k.charAt(0),k=k.substring(1);var z=m(w,S)+m(S,k);z>=N&&(N=z,A=w,M=S,y=k)}g[x-1][1]!=A&&(A?g[x-1][1]=A:(g.splice(x-1,1),x--),g[x][1]=M,y?g[x+1][1]=y:(g.splice(x+1,1),x--))}x++}},c.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,c.whitespaceRegex_=/\s/,c.linebreakRegex_=/[\r\n]/,c.blanklineEndRegex_=/\n\r?\n$/,c.blanklineStartRegex_=/^\r?\n\r?\n/,c.prototype.diff_cleanupEfficiency=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=!1,T=!1,A=!1,M=!1;k<g.length;)g[k][0]==b?(g[k][1].length<this.Diff_EditCost&&(A||M)?(x[w++]=k,C=A,T=M,S=g[k][1]):(w=0,S=null),A=M=!1):(g[k][0]==p?M=!0:A=!0,S&&(C&&T&&A&&M||S.length<this.Diff_EditCost/2&&C+T+A+M==3)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,S=null,C&&T?(A=M=!0,w=0):(w--,k=w>0?x[w-1]:-1,A=M=!1),m=!0)),k++;m&&this.diff_cleanupMerge(g)},c.prototype.diff_cleanupMerge=function(g){g.push(new c.Diff(b,""));for(var m=0,x=0,w=0,S="",k="",C;m<g.length;)switch(g[m][0]){case v:w++,k+=g[m][1],m++;break;case p:x++,S+=g[m][1],m++;break;case b:x+w>1?(x!==0&&w!==0&&(C=this.diff_commonPrefix(k,S),C!==0&&(m-x-w>0&&g[m-x-w-1][0]==b?g[m-x-w-1][1]+=k.substring(0,C):(g.splice(0,0,new c.Diff(b,k.substring(0,C))),m++),k=k.substring(C),S=S.substring(C)),C=this.diff_commonSuffix(k,S),C!==0&&(g[m][1]=k.substring(k.length-C)+g[m][1],k=k.substring(0,k.length-C),S=S.substring(0,S.length-C))),m-=x+w,g.splice(m,x+w),S.length&&(g.splice(m,0,new c.Diff(p,S)),m++),k.length&&(g.splice(m,0,new c.Diff(v,k)),m++),m++):m!==0&&g[m-1][0]==b?(g[m-1][1]+=g[m][1],g.splice(m,1)):m++,w=0,x=0,S="",k="";break}g[g.length-1][1]===""&&g.pop();var T=!1;for(m=1;m<g.length-1;)g[m-1][0]==b&&g[m+1][0]==b&&(g[m][1].substring(g[m][1].length-g[m-1][1].length)==g[m-1][1]?(g[m][1]=g[m-1][1]+g[m][1].substring(0,g[m][1].length-g[m-1][1].length),g[m+1][1]=g[m-1][1]+g[m+1][1],g.splice(m-1,1),T=!0):g[m][1].substring(0,g[m+1][1].length)==g[m+1][1]&&(g[m-1][1]+=g[m+1][1],g[m][1]=g[m][1].substring(g[m+1][1].length)+g[m+1][1],g.splice(m+1,1),T=!0)),m++;T&&this.diff_cleanupMerge(g)},c.prototype.diff_xIndex=function(g,m){var x=0,w=0,S=0,k=0,C;for(C=0;C<g.length&&(g[C][0]!==v&&(x+=g[C][1].length),g[C][0]!==p&&(w+=g[C][1].length),!(x>m));C++)S=x,k=w;return g.length!=C&&g[C][0]===p?k:k+(m-S)},c.prototype.diff_prettyHtml=function(g){for(var m=[],x=/&/g,w=/</g,S=/>/g,k=/\n/g,C=0;C<g.length;C++){var T=g[C][0],A=g[C][1],M=A.replace(x,"&amp;").replace(w,"&lt;").replace(S,"&gt;").replace(k,"&para;<br>");switch(T){case v:m[C]='<ins style="background:#e6ffe6;">'+M+"</ins>";break;case p:m[C]='<del style="background:#ffe6e6;">'+M+"</del>";break;case b:m[C]="<span>"+M+"</span>";break}}return m.join("")},c.prototype.diff_text1=function(g){for(var m=[],x=0;x<g.length;x++)g[x][0]!==v&&(m[x]=g[x][1]);return m.join("")},c.prototype.diff_text2=function(g){for(var m=[],x=0;x<g.length;x++)g[x][0]!==p&&(m[x]=g[x][1]);return m.join("")},c.prototype.diff_levenshtein=function(g){for(var m=0,x=0,w=0,S=0;S<g.length;S++){var k=g[S][0],C=g[S][1];switch(k){case v:x+=C.length;break;case p:w+=C.length;break;case b:m+=Math.max(x,w),x=0,w=0;break}}return m+=Math.max(x,w),m},c.prototype.diff_toDelta=function(g){for(var m=[],x=0;x<g.length;x++)switch(g[x][0]){case v:m[x]="+"+encodeURI(g[x][1]);break;case p:m[x]="-"+g[x][1].length;break;case b:m[x]="="+g[x][1].length;break}return m.join(" ").replace(/%20/g," ")},c.prototype.diff_fromDelta=function(g,m){for(var x=[],w=0,S=0,k=m.split(/\t/g),C=0;C<k.length;C++){var T=k[C].substring(1);switch(k[C].charAt(0)){case"+":try{x[w++]=new c.Diff(v,decodeURI(T))}catch{throw new Error("Illegal escape in diff_fromDelta: "+T)}break;case"-":case"=":var A=parseInt(T,10);if(isNaN(A)||A<0)throw new Error("Invalid number in diff_fromDelta: "+T);var M=g.substring(S,S+=A);k[C].charAt(0)=="="?x[w++]=new c.Diff(b,M):x[w++]=new c.Diff(p,M);break;default:if(k[C])throw new Error("Invalid diff operation in diff_fromDelta: "+k[C])}}if(S!=g.length)throw new Error("Delta length ("+S+") does not equal source text length ("+g.length+").");return x},c.prototype.match_main=function(g,m,x){if(g==null||m==null||x==null)throw new Error("Null input. (match_main)");return x=Math.max(0,Math.min(x,g.length)),g==m?0:g.length?g.substring(x,x+m.length)==m?x:this.match_bitap_(g,m,x):-1},c.prototype.match_bitap_=function(g,m,x){if(m.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var w=this.match_alphabet_(m),S=this;function k(We,rt){var je=We/m.length,Ne=Math.abs(x-rt);return S.Match_Distance?je+Ne/S.Match_Distance:Ne?1:je}var C=this.Match_Threshold,T=g.indexOf(m,x);T!=-1&&(C=Math.min(k(0,T),C),T=g.lastIndexOf(m,x+m.length),T!=-1&&(C=Math.min(k(0,T),C)));var A=1<<m.length-1;T=-1;for(var M,y,N=m.length+g.length,z,F=0;F<m.length;F++){for(M=0,y=N;M<y;)k(F,x+y)<=C?M=y:N=y,y=Math.floor((N-M)/2+M);N=y;var P=Math.max(1,x-y+1),Y=Math.min(x+y,g.length)+m.length,te=Array(Y+2);te[Y+1]=(1<<F)-1;for(var ce=Y;ce>=P;ce--){var Me=w[g.charAt(ce-1)];if(F===0?te[ce]=(te[ce+1]<<1|1)&Me:te[ce]=(te[ce+1]<<1|1)&Me|((z[ce+1]|z[ce])<<1|1)|z[ce+1],te[ce]&A){var Fe=k(F,ce-1);if(Fe<=C)if(C=Fe,T=ce-1,T>x)P=Math.max(1,2*x-T);else break}}if(k(F+1,x)>C)break;z=te}return T},c.prototype.match_alphabet_=function(g){for(var m={},x=0;x<g.length;x++)m[g.charAt(x)]=0;for(var x=0;x<g.length;x++)m[g.charAt(x)]|=1<<g.length-x-1;return m},c.prototype.patch_addContext_=function(g,m){if(m.length!=0){if(g.start2===null)throw Error("patch not initialized");for(var x=m.substring(g.start2,g.start2+g.length1),w=0;m.indexOf(x)!=m.lastIndexOf(x)&&x.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)w+=this.Patch_Margin,x=m.substring(g.start2-w,g.start2+g.length1+w);w+=this.Patch_Margin;var S=m.substring(g.start2-w,g.start2);S&&g.diffs.unshift(new c.Diff(b,S));var k=m.substring(g.start2+g.length1,g.start2+g.length1+w);k&&g.diffs.push(new c.Diff(b,k)),g.start1-=S.length,g.start2-=S.length,g.length1+=S.length+k.length,g.length2+=S.length+k.length}},c.prototype.patch_make=function(g,m,x){var w,S;if(typeof g=="string"&&typeof m=="string"&&typeof x>"u")w=g,S=this.diff_main(w,m,!0),S.length>2&&(this.diff_cleanupSemantic(S),this.diff_cleanupEfficiency(S));else if(g&&typeof g=="object"&&typeof m>"u"&&typeof x>"u")S=g,w=this.diff_text1(S);else if(typeof g=="string"&&m&&typeof m=="object"&&typeof x>"u")w=g,S=m;else if(typeof g=="string"&&typeof m=="string"&&x&&typeof x=="object")w=g,S=x;else throw new Error("Unknown call format to patch_make.");if(S.length===0)return[];for(var k=[],C=new c.patch_obj,T=0,A=0,M=0,y=w,N=w,z=0;z<S.length;z++){var F=S[z][0],P=S[z][1];switch(!T&&F!==b&&(C.start1=A,C.start2=M),F){case v:C.diffs[T++]=S[z],C.length2+=P.length,N=N.substring(0,M)+P+N.substring(M);break;case p:C.length1+=P.length,C.diffs[T++]=S[z],N=N.substring(0,M)+N.substring(M+P.length);break;case b:P.length<=2*this.Patch_Margin&&T&&S.length!=z+1?(C.diffs[T++]=S[z],C.length1+=P.length,C.length2+=P.length):P.length>=2*this.Patch_Margin&&T&&(this.patch_addContext_(C,y),k.push(C),C=new c.patch_obj,T=0,y=N,A=M);break}F!==v&&(A+=P.length),F!==p&&(M+=P.length)}return T&&(this.patch_addContext_(C,y),k.push(C)),k},c.prototype.patch_deepCopy=function(g){for(var m=[],x=0;x<g.length;x++){var w=g[x],S=new c.patch_obj;S.diffs=[];for(var k=0;k<w.diffs.length;k++)S.diffs[k]=new c.Diff(w.diffs[k][0],w.diffs[k][1]);S.start1=w.start1,S.start2=w.start2,S.length1=w.length1,S.length2=w.length2,m[x]=S}return m},c.prototype.patch_apply=function(g,m){if(g.length==0)return[m,[]];g=this.patch_deepCopy(g);var x=this.patch_addPadding(g);m=x+m+x,this.patch_splitMax(g);for(var w=0,S=[],k=0;k<g.length;k++){var C=g[k].start2+w,T=this.diff_text1(g[k].diffs),A,M=-1;if(T.length>this.Match_MaxBits?(A=this.match_main(m,T.substring(0,this.Match_MaxBits),C),A!=-1&&(M=this.match_main(m,T.substring(T.length-this.Match_MaxBits),C+T.length-this.Match_MaxBits),(M==-1||A>=M)&&(A=-1))):A=this.match_main(m,T,C),A==-1)S[k]=!1,w-=g[k].length2-g[k].length1;else{S[k]=!0,w=A-C;var y;if(M==-1?y=m.substring(A,A+T.length):y=m.substring(A,M+this.Match_MaxBits),T==y)m=m.substring(0,A)+this.diff_text2(g[k].diffs)+m.substring(A+T.length);else{var N=this.diff_main(T,y,!1);if(T.length>this.Match_MaxBits&&this.diff_levenshtein(N)/T.length>this.Patch_DeleteThreshold)S[k]=!1;else{this.diff_cleanupSemanticLossless(N);for(var z=0,F,P=0;P<g[k].diffs.length;P++){var Y=g[k].diffs[P];Y[0]!==b&&(F=this.diff_xIndex(N,z)),Y[0]===v?m=m.substring(0,A+F)+Y[1]+m.substring(A+F):Y[0]===p&&(m=m.substring(0,A+F)+m.substring(A+this.diff_xIndex(N,z+Y[1].length))),Y[0]!==p&&(z+=Y[1].length)}}}}}return m=m.substring(x.length,m.length-x.length),[m,S]},c.prototype.patch_addPadding=function(g){for(var m=this.Patch_Margin,x="",w=1;w<=m;w++)x+=String.fromCharCode(w);for(var w=0;w<g.length;w++)g[w].start1+=m,g[w].start2+=m;var S=g[0],k=S.diffs;if(k.length==0||k[0][0]!=b)k.unshift(new c.Diff(b,x)),S.start1-=m,S.start2-=m,S.length1+=m,S.length2+=m;else if(m>k[0][1].length){var C=m-k[0][1].length;k[0][1]=x.substring(k[0][1].length)+k[0][1],S.start1-=C,S.start2-=C,S.length1+=C,S.length2+=C}if(S=g[g.length-1],k=S.diffs,k.length==0||k[k.length-1][0]!=b)k.push(new c.Diff(b,x)),S.length1+=m,S.length2+=m;else if(m>k[k.length-1][1].length){var C=m-k[k.length-1][1].length;k[k.length-1][1]+=x.substring(0,C),S.length1+=C,S.length2+=C}return x},c.prototype.patch_splitMax=function(g){for(var m=this.Match_MaxBits,x=0;x<g.length;x++)if(!(g[x].length1<=m)){var w=g[x];g.splice(x--,1);for(var S=w.start1,k=w.start2,C="";w.diffs.length!==0;){var T=new c.patch_obj,A=!0;for(T.start1=S-C.length,T.start2=k-C.length,C!==""&&(T.length1=T.length2=C.length,T.diffs.push(new c.Diff(b,C)));w.diffs.length!==0&&T.length1<m-this.Patch_Margin;){var M=w.diffs[0][0],y=w.diffs[0][1];M===v?(T.length2+=y.length,k+=y.length,T.diffs.push(w.diffs.shift()),A=!1):M===p&&T.diffs.length==1&&T.diffs[0][0]==b&&y.length>2*m?(T.length1+=y.length,S+=y.length,A=!1,T.diffs.push(new c.Diff(M,y)),w.diffs.shift()):(y=y.substring(0,m-T.length1-this.Patch_Margin),T.length1+=y.length,S+=y.length,M===b?(T.length2+=y.length,k+=y.length):A=!1,T.diffs.push(new c.Diff(M,y)),y==w.diffs[0][1]?w.diffs.shift():w.diffs[0][1]=w.diffs[0][1].substring(y.length))}C=this.diff_text2(T.diffs),C=C.substring(C.length-this.Patch_Margin);var N=this.diff_text1(w.diffs).substring(0,this.Patch_Margin);N!==""&&(T.length1+=N.length,T.length2+=N.length,T.diffs.length!==0&&T.diffs[T.diffs.length-1][0]===b?T.diffs[T.diffs.length-1][1]+=N:T.diffs.push(new c.Diff(b,N))),A||g.splice(++x,0,T)}}},c.prototype.patch_toText=function(g){for(var m=[],x=0;x<g.length;x++)m[x]=g[x];return m.join("")},c.prototype.patch_fromText=function(g){var m=[];if(!g)return m;for(var x=g.split(`
`),w=0,S=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;w<x.length;){var k=x[w].match(S);if(!k)throw new Error("Invalid patch string: "+x[w]);var C=new c.patch_obj;for(m.push(C),C.start1=parseInt(k[1],10),k[2]===""?(C.start1--,C.length1=1):k[2]=="0"?C.length1=0:(C.start1--,C.length1=parseInt(k[2],10)),C.start2=parseInt(k[3],10),k[4]===""?(C.start2--,C.length2=1):k[4]=="0"?C.length2=0:(C.start2--,C.length2=parseInt(k[4],10)),w++;w<x.length;){var T=x[w].charAt(0);try{var A=decodeURI(x[w].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+A)}if(T=="-")C.diffs.push(new c.Diff(p,A));else if(T=="+")C.diffs.push(new c.Diff(v,A));else if(T==" ")C.diffs.push(new c.Diff(b,A));else{if(T=="@")break;if(T!=="")throw new Error('Invalid patch mode "'+T+'" in: '+A)}w++}}return m},c.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},c.patch_obj.prototype.toString=function(){var g,m;this.length1===0?g=this.start1+",0":this.length1==1?g=this.start1+1:g=this.start1+1+","+this.length1,this.length2===0?m=this.start2+",0":this.length2==1?m=this.start2+1:m=this.start2+1+","+this.length2;for(var x=["@@ -"+g+" +"+m+` @@
`],w,S=0;S<this.diffs.length;S++){switch(this.diffs[S][0]){case v:w="+";break;case p:w="-";break;case b:w=" ";break}x[S+1]=w+encodeURI(this.diffs[S][1])+`
`}return x.join("").replace(/%20/g," ")},h.exports=c,h.exports.diff_match_patch=c,h.exports.DIFF_DELETE=p,h.exports.DIFF_INSERT=v,h.exports.DIFF_EQUAL=b},408:(h,c,p)=>{p.d(c,{default:()=>Nt});var v=p(135),b=p(840),g=p(775),m=p(428),x=p(325),w=p(483),S=p(999),k=function(oe){oe===void 0&&(oe=document);var he=function(J){var ee=document.createElement("img");ee.src=J.getAttribute("data-src"),ee.addEventListener("load",function(){!J.getAttribute("style")&&!J.getAttribute("class")&&!J.getAttribute("width")&&!J.getAttribute("height")&&ee.naturalHeight>ee.naturalWidth&&ee.naturalWidth/ee.naturalHeight<document.querySelector(".vditor-reset").clientWidth/(window.innerHeight-40)&&ee.naturalHeight>window.innerHeight-40&&(J.style.height=window.innerHeight-40+"px"),J.src=ee.src}),J.removeAttribute("data-src")};if(!("IntersectionObserver"in window))return oe.querySelectorAll("img").forEach(function(J){J.getAttribute("data-src")&&he(J)}),!1;window.vditorImageIntersectionObserver?(window.vditorImageIntersectionObserver.disconnect(),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)})):(window.vditorImageIntersectionObserver=new IntersectionObserver(function(J){J.forEach(function(ee){(typeof ee.isIntersecting>"u"?ee.intersectionRatio!==0:ee.isIntersecting)&&ee.target.getAttribute("data-src")&&he(ee.target)})}),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)}))},C=p(472),T=p(280),A=p(637),M=p(825),y=p(11),N=p(194),z=p(436),F=p(229),P=p(145),Y=p(538),te=p(413),ce=p(106),Me=p(673),Fe=function(oe){document.querySelectorAll(".vditor-anchor").forEach(function(he){oe===1&&he.classList.add("vditor-anchor--left"),he.onclick=function(){var J=he.getAttribute("href").substr(1),ee=document.getElementById("vditorAnchor-"+J).offsetTop;document.querySelector("html").scrollTop=ee}}),window.onhashchange=function(){var he=document.getElementById("vditorAnchor-"+decodeURIComponent(window.location.hash.substr(1)));he&&(document.querySelector("html").scrollTop=he.offsetTop)}},We=p(214),rt=p(810),je=function(oe,he){if(he===void 0&&(he="zh_CN"),!(typeof speechSynthesis>"u"||typeof SpeechSynthesisUtterance>"u")){var J=function(){var be=speechSynthesis.getVoices(),le,ye;return be.forEach(function(Ae){Ae.lang===he.replace("_","-")&&(le=Ae),Ae.default&&(ye=Ae)}),le||(le=ye),le},ee='<svg><use xlink:href="#vditor-icon-play"></use></svg>',Ce='<svg><use xlink:href="#vditor-icon-pause"></use></svg>';document.getElementById("vditorIconScript")||(ee='<svg viewBox="0 0 32 32"><path d="M3.436 0l25.128 16-25.128 16v-32z"></path></svg>',Ce='<svg viewBox="0 0 32 32"><path d="M20.617 0h9.128v32h-9.128v-32zM2.255 32v-32h9.128v32h-9.128z"></path></svg>');var se=document.querySelector(".vditor-speech");se||(se=document.createElement("button"),se.className="vditor-speech",oe.insertAdjacentElement("beforeend",se),speechSynthesis.onvoiceschanged!==void 0&&(speechSynthesis.onvoiceschanged=J));var G=J(),X=new SpeechSynthesisUtterance;X.voice=G,X.onend=X.onerror=function(){se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee},oe.addEventListener(window.ontouchstart!==void 0?"touchend":"click",function(be){var le=be.target;if(le.classList.contains("vditor-speech")||le.parentElement.classList.contains("vditor-speech")){se.classList.contains("vditor-speech--current")?speechSynthesis.speaking&&(speechSynthesis.paused?(speechSynthesis.resume(),se.innerHTML=Ce):(speechSynthesis.pause(),se.innerHTML=ee)):(X.text=se.getAttribute("data-text"),speechSynthesis.speak(X),se.classList.add("vditor-speech--current"),se.innerHTML=Ce),(0,rt.Hc)(window.vditorSpeechRange),oe.focus();return}if(se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee,getSelection().rangeCount!==0){var ye=getSelection().getRangeAt(0),Ae=ye.toString().trim();if(Ae){window.vditorSpeechRange=ye.cloneRange();var ze=ye.getBoundingClientRect();se.innerHTML=ee,se.style.display="block",se.style.top=ze.top+ze.height+document.querySelector("html").scrollTop-20+"px",window.ontouchstart!==void 0?se.style.left=be.changedTouches[be.changedTouches.length-1].pageX+2+"px":se.style.left=be.clientX+2+"px",se.setAttribute("data-text",Ae)}}})}},Ne=function(oe,he,J,ee){function Ce(se){return se instanceof J?se:new J(function(G){G(se)})}return new(J||(J=Promise))(function(se,G){function X(ye){try{le(ee.next(ye))}catch(Ae){G(Ae)}}function be(ye){try{le(ee.throw(ye))}catch(Ae){G(Ae)}}function le(ye){ye.done?se(ye.value):Ce(ye.value).then(X,be)}le((ee=ee.apply(oe,he||[])).next())})},nt=function(oe,he){var J={label:0,sent:function(){if(se[0]&1)throw se[1];return se[1]},trys:[],ops:[]},ee,Ce,se,G;return G={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(G[Symbol.iterator]=function(){return this}),G;function X(le){return function(ye){return be([le,ye])}}function be(le){if(ee)throw new TypeError("Generator is already executing.");for(;G&&(G=0,le[0]&&(J=0)),J;)try{if(ee=1,Ce&&(se=le[0]&2?Ce.return:le[0]?Ce.throw||((se=Ce.return)&&se.call(Ce),0):Ce.next)&&!(se=se.call(Ce,le[1])).done)return se;switch(Ce=0,se&&(le=[le[0]&2,se.value]),le[0]){case 0:case 1:se=le;break;case 4:return J.label++,{value:le[1],done:!1};case 5:J.label++,Ce=le[1],le=[0];continue;case 7:le=J.ops.pop(),J.trys.pop();continue;default:if(se=J.trys,!(se=se.length>0&&se[se.length-1])&&(le[0]===6||le[0]===2)){J=0;continue}if(le[0]===3&&(!se||le[1]>se[0]&&le[1]<se[3])){J.label=le[1];break}if(le[0]===6&&J.label<se[1]){J.label=se[1],se=le;break}if(se&&J.label<se[2]){J.label=se[2],J.ops.push(le);break}se[2]&&J.ops.pop(),J.trys.pop();continue}le=he.call(oe,J)}catch(ye){le=[6,ye],Ce=0}finally{ee=se=0}if(le[0]&5)throw le[1];return{value:le[0]?le[1]:void 0,done:!0}}},ct=function(oe){var he,J={anchor:0,cdn:P.g.CDN,customEmoji:{},emojiPath:"".concat(P.g.CDN,"/dist/images/emoji"),hljs:P.g.HLJS_OPTIONS,icon:"ant",lang:"zh_CN",markdown:P.g.MARKDOWN_OPTIONS,math:P.g.MATH_OPTIONS,mode:"light",speech:{enable:!1},render:{media:{enable:!0}},theme:P.g.THEME_OPTIONS};return oe.cdn&&(!((he=oe.theme)===null||he===void 0)&&he.path||(J.theme.path="".concat(oe.cdn,"/dist/css/content-theme")),oe.emojiPath||(J.emojiPath="".concat(oe.cdn,"/dist/images/emoji"))),(0,Me.T)(J,oe)},tt=function(oe,he){var J=ct(he);return(0,te.G)("".concat(J.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){var ee=(0,We.X)({autoSpace:J.markdown.autoSpace,gfmAutoLink:J.markdown.gfmAutoLink,codeBlockPreview:J.markdown.codeBlockPreview,emojiSite:J.emojiPath,emojis:J.customEmoji,fixTermTypo:J.markdown.fixTermTypo,footnotes:J.markdown.footnotes,headingAnchor:J.anchor!==0,inlineMathDigit:J.math.inlineDigit,lazyLoadImage:J.lazyLoadImage,linkBase:J.markdown.linkBase,linkPrefix:J.markdown.linkPrefix,listStyle:J.markdown.listStyle,mark:J.markdown.mark,mathBlockPreview:J.markdown.mathBlockPreview,paragraphBeginningSpace:J.markdown.paragraphBeginningSpace,sanitize:J.markdown.sanitize,toc:J.markdown.toc});return he!=null&&he.renderers&&ee.SetJSRenderers({renderers:{Md2HTML:he.renderers}}),ee.SetHeadingID(!0),ee.Md2HTML(oe)})},q=function(oe,he,J){return Ne(void 0,void 0,void 0,function(){var ee,Ce,se,G;return nt(this,function(X){switch(X.label){case 0:return ee=ct(J),[4,tt(he,ee)];case 1:if(Ce=X.sent(),ee.transform&&(Ce=ee.transform(Ce)),oe.innerHTML=Ce,oe.classList.add("vditor-reset"),ee.i18n)return[3,5];if(["de_DE","en_US","es_ES","fr_FR","ja_JP","ko_KR","pt_BR","ru_RU","sv_SE","vi_VN","zh_CN","zh_TW"].includes(ee.lang))return[3,2];throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");case 2:return se="vditorI18nScript",G=se+ee.lang,document.querySelectorAll('head script[id^="'.concat(se,'"]')).forEach(function(be){be.id!==G&&document.head.removeChild(be)}),[4,(0,te.G)("".concat(ee.cdn,"/dist/js/i18n/").concat(ee.lang,".js"),G)];case 3:X.sent(),X.label=4;case 4:return[3,6];case 5:window.VditorI18n=ee.i18n,X.label=6;case 6:return ee.icon?[4,(0,te.G)("".concat(ee.cdn,"/dist/js/icons/").concat(ee.icon,".js"),"vditorIconScript")]:[3,8];case 7:X.sent(),X.label=8;case 8:return(0,Y.Z)(ee.theme.current,ee.theme.path),ee.anchor===1&&oe.classList.add("vditor-reset--anchor"),(0,m.O)(oe,ee.hljs),(0,S.s)(ee.hljs,oe,ee.cdn),(0,C.H)(oe,{cdn:ee.cdn,math:ee.math}),(0,A.i)(oe,ee.cdn,ee.mode),(0,M.J)(oe,ee.cdn,ee.mode),(0,y.K)(oe,ee.cdn),(0,x.P)(oe,ee.cdn),(0,w.v)(oe,ee.cdn),(0,g.p)(oe,ee.cdn,ee.mode),(0,N.P)(oe,ee.cdn,ee.mode),(0,F.B)(oe,ee.cdn),(0,v.Q)(oe,ee.cdn),ee.render.media.enable&&(0,T.Y)(oe),ee.speech.enable&&je(oe),ee.anchor!==0&&Fe(ee.anchor),ee.after&&ee.after(),ee.lazyLoadImage&&k(oe),oe.addEventListener("click",function(be){var le=(0,ce.lG)(be.target,"SPAN");if(le&&(0,ce.fb)(le,"vditor-toc")){var ye=oe.querySelector("#"+le.getAttribute("data-target-id"));ye&&window.scrollTo(window.scrollX,ye.offsetTop);return}}),[2]}})})},Ht=p(190),Rt=p(580),$t=function(){function oe(){}return oe.adapterRender=b,oe.previewImage=Ht.E,oe.codeRender=m.O,oe.graphvizRender=w.v,oe.highlightRender=S.s,oe.mathRender=C.H,oe.mermaidRender=A.i,oe.SMILESRender=M.J,oe.markmapRender=y.K,oe.flowchartRender=x.P,oe.chartRender=g.p,oe.abcRender=v.Q,oe.mindmapRender=N.P,oe.plantumlRender=F.B,oe.outlineRender=z.k,oe.mediaRender=T.Y,oe.speechRender=je,oe.lazyLoadImageRender=k,oe.md2html=tt,oe.preview=q,oe.setCodeTheme=Rt.Y,oe.setContentTheme=Y.Z,oe}();const Nt=$t},145:(h,c,p)=>{p.d(c,{H:()=>v,g:()=>b});var v="3.11.2",b=function(){function g(){}return g.ZWSP="",g.DROP_EDITOR="application/editor",g.MOBILE_WIDTH=520,g.CLASS_MENU_DISABLED="vditor-menu--disabled",g.EDIT_TOOLBARS=["emoji","headings","bold","italic","strike","link","list","ordered-list","outdent","indent","check","line","quote","code","inline-code","insert-after","insert-before","upload","record","table"],g.CODE_THEME=["a11y-dark","agate","an-old-hope","androidstudio","arta","atom-one-dark","atom-one-dark-reasonable","base16/3024","base16/apathy","base16/apprentice","base16/ashes","base16/atelier-cave","base16/atelier-dune","base16/atelier-estuary","base16/atelier-forest","base16/atelier-heath","base16/atelier-lakeside","base16/atelier-plateau","base16/atelier-savanna","base16/atelier-seaside","base16/atelier-sulphurpool","base16/atlas","base16/bespin","base16/black-metal","base16/black-metal-bathory","base16/black-metal-burzum","base16/black-metal-dark-funeral","base16/black-metal-gorgoroth","base16/black-metal-immortal","base16/black-metal-khold","base16/black-metal-marduk","base16/black-metal-mayhem","base16/black-metal-nile","base16/black-metal-venom","base16/brewer","base16/bright","base16/brogrammer","base16/brush-trees-dark","base16/chalk","base16/circus","base16/classic-dark","base16/codeschool","base16/colors","base16/danqing","base16/darcula","base16/dark-violet","base16/darkmoss","base16/darktooth","base16/decaf","base16/default-dark","base16/dracula","base16/edge-dark","base16/eighties","base16/embers","base16/equilibrium-dark","base16/equilibrium-gray-dark","base16/espresso","base16/eva","base16/eva-dim","base16/flat","base16/framer","base16/gigavolt","base16/google-dark","base16/grayscale-dark","base16/green-screen","base16/gruvbox-dark-hard","base16/gruvbox-dark-medium","base16/gruvbox-dark-pale","base16/gruvbox-dark-soft","base16/hardcore","base16/harmonic16-dark","base16/heetch-dark","base16/helios","base16/hopscotch","base16/horizon-dark","base16/humanoid-dark","base16/ia-dark","base16/icy-dark","base16/ir-black","base16/isotope","base16/kimber","base16/london-tube","base16/macintosh","base16/marrakesh","base16/materia","base16/material","base16/material-darker","base16/material-palenight","base16/material-vivid","base16/mellow-purple","base16/mocha","base16/monokai","base16/nebula","base16/nord","base16/nova","base16/ocean","base16/oceanicnext","base16/onedark","base16/outrun-dark","base16/papercolor-dark","base16/paraiso","base16/pasque","base16/phd","base16/pico","base16/pop","base16/porple","base16/qualia","base16/railscasts","base16/rebecca","base16/ros-pine","base16/ros-pine-moon","base16/sandcastle","base16/seti-ui","base16/silk-dark","base16/snazzy","base16/solar-flare","base16/solarized-dark","base16/spacemacs","base16/summercamp","base16/summerfruit-dark","base16/synth-midnight-terminal-dark","base16/tango","base16/tender","base16/tomorrow-night","base16/twilight","base16/unikitty-dark","base16/vulcan","base16/windows-10","base16/windows-95","base16/windows-high-contrast","base16/windows-nt","base16/woodland","base16/xcode-dusk","base16/zenburn","codepen-embed","dark","devibeans","far","felipec","github-dark","github-dark-dimmed","gml","gradient-dark","hybrid","ir-black","isbl-editor-dark","kimbie-dark","lioshi","monokai","monokai-sublime","night-owl","nnfx-dark","nord","obsidian","panda-syntax-dark","paraiso-dark","pojoaque","qtcreator-dark","rainbow","shades-of-purple","srcery","stackoverflow-dark","sunburst","tomorrow-night-blue","tomorrow-night-bright","tokyo-night-dark","vs2015","xt256","ant-design","a11y-light","arduino-light","ascetic","atom-one-light","base16/atelier-cave-light","base16/atelier-dune-light","base16/atelier-estuary-light","base16/atelier-forest-light","base16/atelier-heath-light","base16/atelier-lakeside-light","base16/atelier-plateau-light","base16/atelier-savanna-light","base16/atelier-seaside-light","base16/atelier-sulphurpool-light","base16/brush-trees","base16/classic-light","base16/cupcake","base16/cupertino","base16/default-light","base16/dirtysea","base16/edge-light","base16/equilibrium-gray-light","base16/equilibrium-light","base16/fruit-soda","base16/github","base16/google-light","base16/grayscale-light","base16/gruvbox-light-hard","base16/gruvbox-light-medium","base16/gruvbox-light-soft","base16/harmonic16-light","base16/heetch-light","base16/humanoid-light","base16/horizon-light","base16/ia-light","base16/material-lighter","base16/mexico-light","base16/one-light","base16/papercolor-light","base16/ros-pine-dawn","base16/sagelight","base16/shapeshifter","base16/silk-light","base16/solar-flare-light","base16/solarized-light","base16/summerfruit-light","base16/synth-midnight-terminal-light","base16/tomorrow","base16/unikitty-light","base16/windows-10-light","base16/windows-95-light","base16/windows-high-contrast-light","brown-paper","base16/windows-nt-light","color-brewer","docco","foundation","github","googlecode","gradient-light","grayscale","idea","intellij-light","isbl-editor-light","kimbie-light","lightfair","magula","mono-blue","nnfx-light","panda-syntax-light","paraiso-light","purebasic","qtcreator-light","routeros","school-book","stackoverflow-light","tokyo-night-light","vs","xcode","default"],g.ALIAS_CODE_LANGUAGES=["abc","plantuml","mermaid","flowchart","echarts","mindmap","graphviz","math","markmap","smiles","js","ts","html","toml","c#","bat"],g.CDN="https://unpkg.com/vditor@".concat("3.11.2"),g.MARKDOWN_OPTIONS={autoSpace:!1,gfmAutoLink:!0,codeBlockPreview:!0,fixTermTypo:!1,footnotes:!0,linkBase:"",linkPrefix:"",listStyle:!1,mark:!1,mathBlockPreview:!0,paragraphBeginningSpace:!1,sanitize:!0,toc:!1},g.HLJS_OPTIONS={enable:!0,lineNumber:!1,defaultLang:"",style:"github"},g.MATH_OPTIONS={engine:"KaTeX",inlineDigit:!1,macros:{}},g.THEME_OPTIONS={current:"light",list:{"ant-design":"Ant Design",dark:"Dark",light:"Light",wechat:"WeChat"},path:"".concat(g.CDN,"/dist/css/content-theme")},g}()},825:(h,c,p)=>{p.d(c,{J:()=>x});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(w,S,k){w===void 0&&(w=document),S===void 0&&(S=v.g.CDN);var C=g.SMILESRenderAdapter.getElements(w);C.length>0&&(0,b.G)("".concat(S,"/dist/js/smiles-drawer/smiles-drawer.min.js?v=2.1.7"),"vditorAbcjsScript").then(function(){var T=new SmiDrawer({},{});C.forEach(function(A){var M=g.SMILESRenderAdapter.getCode(A).trim();if(!(A.getAttribute("data-processed")==="true"||M.trim()==="")){var y="smiles"+(0,m.Wb)();A.innerHTML='<svg id="'.concat(y,'"></svg>'),T.draw(M,"#"+y,k==="dark"?"dark":void 0),A.setAttribute("data-processed","true")}})})}},135:(h,c,p)=>{p.d(c,{Q:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var S=g.abcRenderAdapter.getElements(x);S.length>0&&(0,b.G)("".concat(w,"/dist/js/abcjs/abcjs_basic.min.js"),"vditorAbcjsScript").then(function(){S.forEach(function(k){k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre")||k.getAttribute("data-processed")!=="true"&&(ABCJS.renderAbc(k,g.abcRenderAdapter.getCode(k).trim()),k.style.overflowX="auto",k.setAttribute("data-processed","true"))})})}},840:(h,c,p)=>{p.r(c),p.d(c,{mathRenderAdapter:()=>v,SMILESRenderAdapter:()=>b,mermaidRenderAdapter:()=>g,markmapRenderAdapter:()=>m,mindmapRenderAdapter:()=>x,chartRenderAdapter:()=>w,abcRenderAdapter:()=>S,graphvizRenderAdapter:()=>k,flowchartRenderAdapter:()=>C,plantumlRenderAdapter:()=>T});var v={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-math")}},b={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-smiles")}},g={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-mermaid")}},m={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-markmap")}},x={getCode:function(A){return A.getAttribute("data-code")},getElements:function(A){return A.querySelectorAll(".language-mindmap")}},w={getCode:function(A){return A.innerText},getElements:function(A){return A.querySelectorAll(".language-echarts")}},S={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-abc")}},k={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-graphviz")}},C={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-flowchart")}},T={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-plantuml")}}},775:(h,c,p)=>{p.d(c,{p:()=>S});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(k,C,T,A){function M(y){return y instanceof T?y:new T(function(N){N(y)})}return new(T||(T=Promise))(function(y,N){function z(Y){try{P(A.next(Y))}catch(te){N(te)}}function F(Y){try{P(A.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,F)}P((A=A.apply(k,C||[])).next())})},w=function(k,C){var T={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},A,M,y,N;return N={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function z(P){return function(Y){return F([P,Y])}}function F(P){if(A)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(T=0)),T;)try{if(A=1,M&&(y=P[0]&2?M.return:P[0]?M.throw||((y=M.return)&&y.call(M),0):M.next)&&!(y=y.call(M,P[1])).done)return y;switch(M=0,y&&(P=[P[0]&2,y.value]),P[0]){case 0:case 1:y=P;break;case 4:return T.label++,{value:P[1],done:!1};case 5:T.label++,M=P[1],P=[0];continue;case 7:P=T.ops.pop(),T.trys.pop();continue;default:if(y=T.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){T=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){T.label=P[1];break}if(P[0]===6&&T.label<y[1]){T.label=y[1],y=P;break}if(y&&T.label<y[2]){T.label=y[2],T.ops.push(P);break}y[2]&&T.ops.pop(),T.trys.pop();continue}P=C.call(k,T)}catch(Y){P=[6,Y],M=0}finally{A=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,T){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.chartRenderAdapter.getElements(k);A.length>0&&(0,b.G)("".concat(C,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){A.forEach(function(M){return x(void 0,void 0,void 0,function(){var y,N,z;return w(this,function(F){switch(F.label){case 0:if(M.parentElement.classList.contains("vditor-wysiwyg__pre")||M.parentElement.classList.contains("vditor-ir__marker--pre"))return[2];if(y=g.chartRenderAdapter.getCode(M).trim(),!y)return[2];F.label=1;case 1:return F.trys.push([1,3,,4]),M.getAttribute("data-processed")==="true"?[2]:[4,(0,m.Qf)(y)];case 2:return N=F.sent(),echarts.init(M,T==="dark"?"dark":void 0).setOption(N),M.setAttribute("data-processed","true"),[3,4];case 3:return z=F.sent(),M.className="vditor-reset--error",M.innerHTML="echarts render error: <br>".concat(z),[3,4];case 4:return[2]}})})})})}},428:(h,c,p)=>{p.d(c,{O:()=>g});var v=p(105),b=p(145),g=function(m,x){Array.from(m.querySelectorAll("pre > code")).filter(function(w,S){return!(w.parentElement.classList.contains("vditor-wysiwyg__pre")||w.parentElement.classList.contains("vditor-ir__marker--pre")||w.classList.contains("language-mermaid")||w.classList.contains("language-flowchart")||w.classList.contains("language-echarts")||w.classList.contains("language-mindmap")||w.classList.contains("language-plantuml")||w.classList.contains("language-markmap")||w.classList.contains("language-abc")||w.classList.contains("language-graphviz")||w.classList.contains("language-math")||w.classList.contains("language-smiles")||w.style.maxHeight.indexOf("px")>-1||m.classList.contains("vditor-preview")&&S>5)}).forEach(function(w){var S,k,C,T=w.innerText;if(w.classList.contains("highlight-chroma")){var A=w.cloneNode(!0);A.querySelectorAll(".highlight-ln").forEach(function(z){z.remove()}),T=A.innerText}else T.endsWith(`
`)&&(T=T.substr(0,T.length-1));var M='<svg><use xlink:href="#vditor-icon-copy"></use></svg>';document.getElementById("vditorIconScript")||(M='<svg viewBox="0 0 32 32"><path d="M22.545-0h-17.455c-1.6 0-2.909 1.309-2.909 2.909v20.364h2.909v-20.364h17.455v-2.909zM26.909 5.818h-16c-1.6 0-2.909 1.309-2.909 2.909v20.364c0 1.6 1.309 2.909 2.909 2.909h16c1.6 0 2.909-1.309 2.909-2.909v-20.364c0-1.6-1.309-2.909-2.909-2.909zM26.909 29.091h-16v-20.364h16v20.364z"></path></svg>');var y=document.createElement("div");y.className="vditor-copy",y.innerHTML='<span aria-label="'.concat(((S=window.VditorI18n)===null||S===void 0?void 0:S.copy)||"复制",`"
onmouseover="this.setAttribute('aria-label', '`).concat(((k=window.VditorI18n)===null||k===void 0?void 0:k.copy)||"复制",`')"
class="vditor-tooltipped vditor-tooltipped__w"
onclick="event.stopPropagation();this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '`).concat(((C=window.VditorI18n)===null||C===void 0?void 0:C.copied)||"已复制",`');this.previousElementSibling.blur()">`).concat(M,"</span>");var N=document.createElement("textarea");N.value=(0,v.X)(T),y.insertAdjacentElement("afterbegin",N),x&&x.renderMenu&&x.renderMenu(w,y),w.before(y),w.style.maxHeight=window.outerHeight-40+"px",w.insertAdjacentHTML("afterend",'<span style="position: absolute">'.concat(b.g.ZWSP,"</span>"))})}},325:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.flowchartRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/flowchart.js/flowchart.min.js"),"vditorFlowchartScript").then(function(){S.forEach(function(k){if(k.getAttribute("data-processed")!=="true"){var C=flowchart.parse(g.flowchartRenderAdapter.getCode(k));k.innerHTML="",C.drawSVG(k),k.setAttribute("data-processed","true")}})})}},483:(h,c,p)=>{p.d(c,{v:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.graphvizRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/graphviz/viz.js"),"vditorGraphVizScript").then(function(){S.forEach(function(k){var C=g.graphvizRenderAdapter.getCode(k);if(!(k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre"))&&!(k.getAttribute("data-processed")==="true"||C.trim()==="")){try{var T=new Blob(["importScripts('".concat(document.getElementById("vditorGraphVizScript").src.replace("viz.js","full.render.js"),"');")],{type:"application/javascript"}),A=window.URL||window.webkitURL,M=A.createObjectURL(T),y=new Worker(M);new Viz({worker:y}).renderSVGElement(C).then(function(N){k.innerHTML=N.outerHTML}).catch(function(N){k.innerHTML="graphviz render error: <br>".concat(N),k.className="vditor-reset--error"})}catch{}k.setAttribute("data-processed","true")}})})}},999:(h,c,p)=>{p.d(c,{s:()=>m});var v=p(145),b=p(413),g=p(290),m=function(x,w,S){w===void 0&&(w=document),S===void 0&&(S=v.g.CDN);var k=x.style;v.g.CODE_THEME.includes(k)||(k="github");var C=document.getElementById("vditorHljsStyle"),T="".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css");if(C&&C.getAttribute("href")!==T&&C.remove(),(0,g.c)("".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css"),"vditorHljsStyle"),x.enable!==!1){var A=w.querySelectorAll("pre > code");A.length!==0&&(0,b.G)("".concat(S,"/dist/js/highlight.js/highlight.min.js?v=11.7.0"),"vditorHljsScript").then(function(){(0,b.G)("".concat(S,"/dist/js/highlight.js/third-languages.js?v=1.0.1"),"vditorHljsThirdScript").then(function(){w.querySelectorAll("pre > code").forEach(function(M){if(!(M.parentElement.classList.contains("vditor-ir__marker--pre")||M.parentElement.classList.contains("vditor-wysiwyg__pre"))&&!(M.classList.contains("language-mermaid")||M.classList.contains("language-flowchart")||M.classList.contains("language-echarts")||M.classList.contains("language-mindmap")||M.classList.contains("language-plantuml")||M.classList.contains("language-smiles")||M.classList.contains("language-abc")||M.classList.contains("language-graphviz")||M.classList.contains("language-math"))){x.defaultLang!==""&&M.className.indexOf("language-")===-1&&M.classList.add("language-"+x.defaultLang);var y=M.className.replace("language-","");if(window.hljs.getLanguage(y)||(y="plaintext"),M.innerHTML=window.hljs.highlight(M.textContent,{language:y,ignoreIllegals:!0}).value,M.classList.add("hljs"),!!x.lineNumber){M.classList.add("vditor-linenumber");var N=M.querySelector(".vditor-linenumber__temp");N||(N=document.createElement("div"),N.className="vditor-linenumber__temp",M.insertAdjacentElement("beforeend",N));var z=getComputedStyle(M).whiteSpace,F=!1;(z==="pre-wrap"||z==="pre-line")&&(F=!0);var P="",Y=M.textContent.split(/\r\n|\r|\n/g);Y.pop(),Y.map(function(te){var ce="";F&&(N.textContent=te||`
`,ce=' style="height:'.concat(N.getBoundingClientRect().height,'px"')),P+="<span".concat(ce,"></span>")}),N.style.display="none",P='<span class="vditor-linenumber__rows">'.concat(P,"</span>"),M.insertAdjacentHTML("beforeend",P)}}})})})}}},11:(h,c,p)=>{p.d(c,{K:()=>S});var v=p(145),b=p(413),g=p(840),m={},x=function(k,C){var T=k.transform(C),A=Object.keys(T.features).filter(function(F){return!m[F]});A.forEach(function(F){m[F]=!0});var M=k.getAssets(A),y=M.styles,N=M.scripts,z=window.markmap;return y&&z.loadCSS(y),N&&z.loadJS(N),T},w=function(k,C){var T=window.markmap,A=T.Transformer,M=T.Markmap,y=T.deriveOptions;T.globalCSS;var N=new A;k.innerHTML='<svg style="width:100%"></svg>';var z=k.firstChild,F=M.create(z,null),P=x(N,C),Y=P.root,te=P.frontmatter,ce=te==null?void 0:te.markmap,Me=y(ce);F.setData(Y,Me),F.fit()},S=function(k,C){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var T=g.markmapRenderAdapter.getElements(k);T.length!==0&&(0,b.G)("".concat(C,"/dist/js/markmap/markmap.min.js"),"vditorMarkerScript").then(function(){T.forEach(function(A){var M=g.markmapRenderAdapter.getCode(A);if(!(A.getAttribute("data-processed")==="true"||M.trim()==="")){var y=document.createElement("div");y.className="language-markmap",A.parentNode.appendChild(y),w(y,M),A.parentNode.childNodes[0].nodeName=="CODE"&&A.parentNode.removeChild(A.parentNode.childNodes[0])}})})}},472:(h,c,p)=>{p.d(c,{H:()=>w});var v=p(145),b=p(413),g=p(290),m=p(105),x=p(840),w=function(S,k){S===void 0&&(S=document);var C=x.mathRenderAdapter.getElements(S);if(C.length!==0){var T={cdn:v.g.CDN,math:{engine:"KaTeX",inlineDigit:!1,macros:{}}};if(k&&k.math&&(k.math=Object.assign({},T.math,k.math)),k=Object.assign({},T,k),k.math.engine==="KaTeX")(0,g.c)("".concat(k.cdn,"/dist/js/katex/katex.min.css?v=0.16.9"),"vditorKatexStyle"),(0,b.G)("".concat(k.cdn,"/dist/js/katex/katex.min.js?v=0.16.9"),"vditorKatexScript").then(function(){(0,b.G)("".concat(k.cdn,"/dist/js/katex/mhchem.min.js?v=0.16.9"),"vditorKatexChemScript").then(function(){C.forEach(function(y){if(!(y.parentElement.classList.contains("vditor-wysiwyg__pre")||y.parentElement.classList.contains("vditor-ir__marker--pre"))&&!y.getAttribute("data-math")){var N=(0,m.X)(x.mathRenderAdapter.getCode(y));y.setAttribute("data-math",N);try{y.innerHTML=katex.renderToString(N,{displayMode:y.tagName==="DIV",output:"html",macros:k.math.macros})}catch(z){y.innerHTML=z.message,y.className="language-math vditor-reset--error"}y.addEventListener("copy",function(z){z.stopPropagation(),z.preventDefault();var F=z.currentTarget.closest(".language-math");z.clipboardData.setData("text/html",F.innerHTML),z.clipboardData.setData("text/plain",F.getAttribute("data-math"))})}})})});else if(k.math.engine==="MathJax"){var A=function(y){if(y.length!==0){var N=0,z=y[y.length-1],F=function(){var P=y[N++];P===z?P():P(F)};F()}};window.MathJax||(window.MathJax={loader:{paths:{mathjax:"".concat(k.cdn,"/dist/js/mathjax")}},startup:{typeset:!1},tex:{macros:k.math.macros}},Object.assign(window.MathJax,k.math.mathJaxOptions)),(0,b.J)("".concat(k.cdn,"/dist/js/mathjax/tex-svg-full.js"),"protyleMathJaxScript");var M=function(y,N){var z=(0,m.X)(y.textContent).trim(),F=window.MathJax.getMetricsFor(y);F.display=y.tagName==="DIV",window.MathJax.tex2svgPromise(z,F).then(function(P){y.innerHTML="",y.setAttribute("data-math",z),y.append(P),window.MathJax.startup.document.clear(),window.MathJax.startup.document.updateDocument();var Y=P.querySelector('[data-mml-node="merror"]');Y&&Y.textContent.trim()!==""&&(y.innerHTML=Y.textContent.trim(),y.className="vditor-reset--error"),N&&N()})};window.MathJax.startup.promise.then(function(){for(var y=[],N=function(F){var P=C[F];!P.parentElement.classList.contains("vditor-wysiwyg__pre")&&!P.parentElement.classList.contains("vditor-ir__marker--pre")&&!P.getAttribute("data-math")&&(0,m.X)(P.textContent).trim()&&y.push(function(Y){F===C.length-1?M(P):M(P,Y)})},z=0;z<C.length;z++)N(z);A(y)})}}}},280:(h,c,p)=>{p.d(c,{Y:()=>x});var v=p(494),b=function(w,S){w.insertAdjacentHTML("afterend",'<video controls="controls" src="'.concat(S,'"></video>')),w.remove()},g=function(w,S){w.insertAdjacentHTML("afterend",'<audio controls="controls" src="'.concat(S,'"></audio>')),w.remove()},m=function(w,S){var k=S.match(/\/\/(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?/),C=S.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),T=S.match(/\/\/v\.qq\.com\/x\/cover\/.*\/([^\/]+)\.html\??.*/),A=S.match(/(?:www\.|\/\/)coub\.com\/view\/(\w+)/),M=S.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/),y=S.match(/.+dailymotion.com\/(video|hub)\/(\w+)\?/),N=S.match(/(?:www\.|\/\/)bilibili\.com\/video\/(\w+)/),z=S.match(/(?:www\.|\/\/)ted\.com\/talks\/(\w+)/);if(k&&k[1].length===11)w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//www.youtube.com/embed/'.concat(k[1]+(k[2]?"?start="+k[2]:""),'"></iframe>')),w.remove();else if(C&&C[1])w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//player.youku.com/embed/'.concat(C[1],'"></iframe>')),w.remove();else if(T&&T[1])w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="https://v.qq.com/txp/iframe/player.html?vid='.concat(T[1],'"></iframe>')),w.remove();else if(A&&A[1])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
src="//coub.com/embed/`.concat(A[1],'?muted=false&autostart=false&originalSize=true&startWithHD=true"></iframe>')),w.remove();else if(M&&M[0])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
src="https://www.facebook.com/plugins/video.php?href=`.concat(encodeURIComponent(M[0]),'"></iframe>')),w.remove();else if(y&&y[2])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
src="https://www.dailymotion.com/embed/video/`.concat(y[2],'"></iframe>')),w.remove();else if(S.indexOf("bilibili.com")>-1&&(S.indexOf("bvid=")>-1||N&&N[1])){var F={bvid:(0,v.on)("bvid",S)||N&&N[1],page:"1",high_quality:"1",as_wide:"1",allowfullscreen:"true",autoplay:"0"};new URL(S.startsWith("http")?S:"https:"+S).search.split("&").forEach(function(te,ce){if(te){ce===0&&(te=te.substr(1));var Me=te.split("=");F[Me[0]]=Me[1]}});var P="https://player.bilibili.com/player.html?",Y=Object.keys(F);Y.forEach(function(te,ce){P+="".concat(te,"=").concat(F[te]),ce<Y.length-1&&(P+="&")}),w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="'.concat(P,'"></iframe>')),w.remove()}else z&&z[1]&&(w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//embed.ted.com/talks/'.concat(z[1],'"></iframe>')),w.remove())},x=function(w){w&&w.querySelectorAll("a").forEach(function(S){var k=S.getAttribute("href");k&&(k.match(/^.+.(mp4|m4v|ogg|ogv|webm)$/)?b(S,k):k.match(/^.+.(mp3|wav|flac)$/)?g(S,k):m(S,k))})}},637:(h,c,p)=>{p.d(c,{i:()=>S});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(k,C,T,A){function M(y){return y instanceof T?y:new T(function(N){N(y)})}return new(T||(T=Promise))(function(y,N){function z(Y){try{P(A.next(Y))}catch(te){N(te)}}function F(Y){try{P(A.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,F)}P((A=A.apply(k,C||[])).next())})},w=function(k,C){var T={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},A,M,y,N;return N={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function z(P){return function(Y){return F([P,Y])}}function F(P){if(A)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(T=0)),T;)try{if(A=1,M&&(y=P[0]&2?M.return:P[0]?M.throw||((y=M.return)&&y.call(M),0):M.next)&&!(y=y.call(M,P[1])).done)return y;switch(M=0,y&&(P=[P[0]&2,y.value]),P[0]){case 0:case 1:y=P;break;case 4:return T.label++,{value:P[1],done:!1};case 5:T.label++,M=P[1],P=[0];continue;case 7:P=T.ops.pop(),T.trys.pop();continue;default:if(y=T.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){T=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){T.label=P[1];break}if(P[0]===6&&T.label<y[1]){T.label=y[1],y=P;break}if(y&&T.label<y[2]){T.label=y[2],T.ops.push(P);break}y[2]&&T.ops.pop(),T.trys.pop();continue}P=C.call(k,T)}catch(Y){P=[6,Y],M=0}finally{A=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,T){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.mermaidRenderAdapter.getElements(k);A.length!==0&&(0,b.G)("".concat(C,"/dist/js/mermaid/mermaid.min.js?v=11.6.0"),"vditorMermaidScript").then(function(){var M={securityLevel:"loose",altFontFamily:"sans-serif",fontFamily:"sans-serif",startOnLoad:!1,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequence:{useMaxWidth:!0,diagramMarginX:8,diagramMarginY:8,boxMargin:8,showSequenceNumbers:!0},gantt:{leftPadding:75,rightPadding:20}};T==="dark"&&(M.theme="dark"),mermaid.initialize(M),A.forEach(function(y){return x(void 0,void 0,void 0,function(){var N,z,F,P,Y;return w(this,function(te){switch(te.label){case 0:if(N=g.mermaidRenderAdapter.getCode(y),y.getAttribute("data-processed")==="true"||N.trim()==="")return[2];z="mermaid"+(0,m.Wb)(),te.label=1;case 1:return te.trys.push([1,3,,4]),[4,mermaid.render(z,y.textContent)];case 2:return F=te.sent(),y.innerHTML=F.svg,[3,4];case 3:return P=te.sent(),Y=document.querySelector("#"+z),y.innerHTML="".concat(Y.outerHTML,`<br>
<div style="text-align: left"><small>`).concat(P.message.replace(/\n/,"<br>"),"</small></div>"),Y.parentElement.remove(),[3,4];case 4:return y.setAttribute("data-processed","true"),[2]}})})})})}},194:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w,S){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var k=g.mindmapRenderAdapter.getElements(x);k.length>0&&(0,b.G)("".concat(w,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){k.forEach(function(C){if(!(C.parentElement.classList.contains("vditor-wysiwyg__pre")||C.parentElement.classList.contains("vditor-ir__marker--pre"))){var T=g.mindmapRenderAdapter.getCode(C);if(T)try{if(C.getAttribute("data-processed")==="true")return;echarts.init(C,S==="dark"?"dark":void 0).setOption({series:[{data:[JSON.parse(decodeURIComponent(T))],initialTreeDepth:-1,itemStyle:{borderWidth:0,color:"#4285f4"},label:{backgroundColor:"#f6f8fa",borderColor:"#d1d5da",borderRadius:5,borderWidth:.5,color:"#586069",lineHeight:20,offset:[-5,0],padding:[0,5],position:"insideRight"},lineStyle:{color:"#d1d5da",width:1},roam:!0,symbol:function(A,M){var y;return!((y=M==null?void 0:M.data)===null||y===void 0)&&y.children?"circle":"path://"},type:"tree"}],tooltip:{trigger:"item",triggerOn:"mousemove"}}),C.setAttribute("data-processed","true")}catch(A){C.className="vditor-reset--error",C.innerHTML="mindmap render error: <br>".concat(A)}}})})}},436:(h,c,p)=>{p.d(c,{k:()=>g});var v=p(771),b=p(472),g=function(m,x,w){var S="",k=[];if(Array.from(m.children).forEach(function(M,y){if((0,v.W)(M)){if(w){var N=M.id.lastIndexOf("_");M.id=M.id.substring(0,N===-1?void 0:N)+"_"+y}k.push(M.id),S+=M.outerHTML.replace("<wbr>","")}}),S==="")return x.innerHTML="","";var C=document.createElement("div");if(w)w.lute.SetToC(!0),w.currentMode==="wysiwyg"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorDOM("<p>[ToC]</p>"+S):w.currentMode==="ir"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorIRDOM("<p>[ToC]</p>"+S):C.innerHTML=w.lute.HTML2VditorDOM("<p>[ToC]</p>"+S),w.lute.SetToC(w.options.preview.markdown.toc);else{x.classList.add("vditor-outline");var T=Lute.New();T.SetToC(!0),C.innerHTML=T.HTML2VditorDOM("<p>[ToC]</p>"+S)}var A=C.firstElementChild.querySelectorAll("li > span[data-target-id]");return A.forEach(function(M,y){if(M.nextElementSibling&&M.nextElementSibling.tagName==="UL"){var N="<svg class='vditor-outline__action'><use xlink:href='#vditor-icon-down'></use></svg>";document.getElementById("vditorIconScript")||(N='<svg class="vditor-outline__action" viewBox="0 0 32 32"><path d="M3.76 6.12l12.24 12.213 12.24-12.213 3.76 3.76-16 16-16-16 3.76-3.76z"></path></svg>'),M.innerHTML="".concat(N,"<span>").concat(M.innerHTML,"</span>")}else M.innerHTML="<svg></svg><span>".concat(M.innerHTML,"</span>");M.setAttribute("data-target-id",k[y])}),S=C.firstElementChild.innerHTML,A.length===0?(x.innerHTML="",S):(x.innerHTML=S,w&&(0,b.H)(x,{cdn:w.options.cdn,math:w.options.preview.math}),x.firstElementChild.addEventListener("click",function(M){for(var y=M.target;y&&!y.isEqualNode(x);){if(y.classList.contains("vditor-outline__action")){y.classList.contains("vditor-outline__action--close")?(y.classList.remove("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:block")):(y.classList.add("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:none")),M.preventDefault(),M.stopPropagation();break}else if(y.getAttribute("data-target-id")){M.preventDefault(),M.stopPropagation();var N=document.getElementById(y.getAttribute("data-target-id"));if(!N)return;if(w)if(w.options.height==="auto"){var z=N.offsetTop+w.element.offsetTop;w.options.toolbarConfig.pin||(z+=w.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,z)}else w.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,w.element.offsetTop),w.preview.element.contains(m)?m.parentElement.scrollTop=N.offsetTop:m.scrollTop=N.offsetTop;else window.scrollTo(window.scrollX,N.offsetTop);break}y=y.parentElement}}),S)}},229:(h,c,p)=>{p.d(c,{B:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var S=g.plantumlRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/plantuml/plantuml-encoder.min.js"),"vditorPlantumlScript").then(function(){S.forEach(function(k){if(!(k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre"))){var C=g.plantumlRenderAdapter.getCode(k).trim();if(C)try{k.innerHTML='<object type="image/svg+xml" data="https://www.plantuml.com/plantuml/svg/~1'.concat(plantumlEncoder.encode(C),'"/>')}catch(T){k.className="vditor-reset--error",k.innerHTML="plantuml render error: <br>".concat(T)}}})})}},214:(h,c,p)=>{p.d(c,{X:()=>v});var v=function(b){var g=Lute.New();return g.PutEmojis(b.emojis),g.SetEmojiSite(b.emojiSite),g.SetHeadingAnchor(b.headingAnchor),g.SetInlineMathAllowDigitAfterOpenMarker(b.inlineMathDigit),g.SetAutoSpace(b.autoSpace),g.SetToC(b.toc),g.SetFootnotes(b.footnotes),g.SetFixTermTypo(b.fixTermTypo),g.SetVditorCodeBlockPreview(b.codeBlockPreview),g.SetVditorMathBlockPreview(b.mathBlockPreview),g.SetSanitize(b.sanitize),g.SetChineseParagraphBeginningSpace(b.paragraphBeginningSpace),g.SetRenderListStyle(b.listStyle),g.SetLinkBase(b.linkBase),g.SetLinkPrefix(b.linkPrefix),g.SetMark(b.mark),g.SetGFMAutoLink(b.gfmAutoLink),b.lazyLoadImage&&g.SetImageLazyLoading(b.lazyLoadImage),g}},190:(h,c,p)=>{p.d(c,{E:()=>v});var v=function(b,g,m){m===void 0&&(m="classic");var x=b.getBoundingClientRect(),w=36;document.body.insertAdjacentHTML("beforeend",'<div class="vditor vditor-img'.concat(m==="dark"?" vditor--dark":"",`">
<div class="vditor-img__bar">
<span class="vditor-img__btn" data-deg="0">
<svg><use xlink:href="#vditor-icon-redo"></use></svg>
`).concat(window.VditorI18n.spin,`
</span>
<span class="vditor-img__btn" onclick="this.parentElement.parentElement.outerHTML = '';document.body.style.overflow = ''">
X &nbsp;`).concat(window.VditorI18n.close,`
</span>
</div>
<div class="vditor-img__img" onclick="this.parentElement.outerHTML = '';document.body.style.overflow = ''">
<img style="width: `).concat(b.width,"px;height:").concat(b.height,"px;transform: translate3d(").concat(x.left,"px, ").concat(x.top-w,'px, 0)" src="').concat(b.getAttribute("src"),`">
</div>
</div>`)),document.body.style.overflow="hidden";var S=document.querySelector(".vditor-img img"),k="translate3d(".concat(Math.max(0,window.innerWidth-b.naturalWidth)/2,"px, ").concat(Math.max(0,window.innerHeight-w-b.naturalHeight)/2,"px, 0)");setTimeout(function(){S.setAttribute("style","transition: transform .3s ease-in-out;transform: ".concat(k)),setTimeout(function(){S.parentElement.scrollTo((S.parentElement.scrollWidth-S.parentElement.clientWidth)/2,(S.parentElement.scrollHeight-S.parentElement.clientHeight)/2)},400)});var C=document.querySelector(".vditor-img__btn");C.addEventListener("click",function(){var T=parseInt(C.getAttribute("data-deg"),10)+90;T/90%2===1&&b.naturalWidth>S.parentElement.clientHeight?S.style.transform="translate3d(".concat(Math.max(0,window.innerWidth-b.naturalWidth)/2,"px, ").concat(b.naturalWidth/2-b.naturalHeight/2,"px, 0) rotateZ(").concat(T,"deg)"):S.style.transform="".concat(k," rotateZ(").concat(T,"deg)"),C.setAttribute("data-deg",T.toString()),setTimeout(function(){S.parentElement.scrollTo((S.parentElement.scrollWidth-S.parentElement.clientWidth)/2,(S.parentElement.scrollHeight-S.parentElement.clientHeight)/2)},400)})}},580:(h,c,p)=>{p.d(c,{Y:()=>g});var v=p(145),b=p(290),g=function(m,x){x===void 0&&(x=v.g.CDN),v.g.CODE_THEME.includes(m)||(m="github");var w=document.getElementById("vditorHljsStyle"),S="".concat(x,"/dist/js/highlight.js/styles/").concat(m,".min.css");w?w.getAttribute("href")!==S&&(w.remove(),(0,b.c)(S,"vditorHljsStyle")):(0,b.c)(S,"vditorHljsStyle")}},538:(h,c,p)=>{p.d(c,{Z:()=>b});var v=p(290),b=function(g,m){if(!(!g||!m)){var x=document.getElementById("vditorContentTheme"),w="".concat(m,"/").concat(g,".css");x?x.getAttribute("href")!==w&&(x.remove(),(0,v.c)(w,"vditorContentTheme")):(0,v.c)(w,"vditorContentTheme")}}},413:(h,c,p)=>{p.d(c,{J:()=>v,G:()=>b});var v=function(g,m){if(document.getElementById(m))return!1;var x=new XMLHttpRequest;x.open("GET",g,!1),x.setRequestHeader("Accept","text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01"),x.send("");var w=document.createElement("script");w.type="text/javascript",w.text=x.responseText,w.id=m,document.head.appendChild(w)},b=function(g,m){return new Promise(function(x,w){if(document.getElementById(m))return x(!0),!1;var S=document.createElement("script");S.src=g,S.async=!0,document.head.appendChild(S),S.onerror=function(k){w(k)},S.onload=function(){if(document.getElementById(m))return S.remove(),x(!0),!1;S.id=m,x(!0)}})}},290:(h,c,p)=>{p.d(c,{c:()=>v});var v=function(b,g){if(!document.getElementById(g)){var m=document.createElement("link");m.id=g,m.rel="stylesheet",m.type="text/css",m.href=b,document.getElementsByTagName("head")[0].appendChild(m)}}},105:(h,c,p)=>{p.d(c,{X:()=>v});var v=function(b){return b.replace(/\u00a0/g," ")}},410:(h,c,p)=>{p.d(c,{G6:()=>v,vU:()=>b,pK:()=>g,Le:()=>m,yl:()=>x,ns:()=>w,i7:()=>S});var v=function(){return navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")===-1},b=function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1},g=function(){try{return typeof localStorage<"u"}catch{return!1}},m=function(){return navigator.userAgent.indexOf("iPhone")>-1?"touchstart":"click"},x=function(k){return navigator.platform.toUpperCase().indexOf("MAC")>=0?!!(k.metaKey&&!k.ctrlKey):!!(!k.metaKey&&k.ctrlKey)},w=function(k){return/Mac/.test(navigator.platform)||navigator.platform==="iPhone"?k.indexOf("⇧")>-1&&b()&&(k=k.replace(";",":").replace("=","+").replace("-","_")):(k.startsWith("⌘")?k=k.replace("⌘","⌘+"):k.startsWith("⌥")&&k.substr(1,1)!=="⌘"?k=k.replace("⌥","⌥+"):k=k.replace("⇧⌘","⌘+⇧+").replace("⌥⌘","⌥+⌘+"),k=k.replace("⌘","Ctrl").replace("⇧","Shift").replace("⌥","Alt"),k.indexOf("Shift")>-1&&(k=k.replace(";",":").replace("=","+").replace("-","_"))),k},S=function(){return/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}},494:(h,c,p)=>{p.d(c,{Wb:()=>v,on:()=>b,Qf:()=>g});var v=function(){return([1e7].toString()+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(m){return(parseInt(m,10)^window.crypto.getRandomValues(new Uint32Array(1))[0]&15>>parseInt(m,10)/4).toString(16)})},b=function(m,x){x===void 0&&(x=window.location.search);var w=x.substring(x.indexOf("?")),S=w.indexOf("#"),k=new URLSearchParams(w.substring(0,S>=0?S:void 0));return k.get(m)},g=function(m){return Function('"use strict";return ('.concat(m,")"))()}},106:(h,c,p)=>{p.d(c,{JQ:()=>b,E2:()=>g,O9:()=>m,a1:()=>x,F9:()=>w,lG:()=>S,fb:()=>k,DX:()=>C});var v=p(771),b=function(T,A){for(var M=k(T,A),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=k(M.parentElement,A),y?M=y:N=!0;return M||!1},g=function(T,A){for(var M=(0,v.S)(T,A),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=(0,v.S)(M.parentElement,A),y?M=y:N=!0;return M||!1},m=function(T){var A=g(T,"UL"),M=g(T,"OL"),y=A;return M&&(!A||A&&M.contains(A))&&(y=M),y},x=function(T,A,M){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var y=T,N=!1;y&&!N&&!y.classList.contains("vditor-reset");)y.getAttribute(A)===M?N=!0:y=y.parentElement;return N&&y},w=function(T){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);var A=T,M=!1,y=x(T,"data-block","0");if(y)return y;for(;A&&!M&&!A.classList.contains("vditor-reset");)A.tagName==="H1"||A.tagName==="H2"||A.tagName==="H3"||A.tagName==="H4"||A.tagName==="H5"||A.tagName==="H6"||A.tagName==="P"||A.tagName==="BLOCKQUOTE"||A.tagName==="OL"||A.tagName==="UL"?M=!0:A=A.parentElement;return M&&A},S=function(T,A){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var M=T,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.nodeName===A?y=!0:M=M.parentElement;return y&&M},k=function(T,A){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var M=T,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.classList.contains(A)?y=!0:M=M.parentElement;return y&&M},C=function(T){for(;T&&T.lastChild;)T=T.lastChild;return T}},771:(h,c,p)=>{p.d(c,{S:()=>v,W:()=>b});var v=function(g,m){if(!g)return!1;g.nodeType===3&&(g=g.parentElement);for(var x=g,w=!1;x&&!w&&!x.classList.contains("vditor-reset");)x.nodeName.indexOf(m)===0?w=!0:x=x.parentElement;return w&&x},b=function(g){var m=v(g,"H");return m&&m.tagName.length===2&&m.tagName!=="HR"?m:!1}},673:(h,c,p)=>{p.d(c,{T:()=>v});var v=function(){for(var b=[],g=0;g<arguments.length;g++)b[g]=arguments[g];for(var m={},x=function(S){for(var k in S)S.hasOwnProperty(k)&&(Object.prototype.toString.call(S[k])==="[object Object]"?m[k]=v(m[k],S[k]):m[k]=S[k])},w=0;w<b.length;w++)x(b[w]);return m}},810:(h,c,p)=>{p.d(c,{zh:()=>m,Ny:()=>x,Gb:()=>w,Hc:()=>S,im:()=>k,$j:()=>C,ib:()=>T,oC:()=>A});var v=p(145),b=p(410),g=p(106),m=function(M){var y,N=M[M.currentMode].element;return getSelection().rangeCount>0&&(y=getSelection().getRangeAt(0),N.isEqualNode(y.startContainer)||N.contains(y.startContainer))?y:M[M.currentMode].range?M[M.currentMode].range:(N.focus(),y=N.ownerDocument.createRange(),y.setStart(N,0),y.collapse(!0),y)},x=function(M){var y=window.getSelection().getRangeAt(0);if(!M.contains(y.startContainer)&&!(0,g.fb)(y.startContainer,"vditor-panel--none"))return{left:0,top:0};var N=M.parentElement.getBoundingClientRect(),z;if(y.getClientRects().length===0)if(y.startContainer.nodeType===3){var F=y.startContainer.parentElement;if(F&&F.getClientRects().length>0)z=F.getClientRects()[0];else return{left:0,top:0}}else{var P=y.startContainer.children;if(P[y.startOffset]&&P[y.startOffset].getClientRects().length>0)z=P[y.startOffset].getClientRects()[0];else if(y.startContainer.childNodes.length>0){var Y=y.cloneRange();y.selectNode(y.startContainer.childNodes[Math.max(0,y.startOffset-1)]),z=y.getClientRects()[0],y.setEnd(Y.endContainer,Y.endOffset),y.setStart(Y.startContainer,Y.startOffset)}else z=y.startContainer.getClientRects()[0];if(!z){for(var te=y.startContainer.childNodes[y.startOffset];!te.getClientRects||te.getClientRects&&te.getClientRects().length===0;)te=te.parentElement;z=te.getClientRects()[0]}}else z=y.getClientRects()[0];return{left:z.left-N.left,top:z.top-N.top}},w=function(M,y){if(!y){if(getSelection().rangeCount===0)return!1;y=getSelection().getRangeAt(0)}var N=y.commonAncestorContainer;return M.isEqualNode(N)||M.contains(N)},S=function(M){var y=window.getSelection();y.removeAllRanges(),y.addRange(M)},k=function(M,y,N){var z={end:0,start:0};if(!N){if(getSelection().rangeCount===0)return z;N=window.getSelection().getRangeAt(0)}if(w(y,N)){var F=N.cloneRange();M.childNodes[0]&&M.childNodes[0].childNodes[0]?F.setStart(M.childNodes[0].childNodes[0],0):F.selectNodeContents(M),F.setEnd(N.startContainer,N.startOffset),z.start=F.toString().length,z.end=z.start+N.toString().length}return z},C=function(M,y,N){var z=0,F=0,P=N.childNodes[F],Y=!1,te=!1;M=Math.max(0,M),y=Math.max(0,y);var ce=N.ownerDocument.createRange();for(ce.setStart(P||N,0),ce.collapse(!0);!te&&P;){var Me=z+P.textContent.length;if(!Y&&M>=z&&M<=Me&&(M===0?ce.setStart(P,0):P.childNodes[0].nodeType===3?ce.setStart(P.childNodes[0],M-z):P.nextSibling?ce.setStartBefore(P.nextSibling):ce.setStartAfter(P),Y=!0,M===y)){te=!0;break}Y&&y>=z&&y<=Me&&(y===0?ce.setEnd(P,0):P.childNodes[0].nodeType===3?ce.setEnd(P.childNodes[0],y-z):P.nextSibling?ce.setEndBefore(P.nextSibling):ce.setEndAfter(P),te=!0),z=Me,P=N.childNodes[++F]}return!te&&N.childNodes[F-1]&&ce.setStartBefore(N.childNodes[F-1]),S(ce),ce},T=function(M,y){var N=M.querySelector("wbr");if(N){if(!N.previousElementSibling)N.previousSibling?y.setStart(N.previousSibling,N.previousSibling.textContent.length):N.nextSibling?N.nextSibling.nodeType===3?y.setStart(N.nextSibling,0):y.setStartBefore(N.nextSibling):y.setStart(N.parentElement,0);else if(N.previousElementSibling.isSameNode(N.previousSibling))if(N.previousElementSibling.lastChild){y.setStartBefore(N),y.collapse(!0),S(y),(0,b.i7)()&&(N.previousElementSibling.tagName==="EM"||N.previousElementSibling.tagName==="STRONG"||N.previousElementSibling.tagName==="S")&&(y.insertNode(document.createTextNode(v.g.ZWSP)),y.collapse(!1)),N.remove();return}else y.setStartAfter(N.previousElementSibling);else y.setStart(N.previousSibling,N.previousSibling.textContent.length);y.collapse(!0),N.remove(),S(y)}},A=function(M,y){var N=document.createElement("div");N.innerHTML=M;var z=N.querySelectorAll("p");z.length===1&&!z[0].previousSibling&&!z[0].nextSibling&&y[y.currentMode].element.children.length>0&&N.firstElementChild.tagName==="P"&&(M=z[0].innerHTML.trim());var F=document.createElement("div");F.innerHTML=M;var P=m(y);if(P.toString()!==""&&(y[y.currentMode].preventInput=!0,document.execCommand("delete",!1,"")),F.firstElementChild&&F.firstElementChild.getAttribute("data-block")==="0"){F.lastElementChild.insertAdjacentHTML("beforeend","<wbr>");var Y=(0,g.F9)(P.startContainer);if(!Y)y[y.currentMode].element.insertAdjacentHTML("beforeend",F.innerHTML);else{var te=(0,g.lG)(P.startContainer,"LI");te&&F.firstElementChild.tagName==="UL"?te.insertAdjacentHTML("afterend",F.firstElementChild.innerHTML):Y.insertAdjacentHTML("afterend",F.innerHTML)}T(y[y.currentMode].element,P)}else{var ce=document.createElement("template");ce.innerHTML=M,P.insertNode(ce.content.cloneNode(!0)),P.collapse(!1),S(P)}}}},r={};function o(h){var c=r[h];if(c!==void 0)return c.exports;var p=r[h]={exports:{}};return n[h](p,p.exports,o),p.exports}o.d=(h,c)=>{for(var p in c)o.o(c,p)&&!o.o(h,p)&&Object.defineProperty(h,p,{enumerable:!0,get:c[p]})},o.o=(h,c)=>Object.prototype.hasOwnProperty.call(h,c),o.r=h=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})};var l={};return(()=>{o.d(l,{default:()=>Nd});var h=o(408),c=o(145),p=o(105),v=function(i){return i.currentMode==="sv"?(0,p.X)("".concat(i.sv.element.textContent,`
`).replace(/\n\n$/,`
`)):i.currentMode==="wysiwyg"?i.lute.VditorDOM2Md(i.wysiwyg.element.innerHTML):i.currentMode==="ir"?i.lute.VditorIRDOM2Md(i.ir.element.innerHTML):""},b=o(413),g=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-devtools",this.element.innerHTML='<div class="vditor-reset--error"></div><div style="height: 100%;"></div>'}return i.prototype.renderEchart=function(a){var s=this;a.devtools.element.style.display==="block"&&(0,b.G)("".concat(a.options.cdn,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){s.ASTChart||(s.ASTChart=echarts.init(a.devtools.element.lastElementChild));try{s.element.lastElementChild.style.display="block",s.element.firstElementChild.innerHTML="",s.ASTChart.setOption({series:[{data:JSON.parse(a.lute.RenderEChartsJSON(v(a))),initialTreeDepth:-1,label:{align:"left",backgroundColor:"rgba(68, 77, 86, .68)",borderRadius:3,color:"#d1d5da",fontSize:12,lineHeight:12,offset:[9,12],padding:[2,4,2,4],position:"top",verticalAlign:"middle"},lineStyle:{color:"#4285f4",type:"curve",width:1},orient:"vertical",roam:!0,type:"tree"}],toolbox:{bottom:25,emphasis:{iconStyle:{color:"#4285f4"}},feature:{restore:{show:!0},saveAsImage:{show:!0}},right:15,show:!0}}),s.ASTChart.resize()}catch(u){s.element.lastElementChild.style.display="none",s.element.firstElementChild.innerHTML=u}})},i}(),m=o(410),x=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains("vditor-menu--current")&&u.classList.remove("vditor-menu--current")}})},w=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains("vditor-menu--current")&&u.classList.add("vditor-menu--current")}})},S=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.remove(c.g.CLASS_MENU_DISABLED)}})},k=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.add(c.g.CLASS_MENU_DISABLED)}})},C=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="none")})},T=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="block")})},A=function(i,a,s){a.includes("subToolbar")&&(i.toolbar.element.querySelectorAll(".vditor-hint").forEach(function(u){s&&u.isEqualNode(s)||(u.style.display="none")}),i.toolbar.elements.emoji&&(i.toolbar.elements.emoji.lastElementChild.style.display="none")),a.includes("hint")&&(i.hint.element.style.display="none"),i.wysiwyg.popover&&a.includes("popover")&&(i.wysiwyg.popover.style.display="none")},M=function(i,a,s,u){s.addEventListener((0,m.Le)(),function(d){d.preventDefault(),d.stopPropagation(),!s.classList.contains(c.g.CLASS_MENU_DISABLED)&&(i.toolbar.element.querySelectorAll(".vditor-hint--current").forEach(function(f){f.classList.remove("vditor-hint--current")}),a.style.display==="block"?a.style.display="none":(A(i,["subToolbar","hint","popover"],s.parentElement.parentElement),s.classList.contains("vditor-tooltipped")||s.classList.add("vditor-hint--current"),a.style.display="block",i.toolbar.element.getBoundingClientRect().right-s.getBoundingClientRect().right<250?a.classList.add("vditor-panel--left"):a.classList.remove("vditor-panel--left")))})},y=o(106),N=o(771),z=function(i,a,s,u){},F=o(135),P=o(775),Y=o(428),te=o(325),ce=o(483),Me=o(999),Fe=o(472),We=o(637),rt=o(11),je=o(194),Ne=o(229),nt=o(825),ct=function(i,a,s){s===void 0&&(s="sv");var u=document.createElement("div");u.innerHTML=i;var d=!1;u.childElementCount===1&&u.lastElementChild.style.fontFamily.indexOf("monospace")>-1&&(d=!0);var f=u.querySelectorAll("pre");if(u.childElementCount===1&&f.length===1&&f[0].className!=="vditor-wysiwyg"&&f[0].className!=="vditor-sv"&&(d=!0),i.indexOf(`
<p class="p1">`)===0&&(d=!0),u.childElementCount===1&&u.firstElementChild.tagName==="TABLE"&&u.querySelector(".line-number")&&u.querySelector(".line-content")&&(d=!0),d){var E=a||i;return/\n/.test(E)||f.length===1?s==="wysiwyg"?'<div class="vditor-wysiwyg__block" data-block="0" data-type="code-block"><pre><code>'.concat(E.replace(/&/g,"&amp;").replace(/</g,"&lt;"),"<wbr></code></pre></div>"):"\n```\n"+E.replace(/&/g,"&amp;").replace(/</g,"&lt;")+"\n```":s==="wysiwyg"?"<code>".concat(E.replace(/&/g,"&amp;").replace(/</g,"&lt;"),"</code><wbr>"):"`".concat(E,"`")}return!1},tt=function(i,a){if(i){if(i.parentElement.getAttribute("data-type")==="html-block"){i.setAttribute("data-render","1");return}var s=i.firstElementChild.className.replace("language-","");if(s==="abc")(0,F.Q)(i,a.options.cdn);else if(s==="mermaid")(0,We.i)(i,a.options.cdn,a.options.theme);else if(s==="smiles")(0,nt.J)(i,a.options.cdn,a.options.theme);else if(s==="markmap")(0,rt.K)(i,a.options.cdn);else if(s==="flowchart")(0,te.P)(i,a.options.cdn);else if(s==="echarts")(0,P.p)(i,a.options.cdn,a.options.theme);else if(s==="mindmap")(0,je.P)(i,a.options.cdn,a.options.theme);else if(s==="plantuml")(0,Ne.B)(i,a.options.cdn);else if(s==="graphviz")(0,ce.v)(i,a.options.cdn);else if(s==="math")(0,Fe.H)(i,{cdn:a.options.cdn,math:a.options.preview.math});else{var u=a.options.customRenders.find(function(d){if(d.language===s)return d.render(i,a),!0});u||((0,Me.s)(Object.assign({},a.options.preview.hljs),i,a.options.cdn),(0,Y.O)(i,a.options.preview.hljs))}i.setAttribute("data-render","1")}},q=o(810),Ht=function(i){if(i.currentMode!=="sv"){var a=i[i.currentMode].element,s=i.outline.render(i);s===""&&(s="[ToC]"),a.querySelectorAll('[data-type="toc-block"]').forEach(function(u){u.innerHTML=s,(0,Fe.H)(u,{cdn:i.options.cdn,math:i.options.preview.math})})}},Rt=function(i,a){var s=(0,y.lG)(i.target,"SPAN");if(s&&(0,y.fb)(s,"vditor-toc")){var u=a[a.currentMode].element.querySelector("#"+s.getAttribute("data-target-id"));if(u)if(a.options.height==="auto"){var d=u.offsetTop+a.element.offsetTop;a.options.toolbarConfig.pin||(d+=a.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,d)}else a.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,a.element.offsetTop),a[a.currentMode].element.scrollTop=u.offsetTop;return}},$t=function(i,a,s,u){if(i.previousElementSibling&&i.previousElementSibling.classList.contains("vditor-toc")){if(s.key==="Backspace"&&(0,q.im)(i,a[a.currentMode].element,u).start===0)return i.previousElementSibling.remove(),lt(a),!0;if(Pr(a,s,u,i,i.previousElementSibling))return!0}if(i.nextElementSibling&&i.nextElementSibling.classList.contains("vditor-toc")){if(s.key==="Delete"&&(0,q.im)(i,a[a.currentMode].element,u).start>=i.textContent.trimRight().length)return i.nextElementSibling.remove(),lt(a),!0;if(pi(a,s,u,i,i.nextElementSibling))return!0}if(s.key==="Backspace"||s.key==="Delete"){var d=(0,y.fb)(u.startContainer,"vditor-toc");if(d)return d.remove(),lt(a),!0}},Nt=function(i,a,s,u){s===void 0&&(s=!1);var d=(0,y.F9)(a.startContainer);if(d&&!s&&d.getAttribute("data-type")!=="code-block"){if(fo(d.innerHTML)&&d.previousElementSibling||mo(d.innerHTML))return;for(var f=(0,q.im)(d,i.ir.element,a).start,E=!0,L=f-1;L>d.textContent.substr(0,f).lastIndexOf(`
`);L--)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!==" "){E=!1;break}f===0&&(E=!1);for(var D=!0,L=f-1;L<d.textContent.length;L++)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!==`
`){D=!1;break}if(E){typeof i.options.input=="function"&&i.options.input(v(i));return}if(D&&/^#{1,6} $/.test(d.textContent)&&(D=!1),D){var _=(0,y.fb)(a.startContainer,"vditor-ir__marker");if(!_){var B=a.startContainer.previousSibling;B&&B.nodeType!==3&&B.classList.contains("vditor-ir__node--expand")&&B.classList.remove("vditor-ir__node--expand"),typeof i.options.input=="function"&&i.options.input(v(i));return}}}if(i.ir.element.querySelectorAll(".vditor-ir__node--expand").forEach(function(it){it.classList.remove("vditor-ir__node--expand")}),d||(d=i.ir.element),!d.querySelector("wbr")){var K=(0,y.fb)(a.startContainer,"vditor-ir__preview");K?K.previousElementSibling.insertAdjacentHTML("beforeend","<wbr>"):a.insertNode(document.createElement("wbr"))}d.querySelectorAll("[style]").forEach(function(it){it.removeAttribute("style")}),d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.ir.element);var fe=d.isEqualNode(i.ir.element),ve=(0,y.a1)(d,"data-type","footnotes-block"),ue="";if(fe)ue=d.innerHTML;else{var ke=(0,N.S)(a.startContainer,"BLOCKQUOTE"),we=(0,y.O9)(a.startContainer);if(we&&(d=we),ke&&(!we||we&&!ke.contains(we))&&(d=ke),ve&&(d=ve),ue=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var de=d.previousElementSibling,Ie=d.nextElementSibling;de&&(de.tagName==="UL"||de.tagName==="OL")&&(ue=de.outerHTML+ue,de.remove()),Ie&&(Ie.tagName==="UL"||Ie.tagName==="OL")&&(ue=ue+Ie.outerHTML,Ie.remove()),ue=ue.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}else d.previousElementSibling&&d.previousElementSibling.textContent.replace(c.g.ZWSP,"")!==""&&u&&u.inputType==="insertParagraph"&&(ue=d.previousElementSibling.outerHTML+ue,d.previousElementSibling.remove());d.innerText.startsWith("```")||(i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(it){it&&!d.isEqualNode(it)&&(ue+=it.outerHTML,it.remove())}),i.ir.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(it){it&&!d.isEqualNode(it)&&(ue+=it.outerHTML,it.remove())}))}if(z("SpinVditorIRDOM",ue,"argument",i.options.debugger),ue=i.lute.SpinVditorIRDOM(ue),z("SpinVditorIRDOM",ue,"result",i.options.debugger),fe)d.innerHTML=ue;else if(d.outerHTML=ue,ve){var Te=(0,y.a1)(i.ir.element.querySelector("wbr"),"data-type","footnotes-def");if(Te){var $e=Te.textContent,bt=$e.substring(1,$e.indexOf("]:")),gt=i.ir.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(bt,'"]'));gt&&gt.setAttribute("aria-label",$e.substr(bt.length+3).trim().substr(0,24))}}var kt,dn=i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']");dn.forEach(function(it,zt){zt===0?kt=it:(kt.insertAdjacentHTML("beforeend",it.innerHTML),it.remove())}),dn.length>0&&i.ir.element.insertAdjacentElement("beforeend",dn[0]);var Wt,hn=i.ir.element.querySelectorAll("[data-type='footnotes-block']");hn.forEach(function(it,zt){zt===0?Wt=it:(Wt.insertAdjacentHTML("beforeend",it.innerHTML),it.remove())}),hn.length>0&&i.ir.element.insertAdjacentElement("beforeend",hn[0]),(0,q.ib)(i.ir.element,a),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(it){tt(it,i)}),Ht(i),Xn(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},oe=function(i,a){if(i==="")return!1;if(i.indexOf("⇧")===-1&&i.indexOf("⌘")===-1&&i.indexOf("⌥")===-1)return!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&a.code===i;if(i==="⇧Tab")return!!(!(0,m.yl)(a)&&!a.altKey&&a.shiftKey&&a.code==="Tab");var s=i.split("");if(i.startsWith("⌥")){var u=s.length===3?s[2]:s[1];return!!((s.length===3?(0,m.yl)(a):!(0,m.yl)(a))&&a.altKey&&!a.shiftKey&&a.code===(/^[0-9]$/.test(u)?"Digit":"Key")+u)}i==="⌘Enter"&&(s=["⌘","Enter"]);var d=s.length>2&&s[0]==="⇧",f=d?s[2]:s[1];return d&&((0,m.vU)()||!/Mac/.test(navigator.platform))&&(f==="-"?f="_":f==="="&&(f="+")),!!((0,m.yl)(a)&&a.key.toLowerCase()===f.toLowerCase()&&!a.altKey&&(!d&&!a.shiftKey||d&&a.shiftKey))},he=function(i){var a=i.startContainer;if(a.nodeType===3&&a.nodeValue.length!==i.startOffset)return!1;for(var s=a.nextSibling;s&&s.textContent==="";)s=s.nextSibling;if(s){if(s&&s.nodeType!==3&&s.classList.contains("vditor-ir__node")&&!s.getAttribute("data-block"))return s}else{var u=(0,y.fb)(a,"vditor-ir__marker");if(u&&!u.nextSibling){var d=a.parentElement.parentElement.nextSibling;if(d&&d.nodeType!==3&&d.classList.contains("vditor-ir__node"))return d}return!1}return!1},J=function(i){var a=i.startContainer,s=a.previousSibling;return a.nodeType===3&&i.startOffset===0&&s&&s.nodeType!==3&&s.classList.contains("vditor-ir__node")&&!s.getAttribute("data-block")?s:!1},ee=function(i,a){a.ir.element.querySelectorAll(".vditor-ir__node--expand").forEach(function(E){E.classList.remove("vditor-ir__node--expand")});var s=(0,y.JQ)(i.startContainer,"vditor-ir__node"),u=!i.collapsed&&(0,y.JQ)(i.endContainer,"vditor-ir__node");if(!(!i.collapsed&&(!s||s!==u))){s&&(s.classList.add("vditor-ir__node--expand"),s.classList.remove("vditor-ir__node--hidden"),(0,q.Hc)(i));var d=he(i);if(d){d.classList.add("vditor-ir__node--expand"),d.classList.remove("vditor-ir__node--hidden");return}var f=J(i);if(f){f.classList.add("vditor-ir__node--expand"),f.classList.remove("vditor-ir__node--hidden");return}}},Ce=function(i,a){if(i.ir.composingLock=a.isComposing,a.isComposing)return!1;a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a);var s=(0,q.zh)(i),u=s.startContainer;if(!Ss(a,i,u)||(Es(s,i,a),Bs(s),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"&&a.key!=="Delete"))return!1;var d=(0,y.a1)(u,"data-newline","1");if(!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&a.key==="Enter"&&d&&s.startOffset<d.textContent.length){var f=d.previousElementSibling;f&&(s.insertNode(document.createTextNode(f.textContent)),s.collapse(!1));var E=d.nextSibling;E&&(s.insertNode(document.createTextNode(E.textContent)),s.collapse(!0))}var L=(0,y.lG)(u,"P");if(Ls(a,i,L,s)||Cs(s,i,L,a)||Hs(i,s,a,L))return!0;var D=(0,y.fb)(u,"vditor-ir__marker--pre");if(D&&D.tagName==="PRE"){var _=D.firstChild;if(Os(i,a,D,s)||(_.getAttribute("data-type")==="math-block"||_.getAttribute("data-type")==="html-block")&&Pr(i,a,s,_,D.parentElement)||pi(i,a,s,_,D.parentElement))return!0}var B=(0,y.a1)(u,"data-type","code-block-info");if(B){if(a.key==="Enter"||a.key==="Tab")return s.selectNodeContents(B.nextElementSibling.firstChild),s.collapse(!0),a.preventDefault(),A(i,["hint"]),!0;if(a.key==="Backspace"){var K=(0,q.im)(B,i.ir.element).start;K===1&&s.setStart(u,0),K===2&&(i.hint.recentLanguage="")}if(Pr(i,a,s,B,B.parentElement))return A(i,["hint"]),!0}var fe=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(a.key.indexOf("Arrow")>-1&&fe){var ve=fu(fe);if(ve&&Pr(i,a,s,fe,ve))return!0;var ue=mu(fe);if(ue&&pi(i,a,s,fe,ue))return!0}if(Is(i,a,s)||Ps(i,s,a)||go(i,s,a))return!0;var ke=(0,N.W)(u);if(ke){if(oe("⌘=",a)){var we=ke.querySelector(".vditor-ir__marker--heading");return we&&we.textContent.trim().length>1&&fi(i,we.textContent.substr(1)),a.preventDefault(),!0}if(oe("⌘-",a)){var we=ke.querySelector(".vditor-ir__marker--heading");return we&&we.textContent.trim().length<6&&fi(i,we.textContent.trim()+"# "),a.preventDefault(),!0}}var de=(0,y.F9)(u);if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&s.toString()===""){if(zs(i,s,a,L))return!0;if(de&&de.previousElementSibling&&de.tagName!=="UL"&&de.tagName!=="OL"&&(de.previousElementSibling.getAttribute("data-type")==="code-block"||de.previousElementSibling.getAttribute("data-type")==="math-block")){var Ie=(0,q.im)(de,i.ir.element,s).start;if(Ie===0||Ie===1&&de.innerText.startsWith(c.g.ZWSP))return s.selectNodeContents(de.previousElementSibling.querySelector(".vditor-ir__marker--pre code")),s.collapse(!1),ee(s,i),de.textContent.trim().replace(c.g.ZWSP,"")===""&&(de.remove(),Xn(i)),a.preventDefault(),!0}if(ke){var Te=ke.firstElementChild.textContent.length;(0,q.im)(ke,i.ir.element).start===Te&&Te!==0&&(s.setStart(ke.firstElementChild.firstChild,Te-1),s.collapse(!0),(0,q.Hc)(s))}}return(a.key==="ArrowUp"||a.key==="ArrowDown")&&de&&(de.querySelectorAll(".vditor-ir__node").forEach(function($e){$e.contains(u)||$e.classList.add("vditor-ir__node--hidden")}),Fs(a,de,s))?!0:(Ts(s,a.key),de&&$t(de,i,a,s)?(a.preventDefault(),!0):!1)},se=o(190),G=function(i,a){i.querySelectorAll("[data-type=footnotes-link]").forEach(function(s){for(var u=s.parentElement,d=u.nextSibling;d&&d.textContent.startsWith(" ");){var f=d;f.childNodes.forEach(function(E){u.append(E.cloneNode(!0))}),d=d.nextSibling,f.remove()}a&&a(u)})},X=function(i,a){var s,u=getSelection().getRangeAt(0).cloneRange(),d=u.startContainer;u.startContainer.nodeType!==3&&u.startContainer.tagName==="DIV"&&(d=u.startContainer.childNodes[u.startOffset-1]);var f=(0,y.a1)(d,"data-block","0");if(f&&a&&(a.inputType==="deleteContentBackward"||a.data===" ")){for(var E=(0,q.im)(f,i.sv.element,u).start,L=!0,D=E-1;D>f.textContent.substr(0,E).lastIndexOf(`
`);D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}if(E===0&&(L=!1),L){Ge(i);return}if(a.inputType==="deleteContentBackward"){var _=(0,y.a1)(d,"data-type","code-block-open-marker")||(0,y.a1)(d,"data-type","code-block-close-marker");if(_){if(_.getAttribute("data-type")==="code-block-close-marker"){var B=pe(d,"code-block-open-marker");if(B){B.textContent=_.textContent,Ge(i);return}}if(_.getAttribute("data-type")==="code-block-open-marker"){var B=pe(d,"code-block-close-marker",!1);if(B){B.textContent=_.textContent,Ge(i);return}}}var K=(0,y.a1)(d,"data-type","math-block-open-marker");if(K){var fe=K.nextElementSibling.nextElementSibling;fe&&fe.getAttribute("data-type")==="math-block-close-marker"&&(fe.remove(),Ge(i));return}f.querySelectorAll('[data-type="code-block-open-marker"]').forEach(function(de){de.textContent.length===1&&de.remove()}),f.querySelectorAll('[data-type="code-block-close-marker"]').forEach(function(de){de.textContent.length===1&&de.remove()});var ve=(0,y.a1)(d,"data-type","heading-marker");if(ve&&ve.textContent.indexOf("#")===-1){Ge(i);return}}if((a.data===" "||a.inputType==="deleteContentBackward")&&((0,y.a1)(d,"data-type","padding")||(0,y.a1)(d,"data-type","li-marker")||(0,y.a1)(d,"data-type","task-marker")||(0,y.a1)(d,"data-type","blockquote-marker"))){Ge(i);return}}if(f&&f.textContent.trimRight()==="$$"){Ge(i);return}f||(f=i.sv.element),((s=f.firstElementChild)===null||s===void 0?void 0:s.getAttribute("data-type"))==="link-ref-defs-block"&&(f=i.sv.element),(0,y.a1)(d,"data-type","footnotes-link")&&(f=i.sv.element),f.textContent.indexOf(Lute.Caret)===-1&&u.insertNode(document.createTextNode(Lute.Caret)),f.querySelectorAll("[style]").forEach(function(de){de.removeAttribute("style")}),f.querySelectorAll("font").forEach(function(de){de.outerHTML=de.innerHTML});var ue=f.textContent,ke=f.isEqualNode(i.sv.element);if(ke)ue=f.textContent;else{f.previousElementSibling&&(ue=f.previousElementSibling.textContent+ue,f.previousElementSibling.remove()),f.previousElementSibling&&ue.indexOf(`---
`)===0&&(ue=f.previousElementSibling.textContent+ue,f.previousElementSibling.remove());var we="";i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(de,Ie){de&&!f.isEqualNode(de.parentElement)&&(we+=de.parentElement.textContent+`
`,de.parentElement.remove())}),i.sv.element.querySelectorAll("[data-type='footnotes-link']").forEach(function(de,Ie){de&&!f.isEqualNode(de.parentElement)&&(we+=de.parentElement.textContent+`
`,de.parentElement.remove())}),ue=we+ue}ue=Oe(ue,i),ke?f.innerHTML=ue:f.outerHTML=ue,i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(de){i.sv.element.insertAdjacentElement("beforeend",de.parentElement)}),G(i.sv.element,function(de){i.sv.element.insertAdjacentElement("beforeend",de)}),(0,q.ib)(i.sv.element,u),Z(i),Ge(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},be=function(i,a){var s,u,d,f,E;if(i.sv.composingLock=a.isComposing,a.isComposing||(a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"))return!1;var L=(0,q.zh)(i),D=L.startContainer;L.startContainer.nodeType!==3&&L.startContainer.tagName==="DIV"&&(D=L.startContainer.childNodes[L.startOffset-1]);var _=(0,y.a1)(D,"data-type","text"),B=(0,y.a1)(D,"data-type","blockquote-marker");if(!B&&L.startOffset===0&&_&&_.previousElementSibling&&_.previousElementSibling.getAttribute("data-type")==="blockquote-marker"&&(B=_.previousElementSibling),B&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&B.nextElementSibling.textContent.trim()===""&&(0,q.im)(B,i.sv.element,L).start===B.textContent.length)return((s=B.previousElementSibling)===null||s===void 0?void 0:s.getAttribute("data-type"))==="padding"&&B.previousElementSibling.setAttribute("data-action","enter-remove"),B.remove(),Ge(i),a.preventDefault(),!0;var K=(0,y.a1)(D,"data-type","li-marker"),fe=(0,y.a1)(D,"data-type","task-marker"),ve=K;if(ve||fe&&fe.nextElementSibling.getAttribute("data-type")!=="task-marker"&&(ve=fe),!ve&&L.startOffset===0&&_&&_.previousElementSibling&&(_.previousElementSibling.getAttribute("data-type")==="li-marker"||_.previousElementSibling.getAttribute("data-type")==="task-marker")&&(ve=_.previousElementSibling),ve){var ue=(0,q.im)(ve,i.sv.element,L).start,ke=ve.getAttribute("data-type")==="task-marker",we=ve;if(ke&&(we=ve.previousElementSibling.previousElementSibling.previousElementSibling),ue===ve.textContent.length){if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&ve.nextElementSibling.textContent.trim()==="")return((u=we.previousElementSibling)===null||u===void 0?void 0:u.getAttribute("data-type"))==="padding"?(we.previousElementSibling.remove(),X(i)):(ke&&(we.remove(),ve.previousElementSibling.previousElementSibling.remove(),ve.previousElementSibling.remove()),ve.nextElementSibling.remove(),ve.remove(),Ge(i)),a.preventDefault(),!0;if(a.key==="Tab")return a.shiftKey?we.previousElementSibling.getAttribute("data-type")==="padding"&&we.previousElementSibling.remove():we.insertAdjacentHTML("beforebegin",'<span data-type="padding">'.concat(we.textContent.replace(/\S/g," "),"</span>")),/^\d/.test(we.textContent)&&(we.textContent=we.textContent.replace(/^\d{1,}/,"1"),L.selectNodeContents(ve.firstChild),L.collapse(!1)),X(i),a.preventDefault(),!0}}if(go(i,L,a))return!0;var de=(0,y.a1)(D,"data-block","0"),Ie=(0,N.S)(D,"SPAN");if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&de){var Te=!1,$e=de.textContent.match(/^\n+/);(0,q.im)(de,i.sv.element).start<=($e?$e[0].length:0)&&(Te=!0);var bt=`
`;if(Ie){if(((d=Ie.previousElementSibling)===null||d===void 0?void 0:d.getAttribute("data-action"))==="enter-remove")return Ie.previousElementSibling.remove(),Ge(i),a.preventDefault(),!0;bt+=Je(Ie)}return L.insertNode(document.createTextNode(bt)),L.collapse(!1),de&&de.textContent.trim()!==""&&!Te?X(i):Ge(i),a.preventDefault(),!0}if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey){if(Ie&&((f=Ie.previousElementSibling)===null||f===void 0?void 0:f.getAttribute("data-type"))==="newline"&&(0,q.im)(Ie,i.sv.element,L).start===1&&Ie.getAttribute("data-type").indexOf("code-block-")===-1)return L.setStart(Ie,0),L.extractContents(),Ie.textContent.trim()!==""?X(i):Ge(i),a.preventDefault(),!0;if(de&&(0,q.im)(de,i.sv.element,L).start===0&&de.previousElementSibling){L.extractContents();var gt=de.previousElementSibling.lastElementChild;return gt.getAttribute("data-type")==="newline"&&(gt.remove(),gt=de.previousElementSibling.lastElementChild),gt.getAttribute("data-type")!=="newline"&&(gt.insertAdjacentHTML("afterend",de.innerHTML),de.remove()),de.textContent.trim()!==""&&!(!((E=de.previousElementSibling)===null||E===void 0)&&E.querySelector('[data-type="code-block-open-marker"]'))?X(i):(gt.getAttribute("data-type")!=="newline"&&(L.selectNodeContents(gt.lastChild),L.collapse(!1)),Ge(i)),a.preventDefault(),!0}}return!1},le=o(538),ye=function(i){i.options.theme==="dark"?i.element.classList.add("vditor--dark"):i.element.classList.remove("vditor--dark")},Ae=function(i){i.element.innerHTML="",i.element.classList.add("vditor"),i.options.rtl&&i.element.setAttribute("dir","rtl"),ye(i),(0,le.Z)(i.options.preview.theme.current,i.options.preview.theme.path),typeof i.options.height=="number"?i.element.style.height=i.options.height+"px":i.element.style.height=i.options.height,typeof i.options.minHeight=="number"&&(i.element.style.minHeight=i.options.minHeight+"px"),typeof i.options.width=="number"?i.element.style.width=i.options.width+"px":i.element.style.width=i.options.width,i.element.appendChild(i.toolbar.element);var a=document.createElement("div");if(a.className="vditor-content",i.options.outline.position==="left"&&a.appendChild(i.outline.element),a.appendChild(i.wysiwyg.element.parentElement),a.appendChild(i.sv.element),a.appendChild(i.ir.element.parentElement),a.appendChild(i.preview.element),i.toolbar.elements.devtools&&a.appendChild(i.devtools.element),i.options.outline.position==="right"&&(i.outline.element.classList.add("vditor-outline--right"),a.appendChild(i.outline.element)),i.upload&&a.appendChild(i.upload.element),i.options.resize.enable&&a.appendChild(i.resize.element),a.appendChild(i.hint.element),a.appendChild(i.tip.element),i.element.appendChild(a),a.addEventListener("click",function(){A(i,["subToolbar"])}),i.toolbar.elements.export&&i.element.insertAdjacentHTML("beforeend",'<iframe id="vditorExportIframe" style="width: 100%;height: 0;border: 0"></iframe>'),er(i,i.options.mode,st(i)),document.execCommand("DefaultParagraphSeparator",!1,"p"),navigator.userAgent.indexOf("iPhone")>-1&&typeof window.visualViewport<"u"){var s=!1,u=function(d){s||(s=!0,requestAnimationFrame(function(){s=!1;var f=i.toolbar.element;f.style.transform="none",f.getBoundingClientRect().top<0&&(f.style.transform="translate(0, ".concat(-f.getBoundingClientRect().top,"px)"))}))};window.visualViewport.addEventListener("scroll",u),window.visualViewport.addEventListener("resize",u)}},ze=function(i){var a=window.innerWidth<=c.g.MOBILE_WIDTH?10:35;if(i.wysiwyg.element.parentElement.style.display!=="none"){var s=(i.wysiwyg.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.wysiwyg.element.style.padding="10px ".concat(Math.max(a,s),"px")}if(i.ir.element.parentElement.style.display!=="none"){var s=(i.ir.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.ir.element.style.padding="10px ".concat(Math.max(a,s),"px")}i.preview.element.style.display!=="block"?i.toolbar.element.style.paddingLeft=Math.max(5,parseInt(i[i.currentMode].element.style.paddingLeft||"0",10)+(i.options.outline.position==="left"?i.outline.element.offsetWidth:0))+"px":i.toolbar.element.style.paddingLeft=5+(i.options.outline.position==="left"?i.outline.element.offsetWidth:0)+"px"},Xe=function(i){if(i.options.typewriterMode){var a=window.innerHeight;typeof i.options.height=="number"?(a=i.options.height,typeof i.options.minHeight=="number"&&(a=Math.max(a,i.options.minHeight)),a=Math.min(window.innerHeight,a)):a=i.element.clientHeight,i.element.classList.contains("vditor--fullscreen")&&(a=window.innerHeight),i[i.currentMode].element.style.setProperty("--editor-bottom",(a-i.toolbar.element.offsetHeight)/2+"px")}},Ke;function Be(){window.removeEventListener("resize",Ke)}var st=function(i){Xe(i),Be(),window.addEventListener("resize",Ke=function(){ze(i),Xe(i)});var a=(0,m.pK)()&&localStorage.getItem(i.options.cache.id);return(!i.options.cache.enable||!a)&&(i.options.value?a=i.options.value:i.originalInnerHTML?a=i.lute.HTML2Md(i.originalInnerHTML):i.options.cache.enable||(a="")),a||""},qe=function(i){clearTimeout(i[i.currentMode].hlToolbarTimeoutId),i[i.currentMode].hlToolbarTimeoutId=window.setTimeout(function(){if(i[i.currentMode].element.getAttribute("contenteditable")!=="false"&&(0,q.Gb)(i[i.currentMode].element)){x(i.toolbar.elements,c.g.EDIT_TOOLBARS),S(i.toolbar.elements,c.g.EDIT_TOOLBARS);var a=(0,q.zh)(i),s=a.startContainer;a.startContainer.nodeType===3&&(s=a.startContainer.parentElement),s.classList.contains("vditor-reset")&&(s=s.childNodes[a.startOffset]);var u=i.currentMode==="sv"?(0,y.a1)(s,"data-type","heading"):(0,N.W)(s);u&&w(i.toolbar.elements,["headings"]);var d=i.currentMode==="sv"?(0,y.a1)(s,"data-type","blockquote"):(0,y.lG)(s,"BLOCKQUOTE");d&&w(i.toolbar.elements,["quote"]);var f=(0,y.a1)(s,"data-type","strong");f&&w(i.toolbar.elements,["bold"]);var E=(0,y.a1)(s,"data-type","em");E&&w(i.toolbar.elements,["italic"]);var L=(0,y.a1)(s,"data-type","s");L&&w(i.toolbar.elements,["strike"]);var D=(0,y.a1)(s,"data-type","a");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"LI");_?(_.classList.contains("vditor-task")?w(i.toolbar.elements,["check"]):_.parentElement.tagName==="OL"?w(i.toolbar.elements,["ordered-list"]):_.parentElement.tagName==="UL"&&w(i.toolbar.elements,["list"]),S(i.toolbar.elements,["outdent","indent"])):k(i.toolbar.elements,["outdent","indent"]);var B=(0,y.a1)(s,"data-type","code-block");B&&(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","inline-code","upload","link","table","record"]),w(i.toolbar.elements,["code"]));var K=(0,y.a1)(s,"data-type","code");K&&(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","upload","link","table","record"]),w(i.toolbar.elements,["inline-code"]));var fe=(0,y.a1)(s,"data-type","table");fe&&k(i.toolbar.elements,["headings","list","ordered-list","check","line","quote","code","table"])}},200)},Re=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&i.hint.render(i),clearTimeout(i.wysiwyg.afterRenderTimeoutId),i.wysiwyg.afterRenderTimeoutId=window.setTimeout(function(){if(!i.wysiwyg.composingLock){var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),a.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},mt=function(i){for(var a=i.previousSibling;a;){if(a.nodeType!==3&&a.tagName==="A"&&!a.previousSibling&&a.innerHTML.replace(c.g.ZWSP,"")===""&&a.nextSibling)return a;a=a.previousSibling}return!1},Dt=function(i){for(var a=i.startContainer.nextSibling;a&&a.textContent==="";)a=a.nextSibling;return!!(a&&a.nodeType!==3&&(a.tagName==="CODE"||a.getAttribute("data-type")==="math-inline"||a.getAttribute("data-type")==="html-entity"||a.getAttribute("data-type")==="html-inline"))},Ut=function(i){for(var a="",s=i.nextSibling;s;)s.nodeType===3?a+=s.textContent:a+=s.outerHTML,s=s.nextSibling;return a},jt=function(i){for(var a="",s=i.previousSibling;s;)s.nodeType===3?a=s.textContent+a:a=s.outerHTML+a,s=s.previousSibling;return a},Hn=function(i){for(var a=i;a&&!a.nextSibling;)a=a.parentElement;return a.nextSibling},Mn=function(i){var a=jt(i.startContainer),s=Ut(i.startContainer),u=i.startContainer.textContent,d=i.startOffset,f="",E="";return(u.substr(0,d)!==""&&u.substr(0,d)!==c.g.ZWSP||a)&&(f="".concat(a).concat(u.substr(0,d))),(u.substr(d)!==""&&u.substr(d)!==c.g.ZWSP||s)&&(E="".concat(u.substr(d)).concat(s)),{afterHTML:E,beforeHTML:f}},Pn=function(i,a){Array.from(i.wysiwyg.element.childNodes).find(function(s){if(s.nodeType===3){var u=document.createElement("p");u.setAttribute("data-block","0"),u.textContent=s.textContent;var d=a.startContainer.nodeType===3?a.startOffset:s.textContent.length;return s.parentNode.insertBefore(u,s),s.remove(),a.setStart(u.firstChild,Math.min(u.firstChild.textContent.length,d)),a.collapse(!0),(0,q.Hc)(a),!0}else if(!s.getAttribute("data-block"))return s.tagName==="P"?s.remove():(s.tagName==="DIV"?(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.innerHTML,"</p>")):s.tagName==="BR"?s.outerHTML='<p data-block="0">'.concat(s.outerHTML,"<wbr></p>"):(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.outerHTML,"</p>")),(0,q.ib)(i.wysiwyg.element,a),a=getSelection().getRangeAt(0)),!0})},kn=function(i,a){var s=(0,q.zh)(i),u=(0,y.F9)(s.startContainer);u||(u=s.startContainer.childNodes[s.startOffset]),!u&&i.wysiwyg.element.children.length===0&&(u=i.wysiwyg.element),u&&!u.classList.contains("vditor-wysiwyg__block")&&(s.insertNode(document.createElement("wbr")),u.innerHTML.trim()==="<wbr>"&&(u.innerHTML="<wbr><br>"),u.tagName==="BLOCKQUOTE"||u.classList.contains("vditor-reset")?u.innerHTML="<".concat(a,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(a,">"):u.outerHTML="<".concat(a,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(a,">"),(0,q.ib)(i.wysiwyg.element,s),Ht(i))},lr=function(i){var a=getSelection().getRangeAt(0),s=(0,y.F9)(a.startContainer);s||(s=a.startContainer.childNodes[a.startOffset]),s&&(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.innerHTML,"</p>"),(0,q.ib)(i.wysiwyg.element,a)),i.wysiwyg.popover.style.display="none"},cr=function(i,a,s){s===void 0&&(s=!0);var u=i.previousElementSibling,d=u.ownerDocument.createRange();u.tagName==="CODE"?(u.style.display="inline-block",s?d.setStart(u.firstChild,1):d.selectNodeContents(u)):(u.style.display="block",u.firstChild.firstChild||u.firstChild.appendChild(document.createTextNode("")),d.selectNodeContents(u.firstChild)),s?d.collapse(!0):d.collapse(!1),(0,q.Hc)(d),!i.firstElementChild.classList.contains("language-mindmap")&&Z(a)},zn=function(i,a){if(i.wysiwyg.composingLock=a.isComposing,a.isComposing)return!1;a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a);var s=(0,q.zh)(i),u=s.startContainer;if(!Ss(a,i,u)||(Es(s,i,a),Bs(s),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"&&a.key!=="Delete"))return!1;var d=(0,y.F9)(u),f=(0,y.lG)(u,"P");if(Ls(a,i,f,s)||Cs(s,i,f,a)||Is(i,a,s))return!0;var E=(0,y.fb)(u,"vditor-wysiwyg__block");if(E){if(a.key==="Escape"&&E.children.length===2)return i.wysiwyg.popover.style.display="none",E.firstElementChild.style.display="none",i.wysiwyg.element.blur(),a.preventDefault(),!0;if(!(0,m.yl)(a)&&!a.shiftKey&&a.altKey&&a.key==="Enter"&&E.getAttribute("data-type")==="code-block"){var L=i.wysiwyg.popover.querySelector(".vditor-input");return L.focus(),L.select(),a.preventDefault(),!0}if(E.getAttribute("data-block")==="0"&&(Os(i,a,E.firstElementChild,s)||pi(i,a,s,E.firstElementChild,E)||E.getAttribute("data-type")!=="yaml-front-matter"&&Pr(i,a,s,E.firstElementChild,E)))return!0}if(Hs(i,s,a,f))return!0;var D=(0,y.E2)(u,"BLOCKQUOTE");if(D&&!a.shiftKey&&a.altKey&&a.key==="Enter"){(0,m.yl)(a)?s.setStartBefore(D):s.setStartAfter(D),(0,q.Hc)(s);var _=document.createElement("p");return _.setAttribute("data-block","0"),_.innerHTML=`
`,s.insertNode(_),s.collapse(!0),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0}var B=(0,N.W)(u);if(B){if(B.tagName==="H6"&&u.textContent.length===s.startOffset&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"){var K=document.createElement("p");return K.textContent=`
`,K.setAttribute("data-block","0"),u.parentElement.insertAdjacentElement("afterend",K),s.setStart(K,0),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0}if(oe("⌘=",a)){var fe=parseInt(B.tagName.substr(1),10)-1;return fe>0&&(kn(i,"h".concat(fe)),Re(i)),a.preventDefault(),!0}if(oe("⌘-",a)){var fe=parseInt(B.tagName.substr(1),10)+1;return fe<7&&(kn(i,"h".concat(fe)),Re(i)),a.preventDefault(),!0}a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&B.textContent.length===1&&lr(i)}if(Ps(i,s,a))return!0;if(a.altKey&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.shiftKey){var ve=(0,y.lG)(u,"A"),ue=(0,y.a1)(u,"data-type","link-ref"),ke=(0,y.a1)(u,"data-type","footnotes-ref");if(ve||ue||ke||B&&B.tagName.length===2){var we=i.wysiwyg.popover.querySelector("input");we.focus(),we.select()}}if(Ot(i,a))return!0;if(oe("⇧⌘U",a)){var de=i.wysiwyg.popover.querySelector('[data-type="up"]');if(de)return de.click(),a.preventDefault(),!0}if(oe("⇧⌘D",a)){var de=i.wysiwyg.popover.querySelector('[data-type="down"]');if(de)return de.click(),a.preventDefault(),!0}if(go(i,s,a))return!0;if(!(0,m.yl)(a)&&a.shiftKey&&!a.altKey&&a.key==="Enter"&&u.parentElement.tagName!=="LI"&&u.parentElement.tagName!=="P")return["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName)?s.insertNode(document.createTextNode(`
`+c.g.ZWSP)):s.insertNode(document.createTextNode(`
`)),s.collapse(!1),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0;if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&s.toString()===""){if(zs(i,s,a,f))return!0;if(d){if(d.previousElementSibling&&d.previousElementSibling.classList.contains("vditor-wysiwyg__block")&&d.previousElementSibling.getAttribute("data-block")==="0"&&d.tagName!=="UL"&&d.tagName!=="OL"){var Ie=(0,q.im)(d,i.wysiwyg.element,s).start;if(Ie===0&&s.startOffset===0||Ie===1&&d.innerText.startsWith(c.g.ZWSP))return cr(d.previousElementSibling.lastElementChild,i,!1),d.innerHTML.trim().replace(c.g.ZWSP,"")===""&&(d.remove(),Re(i)),a.preventDefault(),!0}var Te=s.startOffset;if(s.toString()===""&&u.nodeType===3&&u.textContent.charAt(Te-2)===`
`&&u.textContent.charAt(Te-1)!==c.g.ZWSP&&["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName))return u.textContent=u.textContent.substring(0,Te-1)+c.g.ZWSP,s.setStart(u,Te),s.collapse(!0),Re(i),a.preventDefault(),!0;u.textContent===c.g.ZWSP&&s.startOffset===1&&!u.previousSibling&&Dt(s)&&(u.textContent=""),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='math-inline']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"}),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='html-entity']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"})}}if((0,m.vU)()&&s.startOffset===1&&u.textContent.indexOf(c.g.ZWSP)>-1&&u.previousSibling&&u.previousSibling.nodeType!==3&&u.previousSibling.tagName==="CODE"&&(a.key==="Backspace"||a.key==="ArrowLeft"))return s.selectNodeContents(u.previousSibling),s.collapse(!1),a.preventDefault(),!0;if(Fs(a,d,s))return a.preventDefault(),!0;if(Ts(s,a.key),a.key==="ArrowDown"){var $e=u.nextSibling;$e&&$e.nodeType!==3&&$e.getAttribute("data-type")==="math-inline"&&s.setStartAfter($e)}return d&&$t(d,i,a,s)?(a.preventDefault(),!0):!1},Ot=function(i,a){if(oe("⇧⌘X",a)){var s=i.wysiwyg.popover.querySelector('[data-type="remove"]');return s&&s.click(),a.preventDefault(),!0}},jn=function(i){clearTimeout(i.wysiwyg.hlToolbarTimeoutId),i.wysiwyg.hlToolbarTimeoutId=window.setTimeout(function(){if(i.wysiwyg.element.getAttribute("contenteditable")!=="false"&&(0,q.Gb)(i.wysiwyg.element)){x(i.toolbar.elements,c.g.EDIT_TOOLBARS),S(i.toolbar.elements,c.g.EDIT_TOOLBARS);var a=getSelection().getRangeAt(0),s=a.startContainer;a.startContainer.nodeType===3?s=a.startContainer.parentElement:s=s.childNodes[a.startOffset>=s.childNodes.length?s.childNodes.length-1:a.startOffset];var u=(0,y.a1)(s,"data-type","footnotes-block");if(u){i.wysiwyg.popover.innerHTML="",pn(u,i),tn(i,"footnotes-block"),en(i,u);return}var d=(0,y.lG)(s,"LI");d?(d.classList.contains("vditor-task")?w(i.toolbar.elements,["check"]):d.parentElement.tagName==="OL"?w(i.toolbar.elements,["ordered-list"]):d.parentElement.tagName==="UL"&&w(i.toolbar.elements,["list"]),S(i.toolbar.elements,["outdent","indent"])):k(i.toolbar.elements,["outdent","indent"]),(0,y.lG)(s,"BLOCKQUOTE")&&w(i.toolbar.elements,["quote"]),((0,y.lG)(s,"B")||(0,y.lG)(s,"STRONG"))&&w(i.toolbar.elements,["bold"]),((0,y.lG)(s,"I")||(0,y.lG)(s,"EM"))&&w(i.toolbar.elements,["italic"]),((0,y.lG)(s,"STRIKE")||(0,y.lG)(s,"S"))&&w(i.toolbar.elements,["strike"]),i.wysiwyg.element.querySelectorAll(".vditor-comment--focus").forEach(function(Le){Le.classList.remove("vditor-comment--focus")});var f=(0,y.fb)(s,"vditor-comment");if(f){var E=f.getAttribute("data-cmtids").split(" ");if(E.length>1&&f.nextSibling.isSameNode(f.nextElementSibling)){var L=f.nextElementSibling.getAttribute("data-cmtids").split(" ");E.find(function(Le){if(L.includes(Le))return E=[Le],!0})}i.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(Le){Le.getAttribute("data-cmtids").indexOf(E[0])>-1&&Le.classList.add("vditor-comment--focus")})}var D=(0,y.lG)(s,"A");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"TABLE"),B=(0,N.W)(s);(0,y.lG)(s,"CODE")?(0,y.lG)(s,"PRE")?(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","inline-code","upload","link","table","record"]),w(i.toolbar.elements,["code"])):(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","upload","link","table","record"]),w(i.toolbar.elements,["inline-code"])):B?(k(i.toolbar.elements,["bold"]),w(i.toolbar.elements,["headings"])):_&&k(i.toolbar.elements,["table"]);var K=(0,y.fb)(s,"vditor-toc");if(K){i.wysiwyg.popover.innerHTML="",pn(K,i),tn(i,"vditor-toc"),en(i,K);return}var fe=(0,N.S)(s,"BLOCKQUOTE");if(fe&&(i.wysiwyg.popover.innerHTML="",ur(a,fe,i),nr(a,fe,i),pn(fe,i),tn(i,"blockquote"),en(i,fe)),d&&(i.wysiwyg.popover.innerHTML="",ur(a,d,i),nr(a,d,i),pn(d,i),tn(i,"li"),en(i,d)),_){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var ve=function(){var Le=_.rows.length,ut=_.rows[0].cells.length,ir=parseInt(zt.value,10)||Le,ar=parseInt(fn.value,10)||ut;if(!(ir===Le&&ut===ar)){if(ut!==ar)for(var gi=ar-ut,Bn=0;Bn<_.rows.length;Bn++)if(gi>0)for(var Zs=0;Zs<gi;Zs++)Bn===0?_.rows[Bn].lastElementChild.insertAdjacentHTML("afterend","<th> </th>"):_.rows[Bn].lastElementChild.insertAdjacentHTML("afterend","<td> </td>");else for(var wo=ut-1;wo>=ar;wo--)_.rows[Bn].cells[wo].remove();if(Le!==ir){var Ys=ir-Le;if(Ys>0){for(var xo="<tr>",Fr=0;Fr<ar;Fr++)xo+="<td> </td>";for(var Js=0;Js<Ys;Js++)_.querySelector("tbody")?_.querySelector("tbody").insertAdjacentHTML("beforeend",xo):_.querySelector("thead").insertAdjacentHTML("afterend",xo+"</tr>")}else for(var Fr=Le-1;Fr>=ir;Fr--)_.rows[Fr].remove(),_.rows.length===1&&_.querySelector("tbody").remove()}typeof i.options.input=="function"&&i.options.input(v(i))}},ue=function(Le){Qi(_,Le),Le==="right"?(Ie.classList.remove("vditor-icon--current"),Te.classList.remove("vditor-icon--current"),$e.classList.add("vditor-icon--current")):Le==="center"?(Ie.classList.remove("vditor-icon--current"),$e.classList.remove("vditor-icon--current"),Te.classList.add("vditor-icon--current")):(Te.classList.remove("vditor-icon--current"),$e.classList.remove("vditor-icon--current"),Ie.classList.add("vditor-icon--current")),(0,q.Hc)(a),Re(i)},ke=(0,y.lG)(s,"TD"),we=(0,y.lG)(s,"TH"),de="left";ke?de=ke.getAttribute("align")||"left":we&&(de=we.getAttribute("align")||"center");var Ie=document.createElement("button");Ie.setAttribute("type","button"),Ie.setAttribute("aria-label",window.VditorI18n.alignLeft+"<"+(0,m.ns)("⇧⌘L")+">"),Ie.setAttribute("data-type","left"),Ie.innerHTML='<svg><use xlink:href="#vditor-icon-align-left"></use></svg>',Ie.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(de==="left"?" vditor-icon--current":""),Ie.onclick=function(){ue("left")};var Te=document.createElement("button");Te.setAttribute("type","button"),Te.setAttribute("aria-label",window.VditorI18n.alignCenter+"<"+(0,m.ns)("⇧⌘C")+">"),Te.setAttribute("data-type","center"),Te.innerHTML='<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',Te.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(de==="center"?" vditor-icon--current":""),Te.onclick=function(){ue("center")};var $e=document.createElement("button");$e.setAttribute("type","button"),$e.setAttribute("aria-label",window.VditorI18n.alignRight+"<"+(0,m.ns)("⇧⌘R")+">"),$e.setAttribute("data-type","right"),$e.innerHTML='<svg><use xlink:href="#vditor-icon-align-right"></use></svg>',$e.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(de==="right"?" vditor-icon--current":""),$e.onclick=function(){ue("right")};var bt=document.createElement("button");bt.setAttribute("type","button"),bt.setAttribute("aria-label",window.VditorI18n.insertRowBelow+"<"+(0,m.ns)("⌘=")+">"),bt.setAttribute("data-type","insertRow"),bt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-row"></use></svg>',bt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",bt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&_s(i,a,ut)};var gt=document.createElement("button");gt.setAttribute("type","button"),gt.setAttribute("aria-label",window.VditorI18n.insertRowAbove+"<"+(0,m.ns)("⇧⌘F")+">"),gt.setAttribute("data-type","insertRow"),gt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-rowb"></use></svg>',gt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",gt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&Ns(i,a,ut)};var kt=document.createElement("button");kt.setAttribute("type","button"),kt.setAttribute("aria-label",window.VditorI18n.insertColumnRight+"<"+(0,m.ns)("⇧⌘=")+">"),kt.setAttribute("data-type","insertColumn"),kt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-column"></use></svg>',kt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",kt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&ea(i,_,ut)};var dn=document.createElement("button");dn.setAttribute("type","button"),dn.setAttribute("aria-label",window.VditorI18n.insertColumnLeft+"<"+(0,m.ns)("⇧⌘G")+">"),dn.setAttribute("data-type","insertColumn"),dn.innerHTML='<svg><use xlink:href="#vditor-icon-insert-columnb"></use></svg>',dn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",dn.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&ea(i,_,ut,"beforebegin")};var Wt=document.createElement("button");Wt.setAttribute("type","button"),Wt.setAttribute("aria-label",window.VditorI18n["delete-row"]+"<"+(0,m.ns)("⌘-")+">"),Wt.setAttribute("data-type","deleteRow"),Wt.innerHTML='<svg><use xlink:href="#vditor-icon-delete-row"></use></svg>',Wt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",Wt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&Ds(i,a,ut)};var hn=document.createElement("button");hn.setAttribute("type","button"),hn.setAttribute("aria-label",window.VditorI18n["delete-column"]+"<"+(0,m.ns)("⇧⌘-")+">"),hn.setAttribute("data-type","deleteColumn"),hn.innerHTML='<svg><use xlink:href="#vditor-icon-delete-column"></use></svg>',hn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",hn.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ut=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ut&&Rs(i,a,_,ut)};var it=document.createElement("span");it.setAttribute("aria-label",window.VditorI18n.row),it.className="vditor-tooltipped vditor-tooltipped__n";var zt=document.createElement("input");it.appendChild(zt),zt.type="number",zt.min="1",zt.className="vditor-input",zt.style.width="42px",zt.style.textAlign="center",zt.setAttribute("placeholder",window.VditorI18n.row),zt.value=_.rows.length.toString(),zt.oninput=function(){ve()},zt.onkeydown=function(Le){if(!Le.isComposing){if(Le.key==="Tab"){fn.focus(),fn.select(),Le.preventDefault();return}Ot(i,Le)||cn(Le,a)}};var ra=document.createElement("span");ra.setAttribute("aria-label",window.VditorI18n.column),ra.className="vditor-tooltipped vditor-tooltipped__n";var fn=document.createElement("input");ra.appendChild(fn),fn.type="number",fn.min="1",fn.className="vditor-input",fn.style.width="42px",fn.style.textAlign="center",fn.setAttribute("placeholder",window.VditorI18n.column),fn.value=_.rows[0].cells.length.toString(),fn.oninput=function(){ve()},fn.onkeydown=function(Le){if(!Le.isComposing){if(Le.key==="Tab"){zt.focus(),zt.select(),Le.preventDefault();return}Ot(i,Le)||cn(Le,a)}},ur(a,_,i),nr(a,_,i),pn(_,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",Ie),i.wysiwyg.popover.insertAdjacentElement("beforeend",Te),i.wysiwyg.popover.insertAdjacentElement("beforeend",$e),i.wysiwyg.popover.insertAdjacentElement("beforeend",gt),i.wysiwyg.popover.insertAdjacentElement("beforeend",bt),i.wysiwyg.popover.insertAdjacentElement("beforeend",dn),i.wysiwyg.popover.insertAdjacentElement("beforeend",kt),i.wysiwyg.popover.insertAdjacentElement("beforeend",Wt),i.wysiwyg.popover.insertAdjacentElement("beforeend",hn),i.wysiwyg.popover.insertAdjacentElement("beforeend",it),i.wysiwyg.popover.insertAdjacentHTML("beforeend"," x "),i.wysiwyg.popover.insertAdjacentElement("beforeend",ra),tn(i,"table"),en(i,_)}var yo=(0,y.a1)(s,"data-type","link-ref");yo&&co(i,yo,a);var zr=(0,y.a1)(s,"data-type","footnotes-ref");if(zr){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var it=document.createElement("span");it.setAttribute("aria-label",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),it.className="vditor-tooltipped vditor-tooltipped__n";var Zn=document.createElement("input");it.appendChild(Zn),Zn.className="vditor-input",Zn.setAttribute("placeholder",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),Zn.style.width="120px",Zn.value=zr.getAttribute("data-footnotes-label"),Zn.oninput=function(){Zn.value.trim()!==""&&zr.setAttribute("data-footnotes-label",Zn.value),typeof i.options.input=="function"&&i.options.input(v(i))},Zn.onkeydown=function(ut){ut.isComposing||Ot(i,ut)||cn(ut,a)},pn(zr,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",it),tn(i,"footnotes-ref"),en(i,zr)}var Vt=(0,y.fb)(s,"vditor-wysiwyg__block"),Ks=Vt?Vt.getAttribute("data-type").indexOf("block")>-1:!1;if(i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(Le){if(!Vt||Vt&&Ks&&!Vt.contains(Le)){var ut=Le.previousElementSibling;ut.style.display="none"}}),Vt&&Ks){if(i.wysiwyg.popover.innerHTML="",ur(a,Vt,i),nr(a,Vt,i),pn(Vt,i),Vt.getAttribute("data-type")==="code-block"){var ia=document.createElement("span");ia.setAttribute("aria-label",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),ia.className="vditor-tooltipped vditor-tooltipped__n";var Cn=document.createElement("input");ia.appendChild(Cn);var mi=Vt.firstElementChild.firstElementChild;Cn.className="vditor-input",Cn.setAttribute("placeholder",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),Cn.value=mi.className.indexOf("language-")>-1?mi.className.split("-")[1].split(" ")[0]:"",Cn.oninput=function(Le){Cn.value.trim()!==""?mi.className="language-".concat(Cn.value):(mi.className="",i.hint.recentLanguage=""),Vt.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(Vt.lastElementChild.innerHTML=Vt.firstElementChild.innerHTML,tt(Vt.lastElementChild,i)),Re(i),Le.detail===1&&(a.setStart(mi.firstChild,0),a.collapse(!0),(0,q.Hc)(a))},Cn.onkeydown=function(Le){if(!Le.isComposing&&!Ot(i,Le)){if(Le.key==="Escape"&&i.hint.element.style.display==="block"){i.hint.element.style.display="none",Le.preventDefault();return}i.hint.select(Le,i),cn(Le,a)}},Cn.onkeyup=function(Le){var ut,ir;if(!(Le.isComposing||Le.key==="Enter"||Le.key==="ArrowUp"||Le.key==="Escape"||Le.key==="ArrowDown")){var ar=[],gi=Cn.value.substring(0,Cn.selectionStart);(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((ir=(ut=window.hljs)===null||ut===void 0?void 0:ut.listLanguages())!==null&&ir!==void 0?ir:[]).sort())).forEach(function(Bn){Bn.indexOf(gi.toLowerCase())>-1&&ar.push({html:Bn,value:Bn})}),i.hint.genHTML(ar,gi,i),Le.preventDefault()}},i.wysiwyg.popover.insertAdjacentElement("beforeend",ia),tn(i,"code-block")}else tn(i,"block");en(i,Vt)}else Vt=void 0;if(B){i.wysiwyg.popover.innerHTML="";var it=document.createElement("span");it.setAttribute("aria-label","ID<"+(0,m.ns)("⌥Enter")+">"),it.className="vditor-tooltipped vditor-tooltipped__n";var rr=document.createElement("input");it.appendChild(rr),rr.className="vditor-input",rr.setAttribute("placeholder","ID<"+(0,m.ns)("⌥Enter")+">"),rr.style.width="120px",rr.value=B.getAttribute("data-id")||"",rr.oninput=function(){B.setAttribute("data-id",rr.value),typeof i.options.input=="function"&&i.options.input(v(i))},rr.onkeydown=function(ut){ut.isComposing||Ot(i,ut)||cn(ut,a)},ur(a,B,i),nr(a,B,i),pn(B,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",it),tn(i,"heading"),en(i,B)}if(D&&Ti(i,D,a),!fe&&!d&&!_&&!Vt&&!D&&!yo&&!zr&&!B&&!K){var Br=(0,y.a1)(s,"data-block","0");Br&&Br.parentElement.isEqualNode(i.wysiwyg.element)?(i.wysiwyg.popover.innerHTML="",ur(a,Br,i),nr(a,Br,i),pn(Br,i),tn(i,"block"),en(i,Br)):i.wysiwyg.popover.style.display="none"}i.wysiwyg.element.querySelectorAll('span[data-type="backslash"] > span').forEach(function(Le){Le.style.display="none"});var Xs=(0,y.a1)(a.startContainer,"data-type","backslash");Xs&&(Xs.querySelector("span").style.display="inline")}},200)},en=function(i,a){var s=a,u=(0,y.lG)(a,"TABLE");u&&(s=u),i.wysiwyg.popover.style.left="0",i.wysiwyg.popover.style.display="block",i.wysiwyg.popover.style.top=Math.max(-8,s.offsetTop-21-i.wysiwyg.element.scrollTop)+"px",i.wysiwyg.popover.style.left=Math.min(s.offsetLeft,i.wysiwyg.element.clientWidth-i.wysiwyg.popover.clientWidth)+"px",i.wysiwyg.popover.setAttribute("data-top",(s.offsetTop-21).toString())},co=function(i,a,s){s===void 0&&(s=getSelection().getRangeAt(0)),i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(a.tagName==="IMG"?a.setAttribute("alt",f.value):a.textContent=f.value),L.value.trim()!==""&&a.setAttribute("data-link-label",L.value),typeof i.options.input=="function"&&i.options.input(v(i))},d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.textIsNotEmpty),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.textIsNotEmpty),f.style.width="120px",f.value=a.getAttribute("alt")||a.textContent,f.oninput=function(){u()},f.onkeydown=function(D){Ot(i,D)||cn(D,s)||Ir(i,a,D,L)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.linkRef),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.linkRef),L.value=a.getAttribute("data-link-label"),L.oninput=function(){u()},L.onkeydown=function(D){Ot(i,D)||cn(D,s)||Ir(i,a,D,f)},pn(a,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),tn(i,"link-ref"),en(i,a)},ur=function(i,a,s){var u=a.previousElementSibling;if(!(!u||!a.parentElement.isEqualNode(s.wysiwyg.element)&&a.tagName!=="LI")){var d=document.createElement("button");d.setAttribute("type","button"),d.setAttribute("data-type","up"),d.setAttribute("aria-label",window.VditorI18n.up+"<"+(0,m.ns)("⇧⌘U")+">"),d.innerHTML='<svg><use xlink:href="#vditor-icon-up"></use></svg>',d.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",d.onclick=function(){i.insertNode(document.createElement("wbr")),u.insertAdjacentElement("beforebegin",a),(0,q.ib)(s.wysiwyg.element,i),Re(s),jn(s),Z(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},nr=function(i,a,s){var u=a.nextElementSibling;if(!(!u||!a.parentElement.isEqualNode(s.wysiwyg.element)&&a.tagName!=="LI")){var d=document.createElement("button");d.setAttribute("type","button"),d.setAttribute("data-type","down"),d.setAttribute("aria-label",window.VditorI18n.down+"<"+(0,m.ns)("⇧⌘D")+">"),d.innerHTML='<svg><use xlink:href="#vditor-icon-down"></use></svg>',d.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",d.onclick=function(){i.insertNode(document.createElement("wbr")),u.insertAdjacentElement("afterend",a),(0,q.ib)(s.wysiwyg.element,i),Re(s),jn(s),Z(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},pn=function(i,a){var s=document.createElement("button");s.setAttribute("type","button"),s.setAttribute("data-type","remove"),s.setAttribute("aria-label",window.VditorI18n.remove+"<"+(0,m.ns)("⇧⌘X")+">"),s.innerHTML='<svg><use xlink:href="#vditor-icon-trashcan"></use></svg>',s.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",s.onclick=function(){var u=(0,q.zh)(a);u.setStartAfter(i),(0,q.Hc)(u),i.remove(),Re(a),jn(a),["H1","H2","H3","H4","H5","H6"].includes(i.tagName)&&Ht(a)},a.wysiwyg.popover.insertAdjacentElement("beforeend",s)},Ir=function(i,a,s,u){if(!s.isComposing){if(s.key==="Tab"){u.focus(),u.select(),s.preventDefault();return}if(!(0,m.yl)(s)&&!s.shiftKey&&s.altKey&&s.key==="Enter"){var d=(0,q.zh)(i);a.insertAdjacentHTML("afterend",c.g.ZWSP),d.setStartAfter(a.nextSibling),d.collapse(!0),(0,q.Hc)(d),s.preventDefault()}}},Ti=function(i,a,s){i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(a.innerHTML=f.value),a.setAttribute("href",L.value),a.setAttribute("title",_.value),Re(i)};a.querySelectorAll("[data-marker]").forEach(function(B){B.removeAttribute("data-marker")});var d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.textIsNotEmpty),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.textIsNotEmpty),f.style.width="120px",f.value=a.innerHTML||"",f.oninput=function(){u()},f.onkeydown=function(B){Ot(i,B)||cn(B,s)||Ir(i,a,B,L)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.link),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.link),L.value=a.getAttribute("href")||"",L.oninput=function(){u()},L.onkeydown=function(B){Ot(i,B)||cn(B,s)||Ir(i,a,B,_)};var D=document.createElement("span");D.setAttribute("aria-label",window.VditorI18n.tooltipText),D.className="vditor-tooltipped vditor-tooltipped__n";var _=document.createElement("input");D.appendChild(_),_.className="vditor-input",_.setAttribute("placeholder",window.VditorI18n.tooltipText),_.style.width="60px",_.value=a.getAttribute("title")||"",_.oninput=function(){u()},_.onkeydown=function(B){Ot(i,B)||cn(B,s)||Ir(i,a,B,f)},pn(a,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),i.wysiwyg.popover.insertAdjacentElement("beforeend",D),tn(i,"a"),en(i,a)},di=function(i,a){var s=i.target;a.wysiwyg.popover.innerHTML="";var u=function(){s.setAttribute("src",f.value),s.setAttribute("alt",L.value),s.setAttribute("title",_.value),typeof a.options.input=="function"&&a.options.input(v(a))},d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.imageURL),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.imageURL),f.value=s.getAttribute("src")||"",f.oninput=function(){u()},f.onkeydown=function(B){Ot(a,B)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.alternateText),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.alternateText),L.style.width="52px",L.value=s.getAttribute("alt")||"",L.oninput=function(){u()},L.onkeydown=function(B){Ot(a,B)};var D=document.createElement("span");D.setAttribute("aria-label",window.VditorI18n.title),D.className="vditor-tooltipped vditor-tooltipped__n";var _=document.createElement("input");D.appendChild(_),_.className="vditor-input",_.setAttribute("placeholder",window.VditorI18n.title),_.value=s.getAttribute("title")||"",_.oninput=function(){u()},_.onkeydown=function(B){Ot(a,B)},pn(s,a),a.wysiwyg.popover.insertAdjacentElement("beforeend",d),a.wysiwyg.popover.insertAdjacentElement("beforeend",E),a.wysiwyg.popover.insertAdjacentElement("beforeend",D),tn(a,"image"),en(a,s)},cn=function(i,a){if(!(0,m.yl)(i)&&!i.shiftKey&&i.key==="Enter"||i.key==="Escape")return a&&(0,q.Hc)(a),i.preventDefault(),i.stopPropagation(),!0},tn=function(i,a){i.options.customWysiwygToolbar(a,i.wysiwyg.popover)},dr=function(i){i.currentMode==="wysiwyg"?jn(i):i.currentMode==="ir"&&qe(i)},uo=function(i,a,s){s===void 0&&(s={enableAddUndoStack:!0,enableHint:!1,enableInput:!0});var u=i.wysiwyg.element;u.innerHTML=i.lute.Md2VditorDOM(a),u.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(d){tt(d,i),d.previousElementSibling.setAttribute("style","display:none")}),Re(i,s)},Yi=function(i,a,s){for(var u=i.startContainer.parentElement,d=!1,f="",E="",L=Mn(i),D=L.beforeHTML,_=L.afterHTML;u&&!d;){var B=u.tagName;if(B==="STRIKE"&&(B="S"),B==="I"&&(B="EM"),B==="B"&&(B="STRONG"),B==="S"||B==="STRONG"||B==="EM"){var K="",fe="",ve="";u.parentElement.getAttribute("data-block")!=="0"&&(fe=jt(u),ve=Ut(u)),(D||fe)&&(K="".concat(fe,"<").concat(B,">").concat(D,"</").concat(B,">"),D=K),(s==="bold"&&B==="STRONG"||s==="italic"&&B==="EM"||s==="strikeThrough"&&B==="S")&&(K+="".concat(f).concat(c.g.ZWSP,"<wbr>").concat(E),d=!0),(_||ve)&&(_="<".concat(B,">").concat(_,"</").concat(B,">").concat(ve),K+=_),u.parentElement.getAttribute("data-block")!=="0"?(u=u.parentElement,u.innerHTML=K):(u.outerHTML=K,u=u.parentElement),f="<".concat(B,">")+f,E="</".concat(B,">")+E}else d=!0}(0,q.ib)(a.wysiwyg.element,i)},bs=function(i,a,s){if(!(i.wysiwyg.composingLock&&s instanceof CustomEvent)){var u=!0,d=!0;i.wysiwyg.element.querySelector("wbr")&&i.wysiwyg.element.querySelector("wbr").remove();var f=(0,q.zh)(i),E=a.getAttribute("data-type");if(a.classList.contains("vditor-menu--current"))if(E==="strike"&&(E="strikeThrough"),E==="quote"){var L=(0,y.lG)(f.startContainer,"BLOCKQUOTE");L||(L=f.startContainer.childNodes[f.startOffset]),L&&(u=!1,a.classList.remove("vditor-menu--current"),f.insertNode(document.createElement("wbr")),L.outerHTML=L.innerHTML.trim()===""?'<p data-block="0">'.concat(L.innerHTML,"</p>"):L.innerHTML,(0,q.ib)(i.wysiwyg.element,f))}else if(E==="inline-code"){var D=(0,y.lG)(f.startContainer,"CODE");D||(D=f.startContainer.childNodes[f.startOffset]),D&&(D.outerHTML=D.innerHTML.replace(c.g.ZWSP,"")+"<wbr>",(0,q.ib)(i.wysiwyg.element,f))}else E==="link"?(f.collapsed&&f.selectNode(f.startContainer.parentElement),document.execCommand("unlink",!1,"")):E==="check"||E==="list"||E==="ordered-list"?(Ji(i,f,E),(0,q.ib)(i.wysiwyg.element,f),u=!1,a.classList.remove("vditor-menu--current")):(u=!1,a.classList.remove("vditor-menu--current"),f.toString()===""?Yi(f,i,E):document.execCommand(E,!1,""));else{i.wysiwyg.element.childNodes.length===0&&(i.wysiwyg.element.innerHTML='<p data-block="0"><wbr></p>',(0,q.ib)(i.wysiwyg.element,f));var _=(0,y.F9)(f.startContainer);if(E==="quote"){if(_||(_=f.startContainer.childNodes[f.startOffset]),_){u=!1,a.classList.add("vditor-menu--current"),f.insertNode(document.createElement("wbr"));var B=(0,y.lG)(f.startContainer,"LI");B&&_.contains(B)?B.innerHTML='<blockquote data-block="0">'.concat(B.innerHTML,"</blockquote>"):_.outerHTML='<blockquote data-block="0">'.concat(_.outerHTML,"</blockquote>"),(0,q.ib)(i.wysiwyg.element,f)}}else if(E==="check"||E==="list"||E==="ordered-list")Ji(i,f,E,!1),(0,q.ib)(i.wysiwyg.element,f),u=!1,x(i.toolbar.elements,["check","list","ordered-list"]),a.classList.add("vditor-menu--current");else if(E==="inline-code"){if(f.toString()===""){var K=document.createElement("code");K.textContent=c.g.ZWSP,f.insertNode(K),f.setStart(K.firstChild,1),f.collapse(!0),(0,q.Hc)(f)}else if(f.startContainer.nodeType===3){var K=document.createElement("code");f.surroundContents(K),f.insertNode(K),(0,q.Hc)(f)}a.classList.add("vditor-menu--current")}else if(E==="code"){var K=document.createElement("div");K.className="vditor-wysiwyg__block",K.setAttribute("data-type","code-block"),K.setAttribute("data-block","0"),K.setAttribute("data-marker","```"),f.toString()===""?K.innerHTML=`<pre><code><wbr>
</code></pre>`:(K.innerHTML="<pre><code>".concat(f.toString(),"<wbr></code></pre>"),f.deleteContents()),f.insertNode(K),_&&(_.outerHTML=i.lute.SpinVditorDOM(_.outerHTML)),(0,q.ib)(i.wysiwyg.element,f),i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(bt){tt(bt,i)}),a.classList.add("vditor-menu--disabled")}else if(E==="link"){if(f.toString()===""){var fe=document.createElement("a");fe.innerText=c.g.ZWSP,f.insertNode(fe),f.setStart(fe.firstChild,1),f.collapse(!0),Ti(i,fe,f);var ve=i.wysiwyg.popover.querySelector("input");ve.value="",ve.focus(),d=!1}else{var K=document.createElement("a");K.setAttribute("href",""),K.innerHTML=f.toString(),f.surroundContents(K),f.insertNode(K),(0,q.Hc)(f),Ti(i,K,f);var ue=i.wysiwyg.popover.querySelectorAll("input");ue[0].value=K.innerText,ue[1].focus()}u=!1,a.classList.add("vditor-menu--current")}else if(E==="table"){var ke='<table data-block="0"><thead><tr><th>col1<wbr></th><th>col2</th><th>col3</th></tr></thead><tbody><tr><td> </td><td> </td><td> </td></tr><tr><td> </td><td> </td><td> </td></tr></tbody></table>';if(f.toString().trim()==="")_&&_.innerHTML.trim().replace(c.g.ZWSP,"")===""?_.outerHTML=ke:document.execCommand("insertHTML",!1,ke),f.selectNode(i.wysiwyg.element.querySelector("wbr").previousSibling),i.wysiwyg.element.querySelector("wbr").remove(),(0,q.Hc)(f);else{ke='<table data-block="0"><thead><tr>';var we=f.toString().split(`
`),de=we[0].split(",").length>we[0].split(" ").length?",":" ";we.forEach(function($e,bt){bt===0?($e.split(de).forEach(function(gt,kt){kt===0?ke+="<th>".concat(gt,"<wbr></th>"):ke+="<th>".concat(gt,"</th>")}),ke+="</tr></thead>"):(bt===1?ke+="<tbody><tr>":ke+="<tr>",$e.split(de).forEach(function(gt){ke+="<td>".concat(gt,"</td>")}),ke+="</tr>")}),ke+="</tbody></table>",document.execCommand("insertHTML",!1,ke),(0,q.ib)(i.wysiwyg.element,f)}u=!1,a.classList.add("vditor-menu--disabled")}else if(E==="line"){if(_){var Ie=`<hr data-block="0"><p data-block="0"><wbr>
</p>`;_.innerHTML.trim()===""?_.outerHTML=Ie:_.insertAdjacentHTML("afterend",Ie),(0,q.ib)(i.wysiwyg.element,f)}}else if(u=!1,a.classList.add("vditor-menu--current"),E==="strike"&&(E="strikeThrough"),f.toString()===""&&(E==="bold"||E==="italic"||E==="strikeThrough")){var Te="strong";E==="italic"?Te="em":E==="strikeThrough"&&(Te="s");var K=document.createElement(Te);K.textContent=c.g.ZWSP,f.insertNode(K),K.previousSibling&&K.previousSibling.textContent===c.g.ZWSP&&(K.previousSibling.textContent=""),f.setStart(K.firstChild,1),f.collapse(!0),(0,q.Hc)(f)}else document.execCommand(E,!1,"")}u&&jn(i),d&&Re(i)}},Mt=function(){function i(a,s){var u,d=this;this.element=document.createElement("div"),s.className&&(u=this.element.classList).add.apply(u,s.className.split(" "));var f=s.hotkey?" <".concat((0,m.ns)(s.hotkey),">"):"";s.level===2&&(f=s.hotkey?" &lt;".concat((0,m.ns)(s.hotkey),"&gt;"):"");var E=s.tip?s.tip+f:"".concat(window.VditorI18n[s.name]).concat(f),L=s.name==="upload"?"div":"button";if(s.level===2)this.element.innerHTML="<".concat(L,' data-type="').concat(s.name,'">').concat(E,"</").concat(L,">");else{this.element.classList.add("vditor-toolbar__item");var D=document.createElement(L);D.setAttribute("data-type",s.name),D.className="vditor-tooltipped vditor-tooltipped__".concat(s.tipPosition),D.setAttribute("aria-label",E),D.innerHTML=s.icon,this.element.appendChild(D)}s.prefix&&this.element.children[0].addEventListener((0,m.Le)(),function(_){_.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&(a.currentMode==="wysiwyg"?bs(a,d.element.children[0],_):a.currentMode==="ir"?vu(a,d.element.children[0],s.prefix||"",s.suffix||""):Gt(a,d.element.children[0],s.prefix||"",s.suffix||""))})}return i}(),ys=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),er=function(i,a,s){var u;if(typeof s!="string"?(A(i,["subToolbar","hint"]),s.preventDefault(),u=v(i)):u=s,!(i.currentMode===a&&typeof s!="string")){if(i.devtools&&i.devtools.renderEchart(i),i.options.preview.mode==="both"&&a==="sv"?i.preview.element.style.display="block":i.preview.element.style.display="none",S(i.toolbar.elements,c.g.EDIT_TOOLBARS),x(i.toolbar.elements,c.g.EDIT_TOOLBARS),k(i.toolbar.elements,["outdent","indent"]),a==="ir")C(i.toolbar.elements,["both"]),T(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.sv.element.style.display="none",i.wysiwyg.element.parentElement.style.display="none",i.ir.element.parentElement.style.display="block",i.lute.SetVditorIR(!0),i.lute.SetVditorWYSIWYG(!1),i.lute.SetVditorSV(!1),i.currentMode="ir",i.ir.element.innerHTML=i.lute.Md2VditorIRDOM(u),Xn(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),ze(i),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(f){tt(f,i)}),i.ir.element.querySelectorAll(".vditor-toc").forEach(function(f){(0,Fe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})});else if(a==="wysiwyg")C(i.toolbar.elements,["both"]),T(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.sv.element.style.display="none",i.wysiwyg.element.parentElement.style.display="block",i.ir.element.parentElement.style.display="none",i.lute.SetVditorIR(!1),i.lute.SetVditorWYSIWYG(!0),i.lute.SetVditorSV(!1),i.currentMode="wysiwyg",ze(i),uo(i,u,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),i.wysiwyg.element.querySelectorAll(".vditor-toc").forEach(function(f){(0,Fe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})}),i.wysiwyg.popover.style.display="none";else if(a==="sv"){T(i.toolbar.elements,["both"]),C(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.wysiwyg.element.parentElement.style.display="none",i.ir.element.parentElement.style.display="none",(i.options.preview.mode==="both"||i.options.preview.mode==="editor")&&(i.sv.element.style.display="block"),i.lute.SetVditorIR(!1),i.lute.SetVditorWYSIWYG(!1),i.lute.SetVditorSV(!0),i.currentMode="sv";var d=Oe(u,i);d==="<div data-block='0'></div>"&&(d=""),i.sv.element.innerHTML=d,G(i.sv.element),Ge(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),ze(i)}i.undo.resetIcon(i),typeof s!="string"&&(i[i.currentMode].element.focus(),dr(i)),Ht(i),Xe(i),i.toolbar.elements["edit-mode"]&&(i.toolbar.elements["edit-mode"].querySelectorAll("button").forEach(function(f){f.classList.remove("vditor-menu--current")}),i.toolbar.elements["edit-mode"].querySelector('button[data-mode="'.concat(i.currentMode,'"]')).classList.add("vditor-menu--current")),i.outline.toggle(i,i.currentMode!=="sv"&&i.options.outline.enable,typeof s!="string")}},ws=function(i){ys(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");return f.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow"),f.innerHTML='<button data-mode="wysiwyg">'.concat(window.VditorI18n.wysiwyg," &lt;").concat((0,m.ns)("⌥⌘7"),`></button>
<button data-mode="ir">`).concat(window.VditorI18n.instantRendering," &lt;").concat((0,m.ns)("⌥⌘8"),`></button>
<button data-mode="sv">`).concat(window.VditorI18n.splitView," &lt;").concat((0,m.ns)("⌥⌘9"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f,u),d}return a.prototype._bindEvent=function(s,u,d){var f=this.element.children[0];M(s,u,f,d.level),u.children.item(0).addEventListener((0,m.Le)(),function(E){er(s,"wysiwyg",E),E.preventDefault(),E.stopPropagation()}),u.children.item(1).addEventListener((0,m.Le)(),function(E){er(s,"ir",E),E.preventDefault(),E.stopPropagation()}),u.children.item(2).addEventListener((0,m.Le)(),function(E){er(s,"sv",E),E.preventDefault(),E.stopPropagation()})},a}(Mt),Or=function(i,a){return(0,q.Gb)(i,a)?getSelection().toString():""},Ai=function(i,a){a.addEventListener("focus",function(){i.options.focus&&i.options.focus(v(i)),A(i,["subToolbar","hint"])})},ho=function(i,a){a.addEventListener("dblclick",function(s){s.target.tagName==="IMG"&&(i.options.image.preview?i.options.image.preview(s.target):i.options.image.isPreview&&(0,se.E)(s.target,i.options.lang,i.options.theme))})},Mi=function(i,a){a.addEventListener("blur",function(s){if(i.currentMode==="ir"){var u=i.ir.element.querySelector(".vditor-ir__node--expand");u&&u.classList.remove("vditor-ir__node--expand")}else i.currentMode==="wysiwyg"&&!i.wysiwyg.selectPopover.contains(s.relatedTarget)&&i.wysiwyg.hideComment();i[i.currentMode].range=(0,q.zh)(i),i.options.blur&&i.options.blur(v(i))})},Ci=function(i,a){a.addEventListener("dragstart",function(s){s.dataTransfer.setData(c.g.DROP_EDITOR,c.g.DROP_EDITOR)}),a.addEventListener("drop",function(s){s.dataTransfer.getData(c.g.DROP_EDITOR)?lt(i):(s.dataTransfer.types.includes("Files")||s.dataTransfer.types.includes("text/html"))&&ta(i,s,{pasteCode:function(u){document.execCommand("insertHTML",!1,u)}})})},U=function(i,a,s){a.addEventListener("copy",function(u){return s(u,i)})},Q=function(i,a,s){a.addEventListener("cut",function(u){s(u,i),i.options.comment.enable&&i.currentMode==="wysiwyg"&&i.wysiwyg.getComments(i),document.execCommand("delete")})},Z=function(i){if(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)),!!i.options.typewriterMode){var a=i[i.currentMode].element,s=(0,q.Ny)(a).top;i.options.height==="auto"&&!i.element.classList.contains("vditor--fullscreen")&&window.scrollTo(window.scrollX,s+i.element.offsetTop+i.toolbar.element.offsetHeight-window.innerHeight/2+10),(i.options.height!=="auto"||i.element.classList.contains("vditor--fullscreen"))&&(a.scrollTop=s+a.scrollTop-a.clientHeight/2+10)}},xe=function(i,a){a.addEventListener("keydown",function(s){if(!s.isComposing&&i.options.keydown&&i.options.keydown(s),!((i.options.hint.extend.length>1||i.toolbar.elements.emoji)&&i.hint.select(s,i))){if(i.options.comment.enable&&i.currentMode==="wysiwyg"&&(s.key==="Backspace"||oe("⌘X",s))&&i.wysiwyg.getComments(i),i.currentMode==="sv"){if(be(i,s))return}else if(i.currentMode==="wysiwyg"){if(zn(i,s))return}else if(i.currentMode==="ir"&&Ce(i,s))return;if(i.options.ctrlEnter&&oe("⌘Enter",s)){i.options.ctrlEnter(v(i)),s.preventDefault();return}if(oe("⌘Z",s)&&!i.toolbar.elements.undo){i.undo.undo(i),s.preventDefault();return}if(oe("⌘Y",s)&&!i.toolbar.elements.redo){i.undo.redo(i),s.preventDefault();return}if(s.key==="Escape"){i.hint.element.style.display==="block"?i.hint.element.style.display="none":i.options.esc&&!s.isComposing&&i.options.esc(v(i)),s.preventDefault();return}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[1-6]$/.test(s.code)){if(i.currentMode==="wysiwyg"){var u=s.code.replace("Digit","H");(0,y.lG)(getSelection().getRangeAt(0).startContainer,u)?lr(i):kn(i,u),Re(i)}else i.currentMode==="sv"?Ct(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" "):i.currentMode==="ir"&&fi(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" ");return s.preventDefault(),!0}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[7-9]$/.test(s.code))return s.code==="Digit7"?er(i,"wysiwyg",s):s.code==="Digit8"?er(i,"ir",s):s.code==="Digit9"&&er(i,"sv",s),!0;i.options.toolbar.find(function(d){if(!d.hotkey||d.toolbar){if(d.toolbar){var f=d.toolbar.find(function(E){if(!E.hotkey)return!1;if(oe(E.hotkey,s))return i.toolbar.elements[E.name].children[0].dispatchEvent(new CustomEvent((0,m.Le)())),s.preventDefault(),!0});return!!f}return!1}if(oe(d.hotkey,s))return i.toolbar.elements[d.name].children[0].dispatchEvent(new CustomEvent((0,m.Le)())),s.preventDefault(),!0})}})},He=function(i,a){a.addEventListener("selectstart",function(s){a.onmouseup=function(){setTimeout(function(){var u=Or(i[i.currentMode].element);u.trim()?(i.currentMode==="wysiwyg"&&i.options.comment.enable&&(!(0,y.a1)(s.target,"data-type","footnotes-block")&&!(0,y.a1)(s.target,"data-type","link-ref-defs-block")?i.wysiwyg.showComment():i.wysiwyg.hideComment()),i.options.select&&i.options.select(u)):(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.wysiwyg.hideComment(),typeof i.options.unSelect=="function"&&i.options.unSelect())})}})},Pe=function(i,a){var s=(0,q.zh)(i);s.extractContents(),s.insertNode(document.createTextNode(Lute.Caret)),s.insertNode(document.createTextNode(a));var u=(0,y.a1)(s.startContainer,"data-block","0");u||(u=i.sv.element);var d=i.lute.SpinVditorSVDOM(u.textContent);d="<div data-block='0'>"+d.replace(/<span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span><span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span></g,`<span data-type="newline"><br /><span style="display: none">
</span></span><span data-type="newline"><br /><span style="display: none">
</span></span></div><div data-block="0"><`)+"</div>",u.isEqualNode(i.sv.element)?u.innerHTML=d:u.outerHTML=d,G(i.sv.element),(0,q.ib)(i.sv.element,s),Z(i)},pe=function(i,a,s){s===void 0&&(s=!0);var u=i;for(u.nodeType===3&&(u=u.parentElement);u;){if(u.getAttribute("data-type")===a)return u;s?u=u.previousElementSibling:u=u.nextElementSibling}return!1},Oe=function(i,a){z("SpinVditorSVDOM",i,"argument",a.options.debugger);var s=a.lute.SpinVditorSVDOM(i);return i="<div data-block='0'>"+s.replace(/<span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span><span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span></g,`<span data-type="newline"><br /><span style="display: none">
</span></span><span data-type="newline"><br /><span style="display: none">
</span></span></div><div data-block="0"><`)+"</div>",z("SpinVditorSVDOM",i,"result",a.options.debugger),i},Je=function(i){var a=i.getAttribute("data-type"),s=i.previousElementSibling,u=a&&a!=="text"&&a!=="table"&&a!=="heading-marker"&&a!=="newline"&&a!=="yaml-front-matter-open-marker"&&a!=="yaml-front-matter-close-marker"&&a!=="code-block-info"&&a!=="code-block-close-marker"&&a!=="code-block-open-marker"?i.textContent:"",d=!1;for(a==="newline"&&(d=!0);s&&!d;){var f=s.getAttribute("data-type");if(f==="li-marker"||f==="blockquote-marker"||f==="task-marker"||f==="padding"){var E=s.textContent;if(f==="li-marker"&&(a==="code-block-open-marker"||a==="code-block-info"))u=E.replace(/\S/g," ")+u;else if(a==="code-block-close-marker"&&s.nextElementSibling.isSameNode(i)){var L=pe(i,"code-block-open-marker");L&&L.previousElementSibling&&(s=L.previousElementSibling,u=E+u)}else u=E+u}else f==="newline"&&(d=!0);s=s.previousElementSibling}return u},Ge=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&i.hint.render(i),i.preview.render(i);var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),clearTimeout(i.sv.processTimeoutId),i.sv.processTimeoutId=window.setTimeout(function(){a.enableAddUndoStack&&!i.sv.composingLock&&i.undo.addToUndoStack(i)},i.options.undoDelay)},Ct=function(i,a){var s=(0,q.zh)(i),u=(0,N.S)(s.startContainer,"SPAN");u&&u.textContent.trim()!==""&&(a=`
`+a),s.collapse(!0),document.execCommand("insertHTML",!1,a)},Gt=function(i,a,s,u){var d=(0,q.zh)(i),f=a.getAttribute("data-type");i.sv.element.childNodes.length===0&&(i.sv.element.innerHTML=`<span data-type="p" data-block="0"><span data-type="text"><wbr></span></span><span data-type="newline"><br><span style="display: none">
</span></span>`,(0,q.ib)(i.sv.element,d));var E=(0,y.F9)(d.startContainer),L=(0,N.S)(d.startContainer,"SPAN");if(E){if(f==="link"){var D=void 0;d.toString()===""?D="".concat(s).concat(Lute.Caret).concat(u):D="".concat(s).concat(d.toString()).concat(u.replace(")",Lute.Caret+")")),document.execCommand("insertHTML",!1,D);return}else if(f==="italic"||f==="bold"||f==="strike"||f==="inline-code"||f==="code"||f==="table"||f==="line"){var D=void 0;d.toString()===""?D="".concat(s).concat(Lute.Caret).concat(f==="code"?"":u):D="".concat(s).concat(d.toString()).concat(Lute.Caret).concat(f==="code"?"":u),f==="table"||f==="code"&&L&&L.textContent!==""?D=`
`+D:f==="line"&&(D=`
`.concat(s,`
`).concat(Lute.Caret)),document.execCommand("insertHTML",!1,D);return}else if((f==="check"||f==="list"||f==="ordered-list"||f==="quote")&&L){var _="* ";f==="check"?_="* [ ] ":f==="ordered-list"?_="1. ":f==="quote"&&(_="> ");var B=pe(L,"newline");B?B.insertAdjacentText("afterend",_):E.insertAdjacentText("afterbegin",_),X(i);return}(0,q.ib)(i.sv.element,d),Ge(i)}},un=function(i){switch(i.currentMode){case"ir":return i.ir.element;case"wysiwyg":return i.wysiwyg.element;case"sv":return i.sv.element}},$n=function(i,a){i.options.upload.setHeaders&&(i.options.upload.headers=i.options.upload.setHeaders()),i.options.upload.headers&&Object.keys(i.options.upload.headers).forEach(function(s){a.setRequestHeader(s,i.options.upload.headers[s])})},mr=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(K){E(K)}}function D(B){try{_(u.throw(B))}catch(K){E(K)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},Hr=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Ia=function(){function i(){this.isUploading=!1,this.element=document.createElement("div"),this.element.className="vditor-upload"}return i}(),Li=function(i,a){i.tip.hide();var s=[],u="",d="";i.options.lang,i.options;for(var f=function(_,B){var K=a[B],fe=!0;K.name||(u+="<li>".concat(window.VditorI18n.nameEmpty,"</li>"),fe=!1),K.size>i.options.upload.max&&(u+="<li>".concat(K.name," ").concat(window.VditorI18n.over," ").concat(i.options.upload.max/1024/1024,"M</li>"),fe=!1);var ve=K.name.lastIndexOf("."),ue=K.name.substr(ve),ke=i.options.upload.filename(K.name.substr(0,ve))+ue;if(i.options.upload.accept){var we=i.options.upload.accept.split(",").some(function(de){var Ie=de.trim();if(Ie.indexOf(".")===0){if(ue.toLowerCase()===Ie.toLowerCase())return!0}else if(K.type.split("/")[0]===Ie.split("/")[0])return!0;return!1});we||(u+="<li>".concat(K.name," ").concat(window.VditorI18n.fileTypeError,"</li>"),fe=!1)}fe&&(s.push(K),d+="<li>".concat(ke," ").concat(window.VditorI18n.uploading,' <a class="vditorCancelUpload" href="javascript:void(0)">').concat(window.VditorI18n.cancelUpload,"</a></li>"))},E=a.length,L=0;L<E;L++)f(E,L);if(i.tip.show("<ul>".concat(u).concat(d,"</ul>")),i.options.upload.cancel){var D=i.tip.element.querySelector(".vditorCancelUpload");D&&D.addEventListener("click",function(){i.options.upload.cancel(s),i.tip.hide(),i.upload.isUploading=!1})}return s},Oa=function(i,a){var s=un(a);s.focus();var u=JSON.parse(i),d="";u.code===1&&(d="".concat(u.msg)),u.data.errFiles&&u.data.errFiles.length>0&&(d="<ul><li>".concat(d,"</li>"),u.data.errFiles.forEach(function(E){var L=E.lastIndexOf("."),D=a.options.upload.filename(E.substr(0,L))+E.substr(L);d+="<li>".concat(D," ").concat(window.VditorI18n.uploadError,"</li>")}),d+="</ul>"),d?a.tip.show(d):a.tip.hide();var f="";Object.keys(u.data.succMap).forEach(function(E){var L=u.data.succMap[E],D=E.lastIndexOf("."),_=E.substr(D),B=a.options.upload.filename(E.substr(0,D))+_;_=_.toLowerCase(),_.indexOf(".wav")===0||_.indexOf(".mp3")===0||_.indexOf(".ogg")===0?a.currentMode==="wysiwyg"?f+=`<div class="vditor-wysiwyg__block" data-type="html-block"
data-block="0"><pre><code>&lt;audio controls="controls" src="`.concat(L,'"&gt;&lt;/audio&gt;</code></pre><pre class="vditor-wysiwyg__preview" data-render="1"><audio controls="controls" src="').concat(L,`"></audio></pre></div>
`):a.currentMode==="ir"?f+='<audio controls="controls" src="'.concat(L,`"></audio>
`):f+="[".concat(B,"](").concat(L,`)
`):_.indexOf(".apng")===0||_.indexOf(".bmp")===0||_.indexOf(".gif")===0||_.indexOf(".ico")===0||_.indexOf(".cur")===0||_.indexOf(".jpg")===0||_.indexOf(".jpeg")===0||_.indexOf(".jfif")===0||_.indexOf(".pjp")===0||_.indexOf(".pjpeg")===0||_.indexOf(".png")===0||_.indexOf(".svg")===0||_.indexOf(".webp")===0?a.currentMode==="wysiwyg"?f+='<img alt="'.concat(B,'" src="').concat(L,`">
`):f+="![".concat(B,"](").concat(L,`)
`):a.currentMode==="wysiwyg"?f+='<a href="'.concat(L,'">').concat(B,`</a>
`):f+="[".concat(B,"](").concat(L,`)
`)}),(0,q.Hc)(a.upload.range),document.execCommand("insertHTML",!1,f),a.upload.range=getSelection().getRangeAt(0).cloneRange()},_i=function(i,a,s){return mr(void 0,void 0,void 0,function(){var u,d,ue,f,E,E,L,D,_,B,K,fe,ve,ue,ke,we;return Hr(this,function(de){switch(de.label){case 0:for(u=[],d=i.options.upload.multiple===!0?a.length:1,ue=0;ue<d;ue++)f=a[ue],f instanceof DataTransferItem&&(f=f.getAsFile()),u.push(f);return i.options.upload.handler?[4,i.options.upload.handler(u)]:[3,2];case 1:return E=de.sent(),s&&(s.value=""),typeof E=="string"?(i.tip.show(E),[2]):[2];case 2:return!i.options.upload.url||!i.upload?(s&&(s.value=""),i.tip.show("please config: options.upload.url"),[2]):i.options.upload.file?[4,i.options.upload.file(u)]:[3,4];case 3:u=de.sent(),de.label=4;case 4:if(i.options.upload.validate&&(E=i.options.upload.validate(u),typeof E=="string"))return i.tip.show(E),[2];if(L=un(i),i.upload.range=(0,q.zh)(i),D=Li(i,u),D.length===0)return s&&(s.value=""),[2];for(_=new FormData,B=i.options.upload.extraData,K=0,fe=Object.keys(B);K<fe.length;K++)ve=fe[K],_.append(ve,B[ve]);for(ue=0,ke=D.length;ue<ke;ue++)_.append(i.options.upload.fieldName,D[ue]);return we=new XMLHttpRequest,i.upload.xhr=we,we.open("POST",i.options.upload.url),i.options.upload.token&&we.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(we.withCredentials=!0),$n(i,we),i.upload.isUploading=!0,L.setAttribute("contenteditable","false"),we.onreadystatechange=function(){if(we.readyState===XMLHttpRequest.DONE){if(i.upload.isUploading=!1,L.setAttribute("contenteditable","true"),we.status>=200&&we.status<300)if(i.options.upload.success)i.options.upload.success(L,we.responseText);else{var Ie=we.responseText;i.options.upload.format&&(Ie=i.options.upload.format(a,we.responseText)),Oa(Ie,i)}else i.options.upload.error?i.options.upload.error(we.responseText):i.tip.show(we.responseText);s&&(s.value=""),i.upload.element.style.display="none",i.upload.xhr=void 0}},we.upload.onprogress=function(Ie){if(Ie.lengthComputable){var Te=Ie.loaded/Ie.total*100;i.upload.element.style.display="block";var $e=i.upload.element;$e.style.width=Te+"%"}},we.send(_),[2]}})})},Zr=function(i,a,s){var u,d=(0,y.F9)(a.startContainer);if(d||(d=i.wysiwyg.element),s&&s.inputType!=="formatItalic"&&s.inputType!=="deleteByDrag"&&s.inputType!=="insertFromDrop"&&s.inputType!=="formatBold"&&s.inputType!=="formatRemove"&&s.inputType!=="formatStrikeThrough"&&s.inputType!=="insertUnorderedList"&&s.inputType!=="insertOrderedList"&&s.inputType!=="formatOutdent"&&s.inputType!=="formatIndent"&&s.inputType!==""||!s){var f=mt(a.startContainer);f&&f.remove(),i.wysiwyg.element.querySelectorAll("wbr").forEach(function(Te){Te.remove()}),a.insertNode(document.createElement("wbr")),d.querySelectorAll("[style]").forEach(function(Te){Te.removeAttribute("style")}),d.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))}),(u=d.previousElementSibling)===null||u===void 0||u.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))});var E="";d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.wysiwyg.element);var L=d.isEqualNode(i.wysiwyg.element),D=(0,y.a1)(d,"data-type","footnotes-block");if(L)E=d.innerHTML;else{var _=(0,y.O9)(a.startContainer);if(_&&!D){var B=(0,N.S)(a.startContainer,"BLOCKQUOTE");B?d=(0,y.F9)(a.startContainer)||d:d=_}if(D&&(d=D),E=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var K=d.previousElementSibling,fe=d.nextElementSibling;K&&(K.tagName==="UL"||K.tagName==="OL")&&(E=K.outerHTML+E,K.remove()),fe&&(fe.tagName==="UL"||fe.tagName==="OL")&&(E=E+fe.outerHTML,fe.remove()),E=E.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}d.innerText.startsWith("```")||(i.wysiwyg.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(Te){Te&&!d.isEqualNode(Te)&&(E+=Te.outerHTML,Te.remove())}),i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(Te){Te&&!d.isEqualNode(Te)&&(E+=Te.outerHTML,Te.remove())}))}if(E=E.replace(/<\/(strong|b)><strong data-marker="\W{2}">/g,"").replace(/<\/(em|i)><em data-marker="\W{1}">/g,"").replace(/<\/(s|strike)><s data-marker="~{1,2}">/g,""),E==='<p data-block="0">```<wbr></p>'&&i.hint.recentLanguage&&(E='<p data-block="0">```<wbr></p>'.replace("```","```"+i.hint.recentLanguage)),z("SpinVditorDOM",E,"argument",i.options.debugger),E=i.lute.SpinVditorDOM(E),z("SpinVditorDOM",E,"result",i.options.debugger),L)d.innerHTML=E;else if(d.outerHTML=E,D){var ve=(0,y.E2)(i.wysiwyg.element.querySelector("wbr"),"LI");if(ve){var ue=i.wysiwyg.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(ve.getAttribute("data-marker"),'"]'));ue&&ue.setAttribute("aria-label",ve.textContent.trim().substr(0,24))}}var ke,we=i.wysiwyg.element.querySelectorAll("[data-type='link-ref-defs-block']");we.forEach(function(Te,$e){$e===0?ke=Te:(ke.insertAdjacentHTML("beforeend",Te.innerHTML),Te.remove())}),we.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",we[0]);var de,Ie=i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']");Ie.forEach(function(Te,$e){$e===0?de=Te:(de.insertAdjacentHTML("beforeend",Te.innerHTML),Te.remove())}),Ie.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",Ie[0]),(0,q.ib)(i.wysiwyg.element,a),i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(Te){tt(Te,i)}),s&&(s.inputType==="deleteContentBackward"||s.inputType==="deleteContentForward")&&i.options.comment.enable&&(i.wysiwyg.triggerRemoveComment(i),i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)))}Ht(i),Re(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},pu=function(i,a){return Object.defineProperty?Object.defineProperty(i,"raw",{value:a}):i.raw=a,i},xs=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(K){E(K)}}function D(B){try{_(u.throw(B))}catch(K){E(K)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},ks=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Ss=function(i,a,s){if(i.keyCode===229&&i.code===""&&i.key==="Unidentified"&&a.currentMode!=="sv"){var u=(0,y.F9)(s);if(u&&u.textContent.trim()==="")return a[a.currentMode].composingLock=!0,!1}return!0},Es=function(i,a,s){if(!(s.key==="Enter"||s.key==="Tab"||s.key==="Backspace"||s.key.indexOf("Arrow")>-1||(0,m.yl)(s)||s.key==="Escape"||s.shiftKey||s.altKey)){var u=(0,y.lG)(i.startContainer,"P")||(0,y.lG)(i.startContainer,"LI");if(u&&(0,q.im)(u,a[a.currentMode].element,i).start===0){u.nodeValue&&(u.nodeValue=u.nodeValue.replace(/\u2006/g,""));var d=document.createTextNode(c.g.ZWSP);i.insertNode(d),i.setStartAfter(d)}}},Ts=function(i,a){if(a==="ArrowDown"||a==="ArrowUp"){var s=(0,y.a1)(i.startContainer,"data-type","math-inline")||(0,y.a1)(i.startContainer,"data-type","html-entity")||(0,y.a1)(i.startContainer,"data-type","html-inline");s&&(a==="ArrowDown"&&i.setStartAfter(s.parentElement),a==="ArrowUp"&&i.setStartBefore(s.parentElement))}},hi=function(i,a){var s=(0,q.zh)(i),u=(0,y.F9)(s.startContainer);u&&(u.insertAdjacentHTML(a,'<p data-block="0">'.concat(c.g.ZWSP,`<wbr>
</p>`)),(0,q.ib)(i[i.currentMode].element,s),dr(i),lt(i))},fu=function(i){var a=(0,y.lG)(i,"TABLE");return a&&a.rows[0].cells[0].isSameNode(i)?a:!1},mu=function(i){var a=(0,y.lG)(i,"TABLE");return a&&a.lastElementChild.lastElementChild.lastElementChild.isSameNode(i)?a:!1},As=function(i,a,s){s===void 0&&(s=!0);var u=i.previousElementSibling;return u||(i.parentElement.previousElementSibling?u=i.parentElement.previousElementSibling.lastElementChild:i.parentElement.parentElement.tagName==="TBODY"&&i.parentElement.parentElement.previousElementSibling?u=i.parentElement.parentElement.previousElementSibling.lastElementChild.lastElementChild:u=null),u&&(a.selectNodeContents(u),s||a.collapse(!1),(0,q.Hc)(a)),u},pi=function(i,a,s,u,d){var f=(0,q.im)(u,i[i.currentMode].element,s);if(a.key==="ArrowDown"&&u.textContent.trimRight().substr(f.start).indexOf(`
`)===-1||a.key==="ArrowRight"&&f.start>=u.textContent.trimRight().length){var E=d.nextElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!0),(0,q.Hc)(s)),a.preventDefault(),!0}return!1},Pr=function(i,a,s,u,d){var f=(0,q.im)(u,i[i.currentMode].element,s);if(a.key==="ArrowUp"&&u.textContent.substr(0,f.start).indexOf(`
`)===-1||(a.key==="ArrowLeft"||a.key==="Backspace"&&s.toString()==="")&&f.start===0){var E=d.previousElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("beforebegin",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!1),(0,q.Hc)(s)),a.preventDefault(),!0}return!1},Ji=function(i,a,s,u){u===void 0&&(u=!0);var d=(0,y.lG)(a.startContainer,"LI");if(i[i.currentMode].element.querySelectorAll("wbr").forEach(function(B){B.remove()}),a.insertNode(document.createElement("wbr")),u&&d){for(var f="",E=0;E<d.parentElement.childElementCount;E++){var L=d.parentElement.children[E].querySelector("input");L&&L.remove(),f+='<p data-block="0">'.concat(d.parentElement.children[E].innerHTML.trimLeft(),"</p>")}d.parentElement.insertAdjacentHTML("beforebegin",f),d.parentElement.remove()}else if(d)if(s==="check")d.parentElement.querySelectorAll("li").forEach(function(B){B.insertAdjacentHTML("afterbegin",'<input type="checkbox" />'.concat(B.textContent.indexOf(" ")===0?"":" ")),B.classList.add("vditor-task")});else{d.querySelector("input")&&d.parentElement.querySelectorAll("li").forEach(function(B){B.querySelector("input").remove(),B.classList.remove("vditor-task")});var D=void 0;s==="list"?(D=document.createElement("ul"),D.setAttribute("data-marker","*")):(D=document.createElement("ol"),D.setAttribute("data-marker","1.")),D.setAttribute("data-block","0"),D.setAttribute("data-tight",d.parentElement.getAttribute("data-tight")),D.innerHTML=d.parentElement.innerHTML,d.parentElement.parentNode.replaceChild(D,d.parentElement)}else{var _=(0,y.a1)(a.startContainer,"data-block","0");_||(i[i.currentMode].element.querySelector("wbr").remove(),_=i[i.currentMode].element.querySelector("p"),_.innerHTML="<wbr>"),s==="check"?(_.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li class="vditor-task"><input type="checkbox" /> '.concat(_.innerHTML,"</li></ul>")),_.remove()):s==="list"?(_.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li>'.concat(_.innerHTML,"</li></ul>")),_.remove()):s==="ordered-list"&&(_.insertAdjacentHTML("beforebegin",'<ol data-block="0"><li>'.concat(_.innerHTML,"</li></ol>")),_.remove())}},Ms=function(i,a,s){var u=a.previousElementSibling;if(a&&u){var d=[a];Array.from(s.cloneContents().children).forEach(function(D,_){D.nodeType!==3&&a&&D.textContent.trim()!==""&&a.getAttribute("data-node-id")===D.getAttribute("data-node-id")&&(_!==0&&d.push(a),a=a.nextElementSibling)}),i[i.currentMode].element.querySelectorAll("wbr").forEach(function(D){D.remove()}),s.insertNode(document.createElement("wbr"));var f=u.parentElement,E="";d.forEach(function(D){var _=D.getAttribute("data-marker");_.length!==1&&(_="1".concat(_.slice(-1))),E+='<li data-node-id="'.concat(D.getAttribute("data-node-id"),'" data-marker="').concat(_,'">').concat(D.innerHTML,"</li>"),D.remove()}),u.insertAdjacentHTML("beforeend","<".concat(f.tagName,' data-block="0">').concat(E,"</").concat(f.tagName,">")),i.currentMode==="wysiwyg"?f.outerHTML=i.lute.SpinVditorDOM(f.outerHTML):f.outerHTML=i.lute.SpinVditorIRDOM(f.outerHTML),(0,q.ib)(i[i.currentMode].element,s);var L=(0,y.O9)(s.startContainer);L&&L.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(D){tt(D,i),i.currentMode==="wysiwyg"&&D.previousElementSibling.setAttribute("style","display:none")}),lt(i),dr(i)}else i[i.currentMode].element.focus()},po=function(i,a,s,u){var d=(0,y.lG)(a.parentElement,"LI");if(d){i[i.currentMode].element.querySelectorAll("wbr").forEach(function(K){K.remove()}),s.insertNode(document.createElement("wbr"));var f=a.parentElement,E=f.cloneNode(),L=[a];Array.from(s.cloneContents().children).forEach(function(K,fe){K.nodeType!==3&&a&&K.textContent.trim()!==""&&a.getAttribute("data-node-id")===K.getAttribute("data-node-id")&&(fe!==0&&L.push(a),a=a.nextElementSibling)});var D=!1,_="";f.querySelectorAll("li").forEach(function(K){D&&(_+=K.outerHTML,!K.nextElementSibling&&!K.previousElementSibling?K.parentElement.remove():K.remove()),K.isSameNode(L[L.length-1])&&(D=!0)}),L.reverse().forEach(function(K){d.insertAdjacentElement("afterend",K)}),_&&(E.innerHTML=_,L[0].insertAdjacentElement("beforeend",E)),i.currentMode==="wysiwyg"?u.outerHTML=i.lute.SpinVditorDOM(u.outerHTML):u.outerHTML=i.lute.SpinVditorIRDOM(u.outerHTML),(0,q.ib)(i[i.currentMode].element,s);var B=(0,y.O9)(s.startContainer);B&&B.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(K){tt(K,i),i.currentMode==="wysiwyg"&&K.previousElementSibling.setAttribute("style","display:none")}),lt(i),dr(i)}else i[i.currentMode].element.focus()},Qi=function(i,a){for(var s=getSelection().getRangeAt(0).startContainer.parentElement,u=i.rows[0].cells.length,d=i.rows.length,f=0,E=0;E<d;E++)for(var L=0;L<u;L++)if(i.rows[E].cells[L].isSameNode(s)){f=L;break}for(var D=0;D<d;D++)i.rows[D].cells[f].setAttribute("align",a)},fo=function(i){var a=i.trimRight().split(`
`).pop();return a===""?!1:(a.replace(/ |-/g,"")===""||a.replace(/ |_/g,"")===""||a.replace(/ |\*/g,"")==="")&&a.replace(/ /g,"").length>2?!(a.indexOf("-")>-1&&a.trimLeft().indexOf(" ")===-1&&i.trimRight().split(`
`).length>1||a.indexOf(" ")===0||a.indexOf(" ")===0):!1},mo=function(i){var a=i.trimRight().split(`
`);return i=a.pop(),i.indexOf(" ")===0||i.indexOf(" ")===0||(i=i.trimLeft(),i===""||a.length===0)?!1:i.replace(/-/g,"")===""||i.replace(/=/g,"")===""},lt=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),i.currentMode==="wysiwyg"?Re(i,a):i.currentMode==="ir"?Xn(i,a):i.currentMode==="sv"&&Ge(i,a)},Cs=function(i,a,s,u){var d,f=i.startContainer,E=(0,y.lG)(f,"LI");if(E){if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Enter"&&!u.shiftKey&&s&&E.contains(s)&&s.nextElementSibling)return E&&!E.textContent.endsWith(`
`)&&E.insertAdjacentText("beforeend",`
`),i.insertNode(document.createTextNode(`
`)),i.collapse(!1),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&!E.previousElementSibling&&i.toString()===""&&(0,q.im)(E,a[a.currentMode].element,i).start===0)return E.nextElementSibling?(E.parentElement.insertAdjacentHTML("beforebegin",'<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>")),E.remove()):E.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>"),(0,q.ib)(a[a.currentMode].element,i),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&E.textContent.trim().replace(c.g.ZWSP,"")===""&&i.toString()===""&&((d=E.previousElementSibling)===null||d===void 0?void 0:d.tagName)==="LI")return E.previousElementSibling.insertAdjacentText("beforeend",`
`),i.selectNodeContents(E.previousElementSibling),i.collapse(!1),E.remove(),(0,q.ib)(a[a.currentMode].element,i),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Tab"){var L=!1;if((i.startOffset===0&&(f.nodeType===3&&!f.previousSibling||f.nodeType!==3&&f.nodeName==="LI")||E.classList.contains("vditor-task")&&i.startOffset===1&&f.previousSibling.nodeType!==3&&f.previousSibling.tagName==="INPUT")&&(L=!0),L||i.toString()!=="")return u.shiftKey?po(a,E,i,E.parentElement):Ms(a,E,i),u.preventDefault(),!0}}return!1},go=function(i,a,s){if(i.options.tab&&s.key==="Tab")return s.shiftKey||(a.toString()===""?(a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1)):(a.extractContents(),a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1))),(0,q.Hc)(a),lt(i),s.preventDefault(),!0},Ls=function(i,a,s,u){if(s){if(!(0,m.yl)(i)&&!i.altKey&&i.key==="Enter"){var d=String.raw(qs||(qs=pu(["",""],["",""])),s.textContent).replace(/\\\|/g,"").trim(),f=d.split("|");if(d.startsWith("|")&&d.endsWith("|")&&f.length>3){var E=f.map(function(){return"---"}).join("|");return E=s.textContent+`
`+E.substring(3,E.length-3)+`
|<wbr>`,s.outerHTML=a.lute.SpinVditorDOM(E),(0,q.ib)(a[a.currentMode].element,u),lt(a),Z(a),i.preventDefault(),!0}if(fo(s.innerHTML)&&s.previousElementSibling){var L="",D=s.innerHTML.trimRight().split(`
`);return D.length>1&&(D.pop(),L='<p data-block="0">'.concat(D.join(`
`),"</p>")),s.insertAdjacentHTML("afterend","".concat(L,`<hr data-block="0"><p data-block="0"><wbr>
</p>`)),s.remove(),(0,q.ib)(a[a.currentMode].element,u),lt(a),Z(a),i.preventDefault(),!0}if(mo(s.innerHTML))return a.currentMode==="wysiwyg"?s.outerHTML=a.lute.SpinVditorDOM(s.innerHTML+`<p data-block="0"><wbr>
</p>`):s.outerHTML=a.lute.SpinVditorIRDOM(s.innerHTML+`<p data-block="0"><wbr>
</p>`),(0,q.ib)(a[a.currentMode].element,u),lt(a),Z(a),i.preventDefault(),!0}if(u.collapsed&&s.previousElementSibling&&i.key==="Backspace"&&!(0,m.yl)(i)&&!i.altKey&&!i.shiftKey&&s.textContent.trimRight().split(`
`).length>1&&(0,q.im)(s,a[a.currentMode].element,u).start===0){var _=(0,y.DX)(s.previousElementSibling);return _.textContent.endsWith(`
`)||(_.textContent=_.textContent+`
`),_.parentElement.insertAdjacentHTML("beforeend","<wbr>".concat(s.innerHTML)),s.remove(),(0,q.ib)(a[a.currentMode].element,u),!1}return!1}},_s=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');s.tagName==="TH"?s.parentElement.parentElement.insertAdjacentHTML("afterend","<tbody><tr>".concat(u,"</tr></tbody>")):s.parentElement.insertAdjacentHTML("afterend","<tr>".concat(u,"</tr>")),lt(i)},Ns=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)s.tagName==="TH"?u+='<th align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </th>'):u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');if(s.tagName==="TH"){s.parentElement.parentElement.insertAdjacentHTML("beforebegin","<thead><tr>".concat(u,"</tr></thead>")),a.insertNode(document.createElement("wbr"));var f=s.parentElement.innerHTML.replace(/<th>/g,"<td>").replace(/<\/th>/g,"</td>");s.parentElement.parentElement.nextElementSibling.insertAdjacentHTML("afterbegin",f),s.parentElement.parentElement.remove(),(0,q.ib)(i.ir.element,a)}else s.parentElement.insertAdjacentHTML("beforebegin","<tr>".concat(u,"</tr>"));lt(i)},ea=function(i,a,s,u){u===void 0&&(u="afterend");for(var d=0,f=s.previousElementSibling;f;)d++,f=f.previousElementSibling;for(var E=0;E<a.rows.length;E++)E===0?a.rows[E].cells[d].insertAdjacentHTML(u,"<th> </th>"):a.rows[E].cells[d].insertAdjacentHTML(u,"<td> </td>");lt(i)},Ds=function(i,a,s){if(s.tagName==="TD"){var u=s.parentElement.parentElement;s.parentElement.previousElementSibling?a.selectNodeContents(s.parentElement.previousElementSibling.lastElementChild):a.selectNodeContents(u.previousElementSibling.lastElementChild.lastElementChild),u.childElementCount===1?u.remove():s.parentElement.remove(),a.collapse(!1),(0,q.Hc)(a),lt(i)}},Rs=function(i,a,s,u){for(var d=0,f=u.previousElementSibling;f;)d++,f=f.previousElementSibling;(u.previousElementSibling||u.nextElementSibling)&&(a.selectNodeContents(u.previousElementSibling||u.nextElementSibling),a.collapse(!0));for(var E=0;E<s.rows.length;E++){var L=s.rows[E].cells;if(L.length===1){s.remove(),dr(i);break}L[d].remove()}(0,q.Hc)(a),lt(i)},Is=function(i,a,s){var u=s.startContainer,d=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(d){if(!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"){(!d.lastElementChild||d.lastElementChild&&(!d.lastElementChild.isSameNode(d.lastChild)||d.lastElementChild.tagName!=="BR"))&&d.insertAdjacentHTML("beforeend","<br>");var f=document.createElement("br");return s.insertNode(f),s.setStartAfter(f),lt(i),Z(i),a.preventDefault(),!0}if(a.key==="Tab"){if(a.shiftKey)return As(d,s),a.preventDefault(),!0;var E=d.nextElementSibling;return E||(d.parentElement.nextElementSibling?E=d.parentElement.nextElementSibling.firstElementChild:d.parentElement.parentElement.tagName==="THEAD"&&d.parentElement.parentElement.nextElementSibling?E=d.parentElement.parentElement.nextElementSibling.firstElementChild.firstElementChild:E=null),E&&(s.selectNodeContents(E),(0,q.Hc)(s)),a.preventDefault(),!0}var L=d.parentElement.parentElement.parentElement;if(a.key==="ArrowUp"){if(a.preventDefault(),d.tagName==="TH")return L.previousElementSibling?(s.selectNodeContents(L.previousElementSibling),s.collapse(!1),(0,q.Hc)(s)):hi(i,"beforebegin"),!0;for(var D=0,_=d.parentElement;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var B=_.previousElementSibling;return B||(B=_.parentElement.previousElementSibling.firstChild),s.selectNodeContents(B.cells[D]),s.collapse(!1),(0,q.Hc)(s),!0}if(a.key==="ArrowDown"){a.preventDefault();var _=d.parentElement;if(!_.nextElementSibling&&d.tagName==="TD")return L.nextElementSibling?(s.selectNodeContents(L.nextElementSibling),s.collapse(!0),(0,q.Hc)(s)):hi(i,"afterend"),!0;for(var D=0;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var E=_.nextElementSibling;return E||(E=_.parentElement.nextElementSibling.firstChild),s.selectNodeContents(E.cells[D]),s.collapse(!0),(0,q.Hc)(s),!0}if(i.currentMode==="wysiwyg"&&!(0,m.yl)(a)&&a.key==="Enter"&&!a.shiftKey&&a.altKey){var K=i.wysiwyg.popover.querySelector(".vditor-input");return K.focus(),K.select(),a.preventDefault(),!0}if(!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Backspace"&&s.startOffset===0&&s.toString()===""){var fe=As(d,s,!1);return!fe&&L&&(L.textContent.trim()===""?(L.outerHTML=`<p data-block="0"><wbr>
</p>`,(0,q.ib)(i[i.currentMode].element,s)):(s.setStartBefore(L),s.collapse(!0)),lt(i)),a.preventDefault(),!0}if(oe("⇧⌘F",a))return Ns(i,s,d),a.preventDefault(),!0;if(oe("⌘=",a))return _s(i,s,d),a.preventDefault(),!0;if(oe("⇧⌘G",a))return ea(i,L,d,"beforebegin"),a.preventDefault(),!0;if(oe("⇧⌘=",a))return ea(i,L,d),a.preventDefault(),!0;if(oe("⌘-",a))return Ds(i,s,d),a.preventDefault(),!0;if(oe("⇧⌘-",a))return Rs(i,s,L,d),a.preventDefault(),!0;if(oe("⇧⌘L",a)){if(i.currentMode==="ir")return Qi(L,"left"),lt(i),a.preventDefault(),!0;var ve=i.wysiwyg.popover.querySelector('[data-type="left"]');if(ve)return ve.click(),a.preventDefault(),!0}if(oe("⇧⌘C",a)){if(i.currentMode==="ir")return Qi(L,"center"),lt(i),a.preventDefault(),!0;var ve=i.wysiwyg.popover.querySelector('[data-type="center"]');if(ve)return ve.click(),a.preventDefault(),!0}if(oe("⇧⌘R",a)){if(i.currentMode==="ir")return Qi(L,"right"),lt(i),a.preventDefault(),!0;var ve=i.wysiwyg.popover.querySelector('[data-type="right"]');if(ve)return ve.click(),a.preventDefault(),!0}}return!1},Os=function(i,a,s,u){if(s.tagName==="PRE"&&oe("⌘A",a))return u.selectNodeContents(s.firstElementChild),a.preventDefault(),!0;if(i.options.tab&&a.key==="Tab"&&!a.shiftKey&&u.toString()==="")return u.insertNode(document.createTextNode(i.options.tab)),u.collapse(!1),lt(i),a.preventDefault(),!0;if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey){var d=(0,q.im)(s,i[i.currentMode].element,u);if((d.start===0||d.start===1&&s.innerText===`
`)&&u.toString()==="")return s.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(s.firstElementChild.innerHTML,"</p>"),(0,q.ib)(i[i.currentMode].element,u),lt(i),a.preventDefault(),!0}return!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"?(s.firstElementChild.textContent.endsWith(`
`)||s.firstElementChild.insertAdjacentText("beforeend",`
`),u.extractContents(),u.insertNode(document.createTextNode(`
`)),u.collapse(!1),(0,q.Hc)(u),(0,m.vU)()||(i.currentMode==="wysiwyg"?Zr(i,u):Nt(i,u)),Z(i),a.preventDefault(),!0):!1},Hs=function(i,a,s,u){var d=a.startContainer,f=(0,y.lG)(d,"BLOCKQUOTE");if(f&&a.toString()===""){if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&(0,q.im)(f,i[i.currentMode].element,a).start===0)return a.insertNode(document.createElement("wbr")),f.outerHTML=f.innerHTML,(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0;if(u&&s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&u.parentElement.tagName==="BLOCKQUOTE"){var E=!1;if(u.innerHTML.replace(c.g.ZWSP,"")===`
`||u.innerHTML.replace(c.g.ZWSP,"")===""?(E=!0,u.remove()):u.innerHTML.endsWith(`
`)&&(0,q.im)(u,i[i.currentMode].element,a).start===u.textContent.length-1&&(u.innerHTML=u.innerHTML.substr(0,u.innerHTML.length-2),E=!0),E)return f.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP,`<wbr>
</p>`)),(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0}var L=(0,y.F9)(d);if(i.currentMode==="wysiwyg"&&L&&oe("⇧⌘;",s))return a.insertNode(document.createElement("wbr")),L.outerHTML='<blockquote data-block="0">'.concat(L.outerHTML,"</blockquote>"),(0,q.ib)(i.wysiwyg.element,a),Re(i),s.preventDefault(),!0;if(pi(i,s,a,f,f)||Pr(i,s,a,f,f))return!0}return!1},Ps=function(i,a,s){var u=a.startContainer,d=(0,y.lG)(u,"LI");if(d&&d.classList.contains("vditor-task")){if(oe("⇧⌘J",s)){var f=d.firstElementChild;return f.checked?f.removeAttribute("checked"):f.setAttribute("checked","checked"),lt(i),s.preventDefault(),!0}if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&a.toString()===""&&a.startOffset===1&&(u.nodeType===3&&u.previousSibling&&u.previousSibling.tagName==="INPUT"||u.nodeType!==3)){var E=d.previousElementSibling;if(d.querySelector("input").remove(),E){var L=(0,y.DX)(E);L.parentElement.insertAdjacentHTML("beforeend","<wbr>"+d.innerHTML.trim()),d.remove()}else d.parentElement.insertAdjacentHTML("beforebegin",'<p data-block="0"><wbr>'.concat(d.innerHTML.trim()||`
`,"</p>")),d.nextElementSibling?d.remove():d.parentElement.remove();return(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0}if(s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey){if(d.textContent.trim()==="")if((0,y.fb)(d.parentElement,"vditor-task")){var D=(0,y.O9)(u);D&&po(i,d,a,D)}else if(d.nextElementSibling){var _="",B="",K=!1;Array.from(d.parentElement.children).forEach(function(ke){d.isSameNode(ke)?K=!0:K?_+=ke.outerHTML:B+=ke.outerHTML});var fe=d.parentElement.tagName,ve=d.parentElement.tagName==="OL"?"":' data-marker="'.concat(d.parentElement.getAttribute("data-marker"),'"'),ue="";B&&(ue=d.parentElement.tagName==="UL"?"":' start="1"',B="<".concat(fe,' data-tight="true"').concat(ve,' data-block="0">').concat(B,"</").concat(fe,">")),d.parentElement.outerHTML="".concat(B,`<p data-block="0"><wbr>
</p><`).concat(fe,`
data-tight="true"`).concat(ve,' data-block="0"').concat(ue,">").concat(_,"</").concat(fe,">")}else d.parentElement.insertAdjacentHTML("afterend",`<p data-block="0"><wbr>
</p>`),d.parentElement.querySelectorAll("li").length===1?d.parentElement.remove():d.remove();else u.nodeType!==3&&a.startOffset===0&&u.firstChild.tagName==="INPUT"?a.setStart(u.childNodes[1],1):(a.setEndAfter(d.lastChild),d.insertAdjacentHTML("afterend",'<li class="vditor-task" data-marker="'.concat(d.getAttribute("data-marker"),'"><input type="checkbox"> <wbr></li>')),document.querySelector("wbr").after(a.extractContents()));return(0,q.ib)(i[i.currentMode].element,a),lt(i),Z(i),s.preventDefault(),!0}}return!1},zs=function(i,a,s,u){if(a.startContainer.nodeType!==3){var d=a.startContainer.children[a.startOffset];if(d&&d.tagName==="HR")return a.selectNodeContents(d.previousElementSibling),a.collapse(!1),s.preventDefault(),!0}if(u){var f=u.previousElementSibling;if(f&&(0,q.im)(u,i[i.currentMode].element,a).start===0&&((0,m.vU)()&&f.tagName==="HR"||f.tagName==="TABLE")){if(f.tagName==="TABLE"){var E=f.lastElementChild.lastElementChild.lastElementChild;E.innerHTML=E.innerHTML.trimLeft()+"<wbr>"+u.textContent.trim(),u.remove()}else f.remove();return(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0}}return!1},Bs=function(i){(0,m.vU)()&&i.startContainer.nodeType!==3&&i.startContainer.tagName==="HR"&&i.setStartBefore(i.startContainer)},Fs=function(i,a,s){var u,d;if(!(0,m.vU)())return!1;if(i.key==="ArrowUp"&&a&&((u=a.previousElementSibling)===null||u===void 0?void 0:u.tagName)==="TABLE"){var f=a.previousElementSibling;return s.selectNodeContents(f.rows[f.rows.length-1].lastElementChild),s.collapse(!1),i.preventDefault(),!0}return i.key==="ArrowDown"&&a&&((d=a.nextElementSibling)===null||d===void 0?void 0:d.tagName)==="TABLE"?(s.selectNodeContents(a.nextElementSibling.rows[0].cells[0]),s.collapse(!0),i.preventDefault(),!0):!1},ta=function(i,a,s){return xs(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,B,K,fe,ve,ue,ke,de,we,de,Ie;return ks(this,function(Te){switch(Te.label){case 0:return i[i.currentMode].element.getAttribute("contenteditable")!=="true"?[2]:(a.stopPropagation(),a.preventDefault(),"clipboardData"in a?(u=a.clipboardData.getData("text/html"),d=a.clipboardData.getData("text/plain"),f=a.clipboardData.files):(u=a.dataTransfer.getData("text/html"),d=a.dataTransfer.getData("text/plain"),a.dataTransfer.types.includes("Files")&&(f=a.dataTransfer.items)),E={},L=function($e,bt){if(!bt)return["",Lute.WalkContinue];if(i.options.upload.renderLinkDest)return i.options.upload.renderLinkDest(i,$e,bt);var gt=$e.TokensStr();if($e.__internal_object__.Parent.Type===34&&gt&&gt.indexOf("file://")===-1&&i.options.upload.linkToImgUrl){var kt=new XMLHttpRequest;kt.open("POST",i.options.upload.linkToImgUrl),i.options.upload.token&&kt.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(kt.withCredentials=!0),$n(i,kt),kt.setRequestHeader("Content-Type","application/json; charset=utf-8"),kt.onreadystatechange=function(){if(kt.readyState===XMLHttpRequest.DONE){if(kt.status===200){var dn=kt.responseText;i.options.upload.linkToImgFormat&&(dn=i.options.upload.linkToImgFormat(kt.responseText));var Wt=JSON.parse(dn);if(Wt.code!==0){i.tip.show(Wt.msg);return}var hn=Wt.data.originalURL;if(i.currentMode==="sv")i.sv.element.querySelectorAll(".vditor-sv__marker--link").forEach(function(zt){zt.textContent===hn&&(zt.textContent=Wt.data.url)});else{var it=i[i.currentMode].element.querySelector('img[src="'.concat(hn,'"]'));it.src=Wt.data.url,i.currentMode==="ir"&&(it.previousElementSibling.previousElementSibling.innerHTML=Wt.data.url)}lt(i)}else i.tip.show(kt.responseText);i.options.upload.linkToImgCallback&&i.options.upload.linkToImgCallback(kt.responseText)}},kt.send(JSON.stringify({url:gt}))}return i.currentMode==="ir"?['<span class="vditor-ir__marker vditor-ir__marker--link">'.concat(Lute.EscapeHTMLStr(gt),"</span>"),Lute.WalkContinue]:i.currentMode==="wysiwyg"?["",Lute.WalkContinue]:['<span class="vditor-sv__marker--link">'.concat(Lute.EscapeHTMLStr(gt),"</span>"),Lute.WalkContinue]},(u.replace(/&amp;/g,"&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig,"").trim()==='<a href="'.concat(d,'">').concat(d,"</a>")||u.replace(/&amp;/g,"&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig,"").trim()==='<!--StartFragment--><a href="'.concat(d,'">').concat(d,"</a><!--EndFragment-->"))&&(u=""),D=new DOMParser().parseFromString(u,"text/html"),D.body&&(u=D.body.innerHTML),u=Lute.Sanitize(u),i.wysiwyg.getComments(i),_=i[i.currentMode].element.scrollHeight,B=ct(u,d,i.currentMode),K=i.currentMode==="sv"?(0,y.a1)(a.target,"data-type","code-block"):(0,y.lG)(a.target,"CODE"),K?(i.currentMode==="sv"?document.execCommand("insertHTML",!1,d.replace(/&/g,"&amp;").replace(/</g,"&lt;")):(fe=(0,q.im)(a.target,i[i.currentMode].element),K.parentElement.tagName!=="PRE"&&(d+=c.g.ZWSP),K.textContent=K.textContent.substring(0,fe.start)+d+K.textContent.substring(fe.end),(0,q.$j)(fe.start+d.length,fe.start+d.length,K.parentElement),!((Ie=K.parentElement)===null||Ie===void 0)&&Ie.nextElementSibling.classList.contains("vditor-".concat(i.currentMode,"__preview"))&&(K.parentElement.nextElementSibling.innerHTML=K.outerHTML,tt(K.parentElement.nextElementSibling,i))),[3,10]):[3,1]);case 1:return B?(s.pasteCode(B),[3,10]):[3,2];case 2:return u.trim()===""?[3,5]:(ve=document.createElement("div"),ve.innerHTML=u,i.options.upload.base64ToLink?[3,4]:[4,gu(i,ve,("clipboardData"in a?a.clipboardData:a.dataTransfer).getData("text/rtf"))]);case 3:Te.sent(),Te.label=4;case 4:return ve.querySelectorAll("[style]").forEach(function($e){$e.removeAttribute("style")}),ve.querySelectorAll(".vditor-copy").forEach(function($e){$e.remove()}),i.currentMode==="ir"?(E.HTML2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(i.lute.HTML2VditorIRDOM(ve.innerHTML),i)):i.currentMode==="wysiwyg"?(E.HTML2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(i.lute.HTML2VditorDOM(ve.innerHTML),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),Pe(i,i.lute.HTML2Md(ve.innerHTML).trimRight())),i.outline.render(i),[3,10];case 5:return f.length>0?i.options.upload.url||i.options.upload.handler?[4,_i(i,f)]:[3,7]:[3,9];case 6:return Te.sent(),[3,8];case 7:ue=new FileReader,"clipboardData"in a?(f=a.clipboardData.files,ke=f[0]):a.dataTransfer.types.includes("Files")&&(f=a.dataTransfer.items,ke=f[0].getAsFile()),ke&&ke.type.startsWith("image")&&(ue.readAsDataURL(ke),ue.onload=function(){var $e="";i.currentMode==="wysiwyg"?$e+='<img alt="'.concat(ke.name,'" src="').concat(ue.result.toString(),`">
`):$e+="![".concat(ke.name,"](").concat(ue.result.toString(),`)
`),document.execCommand("insertHTML",!1,$e)}),Te.label=8;case 8:return[3,10];case 9:d.trim()!==""&&f.length===0&&(de=(0,q.zh)(i),de.toString()!==""&&i.lute.IsValidLinkDest(d)&&(d="[".concat(de.toString(),"](").concat(d,")")),i.currentMode==="ir"?(E.Md2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(Lute.Sanitize(i.lute.Md2VditorIRDOM(d)),i)):i.currentMode==="wysiwyg"?(E.Md2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(Lute.Sanitize(i.lute.Md2VditorDOM(d)),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),Pe(i,d)),i.outline.render(i)),Te.label=10;case 10:return i.currentMode!=="sv"&&(we=(0,y.F9)((0,q.zh)(i).startContainer),we&&(de=(0,q.zh)(i),i[i.currentMode].element.querySelectorAll("wbr").forEach(function($e){$e.remove()}),de.insertNode(document.createElement("wbr")),i.currentMode==="wysiwyg"?we.outerHTML=i.lute.SpinVditorDOM(we.outerHTML):we.outerHTML=i.lute.SpinVditorIRDOM(we.outerHTML),(0,q.ib)(i[i.currentMode].element,de)),i[i.currentMode].element.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function($e){tt($e,i)})),i.wysiwyg.triggerRemoveComment(i),lt(i),i[i.currentMode].element.scrollHeight-_>Math.min(i[i.currentMode].element.clientHeight,window.innerHeight)/2&&Z(i),[2]}})})},gu=function(i,a,s){return xs(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,B,K,ke,fe,ve,ue,ke,we,de;return ks(this,function(Ie){switch(Ie.label){case 0:if(!s)return[2];if(u=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,d=new RegExp("(?:("+u.source+"))([\\da-fA-F\\s]+)\\}","g"),f=s.match(d),E=[],f)for(L=0,D=f;L<D.length;L++)_=D[L],B=void 0,_.includes("\\pngblip")?B="image/png":_.includes("\\jpegblip")&&(B="image/jpeg"),B&&E.push({hex:_.replace(u,"").replace(/[^\da-fA-F]/g,""),type:B});for(K=[],vo(a,function(Te){if(Te.tagName==="V:SHAPE")return vo(Te,function($e){$e.tagName==="V:IMAGEDATA"&&K.push({shape:Te,img:$e})}),!1}),ke=0;ke<K.length;ke++)fe=document.createElement("img"),ve="data:"+E[ke].type+";base64,"+btoa((E[ke].hex.match(/\w{2}/g)||[]).map(function(Te){return String.fromCharCode(parseInt(Te,16))}).join("")),fe.src=ve,fe.title=K[ke].img.getAttribute("title"),K[ke].shape.parentNode.replaceChild(fe,K[ke].shape);ue=a.querySelectorAll("img"),ke=0,Ie.label=1;case 1:return ke<ue.length?(we=ue[ke].src||"",we?(de=ue[ke],[4,i.options.upload.base64ToLink(we)]):[3,3]):[3,4];case 2:de.src=Ie.sent(),Ie.label=3;case 3:return ke++,[3,1];case 4:return[2]}})})},vo=function(i,a){var s=a(i);if(s!==!1)for(var u=0;u<i.children.length;u++)vo(i.children[u],a)},qs,js=function(i){var a,s;i.hint.render(i);var u=(0,q.zh)(i).startContainer,d=(0,y.a1)(u,"data-type","code-block-info");if(d)if(d.textContent.replace(c.g.ZWSP,"")===""&&i.hint.recentLanguage){d.textContent=c.g.ZWSP+i.hint.recentLanguage;var f=(0,q.zh)(i);f.selectNodeContents(d)}else{var E=[],L=d.textContent.substring(0,(0,q.im)(d,i.ir.element).start).replace(c.g.ZWSP,"");(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((s=(a=window.hljs)===null||a===void 0?void 0:a.listLanguages())!==null&&s!==void 0?s:[]).sort())).forEach(function(D){D.indexOf(L.toLowerCase())>-1&&E.push({html:D,value:D})}),i.hint.genHTML(E,L,i)}},Xn=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&js(i),clearTimeout(i.ir.processTimeoutId),i.ir.processTimeoutId=window.setTimeout(function(){if(!i.ir.composingLock){var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),a.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},fi=function(i,a){var s=(0,q.zh)(i),u=(0,y.F9)(s.startContainer)||s.startContainer;if(u){var d=u.querySelector(".vditor-ir__marker--heading");d?d.innerHTML=a:(u.insertAdjacentText("afterbegin",a),s.selectNodeContents(u),s.collapse(!1)),Nt(i,s.cloneRange()),qe(i)}},na=function(i,a,s){var u=(0,y.a1)(i.startContainer,"data-type",s);if(u){u.firstElementChild.remove(),u.lastElementChild.remove(),i.insertNode(document.createElement("wbr"));var d=document.createElement("div");d.innerHTML=a.lute.SpinVditorIRDOM(u.outerHTML),u.outerHTML=d.firstElementChild.innerHTML.trim()}},vu=function(i,a,s,u){var d=(0,q.zh)(i),f=a.getAttribute("data-type"),E=d.startContainer;E.nodeType===3&&(E=E.parentElement);var L=!0;if(a.classList.contains("vditor-menu--current"))if(f==="quote"){var D=(0,y.lG)(E,"BLOCKQUOTE");D&&(d.insertNode(document.createElement("wbr")),D.outerHTML=D.innerHTML.trim()===""?'<p data-block="0">'.concat(D.innerHTML,"</p>"):D.innerHTML)}else if(f==="link"){var _=(0,y.a1)(d.startContainer,"data-type","a");if(_){var B=(0,y.fb)(d.startContainer,"vditor-ir__link");B?(d.insertNode(document.createElement("wbr")),_.outerHTML=B.innerHTML):_.outerHTML=_.querySelector(".vditor-ir__link").innerHTML+"<wbr>"}}else f==="italic"?na(d,i,"em"):f==="bold"?na(d,i,"strong"):f==="strike"?na(d,i,"s"):f==="inline-code"?na(d,i,"code"):(f==="check"||f==="list"||f==="ordered-list")&&(Ji(i,d,f),L=!1,a.classList.remove("vditor-menu--current"));else{i.ir.element.childNodes.length===0&&(i.ir.element.innerHTML='<p data-block="0"><wbr></p>',(0,q.ib)(i.ir.element,d));var K=(0,y.F9)(d.startContainer);if(f==="line"){if(K){var fe=`<hr data-block="0"><p data-block="0"><wbr>
</p>`;K.innerHTML.trim()===""?K.outerHTML=fe:K.insertAdjacentHTML("afterend",fe)}}else if(f==="quote")K&&(d.insertNode(document.createElement("wbr")),K.outerHTML='<blockquote data-block="0">'.concat(K.outerHTML,"</blockquote>"),L=!1,a.classList.add("vditor-menu--current"));else if(f==="link"){var ve=void 0;d.toString()===""?ve="".concat(s,"<wbr>").concat(u):ve="".concat(s).concat(d.toString()).concat(u.replace(")","<wbr>)")),document.execCommand("insertHTML",!1,ve),L=!1,a.classList.add("vditor-menu--current")}else if(f==="italic"||f==="bold"||f==="strike"||f==="inline-code"||f==="code"||f==="table"){var ve=void 0;d.toString()===""?ve="".concat(s,"<wbr>").concat(u):(f==="code"?ve="".concat(s,`
`).concat(d.toString(),"<wbr>").concat(u):f==="table"?ve="".concat(s).concat(d.toString(),"<wbr>").concat(u):ve="".concat(s).concat(d.toString()).concat(u,"<wbr>"),d.deleteContents()),(f==="table"||f==="code")&&(ve=`
`+ve+`
`);var ue=document.createElement("span");ue.innerHTML=ve,d.insertNode(ue),Nt(i,d),f==="table"&&(d.selectNodeContents(getSelection().getRangeAt(0).startContainer.parentElement),(0,q.Hc)(d))}else(f==="check"||f==="list"||f==="ordered-list")&&(Ji(i,d,f,!1),L=!1,x(i.toolbar.elements,["check","list","ordered-list"]),a.classList.add("vditor-menu--current"))}(0,q.ib)(i.ir.element,d),Xn(i),L&&qe(i)},bu=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(K){E(K)}}function D(B){try{_(u.throw(B))}catch(K){E(K)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},yu=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},wu=function(){function i(a){var s=this;this.splitChar="",this.lastIndex=-1,this.fillEmoji=function(u,d){s.element.style.display="none";var f=decodeURIComponent(u.getAttribute("data-value")),E=window.getSelection().getRangeAt(0);if(d.currentMode==="ir"){var L=(0,y.a1)(E.startContainer,"data-type","code-block-info");if(L){L.textContent=c.g.ZWSP+f.trimRight(),E.selectNodeContents(L),E.collapse(!1),Xn(d),L.parentElement.querySelectorAll("code").forEach(function(K){K.className="language-"+f.trimRight()}),tt(L.parentElement.querySelector(".vditor-ir__preview"),d),s.recentLanguage=f.trimRight();return}}if(d.currentMode==="wysiwyg"&&E.startContainer.nodeType!==3){var D=E.startContainer,_=void 0;if(D.classList.contains("vditor-input")?_=D:_=D.firstElementChild,_&&_.classList.contains("vditor-input")){_.value=f.trimRight(),E.selectNodeContents(_),E.collapse(!1),_.dispatchEvent(new CustomEvent("input",{detail:1})),s.recentLanguage=f.trimRight();return}}if(E.setStart(E.startContainer,s.lastIndex),E.deleteContents(),d.options.hint.parse?d.currentMode==="sv"?(0,q.oC)(d.lute.SpinVditorSVDOM(f),d):d.currentMode==="wysiwyg"?(0,q.oC)(d.lute.SpinVditorDOM(f),d):(0,q.oC)(d.lute.SpinVditorIRDOM(f),d):(0,q.oC)(f,d),s.splitChar===":"&&f.indexOf(":")>-1&&d.currentMode!=="sv"&&E.insertNode(document.createTextNode(" ")),E.collapse(!1),(0,q.Hc)(E),d.currentMode==="wysiwyg"){var B=(0,y.fb)(E.startContainer,"vditor-wysiwyg__block");B&&B.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(B.lastElementChild.innerHTML=B.firstElementChild.innerHTML,tt(B.lastElementChild,d))}else if(d.currentMode==="ir"){var B=(0,y.fb)(E.startContainer,"vditor-ir__marker--pre");B&&B.nextElementSibling.classList.contains("vditor-ir__preview")&&(B.nextElementSibling.innerHTML=B.innerHTML,tt(B.nextElementSibling,d))}lt(d)},this.timeId=-1,this.element=document.createElement("div"),this.element.className="vditor-hint",this.recentLanguage="",a.push({key:":"})}return i.prototype.render=function(a){var s=this;if(window.getSelection().focusNode){var u,d=getSelection().getRangeAt(0);u=d.startContainer.textContent.substring(0,d.startOffset)||"";var f=this.getKey(u,a.options.hint.extend);if(typeof f>"u")this.element.style.display="none",clearTimeout(this.timeId);else if(this.splitChar===":"){var E=f===""?a.options.hint.emoji:a.lute.GetEmojis(),L=[];Object.keys(E).forEach(function(D){D.indexOf(f.toLowerCase())===0&&(E[D].indexOf(".")>-1?L.push({html:'<img src="'.concat(E[D],'" title=":').concat(D,':"/> :').concat(D,":"),value:":".concat(D,":")}):L.push({html:'<span class="vditor-hint__emoji">'.concat(E[D],"</span>").concat(D),value:E[D]}))}),this.genHTML(L,f,a)}else a.options.hint.extend.forEach(function(D){D.key===s.splitChar&&(clearTimeout(s.timeId),s.timeId=window.setTimeout(function(){return bu(s,void 0,void 0,function(){var _;return yu(this,function(B){switch(B.label){case 0:return _=this.genHTML,[4,D.hint(f)];case 1:return _.apply(this,[B.sent(),f,a]),[2]}})})},a.options.hint.delay))})}},i.prototype.genHTML=function(a,s,u){var d=this;if(a.length===0){this.element.style.display="none";return}var f=u[u.currentMode].element,E=(0,q.Ny)(f),L=E.left+(u.options.outline.position==="left"?u.outline.element.offsetWidth:0),D=E.top,_="";a.forEach(function(K,fe){if(!(fe>7)){var ve=K.html;if(s!==""){var ue=ve.lastIndexOf(">")+1,ke=ve.substr(ue),we=ke.toLowerCase().indexOf(s.toLowerCase());we>-1&&(ke=ke.substring(0,we)+"<b>"+ke.substring(we,we+s.length)+"</b>"+ke.substring(we+s.length),ve=ve.substr(0,ue)+ke)}_+='<button type="button" data-value="'.concat(encodeURIComponent(K.value),` "
`).concat(fe===0?"class='vditor-hint--current'":"","> ").concat(ve,"</button>")}}),this.element.innerHTML=_;var B=parseInt(document.defaultView.getComputedStyle(f,null).getPropertyValue("line-height"),10);this.element.style.top="".concat(D+(B||22),"px"),this.element.style.left="".concat(L,"px"),this.element.style.display="block",this.element.style.right="auto",this.element.querySelectorAll("button").forEach(function(K){K.addEventListener("click",function(fe){d.fillEmoji(K,u),fe.preventDefault()})}),this.element.getBoundingClientRect().bottom>window.innerHeight&&(this.element.style.top="".concat(D-this.element.offsetHeight,"px")),this.element.getBoundingClientRect().right>window.innerWidth&&(this.element.style.left="auto",this.element.style.right="0")},i.prototype.select=function(a,s){if(this.element.querySelectorAll("button").length===0||this.element.style.display==="none")return!1;var u=this.element.querySelector(".vditor-hint--current");if(a.key==="ArrowDown")return a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.nextElementSibling?u.nextElementSibling.className="vditor-hint--current":this.element.children[0].className="vditor-hint--current",!0;if(a.key==="ArrowUp"){if(a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.previousElementSibling)u.previousElementSibling.className="vditor-hint--current";else{var d=this.element.children.length;this.element.children[d-1].className="vditor-hint--current"}return!0}else if(!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"&&!a.isComposing)return a.preventDefault(),a.stopPropagation(),this.fillEmoji(u,s),!0;return!1},i.prototype.getKey=function(a,s){var u=this;this.lastIndex=-1,this.splitChar="",s.forEach(function(_){var B=a.lastIndexOf(_.key);u.lastIndex<B&&(u.splitChar=_.key,u.lastIndex=B)});var d;if(this.lastIndex===-1)return d;var f=a.split(this.splitChar),E=f[f.length-1],L=32;if(f.length>1&&E.trim()===E)if(f.length===2&&f[0]===""&&f[1].length<L)d=f[1];else{var D=f[f.length-2].slice(-1);(0,p.X)(D)===" "&&E.length<L&&(d=E)}return d},i}(),xu=function(){function i(a){this.composingLock=!1;var s=document.createElement("div");s.className="vditor-ir",s.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder,`"
contenteditable="true" spellcheck="false"></pre>`),this.element=s.firstElementChild,this.bindEvent(a),Ai(a,this.element),ho(a,this.element),Mi(a,this.element),xe(a,this.element),He(a,this.element),Ci(a,this.element),U(a,this.element,this.copy),Q(a,this.element,this.copy)}return i.prototype.copy=function(a,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){a.stopPropagation(),a.preventDefault();var d=document.createElement("div");d.appendChild(u.cloneContents()),a.clipboardData.setData("text/plain",s.lute.VditorIRDOM2Md(d.innerHTML).trim()),a.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("paste",function(u){ta(a,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){A(a,["hint"])}),this.element.addEventListener("compositionstart",function(u){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){(0,m.vU)()||Nt(a,getSelection().getRangeAt(0).cloneRange()),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")){if(s.preventInput){s.preventInput=!1,Xn(a,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}s.composingLock||u.data===""||u.data==="“"||u.data==="《"||Nt(a,getSelection().getRangeAt(0).cloneRange(),!1,u)}}),this.element.addEventListener("click",function(u){if(u.target.tagName==="INPUT"){u.target.checked?u.target.setAttribute("checked","checked"):u.target.removeAttribute("checked"),s.preventInput=!0,Xn(a);return}var d=(0,q.zh)(a),f=(0,y.fb)(u.target,"vditor-ir__preview");if(f||(f=(0,y.fb)(d.startContainer,"vditor-ir__preview")),f&&(f.previousElementSibling.firstElementChild?d.selectNodeContents(f.previousElementSibling.firstElementChild):d.selectNodeContents(f.previousElementSibling),d.collapse(!0),(0,q.Hc)(d),Z(a)),u.target.tagName==="IMG"){var E=u.target.parentElement.querySelector(".vditor-ir__marker--link");E&&(d.selectNode(E),(0,q.Hc)(d))}var L=(0,y.a1)(u.target,"data-type","a");if(L&&!L.classList.contains("vditor-ir__node--expand")){a.options.link.click?a.options.link.click(L.querySelector(":scope > .vditor-ir__marker--link")):a.options.link.isOpen&&window.open(L.querySelector(":scope > .vditor-ir__marker--link").textContent);return}if(u.target.isEqualNode(s.element)&&s.element.lastElementChild&&d.collapsed){var D=s.element.lastElementChild.getBoundingClientRect();u.y>D.top+D.height&&(s.element.lastElementChild.tagName==="P"&&s.element.lastElementChild.textContent.trim().replace(c.g.ZWSP,"")===""?(d.selectNodeContents(s.element.lastElementChild),d.collapse(!1)):(s.element.insertAdjacentHTML("beforeend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(s.element,d)))}d.toString()===""?ee(d,a):setTimeout(function(){ee((0,q.zh)(a),a)}),Rt(u,a),qe(a)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if(u.key==="Enter"&&Z(a),qe(a),(u.key==="Backspace"||u.key==="Delete")&&a.ir.element.innerHTML!==""&&a.ir.element.childNodes.length===1&&a.ir.element.firstElementChild&&a.ir.element.firstElementChild.tagName==="P"&&a.ir.element.firstElementChild.childElementCount===0&&(a.ir.element.textContent===""||a.ir.element.textContent===`
`)){a.ir.element.innerHTML="";return}var d=(0,q.zh)(a);u.key==="Backspace"?((0,m.vU)()&&d.startContainer.textContent===`
`&&d.startOffset===1&&(d.startContainer.textContent="",ee(d,a)),s.element.querySelectorAll(".language-math").forEach(function(E){var L=E.querySelector("br");L&&L.remove()})):u.key.indexOf("Arrow")>-1?((u.key==="ArrowLeft"||u.key==="ArrowRight")&&js(a),ee(d,a)):u.keyCode===229&&u.code===""&&u.key==="Unidentified"&&ee(d,a);var f=(0,y.fb)(d.startContainer,"vditor-ir__preview");if(f){if(u.key==="ArrowUp"||u.key==="ArrowLeft")return f.previousElementSibling.firstElementChild?d.selectNodeContents(f.previousElementSibling.firstElementChild):d.selectNodeContents(f.previousElementSibling),d.collapse(!1),u.preventDefault(),!0;if(f.tagName==="SPAN"&&(u.key==="ArrowDown"||u.key==="ArrowRight"))return f.parentElement.getAttribute("data-type")==="html-entity"?(f.parentElement.insertAdjacentText("afterend",c.g.ZWSP),d.setStart(f.parentElement.nextSibling,1)):d.selectNodeContents(f.parentElement.lastElementChild),d.collapse(!1),u.preventDefault(),!0}}})},i}(),$s=function(i){if(i.currentMode==="sv")return i.lute.Md2HTML(v(i));if(i.currentMode==="wysiwyg")return i.lute.VditorDOM2HTML(i.wysiwyg.element.innerHTML);if(i.currentMode==="ir")return i.lute.VditorIRDOM2HTML(i.ir.element.innerHTML)},ku=o(214),Us=o(436),Su=function(){function i(a){this.element=document.createElement("div"),this.element.className="vditor-outline",this.element.innerHTML='<div class="vditor-outline__title">'.concat(a,`</div>
<div class="vditor-outline__content"></div>`)}return i.prototype.render=function(a){var s="";return a.preview.element.style.display==="block"?s=(0,Us.k)(a.preview.previewElement,this.element.lastElementChild,a):s=(0,Us.k)(a[a.currentMode].element,this.element.lastElementChild,a),s},i.prototype.toggle=function(a,s,u){var d;s===void 0&&(s=!0),u===void 0&&(u=!0);var f=(d=a.toolbar.elements.outline)===null||d===void 0?void 0:d.firstElementChild;if(s&&window.innerWidth>=c.g.MOBILE_WIDTH?(this.element.style.display="block",this.render(a),f==null||f.classList.add("vditor-menu--current")):(this.element.style.display="none",f==null||f.classList.remove("vditor-menu--current")),u&&getSelection().rangeCount>0){var E=getSelection().getRangeAt(0);a[a.currentMode].element.contains(E.startContainer)&&(0,q.Hc)(E)}ze(a)},i}(),Eu=o(280),Tu=function(){function i(a){var s=this;this.element=document.createElement("div"),this.element.className="vditor-preview",this.previewElement=document.createElement("div"),this.previewElement.className="vditor-reset",a.options.classes.preview&&this.previewElement.classList.add(a.options.classes.preview),this.previewElement.style.maxWidth=a.options.preview.maxWidth+"px",this.previewElement.addEventListener("copy",function(D){if(D.target.tagName!=="TEXTAREA"){var _=document.createElement("div");_.className="vditor-reset",_.appendChild(getSelection().getRangeAt(0).cloneContents()),s.copyToX(a,_,"default"),D.preventDefault()}}),this.previewElement.addEventListener("click",function(D){var _=(0,y.lG)(D.target,"SPAN");if(_&&(0,y.fb)(_,"vditor-toc")){var B=s.previewElement.querySelector("#"+_.getAttribute("data-target-id"));B&&(s.element.scrollTop=B.offsetTop);return}if(D.target.tagName==="A"){a.options.link.click?a.options.link.click(D.target):a.options.link.isOpen&&window.open(D.target.getAttribute("href")),D.preventDefault();return}D.target.tagName==="IMG"&&(a.options.image.preview?a.options.image.preview(D.target):a.options.image.isPreview&&(0,se.E)(D.target,a.options.lang,a.options.theme))}),this.element.appendChild(this.previewElement);var u=a.options.preview.actions;if(u.length!==0){var d=document.createElement("div");d.className="vditor-preview__action";for(var f=[],E=0;E<u.length;E++){var L=u[E];if(typeof L=="object"){f.push('<button type="button" data-type="'.concat(L.key,'" class="').concat(L.className,'"').concat(L.tooltip?' aria-label="'.concat(L.tooltip,'"'):"",'">').concat(L.text,"</button>"));continue}switch(L){case"desktop":f.push('<button type="button" class="vditor-preview__action--current" data-type="desktop">Desktop</button>');break;case"tablet":f.push('<button type="button" data-type="tablet">Tablet</button>');break;case"mobile":f.push('<button type="button" data-type="mobile">Mobile/Wechat</button>');break;case"mp-wechat":f.push('<button type="button" data-type="mp-wechat" class="vditor-tooltipped vditor-tooltipped__w" aria-label="复制到公众号"><svg><use xlink:href="#vditor-icon-mp-wechat"></use></svg></button>');break;case"zhihu":f.push('<button type="button" data-type="zhihu" class="vditor-tooltipped vditor-tooltipped__w" aria-label="复制到知乎"><svg><use xlink:href="#vditor-icon-zhihu"></use></svg></button>');break}}d.innerHTML=f.join(""),d.addEventListener((0,m.Le)(),function(D){var _=(0,N.S)(D.target,"BUTTON");if(_){var B=_.getAttribute("data-type"),K=u.find(function(fe){return(fe==null?void 0:fe.key)===B});if(K){K.click(B);return}if(B==="mp-wechat"||B==="zhihu"){s.copyToX(a,s.previewElement.cloneNode(!0),B);return}B==="desktop"?s.previewElement.style.width="auto":B==="tablet"?s.previewElement.style.width="780px":s.previewElement.style.width="360px",s.previewElement.scrollWidth>s.previewElement.parentElement.clientWidth&&(s.previewElement.style.width="auto"),s.render(a),d.querySelectorAll("button").forEach(function(fe){fe.classList.remove("vditor-preview__action--current")}),_.classList.add("vditor-preview__action--current")}}),this.element.insertBefore(d,this.previewElement)}}return i.prototype.render=function(a,s){var u=this;if(clearTimeout(this.mdTimeoutId),this.element.style.display==="none"){this.element.getAttribute("data-type")==="renderPerformance"&&a.tip.hide();return}if(s){this.previewElement.innerHTML=s;return}if(v(a).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")===""){this.previewElement.innerHTML="";return}var d=new Date().getTime(),f=v(a);this.mdTimeoutId=window.setTimeout(function(){if(a.options.preview.url){var E=new XMLHttpRequest;E.open("POST",a.options.preview.url),E.setRequestHeader("Content-Type","application/json;charset=UTF-8"),E.onreadystatechange=function(){if(E.readyState===XMLHttpRequest.DONE)if(E.status===200){var D=JSON.parse(E.responseText);if(D.code!==0){a.tip.show(D.msg);return}a.options.preview.transform&&(D.data=a.options.preview.transform(D.data)),u.previewElement.innerHTML=D.data,u.afterRender(a,d)}else{var _=a.lute.Md2HTML(f);a.options.preview.transform&&(_=a.options.preview.transform(_)),u.previewElement.innerHTML=_,u.afterRender(a,d)}},E.send(JSON.stringify({markdownText:f}))}else{var L=a.lute.Md2HTML(f);a.options.preview.transform&&(L=a.options.preview.transform(L)),u.previewElement.innerHTML=L,u.afterRender(a,d)}},a.options.preview.delay)},i.prototype.afterRender=function(a,s){a.options.preview.parse&&a.options.preview.parse(this.element);var u=new Date().getTime()-s;new Date().getTime()-s>2600?(a.tip.show(window.VditorI18n.performanceTip.replace("${x}",u.toString())),a.preview.element.setAttribute("data-type","renderPerformance")):a.preview.element.getAttribute("data-type")==="renderPerformance"&&(a.tip.hide(),a.preview.element.removeAttribute("data-type"));var d=a.preview.element.querySelector(".vditor-comment--focus");d&&d.classList.remove("vditor-comment--focus"),(0,Y.O)(a.preview.previewElement,a.options.preview.hljs),(0,Me.s)(a.options.preview.hljs,a.preview.previewElement,a.options.cdn),(0,We.i)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,rt.K)(a.preview.previewElement,a.options.cdn),(0,nt.J)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,te.P)(a.preview.previewElement,a.options.cdn),(0,ce.v)(a.preview.previewElement,a.options.cdn),(0,P.p)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,je.P)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,Ne.B)(a.preview.previewElement,a.options.cdn),(0,F.Q)(a.preview.previewElement,a.options.cdn),a.options.preview.render.media.enable&&(0,Eu.Y)(a.preview.previewElement),a.options.customRenders.forEach(function(L){L.render(a.preview.previewElement,a)});var f=a.preview.element,E=a.outline.render(a);E===""&&(E="[ToC]"),f.querySelectorAll('[data-type="toc-block"]').forEach(function(L){L.innerHTML=E,(0,Fe.H)(L,{cdn:a.options.cdn,math:a.options.preview.math})}),(0,Fe.H)(a.preview.previewElement,{cdn:a.options.cdn,math:a.options.preview.math})},i.prototype.copyToX=function(a,s,u){u===void 0&&(u="mp-wechat"),u!=="zhihu"?s.querySelectorAll(".katex-html .base").forEach(function(f){f.style.display="initial"}):s.querySelectorAll(".language-math").forEach(function(f){f.outerHTML='<img class="Formula-image" data-eeimg="true" src="//www.zhihu.com/equation?tex=" alt="'.concat(f.getAttribute("data-math"),'\\" style="display: block; margin: 0 auto; max-width: 100%;">')}),s.style.backgroundColor="#fff",s.querySelectorAll("code").forEach(function(f){f.style.backgroundImage="none"}),this.element.append(s);var d=s.ownerDocument.createRange();d.selectNode(s),(0,q.Hc)(d),document.execCommand("copy"),s.remove(),a.tip.show(["zhihu","mp-wechat"].includes(u)?"已复制,可到".concat(u==="zhihu"?"知乎":"微信公众号平台","进行粘贴"):"已复制到剪切板")},i}(),Au=function(){function i(a){this.element=document.createElement("div"),this.element.className="vditor-resize vditor-resize--".concat(a.options.resize.position),this.element.innerHTML='<div><svg><use xlink:href="#vditor-icon-resize"></use></svg></div>',this.bindEvent(a)}return i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("mousedown",function(u){var d=document,f=u.clientY,E=a.element.offsetHeight,L=63+a.element.querySelector(".vditor-toolbar").clientHeight;d.ondragstart=function(){return!1},window.captureEvents&&window.captureEvents(),s.element.classList.add("vditor-resize--selected"),d.onmousemove=function(D){a.options.resize.position==="top"?a.element.style.height=Math.max(L,E+(f-D.clientY))+"px":a.element.style.height=Math.max(L,E+(D.clientY-f))+"px",a.options.typewriterMode&&(a.sv.element.style.paddingBottom=a.sv.element.parentElement.offsetHeight/2+"px")},d.onmouseup=function(){a.options.resize.after&&a.options.resize.after(a.element.offsetHeight-E),window.captureEvents&&window.captureEvents(),d.onmousemove=null,d.onmouseup=null,d.ondragstart=null,d.onselectstart=null,d.onselect=null,s.element.classList.remove("vditor-resize--selected")}})},i}(),Mu=function(){function i(a){this.composingLock=!1,this.element=document.createElement("pre"),this.element.className="vditor-sv vditor-reset",this.element.setAttribute("placeholder",a.options.placeholder),this.element.setAttribute("contenteditable","true"),this.element.setAttribute("spellcheck","false"),this.bindEvent(a),Ai(a,this.element),Mi(a,this.element),xe(a,this.element),He(a,this.element),Ci(a,this.element),U(a,this.element,this.copy),Q(a,this.element,this.copy)}return i.prototype.copy=function(a,s){a.stopPropagation(),a.preventDefault(),a.clipboardData.setData("text/plain",Or(s[s.currentMode].element))},i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("paste",function(u){ta(a,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){if(a.preview.element.style.display==="block"){var u=s.element.scrollTop,d=s.element.clientHeight,f=s.element.scrollHeight-parseFloat(s.element.style.paddingBottom||"0"),E=a.preview.element;u/d>.5?E.scrollTop=(u+d)*E.scrollHeight/f-d:E.scrollTop=u*E.scrollHeight/f}}),this.element.addEventListener("compositionstart",function(u){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){(0,m.vU)()||X(a,u),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")&&!(s.composingLock||u.data===""||u.data==="“"||u.data==="《")){if(s.preventInput){s.preventInput=!1,Ge(a,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}X(a,u)}}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if((u.key==="Backspace"||u.key==="Delete")&&a.sv.element.innerHTML!==""&&a.sv.element.childNodes.length===1&&a.sv.element.firstElementChild&&a.sv.element.firstElementChild.tagName==="DIV"&&a.sv.element.firstElementChild.childElementCount===2&&(a.sv.element.firstElementChild.textContent===""||a.sv.element.textContent===`
`)){a.sv.element.innerHTML="";return}u.key==="Enter"&&Z(a)}})},i}(),Vs=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-tip"}return i.prototype.show=function(a,s){var u=this;s===void 0&&(s=6e3),this.element.className="vditor-tip vditor-tip--show",s===0?(this.element.innerHTML='<div class="vditor-tip__content">'.concat(a,`
<div class="vditor-tip__close">X</div></div>`),this.element.querySelector(".vditor-tip__close").addEventListener("click",function(){u.hide()})):(this.element.innerHTML='<div class="vditor-tip__content">'.concat(a,"</div>"),setTimeout(function(){u.hide()},s)),this.element.removeAttribute("style"),setTimeout(function(){var d=u.element.getBoundingClientRect();d.top<46&&(u.element.style.position="fixed",u.element.style.top="46px")},150)},i.prototype.hide=function(){this.element.className="vditor-messageElementtip",this.element.innerHTML=""},i}(),bo=function(i,a){if(a.options.preview.mode!==i){switch(a.options.preview.mode=i,i){case"both":a.sv.element.style.display="block",a.preview.element.style.display="block",a.preview.render(a),w(a.toolbar.elements,["both"]);break;case"editor":a.sv.element.style.display="block",a.preview.element.style.display="none",x(a.toolbar.elements,["both"]);break}a.devtools&&a.devtools.renderEchart(a)}},Cu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Lu=function(i){Cu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return s.options.preview.mode==="both"&&d.element.children[0].classList.add("vditor-menu--current"),d.element.children[0].addEventListener((0,m.Le)(),function(f){var E=d.element.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(f.preventDefault(),s.currentMode==="sv"&&(s.options.preview.mode==="both"?bo("editor",s):bo("both",s)))}),d}return a}(Mt),_u=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__br"}return i}(),Ws=o(580),Nu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Du=function(i){Nu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow");var L="";return c.g.CODE_THEME.forEach(function(D){L+="<button>".concat(D,"</button>")}),E.innerHTML='<div style="overflow: auto;max-height:'.concat(window.innerHeight/2,'px">').concat(L,"</div>"),E.addEventListener((0,m.Le)(),function(D){D.target.tagName==="BUTTON"&&(A(s,["subToolbar"]),s.options.preview.hljs.style=D.target.textContent,(0,Ws.Y)(D.target.textContent,s.options.cdn),D.preventDefault(),D.stopPropagation())}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ru=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Iu=function(i){Ru(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow");var L="";return Object.keys(s.options.preview.theme.list).forEach(function(D){L+='<button data-type="'.concat(D,'">').concat(s.options.preview.theme.list[D],"</button>")}),E.innerHTML='<div style="overflow: auto;max-height:'.concat(window.innerHeight/2,'px">').concat(L,"</div>"),E.addEventListener((0,m.Le)(),function(D){D.target.tagName==="BUTTON"&&(A(s,["subToolbar"]),s.options.preview.theme.current=D.target.getAttribute("data-type"),(0,le.Z)(s.options.preview.theme.current,s.options.preview.theme.path),D.preventDefault(),D.stopPropagation())}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ou=function(){function i(a){this.element=document.createElement("span"),this.element.className="vditor-counter vditor-tooltipped vditor-tooltipped__nw",this.render(a,"")}return i.prototype.render=function(a,s){var u=s.endsWith(`
`)?s.length-1:s.length;if(a.options.counter.type==="text"&&a[a.currentMode]){var d=a[a.currentMode].element.cloneNode(!0);d.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(f){f.remove()}),u=d.textContent.length}typeof a.options.counter.max=="number"?(u>a.options.counter.max?this.element.className="vditor-counter vditor-counter--error":this.element.className="vditor-counter",this.element.innerHTML="".concat(u,"/").concat(a.options.counter.max)):this.element.innerHTML="".concat(u),this.element.setAttribute("aria-label",a.options.counter.type),a.options.counter.after&&a.options.counter.after(u,{enable:a.options.counter.enable,max:a.options.counter.max,type:a.options.counter.type})},i}(),Hu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Pu=function(i){Hu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].innerHTML=u.icon,d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!f.currentTarget.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.click(f,s)}),d}return a}(Mt),zu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Bu=function(i){zu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.firstElementChild.addEventListener((0,m.Le)(),function(f){var E=d.element.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(f.preventDefault(),E.classList.contains("vditor-menu--current")?(E.classList.remove("vditor-menu--current"),s.devtools.element.style.display="none",ze(s)):(E.classList.add("vditor-menu--current"),s.devtools.element.style.display="block",ze(s),s.devtools.renderEchart(s)))}),d}return a}(Mt),Fu=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__divider"}return i}(),qu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ju=function(i){qu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");f.className="vditor-panel vditor-panel--arrow";var E="";return Object.keys(s.options.hint.emoji).forEach(function(L){var D=s.options.hint.emoji[L];D.indexOf(".")>-1?E+='<button data-value=":'.concat(L,': " data-key=":').concat(L,`:"><img
data-value=":`).concat(L,': " data-key=":').concat(L,':" class="vditor-emojis__icon" src="').concat(D,'"/></button>'):E+='<button data-value="'.concat(D,` "
data-key="`).concat(L,'"><span class="vditor-emojis__icon">').concat(D,"</span></button>")}),f.innerHTML='<div class="vditor-emojis" style="max-height: '.concat(s.options.height==="auto"?"auto":s.options.height-80,'px">').concat(E,`</div><div class="vditor-emojis__tail">
<span class="vditor-emojis__tip"></span><span>`).concat(s.options.hint.emojiTail||"",`</span>
</div>`),d.element.appendChild(f),M(s,f,d.element.firstElementChild,u.level),d.bindEvent(s),d}return a.prototype.bindEvent=function(s){var u=this;this.element.lastElementChild.addEventListener((0,m.Le)(),function(d){var f=(0,N.S)(d.target,"BUTTON");if(f){d.preventDefault();var E=f.getAttribute("data-value"),L=(0,q.zh)(s),D=E;if(s.currentMode==="wysiwyg"?D=s.lute.SpinVditorDOM(E):s.currentMode==="ir"&&(D=s.lute.SpinVditorIRDOM(E)),E.indexOf(":")>-1&&s.currentMode!=="sv"){var _=document.createElement("div");_.innerHTML=D,D=_.firstElementChild.firstElementChild.outerHTML+" ",(0,q.oC)(D,s)}else L.extractContents(),L.insertNode(document.createTextNode(E)),(0,y.F9)(L.startContainer)||Pn(s,L);L.collapse(!1),(0,q.Hc)(L),u.element.lastElementChild.style.display="none",lt(s)}}),this.element.lastElementChild.addEventListener("mouseover",function(d){var f=(0,N.S)(d.target,"BUTTON");f&&(u.element.querySelector(".vditor-emojis__tip").innerHTML=f.getAttribute("data-key"))})},a}(Mt),Gs=function(i,a,s){var u=document.createElement("a");"download"in u?(u.download=s,u.style.display="none",u.href=URL.createObjectURL(new Blob([a])),document.body.appendChild(u),u.click(),u.remove()):i.tip.show(window.VditorI18n.downloadTip,0)},$u=function(i){var a=v(i);Gs(i,a,a.substr(0,10)+".md")},Uu=function(i){i.tip.show(window.VditorI18n.generate,3800);var a=document.querySelector("#vditorExportIframe");a.contentDocument.open(),a.contentDocument.write('<link rel="stylesheet" href="'.concat(i.options.cdn,`/dist/index.css"/>
<script src="`).concat(i.options.cdn,`/dist/method.min.js"><\/script>
<div id="preview" style="width: 800px"></div>
<script>
window.addEventListener("message", (e) => {
if(!e.data) {
return;
}
Vditor.preview(document.getElementById('preview'), e.data, {
cdn: "`).concat(i.options.cdn,`",
markdown: {
theme: `).concat(JSON.stringify(i.options.preview.theme),`
},
hljs: {
style: "`).concat(i.options.preview.hljs.style,`"
}
});
setTimeout(() => {
window.print();
}, 3600);
}, false);
<\/script>`)),a.contentDocument.close(),setTimeout(function(){a.contentWindow.postMessage(v(i),"*")},200)},Vu=function(i){var a=$s(i),s='<html><head><link rel="stylesheet" type="text/css" href="'.concat(i.options.cdn,`/dist/index.css"/>
<script src="`).concat(i.options.cdn,"/dist/js/i18n/").concat(i.options.lang,`.js"><\/script>
<script src="`).concat(i.options.cdn,`/dist/method.min.js"><\/script></head>
<body><div class="vditor-reset" id="preview">`).concat(a,`</div>
<script>
const previewElement = document.getElementById('preview')
Vditor.setContentTheme('`).concat(i.options.preview.theme.current,"', '").concat(i.options.preview.theme.path,`');
Vditor.codeRender(previewElement);
Vditor.highlightRender(`).concat(JSON.stringify(i.options.preview.hljs),", previewElement, '").concat(i.options.cdn,`');
Vditor.mathRender(previewElement, {
cdn: '`).concat(i.options.cdn,`',
math: `).concat(JSON.stringify(i.options.preview.math),`,
});
Vditor.mermaidRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
Vditor.SMILESRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
Vditor.markmapRender(previewElement, '`).concat(i.options.cdn,`');
Vditor.flowchartRender(previewElement, '`).concat(i.options.cdn,`');
Vditor.graphvizRender(previewElement, '`).concat(i.options.cdn,`');
Vditor.chartRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
Vditor.mindmapRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
Vditor.abcRender(previewElement, '`).concat(i.options.cdn,`');
`).concat(i.options.preview.render.media.enable?"Vditor.mediaRender(previewElement);":"",`
Vditor.speechRender(previewElement);
<\/script>
<script src="`).concat(i.options.cdn,"/dist/js/icons/").concat(i.options.icon,'.js"><\/script></body></html>');Gs(i,s,a.substr(0,10)+".html")},Wu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Gu=function(i){Wu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");return E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow"),E.innerHTML=`<button data-type="markdown">Markdown</button>
<button data-type="pdf">PDF</button>
<button data-type="html">HTML</button>`,E.addEventListener((0,m.Le)(),function(L){var D=L.target;if(D.tagName==="BUTTON"){switch(D.getAttribute("data-type")){case"markdown":$u(s);break;case"pdf":Uu(s);break;case"html":Vu(s);break}A(s,["subToolbar"]),L.preventDefault(),L.stopPropagation()}}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ku=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Xu=function(i){Ku(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s,u),d}return a.prototype._bindEvent=function(s,u){this.element.children[0].addEventListener((0,m.Le)(),function(d){d.preventDefault(),s.element.className.includes("vditor--fullscreen")?(u.level||(this.innerHTML=u.icon),s.element.style.zIndex="",document.body.style.overflow="",s.element.classList.remove("vditor--fullscreen"),Object.keys(s.toolbar.elements).forEach(function(f){var E=s.toolbar.elements[f].firstChild;E&&(E.className=E.className.replace("__s","__n"),s.options.toolbar.forEach(function(L){typeof L!="string"&&L.tipPosition&&L.name===E.dataset.type&&(E.className="vditor-tooltipped vditor-tooltipped__".concat(L.tipPosition))}))}),s.counter&&(s.counter.element.className=s.counter.element.className.replace("__s","__n"))):(u.level||(this.innerHTML='<svg><use xlink:href="#vditor-icon-contract"></use></svg>'),s.element.style.zIndex=s.options.fullscreen.index.toString(),document.body.style.overflow="hidden",s.element.classList.add("vditor--fullscreen"),Object.keys(s.toolbar.elements).forEach(function(f){var E=s.toolbar.elements[f].firstChild;E&&(E.className=E.className.replace("__n","__s"))}),s.counter&&(s.counter.element.className=s.counter.element.className.replace("__n","__s"))),s.devtools&&s.devtools.renderEchart(s),u.click&&u.click(d,s),ze(s),Xe(s)})},a}(Mt),Zu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Yu=function(i){Zu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");return f.className="vditor-hint vditor-panel--arrow",f.innerHTML='<button data-tag="h1" data-value="# ">'.concat(window.VditorI18n.heading1," ").concat((0,m.ns)("&lt;⌥⌘1>"),`</button>
<button data-tag="h2" data-value="## ">`).concat(window.VditorI18n.heading2," &lt;").concat((0,m.ns)("⌥⌘2"),`></button>
<button data-tag="h3" data-value="### ">`).concat(window.VditorI18n.heading3," &lt;").concat((0,m.ns)("⌥⌘3"),`></button>
<button data-tag="h4" data-value="#### ">`).concat(window.VditorI18n.heading4," &lt;").concat((0,m.ns)("⌥⌘4"),`></button>
<button data-tag="h5" data-value="##### ">`).concat(window.VditorI18n.heading5," &lt;").concat((0,m.ns)("⌥⌘5"),`></button>
<button data-tag="h6" data-value="###### ">`).concat(window.VditorI18n.heading6," &lt;").concat((0,m.ns)("⌥⌘6"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f),d}return a.prototype._bindEvent=function(s,u){var d=this.element.children[0];d.addEventListener((0,m.Le)(),function(E){E.preventDefault(),clearTimeout(s.wysiwyg.afterRenderTimeoutId),clearTimeout(s.ir.processTimeoutId),clearTimeout(s.sv.processTimeoutId),!d.classList.contains(c.g.CLASS_MENU_DISABLED)&&(d.blur(),d.classList.contains("vditor-menu--current")?(s.currentMode==="wysiwyg"?(lr(s),Re(s)):s.currentMode==="ir"&&fi(s,""),d.classList.remove("vditor-menu--current")):(A(s,["subToolbar"]),u.style.display="block"))});for(var f=0;f<6;f++)u.children.item(f).addEventListener((0,m.Le)(),function(E){E.preventDefault(),s.currentMode==="wysiwyg"?(kn(s,E.target.getAttribute("data-tag")),Re(s),d.classList.add("vditor-menu--current")):s.currentMode==="ir"?(fi(s,E.target.getAttribute("data-value")),d.classList.add("vditor-menu--current")):Ct(s,E.target.getAttribute("data-value")),u.style.display="none"})},a}(Mt),Ju=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Qu=function(i){Ju(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),s.tip.show(`<div style="margin-bottom:14px;font-size: 14px;line-height: 22px;min-width:300px;max-width: 360px;display: flex;">
<div style="margin-top: 14px;flex: 1">
<div>Markdown 使用指南</div>
<ul style="list-style: none">
<li><a href="https://ld246.com/article/1583308420519" target="_blank">语法速查手册</a></li>
<li><a href="https://ld246.com/article/1583129520165" target="_blank">基础语法</a></li>
<li><a href="https://ld246.com/article/1583305480675" target="_blank">扩展语法</a></li>
<li><a href="https://ld246.com/article/1582778815353" target="_blank">键盘快捷键</a></li>
</ul>
</div>
<div style="margin-top: 14px;flex: 1">
<div>Vditor 支持</div>
<ul style="list-style: none">
<li><a href="https://github.com/Vanessa219/vditor/issues" target="_blank">Issues</a></li>
<li><a href="https://ld246.com/tag/vditor" target="_blank">官方讨论区</a></li>
<li><a href="https://ld246.com/article/1549638745630" target="_blank">开发手册</a></li>
<li><a href="https://ld246.com/guide/markdown" target="_blank">演示地址</a></li>
</ul>
</div></div>`,0)}),d}return a}(Mt),ed=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),td=function(i){ed(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")){var E=(0,q.zh)(s),L=(0,y.lG)(E.startContainer,"LI");L&&Ms(s,L,E)}}),d}return a}(Mt),nd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),rd=function(i){nd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),s.tip.show(`<div style="max-width: 520px; font-size: 14px;line-height: 22px;margin-bottom: 14px;">
<p style="text-align: center;margin: 14px 0">
<em>下一代的 Markdown 编辑器,为未来而构建</em>
</p>
<div style="display: flex;margin-bottom: 14px;flex-wrap: wrap;align-items: center">
<img src="https://unpkg.com/vditor/dist/images/logo.png" style="margin: 0 auto;height: 68px"/>
<div>&nbsp;&nbsp;</div>
<div style="flex: 1;min-width: 250px">
Vditor 是一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora和分屏预览模式。
它使用 TypeScript 实现,支持原生 JavaScript 以及 Vue、React、Angular 和 Svelte 等框架。
</div>
</div>
<div style="display: flex;flex-wrap: wrap;">
<ul style="list-style: none;flex: 1;min-width:148px">
<li>
项目地址:<a href="https://b3log.org/vditor" target="_blank">b3log.org/vditor</a>
</li>
<li>
开源协议MIT
</li>
</ul>
<ul style="list-style: none;margin-right: 18px">
<li>
组件版本Vditor v`.concat(c.H," / Lute v").concat(Lute.Version,`
</li>
<li>
赞助捐赠:<a href="https://ld246.com/sponsor" target="_blank">https://ld246.com/sponsor</a>
</li>
</ul>
</div>
</div>`),0)}),d}return a}(Mt),id=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ad=function(i){id(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")&&hi(s,"afterend")}),d}return a}(Mt),od=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),sd=function(i){od(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")&&hi(s,"beforebegin")}),d}return a}(Mt),ld=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),cd=function(i){ld(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")){var E=(0,q.zh)(s),L=(0,y.lG)(E.startContainer,"LI");L&&po(s,L,E,L.parentElement)}}),d}return a}(Mt),ud=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),dd=function(i){ud(a,i);function a(s,u){var d=i.call(this,s,u)||this;return s.options.outline&&d.element.firstElementChild.classList.add("vditor-menu--current"),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault();var E=s.toolbar.elements.outline.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(s.options.outline.enable=!d.element.firstElementChild.classList.contains("vditor-menu--current"),s.outline.toggle(s,s.options.outline.enable))}),d}return a}(Mt),hd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),pd=function(i){hd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this;this.element.children[0].addEventListener((0,m.Le)(),function(d){d.preventDefault();var f=u.element.firstElementChild;if(!f.classList.contains(c.g.CLASS_MENU_DISABLED)){var E=c.g.EDIT_TOOLBARS.concat(["both","edit-mode","devtools"]);f.classList.contains("vditor-menu--current")?(f.classList.remove("vditor-menu--current"),s.currentMode==="sv"?(s.sv.element.style.display="block",s.options.preview.mode==="both"?s.preview.element.style.display="block":s.preview.element.style.display="none"):(s[s.currentMode].element.parentElement.style.display="block",s.preview.element.style.display="none"),S(s.toolbar.elements,E),s.outline.render(s)):(k(s.toolbar.elements,E),s.preview.element.style.display="block",s.currentMode==="sv"?s.sv.element.style.display="none":s[s.currentMode].element.parentElement.style.display="none",s.preview.render(s),f.classList.add("vditor-menu--current"),A(s,["subToolbar","hint","popover"]),setTimeout(function(){s.outline.render(s)},s.options.preview.delay+10)),ze(s)}})},a}(Mt),fd=function(){function i(a){this.SAMPLE_RATE=5e3,this.isRecording=!1,this.readyFlag=!1,this.leftChannel=[],this.rightChannel=[],this.recordingLength=0;var s;if(typeof AudioContext<"u")s=new AudioContext;else if(webkitAudioContext)s=new webkitAudioContext;else return;this.DEFAULT_SAMPLE_RATE=s.sampleRate;var u=s.createGain(),d=s.createMediaStreamSource(a);d.connect(u),this.recorder=s.createScriptProcessor(2048,2,1),this.recorder.onaudioprocess=null,u.connect(this.recorder),this.recorder.connect(s.destination),this.readyFlag=!0}return i.prototype.cloneChannelData=function(a,s){this.leftChannel.push(new Float32Array(a)),this.rightChannel.push(new Float32Array(s)),this.recordingLength+=2048},i.prototype.startRecordingNewWavFile=function(){this.readyFlag&&(this.isRecording=!0,this.leftChannel.length=this.rightChannel.length=0,this.recordingLength=0)},i.prototype.stopRecording=function(){this.isRecording=!1},i.prototype.buildWavFileBlob=function(){for(var a=this.mergeBuffers(this.leftChannel),s=this.mergeBuffers(this.rightChannel),u=new Float32Array(a.length),d=0;d<a.length;++d)u[d]=.5*(a[d]+s[d]);this.DEFAULT_SAMPLE_RATE>this.SAMPLE_RATE&&(u=this.downSampleBuffer(u,this.SAMPLE_RATE));var f=44+u.length*2,E=new ArrayBuffer(f),L=new DataView(E);this.writeUTFBytes(L,0,"RIFF"),L.setUint32(4,f,!0),this.writeUTFBytes(L,8,"WAVE"),this.writeUTFBytes(L,12,"fmt "),L.setUint32(16,16,!0),L.setUint16(20,1,!0),L.setUint16(22,1,!0),L.setUint32(24,this.SAMPLE_RATE,!0),L.setUint32(28,this.SAMPLE_RATE*2,!0),L.setUint16(32,2,!0),L.setUint16(34,16,!0);var D=u.length*2;this.writeUTFBytes(L,36,"data"),L.setUint32(40,D,!0);for(var _=u.length,B=44,K=1,fe=0;fe<_;fe++)L.setInt16(B,u[fe]*(32767*K),!0),B+=2;return new Blob([L],{type:"audio/wav"})},i.prototype.downSampleBuffer=function(a,s){if(s===this.DEFAULT_SAMPLE_RATE||s>this.DEFAULT_SAMPLE_RATE)return a;for(var u=this.DEFAULT_SAMPLE_RATE/s,d=Math.round(a.length/u),f=new Float32Array(d),E=0,L=0;E<f.length;){for(var D=Math.round((E+1)*u),_=0,B=0,K=L;K<D&&K<a.length;K++)_+=a[K],B++;f[E]=_/B,E++,L=D}return f},i.prototype.mergeBuffers=function(a){for(var s=new Float32Array(this.recordingLength),u=0,d=a.length,f=0;f<d;++f){var E=a[f];s.set(E,u),u+=E.length}return s},i.prototype.writeUTFBytes=function(a,s,u){for(var d=u.length,f=0;f<d;f++)a.setUint8(s+f,u.charCodeAt(f))},i}(),md=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),gd=function(i){md(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this,d;this.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){var E=s[s.currentMode].element;if(!d){navigator.mediaDevices.getUserMedia({audio:!0}).then(function(D){d=new fd(D),d.recorder.onaudioprocess=function(_){if(d.isRecording){var B=_.inputBuffer.getChannelData(0),K=_.inputBuffer.getChannelData(1);d.cloneChannelData(B,K)}},d.startRecordingNewWavFile(),s.tip.show(window.VditorI18n.recording),E.setAttribute("contenteditable","false"),u.element.children[0].classList.add("vditor-menu--current")}).catch(function(){s.tip.show(window.VditorI18n["record-tip"])});return}if(d.isRecording){d.stopRecording(),s.tip.hide();var L=new File([d.buildWavFileBlob()],"record".concat(new Date().getTime(),".wav"),{type:"video/webm"});_i(s,[L]),u.element.children[0].classList.remove("vditor-menu--current")}else s.tip.show(window.VditorI18n.recording),E.setAttribute("contenteditable","false"),d.startRecordingNewWavFile(),u.element.children[0].classList.add("vditor-menu--current")}})},a}(Mt),vd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),bd=function(i){vd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return k({redo:d.element},["redo"]),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&s.undo.redo(s)}),d}return a}(Mt),yd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),wd=function(i){yd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return k({undo:d.element},["undo"]),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&s.undo.undo(s)}),d}return a}(Mt),xd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),kd=function(i){xd(a,i);function a(s,u){var d=i.call(this,s,u)||this,f='<input type="file"';return s.options.upload.multiple&&(f+=' multiple="multiple"'),s.options.upload.accept&&(f+=' accept="'.concat(s.options.upload.accept,'"')),d.element.children[0].innerHTML="".concat(u.icon||'<svg><use xlink:href="#vditor-icon-upload"></use></svg>').concat(f,">"),d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this;this.element.children[0].addEventListener((0,m.Le)(),function(d){if(u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){d.stopPropagation(),d.preventDefault();return}}),this.element.querySelector("input").addEventListener("change",function(d){if(u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){d.stopPropagation(),d.preventDefault();return}d.target.files.length!==0&&_i(s,d.target.files,d.target)})},a}(Mt),Sd=function(){function i(a){var s=this,u=a.options;this.elements={},this.element=document.createElement("div"),this.element.className="vditor-toolbar",u.toolbar.forEach(function(d,f){var E=s.genItem(a,d,f);if(s.element.appendChild(E),d.toolbar){var L=document.createElement("div");L.className="vditor-hint vditor-panel--arrow",L.addEventListener((0,m.Le)(),function(D){L.style.display="none"}),d.toolbar.forEach(function(D,_){D.level=2,L.appendChild(s.genItem(a,D,f+_))}),E.appendChild(L),M(a,L,E.children[0])}}),a.options.toolbarConfig.hide&&this.element.classList.add("vditor-toolbar--hide"),a.options.toolbarConfig.pin&&this.element.classList.add("vditor-toolbar--pin"),a.options.counter.enable&&(a.counter=new Ou(a),this.element.appendChild(a.counter.element))}return i.prototype.updateConfig=function(a,s){a.options.toolbarConfig=Object.assign({hide:!1,pin:!1},s),a.options.toolbarConfig.hide?this.element.classList.add("vditor-toolbar--hide"):this.element.classList.remove("vditor-toolbar--hide"),a.options.toolbarConfig.pin?this.element.classList.add("vditor-toolbar--pin"):this.element.classList.remove("vditor-toolbar--pin")},i.prototype.genItem=function(a,s,u){var d;switch(s.name){case"bold":case"italic":case"more":case"strike":case"line":case"quote":case"list":case"ordered-list":case"check":case"code":case"inline-code":case"link":case"table":d=new Mt(a,s);break;case"emoji":d=new ju(a,s);break;case"headings":d=new Yu(a,s);break;case"|":d=new Fu;break;case"br":d=new _u;break;case"undo":d=new wd(a,s);break;case"redo":d=new bd(a,s);break;case"help":d=new Qu(a,s);break;case"both":d=new Lu(a,s);break;case"preview":d=new pd(a,s);break;case"fullscreen":d=new Xu(a,s);break;case"upload":d=new kd(a,s);break;case"record":d=new gd(a,s);break;case"info":d=new rd(a,s);break;case"edit-mode":d=new ws(a,s);break;case"devtools":d=new Bu(a,s);break;case"outdent":d=new cd(a,s);break;case"indent":d=new td(a,s);break;case"outline":d=new dd(a,s);break;case"insert-after":d=new ad(a,s);break;case"insert-before":d=new sd(a,s);break;case"code-theme":d=new Du(a,s);break;case"content-theme":d=new Iu(a,s);break;case"export":d=new Gu(a,s);break;default:d=new Pu(a,s);break}if(d){var f=s.name;return(f==="br"||f==="|")&&(f=f+u),this.elements[f]=d.element,d.element}},i}(),Ed=o(173),Td=function(){function i(){this.stackSize=50,this.resetStack(),this.dmp=new Ed}return i.prototype.clearStack=function(a){this.resetStack(),this.resetIcon(a)},i.prototype.resetIcon=function(a){a.toolbar&&(this[a.currentMode].undoStack.length>1?S(a.toolbar.elements,["undo"]):k(a.toolbar.elements,["undo"]),this[a.currentMode].redoStack.length!==0?S(a.toolbar.elements,["redo"]):k(a.toolbar.elements,["redo"]))},i.prototype.undo=function(a){if(a[a.currentMode].element.getAttribute("contenteditable")!=="false"&&!(this[a.currentMode].undoStack.length<2)){var s=this[a.currentMode].undoStack.pop();s&&(this[a.currentMode].redoStack.push(s),this.renderDiff(s,a),this[a.currentMode].hasUndo=!0,A(a,["hint"]))}},i.prototype.redo=function(a){if(a[a.currentMode].element.getAttribute("contenteditable")!=="false"){var s=this[a.currentMode].redoStack.pop();s&&(this[a.currentMode].undoStack.push(s),this.renderDiff(s,a,!0))}},i.prototype.recordFirstPosition=function(a,s){if(getSelection().rangeCount!==0&&!(this[a.currentMode].undoStack.length!==1||this[a.currentMode].undoStack[0].length===0||this[a.currentMode].redoStack.length>0)&&!((0,m.vU)()&&s.key==="Backspace")&&!(0,m.G6)()){var u=this.addCaret(a);u.replace("<wbr>","").replace(" vditor-ir__node--expand","")===this[a.currentMode].undoStack[0][0].diffs[0][1].replace("<wbr>","")&&(this[a.currentMode].undoStack[0][0].diffs[0][1]=u,this[a.currentMode].lastText=u)}},i.prototype.addToUndoStack=function(a){var s=this.addCaret(a,!0),u=this.dmp.diff_main(s,this[a.currentMode].lastText,!0),d=this.dmp.patch_make(s,this[a.currentMode].lastText,u);d.length===0&&this[a.currentMode].undoStack.length>0||(this[a.currentMode].lastText=s,this[a.currentMode].undoStack.push(d),this[a.currentMode].undoStack.length>this.stackSize&&this[a.currentMode].undoStack.shift(),this[a.currentMode].hasUndo&&(this[a.currentMode].redoStack=[],this[a.currentMode].hasUndo=!1,k(a.toolbar.elements,["redo"])),this[a.currentMode].undoStack.length>1&&S(a.toolbar.elements,["undo"]))},i.prototype.renderDiff=function(a,s,u){u===void 0&&(u=!1);var d;if(u){var f=this.dmp.patch_deepCopy(a).reverse();f.forEach(function(L){L.diffs.forEach(function(D){D[0]=-D[0]})}),d=this.dmp.patch_apply(f,this[s.currentMode].lastText)[0]}else d=this.dmp.patch_apply(a,this[s.currentMode].lastText)[0];if(this[s.currentMode].lastText=d,s[s.currentMode].element.innerHTML=d,s.currentMode!=="sv"&&(s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview")).forEach(function(L){L.parentElement.querySelector(".language-echarts")&&(s.currentMode==="ir"?L.parentElement.outerHTML=s.lute.SpinVditorIRDOM(L.parentElement.outerHTML):L.parentElement.outerHTML=s.lute.SpinVditorDOM(L.parentElement.outerHTML))}),s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview[data-render='2']")).forEach(function(L){tt(L,s)})),s[s.currentMode].element.querySelector("wbr"))(0,q.ib)(s[s.currentMode].element,s[s.currentMode].element.ownerDocument.createRange()),Z(s);else{var E=getSelection().getRangeAt(0);E.setEndBefore(s[s.currentMode].element),E.collapse(!1)}Ht(s),lt(s,{enableAddUndoStack:!1,enableHint:!1,enableInput:!0}),dr(s),s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview[data-render='2']")).forEach(function(L){tt(L,s)}),this[s.currentMode].undoStack.length>1?S(s.toolbar.elements,["undo"]):k(s.toolbar.elements,["undo"]),this[s.currentMode].redoStack.length!==0?S(s.toolbar.elements,["redo"]):k(s.toolbar.elements,["redo"])},i.prototype.resetStack=function(){this.ir={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]},this.sv={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]},this.wysiwyg={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]}},i.prototype.addCaret=function(a,s){s===void 0&&(s=!1);var u;if(getSelection().rangeCount!==0&&!a[a.currentMode].element.querySelector("wbr")){var d=getSelection().getRangeAt(0);if(a[a.currentMode].element.contains(d.startContainer)){u=d.cloneRange();var f=document.createElement("span");f.className="vditor-wbr",d.insertNode(f)}}var E=a[a.currentMode].element.cloneNode(!0);E.querySelectorAll(".vditor-".concat(a.currentMode,"__preview[data-render='1']")).forEach(function(D){D.firstElementChild&&(D.firstElementChild.classList.contains("language-echarts")||D.firstElementChild.classList.contains("language-plantuml")||D.firstElementChild.classList.contains("language-mindmap")?(D.firstElementChild.removeAttribute("_echarts_instance_"),D.firstElementChild.removeAttribute("data-processed"),D.firstElementChild.innerHTML=D.previousElementSibling.firstElementChild.innerHTML,D.setAttribute("data-render","2")):D.firstElementChild.classList.contains("language-math")&&(D.setAttribute("data-render","2"),D.firstElementChild.textContent=D.firstElementChild.getAttribute("data-math"),D.firstElementChild.removeAttribute("data-math")))});var L=E.innerHTML;return a[a.currentMode].element.querySelectorAll(".vditor-wbr").forEach(function(D){D.remove()}),s&&u&&(0,q.Hc)(u),L.replace('<span class="vditor-wbr"></span>',"<wbr>")},i}(),Ad=o(673),Md=function(){function i(a){this.defaultOptions={rtl:!1,after:void 0,cache:{enable:!0},cdn:c.g.CDN,classes:{preview:""},comment:{enable:!1},counter:{enable:!1,type:"markdown"},customRenders:[],debugger:!1,fullscreen:{index:90},height:"auto",hint:{delay:200,emoji:{"+1":"👍","-1":"👎",confused:"😕",eyes:"👀️",heart:"❤️",rocket:"🚀️",smile:"😄",tada:"🎉️"},emojiPath:"".concat(c.g.CDN,"/dist/images/emoji"),extend:[],parse:!0},icon:"ant",lang:"zh_CN",mode:"ir",outline:{enable:!1,position:"left"},placeholder:"",preview:{actions:["desktop","tablet","mobile","mp-wechat","zhihu"],delay:1e3,hljs:c.g.HLJS_OPTIONS,markdown:c.g.MARKDOWN_OPTIONS,math:c.g.MATH_OPTIONS,maxWidth:800,mode:"both",theme:c.g.THEME_OPTIONS,render:{media:{enable:!0}}},link:{isOpen:!0},image:{isPreview:!0},resize:{enable:!1,position:"bottom"},theme:"classic",toolbar:["emoji","headings","bold","italic","strike","link","|","list","ordered-list","check","outdent","indent","|","quote","line","code","inline-code","insert-before","insert-after","|","upload","record","table","|","undo","redo","|","fullscreen","edit-mode",{name:"more",toolbar:["both","code-theme","content-theme","export","outline","preview","devtools","info","help"]}],toolbarConfig:{hide:!1,pin:!1},typewriterMode:!1,undoDelay:800,upload:{extraData:{},fieldName:"file[]",filename:function(s){return s.replace(/\W/g,"")},linkToImgUrl:"",max:10*1024*1024,multiple:!0,url:"",withCredentials:!1},value:"",width:"auto"},this.options=a}return i.prototype.merge=function(){var a,s,u,d,f,E,L,D,_;this.options&&(this.options.toolbar?this.options.toolbar=this.mergeToolbar(this.options.toolbar):this.options.toolbar=this.mergeToolbar(this.defaultOptions.toolbar),!((s=(a=this.options.preview)===null||a===void 0?void 0:a.theme)===null||s===void 0)&&s.list&&(this.defaultOptions.preview.theme.list=this.options.preview.theme.list),!((f=(d=(u=this.options.preview)===null||u===void 0?void 0:u.render)===null||d===void 0?void 0:d.media)===null||f===void 0)&&f.enable&&(this.defaultOptions.preview.render.media.enable=this.options.preview.render.media.enable),!((E=this.options.hint)===null||E===void 0)&&E.emoji&&(this.defaultOptions.hint.emoji=this.options.hint.emoji),this.options.comment&&(this.defaultOptions.comment=this.options.comment),this.options.cdn&&(!((D=(L=this.options.preview)===null||L===void 0?void 0:L.theme)===null||D===void 0)&&D.path||(this.defaultOptions.preview.theme.path="".concat(this.options.cdn,"/dist/css/content-theme")),!((_=this.options.hint)===null||_===void 0)&&_.emojiPath||(this.defaultOptions.hint.emojiPath="".concat(this.options.cdn,"/dist/images/emoji"))));var B=(0,Ad.T)(this.defaultOptions,this.options);if(B.cache.enable&&!B.cache.id)throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");return B},i.prototype.mergeToolbar=function(a){var s=this,u=[{icon:'<svg><use xlink:href="#vditor-icon-export"></use></svg>',name:"export",tipPosition:"ne"},{hotkey:"⌘E",icon:'<svg><use xlink:href="#vditor-icon-emoji"></use></svg>',name:"emoji",tipPosition:"ne"},{hotkey:"⌘H",icon:'<svg><use xlink:href="#vditor-icon-headings"></use></svg>',name:"headings",tipPosition:"ne"},{hotkey:"⌘B",icon:'<svg><use xlink:href="#vditor-icon-bold"></use></svg>',name:"bold",prefix:"**",suffix:"**",tipPosition:"ne"},{hotkey:"⌘I",icon:'<svg><use xlink:href="#vditor-icon-italic"></use></svg>',name:"italic",prefix:"*",suffix:"*",tipPosition:"ne"},{hotkey:"⌘D",icon:'<svg><use xlink:href="#vditor-icon-strike"></use></svg>',name:"strike",prefix:"~~",suffix:"~~",tipPosition:"ne"},{hotkey:"⌘K",icon:'<svg><use xlink:href="#vditor-icon-link"></use></svg>',name:"link",prefix:"[",suffix:"](https://)",tipPosition:"n"},{name:"|"},{hotkey:"⌘L",icon:'<svg><use xlink:href="#vditor-icon-list"></use></svg>',name:"list",prefix:"* ",tipPosition:"n"},{hotkey:"⌘O",icon:'<svg><use xlink:href="#vditor-icon-ordered-list"></use></svg>',name:"ordered-list",prefix:"1. ",tipPosition:"n"},{hotkey:"⌘J",icon:'<svg><use xlink:href="#vditor-icon-check"></use></svg>',name:"check",prefix:"* [ ] ",tipPosition:"n"},{hotkey:"⇧⌘I",icon:'<svg><use xlink:href="#vditor-icon-outdent"></use></svg>',name:"outdent",tipPosition:"n"},{hotkey:"⇧⌘O",icon:'<svg><use xlink:href="#vditor-icon-indent"></use></svg>',name:"indent",tipPosition:"n"},{name:"|"},{hotkey:"⌘;",icon:'<svg><use xlink:href="#vditor-icon-quote"></use></svg>',name:"quote",prefix:"> ",tipPosition:"n"},{hotkey:"⇧⌘H",icon:'<svg><use xlink:href="#vditor-icon-line"></use></svg>',name:"line",prefix:"---",tipPosition:"n"},{hotkey:"⌘U",icon:'<svg><use xlink:href="#vditor-icon-code"></use></svg>',name:"code",prefix:"```",suffix:"\n```",tipPosition:"n"},{hotkey:"⌘G",icon:'<svg><use xlink:href="#vditor-icon-inline-code"></use></svg>',name:"inline-code",prefix:"`",suffix:"`",tipPosition:"n"},{hotkey:"⇧⌘B",icon:'<svg><use xlink:href="#vditor-icon-before"></use></svg>',name:"insert-before",tipPosition:"n"},{hotkey:"⇧⌘E",icon:'<svg><use xlink:href="#vditor-icon-after"></use></svg>',name:"insert-after",tipPosition:"n"},{name:"|"},{icon:'<svg><use xlink:href="#vditor-icon-upload"></use></svg>',name:"upload",tipPosition:"n"},{icon:'<svg><use xlink:href="#vditor-icon-record"></use></svg>',name:"record",tipPosition:"n"},{hotkey:"⌘M",icon:'<svg><use xlink:href="#vditor-icon-table"></use></svg>',name:"table",prefix:"| col1",suffix:` | col2 | col3 |
| --- | --- | --- |
| | | |
| | | |`,tipPosition:"n"},{name:"|"},{hotkey:"⌘Z",icon:'<svg><use xlink:href="#vditor-icon-undo"></use></svg>',name:"undo",tipPosition:"nw"},{hotkey:"⌘Y",icon:'<svg><use xlink:href="#vditor-icon-redo"></use></svg>',name:"redo",tipPosition:"nw"},{name:"|"},{icon:'<svg><use xlink:href="#vditor-icon-more"></use></svg>',name:"more",tipPosition:"e"},{hotkey:"⌘'",icon:'<svg><use xlink:href="#vditor-icon-fullscreen"></use></svg>',name:"fullscreen",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-edit"></use></svg>',name:"edit-mode",tipPosition:"nw"},{hotkey:"⌘P",icon:'<svg><use xlink:href="#vditor-icon-both"></use></svg>',name:"both",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-preview"></use></svg>',name:"preview",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',name:"outline",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-theme"></use></svg>',name:"content-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-code-theme"></use></svg>',name:"code-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-bug"></use></svg>',name:"devtools",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-info"></use></svg>',name:"info",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-help"></use></svg>',name:"help",tipPosition:"nw"},{name:"br"}],d=[];return a.forEach(function(f){var E=f;u.forEach(function(L){typeof f=="string"&&L.name===f&&(E=L),typeof f=="object"&&L.name===f.name&&(E=Object.assign({},L,f))}),f.toolbar&&(E.toolbar=s.mergeToolbar(f.toolbar)),d.push(E)}),d},i}(),Cd=function(){function i(a){var s=this;this.composingLock=!1,this.commentIds=[];var u=document.createElement("div");u.className="vditor-wysiwyg",u.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder,`"
contenteditable="true" spellcheck="false"></pre>
<div class="vditor-panel vditor-panel--none"></div>
<div class="vditor-panel vditor-panel--none">
<button type="button" aria-label="`).concat(window.VditorI18n.comment,`" class="vditor-icon vditor-tooltipped vditor-tooltipped__n">
<svg><use xlink:href="#vditor-icon-comment"></use></svg>
</button>
</div>`),this.element=u.firstElementChild,this.popover=u.firstElementChild.nextElementSibling,this.selectPopover=u.lastElementChild,this.bindEvent(a),Ai(a,this.element),ho(a,this.element),Mi(a,this.element),xe(a,this.element),He(a,this.element),Ci(a,this.element),U(a,this.element,this.copy),Q(a,this.element,this.copy),a.options.comment.enable&&(this.selectPopover.querySelector("button").onclick=function(){var d=Lute.NewNodeID(),f=getSelection().getRangeAt(0),E=f.cloneRange(),L=f.extractContents(),D,_,B=!1,K=!1;L.childNodes.forEach(function(ue,ke){var we=!1;if(ue.nodeType===3?we=!0:ue.classList.contains("vditor-comment")?ue.classList.contains("vditor-comment")&&ue.setAttribute("data-cmtids",ue.getAttribute("data-cmtids")+" "+d):we=!0,we)if(ue.nodeType!==3&&ue.getAttribute("data-block")==="0"&&ke===0&&E.startOffset>0)ue.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ue.innerHTML,"</span>"),D=ue;else if(ue.nodeType!==3&&ue.getAttribute("data-block")==="0"&&ke===L.childNodes.length-1&&E.endOffset<E.endContainer.textContent.length)ue.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ue.innerHTML,"</span>"),_=ue;else if(ue.nodeType!==3&&ue.getAttribute("data-block")==="0")ke===0?B=!0:ke===L.childNodes.length-1&&(K=!0),ue.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ue.innerHTML,"</span>");else{var de=document.createElement("span");de.classList.add("vditor-comment"),de.setAttribute("data-cmtids",d),ue.parentNode.insertBefore(de,ue),de.appendChild(ue)}});var fe=(0,y.F9)(E.startContainer);fe&&(D?(fe.insertAdjacentHTML("beforeend",D.innerHTML),D.remove()):fe.textContent.trim().replace(c.g.ZWSP,"")===""&&B&&fe.remove());var ve=(0,y.F9)(E.endContainer);ve&&(_?(ve.insertAdjacentHTML("afterbegin",_.innerHTML),_.remove()):ve.textContent.trim().replace(c.g.ZWSP,"")===""&&K&&ve.remove()),f.insertNode(L),a.options.comment.add(d,f.toString(),s.getComments(a,!0)),Re(a,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),s.hideComment()})}return i.prototype.getComments=function(a,s){var u=this;if(s===void 0&&(s=!1),a.currentMode==="wysiwyg"&&a.options.comment.enable){this.commentIds=[],this.element.querySelectorAll(".vditor-comment").forEach(function(f){u.commentIds=u.commentIds.concat(f.getAttribute("data-cmtids").split(" "))}),this.commentIds=Array.from(new Set(this.commentIds));var d=[];if(s)return this.commentIds.forEach(function(f){d.push({id:f,top:u.element.querySelector('.vditor-comment[data-cmtids="'.concat(f,'"]')).offsetTop})}),d}else return[]},i.prototype.triggerRemoveComment=function(a){var s=function(f,E){var L=new Set(E);return f.filter(function(D){return!L.has(D)})};if(a.currentMode==="wysiwyg"&&a.options.comment.enable&&a.wysiwyg.commentIds.length>0){var u=JSON.parse(JSON.stringify(this.commentIds));this.getComments(a);var d=s(u,this.commentIds);d.length>0&&a.options.comment.remove(d)}},i.prototype.showComment=function(){var a=(0,q.Ny)(this.element);this.selectPopover.setAttribute("style","left:".concat(a.left,"px;display:block;top:").concat(Math.max(-8,a.top-21),"px"))},i.prototype.hideComment=function(){this.selectPopover.setAttribute("style","display:none")},i.prototype.unbindListener=function(){window.removeEventListener("scroll",this.scrollListener)},i.prototype.copy=function(a,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){a.stopPropagation(),a.preventDefault();var d=(0,y.lG)(u.startContainer,"CODE"),f=(0,y.lG)(u.endContainer,"CODE");if(d&&f&&f.isSameNode(d)){var E="";d.parentElement.tagName==="PRE"?E=u.toString():E="`"+u.toString()+"`",a.clipboardData.setData("text/plain",E),a.clipboardData.setData("text/html","");return}var L=(0,y.lG)(u.startContainer,"A"),D=(0,y.lG)(u.endContainer,"A");if(L&&D&&D.isSameNode(L)){var _=L.getAttribute("title")||"";_&&(_=' "'.concat(_,'"')),a.clipboardData.setData("text/plain","[".concat(u.toString(),"](").concat(L.getAttribute("href")).concat(_,")")),a.clipboardData.setData("text/html","");return}var B=document.createElement("div");B.appendChild(u.cloneContents()),a.clipboardData.setData("text/plain",s.lute.VditorDOM2Md(B.innerHTML).trim()),a.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(a){var s=this;this.unbindListener(),window.addEventListener("scroll",this.scrollListener=function(){if(A(a,["hint"]),!(s.popover.style.display!=="block"||s.selectPopover.style.display!=="block")){var u=parseInt(s.popover.getAttribute("data-top"),10);if(a.options.height!=="auto"){if(a.options.toolbarConfig.pin&&a.toolbar.element.getBoundingClientRect().top===0){var d=Math.max(window.scrollY-a.element.offsetTop-8,Math.min(u-a.wysiwyg.element.scrollTop,s.element.clientHeight-21))+"px";s.popover.style.display==="block"&&(s.popover.style.top=d),s.selectPopover.style.display==="block"&&(s.selectPopover.style.top=d)}return}else if(!a.options.toolbarConfig.pin)return;var f=Math.max(u,window.scrollY-a.element.offsetTop-8)+"px";s.popover.style.display==="block"&&(s.popover.style.top=f),s.selectPopover.style.display==="block"&&(s.selectPopover.style.top=f)}}),this.element.addEventListener("scroll",function(){if(A(a,["hint"]),a.options.comment&&a.options.comment.enable&&a.options.comment.scroll&&a.options.comment.scroll(a.wysiwyg.element.scrollTop),s.popover.style.display==="block"){var u=parseInt(s.popover.getAttribute("data-top"),10)-a.wysiwyg.element.scrollTop,d=-8;a.options.toolbarConfig.pin&&a.toolbar.element.getBoundingClientRect().top===0&&(d=window.scrollY-a.element.offsetTop+d);var f=Math.max(d,Math.min(u,s.element.clientHeight-21))+"px";s.popover.style.top=f,s.selectPopover.style.top=f}}),this.element.addEventListener("paste",function(u){ta(a,u,{pasteCode:function(d){var f=(0,q.zh)(a),E=document.createElement("template");E.innerHTML=d,f.insertNode(E.content.cloneNode(!0));var L=(0,y.a1)(f.startContainer,"data-block","0");L?L.outerHTML=a.lute.SpinVditorDOM(L.outerHTML):a.wysiwyg.element.innerHTML=a.lute.SpinVditorDOM(a.wysiwyg.element.innerHTML),(0,q.ib)(a.wysiwyg.element,f)}})}),this.element.addEventListener("compositionstart",function(){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){var d=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(d&&d.textContent===""){Ht(a);return}(0,m.vU)()||Zr(a,getSelection().getRangeAt(0).cloneRange(),u),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")){if(s.preventInput){s.preventInput=!1,Re(a);return}if(s.composingLock||u.data===""||u.data==="“"||u.data==="《"){Re(a);return}var d=getSelection().getRangeAt(0),f=(0,y.F9)(d.startContainer);if(f||(Pn(a,d),f=(0,y.F9)(d.startContainer)),!!f){for(var E=(0,q.im)(f,a.wysiwyg.element,d).start,L=!0,D=E-1;D>f.textContent.substr(0,E).lastIndexOf(`
`);D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}E===0&&(L=!1);for(var _=!0,D=E-1;D<f.textContent.length;D++)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==`
`){_=!1;break}_&&/^#{1,6} $/.test(f.textContent)&&(_=!1);var B=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(B&&B.textContent===""&&(Ht(a),B.remove()),L&&f.getAttribute("data-type")!=="code-block"||_||mo(f.innerHTML)||fo(f.innerHTML)&&f.previousElementSibling){typeof a.options.input=="function"&&a.options.input(v(a));return}u.inputType==="insertParagraph"&&s.element.innerHTML==="<p><br></p><p><br></p>"&&f.previousElementSibling.remove(),Zr(a,d,u)}}}),this.element.addEventListener("click",function(u){if(u.target.tagName==="INPUT"){var d=u.target;d.checked?d.setAttribute("checked","checked"):d.removeAttribute("checked"),s.preventInput=!0,getSelection().rangeCount>0&&(0,q.Hc)(getSelection().getRangeAt(0)),Re(a);return}if(u.target.tagName==="IMG"&&!u.target.parentElement.classList.contains("vditor-wysiwyg__preview")){u.target.getAttribute("data-type")==="link-ref"?co(a,u.target):di(u,a);return}var f=(0,y.lG)(u.target,"A");if(f){a.options.link.click?a.options.link.click(f):a.options.link.isOpen&&window.open(f.getAttribute("href")),u.preventDefault();return}var E=(0,q.zh)(a);if(u.target.isEqualNode(s.element)&&s.element.lastElementChild&&E.collapsed){var L=s.element.lastElementChild.getBoundingClientRect();u.y>L.top+L.height&&(s.element.lastElementChild.tagName==="P"&&s.element.lastElementChild.textContent.trim().replace(c.g.ZWSP,"")===""?(E.selectNodeContents(s.element.lastElementChild),E.collapse(!1)):(s.element.insertAdjacentHTML("beforeend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(s.element,E)))}jn(a);var D=(0,y.fb)(u.target,"vditor-wysiwyg__preview");D||(D=(0,y.fb)((0,q.zh)(a).startContainer,"vditor-wysiwyg__preview")),D&&cr(D,a),Rt(u,a)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){u.key==="Enter"&&Z(a),(u.key==="Backspace"||u.key==="Delete")&&a.wysiwyg.element.innerHTML!==""&&a.wysiwyg.element.childNodes.length===1&&a.wysiwyg.element.firstElementChild&&a.wysiwyg.element.firstElementChild.tagName==="P"&&a.wysiwyg.element.firstElementChild.childElementCount===0&&(a.wysiwyg.element.textContent===""||a.wysiwyg.element.textContent===`
`)&&(a.wysiwyg.element.innerHTML="");var d=(0,q.zh)(a);if(u.key==="Backspace"&&(0,m.vU)()&&d.startContainer.textContent===`
`&&d.startOffset===1&&(d.startContainer.textContent=""),Pn(a,d),jn(a),!(u.key!=="ArrowDown"&&u.key!=="ArrowRight"&&u.key!=="Backspace"&&u.key!=="ArrowLeft"&&u.key!=="ArrowUp")){(u.key==="ArrowLeft"||u.key==="ArrowRight")&&a.hint.render(a);var f=(0,y.fb)(d.startContainer,"vditor-wysiwyg__preview");if(!f&&d.startContainer.nodeType!==3&&d.startOffset>0){var E=d.startContainer;E.classList.contains("vditor-wysiwyg__block")&&(f=E.lastElementChild)}if(f){var L=f.previousElementSibling;if(L.style.display==="none"){u.key==="ArrowDown"||u.key==="ArrowRight"?cr(f,a):cr(f,a,!1);return}var D=f.previousElementSibling;if(D.tagName==="PRE"&&(D=D.firstElementChild),u.key==="ArrowDown"||u.key==="ArrowRight"){var E=f.parentElement,_=Hn(E);if(_&&_.nodeType!==3){var B=_.querySelector(".vditor-wysiwyg__preview");if(B){cr(B,a);return}}if(_.nodeType===3){for(;_.textContent.length===0&&_.nextSibling;)_=_.nextSibling;d.setStart(_,1)}else d.setStart(_.firstChild,0)}else d.selectNodeContents(D),d.collapse(!1)}}}})},i}(),Ld=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),_d=function(i){Ld(a,i);function a(s,u){var d=i.call(this)||this;if(d.isDestroyed=!1,d.version=c.H,typeof s=="string"){if(u?u.cache?u.cache.id||(u.cache.id="vditor".concat(s)):u.cache={id:"vditor".concat(s)}:u={cache:{id:"vditor".concat(s)}},!document.getElementById(s))return d.showErrorTip("Failed to get element by id: ".concat(s)),d;s=document.getElementById(s)}var f=new Md(u),E=f.merge();if(E.i18n)window.VditorI18n=E.i18n,d.init(s,E);else if(["de_DE","en_US","es_ES","fr_FR","ja_JP","ko_KR","pt_BR","ru_RU","sv_SE","vi_VN","zh_CN","zh_TW"].includes(E.lang)){var L="vditorI18nScript",D=L+E.lang;document.querySelectorAll('head script[id^="'.concat(L,'"]')).forEach(function(_){_.id!==D&&document.head.removeChild(_)}),(0,b.G)("".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js"),D).then(function(){d.init(s,E)}).catch(function(_){d.showErrorTip("GET ".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js net::ERR_ABORTED 404 (Not Found)"))})}else throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");return d}return a.prototype.showErrorTip=function(s){var u=new Vs;document.body.appendChild(u.element),u.show(s,0)},a.prototype.updateToolbarConfig=function(s){this.vditor.toolbar.updateConfig(this.vditor,s)},a.prototype.setTheme=function(s,u,d,f){this.vditor.options.theme=s,ye(this.vditor),u&&(this.vditor.options.preview.theme.current=u,(0,le.Z)(u,f||this.vditor.options.preview.theme.path)),d&&(this.vditor.options.preview.hljs.style=d,(0,Ws.Y)(d,this.vditor.options.cdn))},a.prototype.getValue=function(){return v(this.vditor)},a.prototype.getCurrentMode=function(){return this.vditor.currentMode},a.prototype.focus=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.focus():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.focus():this.vditor.currentMode==="ir"&&this.vditor.ir.element.focus()},a.prototype.blur=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.blur():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.blur():this.vditor.currentMode==="ir"&&this.vditor.ir.element.blur()},a.prototype.disabled=function(){A(this.vditor,["subToolbar","hint","popover"]),k(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","false")},a.prototype.enable=function(){S(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor.undo.resetIcon(this.vditor),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","true")},a.prototype.getSelection=function(){if(this.vditor.currentMode==="wysiwyg")return Or(this.vditor.wysiwyg.element);if(this.vditor.currentMode==="sv")return Or(this.vditor.sv.element);if(this.vditor.currentMode==="ir")return Or(this.vditor.ir.element)},a.prototype.renderPreview=function(s){this.vditor.preview.render(this.vditor,s)},a.prototype.getCursorPosition=function(){return(0,q.Ny)(this.vditor[this.vditor.currentMode].element)},a.prototype.isUploading=function(){return this.vditor.upload.isUploading},a.prototype.clearCache=function(){this.vditor.options.cache.enable&&(0,m.pK)()&&localStorage.removeItem(this.vditor.options.cache.id)},a.prototype.disabledCache=function(){this.vditor.options.cache.enable=!1},a.prototype.enableCache=function(){if(!this.vditor.options.cache.id)throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");this.vditor.options.cache.enable=!0},a.prototype.html2md=function(s){return this.vditor.lute.HTML2Md(s)},a.prototype.exportJSON=function(s){return this.vditor.lute.RenderJSON(s)},a.prototype.getHTML=function(){return $s(this.vditor)},a.prototype.tip=function(s,u){this.vditor.tip.show(s,u)},a.prototype.setPreviewMode=function(s){bo(s,this.vditor)},a.prototype.deleteValue=function(){window.getSelection().isCollapsed||document.execCommand("delete",!1)},a.prototype.updateValue=function(s){document.execCommand("insertHTML",!1,s)},a.prototype.insertValue=function(s,u){u===void 0&&(u=!0);var d=(0,q.zh)(this.vditor);d.collapse(!0);var f=document.createElement("template");f.innerHTML=s,d.insertNode(f.content.cloneNode(!0)),d.collapse(!1),this.vditor.currentMode==="sv"?(this.vditor.sv.preventInput=!0,u&&X(this.vditor)):this.vditor.currentMode==="wysiwyg"?u&&Zr(this.vditor,getSelection().getRangeAt(0)):this.vditor.currentMode==="ir"&&(this.vditor.ir.preventInput=!0,u&&Nt(this.vditor,getSelection().getRangeAt(0),!0))},a.prototype.insertMD=function(s){this.vditor.currentMode==="ir"?(0,q.oC)(this.vditor.lute.Md2VditorIRDOM(s),this.vditor):this.vditor.currentMode==="wysiwyg"?(0,q.oC)(this.vditor.lute.Md2VditorDOM(s),this.vditor):Pe(this.vditor,s),this.vditor.outline.render(this.vditor),lt(this.vditor)},a.prototype.setValue=function(s,u){var d=this;u===void 0&&(u=!1),this.vditor.currentMode==="sv"?(this.vditor.sv.element.innerHTML="<div data-block='0'>".concat(this.vditor.lute.SpinVditorSVDOM(s),"</div>"),Ge(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})):this.vditor.currentMode==="wysiwyg"?uo(this.vditor,s,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}):(this.vditor.ir.element.innerHTML=this.vditor.lute.Md2VditorIRDOM(s),this.vditor.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(f){tt(f,d.vditor)}),Xn(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})),this.vditor.outline.render(this.vditor),s||(A(this.vditor,["emoji","headings","submenu","hint"]),this.vditor.wysiwyg.popover&&(this.vditor.wysiwyg.popover.style.display="none"),this.clearCache()),u&&this.clearStack()},a.prototype.insertEmptyBlock=function(s){hi(this.vditor,s)},a.prototype.clearStack=function(){this.vditor.undo.clearStack(this.vditor),this.vditor.undo.addToUndoStack(this.vditor)},a.prototype.destroy=function(){this.vditor.element.innerHTML=this.vditor.originalInnerHTML,this.vditor.element.classList.remove("vditor"),this.vditor.element.removeAttribute("style");var s=document.getElementById("vditorIconScript");s&&s.remove(),this.clearCache(),Be(),this.vditor.wysiwyg.unbindListener(),this.vditor.options.after=void 0,this.isDestroyed=!0},a.prototype.getCommentIds=function(){return this.vditor.currentMode!=="wysiwyg"?[]:this.vditor.wysiwyg.getComments(this.vditor,!0)},a.prototype.hlCommentIds=function(s){if(this.vditor.currentMode==="wysiwyg"){var u=function(d){d.classList.remove("vditor-comment--hover"),s.forEach(function(f){d.getAttribute("data-cmtids").indexOf(f)>-1&&d.classList.add("vditor-comment--hover")})};this.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)}),this.vditor.preview.element.style.display!=="none"&&this.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)})}},a.prototype.unHlCommentIds=function(s){if(this.vditor.currentMode==="wysiwyg"){var u=function(d){s.forEach(function(f){d.getAttribute("data-cmtids").indexOf(f)>-1&&d.classList.remove("vditor-comment--hover")})};this.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)}),this.vditor.preview.element.style.display!=="none"&&this.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)})}},a.prototype.removeCommentIds=function(s){var u=this;if(this.vditor.currentMode==="wysiwyg"){var d=function(f,E){var L=f.getAttribute("data-cmtids").split(" ");L.find(function(D,_){if(D===E)return L.splice(_,1),!0}),L.length===0?(f.outerHTML=f.innerHTML,(0,q.zh)(u.vditor).collapse(!0)):f.setAttribute("data-cmtids",L.join(" "))};s.forEach(function(f){u.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(E){d(E,f)}),u.vditor.preview.element.style.display!=="none"&&u.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(E){d(E,f)})}),Re(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})}},a.prototype.init=function(s,u){var d=this;this.isDestroyed||(this.vditor={currentMode:u.mode,element:s,hint:new wu(u.hint.extend),lute:void 0,options:u,originalInnerHTML:s.innerHTML,outline:new Su(window.VditorI18n.outline),tip:new Vs},this.vditor.sv=new Mu(this.vditor),this.vditor.undo=new Td,this.vditor.wysiwyg=new Cd(this.vditor),this.vditor.ir=new xu(this.vditor),this.vditor.toolbar=new Sd(this.vditor),u.resize.enable&&(this.vditor.resize=new Au(this.vditor)),this.vditor.toolbar.elements.devtools&&(this.vditor.devtools=new g),(u.upload.url||u.upload.handler)&&(this.vditor.upload=new Ia),(0,b.G)(u._lutePath||"".concat(u.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){d.vditor.lute=(0,ku.X)({autoSpace:d.vditor.options.preview.markdown.autoSpace,gfmAutoLink:d.vditor.options.preview.markdown.gfmAutoLink,codeBlockPreview:d.vditor.options.preview.markdown.codeBlockPreview,emojiSite:d.vditor.options.hint.emojiPath,emojis:d.vditor.options.hint.emoji,fixTermTypo:d.vditor.options.preview.markdown.fixTermTypo,footnotes:d.vditor.options.preview.markdown.footnotes,headingAnchor:!1,inlineMathDigit:d.vditor.options.preview.math.inlineDigit,linkBase:d.vditor.options.preview.markdown.linkBase,linkPrefix:d.vditor.options.preview.markdown.linkPrefix,listStyle:d.vditor.options.preview.markdown.listStyle,mark:d.vditor.options.preview.markdown.mark,mathBlockPreview:d.vditor.options.preview.markdown.mathBlockPreview,paragraphBeginningSpace:d.vditor.options.preview.markdown.paragraphBeginningSpace,sanitize:d.vditor.options.preview.markdown.sanitize,toc:d.vditor.options.preview.markdown.toc}),d.vditor.preview=new Tu(d.vditor),Ae(d.vditor),u.after&&u.after(),u.icon&&(0,b.J)("".concat(u.cdn,"/dist/js/icons/").concat(u.icon,".js"),"vditorIconScript")}))},a}(h.default);const Nd=_d})(),l=l.default,l})()})})(i3);var ak=i3.exports;const ok=o6(ak),sk=Object.freeze(Object.defineProperty({__proto__:null,default:ok},Symbol.toStringTag,{value:"Module"}));Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};const a3=new Jt.Renderer;a3.image=function(t,e,n){let r="";if(typeof t=="string")r=t;else{if(t==null)return'<div class="markdown-error">图片链接为空</div>';if(typeof t=="object")if(t.href)r=String(t.href);else if(t.url)r=String(t.url);else if(t.src)r=String(t.src);else return'<div class="markdown-error">图片链接格式错误</div>';else if(typeof t.toString=="function")r=t.toString();else return'<div class="markdown-error">图片链接格式错误</div>'}let o=r;r.includes("cdn-mineru.openxlab.org.cn")&&(o=`/proxy-image${r.replace("https://cdn-mineru.openxlab.org.cn","")}`);const l=n||"图片",h=e?` title="${e}"`:"";return`<img src="${o}" alt="${l}"${h} class="markdown-image" style="max-width: 200px; max-height: 150px; object-fit: contain; display: block; margin: 4px auto; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);" />`};Jt.setOptions({breaks:!1,gfm:!0,tables:!0,sanitize:!1,renderer:a3});const lk=t=>{if(!t||typeof t!="string")return"";try{const e=ck(t),n=Jt.parse(e);return uk(n)}catch(e){return`<div class="markdown-error">渲染失败: ${e.message}</div>`}},ck=t=>t.replace(/\$\$([\s\S]*?)\$\$/g,(e,n)=>{try{return`<div class="math-block">${lg.renderToString(n.trim(),{displayMode:!0,throwOnError:!1})}</div>`}catch{return`<div class="math-error">数学公式错误: ${n}</div>`}}).replace(/\$([^$\n]+?)\$/g,(e,n)=>{if(n.includes("\\")||n.includes("{")||n.includes("}")||n.includes("^")||n.includes("_")||n.includes("=")||n.includes("+")||n.includes("-")||n.includes("*")||n.includes("/")||n.includes("(")||n.includes(")"))try{return`<span class="math-inline">${lg.renderToString(n.trim(),{displayMode:!1,throwOnError:!1})}</span>`}catch{return`<span class="math-error">数学公式错误: ${n}</span>`}return e}),uk=t=>{let e=t.replace(/<table>/g,'<table class="markdown-table">').replace(/<pre><code/g,'<pre class="markdown-code"><code');const n=document.createElement("div");return n.innerHTML=e,n.querySelectorAll("pre code").forEach(r=>{const o=r.className.match(/language-(\w+)/);if(o)try{r.innerHTML=Mm.highlight(r.textContent,Mm.languages[o[1]],o[1])}catch{}}),n.innerHTML};function dk(t,e){return async function(...n){const r=this.before[e];r&&!await r.apply(this,n)||t.apply(this,n)}}const cg=Object.keys($v),o3={};for(let t=0;t<cg.length;t++){const e=cg[t];o3[e]=dk($v[e],e)}const hk={getObjById:Q0,generateNewObj:fy,layout:Ey,linkDiv:v7,editTopic:p7,editTableNode:f7,convertTableHTMLToMarkdown:m7,renderMarkdownToHTML:lk,createWrapper:c7,createParent:u7,createChildren:d7,createTopic:h7,findEle:Nv,changeTheme:V7,...H8,...o3,...Y8,...cw,...xw,init(t){if(t=JSON.parse(JSON.stringify(t)),!t||!t.nodeData)return new Error("MindElixir: `data` is required");t.direction!==void 0&&(this.direction=t.direction),this.changeTheme(t.theme||this.theme,!1),this.nodeData=t.nodeData,oo(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&P7(this),this.keypress&&xy(this,this.keypress),this.editable&&U7(this),this.contextMenu&&this.disposable.push(b7(this,this.contextMenu)),this.draggable&&this.disposable.push(k7(this)),this.allowUndo&&this.disposable.push(E7(this)),this.layout(),this.linkDiv(),this.toCenter()},destroy(){var t;this.disposable.forEach(e=>e()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=void 0,this.waitCopy=void 0,this.theme=void 0,this.direction=void 0,this.bus=void 0,this.container=void 0,this.map=void 0,this.lines=void 0,this.linkController=void 0,this.linkSvgGroup=void 0,this.P2=void 0,this.P3=void 0,this.line1=void 0,this.line2=void 0,this.nodes=void 0,(t=this.selection)==null||t.destroy(),this.selection=void 0}};function pk({pT:t,pL:e,pW:n,pH:r,cT:o,cL:l,cW:h,cH:c,direction:p,containerHeight:v}){let b=e+n/2;const g=t+r/2;let m;p===oi.LHS?m=l+h:m=l;const x=o+c/2,w=(1-Math.abs(x-g)/v)*.25*(n/2);return p===oi.LHS?b=b-n/10-w:b=b+n/10+w,`M ${b} ${g} Q ${b} ${x} ${m} ${x}`}function fk({pT:t,pL:e,pW:n,pH:r,cT:o,cL:l,cW:h,cH:c,direction:p,isFirst:v}){let b=e+n/2;const g=t+r/2;let m;p===oi.LHS?m=l+h-31:m=l+31;const x=o+c/2,w=this.container.offsetHeight||1e3,S=(1-Math.abs(x-g)/w)*.25*(n/2);return p===oi.LHS?b=b-n/10-S:b=b+n/10+S,`M ${b} ${g} Q ${b} ${x} ${m} ${x}`}const mk="5.1.1";function gk(t){return{x:0,y:0,moved:!1,mousedown:!1,onMove(e,n){this.mousedown&&(this.moved=!0,t.move(e,n))},clear(){this.mousedown=!1}}}const sl=document;function tr({el:t,direction:e,locale:n,draggable:r,editable:o,contextMenu:l,toolBar:h,keypress:c,mouseSelectionButton:p,selectionContainer:v,before:b,newTopicName:g,allowUndo:m,generateMainBranch:x,generateSubBranch:w,overflowHidden:S,theme:k,alignment:C,scaleSensitivity:T,scaleMax:A,scaleMin:M,handleWheel:y,markdown:N,imageProxy:z,enableNodeBorder:F}){let P=null;const Y=Object.prototype.toString.call(t);if(Y==="[object HTMLDivElement]"?P=t:Y==="[object String]"&&(P=document.querySelector(t)),!P)throw new Error("MindElixir: el is not a valid element");P.style.position="relative",P.innerHTML="",this.el=P,this.disposable=[],this.before=b||{},this.locale=n||"en",this.newTopicName=g||"New Node",this.contextMenu=l??!0,this.toolBar=h??!0,this.keypress=c??!0,this.mouseSelectionButton=p??0,this.direction=e??1,this.draggable=r??!0,this.editable=o??!0,this.allowUndo=m??!0,this.scaleSensitivity=T??.1,this.scaleMax=A??1.4,this.scaleMin=M??.2,this.generateMainBranch=x||pk,this.generateSubBranch=w||fk,this.overflowHidden=S??!1,this.alignment=C??"root",this.handleWheel=y??!0,this.markdown=N||void 0,this.imageProxy=z||void 0,this.enableNodeBorder=F??!1,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=gk(this),this.bus=Sy(),this.container=sl.createElement("div"),this.selectionContainer=v||this.container,this.container.className="map-container";const te=window.matchMedia("(prefers-color-scheme: dark)");this.theme=k||(te.matches?Xp:Kp);const ce=sl.createElement("div");ce.className="map-canvas",this.map=ce,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=sl.createElement("me-nodes"),this.lines=pl("lines"),this.summarySvg=pl("summary"),this.linkController=pl("linkcontroller"),this.P2=sl.createElement("div"),this.P3=sl.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=om(),this.line2=om(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=pl("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(ky(this))}tr.prototype=hk;Object.defineProperty(tr.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0});tr.LEFT=0;tr.RIGHT=1;tr.SIDE=2;tr.THEME=Kp;tr.DARK_THEME=Xp;tr.version=mk;tr.E=Nv;tr.new=t=>({nodeData:{id:Po(),topic:t||"new topic",children:[]}});function $f(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var qo=$f();function s3(t){qo=t}var Ml={exec:()=>null};function ln(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(o,l)=>{let h=typeof l=="string"?l:l.source;return h=h.replace(Er.caret,"$1"),n=n.replace(o,h),r},getRegex:()=>new RegExp(n,e)};return r}var Er={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:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},vk=/^(?:[ \t]*(?:\n|$))+/,bk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Kl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,wk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Uf=/(?:[*+-]|\d{1,9}[.)])/,l3=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,c3=ln(l3).replace(/bull/g,Uf).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(),xk=ln(l3).replace(/bull/g,Uf).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(),Vf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kk=/^[^\n]+/,Wf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Sk=ln(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ek=ln(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Uf).getRegex(),Yc="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",Gf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Tk=ln("^ {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",Gf).replace("tag",Yc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),u3=ln(Vf).replace("hr",Kl).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",Yc).getRegex(),Ak=ln(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",u3).getRegex(),Kf={blockquote:Ak,code:bk,def:Sk,fences:yk,heading:wk,hr:Kl,html:Tk,lheading:c3,list:Ek,newline:vk,paragraph:u3,table:Ml,text:kk},ug=ln("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Kl).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",Yc).getRegex(),Mk={...Kf,lheading:xk,table:ug,paragraph:ln(Vf).replace("hr",Kl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ug).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",Yc).getRegex()},Ck={...Kf,html:ln(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Gf).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:Ml,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ln(Vf).replace("hr",Kl).replace("heading",` *#{1,6} *[^
]`).replace("lheading",c3).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,_k=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,d3=/^( {2,}|\\)\n(?!\s*$)/,Nk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Jc=/[\p{P}\p{S}]/u,Xf=/[\s\p{P}\p{S}]/u,h3=/[^\s\p{P}\p{S}]/u,Dk=ln(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xf).getRegex(),p3=/(?!~)[\p{P}\p{S}]/u,Rk=/(?!~)[\s\p{P}\p{S}]/u,Ik=/(?:[^\s\p{P}\p{S}]|~)/u,Ok=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,f3=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Hk=ln(f3,"u").replace(/punct/g,Jc).getRegex(),Pk=ln(f3,"u").replace(/punct/g,p3).getRegex(),m3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",zk=ln(m3,"gu").replace(/notPunctSpace/g,h3).replace(/punctSpace/g,Xf).replace(/punct/g,Jc).getRegex(),Bk=ln(m3,"gu").replace(/notPunctSpace/g,Ik).replace(/punctSpace/g,Rk).replace(/punct/g,p3).getRegex(),Fk=ln("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,h3).replace(/punctSpace/g,Xf).replace(/punct/g,Jc).getRegex(),qk=ln(/\\(punct)/,"gu").replace(/punct/g,Jc).getRegex(),jk=ln(/^<(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(),$k=ln(Gf).replace("(?:-->|$)","-->").getRegex(),Uk=ln("^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",$k).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),mc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,Vk=ln(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",mc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),g3=ln(/^!?\[(label)\]\[(ref)\]/).replace("label",mc).replace("ref",Wf).getRegex(),v3=ln(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wf).getRegex(),Wk=ln("reflink|nolink(?!\\()","g").replace("reflink",g3).replace("nolink",v3).getRegex(),Zf={_backpedal:Ml,anyPunctuation:qk,autolink:jk,blockSkip:Ok,br:d3,code:_k,del:Ml,emStrongLDelim:Hk,emStrongRDelimAst:zk,emStrongRDelimUnd:Fk,escape:Lk,link:Vk,nolink:v3,punctuation:Dk,reflink:g3,reflinkSearch:Wk,tag:Uk,text:Nk,url:Ml},Gk={...Zf,link:ln(/^!?\[(label)\]\((.*?)\)/).replace("label",mc).getRegex(),reflink:ln(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",mc).getRegex()},lp={...Zf,emStrongRDelimAst:Bk,emStrongLDelim:Pk,url:ln(/^((?: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\S]|[^\\])*?(?:\\[\s\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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Kk={...lp,br:ln(d3).replace("{2,}","*").getRegex(),text:ln(lp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},y0={normal:Kf,gfm:Mk,pedantic:Ck},ll={normal:Zf,gfm:lp,breaks:Kk,pedantic:Gk},Xk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},dg=t=>Xk[t];function Oi(t,e){if(e){if(Er.escapeTest.test(t))return t.replace(Er.escapeReplace,dg)}else if(Er.escapeTestNoEncode.test(t))return t.replace(Er.escapeReplaceNoEncode,dg);return t}function hg(t){try{t=encodeURI(t).replace(Er.percentDecode,"%")}catch{return null}return t}function pg(t,e){var l;let n=t.replace(Er.findPipe,(h,c,p)=>{let v=!1,b=c;for(;--b>=0&&p[b]==="\\";)v=!v;return v?"|":" |"}),r=n.split(Er.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((l=r.at(-1))!=null&&l.trim())&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(Er.slashPipe,"|");return r}function cl(t,e,n){let r=t.length;if(r===0)return"";let o=0;for(;o<r;){let l=t.charAt(r-o-1);if(l===e&&!n)o++;else if(l!==e&&n)o++;else break}return t.slice(0,r-o)}function Zk(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function fg(t,e,n,r,o){let l=e.href,h=e.title||null,c=t[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let p={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:h,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,p}function Yk(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let o=r[1];return e.split(`
`).map(l=>{let h=l.match(n.other.beginningSpace);if(h===null)return l;let[c]=h;return c.length>=o.length?l.slice(o.length):l}).join(`
`)}var gc=class{constructor(t){mn(this,"options");mn(this,"rules");mn(this,"lexer");this.options=t||qo}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:cl(n,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=Yk(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=cl(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:cl(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=cl(e[0],`
`).split(`
`),r="",o="",l=[];for(;n.length>0;){let h=!1,c=[],p;for(p=0;p<n.length;p++)if(this.rules.other.blockquoteStart.test(n[p]))c.push(n[p]),h=!0;else if(!h)c.push(n[p]);else break;n=n.slice(p);let v=c.join(`
`),b=v.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
${v}`:v,o=o?`${o}
${b}`:b;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,l,!0),this.lexer.state.top=g,n.length===0)break;let m=l.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let x=m,w=x.raw+`
`+n.join(`
`),S=this.blockquote(w);l[l.length-1]=S,r=r.substring(0,r.length-x.raw.length)+S.raw,o=o.substring(0,o.length-x.text.length)+S.text;break}else if((m==null?void 0:m.type)==="list"){let x=m,w=x.raw+`
`+n.join(`
`),S=this.list(w);l[l.length-1]=S,r=r.substring(0,r.length-m.raw.length)+S.raw,o=o.substring(0,o.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:r,tokens:l,text:o}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let l=this.rules.other.listItemRegex(n),h=!1;for(;t;){let p=!1,v="",b="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;v=e[0],t=t.substring(v.length);let g=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),m=t.split(`
`,1)[0],x=!g.trim(),w=0;if(this.options.pedantic?(w=2,b=g.trimStart()):x?w=e[1].length+1:(w=e[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=g.slice(w),w+=e[1].length),x&&this.rules.other.blankLine.test(m)&&(v+=m+`
`,t=t.substring(m.length+1),p=!0),!p){let C=this.rules.other.nextBulletRegex(w),T=this.rules.other.hrRegex(w),A=this.rules.other.fencesBeginRegex(w),M=this.rules.other.headingBeginRegex(w),y=this.rules.other.htmlBeginRegex(w);for(;t;){let N=t.split(`
`,1)[0],z;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),z=m):z=m.replace(this.rules.other.tabCharGlobal," "),A.test(m)||M.test(m)||y.test(m)||C.test(m)||T.test(m))break;if(z.search(this.rules.other.nonSpaceChar)>=w||!m.trim())b+=`
`+z.slice(w);else{if(x||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(g)||M.test(g)||T.test(g))break;b+=`
`+m}!x&&!m.trim()&&(x=!0),v+=N+`
`,t=t.substring(N.length+1),g=z.slice(w)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(h=!0));let S=null,k;this.options.gfm&&(S=this.rules.other.listIsTask.exec(b),S&&(k=S[0]!=="[ ] ",b=b.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),o.raw+=v}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let p=0;p<o.items.length;p++)if(this.lexer.state.top=!1,o.items[p].tokens=this.lexer.blockTokens(o.items[p].text,[]),!o.loose){let v=o.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));o.loose=b}if(o.loose)for(let p=0;p<o.items.length;p++)o.items[p].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:o}}}table(t){var h;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=pg(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=e[3])!=null&&h.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let c of r)this.rules.other.tableAlignRight.test(c)?l.align.push("right"):this.rules.other.tableAlignCenter.test(c)?l.align.push("center"):this.rules.other.tableAlignLeft.test(c)?l.align.push("left"):l.align.push(null);for(let c=0;c<n.length;c++)l.header.push({text:n[c],tokens:this.lexer.inline(n[c]),header:!0,align:l.align[c]});for(let c of o)l.rows.push(pg(c,l.header.length).map((p,v)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:l.align[v]})));return l}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=cl(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{let l=Zk(e[2],"()");if(l===-2)return;if(l>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let r=e[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],o=l[3])}else o=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),fg(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[r.toLowerCase()];if(!o){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return fg(n,o,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,l,h,c=o,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+o);(r=v.exec(e))!=null;){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(h=[...l].length,r[3]||r[4]){c+=h;continue}else if((r[5]||r[6])&&o%3&&!((o+h)%3)){p+=h;continue}if(c-=h,c>0)continue;h=Math.min(h,h+c+p);let b=[...r[0]][0].length,g=t.slice(0,o+r.index+b+h);if(Math.min(o,h)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let e;if(e=this.rules.inline.url.exec(t)){let r,o;if(e[2]==="@")r=e[0],o="mailto:"+r;else{let l;do l=e[0],e[0]=((n=this.rules.inline._backpedal.exec(e[0]))==null?void 0:n[0])??"";while(l!==e[0]);r=e[0],e[1]==="www."?o="http://"+e[0]:o=e[0]}return{type:"link",raw:e[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},va=class cp{constructor(e){mn(this,"tokens");mn(this,"options");mn(this,"state");mn(this,"tokenizer");mn(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||qo,this.options.tokenizer=this.options.tokenizer||new gc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Er,block:y0.normal,inline:ll.normal};this.options.pedantic?(n.block=y0.pedantic,n.inline=ll.pedantic):this.options.gfm&&(n.block=y0.gfm,this.options.breaks?n.inline=ll.breaks:n.inline=ll.gfm),this.tokenizer.rules=n}static get rules(){return{block:y0,inline:ll}}static lex(e,n){return new cp(n).lex(e)}static lexInline(e,n){return new cp(n).inlineTokens(e)}lex(e){e=e.replace(Er.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){var o,l,h;for(this.options.pedantic&&(e=e.replace(Er.tabCharGlobal," ").replace(Er.spaceLine,""));e;){let c;if((l=(o=this.options.extensions)==null?void 0:o.block)!=null&&l.some(v=>(c=v.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let v=n.at(-1);c.raw.length===1&&v!==void 0?v.raw+=`
`:n.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.text,this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.raw,this.inlineQueue.at(-1).src=v.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),n.push(c);continue}let p=e;if((h=this.options.extensions)!=null&&h.startBlock){let v=1/0,b=e.slice(1),g;this.options.extensions.startBlock.forEach(m=>{g=m.call({lexer:this},b),typeof g=="number"&&g>=0&&(v=Math.min(v,g))}),v<1/0&&v>=0&&(p=e.substring(0,v+1))}if(this.state.top&&(c=this.tokenizer.paragraph(p))){let v=n.at(-1);r&&(v==null?void 0:v.type)==="paragraph"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c),r=p.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
`)?"":`
`)+c.raw,v.text+=`
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var c,p,v;let r=e,o=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)b.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let l=!1,h="";for(;e;){l||(h=""),l=!1;let b;if((p=(c=this.options.extensions)==null?void 0:c.inline)!=null&&p.some(m=>(b=m.call({lexer:this},e,n))?(e=e.substring(b.raw.length),n.push(b),!0):!1))continue;if(b=this.tokenizer.escape(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.tag(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.link(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(b.raw.length);let m=n.at(-1);b.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(b=this.tokenizer.emStrong(e,r,h)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.codespan(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.br(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.del(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.autolink(e)){e=e.substring(b.raw.length),n.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(e))){e=e.substring(b.raw.length),n.push(b);continue}let g=e;if((v=this.options.extensions)!=null&&v.startInline){let m=1/0,x=e.slice(1),w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},x),typeof w=="number"&&w>=0&&(m=Math.min(m,w))}),m<1/0&&m>=0&&(g=e.substring(0,m+1))}if(b=this.tokenizer.inlineText(g)){e=e.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(h=b.raw.slice(-1)),l=!0;let m=n.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(e){let m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return n}},vc=class{constructor(t){mn(this,"options");mn(this,"parser");this.options=t||qo}space(t){return""}code({text:t,lang:e,escaped:n}){var l;let r=(l=(e||"").match(Er.notSpaceStart))==null?void 0:l[0],o=t.replace(Er.endingNewline,"")+`
`;return r?'<pre><code class="language-'+Oi(r)+'">'+(n?o:Oi(o,!0))+`</code></pre>
`:"<pre><code>"+(n?o:Oi(o,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(t){let e=t.ordered,n=t.start,r="";for(let h=0;h<t.items.length;h++){let c=t.items[h];r+=this.listitem(c)}let o=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+o+l+`>
`+r+"</"+o+`>
`}listitem(t){var n;let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?((n=t.tokens[0])==null?void 0:n.type)==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+Oi(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let e="",n="";for(let o=0;o<t.header.length;o++)n+=this.tablecell(t.header[o]);e+=this.tablerow({text:n});let r="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];n="";for(let h=0;h<l.length;h++)n+=this.tablecell(l[h]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+r+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Oi(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),o=hg(t);if(o===null)return r;t=o;let l='<a href="'+t+'"';return e&&(l+=' title="'+Oi(e)+'"'),l+=">"+r+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=hg(t);if(o===null)return Oi(n);t=o;let l=`<img src="${t}" alt="${n}"`;return e&&(l+=` title="${Oi(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Oi(t.text)}},Yf=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""}},ba=class up{constructor(e){mn(this,"options");mn(this,"renderer");mn(this,"textRenderer");this.options=e||qo,this.options.renderer=this.options.renderer||new vc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Yf}static parse(e,n){return new up(n).parse(e)}static parseInline(e,n){return new up(n).parseInline(e)}parse(e,n=!0){var o,l;let r="";for(let h=0;h<e.length;h++){let c=e[h];if((l=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&l[c.type]){let v=c,b=this.options.extensions.renderers[v.type].call({parser:this},v);if(b!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(v.type)){r+=b||"";continue}}let p=c;switch(p.type){case"space":{r+=this.renderer.space(p);continue}case"hr":{r+=this.renderer.hr(p);continue}case"heading":{r+=this.renderer.heading(p);continue}case"code":{r+=this.renderer.code(p);continue}case"table":{r+=this.renderer.table(p);continue}case"blockquote":{r+=this.renderer.blockquote(p);continue}case"list":{r+=this.renderer.list(p);continue}case"html":{r+=this.renderer.html(p);continue}case"def":{r+=this.renderer.def(p);continue}case"paragraph":{r+=this.renderer.paragraph(p);continue}case"text":{let v=p,b=this.renderer.text(v);for(;h+1<e.length&&e[h+1].type==="text";)v=e[++h],b+=`
`+this.renderer.text(v);n?r+=this.renderer.paragraph({type:"paragraph",raw:b,text:b,tokens:[{type:"text",raw:b,text:b,escaped:!0}]}):r+=b;continue}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(v),"";throw new Error(v)}}}return r}parseInline(e,n=this.renderer){var o,l;let r="";for(let h=0;h<e.length;h++){let c=e[h];if((l=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&l[c.type]){let v=this.options.extensions.renderers[c.type].call({parser:this},c);if(v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){r+=v||"";continue}}let p=c;switch(p.type){case"escape":{r+=n.text(p);break}case"html":{r+=n.html(p);break}case"link":{r+=n.link(p);break}case"image":{r+=n.image(p);break}case"strong":{r+=n.strong(p);break}case"em":{r+=n.em(p);break}case"codespan":{r+=n.codespan(p);break}case"br":{r+=n.br(p);break}case"del":{r+=n.del(p);break}case"text":{r+=n.text(p);break}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(v),"";throw new Error(v)}}}return r}},Mh,z0=(Mh=class{constructor(t){mn(this,"options");mn(this,"block");this.options=t||qo}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?va.lex:va.lexInline}provideParser(){return this.block?ba.parse:ba.parseInline}},mn(Mh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Mh),Jk=class{constructor(...t){mn(this,"defaults",$f());mn(this,"options",this.setOptions);mn(this,"parse",this.parseMarkdown(!0));mn(this,"parseInline",this.parseMarkdown(!1));mn(this,"Parser",ba);mn(this,"Renderer",vc);mn(this,"TextRenderer",Yf);mn(this,"Lexer",va);mn(this,"Tokenizer",gc);mn(this,"Hooks",z0);this.use(...t)}walkTokens(t,e){var r,o;let n=[];for(let l of t)switch(n=n.concat(e.call(this,l)),l.type){case"table":{let h=l;for(let c of h.header)n=n.concat(this.walkTokens(c.tokens,e));for(let c of h.rows)for(let p of c)n=n.concat(this.walkTokens(p.tokens,e));break}case"list":{let h=l;n=n.concat(this.walkTokens(h.items,e));break}default:{let h=l;(o=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&o[h.type]?this.defaults.extensions.childTokens[h.type].forEach(c=>{let p=h[c].flat(1/0);n=n.concat(this.walkTokens(p,e))}):h.tokens&&(n=n.concat(this.walkTokens(h.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=e.renderers[o.name];l?e.renderers[o.name]=function(...h){let c=o.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[o.level];l?l.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){let o=this.defaults.renderer||new vc(this.defaults);for(let l in n.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new gc(this.defaults);for(let l in n.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new z0;for(let l in n.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let h=l,c=n.hooks[h],p=o[h];z0.passThroughHooks.has(l)?o[h]=v=>{if(this.defaults.async)return Promise.resolve(c.call(o,v)).then(g=>p.call(o,g));let b=c.call(o,v);return p.call(o,b)}:o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,l=n.walkTokens;r.walkTokens=function(h){let c=[];return c.push(l.call(this,h)),o&&(c=c.concat(o.call(this,h))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return va.lex(t,e??this.defaults)}parser(t,e){return ba.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},o={...this.defaults,...r},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return l(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 e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=t);let h=o.hooks?o.hooks.provideLexer():t?va.lex:va.lexInline,c=o.hooks?o.hooks.provideParser():t?ba.parse:ba.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(p=>h(p,o)).then(p=>o.hooks?o.hooks.processAllTokens(p):p).then(p=>o.walkTokens?Promise.all(this.walkTokens(p,o.walkTokens)).then(()=>p):p).then(p=>c(p,o)).then(p=>o.hooks?o.hooks.postprocess(p):p).catch(l);try{o.hooks&&(e=o.hooks.preprocess(e));let p=h(e,o);o.hooks&&(p=o.hooks.processAllTokens(p)),o.walkTokens&&this.walkTokens(p,o.walkTokens);let v=c(p,o);return o.hooks&&(v=o.hooks.postprocess(v)),v}catch(p){return l(p)}}}onError(t,e){return n=>{if(n.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Oi(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},Oo=new Jk;function Qt(t,e){return Oo.parse(t,e)}Qt.options=Qt.setOptions=function(t){return Oo.setOptions(t),Qt.defaults=Oo.defaults,s3(Qt.defaults),Qt};Qt.getDefaults=$f;Qt.defaults=qo;Qt.use=function(...t){return Oo.use(...t),Qt.defaults=Oo.defaults,s3(Qt.defaults),Qt};Qt.walkTokens=function(t,e){return Oo.walkTokens(t,e)};Qt.parseInline=Oo.parseInline;Qt.Parser=ba;Qt.parser=ba.parse;Qt.Renderer=vc;Qt.TextRenderer=Yf;Qt.Lexer=va;Qt.lexer=va.lex;Qt.Tokenizer=gc;Qt.Hooks=z0;Qt.parse=Qt;Qt.options;Qt.setOptions;Qt.use;Qt.walkTokens;Qt.parseInline;ba.parse;va.lex;var b3={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,h={},c={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function T(A){return A instanceof p?new p(A.type,T(A.content),A.alias):Array.isArray(A)?A.map(T):A.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(T){return Object.prototype.toString.call(T).slice(8,-1)},objId:function(T){return T.__id||Object.defineProperty(T,"__id",{value:++l}),T.__id},clone:function T(A,M){M=M||{};var y,N;switch(c.util.type(A)){case"Object":if(N=c.util.objId(A),M[N])return M[N];y={},M[N]=y;for(var z in A)A.hasOwnProperty(z)&&(y[z]=T(A[z],M));return y;case"Array":return N=c.util.objId(A),M[N]?M[N]:(y=[],M[N]=y,A.forEach(function(F,P){y[P]=T(F,M)}),y);default:return A}},getLanguage:function(T){for(;T;){var A=o.exec(T.className);if(A)return A[1].toLowerCase();T=T.parentElement}return"none"},setLanguage:function(T,A){T.className=T.className.replace(RegExp(o,"gi"),""),T.classList.add("language-"+A)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT"&&1<2)return document.currentScript;try{throw new Error}catch(y){var T=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack)||[])[1];if(T){var A=document.getElementsByTagName("script");for(var M in A)if(A[M].src==T)return A[M]}return null}},isActive:function(T,A,M){for(var y="no-"+A;T;){var N=T.classList;if(N.contains(A))return!0;if(N.contains(y))return!1;T=T.parentElement}return!!M}},languages:{plain:h,plaintext:h,text:h,txt:h,extend:function(T,A){var M=c.util.clone(c.languages[T]);for(var y in A)M[y]=A[y];return M},insertBefore:function(T,A,M,y){y=y||c.languages;var N=y[T],z={};for(var F in N)if(N.hasOwnProperty(F)){if(F==A)for(var P in M)M.hasOwnProperty(P)&&(z[P]=M[P]);M.hasOwnProperty(F)||(z[F]=N[F])}var Y=y[T];return y[T]=z,c.languages.DFS(c.languages,function(te,ce){ce===Y&&te!=T&&(this[te]=z)}),z},DFS:function T(A,M,y,N){N=N||{};var z=c.util.objId;for(var F in A)if(A.hasOwnProperty(F)){M.call(A,F,A[F],y||F);var P=A[F],Y=c.util.type(P);Y==="Object"&&!N[z(P)]?(N[z(P)]=!0,T(P,M,null,N)):Y==="Array"&&!N[z(P)]&&(N[z(P)]=!0,T(P,M,F,N))}}},plugins:{},highlightAll:function(T,A){c.highlightAllUnder(document,T,A)},highlightAllUnder:function(T,A,M){var y={callback:M,container:T,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};c.hooks.run("before-highlightall",y),y.elements=Array.prototype.slice.apply(y.container.querySelectorAll(y.selector)),c.hooks.run("before-all-elements-highlight",y);for(var N=0,z;z=y.elements[N++];)c.highlightElement(z,A===!0,y.callback)},highlightElement:function(T,A,M){var y=c.util.getLanguage(T),N=c.languages[y];c.util.setLanguage(T,y);var z=T.parentElement;z&&z.nodeName.toLowerCase()==="pre"&&c.util.setLanguage(z,y);var F=T.textContent,P={element:T,language:y,grammar:N,code:F};function Y(ce){P.highlightedCode=ce,c.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,c.hooks.run("after-highlight",P),c.hooks.run("complete",P),M&&M.call(P.element)}if(c.hooks.run("before-sanity-check",P),z=P.element.parentElement,z&&z.nodeName.toLowerCase()==="pre"&&!z.hasAttribute("tabindex")&&z.setAttribute("tabindex","0"),!P.code){c.hooks.run("complete",P),M&&M.call(P.element);return}if(c.hooks.run("before-highlight",P),!P.grammar){Y(c.util.encode(P.code));return}if(A&&r.Worker){var te=new Worker(c.filename);te.onmessage=function(ce){Y(ce.data)},te.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else Y(c.highlight(P.code,P.grammar,P.language))},highlight:function(T,A,M){var y={code:T,grammar:A,language:M};if(c.hooks.run("before-tokenize",y),!y.grammar)throw new Error('The language "'+y.language+'" has no grammar.');return y.tokens=c.tokenize(y.code,y.grammar),c.hooks.run("after-tokenize",y),p.stringify(c.util.encode(y.tokens),y.language)},tokenize:function(T,A){var M=A.rest;if(M){for(var y in M)A[y]=M[y];delete A.rest}var N=new g;return m(N,N.head,T),b(T,N,A,N.head,0),w(N)},hooks:{all:{},add:function(T,A){var M=c.hooks.all;M[T]=M[T]||[],M[T].push(A)},run:function(T,A){var M=c.hooks.all[T];if(!(!M||!M.length))for(var y=0,N;N=M[y++];)N(A)}},Token:p};r.Prism=c;function p(T,A,M,y){this.type=T,this.content=A,this.alias=M,this.length=(y||"").length|0}p.stringify=function T(A,M){if(typeof A=="string")return A;if(Array.isArray(A)){var y="";return A.forEach(function(Y){y+=T(Y,M)}),y}var N={type:A.type,content:T(A.content,M),tag:"span",classes:["token",A.type],attributes:{},language:M},z=A.alias;z&&(Array.isArray(z)?Array.prototype.push.apply(N.classes,z):N.classes.push(z)),c.hooks.run("wrap",N);var F="";for(var P in N.attributes)F+=" "+P+'="'+(N.attributes[P]||"").replace(/"/g,"&quot;")+'"';return"<"+N.tag+' class="'+N.classes.join(" ")+'"'+F+">"+N.content+"</"+N.tag+">"};function v(T,A,M,y){T.lastIndex=A;var N=T.exec(M);if(N&&y&&N[1]){var z=N[1].length;N.index+=z,N[0]=N[0].slice(z)}return N}function b(T,A,M,y,N,z){for(var F in M)if(!(!M.hasOwnProperty(F)||!M[F])){var P=M[F];P=Array.isArray(P)?P:[P];for(var Y=0;Y<P.length;++Y){if(z&&z.cause==F+","+Y)return;var te=P[Y],ce=te.inside,Me=!!te.lookbehind,Fe=!!te.greedy,We=te.alias;if(Fe&&!te.pattern.global){var rt=te.pattern.toString().match(/[imsuy]*$/)[0];te.pattern=RegExp(te.pattern.source,rt+"g")}for(var je=te.pattern||te,Ne=y.next,nt=N;Ne!==A.tail&&!(z&&nt>=z.reach);nt+=Ne.value.length,Ne=Ne.next){var ct=Ne.value;if(A.length>T.length)return;if(!(ct instanceof p)){var tt=1,q;if(Fe){if(q=v(je,nt,T,Me),!q||q.index>=T.length)break;var Nt=q.index,Ht=q.index+q[0].length,Rt=nt;for(Rt+=Ne.value.length;Nt>=Rt;)Ne=Ne.next,Rt+=Ne.value.length;if(Rt-=Ne.value.length,nt=Rt,Ne.value instanceof p)continue;for(var $t=Ne;$t!==A.tail&&(Rt<Ht||typeof $t.value=="string");$t=$t.next)tt++,Rt+=$t.value.length;tt--,ct=T.slice(nt,Rt),q.index-=nt}else if(q=v(je,0,ct,Me),!q)continue;var Nt=q.index,oe=q[0],he=ct.slice(0,Nt),J=ct.slice(Nt+oe.length),ee=nt+ct.length;z&&ee>z.reach&&(z.reach=ee);var Ce=Ne.prev;he&&(Ce=m(A,Ce,he),nt+=he.length),x(A,Ce,tt);var se=new p(F,ce?c.tokenize(oe,ce):oe,We,oe);if(Ne=m(A,Ce,se),J&&m(A,Ne,J),tt>1){var G={cause:F+","+Y,reach:ee};b(T,A,M,Ne.prev,nt,G),z&&G.reach>z.reach&&(z.reach=G.reach)}}}}}}function g(){var T={value:null,prev:null,next:null},A={value:null,prev:T,next:null};T.next=A,this.head=T,this.tail=A,this.length=0}function m(T,A,M){var y=A.next,N={value:M,prev:A,next:y};return A.next=N,y.prev=N,T.length++,N}function x(T,A,M){for(var y=A.next,N=0;N<M&&y!==T.tail;N++)y=y.next;A.next=y,y.prev=A,T.length-=N}function w(T){for(var A=[],M=T.head.next;M!==T.tail;)A.push(M.value),M=M.next;return A}if(!r.document)return r.addEventListener&&(c.disableWorkerMessageHandler||r.addEventListener("message",function(T){var A=JSON.parse(T.data),M=A.language,y=A.code,N=A.immediateClose;r.postMessage(c.highlight(y,c.languages[M],M)),N&&r.close()},!1)),c;var S=c.util.currentScript();S&&(c.filename=S.src,S.hasAttribute("data-manual")&&(c.manual=!0));function k(){c.manual||c.highlightAll()}if(!c.manual){var C=document.readyState;C==="loading"||C==="interactive"&&S&&S.defer?document.addEventListener("DOMContentLoaded",k):window.requestAnimationFrame?window.requestAnimationFrame(k):window.setTimeout(k,16)}return c}(e);t.exports&&(t.exports=n),typeof Bh<"u"&&(Bh.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(o,l){var h={};h["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[l]},h.cdata=/^<!\[CDATA\[|\]\]>$/i;var c={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:h}};c["language-"+l]={pattern:/[\s\S]+/,inside:n.languages[l]};var p={};p[o]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return o}),"i"),lookbehind:!0,greedy:!0,inside:c},n.languages.insertBefore("markup","cdata",p)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var l=r.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(S,k){return"✖ Error "+S+" while fetching file: "+k},l="✖ Error: File does not exist or is empty",h={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},c="data-src-status",p="loading",v="loaded",b="failed",g="pre[data-src]:not(["+c+'="'+v+'"]):not(['+c+'="'+p+'"])';function m(S,k,C){var T=new XMLHttpRequest;T.open("GET",S,!0),T.onreadystatechange=function(){T.readyState==4&&(T.status<400&&T.responseText?k(T.responseText):T.status>=400?C(o(T.status,T.statusText)):C(l))},T.send(null)}function x(S){var k=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(S||"");if(k){var C=Number(k[1]),T=k[2],A=k[3];return T?A?[C,Number(A)]:[C,void 0]:[C,C]}}n.hooks.add("before-highlightall",function(S){S.selector+=", "+g}),n.hooks.add("before-sanity-check",function(S){var k=S.element;if(k.matches(g)){S.code="",k.setAttribute(c,p);var C=k.appendChild(document.createElement("CODE"));C.textContent=r;var T=k.getAttribute("data-src"),A=S.language;if(A==="none"){var M=(/\.(\w+)$/.exec(T)||[,"none"])[1];A=h[M]||M}n.util.setLanguage(C,A),n.util.setLanguage(k,A);var y=n.plugins.autoloader;y&&y.loadLanguages(A),m(T,function(N){k.setAttribute(c,v);var z=x(k.getAttribute("data-range"));if(z){var F=N.split(/\r\n?|\n/g),P=z[0],Y=z[1]==null?F.length:z[1];P<0&&(P+=F.length),P=Math.max(0,Math.min(P-1,F.length)),Y<0&&(Y+=F.length),Y=Math.max(0,Math.min(Y,F.length)),N=F.slice(P,Y).join(`
`),k.hasAttribute("data-start")||k.setAttribute("data-start",String(P+1))}C.textContent=N,n.highlightElement(C)},function(N){k.setAttribute(c,b),C.textContent=N})}}),n.plugins.fileHighlight={highlight:function(k){for(var C=(k||document).querySelectorAll(g),T=0,A;A=C[T++];)n.highlightElement(A)}};var w=!1;n.fileHighlight=function(){w||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),w=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(b3);var Qk=b3.exports;const mg=vv(Qk);class $r{constructor(e,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=n,this.end=r}static range(e,n){return n?!e||!e.loc||!n.loc||e.loc.lexer!==n.loc.lexer?null:new $r(e.loc.lexer,e.loc.start,n.loc.end):e&&e.loc}}class ai{constructor(e,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=n}range(e,n){return new ai(n,$r.range(this,e))}}class Qe{constructor(e,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+e,o,l,h=n&&n.loc;if(h&&h.start<=h.end){var c=h.lexer.input;o=h.start,l=h.end,o===c.length?r+=" at end of input: ":r+=" at position "+(o+1)+": ";var p=c.slice(o,l).replace(/[^]/g,"$&̲"),v;o>15?v="…"+c.slice(o-15,o):v=c.slice(0,o);var b;l+15<c.length?b=c.slice(l,l+15)+"…":b=c.slice(l),r+=v+p+b}var g=new Error(r);return g.name="ParseError",g.__proto__=Qe.prototype,g.position=o,o!=null&&l!=null&&(g.length=l-o),g.rawMessage=e,g}}Qe.prototype.__proto__=Error.prototype;var eS=function(e,n){return e.indexOf(n)!==-1},tS=function(e,n){return e===void 0?n:e},nS=/([A-Z])/g,rS=function(e){return e.replace(nS,"-$1").toLowerCase()},iS={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},aS=/[&><"']/g;function oS(t){return String(t).replace(aS,e=>iS[e])}var y3=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},sS=function(e){var n=y3(e);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},lS=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},cS=function(e){var n=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},xt={contains:eS,deflt:tS,escape:oS,hyphenate:rS,getBaseElem:y3,isCharacterBox:sS,protocolFromUrl:cS},B0={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function uS(t){if(t.default)return t.default;var e=t.type,n=Array.isArray(e)?e[0]:e;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Jf{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var n in B0)if(B0.hasOwnProperty(n)){var r=B0[n];this[n]=e[n]!==void 0?r.processor?r.processor(e[n]):e[n]:uS(r)}}reportNonstrict(e,n,r){var o=this.strict;if(typeof o=="function"&&(o=o(e,n,r)),!(!o||o==="ignore")){if(o===!0||o==="error")throw new Qe("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+e+"]"),r);o==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+o+"': "+n+" ["+e+"]"))}}useStrictBehavior(e,n,r){var o=this.strict;if(typeof o=="function")try{o=o(e,n,r)}catch{o="error"}return!o||o==="ignore"?!1:o===!0||o==="error"?!0:o==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+o+"': "+n+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var n=xt.protocolFromUrl(e.url);if(n==null)return!1;e.protocol=n}var r=typeof this.trust=="function"?this.trust(e):this.trust;return!!r}}class Fa{constructor(e,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=n,this.cramped=r}sup(){return Bi[dS[this.id]]}sub(){return Bi[hS[this.id]]}fracNum(){return Bi[pS[this.id]]}fracDen(){return Bi[fS[this.id]]}cramp(){return Bi[mS[this.id]]}text(){return Bi[gS[this.id]]}isTight(){return this.size>=2}}var Qf=0,bc=1,as=2,xa=3,Hl=4,ti=5,us=6,Tr=7,Bi=[new Fa(Qf,0,!1),new Fa(bc,0,!0),new Fa(as,1,!1),new Fa(xa,1,!0),new Fa(Hl,2,!1),new Fa(ti,2,!0),new Fa(us,3,!1),new Fa(Tr,3,!0)],dS=[Hl,ti,Hl,ti,us,Tr,us,Tr],hS=[ti,ti,ti,ti,Tr,Tr,Tr,Tr],pS=[as,xa,Hl,ti,us,Tr,us,Tr],fS=[xa,xa,ti,ti,Tr,Tr,Tr,Tr],mS=[bc,bc,xa,xa,ti,ti,Tr,Tr],gS=[Qf,bc,as,xa,as,xa,as,xa],At={DISPLAY:Bi[Qf],TEXT:Bi[as],SCRIPT:Bi[Hl],SCRIPTSCRIPT:Bi[us]},dp=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function vS(t){for(var e=0;e<dp.length;e++)for(var n=dp[e],r=0;r<n.blocks.length;r++){var o=n.blocks[r];if(t>=o[0]&&t<=o[1])return n.name}return null}var F0=[];dp.forEach(t=>t.blocks.forEach(e=>F0.push(...e)));function w3(t){for(var e=0;e<F0.length;e+=2)if(t>=F0[e]&&t<=F0[e+1])return!0;return!1}var Go=80,bS=function(e,n){return"M95,"+(622+e+n)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+e/2.075+" -"+e+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+e)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},yS=function(e,n){return"M263,"+(601+e+n)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+e/2.084+" -"+e+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+e)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},wS=function(e,n){return"M983 "+(10+e+n)+`
l`+e/3.13+" -"+e+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},xS=function(e,n){return"M424,"+(2398+e+n)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+e)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+n+`
h400000v`+(40+e)+"h-400000z"},kS=function(e,n){return"M473,"+(2713+e+n)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+e)+" "+n+"h400000v"+(40+e)+"H1017.7z"},SS=function(e){var n=e/2;return"M400000 "+e+" H0 L"+n+" 0 l65 45 L145 "+(e-80)+" H400000z"},ES=function(e,n,r){var o=r-54-n-e;return"M702 "+(e+n)+"H400000"+(40+e)+`
H742v`+o+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+n+"H400000v"+(40+e)+"H742z"},TS=function(e,n,r){n=1e3*n;var o="";switch(e){case"sqrtMain":o=bS(n,Go);break;case"sqrtSize1":o=yS(n,Go);break;case"sqrtSize2":o=wS(n,Go);break;case"sqrtSize3":o=xS(n,Go);break;case"sqrtSize4":o=kS(n,Go);break;case"sqrtTall":o=ES(n,Go,r)}return o},AS=function(e,n){switch(e){case"⎜":return"M291 0 H417 V"+n+" H291z M291 0 H417 V"+n+" H291z";case"":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z";case"∥":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z"+("M367 0 H410 V"+n+" H367z M367 0 H410 V"+n+" H367z");case"⎟":return"M457 0 H583 V"+n+" H457z M457 0 H583 V"+n+" H457z";case"⎢":return"M319 0 H403 V"+n+" H319z M319 0 H403 V"+n+" H319z";case"⎥":return"M263 0 H347 V"+n+" H263z M263 0 H347 V"+n+" H263z";case"⎪":return"M384 0 H504 V"+n+" H384z M384 0 H504 V"+n+" H384z";case"⏐":return"M312 0 H355 V"+n+" H312z M312 0 H355 V"+n+" H312z";case"‖":return"M257 0 H300 V"+n+" H257z M257 0 H300 V"+n+" H257z"+("M478 0 H521 V"+n+" H478z M478 0 H521 V"+n+" H478z");default:return""}},gg={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},MS=function(e,n){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+n+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z
M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z
M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z
M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class Xl{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return xt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){for(var e="",n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e}toText(){var e=n=>n.toText();return this.children.map(e).join("")}}var ji={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},w0={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},vg={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function CS(t,e){ji[t]=e}function e1(t,e,n){if(!ji[e])throw new Error("Font metrics not found for font: "+e+".");var r=t.charCodeAt(0),o=ji[e][r];if(!o&&t[0]in vg&&(r=vg[t[0]].charCodeAt(0),o=ji[e][r]),!o&&n==="text"&&w3(r)&&(o=ji[e][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var ch={};function LS(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!ch[e]){var n=ch[e]={cssEmPerMu:w0.quad[e]/18};for(var r in w0)w0.hasOwnProperty(r)&&(n[r]=w0[r][e])}return ch[e]}var _S=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],bg=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],yg=function(e,n){return n.size<2?e:_S[e-1][n.size-1]};class ua{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||ua.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=bg[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return new ua(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:yg(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:bg[e-1]})}havingBaseStyle(e){e=e||this.style.text();var n=yg(ua.BASESIZE,e);return this.size===n&&this.textSize===ua.BASESIZE&&this.style===e?this:this.extend({style:e,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==ua.BASESIZE?["sizing","reset-size"+this.size,"size"+ua.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=LS(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ua.BASESIZE=6;var hp={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},NS={ex:!0,em:!0,mu:!0},x3=function(e){return typeof e!="string"&&(e=e.unit),e in hp||e in NS||e==="ex"},Dn=function(e,n){var r;if(e.unit in hp)r=hp[e.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(e.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var o;if(n.style.isTight()?o=n.havingStyle(n.style.text()):o=n,e.unit==="ex")r=o.fontMetrics().xHeight;else if(e.unit==="em")r=o.fontMetrics().quad;else throw new Qe("Invalid unit: '"+e.unit+"'");o!==n&&(r*=o.sizeMultiplier/n.sizeMultiplier)}return Math.min(e.number*r,n.maxSize)},ot=function(e){return+e.toFixed(4)+"em"},to=function(e){return e.filter(n=>n).join(" ")},k3=function(e,n,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var o=n.getColor();o&&(this.style.color=o)}},S3=function(e){var n=document.createElement(e);n.className=to(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(n.style[r]=this.style[r]);for(var o in this.attributes)this.attributes.hasOwnProperty(o)&&n.setAttribute(o,this.attributes[o]);for(var l=0;l<this.children.length;l++)n.appendChild(this.children[l].toNode());return n},DS=/[\s"'>/=\x00-\x1f]/,E3=function(e){var n="<"+e;this.classes.length&&(n+=' class="'+xt.escape(to(this.classes))+'"');var r="";for(var o in this.style)this.style.hasOwnProperty(o)&&(r+=xt.hyphenate(o)+":"+this.style[o]+";");r&&(n+=' style="'+xt.escape(r)+'"');for(var l in this.attributes)if(this.attributes.hasOwnProperty(l)){if(DS.test(l))throw new Qe("Invalid attribute name '"+l+"'");n+=" "+l+'="'+xt.escape(this.attributes[l])+'"'}n+=">";for(var h=0;h<this.children.length;h++)n+=this.children[h].toMarkup();return n+="</"+e+">",n};class Zl{constructor(e,n,r,o){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,k3.call(this,e,r,o),this.children=n||[]}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return xt.contains(this.classes,e)}toNode(){return S3.call(this,"span")}toMarkup(){return E3.call(this,"span")}}class t1{constructor(e,n,r,o){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,k3.call(this,n,o),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return xt.contains(this.classes,e)}toNode(){return S3.call(this,"a")}toMarkup(){return E3.call(this,"a")}}class RS{constructor(e,n,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return xt.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(e.style[n]=this.style[n]);return e}toMarkup(){var e='<img src="'+xt.escape(this.src)+'"'+(' alt="'+xt.escape(this.alt)+'"'),n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=xt.hyphenate(r)+":"+this.style[r]+";");return n&&(e+=' style="'+xt.escape(n)+'"'),e+="'/>",e}}var IS={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class ci{constructor(e,n,r,o,l,h,c,p){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=n||0,this.depth=r||0,this.italic=o||0,this.skew=l||0,this.width=h||0,this.classes=c||[],this.style=p||{},this.maxFontSize=0;var v=vS(this.text.charCodeAt(0));v&&this.classes.push(v+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=IS[this.text])}hasClass(e){return xt.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),n=null;this.italic>0&&(n=document.createElement("span"),n.style.marginRight=ot(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=to(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(n=n||document.createElement("span"),n.style[r]=this.style[r]);return n?(n.appendChild(e),n):e}toMarkup(){var e=!1,n="<span";this.classes.length&&(e=!0,n+=' class="',n+=xt.escape(to(this.classes)),n+='"');var r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(var o in this.style)this.style.hasOwnProperty(o)&&(r+=xt.hyphenate(o)+":"+this.style[o]+";");r&&(e=!0,n+=' style="'+xt.escape(r)+'"');var l=xt.escape(this.text);return e?(n+=">",n+=l,n+="</span>",n):l}}class Ca{constructor(e,n){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=n||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"svg");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)n.appendChild(this.children[o].toNode());return n}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="'+xt.escape(this.attributes[n])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>",e}}class no{constructor(e,n){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=n}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",gg[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+xt.escape(this.alternate)+'"/>':'<path d="'+xt.escape(gg[this.pathName])+'"/>'}}class pp{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"line");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var e="<line";for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="'+xt.escape(this.attributes[n])+'"');return e+="/>",e}}function wg(t){if(t instanceof ci)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function OS(t){if(t instanceof Zl)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}var HS={bin:1,close:1,inner:1,open:1,punct:1,rel:1},PS={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},xn={math:{},text:{}};function I(t,e,n,r,o,l){xn[t][o]={font:e,group:n,replace:r},l&&r&&(xn[t][r]=xn[t][o])}var H="math",Ve="text",$="main",re="ams",An="accent-token",ft="bin",Mr="close",fs="inner",Et="mathord",Kn="op-token",Xr="open",Qc="punct",ae="rel",Ra="spacing",ge="textord";I(H,$,ae,"≡","\\equiv",!0);I(H,$,ae,"≺","\\prec",!0);I(H,$,ae,"≻","\\succ",!0);I(H,$,ae,"","\\sim",!0);I(H,$,ae,"⊥","\\perp");I(H,$,ae,"⪯","\\preceq",!0);I(H,$,ae,"⪰","\\succeq",!0);I(H,$,ae,"≃","\\simeq",!0);I(H,$,ae,"","\\mid",!0);I(H,$,ae,"≪","\\ll",!0);I(H,$,ae,"≫","\\gg",!0);I(H,$,ae,"≍","\\asymp",!0);I(H,$,ae,"∥","\\parallel");I(H,$,ae,"⋈","\\bowtie",!0);I(H,$,ae,"⌣","\\smile",!0);I(H,$,ae,"⊑","\\sqsubseteq",!0);I(H,$,ae,"⊒","\\sqsupseteq",!0);I(H,$,ae,"≐","\\doteq",!0);I(H,$,ae,"⌢","\\frown",!0);I(H,$,ae,"∋","\\ni",!0);I(H,$,ae,"∝","\\propto",!0);I(H,$,ae,"⊢","\\vdash",!0);I(H,$,ae,"⊣","\\dashv",!0);I(H,$,ae,"∋","\\owns");I(H,$,Qc,".","\\ldotp");I(H,$,Qc,"⋅","\\cdotp");I(H,$,ge,"#","\\#");I(Ve,$,ge,"#","\\#");I(H,$,ge,"&","\\&");I(Ve,$,ge,"&","\\&");I(H,$,ge,"ℵ","\\aleph",!0);I(H,$,ge,"∀","\\forall",!0);I(H,$,ge,"ℏ","\\hbar",!0);I(H,$,ge,"∃","\\exists",!0);I(H,$,ge,"∇","\\nabla",!0);I(H,$,ge,"♭","\\flat",!0);I(H,$,ge,"","\\ell",!0);I(H,$,ge,"♮","\\natural",!0);I(H,$,ge,"♣","\\clubsuit",!0);I(H,$,ge,"℘","\\wp",!0);I(H,$,ge,"♯","\\sharp",!0);I(H,$,ge,"♢","\\diamondsuit",!0);I(H,$,ge,"","\\Re",!0);I(H,$,ge,"♡","\\heartsuit",!0);I(H,$,ge,"","\\Im",!0);I(H,$,ge,"♠","\\spadesuit",!0);I(H,$,ge,"§","\\S",!0);I(Ve,$,ge,"§","\\S");I(H,$,ge,"¶","\\P",!0);I(Ve,$,ge,"¶","\\P");I(H,$,ge,"†","\\dag");I(Ve,$,ge,"†","\\dag");I(Ve,$,ge,"†","\\textdagger");I(H,$,ge,"‡","\\ddag");I(Ve,$,ge,"‡","\\ddag");I(Ve,$,ge,"‡","\\textdaggerdbl");I(H,$,Mr,"⎱","\\rmoustache",!0);I(H,$,Xr,"⎰","\\lmoustache",!0);I(H,$,Mr,"⟯","\\rgroup",!0);I(H,$,Xr,"⟮","\\lgroup",!0);I(H,$,ft,"∓","\\mp",!0);I(H,$,ft,"⊖","\\ominus",!0);I(H,$,ft,"⊎","\\uplus",!0);I(H,$,ft,"⊓","\\sqcap",!0);I(H,$,ft,"","\\ast");I(H,$,ft,"⊔","\\sqcup",!0);I(H,$,ft,"◯","\\bigcirc",!0);I(H,$,ft,"∙","\\bullet",!0);I(H,$,ft,"‡","\\ddagger");I(H,$,ft,"≀","\\wr",!0);I(H,$,ft,"⨿","\\amalg");I(H,$,ft,"&","\\And");I(H,$,ae,"⟵","\\longleftarrow",!0);I(H,$,ae,"⇐","\\Leftarrow",!0);I(H,$,ae,"⟸","\\Longleftarrow",!0);I(H,$,ae,"⟶","\\longrightarrow",!0);I(H,$,ae,"⇒","\\Rightarrow",!0);I(H,$,ae,"⟹","\\Longrightarrow",!0);I(H,$,ae,"↔","\\leftrightarrow",!0);I(H,$,ae,"⟷","\\longleftrightarrow",!0);I(H,$,ae,"⇔","\\Leftrightarrow",!0);I(H,$,ae,"⟺","\\Longleftrightarrow",!0);I(H,$,ae,"↦","\\mapsto",!0);I(H,$,ae,"⟼","\\longmapsto",!0);I(H,$,ae,"↗","\\nearrow",!0);I(H,$,ae,"↩","\\hookleftarrow",!0);I(H,$,ae,"↪","\\hookrightarrow",!0);I(H,$,ae,"↘","\\searrow",!0);I(H,$,ae,"↼","\\leftharpoonup",!0);I(H,$,ae,"⇀","\\rightharpoonup",!0);I(H,$,ae,"↙","\\swarrow",!0);I(H,$,ae,"↽","\\leftharpoondown",!0);I(H,$,ae,"⇁","\\rightharpoondown",!0);I(H,$,ae,"↖","\\nwarrow",!0);I(H,$,ae,"⇌","\\rightleftharpoons",!0);I(H,re,ae,"≮","\\nless",!0);I(H,re,ae,"","\\@nleqslant");I(H,re,ae,"","\\@nleqq");I(H,re,ae,"⪇","\\lneq",!0);I(H,re,ae,"≨","\\lneqq",!0);I(H,re,ae,"","\\@lvertneqq");I(H,re,ae,"⋦","\\lnsim",!0);I(H,re,ae,"⪉","\\lnapprox",!0);I(H,re,ae,"⊀","\\nprec",!0);I(H,re,ae,"⋠","\\npreceq",!0);I(H,re,ae,"⋨","\\precnsim",!0);I(H,re,ae,"⪹","\\precnapprox",!0);I(H,re,ae,"≁","\\nsim",!0);I(H,re,ae,"","\\@nshortmid");I(H,re,ae,"∤","\\nmid",!0);I(H,re,ae,"⊬","\\nvdash",!0);I(H,re,ae,"⊭","\\nvDash",!0);I(H,re,ae,"⋪","\\ntriangleleft");I(H,re,ae,"⋬","\\ntrianglelefteq",!0);I(H,re,ae,"⊊","\\subsetneq",!0);I(H,re,ae,"","\\@varsubsetneq");I(H,re,ae,"⫋","\\subsetneqq",!0);I(H,re,ae,"","\\@varsubsetneqq");I(H,re,ae,"≯","\\ngtr",!0);I(H,re,ae,"","\\@ngeqslant");I(H,re,ae,"","\\@ngeqq");I(H,re,ae,"⪈","\\gneq",!0);I(H,re,ae,"≩","\\gneqq",!0);I(H,re,ae,"","\\@gvertneqq");I(H,re,ae,"⋧","\\gnsim",!0);I(H,re,ae,"⪊","\\gnapprox",!0);I(H,re,ae,"⊁","\\nsucc",!0);I(H,re,ae,"⋡","\\nsucceq",!0);I(H,re,ae,"⋩","\\succnsim",!0);I(H,re,ae,"⪺","\\succnapprox",!0);I(H,re,ae,"≆","\\ncong",!0);I(H,re,ae,"","\\@nshortparallel");I(H,re,ae,"∦","\\nparallel",!0);I(H,re,ae,"⊯","\\nVDash",!0);I(H,re,ae,"⋫","\\ntriangleright");I(H,re,ae,"⋭","\\ntrianglerighteq",!0);I(H,re,ae,"","\\@nsupseteqq");I(H,re,ae,"⊋","\\supsetneq",!0);I(H,re,ae,"","\\@varsupsetneq");I(H,re,ae,"⫌","\\supsetneqq",!0);I(H,re,ae,"","\\@varsupsetneqq");I(H,re,ae,"⊮","\\nVdash",!0);I(H,re,ae,"⪵","\\precneqq",!0);I(H,re,ae,"⪶","\\succneqq",!0);I(H,re,ae,"","\\@nsubseteqq");I(H,re,ft,"⊴","\\unlhd");I(H,re,ft,"⊵","\\unrhd");I(H,re,ae,"↚","\\nleftarrow",!0);I(H,re,ae,"↛","\\nrightarrow",!0);I(H,re,ae,"⇍","\\nLeftarrow",!0);I(H,re,ae,"⇏","\\nRightarrow",!0);I(H,re,ae,"↮","\\nleftrightarrow",!0);I(H,re,ae,"⇎","\\nLeftrightarrow",!0);I(H,re,ae,"△","\\vartriangle");I(H,re,ge,"ℏ","\\hslash");I(H,re,ge,"▽","\\triangledown");I(H,re,ge,"◊","\\lozenge");I(H,re,ge,"Ⓢ","\\circledS");I(H,re,ge,"®","\\circledR");I(Ve,re,ge,"®","\\circledR");I(H,re,ge,"∡","\\measuredangle",!0);I(H,re,ge,"∄","\\nexists");I(H,re,ge,"℧","\\mho");I(H,re,ge,"Ⅎ","\\Finv",!0);I(H,re,ge,"⅁","\\Game",!0);I(H,re,ge,"","\\backprime");I(H,re,ge,"▲","\\blacktriangle");I(H,re,ge,"▼","\\blacktriangledown");I(H,re,ge,"■","\\blacksquare");I(H,re,ge,"⧫","\\blacklozenge");I(H,re,ge,"★","\\bigstar");I(H,re,ge,"∢","\\sphericalangle",!0);I(H,re,ge,"∁","\\complement",!0);I(H,re,ge,"ð","\\eth",!0);I(Ve,$,ge,"ð","ð");I(H,re,ge,"","\\diagup");I(H,re,ge,"╲","\\diagdown");I(H,re,ge,"□","\\square");I(H,re,ge,"□","\\Box");I(H,re,ge,"◊","\\Diamond");I(H,re,ge,"¥","\\yen",!0);I(Ve,re,ge,"¥","\\yen",!0);I(H,re,ge,"✓","\\checkmark",!0);I(Ve,re,ge,"✓","\\checkmark");I(H,re,ge,"ℶ","\\beth",!0);I(H,re,ge,"ℸ","\\daleth",!0);I(H,re,ge,"ℷ","\\gimel",!0);I(H,re,ge,"ϝ","\\digamma",!0);I(H,re,ge,"ϰ","\\varkappa");I(H,re,Xr,"┌","\\@ulcorner",!0);I(H,re,Mr,"┐","\\@urcorner",!0);I(H,re,Xr,"└","\\@llcorner",!0);I(H,re,Mr,"┘","\\@lrcorner",!0);I(H,re,ae,"≦","\\leqq",!0);I(H,re,ae,"⩽","\\leqslant",!0);I(H,re,ae,"⪕","\\eqslantless",!0);I(H,re,ae,"≲","\\lesssim",!0);I(H,re,ae,"⪅","\\lessapprox",!0);I(H,re,ae,"≊","\\approxeq",!0);I(H,re,ft,"⋖","\\lessdot");I(H,re,ae,"⋘","\\lll",!0);I(H,re,ae,"≶","\\lessgtr",!0);I(H,re,ae,"⋚","\\lesseqgtr",!0);I(H,re,ae,"⪋","\\lesseqqgtr",!0);I(H,re,ae,"≑","\\doteqdot");I(H,re,ae,"≓","\\risingdotseq",!0);I(H,re,ae,"≒","\\fallingdotseq",!0);I(H,re,ae,"∽","\\backsim",!0);I(H,re,ae,"⋍","\\backsimeq",!0);I(H,re,ae,"⫅","\\subseteqq",!0);I(H,re,ae,"⋐","\\Subset",!0);I(H,re,ae,"⊏","\\sqsubset",!0);I(H,re,ae,"≼","\\preccurlyeq",!0);I(H,re,ae,"⋞","\\curlyeqprec",!0);I(H,re,ae,"≾","\\precsim",!0);I(H,re,ae,"⪷","\\precapprox",!0);I(H,re,ae,"⊲","\\vartriangleleft");I(H,re,ae,"⊴","\\trianglelefteq");I(H,re,ae,"⊨","\\vDash",!0);I(H,re,ae,"⊪","\\Vvdash",!0);I(H,re,ae,"⌣","\\smallsmile");I(H,re,ae,"⌢","\\smallfrown");I(H,re,ae,"≏","\\bumpeq",!0);I(H,re,ae,"≎","\\Bumpeq",!0);I(H,re,ae,"≧","\\geqq",!0);I(H,re,ae,"⩾","\\geqslant",!0);I(H,re,ae,"⪖","\\eqslantgtr",!0);I(H,re,ae,"≳","\\gtrsim",!0);I(H,re,ae,"⪆","\\gtrapprox",!0);I(H,re,ft,"⋗","\\gtrdot");I(H,re,ae,"⋙","\\ggg",!0);I(H,re,ae,"≷","\\gtrless",!0);I(H,re,ae,"⋛","\\gtreqless",!0);I(H,re,ae,"⪌","\\gtreqqless",!0);I(H,re,ae,"≖","\\eqcirc",!0);I(H,re,ae,"≗","\\circeq",!0);I(H,re,ae,"≜","\\triangleq",!0);I(H,re,ae,"","\\thicksim");I(H,re,ae,"≈","\\thickapprox");I(H,re,ae,"⫆","\\supseteqq",!0);I(H,re,ae,"⋑","\\Supset",!0);I(H,re,ae,"⊐","\\sqsupset",!0);I(H,re,ae,"≽","\\succcurlyeq",!0);I(H,re,ae,"⋟","\\curlyeqsucc",!0);I(H,re,ae,"≿","\\succsim",!0);I(H,re,ae,"⪸","\\succapprox",!0);I(H,re,ae,"⊳","\\vartriangleright");I(H,re,ae,"⊵","\\trianglerighteq");I(H,re,ae,"⊩","\\Vdash",!0);I(H,re,ae,"","\\shortmid");I(H,re,ae,"∥","\\shortparallel");I(H,re,ae,"≬","\\between",!0);I(H,re,ae,"⋔","\\pitchfork",!0);I(H,re,ae,"∝","\\varpropto");I(H,re,ae,"◀","\\blacktriangleleft");I(H,re,ae,"∴","\\therefore",!0);I(H,re,ae,"∍","\\backepsilon");I(H,re,ae,"▶","\\blacktriangleright");I(H,re,ae,"∵","\\because",!0);I(H,re,ae,"⋘","\\llless");I(H,re,ae,"⋙","\\gggtr");I(H,re,ft,"⊲","\\lhd");I(H,re,ft,"⊳","\\rhd");I(H,re,ae,"≂","\\eqsim",!0);I(H,$,ae,"⋈","\\Join");I(H,re,ae,"≑","\\Doteq",!0);I(H,re,ft,"∔","\\dotplus",!0);I(H,re,ft,"","\\smallsetminus");I(H,re,ft,"⋒","\\Cap",!0);I(H,re,ft,"⋓","\\Cup",!0);I(H,re,ft,"⩞","\\doublebarwedge",!0);I(H,re,ft,"⊟","\\boxminus",!0);I(H,re,ft,"⊞","\\boxplus",!0);I(H,re,ft,"⋇","\\divideontimes",!0);I(H,re,ft,"⋉","\\ltimes",!0);I(H,re,ft,"⋊","\\rtimes",!0);I(H,re,ft,"⋋","\\leftthreetimes",!0);I(H,re,ft,"⋌","\\rightthreetimes",!0);I(H,re,ft,"⋏","\\curlywedge",!0);I(H,re,ft,"⋎","\\curlyvee",!0);I(H,re,ft,"⊝","\\circleddash",!0);I(H,re,ft,"⊛","\\circledast",!0);I(H,re,ft,"⋅","\\centerdot");I(H,re,ft,"⊺","\\intercal",!0);I(H,re,ft,"⋒","\\doublecap");I(H,re,ft,"⋓","\\doublecup");I(H,re,ft,"⊠","\\boxtimes",!0);I(H,re,ae,"⇢","\\dashrightarrow",!0);I(H,re,ae,"⇠","\\dashleftarrow",!0);I(H,re,ae,"⇇","\\leftleftarrows",!0);I(H,re,ae,"⇆","\\leftrightarrows",!0);I(H,re,ae,"⇚","\\Lleftarrow",!0);I(H,re,ae,"↞","\\twoheadleftarrow",!0);I(H,re,ae,"↢","\\leftarrowtail",!0);I(H,re,ae,"↫","\\looparrowleft",!0);I(H,re,ae,"⇋","\\leftrightharpoons",!0);I(H,re,ae,"↶","\\curvearrowleft",!0);I(H,re,ae,"↺","\\circlearrowleft",!0);I(H,re,ae,"↰","\\Lsh",!0);I(H,re,ae,"⇈","\\upuparrows",!0);I(H,re,ae,"↿","\\upharpoonleft",!0);I(H,re,ae,"⇃","\\downharpoonleft",!0);I(H,$,ae,"⊶","\\origof",!0);I(H,$,ae,"⊷","\\imageof",!0);I(H,re,ae,"⊸","\\multimap",!0);I(H,re,ae,"↭","\\leftrightsquigarrow",!0);I(H,re,ae,"⇉","\\rightrightarrows",!0);I(H,re,ae,"⇄","\\rightleftarrows",!0);I(H,re,ae,"↠","\\twoheadrightarrow",!0);I(H,re,ae,"↣","\\rightarrowtail",!0);I(H,re,ae,"↬","\\looparrowright",!0);I(H,re,ae,"↷","\\curvearrowright",!0);I(H,re,ae,"↻","\\circlearrowright",!0);I(H,re,ae,"↱","\\Rsh",!0);I(H,re,ae,"⇊","\\downdownarrows",!0);I(H,re,ae,"↾","\\upharpoonright",!0);I(H,re,ae,"⇂","\\downharpoonright",!0);I(H,re,ae,"⇝","\\rightsquigarrow",!0);I(H,re,ae,"⇝","\\leadsto");I(H,re,ae,"⇛","\\Rrightarrow",!0);I(H,re,ae,"↾","\\restriction");I(H,$,ge,"","`");I(H,$,ge,"$","\\$");I(Ve,$,ge,"$","\\$");I(Ve,$,ge,"$","\\textdollar");I(H,$,ge,"%","\\%");I(Ve,$,ge,"%","\\%");I(H,$,ge,"_","\\_");I(Ve,$,ge,"_","\\_");I(Ve,$,ge,"_","\\textunderscore");I(H,$,ge,"∠","\\angle",!0);I(H,$,ge,"∞","\\infty",!0);I(H,$,ge,"","\\prime");I(H,$,ge,"△","\\triangle");I(H,$,ge,"Γ","\\Gamma",!0);I(H,$,ge,"Δ","\\Delta",!0);I(H,$,ge,"Θ","\\Theta",!0);I(H,$,ge,"Λ","\\Lambda",!0);I(H,$,ge,"Ξ","\\Xi",!0);I(H,$,ge,"Π","\\Pi",!0);I(H,$,ge,"Σ","\\Sigma",!0);I(H,$,ge,"Υ","\\Upsilon",!0);I(H,$,ge,"Φ","\\Phi",!0);I(H,$,ge,"Ψ","\\Psi",!0);I(H,$,ge,"Ω","\\Omega",!0);I(H,$,ge,"A","Α");I(H,$,ge,"B","Β");I(H,$,ge,"E","Ε");I(H,$,ge,"Z","Ζ");I(H,$,ge,"H","Η");I(H,$,ge,"I","Ι");I(H,$,ge,"K","Κ");I(H,$,ge,"M","Μ");I(H,$,ge,"N","Ν");I(H,$,ge,"O","Ο");I(H,$,ge,"P","Ρ");I(H,$,ge,"T","Τ");I(H,$,ge,"X","Χ");I(H,$,ge,"¬","\\neg",!0);I(H,$,ge,"¬","\\lnot");I(H,$,ge,"","\\top");I(H,$,ge,"⊥","\\bot");I(H,$,ge,"∅","\\emptyset");I(H,re,ge,"∅","\\varnothing");I(H,$,Et,"α","\\alpha",!0);I(H,$,Et,"β","\\beta",!0);I(H,$,Et,"γ","\\gamma",!0);I(H,$,Et,"δ","\\delta",!0);I(H,$,Et,"ϵ","\\epsilon",!0);I(H,$,Et,"ζ","\\zeta",!0);I(H,$,Et,"η","\\eta",!0);I(H,$,Et,"θ","\\theta",!0);I(H,$,Et,"ι","\\iota",!0);I(H,$,Et,"κ","\\kappa",!0);I(H,$,Et,"λ","\\lambda",!0);I(H,$,Et,"μ","\\mu",!0);I(H,$,Et,"ν","\\nu",!0);I(H,$,Et,"ξ","\\xi",!0);I(H,$,Et,"ο","\\omicron",!0);I(H,$,Et,"π","\\pi",!0);I(H,$,Et,"ρ","\\rho",!0);I(H,$,Et,"σ","\\sigma",!0);I(H,$,Et,"τ","\\tau",!0);I(H,$,Et,"υ","\\upsilon",!0);I(H,$,Et,"ϕ","\\phi",!0);I(H,$,Et,"χ","\\chi",!0);I(H,$,Et,"ψ","\\psi",!0);I(H,$,Et,"ω","\\omega",!0);I(H,$,Et,"ε","\\varepsilon",!0);I(H,$,Et,"ϑ","\\vartheta",!0);I(H,$,Et,"ϖ","\\varpi",!0);I(H,$,Et,"ϱ","\\varrho",!0);I(H,$,Et,"ς","\\varsigma",!0);I(H,$,Et,"φ","\\varphi",!0);I(H,$,ft,"","*",!0);I(H,$,ft,"+","+");I(H,$,ft,"","-",!0);I(H,$,ft,"⋅","\\cdot",!0);I(H,$,ft,"∘","\\circ",!0);I(H,$,ft,"÷","\\div",!0);I(H,$,ft,"±","\\pm",!0);I(H,$,ft,"×","\\times",!0);I(H,$,ft,"∩","\\cap",!0);I(H,$,ft,"","\\cup",!0);I(H,$,ft,"","\\setminus",!0);I(H,$,ft,"∧","\\land");I(H,$,ft,"","\\lor");I(H,$,ft,"∧","\\wedge",!0);I(H,$,ft,"","\\vee",!0);I(H,$,ge,"√","\\surd");I(H,$,Xr,"⟨","\\langle",!0);I(H,$,Xr,"","\\lvert");I(H,$,Xr,"∥","\\lVert");I(H,$,Mr,"?","?");I(H,$,Mr,"!","!");I(H,$,Mr,"⟩","\\rangle",!0);I(H,$,Mr,"","\\rvert");I(H,$,Mr,"∥","\\rVert");I(H,$,ae,"=","=");I(H,$,ae,":",":");I(H,$,ae,"≈","\\approx",!0);I(H,$,ae,"≅","\\cong",!0);I(H,$,ae,"≥","\\ge");I(H,$,ae,"≥","\\geq",!0);I(H,$,ae,"←","\\gets");I(H,$,ae,">","\\gt",!0);I(H,$,ae,"∈","\\in",!0);I(H,$,ae,"","\\@not");I(H,$,ae,"⊂","\\subset",!0);I(H,$,ae,"⊃","\\supset",!0);I(H,$,ae,"⊆","\\subseteq",!0);I(H,$,ae,"⊇","\\supseteq",!0);I(H,re,ae,"⊈","\\nsubseteq",!0);I(H,re,ae,"⊉","\\nsupseteq",!0);I(H,$,ae,"⊨","\\models");I(H,$,ae,"←","\\leftarrow",!0);I(H,$,ae,"≤","\\le");I(H,$,ae,"≤","\\leq",!0);I(H,$,ae,"<","\\lt",!0);I(H,$,ae,"→","\\rightarrow",!0);I(H,$,ae,"→","\\to");I(H,re,ae,"≱","\\ngeq",!0);I(H,re,ae,"≰","\\nleq",!0);I(H,$,Ra," ","\\ ");I(H,$,Ra," ","\\space");I(H,$,Ra," ","\\nobreakspace");I(Ve,$,Ra," ","\\ ");I(Ve,$,Ra," "," ");I(Ve,$,Ra," ","\\space");I(Ve,$,Ra," ","\\nobreakspace");I(H,$,Ra,null,"\\nobreak");I(H,$,Ra,null,"\\allowbreak");I(H,$,Qc,",",",");I(H,$,Qc,";",";");I(H,re,ft,"⊼","\\barwedge",!0);I(H,re,ft,"⊻","\\veebar",!0);I(H,$,ft,"⊙","\\odot",!0);I(H,$,ft,"⊕","\\oplus",!0);I(H,$,ft,"⊗","\\otimes",!0);I(H,$,ge,"∂","\\partial",!0);I(H,$,ft,"⊘","\\oslash",!0);I(H,re,ft,"⊚","\\circledcirc",!0);I(H,re,ft,"⊡","\\boxdot",!0);I(H,$,ft,"△","\\bigtriangleup");I(H,$,ft,"▽","\\bigtriangledown");I(H,$,ft,"†","\\dagger");I(H,$,ft,"⋄","\\diamond");I(H,$,ft,"⋆","\\star");I(H,$,ft,"◃","\\triangleleft");I(H,$,ft,"▹","\\triangleright");I(H,$,Xr,"{","\\{");I(Ve,$,ge,"{","\\{");I(Ve,$,ge,"{","\\textbraceleft");I(H,$,Mr,"}","\\}");I(Ve,$,ge,"}","\\}");I(Ve,$,ge,"}","\\textbraceright");I(H,$,Xr,"{","\\lbrace");I(H,$,Mr,"}","\\rbrace");I(H,$,Xr,"[","\\lbrack",!0);I(Ve,$,ge,"[","\\lbrack",!0);I(H,$,Mr,"]","\\rbrack",!0);I(Ve,$,ge,"]","\\rbrack",!0);I(H,$,Xr,"(","\\lparen",!0);I(H,$,Mr,")","\\rparen",!0);I(Ve,$,ge,"<","\\textless",!0);I(Ve,$,ge,">","\\textgreater",!0);I(H,$,Xr,"⌊","\\lfloor",!0);I(H,$,Mr,"⌋","\\rfloor",!0);I(H,$,Xr,"⌈","\\lceil",!0);I(H,$,Mr,"⌉","\\rceil",!0);I(H,$,ge,"\\","\\backslash");I(H,$,ge,"","|");I(H,$,ge,"","\\vert");I(Ve,$,ge,"|","\\textbar",!0);I(H,$,ge,"∥","\\|");I(H,$,ge,"∥","\\Vert");I(Ve,$,ge,"∥","\\textbardbl");I(Ve,$,ge,"~","\\textasciitilde");I(Ve,$,ge,"\\","\\textbackslash");I(Ve,$,ge,"^","\\textasciicircum");I(H,$,ae,"↑","\\uparrow",!0);I(H,$,ae,"⇑","\\Uparrow",!0);I(H,$,ae,"↓","\\downarrow",!0);I(H,$,ae,"⇓","\\Downarrow",!0);I(H,$,ae,"↕","\\updownarrow",!0);I(H,$,ae,"⇕","\\Updownarrow",!0);I(H,$,Kn,"∐","\\coprod");I(H,$,Kn,"","\\bigvee");I(H,$,Kn,"⋀","\\bigwedge");I(H,$,Kn,"⨄","\\biguplus");I(H,$,Kn,"⋂","\\bigcap");I(H,$,Kn,"","\\bigcup");I(H,$,Kn,"∫","\\int");I(H,$,Kn,"∫","\\intop");I(H,$,Kn,"∬","\\iint");I(H,$,Kn,"∭","\\iiint");I(H,$,Kn,"∏","\\prod");I(H,$,Kn,"∑","\\sum");I(H,$,Kn,"⨂","\\bigotimes");I(H,$,Kn,"⨁","\\bigoplus");I(H,$,Kn,"⨀","\\bigodot");I(H,$,Kn,"∮","\\oint");I(H,$,Kn,"∯","\\oiint");I(H,$,Kn,"∰","\\oiiint");I(H,$,Kn,"⨆","\\bigsqcup");I(H,$,Kn,"∫","\\smallint");I(Ve,$,fs,"…","\\textellipsis");I(H,$,fs,"…","\\mathellipsis");I(Ve,$,fs,"…","\\ldots",!0);I(H,$,fs,"…","\\ldots",!0);I(H,$,fs,"⋯","\\@cdots",!0);I(H,$,fs,"⋱","\\ddots",!0);I(H,$,ge,"⋮","\\varvdots");I(Ve,$,ge,"⋮","\\varvdots");I(H,$,An,"ˊ","\\acute");I(H,$,An,"ˋ","\\grave");I(H,$,An,"¨","\\ddot");I(H,$,An,"~","\\tilde");I(H,$,An,"ˉ","\\bar");I(H,$,An,"˘","\\breve");I(H,$,An,"ˇ","\\check");I(H,$,An,"^","\\hat");I(H,$,An,"⃗","\\vec");I(H,$,An,"˙","\\dot");I(H,$,An,"˚","\\mathring");I(H,$,Et,"","\\@imath");I(H,$,Et,"","\\@jmath");I(H,$,ge,"ı","ı");I(H,$,ge,"ȷ","ȷ");I(Ve,$,ge,"ı","\\i",!0);I(Ve,$,ge,"ȷ","\\j",!0);I(Ve,$,ge,"ß","\\ss",!0);I(Ve,$,ge,"æ","\\ae",!0);I(Ve,$,ge,"œ","\\oe",!0);I(Ve,$,ge,"ø","\\o",!0);I(Ve,$,ge,"Æ","\\AE",!0);I(Ve,$,ge,"Œ","\\OE",!0);I(Ve,$,ge,"Ø","\\O",!0);I(Ve,$,An,"ˊ","\\'");I(Ve,$,An,"ˋ","\\`");I(Ve,$,An,"ˆ","\\^");I(Ve,$,An,"˜","\\~");I(Ve,$,An,"ˉ","\\=");I(Ve,$,An,"˘","\\u");I(Ve,$,An,"˙","\\.");I(Ve,$,An,"¸","\\c");I(Ve,$,An,"˚","\\r");I(Ve,$,An,"ˇ","\\v");I(Ve,$,An,"¨",'\\"');I(Ve,$,An,"˝","\\H");I(Ve,$,An,"◯","\\textcircled");var T3={"--":!0,"---":!0,"``":!0,"''":!0};I(Ve,$,ge,"","--",!0);I(Ve,$,ge,"","\\textendash");I(Ve,$,ge,"—","---",!0);I(Ve,$,ge,"—","\\textemdash");I(Ve,$,ge,"","`",!0);I(Ve,$,ge,"","\\textquoteleft");I(Ve,$,ge,"","'",!0);I(Ve,$,ge,"","\\textquoteright");I(Ve,$,ge,"“","``",!0);I(Ve,$,ge,"“","\\textquotedblleft");I(Ve,$,ge,"”","''",!0);I(Ve,$,ge,"”","\\textquotedblright");I(H,$,ge,"°","\\degree",!0);I(Ve,$,ge,"°","\\degree");I(Ve,$,ge,"°","\\textdegree",!0);I(H,$,ge,"£","\\pounds");I(H,$,ge,"£","\\mathsterling",!0);I(Ve,$,ge,"£","\\pounds");I(Ve,$,ge,"£","\\textsterling",!0);I(H,re,ge,"✠","\\maltese");I(Ve,re,ge,"✠","\\maltese");var xg='0123456789/@."';for(var uh=0;uh<xg.length;uh++){var kg=xg.charAt(uh);I(H,$,ge,kg,kg)}var Sg='0123456789!@*()-=+";:?/.,';for(var dh=0;dh<Sg.length;dh++){var Eg=Sg.charAt(dh);I(Ve,$,ge,Eg,Eg)}var yc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var hh=0;hh<yc.length;hh++){var x0=yc.charAt(hh);I(H,$,Et,x0,x0),I(Ve,$,ge,x0,x0)}I(H,re,ge,"C","");I(Ve,re,ge,"C","");I(H,re,ge,"H","");I(Ve,re,ge,"H","");I(H,re,ge,"N","");I(Ve,re,ge,"N","");I(H,re,ge,"P","");I(Ve,re,ge,"P","");I(H,re,ge,"Q","");I(Ve,re,ge,"Q","");I(H,re,ge,"R","");I(Ve,re,ge,"R","");I(H,re,ge,"Z","");I(Ve,re,ge,"Z","");I(H,$,Et,"h","");I(Ve,$,Et,"h","");var _t="";for(var vr=0;vr<yc.length;vr++){var On=yc.charAt(vr);_t=String.fromCharCode(55349,56320+vr),I(H,$,Et,On,_t),I(Ve,$,ge,On,_t),_t=String.fromCharCode(55349,56372+vr),I(H,$,Et,On,_t),I(Ve,$,ge,On,_t),_t=String.fromCharCode(55349,56424+vr),I(H,$,Et,On,_t),I(Ve,$,ge,On,_t),_t=String.fromCharCode(55349,56580+vr),I(H,$,Et,On,_t),I(Ve,$,ge,On,_t),_t=String.fromCharCode(55349,56684+vr),I(H,$,Et,On,_t),I(Ve,$,ge,On,_t),_t=String.fromCharCode(55349,56736+vr),I(H,$,Et,On,_t),I(Ve,$,ge,On,_t),_t=String.fromCharCode(55349,56788+vr),I(H,$,Et,On,_t),I(Ve,$,ge,On,_t),_t=String.fromCharCode(55349,56840+vr),I(H,$,Et,On,_t),I(Ve,$,ge,On,_t),_t=String.fromCharCode(55349,56944+vr),I(H,$,Et,On,_t),I(Ve,$,ge,On,_t),vr<26&&(_t=String.fromCharCode(55349,56632+vr),I(H,$,Et,On,_t),I(Ve,$,ge,On,_t),_t=String.fromCharCode(55349,56476+vr),I(H,$,Et,On,_t),I(Ve,$,ge,On,_t))}_t=String.fromCharCode(55349,56668);I(H,$,Et,"k",_t);I(Ve,$,ge,"k",_t);for(var Mo=0;Mo<10;Mo++){var qa=Mo.toString();_t=String.fromCharCode(55349,57294+Mo),I(H,$,Et,qa,_t),I(Ve,$,ge,qa,_t),_t=String.fromCharCode(55349,57314+Mo),I(H,$,Et,qa,_t),I(Ve,$,ge,qa,_t),_t=String.fromCharCode(55349,57324+Mo),I(H,$,Et,qa,_t),I(Ve,$,ge,qa,_t),_t=String.fromCharCode(55349,57334+Mo),I(H,$,Et,qa,_t),I(Ve,$,ge,qa,_t)}var fp="ÐÞþ";for(var ph=0;ph<fp.length;ph++){var k0=fp.charAt(ph);I(H,$,Et,k0,k0),I(Ve,$,ge,k0,k0)}var S0=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Tg=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],zS=function(e,n){var r=e.charCodeAt(0),o=e.charCodeAt(1),l=(r-55296)*1024+(o-56320)+65536,h=n==="math"?0:1;if(119808<=l&&l<120484){var c=Math.floor((l-119808)/26);return[S0[c][2],S0[c][h]]}else if(120782<=l&&l<=120831){var p=Math.floor((l-120782)/10);return[Tg[p][2],Tg[p][h]]}else{if(l===120485||l===120486)return[S0[0][2],S0[0][h]];if(120486<l&&l<120782)return["",""];throw new Qe("Unsupported character: "+e)}},eu=function(e,n,r){return xn[r][e]&&xn[r][e].replace&&(e=xn[r][e].replace),{value:e,metrics:e1(e,n,r)}},yi=function(e,n,r,o,l){var h=eu(e,n,r),c=h.metrics;e=h.value;var p;if(c){var v=c.italic;(r==="text"||o&&o.font==="mathit")&&(v=0),p=new ci(e,c.height,c.depth,v,c.skew,c.width,l)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+e+"' in style '"+n+"' and mode '"+r+"'")),p=new ci(e,0,0,0,0,0,l);if(o){p.maxFontSize=o.sizeMultiplier,o.style.isTight()&&p.classes.push("mtight");var b=o.getColor();b&&(p.style.color=b)}return p},BS=function(e,n,r,o){return o===void 0&&(o=[]),r.font==="boldsymbol"&&eu(e,"Main-Bold",n).metrics?yi(e,"Main-Bold",n,r,o.concat(["mathbf"])):e==="\\"||xn[n][e].font==="main"?yi(e,"Main-Regular",n,r,o):yi(e,"AMS-Regular",n,r,o.concat(["amsrm"]))},FS=function(e,n,r,o,l){return l!=="textord"&&eu(e,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},qS=function(e,n,r){var o=e.mode,l=e.text,h=["mord"],c=o==="math"||o==="text"&&n.font,p=c?n.font:n.fontFamily,v="",b="";if(l.charCodeAt(0)===55349&&([v,b]=zS(l,o)),v.length>0)return yi(l,v,o,n,h.concat(b));if(p){var g,m;if(p==="boldsymbol"){var x=FS(l,o,n,h,r);g=x.fontName,m=[x.fontClass]}else c?(g=C3[p].fontName,m=[p]):(g=E0(p,n.fontWeight,n.fontShape),m=[p,n.fontWeight,n.fontShape]);if(eu(l,g,o).metrics)return yi(l,g,o,n,h.concat(m));if(T3.hasOwnProperty(l)&&g.slice(0,10)==="Typewriter"){for(var w=[],S=0;S<l.length;S++)w.push(yi(l[S],g,o,n,h.concat(m)));return M3(w)}}if(r==="mathord")return yi(l,"Math-Italic",o,n,h.concat(["mathnormal"]));if(r==="textord"){var k=xn[o][l]&&xn[o][l].font;if(k==="ams"){var C=E0("amsrm",n.fontWeight,n.fontShape);return yi(l,C,o,n,h.concat("amsrm",n.fontWeight,n.fontShape))}else if(k==="main"||!k){var T=E0("textrm",n.fontWeight,n.fontShape);return yi(l,T,o,n,h.concat(n.fontWeight,n.fontShape))}else{var A=E0(k,n.fontWeight,n.fontShape);return yi(l,A,o,n,h.concat(A,n.fontWeight,n.fontShape))}}else throw new Error("unexpected type: "+r+" in makeOrd")},jS=(t,e)=>{if(to(t.classes)!==to(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var n=t.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r in t.style)if(t.style.hasOwnProperty(r)&&t.style[r]!==e.style[r])return!1;for(var o in e.style)if(e.style.hasOwnProperty(o)&&t.style[o]!==e.style[o])return!1;return!0},$S=t=>{for(var e=0;e<t.length-1;e++){var n=t[e],r=t[e+1];n instanceof ci&&r instanceof ci&&jS(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,t.splice(e+1,1),e--)}return t},n1=function(e){for(var n=0,r=0,o=0,l=0;l<e.children.length;l++){var h=e.children[l];h.height>n&&(n=h.height),h.depth>r&&(r=h.depth),h.maxFontSize>o&&(o=h.maxFontSize)}e.height=n,e.depth=r,e.maxFontSize=o},_r=function(e,n,r,o){var l=new Zl(e,n,r,o);return n1(l),l},A3=(t,e,n,r)=>new Zl(t,e,n,r),US=function(e,n,r){var o=_r([e],[],n);return o.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),o.style.borderBottomWidth=ot(o.height),o.maxFontSize=1,o},VS=function(e,n,r,o){var l=new t1(e,n,r,o);return n1(l),l},M3=function(e){var n=new Xl(e);return n1(n),n},WS=function(e,n){return e instanceof Xl?_r([],[e],n):e},GS=function(e){if(e.positionType==="individualShift"){for(var n=e.children,r=[n[0]],o=-n[0].shift-n[0].elem.depth,l=o,h=1;h<n.length;h++){var c=-n[h].shift-l-n[h].elem.depth,p=c-(n[h-1].elem.height+n[h-1].elem.depth);l=l+c,r.push({type:"kern",size:p}),r.push(n[h])}return{children:r,depth:o}}var v;if(e.positionType==="top"){for(var b=e.positionData,g=0;g<e.children.length;g++){var m=e.children[g];b-=m.type==="kern"?m.size:m.elem.height+m.elem.depth}v=b}else if(e.positionType==="bottom")v=-e.positionData;else{var x=e.children[0];if(x.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")v=-x.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")v=-x.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:v}},KS=function(e,n){for(var{children:r,depth:o}=GS(e),l=0,h=0;h<r.length;h++){var c=r[h];if(c.type==="elem"){var p=c.elem;l=Math.max(l,p.maxFontSize,p.height)}}l+=2;var v=_r(["pstrut"],[]);v.style.height=ot(l);for(var b=[],g=o,m=o,x=o,w=0;w<r.length;w++){var S=r[w];if(S.type==="kern")x+=S.size;else{var k=S.elem,C=S.wrapperClasses||[],T=S.wrapperStyle||{},A=_r(C,[v,k],void 0,T);A.style.top=ot(-l-x-k.depth),S.marginLeft&&(A.style.marginLeft=S.marginLeft),S.marginRight&&(A.style.marginRight=S.marginRight),b.push(A),x+=k.height+k.depth}g=Math.min(g,x),m=Math.max(m,x)}var M=_r(["vlist"],b);M.style.height=ot(m);var y;if(g<0){var N=_r([],[]),z=_r(["vlist"],[N]);z.style.height=ot(-g);var F=_r(["vlist-s"],[new ci("")]);y=[_r(["vlist-r"],[M,F]),_r(["vlist-r"],[z])]}else y=[_r(["vlist-r"],[M])];var P=_r(["vlist-t"],y);return y.length===2&&P.classes.push("vlist-t2"),P.height=m,P.depth=-g,P},XS=(t,e)=>{var n=_r(["mspace"],[],e),r=Dn(t,e);return n.style.marginRight=ot(r),n},E0=function(e,n,r){var o="";switch(e){case"amsrm":o="AMS";break;case"textrm":o="Main";break;case"textsf":o="SansSerif";break;case"texttt":o="Typewriter";break;default:o=e}var l;return n==="textbf"&&r==="textit"?l="BoldItalic":n==="textbf"?l="Bold":n==="textit"?l="Italic":l="Regular",o+"-"+l},C3={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},L3={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ZS=function(e,n){var[r,o,l]=L3[e],h=new no(r),c=new Ca([h],{width:ot(o),height:ot(l),style:"width:"+ot(o),viewBox:"0 0 "+1e3*o+" "+1e3*l,preserveAspectRatio:"xMinYMin"}),p=A3(["overlay"],[c],n);return p.height=l,p.style.height=ot(l),p.style.width=ot(o),p},Ee={fontMap:C3,makeSymbol:yi,mathsym:BS,makeSpan:_r,makeSvgSpan:A3,makeLineSpan:US,makeAnchor:VS,makeFragment:M3,wrapFragment:WS,makeVList:KS,makeOrd:qS,makeGlue:XS,staticSvg:ZS,svgData:L3,tryCombineChars:$S},_n={number:3,unit:"mu"},Co={number:4,unit:"mu"},sa={number:5,unit:"mu"},YS={mord:{mop:_n,mbin:Co,mrel:sa,minner:_n},mop:{mord:_n,mop:_n,mrel:sa,minner:_n},mbin:{mord:Co,mop:Co,mopen:Co,minner:Co},mrel:{mord:sa,mop:sa,mopen:sa,minner:sa},mopen:{},mclose:{mop:_n,mbin:Co,mrel:sa,minner:_n},mpunct:{mord:_n,mop:_n,mrel:sa,mopen:_n,mclose:_n,mpunct:_n,minner:_n},minner:{mord:_n,mop:_n,mbin:Co,mrel:sa,mopen:_n,mpunct:_n,minner:_n}},JS={mord:{mop:_n},mop:{mord:_n,mop:_n},mbin:{},mrel:{},mopen:{},mclose:{mop:_n},mpunct:{},minner:{mop:_n}},_3={},wc={},xc={};function ht(t){for(var{type:e,names:n,props:r,handler:o,htmlBuilder:l,mathmlBuilder:h}=t,c={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:o},p=0;p<n.length;++p)_3[n[p]]=c;e&&(l&&(wc[e]=l),h&&(xc[e]=h))}function jo(t){var{type:e,htmlBuilder:n,mathmlBuilder:r}=t;ht({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var kc=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},qn=function(e){return e.type==="ordgroup"?e.body:[e]},La=Ee.makeSpan,QS=["leftmost","mbin","mopen","mrel","mop","mpunct"],eE=["rightmost","mrel","mclose","mpunct"],tE={display:At.DISPLAY,text:At.TEXT,script:At.SCRIPT,scriptscript:At.SCRIPTSCRIPT},nE={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Qn=function(e,n,r,o){o===void 0&&(o=[null,null]);for(var l=[],h=0;h<e.length;h++){var c=Yt(e[h],n);if(c instanceof Xl){var p=c.children;l.push(...p)}else l.push(c)}if(Ee.tryCombineChars(l),!r)return l;var v=n;if(e.length===1){var b=e[0];b.type==="sizing"?v=n.havingSize(b.size):b.type==="styling"&&(v=n.havingStyle(tE[b.style]))}var g=La([o[0]||"leftmost"],[],n),m=La([o[1]||"rightmost"],[],n),x=r==="root";return Ag(l,(w,S)=>{var k=S.classes[0],C=w.classes[0];k==="mbin"&&xt.contains(eE,C)?S.classes[0]="mord":C==="mbin"&&xt.contains(QS,k)&&(w.classes[0]="mord")},{node:g},m,x),Ag(l,(w,S)=>{var k=mp(S),C=mp(w),T=k&&C?w.hasClass("mtight")?JS[k][C]:YS[k][C]:null;if(T)return Ee.makeGlue(T,v)},{node:g},m,x),l},Ag=function t(e,n,r,o,l){o&&e.push(o);for(var h=0;h<e.length;h++){var c=e[h],p=N3(c);if(p){t(p.children,n,r,null,l);continue}var v=!c.hasClass("mspace");if(v){var b=n(c,r.node);b&&(r.insertAfter?r.insertAfter(b):(e.unshift(b),h++))}v?r.node=c:l&&c.hasClass("newline")&&(r.node=La(["leftmost"])),r.insertAfter=(g=>m=>{e.splice(g+1,0,m),h++})(h)}o&&e.pop()},N3=function(e){return e instanceof Xl||e instanceof t1||e instanceof Zl&&e.hasClass("enclosing")?e:null},rE=function t(e,n){var r=N3(e);if(r){var o=r.children;if(o.length){if(n==="right")return t(o[o.length-1],"right");if(n==="left")return t(o[0],"left")}}return e},mp=function(e,n){return e?(n&&(e=rE(e,n)),nE[e.classes[0]]||null):null},Pl=function(e,n){var r=["nulldelimiter"].concat(e.baseSizingClasses());return La(n.concat(r))},Yt=function(e,n,r){if(!e)return La();if(wc[e.type]){var o=wc[e.type](e,n);if(r&&n.size!==r.size){o=La(n.sizingClasses(r),[o],n);var l=n.sizeMultiplier/r.sizeMultiplier;o.height*=l,o.depth*=l}return o}else throw new Qe("Got group of unknown type: '"+e.type+"'")};function T0(t,e){var n=La(["base"],t,e),r=La(["strut"]);return r.style.height=ot(n.height+n.depth),n.depth&&(r.style.verticalAlign=ot(-n.depth)),n.children.unshift(r),n}function gp(t,e){var n=null;t.length===1&&t[0].type==="tag"&&(n=t[0].tag,t=t[0].body);var r=Qn(t,e,"root"),o;r.length===2&&r[1].hasClass("tag")&&(o=r.pop());for(var l=[],h=[],c=0;c<r.length;c++)if(h.push(r[c]),r[c].hasClass("mbin")||r[c].hasClass("mrel")||r[c].hasClass("allowbreak")){for(var p=!1;c<r.length-1&&r[c+1].hasClass("mspace")&&!r[c+1].hasClass("newline");)c++,h.push(r[c]),r[c].hasClass("nobreak")&&(p=!0);p||(l.push(T0(h,e)),h=[])}else r[c].hasClass("newline")&&(h.pop(),h.length>0&&(l.push(T0(h,e)),h=[]),l.push(r[c]));h.length>0&&l.push(T0(h,e));var v;n?(v=T0(Qn(n,e,!0)),v.classes=["tag"],l.push(v)):o&&l.push(o);var b=La(["katex-html"],l);if(b.setAttribute("aria-hidden","true"),v){var g=v.children[0];g.style.height=ot(b.height+b.depth),b.depth&&(g.style.verticalAlign=ot(-b.depth))}return b}function D3(t){return new Xl(t)}class Vr{constructor(e,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(e,n){this.attributes[e]=n}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&e.setAttribute(n,this.attributes[n]);this.classes.length>0&&(e.className=to(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof $i&&this.children[r+1]instanceof $i){for(var o=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof $i;)o+=this.children[++r].toText();e.appendChild(new $i(o).toNode())}else e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="',e+=xt.escape(this.attributes[n]),e+='"');this.classes.length>0&&(e+=' class ="'+xt.escape(to(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}}class $i{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return xt.escape(this.toText())}toText(){return this.text}}class iE{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="":e>=.1666&&e<=.1667?this.character="":e>=.2222&&e<=.2223?this.character="":e>=.2777&&e<=.2778?this.character="":e>=-.05556&&e<=-.05555?this.character="":e>=-.1667&&e<=-.1666?this.character="":e>=-.2223&&e<=-.2222?this.character="":e>=-.2778&&e<=-.2777?this.character="":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",ot(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ot(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ye={MathNode:Vr,TextNode:$i,SpaceNode:iE,newDocumentFragment:D3},ui=function(e,n,r){return xn[n][e]&&xn[n][e].replace&&e.charCodeAt(0)!==55349&&!(T3.hasOwnProperty(e)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(e=xn[n][e].replace),new Ye.TextNode(e)},r1=function(e){return e.length===1?e[0]:new Ye.MathNode("mrow",e)},i1=function(e,n){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold";var r=n.font;if(!r||r==="mathnormal")return null;var o=e.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathsfit")return"sans-serif-italic";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var l=e.text;if(xt.contains(["\\imath","\\jmath"],l))return null;xn[o][l]&&xn[o][l].replace&&(l=xn[o][l].replace);var h=Ee.fontMap[r].fontName;return e1(l,h,o)?Ee.fontMap[r].variant:null};function fh(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof $i&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var n=t.children[0];return n instanceof $i&&n.text===","}else return!1}var Rr=function(e,n,r){if(e.length===1){var o=bn(e[0],n);return r&&o instanceof Vr&&o.type==="mo"&&(o.setAttribute("lspace","0em"),o.setAttribute("rspace","0em")),[o]}for(var l=[],h,c=0;c<e.length;c++){var p=bn(e[c],n);if(p instanceof Vr&&h instanceof Vr){if(p.type==="mtext"&&h.type==="mtext"&&p.getAttribute("mathvariant")===h.getAttribute("mathvariant")){h.children.push(...p.children);continue}else if(p.type==="mn"&&h.type==="mn"){h.children.push(...p.children);continue}else if(fh(p)&&h.type==="mn"){h.children.push(...p.children);continue}else if(p.type==="mn"&&fh(h))p.children=[...h.children,...p.children],l.pop();else if((p.type==="msup"||p.type==="msub")&&p.children.length>=1&&(h.type==="mn"||fh(h))){var v=p.children[0];v instanceof Vr&&v.type==="mn"&&(v.children=[...h.children,...v.children],l.pop())}else if(h.type==="mi"&&h.children.length===1){var b=h.children[0];if(b instanceof $i&&b.text==="̸"&&(p.type==="mo"||p.type==="mi"||p.type==="mn")){var g=p.children[0];g instanceof $i&&g.text.length>0&&(g.text=g.text.slice(0,1)+"̸"+g.text.slice(1),l.pop())}}}l.push(p),h=p}return l},ro=function(e,n,r){return r1(Rr(e,n,r))},bn=function(e,n){if(!e)return new Ye.MathNode("mrow");if(xc[e.type]){var r=xc[e.type](e,n);return r}else throw new Qe("Got group of unknown type: '"+e.type+"'")};function Mg(t,e,n,r,o){var l=Rr(t,n),h;l.length===1&&l[0]instanceof Vr&&xt.contains(["mrow","mtable"],l[0].type)?h=l[0]:h=new Ye.MathNode("mrow",l);var c=new Ye.MathNode("annotation",[new Ye.TextNode(e)]);c.setAttribute("encoding","application/x-tex");var p=new Ye.MathNode("semantics",[h,c]),v=new Ye.MathNode("math",[p]);v.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&v.setAttribute("display","block");var b=o?"katex":"katex-mathml";return Ee.makeSpan([b],[v])}var R3=function(e){return new ua({style:e.displayMode?At.DISPLAY:At.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},I3=function(e,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),e=Ee.makeSpan(r,[e])}return e},aE=function(e,n,r){var o=R3(r),l;if(r.output==="mathml")return Mg(e,n,o,r.displayMode,!0);if(r.output==="html"){var h=gp(e,o);l=Ee.makeSpan(["katex"],[h])}else{var c=Mg(e,n,o,r.displayMode,!1),p=gp(e,o);l=Ee.makeSpan(["katex"],[c,p])}return I3(l,r)},oE=function(e,n,r){var o=R3(r),l=gp(e,o),h=Ee.makeSpan(["katex"],[l]);return I3(h,r)},sE={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},lE=function(e){var n=new Ye.MathNode("mo",[new Ye.TextNode(sE[e.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},cE={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},uE=function(e){return e.type==="ordgroup"?e.body.length:1},dE=function(e,n){function r(){var c=4e5,p=e.label.slice(1);if(xt.contains(["widehat","widecheck","widetilde","utilde"],p)){var v=e,b=uE(v.base),g,m,x;if(b>5)p==="widehat"||p==="widecheck"?(g=420,c=2364,x=.42,m=p+"4"):(g=312,c=2340,x=.34,m="tilde4");else{var w=[1,1,2,2,3,3][b];p==="widehat"||p==="widecheck"?(c=[0,1062,2364,2364,2364][w],g=[0,239,300,360,420][w],x=[0,.24,.3,.3,.36,.42][w],m=p+w):(c=[0,600,1033,2339,2340][w],g=[0,260,286,306,312][w],x=[0,.26,.286,.3,.306,.34][w],m="tilde"+w)}var S=new no(m),k=new Ca([S],{width:"100%",height:ot(x),viewBox:"0 0 "+c+" "+g,preserveAspectRatio:"none"});return{span:Ee.makeSvgSpan([],[k],n),minWidth:0,height:x}}else{var C=[],T=cE[p],[A,M,y]=T,N=y/1e3,z=A.length,F,P;if(z===1){var Y=T[3];F=["hide-tail"],P=[Y]}else if(z===2)F=["halfarrow-left","halfarrow-right"],P=["xMinYMin","xMaxYMin"];else if(z===3)F=["brace-left","brace-center","brace-right"],P=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
`+z+" children.");for(var te=0;te<z;te++){var ce=new no(A[te]),Me=new Ca([ce],{width:"400em",height:ot(N),viewBox:"0 0 "+c+" "+y,preserveAspectRatio:P[te]+" slice"}),Fe=Ee.makeSvgSpan([F[te]],[Me],n);if(z===1)return{span:Fe,minWidth:M,height:N};Fe.style.height=ot(N),C.push(Fe)}return{span:Ee.makeSpan(["stretchy"],C,n),minWidth:M,height:N}}}var{span:o,minWidth:l,height:h}=r();return o.height=h,o.style.height=ot(h),l>0&&(o.style.minWidth=ot(l)),o},hE=function(e,n,r,o,l){var h,c=e.height+e.depth+r+o;if(/fbox|color|angl/.test(n)){if(h=Ee.makeSpan(["stretchy",n],[],l),n==="fbox"){var p=l.color&&l.getColor();p&&(h.style.borderColor=p)}}else{var v=[];/^[bx]cancel$/.test(n)&&v.push(new pp({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&v.push(new pp({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var b=new Ca(v,{width:"100%",height:ot(c)});h=Ee.makeSvgSpan([],[b],l)}return h.height=c,h.style.height=ot(c),h},_a={encloseSpan:hE,mathMLnode:lE,svgSpan:dE};function qt(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function a1(t){var e=tu(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function tu(t){return t&&(t.type==="atom"||PS.hasOwnProperty(t.type))?t:null}var o1=(t,e)=>{var n,r,o;t&&t.type==="supsub"?(r=qt(t.base,"accent"),n=r.base,t.base=n,o=OS(Yt(t,e)),t.base=r):(r=qt(t,"accent"),n=r.base);var l=Yt(n,e.havingCrampedStyle()),h=r.isShifty&&xt.isCharacterBox(n),c=0;if(h){var p=xt.getBaseElem(n),v=Yt(p,e.havingCrampedStyle());c=wg(v).skew}var b=r.label==="\\c",g=b?l.height+l.depth:Math.min(l.height,e.fontMetrics().xHeight),m;if(r.isStretchy)m=_a.svgSpan(r,e),m=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:c>0?{width:"calc(100% - "+ot(2*c)+")",marginLeft:ot(2*c)}:void 0}]},e);else{var x,w;r.label==="\\vec"?(x=Ee.staticSvg("vec",e),w=Ee.svgData.vec[1]):(x=Ee.makeOrd({mode:r.mode,text:r.label},e,"textord"),x=wg(x),x.italic=0,w=x.width,b&&(g+=x.depth)),m=Ee.makeSpan(["accent-body"],[x]);var S=r.label==="\\textcircled";S&&(m.classes.push("accent-full"),g=l.height);var k=c;S||(k-=w/2),m.style.left=ot(k),r.label==="\\textcircled"&&(m.style.top=".2em"),m=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:-g},{type:"elem",elem:m}]},e)}var C=Ee.makeSpan(["mord","accent"],[m],e);return o?(o.children[0]=C,o.height=Math.max(C.height,o.height),o.classes[0]="mord",o):C},O3=(t,e)=>{var n=t.isStretchy?_a.mathMLnode(t.label):new Ye.MathNode("mo",[ui(t.label,t.mode)]),r=new Ye.MathNode("mover",[bn(t.base,e),n]);return r.setAttribute("accent","true"),r},pE=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));ht({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var n=kc(e[0]),r=!pE.test(t.funcName),o=!r||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:o,base:n}},htmlBuilder:o1,mathmlBuilder:O3});ht({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var n=e[0],r=t.parser.mode;return r==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:o1,mathmlBuilder:O3});ht({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"accentUnder",mode:n.mode,label:r,base:o}},htmlBuilder:(t,e)=>{var n=Yt(t.base,e),r=_a.svgSpan(t,e),o=t.label==="\\utilde"?.12:0,l=Ee.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:n}]},e);return Ee.makeSpan(["mord","accentunder"],[l],e)},mathmlBuilder:(t,e)=>{var n=_a.mathMLnode(t.label),r=new Ye.MathNode("munder",[bn(t.base,e),n]);return r.setAttribute("accentunder","true"),r}});var A0=t=>{var e=new Ye.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};ht({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r,funcName:o}=t;return{type:"xArrow",mode:r.mode,label:o,body:e[0],below:n[0]}},htmlBuilder(t,e){var n=e.style,r=e.havingStyle(n.sup()),o=Ee.wrapFragment(Yt(t.body,r,e),e),l=t.label.slice(0,2)==="\\x"?"x":"cd";o.classes.push(l+"-arrow-pad");var h;t.below&&(r=e.havingStyle(n.sub()),h=Ee.wrapFragment(Yt(t.below,r,e),e),h.classes.push(l+"-arrow-pad"));var c=_a.svgSpan(t,e),p=-e.fontMetrics().axisHeight+.5*c.height,v=-e.fontMetrics().axisHeight-.5*c.height-.111;(o.depth>.25||t.label==="\\xleftequilibrium")&&(v-=o.depth);var b;if(h){var g=-e.fontMetrics().axisHeight+h.height+.5*c.height+.111;b=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:v},{type:"elem",elem:c,shift:p},{type:"elem",elem:h,shift:g}]},e)}else b=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:v},{type:"elem",elem:c,shift:p}]},e);return b.children[0].children[0].children[1].classes.push("svg-align"),Ee.makeSpan(["mrel","x-arrow"],[b],e)},mathmlBuilder(t,e){var n=_a.mathMLnode(t.label);n.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(t.body){var o=A0(bn(t.body,e));if(t.below){var l=A0(bn(t.below,e));r=new Ye.MathNode("munderover",[n,l,o])}else r=new Ye.MathNode("mover",[n,o])}else if(t.below){var h=A0(bn(t.below,e));r=new Ye.MathNode("munder",[n,h])}else r=A0(),r=new Ye.MathNode("mover",[n,r]);return r}});var fE=Ee.makeSpan;function H3(t,e){var n=Qn(t.body,e,!0);return fE([t.mclass],n,e)}function P3(t,e){var n,r=Rr(t.body,e);return t.mclass==="minner"?n=new Ye.MathNode("mpadded",r):t.mclass==="mord"?t.isCharacterBox?(n=r[0],n.type="mi"):n=new Ye.MathNode("mi",r):(t.isCharacterBox?(n=r[0],n.type="mo"):n=new Ye.MathNode("mo",r),t.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):t.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):t.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}ht({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:qn(o),isCharacterBox:xt.isCharacterBox(o)}},htmlBuilder:H3,mathmlBuilder:P3});var nu=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};ht({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:n}=t;return{type:"mclass",mode:n.mode,mclass:nu(e[0]),body:qn(e[1]),isCharacterBox:xt.isCharacterBox(e[1])}}});ht({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:n,funcName:r}=t,o=e[1],l=e[0],h;r!=="\\stackrel"?h=nu(o):h="mrel";var c={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:qn(o)},p={type:"supsub",mode:l.mode,base:c,sup:r==="\\underset"?null:l,sub:r==="\\underset"?l:null};return{type:"mclass",mode:n.mode,mclass:h,body:[p],isCharacterBox:xt.isCharacterBox(p)}},htmlBuilder:H3,mathmlBuilder:P3});ht({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"pmb",mode:n.mode,mclass:nu(e[0]),body:qn(e[0])}},htmlBuilder(t,e){var n=Qn(t.body,e,!0),r=Ee.makeSpan([t.mclass],n,e);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(t,e){var n=Rr(t.body,e),r=new Ye.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var mE={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Cg=()=>({type:"styling",body:[],mode:"math",style:"display"}),Lg=t=>t.type==="textord"&&t.text==="@",gE=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function vE(t,e,n){var r=mE[t];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var o=n.callFunction("\\\\cdleft",[e[0]],[]),l={type:"atom",text:r,mode:"math",family:"rel"},h=n.callFunction("\\Big",[l],[]),c=n.callFunction("\\\\cdright",[e[1]],[]),p={type:"ordgroup",mode:"math",body:[o,h,c]};return n.callFunction("\\\\cdparent",[p],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var v={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[v],[])}default:return{type:"textord",text:" ",mode:"math"}}}function bE(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var n=t.fetch().text;if(n==="&"||n==="\\\\")t.consume();else if(n==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new Qe("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var r=[],o=[r],l=0;l<e.length;l++){for(var h=e[l],c=Cg(),p=0;p<h.length;p++)if(!Lg(h[p]))c.body.push(h[p]);else{r.push(c),p+=1;var v=a1(h[p]).text,b=new Array(2);if(b[0]={type:"ordgroup",mode:"math",body:[]},b[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(v)>-1))if("<>AV".indexOf(v)>-1)for(var g=0;g<2;g++){for(var m=!0,x=p+1;x<h.length;x++){if(gE(h[x],v)){m=!1,p=x;break}if(Lg(h[x]))throw new Qe("Missing a "+v+" character to complete a CD arrow.",h[x]);b[g].body.push(h[x])}if(m)throw new Qe("Missing a "+v+" character to complete a CD arrow.",h[p])}else throw new Qe('Expected one of "<>AV=|." after @',h[p]);var w=vE(v,b,t),S={type:"styling",body:[w],mode:"math",style:"display"};r.push(S),c=Cg()}l%2===0?r.push(c):r.shift(),r=[],o.push(r)}t.gullet.endGroup(),t.gullet.endGroup();var k=new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:k,colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}ht({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:e[0]}},htmlBuilder(t,e){var n=e.havingStyle(e.style.sup()),r=Ee.wrapFragment(Yt(t.label,n,e),e);return r.classes.push("cd-label-"+t.side),r.style.bottom=ot(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){var n=new Ye.MathNode("mrow",[bn(t.label,e)]);return n=new Ye.MathNode("mpadded",[n]),n.setAttribute("width","0"),t.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Ye.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});ht({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:n}=t;return{type:"cdlabelparent",mode:n.mode,fragment:e[0]}},htmlBuilder(t,e){var n=Ee.wrapFragment(Yt(t.fragment,e),e);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(t,e){return new Ye.MathNode("mrow",[bn(t.fragment,e)])}});ht({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:n}=t,r=qt(e[0],"ordgroup"),o=r.body,l="",h=0;h<o.length;h++){var c=qt(o[h],"textord");l+=c.text}var p=parseInt(l),v;if(isNaN(p))throw new Qe("\\@char has non-numeric argument "+l);if(p<0||p>=1114111)throw new Qe("\\@char with invalid code point "+l);return p<=65535?v=String.fromCharCode(p):(p-=65536,v=String.fromCharCode((p>>10)+55296,(p&1023)+56320)),{type:"textord",mode:n.mode,text:v}}});var z3=(t,e)=>{var n=Qn(t.body,e.withColor(t.color),!1);return Ee.makeFragment(n)},B3=(t,e)=>{var n=Rr(t.body,e.withColor(t.color)),r=new Ye.MathNode("mstyle",n);return r.setAttribute("mathcolor",t.color),r};ht({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:n}=t,r=qt(e[0],"color-token").color,o=e[1];return{type:"color",mode:n.mode,color:r,body:qn(o)}},htmlBuilder:z3,mathmlBuilder:B3});ht({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:n,breakOnTokenText:r}=t,o=qt(e[0],"color-token").color;n.gullet.macros.set("\\current@color",o);var l=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:o,body:l}},htmlBuilder:z3,mathmlBuilder:B3});ht({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,n){var{parser:r}=t,o=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,l=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:l,size:o&&qt(o,"size").value}},htmlBuilder(t,e){var n=Ee.makeSpan(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=ot(Dn(t.size,e)))),n},mathmlBuilder(t,e){var n=new Ye.MathNode("mspace");return t.newLine&&(n.setAttribute("linebreak","newline"),t.size&&n.setAttribute("height",ot(Dn(t.size,e)))),n}});var vp={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},F3=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new Qe("Expected a control sequence",t);return e},yE=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},q3=(t,e,n,r)=>{var o=t.gullet.macros.get(n.text);o==null&&(n.noexpand=!0,o={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,o,r)};ht({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:n}=t;e.consumeSpaces();var r=e.fetch();if(vp[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=vp[r.text]),qt(e.parseFunction(),"internal");throw new Qe("Invalid token after macro prefix",r)}});ht({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=e.gullet.popToken(),o=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new Qe("Expected a control sequence",r);for(var l=0,h,c=[[]];e.gullet.future().text!=="{";)if(r=e.gullet.popToken(),r.text==="#"){if(e.gullet.future().text==="{"){h=e.gullet.future(),c[l].push("{");break}if(r=e.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Qe('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==l+1)throw new Qe('Argument number "'+r.text+'" out of order');l++,c.push([])}else{if(r.text==="EOF")throw new Qe("Expected a macro definition");c[l].push(r.text)}var{tokens:p}=e.gullet.consumeArg();return h&&p.unshift(h),(n==="\\edef"||n==="\\xdef")&&(p=e.gullet.expandTokens(p),p.reverse()),e.gullet.macros.set(o,{tokens:p,numArgs:l,delimiters:c},n===vp[n]),{type:"internal",mode:e.mode}}});ht({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=F3(e.gullet.popToken());e.gullet.consumeSpaces();var o=yE(e);return q3(e,r,o,n==="\\\\globallet"),{type:"internal",mode:e.mode}}});ht({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=F3(e.gullet.popToken()),o=e.gullet.popToken(),l=e.gullet.popToken();return q3(e,r,l,n==="\\\\globalfuture"),e.gullet.pushToken(l),e.gullet.pushToken(o),{type:"internal",mode:e.mode}}});var ml=function(e,n,r){var o=xn.math[e]&&xn.math[e].replace,l=e1(o||e,n,r);if(!l)throw new Error("Unsupported symbol "+e+" and font size "+n+".");return l},s1=function(e,n,r,o){var l=r.havingBaseStyle(n),h=Ee.makeSpan(o.concat(l.sizingClasses(r)),[e],r),c=l.sizeMultiplier/r.sizeMultiplier;return h.height*=c,h.depth*=c,h.maxFontSize=l.sizeMultiplier,h},j3=function(e,n,r){var o=n.havingBaseStyle(r),l=(1-n.sizeMultiplier/o.sizeMultiplier)*n.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ot(l),e.height-=l,e.depth+=l},wE=function(e,n,r,o,l,h){var c=Ee.makeSymbol(e,"Main-Regular",l,o),p=s1(c,n,o,h);return r&&j3(p,o,n),p},xE=function(e,n,r,o){return Ee.makeSymbol(e,"Size"+n+"-Regular",r,o)},$3=function(e,n,r,o,l,h){var c=xE(e,n,l,o),p=s1(Ee.makeSpan(["delimsizing","size"+n],[c],o),At.TEXT,o,h);return r&&j3(p,o,At.TEXT),p},mh=function(e,n,r){var o;n==="Size1-Regular"?o="delim-size1":o="delim-size4";var l=Ee.makeSpan(["delimsizinginner",o],[Ee.makeSpan([],[Ee.makeSymbol(e,n,r)])]);return{type:"elem",elem:l}},gh=function(e,n,r){var o=ji["Size4-Regular"][e.charCodeAt(0)]?ji["Size4-Regular"][e.charCodeAt(0)][4]:ji["Size1-Regular"][e.charCodeAt(0)][4],l=new no("inner",AS(e,Math.round(1e3*n))),h=new Ca([l],{width:ot(o),height:ot(n),style:"width:"+ot(o),viewBox:"0 0 "+1e3*o+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),c=Ee.makeSvgSpan([],[h],r);return c.height=n,c.style.height=ot(n),c.style.width=ot(o),{type:"elem",elem:c}},bp=.008,M0={type:"kern",size:-1*bp},kE=["|","\\lvert","\\rvert","\\vert"],SE=["\\|","\\lVert","\\rVert","\\Vert"],U3=function(e,n,r,o,l,h){var c,p,v,b,g="",m=0;c=v=b=e,p=null;var x="Size1-Regular";e==="\\uparrow"?v=b="⏐":e==="\\Uparrow"?v=b="‖":e==="\\downarrow"?c=v="⏐":e==="\\Downarrow"?c=v="‖":e==="\\updownarrow"?(c="\\uparrow",v="⏐",b="\\downarrow"):e==="\\Updownarrow"?(c="\\Uparrow",v="‖",b="\\Downarrow"):xt.contains(kE,e)?(v="",g="vert",m=333):xt.contains(SE,e)?(v="∥",g="doublevert",m=556):e==="["||e==="\\lbrack"?(c="⎡",v="⎢",b="⎣",x="Size4-Regular",g="lbrack",m=667):e==="]"||e==="\\rbrack"?(c="⎤",v="⎥",b="⎦",x="Size4-Regular",g="rbrack",m=667):e==="\\lfloor"||e==="⌊"?(v=c="⎢",b="⎣",x="Size4-Regular",g="lfloor",m=667):e==="\\lceil"||e==="⌈"?(c="⎡",v=b="⎢",x="Size4-Regular",g="lceil",m=667):e==="\\rfloor"||e==="⌋"?(v=c="⎥",b="⎦",x="Size4-Regular",g="rfloor",m=667):e==="\\rceil"||e==="⌉"?(c="⎤",v=b="⎥",x="Size4-Regular",g="rceil",m=667):e==="("||e==="\\lparen"?(c="⎛",v="⎜",b="⎝",x="Size4-Regular",g="lparen",m=875):e===")"||e==="\\rparen"?(c="⎞",v="⎟",b="⎠",x="Size4-Regular",g="rparen",m=875):e==="\\{"||e==="\\lbrace"?(c="⎧",p="⎨",b="⎩",v="⎪",x="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(c="⎫",p="⎬",b="⎭",v="⎪",x="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(c="⎧",b="⎩",v="⎪",x="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(c="⎫",b="⎭",v="⎪",x="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(c="⎧",b="⎭",v="⎪",x="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(c="⎫",b="⎩",v="⎪",x="Size4-Regular");var w=ml(c,x,l),S=w.height+w.depth,k=ml(v,x,l),C=k.height+k.depth,T=ml(b,x,l),A=T.height+T.depth,M=0,y=1;if(p!==null){var N=ml(p,x,l);M=N.height+N.depth,y=2}var z=S+A+M,F=Math.max(0,Math.ceil((n-z)/(y*C))),P=z+F*y*C,Y=o.fontMetrics().axisHeight;r&&(Y*=o.sizeMultiplier);var te=P/2-Y,ce=[];if(g.length>0){var Me=P-S-A,Fe=Math.round(P*1e3),We=MS(g,Math.round(Me*1e3)),rt=new no(g,We),je=(m/1e3).toFixed(3)+"em",Ne=(Fe/1e3).toFixed(3)+"em",nt=new Ca([rt],{width:je,height:Ne,viewBox:"0 0 "+m+" "+Fe}),ct=Ee.makeSvgSpan([],[nt],o);ct.height=Fe/1e3,ct.style.width=je,ct.style.height=Ne,ce.push({type:"elem",elem:ct})}else{if(ce.push(mh(b,x,l)),ce.push(M0),p===null){var tt=P-S-A+2*bp;ce.push(gh(v,tt,o))}else{var q=(P-S-A-M)/2+2*bp;ce.push(gh(v,q,o)),ce.push(M0),ce.push(mh(p,x,l)),ce.push(M0),ce.push(gh(v,q,o))}ce.push(M0),ce.push(mh(c,x,l))}var Ht=o.havingBaseStyle(At.TEXT),Rt=Ee.makeVList({positionType:"bottom",positionData:te,children:ce},Ht);return s1(Ee.makeSpan(["delimsizing","mult"],[Rt],Ht),At.TEXT,o,h)},vh=80,bh=.08,yh=function(e,n,r,o,l){var h=TS(e,o,r),c=new no(e,h),p=new Ca([c],{width:"400em",height:ot(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ee.makeSvgSpan(["hide-tail"],[p],l)},EE=function(e,n){var r=n.havingBaseSizing(),o=K3("\\surd",e*r.sizeMultiplier,G3,r),l=r.sizeMultiplier,h=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),c,p=0,v=0,b=0,g;return o.type==="small"?(b=1e3+1e3*h+vh,e<1?l=1:e<1.4&&(l=.7),p=(1+h+bh)/l,v=(1+h)/l,c=yh("sqrtMain",p,b,h,n),c.style.minWidth="0.853em",g=.833/l):o.type==="large"?(b=(1e3+vh)*Cl[o.size],v=(Cl[o.size]+h)/l,p=(Cl[o.size]+h+bh)/l,c=yh("sqrtSize"+o.size,p,b,h,n),c.style.minWidth="1.02em",g=1/l):(p=e+h+bh,v=e+h,b=Math.floor(1e3*e+h)+vh,c=yh("sqrtTall",p,b,h,n),c.style.minWidth="0.742em",g=1.056),c.height=v,c.style.height=ot(p),{span:c,advanceWidth:g,ruleWidth:(n.fontMetrics().sqrtRuleThickness+h)*l}},V3=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],TE=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],W3=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Cl=[0,1.2,1.8,2.4,3],AE=function(e,n,r,o,l){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),xt.contains(V3,e)||xt.contains(W3,e))return $3(e,n,!1,r,o,l);if(xt.contains(TE,e))return U3(e,Cl[n],!1,r,o,l);throw new Qe("Illegal delimiter: '"+e+"'")},ME=[{type:"small",style:At.SCRIPTSCRIPT},{type:"small",style:At.SCRIPT},{type:"small",style:At.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],CE=[{type:"small",style:At.SCRIPTSCRIPT},{type:"small",style:At.SCRIPT},{type:"small",style:At.TEXT},{type:"stack"}],G3=[{type:"small",style:At.SCRIPTSCRIPT},{type:"small",style:At.SCRIPT},{type:"small",style:At.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],LE=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},K3=function(e,n,r,o){for(var l=Math.min(2,3-o.style.size),h=l;h<r.length&&r[h].type!=="stack";h++){var c=ml(e,LE(r[h]),"math"),p=c.height+c.depth;if(r[h].type==="small"){var v=o.havingBaseStyle(r[h].style);p*=v.sizeMultiplier}if(p>n)return r[h]}return r[r.length-1]},X3=function(e,n,r,o,l,h){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var c;xt.contains(W3,e)?c=ME:xt.contains(V3,e)?c=G3:c=CE;var p=K3(e,n,c,o);return p.type==="small"?wE(e,p.style,r,o,l,h):p.type==="large"?$3(e,p.size,r,o,l,h):U3(e,n,r,o,l,h)},_E=function(e,n,r,o,l,h){var c=o.fontMetrics().axisHeight*o.sizeMultiplier,p=901,v=5/o.fontMetrics().ptPerEm,b=Math.max(n-c,r+c),g=Math.max(b/500*p,2*b-v);return X3(e,g,!0,o,l,h)},ka={sqrtImage:EE,sizedDelim:AE,sizeToMaxHeight:Cl,customSizedDelim:X3,leftRightDelim:_E},_g={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},NE=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function ru(t,e){var n=tu(t);if(n&&xt.contains(NE,n.text))return n;throw n?new Qe("Invalid delimiter '"+n.text+"' after '"+e.funcName+"'",t):new Qe("Invalid delimiter type '"+t.type+"'",t)}ht({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var n=ru(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:_g[t.funcName].size,mclass:_g[t.funcName].mclass,delim:n.text}},htmlBuilder:(t,e)=>t.delim==="."?Ee.makeSpan([t.mclass]):ka.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(ui(t.delim,t.mode));var n=new Ye.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=ot(ka.sizeToMaxHeight[t.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function Ng(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ht({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=t.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new Qe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:ru(e[0],t).text,color:n}}});ht({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=ru(e[0],t),r=t.parser;++r.leftrightDepth;var o=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var l=qt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:o,left:n.text,right:l.delim,rightColor:l.color}},htmlBuilder:(t,e)=>{Ng(t);for(var n=Qn(t.body,e,!0,["mopen","mclose"]),r=0,o=0,l=!1,h=0;h<n.length;h++)n[h].isMiddle?l=!0:(r=Math.max(n[h].height,r),o=Math.max(n[h].depth,o));r*=e.sizeMultiplier,o*=e.sizeMultiplier;var c;if(t.left==="."?c=Pl(e,["mopen"]):c=ka.leftRightDelim(t.left,r,o,e,t.mode,["mopen"]),n.unshift(c),l)for(var p=1;p<n.length;p++){var v=n[p],b=v.isMiddle;b&&(n[p]=ka.leftRightDelim(b.delim,r,o,b.options,t.mode,[]))}var g;if(t.right===".")g=Pl(e,["mclose"]);else{var m=t.rightColor?e.withColor(t.rightColor):e;g=ka.leftRightDelim(t.right,r,o,m,t.mode,["mclose"])}return n.push(g),Ee.makeSpan(["minner"],n,e)},mathmlBuilder:(t,e)=>{Ng(t);var n=Rr(t.body,e);if(t.left!=="."){var r=new Ye.MathNode("mo",[ui(t.left,t.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(t.right!=="."){var o=new Ye.MathNode("mo",[ui(t.right,t.mode)]);o.setAttribute("fence","true"),t.rightColor&&o.setAttribute("mathcolor",t.rightColor),n.push(o)}return r1(n)}});ht({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=ru(e[0],t);if(!t.parser.leftrightDepth)throw new Qe("\\middle without preceding \\left",n);return{type:"middle",mode:t.parser.mode,delim:n.text}},htmlBuilder:(t,e)=>{var n;if(t.delim===".")n=Pl(e,[]);else{n=ka.sizedDelim(t.delim,1,e,t.mode,[]);var r={delim:t.delim,options:e};n.isMiddle=r}return n},mathmlBuilder:(t,e)=>{var n=t.delim==="\\vert"||t.delim==="|"?ui("|","text"):ui(t.delim,t.mode),r=new Ye.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var l1=(t,e)=>{var n=Ee.wrapFragment(Yt(t.body,e),e),r=t.label.slice(1),o=e.sizeMultiplier,l,h=0,c=xt.isCharacterBox(t.body);if(r==="sout")l=Ee.makeSpan(["stretchy","sout"]),l.height=e.fontMetrics().defaultRuleThickness/o,h=-.5*e.fontMetrics().xHeight;else if(r==="phase"){var p=Dn({number:.6,unit:"pt"},e),v=Dn({number:.35,unit:"ex"},e),b=e.havingBaseSizing();o=o/b.sizeMultiplier;var g=n.height+n.depth+p+v;n.style.paddingLeft=ot(g/2+p);var m=Math.floor(1e3*g*o),x=SS(m),w=new Ca([new no("phase",x)],{width:"400em",height:ot(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});l=Ee.makeSvgSpan(["hide-tail"],[w],e),l.style.height=ot(g),h=n.depth+p+v}else{/cancel/.test(r)?c||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var S=0,k=0,C=0;/box/.test(r)?(C=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),S=e.fontMetrics().fboxsep+(r==="colorbox"?0:C),k=S):r==="angl"?(C=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),S=4*C,k=Math.max(0,.25-n.depth)):(S=c?.2:0,k=S),l=_a.encloseSpan(n,r,S,k,e),/fbox|boxed|fcolorbox/.test(r)?(l.style.borderStyle="solid",l.style.borderWidth=ot(C)):r==="angl"&&C!==.049&&(l.style.borderTopWidth=ot(C),l.style.borderRightWidth=ot(C)),h=n.depth+k,t.backgroundColor&&(l.style.backgroundColor=t.backgroundColor,t.borderColor&&(l.style.borderColor=t.borderColor))}var T;if(t.backgroundColor)T=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:h},{type:"elem",elem:n,shift:0}]},e);else{var A=/cancel|phase/.test(r)?["svg-align"]:[];T=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:l,shift:h,wrapperClasses:A}]},e)}return/cancel/.test(r)&&(T.height=n.height,T.depth=n.depth),/cancel/.test(r)&&!c?Ee.makeSpan(["mord","cancel-lap"],[T],e):Ee.makeSpan(["mord"],[T],e)},c1=(t,e)=>{var n=0,r=new Ye.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[bn(t.body,e)]);switch(t.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),t.label==="\\fcolorbox"){var o=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);r.setAttribute("style","border: "+o+"em solid "+String(t.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&r.setAttribute("mathbackground",t.backgroundColor),r};ht({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,n){var{parser:r,funcName:o}=t,l=qt(e[0],"color-token").color,h=e[1];return{type:"enclose",mode:r.mode,label:o,backgroundColor:l,body:h}},htmlBuilder:l1,mathmlBuilder:c1});ht({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,n){var{parser:r,funcName:o}=t,l=qt(e[0],"color-token").color,h=qt(e[1],"color-token").color,c=e[2];return{type:"enclose",mode:r.mode,label:o,backgroundColor:h,borderColor:l,body:c}},htmlBuilder:l1,mathmlBuilder:c1});ht({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\fbox",body:e[0]}}});ht({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"enclose",mode:n.mode,label:r,body:o}},htmlBuilder:l1,mathmlBuilder:c1});ht({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\angl",body:e[0]}}});var Z3={};function Ki(t){for(var{type:e,names:n,props:r,handler:o,htmlBuilder:l,mathmlBuilder:h}=t,c={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o},p=0;p<n.length;++p)Z3[n[p]]=c;l&&(wc[e]=l),h&&(xc[e]=h)}var Y3={};function W(t,e){Y3[t]=e}function Dg(t){var e=[];t.consumeSpaces();var n=t.fetch().text;for(n==="\\relax"&&(t.consume(),t.consumeSpaces(),n=t.fetch().text);n==="\\hline"||n==="\\hdashline";)t.consume(),e.push(n==="\\hdashline"),t.consumeSpaces(),n=t.fetch().text;return e}var iu=t=>{var e=t.parser.settings;if(!e.displayMode)throw new Qe("{"+t.envName+"} can be used only in display mode.")};function u1(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function lo(t,e,n){var{hskipBeforeAndAfter:r,addJot:o,cols:l,arraystretch:h,colSeparationType:c,autoTag:p,singleRow:v,emptySingleRow:b,maxNumCols:g,leqno:m}=e;if(t.gullet.beginGroup(),v||t.gullet.macros.set("\\cr","\\\\\\relax"),!h){var x=t.gullet.expandMacroAsText("\\arraystretch");if(x==null)h=1;else if(h=parseFloat(x),!h||h<0)throw new Qe("Invalid \\arraystretch: "+x)}t.gullet.beginGroup();var w=[],S=[w],k=[],C=[],T=p!=null?[]:void 0;function A(){p&&t.gullet.macros.set("\\@eqnsw","1",!0)}function M(){T&&(t.gullet.macros.get("\\df@tag")?(T.push(t.subparse([new ai("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):T.push(!!p&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(A(),C.push(Dg(t));;){var y=t.parseExpression(!1,v?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),y={type:"ordgroup",mode:t.mode,body:y},n&&(y={type:"styling",mode:t.mode,style:n,body:[y]}),w.push(y);var N=t.fetch().text;if(N==="&"){if(g&&w.length===g){if(v||c)throw new Qe("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(N==="\\end"){M(),w.length===1&&y.type==="styling"&&y.body[0].body.length===0&&(S.length>1||!b)&&S.pop(),C.length<S.length+1&&C.push([]);break}else if(N==="\\\\"){t.consume();var z=void 0;t.gullet.future().text!==" "&&(z=t.parseSizeGroup(!0)),k.push(z?z.value:null),M(),C.push(Dg(t)),w=[],S.push(w),A()}else throw new Qe("Expected & or \\\\ or \\cr or \\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:o,arraystretch:h,body:S,cols:l,rowGaps:k,hskipBeforeAndAfter:r,hLinesBeforeRow:C,colSeparationType:c,tags:T,leqno:m}}function d1(t){return t.slice(0,1)==="d"?"display":"text"}var Xi=function(e,n){var r,o,l=e.body.length,h=e.hLinesBeforeRow,c=0,p=new Array(l),v=[],b=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),g=1/n.fontMetrics().ptPerEm,m=5*g;if(e.colSeparationType&&e.colSeparationType==="small"){var x=n.havingStyle(At.SCRIPT).sizeMultiplier;m=.2778*(x/n.sizeMultiplier)}var w=e.colSeparationType==="CD"?Dn({number:3,unit:"ex"},n):12*g,S=3*g,k=e.arraystretch*w,C=.7*k,T=.3*k,A=0;function M(Ae){for(var ze=0;ze<Ae.length;++ze)ze>0&&(A+=.25),v.push({pos:A,isDashed:Ae[ze]})}for(M(h[0]),r=0;r<e.body.length;++r){var y=e.body[r],N=C,z=T;c<y.length&&(c=y.length);var F=new Array(y.length);for(o=0;o<y.length;++o){var P=Yt(y[o],n);z<P.depth&&(z=P.depth),N<P.height&&(N=P.height),F[o]=P}var Y=e.rowGaps[r],te=0;Y&&(te=Dn(Y,n),te>0&&(te+=T,z<te&&(z=te),te=0)),e.addJot&&(z+=S),F.height=N,F.depth=z,A+=N,F.pos=A,A+=z+te,p[r]=F,M(h[r+1])}var ce=A/2+n.fontMetrics().axisHeight,Me=e.cols||[],Fe=[],We,rt,je=[];if(e.tags&&e.tags.some(Ae=>Ae))for(r=0;r<l;++r){var Ne=p[r],nt=Ne.pos-ce,ct=e.tags[r],tt=void 0;ct===!0?tt=Ee.makeSpan(["eqn-num"],[],n):ct===!1?tt=Ee.makeSpan([],[],n):tt=Ee.makeSpan([],Qn(ct,n,!0),n),tt.depth=Ne.depth,tt.height=Ne.height,je.push({type:"elem",elem:tt,shift:nt})}for(o=0,rt=0;o<c||rt<Me.length;++o,++rt){for(var q=Me[rt]||{},Ht=!0;q.type==="separator";){if(Ht||(We=Ee.makeSpan(["arraycolsep"],[]),We.style.width=ot(n.fontMetrics().doubleRuleSep),Fe.push(We)),q.separator==="|"||q.separator===":"){var Rt=q.separator==="|"?"solid":"dashed",$t=Ee.makeSpan(["vertical-separator"],[],n);$t.style.height=ot(A),$t.style.borderRightWidth=ot(b),$t.style.borderRightStyle=Rt,$t.style.margin="0 "+ot(-b/2);var Nt=A-ce;Nt&&($t.style.verticalAlign=ot(-Nt)),Fe.push($t)}else throw new Qe("Invalid separator type: "+q.separator);rt++,q=Me[rt]||{},Ht=!1}if(!(o>=c)){var oe=void 0;(o>0||e.hskipBeforeAndAfter)&&(oe=xt.deflt(q.pregap,m),oe!==0&&(We=Ee.makeSpan(["arraycolsep"],[]),We.style.width=ot(oe),Fe.push(We)));var he=[];for(r=0;r<l;++r){var J=p[r],ee=J[o];if(ee){var Ce=J.pos-ce;ee.depth=J.depth,ee.height=J.height,he.push({type:"elem",elem:ee,shift:Ce})}}he=Ee.makeVList({positionType:"individualShift",children:he},n),he=Ee.makeSpan(["col-align-"+(q.align||"c")],[he]),Fe.push(he),(o<c-1||e.hskipBeforeAndAfter)&&(oe=xt.deflt(q.postgap,m),oe!==0&&(We=Ee.makeSpan(["arraycolsep"],[]),We.style.width=ot(oe),Fe.push(We)))}}if(p=Ee.makeSpan(["mtable"],Fe),v.length>0){for(var se=Ee.makeLineSpan("hline",n,b),G=Ee.makeLineSpan("hdashline",n,b),X=[{type:"elem",elem:p,shift:0}];v.length>0;){var be=v.pop(),le=be.pos-ce;be.isDashed?X.push({type:"elem",elem:G,shift:le}):X.push({type:"elem",elem:se,shift:le})}p=Ee.makeVList({positionType:"individualShift",children:X},n)}if(je.length===0)return Ee.makeSpan(["mord"],[p],n);var ye=Ee.makeVList({positionType:"individualShift",children:je},n);return ye=Ee.makeSpan(["tag"],[ye],n),Ee.makeFragment([p,ye])},DE={c:"center ",l:"left ",r:"right "},Zi=function(e,n){for(var r=[],o=new Ye.MathNode("mtd",[],["mtr-glue"]),l=new Ye.MathNode("mtd",[],["mml-eqn-num"]),h=0;h<e.body.length;h++){for(var c=e.body[h],p=[],v=0;v<c.length;v++)p.push(new Ye.MathNode("mtd",[bn(c[v],n)]));e.tags&&e.tags[h]&&(p.unshift(o),p.push(o),e.leqno?p.unshift(l):p.push(l)),r.push(new Ye.MathNode("mtr",p))}var b=new Ye.MathNode("mtable",r),g=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);b.setAttribute("rowspacing",ot(g));var m="",x="";if(e.cols&&e.cols.length>0){var w=e.cols,S="",k=!1,C=0,T=w.length;w[0].type==="separator"&&(m+="top ",C=1),w[w.length-1].type==="separator"&&(m+="bottom ",T-=1);for(var A=C;A<T;A++)w[A].type==="align"?(x+=DE[w[A].align],k&&(S+="none "),k=!0):w[A].type==="separator"&&k&&(S+=w[A].separator==="|"?"solid ":"dashed ",k=!1);b.setAttribute("columnalign",x.trim()),/[sd]/.test(S)&&b.setAttribute("columnlines",S.trim())}if(e.colSeparationType==="align"){for(var M=e.cols||[],y="",N=1;N<M.length;N++)y+=N%2?"0em ":"1em ";b.setAttribute("columnspacing",y.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?b.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?b.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?b.setAttribute("columnspacing","0.5em"):b.setAttribute("columnspacing","1em");var z="",F=e.hLinesBeforeRow;m+=F[0].length>0?"left ":"",m+=F[F.length-1].length>0?"right ":"";for(var P=1;P<F.length-1;P++)z+=F[P].length===0?"none ":F[P][0]?"dashed ":"solid ";return/[sd]/.test(z)&&b.setAttribute("rowlines",z.trim()),m!==""&&(b=new Ye.MathNode("menclose",[b]),b.setAttribute("notation",m.trim())),e.arraystretch&&e.arraystretch<1&&(b=new Ye.MathNode("mstyle",[b]),b.setAttribute("scriptlevel","1")),b},J3=function(e,n){e.envName.indexOf("ed")===-1&&iu(e);var r=[],o=e.envName.indexOf("at")>-1?"alignat":"align",l=e.envName==="split",h=lo(e.parser,{cols:r,addJot:!0,autoTag:l?void 0:u1(e.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:l?2:void 0,leqno:e.parser.settings.leqno},"display"),c,p=0,v={type:"ordgroup",mode:e.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var b="",g=0;g<n[0].body.length;g++){var m=qt(n[0].body[g],"textord");b+=m.text}c=Number(b),p=c*2}var x=!p;h.body.forEach(function(C){for(var T=1;T<C.length;T+=2){var A=qt(C[T],"styling"),M=qt(A.body[0],"ordgroup");M.body.unshift(v)}if(x)p<C.length&&(p=C.length);else{var y=C.length/2;if(c<y)throw new Qe("Too many math in a row: "+("expected "+c+", but got "+y),C[0])}});for(var w=0;w<p;++w){var S="r",k=0;w%2===1?S="l":w>0&&x&&(k=1),r[w]={type:"align",align:S,pregap:k,postgap:0}}return h.colSeparationType=x?"align":"alignat",h};Ki({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var n=tu(e[0]),r=n?[e[0]]:qt(e[0],"ordgroup").body,o=r.map(function(h){var c=a1(h),p=c.text;if("lcr".indexOf(p)!==-1)return{type:"align",align:p};if(p==="|")return{type:"separator",separator:"|"};if(p===":")return{type:"separator",separator:":"};throw new Qe("Unknown column alignment: "+p,h)}),l={cols:o,hskipBeforeAndAfter:!0,maxNumCols:o.length};return lo(t.parser,l,d1(t.envName))},htmlBuilder:Xi,mathmlBuilder:Zi});Ki({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(t.envName.charAt(t.envName.length-1)==="*"){var o=t.parser;if(o.consumeSpaces(),o.fetch().text==="["){if(o.consume(),o.consumeSpaces(),n=o.fetch().text,"lcr".indexOf(n)===-1)throw new Qe("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),r.cols=[{type:"align",align:n}]}}var l=lo(t.parser,r,d1(t.envName)),h=Math.max(0,...l.body.map(c=>c.length));return l.cols=new Array(h).fill({type:"align",align:n}),e?{type:"leftright",mode:t.mode,body:[l],left:e[0],right:e[1],rightColor:void 0}:l},htmlBuilder:Xi,mathmlBuilder:Zi});Ki({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},n=lo(t.parser,e,"script");return n.colSeparationType="small",n},htmlBuilder:Xi,mathmlBuilder:Zi});Ki({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var n=tu(e[0]),r=n?[e[0]]:qt(e[0],"ordgroup").body,o=r.map(function(h){var c=a1(h),p=c.text;if("lc".indexOf(p)!==-1)return{type:"align",align:p};throw new Qe("Unknown column alignment: "+p,h)});if(o.length>1)throw new Qe("{subarray} can contain only one column");var l={cols:o,hskipBeforeAndAfter:!1,arraystretch:.5};if(l=lo(t.parser,l,"script"),l.body.length>0&&l.body[0].length>1)throw new Qe("{subarray} can contain only one column");return l},htmlBuilder:Xi,mathmlBuilder:Zi});Ki({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=lo(t.parser,e,d1(t.envName));return{type:"leftright",mode:t.mode,body:[n],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Xi,mathmlBuilder:Zi});Ki({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:J3,htmlBuilder:Xi,mathmlBuilder:Zi});Ki({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){xt.contains(["gather","gather*"],t.envName)&&iu(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:u1(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return lo(t.parser,e,"display")},htmlBuilder:Xi,mathmlBuilder:Zi});Ki({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:J3,htmlBuilder:Xi,mathmlBuilder:Zi});Ki({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){iu(t);var e={autoTag:u1(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return lo(t.parser,e,"display")},htmlBuilder:Xi,mathmlBuilder:Zi});Ki({type:"array",names:["CD"],props:{numArgs:0},handler(t){return iu(t),bE(t.parser)},htmlBuilder:Xi,mathmlBuilder:Zi});W("\\nonumber","\\gdef\\@eqnsw{0}");W("\\notag","\\nonumber");ht({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new Qe(t.funcName+" valid only within array environment")}});var Rg=Z3;ht({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];if(o.type!=="ordgroup")throw new Qe("Invalid environment name",o);for(var l="",h=0;h<o.body.length;++h)l+=qt(o.body[h],"textord").text;if(r==="\\begin"){if(!Rg.hasOwnProperty(l))throw new Qe("No such environment: "+l,o);var c=Rg[l],{args:p,optArgs:v}=n.parseArguments("\\begin{"+l+"}",c),b={mode:n.mode,envName:l,parser:n},g=c.handler(b,p,v);n.expect("\\end",!1);var m=n.nextToken,x=qt(n.parseFunction(),"environment");if(x.name!==l)throw new Qe("Mismatch: \\begin{"+l+"} matched by \\end{"+x.name+"}",m);return g}return{type:"environment",mode:n.mode,name:l,nameGroup:o}}});var Q3=(t,e)=>{var n=t.font,r=e.withFont(n);return Yt(t.body,r)},e2=(t,e)=>{var n=t.font,r=e.withFont(n);return bn(t.body,r)},Ig={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ht({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=kc(e[0]),l=r;return l in Ig&&(l=Ig[l]),{type:"font",mode:n.mode,font:l.slice(1),body:o}},htmlBuilder:Q3,mathmlBuilder:e2});ht({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:n}=t,r=e[0],o=xt.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:nu(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:o}}});ht({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,breakOnTokenText:o}=t,{mode:l}=n,h=n.parseExpression(!0,o),c="math"+r.slice(1);return{type:"font",mode:l,font:c,body:{type:"ordgroup",mode:n.mode,body:h}}},htmlBuilder:Q3,mathmlBuilder:e2});var t2=(t,e)=>{var n=e;return t==="display"?n=n.id>=At.SCRIPT.id?n.text():At.DISPLAY:t==="text"&&n.size===At.DISPLAY.size?n=At.TEXT:t==="script"?n=At.SCRIPT:t==="scriptscript"&&(n=At.SCRIPTSCRIPT),n},h1=(t,e)=>{var n=t2(t.size,e.style),r=n.fracNum(),o=n.fracDen(),l;l=e.havingStyle(r);var h=Yt(t.numer,l,e);if(t.continued){var c=8.5/e.fontMetrics().ptPerEm,p=3.5/e.fontMetrics().ptPerEm;h.height=h.height<c?c:h.height,h.depth=h.depth<p?p:h.depth}l=e.havingStyle(o);var v=Yt(t.denom,l,e),b,g,m;t.hasBarLine?(t.barSize?(g=Dn(t.barSize,e),b=Ee.makeLineSpan("frac-line",e,g)):b=Ee.makeLineSpan("frac-line",e),g=b.height,m=b.height):(b=null,g=0,m=e.fontMetrics().defaultRuleThickness);var x,w,S;n.size===At.DISPLAY.size||t.size==="display"?(x=e.fontMetrics().num1,g>0?w=3*m:w=7*m,S=e.fontMetrics().denom1):(g>0?(x=e.fontMetrics().num2,w=m):(x=e.fontMetrics().num3,w=3*m),S=e.fontMetrics().denom2);var k;if(b){var T=e.fontMetrics().axisHeight;x-h.depth-(T+.5*g)<w&&(x+=w-(x-h.depth-(T+.5*g))),T-.5*g-(v.height-S)<w&&(S+=w-(T-.5*g-(v.height-S)));var A=-(T-.5*g);k=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:S},{type:"elem",elem:b,shift:A},{type:"elem",elem:h,shift:-x}]},e)}else{var C=x-h.depth-(v.height-S);C<w&&(x+=.5*(w-C),S+=.5*(w-C)),k=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:S},{type:"elem",elem:h,shift:-x}]},e)}l=e.havingStyle(n),k.height*=l.sizeMultiplier/e.sizeMultiplier,k.depth*=l.sizeMultiplier/e.sizeMultiplier;var M;n.size===At.DISPLAY.size?M=e.fontMetrics().delim1:n.size===At.SCRIPTSCRIPT.size?M=e.havingStyle(At.SCRIPT).fontMetrics().delim2:M=e.fontMetrics().delim2;var y,N;return t.leftDelim==null?y=Pl(e,["mopen"]):y=ka.customSizedDelim(t.leftDelim,M,!0,e.havingStyle(n),t.mode,["mopen"]),t.continued?N=Ee.makeSpan([]):t.rightDelim==null?N=Pl(e,["mclose"]):N=ka.customSizedDelim(t.rightDelim,M,!0,e.havingStyle(n),t.mode,["mclose"]),Ee.makeSpan(["mord"].concat(l.sizingClasses(e)),[y,Ee.makeSpan(["mfrac"],[k]),N],e)},p1=(t,e)=>{var n=new Ye.MathNode("mfrac",[bn(t.numer,e),bn(t.denom,e)]);if(!t.hasBarLine)n.setAttribute("linethickness","0px");else if(t.barSize){var r=Dn(t.barSize,e);n.setAttribute("linethickness",ot(r))}var o=t2(t.size,e.style);if(o.size!==e.style.size){n=new Ye.MathNode("mstyle",[n]);var l=o.size===At.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",l),n.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var h=[];if(t.leftDelim!=null){var c=new Ye.MathNode("mo",[new Ye.TextNode(t.leftDelim.replace("\\",""))]);c.setAttribute("fence","true"),h.push(c)}if(h.push(n),t.rightDelim!=null){var p=new Ye.MathNode("mo",[new Ye.TextNode(t.rightDelim.replace("\\",""))]);p.setAttribute("fence","true"),h.push(p)}return r1(h)}return n};ht({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=e[1],h,c=null,p=null,v="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":h=!0;break;case"\\\\atopfrac":h=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":h=!1,c="(",p=")";break;case"\\\\bracefrac":h=!1,c="\\{",p="\\}";break;case"\\\\brackfrac":h=!1,c="[",p="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":v="display";break;case"\\tfrac":case"\\tbinom":v="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:o,denom:l,hasBarLine:h,leftDelim:c,rightDelim:p,size:v,barSize:null}},htmlBuilder:h1,mathmlBuilder:p1});ht({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=e[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:o,denom:l,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});ht({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:n,token:r}=t,o;switch(n){case"\\over":o="\\frac";break;case"\\choose":o="\\binom";break;case"\\atop":o="\\\\atopfrac";break;case"\\brace":o="\\\\bracefrac";break;case"\\brack":o="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:o,token:r}}});var Og=["display","text","script","scriptscript"],Hg=function(e){var n=null;return e.length>0&&(n=e,n=n==="."?null:n),n};ht({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:n}=t,r=e[4],o=e[5],l=kc(e[0]),h=l.type==="atom"&&l.family==="open"?Hg(l.text):null,c=kc(e[1]),p=c.type==="atom"&&c.family==="close"?Hg(c.text):null,v=qt(e[2],"size"),b,g=null;v.isBlank?b=!0:(g=v.value,b=g.number>0);var m="auto",x=e[3];if(x.type==="ordgroup"){if(x.body.length>0){var w=qt(x.body[0],"textord");m=Og[Number(w.text)]}}else x=qt(x,"textord"),m=Og[Number(x.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:o,continued:!1,hasBarLine:b,barSize:g,leftDelim:h,rightDelim:p,size:m}},htmlBuilder:h1,mathmlBuilder:p1});ht({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:n,funcName:r,token:o}=t;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:qt(e[0],"size").value,token:o}}});ht({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=lS(qt(e[1],"infix").size),h=e[2],c=l.number>0;return{type:"genfrac",mode:n.mode,numer:o,denom:h,continued:!1,hasBarLine:c,barSize:l,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:h1,mathmlBuilder:p1});var n2=(t,e)=>{var n=e.style,r,o;t.type==="supsub"?(r=t.sup?Yt(t.sup,e.havingStyle(n.sup()),e):Yt(t.sub,e.havingStyle(n.sub()),e),o=qt(t.base,"horizBrace")):o=qt(t,"horizBrace");var l=Yt(o.base,e.havingBaseStyle(At.DISPLAY)),h=_a.svgSpan(o,e),c;if(o.isOver?(c=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:h}]},e),c.children[0].children[0].children[1].classes.push("svg-align")):(c=Ee.makeVList({positionType:"bottom",positionData:l.depth+.1+h.height,children:[{type:"elem",elem:h},{type:"kern",size:.1},{type:"elem",elem:l}]},e),c.children[0].children[0].children[0].classes.push("svg-align")),r){var p=Ee.makeSpan(["mord",o.isOver?"mover":"munder"],[c],e);o.isOver?c=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:p},{type:"kern",size:.2},{type:"elem",elem:r}]},e):c=Ee.makeVList({positionType:"bottom",positionData:p.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:p}]},e)}return Ee.makeSpan(["mord",o.isOver?"mover":"munder"],[c],e)},RE=(t,e)=>{var n=_a.mathMLnode(t.label);return new Ye.MathNode(t.isOver?"mover":"munder",[bn(t.base,e),n])};ht({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:n2,mathmlBuilder:RE});ht({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[1],o=qt(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:n.mode,href:o,body:qn(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var n=Qn(t.body,e,!1);return Ee.makeAnchor(t.href,[],n,e)},mathmlBuilder:(t,e)=>{var n=ro(t.body,e);return n instanceof Vr||(n=new Vr("mrow",[n])),n.setAttribute("href",t.href),n}});ht({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=qt(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var o=[],l=0;l<r.length;l++){var h=r[l];h==="~"&&(h="\\textasciitilde"),o.push({type:"textord",mode:"text",text:h})}var c={type:"text",mode:n.mode,font:"\\texttt",body:o};return{type:"href",mode:n.mode,href:r,body:qn(c)}}});ht({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:n}=t;return{type:"hbox",mode:n.mode,body:qn(e[0])}},htmlBuilder(t,e){var n=Qn(t.body,e,!1);return Ee.makeFragment(n)},mathmlBuilder(t,e){return new Ye.MathNode("mrow",Rr(t.body,e))}});ht({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,token:o}=t,l=qt(e[0],"raw").string,h=e[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c,p={};switch(r){case"\\htmlClass":p.class=l,c={command:"\\htmlClass",class:l};break;case"\\htmlId":p.id=l,c={command:"\\htmlId",id:l};break;case"\\htmlStyle":p.style=l,c={command:"\\htmlStyle",style:l};break;case"\\htmlData":{for(var v=l.split(","),b=0;b<v.length;b++){var g=v[b].split("=");if(g.length!==2)throw new Qe("Error parsing key-value for \\htmlData");p["data-"+g[0].trim()]=g[1].trim()}c={command:"\\htmlData",attributes:p};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(c)?{type:"html",mode:n.mode,attributes:p,body:qn(h)}:n.formatUnsupportedCmd(r)},htmlBuilder:(t,e)=>{var n=Qn(t.body,e,!1),r=["enclosing"];t.attributes.class&&r.push(...t.attributes.class.trim().split(/\s+/));var o=Ee.makeSpan(r,n,e);for(var l in t.attributes)l!=="class"&&t.attributes.hasOwnProperty(l)&&o.setAttribute(l,t.attributes[l]);return o},mathmlBuilder:(t,e)=>ro(t.body,e)});ht({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"htmlmathml",mode:n.mode,html:qn(e[0]),mathml:qn(e[1])}},htmlBuilder:(t,e)=>{var n=Qn(t.html,e,!1);return Ee.makeFragment(n)},mathmlBuilder:(t,e)=>ro(t.mathml,e)});var wh=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!n)throw new Qe("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!x3(r))throw new Qe("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ht({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{var{parser:r}=t,o={number:0,unit:"em"},l={number:.9,unit:"em"},h={number:0,unit:"em"},c="";if(n[0])for(var p=qt(n[0],"raw").string,v=p.split(","),b=0;b<v.length;b++){var g=v[b].split("=");if(g.length===2){var m=g[1].trim();switch(g[0].trim()){case"alt":c=m;break;case"width":o=wh(m);break;case"height":l=wh(m);break;case"totalheight":h=wh(m);break;default:throw new Qe("Invalid key: '"+g[0]+"' in \\includegraphics.")}}}var x=qt(e[0],"url").url;return c===""&&(c=x,c=c.replace(/^.*[\\/]/,""),c=c.substring(0,c.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:x})?{type:"includegraphics",mode:r.mode,alt:c,width:o,height:l,totalheight:h,src:x}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var n=Dn(t.height,e),r=0;t.totalheight.number>0&&(r=Dn(t.totalheight,e)-n);var o=0;t.width.number>0&&(o=Dn(t.width,e));var l={height:ot(n+r)};o>0&&(l.width=ot(o)),r>0&&(l.verticalAlign=ot(-r));var h=new RS(t.src,t.alt,l);return h.height=n,h.depth=r,h},mathmlBuilder:(t,e)=>{var n=new Ye.MathNode("mglyph",[]);n.setAttribute("alt",t.alt);var r=Dn(t.height,e),o=0;if(t.totalheight.number>0&&(o=Dn(t.totalheight,e)-r,n.setAttribute("valign",ot(-o))),n.setAttribute("height",ot(r+o)),t.width.number>0){var l=Dn(t.width,e);n.setAttribute("width",ot(l))}return n.setAttribute("src",t.src),n}});ht({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,o=qt(e[0],"size");if(n.settings.strict){var l=r[1]==="m",h=o.value.unit==="mu";l?(h||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+o.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):h&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:o.value}},htmlBuilder(t,e){return Ee.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var n=Dn(t.dimension,e);return new Ye.SpaceNode(n)}});ht({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:o}},htmlBuilder:(t,e)=>{var n;t.alignment==="clap"?(n=Ee.makeSpan([],[Yt(t.body,e)]),n=Ee.makeSpan(["inner"],[n],e)):n=Ee.makeSpan(["inner"],[Yt(t.body,e)]);var r=Ee.makeSpan(["fix"],[]),o=Ee.makeSpan([t.alignment],[n,r],e),l=Ee.makeSpan(["strut"]);return l.style.height=ot(o.height+o.depth),o.depth&&(l.style.verticalAlign=ot(-o.depth)),o.children.unshift(l),o=Ee.makeSpan(["thinbox"],[o],e),Ee.makeSpan(["mord","vbox"],[o],e)},mathmlBuilder:(t,e)=>{var n=new Ye.MathNode("mpadded",[bn(t.body,e)]);if(t.alignment!=="rlap"){var r=t.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});ht({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:n,parser:r}=t,o=r.mode;r.switchMode("math");var l=n==="\\("?"\\)":"$",h=r.parseExpression(!1,l);return r.expect(l),r.switchMode(o),{type:"styling",mode:r.mode,style:"text",body:h}}});ht({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new Qe("Mismatched "+t.funcName)}});var Pg=(t,e)=>{switch(e.style.size){case At.DISPLAY.size:return t.display;case At.TEXT.size:return t.text;case At.SCRIPT.size:return t.script;case At.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};ht({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"mathchoice",mode:n.mode,display:qn(e[0]),text:qn(e[1]),script:qn(e[2]),scriptscript:qn(e[3])}},htmlBuilder:(t,e)=>{var n=Pg(t,e),r=Qn(n,e,!1);return Ee.makeFragment(r)},mathmlBuilder:(t,e)=>{var n=Pg(t,e);return ro(n,e)}});var r2=(t,e,n,r,o,l,h)=>{t=Ee.makeSpan([],[t]);var c=n&&xt.isCharacterBox(n),p,v;if(e){var b=Yt(e,r.havingStyle(o.sup()),r);v={elem:b,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-b.depth)}}if(n){var g=Yt(n,r.havingStyle(o.sub()),r);p={elem:g,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-g.height)}}var m;if(v&&p){var x=r.fontMetrics().bigOpSpacing5+p.elem.height+p.elem.depth+p.kern+t.depth+h;m=Ee.makeVList({positionType:"bottom",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:ot(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:ot(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(p){var w=t.height-h;m=Ee.makeVList({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:ot(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t}]},r)}else if(v){var S=t.depth+h;m=Ee.makeVList({positionType:"bottom",positionData:S,children:[{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:ot(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return t;var k=[m];if(p&&l!==0&&!c){var C=Ee.makeSpan(["mspace"],[],r);C.style.marginRight=ot(l),k.unshift(C)}return Ee.makeSpan(["mop","op-limits"],k,r)},i2=["\\smallint"],ms=(t,e)=>{var n,r,o=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=qt(t.base,"op"),o=!0):l=qt(t,"op");var h=e.style,c=!1;h.size===At.DISPLAY.size&&l.symbol&&!xt.contains(i2,l.name)&&(c=!0);var p;if(l.symbol){var v=c?"Size2-Regular":"Size1-Regular",b="";if((l.name==="\\oiint"||l.name==="\\oiiint")&&(b=l.name.slice(1),l.name=b==="oiint"?"\\iint":"\\iiint"),p=Ee.makeSymbol(l.name,v,"math",e,["mop","op-symbol",c?"large-op":"small-op"]),b.length>0){var g=p.italic,m=Ee.staticSvg(b+"Size"+(c?"2":"1"),e);p=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:p,shift:0},{type:"elem",elem:m,shift:c?.08:0}]},e),l.name="\\"+b,p.classes.unshift("mop"),p.italic=g}}else if(l.body){var x=Qn(l.body,e,!0);x.length===1&&x[0]instanceof ci?(p=x[0],p.classes[0]="mop"):p=Ee.makeSpan(["mop"],x,e)}else{for(var w=[],S=1;S<l.name.length;S++)w.push(Ee.mathsym(l.name[S],l.mode,e));p=Ee.makeSpan(["mop"],w,e)}var k=0,C=0;return(p instanceof ci||l.name==="\\oiint"||l.name==="\\oiiint")&&!l.suppressBaseShift&&(k=(p.height-p.depth)/2-e.fontMetrics().axisHeight,C=p.italic),o?r2(p,n,r,e,h,C,k):(k&&(p.style.position="relative",p.style.top=ot(k)),p)},Yl=(t,e)=>{var n;if(t.symbol)n=new Vr("mo",[ui(t.name,t.mode)]),xt.contains(i2,t.name)&&n.setAttribute("largeop","false");else if(t.body)n=new Vr("mo",Rr(t.body,e));else{n=new Vr("mi",[new $i(t.name.slice(1))]);var r=new Vr("mo",[ui("","text")]);t.parentIsSupSub?n=new Vr("mrow",[n,r]):n=D3([n,r])}return n},IE={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","":"\\bigvee","⋂":"\\bigcap","":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ht({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","","⋂","","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=r;return o.length===1&&(o=IE[o]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:ms,mathmlBuilder:Yl});ht({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:qn(r)}},htmlBuilder:ms,mathmlBuilder:Yl});var OE={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ht({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ms,mathmlBuilder:Yl});ht({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ms,mathmlBuilder:Yl});ht({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t,r=n;return r.length===1&&(r=OE[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:ms,mathmlBuilder:Yl});var a2=(t,e)=>{var n,r,o=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=qt(t.base,"operatorname"),o=!0):l=qt(t,"operatorname");var h;if(l.body.length>0){for(var c=l.body.map(g=>{var m=g.text;return typeof m=="string"?{type:"textord",mode:g.mode,text:m}:g}),p=Qn(c,e.withFont("mathrm"),!0),v=0;v<p.length;v++){var b=p[v];b instanceof ci&&(b.text=b.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}h=Ee.makeSpan(["mop"],p,e)}else h=Ee.makeSpan(["mop"],[],e);return o?r2(h,n,r,e,e.style,0,0):h},HE=(t,e)=>{for(var n=Rr(t.body,e.withFont("mathrm")),r=!0,o=0;o<n.length;o++){var l=n[o];if(!(l instanceof Ye.SpaceNode))if(l instanceof Ye.MathNode)switch(l.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var h=l.children[0];l.children.length===1&&h instanceof Ye.TextNode?h.text=h.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){var c=n.map(b=>b.toText()).join("");n=[new Ye.TextNode(c)]}var p=new Ye.MathNode("mi",n);p.setAttribute("mathvariant","normal");var v=new Ye.MathNode("mo",[ui("","text")]);return t.parentIsSupSub?new Ye.MathNode("mrow",[p,v]):Ye.newDocumentFragment([p,v])};ht({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"operatorname",mode:n.mode,body:qn(o),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:a2,mathmlBuilder:HE});W("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");jo({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Ee.makeFragment(Qn(t.body,e,!1)):Ee.makeSpan(["mord"],Qn(t.body,e,!0),e)},mathmlBuilder(t,e){return ro(t.body,e,!0)}});ht({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:n}=t,r=e[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(t,e){var n=Yt(t.body,e.havingCrampedStyle()),r=Ee.makeLineSpan("overline-line",e),o=e.fontMetrics().defaultRuleThickness,l=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r},{type:"kern",size:o}]},e);return Ee.makeSpan(["mord","overline"],[l],e)},mathmlBuilder(t,e){var n=new Ye.MathNode("mo",[new Ye.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ye.MathNode("mover",[bn(t.body,e),n]);return r.setAttribute("accent","true"),r}});ht({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"phantom",mode:n.mode,body:qn(r)}},htmlBuilder:(t,e)=>{var n=Qn(t.body,e.withPhantom(),!1);return Ee.makeFragment(n)},mathmlBuilder:(t,e)=>{var n=Rr(t.body,e);return new Ye.MathNode("mphantom",n)}});ht({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(t,e)=>{var n=Ee.makeSpan([],[Yt(t.body,e.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e),Ee.makeSpan(["mord"],[n],e)},mathmlBuilder:(t,e)=>{var n=Rr(qn(t.body),e),r=new Ye.MathNode("mphantom",n),o=new Ye.MathNode("mpadded",[r]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}});ht({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(t,e)=>{var n=Ee.makeSpan(["inner"],[Yt(t.body,e.withPhantom())]),r=Ee.makeSpan(["fix"],[]);return Ee.makeSpan(["mord","rlap"],[n,r],e)},mathmlBuilder:(t,e)=>{var n=Rr(qn(t.body),e),r=new Ye.MathNode("mphantom",n),o=new Ye.MathNode("mpadded",[r]);return o.setAttribute("width","0px"),o}});ht({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t,r=qt(e[0],"size").value,o=e[1];return{type:"raisebox",mode:n.mode,dy:r,body:o}},htmlBuilder(t,e){var n=Yt(t.body,e),r=Dn(t.dy,e);return Ee.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){var n=new Ye.MathNode("mpadded",[bn(t.body,e)]),r=t.dy.number+t.dy.unit;return n.setAttribute("voffset",r),n}});ht({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});ht({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,n){var{parser:r}=t,o=n[0],l=qt(e[0],"size"),h=qt(e[1],"size");return{type:"rule",mode:r.mode,shift:o&&qt(o,"size").value,width:l.value,height:h.value}},htmlBuilder(t,e){var n=Ee.makeSpan(["mord","rule"],[],e),r=Dn(t.width,e),o=Dn(t.height,e),l=t.shift?Dn(t.shift,e):0;return n.style.borderRightWidth=ot(r),n.style.borderTopWidth=ot(o),n.style.bottom=ot(l),n.width=r,n.height=o+l,n.depth=-l,n.maxFontSize=o*1.125*e.sizeMultiplier,n},mathmlBuilder(t,e){var n=Dn(t.width,e),r=Dn(t.height,e),o=t.shift?Dn(t.shift,e):0,l=e.color&&e.getColor()||"black",h=new Ye.MathNode("mspace");h.setAttribute("mathbackground",l),h.setAttribute("width",ot(n)),h.setAttribute("height",ot(r));var c=new Ye.MathNode("mpadded",[h]);return o>=0?c.setAttribute("height",ot(o)):(c.setAttribute("height",ot(o)),c.setAttribute("depth",ot(-o))),c.setAttribute("voffset",ot(o)),c}});function o2(t,e,n){for(var r=Qn(t,e,!1),o=e.sizeMultiplier/n.sizeMultiplier,l=0;l<r.length;l++){var h=r[l].classes.indexOf("sizing");h<0?Array.prototype.push.apply(r[l].classes,e.sizingClasses(n)):r[l].classes[h+1]==="reset-size"+e.size&&(r[l].classes[h+1]="reset-size"+n.size),r[l].height*=o,r[l].depth*=o}return Ee.makeFragment(r)}var zg=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],PE=(t,e)=>{var n=e.havingSize(t.size);return o2(t.body,n,e)};ht({type:"sizing",names:zg,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:n,funcName:r,parser:o}=t,l=o.parseExpression(!1,n);return{type:"sizing",mode:o.mode,size:zg.indexOf(r)+1,body:l}},htmlBuilder:PE,mathmlBuilder:(t,e)=>{var n=e.havingSize(t.size),r=Rr(t.body,n),o=new Ye.MathNode("mstyle",r);return o.setAttribute("mathsize",ot(n.sizeMultiplier)),o}});ht({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,n)=>{var{parser:r}=t,o=!1,l=!1,h=n[0]&&qt(n[0],"ordgroup");if(h)for(var c="",p=0;p<h.body.length;++p){var v=h.body[p];if(c=v.text,c==="t")o=!0;else if(c==="b")l=!0;else{o=!1,l=!1;break}}else o=!0,l=!0;var b=e[0];return{type:"smash",mode:r.mode,body:b,smashHeight:o,smashDepth:l}},htmlBuilder:(t,e)=>{var n=Ee.makeSpan([],[Yt(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return n;if(t.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(t.smashDepth&&(n.depth=0,n.children))for(var o=0;o<n.children.length;o++)n.children[o].depth=0;var l=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e);return Ee.makeSpan(["mord"],[l],e)},mathmlBuilder:(t,e)=>{var n=new Ye.MathNode("mpadded",[bn(t.body,e)]);return t.smashHeight&&n.setAttribute("height","0px"),t.smashDepth&&n.setAttribute("depth","0px"),n}});ht({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r}=t,o=n[0],l=e[0];return{type:"sqrt",mode:r.mode,body:l,index:o}},htmlBuilder(t,e){var n=Yt(t.body,e.havingCrampedStyle());n.height===0&&(n.height=e.fontMetrics().xHeight),n=Ee.wrapFragment(n,e);var r=e.fontMetrics(),o=r.defaultRuleThickness,l=o;e.style.id<At.TEXT.id&&(l=e.fontMetrics().xHeight);var h=o+l/4,c=n.height+n.depth+h+o,{span:p,ruleWidth:v,advanceWidth:b}=ka.sqrtImage(c,e),g=p.height-v;g>n.height+n.depth+h&&(h=(h+g-n.height-n.depth)/2);var m=p.height-n.height-h-v;n.style.paddingLeft=ot(b);var x=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+m)},{type:"elem",elem:p},{type:"kern",size:v}]},e);if(t.index){var w=e.havingStyle(At.SCRIPTSCRIPT),S=Yt(t.index,w,e),k=.6*(x.height-x.depth),C=Ee.makeVList({positionType:"shift",positionData:-k,children:[{type:"elem",elem:S}]},e),T=Ee.makeSpan(["root"],[C]);return Ee.makeSpan(["mord","sqrt"],[T,x],e)}else return Ee.makeSpan(["mord","sqrt"],[x],e)},mathmlBuilder(t,e){var{body:n,index:r}=t;return r?new Ye.MathNode("mroot",[bn(n,e),bn(r,e)]):new Ye.MathNode("msqrt",[bn(n,e)])}});var Bg={display:At.DISPLAY,text:At.TEXT,script:At.SCRIPT,scriptscript:At.SCRIPTSCRIPT};ht({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:n,funcName:r,parser:o}=t,l=o.parseExpression(!0,n),h=r.slice(1,r.length-5);return{type:"styling",mode:o.mode,style:h,body:l}},htmlBuilder(t,e){var n=Bg[t.style],r=e.havingStyle(n).withFont("");return o2(t.body,r,e)},mathmlBuilder(t,e){var n=Bg[t.style],r=e.havingStyle(n),o=Rr(t.body,r),l=new Ye.MathNode("mstyle",o),h={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},c=h[t.style];return l.setAttribute("scriptlevel",c[0]),l.setAttribute("displaystyle",c[1]),l}});var zE=function(e,n){var r=e.base;if(r)if(r.type==="op"){var o=r.limits&&(n.style.size===At.DISPLAY.size||r.alwaysHandleSupSub);return o?ms:null}else if(r.type==="operatorname"){var l=r.alwaysHandleSupSub&&(n.style.size===At.DISPLAY.size||r.limits);return l?a2:null}else{if(r.type==="accent")return xt.isCharacterBox(r.base)?o1:null;if(r.type==="horizBrace"){var h=!e.sub;return h===r.isOver?n2:null}else return null}else return null};jo({type:"supsub",htmlBuilder(t,e){var n=zE(t,e);if(n)return n(t,e);var{base:r,sup:o,sub:l}=t,h=Yt(r,e),c,p,v=e.fontMetrics(),b=0,g=0,m=r&&xt.isCharacterBox(r);if(o){var x=e.havingStyle(e.style.sup());c=Yt(o,x,e),m||(b=h.height-x.fontMetrics().supDrop*x.sizeMultiplier/e.sizeMultiplier)}if(l){var w=e.havingStyle(e.style.sub());p=Yt(l,w,e),m||(g=h.depth+w.fontMetrics().subDrop*w.sizeMultiplier/e.sizeMultiplier)}var S;e.style===At.DISPLAY?S=v.sup1:e.style.cramped?S=v.sup3:S=v.sup2;var k=e.sizeMultiplier,C=ot(.5/v.ptPerEm/k),T=null;if(p){var A=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(h instanceof ci||A)&&(T=ot(-h.italic))}var M;if(c&&p){b=Math.max(b,S,c.depth+.25*v.xHeight),g=Math.max(g,v.sub2);var y=v.defaultRuleThickness,N=4*y;if(b-c.depth-(p.height-g)<N){g=N-(b-c.depth)+p.height;var z=.8*v.xHeight-(b-c.depth);z>0&&(b+=z,g-=z)}var F=[{type:"elem",elem:p,shift:g,marginRight:C,marginLeft:T},{type:"elem",elem:c,shift:-b,marginRight:C}];M=Ee.makeVList({positionType:"individualShift",children:F},e)}else if(p){g=Math.max(g,v.sub1,p.height-.8*v.xHeight);var P=[{type:"elem",elem:p,marginLeft:T,marginRight:C}];M=Ee.makeVList({positionType:"shift",positionData:g,children:P},e)}else if(c)b=Math.max(b,S,c.depth+.25*v.xHeight),M=Ee.makeVList({positionType:"shift",positionData:-b,children:[{type:"elem",elem:c,marginRight:C}]},e);else throw new Error("supsub must have either sup or sub.");var Y=mp(h,"right")||"mord";return Ee.makeSpan([Y],[h,Ee.makeSpan(["msupsub"],[M])],e)},mathmlBuilder(t,e){var n=!1,r,o;t.base&&t.base.type==="horizBrace"&&(o=!!t.sup,o===t.base.isOver&&(n=!0,r=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var l=[bn(t.base,e)];t.sub&&l.push(bn(t.sub,e)),t.sup&&l.push(bn(t.sup,e));var h;if(n)h=r?"mover":"munder";else if(t.sub)if(t.sup){var v=t.base;v&&v.type==="op"&&v.limits&&e.style===At.DISPLAY||v&&v.type==="operatorname"&&v.alwaysHandleSupSub&&(e.style===At.DISPLAY||v.limits)?h="munderover":h="msubsup"}else{var p=t.base;p&&p.type==="op"&&p.limits&&(e.style===At.DISPLAY||p.alwaysHandleSupSub)||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(p.limits||e.style===At.DISPLAY)?h="munder":h="msub"}else{var c=t.base;c&&c.type==="op"&&c.limits&&(e.style===At.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===At.DISPLAY)?h="mover":h="msup"}return new Ye.MathNode(h,l)}});jo({type:"atom",htmlBuilder(t,e){return Ee.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var n=new Ye.MathNode("mo",[ui(t.text,t.mode)]);if(t.family==="bin"){var r=i1(t,e);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else t.family==="punct"?n.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&n.setAttribute("stretchy","false");return n}});var s2={mi:"italic",mn:"normal",mtext:"normal"};jo({type:"mathord",htmlBuilder(t,e){return Ee.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var n=new Ye.MathNode("mi",[ui(t.text,t.mode,e)]),r=i1(t,e)||"italic";return r!==s2[n.type]&&n.setAttribute("mathvariant",r),n}});jo({type:"textord",htmlBuilder(t,e){return Ee.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var n=ui(t.text,t.mode,e),r=i1(t,e)||"normal",o;return t.mode==="text"?o=new Ye.MathNode("mtext",[n]):/[0-9]/.test(t.text)?o=new Ye.MathNode("mn",[n]):t.text==="\\prime"?o=new Ye.MathNode("mo",[n]):o=new Ye.MathNode("mi",[n]),r!==s2[o.type]&&o.setAttribute("mathvariant",r),o}});var xh={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},kh={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};jo({type:"spacing",htmlBuilder(t,e){if(kh.hasOwnProperty(t.text)){var n=kh[t.text].className||"";if(t.mode==="text"){var r=Ee.makeOrd(t,e,"textord");return r.classes.push(n),r}else return Ee.makeSpan(["mspace",n],[Ee.mathsym(t.text,t.mode,e)],e)}else{if(xh.hasOwnProperty(t.text))return Ee.makeSpan(["mspace",xh[t.text]],[],e);throw new Qe('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var n;if(kh.hasOwnProperty(t.text))n=new Ye.MathNode("mtext",[new Ye.TextNode(" ")]);else{if(xh.hasOwnProperty(t.text))return new Ye.MathNode("mspace");throw new Qe('Unknown type of space "'+t.text+'"')}return n}});var Fg=()=>{var t=new Ye.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};jo({type:"tag",mathmlBuilder(t,e){var n=new Ye.MathNode("mtable",[new Ye.MathNode("mtr",[Fg(),new Ye.MathNode("mtd",[ro(t.body,e)]),Fg(),new Ye.MathNode("mtd",[ro(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var qg={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},jg={"\\textbf":"textbf","\\textmd":"textmd"},BE={"\\textit":"textit","\\textup":"textup"},$g=(t,e)=>{var n=t.font;if(n){if(qg[n])return e.withTextFontFamily(qg[n]);if(jg[n])return e.withTextFontWeight(jg[n]);if(n==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(BE[n])};ht({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"text",mode:n.mode,body:qn(o),font:r}},htmlBuilder(t,e){var n=$g(t,e),r=Qn(t.body,n,!0);return Ee.makeSpan(["mord","text"],r,n)},mathmlBuilder(t,e){var n=$g(t,e);return ro(t.body,n)}});ht({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"underline",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Yt(t.body,e),r=Ee.makeLineSpan("underline-line",e),o=e.fontMetrics().defaultRuleThickness,l=Ee.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:o},{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n}]},e);return Ee.makeSpan(["mord","underline"],[l],e)},mathmlBuilder(t,e){var n=new Ye.MathNode("mo",[new Ye.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ye.MathNode("munder",[bn(t.body,e),n]);return r.setAttribute("accentunder","true"),r}});ht({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"vcenter",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Yt(t.body,e),r=e.fontMetrics().axisHeight,o=.5*(n.height-r-(n.depth+r));return Ee.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){return new Ye.MathNode("mpadded",[bn(t.body,e)],["vcenter"])}});ht({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,n){throw new Qe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var n=Ug(t),r=[],o=e.havingStyle(e.style.text()),l=0;l<n.length;l++){var h=n[l];h==="~"&&(h="\\textasciitilde"),r.push(Ee.makeSymbol(h,"Typewriter-Regular",t.mode,o,["mord","texttt"]))}return Ee.makeSpan(["mord","text"].concat(o.sizingClasses(e)),Ee.tryCombineChars(r),o)},mathmlBuilder(t,e){var n=new Ye.TextNode(Ug(t)),r=new Ye.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var Ug=t=>t.body.replace(/ /g,t.star?"␣":" "),Ga=_3,l2=`[ \r
]`,FE="\\\\[a-zA-Z@]+",qE="\\\\[^\uD800-\uDFFF]",jE="("+FE+")"+l2+"*",$E=`\\\\(
|[ \r ]+
?)[ \r ]*`,yp="[̀-ͯ]",UE=new RegExp(yp+"+$"),VE="("+l2+"+)|"+($E+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(yp+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(yp+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+jE)+("|"+qE+")");class Vg{constructor(e,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=n,this.tokenRegex=new RegExp(VE,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,n){this.catcodes[e]=n}lex(){var e=this.input,n=this.tokenRegex.lastIndex;if(n===e.length)return new ai("EOF",new $r(this,n,n));var r=this.tokenRegex.exec(e);if(r===null||r.index!==n)throw new Qe("Unexpected character: '"+e[n]+"'",new ai(e[n],new $r(this,n,n+1)));var o=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[o]===14){var l=e.indexOf(`
`,this.tokenRegex.lastIndex);return l===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=l+1,this.lex()}return new ai(o,new $r(this,n,this.tokenRegex.lastIndex))}}class WE{constructor(e,n){e===void 0&&(e={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Qe("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var n in e)e.hasOwnProperty(n)&&(e[n]==null?delete this.current[n]:this.current[n]=e[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,n,r){if(r===void 0&&(r=!1),r){for(var o=0;o<this.undefStack.length;o++)delete this.undefStack[o][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=n)}else{var l=this.undefStack[this.undefStack.length-1];l&&!l.hasOwnProperty(e)&&(l[e]=this.current[e])}n==null?delete this.current[e]:this.current[e]=n}}var GE=Y3;W("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});W("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});W("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});W("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});W("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var n=t.future();return e[0].length===1&&e[0][0].text===n.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});W("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");W("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Wg={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};W("\\char",function(t){var e=t.popToken(),n,r="";if(e.text==="'")n=8,e=t.popToken();else if(e.text==='"')n=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")r=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new Qe("\\char` missing argument");r=e.text.charCodeAt(0)}else n=10;if(n){if(r=Wg[e.text],r==null||r>=n)throw new Qe("Invalid base-"+n+" digit "+e.text);for(var o;(o=Wg[t.future().text])!=null&&o<n;)r*=n,r+=o,t.popToken()}return"\\@char{"+r+"}"});var f1=(t,e,n,r)=>{var o=t.consumeArg().tokens;if(o.length!==1)throw new Qe("\\newcommand's first argument must be a macro name");var l=o[0].text,h=t.isDefined(l);if(h&&!e)throw new Qe("\\newcommand{"+l+"} attempting to redefine "+(l+"; use \\renewcommand"));if(!h&&!n)throw new Qe("\\renewcommand{"+l+"} when command "+l+" does not yet exist; use \\newcommand");var c=0;if(o=t.consumeArg().tokens,o.length===1&&o[0].text==="["){for(var p="",v=t.expandNextToken();v.text!=="]"&&v.text!=="EOF";)p+=v.text,v=t.expandNextToken();if(!p.match(/^\s*[0-9]+\s*$/))throw new Qe("Invalid number of arguments: "+p);c=parseInt(p),o=t.consumeArg().tokens}return h&&r||t.macros.set(l,{tokens:o,numArgs:c}),""};W("\\newcommand",t=>f1(t,!1,!0,!1));W("\\renewcommand",t=>f1(t,!0,!1,!1));W("\\providecommand",t=>f1(t,!0,!0,!0));W("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(n=>n.text).join("")),""});W("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(n=>n.text).join("")),""});W("\\show",t=>{var e=t.popToken(),n=e.text;return console.log(e,t.macros.get(n),Ga[n],xn.math[n],xn.text[n]),""});W("\\bgroup","{");W("\\egroup","}");W("~","\\nobreakspace");W("\\lq","`");W("\\rq","'");W("\\aa","\\r a");W("\\AA","\\r A");W("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");W("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");W("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");W("","\\mathscr{B}");W("","\\mathscr{E}");W("","\\mathscr{F}");W("","\\mathscr{H}");W("","\\mathscr{I}");W("","\\mathscr{L}");W("","\\mathscr{M}");W("","\\mathscr{R}");W("","\\mathfrak{C}");W("","\\mathfrak{H}");W("","\\mathfrak{Z}");W("\\Bbbk","\\Bbb{k}");W("·","\\cdotp");W("\\llap","\\mathllap{\\textrm{#1}}");W("\\rlap","\\mathrlap{\\textrm{#1}}");W("\\clap","\\mathclap{\\textrm{#1}}");W("\\mathstrut","\\vphantom{(}");W("\\underbar","\\underline{\\text{#1}}");W("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');W("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");W("\\ne","\\neq");W("≠","\\neq");W("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");W("∉","\\notin");W("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");W("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");W("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");W("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");W("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");W("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");W("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");W("⟂","\\perp");W("‼","\\mathclose{!\\mkern-0.8mu!}");W("∌","\\notni");W("⌜","\\ulcorner");W("⌝","\\urcorner");W("⌞","\\llcorner");W("⌟","\\lrcorner");W("©","\\copyright");W("®","\\textregistered");W("","\\textregistered");W("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');W("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');W("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');W("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');W("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");W("⋮","\\vdots");W("\\varGamma","\\mathit{\\Gamma}");W("\\varDelta","\\mathit{\\Delta}");W("\\varTheta","\\mathit{\\Theta}");W("\\varLambda","\\mathit{\\Lambda}");W("\\varXi","\\mathit{\\Xi}");W("\\varPi","\\mathit{\\Pi}");W("\\varSigma","\\mathit{\\Sigma}");W("\\varUpsilon","\\mathit{\\Upsilon}");W("\\varPhi","\\mathit{\\Phi}");W("\\varPsi","\\mathit{\\Psi}");W("\\varOmega","\\mathit{\\Omega}");W("\\substack","\\begin{subarray}{c}#1\\end{subarray}");W("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");W("\\boxed","\\fbox{$\\displaystyle{#1}$}");W("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");W("\\implies","\\DOTSB\\;\\Longrightarrow\\;");W("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");W("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");W("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Gg={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};W("\\dots",function(t){var e="\\dotso",n=t.expandAfterFuture().text;return n in Gg?e=Gg[n]:(n.slice(0,4)==="\\not"||n in xn.math&&xt.contains(["bin","rel"],xn.math[n].group))&&(e="\\dotsb"),e});var m1={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};W("\\dotso",function(t){var e=t.future().text;return e in m1?"\\ldots\\,":"\\ldots"});W("\\dotsc",function(t){var e=t.future().text;return e in m1&&e!==","?"\\ldots\\,":"\\ldots"});W("\\cdots",function(t){var e=t.future().text;return e in m1?"\\@cdots\\,":"\\@cdots"});W("\\dotsb","\\cdots");W("\\dotsm","\\cdots");W("\\dotsi","\\!\\cdots");W("\\dotsx","\\ldots\\,");W("\\DOTSI","\\relax");W("\\DOTSB","\\relax");W("\\DOTSX","\\relax");W("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");W("\\,","\\tmspace+{3mu}{.1667em}");W("\\thinspace","\\,");W("\\>","\\mskip{4mu}");W("\\:","\\tmspace+{4mu}{.2222em}");W("\\medspace","\\:");W("\\;","\\tmspace+{5mu}{.2777em}");W("\\thickspace","\\;");W("\\!","\\tmspace-{3mu}{.1667em}");W("\\negthinspace","\\!");W("\\negmedspace","\\tmspace-{4mu}{.2222em}");W("\\negthickspace","\\tmspace-{5mu}{.277em}");W("\\enspace","\\kern.5em ");W("\\enskip","\\hskip.5em\\relax");W("\\quad","\\hskip1em\\relax");W("\\qquad","\\hskip2em\\relax");W("\\tag","\\@ifstar\\tag@literal\\tag@paren");W("\\tag@paren","\\tag@literal{({#1})}");W("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new Qe("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});W("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");W("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");W("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");W("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");W("\\newline","\\\\\\relax");W("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var c2=ot(ji["Main-Regular"]["T".charCodeAt(0)][1]-.7*ji["Main-Regular"]["A".charCodeAt(0)][1]);W("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+c2+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");W("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+c2+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");W("\\hspace","\\@ifstar\\@hspacer\\@hspace");W("\\@hspace","\\hskip #1\\relax");W("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");W("\\ordinarycolon",":");W("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");W("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');W("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');W("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');W("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');W("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');W("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');W("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');W("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');W("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');W("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');W("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');W("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');W("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');W("∷","\\dblcolon");W("∹","\\eqcolon");W("≔","\\coloneqq");W("≕","\\eqqcolon");W("⩴","\\Coloneqq");W("\\ratio","\\vcentcolon");W("\\coloncolon","\\dblcolon");W("\\colonequals","\\coloneqq");W("\\coloncolonequals","\\Coloneqq");W("\\equalscolon","\\eqqcolon");W("\\equalscoloncolon","\\Eqqcolon");W("\\colonminus","\\coloneq");W("\\coloncolonminus","\\Coloneq");W("\\minuscolon","\\eqcolon");W("\\minuscoloncolon","\\Eqcolon");W("\\coloncolonapprox","\\Colonapprox");W("\\coloncolonsim","\\Colonsim");W("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");W("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");W("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");W("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");W("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");W("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");W("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");W("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");W("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");W("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");W("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");W("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");W("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");W("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");W("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");W("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");W("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");W("\\nleqq","\\html@mathml{\\@nleqq}{≰}");W("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");W("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");W("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");W("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");W("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");W("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");W("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");W("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");W("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");W("\\imath","\\html@mathml{\\@imath}{ı}");W("\\jmath","\\html@mathml{\\@jmath}{ȷ}");W("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");W("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");W("⟦","\\llbracket");W("⟧","\\rrbracket");W("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");W("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");W("⦃","\\lBrace");W("⦄","\\rBrace");W("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");W("⦵","\\minuso");W("\\darr","\\downarrow");W("\\dArr","\\Downarrow");W("\\Darr","\\Downarrow");W("\\lang","\\langle");W("\\rang","\\rangle");W("\\uarr","\\uparrow");W("\\uArr","\\Uparrow");W("\\Uarr","\\Uparrow");W("\\N","\\mathbb{N}");W("\\R","\\mathbb{R}");W("\\Z","\\mathbb{Z}");W("\\alef","\\aleph");W("\\alefsym","\\aleph");W("\\Alpha","\\mathrm{A}");W("\\Beta","\\mathrm{B}");W("\\bull","\\bullet");W("\\Chi","\\mathrm{X}");W("\\clubs","\\clubsuit");W("\\cnums","\\mathbb{C}");W("\\Complex","\\mathbb{C}");W("\\Dagger","\\ddagger");W("\\diamonds","\\diamondsuit");W("\\empty","\\emptyset");W("\\Epsilon","\\mathrm{E}");W("\\Eta","\\mathrm{H}");W("\\exist","\\exists");W("\\harr","\\leftrightarrow");W("\\hArr","\\Leftrightarrow");W("\\Harr","\\Leftrightarrow");W("\\hearts","\\heartsuit");W("\\image","\\Im");W("\\infin","\\infty");W("\\Iota","\\mathrm{I}");W("\\isin","\\in");W("\\Kappa","\\mathrm{K}");W("\\larr","\\leftarrow");W("\\lArr","\\Leftarrow");W("\\Larr","\\Leftarrow");W("\\lrarr","\\leftrightarrow");W("\\lrArr","\\Leftrightarrow");W("\\Lrarr","\\Leftrightarrow");W("\\Mu","\\mathrm{M}");W("\\natnums","\\mathbb{N}");W("\\Nu","\\mathrm{N}");W("\\Omicron","\\mathrm{O}");W("\\plusmn","\\pm");W("\\rarr","\\rightarrow");W("\\rArr","\\Rightarrow");W("\\Rarr","\\Rightarrow");W("\\real","\\Re");W("\\reals","\\mathbb{R}");W("\\Reals","\\mathbb{R}");W("\\Rho","\\mathrm{P}");W("\\sdot","\\cdot");W("\\sect","\\S");W("\\spades","\\spadesuit");W("\\sub","\\subset");W("\\sube","\\subseteq");W("\\supe","\\supseteq");W("\\Tau","\\mathrm{T}");W("\\thetasym","\\vartheta");W("\\weierp","\\wp");W("\\Zeta","\\mathrm{Z}");W("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");W("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");W("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");W("\\bra","\\mathinner{\\langle{#1}|}");W("\\ket","\\mathinner{|{#1}\\rangle}");W("\\braket","\\mathinner{\\langle{#1}\\rangle}");W("\\Bra","\\left\\langle#1\\right|");W("\\Ket","\\left|#1\\right\\rangle");var u2=t=>e=>{var n=e.consumeArg().tokens,r=e.consumeArg().tokens,o=e.consumeArg().tokens,l=e.consumeArg().tokens,h=e.macros.get("|"),c=e.macros.get("\\|");e.macros.beginGroup();var p=g=>m=>{t&&(m.macros.set("|",h),o.length&&m.macros.set("\\|",c));var x=g;if(!g&&o.length){var w=m.future();w.text==="|"&&(m.popToken(),x=!0)}return{tokens:x?o:r,numArgs:0}};e.macros.set("|",p(!1)),o.length&&e.macros.set("\\|",p(!0));var v=e.consumeArg().tokens,b=e.expandTokens([...l,...v,...n]);return e.macros.endGroup(),{tokens:b.reverse(),numArgs:0}};W("\\bra@ket",u2(!1));W("\\bra@set",u2(!0));W("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");W("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");W("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");W("\\angln","{\\angl n}");W("\\blue","\\textcolor{##6495ed}{#1}");W("\\orange","\\textcolor{##ffa500}{#1}");W("\\pink","\\textcolor{##ff00af}{#1}");W("\\red","\\textcolor{##df0030}{#1}");W("\\green","\\textcolor{##28ae7b}{#1}");W("\\gray","\\textcolor{gray}{#1}");W("\\purple","\\textcolor{##9d38bd}{#1}");W("\\blueA","\\textcolor{##ccfaff}{#1}");W("\\blueB","\\textcolor{##80f6ff}{#1}");W("\\blueC","\\textcolor{##63d9ea}{#1}");W("\\blueD","\\textcolor{##11accd}{#1}");W("\\blueE","\\textcolor{##0c7f99}{#1}");W("\\tealA","\\textcolor{##94fff5}{#1}");W("\\tealB","\\textcolor{##26edd5}{#1}");W("\\tealC","\\textcolor{##01d1c1}{#1}");W("\\tealD","\\textcolor{##01a995}{#1}");W("\\tealE","\\textcolor{##208170}{#1}");W("\\greenA","\\textcolor{##b6ffb0}{#1}");W("\\greenB","\\textcolor{##8af281}{#1}");W("\\greenC","\\textcolor{##74cf70}{#1}");W("\\greenD","\\textcolor{##1fab54}{#1}");W("\\greenE","\\textcolor{##0d923f}{#1}");W("\\goldA","\\textcolor{##ffd0a9}{#1}");W("\\goldB","\\textcolor{##ffbb71}{#1}");W("\\goldC","\\textcolor{##ff9c39}{#1}");W("\\goldD","\\textcolor{##e07d10}{#1}");W("\\goldE","\\textcolor{##a75a05}{#1}");W("\\redA","\\textcolor{##fca9a9}{#1}");W("\\redB","\\textcolor{##ff8482}{#1}");W("\\redC","\\textcolor{##f9685d}{#1}");W("\\redD","\\textcolor{##e84d39}{#1}");W("\\redE","\\textcolor{##bc2612}{#1}");W("\\maroonA","\\textcolor{##ffbde0}{#1}");W("\\maroonB","\\textcolor{##ff92c6}{#1}");W("\\maroonC","\\textcolor{##ed5fa6}{#1}");W("\\maroonD","\\textcolor{##ca337c}{#1}");W("\\maroonE","\\textcolor{##9e034e}{#1}");W("\\purpleA","\\textcolor{##ddd7ff}{#1}");W("\\purpleB","\\textcolor{##c6b9fc}{#1}");W("\\purpleC","\\textcolor{##aa87ff}{#1}");W("\\purpleD","\\textcolor{##7854ab}{#1}");W("\\purpleE","\\textcolor{##543b78}{#1}");W("\\mintA","\\textcolor{##f5f9e8}{#1}");W("\\mintB","\\textcolor{##edf2df}{#1}");W("\\mintC","\\textcolor{##e0e5cc}{#1}");W("\\grayA","\\textcolor{##f6f7f7}{#1}");W("\\grayB","\\textcolor{##f0f1f2}{#1}");W("\\grayC","\\textcolor{##e3e5e6}{#1}");W("\\grayD","\\textcolor{##d6d8da}{#1}");W("\\grayE","\\textcolor{##babec2}{#1}");W("\\grayF","\\textcolor{##888d93}{#1}");W("\\grayG","\\textcolor{##626569}{#1}");W("\\grayH","\\textcolor{##3b3e40}{#1}");W("\\grayI","\\textcolor{##21242c}{#1}");W("\\kaBlue","\\textcolor{##314453}{#1}");W("\\kaGreen","\\textcolor{##71B307}{#1}");var d2={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class KE{constructor(e,n,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(e),this.macros=new WE(GE,n.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Vg(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var n,r,o;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:o,end:r}=this.consumeArg(["]"])}else({tokens:o,start:n,end:r}=this.consumeArg());return this.pushToken(new ai("EOF",r.loc)),this.pushTokens(o),n.range(r,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var n=[],r=e&&e.length>0;r||this.consumeSpaces();var o=this.future(),l,h=0,c=0;do{if(l=this.popToken(),n.push(l),l.text==="{")++h;else if(l.text==="}"){if(--h,h===-1)throw new Qe("Extra }",l)}else if(l.text==="EOF")throw new Qe("Unexpected end of input in a macro argument, expected '"+(e&&r?e[c]:"}")+"'",l);if(e&&r)if((h===0||h===1&&e[c]==="{")&&l.text===e[c]){if(++c,c===e.length){n.splice(-c,c);break}}else c=0}while(h!==0||r);return o.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:o,end:l}}consumeArgs(e,n){if(n){if(n.length!==e+1)throw new Qe("The length of delimiters doesn't match the number of args!");for(var r=n[0],o=0;o<r.length;o++){var l=this.popToken();if(r[o]!==l.text)throw new Qe("Use of the macro doesn't match its definition",l)}}for(var h=[],c=0;c<e;c++)h.push(this.consumeArg(n&&n[c+1]).tokens);return h}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Qe("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var n=this.popToken(),r=n.text,o=n.noexpand?null:this._getExpansion(r);if(o==null||e&&o.unexpandable){if(e&&o==null&&r[0]==="\\"&&!this.isDefined(r))throw new Qe("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var l=o.tokens,h=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs){l=l.slice();for(var c=l.length-1;c>=0;--c){var p=l[c];if(p.text==="#"){if(c===0)throw new Qe("Incomplete placeholder at end of macro body",p);if(p=l[--c],p.text==="#")l.splice(c+1,1);else if(/^[1-9]$/.test(p.text))l.splice(c,2,...h[+p.text-1]);else throw new Qe("Not a valid argument number",p)}}}return this.pushTokens(l),l.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ai(e)]):void 0}expandTokens(e){var n=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(this.expandOnce(!0)===!1){var o=this.stack.pop();o.treatAsRelax&&(o.noexpand=!1,o.treatAsRelax=!1),n.push(o)}return this.countExpansion(n.length),n}expandMacroAsText(e){var n=this.expandMacro(e);return n&&n.map(r=>r.text).join("")}_getExpansion(e){var n=this.macros.get(e);if(n==null)return n;if(e.length===1){var r=this.lexer.catcodes[e];if(r!=null&&r!==13)return}var o=typeof n=="function"?n(this):n;if(typeof o=="string"){var l=0;if(o.indexOf("#")!==-1)for(var h=o.replace(/##/g,"");h.indexOf("#"+(l+1))!==-1;)++l;for(var c=new Vg(o,this.settings),p=[],v=c.lex();v.text!=="EOF";)p.push(v),v=c.lex();p.reverse();var b={tokens:p,numArgs:l};return b}return o}isDefined(e){return this.macros.has(e)||Ga.hasOwnProperty(e)||xn.math.hasOwnProperty(e)||xn.text.hasOwnProperty(e)||d2.hasOwnProperty(e)}isExpandable(e){var n=this.macros.get(e);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Ga.hasOwnProperty(e)&&!Ga[e].primitive}}var Kg=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,C0=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Sh={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Xg={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class au{constructor(e,n){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new KE(e,n,this.mode),this.settings=n,this.leftrightDepth=0}expect(e,n){if(n===void 0&&(n=!0),this.fetch().text!==e)throw new Qe("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var n=this.nextToken;this.consume(),this.gullet.pushToken(new ai("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(e,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var o=this.fetch();if(au.endOfExpression.indexOf(o.text)!==-1||n&&o.text===n||e&&Ga[o.text]&&Ga[o.text].infix)break;var l=this.parseAtom(n);if(l){if(l.type==="internal")continue}else break;r.push(l)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var n=-1,r,o=0;o<e.length;o++)if(e[o].type==="infix"){if(n!==-1)throw new Qe("only one infix operator per group",e[o].token);n=o,r=e[o].replaceWith}if(n!==-1&&r){var l,h,c=e.slice(0,n),p=e.slice(n+1);c.length===1&&c[0].type==="ordgroup"?l=c[0]:l={type:"ordgroup",mode:this.mode,body:c},p.length===1&&p[0].type==="ordgroup"?h=p[0]:h={type:"ordgroup",mode:this.mode,body:p};var v;return r==="\\\\abovefrac"?v=this.callFunction(r,[l,e[n],h],[]):v=this.callFunction(r,[l,h],[]),[v]}else return e}handleSupSubscript(e){var n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();var o;do{var l;o=this.parseGroup(e)}while(((l=o)==null?void 0:l.type)==="internal");if(!o)throw new Qe("Expected group after '"+r+"'",n);return o}formatUnsupportedCmd(e){for(var n=[],r=0;r<e.length;r++)n.push({type:"textord",mode:"text",text:e[r]});var o={type:"text",mode:this.mode,body:n},l={type:"color",mode:this.mode,color:this.settings.errorColor,body:[o]};return l}parseAtom(e){var n=this.parseGroup("atom",e);if((n==null?void 0:n.type)==="internal"||this.mode==="text")return n;for(var r,o;;){this.consumeSpaces();var l=this.fetch();if(l.text==="\\limits"||l.text==="\\nolimits"){if(n&&n.type==="op"){var h=l.text==="\\limits";n.limits=h,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=l.text==="\\limits");else throw new Qe("Limit controls must follow a math operator",l);this.consume()}else if(l.text==="^"){if(r)throw new Qe("Double superscript",l);r=this.handleSupSubscript("superscript")}else if(l.text==="_"){if(o)throw new Qe("Double subscript",l);o=this.handleSupSubscript("subscript")}else if(l.text==="'"){if(r)throw new Qe("Double superscript",l);var c={type:"textord",mode:this.mode,text:"\\prime"},p=[c];for(this.consume();this.fetch().text==="'";)p.push(c),this.consume();this.fetch().text==="^"&&p.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:p}}else if(C0[l.text]){var v=Kg.test(l.text),b=[];for(b.push(new ai(C0[l.text])),this.consume();;){var g=this.fetch().text;if(!C0[g]||Kg.test(g)!==v)break;b.unshift(new ai(C0[g])),this.consume()}var m=this.subparse(b);v?o={type:"ordgroup",mode:"math",body:m}:r={type:"ordgroup",mode:"math",body:m}}else break}return r||o?{type:"supsub",mode:this.mode,base:n,sup:r,sub:o}:n}parseFunction(e,n){var r=this.fetch(),o=r.text,l=Ga[o];if(!l)return null;if(this.consume(),n&&n!=="atom"&&!l.allowedInArgument)throw new Qe("Got function '"+o+"' with no arguments"+(n?" as "+n:""),r);if(this.mode==="text"&&!l.allowedInText)throw new Qe("Can't use function '"+o+"' in text mode",r);if(this.mode==="math"&&l.allowedInMath===!1)throw new Qe("Can't use function '"+o+"' in math mode",r);var{args:h,optArgs:c}=this.parseArguments(o,l);return this.callFunction(o,h,c,r,e)}callFunction(e,n,r,o,l){var h={funcName:e,parser:this,token:o,breakOnTokenText:l},c=Ga[e];if(c&&c.handler)return c.handler(h,n,r);throw new Qe("No function handler for "+e)}parseArguments(e,n){var r=n.numArgs+n.numOptionalArgs;if(r===0)return{args:[],optArgs:[]};for(var o=[],l=[],h=0;h<r;h++){var c=n.argTypes&&n.argTypes[h],p=h<n.numOptionalArgs;(n.primitive&&c==null||n.type==="sqrt"&&h===1&&l[0]==null)&&(c="primitive");var v=this.parseGroupOfType("argument to '"+e+"'",c,p);if(p)l.push(v);else if(v!=null)o.push(v);else throw new Qe("Null argument, please report this as a bug")}return{args:o,optArgs:l}}parseGroupOfType(e,n,r){switch(n){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,n);case"hbox":{var o=this.parseArgumentGroup(r,"text");return o!=null?{type:"styling",mode:o.mode,body:[o],style:"text"}:null}case"raw":{var l=this.parseStringGroup("raw",r);return l!=null?{type:"raw",mode:"text",string:l.text}:null}case"primitive":{if(r)throw new Qe("A primitive argument cannot be optional");var h=this.parseGroup(e);if(h==null)throw new Qe("Expected group as "+e,this.fetch());return h}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new Qe("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,n){var r=this.gullet.scanArgument(n);if(r==null)return null;for(var o="",l;(l=this.fetch()).text!=="EOF";)o+=l.text,this.consume();return this.consume(),r.text=o,r}parseRegexGroup(e,n){for(var r=this.fetch(),o=r,l="",h;(h=this.fetch()).text!=="EOF"&&e.test(l+h.text);)o=h,l+=o.text,this.consume();if(l==="")throw new Qe("Invalid "+n+": '"+r.text+"'",r);return r.range(o,l)}parseColorGroup(e){var n=this.parseStringGroup("color",e);if(n==null)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!r)throw new Qe("Invalid color: '"+n.text+"'",n);var o=r[0];return/^[0-9a-f]{6}$/i.test(o)&&(o="#"+o),{type:"color-token",mode:this.mode,color:o}}parseSizeGroup(e){var n,r=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?n=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):n=this.parseStringGroup("size",e),!n)return null;!e&&n.text.length===0&&(n.text="0pt",r=!0);var o=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!o)throw new Qe("Invalid size: '"+n.text+"'",n);var l={number:+(o[1]+o[2]),unit:o[3]};if(!x3(l))throw new Qe("Invalid unit: '"+l.unit+"'",n);return{type:"size",mode:this.mode,value:l,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var n=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),n==null)return null;var r=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,n){var r=this.gullet.scanArgument(e);if(r==null)return null;var o=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var l=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var h={type:"ordgroup",mode:this.mode,loc:r.loc,body:l};return n&&this.switchMode(o),h}parseGroup(e,n){var r=this.fetch(),o=r.text,l;if(o==="{"||o==="\\begingroup"){this.consume();var h=o==="{"?"}":"\\endgroup";this.gullet.beginGroup();var c=this.parseExpression(!1,h),p=this.fetch();this.expect(h),this.gullet.endGroup(),l={type:"ordgroup",mode:this.mode,loc:$r.range(r,p),body:c,semisimple:o==="\\begingroup"||void 0}}else if(l=this.parseFunction(n,e)||this.parseSymbol(),l==null&&o[0]==="\\"&&!d2.hasOwnProperty(o)){if(this.settings.throwOnError)throw new Qe("Undefined control sequence: "+o,r);l=this.formatUnsupportedCmd(o),this.consume()}return l}formLigatures(e){for(var n=e.length-1,r=0;r<n;++r){var o=e[r],l=o.text;l==="-"&&e[r+1].text==="-"&&(r+1<n&&e[r+2].text==="-"?(e.splice(r,3,{type:"textord",mode:"text",loc:$r.range(o,e[r+2]),text:"---"}),n-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:$r.range(o,e[r+1]),text:"--"}),n-=1)),(l==="'"||l==="`")&&e[r+1].text===l&&(e.splice(r,2,{type:"textord",mode:"text",loc:$r.range(o,e[r+1]),text:l+l}),n-=1)}}parseSymbol(){var e=this.fetch(),n=e.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var r=n.slice(5),o=r.charAt(0)==="*";if(o&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new Qe(`\\verb assertion failed --
please report what input caused this bug`);return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:o}}Xg.hasOwnProperty(n[0])&&!xn[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',e),n=Xg[n[0]]+n.slice(1));var l=UE.exec(n);l&&(n=n.substring(0,l.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var h;if(xn[this.mode][n]){this.settings.strict&&this.mode==="math"&&fp.indexOf(n)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',e);var c=xn[this.mode][n].group,p=$r.range(e),v;if(HS.hasOwnProperty(c)){var b=c;v={type:"atom",mode:this.mode,family:b,loc:p,text:n}}else v={type:c,mode:this.mode,loc:p,text:n};h=v}else if(n.charCodeAt(0)>=128)this.settings.strict&&(w3(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),e)),h={type:"textord",mode:"text",loc:$r.range(e),text:n};else return null;if(this.consume(),l)for(var g=0;g<l[0].length;g++){var m=l[0][g];if(!Sh[m])throw new Qe("Unknown accent ' "+m+"'",e);var x=Sh[m][this.mode]||Sh[m].text;if(!x)throw new Qe("Accent "+m+" unsupported in "+this.mode+" mode",e);h={type:"accent",mode:this.mode,loc:$r.range(e),label:x,isStretchy:!1,isShifty:!0,base:h}}return h}}au.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var g1=function(e,n){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new au(e,n);delete r.gullet.macros.current["\\df@tag"];var o=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new Qe("\\tag works only in display equations");o=[{type:"tag",mode:"text",body:o,tag:r.subparse([new ai("\\df@tag")])}]}return o},h2=function(e,n,r){n.textContent="";var o=v1(e,r).toNode();n.appendChild(o)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),h2=function(){throw new Qe("KaTeX doesn't work in quirks mode.")});var XE=function(e,n){var r=v1(e,n).toMarkup();return r},ZE=function(e,n){var r=new Jf(n);return g1(e,r)},p2=function(e,n,r){if(r.throwOnError||!(e instanceof Qe))throw e;var o=Ee.makeSpan(["katex-error"],[new ci(n)]);return o.setAttribute("title",e.toString()),o.setAttribute("style","color:"+r.errorColor),o},v1=function(e,n){var r=new Jf(n);try{var o=g1(e,r);return aE(o,e,r)}catch(l){return p2(l,e,r)}},YE=function(e,n){var r=new Jf(n);try{var o=g1(e,r);return oE(o,e,r)}catch(l){return p2(l,e,r)}},JE="0.16.22",QE={Span:Zl,Anchor:t1,SymbolNode:ci,SvgNode:Ca,PathNode:no,LineNode:pp},Zg={version:JE,render:h2,renderToString:XE,ParseError:Qe,SETTINGS_SCHEMA:B0,__parse:ZE,__renderToDomTree:v1,__renderToHTMLTree:YE,__setFontMetrics:CS,__defineSymbol:I,__defineFunction:ht,__defineMacro:W,__domTree:QE};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};const f2=new Qt.Renderer;f2.image=function(t,e,n){console.log("🖼️ 图片渲染器被调用:",{href:t,title:e,text:n,hrefType:typeof t});let r="";if(typeof t=="string")r=t;else{if(t==null)return console.warn("图片href为null或undefined"),'<div class="markdown-error">图片链接为空</div>';if(typeof t=="object")if(t.href)r=String(t.href);else if(t.url)r=String(t.url);else if(t.src)r=String(t.src);else return console.warn("图片href是对象但没有href、url或src属性:",t),'<div class="markdown-error">图片链接格式错误</div>';else if(typeof t.toString=="function")r=t.toString();else return console.warn("图片href无法转换为字符串:",typeof t,t),'<div class="markdown-error">图片链接格式错误</div>'}console.log("🖼️ 处理后的hrefStr:",r);let o=r;r.includes("cdn-mineru.openxlab.org.cn")&&(o=`/proxy-image${r.replace("https://cdn-mineru.openxlab.org.cn","")}`);const l=n||"图片",h=e?` title="${e}"`:"";return console.log("🖼️ 最终生成的图片HTML:",`<img src="${o}" alt="${l}"${h} class="markdown-image" />`),`<img src="${o}" alt="${l}"${h} class="markdown-image" style="max-width: 200px; max-height: 150px; object-fit: contain; display: block; margin: 4px auto; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);" />`};Qt.setOptions({breaks:!1,gfm:!0,tables:!0,sanitize:!1,renderer:f2});const m2=t=>{if(!t||typeof t!="string")return"";try{const e=eT(t),n=Qt.parse(e);return tT(n)}catch(e){return console.error("Markdown渲染失败:",e),`<div class="markdown-error">渲染失败: ${e.message}</div>`}},eT=t=>t.replace(/\$\$([\s\S]*?)\$\$/g,(e,n)=>{try{return`<div class="math-block">${Zg.renderToString(n.trim(),{displayMode:!0,throwOnError:!1})}</div>`}catch(r){return console.warn("数学公式渲染失败:",r),`<div class="math-error">数学公式错误: ${n}</div>`}}).replace(/\$([^$\n]+?)\$/g,(e,n)=>{if(n.includes("\\")||n.includes("{")||n.includes("}")||n.includes("^")||n.includes("_")||n.includes("=")||n.includes("+")||n.includes("-")||n.includes("*")||n.includes("/")||n.includes("(")||n.includes(")"))try{return`<span class="math-inline">${Zg.renderToString(n.trim(),{displayMode:!1,throwOnError:!1})}</span>`}catch(r){return console.warn("数学公式渲染失败:",r),`<span class="math-error">数学公式错误: ${n}</span>`}return e}),tT=t=>{let e=t.replace(/<table>/g,'<table class="markdown-table">').replace(/<pre><code/g,'<pre class="markdown-code"><code');const n=document.createElement("div");return n.innerHTML=e,n.querySelectorAll("pre code").forEach(o=>{const l=o.className.match(/language-(\w+)/);if(l)try{o.innerHTML=mg.highlight(o.textContent,mg.languages[l[1]],l[1])}catch(h){console.warn("语法高亮失败:",h)}}),n.innerHTML},nT=t=>{if(!t||typeof t!="string")return!1;const e=t.split(`
`);let n=!1,r=!1;for(const h of e){const c=h.trim();c.includes("|")&&c.split("|").length>=3&&(n=!0),c.includes("|")&&c.includes("-")&&/^[\s\|\-\:]+$/.test(c)&&(r=!0)}const o=(t.match(/\|/g)||[]).length,l=o>=6;return n&&r||n&&l||n&&o>=4},rT=t=>!t||typeof t!="string"?!1:nT(t)?!0:[/#{1,6}\s+/,/\*\*.*?\*\*/,/\*.*?\*/,/`.*?`/,/```[\s\S]*?```/,/^\s*[-*+]\s+/m,/^\s*\d+\.\s+/m,/\[.*?\]\(.*?\)/,/!\[.*?\]\(.*?\)/,/\$\$.*?\$\$/,/\$.*?\$/].some(n=>n.test(t)),ul=t=>{if(!t||typeof t!="string")return t||"";const e=rT(t),n=t.includes("|")&&t.includes("-");return e||n?(console.log("🎯 同步渲染Markdown内容"),m2(t)):t};function g2(t,e){return function(){return t.apply(e,arguments)}}const{toString:iT}=Object.prototype,{getPrototypeOf:b1}=Object,{iterator:ou,toStringTag:v2}=Symbol,su=(t=>e=>{const n=iT.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ei=t=>(t=t.toLowerCase(),e=>su(e)===t),lu=t=>e=>typeof e===t,{isArray:gs}=Array,zl=lu("undefined");function Jl(t){return t!==null&&!zl(t)&&t.constructor!==null&&!zl(t.constructor)&&Nr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const b2=Ei("ArrayBuffer");function aT(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&b2(t.buffer),e}const oT=lu("string"),Nr=lu("function"),y2=lu("number"),Ql=t=>t!==null&&typeof t=="object",sT=t=>t===!0||t===!1,q0=t=>{if(su(t)!=="object")return!1;const e=b1(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(v2 in t)&&!(ou in t)},lT=t=>{if(!Ql(t)||Jl(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},cT=Ei("Date"),uT=Ei("File"),dT=Ei("Blob"),hT=Ei("FileList"),pT=t=>Ql(t)&&Nr(t.pipe),fT=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Nr(t.append)&&((e=su(t))==="formdata"||e==="object"&&Nr(t.toString)&&t.toString()==="[object FormData]"))},mT=Ei("URLSearchParams"),[gT,vT,bT,yT]=["ReadableStream","Request","Response","Headers"].map(Ei),wT=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function e0(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),gs(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(Jl(t))return;const l=n?Object.getOwnPropertyNames(t):Object.keys(t),h=l.length;let c;for(r=0;r<h;r++)c=l[r],e.call(null,t[c],c,t)}}function w2(t,e){if(Jl(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const _o=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),x2=t=>!zl(t)&&t!==_o;function wp(){const{caseless:t}=x2(this)&&this||{},e={},n=(r,o)=>{const l=t&&w2(e,o)||o;q0(e[l])&&q0(r)?e[l]=wp(e[l],r):q0(r)?e[l]=wp({},r):gs(r)?e[l]=r.slice():e[l]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&e0(arguments[r],n);return e}const xT=(t,e,n,{allOwnKeys:r}={})=>(e0(e,(o,l)=>{n&&Nr(o)?t[l]=g2(o,n):t[l]=o},{allOwnKeys:r}),t),kT=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ST=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},ET=(t,e,n,r)=>{let o,l,h;const c={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),l=o.length;l-- >0;)h=o[l],(!r||r(h,t,e))&&!c[h]&&(e[h]=t[h],c[h]=!0);t=n!==!1&&b1(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},TT=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},AT=t=>{if(!t)return null;if(gs(t))return t;let e=t.length;if(!y2(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},MT=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&b1(Uint8Array)),CT=(t,e)=>{const r=(t&&t[ou]).call(t);let o;for(;(o=r.next())&&!o.done;){const l=o.value;e.call(t,l[0],l[1])}},LT=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},_T=Ei("HTMLFormElement"),NT=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Yg=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),DT=Ei("RegExp"),k2=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};e0(n,(o,l)=>{let h;(h=e(o,l,t))!==!1&&(r[l]=h||o)}),Object.defineProperties(t,r)},RT=t=>{k2(t,(e,n)=>{if(Nr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Nr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},IT=(t,e)=>{const n={},r=o=>{o.forEach(l=>{n[l]=!0})};return gs(t)?r(t):r(String(t).split(e)),n},OT=()=>{},HT=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function PT(t){return!!(t&&Nr(t.append)&&t[v2]==="FormData"&&t[ou])}const zT=t=>{const e=new Array(10),n=(r,o)=>{if(Ql(r)){if(e.indexOf(r)>=0)return;if(Jl(r))return r;if(!("toJSON"in r)){e[o]=r;const l=gs(r)?[]:{};return e0(r,(h,c)=>{const p=n(h,o+1);!zl(p)&&(l[c]=p)}),e[o]=void 0,l}}return r};return n(t,0)},BT=Ei("AsyncFunction"),FT=t=>t&&(Ql(t)||Nr(t))&&Nr(t.then)&&Nr(t.catch),S2=((t,e)=>t?setImmediate:e?((n,r)=>(_o.addEventListener("message",({source:o,data:l})=>{o===_o&&l===n&&r.length&&r.shift()()},!1),o=>{r.push(o),_o.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Nr(_o.postMessage)),qT=typeof queueMicrotask<"u"?queueMicrotask.bind(_o):typeof process<"u"&&process.nextTick||S2,jT=t=>t!=null&&Nr(t[ou]),_e={isArray:gs,isArrayBuffer:b2,isBuffer:Jl,isFormData:fT,isArrayBufferView:aT,isString:oT,isNumber:y2,isBoolean:sT,isObject:Ql,isPlainObject:q0,isEmptyObject:lT,isReadableStream:gT,isRequest:vT,isResponse:bT,isHeaders:yT,isUndefined:zl,isDate:cT,isFile:uT,isBlob:dT,isRegExp:DT,isFunction:Nr,isStream:pT,isURLSearchParams:mT,isTypedArray:MT,isFileList:hT,forEach:e0,merge:wp,extend:xT,trim:wT,stripBOM:kT,inherits:ST,toFlatObject:ET,kindOf:su,kindOfTest:Ei,endsWith:TT,toArray:AT,forEachEntry:CT,matchAll:LT,isHTMLForm:_T,hasOwnProperty:Yg,hasOwnProp:Yg,reduceDescriptors:k2,freezeMethods:RT,toObjectSet:IT,toCamelCase:NT,noop:OT,toFiniteNumber:HT,findKey:w2,global:_o,isContextDefined:x2,isSpecCompliantForm:PT,toJSONObject:zT,isAsyncFn:BT,isThenable:FT,setImmediate:S2,asap:qT,isIterable:jT};function Pt(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}_e.inherits(Pt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const E2=Pt.prototype,T2={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{T2[t]={value:t}});Object.defineProperties(Pt,T2);Object.defineProperty(E2,"isAxiosError",{value:!0});Pt.from=(t,e,n,r,o,l)=>{const h=Object.create(E2);return _e.toFlatObject(t,h,function(p){return p!==Error.prototype},c=>c!=="isAxiosError"),Pt.call(h,t.message,e,n,r,o),h.cause=t,h.name=t.name,l&&Object.assign(h,l),h};const $T=null;function xp(t){return _e.isPlainObject(t)||_e.isArray(t)}function A2(t){return _e.endsWith(t,"[]")?t.slice(0,-2):t}function Jg(t,e,n){return t?t.concat(e).map(function(o,l){return o=A2(o),!n&&l?"["+o+"]":o}).join(n?".":""):e}function UT(t){return _e.isArray(t)&&!t.some(xp)}const VT=_e.toFlatObject(_e,{},null,function(e){return/^is[A-Z]/.test(e)});function cu(t,e,n){if(!_e.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,k){return!_e.isUndefined(k[S])});const r=n.metaTokens,o=n.visitor||b,l=n.dots,h=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(e);if(!_e.isFunction(o))throw new TypeError("visitor must be a function");function v(w){if(w===null)return"";if(_e.isDate(w))return w.toISOString();if(_e.isBoolean(w))return w.toString();if(!p&&_e.isBlob(w))throw new Pt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(w)||_e.isTypedArray(w)?p&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function b(w,S,k){let C=w;if(w&&!k&&typeof w=="object"){if(_e.endsWith(S,"{}"))S=r?S:S.slice(0,-2),w=JSON.stringify(w);else if(_e.isArray(w)&&UT(w)||(_e.isFileList(w)||_e.endsWith(S,"[]"))&&(C=_e.toArray(w)))return S=A2(S),C.forEach(function(A,M){!(_e.isUndefined(A)||A===null)&&e.append(h===!0?Jg([S],M,l):h===null?S:S+"[]",v(A))}),!1}return xp(w)?!0:(e.append(Jg(k,S,l),v(w)),!1)}const g=[],m=Object.assign(VT,{defaultVisitor:b,convertValue:v,isVisitable:xp});function x(w,S){if(!_e.isUndefined(w)){if(g.indexOf(w)!==-1)throw Error("Circular reference detected in "+S.join("."));g.push(w),_e.forEach(w,function(C,T){(!(_e.isUndefined(C)||C===null)&&o.call(e,C,_e.isString(T)?T.trim():T,S,m))===!0&&x(C,S?S.concat(T):[T])}),g.pop()}}if(!_e.isObject(t))throw new TypeError("data must be an object");return x(t),e}function Qg(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function y1(t,e){this._pairs=[],t&&cu(t,this,e)}const M2=y1.prototype;M2.append=function(e,n){this._pairs.push([e,n])};M2.toString=function(e){const n=e?function(r){return e.call(this,r,Qg)}:Qg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function WT(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function C2(t,e,n){if(!e)return t;const r=n&&n.encode||WT;_e.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let l;if(o?l=o(e,n):l=_e.isURLSearchParams(e)?e.toString():new y1(e,n).toString(r),l){const h=t.indexOf("#");h!==-1&&(t=t.slice(0,h)),t+=(t.indexOf("?")===-1?"?":"&")+l}return t}class GT{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_e.forEach(this.handlers,function(r){r!==null&&e(r)})}}const e4=GT,L2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},KT=typeof URLSearchParams<"u"?URLSearchParams:y1,XT=typeof FormData<"u"?FormData:null,ZT=typeof Blob<"u"?Blob:null,YT={isBrowser:!0,classes:{URLSearchParams:KT,FormData:XT,Blob:ZT},protocols:["http","https","file","blob","url","data"]},w1=typeof window<"u"&&typeof document<"u",kp=typeof navigator=="object"&&navigator||void 0,JT=w1&&(!kp||["ReactNative","NativeScript","NS"].indexOf(kp.product)<0),QT=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),eA=w1&&window.location.href||"http://localhost",tA=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:w1,hasStandardBrowserEnv:JT,hasStandardBrowserWebWorkerEnv:QT,navigator:kp,origin:eA},Symbol.toStringTag,{value:"Module"})),pr={...tA,...YT};function nA(t,e){return cu(t,new pr.classes.URLSearchParams,{visitor:function(n,r,o,l){return pr.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...e})}function rA(t){return _e.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function iA(t){const e={},n=Object.keys(t);let r;const o=n.length;let l;for(r=0;r<o;r++)l=n[r],e[l]=t[l];return e}function _2(t){function e(n,r,o,l){let h=n[l++];if(h==="__proto__")return!0;const c=Number.isFinite(+h),p=l>=n.length;return h=!h&&_e.isArray(o)?o.length:h,p?(_e.hasOwnProp(o,h)?o[h]=[o[h],r]:o[h]=r,!c):((!o[h]||!_e.isObject(o[h]))&&(o[h]=[]),e(n,r,o[h],l)&&_e.isArray(o[h])&&(o[h]=iA(o[h])),!c)}if(_e.isFormData(t)&&_e.isFunction(t.entries)){const n={};return _e.forEachEntry(t,(r,o)=>{e(rA(r),o,n,0)}),n}return null}function aA(t,e,n){if(_e.isString(t))try{return(e||JSON.parse)(t),_e.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const x1={transitional:L2,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,l=_e.isObject(e);if(l&&_e.isHTMLForm(e)&&(e=new FormData(e)),_e.isFormData(e))return o?JSON.stringify(_2(e)):e;if(_e.isArrayBuffer(e)||_e.isBuffer(e)||_e.isStream(e)||_e.isFile(e)||_e.isBlob(e)||_e.isReadableStream(e))return e;if(_e.isArrayBufferView(e))return e.buffer;if(_e.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(l){if(r.indexOf("application/x-www-form-urlencoded")>-1)return nA(e,this.formSerializer).toString();if((c=_e.isFileList(e))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return cu(c?{"files[]":e}:e,p&&new p,this.formSerializer)}}return l||o?(n.setContentType("application/json",!1),aA(e)):e}],transformResponse:[function(e){const n=this.transitional||x1.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(_e.isResponse(e)||_e.isReadableStream(e))return e;if(e&&_e.isString(e)&&(r&&!this.responseType||o)){const h=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(c){if(h)throw c.name==="SyntaxError"?Pt.from(c,Pt.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pr.classes.FormData,Blob:pr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],t=>{x1.headers[t]={}});const k1=x1,oA=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sA=t=>{const e={};let n,r,o;return t&&t.split(`
`).forEach(function(h){o=h.indexOf(":"),n=h.substring(0,o).trim().toLowerCase(),r=h.substring(o+1).trim(),!(!n||e[n]&&oA[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},t4=Symbol("internals");function dl(t){return t&&String(t).trim().toLowerCase()}function j0(t){return t===!1||t==null?t:_e.isArray(t)?t.map(j0):String(t)}function lA(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const cA=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Eh(t,e,n,r,o){if(_e.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!_e.isString(e)){if(_e.isString(r))return e.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(e)}}function uA(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function dA(t,e){const n=_e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,l,h){return this[r].call(this,e,o,l,h)},configurable:!0})})}class uu{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function l(c,p,v){const b=dl(p);if(!b)throw new Error("header name must be a non-empty string");const g=_e.findKey(o,b);(!g||o[g]===void 0||v===!0||v===void 0&&o[g]!==!1)&&(o[g||p]=j0(c))}const h=(c,p)=>_e.forEach(c,(v,b)=>l(v,b,p));if(_e.isPlainObject(e)||e instanceof this.constructor)h(e,n);else if(_e.isString(e)&&(e=e.trim())&&!cA(e))h(sA(e),n);else if(_e.isObject(e)&&_e.isIterable(e)){let c={},p,v;for(const b of e){if(!_e.isArray(b))throw TypeError("Object iterator must return a key-value pair");c[v=b[0]]=(p=c[v])?_e.isArray(p)?[...p,b[1]]:[p,b[1]]:b[1]}h(c,n)}else e!=null&&l(n,e,r);return this}get(e,n){if(e=dl(e),e){const r=_e.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return lA(o);if(_e.isFunction(n))return n.call(this,o,r);if(_e.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=dl(e),e){const r=_e.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Eh(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function l(h){if(h=dl(h),h){const c=_e.findKey(r,h);c&&(!n||Eh(r,r[c],c,n))&&(delete r[c],o=!0)}}return _e.isArray(e)?e.forEach(l):l(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const l=n[r];(!e||Eh(this,this[l],l,e,!0))&&(delete this[l],o=!0)}return o}normalize(e){const n=this,r={};return _e.forEach(this,(o,l)=>{const h=_e.findKey(r,l);if(h){n[h]=j0(o),delete n[l];return}const c=e?uA(l):String(l).trim();c!==l&&delete n[l],n[c]=j0(o),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return _e.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&_e.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[t4]=this[t4]={accessors:{}}).accessors,o=this.prototype;function l(h){const c=dl(h);r[c]||(dA(o,h),r[c]=!0)}return _e.isArray(e)?e.forEach(l):l(e),this}}uu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(uu.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});_e.freezeMethods(uu);const Si=uu;function Th(t,e){const n=this||k1,r=e||n,o=Si.from(r.headers);let l=r.data;return _e.forEach(t,function(c){l=c.call(n,l,o.normalize(),e?e.status:void 0)}),o.normalize(),l}function N2(t){return!!(t&&t.__CANCEL__)}function vs(t,e,n){Pt.call(this,t??"canceled",Pt.ERR_CANCELED,e,n),this.name="CanceledError"}_e.inherits(vs,Pt,{__CANCEL__:!0});function D2(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Pt("Request failed with status code "+n.status,[Pt.ERR_BAD_REQUEST,Pt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function hA(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function pA(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,l=0,h;return e=e!==void 0?e:1e3,function(p){const v=Date.now(),b=r[l];h||(h=v),n[o]=p,r[o]=v;let g=l,m=0;for(;g!==o;)m+=n[g++],g=g%t;if(o=(o+1)%t,o===l&&(l=(l+1)%t),v-h<e)return;const x=b&&v-b;return x?Math.round(m*1e3/x):void 0}}function fA(t,e){let n=0,r=1e3/e,o,l;const h=(v,b=Date.now())=>{n=b,o=null,l&&(clearTimeout(l),l=null),t(...v)};return[(...v)=>{const b=Date.now(),g=b-n;g>=r?h(v,b):(o=v,l||(l=setTimeout(()=>{l=null,h(o)},r-g)))},()=>o&&h(o)]}const Sc=(t,e,n=3)=>{let r=0;const o=pA(50,250);return fA(l=>{const h=l.loaded,c=l.lengthComputable?l.total:void 0,p=h-r,v=o(p),b=h<=c;r=h;const g={loaded:h,total:c,progress:c?h/c:void 0,bytes:p,rate:v||void 0,estimated:v&&c&&b?(c-h)/v:void 0,event:l,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(g)},n)},n4=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},r4=t=>(...e)=>_e.asap(()=>t(...e)),mA=pr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,pr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(pr.origin),pr.navigator&&/(msie|trident)/i.test(pr.navigator.userAgent)):()=>!0,gA=pr.hasStandardBrowserEnv?{write(t,e,n,r,o,l){const h=[t+"="+encodeURIComponent(e)];_e.isNumber(n)&&h.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&h.push("path="+r),_e.isString(o)&&h.push("domain="+o),l===!0&&h.push("secure"),document.cookie=h.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vA(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function bA(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function R2(t,e,n){let r=!vA(e);return t&&(r||n==!1)?bA(t,e):e}const i4=t=>t instanceof Si?{...t}:t;function Ho(t,e){e=e||{};const n={};function r(v,b,g,m){return _e.isPlainObject(v)&&_e.isPlainObject(b)?_e.merge.call({caseless:m},v,b):_e.isPlainObject(b)?_e.merge({},b):_e.isArray(b)?b.slice():b}function o(v,b,g,m){if(_e.isUndefined(b)){if(!_e.isUndefined(v))return r(void 0,v,g,m)}else return r(v,b,g,m)}function l(v,b){if(!_e.isUndefined(b))return r(void 0,b)}function h(v,b){if(_e.isUndefined(b)){if(!_e.isUndefined(v))return r(void 0,v)}else return r(void 0,b)}function c(v,b,g){if(g in e)return r(v,b);if(g in t)return r(void 0,v)}const p={url:l,method:l,data:l,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:c,headers:(v,b,g)=>o(i4(v),i4(b),g,!0)};return _e.forEach(Object.keys({...t,...e}),function(b){const g=p[b]||o,m=g(t[b],e[b],b);_e.isUndefined(m)&&g!==c||(n[b]=m)}),n}const I2=t=>{const e=Ho({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:l,headers:h,auth:c}=e;e.headers=h=Si.from(h),e.url=C2(R2(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&h.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let p;if(_e.isFormData(n)){if(pr.hasStandardBrowserEnv||pr.hasStandardBrowserWebWorkerEnv)h.setContentType(void 0);else if((p=h.getContentType())!==!1){const[v,...b]=p?p.split(";").map(g=>g.trim()).filter(Boolean):[];h.setContentType([v||"multipart/form-data",...b].join("; "))}}if(pr.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(e)),r||r!==!1&&mA(e.url))){const v=o&&l&&gA.read(l);v&&h.set(o,v)}return e},yA=typeof XMLHttpRequest<"u",wA=yA&&function(t){return new Promise(function(n,r){const o=I2(t);let l=o.data;const h=Si.from(o.headers).normalize();let{responseType:c,onUploadProgress:p,onDownloadProgress:v}=o,b,g,m,x,w;function S(){x&&x(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(b),o.signal&&o.signal.removeEventListener("abort",b)}let k=new XMLHttpRequest;k.open(o.method.toUpperCase(),o.url,!0),k.timeout=o.timeout;function C(){if(!k)return;const A=Si.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),y={data:!c||c==="text"||c==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:A,config:t,request:k};D2(function(z){n(z),S()},function(z){r(z),S()},y),k=null}"onloadend"in k?k.onloadend=C:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(C)},k.onabort=function(){k&&(r(new Pt("Request aborted",Pt.ECONNABORTED,t,k)),k=null)},k.onerror=function(){r(new Pt("Network Error",Pt.ERR_NETWORK,t,k)),k=null},k.ontimeout=function(){let M=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const y=o.transitional||L2;o.timeoutErrorMessage&&(M=o.timeoutErrorMessage),r(new Pt(M,y.clarifyTimeoutError?Pt.ETIMEDOUT:Pt.ECONNABORTED,t,k)),k=null},l===void 0&&h.setContentType(null),"setRequestHeader"in k&&_e.forEach(h.toJSON(),function(M,y){k.setRequestHeader(y,M)}),_e.isUndefined(o.withCredentials)||(k.withCredentials=!!o.withCredentials),c&&c!=="json"&&(k.responseType=o.responseType),v&&([m,w]=Sc(v,!0),k.addEventListener("progress",m)),p&&k.upload&&([g,x]=Sc(p),k.upload.addEventListener("progress",g),k.upload.addEventListener("loadend",x)),(o.cancelToken||o.signal)&&(b=A=>{k&&(r(!A||A.type?new vs(null,t,k):A),k.abort(),k=null)},o.cancelToken&&o.cancelToken.subscribe(b),o.signal&&(o.signal.aborted?b():o.signal.addEventListener("abort",b)));const T=hA(o.url);if(T&&pr.protocols.indexOf(T)===-1){r(new Pt("Unsupported protocol "+T+":",Pt.ERR_BAD_REQUEST,t));return}k.send(l||null)})},xA=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,o;const l=function(v){if(!o){o=!0,c();const b=v instanceof Error?v:this.reason;r.abort(b instanceof Pt?b:new vs(b instanceof Error?b.message:b))}};let h=e&&setTimeout(()=>{h=null,l(new Pt(`timeout ${e} of ms exceeded`,Pt.ETIMEDOUT))},e);const c=()=>{t&&(h&&clearTimeout(h),h=null,t.forEach(v=>{v.unsubscribe?v.unsubscribe(l):v.removeEventListener("abort",l)}),t=null)};t.forEach(v=>v.addEventListener("abort",l));const{signal:p}=r;return p.unsubscribe=()=>_e.asap(c),p}},kA=xA,SA=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},EA=async function*(t,e){for await(const n of TA(t))yield*SA(n,e)},TA=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},a4=(t,e,n,r)=>{const o=EA(t,e);let l=0,h,c=p=>{h||(h=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:v,value:b}=await o.next();if(v){c(),p.close();return}let g=b.byteLength;if(n){let m=l+=g;n(m)}p.enqueue(new Uint8Array(b))}catch(v){throw c(v),v}},cancel(p){return c(p),o.return()}},{highWaterMark:2})},du=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",O2=du&&typeof ReadableStream=="function",AA=du&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),H2=(t,...e)=>{try{return!!t(...e)}catch{return!1}},MA=O2&&H2(()=>{let t=!1;const e=new Request(pr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),o4=64*1024,Sp=O2&&H2(()=>_e.isReadableStream(new Response("").body)),Ec={stream:Sp&&(t=>t.body)};du&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ec[e]&&(Ec[e]=_e.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Pt(`Response type '${e}' is not supported`,Pt.ERR_NOT_SUPPORT,r)})})})(new Response);const CA=async t=>{if(t==null)return 0;if(_e.isBlob(t))return t.size;if(_e.isSpecCompliantForm(t))return(await new Request(pr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(t)||_e.isArrayBuffer(t))return t.byteLength;if(_e.isURLSearchParams(t)&&(t=t+""),_e.isString(t))return(await AA(t)).byteLength},LA=async(t,e)=>{const n=_e.toFiniteNumber(t.getContentLength());return n??CA(e)},_A=du&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:l,timeout:h,onDownloadProgress:c,onUploadProgress:p,responseType:v,headers:b,withCredentials:g="same-origin",fetchOptions:m}=I2(t);v=v?(v+"").toLowerCase():"text";let x=kA([o,l&&l.toAbortSignal()],h),w;const S=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let k;try{if(p&&MA&&n!=="get"&&n!=="head"&&(k=await LA(b,r))!==0){let y=new Request(e,{method:"POST",body:r,duplex:"half"}),N;if(_e.isFormData(r)&&(N=y.headers.get("content-type"))&&b.setContentType(N),y.body){const[z,F]=n4(k,Sc(r4(p)));r=a4(y.body,o4,z,F)}}_e.isString(g)||(g=g?"include":"omit");const C="credentials"in Request.prototype;w=new Request(e,{...m,signal:x,method:n.toUpperCase(),headers:b.normalize().toJSON(),body:r,duplex:"half",credentials:C?g:void 0});let T=await fetch(w,m);const A=Sp&&(v==="stream"||v==="response");if(Sp&&(c||A&&S)){const y={};["status","statusText","headers"].forEach(P=>{y[P]=T[P]});const N=_e.toFiniteNumber(T.headers.get("content-length")),[z,F]=c&&n4(N,Sc(r4(c),!0))||[];T=new Response(a4(T.body,o4,z,()=>{F&&F(),S&&S()}),y)}v=v||"text";let M=await Ec[_e.findKey(Ec,v)||"text"](T,t);return!A&&S&&S(),await new Promise((y,N)=>{D2(y,N,{data:M,headers:Si.from(T.headers),status:T.status,statusText:T.statusText,config:t,request:w})})}catch(C){throw S&&S(),C&&C.name==="TypeError"&&/Load failed|fetch/i.test(C.message)?Object.assign(new Pt("Network Error",Pt.ERR_NETWORK,t,w),{cause:C.cause||C}):Pt.from(C,C&&C.code,t,w)}}),Ep={http:$T,xhr:wA,fetch:_A};_e.forEach(Ep,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const s4=t=>`- ${t}`,NA=t=>_e.isFunction(t)||t===null||t===!1,P2={getAdapter:t=>{t=_e.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let l=0;l<e;l++){n=t[l];let h;if(r=n,!NA(n)&&(r=Ep[(h=String(n)).toLowerCase()],r===void 0))throw new Pt(`Unknown adapter '${h}'`);if(r)break;o[h||"#"+l]=r}if(!r){const l=Object.entries(o).map(([c,p])=>`adapter ${c} `+(p===!1?"is not supported by the environment":"is not available in the build"));let h=e?l.length>1?`since :
`+l.map(s4).join(`
`):" "+s4(l[0]):"as no adapter specified";throw new Pt("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return r},adapters:Ep};function Ah(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new vs(null,t)}function l4(t){return Ah(t),t.headers=Si.from(t.headers),t.data=Th.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),P2.getAdapter(t.adapter||k1.adapter)(t).then(function(r){return Ah(t),r.data=Th.call(t,t.transformResponse,r),r.headers=Si.from(r.headers),r},function(r){return N2(r)||(Ah(t),r&&r.response&&(r.response.data=Th.call(t,t.transformResponse,r.response),r.response.headers=Si.from(r.response.headers))),Promise.reject(r)})}const z2="1.11.0",hu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{hu[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const c4={};hu.transitional=function(e,n,r){function o(l,h){return"[Axios v"+z2+"] Transitional option '"+l+"'"+h+(r?". "+r:"")}return(l,h,c)=>{if(e===!1)throw new Pt(o(h," has been removed"+(n?" in "+n:"")),Pt.ERR_DEPRECATED);return n&&!c4[h]&&(c4[h]=!0,console.warn(o(h," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,h,c):!0}};hu.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function DA(t,e,n){if(typeof t!="object")throw new Pt("options must be an object",Pt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const l=r[o],h=e[l];if(h){const c=t[l],p=c===void 0||h(c,l,t);if(p!==!0)throw new Pt("option "+l+" must be "+p,Pt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Pt("Unknown option "+l,Pt.ERR_BAD_OPTION)}}const $0={assertOptions:DA,validators:hu},Di=$0.validators;class Tc{constructor(e){this.defaults=e||{},this.interceptors={request:new e4,response:new e4}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const l=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?l&&!String(r.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+l):r.stack=l}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ho(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:l}=n;r!==void 0&&$0.assertOptions(r,{silentJSONParsing:Di.transitional(Di.boolean),forcedJSONParsing:Di.transitional(Di.boolean),clarifyTimeoutError:Di.transitional(Di.boolean)},!1),o!=null&&(_e.isFunction(o)?n.paramsSerializer={serialize:o}:$0.assertOptions(o,{encode:Di.function,serialize:Di.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),$0.assertOptions(n,{baseUrl:Di.spelling("baseURL"),withXsrfToken:Di.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let h=l&&_e.merge(l.common,l[n.method]);l&&_e.forEach(["delete","get","head","post","put","patch","common"],w=>{delete l[w]}),n.headers=Si.concat(h,l);const c=[];let p=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(p=p&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const v=[];this.interceptors.response.forEach(function(S){v.push(S.fulfilled,S.rejected)});let b,g=0,m;if(!p){const w=[l4.bind(this),void 0];for(w.unshift(...c),w.push(...v),m=w.length,b=Promise.resolve(n);g<m;)b=b.then(w[g++],w[g++]);return b}m=c.length;let x=n;for(g=0;g<m;){const w=c[g++],S=c[g++];try{x=w(x)}catch(k){S.call(this,k);break}}try{b=l4.call(this,x)}catch(w){return Promise.reject(w)}for(g=0,m=v.length;g<m;)b=b.then(v[g++],v[g++]);return b}getUri(e){e=Ho(this.defaults,e);const n=R2(e.baseURL,e.url,e.allowAbsoluteUrls);return C2(n,e.params,e.paramsSerializer)}}_e.forEach(["delete","get","head","options"],function(e){Tc.prototype[e]=function(n,r){return this.request(Ho(r||{},{method:e,url:n,data:(r||{}).data}))}});_e.forEach(["post","put","patch"],function(e){function n(r){return function(l,h,c){return this.request(Ho(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:h}))}}Tc.prototype[e]=n(),Tc.prototype[e+"Form"]=n(!0)});const U0=Tc;class S1{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const r=this;this.promise.then(o=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](o);r._listeners=null}),this.promise.then=o=>{let l;const h=new Promise(c=>{r.subscribe(c),l=c}).then(o);return h.cancel=function(){r.unsubscribe(l)},h},e(function(l,h,c){r.reason||(r.reason=new vs(l,h,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new S1(function(o){e=o}),cancel:e}}}const RA=S1;function IA(t){return function(n){return t.apply(null,n)}}function OA(t){return _e.isObject(t)&&t.isAxiosError===!0}const Tp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Tp).forEach(([t,e])=>{Tp[e]=t});const HA=Tp;function B2(t){const e=new U0(t),n=g2(U0.prototype.request,e);return _e.extend(n,U0.prototype,e,{allOwnKeys:!0}),_e.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return B2(Ho(t,o))},n}const Wn=B2(k1);Wn.Axios=U0;Wn.CanceledError=vs;Wn.CancelToken=RA;Wn.isCancel=N2;Wn.VERSION=z2;Wn.toFormData=cu;Wn.AxiosError=Pt;Wn.Cancel=Wn.CanceledError;Wn.all=function(e){return Promise.all(e)};Wn.spread=IA;Wn.isAxiosError=OA;Wn.mergeConfig=Ho;Wn.AxiosHeaders=Si;Wn.formToJSON=t=>_2(_e.isHTMLForm(t)?new FormData(t):t);Wn.getAdapter=P2.getAdapter;Wn.HttpStatusCode=HA;Wn.default=Wn;const PA=Wn,zA="http://127.0.0.1:8000/api",Ko=PA.create({baseURL:zA,timeout:1e4,headers:{"Content-Type":"application/json"}}),Un={createMindmap:(t="思维导图",e=null)=>Ko.post("/mindMaps",{title:t,data:e}),getMindmap:t=>Ko.get(`/mindMaps/${t}`),getAllMindmaps:()=>Ko.get("/mindmaps"),addNodes:(t,e)=>Ko.post("/mindMaps/addNodes",{mindMapId:t,nodes:e}),updateNode:(t,e)=>Ko.patch("/mindMaps/updateNode",{id:t,...e}),deleteNodes:t=>Ko.delete("/mindMaps/deleteNodes",{data:{nodeIds:t}})};const BA={class:"mindmap-container"},FA={key:0,class:"welcome-page"},qA={class:"ai-input-content"},jA=["disabled","onKeydown"],$A={class:"ai-input-actions"},UA=["disabled"],VA=["disabled"],WA={key:0},GA={key:1},KA={key:3,class:"save-controls"},XA={class:"image-preview-header"},ZA={class:"image-preview-title"},YA={class:"image-preview-body"},JA={key:0,class:"image-preview-loading"},QA={key:1,class:"image-preview-error"},eM=["src","alt"],tM={class:"rich-editor-body"},nM={class:"delete-confirm-footer"},rM={__name:"MindMap",setup(t,{expose:e}){const n={name:"Light Purple",type:"light",palette:["#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#660874","--root-border-color":"rgba(0, 0, 0, 0)","--main-color":"#444446","--main-bgcolor":"#ffffff","--topic-padding":"3px","--color":"#777777","--bgcolor":"#f6f6f6","--selected":"#660874","--accent-color":"#660874","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea","--map-padding":"50px","--enable-node-border":"true","--node-border-padding":"8","--node-border-radius":"8","--node-border-color":"#660874","--node-border-fill":"#ffffff","--node-border-width":"1"}},r=yt(null),o=yt(null),l=yt(null),h=yt({}),c=yt({}),p=yt(null),v=yt(1),b=yt(!0),g=yt(!1),m=yt(!1),x=yt(null),w=yt(""),S=yt(!1);yt(new Map),yt(!1),yt({x:0,y:0}),yt(null);const k=yt(!1),C=yt(""),T=yt(""),A=yt(!1),M=yt(""),y=yt(!1),N=yt(""),z=yt(""),F=yt(null),P=yt(null),Y=yt([]),te=yt(!1);yt(-1),yt(""),yt(!1),yt(""),yt(null),yt(null);const ce=yt(null);let Me=null;yt({accept:"image/*",max:5*1024*1024,multiple:!1,fieldName:"file"});const Fe=()=>{b.value=!0,r.value&&(r.value.innerHTML=""),o.value&&(o.value=null)},We=()=>{b.value=!1},rt=()=>{b.value=!1},je=(U,Q="")=>{console.log("🖼️ 打开图片预览:",{imageUrl:U,altText:Q});let Z=U;typeof U=="string"&&(U.startsWith("/")||U.startsWith("./")||U.startsWith("../")?Z=new URL(U,window.location.origin).href:(U.startsWith("data:image/")||U.startsWith("http://")||U.startsWith("https://"))&&(Z=U)),console.log("🖼️ 处理后的图片URL:",Z),k.value=!0,T.value=Q||"图片预览",A.value=!0,M.value="",he();const xe=new Image;xe.onload=()=>{console.log("✅ 图片预加载成功"),C.value=Z,A.value=!1,J()},xe.onerror=()=>{console.error("❌ 图片预加载失败:",Z),J(),A.value=!1,M.value=`图片加载失败: ${Z}`},xe.src=Z},Ne=()=>{J(),k.value=!1,C.value="",T.value="",A.value=!1,M.value=""},nt=(U,Q)=>{console.log("📝 打开富文本编辑器:",{nodeObj:U,nodeElement:Q}),F.value=U,P.value=Q;let Z=U.title;if(!Z&&U.topic&&(Z=U.topic.replace(/!\[.*?\]\(.*?\)/g,"").trim()),N.value=Z||"编辑节点内容",console.log("📝 节点完整数据:",{title:U.title,topic:U.topic,dangerouslySetInnerHTML:U.dangerouslySetInnerHTML,image:U.image,hasImage:!!U.image,htmlContent:U.htmlContent,allKeys:Object.keys(U)}),U.dangerouslySetInnerHTML?(z.value=convertHTMLToMarkdown(U.dangerouslySetInnerHTML),console.log("📝 转换后的Markdown内容:",z.value)):U.topic?z.value=U.topic:z.value="",U.image&&!z.value.includes("![")){console.log("📝 发现MindElixir原生图片添加到编辑器中");const xe=typeof U.image=="string"?U.image:U.image.url,Pe=`![${U.image.alt||U.topic||"图片"}](${xe})`;z.value=z.value+`
`+Pe}parseExistingImages(),y.value=!0,console.log("📝 富文本编辑器已打开")},ct=()=>{y.value=!1,N.value="",z.value="",F.value=null,P.value=null,Y.value=[],q()},tt=async()=>{if(!ce.value){console.error("❌ vditorContainer未找到");return}console.log("🎯 开始初始化Vditor编辑器..."),console.log("🔍 vditorContainer元素:",ce.value),console.log("🔍 容器可见性:",ce.value.offsetParent!==null),console.log("🔍 容器尺寸:",{width:ce.value.offsetWidth,height:ce.value.offsetHeight});try{ce.value.innerHTML="",Me=new nl(ce.value,{height:400,placeholder:"请输入节点内容...",mode:"wysiwyg",theme:"classic",toolbarConfig:{pin:!0},cache:{enable:!1},preview:{hljs:{style:"github"}},toolbar:["emoji","headings","bold","italic","strike","|","list","ordered-list","check","|","quote","line","code","inline-code","|","link","table","image","upload","|","undo","redo","fullscreen","edit-mode"],upload:{accept:"image/*",multiple:!1,fieldName:"file",max:5*1024*1024,url:"",linkToImgUrl:"",success:(U,Q)=>{console.log("图片上传成功:",Q)},error:U=>{console.error("图片上传失败:",U)}},after:()=>{console.log("✅ Vditor编辑器初始化完成"),setTimeout(()=>{z.value&&z.value.trim()?(Me.setValue(z.value),console.log("✅ 内容已设置到WYSIWYG编辑器:",z.value.substring(0,100)+"..."),console.log("✅ 编辑器当前模式: wysiwyg (所见即所得模式)")):(console.warn("⚠️ editorContent.value为空设置空内容"),Me.setValue("")),Me.focus(),Me.on?Me.on("input",U=>{const Q=Me.getValue();z.value=Q,console.log("📝 编辑器内容变化(Markdown):",Q.substring(0,50)+"...")}):console.warn("⚠️ Vditor实例没有on方法"),setTimeout(()=>{const U=document.querySelector(".vditor-toolbar"),Q=document.querySelector(".vditor-wysiwyg");console.log("🔍 Vditor工具栏:",U),console.log("🔍 Vditor编辑器区域:",Q),!U||!Q?(console.error("❌ Vditor组件没有正确渲染"),console.error("工具栏状态:",U?"存在":"不存在"),console.error("编辑器状态:",Q?"存在":"不存在")):(console.log("✅ Vditor组件渲染成功"),console.log("工具栏按钮数量:",U.querySelectorAll("button").length),console.log("工具栏高度:",U.offsetHeight))},100)},100)}}),console.log("✅ Vditor编辑器创建成功")}catch(U){console.error("❌ Vditor编辑器初始化失败:",U),console.error("错误详情:",U.stack)}},q=()=>{Me&&(Me.destroy(),Me=null,console.log("🗑️ Vditor编辑器已销毁"))},Ht=async()=>{var He,Pe,pe,Oe;if(console.log("🚀 saveRichTextChanges函数被调用"),console.log("🚀 开始保存 Vditor 富文本内容..."),console.log("📝 当前editorTitle:",N.value),console.log("📝 当前editorContent:",z.value.substring(0,100)+"..."),console.log("📝 当前节点:",F.value),console.log("📝 Vditor实例状态:",!!Me),!F.value){alert("节点信息丢失");return}if(!Me){console.error("❌ Vditor实例不存在无法获取内容"),alert("编辑器未初始化,请重试");return}const U=Me?Me.getValue():z.value,Q=Me?Me.getHTML():z.value,Z=U.trim()||"";console.log("📝 获取到的Markdown内容:",Z.substring(0,100)+"..."),console.log("📝 获取到的HTML内容:",Q.substring(0,100)+"...");const xe=N.value!==(F.value.title||"");if(console.log("🔍 标题变化检查:",{editorTitle:N.value,currentNodeTitle:F.value.title||"",titleChanged:xe}),F.value.topic=Z,F.value.title=N.value,F.value.dangerouslySetInnerHTML=Q,P.value&&(P.value.innerHTML=Q,xe)){const Je=P.value.querySelector(".tpc");Je&&(Je.textContent=N.value,console.log("📝 DOM文本元素已更新:",N.value))}try{const Je=F.value.id.replace(/^me/,""),Ge={newTitle:N.value,newDes:((He=F.value.data)==null?void 0:He.des)||"",newParentId:F.value.parentId||((Pe=F.value.parent)==null?void 0:Pe.id),newDangerouslySetInnerHTML:Q||""};console.log("🔍 直接发送到后端的更新数据:",Ge),console.log("🔍 清理后的节点ID:",Je);const Ct=await Un.updateNode(Je,Ge);if(Ct.data&&Ct.data.success){if(console.log("✅ 节点数据已保存到后端"),o.value&&F.value&&P.value){const un=P.value.querySelector(".tpc");un&&(un.innerHTML=Q,console.log("📝 节点显示内容已更新 - 直接设置HTML"))}alert("✅ 节点内容保存成功!")}else console.warn("⚠️ 保存节点到后端失败:",Ct),alert("❌ 保存失败,请重试")}catch(Je){console.error("❌ 保存节点到后端失败:",Je),alert("❌ 保存失败,请重试");return}(pe=o.value)==null||pe.bus.fire("operation",{name:"finishEdit",obj:F.value,origin:F.value.topic||""}),xe&&((Oe=o.value)==null||Oe.bus.fire("operation",{name:"updateNode",obj:F.value,origin:N.value})),console.log("🔄 开始刷新前端节点渲染..."),o.value?ja(()=>{o.value.refresh(),console.log("🔄 思维导图已刷新"),setTimeout(()=>{ct(),console.log("✅ 编辑器弹窗已关闭")},100)}):(ct(),console.log("✅ 编辑器弹窗已关闭无mindElixir实例")),console.log("✅ 富文本内容已保存")},Rt=()=>{console.log("✅ 模态框图片加载成功")},$t=U=>{console.error("❌ 模态框图片加载失败:",U),console.error("❌ 失败的图片URL:",C.value),A.value=!1,M.value=`图片显示失败: ${C.value}`},Nt=()=>{console.log("🔄 重试加载图片"),A.value=!0,M.value="",he()};let oe=null;const he=()=>{oe&&clearTimeout(oe),oe=setTimeout(()=>{A.value&&(console.warn("⚠️ 图片加载超时"),A.value=!1,M.value="图片加载超时请检查网络连接或图片URL是否正确")},1e4)},J=()=>{oe&&(clearTimeout(oe),oe=null)},ee=()=>{if(!o.value||!r.value)return null;try{const U=r.value.querySelector(".map-canvas");if(U){const Q=U.style.transform,Z=o.value.scaleVal||1;return console.log("📍 保存位置:",{transform:Q,scaleVal:Z}),{transform:Q,scaleVal:Z}}}catch(U){console.warn("保存位置失败:",U)}return null},Ce=U=>{if(!(!U||!r.value||!o.value))try{const Q=r.value.querySelector(".map-canvas");Q&&U.transform&&(Q.style.setProperty("transform",U.transform,"important"),U.scaleVal&&o.value.scaleVal!==U.scaleVal&&(o.value.scaleVal=U.scaleVal),Q.style.setProperty("transform-origin","center center","important"),console.log("📍 恢复位置:",{transform:U.transform,scaleVal:U.scaleVal}))}catch(Q){console.warn("恢复位置失败:",Q)}},se=async(U,Q=!1,Z=!0)=>{try{const xe=Q?ee():null;xe?console.log("📍 保存当前位置用于保持原位:",xe):!Q&&!Z&&console.log("📍 添加节点模式:不保存位置,等待居中到新节点"),console.log("🔍 loadMindmapData 被调用,数据:",U),console.log("🔍 数据字段:",Object.keys(U||{})),U&&U.id?(p.value=U.id,console.log("🔍 设置当前思维导图ID (data.id):",U.id)):U&&U.mindmapId?(p.value=U.mindmapId,console.log("🔍 设置当前思维导图ID (data.mindmapId):",U.mindmapId)):U&&U.nodeData&&U.nodeData.mindmapId?(p.value=U.nodeData.mindmapId,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmapId):",U.nodeData.mindmapId)):U&&U.nodeData&&U.nodeData.mindmap_id?(p.value=U.nodeData.mindmap_id,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmap_id):",U.nodeData.mindmap_id)):(console.warn("⚠️ 数据中没有找到 id 或 mindmapId 字段"),console.log("🔍 可用的字段:",Object.keys(U||{})),U&&U.nodeData&&console.log("🔍 nodeData字段:",Object.keys(U.nodeData||{}))),console.log("🔍 设置后的 currentMindmapId.value:",p.value),We(),await ja(),r.value||(console.warn("⚠️ 思维导图容器未准备好等待DOM更新..."),await new Promise(He=>setTimeout(He,100)),r.value||console.warn("⚠️ 思维导图容器仍未准备好,尝试继续执行..."));try{if(r.value){if(o.value&&o.value.data&&o.value.data.mindmapId===p.value){console.log("🔄 使用现有Mind Elixir实例直接更新数据"),o.value.data=U.nodeData||U,o.value.render(),Yi(),xe&&setTimeout(()=>{Ce(xe),console.log("📍 已恢复位置和缩放状态")},100);return}if(console.log("🔍 创建新的Mind Elixir实例设置markdown函数"),o.value=new tr({el:r.value,direction:tr.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:n,enableNodeBorder:!0,markdown:(pe,Oe)=>{if(pe.includes("|")||pe.includes("**")||pe.includes("`")||pe.includes("#")||pe.includes("!["))try{console.log("🎯 检测到Markdown内容使用同步渲染:",pe.substring(0,100)+"...");const Je=ul(pe);return console.log("🎯 同步渲染结果:",Je.substring(0,200)+"..."),Je}catch(Je){return console.error("🎯 渲染失败,返回原文:",Je),pe}return pe},imageProxy:pe=>pe.startsWith("http://")||pe.startsWith("https://")?pe:pe.startsWith("/")?window.location.origin+pe:window.location.origin+"/"+pe}),console.log("✅ Mind Elixir实例创建完成markdown函数已设置"),console.log("🔍 初始化Mind Elixir数据:",U),U&&U.nodeData){const pe=Object.keys(U.nodeData);console.log("🔍 节点数量:",pe.length),pe.forEach(Oe=>{const Je=U.nodeData[Oe];Je.dangerouslySetInnerHTML&&console.log(`🔍 节点 ${Oe} 有 dangerouslySetInnerHTML:`,Je.dangerouslySetInnerHTML.substring(0,100))})}const He=o.value.init(U);console.log("✅ Mind Elixir实例创建成功初始化结果:",He),xe?(Ce(xe),console.log("📍 初始化后立即恢复位置")):!Q&&!Z&&console.log("📍 跳过根节点居中,等待居中新节点"),(async()=>{try{await ja(),!xe&&(Q||Z)&&o.value&&o.value.toCenter&&o.value.toCenter()}catch(pe){console.warn("⚠️ 渲染优化过程中出现错误:",pe)}})(),o.value.bus.addListener("showImagePreview",(pe,Oe)=>{console.log("🖼️ 收到图片预览事件:",{imageUrl:pe,altText:Oe}),je(pe,Oe)}),o.value.bus.addListener("showRichTextEditor",(pe,Oe)=>{console.log("📝 收到富文本编辑事件:",{nodeObj:pe,nodeElement:Oe}),nt(pe,Oe)}),setTimeout(()=>{tn()},500)}else{console.warn("⚠️ 容器未准备好延迟创建Mind Elixir实例..."),setTimeout(()=>{if(r.value){o.value=new tr({el:r.value,direction:tr.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:n,enableNodeBorder:!0,markdown:(pe,Oe)=>{if(pe.includes("|")||pe.includes("**")||pe.includes("`")||pe.includes("#")||pe.includes("!["))try{return console.log("🎯 延迟创建检测到Markdown内容使用同步渲染:",pe.substring(0,100)+"..."),ul(pe)}catch(Je){return console.error("🎯 延迟创建:渲染失败,返回原文:",Je),pe}return pe}});const He=o.value.init(U);console.log("✅ Mind Elixir实例延迟创建成功"),xe?(Ce(xe),console.log("📍 延迟创建后立即恢复位置"),setTimeout(()=>{Ce(xe),console.log("📍 延迟创建后二次确认位置恢复")},100)):!Q&&!Z&&console.log("📍 延迟创建后跳过根节点居中,等待居中新节点"),(async()=>{try{await ja(),await document.fonts.ready,await new Promise(pe=>requestAnimationFrame(pe)),o.value&&o.value.refresh&&(console.log("🔄 延迟创建实例执行完整DOM稳定后的延迟刷新"),o.value.refresh(),!xe&&(Q||Z)&&o.value.toCenter())}catch(pe){console.warn("⚠️ 延迟创建实例的延迟刷新过程中出现错误:",pe),setTimeout(()=>{o.value&&o.value.refresh&&o.value.refresh()},250)}})(),o.value.bus.addListener("showImagePreview",(pe,Oe)=>{console.log("🖼️ 收到图片预览事件(延迟创建):",{imageUrl:pe,altText:Oe}),je(pe,Oe)}),o.value.bus.addListener("showImageEditor",(pe,Oe,Je)=>{console.log("🖼️ 收到图片编辑事件(延迟创建):",{imageUrl:pe,altText:Oe}),openImageEditor(pe,Oe,Je)}),setTimeout(()=>{setTimeout(()=>{tn()},500),xe?Ce(xe):Z&&X(),Yi(),G()},300)}},200);return}}catch{setTimeout(()=>{try{if(r.value){o.value=new tr({el:r.value,direction:tr.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:n,enableNodeBorder:!0,markdown:(pe,Oe)=>{if(pe.includes("|")||pe.includes("**")||pe.includes("`")||pe.includes("#")||pe.includes("!["))try{return console.log("🎯 重试创建检测到Markdown内容使用同步渲染:",pe.substring(0,100)+"..."),ul(pe)}catch(Je){return console.error("🎯 重试创建:渲染失败,返回原文:",Je),pe}return pe}});const Pe=o.value.init(U);xe?(Ce(xe),console.log("📍 重试创建后立即恢复位置"),setTimeout(()=>{Ce(xe),console.log("📍 重试创建后二次确认位置恢复")},100)):!Q&&!Z&&console.log("📍 重试创建后跳过根节点居中,等待居中新节点"),setTimeout(()=>{xe?Ce(xe):Z&&X(),Yi(),G()},300)}}catch(Pe){console.error("❌ Mind Elixir实例重试创建失败:",Pe)}},500);return}setTimeout(()=>{Q&&xe?Ce(xe):Z&&X(),We(),Yi(),setTimeout(()=>{G()},500)},100)}catch{}},G=()=>{o.value&&r.value&&setTimeout(()=>{r.value.querySelectorAll("me-tpc, .topic, [data-id]").forEach((Q,Z)=>{var pe;const xe=Q.getAttribute("data-id")||Q.id||Q.getAttribute("nodeid")||((pe=Q.querySelector("[data-id]"))==null?void 0:pe.getAttribute("data-id"));if(!xe)return;const He=(Oe,Je)=>{for(const Ge of Oe){if(Ge.id===Je)return Ge;if(Ge.children){const Ct=He(Ge.children,Je);if(Ct)return Ct}}return null},Pe=He(o.value.data.nodeData,xe);if(Pe&&Pe.data&&Pe.data.des){let Oe=Q.querySelector(".node-description");Oe||(Oe=document.createElement("div"),Oe.className="node-description",Oe.style.cssText=`
font-size: 11px;
color: #666;
margin-top: 6px;
padding: 6px 8px;
background: rgba(0, 0, 0, 0.03);
border-radius: 4px;
max-width: 250px;
word-wrap: break-word;
line-height: 1.3;
border-left: 3px solid #e0e0e0;
display: block;
`,Q.appendChild(Oe));const Je=Pe.data.des;Je.length>150?(Oe.textContent=Je.substring(0,150)+"...",Oe.title=Je):Oe.textContent=Je}})},1e3)},X=()=>{try{if(o.value&&o.value.toCenter){o.value.toCenter(),console.log("✅ 使用 MindElixir toCenter 方法实现根节点居中");return}const U=r.value;if(!U)return;const Q=U.querySelector(".map-canvas");if(!Q)return;const Z=Q.querySelectorAll("me-tpc");if(Z.length===0)return;let xe=1/0,He=-1/0,Pe=1/0,pe=-1/0;Z.forEach(Ia=>{const Li=Ia.getBoundingClientRect(),Oa=U.getBoundingClientRect(),_i=Li.left-Oa.left,Zr=Li.top-Oa.top;xe=Math.min(xe,_i),He=Math.max(He,_i+Li.width),Pe=Math.min(Pe,Zr),pe=Math.max(pe,Zr+Li.height)});const Oe=(xe+He)/2,Je=(Pe+pe)/2,Ge=U.clientWidth/2,Ct=U.clientHeight/2,Gt=Ge-Oe,un=Ct-Je;Q.style.transform=`translate(${Gt}px, ${un}px)`,Q.style.opacity="1",Q.style.transition="opacity 0.3s ease";const $n=100,mr=Math.max(Gt,$n),Hr=Math.max(un,$n);Q.style.transform=`translate(${mr}px, ${Hr}px)`,Q.style.opacity="1",Q.style.visibility="visible"}catch{}},be=async U=>{if(!(!o.value||!U))try{console.log("🎯 开始处理新节点:",U);let Q=null,Z=0;const xe=5;for(;!Q&&Z<xe;)Q=o.value.findEle(U),Q||(Z++,await new Promise(He=>setTimeout(He,50)));Q?(console.log("✅ 找到节点元素:",Q),o.value.scrollIntoView&&(o.value.scrollIntoView(Q),console.log("✅ 节点已平滑居中显示")),setTimeout(()=>{o.value.beginEdit&&(o.value.beginEdit(Q),console.log("✅ 节点已进入编辑状态"))},350)):console.error("❌ 多次尝试后仍未找到节点元素:",U)}catch(Q){console.error("❌ 居中显示节点失败:",Q)}},le=()=>{if(!l.value)return;if(o.value&&o.value.getNodeById)try{const Q=o.value.getNodeById(l.value.id);if(Q){const Z=Q.getBoundingClientRect(),xe=r.value.getBoundingClientRect(),He=Z.left-xe.left+Z.width/2,Pe=Z.bottom-xe.top+10;h.value={left:`${He}px`,top:`${Pe}px`};return}}catch{}let U=document.querySelector(`[data-id="${l.value.id}"]`);if(U||(U=document.querySelector(`.topic[data-id="${l.value.id}"]`)),U||(U=document.querySelector(`[data-node-id="${l.value.id}"]`)),U||(U=document.querySelector(`[data-nodeid="me${l.value.id}"]`)),!U){const Q=document.querySelectorAll("me-tpc");for(const Z of Q)if(Z.getAttribute("data-nodeid")===`me${l.value.id}`){U=Z;break}}if(!U){const Q=document.querySelectorAll(".topic");for(const Z of Q)if(Z.textContent.trim()===l.value.topic){U=Z;break}}if(U){const Q=U.getBoundingClientRect(),Z=r.value.getBoundingClientRect(),xe=Q.left-Z.left+Q.width/2,He=Q.bottom-Z.top+10;h.value={left:`${xe}px`,top:`${He}px`}}else h.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},ye=async()=>{l.value&&(await en(l.value),l.value=null)},Ae=async()=>{l.value&&(await co(l.value),l.value=null)},ze=async()=>{l.value&&(await ur(l.value),l.value=null)},Xe=async()=>{if(!l.value)return;console.log("Ask AI for node:",l.value);const U=parseFloat(h.value.left)||0,Q=parseFloat(h.value.top)||0;c.value={left:`${U}px`,top:`${Q+60}px`,transform:"translateX(-50%)"},m.value=!0,x.value=l.value},Ke=()=>{m.value=!1,x.value=null,w.value="",S.value=!1,l.value=null},Be=U=>{if(!U)return"";const Q=[];return U.parent&&U.parent.topic&&Q.push(`父节点: ${U.parent.topic}`),U.parent&&U.parent.parent&&U.parent.parent.topic&&Q.push(`祖父节点: ${U.parent.parent.topic}`),Q.join(" | ")},st=U=>{U.ctrlKey||U.metaKey||(U.preventDefault(),qe())},qe=async()=>{if(!(!w.value.trim()||!x.value||S.value)){S.value=!0;try{const U="你是一个专业的思维导图分析助手。请根据用户的问题和提供的节点信息,给出专业、有用的回答。",Q=`节点信息:
当前节点:${x.value.topic}
上下文:${Be(x.value)}
用户问题:${w.value}
请给出详细的回答,回答应该:
1. 直接回答用户的问题
2. 提供具体的建议或改进方案
3. 保持专业和有用的语调
4. 回答长度适中,便于在思维导图中展示`;console.log("发送AI请求:",{systemPrompt:U,userPrompt:Q});const Z=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:U,user_prompt:Q,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!Z.ok)throw new Error(`HTTP error! status: ${Z.status}`);let xe="";const He=Z.body.getReader(),Pe=new TextDecoder;let pe="";for(;;){const{done:Oe,value:Je}=await He.read();if(Oe)break;pe+=Pe.decode(Je,{stream:!0});const Ge=pe.split(`
`);pe=Ge.pop()||"";for(const Ct of Ge)if(Ct.startsWith("data: "))try{const Gt=JSON.parse(Ct.slice(6));if(Gt.type==="chunk")xe+=Gt.content;else if(Gt.type==="error")throw new Error(Gt.content)}catch(Gt){console.warn("解析流式数据失败:",Gt)}}await Ut(x.value,w.value,xe),Ke()}catch(U){console.error("AI请求失败:",U),alert("AI请求失败请稍后重试")}finally{S.value=!1}}},Re=U=>U.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(Q,Z)=>{if(Z.includes(":")){const xe=Z.split(":");if(xe.length>1)return`【${xe[0]}】: ${xe.slice(1).join(":")}`}return`【${Z}】`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim," • $1").replace(/^\d+\. (.*$)/gim," $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/\n\n/g,`
`).replace(/\n/g,`
`),mt=(U,Q,Z)=>{const xe=U.split(`
`);let He=Z,Pe=[];for(let pe=0;pe<xe.length;pe++){const Je=xe[pe].trim(),Ge=Je.match(/^[-*+]\s*【(.+)】/);if(Ge){const Ct=Ge[1].trim(),Gt={id:`node_${He++}`,topic:Ct,children:[],level:(Q.level||0)+1,data:{}};let un=[],$n=pe+1;for(;$n<xe.length;){const mr=xe[$n].trim();if(mr.match(/^[-*+]\s*【(.+)】/))break;const Ia=mr.match(/^[-*+]\s+(.+)$/);if(Ia){const Li=Ia[1].trim(),Oa=Re(Li);un.push("• "+Oa)}$n++}if(un.length>0){const mr=Re(un.join(`
`));Gt.topic=Gt.topic+`
`+mr}Q.children.push(Gt),pe=$n-1}else Je&&Pe.push(Je)}if(Pe.length>0){const pe=Pe.join(`
`).trim();pe&&pe.split(`
`).filter(Je=>Je.trim()).forEach(Je=>{const Ge=Re(Je.trim());if(Ge){const Ct={id:`node_${He++}`,topic:Ge,children:[],level:(Q.level||0)+1,data:{}};Q.children.push(Ct)}})}return{nodeCounter:He}},Dt=U=>{const Q=U.split(`
`);let Z=null;const xe=[];let He=0,Pe=[];if(Q.forEach((pe,Oe)=>{const Je=pe.trim(),Ge=Je.match(/^(#{1,6})\s+(.+)$/);if(Ge){if(Pe.length>0&&xe.length>0){const mr=Pe.join(`
`).trim();mr&&(He=mt(mr,xe[xe.length-1],He).nodeCounter),Pe=[]}const Ct=Ge[1].length,Gt=Ge[2].trim(),un=Re(Gt),$n={id:`node_${He++}`,topic:un,children:[],level:Ct,data:{}};if(Ct===1&&!Z)Z=$n,xe.length=0,xe.push(Z);else{for(;xe.length>1&&xe[xe.length-1].level>=Ct;)xe.pop();xe.length>0&&xe[xe.length-1].children.push($n),xe.push($n)}}else Je&&Pe.push(Je)}),Pe.length>0&&xe.length>0){const pe=Pe.join(`
`).trim();pe&&(He=mt(pe,xe[xe.length-1],He).nodeCounter)}return Z||(Z={id:"root",topic:"根节点",children:[],data:{}}),Z},Ut=async(U,Q,Z)=>{var xe,He,Pe;try{const Oe=(Hr=>Hr.replace(/^#+\s*/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/^\s*[-*+]\s*(?![|])/gm,"• ").replace(/\n{3,}/g,`
`).trim())(Z),Je=`# ${Q}
${Oe}`,Ge=Dt(Je),Ct={title:Q,des:`AI追问产生的节点 - ${new Date().toLocaleString()}`,parentId:U.id,isRoot:!1},Gt=[];if(Ge.children&&Ge.children.length>0&&Ge.children.forEach(Hr=>{Gt.push({title:Hr.topic,des:"",parentId:null,isRoot:!1})}),console.log("当前思维导图ID:",p.value),!p.value)throw new Error("没有找到当前思维导图ID无法创建节点");const un=await Un.addNodes(p.value,[Ct]);if(!un.data||!un.data.success)throw new Error("AI父节点创建失败");const $n=(Pe=(He=(xe=un.data.data)==null?void 0:xe.nodes)==null?void 0:He[0])==null?void 0:Pe.id;if(!$n)throw new Error("无法获取创建的父节点ID");Gt.forEach(Hr=>{Hr.parentId=$n});let mr=null;if(Gt.length>0&&(mr=await Un.addNodes(p.value,Gt)),un.data&&un.data.success)await er();else throw new Error("AI父节点创建失败")}catch(pe){console.error("创建AI节点失败:",pe),alert("创建AI回答节点失败: "+pe.message)}},jt=async()=>{if(l.value){try{const U=l.value.topic||l.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(U),Hn();else{const Q=document.createElement("textarea");Q.value=U,Q.style.position="fixed",Q.style.left="-999999px",Q.style.top="-999999px",document.body.appendChild(Q),Q.focus(),Q.select();const Z=document.execCommand("copy");document.body.removeChild(Q),Z?Hn():Mn()}}catch{Mn()}l.value=null}},Hn=()=>{const U=document.createElement("div");U.textContent="文本已复制到剪贴板",U.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #4CAF50;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`;const Q=document.createElement("style");Q.textContent=`
@keyframes slideIn {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
`,document.head.appendChild(Q),document.body.appendChild(U),setTimeout(()=>{U.parentNode&&U.parentNode.removeChild(U),Q.parentNode&&Q.parentNode.removeChild(Q)},3e3)},Mn=()=>{const U=document.createElement("div");U.textContent="复制失败,请手动复制",U.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #f44336;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(U),setTimeout(()=>{U.parentNode&&U.parentNode.removeChild(U)},3e3)},Pn=(U,Q="success")=>{const Z=document.createElement("div");Z.textContent=U;const xe=Q==="success"?"#4CAF50":Q==="error"?"#f44336":"#ff9800";Z.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: ${xe};
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(Z),setTimeout(()=>{Z.parentNode&&Z.parentNode.removeChild(Z)},2e3)},kn=()=>{const U=document.createElement("div");U.textContent="✅ 节点编辑已保存",U.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #4CAF50;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(U),setTimeout(()=>{U.parentNode&&U.parentNode.removeChild(U)},2e3)},lr=()=>{const U=document.createElement("div");U.textContent="❌ 节点编辑保存失败",U.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #f44336;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(U),setTimeout(()=>{U.parentNode&&U.parentNode.removeChild(U)},3e3)},cr=async U=>{try{console.log("🎯 处理节点拖拽操作:",U.name),console.log("📦 操作详情:",{name:U.name,objs:U.objs,toObj:U.toObj}),setTimeout(async()=>{var Q;try{const Z=U.objs||[],xe=U.toObj;if(!Z.length||!xe){console.warn("⚠️ 拖拽操作缺少必要信息");return}console.log(`📦 准备保存 ${Z.length} 个节点的父子关系`);let He=null;U.name==="moveNodeIn"?(He=xe.id,console.log(`📌 拖入操作:新父节点为 ${He}`)):(U.name==="moveNodeBefore"||U.name==="moveNodeAfter")&&(He=((Q=xe.parent)==null?void 0:Q.id)||null,console.log(`📌 拖到兄弟位置:新父节点为 ${He||"根节点"}`));const Pe=Z.map(async Ge=>{try{console.log(`🔄 更新节点 ${Ge.id} 的父节点为 ${He||"根节点"}`);const Ct=await Un.updateNode(Ge.id,{newParentId:He});return Ct.data&&Ct.data.success?(console.log(`✅ 节点 ${Ge.id} 父子关系更新成功`),{success:!0,nodeId:Ge.id}):(console.warn(`⚠️ 节点 ${Ge.id} 父子关系更新失败:`,Ct),{success:!1,nodeId:Ge.id})}catch(Ct){return console.error(`❌ 节点 ${Ge.id} 父子关系更新失败:`,Ct),{success:!1,nodeId:Ge.id,error:Ct}}}),pe=await Promise.all(Pe),Oe=pe.filter(Ge=>Ge.success).length,Je=pe.filter(Ge=>!Ge.success).length;console.log(`📊 拖拽保存结果: ${Oe} 成功, ${Je} 失败`)}catch(Z){console.error("❌ 保存拖拽后的结构失败:",Z),Pn("❌ 节点拖拽保存失败","error")}},500)}catch(Q){console.error("❌ 处理节点拖拽操作失败:",Q)}},zn=new Set,Ot=async U=>{var Z;const Q=`${U.name}-${(Z=U.obj)==null?void 0:Z.id}`;if(zn.has(Q)){console.log("⚠️ 跳过重复的编辑操作:",Q);return}zn.add(Q);try{console.log("🔍 处理编辑完成:",U);const xe=U.obj;xe?(console.log("🔍 保存编辑的节点:",{nodeId:xe.id,nodeTopic:xe.topic,hasDangerouslySetInnerHTML:!!xe.dangerouslySetInnerHTML}),await jn(xe)):console.error("无法解析编辑操作:",U)}catch(xe){console.error("处理编辑完成失败:",xe)}finally{zn.delete(Q)}},jn=async U=>{var Q,Z,xe;try{const He=U.id.replace(/^me/,"");if(console.log("🔍 更新节点编辑:",{originalNodeId:U.id,cleanNodeId:He,nodeTopic:U.topic,dangerouslySetInnerHTML:U.dangerouslySetInnerHTML,currentMindmapId:p.value}),!p.value){console.error("无法获取思维导图ID");return}const Pe={newTitle:U.topic,newDes:((Q=U.data)==null?void 0:Q.des)||"",newParentId:U.parentId||((Z=U.parent)==null?void 0:Z.id),newDangerouslySetInnerHTML:U.dangerouslySetInnerHTML||""};console.log("🔍 发送到后端的更新数据:",Pe);const pe=await Un.updateNode(He,Pe);if(pe.data&&pe.data.success){if(o.value&&U){let Oe=U.id;if(Oe.startsWith("me")&&(Oe=Oe.substring(2)),!Oe.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)){console.error("❌ 无效的UUID格式:",Oe,"原始ID:",U.id);return}console.log("🔍 查找DOM元素纯净ID:",Oe,"原始ID:",U.id),console.log("🔍 调试信息 - node对象:",{id:U.id,topic:((xe=U.topic)==null?void 0:xe.substring(0,50))+"...",hasDangerouslySetInnerHTML:!!U.dangerouslySetInnerHTML});try{const Je=o.value.findEle(Oe);console.log("🔍 找到的DOM元素:",Je),Je?(console.log("✅ DOM元素存在直接更新内容..."),U.dangerouslySetInnerHTML?(console.log("🔍 更新HTML内容:",U.dangerouslySetInnerHTML.substring(0,100)+"..."),Je.innerHTML=U.dangerouslySetInnerHTML,console.log("📝 节点显示内容已更新 (updateNodeEdit) - 直接设置HTML")):U.topic?(console.log("🔍 更新文本内容:",U.topic.substring(0,100)+"..."),Je.textContent=U.topic,console.log("📝 节点显示内容已更新 (updateNodeEdit) - 设置文本")):console.warn("⚠️ node对象没有dangerouslySetInnerHTML或topic")):console.warn("⚠️ findEle返回了null或undefined")}catch(Je){console.warn("⚠️ 无法找到DOM元素:",Je.message,"纯净ID:",Oe)}}kn()}else console.error("更新节点编辑失败:",pe.data),lr()}catch(He){console.error("更新节点编辑失败:",He),lr()}},en=async U=>{var Q;try{await nr();const Z=p.value||U.mindmap_id||U.mindmapId;if(!Z){console.error("无法获取思维导图ID");return}const xe=await Un.addNodes(Z,[{title:"新子节点",des:"子节点描述",parentId:U.id}]);if(xe.data&&xe.data.success){const He=((Q=xe.data.data)==null?void 0:Q.nodes)||[];if(He.length>0){const Pe=He[0];try{await new Promise(Oe=>setTimeout(Oe,800));const pe=await Un.getMindmap(Z);if(pe.data&&pe.data.nodeData){await se(pe.data,!1,!1);try{console.log("🎯 开始居中显示新子节点:",Pe.id),await be(Pe.id)}catch(Oe){console.error("居中显示新节点失败:",Oe)}}else throw new Error("无法获取思维导图数据")}catch(pe){console.error("刷新思维导图失败:",pe)}}}}catch(Z){console.error("添加子节点失败:",Z)}},co=async U=>{var Q;try{await nr(),console.log("添加兄弟节点到API:",U.id),console.log("节点信息:",{id:U.id,parentId:U.parentId,parent:U.parent,mindmap_id:U.mindmap_id,mindmapId:U.mindmapId});const Z=p.value||U.mindmap_id||U.mindmapId;if(!Z){console.error("无法获取思维导图ID");return}let xe=U.parentId;!xe&&U.parent&&(xe=U.parent.id);const He=await Un.addNodes(Z,[{title:"新兄弟节点",des:"兄弟节点描述",parentId:xe}]);if(console.log("添加兄弟节点响应:",He),He.data&&He.data.success){const Pe=((Q=He.data.data)==null?void 0:Q.nodes)||[];if(Pe.length>0){const pe=Pe[0];console.log("新创建的兄弟节点:",pe),console.log("🎯 使用MindElixir init方法重新初始化数据...");try{const Oe=await Un.getMindmap(Z);if(Oe.data&&Oe.data.nodeData){await se(Oe.data,!1,!1),console.log("✅ 思维导图刷新成功");try{console.log("🎯 开始居中显示新兄弟节点:",pe.id),await be(pe.id)}catch(Je){console.error("居中显示新节点失败:",Je)}}else throw new Error("无法获取思维导图数据")}catch(Oe){console.error("重新初始化失败,使用完整重新加载:",Oe);const Je=await Un.getMindmap(Z);Je.data&&Je.data.nodeData&&await se(Je.data,!0,!1)}}}}catch(Z){console.error("添加兄弟节点失败:",Z)}},ur=async U=>{try{await nr(),console.log("删除节点从API:",U.id);const Q=await Un.deleteNodes([U.id]);if(console.log("删除节点响应:",Q),Q.data&&Q.data.success){const Z=p.value||U.mindmap_id||U.mindmapId;if(Z){const xe=await Un.getMindmap(Z);xe.data&&xe.data.nodeData&&(await se(xe.data,!0,!1),console.log("✅ 删除节点后思维导图已刷新,保持当前位置"))}}}catch(Q){console.error("删除节点失败:",Q)}},nr=async()=>{const U=r.value;if(U){const Q=U.querySelector("input:focus");if(Q&&l.value){const Z=Q.value;Z!==l.value.topic&&Z.trim()!==""&&(console.log("保存当前编辑:",Z),l.value.topic=Z,await pn(l.value))}}},pn=async U=>{var Q,Z,xe,He,Pe;try{console.log("保存Mind Elixir编辑节点ID:",U.id),console.log("编辑内容:",{newTitle:U.topic,newDes:((Q=U.data)==null?void 0:Q.des)||""});const pe=String(U.id),Oe=await Un.updateNode(pe,{newTitle:U.topic,newDes:((Z=U.data)==null?void 0:Z.des)||""});console.log("更新节点API响应:",Oe),console.log("节点编辑已保存到后端"),console.log("✅ 节点编辑已保存,无需重新加载")}catch(pe){console.error("保存Mind Elixir编辑失败:",pe),console.error("错误详情:",(xe=pe.response)==null?void 0:xe.data),alert("保存编辑失败: "+(((Pe=(He=pe.response)==null?void 0:He.data)==null?void 0:Pe.detail)||pe.message))}},Ir=U=>{console.log("打开编辑模态框:",U),o.value.editText(U)},Ti=async(U,Q,Z)=>{var xe,He;try{console.log("🚀 开始批量创建节点:",U.topic,"父节点ID:",Z);const Pe=[];if(((Oe,Je)=>{var Ct;const Ge={title:Oe.topic||Oe.title||"无标题",des:((Ct=Oe.data)==null?void 0:Ct.des)||"",parentId:Je};Oe.dangerouslySetInnerHTML&&(Ge.dangerouslySetInnerHTML=Oe.dangerouslySetInnerHTML),Pe.push({nodeData:Ge,children:Oe.children||[]})})(U,Z),Pe.length>0){const Oe=Pe.map(Ge=>Ge.nodeData),Je=await Un.addNodes(Q,Oe);if(console.log("✅ 批量创建节点响应:",Je),Je.data&&Je.data.success){const Ge=((xe=Je.data.data)==null?void 0:xe.nodes)||[];if(console.log("✅ 成功创建节点数量:",Ge.length),U.children&&U.children.length>0){console.log("🔄 开始创建子节点,数量:",U.children.length);const Ct=(He=Ge[0])==null?void 0:He.id,Gt=U.children.map(un=>Ti(un,Q,Ct));await Promise.all(Gt)}}else console.error("❌ 批量创建节点失败,响应:",Je)}}catch(Pe){console.error("❌ 创建节点失败:",Pe)}};let di=null,cn=null;const tn=()=>{if(!r.value)return;console.log("🎯 添加自定义双击编辑事件监听器"),r.value._customDoubleClickHandler&&r.value.removeEventListener("dblclick",r.value._customDoubleClickHandler,!0);const U=Q=>{console.log("🎯 检测到双击事件:",Q.target);let Z=Q.target;for(;Z&&!Z.classList.contains("topic")&&Z.tagName!=="ME-TPC"&&(Z=Z.parentElement,!!Z););if(!Z||!Z.classList.contains("topic")&&Z.tagName!=="ME-TPC")for(Z=Q.target;Z&&Z.tagName!=="ME-TPC"&&(Z=Z.parentElement,!!Z););if(console.log("🎯 找到的节点元素:",Z,"标签名:",Z==null?void 0:Z.tagName,"类名:",Z==null?void 0:Z.className),Z&&(Z.classList.contains("topic")||Z.tagName==="ME-TPC")){console.log("🎯 确认是节点元素,阻止默认行为"),Q.preventDefault(),Q.stopPropagation();const xe=Z.getAttribute("data-nodeid")||Z.getAttribute("data-id");if(console.log("🎯 节点ID:",xe),xe&&o.value){console.log("🎯 Mind Elixir实例存在尝试获取节点数据"),console.log("🎯 mindElixir.value.data:",o.value.data);let He=null;try{const Pe=xe.startsWith("me")?xe.substring(2):xe;console.log("🎯 使用getNodeById获取节点数据纯ID:",Pe);const pe=o.value.getNodeById(Pe);console.log("📌 真正节点数据:",pe),pe&&(He=pe,console.log("✅ 从Mind Elixir API获取到真实节点数据"))}catch(Pe){console.warn("⚠️ getNodeById失败:",Pe)}if(!He&&o.value.data&&(He=dr(o.value.data,xe),console.log("🎯 从findNodeById获取到节点数据")),!He&&l.value&&l.value.id===xe&&(He=l.value,console.log("🎯 从selectedNode获取到节点数据")),!He){const Pe=Z.innerHTML,pe=Z.textContent||Z.innerText||"";console.log("🎯 从节点元素获取HTML内容:",Pe.substring(0,200)+"..."),console.log("🎯 从节点元素获取文本内容:",pe.substring(0,100)+"...");const Oe=Pe.includes("<img")||Pe.includes("!["),Je=Pe.includes("<table")||Pe.includes("|");console.log("🎯 内容分析 - 包含图片:",Oe,"包含表格:",Je),He={id:xe,topic:pe,data:pe,dangerouslySetInnerHTML:Pe,hasImage:Oe,hasTable:Je},console.log("🎯 创建包含HTML的完整节点对象:",He)}console.log("🎯 最终找到的节点数据:",He),He?(console.log("🎯 双击节点触发自定义编辑:",He),uo(He,Z)):console.log("🎯 无法获取任何节点数据")}else console.log("🎯 无法获取节点数据mindElixir:",!!o.value,"nodeId:",xe)}else console.log("🎯 不是节点元素,忽略双击事件")};r.value.addEventListener("dblclick",U,!0),r.value._customDoubleClickHandler=U},dr=(U,Q)=>{if(U.id===Q)return U;if(U.children&&U.children.length>0)for(const Z of U.children){const xe=dr(Z,Q);if(xe)return xe}return null},uo=(U,Q)=>{var xe,He,Pe,pe;console.log("🎯 打开自定义编辑模态框:",U),console.log("🔍 完整节点对象结构:",U),console.log("🔍 节点data字段:",U.data),console.log("🔍 节点所有属性:",Object.keys(U)),U.dangerouslySetInnerHTML&&console.log("🔍 发现dangerouslySetInnerHTML:",U.dangerouslySetInnerHTML.substring(0,200)+"...");let Z="";if(console.log("🔍 节点对象完整结构:",U),console.log("🔍 节点data字段结构:",U.data),(xe=U.data)!=null&&xe.note)Z=U.data.note,console.log("✅ 从node.data.note获取Markdown源码:",Z.substring(0,100)+"...");else if((He=U.data)!=null&&He.markdown)Z=U.data.markdown,console.log("✅ 从node.data.markdown获取Markdown源码:",Z.substring(0,100)+"...");else if((Pe=U.data)!=null&&Pe.text)Z=U.data.text,console.log("✅ 从node.data.text获取Markdown源码:",Z.substring(0,100)+"...");else if((pe=U.data)!=null&&pe.content)Z=U.data.content,console.log("✅ 从node.data.content获取Markdown源码:",Z.substring(0,100)+"...");else if(U.note)Z=U.note,console.log("✅ 从node.note获取Markdown源码:",Z.substring(0,100)+"...");else if(U.topic&&!U.dangerouslySetInnerHTML)Z=U.topic,console.log("✅ 从node.topic获取内容:",Z.substring(0,100)+"...");else if(U.dangerouslySetInnerHTML){console.log("⚠️ 没有找到Markdown字段转换HTML为Markdown:",U.dangerouslySetInnerHTML.substring(0,100)+"...");try{const Oe=(U==null?void 0:U.dangerouslySetInnerHTML)||"";typeof(nl==null?void 0:nl.html2md)=="function"?(Z=nl.html2md(Oe),console.log("✅ 使用 Vditor.html2md 转换成功:",Z.substring(0,100)+"...")):(console.warn("⚠️ Vditor.html2md 不可用,使用简单转换逻辑"),Z=String(Oe).replace(/<img[^>]*src="([^"]+)"[^>]*alt="([^"]*)"[^>]*>/gi,"![$2]($1)").replace(/<img[^>]*src="([^"]+)"[^>]*>/gi,"![]($1)").replace(/<br\s*\/?>/gi,`
`).replace(/<\/p>/gi,`
`).replace(/<p[^>]*>/gi,"").replace(/<strong>(.*?)<\/strong>/gi,"**$1**").replace(/<b>(.*?)<\/b>/gi,"**$1**").replace(/<em>(.*?)<\/em>/gi,"*$1*").replace(/<i>(.*?)<\/i>/gi,"*$1*").replace(/<ul[^>]*>/gi,`
`).replace(/<\/ul>/gi,`
`).replace(/<li[^>]*>/gi,"- ").replace(/<\/li>/gi,`
`).replace(/<[^>]+>/g,"").replace(/\n{3,}/g,`
`).trim(),console.log("✅ 使用简单转换逻辑成功:",Z.substring(0,100)+"..."))}catch(Oe){console.error("❌ HTML 转 Markdown 失败:",Oe),Z=(U==null?void 0:U.dangerouslySetInnerHTML)||""}}else console.warn("⚠️ 没有找到任何可用的内容字段"),Z="";N.value=U.topic||U.title||"",z.value=Z,F.value=U,P.value=Q,console.log("🎯 最终设置的Markdown内容:",Z),console.log("🎯 编辑器标题:",N.value),y.value=!0,ja(()=>{setTimeout(()=>{if(console.log("🔄 准备初始化Vditor容器状态:",ce.value),ce.value&&ce.value.offsetParent!==null)console.log("✅ 容器已可见开始初始化Vditor"),tt();else{console.warn("⚠️ 容器未准备好,延迟初始化");let Oe=0;const Je=10,Ge=()=>{Oe++,ce.value&&ce.value.offsetParent!==null?(console.log("✅ 容器在第",Oe,"次尝试后可见"),tt()):Oe<Je?(console.log("🔄 第",Oe,"次检查,容器仍未准备好,继续等待..."),setTimeout(Ge,100)):(console.error("❌ 容器在",Je,"次尝试后仍未准备好"),alert("编辑器初始化失败,请刷新页面重试"))};setTimeout(Ge,100)}},50)})},Yi=()=>{if(!o.value)return;console.log("绑定事件监听器..."),di&&r.value.removeEventListener("wheel",di),cn&&r.value.removeEventListener("click",cn),di=Z=>{if(Z.ctrlKey||Z.metaKey){Z.preventDefault();const xe=Z.deltaY>0?.9:1.1,He=Math.max(.3,Math.min(3,v.value*xe));if(o.value){const Pe=r.value.querySelector(".map-container");Pe&&(Pe.style.transform=`scale(${He})`,v.value=He,localStorage.setItem("mindmap-zoom-level",He.toString()))}}},r.value.addEventListener("wheel",di),o.value.bus.addListener("select",Z=>{l.value=Z,setTimeout(()=>{le()},50)}),o.value.bus.addListener("selectNode",Z=>{l.value=Z,setTimeout(()=>{le()},50)}),o.value.bus.addListener("scale",Z=>{Math.abs(Z-1)<.01&&Math.abs(v.value-1)>.01&&setTimeout(()=>{bs()},50)}),window.zoomIntervalId&&clearInterval(window.zoomIntervalId);const U=setInterval(()=>{v.value!==1&&r.value&&Mt()},500);window.zoomIntervalId=U;let Q=0;cn=Z=>{const xe=Date.now();if(xe-Q<100)return;Q=xe;const He=Z.target,Pe=He.closest("me-tpc")||He.closest(".topic")||(He.classList.contains("topic")?He:null)||(He.tagName==="ME-TPC"?He:null);if(Pe){const pe=Pe.nodeObj;if(pe){l.value=pe;const Oe=r.value.getBoundingClientRect(),Je=Pe.getBoundingClientRect(),Ge=Je.left-Oe.left+Je.width/2,Ct=Je.bottom-Oe.top+8;h.value={left:`${Ge}px`,top:`${Ct}px`}}}else l.value=null,m.value&&(m.value=!1,x.value=null,w.value="",S.value=!1)},r.value.addEventListener("click",cn),o.value.bus.addListener("edit",Z=>{console.log("edit事件触发:",Z),Ir(Z)}),o.value.bus.addListener("editFinish",Z=>{console.log("editFinish事件触发:",Z),Ot(Z)}),o.value.bus.addListener("operation",Z=>{console.log("Mind Elixir操作事件:",Z),Z.name==="moveNodeIn"||Z.name==="moveNodeBefore"||Z.name==="moveNodeAfter"?(console.log("检测到节点拖拽操作:",Z.name,Z),cr(Z)):(Z.name==="finishEdit"||Z.name==="finishEditTable")&&(console.log("🔍 检测到编辑完成操作:",Z.name,Z),Ot(Z))}),o.value.bus.addListener("removeNode",Z=>{console.log("删除节点:",Z),ur(Z)})},bs=()=>{if(o.value){const U=localStorage.getItem("mindmap-zoom-level");if(U){const Q=parseFloat(U);if(Q>=.3&&Q<=3){const Z=r.value.querySelector(".map-container");Z&&(Z.style.transform=`scale(${Q})`,v.value=Q)}}}},Mt=()=>{if(o.value&&v.value!==1&&r.value){const U=r.value.querySelector(".map-container");U&&(U.style.transform=`scale(${v.value})`)}},ys=async()=>{var U;if(console.log("🚀🚀🚀 保存函数被调用 🚀🚀🚀"),console.log("🔍 mindElixir.value:",o.value),console.log("🔍 currentMindmapId.value:",p.value),console.log("🔍 mindmapEl.value:",r.value),console.log("🔍🔍🔍 全局状态检查开始 🔍🔍🔍"),console.log("🔍 - showWelcome:",b.value),console.log("🔍 - 是否有思维导图容器:",!!r.value),console.log("🔍 - MindElixir实例状态:",!!o.value),console.log("🔍🔍🔍 全局状态检查结束 🔍🔍🔍"),o.value&&o.value.data?(console.log("🔍🔍🔍 MindElixir数据检查开始 🔍🔍🔍"),console.log("🔍 - 数据对象:",o.value.data),console.log("🔍 - 数据字段:",Object.keys(o.value.data)),console.log("🔍 - 是否有nodeData:",!!o.value.data.nodeData),console.log("🔍 - 是否有nodes:",!!o.value.data.nodes),console.log("🔍🔍🔍 MindElixir数据检查结束 🔍🔍🔍")):console.log("⚠️ MindElixir数据不存在或为空"),!o.value||!p.value){if(console.warn("⚠️ 没有可保存的思维导图数据"),console.warn("🔍 mindElixir.value 状态:",!!o.value),console.warn("🔍 currentMindmapId.value 状态:",!!p.value),o.value&&o.value.data&&(console.log("🔍 尝试从MindElixir数据中获取ID"),console.log("🔍 MindElixir数据:",o.value.data),o.value.data.mindmapId?(p.value=o.value.data.mindmapId,console.log("🔍 从MindElixir数据中获取到mindmapId:",o.value.data.mindmapId)):o.value.data.mindmap_id&&(p.value=o.value.data.mindmap_id,console.log("🔍 从MindElixir数据中获取到mindmap_id:",o.value.data.mindmap_id))),!p.value&&o.value){if(console.log("🔍 尝试重新初始化MindElixir数据..."),console.log("🔍 MindElixir实例属性:",Object.keys(o.value)),console.log("🔍 MindElixir实例方法:",Object.getOwnPropertyNames(Object.getPrototypeOf(o.value))),o.value.getData){const Q=o.value.getData();console.log("🔍 通过getData()获取的数据:",Q),Q&&Q.nodeData&&(console.log("🔍 nodeData详情:",Q.nodeData),Q.nodeData.mindmapId?(p.value=Q.nodeData.mindmapId,console.log("🔍 从nodeData.mindmapId获取到ID:",Q.nodeData.mindmapId)):Q.nodeData.mindmap_id?(p.value=Q.nodeData.mindmap_id,console.log("🔍 从nodeData.mindmap_id获取到ID:",Q.nodeData.mindmap_id)):(console.log("🔍 nodeData中没有找到mindmapId字段"),console.log("🔍 nodeData字段:",Object.keys(Q.nodeData)))),!p.value&&Q&&(console.log("🔍 检查其他可能的ID字段..."),Q.id?(p.value=Q.id,console.log("🔍 从data.id获取到ID:",Q.id)):Q.mindmapId&&(p.value=Q.mindmapId,console.log("🔍 从data.mindmapId获取到ID:",Q.mindmapId)))}o.value.mindElixirData&&(console.log("🔍 mindElixirData:",o.value.mindElixirData),o.value.mindElixirData.id&&(p.value=o.value.mindElixirData.id,console.log("🔍 从mindElixirData获取到ID:",o.value.mindElixirData.id)))}if(!p.value){console.warn("⚠️ 仍然无法获取思维导图ID无法保存"),console.warn("🔍 建议:请先加载一个思维导图,然后再尝试保存");return}}try{console.log("💾 开始保存思维导图..."),console.log("🔍 当前思维导图ID:",p.value),console.log("🔍 MindElixir实例:",o.value);let Q=null;if(o.value&&o.value.getData?(Q=o.value.getData(),console.log("🔍 通过getData()获取的数据:",Q)):(Q=o.value.data,console.log("🔍 通过data属性获取的数据:",Q)),!Q){console.warn("⚠️ MindElixir数据为空");return}let Z=[];console.log("🔍 数据结构分析:"),console.log("🔍 - currentData.nodeData:",Q.nodeData),console.log("🔍 - currentData.nodes:",Q.nodes),console.log("🔍 - currentData.nodeData.children:",(U=Q.nodeData)==null?void 0:U.children);const xe=pe=>{pe&&pe.id&&(Z.push(pe),console.log(`🔍 收集节点: ${pe.id} - ${pe.topic||pe.content||"无标题"}`),pe.children&&pe.children.length>0&&pe.children.forEach(Oe=>xe(Oe)))};if(Q.nodeData)xe(Q.nodeData),console.log("🔍 从根节点收集到节点数量:",Z.length);else if(Q.nodes&&Array.isArray(Q.nodes))Q.nodes.forEach(pe=>xe(pe)),console.log("🔍 从nodes数组收集到节点数量:",Z.length);else if(Array.isArray(Q))Q.forEach(pe=>xe(pe)),console.log("🔍 从currentData数组收集到节点数量:",Z.length);else{console.warn("⚠️ 无法找到节点数据"),console.log("🔍 可用的数据字段:",Object.keys(Q));return}if(Z.length===0){console.warn("⚠️ 没有收集到任何节点");return}console.log("🔍 找到节点数据:",Z),console.log("🔍 节点数量:",Z.length),console.log("🔍 节点数据类型:",Array.isArray(Z)?"数组":typeof Z);const He=[];if(Z.forEach((pe,Oe)=>{if(console.log(`🔍 处理节点 ${Oe}:`,pe),pe&&pe.id){const Je=pe.topic||pe.content||pe.text||"",Ge=pe.x||pe.offsetX||0,Ct=pe.y||pe.offsetY||0;console.log(`🔍 节点 ${pe.id} 内容:`,Je,"位置:",{x:Ge,y:Ct});const Gt={content:Je,position:{x:Ge,y:Ct}};(pe.parentId||pe.parent)&&(Gt.parentId=pe.parentId||pe.parent,console.log(`🔍 节点 ${pe.id} 父节点:`,Gt.parentId)),console.log(`🔍 准备保存节点 ${pe.id}:`,Gt),He.push(Un.updateNode(pe.id,Gt).then(un=>{console.log(`✅ 节点 ${pe.id} 保存成功:`,un)}).catch(un=>{console.error(`❌ 节点 ${pe.id} 保存失败:`,un)}))}else console.warn(`⚠️ 节点 ${Oe} 缺少ID:`,pe)}),console.log("🔍 准备保存的节点数量:",He.length),He.length===0){console.warn("⚠️ 没有找到需要保存的节点");return}const Pe=await Promise.all(He);console.log("🔍 保存结果:",Pe),console.log("🎉 思维导图保存完成!")}catch(Q){console.error("❌ 保存思维导图失败:",Q)}},er=async()=>{if(!p.value){console.warn("⚠️ 没有当前思维导图ID无法刷新");return}try{console.log("🔄 开始刷新思维导图...");const U=await Un.getMindmap(p.value);if(U.data&&U.data.nodeData){console.log("✅ 获取到最新数据,开始刷新显示...");const Q=ee();await se(U.data,!0,!1),Q&&setTimeout(()=>{Ce(Q),console.log("📍 已恢复位置和缩放状态")},100),console.log("🎉 思维导图刷新完成!")}else console.warn("⚠️ 无法获取思维导图数据")}catch(U){console.error("❌ 刷新思维导图失败:",U)}},ws=async(U,Q)=>{try{const Z=String(p.value||"");if(o.value&&Z&&Z.startsWith("temp-")){console.log("🔄 检测到实时渲染的思维导图将保存到数据库并更新ID");const Pe=ee();console.log("📍 保存当前位置:",Pe);const pe=await Un.createMindmap(Q||"预览思维导图",U);if(console.log("🔄 创建思维导图响应:",pe),pe.data&&pe.data.id){const Oe=pe.data.id;console.log("🎉 创建思维导图成功新思维导图的ID是:",Oe);const Je=p.value;if(p.value=Oe,o.value&&o.value.data){o.value.data.mindmapId=Oe,o.value.data.id=Oe;const Ge=Ct=>{Ct&&(Ct.mindmapId=Oe,Ct.children&&Ct.children.forEach(Gt=>Ge(Gt)))};o.value.data.nodeData&&Ge(o.value.data.nodeData)}console.log("✅ 已更新思维导图ID保持视图状态"),console.log("🔄 从临时ID",Je,"更新为正式ID",Oe),Pe&&setTimeout(()=>{Ce(Pe),console.log("📍 已恢复位置和缩放状态")},100),console.log("✅ 保存完成,保持当前思维导图显示状态"),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:Oe,title:Q,timestamp:Date.now(),fromRealtime:!0}}));return}}console.log("🔄 没有检测到实时渲染的思维导图,使用标准保存流程");const He=await Un.createMindmap(Q||"预览思维导图",U);if(console.log("🔄 创建思维导图响应:",He),He.data&&He.data.id){const Pe=He.data.id;if(console.log("🎉 创建思维导图成功新思维导图的ID是:",Pe),console.log("📊 响应数据详情:",He.data),He.data.nodeData)console.log("✅ 思维导图创建时已包含节点数据,直接加载"),p.value=Pe,We(),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:Pe,title:Q,timestamp:Date.now()}})),console.log("🎉 思维导图保存并加载完成!");else{console.log("🔧 需要递归创建节点"),await Ti(U,Pe,null),console.log("📥 开始加载新创建的思维导图ID:",Pe);const pe=await Un.getMindmap(Pe);console.log("🔄 加载思维导图响应:",pe),pe.data&&pe.data.nodeData?(console.log("✅ 成功获取思维导图数据,开始加载显示"),p.value=Pe,We(),await se(pe.data,!0,!1),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:Pe,title:Q,timestamp:Date.now()}})),console.log("🎉 思维导图保存并加载完成!")):console.error("❌ 获取思维导图数据失败:",pe)}}}catch(Z){console.error("❌ 保存预览数据到数据库失败:",Z)}},Or=async U=>{try{if(console.log("📚 开始从历史记录加载思维导图:",U.title),We(),U.mindmapId){console.log("🎯 使用思维导图ID加载:",U.mindmapId);const Q=await Un.getMindmap(U.mindmapId);if(Q.data&&Q.data.nodeData)await se(Q.data);else throw new Error("无法获取思维导图数据")}else if(U.json)console.log("📊 使用历史记录中的JSON数据"),await se(U.json);else if(U.markdown){console.log("📝 使用历史记录中的Markdown数据尝试转换为JSON");try{const Q=await convertMarkdownToJSON(U.markdown);if(Q)await se(Q);else throw new Error("Markdown转换失败")}catch(Q){console.error("Markdown转换失败:",Q)}}}catch(Q){console.error("❌ 从历史记录加载思维导图失败:",Q)}};Fp(async()=>{window.addEventListener("save-preview-to-database",U=>{console.log("🎯 收到保存到数据库事件:",U.detail),console.log("📋 事件详情 - 标题:",U.detail.title,"来源:",U.detail.source,"时间戳:",new Date(U.detail.timestamp).toLocaleString()),ws(U.detail.data,U.detail.title)}),window.addEventListener("realtime-mindmap-update",U=>{console.log("🔄 收到实时思维导图更新事件:",U.detail),ho(U.detail.data,U.detail.title,U.detail)}),window.addEventListener("loadMindmapFromHistory",U=>{console.log("📚 收到从历史记录加载思维导图事件:",U.detail),console.log("🔍 事件数据详情:",U.detail),Or(U.detail)}),window.addEventListener("ai-sidebar-toggle",U=>{console.log("🤖 AI侧边栏折叠状态变化:",U.detail.isCollapsed),g.value=U.detail.isCollapsed}),Fe()});const Ai=()=>{window.zoomIntervalId&&(clearInterval(window.zoomIntervalId),window.zoomIntervalId=null),r.value&&(di&&(r.value.removeEventListener("wheel",di),di=null),cn&&(r.value.removeEventListener("click",cn),cn=null)),console.log("✅ 已清理所有定时器和事件监听器")};Rc(()=>{Ai()}),e({showMindMapPage:rt,cleanupIntervals:Ai});const ho=async(U,Q,Z=null)=>{try{if(o.value){console.log("🔄 增量更新现有思维导图数据");try{const xe=ee();if((Z==null?void 0:Z.isIncremental)&&o.value&&o.value.data){if(console.log("🔄 执行增量更新,避免完整重新渲染"),o.value.data.nodeData&&U.topic){const Pe=Object.values(o.value.data.nodeData)[0];if(Pe&&Pe.topic!==U.topic){Pe.topic=U.topic;const pe=r.value.querySelector(`[data-id="${Pe.id}"]`);if(pe){const Oe=pe.querySelector(".topic-text");Oe&&(Oe.textContent=U.topic)}}}U.children&&U.children.length>0&&Mi(U.children,o.value.data.nodeData),xe&&setTimeout(()=>{Ce(xe),console.log("📍 增量更新后恢复位置")},50)}else{console.log("🔄 执行完整更新");const Pe=String(p.value||""),pe=Pe&&Pe.startsWith("temp-")?Pe:`temp-${Date.now()}`,Oe={nodeData:U,mindmapId:pe,id:pe,title:Q||"AI生成中..."};(!Pe||!Pe.startsWith("temp-"))&&(p.value=pe,console.log("🆔 更新临时思维导图ID:",pe));const Je=o.value.init(Oe);xe&&setTimeout(()=>{Ce(xe),console.log("📍 完整更新后恢复位置")},100)}}catch(xe){console.error("❌ 更新思维导图数据失败:",xe)}}else{We(),await ja();let xe=0;for(;!r.value&&xe<20;)await new Promise(Oe=>setTimeout(Oe,50)),await ja(),xe++;if(!r.value){console.error("❌ 思维导图容器仍未准备好,跳过此次更新");return}o.value=new tr({el:r.value,direction:tr.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!0,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(Oe,Je)=>Oe.includes("|")||Oe.includes("**")||Oe.includes("`")||Oe.includes("#")||Oe.includes("$")||Oe.includes("![")?ul(Oe):Oe});const He=`temp-${Date.now()}`,Pe={nodeData:U,mindmapId:He,id:He,title:Q||"AI生成中..."};p.value=He,console.log("🆔 设置临时思维导图ID:",He);const pe=o.value.init(Pe);console.log("✅ 实时思维导图实例创建成功"),Yi(),X()}}catch(xe){console.error("❌ 实时更新思维导图失败:",xe)}},Mi=(U,Q)=>{try{U.forEach(Z=>{const xe=Ci(Q,Z.id);if(xe){if(Z.topic&&xe.topic!==Z.topic){xe.topic=Z.topic;const He=r.value.querySelector(`[data-id="${Z.id}"]`);if(He){const Pe=He.querySelector(".topic-text");if(Pe)if(Z.topic.includes("|")||Z.topic.includes("**")||Z.topic.includes("`")||Z.topic.includes("#")||Z.topic.includes("![")){const pe=ul(Z.topic);Pe.innerHTML=pe}else Pe.textContent=Z.topic}}Z.children&&Z.children.length>0&&Mi(Z.children,Q)}else console.log("🆕 检测到新节点,需要添加到现有结构:",Z.id)})}catch(Z){console.error("❌ 增量更新节点失败:",Z)}},Ci=(U,Q)=>{if(!U)return null;for(const Z in U){const xe=U[Z];if(xe.id===Q)return xe;if(xe.children){const He=Ci(xe.children,Q);if(He)return He}}return null};return(U,Q)=>(Kt(),Xt("div",BA,[b.value?(Kt(),Xt("div",FA,[De("div",{class:ss(["welcome-content",{"ai-sidebar-collapsed":g.value}])},[...Q[7]||(Q[7]=[H1('<div class="welcome-header" data-v-4efa0dbb><h1 data-v-4efa0dbb>🧠 思维导图工具</h1><p class="welcome-subtitle" data-v-4efa0dbb>可视化您的想法,构建知识体系</p></div><div class="welcome-features" data-v-4efa0dbb><div class="feature-item" data-v-4efa0dbb><div class="feature-icon" data-v-4efa0dbb>🎯</div><div class="feature-text" data-v-4efa0dbb><h3 data-v-4efa0dbb>智能AI生成</h3><p data-v-4efa0dbb>上传文档AI自动生成思维导图结构</p></div></div><div class="feature-item" data-v-4efa0dbb><div class="feature-icon" data-v-4efa0dbb>✏️</div><div class="feature-text" data-v-4efa0dbb><h3 data-v-4efa0dbb>灵活编辑</h3><p data-v-4efa0dbb>拖拽节点,自由调整思维导图布局</p></div></div><div class="feature-item" data-v-4efa0dbb><div class="feature-icon" data-v-4efa0dbb>💾</div><div class="feature-text" data-v-4efa0dbb><h3 data-v-4efa0dbb>云端存储</h3><p data-v-4efa0dbb>自动保存,多设备同步访问</p></div></div></div><div class="welcome-tips" data-v-4efa0dbb><p data-v-4efa0dbb>💡 提示使用左侧AI侧边栏可以快速生成思维导图内容</p></div>',3)])],2)])):Yr("",!0),m.value?(Kt(),Xt("div",{key:1,class:"ai-input-area",style:os(c.value)},[De("div",{class:"ai-input-header"},[Q[8]||(Q[8]=De("span",{class:"ai-input-title"},"🤖 询问AI",-1)),De("button",{onClick:Ke,class:"ai-close-btn"},"×")]),De("div",qA,[X0(De("textarea",{"onUpdate:modelValue":Q[0]||(Q[0]=Z=>w.value=Z),placeholder:"请输入您的问题...",rows:"2",disabled:S.value,onKeydown:[$d(Uo(st,["exact"]),["enter"]),$d(Uo(qe,["ctrl"]),["enter"]),$d(Uo(qe,["meta"]),["enter"])]},null,40,jA),[[Wp,w.value]]),De("div",$A,[De("button",{onClick:Ke,class:"btn-cancel",disabled:S.value}," 取消 ",8,UA),De("button",{onClick:qe,class:"btn-submit",disabled:!w.value.trim()||S.value},[S.value?(Kt(),Xt("span",WA,"AI思考中...")):(Kt(),Xt("span",GA,"询问AI"))],8,VA)])])],4)):Yr("",!0),b.value?Yr("",!0):(Kt(),Xt("div",{key:2,ref_key:"mindmapEl",ref:r,class:"mindmap-el"},null,512)),b.value?Yr("",!0):(Kt(),Xt("div",KA,[De("button",{onClick:ys,class:"save-btn",title:"保存思维导图",style:{display:"none"}},[...Q[9]||(Q[9]=[De("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[De("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),De("polyline",{points:"17,21 17,13 7,13 7,21"}),De("polyline",{points:"7,3 7,8 15,8"})],-1),De("span",null,"保存",-1)])]),De("button",{onClick:er,class:"refresh-btn",title:"刷新思维导图",style:{display:"none"}},[...Q[10]||(Q[10]=[De("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[De("path",{d:"M1 4v6h6"}),De("path",{d:"M23 20v-6h-6"}),De("path",{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"})],-1),De("span",null,"刷新",-1)])])])),l.value?(Kt(),Xt("div",{key:4,class:"context-menu",style:os(h.value)},[l.value.parentId||l.value.parent?(Kt(),Xt("div",{key:0,class:"context-menu-item",onClick:Ae,title:"Add a sibling card"},[...Q[11]||(Q[11]=[De("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[De("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.9001 4.5C9.9001 5.74264 8.89274 6.75 7.6501 6.75C6.64263 6.75 5.78981 6.08785 5.5031 5.175H2.7001V11.025H5.4001V9.9C5.4001 8.90589 6.11644 8.1 7.0001 8.1H15.0501C15.9338 8.1 16.6501 8.90589 16.6501 9.9V13.95C16.6501 14.9441 15.9338 15.75 15.0501 15.75H7.0001C6.11644 15.75 5.4001 14.9441 5.4001 13.95V12.375H2.2501C1.75304 12.375 1.3501 11.7471 1.3501 11.475V4.725C1.3501 4.22794 1.75304 3.825 2.2501 3.825H5.5031C5.78981 2.91215 6.64263 2.25 7.6501 2.25C8.89274 2.25 9.9001 3.25736 9.9001 4.5ZM15.0501 9.9H7.0001V13.95H15.0501V9.9Z",fill:"currentColor","fill-opacity":"1"})],-1)])])):Yr("",!0),De("div",{class:"context-menu-item",onClick:ye,title:"Add a child card"},[...Q[12]||(Q[12]=[De("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[De("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.9501 6.63691H8.35014V11.3619H15.9501V6.63691ZM8.35014 4.83691C7.46649 4.83691 6.75014 5.6428 6.75014 6.63691V8.32441H4.84719C4.56048 7.41157 3.70766 6.74941 2.7002 6.74941C1.45755 6.74941 0.450195 7.75677 0.450195 8.99941C0.450195 10.2421 1.45755 11.2494 2.7002 11.2494C3.70766 11.2494 4.56048 10.5873 4.84719 9.67441H6.75014V11.3619C6.75014 12.356 7.46649 13.1619 8.35014 13.1619H15.9501C16.8338 13.1619 17.5501 12.356 17.5501 11.3619V6.63691C17.5501 5.6428 16.8338 4.83691 15.9501 4.83691H8.35014Z",fill:"currentColor","fill-opacity":"1"})],-1)])]),De("div",{class:"context-menu-item",onClick:jt,title:"Copy text"},[...Q[13]||(Q[13]=[De("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[De("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.4503 2.99952C16.4016 2.18908 15.7289 1.54688 14.9062 1.54688H6.46875L6.37452 1.5497C5.56408 1.5984 4.92188 2.27108 4.92188 3.09375V3.54688C4.92188 3.68495 5.0338 3.79688 5.17188 3.79688H6.35938C6.49745 3.79688 6.60938 3.68495 6.60938 3.54688V3.375L6.61309 3.34276C6.62766 3.28063 6.68343 3.23438 6.75 3.23438H14.625L14.6572 3.23809C14.7261 3.23438 14.7656 3.30029 14.7656 3.375V11.25L14.7619 11.2822C14.7473 11.3444 14.6916 11.3906 14.625 11.3906H14.4531C14.3151 11.3906 14.2031 11.5026 14.2031 11.6406V12.8281C14.2031 12.9662 14.3151 13.0781 14.4531 13.0781H14.9062L15.0005 13.0753C15.8109 13.0266 16.4531 12.3539 16.4531 11.5312V3.09375L16.4503 2.99952ZM11.5312 4.92188H3.09375C2.23943 4.92188 1.54688 5.61443 1.54688 6.46875V14.9062C1.54688 15.7606 2.23943 16.4531 3.09375 16.4531H11.5312C12.3856 16.4531 13.0781 15.7606 13.0781 14.9062V6.46875C13.0781 5.61443 12.3856 4.92188 11.5312 4.92188ZM3.37032 6.615H11.2635C11.3361 6.615 11.395 6.6739 11.395 6.74655V14.6397C11.395 14.7124 11.3361 14.7712 11.2635 14.7712H3.37032C3.29767 14.7712 3.23877 14.7124 3.23877 14.6397V6.74655C3.23877 6.6739 3.29767 6.615 3.37032 6.615ZM4.5 8.5C4.5 8.27909 4.67909 8.1 4.9 8.1H9.725C9.94591 8.1 10.125 8.27909 10.125 8.5V9.5C10.125 9.72091 9.94591 9.9 9.725 9.9H4.9C4.67909 9.9 4.5 9.72091 4.5 9.5V8.5ZM4.9 11.475C4.67909 11.475 4.5 11.6541 4.5 11.875V12.875C4.5 13.0959 4.67909 13.275 4.9 13.275H9.725C9.94591 13.275 10.125 13.0959 10.125 12.875V11.875C10.125 11.6541 9.94591 11.475 9.725 11.475H4.9Z",fill:"currentColor","fill-opacity":"1"})],-1)])]),De("div",{class:"context-menu-item ask-ai",onClick:Xe,title:"Ask AI"},[...Q[14]||(Q[14]=[H1('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-4efa0dbb><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" data-v-4efa0dbb></path><path d="M13 8H7" data-v-4efa0dbb></path><path d="M17 12H7" data-v-4efa0dbb></path><circle cx="17" cy="8" r="1" data-v-4efa0dbb></circle></svg>',1)])]),De("div",{class:"context-menu-item delete",onClick:ze,title:"Delete"},[...Q[15]||(Q[15]=[De("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[De("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z",fill:"currentColor"}),De("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z",fill:"currentColor"})],-1)])])],4)):Yr("",!0),k.value?(Kt(),Xt("div",{key:5,class:"image-preview-modal",onClick:Ne},[De("div",{class:"image-preview-content",onClick:Q[1]||(Q[1]=Uo(()=>{},["stop"]))},[De("div",XA,[De("span",ZA,Jr(T.value),1),De("button",{onClick:Ne,class:"image-preview-close"},"×")]),De("div",YA,[A.value?(Kt(),Xt("div",JA,[...Q[16]||(Q[16]=[De("div",{class:"loading-spinner"},null,-1),De("p",null,"加载图片中...",-1)])])):M.value?(Kt(),Xt("div",QA,[Q[17]||(Q[17]=De("p",null,"❌ 图片加载失败",-1)),De("p",null,Jr(M.value),1),De("button",{onClick:Nt,class:"retry-button"},"重试")])):(Kt(),Xt("img",{key:2,src:C.value,alt:T.value,class:"preview-image",onLoad:Rt,onError:$t},null,40,eM))])])])):Yr("",!0),y.value?(Kt(),Xt("div",{key:6,class:"rich-editor-modal",onClick:ct},[De("div",{class:"rich-editor-content",onClick:Q[2]||(Q[2]=Uo(()=>{},["stop"]))},[De("div",{class:"rich-editor-header"},[Q[18]||(Q[18]=De("span",{class:"rich-editor-title"},"编辑节点",-1)),De("button",{onClick:ct,class:"rich-close-btn",title:"关闭 (ESC)"},"×")]),De("div",tM,[De("div",{ref_key:"vditorContainer",ref:ce,class:"vditor-container"},null,512)]),De("div",{class:"rich-editor-footer"},[De("button",{onClick:ct,class:"rich-cancel-btn"},"取消"),De("button",{onClick:Ht,class:"rich-save-btn"},"保存")])])])):Yr("",!0),te.value?(Kt(),Xt("div",{key:7,class:"delete-confirm-modal",onClick:Q[6]||(Q[6]=(...Z)=>U.cancelDeleteImage&&U.cancelDeleteImage(...Z))},[De("div",{class:"delete-confirm-content",onClick:Q[5]||(Q[5]=Uo(()=>{},["stop"]))},[Q[19]||(Q[19]=De("div",{class:"delete-confirm-header"},[De("h3",null,"确认删除")],-1)),Q[20]||(Q[20]=De("div",{class:"delete-confirm-body"},[De("p",null,"确定要删除这张图片吗?"),Up("image.png "),De("p",{class:"delete-warning"},"删除后无法恢复")],-1)),De("div",nM,[De("button",{onClick:Q[3]||(Q[3]=(...Z)=>U.cancelDeleteImage&&U.cancelDeleteImage(...Z)),class:"cancel-btn"},"取消"),De("button",{onClick:Q[4]||(Q[4]=(...Z)=>U.confirmDeleteImage&&U.confirmDeleteImage(...Z)),class:"confirm-btn"},"确定删除")])])])):Yr("",!0)]))}},iM=Gp(rM,[["__scopeId","data-v-4efa0dbb"]]),aM="modulepreload",oM=function(t){return"/"+t},u4={},d4=function(e,n,r){if(!n||n.length===0)return e();const o=document.getElementsByTagName("link");return Promise.all(n.map(l=>{if(l=oM(l),l in u4)return;u4[l]=!0;const h=l.endsWith(".css"),c=h?'[rel="stylesheet"]':"";if(!!r)for(let b=o.length-1;b>=0;b--){const g=o[b];if(g.href===l&&(!h||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${c}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":aM,h||(v.as="script",v.crossOrigin=""),v.href=l,document.head.appendChild(v),h)return new Promise((b,g)=>{v.addEventListener("load",b),v.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e()).catch(l=>{const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=l,window.dispatchEvent(h),!h.defaultPrevented)throw l})};const sM={class:"ai-sidebar-wrapper"},lM=["title"],cM={key:0,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},uM={key:1,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},dM={class:"sidebar-content"},hM={class:"section"},pM={class:"input-group"},fM={key:0,class:"file-info"},mM={class:"file-details"},gM={class:"file-info-left"},vM={class:"file-name"},bM={class:"file-size"},yM={class:"button-group file-action-buttons"},wM=["disabled"],xM={key:0},kM={key:1},SM={key:0,class:"section"},EM={class:"history-list"},TM=["onClick"],AM={class:"history-title"},MM={class:"history-time"},CM={class:"section"},LM={class:"input-group"},_M={class:"button-group"},NM=["disabled"],DM={key:0},RM={key:1},IM={class:"section"},OM={key:0,class:"processing-status"},HM={class:"result-container"},PM={class:"json-result"},zM={class:"button-group"},BM=["disabled"],FM={__name:"AISidebar",emits:["start-realtime-generation"],setup(t,{emit:e}){const n=e,r=yt(!1),o=yt(""),l=yt(""),h=yt(""),c=yt(!1),p=yt(!1),v=yt([]),b=yt(!1);yt(""),yt("");const g=yt(!1),m=yt(""),x=yt(null),w=yt(null),S=()=>{r.value=!r.value,window.dispatchEvent(new CustomEvent("ai-sidebar-toggle",{detail:{isCollapsed:r.value}}))},k=he=>{const J=he.target.files[0];J&&(w.value=J,q("文件上传成功!","success"))},C=he=>{he.preventDefault(),b.value=!1;const J=he.dataTransfer.files;if(J.length>0){const ee=J[0],Ce=[".txt",".md",".doc",".docx",".pdf"],se="."+ee.name.split(".").pop().toLowerCase();Ce.includes(se)?(w.value=ee,q("文件拖拽上传成功!","success")):q("不支持的文件格式!请上传 .txt, .md, .doc, .docx, .pdf 格式的文件","error")}},T=he=>{he.preventDefault(),b.value=!0},A=he=>{he.preventDefault(),b.value=!1},M=()=>{w.value=null,x.value&&(x.value.value="")},y=he=>{if(he===0)return"0 Bytes";const J=1024,ee=["Bytes","KB","MB","GB"],Ce=Math.floor(Math.log(he)/Math.log(J));return parseFloat((he/Math.pow(J,Ce)).toFixed(2))+" "+ee[Ce]},N=async()=>{if(!w.value){q("请先上传文件","error");return}c.value=!0,n("start-realtime-generation");try{const he=await z(w.value);l.value="";const J=`你是一个专业的文档分析专家。请分析上传的文档内容生成结构化的Markdown格式思维导图。要求
1. 提取主要主题和关键概念
2. 组织成层次分明的结构
3. 使用清晰的标题和子标题
4. 保持内容的逻辑性和完整性
5. 对于长文档,请确保完整处理所有内容,不要截断
6. **重要:如果原文档中包含图片,请按以下方式处理:
- 识别图片在文档中的位置和上下文
- 根据图片内容生成准确的描述文字
- 在相应位置插入图片占位符:![图片描述](图片路径)
- 图片描述要准确反映图片内容,图片路径可以是相对路径或占位符
- 确保图片占位符放在逻辑上合适的位置**
7. **重要:如果原文档中包含表格,请完整保留表格结构:
- 保持表格的Markdown格式
- 确保所有表格行都被包含
- 不要省略任何表格内容
- 对于合并单元格的表格请使用HTML格式并正确使用rowspan和colspan属性
- 如果表格结构复杂优先使用HTML table标签而不是Markdown表格语法**
8. **重要:确保内容完整性:
- 不要截断任何内容
- 保持原文的完整性
- 所有重要信息都要包含在思维导图中**
9. 输出格式直接输出Markdown内容不要添加任何说明文字或代码块标记`,ee=`请分析以下文档内容并生成结构化Markdown
${he}`;await te(J,ee),await Me(),Rt(w.value.name,l.value),setTimeout(async()=>{try{await tt()}catch(Ce){console.error("自动保存失败:",Ce)}},1500)}catch(he){console.error("从文件生成Markdown失败:",he),q("生成失败: "+he.message,"error")}finally{c.value=!1}},z=he=>new Promise(async(J,ee)=>{try{const Ce=he.type.includes("text")||he.name.endsWith(".txt")||he.name.endsWith(".md"),se=he.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||he.type==="application/msword"||he.name.endsWith(".docx")||he.name.endsWith(".doc"),G=he.type==="application/pdf"||he.name.endsWith(".pdf");if(Ce){const X=new FileReader;X.onload=be=>J(be.target.result),X.onerror=()=>ee(new Error("文本文件读取失败")),X.readAsText(he)}else if(se){const X=await F(he);J(X)}else if(G){const X=await P(he);J(X)}else{const X=new FileReader;X.onload=be=>J(be.target.result),X.onerror=()=>ee(new Error("文件读取失败")),X.readAsText(he)}}catch(Ce){ee(Ce)}}),F=async he=>{try{if(he.name.endsWith(".docx")){const J=await d4(()=>import("./index-8a9a2cec.js").then(se=>se.i),[]),ee=await he.arrayBuffer();return(await J.extractRawText({arrayBuffer:ee})).value}else if(he.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式或安装相应的解析库")}catch(J){throw new Error(`Office文档解析失败: ${J.message}`)}},P=async he=>{try{const J=await d4(()=>import("./pdf-493de69e.js"),[]);J.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const ee=await he.arrayBuffer(),Ce=await J.getDocument({data:ee}).promise;let se="";for(let G=1;G<=Ce.numPages;G++){const le=(await(await Ce.getPage(G)).getTextContent()).items.map(ye=>ye.str).join(" ");se+=le+`
`}return se}catch(J){throw new Error(`PDF文件解析失败: ${J.message}`)}},Y=he=>he&&he.replace(/^好的[,]?作为.*?专家[,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^好的[,]?作为.*?专业的.*?专家[,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^以下是.*?结构化的.*?思维导图[:]\s*/i,"").replace(/^以下是.*?Markdown.*?思维导图[:]\s*/i,"").replace(/^以下是.*?Markdown.*?格式.*?思维导图[:]\s*/i,"").replace(/^```(?:markdown)?\s*/gm,"").replace(/```\s*$/gm,"").replace(/^「」`markdown\s*/gm,"").replace(/^「」`\s*/gm,"").replace(/^\s*「」`markdown\s*/gm,"").replace(/^\s*「」`\s*/gm,"").replace(/^作为.*?专家[,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^我已.*?分析.*?内容.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^根据.*?文档内容.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^基于.*?文档.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^以下是.*?分析.*?结果[:]\s*/i,"").replace(/^以下是.*?整理.*?结果[:]\s*/i,"").replace(/^以下是.*?结构化.*?内容[:]\s*/i,"").replace(/\n{3,}/g,`
`).trim(),te=async(he,J)=>{const Ce=he||`你是一位Markdown格式转换专家。你的任务是将用户提供的文章内容精确转换为结构化的Markdown格式。请遵循以下步骤
提取主标题: 识别文章最顶层的主标题通常为文章题目或书名并使用Markdown的 # 级别表示。
识别层级标题: 从文章内容中提取所有层级的内容标题从主标题后的第一个标题开始Level 1 至 Level 4。判断层级依据
视觉与结构特征: 如独立成行/段、位置(行首)、格式(加粗、编号如 1., 1.1, (1), - 等)。
语义逻辑: 标题之间的包含和并列关系。
在Markdown中使用相应标题级别
Level 1 标题用 ##
Level 2 标题用 ###
Level 3 标题用 ####
Level 4 标题用 #####
精确保留原文标题文字,不得修改、概括或润色。
处理正文内容: 对于每个标题下的正文内容区块(从该标题后开始,直到下一个同级或更高级别标题前):
直接保留原文文本但根据内容结构适当格式化为Markdown。
如果内容是列表如项目符号或编号列表使用Markdown列表语法例如 - 用于无序列表1. 用于有序列表)。
保持段落和换行不变。
**重要:如果原文档中包含图片,请按以下方式处理:
1. 识别图片在文档中的位置和上下文
2. 根据图片内容生成准确的描述文字
3. 在相应位置插入图片占位符:![图片描述](图片路径)
4. 图片描述要准确反映图片内容,图片路径可以是相对路径或占位符
5. 确保图片占位符放在逻辑上合适的位置**
输出格式: 输出必须是纯Markdown格式的文本不得包含任何额外说明、JSON或非Markdown元素。确保输出与示例风格一致。直接输出Markdown内容不要添加任何说明文字。`,se=J||"请将以下内容转换为结构化的Markdown格式";try{const G=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:Ce,user_prompt:se,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!G.ok)throw new Error(`HTTP error! status: ${G.status}`);const X=G.body.getReader(),be=new TextDecoder;let le="",ye=0;for(;;){const{done:Ae,value:ze}=await X.read();if(Ae)break;le+=be.decode(ze,{stream:!0});const Xe=le.split(`
`);le=Xe.pop()||"";for(const Ke of Xe)if(Ke.startsWith("data: "))try{const Be=JSON.parse(Ke.slice(6));if(Be.type==="start")q("AI开始生成内容...","info");else if(Be.type==="chunk"){if(ye++,l.value+=Be.content,ye%15===0&&l.value.length>100)try{const st=Y(l.value);if(st.length<10||!st.includes("#")){console.log("⚠️ 内容还不够完整,跳过此次转换"),console.log("⚠️ 内容长度:",st.length),console.log("⚠️ 内容预览:",st.substring(0,200));return}console.log("🔍 准备转换的内容长度:",st.length),console.log("🔍 准备转换的内容预览:",st.substring(0,500)),console.log("🔍 内容是否包含标题:",st.includes("#")),console.log("🔍 内容行数:",st.split(`
`).length);const qe=await Ne(st);if(!qe||!qe.topic){console.log("⚠️ 转换结果无效,跳过此次更新"),console.log("🔍 转换结果详情:",qe),console.log("🔍 内容长度:",st.length),console.log("🔍 内容预览:",st.substring(0,200));return}h.value=JSON.stringify(qe,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:qe,title:qe.topic||"AI生成中...",source:"ai-streaming",chunkCount:ye,isIncremental:!0}}))}catch(st){if(console.warn("⚠️ 实时转换JSON失败:",st.message),console.warn("⚠️ 当前内容长度:",l.value.length),console.warn("⚠️ 当前内容预览:",l.value.substring(0,200)),l.value.length>50)try{const qe=je(l.value);window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:qe,title:"AI生成中...",source:"ai-streaming-fallback",chunkCount:ye,isIncremental:!0}}))}catch(qe){console.warn("⚠️ 回退处理也失败:",qe)}}}else if(Be.type==="end")try{const st=Y(l.value),qe=Fe(st),Re=await Ne(st);h.value=JSON.stringify(Re,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:Re,title:Re.topic||"AI生成完成",source:"ai-final",chunkCount:ye}})),setTimeout(()=>{window.dispatchEvent(new CustomEvent("save-preview-to-database",{detail:{data:Re,title:Re.topic||"AI生成思维导图",source:"ai-generated",timestamp:Date.now()}}))},2e3),q("AI内容生成完成正在保存到数据库...","success")}catch(st){console.error("⚠️ 最终处理失败:",st),console.error("⚠️ 错误详情:",st.message);try{const qe=je(l.value);h.value=JSON.stringify(qe,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:qe,title:"AI生成完成简化版",source:"ai-final-fallback",chunkCount:ye}})),setTimeout(()=>{window.dispatchEvent(new CustomEvent("save-preview-to-database",{detail:{data:qe,title:qe.topic||"AI生成思维导图(回退)",source:"ai-final-fallback",timestamp:Date.now()}}))},2e3),q("AI内容生成完成简化版正在保存到数据库...","success")}catch(qe){console.error("⚠️ 回退处理也失败:",qe),q("AI内容生成完成但格式处理遇到问题","warning")}}else if(Be.type==="error")throw new Error(Be.content)}catch(Be){console.warn("解析流式数据失败:",Be)}}}catch(G){throw console.error("流式AI API调用失败:",G),G}},ce=he=>{if(he.includes("|")&&he.includes("-")){const J=he.split(`
`);let ee=!1,Ce=!1;for(const se of J){const G=se.trim();G.includes("|")&&G.split("|").length>=3&&(ee=!0),G.includes("|")&&G.includes("-")&&/^[\s\|\-\:]+$/.test(G)&&(Ce=!0)}if(ee&&Ce)return console.log("🚫 formatMarkdownToText: 检测到表格内容,跳过转换"),he}return he.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(J,ee)=>{if(ee.includes(":")){const Ce=ee.split(":");if(Ce.length>1)return`【${Ce[0]}】: ${Ce.slice(1).join(":")}`}return`【${ee}】`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim," • $1").replace(/^\d+\. (.*$)/gim," $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/\n\n/g,`
`).replace(/\n/g,`
`).split(`
`).map(J=>J.length>80?J.substring(0,77)+"...":J).join(`
`).trim()},Me=async()=>{if(!l.value.trim()){q("请输入Markdown内容","error");return}p.value=!0;try{const he=Y(l.value),J=Ne(he);h.value=JSON.stringify(J,null,2)}catch(he){console.error("转换失败:",he),q("转换失败请检查Markdown格式","error")}finally{p.value=!1}},Fe=he=>{const J=/!\[([^\]]*)\]\(([^)]*)\)/g,ee=[];let Ce;for(;(Ce=J.exec(he))!==null;){let se=Ce[2];const G=Ce[1]||"";if(console.log(`🔍 发现图片匹配: alt="${G}", url="${se}"`),se&&se.trim()){if(se=se.trim(),se.endsWith("...")||se.endsWith("..")||se.length<10){console.log(`⚠️ 检测到不完整的图片URL: ${se}`);continue}se.startsWith("http")||se.startsWith("data:")||se.startsWith("/")||se.startsWith("./")?(ee.push({alt:G,url:se,fullMatch:Ce[0]}),console.log(`✅ 有效图片URL: ${se}`)):console.warn(`⚠️ 跳过格式不支持的图片URL: ${se}`)}else console.warn("⚠️ 跳过空的图片URL")}return console.log(`🔍 从内容中提取到 ${ee.length} 张图片:`,ee),ee},We=he=>{if(!he)return"";let J=he.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"");return J=J.replace(/\n{3,}/g,`
`),J.trim()},rt=he=>{if(!he)return"";let J=he;J=J.replace(/!\[([^\]]*)\]\(([^)]*\.\.\.?)\)/g,""),J=J.replace(/!\[([^\]]*)\]\(([^)]*)\)/g,(G,X,be)=>!be||be.length<10||be.endsWith("...")||be.endsWith("..")?(console.log("🔧 移除不完整的图片引用:",G),""):G);const ee=J.split(`
`);let Ce=!1;for(const G of ee)if(G.trim().match(/^#{1,6}\s+.+/)){Ce=!0;break}if(!Ce&&ee.length>0){const G=ee[0].trim();G&&!G.startsWith("#")&&G.length>0&&(J=`# ${G}
${ee.slice(1).join(`
`)}`,console.log("🔧 修复:将第一行转换为标题"))}J=J.replace(/^[-*+]\s*$/gm,"");const se=J.match(/```/g);return se&&se.length%2===1&&(J+="\n```",console.log("🔧 修复:添加缺失的代码块闭合标记")),J=J.replace(/\*\*([^*]*)$/,"**$1**"),J=J.replace(/\*([^*]*)$/,"*$1*"),J=J.replace(/\n{3,}/g,`
`),J&&!J.endsWith(`
`)&&(J+=`
`),console.log("🔧 预处理完成,原始长度:",he.length,"处理后长度:",J.length),J},je=he=>{if(!he)return{id:"root",topic:"AI生成中...",children:[{id:"node_1",topic:"内容生成中,请稍候...",children:[],level:1,data:{},expanded:!0}]};const J=he.split(`
`).filter(G=>G.trim());let ee="AI生成中...";for(const G of J){const X=G.trim();if(X.startsWith("#")){ee=X.replace(/^#+\s*/,"").trim();break}else if(X.length>5&&!X.startsWith("```")&&!X.startsWith("**")){ee=X.substring(0,30)+(X.length>30?"...":"");break}}const Ce=J.filter(G=>{const X=G.trim();return X.length>10&&!X.startsWith("#")&&!X.startsWith("```")&&!X.startsWith("**")&&!X.startsWith("- ")&&!X.startsWith("* ")&&!X.startsWith("+ ")}),se=[];return Ce.slice(0,3).forEach((G,X)=>{const be=G.trim().substring(0,50);be&&se.push({id:`node_${X+1}`,topic:be+(G.trim().length>50?"...":""),children:[],level:1,data:{},expanded:!0})}),se.length===0&&se.push({id:"node_1",topic:"内容生成中,请稍候...",children:[],level:1,data:{},expanded:!0}),{id:"root",topic:ee,children:se}},Ne=async he=>{try{if(!he||typeof he!="string")throw new Error("Markdown内容为空或格式错误");const ee=rt(he).split(`
`);let Ce=null;const se=[];let G=0,X=[];for(let ye=0;ye<ee.length;ye++){const ze=ee[ye].trim(),Xe=ze.match(/^(#{1,6})\s+(.+)$/);if(Xe){if(X.length>0&&se.length>0){const mt=X.join(`
`).trim();if(mt){const Dt={id:`node_${G++}`,topic:mt,children:[],level:(se[se.length-1].level||0)+1,data:{},expanded:!0};se[se.length-1].children.push(Dt)}X=[]}const Ke=Xe[1].length,Be=Xe[2].trim(),st=Fe(Be),qe=We(ce(Be));st.length>0&&console.log(`🖼️ 在标题中发现 ${st.length} 张图片: ${Be}`);const Re={id:`node_${G++}`,topic:qe,children:[],level:Ke,data:{},expanded:!0};if(st.length>0){const mt=st[0];if(mt.url&&mt.url.trim()!==""){let Dt=mt.url;Dt.includes("cdn-mineru.openxlab.org.cn")&&(Dt=`/proxy-image${Dt.replace("https://cdn-mineru.openxlab.org.cn","")}`);const Ut=`![${mt.alt||qe}](${Dt})`;Re.topic=qe||"图片节点",Re.dangerouslySetInnerHTML=Ut,console.log(`✅ 成功为标题节点设置图片Markdown: ${Ut}`)}else console.error("❌ 标题图片URL无效:",mt)}if(Ke===1&&!Ce)Ce=Re,se.length=0,se.push(Ce);else{for(;se.length>1&&se[se.length-1].level>=Ke;)se.pop();se.length>0&&se[se.length-1].children.push(Re),se.push(Re)}}else ze&&X.push(ze)}if(X.length>0&&se.length>0){const ye=X.join(`
`).trim();if(ye){ye.includes("|")&&console.log("🔍 处理最后的内容(包含表格):",ye.substring(0,200)+"...");const Ae={id:`node_${G++}`,topic:ye,children:[],level:(se[se.length-1].level||0)+1,data:{},expanded:!0};se[se.length-1].children.push(Ae)}}Ce||(console.warn("⚠️ 没有找到根节点,创建默认结构"),console.log("🔍 原因分析:"),console.log("- Markdown内容长度:",he.length),console.log("- 是否包含标题(#):",he.includes("#")),console.log("- 前几行内容:",he.split(`
`).slice(0,5)),Ce={id:"root",topic:"根节点",children:[],data:{},expanded:!0});const be=ye=>{let Ae=1;return ye.children&&ye.children.forEach(ze=>{Ae+=be(ze)}),Ae},le=be(Ce);return console.log("🔍 markdownToJSON返回结果:"),console.log("- 根节点ID:",Ce.id),console.log("- 根节点topic:",Ce.topic),console.log("- 子节点数量:",Ce.children?Ce.children.length:0),console.log("- 总节点数:",le),Ce}catch(J){return console.error("❌ Markdown转JSON失败:",J),console.error("❌ 错误详情:",J.message),console.error("❌ 输入内容长度:",(he==null?void 0:he.length)||0),console.error("❌ 输入内容预览:",(he==null?void 0:he.substring(0,200))||"无内容"),je(he||"")}},nt=async()=>{if(!l.value){q("没有Markdown内容可复制","error");return}try{await navigator.clipboard.writeText(l.value),q("Markdown已复制到剪贴板","success")}catch{const J=document.createElement("textarea");J.value=l.value,document.body.appendChild(J),J.select(),document.execCommand("copy"),J.remove(),q("Markdown已复制到剪贴板","success")}},ct=async()=>{try{await navigator.clipboard.writeText(h.value),q("JSON已复制到剪贴板","success")}catch(he){console.error("复制失败:",he),q("复制失败","error")}},tt=async()=>{if(!h.value){q("请先生成或转换JSON数据","error");return}try{const he=JSON.parse(h.value),J=he.topic||he.title||`AI生成的思维导图_${new Date().toLocaleString()}`,ee=new CustomEvent("save-preview-to-database",{detail:{data:he,title:J,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(ee),setTimeout(()=>{q("思维导图已保存成功!","success"),w.value=null,x.value&&(x.value.value="")},2e3)}catch(he){console.error("JSON解析失败:",he),q("JSON格式错误请检查数据","error")}},q=(he,J="info")=>{const ee=document.createElement("div");switch(ee.className=`notification notification-${J}`,ee.textContent=he,ee.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
padding: 12px 20px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
max-width: 300px;
word-wrap: break-word;
`,J){case"success":ee.style.background="#4CAF50",ee.style.color="white";break;case"error":ee.style.background="#f44336",ee.style.color="white";break;case"info":default:ee.style.background="#2196F3",ee.style.color="white";break}if(!document.querySelector("#notification-styles")){const Ce=document.createElement("style");Ce.id="notification-styles",Ce.textContent=`
@keyframes slideIn {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
from { transform: translateX(0); opacity: 1; }
to { transform: translateX(100%); opacity: 0; }
}
`,document.head.appendChild(Ce)}document.body.appendChild(ee),setTimeout(()=>{ee.style.animation="slideOut 0.3s ease",setTimeout(()=>{ee.parentNode&&ee.parentNode.removeChild(ee)},300)},3e3)},Ht=()=>{l.value="",h.value="",q("内容已清空","info")},Rt=(he,J,ee=null)=>{const Ce={title:he,content:J,mindmapId:ee,timestamp:new Date};v.value.unshift(Ce),v.value.length>10&&(v.value=v.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(v.value))},$t=async he=>{he.mindmapId?window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:he.mindmapId,title:he.title}})):(l.value=he.content,await Me(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:he.content,json:h.value,title:he.title}})))},Nt=he=>new Date(he).toLocaleString("zh-CN");Fp(()=>{const he=localStorage.getItem("ai-sidebar-history");if(he)try{v.value=JSON.parse(he)}catch(J){console.error("加载历史记录失败:",J)}window.addEventListener("add-to-history",J=>{const{title:ee,content:Ce,timestamp:se}=J.detail;Rt(ee,Ce,null)}),window.addEventListener("mindmap-saved",J=>{const{mindmapId:ee,title:Ce,timestamp:se}=J.detail,G=v.value.find(X=>X.title===Ce||X.timestamp&&Math.abs(X.timestamp-se)<5e3);G?(G.mindmapId=ee,localStorage.setItem("ai-sidebar-history",JSON.stringify(v.value))):Rt(Ce,"",ee)}),kl(o,(J,ee)=>{}),kl(l,(J,ee)=>{})});const oe=async()=>{try{const he=await fetch("http://127.0.0.1:8000/api/ai/test-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({test:"data"})});if(!he.ok)throw new Error(`HTTP error! status: ${he.status}`);const J=he.body.getReader(),ee=new TextDecoder;let Ce="";for(;;){const{done:se,value:G}=await J.read();if(se)break;Ce+=ee.decode(G,{stream:!0});const X=Ce.split(`
`);Ce=X.pop()||"";for(const be of X)if(be.startsWith("data: "))try{const le=JSON.parse(be.slice(6))}catch(le){console.warn("解析测试数据失败:",le)}}}catch(he){console.error("❌ 测试流式API失败:",he)}};return window.testStreamAPI=oe,Rc(()=>{}),(he,J)=>(Kt(),Xt("div",sM,[De("div",{class:"sidebar-toggle",onClick:S,title:r.value?"展开AI助手":"折叠AI助手",style:os({left:r.value?"10px":"420px"})},[r.value?(Kt(),Xt("svg",cM,[...J[1]||(J[1]=[De("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(Kt(),Xt("svg",uM,[...J[2]||(J[2]=[De("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,lM),De("div",{class:ss(["ai-sidebar",{"sidebar-collapsed":r.value}])},[X0(De("div",dM,[J[12]||(J[12]=De("div",{class:"sidebar-header"},[De("h3",null,"🤖 AI 助手"),De("p",null,"文档转思维导图工具"),De("div",{class:"collapse-hint"},[De("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),De("div",hM,[J[6]||(J[6]=De("h4",null,"📁 生成思维导图",-1)),De("div",pM,[J[4]||(J[4]=De("label",null,"上传文件:",-1)),De("div",{class:"file-upload-area",onDrop:C,onDragover:T,onDragleave:A},[De("input",{type:"file",ref_key:"fileInput",ref:x,onChange:k,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),De("div",{class:ss(["file-upload-placeholder",{"drag-over":b.value}])},[...J[3]||(J[3]=[De("span",{class:"upload-icon"},"📎",-1),De("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),De("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),w.value?(Kt(),Xt("div",fM,[De("div",mM,[De("div",gM,[De("span",vM,"📄 "+Jr(w.value.name),1),De("span",bM,"("+Jr(y(w.value.size))+")",1)]),De("button",{onClick:M,class:"btn-remove",title:"删除文件"},[...J[5]||(J[5]=[De("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[De("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"})],-1)])])])])):Yr("",!0),De("div",yM,[De("button",{onClick:N,disabled:!w.value||c.value,class:"btn-primary"},[c.value?(Kt(),Xt("span",xM,"AI生成中...")):(Kt(),Xt("span",kM,"AI生成思维导图"))],8,wM)])]),v.value.length>0?(Kt(),Xt("div",SM,[J[7]||(J[7]=De("h4",null,"📚 历史记录",-1)),De("div",EM,[(Kt(!0),Xt(wi,null,W4(v.value,(ee,Ce)=>(Kt(),Xt("div",{key:Ce,class:"history-item",onClick:se=>$t(ee)},[De("div",AM,Jr(ee.title),1),De("div",MM,Jr(Nt(ee.timestamp)),1)],8,TM))),128))])])):Yr("",!0),De("div",CM,[J[9]||(J[9]=De("h4",null,"📝 AI生成的Markdown结果",-1)),De("div",LM,[J[8]||(J[8]=De("label",null,"Markdown内容",-1)),X0(De("textarea",{"onUpdate:modelValue":J[0]||(J[0]=ee=>l.value=ee),placeholder:"AI生成的Markdown内容将显示在这里",rows:"6",readonly:"",class:"markdown-result"},null,512),[[Wp,l.value]])]),De("div",_M,[De("button",{onClick:Me,disabled:p.value,class:"btn-secondary"},[p.value?(Kt(),Xt("span",DM,"转换中...")):(Kt(),Xt("span",RM,"🔄 转换为JSON"))],8,NM),De("button",{onClick:Ht,class:"btn-clear"},"清空"),De("button",{onClick:nt,class:"btn-copy"},"📋 复制Markdown")])]),De("div",IM,[J[11]||(J[11]=De("h4",null,"📊 Markdown转JSON结果",-1)),g.value?(Kt(),Xt("div",OM,[J[10]||(J[10]=De("div",{class:"spinner"},null,-1)),De("span",null,Jr(m.value),1)])):Yr("",!0),De("div",HM,[De("pre",PM,Jr(h.value||"JSON转换结果将显示在这里"),1),De("div",zM,[De("button",{onClick:ct,class:"btn-copy"},"📋 复制JSON"),De("button",{onClick:tt,disabled:g.value,class:"btn-copy"},Jr(g.value?"处理中...":"👁️ 预览"),9,BM)])])])],512),[[jb,!r.value]])],2)]))}},qM=Gp(FM,[["__scopeId","data-v-4edf6f37"]]);const jM={class:"markdown-test"},$M={class:"test-section"},UM={class:"test-section"},VM=["innerHTML"],WM={class:"test-section"},GM={class:"test-cases"},KM=["onClick"],XM={__name:"MarkdownTest",setup(t){const e=yt(`# 测试标题
这是一个**粗体**和*斜体*的测试。
## 表格测试
| 产品 | 价格 | 库存 |
|------|------|------|
| 苹果 | 4元 | 100个 |
| 香蕉 | 2元 | 50个 |
## 代码测试
\`\`\`javascript
function hello() {
console.log('Hello World!');
}
\`\`\`
行内代码:\`const name = 'test'\`
## 列表测试
- 项目1
- 项目2
- 子项目2.1
- 子项目2.2
- 项目3
## 链接测试
- [GitHub](https://github.com)
- [Vue.js](https://vuejs.org)`),n=yt([{name:"基础表格",content:`# 产品价格表
| 产品 | 价格 |
|------|------|
| 苹果 | 4元 |
| 香蕉 | 2元 |`},{name:"复杂表格",content:`# 技术栈对比
| 技术 | 前端 | 后端 | 数据库 |
|------|------|------|--------|
| Vue.js | ✅ | ❌ | ❌ |
| Django | ❌ | ✅ | ❌ |
| PostgreSQL | ❌ | ❌ | ✅ |`},{name:"代码块",content:`# 代码示例
\`\`\`javascript
function markdownToJSON(markdown) {
const lines = markdown.split('\\n');
// 处理逻辑...
return result;
}
\`\`\``},{name:"混合内容",content:`# 混合内容测试
这是一个包含**粗体**、*斜体*和\`行内代码\`的段落。
## 表格
| 功能 | 状态 | 说明 |
|------|------|------|
| 表格渲染 | ✅ | 支持markdown表格 |
| 代码高亮 | ✅ | 支持代码块 |
## 代码
\`\`\`python
def hello_world():
print("Hello, World!")
\`\`\``}]),r=fv(()=>{if(!e.value)return"";try{return m2(e.value)}catch(h){return`<div class="error">渲染失败: ${h.message}</div>`}}),o=()=>{},l=h=>{e.value=h.content};return(h,c)=>(Kt(),Xt("div",jM,[c[4]||(c[4]=De("h2",null,"Markdown渲染测试",-1)),De("div",$M,[c[1]||(c[1]=De("h3",null,"输入Markdown内容",-1)),X0(De("textarea",{"onUpdate:modelValue":c[0]||(c[0]=p=>e.value=p),placeholder:"输入markdown内容...",rows:"10",class:"markdown-input"},null,512),[[Wp,e.value]])]),De("div",UM,[c[2]||(c[2]=De("h3",null,"渲染结果",-1)),De("div",{class:"rendered-content",innerHTML:r.value},null,8,VM)]),De("div",WM,[c[3]||(c[3]=De("h3",null,"测试用例",-1)),De("button",{onClick:o,class:"test-btn"},"加载测试用例"),De("div",GM,[(Kt(!0),Xt(wi,null,W4(n.value,(p,v)=>(Kt(),Xt("button",{key:v,onClick:b=>l(p),class:"test-case-btn"},Jr(p.name),9,KM))),128))])])]))}},ZM=Gp(XM,[["__scopeId","data-v-68a00828"]]);const YM={id:"app"},JM={class:"test-mode-toggle",style:{display:"none"}},QM={key:0,class:"test-mode"},eC={key:1},tC={class:"main-content"},nC={__name:"App",setup(t){const e=yt(null),n=yt(!1),r=()=>{n.value=!n.value},o=()=>{e.value&&e.value.showMindMapPage()};return(l,h)=>(Kt(),Xt("div",YM,[h[0]||(h[0]=Up("« ",-1)),De("div",JM,[De("button",{onClick:r,class:"test-btn"},Jr(n.value?"切换到思维导图":"测试Markdown渲染"),1)]),n.value?(Kt(),Xt("div",QM,[Gr(ZM)])):(Kt(),Xt("div",eC,[Gr(qM,{onStartRealtimeGeneration:o}),De("div",tC,[Gr(iM,{ref_key:"mindMapRef",ref:e},null,512)])]))]))}};ly(nC).mount("#app");export{d4 as _,Bh as c,iC as g};