diff --git a/backend/mindmap.db b/backend/mindmap.db index 9a3237a..ae3a9cf 100644 Binary files a/backend/mindmap.db and b/backend/mindmap.db differ diff --git a/backend/mindmap/migrations/0004_node_html_content.py b/backend/mindmap/migrations/0004_node_html_content.py new file mode 100644 index 0000000..eb66056 --- /dev/null +++ b/backend/mindmap/migrations/0004_node_html_content.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.7 on 2025-10-10 05:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('mindmap', '0003_node_image_fit_node_image_height_node_image_url_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='node', + name='html_content', + field=models.TextField(blank=True, default=''), + ), + ] diff --git a/backend/mindmap/models.py b/backend/mindmap/models.py index 9dec538..7638cd1 100644 --- a/backend/mindmap/models.py +++ b/backend/mindmap/models.py @@ -35,6 +35,9 @@ class Node(models.Model): image_height = models.IntegerField(default=80, null=True, blank=True) # 图片高度 image_fit = models.CharField(max_length=20, default='contain', blank=True) # 图片适配方式 + # HTML内容字段 + html_content = models.TextField(blank=True, default='') # dangerouslySetInnerHTML内容 + created_at = models.DateTimeField(auto_now_add=True) # createDate updated_at = models.DateTimeField(auto_now=True) # updateDate deleted = models.BooleanField(default=False) # delete diff --git a/backend/mindmap/serializers.py b/backend/mindmap/serializers.py index c13f59b..6ac864d 100644 --- a/backend/mindmap/serializers.py +++ b/backend/mindmap/serializers.py @@ -10,6 +10,7 @@ class DocNodeSerializer(serializers.Serializer): depth = serializers.IntegerField() title = serializers.CharField(allow_blank=True, required=False) des = serializers.CharField(allow_blank=True, required=False) + htmlContent = serializers.CharField(allow_blank=True, required=False) createDate = serializers.DateTimeField() updateDate = serializers.DateTimeField() delete = serializers.BooleanField() @@ -33,6 +34,7 @@ def map_node_to_doc(node: Node) -> dict: 'depth': int(node.depth or 0), 'title': node.title or '', 'des': (node.desc or ''), + 'htmlContent': node.html_content or '', 'createDate': node.created_at, 'updateDate': node.updated_at, 'delete': bool(node.deleted), diff --git a/backend/mindmap/views_doc.py b/backend/mindmap/views_doc.py index bbd7bb2..b5092cc 100644 --- a/backend/mindmap/views_doc.py +++ b/backend/mindmap/views_doc.py @@ -51,6 +51,12 @@ def convert_to_mindelixir_format(mindmap, nodes): "mindmap_id": mindmap.id } + # 添加HTML内容(如果存在) + if node.html_content: + node_data["dangerouslySetInnerHTML"] = node.html_content + # 如果有HTML内容,清空topic以避免冲突 + node_data["topic"] = "" + # 添加图片信息 if node.image_url: node_data["image"] = { @@ -170,6 +176,8 @@ def create_mindmap(request): children_count=0, depth=0, deleted=False, + # 添加HTML内容 + html_content=mindmap_data.get('dangerouslySetInnerHTML', ''), # 添加图片信息 image_url=mindmap_data.get('image', {}).get('url') if mindmap_data.get('image') else None, image_width=mindmap_data.get('image', {}).get('width') if mindmap_data.get('image') else None, @@ -196,6 +204,8 @@ def create_mindmap(request): children_count=0, depth=0, deleted=False, + # HTML内容字段默认为空 + html_content='', # 图片字段默认为空 image_url=None, image_width=None, @@ -226,6 +236,8 @@ def create_nodes_recursively(nodes_data, mindmap, parent_id): children_count=len(node_data.get('children', [])), depth=1, # 可以根据实际层级计算 deleted=False, + # 添加HTML内容 + html_content=node_data.get('dangerouslySetInnerHTML', ''), # 添加图片信息 image_url=node_data.get('image', {}).get('url') if node_data.get('image') else None, image_width=node_data.get('image', {}).get('width') if node_data.get('image') else None, @@ -296,6 +308,8 @@ def add_nodes(request): children_count=0, # 新节点初始子节点数为0 depth=depth, deleted=False, + # 添加HTML内容 + html_content=n.get('dangerouslySetInnerHTML', ''), ) # 更新父节点的子节点计数 diff --git a/frontend/dist/assets/index-d78cd498.js b/frontend/dist/assets/index-90ac6040.js similarity index 88% rename from frontend/dist/assets/index-d78cd498.js rename to frontend/dist/assets/index-90ac6040.js index ac70feb..371f5b3 100644 --- a/frontend/dist/assets/index-d78cd498.js +++ b/frontend/dist/assets/index-90ac6040.js @@ -6,28 +6,28 @@ var _d=Object.defineProperty;var Od=(t,e,r)=>e in t?_d(t,e,{enumerable:!0,config * @vue/reactivity v3.5.20 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let It;class Vd{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=It,!e&&It&&(this.index=(It.scopes||(It.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e0&&--this._on===0&&(It=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let r,n;for(r=0,n=this.effects.length;r0)return;if(t0){let e=t0;for(t0=void 0;e;){const r=e.next;e.next=void 0,e.flags&=-9,e=r}}let t;for(;e0;){let e=e0;for(e0=void 0;e;){const r=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=r}}if(t)throw t}function Uc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Vc(t){let e,r=t.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),Aa(n),Gd(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}t.deps=e,t.depsTail=r}function Pi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Wc(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Wc(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===c0)||(t.globalVersion=c0,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Pi(t))))return;t.flags|=2;const e=t.dep,r=Xe,n=rr;Xe=t,rr=!0;try{Uc(t);const s=t.fn(t._value);(e.version===0||Wr(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{Xe=r,rr=n,Vc(t),t.flags&=-3}}function Aa(t,e=!1){const{dep:r,prevSub:n,nextSub:s}=t;if(n&&(n.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=n,t.nextSub=void 0),r.subs===t&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)Aa(i,!0)}!e&&!--r.sc&&r.map&&r.map.delete(r.key)}function Gd(t){const{prevDep:e,nextDep:r}=t;e&&(e.nextDep=r,t.prevDep=void 0),r&&(r.prevDep=e,t.nextDep=void 0)}let rr=!0;const Gc=[];function Rr(){Gc.push(rr),rr=!1}function Ir(){const t=Gc.pop();rr=t===void 0?!0:t}function $o(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const r=Xe;Xe=void 0;try{e()}finally{Xe=r}}}let c0=0;class Kd{constructor(e,r){this.sub=e,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ca{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(!Xe||!rr||Xe===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==Xe)r=this.activeLink=new Kd(Xe,this),Xe.deps?(r.prevDep=Xe.depsTail,Xe.depsTail.nextDep=r,Xe.depsTail=r):Xe.deps=Xe.depsTail=r,Kc(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const n=r.nextDep;n.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=n),r.prevDep=Xe.depsTail,r.nextDep=void 0,Xe.depsTail.nextDep=r,Xe.depsTail=r,Xe.deps===r&&(Xe.deps=n)}return r}trigger(e){this.version++,c0++,this.notify(e)}notify(e){Ta();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{Ea()}}}function Kc(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)Kc(n)}const r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}const Hi=new WeakMap,hn=Symbol(""),qi=Symbol(""),u0=Symbol("");function wt(t,e,r){if(rr&&Xe){let n=Hi.get(t);n||Hi.set(t,n=new Map);let s=n.get(r);s||(n.set(r,s=new Ca),s.map=n,s.key=r),s.track()}}function Er(t,e,r,n,s,i){const a=Hi.get(t);if(!a){c0++;return}const o=l=>{l&&l.trigger()};if(Ta(),e==="clear")a.forEach(o);else{const l=Ae(t),c=l&&Sa(r);if(l&&r==="length"){const d=Number(n);a.forEach((f,p)=>{(p==="length"||p===u0||!Qr(p)&&p>=d)&&o(f)})}else switch((r!==void 0||a.has(void 0))&&o(a.get(r)),c&&o(a.get(u0)),e){case"add":l?c&&o(a.get("length")):(o(a.get(hn)),Mn(t)&&o(a.get(qi)));break;case"delete":l||(o(a.get(hn)),Mn(t)&&o(a.get(qi)));break;case"set":Mn(t)&&o(a.get(hn));break}}Ea()}function wn(t){const e=Fe(t);return e===t?e:(wt(e,"iterate",u0),Vt(t)?e:e.map(bt))}function zs(t){return wt(t=Fe(t),"iterate",u0),t}const Yd={__proto__:null,[Symbol.iterator](){return ci(this,Symbol.iterator,bt)},concat(...t){return wn(this).concat(...t.map(e=>Ae(e)?wn(e):e))},entries(){return ci(this,"entries",t=>(t[1]=bt(t[1]),t))},every(t,e){return wr(this,"every",t,e,void 0,arguments)},filter(t,e){return wr(this,"filter",t,e,r=>r.map(bt),arguments)},find(t,e){return wr(this,"find",t,e,bt,arguments)},findIndex(t,e){return wr(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return wr(this,"findLast",t,e,bt,arguments)},findLastIndex(t,e){return wr(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return wr(this,"forEach",t,e,void 0,arguments)},includes(...t){return ui(this,"includes",t)},indexOf(...t){return ui(this,"indexOf",t)},join(t){return wn(this).join(t)},lastIndexOf(...t){return ui(this,"lastIndexOf",t)},map(t,e){return wr(this,"map",t,e,void 0,arguments)},pop(){return jn(this,"pop")},push(...t){return jn(this,"push",t)},reduce(t,...e){return Fo(this,"reduce",t,e)},reduceRight(t,...e){return Fo(this,"reduceRight",t,e)},shift(){return jn(this,"shift")},some(t,e){return wr(this,"some",t,e,void 0,arguments)},splice(...t){return jn(this,"splice",t)},toReversed(){return wn(this).toReversed()},toSorted(t){return wn(this).toSorted(t)},toSpliced(...t){return wn(this).toSpliced(...t)},unshift(...t){return jn(this,"unshift",t)},values(){return ci(this,"values",bt)}};function ci(t,e,r){const n=zs(t),s=n[e]();return n!==t&&!Vt(t)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=r(i.value)),i}),s}const Xd=Array.prototype;function wr(t,e,r,n,s,i){const a=zs(t),o=a!==t&&!Vt(t),l=a[e];if(l!==Xd[e]){const f=l.apply(t,i);return o?bt(f):f}let c=r;a!==t&&(o?c=function(f,p){return r.call(this,bt(f),p,t)}:r.length>2&&(c=function(f,p){return r.call(this,f,p,t)}));const d=l.call(a,c,n);return o&&s?s(d):d}function Fo(t,e,r,n){const s=zs(t);let i=r;return s!==t&&(Vt(t)?r.length>3&&(i=function(a,o,l){return r.call(this,a,o,l,t)}):i=function(a,o,l){return r.call(this,a,bt(o),l,t)}),s[e](i,...n)}function ui(t,e,r){const n=Fe(t);wt(n,"iterate",u0);const s=n[e](...r);return(s===-1||s===!1)&&Ra(r[0])?(r[0]=Fe(r[0]),n[e](...r)):s}function jn(t,e,r=[]){Rr(),Ta();const n=Fe(t)[e].apply(t,r);return Ea(),Ir(),n}const Jd=wa("__proto__,__v_isRef,__isVue"),Yc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Qr));function Zd(t){Qr(t)||(t=String(t));const e=Fe(this);return wt(e,"has",t),e.hasOwnProperty(t)}class Xc{constructor(e=!1,r=!1){this._isReadonly=e,this._isShallow=r}get(e,r,n){if(r==="__v_skip")return e.__v_skip;const s=this._isReadonly,i=this._isShallow;if(r==="__v_isReactive")return!s;if(r==="__v_isReadonly")return s;if(r==="__v_isShallow")return i;if(r==="__v_raw")return n===(s?i?lh:eu:i?Qc:Zc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const a=Ae(e);if(!s){let l;if(a&&(l=Yd[r]))return l;if(r==="hasOwnProperty")return Zd}const o=Reflect.get(e,r,kt(e)?e:n);return(Qr(r)?Yc.has(r):Jd(r))||(s||wt(e,"get",r),i)?o:kt(o)?a&&Sa(r)?o:o.value:rt(o)?s?tu(o):Na(o):o}}class Jc extends Xc{constructor(e=!1){super(!1,e)}set(e,r,n,s){let i=e[r];if(!this._isShallow){const l=Kr(i);if(!Vt(n)&&!Kr(n)&&(i=Fe(i),n=Fe(n)),!Ae(e)&&kt(i)&&!kt(n))return l||(i.value=n),!0}const a=Ae(e)&&Sa(r)?Number(r)t,D0=t=>Reflect.getPrototypeOf(t);function nh(t,e,r){return function(...n){const s=this.__v_raw,i=Fe(s),a=Mn(i),o=t==="entries"||t===Symbol.iterator&&a,l=t==="keys"&&a,c=s[t](...n),d=r?ji:e?ls:bt;return!e&&wt(i,"iterate",l?qi:hn),{next(){const{value:f,done:p}=c.next();return p?{value:f,done:p}:{value:o?[d(f[0]),d(f[1])]:d(f),done:p}},[Symbol.iterator](){return this}}}}function R0(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function sh(t,e){const r={get(s){const i=this.__v_raw,a=Fe(i),o=Fe(s);t||(Wr(s,o)&&wt(a,"get",s),wt(a,"get",o));const{has:l}=D0(a),c=e?ji:t?ls:bt;if(l.call(a,s))return c(i.get(s));if(l.call(a,o))return c(i.get(o));i!==a&&i.get(s)},get size(){const s=this.__v_raw;return!t&&wt(Fe(s),"iterate",hn),s.size},has(s){const i=this.__v_raw,a=Fe(i),o=Fe(s);return t||(Wr(s,o)&&wt(a,"has",s),wt(a,"has",o)),s===o?i.has(s):i.has(s)||i.has(o)},forEach(s,i){const a=this,o=a.__v_raw,l=Fe(o),c=e?ji:t?ls:bt;return!t&&wt(l,"iterate",hn),o.forEach((d,f)=>s.call(i,c(d),c(f),a))}};return yt(r,t?{add:R0("add"),set:R0("set"),delete:R0("delete"),clear:R0("clear")}:{add(s){!e&&!Vt(s)&&!Kr(s)&&(s=Fe(s));const i=Fe(this);return D0(i).has.call(i,s)||(i.add(s),Er(i,"add",s,s)),this},set(s,i){!e&&!Vt(i)&&!Kr(i)&&(i=Fe(i));const a=Fe(this),{has:o,get:l}=D0(a);let c=o.call(a,s);c||(s=Fe(s),c=o.call(a,s));const d=l.call(a,s);return a.set(s,i),c?Wr(i,d)&&Er(a,"set",s,i):Er(a,"add",s,i),this},delete(s){const i=Fe(this),{has:a,get:o}=D0(i);let l=a.call(i,s);l||(s=Fe(s),l=a.call(i,s)),o&&o.call(i,s);const c=i.delete(s);return l&&Er(i,"delete",s,void 0),c},clear(){const s=Fe(this),i=s.size!==0,a=s.clear();return i&&Er(s,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{r[s]=nh(s,t,e)}),r}function Ma(t,e){const r=sh(t,e);return(n,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?n:Reflect.get(Be(r,s)&&s in n?r:n,s,i)}const ih={get:Ma(!1,!1)},ah={get:Ma(!1,!0)},oh={get:Ma(!0,!1)};const Zc=new WeakMap,Qc=new WeakMap,eu=new WeakMap,lh=new WeakMap;function ch(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function uh(t){return t.__v_skip||!Object.isExtensible(t)?0:ch(zd(t))}function Na(t){return Kr(t)?t:Da(t,!1,eh,ih,Zc)}function dh(t){return Da(t,!1,rh,ah,Qc)}function tu(t){return Da(t,!0,th,oh,eu)}function Da(t,e,r,n,s){if(!rt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=uh(t);if(i===0)return t;const a=s.get(t);if(a)return a;const o=new Proxy(t,i===2?n:r);return s.set(t,o),o}function Nn(t){return Kr(t)?Nn(t.__v_raw):!!(t&&t.__v_isReactive)}function Kr(t){return!!(t&&t.__v_isReadonly)}function Vt(t){return!!(t&&t.__v_isShallow)}function Ra(t){return t?!!t.__v_raw:!1}function Fe(t){const e=t&&t.__v_raw;return e?Fe(e):t}function hh(t){return!Be(t,"__v_skip")&&Object.isExtensible(t)&&$c(t,"__v_skip",!0),t}const bt=t=>rt(t)?Na(t):t,ls=t=>rt(t)?tu(t):t;function kt(t){return t?t.__v_isRef===!0:!1}function Oe(t){return fh(t,!1)}function fh(t,e){return kt(t)?t:new ph(t,e)}class ph{constructor(e,r){this.dep=new Ca,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?e:Fe(e),this._value=r?e:bt(e),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(e){const r=this._rawValue,n=this.__v_isShallow||Vt(e)||Kr(e);e=n?e:Fe(e),Wr(e,r)&&(this._rawValue=e,this._value=n?e:bt(e),this.dep.trigger())}}function mh(t){return kt(t)?t.value:t}const gh={get:(t,e,r)=>e==="__v_raw"?t:mh(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const s=t[e];return kt(s)&&!kt(r)?(s.value=r,!0):Reflect.set(t,e,r,n)}};function ru(t){return Nn(t)?t:new Proxy(t,gh)}class vh{constructor(e,r,n){this.fn=e,this.setter=r,this._value=void 0,this.dep=new Ca(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=c0-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Xe!==this)return jc(this,!0),!0}get value(){const e=this.dep.track();return Wc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function bh(t,e,r=!1){let n,s;return Ne(t)?n=t:(n=t.get,s=t.set),new vh(n,s,r)}const I0={},cs=new WeakMap;let un;function yh(t,e=!1,r=un){if(r){let n=cs.get(r);n||cs.set(r,n=[]),n.push(t)}}function wh(t,e,r=Ve){const{immediate:n,deep:s,once:i,scheduler:a,augmentJob:o,call:l}=r,c=D=>s?D:Vt(D)||s===!1||s===0?Ar(D,1):Ar(D);let d,f,p,v,b=!1,y=!1;if(kt(t)?(f=()=>t.value,b=Vt(t)):Nn(t)?(f=()=>c(t),b=!0):Ae(t)?(y=!0,b=t.some(D=>Nn(D)||Vt(D)),f=()=>t.map(D=>{if(kt(D))return D.value;if(Nn(D))return c(D);if(Ne(D))return l?l(D,2):D()})):Ne(t)?e?f=l?()=>l(t,2):t:f=()=>{if(p){Rr();try{p()}finally{Ir()}}const D=un;un=d;try{return l?l(t,3,[v]):t(v)}finally{un=D}}:f=tr,e&&s){const D=f,I=s===!0?1/0:s;f=()=>Ar(D(),I)}const w=Wd(),M=()=>{d.stop(),w&&w.active&&ka(w.effects,d)};if(i&&e){const D=e;e=(...I)=>{D(...I),M()}}let S=y?new Array(t.length).fill(I0):I0;const E=D=>{if(!(!(d.flags&1)||!d.dirty&&!D))if(e){const I=d.run();if(s||b||(y?I.some((O,$)=>Wr(O,S[$])):Wr(I,S))){p&&p();const O=un;un=d;try{const $=[I,S===I0?void 0:y&&S[0]===I0?[]:S,v];S=I,l?l(e,3,$):e(...$)}finally{un=O}}}else d.run()};return o&&o(E),d=new Hc(f),d.scheduler=a?()=>a(E,!1):E,v=D=>yh(D,!1,d),p=d.onStop=()=>{const D=cs.get(d);if(D){if(l)l(D,4);else for(const I of D)I();cs.delete(d)}},e?n?E(!0):S=d.run():a?a(E.bind(null,!0),!0):d.run(),M.pause=d.pause.bind(d),M.resume=d.resume.bind(d),M.stop=M,M}function Ar(t,e=1/0,r){if(e<=0||!rt(t)||t.__v_skip||(r=r||new Set,r.has(t)))return t;if(r.add(t),e--,kt(t))Ar(t.value,e,r);else if(Ae(t))for(let n=0;n{Ar(n,e,r)});else if(Lc(t)){for(const n in t)Ar(t[n],e,r);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&Ar(t[n],e,r)}return t}/** +**/let It;class Vd{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=It,!e&&It&&(this.index=(It.scopes||(It.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e0&&--this._on===0&&(It=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let r,n;for(r=0,n=this.effects.length;r0)return;if(t0){let e=t0;for(t0=void 0;e;){const r=e.next;e.next=void 0,e.flags&=-9,e=r}}let t;for(;e0;){let e=e0;for(e0=void 0;e;){const r=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=r}}if(t)throw t}function Uc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Vc(t){let e,r=t.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),Aa(n),Gd(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}t.deps=e,t.depsTail=r}function Pi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Wc(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Wc(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===c0)||(t.globalVersion=c0,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Pi(t))))return;t.flags|=2;const e=t.dep,r=Xe,n=rr;Xe=t,rr=!0;try{Uc(t);const s=t.fn(t._value);(e.version===0||Wr(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{Xe=r,rr=n,Vc(t),t.flags&=-3}}function Aa(t,e=!1){const{dep:r,prevSub:n,nextSub:s}=t;if(n&&(n.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=n,t.nextSub=void 0),r.subs===t&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)Aa(i,!0)}!e&&!--r.sc&&r.map&&r.map.delete(r.key)}function Gd(t){const{prevDep:e,nextDep:r}=t;e&&(e.nextDep=r,t.prevDep=void 0),r&&(r.prevDep=e,t.nextDep=void 0)}let rr=!0;const Gc=[];function Rr(){Gc.push(rr),rr=!1}function Ir(){const t=Gc.pop();rr=t===void 0?!0:t}function $o(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const r=Xe;Xe=void 0;try{e()}finally{Xe=r}}}let c0=0;class Kd{constructor(e,r){this.sub=e,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ca{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(!Xe||!rr||Xe===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==Xe)r=this.activeLink=new Kd(Xe,this),Xe.deps?(r.prevDep=Xe.depsTail,Xe.depsTail.nextDep=r,Xe.depsTail=r):Xe.deps=Xe.depsTail=r,Kc(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const n=r.nextDep;n.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=n),r.prevDep=Xe.depsTail,r.nextDep=void 0,Xe.depsTail.nextDep=r,Xe.depsTail=r,Xe.deps===r&&(Xe.deps=n)}return r}trigger(e){this.version++,c0++,this.notify(e)}notify(e){Ta();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{Ea()}}}function Kc(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)Kc(n)}const r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}const Hi=new WeakMap,hn=Symbol(""),qi=Symbol(""),u0=Symbol("");function wt(t,e,r){if(rr&&Xe){let n=Hi.get(t);n||Hi.set(t,n=new Map);let s=n.get(r);s||(n.set(r,s=new Ca),s.map=n,s.key=r),s.track()}}function Er(t,e,r,n,s,i){const a=Hi.get(t);if(!a){c0++;return}const o=l=>{l&&l.trigger()};if(Ta(),e==="clear")a.forEach(o);else{const l=Ae(t),c=l&&Sa(r);if(l&&r==="length"){const d=Number(n);a.forEach((f,p)=>{(p==="length"||p===u0||!Qr(p)&&p>=d)&&o(f)})}else switch((r!==void 0||a.has(void 0))&&o(a.get(r)),c&&o(a.get(u0)),e){case"add":l?c&&o(a.get("length")):(o(a.get(hn)),Mn(t)&&o(a.get(qi)));break;case"delete":l||(o(a.get(hn)),Mn(t)&&o(a.get(qi)));break;case"set":Mn(t)&&o(a.get(hn));break}}Ea()}function wn(t){const e=Fe(t);return e===t?e:(wt(e,"iterate",u0),Wt(t)?e:e.map(bt))}function zs(t){return wt(t=Fe(t),"iterate",u0),t}const Yd={__proto__:null,[Symbol.iterator](){return ci(this,Symbol.iterator,bt)},concat(...t){return wn(this).concat(...t.map(e=>Ae(e)?wn(e):e))},entries(){return ci(this,"entries",t=>(t[1]=bt(t[1]),t))},every(t,e){return wr(this,"every",t,e,void 0,arguments)},filter(t,e){return wr(this,"filter",t,e,r=>r.map(bt),arguments)},find(t,e){return wr(this,"find",t,e,bt,arguments)},findIndex(t,e){return wr(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return wr(this,"findLast",t,e,bt,arguments)},findLastIndex(t,e){return wr(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return wr(this,"forEach",t,e,void 0,arguments)},includes(...t){return ui(this,"includes",t)},indexOf(...t){return ui(this,"indexOf",t)},join(t){return wn(this).join(t)},lastIndexOf(...t){return ui(this,"lastIndexOf",t)},map(t,e){return wr(this,"map",t,e,void 0,arguments)},pop(){return jn(this,"pop")},push(...t){return jn(this,"push",t)},reduce(t,...e){return Fo(this,"reduce",t,e)},reduceRight(t,...e){return Fo(this,"reduceRight",t,e)},shift(){return jn(this,"shift")},some(t,e){return wr(this,"some",t,e,void 0,arguments)},splice(...t){return jn(this,"splice",t)},toReversed(){return wn(this).toReversed()},toSorted(t){return wn(this).toSorted(t)},toSpliced(...t){return wn(this).toSpliced(...t)},unshift(...t){return jn(this,"unshift",t)},values(){return ci(this,"values",bt)}};function ci(t,e,r){const n=zs(t),s=n[e]();return n!==t&&!Wt(t)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=r(i.value)),i}),s}const Xd=Array.prototype;function wr(t,e,r,n,s,i){const a=zs(t),o=a!==t&&!Wt(t),l=a[e];if(l!==Xd[e]){const f=l.apply(t,i);return o?bt(f):f}let c=r;a!==t&&(o?c=function(f,p){return r.call(this,bt(f),p,t)}:r.length>2&&(c=function(f,p){return r.call(this,f,p,t)}));const d=l.call(a,c,n);return o&&s?s(d):d}function Fo(t,e,r,n){const s=zs(t);let i=r;return s!==t&&(Wt(t)?r.length>3&&(i=function(a,o,l){return r.call(this,a,o,l,t)}):i=function(a,o,l){return r.call(this,a,bt(o),l,t)}),s[e](i,...n)}function ui(t,e,r){const n=Fe(t);wt(n,"iterate",u0);const s=n[e](...r);return(s===-1||s===!1)&&Ra(r[0])?(r[0]=Fe(r[0]),n[e](...r)):s}function jn(t,e,r=[]){Rr(),Ta();const n=Fe(t)[e].apply(t,r);return Ea(),Ir(),n}const Jd=wa("__proto__,__v_isRef,__isVue"),Yc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Qr));function Zd(t){Qr(t)||(t=String(t));const e=Fe(this);return wt(e,"has",t),e.hasOwnProperty(t)}class Xc{constructor(e=!1,r=!1){this._isReadonly=e,this._isShallow=r}get(e,r,n){if(r==="__v_skip")return e.__v_skip;const s=this._isReadonly,i=this._isShallow;if(r==="__v_isReactive")return!s;if(r==="__v_isReadonly")return s;if(r==="__v_isShallow")return i;if(r==="__v_raw")return n===(s?i?lh:eu:i?Qc:Zc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const a=Ae(e);if(!s){let l;if(a&&(l=Yd[r]))return l;if(r==="hasOwnProperty")return Zd}const o=Reflect.get(e,r,kt(e)?e:n);return(Qr(r)?Yc.has(r):Jd(r))||(s||wt(e,"get",r),i)?o:kt(o)?a&&Sa(r)?o:o.value:rt(o)?s?tu(o):Na(o):o}}class Jc extends Xc{constructor(e=!1){super(!1,e)}set(e,r,n,s){let i=e[r];if(!this._isShallow){const l=Kr(i);if(!Wt(n)&&!Kr(n)&&(i=Fe(i),n=Fe(n)),!Ae(e)&&kt(i)&&!kt(n))return l||(i.value=n),!0}const a=Ae(e)&&Sa(r)?Number(r)t,D0=t=>Reflect.getPrototypeOf(t);function nh(t,e,r){return function(...n){const s=this.__v_raw,i=Fe(s),a=Mn(i),o=t==="entries"||t===Symbol.iterator&&a,l=t==="keys"&&a,c=s[t](...n),d=r?ji:e?ls:bt;return!e&&wt(i,"iterate",l?qi:hn),{next(){const{value:f,done:p}=c.next();return p?{value:f,done:p}:{value:o?[d(f[0]),d(f[1])]:d(f),done:p}},[Symbol.iterator](){return this}}}}function R0(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function sh(t,e){const r={get(s){const i=this.__v_raw,a=Fe(i),o=Fe(s);t||(Wr(s,o)&&wt(a,"get",s),wt(a,"get",o));const{has:l}=D0(a),c=e?ji:t?ls:bt;if(l.call(a,s))return c(i.get(s));if(l.call(a,o))return c(i.get(o));i!==a&&i.get(s)},get size(){const s=this.__v_raw;return!t&&wt(Fe(s),"iterate",hn),s.size},has(s){const i=this.__v_raw,a=Fe(i),o=Fe(s);return t||(Wr(s,o)&&wt(a,"has",s),wt(a,"has",o)),s===o?i.has(s):i.has(s)||i.has(o)},forEach(s,i){const a=this,o=a.__v_raw,l=Fe(o),c=e?ji:t?ls:bt;return!t&&wt(l,"iterate",hn),o.forEach((d,f)=>s.call(i,c(d),c(f),a))}};return yt(r,t?{add:R0("add"),set:R0("set"),delete:R0("delete"),clear:R0("clear")}:{add(s){!e&&!Wt(s)&&!Kr(s)&&(s=Fe(s));const i=Fe(this);return D0(i).has.call(i,s)||(i.add(s),Er(i,"add",s,s)),this},set(s,i){!e&&!Wt(i)&&!Kr(i)&&(i=Fe(i));const a=Fe(this),{has:o,get:l}=D0(a);let c=o.call(a,s);c||(s=Fe(s),c=o.call(a,s));const d=l.call(a,s);return a.set(s,i),c?Wr(i,d)&&Er(a,"set",s,i):Er(a,"add",s,i),this},delete(s){const i=Fe(this),{has:a,get:o}=D0(i);let l=a.call(i,s);l||(s=Fe(s),l=a.call(i,s)),o&&o.call(i,s);const c=i.delete(s);return l&&Er(i,"delete",s,void 0),c},clear(){const s=Fe(this),i=s.size!==0,a=s.clear();return i&&Er(s,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{r[s]=nh(s,t,e)}),r}function Ma(t,e){const r=sh(t,e);return(n,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?n:Reflect.get(Be(r,s)&&s in n?r:n,s,i)}const ih={get:Ma(!1,!1)},ah={get:Ma(!1,!0)},oh={get:Ma(!0,!1)};const Zc=new WeakMap,Qc=new WeakMap,eu=new WeakMap,lh=new WeakMap;function ch(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function uh(t){return t.__v_skip||!Object.isExtensible(t)?0:ch(zd(t))}function Na(t){return Kr(t)?t:Da(t,!1,eh,ih,Zc)}function dh(t){return Da(t,!1,rh,ah,Qc)}function tu(t){return Da(t,!0,th,oh,eu)}function Da(t,e,r,n,s){if(!rt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=uh(t);if(i===0)return t;const a=s.get(t);if(a)return a;const o=new Proxy(t,i===2?n:r);return s.set(t,o),o}function Nn(t){return Kr(t)?Nn(t.__v_raw):!!(t&&t.__v_isReactive)}function Kr(t){return!!(t&&t.__v_isReadonly)}function Wt(t){return!!(t&&t.__v_isShallow)}function Ra(t){return t?!!t.__v_raw:!1}function Fe(t){const e=t&&t.__v_raw;return e?Fe(e):t}function hh(t){return!Be(t,"__v_skip")&&Object.isExtensible(t)&&$c(t,"__v_skip",!0),t}const bt=t=>rt(t)?Na(t):t,ls=t=>rt(t)?tu(t):t;function kt(t){return t?t.__v_isRef===!0:!1}function Oe(t){return fh(t,!1)}function fh(t,e){return kt(t)?t:new ph(t,e)}class ph{constructor(e,r){this.dep=new Ca,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?e:Fe(e),this._value=r?e:bt(e),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(e){const r=this._rawValue,n=this.__v_isShallow||Wt(e)||Kr(e);e=n?e:Fe(e),Wr(e,r)&&(this._rawValue=e,this._value=n?e:bt(e),this.dep.trigger())}}function mh(t){return kt(t)?t.value:t}const gh={get:(t,e,r)=>e==="__v_raw"?t:mh(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const s=t[e];return kt(s)&&!kt(r)?(s.value=r,!0):Reflect.set(t,e,r,n)}};function ru(t){return Nn(t)?t:new Proxy(t,gh)}class vh{constructor(e,r,n){this.fn=e,this.setter=r,this._value=void 0,this.dep=new Ca(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=c0-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Xe!==this)return jc(this,!0),!0}get value(){const e=this.dep.track();return Wc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function bh(t,e,r=!1){let n,s;return Ne(t)?n=t:(n=t.get,s=t.set),new vh(n,s,r)}const I0={},cs=new WeakMap;let un;function yh(t,e=!1,r=un){if(r){let n=cs.get(r);n||cs.set(r,n=[]),n.push(t)}}function wh(t,e,r=Ve){const{immediate:n,deep:s,once:i,scheduler:a,augmentJob:o,call:l}=r,c=D=>s?D:Wt(D)||s===!1||s===0?Ar(D,1):Ar(D);let d,f,p,g,b=!1,y=!1;if(kt(t)?(f=()=>t.value,b=Wt(t)):Nn(t)?(f=()=>c(t),b=!0):Ae(t)?(y=!0,b=t.some(D=>Nn(D)||Wt(D)),f=()=>t.map(D=>{if(kt(D))return D.value;if(Nn(D))return c(D);if(Ne(D))return l?l(D,2):D()})):Ne(t)?e?f=l?()=>l(t,2):t:f=()=>{if(p){Rr();try{p()}finally{Ir()}}const D=un;un=d;try{return l?l(t,3,[g]):t(g)}finally{un=D}}:f=tr,e&&s){const D=f,I=s===!0?1/0:s;f=()=>Ar(D(),I)}const w=Wd(),M=()=>{d.stop(),w&&w.active&&ka(w.effects,d)};if(i&&e){const D=e;e=(...I)=>{D(...I),M()}}let S=y?new Array(t.length).fill(I0):I0;const E=D=>{if(!(!(d.flags&1)||!d.dirty&&!D))if(e){const I=d.run();if(s||b||(y?I.some((O,$)=>Wr(O,S[$])):Wr(I,S))){p&&p();const O=un;un=d;try{const $=[I,S===I0?void 0:y&&S[0]===I0?[]:S,g];S=I,l?l(e,3,$):e(...$)}finally{un=O}}}else d.run()};return o&&o(E),d=new Hc(f),d.scheduler=a?()=>a(E,!1):E,g=D=>yh(D,!1,d),p=d.onStop=()=>{const D=cs.get(d);if(D){if(l)l(D,4);else for(const I of D)I();cs.delete(d)}},e?n?E(!0):S=d.run():a?a(E.bind(null,!0),!0):d.run(),M.pause=d.pause.bind(d),M.resume=d.resume.bind(d),M.stop=M,M}function Ar(t,e=1/0,r){if(e<=0||!rt(t)||t.__v_skip||(r=r||new Set,r.has(t)))return t;if(r.add(t),e--,kt(t))Ar(t.value,e,r);else if(Ae(t))for(let n=0;n{Ar(n,e,r)});else if(Lc(t)){for(const n in t)Ar(t[n],e,r);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&Ar(t[n],e,r)}return t}/** * @vue/runtime-core v3.5.20 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function b0(t,e,r,n){try{return n?t(...n):t()}catch(s){$s(s,e,r)}}function mr(t,e,r,n){if(Ne(t)){const s=b0(t,e,r,n);return s&&_c(s)&&s.catch(i=>{$s(i,e,r)}),s}if(Ae(t)){const s=[];for(let i=0;i>>1,s=At[n],i=d0(s);i=d0(r)?At.push(t):At.splice(kh(e),0,t),t.flags|=1,su()}}function su(){us||(us=nu.then(au))}function Sh(t){Ae(t)?Dn.push(...t):qr&&t.id===-1?qr.splice(Tn+1,0,t):t.flags&1||(Dn.push(t),t.flags|=1),su()}function Bo(t,e,r=cr+1){for(;rd0(r)-d0(n));if(Dn.length=0,qr){qr.push(...e);return}for(qr=e,Tn=0;Tnt.id==null?t.flags&2?-1:1/0:t.id;function au(t){const e=tr;try{for(cr=0;cr{n._d&&Go(-1);const i=ds(e);let a;try{a=t(...s)}finally{ds(i),n._d&&Go(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function hs(t,e){if(jt===null)return t;const r=Hs(jt),n=t.dirs||(t.dirs=[]);for(let s=0;st.__isTeleport,Ch=Symbol("_leaveCb");function _a(t,e){t.shapeFlag&6&&t.component?(t.transition=e,_a(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 lu(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function r0(t,e,r,n,s=!1){if(Ae(t)){t.forEach((b,y)=>r0(b,e&&(Ae(e)?e[y]:e),r,n,s));return}if(n0(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&r0(t,e,r,n.component.subTree);return}const i=n.shapeFlag&4?Hs(n.component):n.el,a=s?null:i,{i:o,r:l}=t,c=e&&e.r,d=o.refs===Ve?o.refs={}:o.refs,f=o.setupState,p=Fe(f),v=f===Ve?Rc:b=>Be(p,b);if(c!=null&&c!==l){if(ct(c))d[c]=null,v(c)&&(f[c]=null);else if(kt(c)){c.value=null;const b=e;b.k&&(d[b.k]=null)}}if(Ne(l))b0(l,o,12,[a,d]);else{const b=ct(l),y=kt(l);if(b||y){const w=()=>{if(t.f){const M=b?v(l)?f[l]:d[l]:l.value;if(s)Ae(M)&&ka(M,i);else if(Ae(M))M.includes(i)||M.push(i);else if(b)d[l]=[i],v(l)&&(f[l]=d[l]);else{const S=[i];l.value=S,t.k&&(d[t.k]=S)}}else b?(d[l]=a,v(l)&&(f[l]=a)):y&&(l.value=a,t.k&&(d[t.k]=a))};a?(w.id=-1,zt(w,r)):w()}}}Ls().requestIdleCallback;Ls().cancelIdleCallback;const n0=t=>!!t.type.__asyncLoader,cu=t=>t.type.__isKeepAlive;function Mh(t,e){uu(t,"a",e)}function Nh(t,e){uu(t,"da",e)}function uu(t,e,r=Ct){const n=t.__wdc||(t.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Fs(e,n,r),r){let s=r.parent;for(;s&&s.parent;)cu(s.parent.vnode)&&Dh(n,e,r,s),s=s.parent}}function Dh(t,e,r,n){const s=Fs(e,t,n,!0);La(()=>{ka(n[e],s)},r)}function Fs(t,e,r=Ct,n=!1){if(r){const s=r[t]||(r[t]=[]),i=e.__weh||(e.__weh=(...a)=>{Rr();const o=y0(r),l=mr(e,r,t,a);return o(),Ir(),l});return n?s.unshift(i):s.push(i),i}}const zr=t=>(e,r=Ct)=>{(!f0||t==="sp")&&Fs(t,(...n)=>e(...n),r)},Rh=zr("bm"),Oa=zr("m"),Ih=zr("bu"),_h=zr("u"),Oh=zr("bum"),La=zr("um"),Lh=zr("sp"),zh=zr("rtg"),$h=zr("rtc");function Fh(t,e=Ct){Fs("ec",t,e)}const Bh=Symbol.for("v-ndc");function du(t,e,r,n){let s;const i=r&&r[n],a=Ae(t);if(a||ct(t)){const o=a&&Nn(t);let l=!1,c=!1;o&&(l=!Vt(t),c=Kr(t),t=zs(t)),s=new Array(t.length);for(let d=0,f=t.length;de(o,l,void 0,i&&i[l]));else{const o=Object.keys(t);s=new Array(o.length);for(let l=0,c=o.length;lt?Iu(t)?Hs(t):Ui(t.parent):null,s0=yt(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=>Ui(t.parent),$root:t=>Ui(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>za(t),$forceUpdate:t=>t.f||(t.f=()=>{Ia(t.update)}),$nextTick:t=>t.n||(t.n=X0.bind(t.proxy)),$watch:t=>lf.bind(t)}),di=(t,e)=>t!==Ve&&!t.__isScriptSetup&&Be(t,e),Ph={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:i,accessCache:a,type:o,appContext:l}=t;let c;if(e[0]!=="$"){const v=a[e];if(v!==void 0)switch(v){case 1:return n[e];case 2:return s[e];case 4:return r[e];case 3:return i[e]}else{if(di(n,e))return a[e]=1,n[e];if(s!==Ve&&Be(s,e))return a[e]=2,s[e];if((c=t.propsOptions[0])&&Be(c,e))return a[e]=3,i[e];if(r!==Ve&&Be(r,e))return a[e]=4,r[e];Vi&&(a[e]=0)}}const d=s0[e];let f,p;if(d)return e==="$attrs"&&wt(t.attrs,"get",""),d(t);if((f=o.__cssModules)&&(f=f[e]))return f;if(r!==Ve&&Be(r,e))return a[e]=4,r[e];if(p=l.config.globalProperties,Be(p,e))return p[e]},set({_:t},e,r){const{data:n,setupState:s,ctx:i}=t;return di(s,e)?(s[e]=r,!0):n!==Ve&&Be(n,e)?(n[e]=r,!0):Be(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(i[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:s,propsOptions:i,type:a}},o){let l,c;return!!(r[o]||t!==Ve&&o[0]!=="$"&&Be(t,o)||di(e,o)||(l=i[0])&&Be(l,o)||Be(n,o)||Be(s0,o)||Be(s.config.globalProperties,o)||(c=a.__cssModules)&&c[o])},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:Be(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function Po(t){return Ae(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}let Vi=!0;function Hh(t){const e=za(t),r=t.proxy,n=t.ctx;Vi=!1,e.beforeCreate&&Ho(e.beforeCreate,t,"bc");const{data:s,computed:i,methods:a,watch:o,provide:l,inject:c,created:d,beforeMount:f,mounted:p,beforeUpdate:v,updated:b,activated:y,deactivated:w,beforeDestroy:M,beforeUnmount:S,destroyed:E,unmounted:D,render:I,renderTracked:O,renderTriggered:$,errorCaptured:K,serverPrefetch:G,expose:pe,inheritAttrs:ye,components:Ee,directives:Ge,filters:qe}=e;if(c&&qh(c,n,null),a)for(const Ce in a){const ve=a[Ce];Ne(ve)&&(n[Ce]=ve.bind(r))}if(s){const Ce=s.call(r,r);rt(Ce)&&(t.data=Na(Ce))}if(Vi=!0,i)for(const Ce in i){const ve=i[Ce],Ke=Ne(ve)?ve.bind(r,r):Ne(ve.get)?ve.get.bind(r,r):tr,Ze=!Ne(ve)&&Ne(ve.set)?ve.set.bind(r):tr,Ye=Ou({get:Ke,set:Ze});Object.defineProperty(n,Ce,{enumerable:!0,configurable:!0,get:()=>Ye.value,set:me=>Ye.value=me})}if(o)for(const Ce in o)hu(o[Ce],n,r,Ce);if(l){const Ce=Ne(l)?l.call(r):l;Reflect.ownKeys(Ce).forEach(ve=>{Kh(ve,Ce[ve])})}d&&Ho(d,t,"c");function _e(Ce,ve){Ae(ve)?ve.forEach(Ke=>Ce(Ke.bind(r))):ve&&Ce(ve.bind(r))}if(_e(Rh,f),_e(Oa,p),_e(Ih,v),_e(_h,b),_e(Mh,y),_e(Nh,w),_e(Fh,K),_e($h,O),_e(zh,$),_e(Oh,S),_e(La,D),_e(Lh,G),Ae(pe))if(pe.length){const Ce=t.exposed||(t.exposed={});pe.forEach(ve=>{Object.defineProperty(Ce,ve,{get:()=>r[ve],set:Ke=>r[ve]=Ke,enumerable:!0})})}else t.exposed||(t.exposed={});I&&t.render===tr&&(t.render=I),ye!=null&&(t.inheritAttrs=ye),Ee&&(t.components=Ee),Ge&&(t.directives=Ge),G&&lu(t)}function qh(t,e,r=tr){Ae(t)&&(t=Wi(t));for(const n in t){const s=t[n];let i;rt(s)?"default"in s?i=J0(s.from||n,s.default,!0):i=J0(s.from||n):i=J0(s),kt(i)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):e[n]=i}}function Ho(t,e,r){mr(Ae(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function hu(t,e,r,n){let s=n.includes(".")?Eu(r,n):()=>r[n];if(ct(t)){const i=e[t];Ne(i)&&i0(s,i)}else if(Ne(t))i0(s,t.bind(r));else if(rt(t))if(Ae(t))t.forEach(i=>hu(i,e,r,n));else{const i=Ne(t.handler)?t.handler.bind(r):e[t.handler];Ne(i)&&i0(s,i,t)}}function za(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:s,optionsCache:i,config:{optionMergeStrategies:a}}=t.appContext,o=i.get(e);let l;return o?l=o:!s.length&&!r&&!n?l=e:(l={},s.length&&s.forEach(c=>fs(l,c,a,!0)),fs(l,e,a)),rt(e)&&i.set(e,l),l}function fs(t,e,r,n=!1){const{mixins:s,extends:i}=e;i&&fs(t,i,r,!0),s&&s.forEach(a=>fs(t,a,r,!0));for(const a in e)if(!(n&&a==="expose")){const o=jh[a]||r&&r[a];t[a]=o?o(t[a],e[a]):e[a]}return t}const jh={data:qo,props:jo,emits:jo,methods:Xn,computed:Xn,beforeCreate:Et,created:Et,beforeMount:Et,mounted:Et,beforeUpdate:Et,updated:Et,beforeDestroy:Et,beforeUnmount:Et,destroyed:Et,unmounted:Et,activated:Et,deactivated:Et,errorCaptured:Et,serverPrefetch:Et,components:Xn,directives:Xn,watch:Vh,provide:qo,inject:Uh};function qo(t,e){return e?t?function(){return yt(Ne(t)?t.call(this,this):t,Ne(e)?e.call(this,this):e)}:e:t}function Uh(t,e){return Xn(Wi(t),Wi(e))}function Wi(t){if(Ae(t)){const e={};for(let r=0;r1)return r&&Ne(e)?e.call(n&&n.proxy):e}}const pu={},mu=()=>Object.create(pu),gu=t=>Object.getPrototypeOf(t)===pu;function Yh(t,e,r,n=!1){const s={},i=mu();t.propsDefaults=Object.create(null),vu(t,e,s,i);for(const a in t.propsOptions[0])a in s||(s[a]=void 0);r?t.props=n?s:dh(s):t.type.props?t.props=s:t.props=i,t.attrs=i}function Xh(t,e,r,n){const{props:s,attrs:i,vnode:{patchFlag:a}}=t,o=Fe(s),[l]=t.propsOptions;let c=!1;if((n||a>0)&&!(a&16)){if(a&8){const d=t.vnode.dynamicProps;for(let f=0;f{l=!0;const[p,v]=bu(f,e,!0);yt(a,p),v&&o.push(...v)};!r&&e.mixins.length&&e.mixins.forEach(d),t.extends&&d(t.extends),t.mixins&&t.mixins.forEach(d)}if(!i&&!l)return rt(t)&&n.set(t,Cn),Cn;if(Ae(i))for(let d=0;dt==="_"||t==="_ctx"||t==="$stable",Fa=t=>Ae(t)?t.map(dr):[dr(t)],Zh=(t,e,r)=>{if(e._n)return e;const n=Th((...s)=>Fa(e(...s)),r);return n._c=!1,n},yu=(t,e,r)=>{const n=t._ctx;for(const s in t){if($a(s))continue;const i=t[s];if(Ne(i))e[s]=Zh(s,i,n);else if(i!=null){const a=Fa(i);e[s]=()=>a}}},wu=(t,e)=>{const r=Fa(e);t.slots.default=()=>r},xu=(t,e,r)=>{for(const n in e)(r||!$a(n))&&(t[n]=e[n])},Qh=(t,e,r)=>{const n=t.slots=mu();if(t.vnode.shapeFlag&32){const s=e._;s?(xu(n,e,r),r&&$c(n,"_",s,!0)):yu(e,n)}else e&&wu(t,e)},ef=(t,e,r)=>{const{vnode:n,slots:s}=t;let i=!0,a=Ve;if(n.shapeFlag&32){const o=e._;o?r&&o===1?i=!1:xu(s,e,r):(i=!e.$stable,yu(e,s)),a=e}else e&&(wu(t,e),a={default:1});if(i)for(const o in s)!$a(o)&&a[o]==null&&delete s[o]},zt=mf;function tf(t){return rf(t)}function rf(t,e){const r=Ls();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:a,createText:o,createComment:l,setText:c,setElementText:d,parentNode:f,nextSibling:p,setScopeId:v=tr,insertStaticContent:b}=t,y=(x,N,L,H=null,B=null,j=null,te=void 0,ne=null,se=!!N.dynamicChildren)=>{if(x===N)return;x&&!Un(x,N)&&(H=lt(x),me(x,B,j,!0),x=null),N.patchFlag===-2&&(se=!1,N.dynamicChildren=null);const{type:W,ref:oe,shapeFlag:le}=N;switch(W){case Ps:w(x,N,L,H);break;case Yr:M(x,N,L,H);break;case Z0:x==null&&S(N,L,H,te);break;case er:Ee(x,N,L,H,B,j,te,ne,se);break;default:le&1?I(x,N,L,H,B,j,te,ne,se):le&6?Ge(x,N,L,H,B,j,te,ne,se):(le&64||le&128)&&W.process(x,N,L,H,B,j,te,ne,se,Z)}oe!=null&&B?r0(oe,x&&x.ref,j,N||x,!N):oe==null&&x&&x.ref!=null&&r0(x.ref,null,j,x,!0)},w=(x,N,L,H)=>{if(x==null)n(N.el=o(N.children),L,H);else{const B=N.el=x.el;N.children!==x.children&&c(B,N.children)}},M=(x,N,L,H)=>{x==null?n(N.el=l(N.children||""),L,H):N.el=x.el},S=(x,N,L,H)=>{[x.el,x.anchor]=b(x.children,N,L,H,x.el,x.anchor)},E=({el:x,anchor:N},L,H)=>{let B;for(;x&&x!==N;)B=p(x),n(x,L,H),x=B;n(N,L,H)},D=({el:x,anchor:N})=>{let L;for(;x&&x!==N;)L=p(x),s(x),x=L;s(N)},I=(x,N,L,H,B,j,te,ne,se)=>{N.type==="svg"?te="svg":N.type==="math"&&(te="mathml"),x==null?O(N,L,H,B,j,te,ne,se):G(x,N,B,j,te,ne,se)},O=(x,N,L,H,B,j,te,ne)=>{let se,W;const{props:oe,shapeFlag:le,transition:de,dirs:Se}=x;if(se=x.el=a(x.type,j,oe&&oe.is,oe),le&8?d(se,x.children):le&16&&K(x.children,se,null,H,B,hi(x,j),te,ne),Se&&sn(x,null,H,"created"),$(se,x,x.scopeId,te,H),oe){for(const k in oe)k!=="value"&&!Qn(k)&&i(se,k,null,oe[k],j,H);"value"in oe&&i(se,"value",null,oe.value,j),(W=oe.onVnodeBeforeMount)&&ar(W,H,x)}Se&&sn(x,null,H,"beforeMount");const Re=nf(B,de);Re&&de.beforeEnter(se),n(se,N,L),((W=oe&&oe.onVnodeMounted)||Re||Se)&&zt(()=>{W&&ar(W,H,x),Re&&de.enter(se),Se&&sn(x,null,H,"mounted")},B)},$=(x,N,L,H,B)=>{if(L&&v(x,L),H)for(let j=0;j{for(let W=se;W{const ne=N.el=x.el;let{patchFlag:se,dynamicChildren:W,dirs:oe}=N;se|=x.patchFlag&16;const le=x.props||Ve,de=N.props||Ve;let Se;if(L&&an(L,!1),(Se=de.onVnodeBeforeUpdate)&&ar(Se,L,N,x),oe&&sn(N,x,L,"beforeUpdate"),L&&an(L,!0),(le.innerHTML&&de.innerHTML==null||le.textContent&&de.textContent==null)&&d(ne,""),W?pe(x.dynamicChildren,W,ne,L,H,hi(N,B),j):te||ve(x,N,ne,null,L,H,hi(N,B),j,!1),se>0){if(se&16)ye(ne,le,de,L,B);else if(se&2&&le.class!==de.class&&i(ne,"class",null,de.class,B),se&4&&i(ne,"style",le.style,de.style,B),se&8){const Re=N.dynamicProps;for(let k=0;k{Se&&ar(Se,L,N,x),oe&&sn(N,x,L,"updated")},H)},pe=(x,N,L,H,B,j,te)=>{for(let ne=0;ne{if(N!==L){if(N!==Ve)for(const j in N)!Qn(j)&&!(j in L)&&i(x,j,N[j],null,B,H);for(const j in L){if(Qn(j))continue;const te=L[j],ne=N[j];te!==ne&&j!=="value"&&i(x,j,ne,te,B,H)}"value"in L&&i(x,"value",N.value,L.value,B)}},Ee=(x,N,L,H,B,j,te,ne,se)=>{const W=N.el=x?x.el:o(""),oe=N.anchor=x?x.anchor:o("");let{patchFlag:le,dynamicChildren:de,slotScopeIds:Se}=N;Se&&(ne=ne?ne.concat(Se):Se),x==null?(n(W,L,H),n(oe,L,H),K(N.children||[],L,oe,B,j,te,ne,se)):le>0&&le&64&&de&&x.dynamicChildren?(pe(x.dynamicChildren,de,L,B,j,te,ne),(N.key!=null||B&&N===B.subTree)&&ku(x,N,!0)):ve(x,N,L,oe,B,j,te,ne,se)},Ge=(x,N,L,H,B,j,te,ne,se)=>{N.slotScopeIds=ne,x==null?N.shapeFlag&512?B.ctx.activate(N,L,H,te,se):qe(N,L,H,B,j,te,se):st(x,N,se)},qe=(x,N,L,H,B,j,te)=>{const ne=x.component=Sf(x,H,B);if(cu(x)&&(ne.ctx.renderer=Z),Ef(ne,!1,te),ne.asyncDep){if(B&&B.registerDep(ne,_e,te),!x.el){const se=ne.subTree=Ht(Yr);M(null,se,N,L),x.placeholder=se.el}}else _e(ne,x,N,L,B,j,te)},st=(x,N,L)=>{const H=N.component=x.component;if(ff(x,N,L))if(H.asyncDep&&!H.asyncResolved){Ce(H,N,L);return}else H.next=N,H.update();else N.el=x.el,H.vnode=N},_e=(x,N,L,H,B,j,te)=>{const ne=()=>{if(x.isMounted){let{next:le,bu:de,u:Se,parent:Re,vnode:k}=x;{const Y=Su(x);if(Y){le&&(le.el=k.el,Ce(x,le,te)),Y.asyncDep.then(()=>{x.isUnmounted||ne()});return}}let A=le,_;an(x,!1),le?(le.el=k.el,Ce(x,le,te)):le=k,de&&Y0(de),(_=le.props&&le.props.onVnodeBeforeUpdate)&&ar(_,Re,le,k),an(x,!0);const q=fi(x),Q=x.subTree;x.subTree=q,y(Q,q,f(Q.el),lt(Q),x,B,j),le.el=q.el,A===null&&pf(x,q.el),Se&&zt(Se,B),(_=le.props&&le.props.onVnodeUpdated)&&zt(()=>ar(_,Re,le,k),B)}else{let le;const{el:de,props:Se}=N,{bm:Re,m:k,parent:A,root:_,type:q}=x,Q=n0(N);if(an(x,!1),Re&&Y0(Re),!Q&&(le=Se&&Se.onVnodeBeforeMount)&&ar(le,A,N),an(x,!0),de&&we){const Y=()=>{x.subTree=fi(x),we(de,x.subTree,x,B,null)};Q&&q.__asyncHydrate?q.__asyncHydrate(de,x,Y):Y()}else{_.ce&&_.ce._def.shadowRoot!==!1&&_.ce._injectChildStyle(q);const Y=x.subTree=fi(x);y(null,Y,L,H,x,B,j),N.el=Y.el}if(k&&zt(k,B),!Q&&(le=Se&&Se.onVnodeMounted)){const Y=N;zt(()=>ar(le,A,Y),B)}(N.shapeFlag&256||A&&n0(A.vnode)&&A.vnode.shapeFlag&256)&&x.a&&zt(x.a,B),x.isMounted=!0,N=L=H=null}};x.scope.on();const se=x.effect=new Hc(ne);x.scope.off();const W=x.update=se.run.bind(se),oe=x.job=se.runIfDirty.bind(se);oe.i=x,oe.id=x.uid,se.scheduler=()=>Ia(oe),an(x,!0),W()},Ce=(x,N,L)=>{N.component=x;const H=x.vnode.props;x.vnode=N,x.next=null,Xh(x,N.props,H,L),ef(x,N.children,L),Rr(),Bo(x),Ir()},ve=(x,N,L,H,B,j,te,ne,se=!1)=>{const W=x&&x.children,oe=x?x.shapeFlag:0,le=N.children,{patchFlag:de,shapeFlag:Se}=N;if(de>0){if(de&128){Ze(W,le,L,H,B,j,te,ne,se);return}else if(de&256){Ke(W,le,L,H,B,j,te,ne,se);return}}Se&8?(oe&16&&pt(W,B,j),le!==W&&d(L,le)):oe&16?Se&16?Ze(W,le,L,H,B,j,te,ne,se):pt(W,B,j,!0):(oe&8&&d(L,""),Se&16&&K(le,L,H,B,j,te,ne,se))},Ke=(x,N,L,H,B,j,te,ne,se)=>{x=x||Cn,N=N||Cn;const W=x.length,oe=N.length,le=Math.min(W,oe);let de;for(de=0;deoe?pt(x,B,j,!0,!1,le):K(N,L,H,B,j,te,ne,se,le)},Ze=(x,N,L,H,B,j,te,ne,se)=>{let W=0;const oe=N.length;let le=x.length-1,de=oe-1;for(;W<=le&&W<=de;){const Se=x[W],Re=N[W]=se?jr(N[W]):dr(N[W]);if(Un(Se,Re))y(Se,Re,L,null,B,j,te,ne,se);else break;W++}for(;W<=le&&W<=de;){const Se=x[le],Re=N[de]=se?jr(N[de]):dr(N[de]);if(Un(Se,Re))y(Se,Re,L,null,B,j,te,ne,se);else break;le--,de--}if(W>le){if(W<=de){const Se=de+1,Re=Sede)for(;W<=le;)me(x[W],B,j,!0),W++;else{const Se=W,Re=W,k=new Map;for(W=Re;W<=de;W++){const fe=N[W]=se?jr(N[W]):dr(N[W]);fe.key!=null&&k.set(fe.key,W)}let A,_=0;const q=de-Re+1;let Q=!1,Y=0;const F=new Array(q);for(W=0;W=q){me(fe,B,j,!0);continue}let ge;if(fe.key!=null)ge=k.get(fe.key);else for(A=Re;A<=de;A++)if(F[A-Re]===0&&Un(fe,N[A])){ge=A;break}ge===void 0?me(fe,B,j,!0):(F[ge-Re]=W+1,ge>=Y?Y=ge:Q=!0,y(fe,N[ge],L,null,B,j,te,ne,se),_++)}const he=Q?sf(F):Cn;for(A=he.length-1,W=q-1;W>=0;W--){const fe=Re+W,ge=N[fe],Ie=N[fe+1],$e=fe+1{const{el:j,type:te,transition:ne,children:se,shapeFlag:W}=x;if(W&6){Ye(x.component.subTree,N,L,H);return}if(W&128){x.suspense.move(N,L,H);return}if(W&64){te.move(x,N,L,Z);return}if(te===er){n(j,N,L);for(let le=0;lene.enter(j),B);else{const{leave:le,delayLeave:de,afterLeave:Se}=ne,Re=()=>{x.ctx.isUnmounted?s(j):n(j,N,L)},k=()=>{j._isLeaving&&j[Ch](!0),le(j,()=>{Re(),Se&&Se()})};de?de(j,Re,k):k()}else n(j,N,L)},me=(x,N,L,H=!1,B=!1)=>{const{type:j,props:te,ref:ne,children:se,dynamicChildren:W,shapeFlag:oe,patchFlag:le,dirs:de,cacheIndex:Se}=x;if(le===-2&&(B=!1),ne!=null&&(Rr(),r0(ne,null,L,x,!0),Ir()),Se!=null&&(N.renderCache[Se]=void 0),oe&256){N.ctx.deactivate(x);return}const Re=oe&1&&de,k=!n0(x);let A;if(k&&(A=te&&te.onVnodeBeforeUnmount)&&ar(A,N,x),oe&6)ft(x.component,L,H);else{if(oe&128){x.suspense.unmount(L,H);return}Re&&sn(x,null,N,"beforeUnmount"),oe&64?x.type.remove(x,N,L,Z,H):W&&!W.hasOnce&&(j!==er||le>0&&le&64)?pt(W,N,L,!1,!0):(j===er&&le&384||!B&&oe&16)&&pt(se,N,L),H&&St(x)}(k&&(A=te&&te.onVnodeUnmounted)||Re)&&zt(()=>{A&&ar(A,N,x),Re&&sn(x,null,N,"unmounted")},L)},St=x=>{const{type:N,el:L,anchor:H,transition:B}=x;if(N===er){ot(L,H);return}if(N===Z0){D(x);return}const j=()=>{s(L),B&&!B.persisted&&B.afterLeave&&B.afterLeave()};if(x.shapeFlag&1&&B&&!B.persisted){const{leave:te,delayLeave:ne}=B,se=()=>te(L,j);ne?ne(x.el,j,se):se()}else j()},ot=(x,N)=>{let L;for(;x!==N;)L=p(x),s(x),x=L;s(N)},ft=(x,N,L)=>{const{bum:H,scope:B,job:j,subTree:te,um:ne,m:se,a:W}=x;Vo(se),Vo(W),H&&Y0(H),B.stop(),j&&(j.flags|=8,me(te,x,N,L)),ne&&zt(ne,N),zt(()=>{x.isUnmounted=!0},N)},pt=(x,N,L,H=!1,B=!1,j=0)=>{for(let te=j;te{if(x.shapeFlag&6)return lt(x.component.subTree);if(x.shapeFlag&128)return x.suspense.next();const N=p(x.anchor||x.el),L=N&&N[Eh];return L?p(L):N};let U=!1;const V=(x,N,L)=>{x==null?N._vnode&&me(N._vnode,null,null,!0):y(N._vnode||null,x,N,null,null,null,L),N._vnode=x,U||(U=!0,Bo(),iu(),U=!1)},Z={p:y,um:me,m:Ye,r:St,mt:qe,mc:K,pc:ve,pbc:pe,n:lt,o:t};let ie,we;return e&&([ie,we]=e(Z)),{render:V,hydrate:ie,createApp:Gh(V,ie)}}function hi({type:t,props:e},r){return r==="svg"&&t==="foreignObject"||r==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:r}function an({effect:t,job:e},r){r?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function nf(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function ku(t,e,r=!1){const n=t.children,s=e.children;if(Ae(n)&&Ae(s))for(let i=0;i>1,t[r[o]]0&&(e[n]=r[i-1]),r[i]=n)}}for(i=r.length,a=r[i-1];i-- >0;)r[i]=a,a=e[a];return r}function Su(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Su(e)}function Vo(t){if(t)for(let e=0;eJ0(af);function i0(t,e,r){return Tu(t,e,r)}function Tu(t,e,r=Ve){const{immediate:n,deep:s,flush:i,once:a}=r,o=yt({},r),l=e&&n||!e&&i!=="post";let c;if(f0){if(i==="sync"){const v=of();c=v.__watcherHandles||(v.__watcherHandles=[])}else if(!l){const v=()=>{};return v.stop=tr,v.resume=tr,v.pause=tr,v}}const d=Ct;o.call=(v,b,y)=>mr(v,d,b,y);let f=!1;i==="post"?o.scheduler=v=>{zt(v,d&&d.suspense)}:i!=="sync"&&(f=!0,o.scheduler=(v,b)=>{b?v():Ia(v)}),o.augmentJob=v=>{e&&(v.flags|=4),f&&(v.flags|=2,d&&(v.id=d.uid,v.i=d))};const p=wh(t,e,o);return f0&&(c?c.push(p):l&&p()),p}function lf(t,e,r){const n=this.proxy,s=ct(t)?t.includes(".")?Eu(n,t):()=>n[t]:t.bind(n,n);let i;Ne(e)?i=e:(i=e.handler,r=e);const a=y0(this),o=Tu(s,i.bind(n),r);return a(),o}function Eu(t,e){const r=e.split(".");return()=>{let n=t;for(let s=0;se==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Gr(e)}Modifiers`]||t[`${en(e)}Modifiers`];function uf(t,e,...r){if(t.isUnmounted)return;const n=t.vnode.props||Ve;let s=r;const i=e.startsWith("update:"),a=i&&cf(n,e.slice(7));a&&(a.trim&&(s=r.map(d=>ct(d)?d.trim():d)),a.number&&(s=r.map(Bi)));let o,l=n[o=ai(e)]||n[o=ai(Gr(e))];!l&&i&&(l=n[o=ai(en(e))]),l&&mr(l,t,6,s);const c=n[o+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[o])return;t.emitted[o]=!0,mr(c,t,6,s)}}function Au(t,e,r=!1){const n=e.emitsCache,s=n.get(t);if(s!==void 0)return s;const i=t.emits;let a={},o=!1;if(!Ne(t)){const l=c=>{const d=Au(c,e,!0);d&&(o=!0,yt(a,d))};!r&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!i&&!o?(rt(t)&&n.set(t,null),null):(Ae(i)?i.forEach(l=>a[l]=null):yt(a,i),rt(t)&&n.set(t,a),a)}function Bs(t,e){return!t||!Is(e)?!1:(e=e.slice(2).replace(/Once$/,""),Be(t,e[0].toLowerCase()+e.slice(1))||Be(t,en(e))||Be(t,e))}function fi(t){const{type:e,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:a,attrs:o,emit:l,render:c,renderCache:d,props:f,data:p,setupState:v,ctx:b,inheritAttrs:y}=t,w=ds(t);let M,S;try{if(r.shapeFlag&4){const D=s||n,I=D;M=dr(c.call(I,D,d,f,v,p,b)),S=o}else{const D=e;M=dr(D.length>1?D(f,{attrs:o,slots:a,emit:l}):D(f,null)),S=e.props?o:df(o)}}catch(D){a0.length=0,$s(D,t,1),M=Ht(Yr)}let E=M;if(S&&y!==!1){const D=Object.keys(S),{shapeFlag:I}=E;D.length&&I&7&&(i&&D.some(xa)&&(S=hf(S,i)),E=zn(E,S,!1,!0))}return r.dirs&&(E=zn(E,null,!1,!0),E.dirs=E.dirs?E.dirs.concat(r.dirs):r.dirs),r.transition&&_a(E,r.transition),M=E,ds(w),M}const df=t=>{let e;for(const r in t)(r==="class"||r==="style"||Is(r))&&((e||(e={}))[r]=t[r]);return e},hf=(t,e)=>{const r={};for(const n in t)(!xa(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function ff(t,e,r){const{props:n,children:s,component:i}=t,{props:a,children:o,patchFlag:l}=e,c=i.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?Wo(n,a,c):!!a;if(l&8){const d=e.dynamicProps;for(let f=0;ft.__isSuspense;function mf(t,e){e&&e.pendingBranch?Ae(t)?e.effects.push(...t):e.effects.push(t):Sh(t)}const er=Symbol.for("v-fgt"),Ps=Symbol.for("v-txt"),Yr=Symbol.for("v-cmt"),Z0=Symbol.for("v-stc"),a0=[];let Pt=null;function He(t=!1){a0.push(Pt=t?null:[])}function gf(){a0.pop(),Pt=a0[a0.length-1]||null}let h0=1;function Go(t,e=!1){h0+=t,t<0&&Pt&&e&&(Pt.hasOnce=!0)}function Mu(t){return t.dynamicChildren=h0>0?Pt||Cn:null,gf(),h0>0&&Pt&&Pt.push(t),t}function Ue(t,e,r,n,s,i){return Mu(J(t,e,r,n,s,i,!0))}function vf(t,e,r,n,s){return Mu(Ht(t,e,r,n,s,!0))}function Nu(t){return t?t.__v_isVNode===!0:!1}function Un(t,e){return t.type===e.type&&t.key===e.key}const Du=({key:t})=>t??null,Q0=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?ct(t)||kt(t)||Ne(t)?{i:jt,r:t,k:e,f:!!r}:t:null);function J(t,e=null,r=null,n=0,s=null,i=t===er?0:1,a=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Du(e),ref:e&&Q0(e),scopeId:ou,slotScopeIds:null,children:r,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:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:jt};return o?(Ba(l,r),i&128&&t.normalize(l)):r&&(l.shapeFlag|=ct(r)?8:16),h0>0&&!a&&Pt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Pt.push(l),l}const Ht=bf;function bf(t,e=null,r=null,n=0,s=null,i=!1){if((!t||t===Bh)&&(t=Yr),Nu(t)){const o=zn(t,e,!0);return r&&Ba(o,r),h0>0&&!i&&Pt&&(o.shapeFlag&6?Pt[Pt.indexOf(t)]=o:Pt.push(o)),o.patchFlag=-2,o}if(Nf(t)&&(t=t.__vccOpts),e){e=yf(e);let{class:o,style:l}=e;o&&!ct(o)&&(e.class=Ln(o)),rt(l)&&(Ra(l)&&!Ae(l)&&(l=yt({},l)),e.style=On(l))}const a=ct(t)?1:Cu(t)?128:Ah(t)?64:rt(t)?4:Ne(t)?2:0;return J(t,e,r,n,s,a,i,!0)}function yf(t){return t?Ra(t)||gu(t)?yt({},t):t:null}function zn(t,e,r=!1,n=!1){const{props:s,ref:i,patchFlag:a,children:o,transition:l}=t,c=e?wf(s||{},e):s,d={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&Du(c),ref:e&&e.ref?r&&i?Ae(i)?i.concat(Q0(e)):[i,Q0(e)]:Q0(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==er?a===-1?16:a|16:a,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&zn(t.ssContent),ssFallback:t.ssFallback&&zn(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&n&&_a(d,l.clone(d)),d}function Ru(t=" ",e=0){return Ht(Ps,null,t,e)}function Ko(t,e){const r=Ht(Z0,null,t);return r.staticCount=e,r}function Sr(t="",e=!1){return e?(He(),vf(Yr,null,t)):Ht(Yr,null,t)}function dr(t){return t==null||typeof t=="boolean"?Ht(Yr):Ae(t)?Ht(er,null,t.slice()):Nu(t)?jr(t):Ht(Ps,null,String(t))}function jr(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:zn(t)}function Ba(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(Ae(e))r=16;else if(typeof e=="object")if(n&65){const s=e.default;s&&(s._c&&(s._d=!1),Ba(t,s()),s._c&&(s._d=!0));return}else{r=32;const s=e._;!s&&!gu(e)?e._ctx=jt:s===3&&jt&&(jt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ne(e)?(e={default:e,_ctx:jt},r=32):(e=String(e),n&64?(r=16,e=[Ru(e)]):r=8);t.children=e,t.shapeFlag|=r}function wf(...t){const e={};for(let r=0;rCt||jt;let ps,Ki;{const t=Ls(),e=(r,n)=>{let s;return(s=t[r])||(s=t[r]=[]),s.push(n),i=>{s.length>1?s.forEach(a=>a(i)):s[0](i)}};ps=e("__VUE_INSTANCE_SETTERS__",r=>Ct=r),Ki=e("__VUE_SSR_SETTERS__",r=>f0=r)}const y0=t=>{const e=Ct;return ps(t),t.scope.on(),()=>{t.scope.off(),ps(e)}},Yo=()=>{Ct&&Ct.scope.off(),ps(null)};function Iu(t){return t.vnode.shapeFlag&4}let f0=!1;function Ef(t,e=!1,r=!1){e&&Ki(e);const{props:n,children:s}=t.vnode,i=Iu(t);Yh(t,n,i,e),Qh(t,s,r||e);const a=i?Af(t,e):void 0;return e&&Ki(!1),a}function Af(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Ph);const{setup:n}=r;if(n){Rr();const s=t.setupContext=n.length>1?Mf(t):null,i=y0(t),a=b0(n,t,0,[t.props,s]),o=_c(a);if(Ir(),i(),(o||t.sp)&&!n0(t)&&lu(t),o){if(a.then(Yo,Yo),e)return a.then(l=>{Xo(t,l,e)}).catch(l=>{$s(l,t,0)});t.asyncDep=a}else Xo(t,a,e)}else _u(t,e)}function Xo(t,e,r){Ne(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:rt(e)&&(t.setupState=ru(e)),_u(t,r)}let Jo;function _u(t,e,r){const n=t.type;if(!t.render){if(!e&&Jo&&!n.render){const s=n.template||za(t).template;if(s){const{isCustomElement:i,compilerOptions:a}=t.appContext.config,{delimiters:o,compilerOptions:l}=n,c=yt(yt({isCustomElement:i,delimiters:o},a),l);n.render=Jo(s,c)}}t.render=n.render||tr}{const s=y0(t);Rr();try{Hh(t)}finally{Ir(),s()}}}const Cf={get(t,e){return wt(t,"get",""),t[e]}};function Mf(t){const e=r=>{t.exposed=r||{}};return{attrs:new Proxy(t.attrs,Cf),slots:t.slots,emit:t.emit,expose:e}}function Hs(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(ru(hh(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in s0)return s0[r](t)},has(e,r){return r in e||r in s0}})):t.proxy}function Nf(t){return Ne(t)&&"__vccOpts"in t}const Ou=(t,e)=>bh(t,e,f0),Df="3.5.20";/** +**/function b0(t,e,r,n){try{return n?t(...n):t()}catch(s){$s(s,e,r)}}function mr(t,e,r,n){if(Ne(t)){const s=b0(t,e,r,n);return s&&_c(s)&&s.catch(i=>{$s(i,e,r)}),s}if(Ae(t)){const s=[];for(let i=0;i>>1,s=At[n],i=d0(s);i=d0(r)?At.push(t):At.splice(kh(e),0,t),t.flags|=1,su()}}function su(){us||(us=nu.then(au))}function Sh(t){Ae(t)?Dn.push(...t):qr&&t.id===-1?qr.splice(Tn+1,0,t):t.flags&1||(Dn.push(t),t.flags|=1),su()}function Bo(t,e,r=cr+1){for(;rd0(r)-d0(n));if(Dn.length=0,qr){qr.push(...e);return}for(qr=e,Tn=0;Tnt.id==null?t.flags&2?-1:1/0:t.id;function au(t){const e=tr;try{for(cr=0;cr{n._d&&Go(-1);const i=ds(e);let a;try{a=t(...s)}finally{ds(i),n._d&&Go(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function hs(t,e){if(Ut===null)return t;const r=Hs(Ut),n=t.dirs||(t.dirs=[]);for(let s=0;st.__isTeleport,Ch=Symbol("_leaveCb");function _a(t,e){t.shapeFlag&6&&t.component?(t.transition=e,_a(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 lu(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function r0(t,e,r,n,s=!1){if(Ae(t)){t.forEach((b,y)=>r0(b,e&&(Ae(e)?e[y]:e),r,n,s));return}if(n0(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&r0(t,e,r,n.component.subTree);return}const i=n.shapeFlag&4?Hs(n.component):n.el,a=s?null:i,{i:o,r:l}=t,c=e&&e.r,d=o.refs===Ve?o.refs={}:o.refs,f=o.setupState,p=Fe(f),g=f===Ve?Rc:b=>Be(p,b);if(c!=null&&c!==l){if(ct(c))d[c]=null,g(c)&&(f[c]=null);else if(kt(c)){c.value=null;const b=e;b.k&&(d[b.k]=null)}}if(Ne(l))b0(l,o,12,[a,d]);else{const b=ct(l),y=kt(l);if(b||y){const w=()=>{if(t.f){const M=b?g(l)?f[l]:d[l]:l.value;if(s)Ae(M)&&ka(M,i);else if(Ae(M))M.includes(i)||M.push(i);else if(b)d[l]=[i],g(l)&&(f[l]=d[l]);else{const S=[i];l.value=S,t.k&&(d[t.k]=S)}}else b?(d[l]=a,g(l)&&(f[l]=a)):y&&(l.value=a,t.k&&(d[t.k]=a))};a?(w.id=-1,$t(w,r)):w()}}}Ls().requestIdleCallback;Ls().cancelIdleCallback;const n0=t=>!!t.type.__asyncLoader,cu=t=>t.type.__isKeepAlive;function Mh(t,e){uu(t,"a",e)}function Nh(t,e){uu(t,"da",e)}function uu(t,e,r=Ct){const n=t.__wdc||(t.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Fs(e,n,r),r){let s=r.parent;for(;s&&s.parent;)cu(s.parent.vnode)&&Dh(n,e,r,s),s=s.parent}}function Dh(t,e,r,n){const s=Fs(e,t,n,!0);La(()=>{ka(n[e],s)},r)}function Fs(t,e,r=Ct,n=!1){if(r){const s=r[t]||(r[t]=[]),i=e.__weh||(e.__weh=(...a)=>{Rr();const o=y0(r),l=mr(e,r,t,a);return o(),Ir(),l});return n?s.unshift(i):s.push(i),i}}const zr=t=>(e,r=Ct)=>{(!f0||t==="sp")&&Fs(t,(...n)=>e(...n),r)},Rh=zr("bm"),Oa=zr("m"),Ih=zr("bu"),_h=zr("u"),Oh=zr("bum"),La=zr("um"),Lh=zr("sp"),zh=zr("rtg"),$h=zr("rtc");function Fh(t,e=Ct){Fs("ec",t,e)}const Bh=Symbol.for("v-ndc");function du(t,e,r,n){let s;const i=r&&r[n],a=Ae(t);if(a||ct(t)){const o=a&&Nn(t);let l=!1,c=!1;o&&(l=!Wt(t),c=Kr(t),t=zs(t)),s=new Array(t.length);for(let d=0,f=t.length;de(o,l,void 0,i&&i[l]));else{const o=Object.keys(t);s=new Array(o.length);for(let l=0,c=o.length;lt?Iu(t)?Hs(t):Ui(t.parent):null,s0=yt(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=>Ui(t.parent),$root:t=>Ui(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>za(t),$forceUpdate:t=>t.f||(t.f=()=>{Ia(t.update)}),$nextTick:t=>t.n||(t.n=X0.bind(t.proxy)),$watch:t=>lf.bind(t)}),di=(t,e)=>t!==Ve&&!t.__isScriptSetup&&Be(t,e),Ph={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:i,accessCache:a,type:o,appContext:l}=t;let c;if(e[0]!=="$"){const g=a[e];if(g!==void 0)switch(g){case 1:return n[e];case 2:return s[e];case 4:return r[e];case 3:return i[e]}else{if(di(n,e))return a[e]=1,n[e];if(s!==Ve&&Be(s,e))return a[e]=2,s[e];if((c=t.propsOptions[0])&&Be(c,e))return a[e]=3,i[e];if(r!==Ve&&Be(r,e))return a[e]=4,r[e];Vi&&(a[e]=0)}}const d=s0[e];let f,p;if(d)return e==="$attrs"&&wt(t.attrs,"get",""),d(t);if((f=o.__cssModules)&&(f=f[e]))return f;if(r!==Ve&&Be(r,e))return a[e]=4,r[e];if(p=l.config.globalProperties,Be(p,e))return p[e]},set({_:t},e,r){const{data:n,setupState:s,ctx:i}=t;return di(s,e)?(s[e]=r,!0):n!==Ve&&Be(n,e)?(n[e]=r,!0):Be(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(i[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:s,propsOptions:i,type:a}},o){let l,c;return!!(r[o]||t!==Ve&&o[0]!=="$"&&Be(t,o)||di(e,o)||(l=i[0])&&Be(l,o)||Be(n,o)||Be(s0,o)||Be(s.config.globalProperties,o)||(c=a.__cssModules)&&c[o])},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:Be(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function Po(t){return Ae(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}let Vi=!0;function Hh(t){const e=za(t),r=t.proxy,n=t.ctx;Vi=!1,e.beforeCreate&&Ho(e.beforeCreate,t,"bc");const{data:s,computed:i,methods:a,watch:o,provide:l,inject:c,created:d,beforeMount:f,mounted:p,beforeUpdate:g,updated:b,activated:y,deactivated:w,beforeDestroy:M,beforeUnmount:S,destroyed:E,unmounted:D,render:I,renderTracked:O,renderTriggered:$,errorCaptured:K,serverPrefetch:G,expose:pe,inheritAttrs:ye,components:Ee,directives:Ge,filters:qe}=e;if(c&&qh(c,n,null),a)for(const Ce in a){const ve=a[Ce];Ne(ve)&&(n[Ce]=ve.bind(r))}if(s){const Ce=s.call(r,r);rt(Ce)&&(t.data=Na(Ce))}if(Vi=!0,i)for(const Ce in i){const ve=i[Ce],Ke=Ne(ve)?ve.bind(r,r):Ne(ve.get)?ve.get.bind(r,r):tr,Ze=!Ne(ve)&&Ne(ve.set)?ve.set.bind(r):tr,Ye=Ou({get:Ke,set:Ze});Object.defineProperty(n,Ce,{enumerable:!0,configurable:!0,get:()=>Ye.value,set:me=>Ye.value=me})}if(o)for(const Ce in o)hu(o[Ce],n,r,Ce);if(l){const Ce=Ne(l)?l.call(r):l;Reflect.ownKeys(Ce).forEach(ve=>{Kh(ve,Ce[ve])})}d&&Ho(d,t,"c");function _e(Ce,ve){Ae(ve)?ve.forEach(Ke=>Ce(Ke.bind(r))):ve&&Ce(ve.bind(r))}if(_e(Rh,f),_e(Oa,p),_e(Ih,g),_e(_h,b),_e(Mh,y),_e(Nh,w),_e(Fh,K),_e($h,O),_e(zh,$),_e(Oh,S),_e(La,D),_e(Lh,G),Ae(pe))if(pe.length){const Ce=t.exposed||(t.exposed={});pe.forEach(ve=>{Object.defineProperty(Ce,ve,{get:()=>r[ve],set:Ke=>r[ve]=Ke,enumerable:!0})})}else t.exposed||(t.exposed={});I&&t.render===tr&&(t.render=I),ye!=null&&(t.inheritAttrs=ye),Ee&&(t.components=Ee),Ge&&(t.directives=Ge),G&&lu(t)}function qh(t,e,r=tr){Ae(t)&&(t=Wi(t));for(const n in t){const s=t[n];let i;rt(s)?"default"in s?i=J0(s.from||n,s.default,!0):i=J0(s.from||n):i=J0(s),kt(i)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):e[n]=i}}function Ho(t,e,r){mr(Ae(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function hu(t,e,r,n){let s=n.includes(".")?Eu(r,n):()=>r[n];if(ct(t)){const i=e[t];Ne(i)&&i0(s,i)}else if(Ne(t))i0(s,t.bind(r));else if(rt(t))if(Ae(t))t.forEach(i=>hu(i,e,r,n));else{const i=Ne(t.handler)?t.handler.bind(r):e[t.handler];Ne(i)&&i0(s,i,t)}}function za(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:s,optionsCache:i,config:{optionMergeStrategies:a}}=t.appContext,o=i.get(e);let l;return o?l=o:!s.length&&!r&&!n?l=e:(l={},s.length&&s.forEach(c=>fs(l,c,a,!0)),fs(l,e,a)),rt(e)&&i.set(e,l),l}function fs(t,e,r,n=!1){const{mixins:s,extends:i}=e;i&&fs(t,i,r,!0),s&&s.forEach(a=>fs(t,a,r,!0));for(const a in e)if(!(n&&a==="expose")){const o=jh[a]||r&&r[a];t[a]=o?o(t[a],e[a]):e[a]}return t}const jh={data:qo,props:jo,emits:jo,methods:Xn,computed:Xn,beforeCreate:Et,created:Et,beforeMount:Et,mounted:Et,beforeUpdate:Et,updated:Et,beforeDestroy:Et,beforeUnmount:Et,destroyed:Et,unmounted:Et,activated:Et,deactivated:Et,errorCaptured:Et,serverPrefetch:Et,components:Xn,directives:Xn,watch:Vh,provide:qo,inject:Uh};function qo(t,e){return e?t?function(){return yt(Ne(t)?t.call(this,this):t,Ne(e)?e.call(this,this):e)}:e:t}function Uh(t,e){return Xn(Wi(t),Wi(e))}function Wi(t){if(Ae(t)){const e={};for(let r=0;r1)return r&&Ne(e)?e.call(n&&n.proxy):e}}const pu={},mu=()=>Object.create(pu),gu=t=>Object.getPrototypeOf(t)===pu;function Yh(t,e,r,n=!1){const s={},i=mu();t.propsDefaults=Object.create(null),vu(t,e,s,i);for(const a in t.propsOptions[0])a in s||(s[a]=void 0);r?t.props=n?s:dh(s):t.type.props?t.props=s:t.props=i,t.attrs=i}function Xh(t,e,r,n){const{props:s,attrs:i,vnode:{patchFlag:a}}=t,o=Fe(s),[l]=t.propsOptions;let c=!1;if((n||a>0)&&!(a&16)){if(a&8){const d=t.vnode.dynamicProps;for(let f=0;f{l=!0;const[p,g]=bu(f,e,!0);yt(a,p),g&&o.push(...g)};!r&&e.mixins.length&&e.mixins.forEach(d),t.extends&&d(t.extends),t.mixins&&t.mixins.forEach(d)}if(!i&&!l)return rt(t)&&n.set(t,Cn),Cn;if(Ae(i))for(let d=0;dt==="_"||t==="_ctx"||t==="$stable",Fa=t=>Ae(t)?t.map(dr):[dr(t)],Zh=(t,e,r)=>{if(e._n)return e;const n=Th((...s)=>Fa(e(...s)),r);return n._c=!1,n},yu=(t,e,r)=>{const n=t._ctx;for(const s in t){if($a(s))continue;const i=t[s];if(Ne(i))e[s]=Zh(s,i,n);else if(i!=null){const a=Fa(i);e[s]=()=>a}}},wu=(t,e)=>{const r=Fa(e);t.slots.default=()=>r},xu=(t,e,r)=>{for(const n in e)(r||!$a(n))&&(t[n]=e[n])},Qh=(t,e,r)=>{const n=t.slots=mu();if(t.vnode.shapeFlag&32){const s=e._;s?(xu(n,e,r),r&&$c(n,"_",s,!0)):yu(e,n)}else e&&wu(t,e)},ef=(t,e,r)=>{const{vnode:n,slots:s}=t;let i=!0,a=Ve;if(n.shapeFlag&32){const o=e._;o?r&&o===1?i=!1:xu(s,e,r):(i=!e.$stable,yu(e,s)),a=e}else e&&(wu(t,e),a={default:1});if(i)for(const o in s)!$a(o)&&a[o]==null&&delete s[o]},$t=mf;function tf(t){return rf(t)}function rf(t,e){const r=Ls();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:a,createText:o,createComment:l,setText:c,setElementText:d,parentNode:f,nextSibling:p,setScopeId:g=tr,insertStaticContent:b}=t,y=(x,N,L,H=null,B=null,j=null,te=void 0,ne=null,se=!!N.dynamicChildren)=>{if(x===N)return;x&&!Un(x,N)&&(H=lt(x),me(x,B,j,!0),x=null),N.patchFlag===-2&&(se=!1,N.dynamicChildren=null);const{type:W,ref:oe,shapeFlag:le}=N;switch(W){case Ps:w(x,N,L,H);break;case Yr:M(x,N,L,H);break;case Z0:x==null&&S(N,L,H,te);break;case er:Ee(x,N,L,H,B,j,te,ne,se);break;default:le&1?I(x,N,L,H,B,j,te,ne,se):le&6?Ge(x,N,L,H,B,j,te,ne,se):(le&64||le&128)&&W.process(x,N,L,H,B,j,te,ne,se,Z)}oe!=null&&B?r0(oe,x&&x.ref,j,N||x,!N):oe==null&&x&&x.ref!=null&&r0(x.ref,null,j,x,!0)},w=(x,N,L,H)=>{if(x==null)n(N.el=o(N.children),L,H);else{const B=N.el=x.el;N.children!==x.children&&c(B,N.children)}},M=(x,N,L,H)=>{x==null?n(N.el=l(N.children||""),L,H):N.el=x.el},S=(x,N,L,H)=>{[x.el,x.anchor]=b(x.children,N,L,H,x.el,x.anchor)},E=({el:x,anchor:N},L,H)=>{let B;for(;x&&x!==N;)B=p(x),n(x,L,H),x=B;n(N,L,H)},D=({el:x,anchor:N})=>{let L;for(;x&&x!==N;)L=p(x),s(x),x=L;s(N)},I=(x,N,L,H,B,j,te,ne,se)=>{N.type==="svg"?te="svg":N.type==="math"&&(te="mathml"),x==null?O(N,L,H,B,j,te,ne,se):G(x,N,B,j,te,ne,se)},O=(x,N,L,H,B,j,te,ne)=>{let se,W;const{props:oe,shapeFlag:le,transition:de,dirs:Se}=x;if(se=x.el=a(x.type,j,oe&&oe.is,oe),le&8?d(se,x.children):le&16&&K(x.children,se,null,H,B,hi(x,j),te,ne),Se&&sn(x,null,H,"created"),$(se,x,x.scopeId,te,H),oe){for(const k in oe)k!=="value"&&!Qn(k)&&i(se,k,null,oe[k],j,H);"value"in oe&&i(se,"value",null,oe.value,j),(W=oe.onVnodeBeforeMount)&&ar(W,H,x)}Se&&sn(x,null,H,"beforeMount");const Re=nf(B,de);Re&&de.beforeEnter(se),n(se,N,L),((W=oe&&oe.onVnodeMounted)||Re||Se)&&$t(()=>{W&&ar(W,H,x),Re&&de.enter(se),Se&&sn(x,null,H,"mounted")},B)},$=(x,N,L,H,B)=>{if(L&&g(x,L),H)for(let j=0;j{for(let W=se;W{const ne=N.el=x.el;let{patchFlag:se,dynamicChildren:W,dirs:oe}=N;se|=x.patchFlag&16;const le=x.props||Ve,de=N.props||Ve;let Se;if(L&&an(L,!1),(Se=de.onVnodeBeforeUpdate)&&ar(Se,L,N,x),oe&&sn(N,x,L,"beforeUpdate"),L&&an(L,!0),(le.innerHTML&&de.innerHTML==null||le.textContent&&de.textContent==null)&&d(ne,""),W?pe(x.dynamicChildren,W,ne,L,H,hi(N,B),j):te||ve(x,N,ne,null,L,H,hi(N,B),j,!1),se>0){if(se&16)ye(ne,le,de,L,B);else if(se&2&&le.class!==de.class&&i(ne,"class",null,de.class,B),se&4&&i(ne,"style",le.style,de.style,B),se&8){const Re=N.dynamicProps;for(let k=0;k{Se&&ar(Se,L,N,x),oe&&sn(N,x,L,"updated")},H)},pe=(x,N,L,H,B,j,te)=>{for(let ne=0;ne{if(N!==L){if(N!==Ve)for(const j in N)!Qn(j)&&!(j in L)&&i(x,j,N[j],null,B,H);for(const j in L){if(Qn(j))continue;const te=L[j],ne=N[j];te!==ne&&j!=="value"&&i(x,j,ne,te,B,H)}"value"in L&&i(x,"value",N.value,L.value,B)}},Ee=(x,N,L,H,B,j,te,ne,se)=>{const W=N.el=x?x.el:o(""),oe=N.anchor=x?x.anchor:o("");let{patchFlag:le,dynamicChildren:de,slotScopeIds:Se}=N;Se&&(ne=ne?ne.concat(Se):Se),x==null?(n(W,L,H),n(oe,L,H),K(N.children||[],L,oe,B,j,te,ne,se)):le>0&&le&64&&de&&x.dynamicChildren?(pe(x.dynamicChildren,de,L,B,j,te,ne),(N.key!=null||B&&N===B.subTree)&&ku(x,N,!0)):ve(x,N,L,oe,B,j,te,ne,se)},Ge=(x,N,L,H,B,j,te,ne,se)=>{N.slotScopeIds=ne,x==null?N.shapeFlag&512?B.ctx.activate(N,L,H,te,se):qe(N,L,H,B,j,te,se):st(x,N,se)},qe=(x,N,L,H,B,j,te)=>{const ne=x.component=Sf(x,H,B);if(cu(x)&&(ne.ctx.renderer=Z),Ef(ne,!1,te),ne.asyncDep){if(B&&B.registerDep(ne,_e,te),!x.el){const se=ne.subTree=qt(Yr);M(null,se,N,L),x.placeholder=se.el}}else _e(ne,x,N,L,B,j,te)},st=(x,N,L)=>{const H=N.component=x.component;if(ff(x,N,L))if(H.asyncDep&&!H.asyncResolved){Ce(H,N,L);return}else H.next=N,H.update();else N.el=x.el,H.vnode=N},_e=(x,N,L,H,B,j,te)=>{const ne=()=>{if(x.isMounted){let{next:le,bu:de,u:Se,parent:Re,vnode:k}=x;{const Y=Su(x);if(Y){le&&(le.el=k.el,Ce(x,le,te)),Y.asyncDep.then(()=>{x.isUnmounted||ne()});return}}let A=le,_;an(x,!1),le?(le.el=k.el,Ce(x,le,te)):le=k,de&&Y0(de),(_=le.props&&le.props.onVnodeBeforeUpdate)&&ar(_,Re,le,k),an(x,!0);const q=fi(x),Q=x.subTree;x.subTree=q,y(Q,q,f(Q.el),lt(Q),x,B,j),le.el=q.el,A===null&&pf(x,q.el),Se&&$t(Se,B),(_=le.props&&le.props.onVnodeUpdated)&&$t(()=>ar(_,Re,le,k),B)}else{let le;const{el:de,props:Se}=N,{bm:Re,m:k,parent:A,root:_,type:q}=x,Q=n0(N);if(an(x,!1),Re&&Y0(Re),!Q&&(le=Se&&Se.onVnodeBeforeMount)&&ar(le,A,N),an(x,!0),de&&we){const Y=()=>{x.subTree=fi(x),we(de,x.subTree,x,B,null)};Q&&q.__asyncHydrate?q.__asyncHydrate(de,x,Y):Y()}else{_.ce&&_.ce._def.shadowRoot!==!1&&_.ce._injectChildStyle(q);const Y=x.subTree=fi(x);y(null,Y,L,H,x,B,j),N.el=Y.el}if(k&&$t(k,B),!Q&&(le=Se&&Se.onVnodeMounted)){const Y=N;$t(()=>ar(le,A,Y),B)}(N.shapeFlag&256||A&&n0(A.vnode)&&A.vnode.shapeFlag&256)&&x.a&&$t(x.a,B),x.isMounted=!0,N=L=H=null}};x.scope.on();const se=x.effect=new Hc(ne);x.scope.off();const W=x.update=se.run.bind(se),oe=x.job=se.runIfDirty.bind(se);oe.i=x,oe.id=x.uid,se.scheduler=()=>Ia(oe),an(x,!0),W()},Ce=(x,N,L)=>{N.component=x;const H=x.vnode.props;x.vnode=N,x.next=null,Xh(x,N.props,H,L),ef(x,N.children,L),Rr(),Bo(x),Ir()},ve=(x,N,L,H,B,j,te,ne,se=!1)=>{const W=x&&x.children,oe=x?x.shapeFlag:0,le=N.children,{patchFlag:de,shapeFlag:Se}=N;if(de>0){if(de&128){Ze(W,le,L,H,B,j,te,ne,se);return}else if(de&256){Ke(W,le,L,H,B,j,te,ne,se);return}}Se&8?(oe&16&&mt(W,B,j),le!==W&&d(L,le)):oe&16?Se&16?Ze(W,le,L,H,B,j,te,ne,se):mt(W,B,j,!0):(oe&8&&d(L,""),Se&16&&K(le,L,H,B,j,te,ne,se))},Ke=(x,N,L,H,B,j,te,ne,se)=>{x=x||Cn,N=N||Cn;const W=x.length,oe=N.length,le=Math.min(W,oe);let de;for(de=0;deoe?mt(x,B,j,!0,!1,le):K(N,L,H,B,j,te,ne,se,le)},Ze=(x,N,L,H,B,j,te,ne,se)=>{let W=0;const oe=N.length;let le=x.length-1,de=oe-1;for(;W<=le&&W<=de;){const Se=x[W],Re=N[W]=se?jr(N[W]):dr(N[W]);if(Un(Se,Re))y(Se,Re,L,null,B,j,te,ne,se);else break;W++}for(;W<=le&&W<=de;){const Se=x[le],Re=N[de]=se?jr(N[de]):dr(N[de]);if(Un(Se,Re))y(Se,Re,L,null,B,j,te,ne,se);else break;le--,de--}if(W>le){if(W<=de){const Se=de+1,Re=Sede)for(;W<=le;)me(x[W],B,j,!0),W++;else{const Se=W,Re=W,k=new Map;for(W=Re;W<=de;W++){const fe=N[W]=se?jr(N[W]):dr(N[W]);fe.key!=null&&k.set(fe.key,W)}let A,_=0;const q=de-Re+1;let Q=!1,Y=0;const F=new Array(q);for(W=0;W=q){me(fe,B,j,!0);continue}let ge;if(fe.key!=null)ge=k.get(fe.key);else for(A=Re;A<=de;A++)if(F[A-Re]===0&&Un(fe,N[A])){ge=A;break}ge===void 0?me(fe,B,j,!0):(F[ge-Re]=W+1,ge>=Y?Y=ge:Q=!0,y(fe,N[ge],L,null,B,j,te,ne,se),_++)}const he=Q?sf(F):Cn;for(A=he.length-1,W=q-1;W>=0;W--){const fe=Re+W,ge=N[fe],Ie=N[fe+1],$e=fe+1{const{el:j,type:te,transition:ne,children:se,shapeFlag:W}=x;if(W&6){Ye(x.component.subTree,N,L,H);return}if(W&128){x.suspense.move(N,L,H);return}if(W&64){te.move(x,N,L,Z);return}if(te===er){n(j,N,L);for(let le=0;lene.enter(j),B);else{const{leave:le,delayLeave:de,afterLeave:Se}=ne,Re=()=>{x.ctx.isUnmounted?s(j):n(j,N,L)},k=()=>{j._isLeaving&&j[Ch](!0),le(j,()=>{Re(),Se&&Se()})};de?de(j,Re,k):k()}else n(j,N,L)},me=(x,N,L,H=!1,B=!1)=>{const{type:j,props:te,ref:ne,children:se,dynamicChildren:W,shapeFlag:oe,patchFlag:le,dirs:de,cacheIndex:Se}=x;if(le===-2&&(B=!1),ne!=null&&(Rr(),r0(ne,null,L,x,!0),Ir()),Se!=null&&(N.renderCache[Se]=void 0),oe&256){N.ctx.deactivate(x);return}const Re=oe&1&&de,k=!n0(x);let A;if(k&&(A=te&&te.onVnodeBeforeUnmount)&&ar(A,N,x),oe&6)pt(x.component,L,H);else{if(oe&128){x.suspense.unmount(L,H);return}Re&&sn(x,null,N,"beforeUnmount"),oe&64?x.type.remove(x,N,L,Z,H):W&&!W.hasOnce&&(j!==er||le>0&&le&64)?mt(W,N,L,!1,!0):(j===er&&le&384||!B&&oe&16)&&mt(se,N,L),H&&St(x)}(k&&(A=te&&te.onVnodeUnmounted)||Re)&&$t(()=>{A&&ar(A,N,x),Re&&sn(x,null,N,"unmounted")},L)},St=x=>{const{type:N,el:L,anchor:H,transition:B}=x;if(N===er){ot(L,H);return}if(N===Z0){D(x);return}const j=()=>{s(L),B&&!B.persisted&&B.afterLeave&&B.afterLeave()};if(x.shapeFlag&1&&B&&!B.persisted){const{leave:te,delayLeave:ne}=B,se=()=>te(L,j);ne?ne(x.el,j,se):se()}else j()},ot=(x,N)=>{let L;for(;x!==N;)L=p(x),s(x),x=L;s(N)},pt=(x,N,L)=>{const{bum:H,scope:B,job:j,subTree:te,um:ne,m:se,a:W}=x;Vo(se),Vo(W),H&&Y0(H),B.stop(),j&&(j.flags|=8,me(te,x,N,L)),ne&&$t(ne,N),$t(()=>{x.isUnmounted=!0},N)},mt=(x,N,L,H=!1,B=!1,j=0)=>{for(let te=j;te{if(x.shapeFlag&6)return lt(x.component.subTree);if(x.shapeFlag&128)return x.suspense.next();const N=p(x.anchor||x.el),L=N&&N[Eh];return L?p(L):N};let U=!1;const V=(x,N,L)=>{x==null?N._vnode&&me(N._vnode,null,null,!0):y(N._vnode||null,x,N,null,null,null,L),N._vnode=x,U||(U=!0,Bo(),iu(),U=!1)},Z={p:y,um:me,m:Ye,r:St,mt:qe,mc:K,pc:ve,pbc:pe,n:lt,o:t};let ie,we;return e&&([ie,we]=e(Z)),{render:V,hydrate:ie,createApp:Gh(V,ie)}}function hi({type:t,props:e},r){return r==="svg"&&t==="foreignObject"||r==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:r}function an({effect:t,job:e},r){r?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function nf(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function ku(t,e,r=!1){const n=t.children,s=e.children;if(Ae(n)&&Ae(s))for(let i=0;i>1,t[r[o]]0&&(e[n]=r[i-1]),r[i]=n)}}for(i=r.length,a=r[i-1];i-- >0;)r[i]=a,a=e[a];return r}function Su(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Su(e)}function Vo(t){if(t)for(let e=0;eJ0(af);function i0(t,e,r){return Tu(t,e,r)}function Tu(t,e,r=Ve){const{immediate:n,deep:s,flush:i,once:a}=r,o=yt({},r),l=e&&n||!e&&i!=="post";let c;if(f0){if(i==="sync"){const g=of();c=g.__watcherHandles||(g.__watcherHandles=[])}else if(!l){const g=()=>{};return g.stop=tr,g.resume=tr,g.pause=tr,g}}const d=Ct;o.call=(g,b,y)=>mr(g,d,b,y);let f=!1;i==="post"?o.scheduler=g=>{$t(g,d&&d.suspense)}:i!=="sync"&&(f=!0,o.scheduler=(g,b)=>{b?g():Ia(g)}),o.augmentJob=g=>{e&&(g.flags|=4),f&&(g.flags|=2,d&&(g.id=d.uid,g.i=d))};const p=wh(t,e,o);return f0&&(c?c.push(p):l&&p()),p}function lf(t,e,r){const n=this.proxy,s=ct(t)?t.includes(".")?Eu(n,t):()=>n[t]:t.bind(n,n);let i;Ne(e)?i=e:(i=e.handler,r=e);const a=y0(this),o=Tu(s,i.bind(n),r);return a(),o}function Eu(t,e){const r=e.split(".");return()=>{let n=t;for(let s=0;se==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Gr(e)}Modifiers`]||t[`${en(e)}Modifiers`];function uf(t,e,...r){if(t.isUnmounted)return;const n=t.vnode.props||Ve;let s=r;const i=e.startsWith("update:"),a=i&&cf(n,e.slice(7));a&&(a.trim&&(s=r.map(d=>ct(d)?d.trim():d)),a.number&&(s=r.map(Bi)));let o,l=n[o=ai(e)]||n[o=ai(Gr(e))];!l&&i&&(l=n[o=ai(en(e))]),l&&mr(l,t,6,s);const c=n[o+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[o])return;t.emitted[o]=!0,mr(c,t,6,s)}}function Au(t,e,r=!1){const n=e.emitsCache,s=n.get(t);if(s!==void 0)return s;const i=t.emits;let a={},o=!1;if(!Ne(t)){const l=c=>{const d=Au(c,e,!0);d&&(o=!0,yt(a,d))};!r&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!i&&!o?(rt(t)&&n.set(t,null),null):(Ae(i)?i.forEach(l=>a[l]=null):yt(a,i),rt(t)&&n.set(t,a),a)}function Bs(t,e){return!t||!Is(e)?!1:(e=e.slice(2).replace(/Once$/,""),Be(t,e[0].toLowerCase()+e.slice(1))||Be(t,en(e))||Be(t,e))}function fi(t){const{type:e,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:a,attrs:o,emit:l,render:c,renderCache:d,props:f,data:p,setupState:g,ctx:b,inheritAttrs:y}=t,w=ds(t);let M,S;try{if(r.shapeFlag&4){const D=s||n,I=D;M=dr(c.call(I,D,d,f,g,p,b)),S=o}else{const D=e;M=dr(D.length>1?D(f,{attrs:o,slots:a,emit:l}):D(f,null)),S=e.props?o:df(o)}}catch(D){a0.length=0,$s(D,t,1),M=qt(Yr)}let E=M;if(S&&y!==!1){const D=Object.keys(S),{shapeFlag:I}=E;D.length&&I&7&&(i&&D.some(xa)&&(S=hf(S,i)),E=zn(E,S,!1,!0))}return r.dirs&&(E=zn(E,null,!1,!0),E.dirs=E.dirs?E.dirs.concat(r.dirs):r.dirs),r.transition&&_a(E,r.transition),M=E,ds(w),M}const df=t=>{let e;for(const r in t)(r==="class"||r==="style"||Is(r))&&((e||(e={}))[r]=t[r]);return e},hf=(t,e)=>{const r={};for(const n in t)(!xa(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function ff(t,e,r){const{props:n,children:s,component:i}=t,{props:a,children:o,patchFlag:l}=e,c=i.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?Wo(n,a,c):!!a;if(l&8){const d=e.dynamicProps;for(let f=0;ft.__isSuspense;function mf(t,e){e&&e.pendingBranch?Ae(t)?e.effects.push(...t):e.effects.push(t):Sh(t)}const er=Symbol.for("v-fgt"),Ps=Symbol.for("v-txt"),Yr=Symbol.for("v-cmt"),Z0=Symbol.for("v-stc"),a0=[];let Ht=null;function He(t=!1){a0.push(Ht=t?null:[])}function gf(){a0.pop(),Ht=a0[a0.length-1]||null}let h0=1;function Go(t,e=!1){h0+=t,t<0&&Ht&&e&&(Ht.hasOnce=!0)}function Mu(t){return t.dynamicChildren=h0>0?Ht||Cn:null,gf(),h0>0&&Ht&&Ht.push(t),t}function Ue(t,e,r,n,s,i){return Mu(J(t,e,r,n,s,i,!0))}function vf(t,e,r,n,s){return Mu(qt(t,e,r,n,s,!0))}function Nu(t){return t?t.__v_isVNode===!0:!1}function Un(t,e){return t.type===e.type&&t.key===e.key}const Du=({key:t})=>t??null,Q0=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?ct(t)||kt(t)||Ne(t)?{i:Ut,r:t,k:e,f:!!r}:t:null);function J(t,e=null,r=null,n=0,s=null,i=t===er?0:1,a=!1,o=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Du(e),ref:e&&Q0(e),scopeId:ou,slotScopeIds:null,children:r,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:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ut};return o?(Ba(l,r),i&128&&t.normalize(l)):r&&(l.shapeFlag|=ct(r)?8:16),h0>0&&!a&&Ht&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Ht.push(l),l}const qt=bf;function bf(t,e=null,r=null,n=0,s=null,i=!1){if((!t||t===Bh)&&(t=Yr),Nu(t)){const o=zn(t,e,!0);return r&&Ba(o,r),h0>0&&!i&&Ht&&(o.shapeFlag&6?Ht[Ht.indexOf(t)]=o:Ht.push(o)),o.patchFlag=-2,o}if(Nf(t)&&(t=t.__vccOpts),e){e=yf(e);let{class:o,style:l}=e;o&&!ct(o)&&(e.class=Ln(o)),rt(l)&&(Ra(l)&&!Ae(l)&&(l=yt({},l)),e.style=On(l))}const a=ct(t)?1:Cu(t)?128:Ah(t)?64:rt(t)?4:Ne(t)?2:0;return J(t,e,r,n,s,a,i,!0)}function yf(t){return t?Ra(t)||gu(t)?yt({},t):t:null}function zn(t,e,r=!1,n=!1){const{props:s,ref:i,patchFlag:a,children:o,transition:l}=t,c=e?wf(s||{},e):s,d={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&Du(c),ref:e&&e.ref?r&&i?Ae(i)?i.concat(Q0(e)):[i,Q0(e)]:Q0(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==er?a===-1?16:a|16:a,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&zn(t.ssContent),ssFallback:t.ssFallback&&zn(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&n&&_a(d,l.clone(d)),d}function Ru(t=" ",e=0){return qt(Ps,null,t,e)}function Ko(t,e){const r=qt(Z0,null,t);return r.staticCount=e,r}function Sr(t="",e=!1){return e?(He(),vf(Yr,null,t)):qt(Yr,null,t)}function dr(t){return t==null||typeof t=="boolean"?qt(Yr):Ae(t)?qt(er,null,t.slice()):Nu(t)?jr(t):qt(Ps,null,String(t))}function jr(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:zn(t)}function Ba(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(Ae(e))r=16;else if(typeof e=="object")if(n&65){const s=e.default;s&&(s._c&&(s._d=!1),Ba(t,s()),s._c&&(s._d=!0));return}else{r=32;const s=e._;!s&&!gu(e)?e._ctx=Ut:s===3&&Ut&&(Ut.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ne(e)?(e={default:e,_ctx:Ut},r=32):(e=String(e),n&64?(r=16,e=[Ru(e)]):r=8);t.children=e,t.shapeFlag|=r}function wf(...t){const e={};for(let r=0;rCt||Ut;let ps,Ki;{const t=Ls(),e=(r,n)=>{let s;return(s=t[r])||(s=t[r]=[]),s.push(n),i=>{s.length>1?s.forEach(a=>a(i)):s[0](i)}};ps=e("__VUE_INSTANCE_SETTERS__",r=>Ct=r),Ki=e("__VUE_SSR_SETTERS__",r=>f0=r)}const y0=t=>{const e=Ct;return ps(t),t.scope.on(),()=>{t.scope.off(),ps(e)}},Yo=()=>{Ct&&Ct.scope.off(),ps(null)};function Iu(t){return t.vnode.shapeFlag&4}let f0=!1;function Ef(t,e=!1,r=!1){e&&Ki(e);const{props:n,children:s}=t.vnode,i=Iu(t);Yh(t,n,i,e),Qh(t,s,r||e);const a=i?Af(t,e):void 0;return e&&Ki(!1),a}function Af(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Ph);const{setup:n}=r;if(n){Rr();const s=t.setupContext=n.length>1?Mf(t):null,i=y0(t),a=b0(n,t,0,[t.props,s]),o=_c(a);if(Ir(),i(),(o||t.sp)&&!n0(t)&&lu(t),o){if(a.then(Yo,Yo),e)return a.then(l=>{Xo(t,l,e)}).catch(l=>{$s(l,t,0)});t.asyncDep=a}else Xo(t,a,e)}else _u(t,e)}function Xo(t,e,r){Ne(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:rt(e)&&(t.setupState=ru(e)),_u(t,r)}let Jo;function _u(t,e,r){const n=t.type;if(!t.render){if(!e&&Jo&&!n.render){const s=n.template||za(t).template;if(s){const{isCustomElement:i,compilerOptions:a}=t.appContext.config,{delimiters:o,compilerOptions:l}=n,c=yt(yt({isCustomElement:i,delimiters:o},a),l);n.render=Jo(s,c)}}t.render=n.render||tr}{const s=y0(t);Rr();try{Hh(t)}finally{Ir(),s()}}}const Cf={get(t,e){return wt(t,"get",""),t[e]}};function Mf(t){const e=r=>{t.exposed=r||{}};return{attrs:new Proxy(t.attrs,Cf),slots:t.slots,emit:t.emit,expose:e}}function Hs(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(ru(hh(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in s0)return s0[r](t)},has(e,r){return r in e||r in s0}})):t.proxy}function Nf(t){return Ne(t)&&"__vccOpts"in t}const Ou=(t,e)=>bh(t,e,f0),Df="3.5.20";/** * @vue/runtime-dom v3.5.20 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Yi;const Zo=typeof window<"u"&&window.trustedTypes;if(Zo)try{Yi=Zo.createPolicy("vue",{createHTML:t=>t})}catch{}const Lu=Yi?t=>Yi.createHTML(t):t=>t,Rf="http://www.w3.org/2000/svg",If="http://www.w3.org/1998/Math/MathML",kr=typeof document<"u"?document:null,Qo=kr&&kr.createElement("template"),_f={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const s=e==="svg"?kr.createElementNS(Rf,t):e==="mathml"?kr.createElementNS(If,t):r?kr.createElement(t,{is:r}):kr.createElement(t);return t==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:t=>kr.createTextNode(t),createComment:t=>kr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>kr.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,s,i){const a=r?r.previousSibling:e.lastChild;if(s&&(s===i||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{Qo.innerHTML=Lu(n==="svg"?`${t}`:n==="mathml"?`${t}`:t);const o=Qo.content;if(n==="svg"||n==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}e.insertBefore(o,r)}return[a?a.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}},Of=Symbol("_vtc");function Lf(t,e,r){const n=t[Of];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}const ms=Symbol("_vod"),zu=Symbol("_vsh"),zf={name:"show",beforeMount(t,{value:e},{transition:r}){t[ms]=t.style.display==="none"?"":t.style.display,r&&e?r.beforeEnter(t):Vn(t,e)},mounted(t,{value:e},{transition:r}){r&&e&&r.enter(t)},updated(t,{value:e,oldValue:r},{transition:n}){!e!=!r&&(n?e?(n.beforeEnter(t),Vn(t,!0),n.enter(t)):n.leave(t,()=>{Vn(t,!1)}):Vn(t,e))},beforeUnmount(t,{value:e}){Vn(t,e)}};function Vn(t,e){t.style.display=e?t[ms]:"none",t[zu]=!e}const $f=Symbol(""),Ff=/(^|;)\s*display\s*:/;function Bf(t,e,r){const n=t.style,s=ct(r);let i=!1;if(r&&!s){if(e)if(ct(e))for(const a of e.split(";")){const o=a.slice(0,a.indexOf(":")).trim();r[o]==null&&es(n,o,"")}else for(const a in e)r[a]==null&&es(n,a,"");for(const a in r)a==="display"&&(i=!0),es(n,a,r[a])}else if(s){if(e!==r){const a=n[$f];a&&(r+=";"+a),n.cssText=r,i=Ff.test(r)}}else e&&t.removeAttribute("style");ms in t&&(t[ms]=i?n.display:"",t[zu]&&(n.display="none"))}const el=/\s*!important$/;function es(t,e,r){if(Ae(r))r.forEach(n=>es(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=Pf(t,e);el.test(r)?t.setProperty(en(n),r.replace(el,""),"important"):t[n]=r}}const tl=["Webkit","Moz","ms"],pi={};function Pf(t,e){const r=pi[e];if(r)return r;let n=Gr(e);if(n!=="filter"&&n in t)return pi[e]=n;n=zc(n);for(let s=0;smi||(Uf.then(()=>mi=0),mi=Date.now());function Wf(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;mr(Gf(n,r.value),e,5,[n])};return r.value=t,r.attached=Vf(),r}function Gf(t,e){if(Ae(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>s=>!s._stopped&&n&&n(s))}else return e}const ol=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,Kf=(t,e,r,n,s,i)=>{const a=s==="svg";e==="class"?Lf(t,n,a):e==="style"?Bf(t,r,n):Is(e)?xa(e)||qf(t,e,r,n,i):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Yf(t,e,n,a))?(sl(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&nl(t,e,n,a,i,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!ct(n))?sl(t,Gr(e),n,i,e):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),nl(t,e,n,a))};function Yf(t,e,r,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&ol(e)&&Ne(r));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 s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return ol(e)&&ct(r)?!1:e in t}const ll=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ae(e)?r=>Y0(e,r):e};function Xf(t){t.target.composing=!0}function cl(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const gi=Symbol("_assign"),Pa={created(t,{modifiers:{lazy:e,trim:r,number:n}},s){t[gi]=ll(s);const i=n||s.props&&s.props.type==="number";En(t,e?"change":"input",a=>{if(a.target.composing)return;let o=t.value;r&&(o=o.trim()),i&&(o=Bi(o)),t[gi](o)}),r&&En(t,"change",()=>{t.value=t.value.trim()}),e||(En(t,"compositionstart",Xf),En(t,"compositionend",cl),En(t,"change",cl))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},a){if(t[gi]=ll(a),t.composing)return;const o=(i||t.type==="number")&&!/^0\d/.test(t.value)?Bi(t.value):t.value,l=e??"";o!==l&&(document.activeElement===t&&t.type!=="range"&&(n&&e===r||s&&t.value.trim()===l)||(t.value=l))}},Jf=["ctrl","shift","alt","meta"],Zf={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)=>Jf.some(r=>t[`${r}Key`]&&!e.includes(r))},vi=(t,e)=>{const r=t._withMods||(t._withMods={}),n=e.join(".");return r[n]||(r[n]=(s,...i)=>{for(let a=0;a{const r=t._withKeys||(t._withKeys={}),n=e.join(".");return r[n]||(r[n]=s=>{if(!("key"in s))return;const i=en(s.key);if(e.some(a=>a===i||Qf[a]===i))return t(s)})},ep=yt({patchProp:Kf},_f);let ul;function tp(){return ul||(ul=tf(ep))}const rp=(...t)=>{const e=tp().createApp(...t),{mount:r}=e;return e.mount=n=>{const s=sp(n);if(!s)return;const i=e._component;!Ne(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const a=r(s,!1,np(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},e};function np(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function sp(t){return ct(t)?document.querySelector(t):t}var ip=Object.defineProperty,ap=(t,e,r)=>e in t?ip(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_0=(t,e,r)=>(ap(t,typeof e!="symbol"?e+"":e,r),r);const Ha={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"}},qa={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 Xi(t){return t.replace(/&/g,"&").replace(/{if(t.parent=e,t.children)for(let r=0;r{if(t.expanded=e,t.children)if(r===void 0||r>0){const n=r!==void 0?r-1:void 0;t.children.forEach(s=>{In(s,e,n)})}else t.children.forEach(n=>{In(n,!1)})};function ja(t){if(t.id=gn(),t.children)for(let e=0;e0&&(a=180-a),i<0&&s<0&&(a=180+a),i>0&&s<0&&(a=360-a);const o=12,l=30,c=a+l,d=a-l;return{x1:r+Math.cos(Math.PI*c/180)*o,y1:n-Math.sin(Math.PI*c/180)*o,x2:r+Math.cos(Math.PI*d/180)*o,y2:n-Math.sin(Math.PI*d/180)*o}}function gn(){return(new Date().getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}const op=function(){const t=gn();return{topic:this.newTopicName,id:t}};function Ua(t){return JSON.parse(JSON.stringify(t,(e,r)=>{if(e!=="parent")return r}))}const rn=(t,e)=>{let r=0,n=0;for(;e&&e!==t;)r+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{offsetLeft:r,offsetTop:n}},vt=(t,e)=>{for(const r in e)t.setAttribute(r,e[r])},Ji=t=>t?t.tagName==="ME-TPC":!1,qs=t=>t.filter(e=>e.nodeObj.parent).filter((e,r,n)=>{for(let s=0;s{const e=/translate\(([^,]+),\s*([^)]+)\)/,r=t.match(e);return r?{x:parseFloat(r[1]),y:parseFloat(r[2])}:{x:0,y:0}},Va=function(t){for(let e=0;e(t.LHS="lhs",t.RHS="rhs",t))(sr||{});const lp=t=>{const e=t.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},cp=t=>{const e=t.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},up=t=>{t.selectNode(t.map.querySelector("me-root>me-tpc"))},dp=function(t,e){const r=e.parentElement.parentElement.parentElement.previousSibling;if(r){const n=r.firstChild;t.selectNode(n)}},hp=function(t,e){const r=e.parentElement.nextSibling;if(r&&r.firstChild){const n=r.firstChild.firstChild.firstChild;t.selectNode(n)}},dl=function(t,e){var r,n;const s=t.currentNode||((r=t.currentNodes)==null?void 0:r[0]);if(!s)return;const i=s.nodeObj,a=s.offsetParent.offsetParent.parentElement;i.parent?a.className===e?hp(t,s):(n=i.parent)!=null&&n.parent?dp(t,s):up(t):e===sr.LHS?lp(t):cp(t)},hl=function(t,e){const r=t.currentNode;if(!r||!r.nodeObj.parent)return;const n=e+"Sibling",s=r.parentElement.parentElement[n];s?t.selectNode(s.firstChild.firstChild):t.selectNode(r)},bs=function(t,e,r){const{scaleVal:n,scaleSensitivity:s}=t;switch(e){case"in":t.scale(n+s,r);break;case"out":t.scale(n-s,r)}};function fp(t,e){e=e===!0?{}:e;const r=()=>{t.currentArrow?t.removeArrow():t.currentSummary?t.removeSummary(t.currentSummary.summaryObj.id):t.currentNodes&&t.removeNodes(t.currentNodes)};let n=!1,s=null;const i=o=>{const l=t.nodeData;if(o.key==="0")for(const c of l.children)In(c,!1);if(o.key==="=")for(const c of l.children)In(c,!0);if(["1","2","3","4","5","6","7","8","9"].includes(o.key))for(const c of l.children)In(c,!0,Number(o.key)-1);t.refresh(),t.toCenter(),n=!1,s&&(clearTimeout(s),s=null,t.container.removeEventListener("keydown",i))},a={Enter:o=>{o.shiftKey?t.insertSibling("before"):o.ctrlKey||o.metaKey?t.insertParent():t.insertSibling("after")},Tab:()=>{t.addChild()},F1:()=>{t.toCenter()},F2:()=>{t.beginEdit()},ArrowUp:o=>{if(o.altKey)t.moveUpNode();else{if(o.metaKey||o.ctrlKey)return t.initSide();hl(t,"previous")}},ArrowDown:o=>{o.altKey?t.moveDownNode():hl(t,"next")},ArrowLeft:o=>{if(o.metaKey||o.ctrlKey)return t.initLeft();dl(t,sr.LHS)},ArrowRight:o=>{if(o.metaKey||o.ctrlKey)return t.initRight();dl(t,sr.RHS)},PageUp:()=>t.moveUpNode(),PageDown:()=>{t.moveDownNode()},c:o=>{(o.metaKey||o.ctrlKey)&&(t.waitCopy=t.currentNodes)},x:o=>{(o.metaKey||o.ctrlKey)&&(t.waitCopy=t.currentNodes,r())},v:o=>{!t.waitCopy||!t.currentNode||(o.metaKey||o.ctrlKey)&&(t.waitCopy.length===1?t.copyNode(t.waitCopy[0],t.currentNode):t.copyNodes(t.waitCopy,t.currentNode))},"=":o=>{(o.metaKey||o.ctrlKey)&&bs(t,"in")},"-":o=>{(o.metaKey||o.ctrlKey)&&bs(t,"out")},0:o=>{if(o.metaKey||o.ctrlKey){if(n)return;t.scale(1)}},k:o=>{(o.metaKey||o.ctrlKey)&&(n=!0,s&&(clearTimeout(s),t.container.removeEventListener("keydown",i)),s=window.setTimeout(()=>{n=!1,s=null},2e3),t.container.addEventListener("keydown",i))},Delete:r,Backspace:r,...e};t.container.onkeydown=o=>{if(o.preventDefault(),!t.editable)return;const l=a[o.key];l&&l(o)}}function pp(t){const{dragMoveHelper:e}=t,r=p=>{var v,b,y;if(p.button!==0)return;if((v=t.helper1)!=null&&v.moved){t.helper1.clear();return}if((b=t.helper2)!=null&&b.moved){t.helper2.clear();return}if(e.moved){e.clear();return}const w=p.target;if(w.tagName==="ME-EPD")p.ctrlKey||p.metaKey?t.expandNodeAll(w.previousSibling):t.expandNode(w.previousSibling);else if(w.tagName==="ME-TPC"&&t.currentNodes.length>1)t.selectNode(w);else if(!t.editable)return;const M=(y=w.parentElement)==null?void 0:y.parentElement;M.getAttribute("class")==="topiclinks"?t.selectArrow(w.parentElement):M.getAttribute("class")==="summary"&&t.selectSummary(w.parentElement)},n=p=>{var v;if(!t.editable)return;const b=p.target;Ji(b)&&t.beginEdit(b);const y=(v=b.parentElement)==null?void 0:v.parentElement;y.getAttribute("class")==="topiclinks"?t.editArrowLabel(b.parentElement):y.getAttribute("class")==="summary"&&t.editSummary(b.parentElement)};let s=0;const i=p=>{if(p.pointerType==="mouse")return;const v=new Date().getTime(),b=v-s;b<300&&b>0&&n(p),s=v},a=p=>{e.moved=!1;const v=t.mouseSelectionButton===0?2:0;if(p.button!==v&&p.pointerType==="mouse")return;e.x=p.clientX,e.y=p.clientY;const b=p.target;b.className!=="circle"&&b.contentEditable!=="plaintext-only"&&(e.mousedown=!0,b.setPointerCapture(p.pointerId))},o=p=>{if(p.target.contentEditable!=="plaintext-only"){const v=p.clientX-e.x,b=p.clientY-e.y;e.onMove(v,b)}e.x=p.clientX,e.y=p.clientY},l=p=>{const v=t.mouseSelectionButton===0?2:0;if(p.button!==v&&p.pointerType==="mouse")return;const b=p.target;b.hasPointerCapture&&b.hasPointerCapture(p.pointerId)&&b.releasePointerCapture(p.pointerId),e.clear()},c=p=>{if(p.preventDefault(),p.button!==2||!t.editable)return;const v=p.target;Ji(v)&&!v.classList.contains("selected")&&t.selectNode(v),setTimeout(()=>{t.dragMoveHelper.moved||t.bus.fire("showContextMenu",p)},200)},d=p=>{p.stopPropagation(),p.preventDefault(),p.ctrlKey||p.metaKey?p.deltaY<0?bs(t,"in",t.dragMoveHelper):t.scaleVal-t.scaleSensitivity>0&&bs(t,"out",t.dragMoveHelper):p.shiftKey?t.move(-p.deltaY,0):t.move(-p.deltaX,-p.deltaY)},{container:f}=t;return Va([{dom:f,evt:"pointerdown",func:a},{dom:f,evt:"pointermove",func:o},{dom:f,evt:"pointerup",func:l},{dom:f,evt:"pointerup",func:i},{dom:f,evt:"click",func:r},{dom:f,evt:"dblclick",func:n},{dom:f,evt:"contextmenu",func:c},{dom:f,evt:"wheel",func:typeof t.handleWheel=="function"?t.handleWheel:d}])}function mp(){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 r=this.handlers[t];for(let n=0;n{i.direction===0?n+=1:i.direction===1?s+=1:n<=s?(i.direction=0,n+=1):(i.direction=1,s+=1)})}vp(this,r,e)},vp=function(t,e,r){const n=ys.createElement("me-main");n.className=sr.LHS;const s=ys.createElement("me-main");s.className=sr.RHS;for(let i=0;i`${Xi(n)}`).join(""),t.appendChild(r),t.icons=r}else t.icons&&(t.icons=void 0);if(e.tags&&e.tags.length){const r=Ft.createElement("div");r.className="tags",e.tags.forEach(n=>{const s=Ft.createElement("span");typeof n=="string"?s.textContent=n:(s.textContent=n.text,n.className&&(s.className=n.className),n.style&&Object.assign(s.style,n.style)),r.appendChild(s)}),t.appendChild(r),t.tags=r}else t.tags&&(t.tags=void 0)},yp=function(t,e){const r=Ft.createElement("me-wrapper"),{p:n,tpc:s}=this.createParent(t);if(r.appendChild(n),!e&&t.children&&t.children.length>0){const i=Ga(t.expanded);if(n.appendChild(i),t.expanded!==!1){const a=bp(this,t.children);r.appendChild(a)}}return{grp:r,top:n,tpc:s}},wp=function(t){const e=Ft.createElement("me-parent"),r=this.createTopic(t);return Wa.call(this,r,t),e.appendChild(r),{p:e,tpc:r}},xp=function(t){const e=Ft.createElement("me-children");return e.append(...t),e},kp=function(t){const e=Ft.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e.draggable=this.draggable,e};function Bu(t){const e=Ft.createRange();e.selectNodeContents(t);const r=window.getSelection();r&&(r.removeAllRanges(),r.addRange(e))}const Sp=function(t){if(!t)return;const e=Ft.createElement("div"),r=t.nodeObj,n=r.topic;t.appendChild(e),e.id="input-box",e.textContent=n,e.contentEditable="plaintext-only",e.spellcheck=!1;const s=getComputedStyle(t);e.style.cssText=`min-width:${t.offsetWidth-8}px; +**/let Yi;const Zo=typeof window<"u"&&window.trustedTypes;if(Zo)try{Yi=Zo.createPolicy("vue",{createHTML:t=>t})}catch{}const Lu=Yi?t=>Yi.createHTML(t):t=>t,Rf="http://www.w3.org/2000/svg",If="http://www.w3.org/1998/Math/MathML",kr=typeof document<"u"?document:null,Qo=kr&&kr.createElement("template"),_f={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const s=e==="svg"?kr.createElementNS(Rf,t):e==="mathml"?kr.createElementNS(If,t):r?kr.createElement(t,{is:r}):kr.createElement(t);return t==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:t=>kr.createTextNode(t),createComment:t=>kr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>kr.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,s,i){const a=r?r.previousSibling:e.lastChild;if(s&&(s===i||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{Qo.innerHTML=Lu(n==="svg"?`${t}`:n==="mathml"?`${t}`:t);const o=Qo.content;if(n==="svg"||n==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}e.insertBefore(o,r)}return[a?a.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}},Of=Symbol("_vtc");function Lf(t,e,r){const n=t[Of];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}const ms=Symbol("_vod"),zu=Symbol("_vsh"),zf={name:"show",beforeMount(t,{value:e},{transition:r}){t[ms]=t.style.display==="none"?"":t.style.display,r&&e?r.beforeEnter(t):Vn(t,e)},mounted(t,{value:e},{transition:r}){r&&e&&r.enter(t)},updated(t,{value:e,oldValue:r},{transition:n}){!e!=!r&&(n?e?(n.beforeEnter(t),Vn(t,!0),n.enter(t)):n.leave(t,()=>{Vn(t,!1)}):Vn(t,e))},beforeUnmount(t,{value:e}){Vn(t,e)}};function Vn(t,e){t.style.display=e?t[ms]:"none",t[zu]=!e}const $f=Symbol(""),Ff=/(^|;)\s*display\s*:/;function Bf(t,e,r){const n=t.style,s=ct(r);let i=!1;if(r&&!s){if(e)if(ct(e))for(const a of e.split(";")){const o=a.slice(0,a.indexOf(":")).trim();r[o]==null&&es(n,o,"")}else for(const a in e)r[a]==null&&es(n,a,"");for(const a in r)a==="display"&&(i=!0),es(n,a,r[a])}else if(s){if(e!==r){const a=n[$f];a&&(r+=";"+a),n.cssText=r,i=Ff.test(r)}}else e&&t.removeAttribute("style");ms in t&&(t[ms]=i?n.display:"",t[zu]&&(n.display="none"))}const el=/\s*!important$/;function es(t,e,r){if(Ae(r))r.forEach(n=>es(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=Pf(t,e);el.test(r)?t.setProperty(en(n),r.replace(el,""),"important"):t[n]=r}}const tl=["Webkit","Moz","ms"],pi={};function Pf(t,e){const r=pi[e];if(r)return r;let n=Gr(e);if(n!=="filter"&&n in t)return pi[e]=n;n=zc(n);for(let s=0;smi||(Uf.then(()=>mi=0),mi=Date.now());function Wf(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;mr(Gf(n,r.value),e,5,[n])};return r.value=t,r.attached=Vf(),r}function Gf(t,e){if(Ae(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>s=>!s._stopped&&n&&n(s))}else return e}const ol=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,Kf=(t,e,r,n,s,i)=>{const a=s==="svg";e==="class"?Lf(t,n,a):e==="style"?Bf(t,r,n):Is(e)?xa(e)||qf(t,e,r,n,i):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Yf(t,e,n,a))?(sl(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&nl(t,e,n,a,i,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!ct(n))?sl(t,Gr(e),n,i,e):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),nl(t,e,n,a))};function Yf(t,e,r,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&ol(e)&&Ne(r));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 s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return ol(e)&&ct(r)?!1:e in t}const ll=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ae(e)?r=>Y0(e,r):e};function Xf(t){t.target.composing=!0}function cl(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const gi=Symbol("_assign"),Pa={created(t,{modifiers:{lazy:e,trim:r,number:n}},s){t[gi]=ll(s);const i=n||s.props&&s.props.type==="number";En(t,e?"change":"input",a=>{if(a.target.composing)return;let o=t.value;r&&(o=o.trim()),i&&(o=Bi(o)),t[gi](o)}),r&&En(t,"change",()=>{t.value=t.value.trim()}),e||(En(t,"compositionstart",Xf),En(t,"compositionend",cl),En(t,"change",cl))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},a){if(t[gi]=ll(a),t.composing)return;const o=(i||t.type==="number")&&!/^0\d/.test(t.value)?Bi(t.value):t.value,l=e??"";o!==l&&(document.activeElement===t&&t.type!=="range"&&(n&&e===r||s&&t.value.trim()===l)||(t.value=l))}},Jf=["ctrl","shift","alt","meta"],Zf={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)=>Jf.some(r=>t[`${r}Key`]&&!e.includes(r))},vi=(t,e)=>{const r=t._withMods||(t._withMods={}),n=e.join(".");return r[n]||(r[n]=(s,...i)=>{for(let a=0;a{const r=t._withKeys||(t._withKeys={}),n=e.join(".");return r[n]||(r[n]=s=>{if(!("key"in s))return;const i=en(s.key);if(e.some(a=>a===i||Qf[a]===i))return t(s)})},ep=yt({patchProp:Kf},_f);let ul;function tp(){return ul||(ul=tf(ep))}const rp=(...t)=>{const e=tp().createApp(...t),{mount:r}=e;return e.mount=n=>{const s=sp(n);if(!s)return;const i=e._component;!Ne(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const a=r(s,!1,np(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},e};function np(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function sp(t){return ct(t)?document.querySelector(t):t}var ip=Object.defineProperty,ap=(t,e,r)=>e in t?ip(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_0=(t,e,r)=>(ap(t,typeof e!="symbol"?e+"":e,r),r);const Ha={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"}},qa={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 Xi(t){return t.replace(/&/g,"&").replace(/{if(t.parent=e,t.children)for(let r=0;r{if(t.expanded=e,t.children)if(r===void 0||r>0){const n=r!==void 0?r-1:void 0;t.children.forEach(s=>{In(s,e,n)})}else t.children.forEach(n=>{In(n,!1)})};function ja(t){if(t.id=gn(),t.children)for(let e=0;e0&&(a=180-a),i<0&&s<0&&(a=180+a),i>0&&s<0&&(a=360-a);const o=12,l=30,c=a+l,d=a-l;return{x1:r+Math.cos(Math.PI*c/180)*o,y1:n-Math.sin(Math.PI*c/180)*o,x2:r+Math.cos(Math.PI*d/180)*o,y2:n-Math.sin(Math.PI*d/180)*o}}function gn(){return(new Date().getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}const op=function(){const t=gn();return{topic:this.newTopicName,id:t}};function Ua(t){return JSON.parse(JSON.stringify(t,(e,r)=>{if(e!=="parent")return r}))}const rn=(t,e)=>{let r=0,n=0;for(;e&&e!==t;)r+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{offsetLeft:r,offsetTop:n}},ht=(t,e)=>{for(const r in e)t.setAttribute(r,e[r])},Ji=t=>t?t.tagName==="ME-TPC":!1,qs=t=>t.filter(e=>e.nodeObj.parent).filter((e,r,n)=>{for(let s=0;s{const e=/translate\(([^,]+),\s*([^)]+)\)/,r=t.match(e);return r?{x:parseFloat(r[1]),y:parseFloat(r[2])}:{x:0,y:0}},Va=function(t){for(let e=0;e(t.LHS="lhs",t.RHS="rhs",t))(sr||{});const lp=t=>{const e=t.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},cp=t=>{const e=t.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},up=t=>{t.selectNode(t.map.querySelector("me-root>me-tpc"))},dp=function(t,e){const r=e.parentElement.parentElement.parentElement.previousSibling;if(r){const n=r.firstChild;t.selectNode(n)}},hp=function(t,e){const r=e.parentElement.nextSibling;if(r&&r.firstChild){const n=r.firstChild.firstChild.firstChild;t.selectNode(n)}},dl=function(t,e){var r,n;const s=t.currentNode||((r=t.currentNodes)==null?void 0:r[0]);if(!s)return;const i=s.nodeObj,a=s.offsetParent.offsetParent.parentElement;i.parent?a.className===e?hp(t,s):(n=i.parent)!=null&&n.parent?dp(t,s):up(t):e===sr.LHS?lp(t):cp(t)},hl=function(t,e){const r=t.currentNode;if(!r||!r.nodeObj.parent)return;const n=e+"Sibling",s=r.parentElement.parentElement[n];s?t.selectNode(s.firstChild.firstChild):t.selectNode(r)},bs=function(t,e,r){const{scaleVal:n,scaleSensitivity:s}=t;switch(e){case"in":t.scale(n+s,r);break;case"out":t.scale(n-s,r)}};function fp(t,e){e=e===!0?{}:e;const r=()=>{t.currentArrow?t.removeArrow():t.currentSummary?t.removeSummary(t.currentSummary.summaryObj.id):t.currentNodes&&t.removeNodes(t.currentNodes)};let n=!1,s=null;const i=o=>{const l=t.nodeData;if(o.key==="0")for(const c of l.children)In(c,!1);if(o.key==="=")for(const c of l.children)In(c,!0);if(["1","2","3","4","5","6","7","8","9"].includes(o.key))for(const c of l.children)In(c,!0,Number(o.key)-1);t.refresh(),t.toCenter(),n=!1,s&&(clearTimeout(s),s=null,t.container.removeEventListener("keydown",i))},a={Enter:o=>{o.shiftKey?t.insertSibling("before"):o.ctrlKey||o.metaKey?t.insertParent():t.insertSibling("after")},Tab:()=>{t.addChild()},F1:()=>{t.toCenter()},F2:()=>{t.beginEdit()},ArrowUp:o=>{if(o.altKey)t.moveUpNode();else{if(o.metaKey||o.ctrlKey)return t.initSide();hl(t,"previous")}},ArrowDown:o=>{o.altKey?t.moveDownNode():hl(t,"next")},ArrowLeft:o=>{if(o.metaKey||o.ctrlKey)return t.initLeft();dl(t,sr.LHS)},ArrowRight:o=>{if(o.metaKey||o.ctrlKey)return t.initRight();dl(t,sr.RHS)},PageUp:()=>t.moveUpNode(),PageDown:()=>{t.moveDownNode()},c:o=>{(o.metaKey||o.ctrlKey)&&(t.waitCopy=t.currentNodes)},x:o=>{(o.metaKey||o.ctrlKey)&&(t.waitCopy=t.currentNodes,r())},v:o=>{!t.waitCopy||!t.currentNode||(o.metaKey||o.ctrlKey)&&(t.waitCopy.length===1?t.copyNode(t.waitCopy[0],t.currentNode):t.copyNodes(t.waitCopy,t.currentNode))},"=":o=>{(o.metaKey||o.ctrlKey)&&bs(t,"in")},"-":o=>{(o.metaKey||o.ctrlKey)&&bs(t,"out")},0:o=>{if(o.metaKey||o.ctrlKey){if(n)return;t.scale(1)}},k:o=>{(o.metaKey||o.ctrlKey)&&(n=!0,s&&(clearTimeout(s),t.container.removeEventListener("keydown",i)),s=window.setTimeout(()=>{n=!1,s=null},2e3),t.container.addEventListener("keydown",i))},Delete:r,Backspace:r,...e};t.container.onkeydown=o=>{if(o.preventDefault(),!t.editable)return;const l=a[o.key];l&&l(o)}}function pp(t){const{dragMoveHelper:e}=t,r=p=>{var g,b,y;if(p.button!==0)return;if((g=t.helper1)!=null&&g.moved){t.helper1.clear();return}if((b=t.helper2)!=null&&b.moved){t.helper2.clear();return}if(e.moved){e.clear();return}const w=p.target;if(w.tagName==="ME-EPD")p.ctrlKey||p.metaKey?t.expandNodeAll(w.previousSibling):t.expandNode(w.previousSibling);else if(w.tagName==="ME-TPC"&&t.currentNodes.length>1)t.selectNode(w);else if(!t.editable)return;const M=(y=w.parentElement)==null?void 0:y.parentElement;M.getAttribute("class")==="topiclinks"?t.selectArrow(w.parentElement):M.getAttribute("class")==="summary"&&t.selectSummary(w.parentElement)},n=p=>{var g;if(!t.editable)return;const b=p.target;Ji(b)&&t.beginEdit(b);const y=(g=b.parentElement)==null?void 0:g.parentElement;y.getAttribute("class")==="topiclinks"?t.editArrowLabel(b.parentElement):y.getAttribute("class")==="summary"&&t.editSummary(b.parentElement)};let s=0;const i=p=>{if(p.pointerType==="mouse")return;const g=new Date().getTime(),b=g-s;b<300&&b>0&&n(p),s=g},a=p=>{e.moved=!1;const g=t.mouseSelectionButton===0?2:0;if(p.button!==g&&p.pointerType==="mouse")return;e.x=p.clientX,e.y=p.clientY;const b=p.target;b.className!=="circle"&&b.contentEditable!=="plaintext-only"&&(e.mousedown=!0,b.setPointerCapture(p.pointerId))},o=p=>{if(p.target.contentEditable!=="plaintext-only"){const g=p.clientX-e.x,b=p.clientY-e.y;e.onMove(g,b)}e.x=p.clientX,e.y=p.clientY},l=p=>{const g=t.mouseSelectionButton===0?2:0;if(p.button!==g&&p.pointerType==="mouse")return;const b=p.target;b.hasPointerCapture&&b.hasPointerCapture(p.pointerId)&&b.releasePointerCapture(p.pointerId),e.clear()},c=p=>{if(p.preventDefault(),p.button!==2||!t.editable)return;const g=p.target;Ji(g)&&!g.classList.contains("selected")&&t.selectNode(g),setTimeout(()=>{t.dragMoveHelper.moved||t.bus.fire("showContextMenu",p)},200)},d=p=>{p.stopPropagation(),p.preventDefault(),p.ctrlKey||p.metaKey?p.deltaY<0?bs(t,"in",t.dragMoveHelper):t.scaleVal-t.scaleSensitivity>0&&bs(t,"out",t.dragMoveHelper):p.shiftKey?t.move(-p.deltaY,0):t.move(-p.deltaX,-p.deltaY)},{container:f}=t;return Va([{dom:f,evt:"pointerdown",func:a},{dom:f,evt:"pointermove",func:o},{dom:f,evt:"pointerup",func:l},{dom:f,evt:"pointerup",func:i},{dom:f,evt:"click",func:r},{dom:f,evt:"dblclick",func:n},{dom:f,evt:"contextmenu",func:c},{dom:f,evt:"wheel",func:typeof t.handleWheel=="function"?t.handleWheel:d}])}function mp(){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 r=this.handlers[t];for(let n=0;n{i.direction===0?n+=1:i.direction===1?s+=1:n<=s?(i.direction=0,n+=1):(i.direction=1,s+=1)})}vp(this,r,e)},vp=function(t,e,r){const n=ys.createElement("me-main");n.className=sr.LHS;const s=ys.createElement("me-main");s.className=sr.RHS;for(let i=0;i`${Xi(n)}`).join(""),t.appendChild(r),t.icons=r}else t.icons&&(t.icons=void 0);if(e.tags&&e.tags.length){const r=Bt.createElement("div");r.className="tags",e.tags.forEach(n=>{const s=Bt.createElement("span");typeof n=="string"?s.textContent=n:(s.textContent=n.text,n.className&&(s.className=n.className),n.style&&Object.assign(s.style,n.style)),r.appendChild(s)}),t.appendChild(r),t.tags=r}else t.tags&&(t.tags=void 0)},yp=function(t,e){const r=Bt.createElement("me-wrapper"),{p:n,tpc:s}=this.createParent(t);if(r.appendChild(n),!e&&t.children&&t.children.length>0){const i=Ga(t.expanded);if(n.appendChild(i),t.expanded!==!1){const a=bp(this,t.children);r.appendChild(a)}}return{grp:r,top:n,tpc:s}},wp=function(t){const e=Bt.createElement("me-parent"),r=this.createTopic(t);return Wa.call(this,r,t),e.appendChild(r),{p:e,tpc:r}},xp=function(t){const e=Bt.createElement("me-children");return e.append(...t),e},kp=function(t){const e=Bt.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e.draggable=this.draggable,e};function Bu(t){const e=Bt.createRange();e.selectNodeContents(t);const r=window.getSelection();r&&(r.removeAllRanges(),r.addRange(e))}const Sp=function(t){if(!t)return;const e=Bt.createElement("div"),r=t.nodeObj,n=r.topic;t.appendChild(e),e.id="input-box",e.textContent=n,e.contentEditable="plaintext-only",e.spellcheck=!1;const s=getComputedStyle(t);e.style.cssText=`min-width:${t.offsetWidth-8}px; color:${s.color}; padding:${s.padding}; margin:${s.margin}; font:${s.font}; background-color:${s.backgroundColor!=="rgba(0, 0, 0, 0)"&&s.backgroundColor}; - border-radius:${s.borderRadius};`,this.direction===0&&(e.style.right="0"),Bu(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",i=>{i.stopPropagation();const a=i.key;if(a==="Enter"||a==="Tab"){if(i.shiftKey)return;i.preventDefault(),e.blur(),this.container.focus()}}),e.addEventListener("blur",()=>{var i;if(!e)return;const a=((i=e.textContent)==null?void 0:i.trim())||"";a===""?r.topic=n:(r.topic=a,this.markdown?t.text.innerHTML=this.markdown(r.topic,r):t.text.textContent=a),e.remove(),a!==n&&(this.linkDiv(),this.bus.fire("operation",{name:"finishEdit",obj:r,origin:n}))})},Ga=function(t){const e=Ft.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},fn=document,Wt="http://www.w3.org/2000/svg",Zi=function(t,e,r,n={}){const{anchor:s="middle",color:i,dataType:a}=n,o=document.createElementNS(Wt,"text");return vt(o,{"text-anchor":s,x:e+"",y:r+"",fill:i||(s==="middle"?"rgb(235, 95, 82)":"#666")}),a&&(o.dataset.type=a),o.innerHTML=t,o},Pu=function(t,e,r){const n=fn.createElementNS(Wt,"path");return vt(n,{d:t,stroke:e||"#666",fill:"none","stroke-width":r}),n},Jn=function(t){const e=fn.createElementNS(Wt,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},fl=function(){const t=fn.createElementNS(Wt,"line");return t.setAttribute("stroke","#4dc4ff"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t.setAttribute("opacity","0.45"),t},Tp=function(t,e,r,n){const s=fn.createElementNS(Wt,"g");return[{name:"line",d:t},{name:"arrow1",d:e},{name:"arrow2",d:r}].forEach((i,a)=>{const o=i.d,l=fn.createElementNS(Wt,"path"),c={d:o,stroke:(n==null?void 0:n.stroke)||"rgb(235, 95, 82)",fill:"none","stroke-linecap":(n==null?void 0:n.strokeLinecap)||"cap","stroke-width":String((n==null?void 0:n.strokeWidth)||"2")};(n==null?void 0:n.opacity)!==void 0&&(c.opacity=String(n.opacity)),vt(l,c),a===0&&l.setAttribute("stroke-dasharray",(n==null?void 0:n.strokeDasharray)||"8,2");const d=fn.createElementNS(Wt,"path");vt(d,{d:o,stroke:"transparent",fill:"none","stroke-width":"15"}),s.appendChild(d),s.appendChild(l),s[i.name]=l}),s},Hu=function(t,e,r){if(!e)return;const n=fn.createElement("div");t.nodes.appendChild(n);const s=e.innerHTML;n.id="input-box",n.textContent=s,n.contentEditable="plaintext-only",n.spellcheck=!1;const i=e.getBBox();n.style.cssText=` + border-radius:${s.borderRadius};`,this.direction===0&&(e.style.right="0"),Bu(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",i=>{i.stopPropagation();const a=i.key;if(a==="Enter"||a==="Tab"){if(i.shiftKey)return;i.preventDefault(),e.blur(),this.container.focus()}}),e.addEventListener("blur",()=>{var i;if(!e)return;const a=((i=e.textContent)==null?void 0:i.trim())||"";a===""?r.topic=n:(r.topic=a,this.markdown?t.text.innerHTML=this.markdown(r.topic,r):t.text.textContent=a),e.remove(),a!==n&&(this.linkDiv(),this.bus.fire("operation",{name:"finishEdit",obj:r,origin:n}))})},Ga=function(t){const e=Bt.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},fn=document,Gt="http://www.w3.org/2000/svg",Zi=function(t,e,r,n={}){const{anchor:s="middle",color:i,dataType:a}=n,o=document.createElementNS(Gt,"text");return ht(o,{"text-anchor":s,x:e+"",y:r+"",fill:i||(s==="middle"?"rgb(235, 95, 82)":"#666")}),a&&(o.dataset.type=a),o.innerHTML=t,o},Pu=function(t,e,r){const n=fn.createElementNS(Gt,"path");return ht(n,{d:t,stroke:e||"#666",fill:"none","stroke-width":r}),n},Jn=function(t){const e=fn.createElementNS(Gt,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},fl=function(){const t=fn.createElementNS(Gt,"line");return t.setAttribute("stroke","#4dc4ff"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t.setAttribute("opacity","0.45"),t},Tp=function(t,e,r,n){const s=fn.createElementNS(Gt,"g");return[{name:"line",d:t},{name:"arrow1",d:e},{name:"arrow2",d:r}].forEach((i,a)=>{const o=i.d,l=fn.createElementNS(Gt,"path"),c={d:o,stroke:(n==null?void 0:n.stroke)||"rgb(235, 95, 82)",fill:"none","stroke-linecap":(n==null?void 0:n.strokeLinecap)||"cap","stroke-width":String((n==null?void 0:n.strokeWidth)||"2")};(n==null?void 0:n.opacity)!==void 0&&(c.opacity=String(n.opacity)),ht(l,c),a===0&&l.setAttribute("stroke-dasharray",(n==null?void 0:n.strokeDasharray)||"8,2");const d=fn.createElementNS(Gt,"path");ht(d,{d:o,stroke:"transparent",fill:"none","stroke-width":"15"}),s.appendChild(d),s.appendChild(l),s[i.name]=l}),s},Hu=function(t,e,r){if(!e)return;const n=fn.createElement("div");t.nodes.appendChild(n);const s=e.innerHTML;n.id="input-box",n.textContent=s,n.contentEditable="plaintext-only",n.spellcheck=!1;const i=e.getBBox();n.style.cssText=` min-width:${Math.max(88,i.width)}px; position:absolute; left:${i.x}px; top:${i.y}px; padding: 2px 4px; margin: -2px -4px; - `,Bu(n),t.scrollIntoView(n),n.addEventListener("keydown",a=>{a.stopPropagation();const o=a.key;if(o==="Enter"||o==="Tab"){if(a.shiftKey)return;a.preventDefault(),n.blur(),t.container.focus()}}),n.addEventListener("blur",()=>{var a;if(!n)return;const o=((a=n.textContent)==null?void 0:a.trim())||"";o===""?r.label=s:r.label=o,n.remove(),o!==s&&(e.innerHTML=r.label,"parent"in r?t.bus.fire("operation",{name:"finishEditSummary",obj:r}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:r}))})},Ep=function(t){const e=this.map.querySelector("me-root"),r=e.offsetTop,n=e.offsetLeft,s=e.offsetWidth,i=e.offsetHeight,a=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let o=0;o{const $=document.createElement("div");return $.innerText=O,$.className="tips",$},n=(O,$,K)=>{const G=document.createElement("li");return G.id=O,G.innerHTML=`${Xi($)}${Xi(K)}`,G},s=ml[t.locale]?t.locale:"en",i=ml[s],a=n("cm-add_child",i.addChild,"Tab"),o=n("cm-add_parent",i.addParent,"Ctrl + Enter"),l=n("cm-add_sibling",i.addSibling,"Enter"),c=n("cm-remove_child",i.removeNode,"Delete"),d=n("cm-fucus",i.focus,""),f=n("cm-unfucus",i.cancelFocus,""),p=n("cm-up",i.moveUp,"PgUp"),v=n("cm-down",i.moveDown,"Pgdn"),b=n("cm-link",i.link,""),y=n("cm-link-bidirectional",i.linkBidirectional,""),w=n("cm-summary",i.summary,""),M=document.createElement("ul");if(M.className="menu-list",M.appendChild(a),M.appendChild(o),M.appendChild(l),M.appendChild(c),e.focus&&(M.appendChild(d),M.appendChild(f)),M.appendChild(p),M.appendChild(v),M.appendChild(w),e.link&&(M.appendChild(b),M.appendChild(y)),e&&e.extend)for(let O=0;O{$.onclick(G)}}const S=document.createElement("div");S.className="context-menu",S.appendChild(M),S.hidden=!0,t.container.append(S);let E=!0;const D=O=>{const $=O.target;if(Ji($)){$.parentElement.tagName==="ME-ROOT"?E=!0:E=!1,E?(d.className="disabled",p.className="disabled",v.className="disabled",o.className="disabled",l.className="disabled",c.className="disabled"):(d.className="",p.className="",v.className="",o.className="",l.className="",c.className=""),S.hidden=!1,M.style.top="",M.style.bottom="",M.style.left="",M.style.right="";const K=M.getBoundingClientRect(),G=M.offsetHeight,pe=M.offsetWidth,ye=O.clientY-K.top,Ee=O.clientX-K.left;G+ye>window.innerHeight?(M.style.top="",M.style.bottom="0px"):(M.style.bottom="",M.style.top=ye+15+"px"),pe+Ee>window.innerWidth?(M.style.left="",M.style.right="0px"):(M.style.right="",M.style.left=Ee+10+"px")}};t.bus.addListener("showContextMenu",D),S.onclick=O=>{O.target===S&&(S.hidden=!0)},a.onclick=()=>{t.addChild(),S.hidden=!0},o.onclick=()=>{t.insertParent(),S.hidden=!0},l.onclick=()=>{E||(t.insertSibling("after"),S.hidden=!0)},c.onclick=()=>{E||(t.removeNodes(t.currentNodes||[]),S.hidden=!0)},d.onclick=()=>{E||(t.focusNode(t.currentNode),S.hidden=!0)},f.onclick=()=>{t.cancelFocus(),S.hidden=!0},p.onclick=()=>{E||(t.moveUpNode(),S.hidden=!0)},v.onclick=()=>{E||(t.moveDownNode(),S.hidden=!0)};const I=O=>{S.hidden=!0;const $=t.currentNode,K=r(i.clickTips);t.container.appendChild(K),t.map.addEventListener("click",G=>{G.preventDefault(),K.remove();const pe=G.target;(pe.parentElement.tagName==="ME-PARENT"||pe.parentElement.tagName==="ME-ROOT")&&t.createArrow($,pe,O)},{once:!0})};return b.onclick=()=>I(),y.onclick=()=>I({bidirectional:!0}),w.onclick=()=>{S.hidden=!0,t.createSummary(),t.unselectNodes(t.currentNodes)},()=>{a.onclick=null,o.onclick=null,l.onclick=null,c.onclick=null,d.onclick=null,f.onclick=null,p.onclick=null,v.onclick=null,b.onclick=null,w.onclick=null,S.onclick=null,t.container.oncontextmenu=null}}const Qi=document,Cp=function(t,e){if(!e)return ea(t),t;let r=t.querySelector(".insert-preview");const n=`insert-preview ${e} show`;return r||(r=Qi.createElement("div"),t.appendChild(r)),r.className=n,t},ea=function(t){if(!t)return;const e=t.querySelectorAll(".insert-preview");for(const r of e||[])r.remove()},gl=function(t,e){for(const r of e){const n=r.parentElement.parentElement.contains(t);if(!(t&&t.tagName==="ME-TPC"&&t!==r&&!n&&t.nodeObj.parent))return!1}return!0},Mp=function(t){const e=document.createElement("div");return e.className="mind-elixir-ghost",t.container.appendChild(e),e};class Np{constructor(e){_0(this,"mind"),_0(this,"isMoving",!1),_0(this,"interval",null),_0(this,"speed",20),this.mind=e}move(e,r){this.isMoving||(this.isMoving=!0,this.interval=setInterval(()=>{this.mind.move(e*this.speed*this.mind.scaleVal,r*this.speed*this.mind.scaleVal)},100))}stop(){this.isMoving=!1,clearInterval(this.interval)}}function Dp(t){let e=null,r=null;const n=Mp(t),s=new Np(t),i=l=>{t.selection.cancel();const c=l.target;if((c==null?void 0:c.tagName)!=="ME-TPC"){l.preventDefault();return}let d=t.currentNodes;d!=null&&d.includes(c)||(t.selectNode(c),d=t.currentNodes),t.dragged=d,d.length>1?n.innerHTML=d.length+"":n.innerHTML=c.innerHTML;for(const f of d)f.parentElement.parentElement.style.opacity="0.5";l.dataTransfer.setDragImage(n,0,0),l.dataTransfer.dropEffect="move",t.dragMoveHelper.clear()},a=l=>{const{dragged:c}=t;if(!c)return;s.stop();for(const f of c)f.parentElement.parentElement.style.opacity="1";const d=l.target;d.style.opacity="",r&&(ea(r),e==="before"?t.moveNodeBefore(c,r):e==="after"?t.moveNodeAfter(c,r):e==="in"&&t.moveNodeIn(c,r),t.dragged=null,n.innerHTML="")},o=l=>{l.preventDefault();const c=12*t.scaleVal,{dragged:d}=t;if(!d)return;const f=t.container.getBoundingClientRect();l.clientXf.x+f.width-50?s.move(-1,0):l.clientYf.y+f.height-50?s.move(0,-1):s.stop(),ea(r);const p=Qi.elementFromPoint(l.clientX,l.clientY-c);if(gl(p,d)){r=p;const v=p.getBoundingClientRect(),b=v.y;l.clientY>b+v.height?e="after":e="in"}else{const v=Qi.elementFromPoint(l.clientX,l.clientY+c),b=v.getBoundingClientRect();if(gl(v,d)){r=v;const y=b.y;l.clientYe.id)}:{type:"nodes",value:[t.obj.id]}};function Ip(t){let e=[],r=-1,n=t.getData(),s=[];t.undo=function(){if(r>-1){const l=e[r];n=l.prev,t.refresh(l.prev);try{l.currentTarget.type==="nodes"&&(l.operation==="removeNodes"?t.selectNodes(l.currentTarget.value.map(c=>this.findEle(c))):t.selectNodes(l.currentSelected.map(c=>this.findEle(c))))}catch{}finally{r--}}},t.redo=function(){if(rthis.findEle(c))):t.selectNodes(l.currentTarget.value.map(c=>this.findEle(c))))}catch{}}};const i=function(l){if(l.name==="beginEdit")return;e=e.slice(0,r+1);const c=t.getData(),d={prev:n,operation:l.name,currentSelected:s.map(f=>f.id),currentTarget:Rp(l),next:c};e.push(d),n=c,r=e.length-1},a=function(l){(l.metaKey||l.ctrlKey)&&(l.shiftKey&&l.key==="Z"||l.key==="y")?t.redo():(l.metaKey||l.ctrlKey)&&l.key==="z"&&t.undo()},o=function(l){s=t.currentNodes.map(c=>c.nodeObj)};return t.bus.addListener("operation",i),t.bus.addListener("selectNodes",o),t.container.addEventListener("keydown",a),()=>{t.bus.removeListener("operation",i),t.bus.removeListener("selectNodes",o),t.container.removeEventListener("keydown",a)}}const _p='',Op='',Lp='',zp='',$p='',Fp='',Bp='',Pp='',Hp=t=>async e=>{var r;try{const n=`${((r=e.nodeData)==null?void 0:r.topic)||"思维导图"}_${new Date().toISOString().slice(0,10)}`,s=` + `,Bu(n),t.scrollIntoView(n),n.addEventListener("keydown",a=>{a.stopPropagation();const o=a.key;if(o==="Enter"||o==="Tab"){if(a.shiftKey)return;a.preventDefault(),n.blur(),t.container.focus()}}),n.addEventListener("blur",()=>{var a;if(!n)return;const o=((a=n.textContent)==null?void 0:a.trim())||"";o===""?r.label=s:r.label=o,n.remove(),o!==s&&(e.innerHTML=r.label,"parent"in r?t.bus.fire("operation",{name:"finishEditSummary",obj:r}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:r}))})},Ep=function(t){const e=this.map.querySelector("me-root"),r=e.offsetTop,n=e.offsetLeft,s=e.offsetWidth,i=e.offsetHeight,a=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let o=0;o{const $=document.createElement("div");return $.innerText=O,$.className="tips",$},n=(O,$,K)=>{const G=document.createElement("li");return G.id=O,G.innerHTML=`${Xi($)}${Xi(K)}`,G},s=ml[t.locale]?t.locale:"en",i=ml[s],a=n("cm-add_child",i.addChild,"Tab"),o=n("cm-add_parent",i.addParent,"Ctrl + Enter"),l=n("cm-add_sibling",i.addSibling,"Enter"),c=n("cm-remove_child",i.removeNode,"Delete"),d=n("cm-fucus",i.focus,""),f=n("cm-unfucus",i.cancelFocus,""),p=n("cm-up",i.moveUp,"PgUp"),g=n("cm-down",i.moveDown,"Pgdn"),b=n("cm-link",i.link,""),y=n("cm-link-bidirectional",i.linkBidirectional,""),w=n("cm-summary",i.summary,""),M=document.createElement("ul");if(M.className="menu-list",M.appendChild(a),M.appendChild(o),M.appendChild(l),M.appendChild(c),e.focus&&(M.appendChild(d),M.appendChild(f)),M.appendChild(p),M.appendChild(g),M.appendChild(w),e.link&&(M.appendChild(b),M.appendChild(y)),e&&e.extend)for(let O=0;O{$.onclick(G)}}const S=document.createElement("div");S.className="context-menu",S.appendChild(M),S.hidden=!0,t.container.append(S);let E=!0;const D=O=>{const $=O.target;if(Ji($)){$.parentElement.tagName==="ME-ROOT"?E=!0:E=!1,E?(d.className="disabled",p.className="disabled",g.className="disabled",o.className="disabled",l.className="disabled",c.className="disabled"):(d.className="",p.className="",g.className="",o.className="",l.className="",c.className=""),S.hidden=!1,M.style.top="",M.style.bottom="",M.style.left="",M.style.right="";const K=M.getBoundingClientRect(),G=M.offsetHeight,pe=M.offsetWidth,ye=O.clientY-K.top,Ee=O.clientX-K.left;G+ye>window.innerHeight?(M.style.top="",M.style.bottom="0px"):(M.style.bottom="",M.style.top=ye+15+"px"),pe+Ee>window.innerWidth?(M.style.left="",M.style.right="0px"):(M.style.right="",M.style.left=Ee+10+"px")}};t.bus.addListener("showContextMenu",D),S.onclick=O=>{O.target===S&&(S.hidden=!0)},a.onclick=()=>{t.addChild(),S.hidden=!0},o.onclick=()=>{t.insertParent(),S.hidden=!0},l.onclick=()=>{E||(t.insertSibling("after"),S.hidden=!0)},c.onclick=()=>{E||(t.removeNodes(t.currentNodes||[]),S.hidden=!0)},d.onclick=()=>{E||(t.focusNode(t.currentNode),S.hidden=!0)},f.onclick=()=>{t.cancelFocus(),S.hidden=!0},p.onclick=()=>{E||(t.moveUpNode(),S.hidden=!0)},g.onclick=()=>{E||(t.moveDownNode(),S.hidden=!0)};const I=O=>{S.hidden=!0;const $=t.currentNode,K=r(i.clickTips);t.container.appendChild(K),t.map.addEventListener("click",G=>{G.preventDefault(),K.remove();const pe=G.target;(pe.parentElement.tagName==="ME-PARENT"||pe.parentElement.tagName==="ME-ROOT")&&t.createArrow($,pe,O)},{once:!0})};return b.onclick=()=>I(),y.onclick=()=>I({bidirectional:!0}),w.onclick=()=>{S.hidden=!0,t.createSummary(),t.unselectNodes(t.currentNodes)},()=>{a.onclick=null,o.onclick=null,l.onclick=null,c.onclick=null,d.onclick=null,f.onclick=null,p.onclick=null,g.onclick=null,b.onclick=null,w.onclick=null,S.onclick=null,t.container.oncontextmenu=null}}const Qi=document,Cp=function(t,e){if(!e)return ea(t),t;let r=t.querySelector(".insert-preview");const n=`insert-preview ${e} show`;return r||(r=Qi.createElement("div"),t.appendChild(r)),r.className=n,t},ea=function(t){if(!t)return;const e=t.querySelectorAll(".insert-preview");for(const r of e||[])r.remove()},gl=function(t,e){for(const r of e){const n=r.parentElement.parentElement.contains(t);if(!(t&&t.tagName==="ME-TPC"&&t!==r&&!n&&t.nodeObj.parent))return!1}return!0},Mp=function(t){const e=document.createElement("div");return e.className="mind-elixir-ghost",t.container.appendChild(e),e};class Np{constructor(e){_0(this,"mind"),_0(this,"isMoving",!1),_0(this,"interval",null),_0(this,"speed",20),this.mind=e}move(e,r){this.isMoving||(this.isMoving=!0,this.interval=setInterval(()=>{this.mind.move(e*this.speed*this.mind.scaleVal,r*this.speed*this.mind.scaleVal)},100))}stop(){this.isMoving=!1,clearInterval(this.interval)}}function Dp(t){let e=null,r=null;const n=Mp(t),s=new Np(t),i=l=>{t.selection.cancel();const c=l.target;if((c==null?void 0:c.tagName)!=="ME-TPC"){l.preventDefault();return}let d=t.currentNodes;d!=null&&d.includes(c)||(t.selectNode(c),d=t.currentNodes),t.dragged=d,d.length>1?n.innerHTML=d.length+"":n.innerHTML=c.innerHTML;for(const f of d)f.parentElement.parentElement.style.opacity="0.5";l.dataTransfer.setDragImage(n,0,0),l.dataTransfer.dropEffect="move",t.dragMoveHelper.clear()},a=l=>{const{dragged:c}=t;if(!c)return;s.stop();for(const f of c)f.parentElement.parentElement.style.opacity="1";const d=l.target;d.style.opacity="",r&&(ea(r),e==="before"?t.moveNodeBefore(c,r):e==="after"?t.moveNodeAfter(c,r):e==="in"&&t.moveNodeIn(c,r),t.dragged=null,n.innerHTML="")},o=l=>{l.preventDefault();const c=12*t.scaleVal,{dragged:d}=t;if(!d)return;const f=t.container.getBoundingClientRect();l.clientXf.x+f.width-50?s.move(-1,0):l.clientYf.y+f.height-50?s.move(0,-1):s.stop(),ea(r);const p=Qi.elementFromPoint(l.clientX,l.clientY-c);if(gl(p,d)){r=p;const g=p.getBoundingClientRect(),b=g.y;l.clientY>b+g.height?e="after":e="in"}else{const g=Qi.elementFromPoint(l.clientX,l.clientY+c),b=g.getBoundingClientRect();if(gl(g,d)){r=g;const y=b.y;l.clientYe.id)}:{type:"nodes",value:[t.obj.id]}};function Ip(t){let e=[],r=-1,n=t.getData(),s=[];t.undo=function(){if(r>-1){const l=e[r];n=l.prev,t.refresh(l.prev);try{l.currentTarget.type==="nodes"&&(l.operation==="removeNodes"?t.selectNodes(l.currentTarget.value.map(c=>this.findEle(c))):t.selectNodes(l.currentSelected.map(c=>this.findEle(c))))}catch{}finally{r--}}},t.redo=function(){if(rthis.findEle(c))):t.selectNodes(l.currentTarget.value.map(c=>this.findEle(c))))}catch{}}};const i=function(l){if(l.name==="beginEdit")return;e=e.slice(0,r+1);const c=t.getData(),d={prev:n,operation:l.name,currentSelected:s.map(f=>f.id),currentTarget:Rp(l),next:c};e.push(d),n=c,r=e.length-1},a=function(l){(l.metaKey||l.ctrlKey)&&(l.shiftKey&&l.key==="Z"||l.key==="y")?t.redo():(l.metaKey||l.ctrlKey)&&l.key==="z"&&t.undo()},o=function(l){s=t.currentNodes.map(c=>c.nodeObj)};return t.bus.addListener("operation",i),t.bus.addListener("selectNodes",o),t.container.addEventListener("keydown",a),()=>{t.bus.removeListener("operation",i),t.bus.removeListener("selectNodes",o),t.container.removeEventListener("keydown",a)}}const _p='',Op='',Lp='',zp='',$p='',Fp='',Bp='',Pp='',Hp=t=>async e=>{var r;try{const n=`${((r=e.nodeData)==null?void 0:r.topic)||"思维导图"}_${new Date().toISOString().slice(0,10)}`,s=` .topic { font-family: Arial, sans-serif; font-size: 14px; color: #333; } .markdown-content { font-size: 12px; line-height: 1.3; } @@ -84,13 +84,44 @@ var _d=Object.defineProperty;var Od=(t,e,r)=>e in t?_d(t,e,{enumerable:!0,config .markdown-table tr:not(:last-child) td { border-bottom: 1px solid #e0e0e0; } - `,i=await e.exportSvg(!1,s);if(!i)return;const a=URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download=`${n}.${t}`,o.click(),URL.revokeObjectURL(a)}catch{alert(`导出${t.toUpperCase()}失败,请重试`)}},qp={side:_p,left:Op,right:Lp,full:zp,living:$p,zoomin:Fp,zoomout:Bp,exportSvg:Pp},Ur=(t,e)=>{const r=document.createElement("span");return r.id=t,r.innerHTML=qp[e],r};function jp(t){try{const e=document.createElement("div"),r=Ur("fullscreen","full"),n=Ur("toCenter","living"),s=Ur("zoomout","zoomout"),i=Ur("zoomin","zoomin"),a=Ur("exportSvg","exportSvg");a.title="导出SVG矢量图";const o=document.createElement("span");return o.innerText="100%",e.appendChild(r),e.appendChild(n),e.appendChild(s),e.appendChild(i),e.appendChild(a),e.className="mind-elixir-toolbar rb",r.onclick=()=>{document.fullscreenElement===t.el?(document.exitFullscreen(),setTimeout(()=>{t.el.focus()},100)):(t.el.requestFullscreen(),setTimeout(()=>{},100))},n.onclick=()=>{t.toCenter()},s.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},i.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},a.onclick=()=>{Hp("svg")(t)},setTimeout(()=>{const l=document.getElementById("exportSvg")},1e3),e}catch{const e=document.createElement("div");return e.className="mind-elixir-toolbar rb",e}}function Up(t){const e=document.createElement("div"),r=Ur("tbltl","left"),n=Ur("tbltr","right"),s=Ur("tblts","side");return e.appendChild(r),e.appendChild(n),e.appendChild(s),e.className="mind-elixir-toolbar lt",r.onclick=()=>{t.initLeft()},n.onclick=()=>{t.initRight()},s.onclick=()=>{t.initSide()},e}function Vp(t){try{if(!t.container)return;const e=jp(t),r=Up(t);t.container.append(e),t.container.append(r)}catch{}}/*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */class Wp{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(e,r){const n=this._listeners.get(e)??new Set;return this._listeners.set(e,n),n.add(r),this}removeEventListener(e,r){var n;return(n=this._listeners.get(e))==null||n.delete(r),this}dispatchEvent(e,...r){let n=!0;for(const s of this._listeners.get(e)??[])n=s(...r)!==!1&&n;return n}unbindAllListeners(){this._listeners.clear()}}const vl=(t,e="px")=>typeof t=="number"?t+e:t,Fr=({style:t},e,r)=>{if(typeof e=="object")for(const[n,s]of Object.entries(e))s!==void 0&&(t[n]=vl(s));else r!==void 0&&(t[e]=vl(r))},bl=(t=0,e=0,r=0,n=0)=>{const s={x:t,y:e,width:r,height:n,top:e,left:t,right:t+r,bottom:e+n};return{...s,toJSON:()=>JSON.stringify(s)}},Gp=t=>{let e,r=-1,n=!1;return{next:(...s)=>{e=s,n||(n=!0,r=requestAnimationFrame(()=>{t(...e),n=!1}))},cancel:()=>{cancelAnimationFrame(r),n=!1}}},yl=(t,e,r="touch")=>{switch(r){case"center":{const n=e.left+e.width/2,s=e.top+e.height/2;return n>=t.left&&n<=t.right&&s>=t.top&&s<=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}},Kp=()=>matchMedia("(hover: none), (pointer: coarse)").matches,Yp=()=>"safari"in window,ta=t=>Array.isArray(t)?t:[t],ju=t=>(e,r,n,s={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),r=ta(r),e=ta(e);for(const i of e)if(i)for(const a of r)i[t](a,n,{capture:!1,...s})},Br=ju("addEventListener"),Zt=ju("removeEventListener"),O0=t=>{var e;const{clientX:r,clientY:n,target:s}=((e=t.touches)==null?void 0:e[0])??t;return{x:r,y:n,target:s}},xn=(t,e=document)=>ta(t).map(r=>typeof r=="string"?Array.from(e.querySelectorAll(r)):r instanceof Element?r:null).flat().filter(Boolean),Xp=(t,e)=>e.some(r=>typeof r=="number"?t.button===r:typeof r=="object"?r.button!==t.button?!1:r.modifiers.every(n=>{switch(n){case"alt":return t.altKey;case"ctrl":return t.ctrlKey||t.metaKey;case"shift":return t.shiftKey}}):!1),{abs:on,max:wl,min:xl,ceil:kl}=Math,Sl=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),Uu=class extends Wp{constructor(e){var r,n,s,i,a;super(),this._selection=Sl(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=bl(),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",...e,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...e.behaviour,startThreshold:(r=e.behaviour)!=null&&r.startThreshold?typeof e.behaviour.startThreshold=="number"?e.behaviour.startThreshold:{x:10,y:10,...e.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(n=e.behaviour)==null?void 0:n.scrolling,startScrollMargins:{x:0,y:0,...(i=(s=e.behaviour)==null?void 0:s.scrolling)==null?void 0:i.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...e.features,singleTap:{allow:!0,intersect:"native",...(a=e.features)==null?void 0:a.singleTap}}};for(const d of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[d]=="function"&&(this[d]=this[d].bind(this));const{document:o,selectionAreaClass:l,selectionContainerClass:c}=this._options;this._area=o.createElement("div"),this._clippingElement=o.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(l),c&&this._clippingElement.classList.add(c),Fr(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),Fr(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=Gp(d=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",d),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(e=!0){const{document:r,features:n}=this._options,s=e?Br:Zt;s(r,"mousedown",this._onTapStart),n.touch&&s(r,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(e,r=!1){const{x:n,y:s,target:i}=O0(e),{document:a,startAreas:o,boundaries:l,features:c,behaviour:d}=this._options,f=i.getBoundingClientRect();if(e instanceof MouseEvent&&!Xp(e,d.triggers))return;const p=xn(o,a),v=xn(l,a);this._targetElement=v.find(M=>yl(M.getBoundingClientRect(),f));const b=e.composedPath(),y=p.find(M=>b.includes(M));if(this._targetBoundary=v.find(M=>b.includes(M)),!this._targetElement||!y||!this._targetBoundary||!r&&this._emitEvent("beforestart",e)===!1)return;this._areaLocation={x1:n,y1:s,x2:0,y2:0};const w=a.scrollingElement??a.body;this._scrollDelta={x:w.scrollLeft,y:w.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),Br(a,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),Br(a,["mouseup","touchcancel","touchend"],this._onTapStop),Br(a,"scroll",this._onScroll),c.deselectOnBlur&&(this._targetBoundaryScrolled=!1,Br(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(e){const{singleTap:{intersect:r},range:n}=this._options.features,s=O0(e);let i;if(r==="native")i=s.target;else if(r==="touch"){this.resolveSelectables();const{x:o,y:l}=s;i=this._selectables.find(c=>{const{right:d,left:f,top:p,bottom:v}=c.getBoundingClientRect();return of&&lp})}if(!i)return;for(this.resolveSelectables();!this._selectables.includes(i);)if(i.parentElement)i=i.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:a}=this._selection;if(this._emitEvent("start",e),e.shiftKey&&n&&this._latestElement){const o=this._latestElement,[l,c]=o.compareDocumentPosition(i)&4?[i,o]:[o,i],d=[...this._selectables.filter(f=>f.compareDocumentPosition(l)&4&&f.compareDocumentPosition(c)&2),l,c];this.select(d),this._latestElement=o}else a.includes(i)&&(a.length===1||e.ctrlKey||a.every(o=>this._selection.stored.includes(o)))?this.deselect(i):(this.select(i),this._latestElement=i)}_delayedTapMove(e){const{container:r,document:n,behaviour:{startThreshold:s}}=this._options,{x1:i,y1:a}=this._areaLocation,{x:o,y:l}=O0(e);if(typeof s=="number"&&on(o+l-(i+a))>=s||typeof s=="object"&&on(o-i)>=s.x||on(l-a)>=s.y){if(Zt(n,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",e)===!1){Zt(n,["mouseup","touchcancel","touchend"],this._onTapStop);return}Br(n,["mousemove","touchmove"],this._onTapMove,{passive:!1}),Fr(this._area,"display","block"),xn(r,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&&(Br(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),Br(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(c=>this._targetElement.contains(c))),this._setupSelectionArea(),this._emitEvent("start",e),this._onTapMove(e)}this._handleMoveEvent(e)}_setupSelectionArea(){const{_clippingElement:e,_targetElement:r,_area:n}=this,s=this._targetRect=r.getBoundingClientRect();this._scrollAvailable?(Fr(e,{top:s.top,left:s.left,width:s.width,height:s.height}),Fr(n,{marginTop:-s.top,marginLeft:-s.left})):(Fr(e,{top:0,left:0,width:"100%",height:"100%"}),Fr(n,{marginTop:0,marginLeft:0}))}_onTapMove(e){const{_scrollSpeed:r,_areaLocation:n,_options:s,_frame:i}=this,{speedDivider:a}=s.behaviour.scrolling,o=this._targetElement,{x:l,y:c}=O0(e);if(n.x2=l,n.y2=c,this._lastMousePosition.x=l,this._lastMousePosition.y=c,this._scrollAvailable&&!this._scrollingActive&&(r.y||r.x)){this._scrollingActive=!0;const d=()=>{if(!r.x&&!r.y){this._scrollingActive=!1;return}const{scrollTop:f,scrollLeft:p}=o;r.y&&(o.scrollTop+=kl(r.y/a),n.y1-=o.scrollTop-f),r.x&&(o.scrollLeft+=kl(r.x/a),n.x1-=o.scrollLeft-p),i.next(e),requestAnimationFrame(d)};requestAnimationFrame(d)}else i.next(e);this._handleMoveEvent(e)}_handleMoveEvent(e){const{features:r}=this._options;(r.touch&&Kp()||this._scrollAvailable&&Yp())&&e.preventDefault()}_onScroll(){const{_scrollDelta:e,_options:{document:r}}=this,{scrollTop:n,scrollLeft:s}=r.scrollingElement??r.body;this._areaLocation.x1+=e.x-s,this._areaLocation.y1+=e.y-n,e.x=s,e.y=n,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,Zt(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(e){const{manualSpeed:r}=this._options.behaviour.scrolling,n=e.deltaY?e.deltaY>0?1:-1:0,s=e.deltaX?e.deltaX>0?1:-1:0;this._scrollSpeed.y+=n*r,this._scrollSpeed.x+=s*r,this._onTapMove(e),e.preventDefault()}_keyboardScroll(e){const{manualSpeed:r}=this._options.behaviour.scrolling,n=e.key==="ArrowLeft"?-1:e.key==="ArrowRight"?1:0,s=e.key==="ArrowUp"?-1:e.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(n)*r,this._scrollSpeed.y+=Math.sign(s)*r,e.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:e,_areaLocation:r,_targetElement:n,_options:s}=this,{scrollTop:i,scrollHeight:a,clientHeight:o,scrollLeft:l,scrollWidth:c,clientWidth:d}=n,f=this._targetRect,{x1:p,y1:v}=r;let{x2:b,y2:y}=r;const{behaviour:{scrolling:{startScrollMargins:w}}}=s;bf.right-w.x?(e.x=c-l-d?on(f.left+f.width-b-w.x):0,b=b>f.right?f.right:b):e.x=0,yf.bottom-w.y?(e.y=a-i-o?on(f.top+f.height-y-w.y):0,y=y>f.bottom?f.bottom:y):e.y=0;const M=xl(p,b),S=xl(v,y),E=wl(p,b),D=wl(v,y);this._areaRect=bl(M,S,E-M,D-S)}_redrawSelectionArea(){const{x:e,y:r,width:n,height:s}=this._areaRect,{style:i}=this._area;i.left=`${e}px`,i.top=`${r}px`,i.width=`${n}px`,i.height=`${s}px`}_onTapStop(e,r){var n;const{document:s,features:i}=this._options,{_singleClick:a}=this;Zt(this._targetElement,"scroll",this._onStartAreaScroll),Zt(s,["mousemove","touchmove"],this._delayedTapMove),Zt(s,["touchmove","mousemove"],this._onTapMove),Zt(s,["mouseup","touchcancel","touchend"],this._onTapStop),Zt(s,"scroll",this._onScroll),this._keepSelection(),e&&a&&i.singleTap.allow?this._onSingleTap(e):!a&&!r&&(this._updateElementSelection(),this._emitEvent("stop",e)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,Zt(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),Zt(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(n=this._frame)==null||n.cancel(),Fr(this._area,"display","none")}_updateElementSelection(){const{_selectables:e,_options:r,_selection:n,_areaRect:s}=this,{stored:i,selected:a,touched:o}=n,{intersect:l,overlap:c}=r.behaviour,d=c==="invert",f=[],p=[],v=[];for(let y=0;y!a.includes(y)));const b=c==="keep";for(let y=0;y!a.includes(l));switch(e.behaviour.overlap){case"drop":{r.stored=[...o,...a.filter(l=>!i.includes(l))];break}case"invert":{r.stored=[...o,...a.filter(l=>!s.removed.includes(l))];break}case"keep":{r.stored=[...a,...n.filter(l=>!a.includes(l))];break}}}trigger(e,r=!0){this._onTapStart(e,r)}resolveSelectables(){this._selectables=xn(this._options.selectables,this._options.document)}clearSelection(e=!0,r=!1){const{selected:n,stored:s,changed:i}=this._selection;i.added=[],i.removed.push(...n,...e?s:[]),r||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=Sl(e?[]:s)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(e){Object.assign(this._areaLocation,e),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(e=!1){this._onTapStop(null,!e)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(e,r=!1){const{changed:n,selected:s,stored:i}=this._selection,a=xn(e,this._options.document).filter(o=>!s.includes(o)&&!i.includes(o));return i.push(...a),s.push(...a),n.added.push(...a),n.removed=[],this._latestElement=void 0,r||(this._emitEvent("move",null),this._emitEvent("stop",null)),a}deselect(e,r=!1){const{selected:n,stored:s,changed:i}=this._selection,a=xn(e,this._options.document).filter(o=>n.includes(o)||s.includes(o));this._selection.stored=s.filter(o=>!a.includes(o)),this._selection.selected=n.filter(o=>!a.includes(o)),this._selection.changed.added=[],this._selection.changed.removed.push(...a.filter(o=>!i.removed.includes(o))),this._latestElement=void 0,r||(this._emitEvent("move",null),this._emitEvent("stop",null))}};Uu.version="3.9.0";let Jp=Uu;function Zp(t){const e=t.mouseSelectionButton===2?[2]:[0],r=new Jp({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:n})=>{var s;const i=n.target;if(i.id==="input-box"||i.className==="circle"||(s=t.container.querySelector(".context-menu"))!=null&&s.contains(i))return!1;if(!n.ctrlKey&&!n.metaKey){if(i.tagName==="ME-TPC"&&i.classList.contains("selected"))return!1;t.clearSelection()}const a=r.getSelectionArea();return a.style.background="#4f90f22d",a.style.border="1px solid #4f90f2",a.parentElement&&(a.parentElement.style.zIndex="9999"),!0}).on("move",({store:{changed:{added:n,removed:s}}})=>{if(n.length>0||s.length>0,n.length>0){for(const i of n)i.className="selected";t.currentNodes=[...t.currentNodes,...n],t.bus.fire("selectNodes",n.map(i=>i.nodeObj))}if(s.length>0){for(const i of s)i.classList.remove("selected");t.currentNodes=t.currentNodes.filter(i=>!(s!=null&&s.includes(i))),t.bus.fire("unselectNodes",s.map(i=>i.nodeObj))}});t.selection=r}const Qp=function(t,e=!0){this.theme=t;const r={...(t.type==="dark"?qa:Ha).cssVar,...t.cssVar},n=Object.keys(r);for(let s=0;s{var e;const r=(e=t.parent)==null?void 0:e.children,n=(r==null?void 0:r.indexOf(t))??0;return{siblings:r,index:n}};function e4(t){const{siblings:e,index:r}=Fn(t);if(e===void 0)return;const n=e[r];r===0?(e[r]=e[e.length-1],e[e.length-1]=n):(e[r]=e[r-1],e[r-1]=n)}function t4(t){const{siblings:e,index:r}=Fn(t);if(e===void 0)return;const n=e[r];r===e.length-1?(e[r]=e[0],e[0]=n):(e[r]=e[r+1],e[r+1]=n)}function Vu(t){const{siblings:e,index:r}=Fn(t);return e===void 0?0:(e.splice(r,1),e.length)}function r4(t,e,r){const{siblings:n,index:s}=Fn(r);n!==void 0&&(e==="before"?n.splice(s,0,t):n.splice(s+1,0,t))}function n4(t,e){const{siblings:r,index:n}=Fn(t);r!==void 0&&(r[n]=e,e.children=[t])}function Wu(t,e,r){var n;if(Vu(e),(n=r.parent)!=null&&n.parent||(e.direction=r.direction),t==="in")r.children?r.children.push(e):r.children=[e];else{e.direction!==void 0&&(e.direction=r.direction);const{siblings:s,index:i}=Fn(r);if(s===void 0)return;t==="before"?s.splice(i,0,e):s.splice(i+1,0,e)}}const s4=function({map:t,direction:e},r){var n,s;if(e===0)return 0;if(e===1)return 1;if(e===2){const i=((n=t.querySelector(".lhs"))==null?void 0:n.childElementCount)||0,a=((s=t.querySelector(".rhs"))==null?void 0:s.childElementCount)||0;return i<=a?(r.direction=0,0):(r.direction=1,1)}},Gu=function(t,e,r){var n,s;const i=r.children[0].children[0],a=e.parentElement;if(a.tagName==="ME-PARENT"){if(w0(i),a.children[1])a.nextSibling.appendChild(r);else{const o=t.createChildren([r]);a.appendChild(Ga(!0)),a.insertAdjacentElement("afterend",o)}t.linkDiv(r.offsetParent)}else a.tagName==="ME-ROOT"&&(s4(t,i.nodeObj)===0?(n=t.container.querySelector(".lhs"))==null||n.appendChild(r):(s=t.container.querySelector(".rhs"))==null||s.appendChild(r),t.linkDiv())},i4=function(t,e){const r=t.parentNode;if(e===0){const n=r.parentNode.parentNode;n.tagName!=="ME-MAIN"&&(n.previousSibling.children[1].remove(),n.remove())}r.parentNode.remove()},Ku={before:"beforebegin",after:"afterend"},w0=function(t){const e=t.parentElement.parentElement.lastElementChild;(e==null?void 0:e.tagName)==="svg"&&(e==null||e.remove())},a4=function(t,e){const r=t.nodeObj,n=Ua(r);n.style&&e.style&&(e.style=Object.assign(n.style,e.style));const s=Object.assign(r,e);Wa.call(this,t,s),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:s,origin:n})},Ka=function(t,e,r){if(!e)return null;const n=e.nodeObj;n.expanded===!1&&(t.expandNode(e,!0),e=t.findEle(n.id));const s=r||t.generateNewObj();n.children?n.children.push(s):n.children=[s],tn(t.nodeData);const{grp:i,top:a}=t.createWrapper(s);return Gu(t,e,i),{newTop:a,newNodeObj:s}},o4=function(t,e,r){var n,s,i,a;const o=e||this.currentNode;if(!o)return;const l=o.nodeObj;if(l.parent){if(!((n=l.parent)!=null&&n.parent)&&((i=(s=l.parent)==null?void 0:s.children)==null?void 0:i.length)===1&&this.direction===2){this.addChild(this.findEle(l.parent.id),r);return}}else{this.addChild();return}const c=r||this.generateNewObj();if(!((a=l.parent)!=null&&a.parent)){const v=o.closest("me-main").className===sr.LHS?0:1;c.direction=v}r4(c,t,l),tn(this.nodeData);const d=o.parentElement,{grp:f,top:p}=this.createWrapper(c);d.parentElement.insertAdjacentElement(Ku[t],f),this.linkDiv(f.offsetParent),r||this.editTopic(p.firstChild),this.bus.fire("operation",{name:"insertSibling",type:t,obj:c}),this.selectNode(p.firstChild,!0)},l4=function(t,e){const r=t||this.currentNode;if(!r)return;w0(r);const n=r.nodeObj;if(!n.parent)return;const s=e||this.generateNewObj();n4(n,s),tn(this.nodeData);const i=r.parentElement.parentElement,{grp:a,top:o}=this.createWrapper(s,!0);o.appendChild(Ga(!0)),i.insertAdjacentElement("afterend",a);const l=this.createChildren([i]);o.insertAdjacentElement("afterend",l),this.linkDiv(),e||this.editTopic(o.firstChild),this.selectNode(o.firstChild,!0),this.bus.fire("operation",{name:"insertParent",obj:s})},c4=function(t,e){const r=t||this.currentNode;if(!r)return;const n=Ka(this,r,e);if(!n)return;const{newTop:s,newNodeObj:i}=n;this.bus.fire("operation",{name:"addChild",obj:i}),e||this.editTopic(s.firstChild),this.selectNode(s.firstChild,!0)},u4=function(t,e){const r=Ua(t.nodeObj);ja(r);const n=Ka(this,e,r);if(!n)return;const{newNodeObj:s}=n;this.selectNode(this.findEle(s.id)),this.bus.fire("operation",{name:"copyNode",obj:s})},d4=function(t,e){t=qs(t);const r=[];for(let n=0;nthis.findEle(n.id))),this.bus.fire("operation",{name:"copyNodes",objs:r})},h4=function(t){const e=t||this.currentNode;if(!e)return;const r=e.nodeObj;e4(r);const n=e.parentNode.parentNode;n.parentNode.insertBefore(n,n.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:r})},f4=function(t){const e=t||this.currentNode;if(!e)return;const r=e.nodeObj;t4(r);const n=e.parentNode.parentNode;n.nextSibling?n.nextSibling.insertAdjacentElement("afterend",n):n.parentNode.prepend(n),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:r})},p4=function(t){if(t.length===0)return;t=qs(t);for(const r of t){const n=r.nodeObj,s=Vu(n);i4(r,s)}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(r=>r.nodeObj)})},m4=function(t,e){t=qs(t);const r=e.nodeObj;r.expanded===!1&&(this.expandNode(e,!0),e=this.findEle(r.id));for(const n of t){const s=n.nodeObj;Wu("in",s,r),tn(this.nodeData);const i=n.parentElement;Gu(this,e,i.parentElement)}this.linkDiv(),this.bus.fire("operation",{name:"moveNodeIn",objs:t.map(n=>n.nodeObj),toObj:r})},Yu=(t,e,r,n)=>{t=qs(t),e==="after"&&(t=t.reverse());const s=r.nodeObj,i=[];for(const a of t){const o=a.nodeObj;Wu(e,o,s),tn(n.nodeData),w0(a);const l=a.parentElement.parentNode;i.includes(l.parentElement)||i.push(l.parentElement),r.parentElement.parentNode.insertAdjacentElement(Ku[e],l)}for(const a of i)a.childElementCount===0&&a.tagName!=="ME-MAIN"&&(a.previousSibling.children[1].remove(),a.remove());n.linkDiv(),n.bus.fire("operation",{name:e==="before"?"moveNodeBefore":"moveNodeAfter",objs:t.map(a=>a.nodeObj),toObj:s})},g4=function(t,e){Yu(t,"before",e,this)},v4=function(t,e){Yu(t,"after",e,this)},b4=function(t){const e=t||this.currentNode;e&&(e.nodeObj.dangerouslySetInnerHTML||this.editTopic(e))},y4=function(t,e){t.text.textContent=e,t.nodeObj.topic=e,this.linkDiv()},Xu=Object.freeze(Object.defineProperty({__proto__:null,addChild:c4,beginEdit:b4,copyNode:u4,copyNodes:d4,insertParent:l4,insertSibling:o4,moveDownNode:f4,moveNodeAfter:v4,moveNodeBefore:g4,moveNodeIn:m4,moveUpNode:h4,removeNodes:p4,reshapeNode:a4,rmSubline:w0,setNodeTopic:y4},Symbol.toStringTag,{value:"Module"}));function w4(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,arrows:t.arrows,summaries:t.summaries,direction:t.direction,theme:t.theme}}const x4=function(t){const e=this.container,r=t.getBoundingClientRect(),n=e.getBoundingClientRect();if(r.top>n.bottom||r.bottomn.right||r.right{if(!(e==="parent"&&typeof r!="string"))return r})},C4=function(){return JSON.parse(this.getDataString())},M4=function(){this.editable=!0},N4=function(){this.editable=!1},D4=function(t,e={x:0,y:0}){if(tthis.scaleMax)return;const r=this.container.getBoundingClientRect(),n=e.x?e.x-r.left-r.width/2:0,s=e.y?e.y-r.top-r.height/2:0,{dx:i,dy:a}=Ju(this),o=this.map.style.transform,{x:l,y:c}=$u(o),d=l-i,f=c-a,p=this.scaleVal,v=(-n+d)*(1-t/p),b=(-s+f)*(1-t/p);this.map.style.transform=`translate(${l-v}px, ${c-b}px) scale(${t})`,this.scaleVal=t,this.bus.fire("scale",t)},R4=function(){const t=this.nodes.offsetHeight/this.container.offsetHeight,e=this.nodes.offsetWidth/this.container.offsetWidth,r=1/Math.max(1,Math.max(t,e));this.scaleVal=r,this.map.style.transform="scale("+r+")",this.bus.fire("scale",r)},I4=function(t,e,r=!1){const{map:n,scaleVal:s,bus:i}=this,a=n.style.transform;let{x:o,y:l}=$u(a);o+=t,l+=e,r&&(n.style.transition="transform 0.3s",setTimeout(()=>{n.style.transition="none"},300)),n.style.transform=`translate(${o}px, ${l}px) scale(${s})`,i.fire("move",{dx:t,dy:e})},Ju=t=>{const{container:e,map:r,nodes:n}=t,s=r.querySelector("me-root"),i=s.offsetTop,a=s.offsetLeft,o=s.offsetWidth,l=s.offsetHeight;let c,d;return t.alignment==="root"?(c=e.offsetWidth/2-a-o/2,d=e.offsetHeight/2-i-l/2,r.style.transformOrigin=`${a+o/2}px 50%`):(c=(e.offsetWidth-n.offsetWidth)/2,d=(e.offsetHeight-n.offsetHeight)/2,r.style.transformOrigin="50% 50%"),{dx:c,dy:d}},_4=function(){const{map:t}=this,{dx:e,dy:r}=Ju(this);t.style.transform=`translate(${e}px, ${r}px) scale(${this.scaleVal})`},O4=function(t){t(this)},L4=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())},z4=function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},$4=function(){this.direction=0,this.refresh(),this.toCenter()},F4=function(){this.direction=1,this.refresh(),this.toCenter()},B4=function(){this.direction=2,this.refresh(),this.toCenter()},P4=function(t){this.locale=t,this.refresh()},H4=function(t,e){const r=t.nodeObj;typeof e=="boolean"?r.expanded=e:r.expanded!==!1?r.expanded=!1:r.expanded=!0;const n=t.getBoundingClientRect(),s={x:n.left,y:n.top},i=t.parentNode,a=i.children[1];if(a.expanded=r.expanded,a.className=r.expanded?"minus":"",w0(t),r.expanded){const f=this.createChildren(r.children.map(p=>this.createWrapper(p).grp));i.parentNode.appendChild(f)}else i.parentNode.children[1].remove();this.linkDiv(t.closest("me-main > me-wrapper"));const o=t.getBoundingClientRect(),l={x:o.left,y:o.top},c=s.x-l.x,d=s.y-l.y;this.move(c,d),this.bus.fire("expandNode",r)},q4=function(t,e){const r=t.nodeObj,n=t.getBoundingClientRect(),s={x:n.left,y:n.top};In(r,e??!r.expanded),this.refresh();const i=this.findEle(r.id).getBoundingClientRect(),a={x:i.left,y:i.top},o=s.x-a.x,l=s.y-a.y;this.move(o,l)},j4=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)),tn(this.nodeData),this.layout(),this.linkDiv()},U4=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:z4,clearSelection:E4,disableEdit:N4,enableEdit:M4,expandNode:H4,expandNodeAll:q4,focusNode:L4,getData:C4,getDataString:A4,initLeft:$4,initRight:F4,initSide:B4,install:O4,move:I4,refresh:j4,scale:D4,scaleFit:R4,scrollIntoView:x4,selectNode:k4,selectNodes:S4,setLocale:P4,toCenter:_4,unselectNodes:T4},Symbol.toStringTag,{value:"Module"})),V4=function(t){return{dom:t,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(e){if(this.pointerdown){this.moved=!0;const r=e.clientX-this.lastX,n=e.clientY-this.lastY;this.lastX=e.clientX,this.lastY=e.clientY,this.cb&&this.cb(r,n)}},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,r){this.cb=r,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=Va([{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}}},Tl={create:V4},W4="#4dc4ff";function Zu(t,e,r,n,s,i,a,o){return{x:t/8+r*3/8+s*3/8+a/8,y:e/8+n*3/8+i*3/8+o/8}}function G4(t,e,r){vt(t,{x:e+"",y:r+""})}function L0(t,e,r,n,s){vt(t,{x1:e+"",y1:r+"",x2:n+"",y2:s+""})}function El(t,e,r,n,s,i,a,o,l,c){var d;const f=`M ${e} ${r} C ${n} ${s} ${i} ${a} ${o} ${l}`;if(t.line.setAttribute("d",f),c.style){const w=c.style;w.stroke&&t.line.setAttribute("stroke",w.stroke),w.strokeWidth&&t.line.setAttribute("stroke-width",String(w.strokeWidth)),w.strokeDasharray&&t.line.setAttribute("stroke-dasharray",w.strokeDasharray),w.strokeLinecap&&t.line.setAttribute("stroke-linecap",w.strokeLinecap),w.opacity!==void 0&&t.line.setAttribute("opacity",String(w.opacity))}const p=t.querySelectorAll('path[stroke="transparent"]');p.length>0&&p[0].setAttribute("d",f);const v=vs(i,a,o,l);if(v){const w=`M ${v.x1} ${v.y1} L ${o} ${l} L ${v.x2} ${v.y2}`;if(t.arrow1.setAttribute("d",w),p.length>1&&p[1].setAttribute("d",w),c.style){const M=c.style;M.stroke&&t.arrow1.setAttribute("stroke",M.stroke),M.strokeWidth&&t.arrow1.setAttribute("stroke-width",String(M.strokeWidth)),M.strokeLinecap&&t.arrow1.setAttribute("stroke-linecap",M.strokeLinecap),M.opacity!==void 0&&t.arrow1.setAttribute("opacity",String(M.opacity))}}if(c.bidirectional){const w=vs(n,s,e,r);if(w){const M=`M ${w.x1} ${w.y1} L ${e} ${r} L ${w.x2} ${w.y2}`;if(t.arrow2.setAttribute("d",M),p.length>2&&p[2].setAttribute("d",M),c.style){const S=c.style;S.stroke&&t.arrow2.setAttribute("stroke",S.stroke),S.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(S.strokeWidth)),S.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",S.strokeLinecap),S.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(S.opacity))}}}const{x:b,y}=Zu(e,r,n,s,i,a,o,l);G4(t.label,b,y),(d=c.style)!=null&&d.labelColor&&t.label.setAttribute("fill",c.style.labelColor),tm(t)}function ws(t,e,r){const{offsetLeft:n,offsetTop:s}=rn(t.nodes,e),i=e.offsetWidth,a=e.offsetHeight,o=n+i/2,l=s+a/2,c=o+r.x,d=l+r.y;return{w:i,h:a,cx:o,cy:l,ctrlX:c,ctrlY:d}}function An(t){let e,r;const n=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);return n>t.h/t.w||n<-t.h/t.w?t.cy-t.ctrlY<0?(e=t.cx-t.h/2/n,r=t.cy+t.h/2):(e=t.cx+t.h/2/n,r=t.cy-t.h/2):t.cx-t.ctrlX<0?(e=t.cx+t.w/2,r=t.cy-t.w*n/2):(e=t.cx-t.w/2,r=t.cy+t.w*n/2),{x:e,y:r}}const Ya=function(t,e,r,n,s){var i;if(!e||!r)return;const a=ws(t,e,n.delta1),o=ws(t,r,n.delta2),{x:l,y:c}=An(a),{ctrlX:d,ctrlY:f}=a,{ctrlX:p,ctrlY:v}=o,{x:b,y}=An(o),w=vs(p,v,b,y);if(!w)return;const M=`M ${w.x1} ${w.y1} L ${b} ${y} L ${w.x2} ${w.y2}`;let S="";if(n.bidirectional){const K=vs(d,f,l,c);if(!K)return;S=`M ${K.x1} ${K.y1} L ${l} ${c} L ${K.x2} ${K.y2}`}const E=Tp(`M ${l} ${c} C ${d} ${f} ${p} ${v} ${b} ${y}`,M,S,n.style),{x:D,y:I}=Zu(l,c,d,f,p,v,b,y),O=(i=n.style)==null?void 0:i.labelColor,$=Zi(n.label,D,I,{anchor:"middle",color:O,dataType:"custom-link"});E.appendChild($),E.label=$,E.arrowObj=n,E.dataset.linkid=n.id,t.linkSvgGroup.appendChild(E),s||(t.arrows.push(n),t.currentArrow=E,Qu(t,n,a,o))},K4=function(t,e,r={}){const n={id:gn(),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},...r};Ya(this,t,e,n),this.bus.fire("operation",{name:"createArrow",obj:n})},Y4=function(t){js(this);const e={...t,id:gn()};Ya(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},X4=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;js(this);const r=e.arrowObj.id;this.arrows=this.arrows.filter(n=>n.id!==r),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:r}})},J4=function(t){this.currentArrow=t;const e=t.arrowObj,r=this.findEle(e.from),n=this.findEle(e.to),s=ws(this,r,e.delta1),i=ws(this,n,e.delta2);Qu(this,e,s,i)},Z4=function(){js(this),this.currentArrow=null},yi=function(t,e){const r=document.createElementNS(Wt,"path");return vt(r,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),r},Q4=function(t,e){const r=document.createElementNS(Wt,"g");r.setAttribute("class","arrow-highlight"),r.setAttribute("opacity","0.45");const n=yi(t.line.getAttribute("d"),e);r.appendChild(n);const s=yi(t.arrow1.getAttribute("d"),e);if(r.appendChild(s),t.arrow2.getAttribute("d")){const i=yi(t.arrow2.getAttribute("d"),e);r.appendChild(i)}t.insertBefore(r,t.firstChild)},em=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},tm=function(t){const e=t.querySelector(".arrow-highlight");if(!e)return;const r=e.querySelectorAll("path");r.length>=1&&r[0].setAttribute("d",t.line.getAttribute("d")),r.length>=2&&r[1].setAttribute("d",t.arrow1.getAttribute("d")),r.length>=3&&t.arrow2.getAttribute("d")&&r[2].setAttribute("d",t.arrow2.getAttribute("d"))},js=function(t){var e,r;(e=t.helper1)==null||e.destroy(),(r=t.helper2)==null||r.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&em(t.currentArrow)},Qu=function(t,e,r,n){const{linkController:s,P2:i,P3:a,line1:o,line2:l,nodes:c,map:d,currentArrow:f,bus:p}=t;if(!f)return;s.style.display="initial",i.style.display="initial",a.style.display="initial",c.appendChild(s),c.appendChild(i),c.appendChild(a),Q4(f,W4);let{x:v,y:b}=An(r),{ctrlX:y,ctrlY:w}=r,{ctrlX:M,ctrlY:S}=n,{x:E,y:D}=An(n);i.style.cssText=`top:${w}px;left:${y}px;`,a.style.cssText=`top:${S}px;left:${M}px;`,L0(o,v,b,y,w),L0(l,M,S,E,D),t.helper1=Tl.create(i),t.helper2=Tl.create(a),t.helper1.init(d,(I,O)=>{y=y+I/t.scaleVal,w=w+O/t.scaleVal;const $=An({...r,ctrlX:y,ctrlY:w});v=$.x,b=$.y,i.style.top=w+"px",i.style.left=y+"px",El(f,v,b,y,w,M,S,E,D,e),L0(o,v,b,y,w),e.delta1.x=y-r.cx,e.delta1.y=w-r.cy,p.fire("updateArrowDelta",e)}),t.helper2.init(d,(I,O)=>{M=M+I/t.scaleVal,S=S+O/t.scaleVal;const $=An({...n,ctrlX:M,ctrlY:S});E=$.x,D=$.y,a.style.top=S+"px",a.style.left=M+"px",El(f,v,b,y,w,M,S,E,D,e),L0(l,M,S,E,D),e.delta2.x=M-n.cx,e.delta2.y=S-n.cy,p.fire("updateArrowDelta",e)})};function rm(){this.linkSvgGroup.innerHTML="";for(let t=0;tgs(t.from,this.nodeData)&&gs(t.to,this.nodeData))}const im=Object.freeze(Object.defineProperty({__proto__:null,createArrow:K4,createArrowFrom:Y4,editArrowLabel:nm,removeArrow:X4,renderArrow:rm,selectArrow:J4,tidyArrow:sm,unselectArrow:Z4},Symbol.toStringTag,{value:"Module"})),am=function(t){var e,r;if(t.length===0)throw new Error("No selected node.");if(t.length===1){const d=t[0].nodeObj,f=t[0].nodeObj.parent;if(!f)throw new Error("Can not select root node.");const p=f.children.findIndex(v=>d===v);return{parent:f.id,start:p,end:p}}let n=0;const s=t.map(d=>{let f=d.nodeObj;const p=[];for(;f.parent;){const v=f.parent,b=v.children,y=b==null?void 0:b.indexOf(f);f=v,p.unshift({node:f,index:y})}return p.length>n&&(n=p.length),p});let i=0;e:for(;id[i-1].index).sort(),o=a[0]||0,l=a[a.length-1]||0,c=s[0][i-1].node;if(!c.parent)throw new Error("Please select nodes in the same main topic.");return{parent:c.id,start:o,end:l}},om=function(t){const e=document.createElementNS(Wt,"g");return e.setAttribute("id",t),e},Al=function(t,e){const r=document.createElementNS(Wt,"path");return vt(r,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),r},lm=t=>t.parentElement.parentElement,cm=function(t,{parent:e,start:r}){const n=t.findEle(e),s=n.nodeObj;let i;return s.parent?i=n.closest("me-main").className:i=t.findEle(s.children[r].id).closest("me-main").className,i},Xa=function(t,e){var r;const{id:n,label:s,parent:i,start:a,end:o}=e,{nodes:l,theme:c,summarySvg:d}=t,f=t.findEle(i).nodeObj,p=cm(t,e);let v=1/0,b=0,y=0,w=0;for(let K=a;K<=o;K++){const G=(r=f.children)==null?void 0:r[K];if(!G)return t.removeSummary(n),null;const pe=lm(t.findEle(G.id)),{offsetLeft:ye,offsetTop:Ee}=rn(l,pe),Ge=a===o?10:20;K===a&&(y=Ee+Ge),K===o&&(w=Ee+pe.offsetHeight-Ge),yeb&&(b=pe.offsetWidth+ye)}let M,S;const E=y+10,D=w+10,I=(E+D)/2,O=c.cssVar["--color"];p===sr.LHS?(M=Al(`M ${v+10} ${E} c -5 0 -10 5 -10 10 L ${v} ${D-10} c 0 5 5 10 10 10 M ${v} ${I} h -10`,O),S=Zi(s,v-20,I+6,{anchor:"end",color:O})):(M=Al(`M ${b-10} ${E} c 5 0 10 5 10 10 L ${b} ${D-10} c 0 5 -5 10 -10 10 M ${b} ${I} h 10`,O),S=Zi(s,b+20,I+6,{anchor:"start",color:O}));const $=om("s-"+n);return $.appendChild(M),$.appendChild(S),$.summaryObj=e,d.appendChild($),$},um=function(){if(!this.currentNodes)return;const{currentNodes:t,summaries:e,bus:r}=this,{parent:n,start:s,end:i}=am(t),a={id:gn(),parent:n,start:s,end:i,label:"summary"},o=Xa(this,a);e.push(a),this.editSummary(o),r.fire("operation",{name:"createSummary",obj:a})},dm=function(t){const e=gn(),r={...t,id:e};Xa(this,r),this.summaries.push(r),this.bus.fire("operation",{name:"createSummary",obj:r})},hm=function(t){var e;const r=this.summaries.findIndex(n=>n.id===t);r>-1&&(this.summaries.splice(r,1),(e=document.querySelector("#s-"+t))==null||e.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},fm=function(t){const e=t.children[1].getBBox(),r=6,n=3,s=document.createElementNS(Wt,"rect");vt(s,{x:e.x-r+"",y:e.y-r+"",width:e.width+r*2+"",height:e.height+r*2+"",rx:n+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),t.appendChild(s),this.currentSummary=t},pm=function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null},mm=function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{Xa(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},gm=function(t){if(!t)return;const e=t.childNodes[1];Hu(this,e,t.summaryObj)},vm=Object.freeze(Object.defineProperty({__proto__:null,createSummary:um,createSummaryFrom:dm,editSummary:gm,removeSummary:hm,renderSummary:mm,selectSummary:fm,unselectSummary:pm},Symbol.toStringTag,{value:"Module"})),Kt="http://www.w3.org/2000/svg";function bm(t,e){const r=document.createElementNS(Kt,"svg");return vt(r,{version:"1.1",xmlns:Kt,height:t,width:e}),r}function e1(t,e,r,n){const s=document.createElementNS(Kt,"g");let i="";t.text?i=t.text.textContent:i=t.childNodes[0].textContent;const a=i.split(` -`),o=parseFloat(e.lineHeight)||parseFloat(e.fontSize)*1.2,l=parseFloat(e.fontSize);return a.forEach((c,d)=>{const f=document.createElementNS(Kt,"text");vt(f,{x:r+parseInt(e.paddingLeft)+"",y:n+parseInt(e.paddingTop)+l+o*d+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),f.innerHTML=c,s.appendChild(f)}),s}function ym(t,e,r,n){return e1(t,e,r,n)}function wm(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=rn(t.nodes,e),i=document.createElementNS(Kt,"rect");return vt(i,{x:n+"",y:s+"",rx:r.borderRadius,ry:r.borderRadius,width:r.width,height:r.height,fill:r.backgroundColor,stroke:r.borderColor,"stroke-width":r.borderWidth}),i}function z0(t,e,r=!1){const n=getComputedStyle(e),{offsetLeft:s,offsetTop:i}=rn(t.nodes,e),a=document.createElementNS(Kt,"rect");vt(a,{x:s+"",y:i+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth});const o=document.createElementNS(Kt,"g");o.appendChild(a);let l;return r?l=ym(e,n,s,i):l=e1(e,n,s,i),o.appendChild(l),o}function xm(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=rn(t.nodes,e),i=document.createElementNS(Kt,"a"),a=document.createElementNS(Kt,"text");return vt(a,{x:n+"",y:s+parseInt(r.fontSize)+"","text-anchor":"start","font-family":r.fontFamily,"font-size":`${r.fontSize}`,"font-weight":`${r.fontWeight}`,fill:`${r.color}`}),a.innerHTML=e.textContent,i.appendChild(a),i.setAttribute("href",e.href),i}async function km(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=rn(t.nodes,e),i=document.createElementNS(Kt,"image"),a=t.imageProxy?t.imageProxy(e.src):e.src,o=Math.min(parseInt(r.width)||300,300),l=Math.min(parseInt(r.height)||200,200);try{const c=await Sm(a);vt(i,{x:n+"",y:s+"",width:o+"",height:l+"",href:c})}catch{vt(i,{x:n+"",y:s+"",width:o+"",height:l+"",href:a})}return i}function Sm(t){return new Promise((e,r)=>{const n=new Image;n.crossOrigin="anonymous",n.onload=()=>{try{const s=document.createElement("canvas");s.width=n.width,s.height=n.height;const i=s.getContext("2d");if(!i){r(new Error("Failed to get canvas context"));return}i.drawImage(n,0,0);const a=s.toDataURL("image/png");e(a)}catch(s){r(s)}},n.onerror=()=>{r(new Error("Failed to load image"))},n.src=t})}const $0=100,Tm='',Em=async(t,e=!1)=>{var r,n,s;const i=t.nodes,a=i.offsetHeight+$0*2,o=i.offsetWidth+$0*2,l=bm(a+"px",o+"px"),c=document.createElementNS(Kt,"svg"),d=document.createElementNS(Kt,"rect");vt(d,{x:"0",y:"0",width:`${o}`,height:`${a}`,fill:t.theme.cssVar["--bgcolor"]}),l.appendChild(d),i.querySelectorAll(".subLines").forEach(y=>{const w=y.cloneNode(!0),{offsetLeft:M,offsetTop:S}=rn(i,y.parentElement);w.setAttribute("x",`${M}`),w.setAttribute("y",`${S}`),c.appendChild(w)});const f=(r=i.querySelector(".lines"))==null?void 0:r.cloneNode(!0);f&&c.appendChild(f);const p=(n=i.querySelector(".topiclinks"))==null?void 0:n.cloneNode(!0);p&&c.appendChild(p);const v=(s=i.querySelector(".summary"))==null?void 0:s.cloneNode(!0);v&&c.appendChild(v),i.querySelectorAll("me-tpc").forEach(y=>{if(y.nodeObj.dangerouslySetInnerHTML)c.appendChild(z0(t,y,!e));else{c.appendChild(wm(t,y));const w=!!(y.text&&y.text.innerHTML&&y.text.innerHTML!==y.text.textContent);c.appendChild(z0(t,y,e?!1:w))}}),i.querySelectorAll(".tags > span").forEach(y=>{c.appendChild(z0(t,y))}),i.querySelectorAll(".icons > span").forEach(y=>{c.appendChild(z0(t,y))}),i.querySelectorAll(".hyper-link").forEach(y=>{c.appendChild(xm(t,y))});const b=Array.from(i.querySelectorAll("img")).map(async y=>await km(t,y));return(await Promise.all(b)).forEach(y=>{c.appendChild(y)}),vt(c,{x:$0+"",y:$0+"",overflow:"visible"}),l.appendChild(c),l},Am=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin",""),Tm+t.outerHTML);function Cm(t){return new Promise((e,r)=>{const n=new FileReader;n.onload=s=>{e(s.target.result)},n.onerror=s=>{r(s)},n.readAsDataURL(t)})}const Mm=async function(t=!1,e){const r=await Em(this,t),n=Am(r,e);return new Blob([n],{type:"image/svg+xml"})},Nm=async function(t=!1,e){const r=await this.exportSvg(t,e),n=await Cm(r);return new Promise((s,i)=>{const a=new Image;a.setAttribute("crossOrigin","anonymous");const o=setTimeout(()=>{i(new Error("Image loading timeout"))},1e4);a.onload=()=>{clearTimeout(o);try{const l=document.createElement("canvas");l.width=a.width,l.height=a.height;const c=l.getContext("2d");c.fillStyle="#ffffff",c.fillRect(0,0,l.width,l.height),c.drawImage(a,0,0),l.toBlob(s,"image/png",1)}catch(l){i(l)}},a.onerror=l=>{clearTimeout(o),i(l)},a.src=n})},Dm=Object.freeze(Object.defineProperty({__proto__:null,exportPng:Nm,exportSvg:Mm},Symbol.toStringTag,{value:"Module"}));function Rm(t,e){return async function(...r){const n=this.before[e];n&&!await n.apply(this,r)||t.apply(this,r)}}const Cl=Object.keys(Xu),t1={};for(let t=0;te()),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 _m({pT:t,pL:e,pW:r,pH:n,cT:s,cL:i,cW:a,cH:o,direction:l,containerHeight:c}){let d=e+r/2;const f=t+n/2;let p;l===sr.LHS?p=i+a:p=i;const v=s+o/2,b=(1-Math.abs(v-f)/c)*.25*(r/2);return l===sr.LHS?d=d-r/10-b:d=d+r/10+b,`M ${d} ${f} Q ${d} ${v} ${p} ${v}`}function Om({pT:t,pL:e,pW:r,pH:n,cT:s,cL:i,cW:a,cH:o,direction:l,isFirst:c}){const d=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let f=0,p=0;c?f=t+n/2:f=t+n;const v=s+o;let b=0,y=0,w=0;const M=Math.abs(f-v)/300*d;return l===sr.LHS?(w=e,b=w+d,y=w-d,p=i+d,`M ${b} ${f} C ${w} ${f} ${w+M} ${v} ${y} ${v} H ${p}`):(w=e+r,b=w-d,y=w+d,p=i+a-d,`M ${b} ${f} C ${w} ${f} ${w-M} ${v} ${y} ${v} H ${p}`)}const Lm="5.1.1";function zm(t){return{x:0,y:0,moved:!1,mousedown:!1,onMove(e,r){this.mousedown&&(this.moved=!0,t.move(e,r))},clear(){this.mousedown=!1}}}const Wn=document;function gt({el:t,direction:e,locale:r,draggable:n,editable:s,contextMenu:i,toolBar:a,keypress:o,mouseSelectionButton:l,selectionContainer:c,before:d,newTopicName:f,allowUndo:p,generateMainBranch:v,generateSubBranch:b,overflowHidden:y,theme:w,alignment:M,scaleSensitivity:S,scaleMax:E,scaleMin:D,handleWheel:I,markdown:O,imageProxy:$}){let K=null;const G=Object.prototype.toString.call(t);if(G==="[object HTMLDivElement]"?K=t:G==="[object String]"&&(K=document.querySelector(t)),!K)throw new Error("MindElixir: el is not a valid element");K.style.position="relative",K.innerHTML="",this.el=K,this.disposable=[],this.before=d||{},this.locale=r||"en",this.newTopicName=f||"New Node",this.contextMenu=i??!0,this.toolBar=a??!0,this.keypress=o??!0,this.mouseSelectionButton=l??0,this.direction=e??1,this.draggable=n??!0,this.editable=s??!0,this.allowUndo=p??!0,this.scaleSensitivity=S??.1,this.scaleMax=E??1.4,this.scaleMin=D??.2,this.generateMainBranch=v||_m,this.generateSubBranch=b||Om,this.overflowHidden=y??!1,this.alignment=M??"root",this.handleWheel=I??!0,this.markdown=O||void 0,this.imageProxy=$||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=zm(this),this.bus=mp(),this.container=Wn.createElement("div"),this.selectionContainer=c||this.container,this.container.className="map-container";const pe=window.matchMedia("(prefers-color-scheme: dark)");this.theme=w||(pe.matches?qa:Ha);const ye=Wn.createElement("div");ye.className="map-canvas",this.map=ye,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=Wn.createElement("me-nodes"),this.lines=Jn("lines"),this.summarySvg=Jn("summary"),this.linkController=Jn("linkcontroller"),this.P2=Wn.createElement("div"),this.P3=Wn.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=fl(),this.line2=fl(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=Jn("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(pp(this))}gt.prototype=Im;Object.defineProperty(gt.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0});gt.LEFT=0;gt.RIGHT=1;gt.SIDE=2;gt.THEME=Ha;gt.DARK_THEME=qa;gt.version=Lm;gt.E=Fu;gt.new=t=>({nodeData:{id:gn(),topic:t||"new topic",children:[]}});function r1(t,e){return function(){return t.apply(e,arguments)}}const{toString:$m}=Object.prototype,{getPrototypeOf:Ja}=Object,{iterator:Us,toStringTag:n1}=Symbol,Vs=(t=>e=>{const r=$m.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ir=t=>(t=t.toLowerCase(),e=>Vs(e)===t),Ws=t=>e=>typeof e===t,{isArray:Bn}=Array,p0=Ws("undefined");function x0(t){return t!==null&&!p0(t)&&t.constructor!==null&&!p0(t.constructor)&&Ot(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const s1=ir("ArrayBuffer");function Fm(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&s1(t.buffer),e}const Bm=Ws("string"),Ot=Ws("function"),i1=Ws("number"),k0=t=>t!==null&&typeof t=="object",Pm=t=>t===!0||t===!1,ts=t=>{if(Vs(t)!=="object")return!1;const e=Ja(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(n1 in t)&&!(Us in t)},Hm=t=>{if(!k0(t)||x0(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},qm=ir("Date"),jm=ir("File"),Um=ir("Blob"),Vm=ir("FileList"),Wm=t=>k0(t)&&Ot(t.pipe),Gm=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ot(t.append)&&((e=Vs(t))==="formdata"||e==="object"&&Ot(t.toString)&&t.toString()==="[object FormData]"))},Km=ir("URLSearchParams"),[Ym,Xm,Jm,Zm]=["ReadableStream","Request","Response","Headers"].map(ir),Qm=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function S0(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,s;if(typeof t!="object"&&(t=[t]),Bn(t))for(n=0,s=t.length;n0;)if(s=r[n],e===s.toLowerCase())return s;return null}const dn=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),o1=t=>!p0(t)&&t!==dn;function ra(){const{caseless:t}=o1(this)&&this||{},e={},r=(n,s)=>{const i=t&&a1(e,s)||s;ts(e[i])&&ts(n)?e[i]=ra(e[i],n):ts(n)?e[i]=ra({},n):Bn(n)?e[i]=n.slice():e[i]=n};for(let n=0,s=arguments.length;n(S0(e,(s,i)=>{r&&Ot(s)?t[i]=r1(s,r):t[i]=s},{allOwnKeys:n}),t),t2=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),r2=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},n2=(t,e,r,n)=>{let s,i,a;const o={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)a=s[i],(!n||n(a,t,e))&&!o[a]&&(e[a]=t[a],o[a]=!0);t=r!==!1&&Ja(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},s2=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},i2=t=>{if(!t)return null;if(Bn(t))return t;let e=t.length;if(!i1(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},a2=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ja(Uint8Array)),o2=(t,e)=>{const n=(t&&t[Us]).call(t);let s;for(;(s=n.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},l2=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},c2=ir("HTMLFormElement"),u2=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Ml=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),d2=ir("RegExp"),l1=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};S0(r,(s,i)=>{let a;(a=e(s,i,t))!==!1&&(n[i]=a||s)}),Object.defineProperties(t,n)},h2=t=>{l1(t,(e,r)=>{if(Ot(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(Ot(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},f2=(t,e)=>{const r={},n=s=>{s.forEach(i=>{r[i]=!0})};return Bn(t)?n(t):n(String(t).split(e)),r},p2=()=>{},m2=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function g2(t){return!!(t&&Ot(t.append)&&t[n1]==="FormData"&&t[Us])}const v2=t=>{const e=new Array(10),r=(n,s)=>{if(k0(n)){if(e.indexOf(n)>=0)return;if(x0(n))return n;if(!("toJSON"in n)){e[s]=n;const i=Bn(n)?[]:{};return S0(n,(a,o)=>{const l=r(a,s+1);!p0(l)&&(i[o]=l)}),e[s]=void 0,i}}return n};return r(t,0)},b2=ir("AsyncFunction"),y2=t=>t&&(k0(t)||Ot(t))&&Ot(t.then)&&Ot(t.catch),c1=((t,e)=>t?setImmediate:e?((r,n)=>(dn.addEventListener("message",({source:s,data:i})=>{s===dn&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),dn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ot(dn.postMessage)),w2=typeof queueMicrotask<"u"?queueMicrotask.bind(dn):typeof process<"u"&&process.nextTick||c1,x2=t=>t!=null&&Ot(t[Us]),P={isArray:Bn,isArrayBuffer:s1,isBuffer:x0,isFormData:Gm,isArrayBufferView:Fm,isString:Bm,isNumber:i1,isBoolean:Pm,isObject:k0,isPlainObject:ts,isEmptyObject:Hm,isReadableStream:Ym,isRequest:Xm,isResponse:Jm,isHeaders:Zm,isUndefined:p0,isDate:qm,isFile:jm,isBlob:Um,isRegExp:d2,isFunction:Ot,isStream:Wm,isURLSearchParams:Km,isTypedArray:a2,isFileList:Vm,forEach:S0,merge:ra,extend:e2,trim:Qm,stripBOM:t2,inherits:r2,toFlatObject:n2,kindOf:Vs,kindOfTest:ir,endsWith:s2,toArray:i2,forEachEntry:o2,matchAll:l2,isHTMLForm:c2,hasOwnProperty:Ml,hasOwnProp:Ml,reduceDescriptors:l1,freezeMethods:h2,toObjectSet:f2,toCamelCase:u2,noop:p2,toFiniteNumber:m2,findKey:a1,global:dn,isContextDefined:o1,isSpecCompliantForm:g2,toJSONObject:v2,isAsyncFn:b2,isThenable:y2,setImmediate:c1,asap:w2,isIterable:x2};function Me(t,e,r,n,s){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),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}P.inherits(Me,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:P.toJSONObject(this.config),code:this.code,status:this.status}}});const u1=Me.prototype,d1={};["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=>{d1[t]={value:t}});Object.defineProperties(Me,d1);Object.defineProperty(u1,"isAxiosError",{value:!0});Me.from=(t,e,r,n,s,i)=>{const a=Object.create(u1);return P.toFlatObject(t,a,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),Me.call(a,t.message,e,r,n,s),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const k2=null;function na(t){return P.isPlainObject(t)||P.isArray(t)}function h1(t){return P.endsWith(t,"[]")?t.slice(0,-2):t}function Nl(t,e,r){return t?t.concat(e).map(function(s,i){return s=h1(s),!r&&i?"["+s+"]":s}).join(r?".":""):e}function S2(t){return P.isArray(t)&&!t.some(na)}const T2=P.toFlatObject(P,{},null,function(e){return/^is[A-Z]/.test(e)});function Gs(t,e,r){if(!P.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=P.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,w){return!P.isUndefined(w[y])});const n=r.metaTokens,s=r.visitor||d,i=r.dots,a=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(e);if(!P.isFunction(s))throw new TypeError("visitor must be a function");function c(b){if(b===null)return"";if(P.isDate(b))return b.toISOString();if(P.isBoolean(b))return b.toString();if(!l&&P.isBlob(b))throw new Me("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(b)||P.isTypedArray(b)?l&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function d(b,y,w){let M=b;if(b&&!w&&typeof b=="object"){if(P.endsWith(y,"{}"))y=n?y:y.slice(0,-2),b=JSON.stringify(b);else if(P.isArray(b)&&S2(b)||(P.isFileList(b)||P.endsWith(y,"[]"))&&(M=P.toArray(b)))return y=h1(y),M.forEach(function(E,D){!(P.isUndefined(E)||E===null)&&e.append(a===!0?Nl([y],D,i):a===null?y:y+"[]",c(E))}),!1}return na(b)?!0:(e.append(Nl(w,y,i),c(b)),!1)}const f=[],p=Object.assign(T2,{defaultVisitor:d,convertValue:c,isVisitable:na});function v(b,y){if(!P.isUndefined(b)){if(f.indexOf(b)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(b),P.forEach(b,function(M,S){(!(P.isUndefined(M)||M===null)&&s.call(e,M,P.isString(S)?S.trim():S,y,p))===!0&&v(M,y?y.concat(S):[S])}),f.pop()}}if(!P.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Dl(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Za(t,e){this._pairs=[],t&&Gs(t,this,e)}const f1=Za.prototype;f1.append=function(e,r){this._pairs.push([e,r])};f1.toString=function(e){const r=e?function(n){return e.call(this,n,Dl)}:Dl;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function E2(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function p1(t,e,r){if(!e)return t;const n=r&&r.encode||E2;P.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let i;if(s?i=s(e,r):i=P.isURLSearchParams(e)?e.toString():new Za(e,r).toString(n),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class A2{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){P.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Rl=A2,m1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},C2=typeof URLSearchParams<"u"?URLSearchParams:Za,M2=typeof FormData<"u"?FormData:null,N2=typeof Blob<"u"?Blob:null,D2={isBrowser:!0,classes:{URLSearchParams:C2,FormData:M2,Blob:N2},protocols:["http","https","file","blob","url","data"]},Qa=typeof window<"u"&&typeof document<"u",sa=typeof navigator=="object"&&navigator||void 0,R2=Qa&&(!sa||["ReactNative","NativeScript","NS"].indexOf(sa.product)<0),I2=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),_2=Qa&&window.location.href||"http://localhost",O2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qa,hasStandardBrowserEnv:R2,hasStandardBrowserWebWorkerEnv:I2,navigator:sa,origin:_2},Symbol.toStringTag,{value:"Module"})),xt={...O2,...D2};function L2(t,e){return Gs(t,new xt.classes.URLSearchParams,{visitor:function(r,n,s,i){return xt.isNode&&P.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function z2(t){return P.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function $2(t){const e={},r=Object.keys(t);let n;const s=r.length;let i;for(n=0;n=r.length;return a=!a&&P.isArray(s)?s.length:a,l?(P.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!o):((!s[a]||!P.isObject(s[a]))&&(s[a]=[]),e(r,n,s[a],i)&&P.isArray(s[a])&&(s[a]=$2(s[a])),!o)}if(P.isFormData(t)&&P.isFunction(t.entries)){const r={};return P.forEachEntry(t,(n,s)=>{e(z2(n),s,r,0)}),r}return null}function F2(t,e,r){if(P.isString(t))try{return(e||JSON.parse)(t),P.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const eo={transitional:m1,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=P.isObject(e);if(i&&P.isHTMLForm(e)&&(e=new FormData(e)),P.isFormData(e))return s?JSON.stringify(g1(e)):e;if(P.isArrayBuffer(e)||P.isBuffer(e)||P.isStream(e)||P.isFile(e)||P.isBlob(e)||P.isReadableStream(e))return e;if(P.isArrayBufferView(e))return e.buffer;if(P.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return L2(e,this.formSerializer).toString();if((o=P.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Gs(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),F2(e)):e}],transformResponse:[function(e){const r=this.transitional||eo.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(P.isResponse(e)||P.isReadableStream(e))return e;if(e&&P.isString(e)&&(n&&!this.responseType||s)){const a=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?Me.from(o,Me.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],t=>{eo.headers[t]={}});const to=eo,B2=P.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"]),P2=t=>{const e={};let r,n,s;return t&&t.split(` + `,i=await e.exportSvg(!1,s);if(!i)return;const a=URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download=`${n}.${t}`,o.click(),URL.revokeObjectURL(a)}catch{alert(`导出${t.toUpperCase()}失败,请重试`)}},qp={side:_p,left:Op,right:Lp,full:zp,living:$p,zoomin:Fp,zoomout:Bp,exportSvg:Pp},Ur=(t,e)=>{const r=document.createElement("span");return r.id=t,r.innerHTML=qp[e],r};function jp(t){try{const e=document.createElement("div"),r=Ur("fullscreen","full"),n=Ur("toCenter","living"),s=Ur("zoomout","zoomout"),i=Ur("zoomin","zoomin"),a=Ur("exportSvg","exportSvg");a.title="导出SVG矢量图";const o=document.createElement("span");return o.innerText="100%",e.appendChild(r),e.appendChild(n),e.appendChild(s),e.appendChild(i),e.appendChild(a),e.className="mind-elixir-toolbar rb",r.onclick=()=>{document.fullscreenElement===t.el?(document.exitFullscreen(),setTimeout(()=>{t.el.focus()},100)):(t.el.requestFullscreen(),setTimeout(()=>{},100))},n.onclick=()=>{t.toCenter()},s.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},i.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},a.onclick=()=>{Hp("svg")(t)},setTimeout(()=>{const l=document.getElementById("exportSvg")},1e3),e}catch{const e=document.createElement("div");return e.className="mind-elixir-toolbar rb",e}}function Up(t){const e=document.createElement("div"),r=Ur("tbltl","left"),n=Ur("tbltr","right"),s=Ur("tblts","side");return e.appendChild(r),e.appendChild(n),e.appendChild(s),e.className="mind-elixir-toolbar lt",r.onclick=()=>{t.initLeft()},n.onclick=()=>{t.initRight()},s.onclick=()=>{t.initSide()},e}function Vp(t){try{if(!t.container)return;const e=jp(t),r=Up(t);t.container.append(e),t.container.append(r)}catch{}}/*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */class Wp{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(e,r){const n=this._listeners.get(e)??new Set;return this._listeners.set(e,n),n.add(r),this}removeEventListener(e,r){var n;return(n=this._listeners.get(e))==null||n.delete(r),this}dispatchEvent(e,...r){let n=!0;for(const s of this._listeners.get(e)??[])n=s(...r)!==!1&&n;return n}unbindAllListeners(){this._listeners.clear()}}const vl=(t,e="px")=>typeof t=="number"?t+e:t,Fr=({style:t},e,r)=>{if(typeof e=="object")for(const[n,s]of Object.entries(e))s!==void 0&&(t[n]=vl(s));else r!==void 0&&(t[e]=vl(r))},bl=(t=0,e=0,r=0,n=0)=>{const s={x:t,y:e,width:r,height:n,top:e,left:t,right:t+r,bottom:e+n};return{...s,toJSON:()=>JSON.stringify(s)}},Gp=t=>{let e,r=-1,n=!1;return{next:(...s)=>{e=s,n||(n=!0,r=requestAnimationFrame(()=>{t(...e),n=!1}))},cancel:()=>{cancelAnimationFrame(r),n=!1}}},yl=(t,e,r="touch")=>{switch(r){case"center":{const n=e.left+e.width/2,s=e.top+e.height/2;return n>=t.left&&n<=t.right&&s>=t.top&&s<=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}},Kp=()=>matchMedia("(hover: none), (pointer: coarse)").matches,Yp=()=>"safari"in window,ta=t=>Array.isArray(t)?t:[t],ju=t=>(e,r,n,s={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),r=ta(r),e=ta(e);for(const i of e)if(i)for(const a of r)i[t](a,n,{capture:!1,...s})},Br=ju("addEventListener"),Zt=ju("removeEventListener"),O0=t=>{var e;const{clientX:r,clientY:n,target:s}=((e=t.touches)==null?void 0:e[0])??t;return{x:r,y:n,target:s}},xn=(t,e=document)=>ta(t).map(r=>typeof r=="string"?Array.from(e.querySelectorAll(r)):r instanceof Element?r:null).flat().filter(Boolean),Xp=(t,e)=>e.some(r=>typeof r=="number"?t.button===r:typeof r=="object"?r.button!==t.button?!1:r.modifiers.every(n=>{switch(n){case"alt":return t.altKey;case"ctrl":return t.ctrlKey||t.metaKey;case"shift":return t.shiftKey}}):!1),{abs:on,max:wl,min:xl,ceil:kl}=Math,Sl=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),Uu=class extends Wp{constructor(e){var r,n,s,i,a;super(),this._selection=Sl(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=bl(),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",...e,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...e.behaviour,startThreshold:(r=e.behaviour)!=null&&r.startThreshold?typeof e.behaviour.startThreshold=="number"?e.behaviour.startThreshold:{x:10,y:10,...e.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(n=e.behaviour)==null?void 0:n.scrolling,startScrollMargins:{x:0,y:0,...(i=(s=e.behaviour)==null?void 0:s.scrolling)==null?void 0:i.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...e.features,singleTap:{allow:!0,intersect:"native",...(a=e.features)==null?void 0:a.singleTap}}};for(const d of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[d]=="function"&&(this[d]=this[d].bind(this));const{document:o,selectionAreaClass:l,selectionContainerClass:c}=this._options;this._area=o.createElement("div"),this._clippingElement=o.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(l),c&&this._clippingElement.classList.add(c),Fr(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),Fr(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=Gp(d=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",d),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(e=!0){const{document:r,features:n}=this._options,s=e?Br:Zt;s(r,"mousedown",this._onTapStart),n.touch&&s(r,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(e,r=!1){const{x:n,y:s,target:i}=O0(e),{document:a,startAreas:o,boundaries:l,features:c,behaviour:d}=this._options,f=i.getBoundingClientRect();if(e instanceof MouseEvent&&!Xp(e,d.triggers))return;const p=xn(o,a),g=xn(l,a);this._targetElement=g.find(M=>yl(M.getBoundingClientRect(),f));const b=e.composedPath(),y=p.find(M=>b.includes(M));if(this._targetBoundary=g.find(M=>b.includes(M)),!this._targetElement||!y||!this._targetBoundary||!r&&this._emitEvent("beforestart",e)===!1)return;this._areaLocation={x1:n,y1:s,x2:0,y2:0};const w=a.scrollingElement??a.body;this._scrollDelta={x:w.scrollLeft,y:w.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),Br(a,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),Br(a,["mouseup","touchcancel","touchend"],this._onTapStop),Br(a,"scroll",this._onScroll),c.deselectOnBlur&&(this._targetBoundaryScrolled=!1,Br(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(e){const{singleTap:{intersect:r},range:n}=this._options.features,s=O0(e);let i;if(r==="native")i=s.target;else if(r==="touch"){this.resolveSelectables();const{x:o,y:l}=s;i=this._selectables.find(c=>{const{right:d,left:f,top:p,bottom:g}=c.getBoundingClientRect();return of&&lp})}if(!i)return;for(this.resolveSelectables();!this._selectables.includes(i);)if(i.parentElement)i=i.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:a}=this._selection;if(this._emitEvent("start",e),e.shiftKey&&n&&this._latestElement){const o=this._latestElement,[l,c]=o.compareDocumentPosition(i)&4?[i,o]:[o,i],d=[...this._selectables.filter(f=>f.compareDocumentPosition(l)&4&&f.compareDocumentPosition(c)&2),l,c];this.select(d),this._latestElement=o}else a.includes(i)&&(a.length===1||e.ctrlKey||a.every(o=>this._selection.stored.includes(o)))?this.deselect(i):(this.select(i),this._latestElement=i)}_delayedTapMove(e){const{container:r,document:n,behaviour:{startThreshold:s}}=this._options,{x1:i,y1:a}=this._areaLocation,{x:o,y:l}=O0(e);if(typeof s=="number"&&on(o+l-(i+a))>=s||typeof s=="object"&&on(o-i)>=s.x||on(l-a)>=s.y){if(Zt(n,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",e)===!1){Zt(n,["mouseup","touchcancel","touchend"],this._onTapStop);return}Br(n,["mousemove","touchmove"],this._onTapMove,{passive:!1}),Fr(this._area,"display","block"),xn(r,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&&(Br(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),Br(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(c=>this._targetElement.contains(c))),this._setupSelectionArea(),this._emitEvent("start",e),this._onTapMove(e)}this._handleMoveEvent(e)}_setupSelectionArea(){const{_clippingElement:e,_targetElement:r,_area:n}=this,s=this._targetRect=r.getBoundingClientRect();this._scrollAvailable?(Fr(e,{top:s.top,left:s.left,width:s.width,height:s.height}),Fr(n,{marginTop:-s.top,marginLeft:-s.left})):(Fr(e,{top:0,left:0,width:"100%",height:"100%"}),Fr(n,{marginTop:0,marginLeft:0}))}_onTapMove(e){const{_scrollSpeed:r,_areaLocation:n,_options:s,_frame:i}=this,{speedDivider:a}=s.behaviour.scrolling,o=this._targetElement,{x:l,y:c}=O0(e);if(n.x2=l,n.y2=c,this._lastMousePosition.x=l,this._lastMousePosition.y=c,this._scrollAvailable&&!this._scrollingActive&&(r.y||r.x)){this._scrollingActive=!0;const d=()=>{if(!r.x&&!r.y){this._scrollingActive=!1;return}const{scrollTop:f,scrollLeft:p}=o;r.y&&(o.scrollTop+=kl(r.y/a),n.y1-=o.scrollTop-f),r.x&&(o.scrollLeft+=kl(r.x/a),n.x1-=o.scrollLeft-p),i.next(e),requestAnimationFrame(d)};requestAnimationFrame(d)}else i.next(e);this._handleMoveEvent(e)}_handleMoveEvent(e){const{features:r}=this._options;(r.touch&&Kp()||this._scrollAvailable&&Yp())&&e.preventDefault()}_onScroll(){const{_scrollDelta:e,_options:{document:r}}=this,{scrollTop:n,scrollLeft:s}=r.scrollingElement??r.body;this._areaLocation.x1+=e.x-s,this._areaLocation.y1+=e.y-n,e.x=s,e.y=n,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,Zt(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(e){const{manualSpeed:r}=this._options.behaviour.scrolling,n=e.deltaY?e.deltaY>0?1:-1:0,s=e.deltaX?e.deltaX>0?1:-1:0;this._scrollSpeed.y+=n*r,this._scrollSpeed.x+=s*r,this._onTapMove(e),e.preventDefault()}_keyboardScroll(e){const{manualSpeed:r}=this._options.behaviour.scrolling,n=e.key==="ArrowLeft"?-1:e.key==="ArrowRight"?1:0,s=e.key==="ArrowUp"?-1:e.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(n)*r,this._scrollSpeed.y+=Math.sign(s)*r,e.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:e,_areaLocation:r,_targetElement:n,_options:s}=this,{scrollTop:i,scrollHeight:a,clientHeight:o,scrollLeft:l,scrollWidth:c,clientWidth:d}=n,f=this._targetRect,{x1:p,y1:g}=r;let{x2:b,y2:y}=r;const{behaviour:{scrolling:{startScrollMargins:w}}}=s;bf.right-w.x?(e.x=c-l-d?on(f.left+f.width-b-w.x):0,b=b>f.right?f.right:b):e.x=0,yf.bottom-w.y?(e.y=a-i-o?on(f.top+f.height-y-w.y):0,y=y>f.bottom?f.bottom:y):e.y=0;const M=xl(p,b),S=xl(g,y),E=wl(p,b),D=wl(g,y);this._areaRect=bl(M,S,E-M,D-S)}_redrawSelectionArea(){const{x:e,y:r,width:n,height:s}=this._areaRect,{style:i}=this._area;i.left=`${e}px`,i.top=`${r}px`,i.width=`${n}px`,i.height=`${s}px`}_onTapStop(e,r){var n;const{document:s,features:i}=this._options,{_singleClick:a}=this;Zt(this._targetElement,"scroll",this._onStartAreaScroll),Zt(s,["mousemove","touchmove"],this._delayedTapMove),Zt(s,["touchmove","mousemove"],this._onTapMove),Zt(s,["mouseup","touchcancel","touchend"],this._onTapStop),Zt(s,"scroll",this._onScroll),this._keepSelection(),e&&a&&i.singleTap.allow?this._onSingleTap(e):!a&&!r&&(this._updateElementSelection(),this._emitEvent("stop",e)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,Zt(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),Zt(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(n=this._frame)==null||n.cancel(),Fr(this._area,"display","none")}_updateElementSelection(){const{_selectables:e,_options:r,_selection:n,_areaRect:s}=this,{stored:i,selected:a,touched:o}=n,{intersect:l,overlap:c}=r.behaviour,d=c==="invert",f=[],p=[],g=[];for(let y=0;y!a.includes(y)));const b=c==="keep";for(let y=0;y!a.includes(l));switch(e.behaviour.overlap){case"drop":{r.stored=[...o,...a.filter(l=>!i.includes(l))];break}case"invert":{r.stored=[...o,...a.filter(l=>!s.removed.includes(l))];break}case"keep":{r.stored=[...a,...n.filter(l=>!a.includes(l))];break}}}trigger(e,r=!0){this._onTapStart(e,r)}resolveSelectables(){this._selectables=xn(this._options.selectables,this._options.document)}clearSelection(e=!0,r=!1){const{selected:n,stored:s,changed:i}=this._selection;i.added=[],i.removed.push(...n,...e?s:[]),r||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=Sl(e?[]:s)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(e){Object.assign(this._areaLocation,e),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(e=!1){this._onTapStop(null,!e)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(e,r=!1){const{changed:n,selected:s,stored:i}=this._selection,a=xn(e,this._options.document).filter(o=>!s.includes(o)&&!i.includes(o));return i.push(...a),s.push(...a),n.added.push(...a),n.removed=[],this._latestElement=void 0,r||(this._emitEvent("move",null),this._emitEvent("stop",null)),a}deselect(e,r=!1){const{selected:n,stored:s,changed:i}=this._selection,a=xn(e,this._options.document).filter(o=>n.includes(o)||s.includes(o));this._selection.stored=s.filter(o=>!a.includes(o)),this._selection.selected=n.filter(o=>!a.includes(o)),this._selection.changed.added=[],this._selection.changed.removed.push(...a.filter(o=>!i.removed.includes(o))),this._latestElement=void 0,r||(this._emitEvent("move",null),this._emitEvent("stop",null))}};Uu.version="3.9.0";let Jp=Uu;function Zp(t){const e=t.mouseSelectionButton===2?[2]:[0],r=new Jp({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:n})=>{var s;const i=n.target;if(i.id==="input-box"||i.className==="circle"||(s=t.container.querySelector(".context-menu"))!=null&&s.contains(i))return!1;if(!n.ctrlKey&&!n.metaKey){if(i.tagName==="ME-TPC"&&i.classList.contains("selected"))return!1;t.clearSelection()}const a=r.getSelectionArea();return a.style.background="#4f90f22d",a.style.border="1px solid #4f90f2",a.parentElement&&(a.parentElement.style.zIndex="9999"),!0}).on("move",({store:{changed:{added:n,removed:s}}})=>{if(n.length>0||s.length>0,n.length>0){for(const i of n)i.className="selected";t.currentNodes=[...t.currentNodes,...n],t.bus.fire("selectNodes",n.map(i=>i.nodeObj))}if(s.length>0){for(const i of s)i.classList.remove("selected");t.currentNodes=t.currentNodes.filter(i=>!(s!=null&&s.includes(i))),t.bus.fire("unselectNodes",s.map(i=>i.nodeObj))}});t.selection=r}const Qp=function(t,e=!0){this.theme=t;const r={...(t.type==="dark"?qa:Ha).cssVar,...t.cssVar},n=Object.keys(r);for(let s=0;s{var e;const r=(e=t.parent)==null?void 0:e.children,n=(r==null?void 0:r.indexOf(t))??0;return{siblings:r,index:n}};function e4(t){const{siblings:e,index:r}=Fn(t);if(e===void 0)return;const n=e[r];r===0?(e[r]=e[e.length-1],e[e.length-1]=n):(e[r]=e[r-1],e[r-1]=n)}function t4(t){const{siblings:e,index:r}=Fn(t);if(e===void 0)return;const n=e[r];r===e.length-1?(e[r]=e[0],e[0]=n):(e[r]=e[r+1],e[r+1]=n)}function Vu(t){const{siblings:e,index:r}=Fn(t);return e===void 0?0:(e.splice(r,1),e.length)}function r4(t,e,r){const{siblings:n,index:s}=Fn(r);n!==void 0&&(e==="before"?n.splice(s,0,t):n.splice(s+1,0,t))}function n4(t,e){const{siblings:r,index:n}=Fn(t);r!==void 0&&(r[n]=e,e.children=[t])}function Wu(t,e,r){var n;if(Vu(e),(n=r.parent)!=null&&n.parent||(e.direction=r.direction),t==="in")r.children?r.children.push(e):r.children=[e];else{e.direction!==void 0&&(e.direction=r.direction);const{siblings:s,index:i}=Fn(r);if(s===void 0)return;t==="before"?s.splice(i,0,e):s.splice(i+1,0,e)}}const s4=function({map:t,direction:e},r){var n,s;if(e===0)return 0;if(e===1)return 1;if(e===2){const i=((n=t.querySelector(".lhs"))==null?void 0:n.childElementCount)||0,a=((s=t.querySelector(".rhs"))==null?void 0:s.childElementCount)||0;return i<=a?(r.direction=0,0):(r.direction=1,1)}},Gu=function(t,e,r){var n,s;const i=r.children[0].children[0],a=e.parentElement;if(a.tagName==="ME-PARENT"){if(w0(i),a.children[1])a.nextSibling.appendChild(r);else{const o=t.createChildren([r]);a.appendChild(Ga(!0)),a.insertAdjacentElement("afterend",o)}t.linkDiv(r.offsetParent)}else a.tagName==="ME-ROOT"&&(s4(t,i.nodeObj)===0?(n=t.container.querySelector(".lhs"))==null||n.appendChild(r):(s=t.container.querySelector(".rhs"))==null||s.appendChild(r),t.linkDiv())},i4=function(t,e){const r=t.parentNode;if(e===0){const n=r.parentNode.parentNode;n.tagName!=="ME-MAIN"&&(n.previousSibling.children[1].remove(),n.remove())}r.parentNode.remove()},Ku={before:"beforebegin",after:"afterend"},w0=function(t){const e=t.parentElement.parentElement.lastElementChild;(e==null?void 0:e.tagName)==="svg"&&(e==null||e.remove())},a4=function(t,e){const r=t.nodeObj,n=Ua(r);n.style&&e.style&&(e.style=Object.assign(n.style,e.style));const s=Object.assign(r,e);Wa.call(this,t,s),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:s,origin:n})},Ka=function(t,e,r){if(!e)return null;const n=e.nodeObj;n.expanded===!1&&(t.expandNode(e,!0),e=t.findEle(n.id));const s=r||t.generateNewObj();n.children?n.children.push(s):n.children=[s],tn(t.nodeData);const{grp:i,top:a}=t.createWrapper(s);return Gu(t,e,i),{newTop:a,newNodeObj:s}},o4=function(t,e,r){var n,s,i,a;const o=e||this.currentNode;if(!o)return;const l=o.nodeObj;if(l.parent){if(!((n=l.parent)!=null&&n.parent)&&((i=(s=l.parent)==null?void 0:s.children)==null?void 0:i.length)===1&&this.direction===2){this.addChild(this.findEle(l.parent.id),r);return}}else{this.addChild();return}const c=r||this.generateNewObj();if(!((a=l.parent)!=null&&a.parent)){const g=o.closest("me-main").className===sr.LHS?0:1;c.direction=g}r4(c,t,l),tn(this.nodeData);const d=o.parentElement,{grp:f,top:p}=this.createWrapper(c);d.parentElement.insertAdjacentElement(Ku[t],f),this.linkDiv(f.offsetParent),r||this.editTopic(p.firstChild),this.bus.fire("operation",{name:"insertSibling",type:t,obj:c}),this.selectNode(p.firstChild,!0)},l4=function(t,e){const r=t||this.currentNode;if(!r)return;w0(r);const n=r.nodeObj;if(!n.parent)return;const s=e||this.generateNewObj();n4(n,s),tn(this.nodeData);const i=r.parentElement.parentElement,{grp:a,top:o}=this.createWrapper(s,!0);o.appendChild(Ga(!0)),i.insertAdjacentElement("afterend",a);const l=this.createChildren([i]);o.insertAdjacentElement("afterend",l),this.linkDiv(),e||this.editTopic(o.firstChild),this.selectNode(o.firstChild,!0),this.bus.fire("operation",{name:"insertParent",obj:s})},c4=function(t,e){const r=t||this.currentNode;if(!r)return;const n=Ka(this,r,e);if(!n)return;const{newTop:s,newNodeObj:i}=n;this.bus.fire("operation",{name:"addChild",obj:i}),e||this.editTopic(s.firstChild),this.selectNode(s.firstChild,!0)},u4=function(t,e){const r=Ua(t.nodeObj);ja(r);const n=Ka(this,e,r);if(!n)return;const{newNodeObj:s}=n;this.selectNode(this.findEle(s.id)),this.bus.fire("operation",{name:"copyNode",obj:s})},d4=function(t,e){t=qs(t);const r=[];for(let n=0;nthis.findEle(n.id))),this.bus.fire("operation",{name:"copyNodes",objs:r})},h4=function(t){const e=t||this.currentNode;if(!e)return;const r=e.nodeObj;e4(r);const n=e.parentNode.parentNode;n.parentNode.insertBefore(n,n.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:r})},f4=function(t){const e=t||this.currentNode;if(!e)return;const r=e.nodeObj;t4(r);const n=e.parentNode.parentNode;n.nextSibling?n.nextSibling.insertAdjacentElement("afterend",n):n.parentNode.prepend(n),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:r})},p4=function(t){if(t.length===0)return;t=qs(t);for(const r of t){const n=r.nodeObj,s=Vu(n);i4(r,s)}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(r=>r.nodeObj)})},m4=function(t,e){t=qs(t);const r=e.nodeObj;r.expanded===!1&&(this.expandNode(e,!0),e=this.findEle(r.id));for(const n of t){const s=n.nodeObj;Wu("in",s,r),tn(this.nodeData);const i=n.parentElement;Gu(this,e,i.parentElement)}this.linkDiv(),this.bus.fire("operation",{name:"moveNodeIn",objs:t.map(n=>n.nodeObj),toObj:r})},Yu=(t,e,r,n)=>{t=qs(t),e==="after"&&(t=t.reverse());const s=r.nodeObj,i=[];for(const a of t){const o=a.nodeObj;Wu(e,o,s),tn(n.nodeData),w0(a);const l=a.parentElement.parentNode;i.includes(l.parentElement)||i.push(l.parentElement),r.parentElement.parentNode.insertAdjacentElement(Ku[e],l)}for(const a of i)a.childElementCount===0&&a.tagName!=="ME-MAIN"&&(a.previousSibling.children[1].remove(),a.remove());n.linkDiv(),n.bus.fire("operation",{name:e==="before"?"moveNodeBefore":"moveNodeAfter",objs:t.map(a=>a.nodeObj),toObj:s})},g4=function(t,e){Yu(t,"before",e,this)},v4=function(t,e){Yu(t,"after",e,this)},b4=function(t){const e=t||this.currentNode;e&&(e.nodeObj.dangerouslySetInnerHTML||this.editTopic(e))},y4=function(t,e){t.text.textContent=e,t.nodeObj.topic=e,this.linkDiv()},Xu=Object.freeze(Object.defineProperty({__proto__:null,addChild:c4,beginEdit:b4,copyNode:u4,copyNodes:d4,insertParent:l4,insertSibling:o4,moveDownNode:f4,moveNodeAfter:v4,moveNodeBefore:g4,moveNodeIn:m4,moveUpNode:h4,removeNodes:p4,reshapeNode:a4,rmSubline:w0,setNodeTopic:y4},Symbol.toStringTag,{value:"Module"}));function w4(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,arrows:t.arrows,summaries:t.summaries,direction:t.direction,theme:t.theme}}const x4=function(t){const e=this.container,r=t.getBoundingClientRect(),n=e.getBoundingClientRect();if(r.top>n.bottom||r.bottomn.right||r.right{if(!(e==="parent"&&typeof r!="string"))return r})},C4=function(){return JSON.parse(this.getDataString())},M4=function(){this.editable=!0},N4=function(){this.editable=!1},D4=function(t,e={x:0,y:0}){if(tthis.scaleMax)return;const r=this.container.getBoundingClientRect(),n=e.x?e.x-r.left-r.width/2:0,s=e.y?e.y-r.top-r.height/2:0,{dx:i,dy:a}=Ju(this),o=this.map.style.transform,{x:l,y:c}=$u(o),d=l-i,f=c-a,p=this.scaleVal,g=(-n+d)*(1-t/p),b=(-s+f)*(1-t/p);this.map.style.transform=`translate(${l-g}px, ${c-b}px) scale(${t})`,this.scaleVal=t,this.bus.fire("scale",t)},R4=function(){const t=this.nodes.offsetHeight/this.container.offsetHeight,e=this.nodes.offsetWidth/this.container.offsetWidth,r=1/Math.max(1,Math.max(t,e));this.scaleVal=r,this.map.style.transform="scale("+r+")",this.bus.fire("scale",r)},I4=function(t,e,r=!1){const{map:n,scaleVal:s,bus:i}=this,a=n.style.transform;let{x:o,y:l}=$u(a);o+=t,l+=e,r&&(n.style.transition="transform 0.3s",setTimeout(()=>{n.style.transition="none"},300)),n.style.transform=`translate(${o}px, ${l}px) scale(${s})`,i.fire("move",{dx:t,dy:e})},Ju=t=>{const{container:e,map:r,nodes:n}=t,s=r.querySelector("me-root"),i=s.offsetTop,a=s.offsetLeft,o=s.offsetWidth,l=s.offsetHeight;let c,d;return t.alignment==="root"?(c=e.offsetWidth/2-a-o/2,d=e.offsetHeight/2-i-l/2,r.style.transformOrigin=`${a+o/2}px 50%`):(c=(e.offsetWidth-n.offsetWidth)/2,d=(e.offsetHeight-n.offsetHeight)/2,r.style.transformOrigin="50% 50%"),{dx:c,dy:d}},_4=function(){const{map:t}=this,{dx:e,dy:r}=Ju(this);t.style.transform=`translate(${e}px, ${r}px) scale(${this.scaleVal})`},O4=function(t){t(this)},L4=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())},z4=function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},$4=function(){this.direction=0,this.refresh(),this.toCenter()},F4=function(){this.direction=1,this.refresh(),this.toCenter()},B4=function(){this.direction=2,this.refresh(),this.toCenter()},P4=function(t){this.locale=t,this.refresh()},H4=function(t,e){const r=t.nodeObj;typeof e=="boolean"?r.expanded=e:r.expanded!==!1?r.expanded=!1:r.expanded=!0;const n=t.getBoundingClientRect(),s={x:n.left,y:n.top},i=t.parentNode,a=i.children[1];if(a.expanded=r.expanded,a.className=r.expanded?"minus":"",w0(t),r.expanded){const f=this.createChildren(r.children.map(p=>this.createWrapper(p).grp));i.parentNode.appendChild(f)}else i.parentNode.children[1].remove();this.linkDiv(t.closest("me-main > me-wrapper"));const o=t.getBoundingClientRect(),l={x:o.left,y:o.top},c=s.x-l.x,d=s.y-l.y;this.move(c,d),this.bus.fire("expandNode",r)},q4=function(t,e){const r=t.nodeObj,n=t.getBoundingClientRect(),s={x:n.left,y:n.top};In(r,e??!r.expanded),this.refresh();const i=this.findEle(r.id).getBoundingClientRect(),a={x:i.left,y:i.top},o=s.x-a.x,l=s.y-a.y;this.move(o,l)},j4=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)),tn(this.nodeData),this.layout(),this.linkDiv()},U4=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:z4,clearSelection:E4,disableEdit:N4,enableEdit:M4,expandNode:H4,expandNodeAll:q4,focusNode:L4,getData:C4,getDataString:A4,initLeft:$4,initRight:F4,initSide:B4,install:O4,move:I4,refresh:j4,scale:D4,scaleFit:R4,scrollIntoView:x4,selectNode:k4,selectNodes:S4,setLocale:P4,toCenter:_4,unselectNodes:T4},Symbol.toStringTag,{value:"Module"})),V4=function(t){return{dom:t,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(e){if(this.pointerdown){this.moved=!0;const r=e.clientX-this.lastX,n=e.clientY-this.lastY;this.lastX=e.clientX,this.lastY=e.clientY,this.cb&&this.cb(r,n)}},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,r){this.cb=r,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=Va([{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}}},Tl={create:V4},W4="#4dc4ff";function Zu(t,e,r,n,s,i,a,o){return{x:t/8+r*3/8+s*3/8+a/8,y:e/8+n*3/8+i*3/8+o/8}}function G4(t,e,r){ht(t,{x:e+"",y:r+""})}function L0(t,e,r,n,s){ht(t,{x1:e+"",y1:r+"",x2:n+"",y2:s+""})}function El(t,e,r,n,s,i,a,o,l,c){var d;const f=`M ${e} ${r} C ${n} ${s} ${i} ${a} ${o} ${l}`;if(t.line.setAttribute("d",f),c.style){const w=c.style;w.stroke&&t.line.setAttribute("stroke",w.stroke),w.strokeWidth&&t.line.setAttribute("stroke-width",String(w.strokeWidth)),w.strokeDasharray&&t.line.setAttribute("stroke-dasharray",w.strokeDasharray),w.strokeLinecap&&t.line.setAttribute("stroke-linecap",w.strokeLinecap),w.opacity!==void 0&&t.line.setAttribute("opacity",String(w.opacity))}const p=t.querySelectorAll('path[stroke="transparent"]');p.length>0&&p[0].setAttribute("d",f);const g=vs(i,a,o,l);if(g){const w=`M ${g.x1} ${g.y1} L ${o} ${l} L ${g.x2} ${g.y2}`;if(t.arrow1.setAttribute("d",w),p.length>1&&p[1].setAttribute("d",w),c.style){const M=c.style;M.stroke&&t.arrow1.setAttribute("stroke",M.stroke),M.strokeWidth&&t.arrow1.setAttribute("stroke-width",String(M.strokeWidth)),M.strokeLinecap&&t.arrow1.setAttribute("stroke-linecap",M.strokeLinecap),M.opacity!==void 0&&t.arrow1.setAttribute("opacity",String(M.opacity))}}if(c.bidirectional){const w=vs(n,s,e,r);if(w){const M=`M ${w.x1} ${w.y1} L ${e} ${r} L ${w.x2} ${w.y2}`;if(t.arrow2.setAttribute("d",M),p.length>2&&p[2].setAttribute("d",M),c.style){const S=c.style;S.stroke&&t.arrow2.setAttribute("stroke",S.stroke),S.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(S.strokeWidth)),S.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",S.strokeLinecap),S.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(S.opacity))}}}const{x:b,y}=Zu(e,r,n,s,i,a,o,l);G4(t.label,b,y),(d=c.style)!=null&&d.labelColor&&t.label.setAttribute("fill",c.style.labelColor),tm(t)}function ws(t,e,r){const{offsetLeft:n,offsetTop:s}=rn(t.nodes,e),i=e.offsetWidth,a=e.offsetHeight,o=n+i/2,l=s+a/2,c=o+r.x,d=l+r.y;return{w:i,h:a,cx:o,cy:l,ctrlX:c,ctrlY:d}}function An(t){let e,r;const n=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);return n>t.h/t.w||n<-t.h/t.w?t.cy-t.ctrlY<0?(e=t.cx-t.h/2/n,r=t.cy+t.h/2):(e=t.cx+t.h/2/n,r=t.cy-t.h/2):t.cx-t.ctrlX<0?(e=t.cx+t.w/2,r=t.cy-t.w*n/2):(e=t.cx-t.w/2,r=t.cy+t.w*n/2),{x:e,y:r}}const Ya=function(t,e,r,n,s){var i;if(!e||!r)return;const a=ws(t,e,n.delta1),o=ws(t,r,n.delta2),{x:l,y:c}=An(a),{ctrlX:d,ctrlY:f}=a,{ctrlX:p,ctrlY:g}=o,{x:b,y}=An(o),w=vs(p,g,b,y);if(!w)return;const M=`M ${w.x1} ${w.y1} L ${b} ${y} L ${w.x2} ${w.y2}`;let S="";if(n.bidirectional){const K=vs(d,f,l,c);if(!K)return;S=`M ${K.x1} ${K.y1} L ${l} ${c} L ${K.x2} ${K.y2}`}const E=Tp(`M ${l} ${c} C ${d} ${f} ${p} ${g} ${b} ${y}`,M,S,n.style),{x:D,y:I}=Zu(l,c,d,f,p,g,b,y),O=(i=n.style)==null?void 0:i.labelColor,$=Zi(n.label,D,I,{anchor:"middle",color:O,dataType:"custom-link"});E.appendChild($),E.label=$,E.arrowObj=n,E.dataset.linkid=n.id,t.linkSvgGroup.appendChild(E),s||(t.arrows.push(n),t.currentArrow=E,Qu(t,n,a,o))},K4=function(t,e,r={}){const n={id:gn(),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},...r};Ya(this,t,e,n),this.bus.fire("operation",{name:"createArrow",obj:n})},Y4=function(t){js(this);const e={...t,id:gn()};Ya(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},X4=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;js(this);const r=e.arrowObj.id;this.arrows=this.arrows.filter(n=>n.id!==r),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:r}})},J4=function(t){this.currentArrow=t;const e=t.arrowObj,r=this.findEle(e.from),n=this.findEle(e.to),s=ws(this,r,e.delta1),i=ws(this,n,e.delta2);Qu(this,e,s,i)},Z4=function(){js(this),this.currentArrow=null},yi=function(t,e){const r=document.createElementNS(Gt,"path");return ht(r,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),r},Q4=function(t,e){const r=document.createElementNS(Gt,"g");r.setAttribute("class","arrow-highlight"),r.setAttribute("opacity","0.45");const n=yi(t.line.getAttribute("d"),e);r.appendChild(n);const s=yi(t.arrow1.getAttribute("d"),e);if(r.appendChild(s),t.arrow2.getAttribute("d")){const i=yi(t.arrow2.getAttribute("d"),e);r.appendChild(i)}t.insertBefore(r,t.firstChild)},em=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},tm=function(t){const e=t.querySelector(".arrow-highlight");if(!e)return;const r=e.querySelectorAll("path");r.length>=1&&r[0].setAttribute("d",t.line.getAttribute("d")),r.length>=2&&r[1].setAttribute("d",t.arrow1.getAttribute("d")),r.length>=3&&t.arrow2.getAttribute("d")&&r[2].setAttribute("d",t.arrow2.getAttribute("d"))},js=function(t){var e,r;(e=t.helper1)==null||e.destroy(),(r=t.helper2)==null||r.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&em(t.currentArrow)},Qu=function(t,e,r,n){const{linkController:s,P2:i,P3:a,line1:o,line2:l,nodes:c,map:d,currentArrow:f,bus:p}=t;if(!f)return;s.style.display="initial",i.style.display="initial",a.style.display="initial",c.appendChild(s),c.appendChild(i),c.appendChild(a),Q4(f,W4);let{x:g,y:b}=An(r),{ctrlX:y,ctrlY:w}=r,{ctrlX:M,ctrlY:S}=n,{x:E,y:D}=An(n);i.style.cssText=`top:${w}px;left:${y}px;`,a.style.cssText=`top:${S}px;left:${M}px;`,L0(o,g,b,y,w),L0(l,M,S,E,D),t.helper1=Tl.create(i),t.helper2=Tl.create(a),t.helper1.init(d,(I,O)=>{y=y+I/t.scaleVal,w=w+O/t.scaleVal;const $=An({...r,ctrlX:y,ctrlY:w});g=$.x,b=$.y,i.style.top=w+"px",i.style.left=y+"px",El(f,g,b,y,w,M,S,E,D,e),L0(o,g,b,y,w),e.delta1.x=y-r.cx,e.delta1.y=w-r.cy,p.fire("updateArrowDelta",e)}),t.helper2.init(d,(I,O)=>{M=M+I/t.scaleVal,S=S+O/t.scaleVal;const $=An({...n,ctrlX:M,ctrlY:S});E=$.x,D=$.y,a.style.top=S+"px",a.style.left=M+"px",El(f,g,b,y,w,M,S,E,D,e),L0(l,M,S,E,D),e.delta2.x=M-n.cx,e.delta2.y=S-n.cy,p.fire("updateArrowDelta",e)})};function rm(){this.linkSvgGroup.innerHTML="";for(let t=0;tgs(t.from,this.nodeData)&&gs(t.to,this.nodeData))}const im=Object.freeze(Object.defineProperty({__proto__:null,createArrow:K4,createArrowFrom:Y4,editArrowLabel:nm,removeArrow:X4,renderArrow:rm,selectArrow:J4,tidyArrow:sm,unselectArrow:Z4},Symbol.toStringTag,{value:"Module"})),am=function(t){var e,r;if(t.length===0)throw new Error("No selected node.");if(t.length===1){const d=t[0].nodeObj,f=t[0].nodeObj.parent;if(!f)throw new Error("Can not select root node.");const p=f.children.findIndex(g=>d===g);return{parent:f.id,start:p,end:p}}let n=0;const s=t.map(d=>{let f=d.nodeObj;const p=[];for(;f.parent;){const g=f.parent,b=g.children,y=b==null?void 0:b.indexOf(f);f=g,p.unshift({node:f,index:y})}return p.length>n&&(n=p.length),p});let i=0;e:for(;id[i-1].index).sort(),o=a[0]||0,l=a[a.length-1]||0,c=s[0][i-1].node;if(!c.parent)throw new Error("Please select nodes in the same main topic.");return{parent:c.id,start:o,end:l}},om=function(t){const e=document.createElementNS(Gt,"g");return e.setAttribute("id",t),e},Al=function(t,e){const r=document.createElementNS(Gt,"path");return ht(r,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),r},lm=t=>t.parentElement.parentElement,cm=function(t,{parent:e,start:r}){const n=t.findEle(e),s=n.nodeObj;let i;return s.parent?i=n.closest("me-main").className:i=t.findEle(s.children[r].id).closest("me-main").className,i},Xa=function(t,e){var r;const{id:n,label:s,parent:i,start:a,end:o}=e,{nodes:l,theme:c,summarySvg:d}=t,f=t.findEle(i).nodeObj,p=cm(t,e);let g=1/0,b=0,y=0,w=0;for(let K=a;K<=o;K++){const G=(r=f.children)==null?void 0:r[K];if(!G)return t.removeSummary(n),null;const pe=lm(t.findEle(G.id)),{offsetLeft:ye,offsetTop:Ee}=rn(l,pe),Ge=a===o?10:20;K===a&&(y=Ee+Ge),K===o&&(w=Ee+pe.offsetHeight-Ge),yeb&&(b=pe.offsetWidth+ye)}let M,S;const E=y+10,D=w+10,I=(E+D)/2,O=c.cssVar["--color"];p===sr.LHS?(M=Al(`M ${g+10} ${E} c -5 0 -10 5 -10 10 L ${g} ${D-10} c 0 5 5 10 10 10 M ${g} ${I} h -10`,O),S=Zi(s,g-20,I+6,{anchor:"end",color:O})):(M=Al(`M ${b-10} ${E} c 5 0 10 5 10 10 L ${b} ${D-10} c 0 5 -5 10 -10 10 M ${b} ${I} h 10`,O),S=Zi(s,b+20,I+6,{anchor:"start",color:O}));const $=om("s-"+n);return $.appendChild(M),$.appendChild(S),$.summaryObj=e,d.appendChild($),$},um=function(){if(!this.currentNodes)return;const{currentNodes:t,summaries:e,bus:r}=this,{parent:n,start:s,end:i}=am(t),a={id:gn(),parent:n,start:s,end:i,label:"summary"},o=Xa(this,a);e.push(a),this.editSummary(o),r.fire("operation",{name:"createSummary",obj:a})},dm=function(t){const e=gn(),r={...t,id:e};Xa(this,r),this.summaries.push(r),this.bus.fire("operation",{name:"createSummary",obj:r})},hm=function(t){var e;const r=this.summaries.findIndex(n=>n.id===t);r>-1&&(this.summaries.splice(r,1),(e=document.querySelector("#s-"+t))==null||e.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},fm=function(t){const e=t.children[1].getBBox(),r=6,n=3,s=document.createElementNS(Gt,"rect");ht(s,{x:e.x-r+"",y:e.y-r+"",width:e.width+r*2+"",height:e.height+r*2+"",rx:n+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),t.appendChild(s),this.currentSummary=t},pm=function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null},mm=function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{Xa(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},gm=function(t){if(!t)return;const e=t.childNodes[1];Hu(this,e,t.summaryObj)},vm=Object.freeze(Object.defineProperty({__proto__:null,createSummary:um,createSummaryFrom:dm,editSummary:gm,removeSummary:hm,renderSummary:mm,selectSummary:fm,unselectSummary:pm},Symbol.toStringTag,{value:"Module"})),Lt="http://www.w3.org/2000/svg";function bm(t,e){const r=document.createElementNS(Lt,"svg");return ht(r,{version:"1.1",xmlns:Lt,height:t,width:e}),r}function e1(t,e,r,n){const s=document.createElementNS(Lt,"g");let i="";t.text?i=t.text.textContent:i=t.childNodes[0].textContent;const a=i.split(` +`),o=parseFloat(e.lineHeight)||parseFloat(e.fontSize)*1.2,l=parseFloat(e.fontSize),c=parseInt(e.paddingTop)||8,d=parseInt(e.paddingLeft)||8;return a.forEach((f,p)=>{const g=document.createElementNS(Lt,"text");ht(g,{x:r+d+"",y:n+c+l+o*p+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),g.innerHTML=f,s.appendChild(g)}),s}function ym(t,e,r,n){const s=document.createElementNS(Lt,"g"),i=t,a=!!(i.text&&i.text.innerHTML&&i.text.innerHTML!==i.text.textContent),o=!!(i.text&&i.text.innerHTML&&i.text.innerHTML.includes("{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; + `})),c.querySelectorAll("ul, ol").forEach(f=>{const p=f;p.style.cssText=` + margin: 4px 0; + padding-left: 20px; + text-align: left; + `}),c.querySelectorAll("li").forEach(f=>{const p=f;p.style.cssText=` + margin: 2px 0; + line-height: 1.3; + `}),l.appendChild(c),s.appendChild(l)}else return e1(t,e,r,n);return s}function wm(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=rn(t.nodes,e),i=document.createElementNS(Lt,"rect");return ht(i,{x:n+"",y:s+"",rx:r.borderRadius,ry:r.borderRadius,width:r.width,height:r.height,fill:r.backgroundColor,stroke:r.borderColor,"stroke-width":r.borderWidth}),i}function z0(t,e,r=!1){const n=getComputedStyle(e),{offsetLeft:s,offsetTop:i}=rn(t.nodes,e),a=document.createElementNS(Lt,"rect");ht(a,{x:s+"",y:i+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth});const o=document.createElementNS(Lt,"g");o.appendChild(a);let l;return r?l=ym(e,n,s,i):l=e1(e,n,s,i),o.appendChild(l),o}function xm(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=rn(t.nodes,e),i=document.createElementNS(Lt,"a"),a=document.createElementNS(Lt,"text");return ht(a,{x:n+"",y:s+parseInt(r.fontSize)+"","text-anchor":"start","font-family":r.fontFamily,"font-size":`${r.fontSize}`,"font-weight":`${r.fontWeight}`,fill:`${r.color}`}),a.innerHTML=e.textContent,i.appendChild(a),i.setAttribute("href",e.href),i}async function km(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=rn(t.nodes,e),i=document.createElementNS(Lt,"image"),a=t.imageProxy?t.imageProxy(e.src):e.src,o=Math.min(parseInt(r.width)||300,300),l=Math.min(parseInt(r.height)||200,200);try{const c=await Sm(a);ht(i,{x:n+"",y:s+"",width:o+"",height:l+"",href:c})}catch{ht(i,{x:n+"",y:s+"",width:o+"",height:l+"",href:a})}return i}function Sm(t){return new Promise((e,r)=>{const n=new Image;n.crossOrigin="anonymous",n.onload=()=>{try{const s=document.createElement("canvas");s.width=n.width,s.height=n.height;const i=s.getContext("2d");if(!i){r(new Error("Failed to get canvas context"));return}i.drawImage(n,0,0);const a=s.toDataURL("image/png");e(a)}catch(s){r(s)}},n.onerror=()=>{r(new Error("Failed to load image"))},n.src=t})}const $0=100,Tm='',Em=async(t,e=!1)=>{var r,n,s;const i=t.nodes,a=i.offsetHeight+$0*2,o=i.offsetWidth+$0*2,l=bm(a+"px",o+"px"),c=document.createElementNS(Lt,"svg"),d=document.createElementNS(Lt,"rect");ht(d,{x:"0",y:"0",width:`${o}`,height:`${a}`,fill:t.theme.cssVar["--bgcolor"]}),l.appendChild(d),i.querySelectorAll(".subLines").forEach(y=>{const w=y.cloneNode(!0),{offsetLeft:M,offsetTop:S}=rn(i,y.parentElement);w.setAttribute("x",`${M}`),w.setAttribute("y",`${S}`),c.appendChild(w)});const f=(r=i.querySelector(".lines"))==null?void 0:r.cloneNode(!0);f&&c.appendChild(f);const p=(n=i.querySelector(".topiclinks"))==null?void 0:n.cloneNode(!0);p&&c.appendChild(p);const g=(s=i.querySelector(".summary"))==null?void 0:s.cloneNode(!0);g&&c.appendChild(g),i.querySelectorAll("me-tpc").forEach(y=>{if(y.nodeObj.dangerouslySetInnerHTML)c.appendChild(z0(t,y,!e));else{c.appendChild(wm(t,y));const w=!!(y.text&&y.text.innerHTML&&y.text.innerHTML!==y.text.textContent);c.appendChild(z0(t,y,e?!1:w))}}),i.querySelectorAll(".tags > span").forEach(y=>{c.appendChild(z0(t,y))}),i.querySelectorAll(".icons > span").forEach(y=>{c.appendChild(z0(t,y))}),i.querySelectorAll(".hyper-link").forEach(y=>{c.appendChild(xm(t,y))});const b=Array.from(i.querySelectorAll("img")).map(async y=>y.closest("me-tpc")?null:await km(t,y));return(await Promise.all(b)).forEach(y=>{y&&c.appendChild(y)}),ht(c,{x:$0+"",y:$0+"",overflow:"visible"}),l.appendChild(c),l},Am=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin",""),Tm+t.outerHTML);function Cm(t){return new Promise((e,r)=>{const n=new FileReader;n.onload=s=>{e(s.target.result)},n.onerror=s=>{r(s)},n.readAsDataURL(t)})}const Mm=async function(t=!1,e){const r=await Em(this,t),n=Am(r,e);return new Blob([n],{type:"image/svg+xml"})},Nm=async function(t=!1,e){const r=await this.exportSvg(t,e),n=await Cm(r);return new Promise((s,i)=>{const a=new Image;a.setAttribute("crossOrigin","anonymous");const o=setTimeout(()=>{i(new Error("Image loading timeout"))},1e4);a.onload=()=>{clearTimeout(o);try{const l=document.createElement("canvas");l.width=a.width,l.height=a.height;const c=l.getContext("2d");c.fillStyle="#ffffff",c.fillRect(0,0,l.width,l.height),c.drawImage(a,0,0),l.toBlob(s,"image/png",1)}catch(l){i(l)}},a.onerror=l=>{clearTimeout(o),i(l)},a.src=n})},Dm=Object.freeze(Object.defineProperty({__proto__:null,exportPng:Nm,exportSvg:Mm},Symbol.toStringTag,{value:"Module"}));function Rm(t,e){return async function(...r){const n=this.before[e];n&&!await n.apply(this,r)||t.apply(this,r)}}const Cl=Object.keys(Xu),t1={};for(let t=0;te()),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 _m({pT:t,pL:e,pW:r,pH:n,cT:s,cL:i,cW:a,cH:o,direction:l,containerHeight:c}){let d=e+r/2;const f=t+n/2;let p;l===sr.LHS?p=i+a:p=i;const g=s+o/2,b=(1-Math.abs(g-f)/c)*.25*(r/2);return l===sr.LHS?d=d-r/10-b:d=d+r/10+b,`M ${d} ${f} Q ${d} ${g} ${p} ${g}`}function Om({pT:t,pL:e,pW:r,pH:n,cT:s,cL:i,cW:a,cH:o,direction:l,isFirst:c}){const d=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let f=0,p=0;c?f=t+n/2:f=t+n;const g=s+o;let b=0,y=0,w=0;const M=Math.abs(f-g)/300*d;return l===sr.LHS?(w=e,b=w+d,y=w-d,p=i+d,`M ${b} ${f} C ${w} ${f} ${w+M} ${g} ${y} ${g} H ${p}`):(w=e+r,b=w-d,y=w+d,p=i+a-d,`M ${b} ${f} C ${w} ${f} ${w-M} ${g} ${y} ${g} H ${p}`)}const Lm="5.1.1";function zm(t){return{x:0,y:0,moved:!1,mousedown:!1,onMove(e,r){this.mousedown&&(this.moved=!0,t.move(e,r))},clear(){this.mousedown=!1}}}const Wn=document;function vt({el:t,direction:e,locale:r,draggable:n,editable:s,contextMenu:i,toolBar:a,keypress:o,mouseSelectionButton:l,selectionContainer:c,before:d,newTopicName:f,allowUndo:p,generateMainBranch:g,generateSubBranch:b,overflowHidden:y,theme:w,alignment:M,scaleSensitivity:S,scaleMax:E,scaleMin:D,handleWheel:I,markdown:O,imageProxy:$}){let K=null;const G=Object.prototype.toString.call(t);if(G==="[object HTMLDivElement]"?K=t:G==="[object String]"&&(K=document.querySelector(t)),!K)throw new Error("MindElixir: el is not a valid element");K.style.position="relative",K.innerHTML="",this.el=K,this.disposable=[],this.before=d||{},this.locale=r||"en",this.newTopicName=f||"New Node",this.contextMenu=i??!0,this.toolBar=a??!0,this.keypress=o??!0,this.mouseSelectionButton=l??0,this.direction=e??1,this.draggable=n??!0,this.editable=s??!0,this.allowUndo=p??!0,this.scaleSensitivity=S??.1,this.scaleMax=E??1.4,this.scaleMin=D??.2,this.generateMainBranch=g||_m,this.generateSubBranch=b||Om,this.overflowHidden=y??!1,this.alignment=M??"root",this.handleWheel=I??!0,this.markdown=O||void 0,this.imageProxy=$||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=zm(this),this.bus=mp(),this.container=Wn.createElement("div"),this.selectionContainer=c||this.container,this.container.className="map-container";const pe=window.matchMedia("(prefers-color-scheme: dark)");this.theme=w||(pe.matches?qa:Ha);const ye=Wn.createElement("div");ye.className="map-canvas",this.map=ye,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=Wn.createElement("me-nodes"),this.lines=Jn("lines"),this.summarySvg=Jn("summary"),this.linkController=Jn("linkcontroller"),this.P2=Wn.createElement("div"),this.P3=Wn.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=fl(),this.line2=fl(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=Jn("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(pp(this))}vt.prototype=Im;Object.defineProperty(vt.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0});vt.LEFT=0;vt.RIGHT=1;vt.SIDE=2;vt.THEME=Ha;vt.DARK_THEME=qa;vt.version=Lm;vt.E=Fu;vt.new=t=>({nodeData:{id:gn(),topic:t||"new topic",children:[]}});function r1(t,e){return function(){return t.apply(e,arguments)}}const{toString:$m}=Object.prototype,{getPrototypeOf:Ja}=Object,{iterator:Us,toStringTag:n1}=Symbol,Vs=(t=>e=>{const r=$m.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ir=t=>(t=t.toLowerCase(),e=>Vs(e)===t),Ws=t=>e=>typeof e===t,{isArray:Bn}=Array,p0=Ws("undefined");function x0(t){return t!==null&&!p0(t)&&t.constructor!==null&&!p0(t.constructor)&&Ot(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const s1=ir("ArrayBuffer");function Fm(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&s1(t.buffer),e}const Bm=Ws("string"),Ot=Ws("function"),i1=Ws("number"),k0=t=>t!==null&&typeof t=="object",Pm=t=>t===!0||t===!1,ts=t=>{if(Vs(t)!=="object")return!1;const e=Ja(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(n1 in t)&&!(Us in t)},Hm=t=>{if(!k0(t)||x0(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},qm=ir("Date"),jm=ir("File"),Um=ir("Blob"),Vm=ir("FileList"),Wm=t=>k0(t)&&Ot(t.pipe),Gm=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ot(t.append)&&((e=Vs(t))==="formdata"||e==="object"&&Ot(t.toString)&&t.toString()==="[object FormData]"))},Km=ir("URLSearchParams"),[Ym,Xm,Jm,Zm]=["ReadableStream","Request","Response","Headers"].map(ir),Qm=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function S0(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,s;if(typeof t!="object"&&(t=[t]),Bn(t))for(n=0,s=t.length;n0;)if(s=r[n],e===s.toLowerCase())return s;return null}const dn=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),o1=t=>!p0(t)&&t!==dn;function ra(){const{caseless:t}=o1(this)&&this||{},e={},r=(n,s)=>{const i=t&&a1(e,s)||s;ts(e[i])&&ts(n)?e[i]=ra(e[i],n):ts(n)?e[i]=ra({},n):Bn(n)?e[i]=n.slice():e[i]=n};for(let n=0,s=arguments.length;n(S0(e,(s,i)=>{r&&Ot(s)?t[i]=r1(s,r):t[i]=s},{allOwnKeys:n}),t),t2=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),r2=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},n2=(t,e,r,n)=>{let s,i,a;const o={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)a=s[i],(!n||n(a,t,e))&&!o[a]&&(e[a]=t[a],o[a]=!0);t=r!==!1&&Ja(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},s2=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},i2=t=>{if(!t)return null;if(Bn(t))return t;let e=t.length;if(!i1(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},a2=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ja(Uint8Array)),o2=(t,e)=>{const n=(t&&t[Us]).call(t);let s;for(;(s=n.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},l2=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},c2=ir("HTMLFormElement"),u2=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Ml=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),d2=ir("RegExp"),l1=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};S0(r,(s,i)=>{let a;(a=e(s,i,t))!==!1&&(n[i]=a||s)}),Object.defineProperties(t,n)},h2=t=>{l1(t,(e,r)=>{if(Ot(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(Ot(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},f2=(t,e)=>{const r={},n=s=>{s.forEach(i=>{r[i]=!0})};return Bn(t)?n(t):n(String(t).split(e)),r},p2=()=>{},m2=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function g2(t){return!!(t&&Ot(t.append)&&t[n1]==="FormData"&&t[Us])}const v2=t=>{const e=new Array(10),r=(n,s)=>{if(k0(n)){if(e.indexOf(n)>=0)return;if(x0(n))return n;if(!("toJSON"in n)){e[s]=n;const i=Bn(n)?[]:{};return S0(n,(a,o)=>{const l=r(a,s+1);!p0(l)&&(i[o]=l)}),e[s]=void 0,i}}return n};return r(t,0)},b2=ir("AsyncFunction"),y2=t=>t&&(k0(t)||Ot(t))&&Ot(t.then)&&Ot(t.catch),c1=((t,e)=>t?setImmediate:e?((r,n)=>(dn.addEventListener("message",({source:s,data:i})=>{s===dn&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),dn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ot(dn.postMessage)),w2=typeof queueMicrotask<"u"?queueMicrotask.bind(dn):typeof process<"u"&&process.nextTick||c1,x2=t=>t!=null&&Ot(t[Us]),P={isArray:Bn,isArrayBuffer:s1,isBuffer:x0,isFormData:Gm,isArrayBufferView:Fm,isString:Bm,isNumber:i1,isBoolean:Pm,isObject:k0,isPlainObject:ts,isEmptyObject:Hm,isReadableStream:Ym,isRequest:Xm,isResponse:Jm,isHeaders:Zm,isUndefined:p0,isDate:qm,isFile:jm,isBlob:Um,isRegExp:d2,isFunction:Ot,isStream:Wm,isURLSearchParams:Km,isTypedArray:a2,isFileList:Vm,forEach:S0,merge:ra,extend:e2,trim:Qm,stripBOM:t2,inherits:r2,toFlatObject:n2,kindOf:Vs,kindOfTest:ir,endsWith:s2,toArray:i2,forEachEntry:o2,matchAll:l2,isHTMLForm:c2,hasOwnProperty:Ml,hasOwnProp:Ml,reduceDescriptors:l1,freezeMethods:h2,toObjectSet:f2,toCamelCase:u2,noop:p2,toFiniteNumber:m2,findKey:a1,global:dn,isContextDefined:o1,isSpecCompliantForm:g2,toJSONObject:v2,isAsyncFn:b2,isThenable:y2,setImmediate:c1,asap:w2,isIterable:x2};function Me(t,e,r,n,s){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),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}P.inherits(Me,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:P.toJSONObject(this.config),code:this.code,status:this.status}}});const u1=Me.prototype,d1={};["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=>{d1[t]={value:t}});Object.defineProperties(Me,d1);Object.defineProperty(u1,"isAxiosError",{value:!0});Me.from=(t,e,r,n,s,i)=>{const a=Object.create(u1);return P.toFlatObject(t,a,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),Me.call(a,t.message,e,r,n,s),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const k2=null;function na(t){return P.isPlainObject(t)||P.isArray(t)}function h1(t){return P.endsWith(t,"[]")?t.slice(0,-2):t}function Nl(t,e,r){return t?t.concat(e).map(function(s,i){return s=h1(s),!r&&i?"["+s+"]":s}).join(r?".":""):e}function S2(t){return P.isArray(t)&&!t.some(na)}const T2=P.toFlatObject(P,{},null,function(e){return/^is[A-Z]/.test(e)});function Gs(t,e,r){if(!P.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=P.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,w){return!P.isUndefined(w[y])});const n=r.metaTokens,s=r.visitor||d,i=r.dots,a=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(e);if(!P.isFunction(s))throw new TypeError("visitor must be a function");function c(b){if(b===null)return"";if(P.isDate(b))return b.toISOString();if(P.isBoolean(b))return b.toString();if(!l&&P.isBlob(b))throw new Me("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(b)||P.isTypedArray(b)?l&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function d(b,y,w){let M=b;if(b&&!w&&typeof b=="object"){if(P.endsWith(y,"{}"))y=n?y:y.slice(0,-2),b=JSON.stringify(b);else if(P.isArray(b)&&S2(b)||(P.isFileList(b)||P.endsWith(y,"[]"))&&(M=P.toArray(b)))return y=h1(y),M.forEach(function(E,D){!(P.isUndefined(E)||E===null)&&e.append(a===!0?Nl([y],D,i):a===null?y:y+"[]",c(E))}),!1}return na(b)?!0:(e.append(Nl(w,y,i),c(b)),!1)}const f=[],p=Object.assign(T2,{defaultVisitor:d,convertValue:c,isVisitable:na});function g(b,y){if(!P.isUndefined(b)){if(f.indexOf(b)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(b),P.forEach(b,function(M,S){(!(P.isUndefined(M)||M===null)&&s.call(e,M,P.isString(S)?S.trim():S,y,p))===!0&&g(M,y?y.concat(S):[S])}),f.pop()}}if(!P.isObject(t))throw new TypeError("data must be an object");return g(t),e}function Dl(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Za(t,e){this._pairs=[],t&&Gs(t,this,e)}const f1=Za.prototype;f1.append=function(e,r){this._pairs.push([e,r])};f1.toString=function(e){const r=e?function(n){return e.call(this,n,Dl)}:Dl;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function E2(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function p1(t,e,r){if(!e)return t;const n=r&&r.encode||E2;P.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let i;if(s?i=s(e,r):i=P.isURLSearchParams(e)?e.toString():new Za(e,r).toString(n),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class A2{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){P.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Rl=A2,m1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},C2=typeof URLSearchParams<"u"?URLSearchParams:Za,M2=typeof FormData<"u"?FormData:null,N2=typeof Blob<"u"?Blob:null,D2={isBrowser:!0,classes:{URLSearchParams:C2,FormData:M2,Blob:N2},protocols:["http","https","file","blob","url","data"]},Qa=typeof window<"u"&&typeof document<"u",sa=typeof navigator=="object"&&navigator||void 0,R2=Qa&&(!sa||["ReactNative","NativeScript","NS"].indexOf(sa.product)<0),I2=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),_2=Qa&&window.location.href||"http://localhost",O2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qa,hasStandardBrowserEnv:R2,hasStandardBrowserWebWorkerEnv:I2,navigator:sa,origin:_2},Symbol.toStringTag,{value:"Module"})),xt={...O2,...D2};function L2(t,e){return Gs(t,new xt.classes.URLSearchParams,{visitor:function(r,n,s,i){return xt.isNode&&P.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function z2(t){return P.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function $2(t){const e={},r=Object.keys(t);let n;const s=r.length;let i;for(n=0;n=r.length;return a=!a&&P.isArray(s)?s.length:a,l?(P.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!o):((!s[a]||!P.isObject(s[a]))&&(s[a]=[]),e(r,n,s[a],i)&&P.isArray(s[a])&&(s[a]=$2(s[a])),!o)}if(P.isFormData(t)&&P.isFunction(t.entries)){const r={};return P.forEachEntry(t,(n,s)=>{e(z2(n),s,r,0)}),r}return null}function F2(t,e,r){if(P.isString(t))try{return(e||JSON.parse)(t),P.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const eo={transitional:m1,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=P.isObject(e);if(i&&P.isHTMLForm(e)&&(e=new FormData(e)),P.isFormData(e))return s?JSON.stringify(g1(e)):e;if(P.isArrayBuffer(e)||P.isBuffer(e)||P.isStream(e)||P.isFile(e)||P.isBlob(e)||P.isReadableStream(e))return e;if(P.isArrayBufferView(e))return e.buffer;if(P.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return L2(e,this.formSerializer).toString();if((o=P.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Gs(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),F2(e)):e}],transformResponse:[function(e){const r=this.transitional||eo.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(P.isResponse(e)||P.isReadableStream(e))return e;if(e&&P.isString(e)&&(n&&!this.responseType||s)){const a=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?Me.from(o,Me.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],t=>{eo.headers[t]={}});const to=eo,B2=P.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"]),P2=t=>{const e={};let r,n,s;return t&&t.split(` `).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!r||e[r]&&B2[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},Il=Symbol("internals");function Gn(t){return t&&String(t).trim().toLowerCase()}function rs(t){return t===!1||t==null?t:P.isArray(t)?t.map(rs):String(t)}function H2(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const q2=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function wi(t,e,r,n,s){if(P.isFunction(n))return n.call(this,e,r);if(s&&(e=r),!!P.isString(e)){if(P.isString(n))return e.indexOf(n)!==-1;if(P.isRegExp(n))return n.test(e)}}function j2(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function U2(t,e){const r=P.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(s,i,a){return this[n].call(this,e,s,i,a)},configurable:!0})})}class Ks{constructor(e){e&&this.set(e)}set(e,r,n){const s=this;function i(o,l,c){const d=Gn(l);if(!d)throw new Error("header name must be a non-empty string");const f=P.findKey(s,d);(!f||s[f]===void 0||c===!0||c===void 0&&s[f]!==!1)&&(s[f||l]=rs(o))}const a=(o,l)=>P.forEach(o,(c,d)=>i(c,d,l));if(P.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if(P.isString(e)&&(e=e.trim())&&!q2(e))a(P2(e),r);else if(P.isObject(e)&&P.isIterable(e)){let o={},l,c;for(const d of e){if(!P.isArray(d))throw TypeError("Object iterator must return a key-value pair");o[c=d[0]]=(l=o[c])?P.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}a(o,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=Gn(e),e){const n=P.findKey(this,e);if(n){const s=this[n];if(!r)return s;if(r===!0)return H2(s);if(P.isFunction(r))return r.call(this,s,n);if(P.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Gn(e),e){const n=P.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||wi(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let s=!1;function i(a){if(a=Gn(a),a){const o=P.findKey(n,a);o&&(!r||wi(n,n[o],o,r))&&(delete n[o],s=!0)}}return P.isArray(e)?e.forEach(i):i(e),s}clear(e){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const i=r[n];(!e||wi(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const r=this,n={};return P.forEach(this,(s,i)=>{const a=P.findKey(n,i);if(a){r[a]=rs(s),delete r[i];return}const o=e?j2(i):String(i).trim();o!==i&&delete r[i],r[o]=rs(s),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return P.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=e&&P.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).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,...r){const n=new this(e);return r.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[Il]=this[Il]={accessors:{}}).accessors,s=this.prototype;function i(a){const o=Gn(a);n[o]||(U2(s,a),n[o]=!0)}return P.isArray(e)?e.forEach(i):i(e),this}}Ks.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);P.reduceDescriptors(Ks.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});P.freezeMethods(Ks);const nr=Ks;function xi(t,e){const r=this||to,n=e||r,s=nr.from(n.headers);let i=n.data;return P.forEach(t,function(o){i=o.call(r,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function v1(t){return!!(t&&t.__CANCEL__)}function Pn(t,e,r){Me.call(this,t??"canceled",Me.ERR_CANCELED,e,r),this.name="CanceledError"}P.inherits(Pn,Me,{__CANCEL__:!0});function b1(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Me("Request failed with status code "+r.status,[Me.ERR_BAD_REQUEST,Me.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function V2(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function W2(t,e){t=t||10;const r=new Array(t),n=new Array(t);let s=0,i=0,a;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),d=n[i];a||(a=c),r[s]=l,n[s]=c;let f=i,p=0;for(;f!==s;)p+=r[f++],f=f%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),c-a{r=d,s=null,i&&(clearTimeout(i),i=null),t(...c)};return[(...c)=>{const d=Date.now(),f=d-r;f>=n?a(c,d):(s=c,i||(i=setTimeout(()=>{i=null,a(s)},n-f)))},()=>s&&a(s)]}const xs=(t,e,r=3)=>{let n=0;const s=W2(50,250);return G2(i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,l=a-n,c=s(l),d=a<=o;n=a;const f={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&d?(o-a)/c:void 0,event:i,lengthComputable:o!=null,[e?"download":"upload"]:!0};t(f)},r)},_l=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ol=t=>(...e)=>P.asap(()=>t(...e)),K2=xt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,xt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,Y2=xt.hasStandardBrowserEnv?{write(t,e,r,n,s,i){const a=[t+"="+encodeURIComponent(e)];P.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),P.isString(n)&&a.push("path="+n),P.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.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 X2(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function J2(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function y1(t,e,r){let n=!X2(e);return t&&(n||r==!1)?J2(t,e):e}const Ll=t=>t instanceof nr?{...t}:t;function pn(t,e){e=e||{};const r={};function n(c,d,f,p){return P.isPlainObject(c)&&P.isPlainObject(d)?P.merge.call({caseless:p},c,d):P.isPlainObject(d)?P.merge({},d):P.isArray(d)?d.slice():d}function s(c,d,f,p){if(P.isUndefined(d)){if(!P.isUndefined(c))return n(void 0,c,f,p)}else return n(c,d,f,p)}function i(c,d){if(!P.isUndefined(d))return n(void 0,d)}function a(c,d){if(P.isUndefined(d)){if(!P.isUndefined(c))return n(void 0,c)}else return n(void 0,d)}function o(c,d,f){if(f in e)return n(c,d);if(f in t)return n(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,d,f)=>s(Ll(c),Ll(d),f,!0)};return P.forEach(Object.keys({...t,...e}),function(d){const f=l[d]||s,p=f(t[d],e[d],d);P.isUndefined(p)&&f!==o||(r[d]=p)}),r}const w1=t=>{const e=pn({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:o}=e;e.headers=a=nr.from(a),e.url=p1(y1(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(P.isFormData(r)){if(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...d]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(xt.hasStandardBrowserEnv&&(n&&P.isFunction(n)&&(n=n(e)),n||n!==!1&&K2(e.url))){const c=s&&i&&Y2.read(i);c&&a.set(s,c)}return e},Z2=typeof XMLHttpRequest<"u",Q2=Z2&&function(t){return new Promise(function(r,n){const s=w1(t);let i=s.data;const a=nr.from(s.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=s,d,f,p,v,b;function y(){v&&v(),b&&b(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function M(){if(!w)return;const E=nr.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),I={data:!o||o==="text"||o==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:E,config:t,request:w};b1(function($){r($),y()},function($){n($),y()},I),w=null}"onloadend"in w?w.onloadend=M:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(M)},w.onabort=function(){w&&(n(new Me("Request aborted",Me.ECONNABORTED,t,w)),w=null)},w.onerror=function(){n(new Me("Network Error",Me.ERR_NETWORK,t,w)),w=null},w.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const I=s.transitional||m1;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),n(new Me(D,I.clarifyTimeoutError?Me.ETIMEDOUT:Me.ECONNABORTED,t,w)),w=null},i===void 0&&a.setContentType(null),"setRequestHeader"in w&&P.forEach(a.toJSON(),function(D,I){w.setRequestHeader(I,D)}),P.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),o&&o!=="json"&&(w.responseType=s.responseType),c&&([p,b]=xs(c,!0),w.addEventListener("progress",p)),l&&w.upload&&([f,v]=xs(l),w.upload.addEventListener("progress",f),w.upload.addEventListener("loadend",v)),(s.cancelToken||s.signal)&&(d=E=>{w&&(n(!E||E.type?new Pn(null,t,w):E),w.abort(),w=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const S=V2(s.url);if(S&&xt.protocols.indexOf(S)===-1){n(new Me("Unsupported protocol "+S+":",Me.ERR_BAD_REQUEST,t));return}w.send(i||null)})},e3=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,s;const i=function(c){if(!s){s=!0,o();const d=c instanceof Error?c:this.reason;n.abort(d instanceof Me?d:new Pn(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,i(new Me(`timeout ${e} of ms exceeded`,Me.ETIMEDOUT))},e);const o=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),t=null)};t.forEach(c=>c.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>P.asap(o),l}},t3=e3,r3=function*(t,e){let r=t.byteLength;if(!e||r{const s=n3(t,e);let i=0,a,o=l=>{a||(a=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:d}=await s.next();if(c){o(),l.close();return}let f=d.byteLength;if(r){let p=i+=f;r(p)}l.enqueue(new Uint8Array(d))}catch(c){throw o(c),c}},cancel(l){return o(l),s.return()}},{highWaterMark:2})},Ys=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",x1=Ys&&typeof ReadableStream=="function",i3=Ys&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),k1=(t,...e)=>{try{return!!t(...e)}catch{return!1}},a3=x1&&k1(()=>{let t=!1;const e=new Request(xt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),$l=64*1024,ia=x1&&k1(()=>P.isReadableStream(new Response("").body)),ks={stream:ia&&(t=>t.body)};Ys&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ks[e]&&(ks[e]=P.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new Me(`Response type '${e}' is not supported`,Me.ERR_NOT_SUPPORT,n)})})})(new Response);const o3=async t=>{if(t==null)return 0;if(P.isBlob(t))return t.size;if(P.isSpecCompliantForm(t))return(await new Request(xt.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(P.isArrayBufferView(t)||P.isArrayBuffer(t))return t.byteLength;if(P.isURLSearchParams(t)&&(t=t+""),P.isString(t))return(await i3(t)).byteLength},l3=async(t,e)=>{const r=P.toFiniteNumber(t.getContentLength());return r??o3(e)},c3=Ys&&(async t=>{let{url:e,method:r,data:n,signal:s,cancelToken:i,timeout:a,onDownloadProgress:o,onUploadProgress:l,responseType:c,headers:d,withCredentials:f="same-origin",fetchOptions:p}=w1(t);c=c?(c+"").toLowerCase():"text";let v=t3([s,i&&i.toAbortSignal()],a),b;const y=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let w;try{if(l&&a3&&r!=="get"&&r!=="head"&&(w=await l3(d,n))!==0){let I=new Request(e,{method:"POST",body:n,duplex:"half"}),O;if(P.isFormData(n)&&(O=I.headers.get("content-type"))&&d.setContentType(O),I.body){const[$,K]=_l(w,xs(Ol(l)));n=zl(I.body,$l,$,K)}}P.isString(f)||(f=f?"include":"omit");const M="credentials"in Request.prototype;b=new Request(e,{...p,signal:v,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:M?f:void 0});let S=await fetch(b,p);const E=ia&&(c==="stream"||c==="response");if(ia&&(o||E&&y)){const I={};["status","statusText","headers"].forEach(G=>{I[G]=S[G]});const O=P.toFiniteNumber(S.headers.get("content-length")),[$,K]=o&&_l(O,xs(Ol(o),!0))||[];S=new Response(zl(S.body,$l,$,()=>{K&&K(),y&&y()}),I)}c=c||"text";let D=await ks[P.findKey(ks,c)||"text"](S,t);return!E&&y&&y(),await new Promise((I,O)=>{b1(I,O,{data:D,headers:nr.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:b})})}catch(M){throw y&&y(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new Me("Network Error",Me.ERR_NETWORK,t,b),{cause:M.cause||M}):Me.from(M,M&&M.code,t,b)}}),aa={http:k2,xhr:Q2,fetch:c3};P.forEach(aa,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Fl=t=>`- ${t}`,u3=t=>P.isFunction(t)||t===null||t===!1,S1={getAdapter:t=>{t=P.isArray(t)?t:[t];const{length:e}=t;let r,n;const s={};for(let i=0;i`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?i.length>1?`since : +`)}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,...r){const n=new this(e);return r.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[Il]=this[Il]={accessors:{}}).accessors,s=this.prototype;function i(a){const o=Gn(a);n[o]||(U2(s,a),n[o]=!0)}return P.isArray(e)?e.forEach(i):i(e),this}}Ks.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);P.reduceDescriptors(Ks.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});P.freezeMethods(Ks);const nr=Ks;function xi(t,e){const r=this||to,n=e||r,s=nr.from(n.headers);let i=n.data;return P.forEach(t,function(o){i=o.call(r,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function v1(t){return!!(t&&t.__CANCEL__)}function Pn(t,e,r){Me.call(this,t??"canceled",Me.ERR_CANCELED,e,r),this.name="CanceledError"}P.inherits(Pn,Me,{__CANCEL__:!0});function b1(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Me("Request failed with status code "+r.status,[Me.ERR_BAD_REQUEST,Me.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function V2(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function W2(t,e){t=t||10;const r=new Array(t),n=new Array(t);let s=0,i=0,a;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),d=n[i];a||(a=c),r[s]=l,n[s]=c;let f=i,p=0;for(;f!==s;)p+=r[f++],f=f%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),c-a{r=d,s=null,i&&(clearTimeout(i),i=null),t(...c)};return[(...c)=>{const d=Date.now(),f=d-r;f>=n?a(c,d):(s=c,i||(i=setTimeout(()=>{i=null,a(s)},n-f)))},()=>s&&a(s)]}const xs=(t,e,r=3)=>{let n=0;const s=W2(50,250);return G2(i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,l=a-n,c=s(l),d=a<=o;n=a;const f={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&d?(o-a)/c:void 0,event:i,lengthComputable:o!=null,[e?"download":"upload"]:!0};t(f)},r)},_l=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ol=t=>(...e)=>P.asap(()=>t(...e)),K2=xt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,xt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,Y2=xt.hasStandardBrowserEnv?{write(t,e,r,n,s,i){const a=[t+"="+encodeURIComponent(e)];P.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),P.isString(n)&&a.push("path="+n),P.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.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 X2(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function J2(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function y1(t,e,r){let n=!X2(e);return t&&(n||r==!1)?J2(t,e):e}const Ll=t=>t instanceof nr?{...t}:t;function pn(t,e){e=e||{};const r={};function n(c,d,f,p){return P.isPlainObject(c)&&P.isPlainObject(d)?P.merge.call({caseless:p},c,d):P.isPlainObject(d)?P.merge({},d):P.isArray(d)?d.slice():d}function s(c,d,f,p){if(P.isUndefined(d)){if(!P.isUndefined(c))return n(void 0,c,f,p)}else return n(c,d,f,p)}function i(c,d){if(!P.isUndefined(d))return n(void 0,d)}function a(c,d){if(P.isUndefined(d)){if(!P.isUndefined(c))return n(void 0,c)}else return n(void 0,d)}function o(c,d,f){if(f in e)return n(c,d);if(f in t)return n(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,d,f)=>s(Ll(c),Ll(d),f,!0)};return P.forEach(Object.keys({...t,...e}),function(d){const f=l[d]||s,p=f(t[d],e[d],d);P.isUndefined(p)&&f!==o||(r[d]=p)}),r}const w1=t=>{const e=pn({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:o}=e;e.headers=a=nr.from(a),e.url=p1(y1(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(P.isFormData(r)){if(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...d]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(xt.hasStandardBrowserEnv&&(n&&P.isFunction(n)&&(n=n(e)),n||n!==!1&&K2(e.url))){const c=s&&i&&Y2.read(i);c&&a.set(s,c)}return e},Z2=typeof XMLHttpRequest<"u",Q2=Z2&&function(t){return new Promise(function(r,n){const s=w1(t);let i=s.data;const a=nr.from(s.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=s,d,f,p,g,b;function y(){g&&g(),b&&b(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function M(){if(!w)return;const E=nr.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),I={data:!o||o==="text"||o==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:E,config:t,request:w};b1(function($){r($),y()},function($){n($),y()},I),w=null}"onloadend"in w?w.onloadend=M:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(M)},w.onabort=function(){w&&(n(new Me("Request aborted",Me.ECONNABORTED,t,w)),w=null)},w.onerror=function(){n(new Me("Network Error",Me.ERR_NETWORK,t,w)),w=null},w.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const I=s.transitional||m1;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),n(new Me(D,I.clarifyTimeoutError?Me.ETIMEDOUT:Me.ECONNABORTED,t,w)),w=null},i===void 0&&a.setContentType(null),"setRequestHeader"in w&&P.forEach(a.toJSON(),function(D,I){w.setRequestHeader(I,D)}),P.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),o&&o!=="json"&&(w.responseType=s.responseType),c&&([p,b]=xs(c,!0),w.addEventListener("progress",p)),l&&w.upload&&([f,g]=xs(l),w.upload.addEventListener("progress",f),w.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(d=E=>{w&&(n(!E||E.type?new Pn(null,t,w):E),w.abort(),w=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const S=V2(s.url);if(S&&xt.protocols.indexOf(S)===-1){n(new Me("Unsupported protocol "+S+":",Me.ERR_BAD_REQUEST,t));return}w.send(i||null)})},e3=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,s;const i=function(c){if(!s){s=!0,o();const d=c instanceof Error?c:this.reason;n.abort(d instanceof Me?d:new Pn(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,i(new Me(`timeout ${e} of ms exceeded`,Me.ETIMEDOUT))},e);const o=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),t=null)};t.forEach(c=>c.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>P.asap(o),l}},t3=e3,r3=function*(t,e){let r=t.byteLength;if(!e||r{const s=n3(t,e);let i=0,a,o=l=>{a||(a=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:d}=await s.next();if(c){o(),l.close();return}let f=d.byteLength;if(r){let p=i+=f;r(p)}l.enqueue(new Uint8Array(d))}catch(c){throw o(c),c}},cancel(l){return o(l),s.return()}},{highWaterMark:2})},Ys=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",x1=Ys&&typeof ReadableStream=="function",i3=Ys&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),k1=(t,...e)=>{try{return!!t(...e)}catch{return!1}},a3=x1&&k1(()=>{let t=!1;const e=new Request(xt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),$l=64*1024,ia=x1&&k1(()=>P.isReadableStream(new Response("").body)),ks={stream:ia&&(t=>t.body)};Ys&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ks[e]&&(ks[e]=P.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new Me(`Response type '${e}' is not supported`,Me.ERR_NOT_SUPPORT,n)})})})(new Response);const o3=async t=>{if(t==null)return 0;if(P.isBlob(t))return t.size;if(P.isSpecCompliantForm(t))return(await new Request(xt.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(P.isArrayBufferView(t)||P.isArrayBuffer(t))return t.byteLength;if(P.isURLSearchParams(t)&&(t=t+""),P.isString(t))return(await i3(t)).byteLength},l3=async(t,e)=>{const r=P.toFiniteNumber(t.getContentLength());return r??o3(e)},c3=Ys&&(async t=>{let{url:e,method:r,data:n,signal:s,cancelToken:i,timeout:a,onDownloadProgress:o,onUploadProgress:l,responseType:c,headers:d,withCredentials:f="same-origin",fetchOptions:p}=w1(t);c=c?(c+"").toLowerCase():"text";let g=t3([s,i&&i.toAbortSignal()],a),b;const y=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let w;try{if(l&&a3&&r!=="get"&&r!=="head"&&(w=await l3(d,n))!==0){let I=new Request(e,{method:"POST",body:n,duplex:"half"}),O;if(P.isFormData(n)&&(O=I.headers.get("content-type"))&&d.setContentType(O),I.body){const[$,K]=_l(w,xs(Ol(l)));n=zl(I.body,$l,$,K)}}P.isString(f)||(f=f?"include":"omit");const M="credentials"in Request.prototype;b=new Request(e,{...p,signal:g,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:M?f:void 0});let S=await fetch(b,p);const E=ia&&(c==="stream"||c==="response");if(ia&&(o||E&&y)){const I={};["status","statusText","headers"].forEach(G=>{I[G]=S[G]});const O=P.toFiniteNumber(S.headers.get("content-length")),[$,K]=o&&_l(O,xs(Ol(o),!0))||[];S=new Response(zl(S.body,$l,$,()=>{K&&K(),y&&y()}),I)}c=c||"text";let D=await ks[P.findKey(ks,c)||"text"](S,t);return!E&&y&&y(),await new Promise((I,O)=>{b1(I,O,{data:D,headers:nr.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:b})})}catch(M){throw y&&y(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new Me("Network Error",Me.ERR_NETWORK,t,b),{cause:M.cause||M}):Me.from(M,M&&M.code,t,b)}}),aa={http:k2,xhr:Q2,fetch:c3};P.forEach(aa,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Fl=t=>`- ${t}`,u3=t=>P.isFunction(t)||t===null||t===!1,S1={getAdapter:t=>{t=P.isArray(t)?t:[t];const{length:e}=t;let r,n;const s={};for(let i=0;i`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?i.length>1?`since : `+i.map(Fl).join(` `):" "+Fl(i[0]):"as no adapter specified";throw new Me("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:aa};function ki(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Pn(null,t)}function Bl(t){return ki(t),t.headers=nr.from(t.headers),t.data=xi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),S1.getAdapter(t.adapter||to.adapter)(t).then(function(n){return ki(t),n.data=xi.call(t,t.transformResponse,n),n.headers=nr.from(n.headers),n},function(n){return v1(n)||(ki(t),n&&n.response&&(n.response.data=xi.call(t,t.transformResponse,n.response),n.response.headers=nr.from(n.response.headers))),Promise.reject(n)})}const T1="1.11.0",Xs={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Xs[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Pl={};Xs.transitional=function(e,r,n){function s(i,a){return"[Axios v"+T1+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,o)=>{if(e===!1)throw new Me(s(a," has been removed"+(r?" in "+r:"")),Me.ERR_DEPRECATED);return r&&!Pl[a]&&(Pl[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,a,o):!0}};Xs.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function d3(t,e,r){if(typeof t!="object")throw new Me("options must be an object",Me.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let s=n.length;for(;s-- >0;){const i=n[s],a=e[i];if(a){const o=t[i],l=o===void 0||a(o,i,t);if(l!==!0)throw new Me("option "+i+" must be "+l,Me.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Me("Unknown option "+i,Me.ERR_BAD_OPTION)}}const ns={assertOptions:d3,validators:Xs},or=ns.validators;class Ss{constructor(e){this.defaults=e||{},this.interceptors={request:new Rl,response:new Rl}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=` -`+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=pn(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:i}=r;n!==void 0&&ns.assertOptions(n,{silentJSONParsing:or.transitional(or.boolean),forcedJSONParsing:or.transitional(or.boolean),clarifyTimeoutError:or.transitional(or.boolean)},!1),s!=null&&(P.isFunction(s)?r.paramsSerializer={serialize:s}:ns.assertOptions(s,{encode:or.function,serialize:or.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ns.assertOptions(r,{baseUrl:or.spelling("baseURL"),withXsrfToken:or.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&P.merge(i.common,i[r.method]);i&&P.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),r.headers=nr.concat(a,i);const o=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(l=l&&y.synchronous,o.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let d,f=0,p;if(!l){const b=[Bl.bind(this),void 0];for(b.unshift(...o),b.push(...c),p=b.length,d=Promise.resolve(r);f{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(o=>{n.subscribe(o),i=o}).then(s);return a.cancel=function(){n.unsubscribe(i)},a},e(function(i,a,o){n.reason||(n.reason=new Pn(i,a,o),r(n.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 r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new ro(function(s){e=s}),cancel:e}}}const h3=ro;function f3(t){return function(r){return t.apply(null,r)}}function p3(t){return P.isObject(t)&&t.isAxiosError===!0}const oa={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(oa).forEach(([t,e])=>{oa[e]=t});const m3=oa;function E1(t){const e=new ss(t),r=r1(ss.prototype.request,e);return P.extend(r,ss.prototype,e,{allOwnKeys:!0}),P.extend(r,e,null,{allOwnKeys:!0}),r.create=function(s){return E1(pn(t,s))},r}const ut=E1(to);ut.Axios=ss;ut.CanceledError=Pn;ut.CancelToken=h3;ut.isCancel=v1;ut.VERSION=T1;ut.toFormData=Gs;ut.AxiosError=Me;ut.Cancel=ut.CanceledError;ut.all=function(e){return Promise.all(e)};ut.spread=f3;ut.isAxiosError=p3;ut.mergeConfig=pn;ut.AxiosHeaders=nr;ut.formToJSON=t=>g1(P.isHTMLForm(t)?new FormData(t):t);ut.getAdapter=S1.getAdapter;ut.HttpStatusCode=m3;ut.default=ut;const g3=ut,v3="http://127.0.0.1:8000/api",kn=g3.create({baseURL:v3,timeout:1e4,headers:{"Content-Type":"application/json"}}),it={createMindmap:(t="思维导图",e=null)=>kn.post("/mindMaps",{title:t,data:e}),getMindmap:t=>kn.get(`/mindMaps/${t}`),getAllMindmaps:()=>kn.get("/mindmaps"),addNodes:(t,e)=>kn.post("/mindMaps/addNodes",{mindMapId:t,nodes:e}),updateNode:(t,e)=>kn.patch("/mindMaps/updateNode",{id:t,...e}),deleteNodes:t=>kn.delete("/mindMaps/deleteNodes",{data:{nodeIds:t}})};function no(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var vn=no();function A1(t){vn=t}var o0={exec:()=>null};function Pe(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(Mt.caret,"$1"),r=r.replace(s,a),n},getRegex:()=>new RegExp(r,e)};return n}var Mt={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:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,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")},b3=/^(?:[ \t]*(?:\n|$))+/,y3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,w3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,T0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,x3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,so=/(?:[*+-]|\d{1,9}[.)])/,C1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,M1=Pe(C1).replace(/bull/g,so).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(),k3=Pe(C1).replace(/bull/g,so).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(),io=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,S3=/^[^\n]+/,ao=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,T3=Pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ao).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),E3=Pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,so).getRegex(),Js="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",oo=/|$))/,A3=Pe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",oo).replace("tag",Js).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),N1=Pe(io).replace("hr",T0).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Js).getRegex(),C3=Pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",N1).getRegex(),lo={blockquote:C3,code:y3,def:T3,fences:w3,heading:x3,hr:T0,html:A3,lheading:M1,list:E3,newline:b3,paragraph:N1,table:o0,text:S3},Hl=Pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",T0).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Js).getRegex(),M3={...lo,lheading:k3,table:Hl,paragraph:Pe(io).replace("hr",T0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Js).getRegex()},N3={...lo,html:Pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oo).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:o0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pe(io).replace("hr",T0).replace("heading",` *#{1,6} *[^ +`+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=pn(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:i}=r;n!==void 0&&ns.assertOptions(n,{silentJSONParsing:or.transitional(or.boolean),forcedJSONParsing:or.transitional(or.boolean),clarifyTimeoutError:or.transitional(or.boolean)},!1),s!=null&&(P.isFunction(s)?r.paramsSerializer={serialize:s}:ns.assertOptions(s,{encode:or.function,serialize:or.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ns.assertOptions(r,{baseUrl:or.spelling("baseURL"),withXsrfToken:or.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&P.merge(i.common,i[r.method]);i&&P.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),r.headers=nr.concat(a,i);const o=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(l=l&&y.synchronous,o.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let d,f=0,p;if(!l){const b=[Bl.bind(this),void 0];for(b.unshift(...o),b.push(...c),p=b.length,d=Promise.resolve(r);f{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(o=>{n.subscribe(o),i=o}).then(s);return a.cancel=function(){n.unsubscribe(i)},a},e(function(i,a,o){n.reason||(n.reason=new Pn(i,a,o),r(n.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 r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new ro(function(s){e=s}),cancel:e}}}const h3=ro;function f3(t){return function(r){return t.apply(null,r)}}function p3(t){return P.isObject(t)&&t.isAxiosError===!0}const oa={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(oa).forEach(([t,e])=>{oa[e]=t});const m3=oa;function E1(t){const e=new ss(t),r=r1(ss.prototype.request,e);return P.extend(r,ss.prototype,e,{allOwnKeys:!0}),P.extend(r,e,null,{allOwnKeys:!0}),r.create=function(s){return E1(pn(t,s))},r}const ut=E1(to);ut.Axios=ss;ut.CanceledError=Pn;ut.CancelToken=h3;ut.isCancel=v1;ut.VERSION=T1;ut.toFormData=Gs;ut.AxiosError=Me;ut.Cancel=ut.CanceledError;ut.all=function(e){return Promise.all(e)};ut.spread=f3;ut.isAxiosError=p3;ut.mergeConfig=pn;ut.AxiosHeaders=nr;ut.formToJSON=t=>g1(P.isHTMLForm(t)?new FormData(t):t);ut.getAdapter=S1.getAdapter;ut.HttpStatusCode=m3;ut.default=ut;const g3=ut,v3="http://127.0.0.1:8000/api",kn=g3.create({baseURL:v3,timeout:1e4,headers:{"Content-Type":"application/json"}}),it={createMindmap:(t="思维导图",e=null)=>kn.post("/mindMaps",{title:t,data:e}),getMindmap:t=>kn.get(`/mindMaps/${t}`),getAllMindmaps:()=>kn.get("/mindmaps"),addNodes:(t,e)=>kn.post("/mindMaps/addNodes",{mindMapId:t,nodes:e}),updateNode:(t,e)=>kn.patch("/mindMaps/updateNode",{id:t,...e}),deleteNodes:t=>kn.delete("/mindMaps/deleteNodes",{data:{nodeIds:t}})};function no(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var vn=no();function A1(t){vn=t}var o0={exec:()=>null};function Pe(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(Mt.caret,"$1"),r=r.replace(s,a),n},getRegex:()=>new RegExp(r,e)};return n}var Mt={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:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,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")},b3=/^(?:[ \t]*(?:\n|$))+/,y3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,w3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,T0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,x3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,so=/(?:[*+-]|\d{1,9}[.)])/,C1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,M1=Pe(C1).replace(/bull/g,so).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(),k3=Pe(C1).replace(/bull/g,so).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(),io=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,S3=/^[^\n]+/,ao=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,T3=Pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ao).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),E3=Pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,so).getRegex(),Js="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",oo=/|$))/,A3=Pe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",oo).replace("tag",Js).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),N1=Pe(io).replace("hr",T0).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Js).getRegex(),C3=Pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",N1).getRegex(),lo={blockquote:C3,code:y3,def:T3,fences:w3,heading:x3,hr:T0,html:A3,lheading:M1,list:E3,newline:b3,paragraph:N1,table:o0,text:S3},Hl=Pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",T0).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Js).getRegex(),M3={...lo,lheading:k3,table:Hl,paragraph:Pe(io).replace("hr",T0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Js).getRegex()},N3={...lo,html:Pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oo).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:o0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pe(io).replace("hr",T0).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",M1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},D3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,R3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,D1=/^( {2,}|\\)\n(?!\s*$)/,I3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,_1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$3=Pe(_1,"u").replace(/punct/g,Zs).getRegex(),F3=Pe(_1,"u").replace(/punct/g,I1).getRegex(),O1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",B3=Pe(O1,"gu").replace(/notPunctSpace/g,R1).replace(/punctSpace/g,co).replace(/punct/g,Zs).getRegex(),P3=Pe(O1,"gu").replace(/notPunctSpace/g,L3).replace(/punctSpace/g,O3).replace(/punct/g,I1).getRegex(),H3=Pe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,R1).replace(/punctSpace/g,co).replace(/punct/g,Zs).getRegex(),q3=Pe(/\\(punct)/,"gu").replace(/punct/g,Zs).getRegex(),j3=Pe(/^<(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(),U3=Pe(oo).replace("(?:-->|$)","-->").getRegex(),V3=Pe("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",U3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ts=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,W3=Pe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ts).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),L1=Pe(/^!?\[(label)\]\[(ref)\]/).replace("label",Ts).replace("ref",ao).getRegex(),z1=Pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ao).getRegex(),G3=Pe("reflink|nolink(?!\\()","g").replace("reflink",L1).replace("nolink",z1).getRegex(),uo={_backpedal:o0,anyPunctuation:q3,autolink:j3,blockSkip:z3,br:D1,code:R3,del:o0,emStrongLDelim:$3,emStrongRDelimAst:B3,emStrongRDelimUnd:H3,escape:D3,link:W3,nolink:z1,punctuation:_3,reflink:L1,reflinkSearch:G3,tag:V3,text:I3,url:o0},K3={...uo,link:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",Ts).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ts).getRegex()},la={...uo,emStrongRDelimAst:P3,emStrongLDelim:F3,url:Pe(/^((?: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]*?(?:(?=[\\":">",'"':""","'":"'"},ql=t=>X3[t];function lr(t,e){if(e){if(Mt.escapeTest.test(t))return t.replace(Mt.escapeReplace,ql)}else if(Mt.escapeTestNoEncode.test(t))return t.replace(Mt.escapeReplaceNoEncode,ql);return t}function jl(t){try{t=encodeURI(t).replace(Mt.percentDecode,"%")}catch{return null}return t}function Ul(t,e){var i;let r=t.replace(Mt.findPipe,(a,o,l)=>{let c=!1,d=o;for(;--d>=0&&l[d]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Mt.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length0?-2:-1}function Vl(t,e,r,n,s){let i=e.href,a=e.title||null,o=t[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:a,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function Z3(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(` `).map(i=>{let a=i.match(r.other.beginningSpace);if(a===null)return i;let[o]=a;return o.length>=s.length?i.slice(s.length):i}).join(` `)}var Es=class{constructor(t){je(this,"options");je(this,"rules");je(this,"lexer");this.options=t||vn}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 r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Yn(r,` @@ -101,21 +132,21 @@ var _d=Object.defineProperty;var Od=(t,e,r)=>e in t?_d(t,e,{enumerable:!0,config `),d=c.replace(this.rules.other.blockquoteSetextReplace,` $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n} ${c}`:c,s=s?`${s} -${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=f,r.length===0)break;let p=i.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let v=p,b=v.raw+` +${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=f,r.length===0)break;let p=i.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let g=p,b=g.raw+` `+r.join(` -`),y=this.blockquote(b);i[i.length-1]=y,n=n.substring(0,n.length-v.raw.length)+y.raw,s=s.substring(0,s.length-v.text.length)+y.text;break}else if((p==null?void 0:p.type)==="list"){let v=p,b=v.raw+` +`),y=this.blockquote(b);i[i.length-1]=y,n=n.substring(0,n.length-g.raw.length)+y.raw,s=s.substring(0,s.length-g.text.length)+y.text;break}else if((p==null?void 0:p.type)==="list"){let g=p,b=g.raw+` `+r.join(` -`),y=this.list(b);i[i.length-1]=y,n=n.substring(0,n.length-p.raw.length)+y.raw,s=s.substring(0,s.length-v.raw.length)+y.raw,r=b.substring(i.at(-1).raw.length).split(` +`),y=this.list(b);i[i.length-1]=y,n=n.substring(0,n.length-p.raw.length)+y.raw,s=s.substring(0,s.length-g.raw.length)+y.raw,r=b.substring(i.at(-1).raw.length).split(` `);continue}}return{type:"blockquote",raw:n,tokens:i,text:s}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),n=r.length>1,s={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let i=this.rules.other.listItemRegex(r),a=!1;for(;t;){let l=!1,c="",d="";if(!(e=i.exec(t))||this.rules.block.hr.test(t))break;c=e[0],t=t.substring(c.length);let f=e[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,M=>" ".repeat(3*M.length)),p=t.split(` -`,1)[0],v=!f.trim(),b=0;if(this.options.pedantic?(b=2,d=f.trimStart()):v?b=e[1].length+1:(b=e[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,d=f.slice(b),b+=e[1].length),v&&this.rules.other.blankLine.test(p)&&(c+=p+` +`,1)[0],g=!f.trim(),b=0;if(this.options.pedantic?(b=2,d=f.trimStart()):g?b=e[1].length+1:(b=e[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,d=f.slice(b),b+=e[1].length),g&&this.rules.other.blankLine.test(p)&&(c+=p+` `,t=t.substring(p.length+1),l=!0),!l){let M=this.rules.other.nextBulletRegex(b),S=this.rules.other.hrRegex(b),E=this.rules.other.fencesBeginRegex(b),D=this.rules.other.headingBeginRegex(b),I=this.rules.other.htmlBeginRegex(b);for(;t;){let O=t.split(` `,1)[0],$;if(p=O,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),$=p):$=p.replace(this.rules.other.tabCharGlobal," "),E.test(p)||D.test(p)||I.test(p)||M.test(p)||S.test(p))break;if($.search(this.rules.other.nonSpaceChar)>=b||!p.trim())d+=` -`+$.slice(b);else{if(v||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(f)||D.test(f)||S.test(f))break;d+=` -`+p}!v&&!p.trim()&&(v=!0),c+=O+` +`+$.slice(b);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(f)||D.test(f)||S.test(f))break;d+=` +`+p}!g&&!p.trim()&&(g=!0),c+=O+` `,t=t.substring(O.length+1),f=$.slice(b)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0));let y=null,w;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(w=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:c,task:!!y,checked:w,loose:!1,text:d,tokens:[]}),s.raw+=c}let o=s.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let l=0;lf.type==="space"),d=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let l=0;l({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}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 r=e[1].charAt(e[1].length-1)===` -`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}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 r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=Yn(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=J3(e[2],"()");if(i===-2)return;if(i>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let n=e[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],s=i[3])}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Vl(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[n.toLowerCase()];if(!s){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Vl(r,s,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,i,a,o=s,l=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+s);(n=c.exec(e))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(a=[...i].length,n[3]||n[4]){o+=a;continue}else if((n[5]||n[6])&&s%3&&!((s+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let d=[...n[0]][0].length,f=t.slice(0,s+n.index+d+a);if(Math.min(s,a)%2){let v=f.slice(1,-1);return{type:"em",raw:f,text:v,tokens:this.lexer.inlineTokens(v)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}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 r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let i;do i=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(i!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},Cr=class ca{constructor(e){je(this,"tokens");je(this,"options");je(this,"state");je(this,"tokenizer");je(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||vn,this.options.tokenizer=this.options.tokenizer||new Es,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 r={other:Mt,block:F0.normal,inline:Kn.normal};this.options.pedantic?(r.block=F0.pedantic,r.inline=Kn.pedantic):this.options.gfm&&(r.block=F0.gfm,this.options.breaks?r.inline=Kn.breaks:r.inline=Kn.gfm),this.tokenizer.rules=r}static get rules(){return{block:F0,inline:Kn}}static lex(e,r){return new ca(r).lex(e)}static lexInline(e,r){return new ca(r).inlineTokens(e)}lex(e){e=e.replace(Mt.carriageReturn,` +`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}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 r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=Yn(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=J3(e[2],"()");if(i===-2)return;if(i>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let n=e[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],s=i[3])}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Vl(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[n.toLowerCase()];if(!s){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Vl(r,s,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,i,a,o=s,l=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+s);(n=c.exec(e))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(a=[...i].length,n[3]||n[4]){o+=a;continue}else if((n[5]||n[6])&&s%3&&!((s+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let d=[...n[0]][0].length,f=t.slice(0,s+n.index+d+a);if(Math.min(s,a)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}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 r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let i;do i=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(i!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},Cr=class ca{constructor(e){je(this,"tokens");je(this,"options");je(this,"state");je(this,"tokenizer");je(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||vn,this.options.tokenizer=this.options.tokenizer||new Es,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 r={other:Mt,block:F0.normal,inline:Kn.normal};this.options.pedantic?(r.block=F0.pedantic,r.inline=Kn.pedantic):this.options.gfm&&(r.block=F0.gfm,this.options.breaks?r.inline=Kn.breaks:r.inline=Kn.gfm),this.tokenizer.rules=r}static get rules(){return{block:F0,inline:Kn}}static lex(e,r){return new ca(r).lex(e)}static lexInline(e,r){return new ca(r).inlineTokens(e)}lex(e){e=e.replace(Mt.carriageReturn,` `),this.blockTokens(e,this.tokens);for(let r=0;r(o=c.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=r.at(-1);o.raw.length===1&&c!==void 0?c.raw+=` `:r.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(` `)?"":` @@ -129,7 +160,7 @@ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o),n=l.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(` `)?"":` `)+o.raw,c.text+=` -`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var o,l,c;let n=e,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(s=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,a="";for(;e;){i||(a=""),i=!1;let d;if((l=(o=this.options.extensions)==null?void 0:o.inline)!=null&&l.some(p=>(d=p.call({lexer:this},e,r))?(e=e.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(d.raw.length);let p=r.at(-1);d.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(e,n,a)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(e)){e=e.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(e))){e=e.substring(d.raw.length),r.push(d);continue}let f=e;if((c=this.options.extensions)!=null&&c.startInline){let p=1/0,v=e.slice(1),b;this.options.extensions.startInline.forEach(y=>{b=y.call({lexer:this},v),typeof b=="number"&&b>=0&&(p=Math.min(p,b))}),p<1/0&&p>=0&&(f=e.substring(0,p+1))}if(d=this.tokenizer.inlineText(f)){e=e.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(a=d.raw.slice(-1)),i=!0;let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):r.push(d);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},As=class{constructor(t){je(this,"options");je(this,"parser");this.options=t||vn}space(t){return""}code({text:t,lang:e,escaped:r}){var i;let n=(i=(e||"").match(Mt.notSpaceStart))==null?void 0:i[0],s=t.replace(Mt.endingNewline,"")+` +`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var o,l,c;let n=e,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(s=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,a="";for(;e;){i||(a=""),i=!1;let d;if((l=(o=this.options.extensions)==null?void 0:o.inline)!=null&&l.some(p=>(d=p.call({lexer:this},e,r))?(e=e.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(d.raw.length);let p=r.at(-1);d.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(e,n,a)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(e)){e=e.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(e))){e=e.substring(d.raw.length),r.push(d);continue}let f=e;if((c=this.options.extensions)!=null&&c.startInline){let p=1/0,g=e.slice(1),b;this.options.extensions.startInline.forEach(y=>{b=y.call({lexer:this},g),typeof b=="number"&&b>=0&&(p=Math.min(p,b))}),p<1/0&&p>=0&&(f=e.substring(0,p+1))}if(d=this.tokenizer.inlineText(f)){e=e.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(a=d.raw.slice(-1)),i=!0;let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):r.push(d);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},As=class{constructor(t){je(this,"options");je(this,"parser");this.options=t||vn}space(t){return""}code({text:t,lang:e,escaped:r}){var i;let n=(i=(e||"").match(Mt.notSpaceStart))==null?void 0:i[0],s=t.replace(Mt.endingNewline,"")+` `;return n?'
'+(r?s:lr(s,!0))+`
`:"
"+(r?s:lr(s,!0))+`
`}blockquote({tokens:t}){return`
@@ -156,8 +187,8 @@ Please report this to https://github.com/markedjs/marked.`,t){let n="

An error * @author Lea Verou * @namespace * @public - */var r=function(n){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},o={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function S(E){return E instanceof l?new l(E.type,S(E.content),E.alias):Array.isArray(E)?E.map(S):E.replace(/&/g,"&").replace(/"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT"&&1<2)return document.currentScript;try{throw new Error}catch(I){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(I.stack)||[])[1];if(S){var E=document.getElementsByTagName("script");for(var D in E)if(E[D].src==S)return E[D]}return null}},isActive:function(S,E,D){for(var I="no-"+E;S;){var O=S.classList;if(O.contains(E))return!0;if(O.contains(I))return!1;S=S.parentElement}return!!D}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(S,E){var D=o.util.clone(o.languages[S]);for(var I in E)D[I]=E[I];return D},insertBefore:function(S,E,D,I){I=I||o.languages;var O=I[S],$={};for(var K in O)if(O.hasOwnProperty(K)){if(K==E)for(var G in D)D.hasOwnProperty(G)&&($[G]=D[G]);D.hasOwnProperty(K)||($[K]=O[K])}var pe=I[S];return I[S]=$,o.languages.DFS(o.languages,function(ye,Ee){Ee===pe&&ye!=S&&(this[ye]=$)}),$},DFS:function S(E,D,I,O){O=O||{};var $=o.util.objId;for(var K in E)if(E.hasOwnProperty(K)){D.call(E,K,E[K],I||K);var G=E[K],pe=o.util.type(G);pe==="Object"&&!O[$(G)]?(O[$(G)]=!0,S(G,D,null,O)):pe==="Array"&&!O[$(G)]&&(O[$(G)]=!0,S(G,D,K,O))}}},plugins:{},highlightAll:function(S,E){o.highlightAllUnder(document,S,E)},highlightAllUnder:function(S,E,D){var I={callback:D,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",I),I.elements=Array.prototype.slice.apply(I.container.querySelectorAll(I.selector)),o.hooks.run("before-all-elements-highlight",I);for(var O=0,$;$=I.elements[O++];)o.highlightElement($,E===!0,I.callback)},highlightElement:function(S,E,D){var I=o.util.getLanguage(S),O=o.languages[I];o.util.setLanguage(S,I);var $=S.parentElement;$&&$.nodeName.toLowerCase()==="pre"&&o.util.setLanguage($,I);var K=S.textContent,G={element:S,language:I,grammar:O,code:K};function pe(Ee){G.highlightedCode=Ee,o.hooks.run("before-insert",G),G.element.innerHTML=G.highlightedCode,o.hooks.run("after-highlight",G),o.hooks.run("complete",G),D&&D.call(G.element)}if(o.hooks.run("before-sanity-check",G),$=G.element.parentElement,$&&$.nodeName.toLowerCase()==="pre"&&!$.hasAttribute("tabindex")&&$.setAttribute("tabindex","0"),!G.code){o.hooks.run("complete",G),D&&D.call(G.element);return}if(o.hooks.run("before-highlight",G),!G.grammar){pe(o.util.encode(G.code));return}if(E&&n.Worker){var ye=new Worker(o.filename);ye.onmessage=function(Ee){pe(Ee.data)},ye.postMessage(JSON.stringify({language:G.language,code:G.code,immediateClose:!0}))}else pe(o.highlight(G.code,G.grammar,G.language))},highlight:function(S,E,D){var I={code:S,grammar:E,language:D};if(o.hooks.run("before-tokenize",I),!I.grammar)throw new Error('The language "'+I.language+'" has no grammar.');return I.tokens=o.tokenize(I.code,I.grammar),o.hooks.run("after-tokenize",I),l.stringify(o.util.encode(I.tokens),I.language)},tokenize:function(S,E){var D=E.rest;if(D){for(var I in D)E[I]=D[I];delete E.rest}var O=new f;return p(O,O.head,S),d(S,O,E,O.head,0),b(O)},hooks:{all:{},add:function(S,E){var D=o.hooks.all;D[S]=D[S]||[],D[S].push(E)},run:function(S,E){var D=o.hooks.all[S];if(!(!D||!D.length))for(var I=0,O;O=D[I++];)O(E)}},Token:l};n.Prism=o;function l(S,E,D,I){this.type=S,this.content=E,this.alias=D,this.length=(I||"").length|0}l.stringify=function S(E,D){if(typeof E=="string")return E;if(Array.isArray(E)){var I="";return E.forEach(function(pe){I+=S(pe,D)}),I}var O={type:E.type,content:S(E.content,D),tag:"span",classes:["token",E.type],attributes:{},language:D},$=E.alias;$&&(Array.isArray($)?Array.prototype.push.apply(O.classes,$):O.classes.push($)),o.hooks.run("wrap",O);var K="";for(var G in O.attributes)K+=" "+G+'="'+(O.attributes[G]||"").replace(/"/g,""")+'"';return"<"+O.tag+' class="'+O.classes.join(" ")+'"'+K+">"+O.content+""};function c(S,E,D,I){S.lastIndex=E;var O=S.exec(D);if(O&&I&&O[1]){var $=O[1].length;O.index+=$,O[0]=O[0].slice($)}return O}function d(S,E,D,I,O,$){for(var K in D)if(!(!D.hasOwnProperty(K)||!D[K])){var G=D[K];G=Array.isArray(G)?G:[G];for(var pe=0;pe=$.reach);Ke+=ve.value.length,ve=ve.next){var Ze=ve.value;if(E.length>S.length)return;if(!(Ze instanceof l)){var Ye=1,me;if(qe){if(me=c(Ce,Ke,S,Ge),!me||me.index>=S.length)break;var pt=me.index,St=me.index+me[0].length,ot=Ke;for(ot+=ve.value.length;pt>=ot;)ve=ve.next,ot+=ve.value.length;if(ot-=ve.value.length,Ke=ot,ve.value instanceof l)continue;for(var ft=ve;ft!==E.tail&&(ot$.reach&&($.reach=Z);var ie=ve.prev;U&&(ie=p(E,ie,U),Ke+=U.length),v(E,ie,Ye);var we=new l(K,Ee?o.tokenize(lt,Ee):lt,st,lt);if(ve=p(E,ie,we),V&&p(E,ve,V),Ye>1){var x={cause:K+","+pe,reach:Z};d(S,E,D,ve.prev,Ke,x),$&&x.reach>$.reach&&($.reach=x.reach)}}}}}}function f(){var S={value:null,prev:null,next:null},E={value:null,prev:S,next:null};S.next=E,this.head=S,this.tail=E,this.length=0}function p(S,E,D){var I=E.next,O={value:D,prev:E,next:I};return E.next=O,I.prev=O,S.length++,O}function v(S,E,D){for(var I=E.next,O=0;O/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\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://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]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(s,i){var a={};a["language-"+i]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[i]},a.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:a}};o["language-"+i]={pattern:/[\s\S]+/,inside:r.languages[i]};var l={};l[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:o},r.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,s){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\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:[s,"language-"+s],inside:r.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(n){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.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\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,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:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var i=n.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(r),r.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:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.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}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.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:r.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:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.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:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.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:r.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"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.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")),r.languages.js=r.languages.javascript,function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading…",s=function(y,w){return"✖ Error "+y+" while fetching file: "+w},i="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",l="loading",c="loaded",d="failed",f="pre[data-src]:not(["+o+'="'+c+'"]):not(['+o+'="'+l+'"])';function p(y,w,M){var S=new XMLHttpRequest;S.open("GET",y,!0),S.onreadystatechange=function(){S.readyState==4&&(S.status<400&&S.responseText?w(S.responseText):S.status>=400?M(s(S.status,S.statusText)):M(i))},S.send(null)}function v(y){var w=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(y||"");if(w){var M=Number(w[1]),S=w[2],E=w[3];return S?E?[M,Number(E)]:[M,void 0]:[M,M]}}r.hooks.add("before-highlightall",function(y){y.selector+=", "+f}),r.hooks.add("before-sanity-check",function(y){var w=y.element;if(w.matches(f)){y.code="",w.setAttribute(o,l);var M=w.appendChild(document.createElement("CODE"));M.textContent=n;var S=w.getAttribute("data-src"),E=y.language;if(E==="none"){var D=(/\.(\w+)$/.exec(S)||[,"none"])[1];E=a[D]||D}r.util.setLanguage(M,E),r.util.setLanguage(w,E);var I=r.plugins.autoloader;I&&I.loadLanguages(E),p(S,function(O){w.setAttribute(o,c);var $=v(w.getAttribute("data-range"));if($){var K=O.split(/\r\n?|\n/g),G=$[0],pe=$[1]==null?K.length:$[1];G<0&&(G+=K.length),G=Math.max(0,Math.min(G-1,K.length)),pe<0&&(pe+=K.length),pe=Math.max(0,Math.min(pe,K.length)),O=K.slice(G,pe).join(` -`),w.hasAttribute("data-start")||w.setAttribute("data-start",String(G+1))}M.textContent=O,r.highlightElement(M)},function(O){w.setAttribute(o,d),M.textContent=O})}}),r.plugins.fileHighlight={highlight:function(w){for(var M=(w||document).querySelectorAll(f),S=0,E;E=M[S++];)r.highlightElement(E)}};var b=!1;r.fileHighlight=function(){b||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),b=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})($1);var t6=$1.exports;const Gl=e6(t6);class $t{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new $t(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class Gt{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new Gt(r,$t.range(this,e))}}class re{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,s,i,a=r&&r.loc;if(a&&a.start<=a.end){var o=a.lexer.input;s=a.start,i=a.end,s===o.length?n+=" at end of input: ":n+=" at position "+(s+1)+": ";var l=o.slice(s,i).replace(/[^]/g,"$&̲"),c;s>15?c="…"+o.slice(s-15,s):c=o.slice(0,s);var d;i+15":">","<":"<",'"':""","'":"'"},o6=/[&><"']/g;function l6(t){return String(t).replace(o6,e=>a6[e])}var F1=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},c6=function(e){var r=F1(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},u6=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},d6=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},be={contains:r6,deflt:n6,escape:l6,hyphenate:i6,getBaseElem:F1,isCharacterBox:c6,protocolFromUrl:d6},as={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 "},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 ",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 ",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 ",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 ",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 ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function h6(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class fo{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 r in as)if(as.hasOwnProperty(r)){var n=as[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:h6(n)}}reportNonstrict(e,r,n){var s=this.strict;if(typeof s=="function"&&(s=s(e,r,n)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new re("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var s=this.strict;if(typeof s=="function")try{s=s(e,r,n)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=be.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class Pr{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return hr[f6[this.id]]}sub(){return hr[p6[this.id]]}fracNum(){return hr[m6[this.id]]}fracDen(){return hr[g6[this.id]]}cramp(){return hr[v6[this.id]]}text(){return hr[b6[this.id]]}isTight(){return this.size>=2}}var po=0,Cs=1,_n=2,Nr=3,m0=4,Ut=5,$n=6,Nt=7,hr=[new Pr(po,0,!1),new Pr(Cs,0,!0),new Pr(_n,1,!1),new Pr(Nr,1,!0),new Pr(m0,2,!1),new Pr(Ut,2,!0),new Pr($n,3,!1),new Pr(Nt,3,!0)],f6=[m0,Ut,m0,Ut,$n,Nt,$n,Nt],p6=[Ut,Ut,Ut,Ut,Nt,Nt,Nt,Nt],m6=[_n,Nr,m0,Ut,$n,Nt,$n,Nt],g6=[Nr,Nr,Ut,Ut,Nt,Nt,Nt,Nt],v6=[Cs,Cs,Nr,Nr,Ut,Ut,Nt,Nt],b6=[po,Cs,_n,Nr,_n,Nr,_n,Nr],ke={DISPLAY:hr[po],TEXT:hr[_n],SCRIPT:hr[m0],SCRIPTSCRIPT:hr[$n]},da=[{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 y6(t){for(var e=0;e=s[0]&&t<=s[1])return r.name}return null}var os=[];da.forEach(t=>t.blocks.forEach(e=>os.push(...e)));function B1(t){for(var e=0;e=os[e]&&t<=os[e+1])return!0;return!1}var Sn=80,w6=function(e,r){return"M95,"+(622+e+r)+` + */var r=function(n){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},o={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function S(E){return E instanceof l?new l(E.type,S(E.content),E.alias):Array.isArray(E)?E.map(S):E.replace(/&/g,"&").replace(/"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT"&&1<2)return document.currentScript;try{throw new Error}catch(I){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(I.stack)||[])[1];if(S){var E=document.getElementsByTagName("script");for(var D in E)if(E[D].src==S)return E[D]}return null}},isActive:function(S,E,D){for(var I="no-"+E;S;){var O=S.classList;if(O.contains(E))return!0;if(O.contains(I))return!1;S=S.parentElement}return!!D}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(S,E){var D=o.util.clone(o.languages[S]);for(var I in E)D[I]=E[I];return D},insertBefore:function(S,E,D,I){I=I||o.languages;var O=I[S],$={};for(var K in O)if(O.hasOwnProperty(K)){if(K==E)for(var G in D)D.hasOwnProperty(G)&&($[G]=D[G]);D.hasOwnProperty(K)||($[K]=O[K])}var pe=I[S];return I[S]=$,o.languages.DFS(o.languages,function(ye,Ee){Ee===pe&&ye!=S&&(this[ye]=$)}),$},DFS:function S(E,D,I,O){O=O||{};var $=o.util.objId;for(var K in E)if(E.hasOwnProperty(K)){D.call(E,K,E[K],I||K);var G=E[K],pe=o.util.type(G);pe==="Object"&&!O[$(G)]?(O[$(G)]=!0,S(G,D,null,O)):pe==="Array"&&!O[$(G)]&&(O[$(G)]=!0,S(G,D,K,O))}}},plugins:{},highlightAll:function(S,E){o.highlightAllUnder(document,S,E)},highlightAllUnder:function(S,E,D){var I={callback:D,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",I),I.elements=Array.prototype.slice.apply(I.container.querySelectorAll(I.selector)),o.hooks.run("before-all-elements-highlight",I);for(var O=0,$;$=I.elements[O++];)o.highlightElement($,E===!0,I.callback)},highlightElement:function(S,E,D){var I=o.util.getLanguage(S),O=o.languages[I];o.util.setLanguage(S,I);var $=S.parentElement;$&&$.nodeName.toLowerCase()==="pre"&&o.util.setLanguage($,I);var K=S.textContent,G={element:S,language:I,grammar:O,code:K};function pe(Ee){G.highlightedCode=Ee,o.hooks.run("before-insert",G),G.element.innerHTML=G.highlightedCode,o.hooks.run("after-highlight",G),o.hooks.run("complete",G),D&&D.call(G.element)}if(o.hooks.run("before-sanity-check",G),$=G.element.parentElement,$&&$.nodeName.toLowerCase()==="pre"&&!$.hasAttribute("tabindex")&&$.setAttribute("tabindex","0"),!G.code){o.hooks.run("complete",G),D&&D.call(G.element);return}if(o.hooks.run("before-highlight",G),!G.grammar){pe(o.util.encode(G.code));return}if(E&&n.Worker){var ye=new Worker(o.filename);ye.onmessage=function(Ee){pe(Ee.data)},ye.postMessage(JSON.stringify({language:G.language,code:G.code,immediateClose:!0}))}else pe(o.highlight(G.code,G.grammar,G.language))},highlight:function(S,E,D){var I={code:S,grammar:E,language:D};if(o.hooks.run("before-tokenize",I),!I.grammar)throw new Error('The language "'+I.language+'" has no grammar.');return I.tokens=o.tokenize(I.code,I.grammar),o.hooks.run("after-tokenize",I),l.stringify(o.util.encode(I.tokens),I.language)},tokenize:function(S,E){var D=E.rest;if(D){for(var I in D)E[I]=D[I];delete E.rest}var O=new f;return p(O,O.head,S),d(S,O,E,O.head,0),b(O)},hooks:{all:{},add:function(S,E){var D=o.hooks.all;D[S]=D[S]||[],D[S].push(E)},run:function(S,E){var D=o.hooks.all[S];if(!(!D||!D.length))for(var I=0,O;O=D[I++];)O(E)}},Token:l};n.Prism=o;function l(S,E,D,I){this.type=S,this.content=E,this.alias=D,this.length=(I||"").length|0}l.stringify=function S(E,D){if(typeof E=="string")return E;if(Array.isArray(E)){var I="";return E.forEach(function(pe){I+=S(pe,D)}),I}var O={type:E.type,content:S(E.content,D),tag:"span",classes:["token",E.type],attributes:{},language:D},$=E.alias;$&&(Array.isArray($)?Array.prototype.push.apply(O.classes,$):O.classes.push($)),o.hooks.run("wrap",O);var K="";for(var G in O.attributes)K+=" "+G+'="'+(O.attributes[G]||"").replace(/"/g,""")+'"';return"<"+O.tag+' class="'+O.classes.join(" ")+'"'+K+">"+O.content+""};function c(S,E,D,I){S.lastIndex=E;var O=S.exec(D);if(O&&I&&O[1]){var $=O[1].length;O.index+=$,O[0]=O[0].slice($)}return O}function d(S,E,D,I,O,$){for(var K in D)if(!(!D.hasOwnProperty(K)||!D[K])){var G=D[K];G=Array.isArray(G)?G:[G];for(var pe=0;pe=$.reach);Ke+=ve.value.length,ve=ve.next){var Ze=ve.value;if(E.length>S.length)return;if(!(Ze instanceof l)){var Ye=1,me;if(qe){if(me=c(Ce,Ke,S,Ge),!me||me.index>=S.length)break;var mt=me.index,St=me.index+me[0].length,ot=Ke;for(ot+=ve.value.length;mt>=ot;)ve=ve.next,ot+=ve.value.length;if(ot-=ve.value.length,Ke=ot,ve.value instanceof l)continue;for(var pt=ve;pt!==E.tail&&(ot$.reach&&($.reach=Z);var ie=ve.prev;U&&(ie=p(E,ie,U),Ke+=U.length),g(E,ie,Ye);var we=new l(K,Ee?o.tokenize(lt,Ee):lt,st,lt);if(ve=p(E,ie,we),V&&p(E,ve,V),Ye>1){var x={cause:K+","+pe,reach:Z};d(S,E,D,ve.prev,Ke,x),$&&x.reach>$.reach&&($.reach=x.reach)}}}}}}function f(){var S={value:null,prev:null,next:null},E={value:null,prev:S,next:null};S.next=E,this.head=S,this.tail=E,this.length=0}function p(S,E,D){var I=E.next,O={value:D,prev:E,next:I};return E.next=O,I.prev=O,S.length++,O}function g(S,E,D){for(var I=E.next,O=0;O/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\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://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]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(s,i){var a={};a["language-"+i]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[i]},a.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:a}};o["language-"+i]={pattern:/[\s\S]+/,inside:r.languages[i]};var l={};l[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:o},r.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,s){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\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:[s,"language-"+s],inside:r.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(n){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.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\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,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:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var i=n.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(r),r.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:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.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}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.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:r.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:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.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:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.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:r.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"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.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")),r.languages.js=r.languages.javascript,function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading…",s=function(y,w){return"✖ Error "+y+" while fetching file: "+w},i="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",l="loading",c="loaded",d="failed",f="pre[data-src]:not(["+o+'="'+c+'"]):not(['+o+'="'+l+'"])';function p(y,w,M){var S=new XMLHttpRequest;S.open("GET",y,!0),S.onreadystatechange=function(){S.readyState==4&&(S.status<400&&S.responseText?w(S.responseText):S.status>=400?M(s(S.status,S.statusText)):M(i))},S.send(null)}function g(y){var w=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(y||"");if(w){var M=Number(w[1]),S=w[2],E=w[3];return S?E?[M,Number(E)]:[M,void 0]:[M,M]}}r.hooks.add("before-highlightall",function(y){y.selector+=", "+f}),r.hooks.add("before-sanity-check",function(y){var w=y.element;if(w.matches(f)){y.code="",w.setAttribute(o,l);var M=w.appendChild(document.createElement("CODE"));M.textContent=n;var S=w.getAttribute("data-src"),E=y.language;if(E==="none"){var D=(/\.(\w+)$/.exec(S)||[,"none"])[1];E=a[D]||D}r.util.setLanguage(M,E),r.util.setLanguage(w,E);var I=r.plugins.autoloader;I&&I.loadLanguages(E),p(S,function(O){w.setAttribute(o,c);var $=g(w.getAttribute("data-range"));if($){var K=O.split(/\r\n?|\n/g),G=$[0],pe=$[1]==null?K.length:$[1];G<0&&(G+=K.length),G=Math.max(0,Math.min(G-1,K.length)),pe<0&&(pe+=K.length),pe=Math.max(0,Math.min(pe,K.length)),O=K.slice(G,pe).join(` +`),w.hasAttribute("data-start")||w.setAttribute("data-start",String(G+1))}M.textContent=O,r.highlightElement(M)},function(O){w.setAttribute(o,d),M.textContent=O})}}),r.plugins.fileHighlight={highlight:function(w){for(var M=(w||document).querySelectorAll(f),S=0,E;E=M[S++];)r.highlightElement(E)}};var b=!1;r.fileHighlight=function(){b||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),b=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})($1);var t6=$1.exports;const Gl=e6(t6);class Ft{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new Ft(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class Kt{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new Kt(r,Ft.range(this,e))}}class re{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,s,i,a=r&&r.loc;if(a&&a.start<=a.end){var o=a.lexer.input;s=a.start,i=a.end,s===o.length?n+=" at end of input: ":n+=" at position "+(s+1)+": ";var l=o.slice(s,i).replace(/[^]/g,"$&̲"),c;s>15?c="…"+o.slice(s-15,s):c=o.slice(0,s);var d;i+15":">","<":"<",'"':""","'":"'"},o6=/[&><"']/g;function l6(t){return String(t).replace(o6,e=>a6[e])}var F1=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},c6=function(e){var r=F1(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},u6=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},d6=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},be={contains:r6,deflt:n6,escape:l6,hyphenate:i6,getBaseElem:F1,isCharacterBox:c6,protocolFromUrl:d6},as={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 "},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 ",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 ",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 ",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 ",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 ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function h6(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class fo{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 r in as)if(as.hasOwnProperty(r)){var n=as[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:h6(n)}}reportNonstrict(e,r,n){var s=this.strict;if(typeof s=="function"&&(s=s(e,r,n)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new re("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var s=this.strict;if(typeof s=="function")try{s=s(e,r,n)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=be.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class Pr{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return hr[f6[this.id]]}sub(){return hr[p6[this.id]]}fracNum(){return hr[m6[this.id]]}fracDen(){return hr[g6[this.id]]}cramp(){return hr[v6[this.id]]}text(){return hr[b6[this.id]]}isTight(){return this.size>=2}}var po=0,Cs=1,_n=2,Nr=3,m0=4,Vt=5,$n=6,Nt=7,hr=[new Pr(po,0,!1),new Pr(Cs,0,!0),new Pr(_n,1,!1),new Pr(Nr,1,!0),new Pr(m0,2,!1),new Pr(Vt,2,!0),new Pr($n,3,!1),new Pr(Nt,3,!0)],f6=[m0,Vt,m0,Vt,$n,Nt,$n,Nt],p6=[Vt,Vt,Vt,Vt,Nt,Nt,Nt,Nt],m6=[_n,Nr,m0,Vt,$n,Nt,$n,Nt],g6=[Nr,Nr,Vt,Vt,Nt,Nt,Nt,Nt],v6=[Cs,Cs,Nr,Nr,Vt,Vt,Nt,Nt],b6=[po,Cs,_n,Nr,_n,Nr,_n,Nr],ke={DISPLAY:hr[po],TEXT:hr[_n],SCRIPT:hr[m0],SCRIPTSCRIPT:hr[$n]},da=[{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 y6(t){for(var e=0;e=s[0]&&t<=s[1])return r.name}return null}var os=[];da.forEach(t=>t.blocks.forEach(e=>os.push(...e)));function B1(t){for(var e=0;e=os[e]&&t<=os[e+1])return!0;return!1}var Sn=80,w6=function(e,r){return"M95,"+(622+e+r)+` 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 @@ -411,14 +442,14 @@ 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 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,-`+(r+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 E0{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 be.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;rr.toText();return this.children.map(e).join("")}}var fr={"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]}},B0={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]},Yl={Å:"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 D6(t,e){fr[t]=e}function mo(t,e,r){if(!fr[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),s=fr[e][n];if(!s&&t[0]in Yl&&(n=Yl[t[0]].charCodeAt(0),s=fr[e][n]),!s&&r==="text"&&B1(n)&&(s=fr[e][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Si={};function R6(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!Si[e]){var r=Si[e]={cssEmPerMu:B0.quad[e]/18};for(var n in B0)B0.hasOwnProperty(n)&&(r[n]=B0[n][e])}return Si[e]}var I6=[[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]],Xl=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Jl=function(e,r){return r.size<2?e:I6[e-1][r.size-1]};class Tr{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||Tr.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=Xl[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={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 n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new Tr(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Jl(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:Xl[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=Jl(Tr.BASESIZE,e);return this.size===r&&this.textSize===Tr.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}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!==Tr.BASESIZE?["sizing","reset-size"+this.size,"size"+Tr.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=R6(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Tr.BASESIZE=6;var ha={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},_6={ex:!0,em:!0,mu:!0},P1=function(e){return typeof e!="string"&&(e=e.unit),e in ha||e in _6||e==="ex"},tt=function(e,r){var n;if(e.unit in ha)n=ha[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var s;if(r.style.isTight()?s=r.havingStyle(r.style.text()):s=r,e.unit==="ex")n=s.fontMetrics().xHeight;else if(e.unit==="em")n=s.fontMetrics().quad;else throw new re("Invalid unit: '"+e.unit+"'");s!==r&&(n*=s.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},ae=function(e){return+e.toFixed(4)+"em"},Xr=function(e){return e.filter(r=>r).join(" ")},H1=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var s=r.getColor();s&&(this.style.color=s)}},q1=function(e){var r=document.createElement(e);r.className=Xr(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var s in this.attributes)this.attributes.hasOwnProperty(s)&&r.setAttribute(s,this.attributes[s]);for(var i=0;i/=\x00-\x1f]/,j1=function(e){var r="<"+e;this.classes.length&&(r+=' class="'+be.escape(Xr(this.classes))+'"');var n="";for(var s in this.style)this.style.hasOwnProperty(s)&&(n+=be.hyphenate(s)+":"+this.style[s]+";");n&&(r+=' style="'+be.escape(n)+'"');for(var i in this.attributes)if(this.attributes.hasOwnProperty(i)){if(O6.test(i))throw new re("Invalid attribute name '"+i+"'");r+=" "+i+'="'+be.escape(this.attributes[i])+'"'}r+=">";for(var a=0;a",r};class A0{constructor(e,r,n,s){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,H1.call(this,e,n,s),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return be.contains(this.classes,e)}toNode(){return q1.call(this,"span")}toMarkup(){return j1.call(this,"span")}}class go{constructor(e,r,n,s){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,H1.call(this,r,s),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return be.contains(this.classes,e)}toNode(){return q1.call(this,"a")}toMarkup(){return j1.call(this,"a")}}class L6{constructor(e,r,n){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=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return be.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e=''+be.escape(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=ae(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Xr(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var s in this.style)this.style.hasOwnProperty(s)&&(n+=be.hyphenate(s)+":"+this.style[s]+";");n&&(e=!0,r+=' style="'+be.escape(n)+'"');var i=be.escape(this.text);return e?(r+=">",r+=i,r+="",r):i}}class _r{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var s=0;s':''}}class fa{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e=" but got "+String(t)+".")}var F6={bin:1,close:1,inner:1,open:1,punct:1,rel:1},B6={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Je={math:{},text:{}};function u(t,e,r,n,s,i){Je[t][s]={font:e,group:r,replace:n},i&&n&&(Je[t][n]=Je[t][s])}var h="math",X="text",m="main",T="ams",Qe="accent-token",ue="bin",Dt="close",Hn="inner",xe="mathord",dt="op-token",qt="open",Qs="punct",C="rel",$r="spacing",R="textord";u(h,m,C,"≡","\\equiv",!0);u(h,m,C,"≺","\\prec",!0);u(h,m,C,"≻","\\succ",!0);u(h,m,C,"∼","\\sim",!0);u(h,m,C,"⊥","\\perp");u(h,m,C,"⪯","\\preceq",!0);u(h,m,C,"⪰","\\succeq",!0);u(h,m,C,"≃","\\simeq",!0);u(h,m,C,"∣","\\mid",!0);u(h,m,C,"≪","\\ll",!0);u(h,m,C,"≫","\\gg",!0);u(h,m,C,"≍","\\asymp",!0);u(h,m,C,"∥","\\parallel");u(h,m,C,"⋈","\\bowtie",!0);u(h,m,C,"⌣","\\smile",!0);u(h,m,C,"⊑","\\sqsubseteq",!0);u(h,m,C,"⊒","\\sqsupseteq",!0);u(h,m,C,"≐","\\doteq",!0);u(h,m,C,"⌢","\\frown",!0);u(h,m,C,"∋","\\ni",!0);u(h,m,C,"∝","\\propto",!0);u(h,m,C,"⊢","\\vdash",!0);u(h,m,C,"⊣","\\dashv",!0);u(h,m,C,"∋","\\owns");u(h,m,Qs,".","\\ldotp");u(h,m,Qs,"⋅","\\cdotp");u(h,m,R,"#","\\#");u(X,m,R,"#","\\#");u(h,m,R,"&","\\&");u(X,m,R,"&","\\&");u(h,m,R,"ℵ","\\aleph",!0);u(h,m,R,"∀","\\forall",!0);u(h,m,R,"ℏ","\\hbar",!0);u(h,m,R,"∃","\\exists",!0);u(h,m,R,"∇","\\nabla",!0);u(h,m,R,"♭","\\flat",!0);u(h,m,R,"ℓ","\\ell",!0);u(h,m,R,"♮","\\natural",!0);u(h,m,R,"♣","\\clubsuit",!0);u(h,m,R,"℘","\\wp",!0);u(h,m,R,"♯","\\sharp",!0);u(h,m,R,"♢","\\diamondsuit",!0);u(h,m,R,"ℜ","\\Re",!0);u(h,m,R,"♡","\\heartsuit",!0);u(h,m,R,"ℑ","\\Im",!0);u(h,m,R,"♠","\\spadesuit",!0);u(h,m,R,"§","\\S",!0);u(X,m,R,"§","\\S");u(h,m,R,"¶","\\P",!0);u(X,m,R,"¶","\\P");u(h,m,R,"†","\\dag");u(X,m,R,"†","\\dag");u(X,m,R,"†","\\textdagger");u(h,m,R,"‡","\\ddag");u(X,m,R,"‡","\\ddag");u(X,m,R,"‡","\\textdaggerdbl");u(h,m,Dt,"⎱","\\rmoustache",!0);u(h,m,qt,"⎰","\\lmoustache",!0);u(h,m,Dt,"⟯","\\rgroup",!0);u(h,m,qt,"⟮","\\lgroup",!0);u(h,m,ue,"∓","\\mp",!0);u(h,m,ue,"⊖","\\ominus",!0);u(h,m,ue,"⊎","\\uplus",!0);u(h,m,ue,"⊓","\\sqcap",!0);u(h,m,ue,"∗","\\ast");u(h,m,ue,"⊔","\\sqcup",!0);u(h,m,ue,"◯","\\bigcirc",!0);u(h,m,ue,"∙","\\bullet",!0);u(h,m,ue,"‡","\\ddagger");u(h,m,ue,"≀","\\wr",!0);u(h,m,ue,"⨿","\\amalg");u(h,m,ue,"&","\\And");u(h,m,C,"⟵","\\longleftarrow",!0);u(h,m,C,"⇐","\\Leftarrow",!0);u(h,m,C,"⟸","\\Longleftarrow",!0);u(h,m,C,"⟶","\\longrightarrow",!0);u(h,m,C,"⇒","\\Rightarrow",!0);u(h,m,C,"⟹","\\Longrightarrow",!0);u(h,m,C,"↔","\\leftrightarrow",!0);u(h,m,C,"⟷","\\longleftrightarrow",!0);u(h,m,C,"⇔","\\Leftrightarrow",!0);u(h,m,C,"⟺","\\Longleftrightarrow",!0);u(h,m,C,"↦","\\mapsto",!0);u(h,m,C,"⟼","\\longmapsto",!0);u(h,m,C,"↗","\\nearrow",!0);u(h,m,C,"↩","\\hookleftarrow",!0);u(h,m,C,"↪","\\hookrightarrow",!0);u(h,m,C,"↘","\\searrow",!0);u(h,m,C,"↼","\\leftharpoonup",!0);u(h,m,C,"⇀","\\rightharpoonup",!0);u(h,m,C,"↙","\\swarrow",!0);u(h,m,C,"↽","\\leftharpoondown",!0);u(h,m,C,"⇁","\\rightharpoondown",!0);u(h,m,C,"↖","\\nwarrow",!0);u(h,m,C,"⇌","\\rightleftharpoons",!0);u(h,T,C,"≮","\\nless",!0);u(h,T,C,"","\\@nleqslant");u(h,T,C,"","\\@nleqq");u(h,T,C,"⪇","\\lneq",!0);u(h,T,C,"≨","\\lneqq",!0);u(h,T,C,"","\\@lvertneqq");u(h,T,C,"⋦","\\lnsim",!0);u(h,T,C,"⪉","\\lnapprox",!0);u(h,T,C,"⊀","\\nprec",!0);u(h,T,C,"⋠","\\npreceq",!0);u(h,T,C,"⋨","\\precnsim",!0);u(h,T,C,"⪹","\\precnapprox",!0);u(h,T,C,"≁","\\nsim",!0);u(h,T,C,"","\\@nshortmid");u(h,T,C,"∤","\\nmid",!0);u(h,T,C,"⊬","\\nvdash",!0);u(h,T,C,"⊭","\\nvDash",!0);u(h,T,C,"⋪","\\ntriangleleft");u(h,T,C,"⋬","\\ntrianglelefteq",!0);u(h,T,C,"⊊","\\subsetneq",!0);u(h,T,C,"","\\@varsubsetneq");u(h,T,C,"⫋","\\subsetneqq",!0);u(h,T,C,"","\\@varsubsetneqq");u(h,T,C,"≯","\\ngtr",!0);u(h,T,C,"","\\@ngeqslant");u(h,T,C,"","\\@ngeqq");u(h,T,C,"⪈","\\gneq",!0);u(h,T,C,"≩","\\gneqq",!0);u(h,T,C,"","\\@gvertneqq");u(h,T,C,"⋧","\\gnsim",!0);u(h,T,C,"⪊","\\gnapprox",!0);u(h,T,C,"⊁","\\nsucc",!0);u(h,T,C,"⋡","\\nsucceq",!0);u(h,T,C,"⋩","\\succnsim",!0);u(h,T,C,"⪺","\\succnapprox",!0);u(h,T,C,"≆","\\ncong",!0);u(h,T,C,"","\\@nshortparallel");u(h,T,C,"∦","\\nparallel",!0);u(h,T,C,"⊯","\\nVDash",!0);u(h,T,C,"⋫","\\ntriangleright");u(h,T,C,"⋭","\\ntrianglerighteq",!0);u(h,T,C,"","\\@nsupseteqq");u(h,T,C,"⊋","\\supsetneq",!0);u(h,T,C,"","\\@varsupsetneq");u(h,T,C,"⫌","\\supsetneqq",!0);u(h,T,C,"","\\@varsupsetneqq");u(h,T,C,"⊮","\\nVdash",!0);u(h,T,C,"⪵","\\precneqq",!0);u(h,T,C,"⪶","\\succneqq",!0);u(h,T,C,"","\\@nsubseteqq");u(h,T,ue,"⊴","\\unlhd");u(h,T,ue,"⊵","\\unrhd");u(h,T,C,"↚","\\nleftarrow",!0);u(h,T,C,"↛","\\nrightarrow",!0);u(h,T,C,"⇍","\\nLeftarrow",!0);u(h,T,C,"⇏","\\nRightarrow",!0);u(h,T,C,"↮","\\nleftrightarrow",!0);u(h,T,C,"⇎","\\nLeftrightarrow",!0);u(h,T,C,"△","\\vartriangle");u(h,T,R,"ℏ","\\hslash");u(h,T,R,"▽","\\triangledown");u(h,T,R,"◊","\\lozenge");u(h,T,R,"Ⓢ","\\circledS");u(h,T,R,"®","\\circledR");u(X,T,R,"®","\\circledR");u(h,T,R,"∡","\\measuredangle",!0);u(h,T,R,"∄","\\nexists");u(h,T,R,"℧","\\mho");u(h,T,R,"Ⅎ","\\Finv",!0);u(h,T,R,"⅁","\\Game",!0);u(h,T,R,"‵","\\backprime");u(h,T,R,"▲","\\blacktriangle");u(h,T,R,"▼","\\blacktriangledown");u(h,T,R,"■","\\blacksquare");u(h,T,R,"⧫","\\blacklozenge");u(h,T,R,"★","\\bigstar");u(h,T,R,"∢","\\sphericalangle",!0);u(h,T,R,"∁","\\complement",!0);u(h,T,R,"ð","\\eth",!0);u(X,m,R,"ð","ð");u(h,T,R,"╱","\\diagup");u(h,T,R,"╲","\\diagdown");u(h,T,R,"□","\\square");u(h,T,R,"□","\\Box");u(h,T,R,"◊","\\Diamond");u(h,T,R,"¥","\\yen",!0);u(X,T,R,"¥","\\yen",!0);u(h,T,R,"✓","\\checkmark",!0);u(X,T,R,"✓","\\checkmark");u(h,T,R,"ℶ","\\beth",!0);u(h,T,R,"ℸ","\\daleth",!0);u(h,T,R,"ℷ","\\gimel",!0);u(h,T,R,"ϝ","\\digamma",!0);u(h,T,R,"ϰ","\\varkappa");u(h,T,qt,"┌","\\@ulcorner",!0);u(h,T,Dt,"┐","\\@urcorner",!0);u(h,T,qt,"└","\\@llcorner",!0);u(h,T,Dt,"┘","\\@lrcorner",!0);u(h,T,C,"≦","\\leqq",!0);u(h,T,C,"⩽","\\leqslant",!0);u(h,T,C,"⪕","\\eqslantless",!0);u(h,T,C,"≲","\\lesssim",!0);u(h,T,C,"⪅","\\lessapprox",!0);u(h,T,C,"≊","\\approxeq",!0);u(h,T,ue,"⋖","\\lessdot");u(h,T,C,"⋘","\\lll",!0);u(h,T,C,"≶","\\lessgtr",!0);u(h,T,C,"⋚","\\lesseqgtr",!0);u(h,T,C,"⪋","\\lesseqqgtr",!0);u(h,T,C,"≑","\\doteqdot");u(h,T,C,"≓","\\risingdotseq",!0);u(h,T,C,"≒","\\fallingdotseq",!0);u(h,T,C,"∽","\\backsim",!0);u(h,T,C,"⋍","\\backsimeq",!0);u(h,T,C,"⫅","\\subseteqq",!0);u(h,T,C,"⋐","\\Subset",!0);u(h,T,C,"⊏","\\sqsubset",!0);u(h,T,C,"≼","\\preccurlyeq",!0);u(h,T,C,"⋞","\\curlyeqprec",!0);u(h,T,C,"≾","\\precsim",!0);u(h,T,C,"⪷","\\precapprox",!0);u(h,T,C,"⊲","\\vartriangleleft");u(h,T,C,"⊴","\\trianglelefteq");u(h,T,C,"⊨","\\vDash",!0);u(h,T,C,"⊪","\\Vvdash",!0);u(h,T,C,"⌣","\\smallsmile");u(h,T,C,"⌢","\\smallfrown");u(h,T,C,"≏","\\bumpeq",!0);u(h,T,C,"≎","\\Bumpeq",!0);u(h,T,C,"≧","\\geqq",!0);u(h,T,C,"⩾","\\geqslant",!0);u(h,T,C,"⪖","\\eqslantgtr",!0);u(h,T,C,"≳","\\gtrsim",!0);u(h,T,C,"⪆","\\gtrapprox",!0);u(h,T,ue,"⋗","\\gtrdot");u(h,T,C,"⋙","\\ggg",!0);u(h,T,C,"≷","\\gtrless",!0);u(h,T,C,"⋛","\\gtreqless",!0);u(h,T,C,"⪌","\\gtreqqless",!0);u(h,T,C,"≖","\\eqcirc",!0);u(h,T,C,"≗","\\circeq",!0);u(h,T,C,"≜","\\triangleq",!0);u(h,T,C,"∼","\\thicksim");u(h,T,C,"≈","\\thickapprox");u(h,T,C,"⫆","\\supseteqq",!0);u(h,T,C,"⋑","\\Supset",!0);u(h,T,C,"⊐","\\sqsupset",!0);u(h,T,C,"≽","\\succcurlyeq",!0);u(h,T,C,"⋟","\\curlyeqsucc",!0);u(h,T,C,"≿","\\succsim",!0);u(h,T,C,"⪸","\\succapprox",!0);u(h,T,C,"⊳","\\vartriangleright");u(h,T,C,"⊵","\\trianglerighteq");u(h,T,C,"⊩","\\Vdash",!0);u(h,T,C,"∣","\\shortmid");u(h,T,C,"∥","\\shortparallel");u(h,T,C,"≬","\\between",!0);u(h,T,C,"⋔","\\pitchfork",!0);u(h,T,C,"∝","\\varpropto");u(h,T,C,"◀","\\blacktriangleleft");u(h,T,C,"∴","\\therefore",!0);u(h,T,C,"∍","\\backepsilon");u(h,T,C,"▶","\\blacktriangleright");u(h,T,C,"∵","\\because",!0);u(h,T,C,"⋘","\\llless");u(h,T,C,"⋙","\\gggtr");u(h,T,ue,"⊲","\\lhd");u(h,T,ue,"⊳","\\rhd");u(h,T,C,"≂","\\eqsim",!0);u(h,m,C,"⋈","\\Join");u(h,T,C,"≑","\\Doteq",!0);u(h,T,ue,"∔","\\dotplus",!0);u(h,T,ue,"∖","\\smallsetminus");u(h,T,ue,"⋒","\\Cap",!0);u(h,T,ue,"⋓","\\Cup",!0);u(h,T,ue,"⩞","\\doublebarwedge",!0);u(h,T,ue,"⊟","\\boxminus",!0);u(h,T,ue,"⊞","\\boxplus",!0);u(h,T,ue,"⋇","\\divideontimes",!0);u(h,T,ue,"⋉","\\ltimes",!0);u(h,T,ue,"⋊","\\rtimes",!0);u(h,T,ue,"⋋","\\leftthreetimes",!0);u(h,T,ue,"⋌","\\rightthreetimes",!0);u(h,T,ue,"⋏","\\curlywedge",!0);u(h,T,ue,"⋎","\\curlyvee",!0);u(h,T,ue,"⊝","\\circleddash",!0);u(h,T,ue,"⊛","\\circledast",!0);u(h,T,ue,"⋅","\\centerdot");u(h,T,ue,"⊺","\\intercal",!0);u(h,T,ue,"⋒","\\doublecap");u(h,T,ue,"⋓","\\doublecup");u(h,T,ue,"⊠","\\boxtimes",!0);u(h,T,C,"⇢","\\dashrightarrow",!0);u(h,T,C,"⇠","\\dashleftarrow",!0);u(h,T,C,"⇇","\\leftleftarrows",!0);u(h,T,C,"⇆","\\leftrightarrows",!0);u(h,T,C,"⇚","\\Lleftarrow",!0);u(h,T,C,"↞","\\twoheadleftarrow",!0);u(h,T,C,"↢","\\leftarrowtail",!0);u(h,T,C,"↫","\\looparrowleft",!0);u(h,T,C,"⇋","\\leftrightharpoons",!0);u(h,T,C,"↶","\\curvearrowleft",!0);u(h,T,C,"↺","\\circlearrowleft",!0);u(h,T,C,"↰","\\Lsh",!0);u(h,T,C,"⇈","\\upuparrows",!0);u(h,T,C,"↿","\\upharpoonleft",!0);u(h,T,C,"⇃","\\downharpoonleft",!0);u(h,m,C,"⊶","\\origof",!0);u(h,m,C,"⊷","\\imageof",!0);u(h,T,C,"⊸","\\multimap",!0);u(h,T,C,"↭","\\leftrightsquigarrow",!0);u(h,T,C,"⇉","\\rightrightarrows",!0);u(h,T,C,"⇄","\\rightleftarrows",!0);u(h,T,C,"↠","\\twoheadrightarrow",!0);u(h,T,C,"↣","\\rightarrowtail",!0);u(h,T,C,"↬","\\looparrowright",!0);u(h,T,C,"↷","\\curvearrowright",!0);u(h,T,C,"↻","\\circlearrowright",!0);u(h,T,C,"↱","\\Rsh",!0);u(h,T,C,"⇊","\\downdownarrows",!0);u(h,T,C,"↾","\\upharpoonright",!0);u(h,T,C,"⇂","\\downharpoonright",!0);u(h,T,C,"⇝","\\rightsquigarrow",!0);u(h,T,C,"⇝","\\leadsto");u(h,T,C,"⇛","\\Rrightarrow",!0);u(h,T,C,"↾","\\restriction");u(h,m,R,"‘","`");u(h,m,R,"$","\\$");u(X,m,R,"$","\\$");u(X,m,R,"$","\\textdollar");u(h,m,R,"%","\\%");u(X,m,R,"%","\\%");u(h,m,R,"_","\\_");u(X,m,R,"_","\\_");u(X,m,R,"_","\\textunderscore");u(h,m,R,"∠","\\angle",!0);u(h,m,R,"∞","\\infty",!0);u(h,m,R,"′","\\prime");u(h,m,R,"△","\\triangle");u(h,m,R,"Γ","\\Gamma",!0);u(h,m,R,"Δ","\\Delta",!0);u(h,m,R,"Θ","\\Theta",!0);u(h,m,R,"Λ","\\Lambda",!0);u(h,m,R,"Ξ","\\Xi",!0);u(h,m,R,"Π","\\Pi",!0);u(h,m,R,"Σ","\\Sigma",!0);u(h,m,R,"Υ","\\Upsilon",!0);u(h,m,R,"Φ","\\Phi",!0);u(h,m,R,"Ψ","\\Psi",!0);u(h,m,R,"Ω","\\Omega",!0);u(h,m,R,"A","Α");u(h,m,R,"B","Β");u(h,m,R,"E","Ε");u(h,m,R,"Z","Ζ");u(h,m,R,"H","Η");u(h,m,R,"I","Ι");u(h,m,R,"K","Κ");u(h,m,R,"M","Μ");u(h,m,R,"N","Ν");u(h,m,R,"O","Ο");u(h,m,R,"P","Ρ");u(h,m,R,"T","Τ");u(h,m,R,"X","Χ");u(h,m,R,"¬","\\neg",!0);u(h,m,R,"¬","\\lnot");u(h,m,R,"⊤","\\top");u(h,m,R,"⊥","\\bot");u(h,m,R,"∅","\\emptyset");u(h,T,R,"∅","\\varnothing");u(h,m,xe,"α","\\alpha",!0);u(h,m,xe,"β","\\beta",!0);u(h,m,xe,"γ","\\gamma",!0);u(h,m,xe,"δ","\\delta",!0);u(h,m,xe,"ϵ","\\epsilon",!0);u(h,m,xe,"ζ","\\zeta",!0);u(h,m,xe,"η","\\eta",!0);u(h,m,xe,"θ","\\theta",!0);u(h,m,xe,"ι","\\iota",!0);u(h,m,xe,"κ","\\kappa",!0);u(h,m,xe,"λ","\\lambda",!0);u(h,m,xe,"μ","\\mu",!0);u(h,m,xe,"ν","\\nu",!0);u(h,m,xe,"ξ","\\xi",!0);u(h,m,xe,"ο","\\omicron",!0);u(h,m,xe,"π","\\pi",!0);u(h,m,xe,"ρ","\\rho",!0);u(h,m,xe,"σ","\\sigma",!0);u(h,m,xe,"τ","\\tau",!0);u(h,m,xe,"υ","\\upsilon",!0);u(h,m,xe,"ϕ","\\phi",!0);u(h,m,xe,"χ","\\chi",!0);u(h,m,xe,"ψ","\\psi",!0);u(h,m,xe,"ω","\\omega",!0);u(h,m,xe,"ε","\\varepsilon",!0);u(h,m,xe,"ϑ","\\vartheta",!0);u(h,m,xe,"ϖ","\\varpi",!0);u(h,m,xe,"ϱ","\\varrho",!0);u(h,m,xe,"ς","\\varsigma",!0);u(h,m,xe,"φ","\\varphi",!0);u(h,m,ue,"∗","*",!0);u(h,m,ue,"+","+");u(h,m,ue,"−","-",!0);u(h,m,ue,"⋅","\\cdot",!0);u(h,m,ue,"∘","\\circ",!0);u(h,m,ue,"÷","\\div",!0);u(h,m,ue,"±","\\pm",!0);u(h,m,ue,"×","\\times",!0);u(h,m,ue,"∩","\\cap",!0);u(h,m,ue,"∪","\\cup",!0);u(h,m,ue,"∖","\\setminus",!0);u(h,m,ue,"∧","\\land");u(h,m,ue,"∨","\\lor");u(h,m,ue,"∧","\\wedge",!0);u(h,m,ue,"∨","\\vee",!0);u(h,m,R,"√","\\surd");u(h,m,qt,"⟨","\\langle",!0);u(h,m,qt,"∣","\\lvert");u(h,m,qt,"∥","\\lVert");u(h,m,Dt,"?","?");u(h,m,Dt,"!","!");u(h,m,Dt,"⟩","\\rangle",!0);u(h,m,Dt,"∣","\\rvert");u(h,m,Dt,"∥","\\rVert");u(h,m,C,"=","=");u(h,m,C,":",":");u(h,m,C,"≈","\\approx",!0);u(h,m,C,"≅","\\cong",!0);u(h,m,C,"≥","\\ge");u(h,m,C,"≥","\\geq",!0);u(h,m,C,"←","\\gets");u(h,m,C,">","\\gt",!0);u(h,m,C,"∈","\\in",!0);u(h,m,C,"","\\@not");u(h,m,C,"⊂","\\subset",!0);u(h,m,C,"⊃","\\supset",!0);u(h,m,C,"⊆","\\subseteq",!0);u(h,m,C,"⊇","\\supseteq",!0);u(h,T,C,"⊈","\\nsubseteq",!0);u(h,T,C,"⊉","\\nsupseteq",!0);u(h,m,C,"⊨","\\models");u(h,m,C,"←","\\leftarrow",!0);u(h,m,C,"≤","\\le");u(h,m,C,"≤","\\leq",!0);u(h,m,C,"<","\\lt",!0);u(h,m,C,"→","\\rightarrow",!0);u(h,m,C,"→","\\to");u(h,T,C,"≱","\\ngeq",!0);u(h,T,C,"≰","\\nleq",!0);u(h,m,$r," ","\\ ");u(h,m,$r," ","\\space");u(h,m,$r," ","\\nobreakspace");u(X,m,$r," ","\\ ");u(X,m,$r," "," ");u(X,m,$r," ","\\space");u(X,m,$r," ","\\nobreakspace");u(h,m,$r,null,"\\nobreak");u(h,m,$r,null,"\\allowbreak");u(h,m,Qs,",",",");u(h,m,Qs,";",";");u(h,T,ue,"⊼","\\barwedge",!0);u(h,T,ue,"⊻","\\veebar",!0);u(h,m,ue,"⊙","\\odot",!0);u(h,m,ue,"⊕","\\oplus",!0);u(h,m,ue,"⊗","\\otimes",!0);u(h,m,R,"∂","\\partial",!0);u(h,m,ue,"⊘","\\oslash",!0);u(h,T,ue,"⊚","\\circledcirc",!0);u(h,T,ue,"⊡","\\boxdot",!0);u(h,m,ue,"△","\\bigtriangleup");u(h,m,ue,"▽","\\bigtriangledown");u(h,m,ue,"†","\\dagger");u(h,m,ue,"⋄","\\diamond");u(h,m,ue,"⋆","\\star");u(h,m,ue,"◃","\\triangleleft");u(h,m,ue,"▹","\\triangleright");u(h,m,qt,"{","\\{");u(X,m,R,"{","\\{");u(X,m,R,"{","\\textbraceleft");u(h,m,Dt,"}","\\}");u(X,m,R,"}","\\}");u(X,m,R,"}","\\textbraceright");u(h,m,qt,"{","\\lbrace");u(h,m,Dt,"}","\\rbrace");u(h,m,qt,"[","\\lbrack",!0);u(X,m,R,"[","\\lbrack",!0);u(h,m,Dt,"]","\\rbrack",!0);u(X,m,R,"]","\\rbrack",!0);u(h,m,qt,"(","\\lparen",!0);u(h,m,Dt,")","\\rparen",!0);u(X,m,R,"<","\\textless",!0);u(X,m,R,">","\\textgreater",!0);u(h,m,qt,"⌊","\\lfloor",!0);u(h,m,Dt,"⌋","\\rfloor",!0);u(h,m,qt,"⌈","\\lceil",!0);u(h,m,Dt,"⌉","\\rceil",!0);u(h,m,R,"\\","\\backslash");u(h,m,R,"∣","|");u(h,m,R,"∣","\\vert");u(X,m,R,"|","\\textbar",!0);u(h,m,R,"∥","\\|");u(h,m,R,"∥","\\Vert");u(X,m,R,"∥","\\textbardbl");u(X,m,R,"~","\\textasciitilde");u(X,m,R,"\\","\\textbackslash");u(X,m,R,"^","\\textasciicircum");u(h,m,C,"↑","\\uparrow",!0);u(h,m,C,"⇑","\\Uparrow",!0);u(h,m,C,"↓","\\downarrow",!0);u(h,m,C,"⇓","\\Downarrow",!0);u(h,m,C,"↕","\\updownarrow",!0);u(h,m,C,"⇕","\\Updownarrow",!0);u(h,m,dt,"∐","\\coprod");u(h,m,dt,"⋁","\\bigvee");u(h,m,dt,"⋀","\\bigwedge");u(h,m,dt,"⨄","\\biguplus");u(h,m,dt,"⋂","\\bigcap");u(h,m,dt,"⋃","\\bigcup");u(h,m,dt,"∫","\\int");u(h,m,dt,"∫","\\intop");u(h,m,dt,"∬","\\iint");u(h,m,dt,"∭","\\iiint");u(h,m,dt,"∏","\\prod");u(h,m,dt,"∑","\\sum");u(h,m,dt,"⨂","\\bigotimes");u(h,m,dt,"⨁","\\bigoplus");u(h,m,dt,"⨀","\\bigodot");u(h,m,dt,"∮","\\oint");u(h,m,dt,"∯","\\oiint");u(h,m,dt,"∰","\\oiiint");u(h,m,dt,"⨆","\\bigsqcup");u(h,m,dt,"∫","\\smallint");u(X,m,Hn,"…","\\textellipsis");u(h,m,Hn,"…","\\mathellipsis");u(X,m,Hn,"…","\\ldots",!0);u(h,m,Hn,"…","\\ldots",!0);u(h,m,Hn,"⋯","\\@cdots",!0);u(h,m,Hn,"⋱","\\ddots",!0);u(h,m,R,"⋮","\\varvdots");u(X,m,R,"⋮","\\varvdots");u(h,m,Qe,"ˊ","\\acute");u(h,m,Qe,"ˋ","\\grave");u(h,m,Qe,"¨","\\ddot");u(h,m,Qe,"~","\\tilde");u(h,m,Qe,"ˉ","\\bar");u(h,m,Qe,"˘","\\breve");u(h,m,Qe,"ˇ","\\check");u(h,m,Qe,"^","\\hat");u(h,m,Qe,"⃗","\\vec");u(h,m,Qe,"˙","\\dot");u(h,m,Qe,"˚","\\mathring");u(h,m,xe,"","\\@imath");u(h,m,xe,"","\\@jmath");u(h,m,R,"ı","ı");u(h,m,R,"ȷ","ȷ");u(X,m,R,"ı","\\i",!0);u(X,m,R,"ȷ","\\j",!0);u(X,m,R,"ß","\\ss",!0);u(X,m,R,"æ","\\ae",!0);u(X,m,R,"œ","\\oe",!0);u(X,m,R,"ø","\\o",!0);u(X,m,R,"Æ","\\AE",!0);u(X,m,R,"Œ","\\OE",!0);u(X,m,R,"Ø","\\O",!0);u(X,m,Qe,"ˊ","\\'");u(X,m,Qe,"ˋ","\\`");u(X,m,Qe,"ˆ","\\^");u(X,m,Qe,"˜","\\~");u(X,m,Qe,"ˉ","\\=");u(X,m,Qe,"˘","\\u");u(X,m,Qe,"˙","\\.");u(X,m,Qe,"¸","\\c");u(X,m,Qe,"˚","\\r");u(X,m,Qe,"ˇ","\\v");u(X,m,Qe,"¨",'\\"');u(X,m,Qe,"˝","\\H");u(X,m,Qe,"◯","\\textcircled");var U1={"--":!0,"---":!0,"``":!0,"''":!0};u(X,m,R,"–","--",!0);u(X,m,R,"–","\\textendash");u(X,m,R,"—","---",!0);u(X,m,R,"—","\\textemdash");u(X,m,R,"‘","`",!0);u(X,m,R,"‘","\\textquoteleft");u(X,m,R,"’","'",!0);u(X,m,R,"’","\\textquoteright");u(X,m,R,"“","``",!0);u(X,m,R,"“","\\textquotedblleft");u(X,m,R,"”","''",!0);u(X,m,R,"”","\\textquotedblright");u(h,m,R,"°","\\degree",!0);u(X,m,R,"°","\\degree");u(X,m,R,"°","\\textdegree",!0);u(h,m,R,"£","\\pounds");u(h,m,R,"£","\\mathsterling",!0);u(X,m,R,"£","\\pounds");u(X,m,R,"£","\\textsterling",!0);u(h,T,R,"✠","\\maltese");u(X,T,R,"✠","\\maltese");var Ql='0123456789/@."';for(var Ti=0;Ti0)return Qt(i,c,s,r,a.concat(d));if(l){var f,p;if(l==="boldsymbol"){var v=q6(i,s,r,a,n);f=v.fontName,p=[v.fontClass]}else o?(f=G1[l].fontName,p=[l]):(f=j0(l,r.fontWeight,r.fontShape),p=[l,r.fontWeight,r.fontShape]);if(ei(i,f,s).metrics)return Qt(i,f,s,r,a.concat(p));if(U1.hasOwnProperty(i)&&f.slice(0,10)==="Typewriter"){for(var b=[],y=0;y{if(Xr(t.classes)!==Xr(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var s in e.style)if(e.style.hasOwnProperty(s)&&t.style[s]!==e.style[s])return!1;return!0},V6=t=>{for(var e=0;er&&(r=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>s&&(s=a.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=s},_t=function(e,r,n,s){var i=new A0(e,r,n,s);return vo(i),i},V1=(t,e,r,n)=>new A0(t,e,r,n),W6=function(e,r,n){var s=_t([e],[],r);return s.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),s.style.borderBottomWidth=ae(s.height),s.maxFontSize=1,s},G6=function(e,r,n,s){var i=new go(e,r,n,s);return vo(i),i},W1=function(e){var r=new E0(e);return vo(r),r},K6=function(e,r){return e instanceof E0?_t([],[e],r):e},Y6=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],s=-r[0].shift-r[0].elem.depth,i=s,a=1;a{var r=_t(["mspace"],[],e),n=tt(t,e);return r.style.marginRight=ae(n),r},j0=function(e,r,n){var s="";switch(e){case"amsrm":s="AMS";break;case"textrm":s="Main";break;case"textsf":s="SansSerif";break;case"texttt":s="Typewriter";break;default:s=e}var i;return r==="textbf"&&n==="textit"?i="BoldItalic":r==="textbf"?i="Bold":r==="textit"?i="Italic":i="Regular",s+"-"+i},G1={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"}},K1={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Z6=function(e,r){var[n,s,i]=K1[e],a=new Jr(n),o=new _r([a],{width:ae(s),height:ae(i),style:"width:"+ae(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=V1(["overlay"],[o],r);return l.height=i,l.style.height=ae(i),l.style.width=ae(s),l},z={fontMap:G1,makeSymbol:Qt,mathsym:H6,makeSpan:_t,makeSvgSpan:V1,makeLineSpan:W6,makeAnchor:G6,makeFragment:W1,wrapFragment:K6,makeVList:X6,makeOrd:j6,makeGlue:J6,staticSvg:Z6,svgData:K1,tryCombineChars:V6},et={number:3,unit:"mu"},cn={number:4,unit:"mu"},xr={number:5,unit:"mu"},Q6={mord:{mop:et,mbin:cn,mrel:xr,minner:et},mop:{mord:et,mop:et,mrel:xr,minner:et},mbin:{mord:cn,mop:cn,mopen:cn,minner:cn},mrel:{mord:xr,mop:xr,mopen:xr,minner:xr},mopen:{},mclose:{mop:et,mbin:cn,mrel:xr,minner:et},mpunct:{mord:et,mop:et,mrel:xr,mopen:et,mclose:et,mpunct:et,minner:et},minner:{mord:et,mop:et,mbin:cn,mrel:xr,mopen:et,mpunct:et,minner:et}},e5={mord:{mop:et},mop:{mord:et,mop:et},mbin:{},mrel:{},mopen:{},mclose:{mop:et},mpunct:{},minner:{mop:et}},Y1={},Ns={},Ds={};function ce(t){for(var{type:e,names:r,props:n,handler:s,htmlBuilder:i,mathmlBuilder:a}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:s},l=0;l{var w=y.classes[0],M=b.classes[0];w==="mbin"&&be.contains(r5,M)?y.classes[0]="mord":M==="mbin"&&be.contains(t5,w)&&(b.classes[0]="mord")},{node:f},p,v),sc(i,(b,y)=>{var w=ma(y),M=ma(b),S=w&&M?b.hasClass("mtight")?e5[w][M]:Q6[w][M]:null;if(S)return z.makeGlue(S,c)},{node:f},p,v),i},sc=function t(e,r,n,s,i){s&&e.push(s);for(var a=0;ap=>{e.splice(f+1,0,p),a++})(a)}s&&e.pop()},X1=function(e){return e instanceof E0||e instanceof go||e instanceof A0&&e.hasClass("enclosing")?e:null},i5=function t(e,r){var n=X1(e);if(n){var s=n.children;if(s.length){if(r==="right")return t(s[s.length-1],"right");if(r==="left")return t(s[0],"left")}}return e},ma=function(e,r){return e?(r&&(e=i5(e,r)),s5[e.classes[0]]||null):null},g0=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Or(r.concat(n))},Le=function(e,r,n){if(!e)return Or();if(Ns[e.type]){var s=Ns[e.type](e,r);if(n&&r.size!==n.size){s=Or(r.sizingClasses(n),[s],r);var i=r.sizeMultiplier/n.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new re("Got group of unknown type: '"+e.type+"'")};function U0(t,e){var r=Or(["base"],t,e),n=Or(["strut"]);return n.style.height=ae(r.height+r.depth),r.depth&&(n.style.verticalAlign=ae(-r.depth)),r.children.unshift(n),r}function ga(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=ht(t,e,"root"),s;n.length===2&&n[1].hasClass("tag")&&(s=n.pop());for(var i=[],a=[],o=0;o0&&(i.push(U0(a,e)),a=[]),i.push(n[o]));a.length>0&&i.push(U0(a,e));var c;r?(c=U0(ht(r,e,!0)),c.classes=["tag"],i.push(c)):s&&i.push(s);var d=Or(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),c){var f=c.children[0];f.style.height=ae(d.height+d.depth),d.depth&&(f.style.verticalAlign=ae(-d.depth))}return d}function J1(t){return new E0(t)}class Bt{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=Xr(this.classes));for(var n=0;n0&&(e+=' class ="'+be.escape(Xr(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}}class pr{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return be.escape(this.toText())}toText(){return this.text}}class a5{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",ae(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var ee={MathNode:Bt,TextNode:pr,SpaceNode:a5,newDocumentFragment:J1},Xt=function(e,r,n){return Je[r][e]&&Je[r][e].replace&&e.charCodeAt(0)!==55349&&!(U1.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=Je[r][e].replace),new ee.TextNode(e)},bo=function(e){return e.length===1?e[0]:new ee.MathNode("mrow",e)},yo=function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var s=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.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 i=e.text;if(be.contains(["\\imath","\\jmath"],i))return null;Je[s][i]&&Je[s][i].replace&&(i=Je[s][i].replace);var a=z.fontMap[n].fontName;return mo(i,a,s)?z.fontMap[n].variant:null};function Mi(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof pr&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof pr&&r.text===","}else return!1}var Lt=function(e,r,n){if(e.length===1){var s=We(e[0],r);return n&&s instanceof Bt&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||Mi(a))){var c=l.children[0];c instanceof Bt&&c.type==="mn"&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var d=a.children[0];if(d instanceof pr&&d.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof pr&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(l),a=l}return i},Zr=function(e,r,n){return bo(Lt(e,r,n))},We=function(e,r){if(!e)return new ee.MathNode("mrow");if(Ds[e.type]){var n=Ds[e.type](e,r);return n}else throw new re("Got group of unknown type: '"+e.type+"'")};function ic(t,e,r,n,s){var i=Lt(t,r),a;i.length===1&&i[0]instanceof Bt&&be.contains(["mrow","mtable"],i[0].type)?a=i[0]:a=new ee.MathNode("mrow",i);var o=new ee.MathNode("annotation",[new ee.TextNode(e)]);o.setAttribute("encoding","application/x-tex");var l=new ee.MathNode("semantics",[a,o]),c=new ee.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var d=s?"katex":"katex-mathml";return z.makeSpan([d],[c])}var Z1=function(e){return new Tr({style:e.displayMode?ke.DISPLAY:ke.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Q1=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=z.makeSpan(n,[e])}return e},o5=function(e,r,n){var s=Z1(n),i;if(n.output==="mathml")return ic(e,r,s,n.displayMode,!0);if(n.output==="html"){var a=ga(e,s);i=z.makeSpan(["katex"],[a])}else{var o=ic(e,r,s,n.displayMode,!1),l=ga(e,s);i=z.makeSpan(["katex"],[o,l])}return Q1(i,n)},l5=function(e,r,n){var s=Z1(n),i=ga(e,s),a=z.makeSpan(["katex"],[i]);return Q1(a,n)},c5={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":"="},u5=function(e){var r=new ee.MathNode("mo",[new ee.TextNode(c5[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},d5={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]},h5=function(e){return e.type==="ordgroup"?e.body.length:1},f5=function(e,r){function n(){var o=4e5,l=e.label.slice(1);if(be.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=e,d=h5(c.base),f,p,v;if(d>5)l==="widehat"||l==="widecheck"?(f=420,o=2364,v=.42,p=l+"4"):(f=312,o=2340,v=.34,p="tilde4");else{var b=[1,1,2,2,3,3][d];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][b],f=[0,239,300,360,420][b],v=[0,.24,.3,.3,.36,.42][b],p=l+b):(o=[0,600,1033,2339,2340][b],f=[0,260,286,306,312][b],v=[0,.26,.286,.3,.306,.34][b],p="tilde"+b)}var y=new Jr(p),w=new _r([y],{width:"100%",height:ae(v),viewBox:"0 0 "+o+" "+f,preserveAspectRatio:"none"});return{span:z.makeSvgSpan([],[w],r),minWidth:0,height:v}}else{var M=[],S=d5[l],[E,D,I]=S,O=I/1e3,$=E.length,K,G;if($===1){var pe=S[3];K=["hide-tail"],G=[pe]}else if($===2)K=["halfarrow-left","halfarrow-right"],G=["xMinYMin","xMaxYMin"];else if($===3)K=["brace-left","brace-center","brace-right"],G=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+$+" children.");for(var ye=0;ye<$;ye++){var Ee=new Jr(E[ye]),Ge=new _r([Ee],{width:"400em",height:ae(O),viewBox:"0 0 "+o+" "+I,preserveAspectRatio:G[ye]+" slice"}),qe=z.makeSvgSpan([K[ye]],[Ge],r);if($===1)return{span:qe,minWidth:D,height:O};qe.style.height=ae(O),M.push(qe)}return{span:z.makeSpan(["stretchy"],M,r),minWidth:D,height:O}}}var{span:s,minWidth:i,height:a}=n();return s.height=a,s.style.height=ae(a),i>0&&(s.style.minWidth=ae(i)),s},p5=function(e,r,n,s,i){var a,o=e.height+e.depth+n+s;if(/fbox|color|angl/.test(r)){if(a=z.makeSpan(["stretchy",r],[],i),r==="fbox"){var l=i.color&&i.getColor();l&&(a.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new fa({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new fa({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new _r(c,{width:"100%",height:ae(o)});a=z.makeSvgSpan([],[d],i)}return a.height=o,a.style.height=ae(o),a},Lr={encloseSpan:p5,mathMLnode:u5,svgSpan:f5};function De(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 wo(t){var e=ti(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 ti(t){return t&&(t.type==="atom"||B6.hasOwnProperty(t.type))?t:null}var xo=(t,e)=>{var r,n,s;t&&t.type==="supsub"?(n=De(t.base,"accent"),r=n.base,t.base=r,s=$6(Le(t,e)),t.base=n):(n=De(t,"accent"),r=n.base);var i=Le(r,e.havingCrampedStyle()),a=n.isShifty&&be.isCharacterBox(r),o=0;if(a){var l=be.getBaseElem(r),c=Le(l,e.havingCrampedStyle());o=Zl(c).skew}var d=n.label==="\\c",f=d?i.height+i.depth:Math.min(i.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=Lr.svgSpan(n,e),p=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ae(2*o)+")",marginLeft:ae(2*o)}:void 0}]},e);else{var v,b;n.label==="\\vec"?(v=z.staticSvg("vec",e),b=z.svgData.vec[1]):(v=z.makeOrd({mode:n.mode,text:n.label},e,"textord"),v=Zl(v),v.italic=0,b=v.width,d&&(f+=v.depth)),p=z.makeSpan(["accent-body"],[v]);var y=n.label==="\\textcircled";y&&(p.classes.push("accent-full"),f=i.height);var w=o;y||(w-=b/2),p.style.left=ae(w),n.label==="\\textcircled"&&(p.style.top=".2em"),p=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]},e)}var M=z.makeSpan(["mord","accent"],[p],e);return s?(s.children[0]=M,s.height=Math.max(M.height,s.height),s.classes[0]="mord",s):M},ed=(t,e)=>{var r=t.isStretchy?Lr.mathMLnode(t.label):new ee.MathNode("mo",[Xt(t.label,t.mode)]),n=new ee.MathNode("mover",[We(t.base,e),r]);return n.setAttribute("accent","true"),n},m5=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));ce({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 r=Rs(e[0]),n=!m5.test(t.funcName),s=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:s,base:r}},htmlBuilder:xo,mathmlBuilder:ed});ce({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:xo,mathmlBuilder:ed});ce({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:s}},htmlBuilder:(t,e)=>{var r=Le(t.base,e),n=Lr.svgSpan(t,e),s=t.label==="\\utilde"?.12:0,i=z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:r}]},e);return z.makeSpan(["mord","accentunder"],[i],e)},mathmlBuilder:(t,e)=>{var r=Lr.mathMLnode(t.label),n=new ee.MathNode("munder",[We(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});var V0=t=>{var e=new ee.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};ce({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,r){var{parser:n,funcName:s}=t;return{type:"xArrow",mode:n.mode,label:s,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),s=z.wrapFragment(Le(t.body,n,e),e),i=t.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var a;t.below&&(n=e.havingStyle(r.sub()),a=z.wrapFragment(Le(t.below,n,e),e),a.classes.push(i+"-arrow-pad"));var o=Lr.svgSpan(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,c=-e.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||t.label==="\\xleftequilibrium")&&(c-=s.depth);var d;if(a){var f=-e.fontMetrics().axisHeight+a.height+.5*o.height+.111;d=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:c},{type:"elem",elem:o,shift:l},{type:"elem",elem:a,shift:f}]},e)}else d=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:c},{type:"elem",elem:o,shift:l}]},e);return d.children[0].children[0].children[1].classes.push("svg-align"),z.makeSpan(["mrel","x-arrow"],[d],e)},mathmlBuilder(t,e){var r=Lr.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var s=V0(We(t.body,e));if(t.below){var i=V0(We(t.below,e));n=new ee.MathNode("munderover",[r,i,s])}else n=new ee.MathNode("mover",[r,s])}else if(t.below){var a=V0(We(t.below,e));n=new ee.MathNode("munder",[r,a])}else n=V0(),n=new ee.MathNode("mover",[r,n]);return n}});var g5=z.makeSpan;function td(t,e){var r=ht(t.body,e,!0);return g5([t.mclass],r,e)}function rd(t,e){var r,n=Lt(t.body,e);return t.mclass==="minner"?r=new ee.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new ee.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new ee.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ce({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,s=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:at(s),isCharacterBox:be.isCharacterBox(s)}},htmlBuilder:td,mathmlBuilder:rd});var ri=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"};ce({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:ri(e[0]),body:at(e[1]),isCharacterBox:be.isCharacterBox(e[1])}}});ce({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,s=e[1],i=e[0],a;n!=="\\stackrel"?a=ri(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:at(s)},l={type:"supsub",mode:i.mode,base:o,sup:n==="\\underset"?null:i,sub:n==="\\underset"?i:null};return{type:"mclass",mode:r.mode,mclass:a,body:[l],isCharacterBox:be.isCharacterBox(l)}},htmlBuilder:td,mathmlBuilder:rd});ce({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:ri(e[0]),body:at(e[0])}},htmlBuilder(t,e){var r=ht(t.body,e,!0),n=z.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=Lt(t.body,e),n=new ee.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var v5={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ac=()=>({type:"styling",body:[],mode:"math",style:"display"}),oc=t=>t.type==="textord"&&t.text==="@",b5=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function y5(t,e,r){var n=v5[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var s=r.callFunction("\\\\cdleft",[e[0]],[]),i={type:"atom",text:n,mode:"math",family:"rel"},a=r.callFunction("\\Big",[i],[]),o=r.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[s,a,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function w5(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 r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new re("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],s=[n],i=0;i-1))if("<>AV".indexOf(c)>-1)for(var f=0;f<2;f++){for(var p=!0,v=l+1;vAV=|." after @',a[l]);var b=y5(c,d,t),y={type:"styling",body:[b],mode:"math",style:"display"};n.push(y),o=ac()}i%2===0?n.push(o):n.shift(),n=[],s.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var w=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:w,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}ce({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=z.wrapFragment(Le(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=ae(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new ee.MathNode("mrow",[We(t.label,e)]);return r=new ee.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new ee.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});ce({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=z.wrapFragment(Le(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new ee.MathNode("mrow",[We(t.fragment,e)])}});ce({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=De(e[0],"ordgroup"),s=n.body,i="",a=0;a=1114111)throw new re("\\@char with invalid code point "+i);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:c}}});var nd=(t,e)=>{var r=ht(t.body,e.withColor(t.color),!1);return z.makeFragment(r)},sd=(t,e)=>{var r=Lt(t.body,e.withColor(t.color)),n=new ee.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n};ce({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=De(e[0],"color-token").color,s=e[1];return{type:"color",mode:r.mode,color:n,body:at(s)}},htmlBuilder:nd,mathmlBuilder:sd});ce({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,s=De(e[0],"color-token").color;r.gullet.macros.set("\\current@color",s);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:s,body:i}},htmlBuilder:nd,mathmlBuilder:sd});ce({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,s=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:s&&De(s,"size").value}},htmlBuilder(t,e){var r=z.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=ae(tt(t.size,e)))),r},mathmlBuilder(t,e){var r=new ee.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",ae(tt(t.size,e)))),r}});var va={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},id=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new re("Expected a control sequence",t);return e},x5=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},ad=(t,e,r,n)=>{var s=t.gullet.macros.get(r.text);s==null&&(r.noexpand=!0,s={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,s,n)};ce({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(va[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=va[n.text]),De(e.parseFunction(),"internal");throw new re("Invalid token after macro prefix",n)}});ce({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),s=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new re("Expected a control sequence",n);for(var i=0,a,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){a=e.gullet.future(),o[i].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new re('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new re('Argument number "'+n.text+'" out of order');i++,o.push([])}else{if(n.text==="EOF")throw new re("Expected a macro definition");o[i].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return a&&l.unshift(a),(r==="\\edef"||r==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(s,{tokens:l,numArgs:i,delimiters:o},r===va[r]),{type:"internal",mode:e.mode}}});ce({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=id(e.gullet.popToken());e.gullet.consumeSpaces();var s=x5(e);return ad(e,n,s,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});ce({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=id(e.gullet.popToken()),s=e.gullet.popToken(),i=e.gullet.popToken();return ad(e,n,i,r==="\\\\globalfuture"),e.gullet.pushToken(i),e.gullet.pushToken(s),{type:"internal",mode:e.mode}}});var Zn=function(e,r,n){var s=Je.math[e]&&Je.math[e].replace,i=mo(s||e,r,n);if(!i)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return i},ko=function(e,r,n,s){var i=n.havingBaseStyle(r),a=z.makeSpan(s.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},od=function(e,r,n){var s=r.havingBaseStyle(n),i=(1-r.sizeMultiplier/s.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ae(i),e.height-=i,e.depth+=i},k5=function(e,r,n,s,i,a){var o=z.makeSymbol(e,"Main-Regular",i,s),l=ko(o,r,s,a);return n&&od(l,s,r),l},S5=function(e,r,n,s){return z.makeSymbol(e,"Size"+r+"-Regular",n,s)},ld=function(e,r,n,s,i,a){var o=S5(e,r,i,s),l=ko(z.makeSpan(["delimsizing","size"+r],[o],s),ke.TEXT,s,a);return n&&od(l,s,ke.TEXT),l},Ni=function(e,r,n){var s;r==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=z.makeSpan(["delimsizinginner",s],[z.makeSpan([],[z.makeSymbol(e,r,n)])]);return{type:"elem",elem:i}},Di=function(e,r,n){var s=fr["Size4-Regular"][e.charCodeAt(0)]?fr["Size4-Regular"][e.charCodeAt(0)][4]:fr["Size1-Regular"][e.charCodeAt(0)][4],i=new Jr("inner",M6(e,Math.round(1e3*r))),a=new _r([i],{width:ae(s),height:ae(r),style:"width:"+ae(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=z.makeSvgSpan([],[a],n);return o.height=r,o.style.height=ae(r),o.style.width=ae(s),{type:"elem",elem:o}},ba=.008,W0={type:"kern",size:-1*ba},T5=["|","\\lvert","\\rvert","\\vert"],E5=["\\|","\\lVert","\\rVert","\\Vert"],cd=function(e,r,n,s,i,a){var o,l,c,d,f="",p=0;o=c=d=e,l=null;var v="Size1-Regular";e==="\\uparrow"?c=d="⏐":e==="\\Uparrow"?c=d="‖":e==="\\downarrow"?o=c="⏐":e==="\\Downarrow"?o=c="‖":e==="\\updownarrow"?(o="\\uparrow",c="⏐",d="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",c="‖",d="\\Downarrow"):be.contains(T5,e)?(c="∣",f="vert",p=333):be.contains(E5,e)?(c="∥",f="doublevert",p=556):e==="["||e==="\\lbrack"?(o="⎡",c="⎢",d="⎣",v="Size4-Regular",f="lbrack",p=667):e==="]"||e==="\\rbrack"?(o="⎤",c="⎥",d="⎦",v="Size4-Regular",f="rbrack",p=667):e==="\\lfloor"||e==="⌊"?(c=o="⎢",d="⎣",v="Size4-Regular",f="lfloor",p=667):e==="\\lceil"||e==="⌈"?(o="⎡",c=d="⎢",v="Size4-Regular",f="lceil",p=667):e==="\\rfloor"||e==="⌋"?(c=o="⎥",d="⎦",v="Size4-Regular",f="rfloor",p=667):e==="\\rceil"||e==="⌉"?(o="⎤",c=d="⎥",v="Size4-Regular",f="rceil",p=667):e==="("||e==="\\lparen"?(o="⎛",c="⎜",d="⎝",v="Size4-Regular",f="lparen",p=875):e===")"||e==="\\rparen"?(o="⎞",c="⎟",d="⎠",v="Size4-Regular",f="rparen",p=875):e==="\\{"||e==="\\lbrace"?(o="⎧",l="⎨",d="⎩",c="⎪",v="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="⎫",l="⎬",d="⎭",c="⎪",v="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(o="⎧",d="⎩",c="⎪",v="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(o="⎫",d="⎭",c="⎪",v="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(o="⎧",d="⎭",c="⎪",v="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(o="⎫",d="⎩",c="⎪",v="Size4-Regular");var b=Zn(o,v,i),y=b.height+b.depth,w=Zn(c,v,i),M=w.height+w.depth,S=Zn(d,v,i),E=S.height+S.depth,D=0,I=1;if(l!==null){var O=Zn(l,v,i);D=O.height+O.depth,I=2}var $=y+E+D,K=Math.max(0,Math.ceil((r-$)/(I*M))),G=$+K*I*M,pe=s.fontMetrics().axisHeight;n&&(pe*=s.sizeMultiplier);var ye=G/2-pe,Ee=[];if(f.length>0){var Ge=G-y-E,qe=Math.round(G*1e3),st=N6(f,Math.round(Ge*1e3)),_e=new Jr(f,st),Ce=(p/1e3).toFixed(3)+"em",ve=(qe/1e3).toFixed(3)+"em",Ke=new _r([_e],{width:Ce,height:ve,viewBox:"0 0 "+p+" "+qe}),Ze=z.makeSvgSpan([],[Ke],s);Ze.height=qe/1e3,Ze.style.width=Ce,Ze.style.height=ve,Ee.push({type:"elem",elem:Ze})}else{if(Ee.push(Ni(d,v,i)),Ee.push(W0),l===null){var Ye=G-y-E+2*ba;Ee.push(Di(c,Ye,s))}else{var me=(G-y-E-D)/2+2*ba;Ee.push(Di(c,me,s)),Ee.push(W0),Ee.push(Ni(l,v,i)),Ee.push(W0),Ee.push(Di(c,me,s))}Ee.push(W0),Ee.push(Ni(o,v,i))}var St=s.havingBaseStyle(ke.TEXT),ot=z.makeVList({positionType:"bottom",positionData:ye,children:Ee},St);return ko(z.makeSpan(["delimsizing","mult"],[ot],St),ke.TEXT,s,a)},Ri=80,Ii=.08,_i=function(e,r,n,s,i){var a=C6(e,s,n),o=new Jr(e,a),l=new _r([o],{width:"400em",height:ae(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return z.makeSvgSpan(["hide-tail"],[l],i)},A5=function(e,r){var n=r.havingBaseSizing(),s=fd("\\surd",e*n.sizeMultiplier,hd,n),i=n.sizeMultiplier,a=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l=0,c=0,d=0,f;return s.type==="small"?(d=1e3+1e3*a+Ri,e<1?i=1:e<1.4&&(i=.7),l=(1+a+Ii)/i,c=(1+a)/i,o=_i("sqrtMain",l,d,a,r),o.style.minWidth="0.853em",f=.833/i):s.type==="large"?(d=(1e3+Ri)*l0[s.size],c=(l0[s.size]+a)/i,l=(l0[s.size]+a+Ii)/i,o=_i("sqrtSize"+s.size,l,d,a,r),o.style.minWidth="1.02em",f=1/i):(l=e+a+Ii,c=e+a,d=Math.floor(1e3*e+a)+Ri,o=_i("sqrtTall",l,d,a,r),o.style.minWidth="0.742em",f=1.056),o.height=c,o.style.height=ae(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+a)*i}},ud=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],C5=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],dd=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],l0=[0,1.2,1.8,2.4,3],M5=function(e,r,n,s,i){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),be.contains(ud,e)||be.contains(dd,e))return ld(e,r,!1,n,s,i);if(be.contains(C5,e))return cd(e,l0[r],!1,n,s,i);throw new re("Illegal delimiter: '"+e+"'")},N5=[{type:"small",style:ke.SCRIPTSCRIPT},{type:"small",style:ke.SCRIPT},{type:"small",style:ke.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],D5=[{type:"small",style:ke.SCRIPTSCRIPT},{type:"small",style:ke.SCRIPT},{type:"small",style:ke.TEXT},{type:"stack"}],hd=[{type:"small",style:ke.SCRIPTSCRIPT},{type:"small",style:ke.SCRIPT},{type:"small",style:ke.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],R5=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.")},fd=function(e,r,n,s){for(var i=Math.min(2,3-s.style.size),a=i;ar)return n[a]}return n[n.length-1]},pd=function(e,r,n,s,i,a){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var o;be.contains(dd,e)?o=N5:be.contains(ud,e)?o=hd:o=D5;var l=fd(e,r,o,s);return l.type==="small"?k5(e,l.style,n,s,i,a):l.type==="large"?ld(e,l.size,n,s,i,a):cd(e,r,n,s,i,a)},I5=function(e,r,n,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,l=901,c=5/s.fontMetrics().ptPerEm,d=Math.max(r-o,n+o),f=Math.max(d/500*l,2*d-c);return pd(e,f,!0,s,i,a)},Dr={sqrtImage:A5,sizedDelim:M5,sizeToMaxHeight:l0,customSizedDelim:pd,leftRightDelim:I5},lc={"\\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}},_5=["(","\\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 ni(t,e){var r=ti(t);if(r&&be.contains(_5,r.text))return r;throw r?new re("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new re("Invalid delimiter type '"+t.type+"'",t)}ce({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 r=ni(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:lc[t.funcName].size,mclass:lc[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?z.makeSpan([t.mclass]):Dr.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(Xt(t.delim,t.mode));var r=new ee.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=ae(Dr.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function cc(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ce({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new re("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:ni(e[0],t).text,color:r}}});ce({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=ni(e[0],t),n=t.parser;++n.leftrightDepth;var s=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=De(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:s,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(t,e)=>{cc(t);for(var r=ht(t.body,e,!0,["mopen","mclose"]),n=0,s=0,i=!1,a=0;a{cc(t);var r=Lt(t.body,e);if(t.left!=="."){var n=new ee.MathNode("mo",[Xt(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var s=new ee.MathNode("mo",[Xt(t.right,t.mode)]);s.setAttribute("fence","true"),t.rightColor&&s.setAttribute("mathcolor",t.rightColor),r.push(s)}return bo(r)}});ce({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=ni(e[0],t);if(!t.parser.leftrightDepth)throw new re("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if(t.delim===".")r=g0(e,[]);else{r=Dr.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?Xt("|","text"):Xt(t.delim,t.mode),n=new ee.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var So=(t,e)=>{var r=z.wrapFragment(Le(t.body,e),e),n=t.label.slice(1),s=e.sizeMultiplier,i,a=0,o=be.isCharacterBox(t.body);if(n==="sout")i=z.makeSpan(["stretchy","sout"]),i.height=e.fontMetrics().defaultRuleThickness/s,a=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=tt({number:.6,unit:"pt"},e),c=tt({number:.35,unit:"ex"},e),d=e.havingBaseSizing();s=s/d.sizeMultiplier;var f=r.height+r.depth+l+c;r.style.paddingLeft=ae(f/2+l);var p=Math.floor(1e3*f*s),v=E6(p),b=new _r([new Jr("phase",v)],{width:"400em",height:ae(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=z.makeSvgSpan(["hide-tail"],[b],e),i.style.height=ae(f),a=r.depth+l+c}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var y=0,w=0,M=0;/box/.test(n)?(M=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),y=e.fontMetrics().fboxsep+(n==="colorbox"?0:M),w=y):n==="angl"?(M=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),y=4*M,w=Math.max(0,.25-r.depth)):(y=o?.2:0,w=y),i=Lr.encloseSpan(r,n,y,w,e),/fbox|boxed|fcolorbox/.test(n)?(i.style.borderStyle="solid",i.style.borderWidth=ae(M)):n==="angl"&&M!==.049&&(i.style.borderTopWidth=ae(M),i.style.borderRightWidth=ae(M)),a=r.depth+w,t.backgroundColor&&(i.style.backgroundColor=t.backgroundColor,t.borderColor&&(i.style.borderColor=t.borderColor))}var S;if(t.backgroundColor)S=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:r,shift:0}]},e);else{var E=/cancel|phase/.test(n)?["svg-align"]:[];S=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:E}]},e)}return/cancel/.test(n)&&(S.height=r.height,S.depth=r.depth),/cancel/.test(n)&&!o?z.makeSpan(["mord","cancel-lap"],[S],e):z.makeSpan(["mord"],[S],e)},To=(t,e)=>{var r=0,n=new ee.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[We(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var s=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+s+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};ce({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:s}=t,i=De(e[0],"color-token").color,a=e[1];return{type:"enclose",mode:n.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:So,mathmlBuilder:To});ce({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:s}=t,i=De(e[0],"color-token").color,a=De(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:So,mathmlBuilder:To});ce({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});ce({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,s=e[0];return{type:"enclose",mode:r.mode,label:n,body:s}},htmlBuilder:So,mathmlBuilder:To});ce({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});var md={};function gr(t){for(var{type:e,names:r,props:n,handler:s,htmlBuilder:i,mathmlBuilder:a}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},l=0;l{var e=t.parser.settings;if(!e.displayMode)throw new re("{"+t.envName+"} can be used only in display mode.")};function Eo(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function nn(t,e,r){var{hskipBeforeAndAfter:n,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:f,leqno:p}=e;if(t.gullet.beginGroup(),c||t.gullet.macros.set("\\cr","\\\\\\relax"),!a){var v=t.gullet.expandMacroAsText("\\arraystretch");if(v==null)a=1;else if(a=parseFloat(v),!a||a<0)throw new re("Invalid \\arraystretch: "+v)}t.gullet.beginGroup();var b=[],y=[b],w=[],M=[],S=l!=null?[]:void 0;function E(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function D(){S&&(t.gullet.macros.get("\\df@tag")?(S.push(t.subparse([new Gt("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):S.push(!!l&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(E(),M.push(uc(t));;){var I=t.parseExpression(!1,c?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),I={type:"ordgroup",mode:t.mode,body:I},r&&(I={type:"styling",mode:t.mode,style:r,body:[I]}),b.push(I);var O=t.fetch().text;if(O==="&"){if(f&&b.length===f){if(c||o)throw new re("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(O==="\\end"){D(),b.length===1&&I.type==="styling"&&I.body[0].body.length===0&&(y.length>1||!d)&&y.pop(),M.length0&&(E+=.25),c.push({pos:E,isDashed:j[te]})}for(D(a[0]),n=0;n0&&(ye+=S,$j))for(n=0;n=o)){var lt=void 0;(s>0||e.hskipBeforeAndAfter)&&(lt=be.deflt(me.pregap,p),lt!==0&&(st=z.makeSpan(["arraycolsep"],[]),st.style.width=ae(lt),qe.push(st)));var U=[];for(n=0;n0){for(var we=z.makeLineSpan("hline",r,d),x=z.makeLineSpan("hdashline",r,d),N=[{type:"elem",elem:l,shift:0}];c.length>0;){var L=c.pop(),H=L.pos-Ee;L.isDashed?N.push({type:"elem",elem:x,shift:H}):N.push({type:"elem",elem:we,shift:H})}l=z.makeVList({positionType:"individualShift",children:N},r)}if(Ce.length===0)return z.makeSpan(["mord"],[l],r);var B=z.makeVList({positionType:"individualShift",children:Ce},r);return B=z.makeSpan(["tag"],[B],r),z.makeFragment([l,B])},O5={c:"center ",l:"left ",r:"right "},br=function(e,r){for(var n=[],s=new ee.MathNode("mtd",[],["mtr-glue"]),i=new ee.MathNode("mtd",[],["mml-eqn-num"]),a=0;a0){var b=e.cols,y="",w=!1,M=0,S=b.length;b[0].type==="separator"&&(p+="top ",M=1),b[b.length-1].type==="separator"&&(p+="bottom ",S-=1);for(var E=M;E0?"left ":"",p+=K[K.length-1].length>0?"right ":"";for(var G=1;G-1?"alignat":"align",i=e.envName==="split",a=nn(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:Eo(e.envName),emptySingleRow:!0,colSeparationType:s,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),o,l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var d="",f=0;f0&&v&&(w=1),n[b]={type:"align",align:y,pregap:w,postgap:0}}return a.colSeparationType=v?"align":"alignat",a};gr({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=ti(e[0]),n=r?[e[0]]:De(e[0],"ordgroup").body,s=n.map(function(a){var o=wo(a),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new re("Unknown column alignment: "+l,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return nn(t.parser,i,Ao(t.envName))},htmlBuilder:vr,mathmlBuilder:br});gr({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("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var s=t.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),r=s.fetch().text,"lcr".indexOf(r)===-1)throw new re("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),n.cols=[{type:"align",align:r}]}}var i=nn(t.parser,n,Ao(t.envName)),a=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(a).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=nn(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=ti(e[0]),n=r?[e[0]]:De(e[0],"ordgroup").body,s=n.map(function(a){var o=wo(a),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new re("Unknown column alignment: "+l,a)});if(s.length>1)throw new re("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5};if(i=nn(t.parser,i,"script"),i.body.length>0&&i.body[0].length>1)throw new re("{subarray} can contain only one column");return i},htmlBuilder:vr,mathmlBuilder:br});gr({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}]},r=nn(t.parser,e,Ao(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:vd,htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){be.contains(["gather","gather*"],t.envName)&&si(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Eo(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return nn(t.parser,e,"display")},htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:vd,htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){si(t);var e={autoTag:Eo(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return nn(t.parser,e,"display")},htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["CD"],props:{numArgs:0},handler(t){return si(t),w5(t.parser)},htmlBuilder:vr,mathmlBuilder:br});g("\\nonumber","\\gdef\\@eqnsw{0}");g("\\notag","\\nonumber");ce({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new re(t.funcName+" valid only within array environment")}});var dc=md;ce({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,s=e[0];if(s.type!=="ordgroup")throw new re("Invalid environment name",s);for(var i="",a=0;a{var r=t.font,n=e.withFont(r);return Le(t.body,n)},yd=(t,e)=>{var r=t.font,n=e.withFont(r);return We(t.body,n)},hc={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ce({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:r,funcName:n}=t,s=Rs(e[0]),i=n;return i in hc&&(i=hc[i]),{type:"font",mode:r.mode,font:i.slice(1),body:s}},htmlBuilder:bd,mathmlBuilder:yd});ce({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0],s=be.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:ri(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:s}}});ce({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:s}=t,{mode:i}=r,a=r.parseExpression(!0,s),o="math"+n.slice(1);return{type:"font",mode:i,font:o,body:{type:"ordgroup",mode:r.mode,body:a}}},htmlBuilder:bd,mathmlBuilder:yd});var wd=(t,e)=>{var r=e;return t==="display"?r=r.id>=ke.SCRIPT.id?r.text():ke.DISPLAY:t==="text"&&r.size===ke.DISPLAY.size?r=ke.TEXT:t==="script"?r=ke.SCRIPT:t==="scriptscript"&&(r=ke.SCRIPTSCRIPT),r},Co=(t,e)=>{var r=wd(t.size,e.style),n=r.fracNum(),s=r.fracDen(),i;i=e.havingStyle(n);var a=Le(t.numer,i,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;a.height=a.height0?b=3*p:b=7*p,y=e.fontMetrics().denom1):(f>0?(v=e.fontMetrics().num2,b=p):(v=e.fontMetrics().num3,b=3*p),y=e.fontMetrics().denom2);var w;if(d){var S=e.fontMetrics().axisHeight;v-a.depth-(S+.5*f){var r=new ee.MathNode("mfrac",[We(t.numer,e),We(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=tt(t.barSize,e);r.setAttribute("linethickness",ae(n))}var s=wd(t.size,e.style);if(s.size!==e.style.size){r=new ee.MathNode("mstyle",[r]);var i=s.size===ke.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var a=[];if(t.leftDelim!=null){var o=new ee.MathNode("mo",[new ee.TextNode(t.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}if(a.push(r),t.rightDelim!=null){var l=new ee.MathNode("mo",[new ee.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return bo(a)}return r};ce({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0],i=e[1],a,o=null,l=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:s,denom:i,hasBarLine:a,leftDelim:o,rightDelim:l,size:c,barSize:null}},htmlBuilder:Co,mathmlBuilder:Mo});ce({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0],i=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:s,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});ce({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,s;switch(r){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:s,token:n}}});var fc=["display","text","script","scriptscript"],pc=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};ce({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],s=e[5],i=Rs(e[0]),a=i.type==="atom"&&i.family==="open"?pc(i.text):null,o=Rs(e[1]),l=o.type==="atom"&&o.family==="close"?pc(o.text):null,c=De(e[2],"size"),d,f=null;c.isBlank?d=!0:(f=c.value,d=f.number>0);var p="auto",v=e[3];if(v.type==="ordgroup"){if(v.body.length>0){var b=De(v.body[0],"textord");p=fc[Number(b.text)]}}else v=De(v,"textord"),p=fc[Number(v.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:s,continued:!1,hasBarLine:d,barSize:f,leftDelim:a,rightDelim:l,size:p}},htmlBuilder:Co,mathmlBuilder:Mo});ce({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:s}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:De(e[0],"size").value,token:s}}});ce({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0],i=u6(De(e[1],"infix").size),a=e[2],o=i.number>0;return{type:"genfrac",mode:r.mode,numer:s,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Co,mathmlBuilder:Mo});var xd=(t,e)=>{var r=e.style,n,s;t.type==="supsub"?(n=t.sup?Le(t.sup,e.havingStyle(r.sup()),e):Le(t.sub,e.havingStyle(r.sub()),e),s=De(t.base,"horizBrace")):s=De(t,"horizBrace");var i=Le(s.base,e.havingBaseStyle(ke.DISPLAY)),a=Lr.svgSpan(s,e),o;if(s.isOver?(o=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a}]},e),o.children[0].children[0].children[1].classes.push("svg-align")):(o=z.makeVList({positionType:"bottom",positionData:i.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:i}]},e),o.children[0].children[0].children[0].classes.push("svg-align")),n){var l=z.makeSpan(["mord",s.isOver?"mover":"munder"],[o],e);s.isOver?o=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):o=z.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return z.makeSpan(["mord",s.isOver?"mover":"munder"],[o],e)},L5=(t,e)=>{var r=Lr.mathMLnode(t.label);return new ee.MathNode(t.isOver?"mover":"munder",[We(t.base,e),r])};ce({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:xd,mathmlBuilder:L5});ce({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],s=De(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:r.mode,href:s,body:at(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=ht(t.body,e,!1);return z.makeAnchor(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=Zr(t.body,e);return r instanceof Bt||(r=new Bt("mrow",[r])),r.setAttribute("href",t.href),r}});ce({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=De(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var s=[],i=0;i{var{parser:r,funcName:n,token:s}=t,i=De(e[0],"raw").string,a=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var c=i.split(","),d=0;d{var r=ht(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var s=z.makeSpan(n,r,e);for(var i in t.attributes)i!=="class"&&t.attributes.hasOwnProperty(i)&&s.setAttribute(i,t.attributes[i]);return s},mathmlBuilder:(t,e)=>Zr(t.body,e)});ce({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:at(e[0]),mathml:at(e[1])}},htmlBuilder:(t,e)=>{var r=ht(t.html,e,!1);return z.makeFragment(r)},mathmlBuilder:(t,e)=>Zr(t.mathml,e)});var Oi=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new re("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!P1(n))throw new re("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};ce({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,s={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(r[0])for(var l=De(r[0],"raw").string,c=l.split(","),d=0;d{var r=tt(t.height,e),n=0;t.totalheight.number>0&&(n=tt(t.totalheight,e)-r);var s=0;t.width.number>0&&(s=tt(t.width,e));var i={height:ae(r+n)};s>0&&(i.width=ae(s)),n>0&&(i.verticalAlign=ae(-n));var a=new L6(t.src,t.alt,i);return a.height=r,a.depth=n,a},mathmlBuilder:(t,e)=>{var r=new ee.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=tt(t.height,e),s=0;if(t.totalheight.number>0&&(s=tt(t.totalheight,e)-n,r.setAttribute("valign",ae(-s))),r.setAttribute("height",ae(n+s)),t.width.number>0){var i=tt(t.width,e);r.setAttribute("width",ae(i))}return r.setAttribute("src",t.src),r}});ce({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,s=De(e[0],"size");if(r.settings.strict){var i=n[1]==="m",a=s.value.unit==="mu";i?(a||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+s.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):a&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:s.value}},htmlBuilder(t,e){return z.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=tt(t.dimension,e);return new ee.SpaceNode(r)}});ce({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:s}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=z.makeSpan([],[Le(t.body,e)]),r=z.makeSpan(["inner"],[r],e)):r=z.makeSpan(["inner"],[Le(t.body,e)]);var n=z.makeSpan(["fix"],[]),s=z.makeSpan([t.alignment],[r,n],e),i=z.makeSpan(["strut"]);return i.style.height=ae(s.height+s.depth),s.depth&&(i.style.verticalAlign=ae(-s.depth)),s.children.unshift(i),s=z.makeSpan(["thinbox"],[s],e),z.makeSpan(["mord","vbox"],[s],e)},mathmlBuilder:(t,e)=>{var r=new ee.MathNode("mpadded",[We(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});ce({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,s=n.mode;n.switchMode("math");var i=r==="\\("?"\\)":"$",a=n.parseExpression(!1,i);return n.expect(i),n.switchMode(s),{type:"styling",mode:n.mode,style:"text",body:a}}});ce({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new re("Mismatched "+t.funcName)}});var mc=(t,e)=>{switch(e.style.size){case ke.DISPLAY.size:return t.display;case ke.TEXT.size:return t.text;case ke.SCRIPT.size:return t.script;case ke.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};ce({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:at(e[0]),text:at(e[1]),script:at(e[2]),scriptscript:at(e[3])}},htmlBuilder:(t,e)=>{var r=mc(t,e),n=ht(r,e,!1);return z.makeFragment(n)},mathmlBuilder:(t,e)=>{var r=mc(t,e);return Zr(r,e)}});var kd=(t,e,r,n,s,i,a)=>{t=z.makeSpan([],[t]);var o=r&&be.isCharacterBox(r),l,c;if(e){var d=Le(e,n.havingStyle(s.sup()),n);c={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(r){var f=Le(r,n.havingStyle(s.sub()),n);l={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var p;if(c&&l){var v=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+a;p=z.makeVList({positionType:"bottom",positionData:v,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ae(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ae(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var b=t.height-a;p=z.makeVList({positionType:"top",positionData:b,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ae(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else if(c){var y=t.depth+a;p=z.makeVList({positionType:"bottom",positionData:y,children:[{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ae(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var w=[p];if(l&&i!==0&&!o){var M=z.makeSpan(["mspace"],[],n);M.style.marginRight=ae(i),w.unshift(M)}return z.makeSpan(["mop","op-limits"],w,n)},Sd=["\\smallint"],qn=(t,e)=>{var r,n,s=!1,i;t.type==="supsub"?(r=t.sup,n=t.sub,i=De(t.base,"op"),s=!0):i=De(t,"op");var a=e.style,o=!1;a.size===ke.DISPLAY.size&&i.symbol&&!be.contains(Sd,i.name)&&(o=!0);var l;if(i.symbol){var c=o?"Size2-Regular":"Size1-Regular",d="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(d=i.name.slice(1),i.name=d==="oiint"?"\\iint":"\\iiint"),l=z.makeSymbol(i.name,c,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),d.length>0){var f=l.italic,p=z.staticSvg(d+"Size"+(o?"2":"1"),e);l=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:o?.08:0}]},e),i.name="\\"+d,l.classes.unshift("mop"),l.italic=f}}else if(i.body){var v=ht(i.body,e,!0);v.length===1&&v[0]instanceof Yt?(l=v[0],l.classes[0]="mop"):l=z.makeSpan(["mop"],v,e)}else{for(var b=[],y=1;y{var r;if(t.symbol)r=new Bt("mo",[Xt(t.name,t.mode)]),be.contains(Sd,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new Bt("mo",Lt(t.body,e));else{r=new Bt("mi",[new pr(t.name.slice(1))]);var n=new Bt("mo",[Xt("⁡","text")]);t.parentIsSupSub?r=new Bt("mrow",[r,n]):r=J1([r,n])}return r},z5={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ce({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:r,funcName:n}=t,s=n;return s.length===1&&(s=z5[s]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:qn,mathmlBuilder:C0});ce({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:at(n)}},htmlBuilder:qn,mathmlBuilder:C0});var $5={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ce({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:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:qn,mathmlBuilder:C0});ce({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:qn,mathmlBuilder:C0});ce({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=$5[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:qn,mathmlBuilder:C0});var Td=(t,e)=>{var r,n,s=!1,i;t.type==="supsub"?(r=t.sup,n=t.sub,i=De(t.base,"operatorname"),s=!0):i=De(t,"operatorname");var a;if(i.body.length>0){for(var o=i.body.map(f=>{var p=f.text;return typeof p=="string"?{type:"textord",mode:f.mode,text:p}:f}),l=ht(o,e.withFont("mathrm"),!0),c=0;c{for(var r=Lt(t.body,e.withFont("mathrm")),n=!0,s=0;sd.toText()).join("");r=[new ee.TextNode(o)]}var l=new ee.MathNode("mi",r);l.setAttribute("mathvariant","normal");var c=new ee.MathNode("mo",[Xt("⁡","text")]);return t.parentIsSupSub?new ee.MathNode("mrow",[l,c]):ee.newDocumentFragment([l,c])};ce({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0];return{type:"operatorname",mode:r.mode,body:at(s),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Td,mathmlBuilder:F5});g("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");bn({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?z.makeFragment(ht(t.body,e,!1)):z.makeSpan(["mord"],ht(t.body,e,!0),e)},mathmlBuilder(t,e){return Zr(t.body,e,!0)}});ce({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=Le(t.body,e.havingCrampedStyle()),n=z.makeLineSpan("overline-line",e),s=e.fontMetrics().defaultRuleThickness,i=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:n},{type:"kern",size:s}]},e);return z.makeSpan(["mord","overline"],[i],e)},mathmlBuilder(t,e){var r=new ee.MathNode("mo",[new ee.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new ee.MathNode("mover",[We(t.body,e),r]);return n.setAttribute("accent","true"),n}});ce({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:at(n)}},htmlBuilder:(t,e)=>{var r=ht(t.body,e.withPhantom(),!1);return z.makeFragment(r)},mathmlBuilder:(t,e)=>{var r=Lt(t.body,e);return new ee.MathNode("mphantom",r)}});ce({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=z.makeSpan([],[Le(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=Lt(at(t.body),e),n=new ee.MathNode("mphantom",r),s=new ee.MathNode("mpadded",[n]);return s.setAttribute("height","0px"),s.setAttribute("depth","0px"),s}});ce({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=z.makeSpan(["inner"],[Le(t.body,e.withPhantom())]),n=z.makeSpan(["fix"],[]);return z.makeSpan(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=Lt(at(t.body),e),n=new ee.MathNode("mphantom",r),s=new ee.MathNode("mpadded",[n]);return s.setAttribute("width","0px"),s}});ce({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=De(e[0],"size").value,s=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:s}},htmlBuilder(t,e){var r=Le(t.body,e),n=tt(t.dy,e);return z.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new ee.MathNode("mpadded",[We(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});ce({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});ce({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,s=r[0],i=De(e[0],"size"),a=De(e[1],"size");return{type:"rule",mode:n.mode,shift:s&&De(s,"size").value,width:i.value,height:a.value}},htmlBuilder(t,e){var r=z.makeSpan(["mord","rule"],[],e),n=tt(t.width,e),s=tt(t.height,e),i=t.shift?tt(t.shift,e):0;return r.style.borderRightWidth=ae(n),r.style.borderTopWidth=ae(s),r.style.bottom=ae(i),r.width=n,r.height=s+i,r.depth=-i,r.maxFontSize=s*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=tt(t.width,e),n=tt(t.height,e),s=t.shift?tt(t.shift,e):0,i=e.color&&e.getColor()||"black",a=new ee.MathNode("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",ae(r)),a.setAttribute("height",ae(n));var o=new ee.MathNode("mpadded",[a]);return s>=0?o.setAttribute("height",ae(s)):(o.setAttribute("height",ae(s)),o.setAttribute("depth",ae(-s))),o.setAttribute("voffset",ae(s)),o}});function Ed(t,e,r){for(var n=ht(t,e,!1),s=e.sizeMultiplier/r.sizeMultiplier,i=0;i{var r=e.havingSize(t.size);return Ed(t.body,r,e)};ce({type:"sizing",names:gc,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:s}=t,i=s.parseExpression(!1,r);return{type:"sizing",mode:s.mode,size:gc.indexOf(n)+1,body:i}},htmlBuilder:B5,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=Lt(t.body,r),s=new ee.MathNode("mstyle",n);return s.setAttribute("mathsize",ae(r.sizeMultiplier)),s}});ce({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,s=!1,i=!1,a=r[0]&&De(r[0],"ordgroup");if(a)for(var o="",l=0;l{var r=z.makeSpan([],[Le(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new ee.MathNode("mpadded",[We(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});ce({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,s=r[0],i=e[0];return{type:"sqrt",mode:n.mode,body:i,index:s}},htmlBuilder(t,e){var r=Le(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=z.wrapFragment(r,e);var n=e.fontMetrics(),s=n.defaultRuleThickness,i=s;e.style.idr.height+r.depth+a&&(a=(a+f-r.height-r.depth)/2);var p=l.height-r.height-a-c;r.style.paddingLeft=ae(d);var v=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:l},{type:"kern",size:c}]},e);if(t.index){var b=e.havingStyle(ke.SCRIPTSCRIPT),y=Le(t.index,b,e),w=.6*(v.height-v.depth),M=z.makeVList({positionType:"shift",positionData:-w,children:[{type:"elem",elem:y}]},e),S=z.makeSpan(["root"],[M]);return z.makeSpan(["mord","sqrt"],[S,v],e)}else return z.makeSpan(["mord","sqrt"],[v],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new ee.MathNode("mroot",[We(r,e),We(n,e)]):new ee.MathNode("msqrt",[We(r,e)])}});var vc={display:ke.DISPLAY,text:ke.TEXT,script:ke.SCRIPT,scriptscript:ke.SCRIPTSCRIPT};ce({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:s}=t,i=s.parseExpression(!0,r),a=n.slice(1,n.length-5);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(t,e){var r=vc[t.style],n=e.havingStyle(r).withFont("");return Ed(t.body,n,e)},mathmlBuilder(t,e){var r=vc[t.style],n=e.havingStyle(r),s=Lt(t.body,n),i=new ee.MathNode("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[t.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var P5=function(e,r){var n=e.base;if(n)if(n.type==="op"){var s=n.limits&&(r.style.size===ke.DISPLAY.size||n.alwaysHandleSupSub);return s?qn:null}else if(n.type==="operatorname"){var i=n.alwaysHandleSupSub&&(r.style.size===ke.DISPLAY.size||n.limits);return i?Td:null}else{if(n.type==="accent")return be.isCharacterBox(n.base)?xo:null;if(n.type==="horizBrace"){var a=!e.sub;return a===n.isOver?xd:null}else return null}else return null};bn({type:"supsub",htmlBuilder(t,e){var r=P5(t,e);if(r)return r(t,e);var{base:n,sup:s,sub:i}=t,a=Le(n,e),o,l,c=e.fontMetrics(),d=0,f=0,p=n&&be.isCharacterBox(n);if(s){var v=e.havingStyle(e.style.sup());o=Le(s,v,e),p||(d=a.height-v.fontMetrics().supDrop*v.sizeMultiplier/e.sizeMultiplier)}if(i){var b=e.havingStyle(e.style.sub());l=Le(i,b,e),p||(f=a.depth+b.fontMetrics().subDrop*b.sizeMultiplier/e.sizeMultiplier)}var y;e.style===ke.DISPLAY?y=c.sup1:e.style.cramped?y=c.sup3:y=c.sup2;var w=e.sizeMultiplier,M=ae(.5/c.ptPerEm/w),S=null;if(l){var E=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(a instanceof Yt||E)&&(S=ae(-a.italic))}var D;if(o&&l){d=Math.max(d,y,o.depth+.25*c.xHeight),f=Math.max(f,c.sub2);var I=c.defaultRuleThickness,O=4*I;if(d-o.depth-(l.height-f)0&&(d+=$,f-=$)}var K=[{type:"elem",elem:l,shift:f,marginRight:M,marginLeft:S},{type:"elem",elem:o,shift:-d,marginRight:M}];D=z.makeVList({positionType:"individualShift",children:K},e)}else if(l){f=Math.max(f,c.sub1,l.height-.8*c.xHeight);var G=[{type:"elem",elem:l,marginLeft:S,marginRight:M}];D=z.makeVList({positionType:"shift",positionData:f,children:G},e)}else if(o)d=Math.max(d,y,o.depth+.25*c.xHeight),D=z.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:o,marginRight:M}]},e);else throw new Error("supsub must have either sup or sub.");var pe=ma(a,"right")||"mord";return z.makeSpan([pe],[a,z.makeSpan(["msupsub"],[D])],e)},mathmlBuilder(t,e){var r=!1,n,s;t.base&&t.base.type==="horizBrace"&&(s=!!t.sup,s===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var i=[We(t.base,e)];t.sub&&i.push(We(t.sub,e)),t.sup&&i.push(We(t.sup,e));var a;if(r)a=n?"mover":"munder";else if(t.sub)if(t.sup){var c=t.base;c&&c.type==="op"&&c.limits&&e.style===ke.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===ke.DISPLAY||c.limits)?a="munderover":a="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===ke.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===ke.DISPLAY)?a="munder":a="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===ke.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===ke.DISPLAY)?a="mover":a="msup"}return new ee.MathNode(a,i)}});bn({type:"atom",htmlBuilder(t,e){return z.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new ee.MathNode("mo",[Xt(t.text,t.mode)]);if(t.family==="bin"){var n=yo(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});var Ad={mi:"italic",mn:"normal",mtext:"normal"};bn({type:"mathord",htmlBuilder(t,e){return z.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new ee.MathNode("mi",[Xt(t.text,t.mode,e)]),n=yo(t,e)||"italic";return n!==Ad[r.type]&&r.setAttribute("mathvariant",n),r}});bn({type:"textord",htmlBuilder(t,e){return z.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=Xt(t.text,t.mode,e),n=yo(t,e)||"normal",s;return t.mode==="text"?s=new ee.MathNode("mtext",[r]):/[0-9]/.test(t.text)?s=new ee.MathNode("mn",[r]):t.text==="\\prime"?s=new ee.MathNode("mo",[r]):s=new ee.MathNode("mi",[r]),n!==Ad[s.type]&&s.setAttribute("mathvariant",n),s}});var Li={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},zi={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};bn({type:"spacing",htmlBuilder(t,e){if(zi.hasOwnProperty(t.text)){var r=zi[t.text].className||"";if(t.mode==="text"){var n=z.makeOrd(t,e,"textord");return n.classes.push(r),n}else return z.makeSpan(["mspace",r],[z.mathsym(t.text,t.mode,e)],e)}else{if(Li.hasOwnProperty(t.text))return z.makeSpan(["mspace",Li[t.text]],[],e);throw new re('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(zi.hasOwnProperty(t.text))r=new ee.MathNode("mtext",[new ee.TextNode(" ")]);else{if(Li.hasOwnProperty(t.text))return new ee.MathNode("mspace");throw new re('Unknown type of space "'+t.text+'"')}return r}});var bc=()=>{var t=new ee.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};bn({type:"tag",mathmlBuilder(t,e){var r=new ee.MathNode("mtable",[new ee.MathNode("mtr",[bc(),new ee.MathNode("mtd",[Zr(t.body,e)]),bc(),new ee.MathNode("mtd",[Zr(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});var yc={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},wc={"\\textbf":"textbf","\\textmd":"textmd"},H5={"\\textit":"textit","\\textup":"textup"},xc=(t,e)=>{var r=t.font;if(r){if(yc[r])return e.withTextFontFamily(yc[r]);if(wc[r])return e.withTextFontWeight(wc[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(H5[r])};ce({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:r,funcName:n}=t,s=e[0];return{type:"text",mode:r.mode,body:at(s),font:n}},htmlBuilder(t,e){var r=xc(t,e),n=ht(t.body,r,!0);return z.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=xc(t,e);return Zr(t.body,r)}});ce({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Le(t.body,e),n=z.makeLineSpan("underline-line",e),s=e.fontMetrics().defaultRuleThickness,i=z.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:s},{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:r}]},e);return z.makeSpan(["mord","underline"],[i],e)},mathmlBuilder(t,e){var r=new ee.MathNode("mo",[new ee.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new ee.MathNode("munder",[We(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});ce({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Le(t.body,e),n=e.fontMetrics().axisHeight,s=.5*(r.height-n-(r.depth+n));return z.makeVList({positionType:"shift",positionData:s,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new ee.MathNode("mpadded",[We(t.body,e)],["vcenter"])}});ce({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new re("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=kc(t),n=[],s=e.havingStyle(e.style.text()),i=0;it.body.replace(/ /g,t.star?"␣":" "),Vr=Y1,Cd=`[ \r +-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 E0{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 be.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;rr.toText();return this.children.map(e).join("")}}var fr={"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]}},B0={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]},Yl={Å:"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 D6(t,e){fr[t]=e}function mo(t,e,r){if(!fr[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),s=fr[e][n];if(!s&&t[0]in Yl&&(n=Yl[t[0]].charCodeAt(0),s=fr[e][n]),!s&&r==="text"&&B1(n)&&(s=fr[e][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Si={};function R6(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!Si[e]){var r=Si[e]={cssEmPerMu:B0.quad[e]/18};for(var n in B0)B0.hasOwnProperty(n)&&(r[n]=B0[n][e])}return Si[e]}var I6=[[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]],Xl=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Jl=function(e,r){return r.size<2?e:I6[e-1][r.size-1]};class Tr{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||Tr.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=Xl[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={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 n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new Tr(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Jl(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:Xl[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=Jl(Tr.BASESIZE,e);return this.size===r&&this.textSize===Tr.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}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!==Tr.BASESIZE?["sizing","reset-size"+this.size,"size"+Tr.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=R6(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Tr.BASESIZE=6;var ha={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},_6={ex:!0,em:!0,mu:!0},P1=function(e){return typeof e!="string"&&(e=e.unit),e in ha||e in _6||e==="ex"},tt=function(e,r){var n;if(e.unit in ha)n=ha[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var s;if(r.style.isTight()?s=r.havingStyle(r.style.text()):s=r,e.unit==="ex")n=s.fontMetrics().xHeight;else if(e.unit==="em")n=s.fontMetrics().quad;else throw new re("Invalid unit: '"+e.unit+"'");s!==r&&(n*=s.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},ae=function(e){return+e.toFixed(4)+"em"},Xr=function(e){return e.filter(r=>r).join(" ")},H1=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var s=r.getColor();s&&(this.style.color=s)}},q1=function(e){var r=document.createElement(e);r.className=Xr(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var s in this.attributes)this.attributes.hasOwnProperty(s)&&r.setAttribute(s,this.attributes[s]);for(var i=0;i/=\x00-\x1f]/,j1=function(e){var r="<"+e;this.classes.length&&(r+=' class="'+be.escape(Xr(this.classes))+'"');var n="";for(var s in this.style)this.style.hasOwnProperty(s)&&(n+=be.hyphenate(s)+":"+this.style[s]+";");n&&(r+=' style="'+be.escape(n)+'"');for(var i in this.attributes)if(this.attributes.hasOwnProperty(i)){if(O6.test(i))throw new re("Invalid attribute name '"+i+"'");r+=" "+i+'="'+be.escape(this.attributes[i])+'"'}r+=">";for(var a=0;a",r};class A0{constructor(e,r,n,s){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,H1.call(this,e,n,s),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return be.contains(this.classes,e)}toNode(){return q1.call(this,"span")}toMarkup(){return j1.call(this,"span")}}class go{constructor(e,r,n,s){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,H1.call(this,r,s),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return be.contains(this.classes,e)}toNode(){return q1.call(this,"a")}toMarkup(){return j1.call(this,"a")}}class L6{constructor(e,r,n){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=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return be.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e=''+be.escape(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=ae(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Xr(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var s in this.style)this.style.hasOwnProperty(s)&&(n+=be.hyphenate(s)+":"+this.style[s]+";");n&&(e=!0,r+=' style="'+be.escape(n)+'"');var i=be.escape(this.text);return e?(r+=">",r+=i,r+="",r):i}}class _r{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var s=0;s':''}}class fa{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e=" but got "+String(t)+".")}var F6={bin:1,close:1,inner:1,open:1,punct:1,rel:1},B6={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Je={math:{},text:{}};function u(t,e,r,n,s,i){Je[t][s]={font:e,group:r,replace:n},i&&n&&(Je[t][n]=Je[t][s])}var h="math",X="text",m="main",T="ams",Qe="accent-token",ue="bin",Dt="close",Hn="inner",xe="mathord",dt="op-token",jt="open",Qs="punct",C="rel",$r="spacing",R="textord";u(h,m,C,"≡","\\equiv",!0);u(h,m,C,"≺","\\prec",!0);u(h,m,C,"≻","\\succ",!0);u(h,m,C,"∼","\\sim",!0);u(h,m,C,"⊥","\\perp");u(h,m,C,"⪯","\\preceq",!0);u(h,m,C,"⪰","\\succeq",!0);u(h,m,C,"≃","\\simeq",!0);u(h,m,C,"∣","\\mid",!0);u(h,m,C,"≪","\\ll",!0);u(h,m,C,"≫","\\gg",!0);u(h,m,C,"≍","\\asymp",!0);u(h,m,C,"∥","\\parallel");u(h,m,C,"⋈","\\bowtie",!0);u(h,m,C,"⌣","\\smile",!0);u(h,m,C,"⊑","\\sqsubseteq",!0);u(h,m,C,"⊒","\\sqsupseteq",!0);u(h,m,C,"≐","\\doteq",!0);u(h,m,C,"⌢","\\frown",!0);u(h,m,C,"∋","\\ni",!0);u(h,m,C,"∝","\\propto",!0);u(h,m,C,"⊢","\\vdash",!0);u(h,m,C,"⊣","\\dashv",!0);u(h,m,C,"∋","\\owns");u(h,m,Qs,".","\\ldotp");u(h,m,Qs,"⋅","\\cdotp");u(h,m,R,"#","\\#");u(X,m,R,"#","\\#");u(h,m,R,"&","\\&");u(X,m,R,"&","\\&");u(h,m,R,"ℵ","\\aleph",!0);u(h,m,R,"∀","\\forall",!0);u(h,m,R,"ℏ","\\hbar",!0);u(h,m,R,"∃","\\exists",!0);u(h,m,R,"∇","\\nabla",!0);u(h,m,R,"♭","\\flat",!0);u(h,m,R,"ℓ","\\ell",!0);u(h,m,R,"♮","\\natural",!0);u(h,m,R,"♣","\\clubsuit",!0);u(h,m,R,"℘","\\wp",!0);u(h,m,R,"♯","\\sharp",!0);u(h,m,R,"♢","\\diamondsuit",!0);u(h,m,R,"ℜ","\\Re",!0);u(h,m,R,"♡","\\heartsuit",!0);u(h,m,R,"ℑ","\\Im",!0);u(h,m,R,"♠","\\spadesuit",!0);u(h,m,R,"§","\\S",!0);u(X,m,R,"§","\\S");u(h,m,R,"¶","\\P",!0);u(X,m,R,"¶","\\P");u(h,m,R,"†","\\dag");u(X,m,R,"†","\\dag");u(X,m,R,"†","\\textdagger");u(h,m,R,"‡","\\ddag");u(X,m,R,"‡","\\ddag");u(X,m,R,"‡","\\textdaggerdbl");u(h,m,Dt,"⎱","\\rmoustache",!0);u(h,m,jt,"⎰","\\lmoustache",!0);u(h,m,Dt,"⟯","\\rgroup",!0);u(h,m,jt,"⟮","\\lgroup",!0);u(h,m,ue,"∓","\\mp",!0);u(h,m,ue,"⊖","\\ominus",!0);u(h,m,ue,"⊎","\\uplus",!0);u(h,m,ue,"⊓","\\sqcap",!0);u(h,m,ue,"∗","\\ast");u(h,m,ue,"⊔","\\sqcup",!0);u(h,m,ue,"◯","\\bigcirc",!0);u(h,m,ue,"∙","\\bullet",!0);u(h,m,ue,"‡","\\ddagger");u(h,m,ue,"≀","\\wr",!0);u(h,m,ue,"⨿","\\amalg");u(h,m,ue,"&","\\And");u(h,m,C,"⟵","\\longleftarrow",!0);u(h,m,C,"⇐","\\Leftarrow",!0);u(h,m,C,"⟸","\\Longleftarrow",!0);u(h,m,C,"⟶","\\longrightarrow",!0);u(h,m,C,"⇒","\\Rightarrow",!0);u(h,m,C,"⟹","\\Longrightarrow",!0);u(h,m,C,"↔","\\leftrightarrow",!0);u(h,m,C,"⟷","\\longleftrightarrow",!0);u(h,m,C,"⇔","\\Leftrightarrow",!0);u(h,m,C,"⟺","\\Longleftrightarrow",!0);u(h,m,C,"↦","\\mapsto",!0);u(h,m,C,"⟼","\\longmapsto",!0);u(h,m,C,"↗","\\nearrow",!0);u(h,m,C,"↩","\\hookleftarrow",!0);u(h,m,C,"↪","\\hookrightarrow",!0);u(h,m,C,"↘","\\searrow",!0);u(h,m,C,"↼","\\leftharpoonup",!0);u(h,m,C,"⇀","\\rightharpoonup",!0);u(h,m,C,"↙","\\swarrow",!0);u(h,m,C,"↽","\\leftharpoondown",!0);u(h,m,C,"⇁","\\rightharpoondown",!0);u(h,m,C,"↖","\\nwarrow",!0);u(h,m,C,"⇌","\\rightleftharpoons",!0);u(h,T,C,"≮","\\nless",!0);u(h,T,C,"","\\@nleqslant");u(h,T,C,"","\\@nleqq");u(h,T,C,"⪇","\\lneq",!0);u(h,T,C,"≨","\\lneqq",!0);u(h,T,C,"","\\@lvertneqq");u(h,T,C,"⋦","\\lnsim",!0);u(h,T,C,"⪉","\\lnapprox",!0);u(h,T,C,"⊀","\\nprec",!0);u(h,T,C,"⋠","\\npreceq",!0);u(h,T,C,"⋨","\\precnsim",!0);u(h,T,C,"⪹","\\precnapprox",!0);u(h,T,C,"≁","\\nsim",!0);u(h,T,C,"","\\@nshortmid");u(h,T,C,"∤","\\nmid",!0);u(h,T,C,"⊬","\\nvdash",!0);u(h,T,C,"⊭","\\nvDash",!0);u(h,T,C,"⋪","\\ntriangleleft");u(h,T,C,"⋬","\\ntrianglelefteq",!0);u(h,T,C,"⊊","\\subsetneq",!0);u(h,T,C,"","\\@varsubsetneq");u(h,T,C,"⫋","\\subsetneqq",!0);u(h,T,C,"","\\@varsubsetneqq");u(h,T,C,"≯","\\ngtr",!0);u(h,T,C,"","\\@ngeqslant");u(h,T,C,"","\\@ngeqq");u(h,T,C,"⪈","\\gneq",!0);u(h,T,C,"≩","\\gneqq",!0);u(h,T,C,"","\\@gvertneqq");u(h,T,C,"⋧","\\gnsim",!0);u(h,T,C,"⪊","\\gnapprox",!0);u(h,T,C,"⊁","\\nsucc",!0);u(h,T,C,"⋡","\\nsucceq",!0);u(h,T,C,"⋩","\\succnsim",!0);u(h,T,C,"⪺","\\succnapprox",!0);u(h,T,C,"≆","\\ncong",!0);u(h,T,C,"","\\@nshortparallel");u(h,T,C,"∦","\\nparallel",!0);u(h,T,C,"⊯","\\nVDash",!0);u(h,T,C,"⋫","\\ntriangleright");u(h,T,C,"⋭","\\ntrianglerighteq",!0);u(h,T,C,"","\\@nsupseteqq");u(h,T,C,"⊋","\\supsetneq",!0);u(h,T,C,"","\\@varsupsetneq");u(h,T,C,"⫌","\\supsetneqq",!0);u(h,T,C,"","\\@varsupsetneqq");u(h,T,C,"⊮","\\nVdash",!0);u(h,T,C,"⪵","\\precneqq",!0);u(h,T,C,"⪶","\\succneqq",!0);u(h,T,C,"","\\@nsubseteqq");u(h,T,ue,"⊴","\\unlhd");u(h,T,ue,"⊵","\\unrhd");u(h,T,C,"↚","\\nleftarrow",!0);u(h,T,C,"↛","\\nrightarrow",!0);u(h,T,C,"⇍","\\nLeftarrow",!0);u(h,T,C,"⇏","\\nRightarrow",!0);u(h,T,C,"↮","\\nleftrightarrow",!0);u(h,T,C,"⇎","\\nLeftrightarrow",!0);u(h,T,C,"△","\\vartriangle");u(h,T,R,"ℏ","\\hslash");u(h,T,R,"▽","\\triangledown");u(h,T,R,"◊","\\lozenge");u(h,T,R,"Ⓢ","\\circledS");u(h,T,R,"®","\\circledR");u(X,T,R,"®","\\circledR");u(h,T,R,"∡","\\measuredangle",!0);u(h,T,R,"∄","\\nexists");u(h,T,R,"℧","\\mho");u(h,T,R,"Ⅎ","\\Finv",!0);u(h,T,R,"⅁","\\Game",!0);u(h,T,R,"‵","\\backprime");u(h,T,R,"▲","\\blacktriangle");u(h,T,R,"▼","\\blacktriangledown");u(h,T,R,"■","\\blacksquare");u(h,T,R,"⧫","\\blacklozenge");u(h,T,R,"★","\\bigstar");u(h,T,R,"∢","\\sphericalangle",!0);u(h,T,R,"∁","\\complement",!0);u(h,T,R,"ð","\\eth",!0);u(X,m,R,"ð","ð");u(h,T,R,"╱","\\diagup");u(h,T,R,"╲","\\diagdown");u(h,T,R,"□","\\square");u(h,T,R,"□","\\Box");u(h,T,R,"◊","\\Diamond");u(h,T,R,"¥","\\yen",!0);u(X,T,R,"¥","\\yen",!0);u(h,T,R,"✓","\\checkmark",!0);u(X,T,R,"✓","\\checkmark");u(h,T,R,"ℶ","\\beth",!0);u(h,T,R,"ℸ","\\daleth",!0);u(h,T,R,"ℷ","\\gimel",!0);u(h,T,R,"ϝ","\\digamma",!0);u(h,T,R,"ϰ","\\varkappa");u(h,T,jt,"┌","\\@ulcorner",!0);u(h,T,Dt,"┐","\\@urcorner",!0);u(h,T,jt,"└","\\@llcorner",!0);u(h,T,Dt,"┘","\\@lrcorner",!0);u(h,T,C,"≦","\\leqq",!0);u(h,T,C,"⩽","\\leqslant",!0);u(h,T,C,"⪕","\\eqslantless",!0);u(h,T,C,"≲","\\lesssim",!0);u(h,T,C,"⪅","\\lessapprox",!0);u(h,T,C,"≊","\\approxeq",!0);u(h,T,ue,"⋖","\\lessdot");u(h,T,C,"⋘","\\lll",!0);u(h,T,C,"≶","\\lessgtr",!0);u(h,T,C,"⋚","\\lesseqgtr",!0);u(h,T,C,"⪋","\\lesseqqgtr",!0);u(h,T,C,"≑","\\doteqdot");u(h,T,C,"≓","\\risingdotseq",!0);u(h,T,C,"≒","\\fallingdotseq",!0);u(h,T,C,"∽","\\backsim",!0);u(h,T,C,"⋍","\\backsimeq",!0);u(h,T,C,"⫅","\\subseteqq",!0);u(h,T,C,"⋐","\\Subset",!0);u(h,T,C,"⊏","\\sqsubset",!0);u(h,T,C,"≼","\\preccurlyeq",!0);u(h,T,C,"⋞","\\curlyeqprec",!0);u(h,T,C,"≾","\\precsim",!0);u(h,T,C,"⪷","\\precapprox",!0);u(h,T,C,"⊲","\\vartriangleleft");u(h,T,C,"⊴","\\trianglelefteq");u(h,T,C,"⊨","\\vDash",!0);u(h,T,C,"⊪","\\Vvdash",!0);u(h,T,C,"⌣","\\smallsmile");u(h,T,C,"⌢","\\smallfrown");u(h,T,C,"≏","\\bumpeq",!0);u(h,T,C,"≎","\\Bumpeq",!0);u(h,T,C,"≧","\\geqq",!0);u(h,T,C,"⩾","\\geqslant",!0);u(h,T,C,"⪖","\\eqslantgtr",!0);u(h,T,C,"≳","\\gtrsim",!0);u(h,T,C,"⪆","\\gtrapprox",!0);u(h,T,ue,"⋗","\\gtrdot");u(h,T,C,"⋙","\\ggg",!0);u(h,T,C,"≷","\\gtrless",!0);u(h,T,C,"⋛","\\gtreqless",!0);u(h,T,C,"⪌","\\gtreqqless",!0);u(h,T,C,"≖","\\eqcirc",!0);u(h,T,C,"≗","\\circeq",!0);u(h,T,C,"≜","\\triangleq",!0);u(h,T,C,"∼","\\thicksim");u(h,T,C,"≈","\\thickapprox");u(h,T,C,"⫆","\\supseteqq",!0);u(h,T,C,"⋑","\\Supset",!0);u(h,T,C,"⊐","\\sqsupset",!0);u(h,T,C,"≽","\\succcurlyeq",!0);u(h,T,C,"⋟","\\curlyeqsucc",!0);u(h,T,C,"≿","\\succsim",!0);u(h,T,C,"⪸","\\succapprox",!0);u(h,T,C,"⊳","\\vartriangleright");u(h,T,C,"⊵","\\trianglerighteq");u(h,T,C,"⊩","\\Vdash",!0);u(h,T,C,"∣","\\shortmid");u(h,T,C,"∥","\\shortparallel");u(h,T,C,"≬","\\between",!0);u(h,T,C,"⋔","\\pitchfork",!0);u(h,T,C,"∝","\\varpropto");u(h,T,C,"◀","\\blacktriangleleft");u(h,T,C,"∴","\\therefore",!0);u(h,T,C,"∍","\\backepsilon");u(h,T,C,"▶","\\blacktriangleright");u(h,T,C,"∵","\\because",!0);u(h,T,C,"⋘","\\llless");u(h,T,C,"⋙","\\gggtr");u(h,T,ue,"⊲","\\lhd");u(h,T,ue,"⊳","\\rhd");u(h,T,C,"≂","\\eqsim",!0);u(h,m,C,"⋈","\\Join");u(h,T,C,"≑","\\Doteq",!0);u(h,T,ue,"∔","\\dotplus",!0);u(h,T,ue,"∖","\\smallsetminus");u(h,T,ue,"⋒","\\Cap",!0);u(h,T,ue,"⋓","\\Cup",!0);u(h,T,ue,"⩞","\\doublebarwedge",!0);u(h,T,ue,"⊟","\\boxminus",!0);u(h,T,ue,"⊞","\\boxplus",!0);u(h,T,ue,"⋇","\\divideontimes",!0);u(h,T,ue,"⋉","\\ltimes",!0);u(h,T,ue,"⋊","\\rtimes",!0);u(h,T,ue,"⋋","\\leftthreetimes",!0);u(h,T,ue,"⋌","\\rightthreetimes",!0);u(h,T,ue,"⋏","\\curlywedge",!0);u(h,T,ue,"⋎","\\curlyvee",!0);u(h,T,ue,"⊝","\\circleddash",!0);u(h,T,ue,"⊛","\\circledast",!0);u(h,T,ue,"⋅","\\centerdot");u(h,T,ue,"⊺","\\intercal",!0);u(h,T,ue,"⋒","\\doublecap");u(h,T,ue,"⋓","\\doublecup");u(h,T,ue,"⊠","\\boxtimes",!0);u(h,T,C,"⇢","\\dashrightarrow",!0);u(h,T,C,"⇠","\\dashleftarrow",!0);u(h,T,C,"⇇","\\leftleftarrows",!0);u(h,T,C,"⇆","\\leftrightarrows",!0);u(h,T,C,"⇚","\\Lleftarrow",!0);u(h,T,C,"↞","\\twoheadleftarrow",!0);u(h,T,C,"↢","\\leftarrowtail",!0);u(h,T,C,"↫","\\looparrowleft",!0);u(h,T,C,"⇋","\\leftrightharpoons",!0);u(h,T,C,"↶","\\curvearrowleft",!0);u(h,T,C,"↺","\\circlearrowleft",!0);u(h,T,C,"↰","\\Lsh",!0);u(h,T,C,"⇈","\\upuparrows",!0);u(h,T,C,"↿","\\upharpoonleft",!0);u(h,T,C,"⇃","\\downharpoonleft",!0);u(h,m,C,"⊶","\\origof",!0);u(h,m,C,"⊷","\\imageof",!0);u(h,T,C,"⊸","\\multimap",!0);u(h,T,C,"↭","\\leftrightsquigarrow",!0);u(h,T,C,"⇉","\\rightrightarrows",!0);u(h,T,C,"⇄","\\rightleftarrows",!0);u(h,T,C,"↠","\\twoheadrightarrow",!0);u(h,T,C,"↣","\\rightarrowtail",!0);u(h,T,C,"↬","\\looparrowright",!0);u(h,T,C,"↷","\\curvearrowright",!0);u(h,T,C,"↻","\\circlearrowright",!0);u(h,T,C,"↱","\\Rsh",!0);u(h,T,C,"⇊","\\downdownarrows",!0);u(h,T,C,"↾","\\upharpoonright",!0);u(h,T,C,"⇂","\\downharpoonright",!0);u(h,T,C,"⇝","\\rightsquigarrow",!0);u(h,T,C,"⇝","\\leadsto");u(h,T,C,"⇛","\\Rrightarrow",!0);u(h,T,C,"↾","\\restriction");u(h,m,R,"‘","`");u(h,m,R,"$","\\$");u(X,m,R,"$","\\$");u(X,m,R,"$","\\textdollar");u(h,m,R,"%","\\%");u(X,m,R,"%","\\%");u(h,m,R,"_","\\_");u(X,m,R,"_","\\_");u(X,m,R,"_","\\textunderscore");u(h,m,R,"∠","\\angle",!0);u(h,m,R,"∞","\\infty",!0);u(h,m,R,"′","\\prime");u(h,m,R,"△","\\triangle");u(h,m,R,"Γ","\\Gamma",!0);u(h,m,R,"Δ","\\Delta",!0);u(h,m,R,"Θ","\\Theta",!0);u(h,m,R,"Λ","\\Lambda",!0);u(h,m,R,"Ξ","\\Xi",!0);u(h,m,R,"Π","\\Pi",!0);u(h,m,R,"Σ","\\Sigma",!0);u(h,m,R,"Υ","\\Upsilon",!0);u(h,m,R,"Φ","\\Phi",!0);u(h,m,R,"Ψ","\\Psi",!0);u(h,m,R,"Ω","\\Omega",!0);u(h,m,R,"A","Α");u(h,m,R,"B","Β");u(h,m,R,"E","Ε");u(h,m,R,"Z","Ζ");u(h,m,R,"H","Η");u(h,m,R,"I","Ι");u(h,m,R,"K","Κ");u(h,m,R,"M","Μ");u(h,m,R,"N","Ν");u(h,m,R,"O","Ο");u(h,m,R,"P","Ρ");u(h,m,R,"T","Τ");u(h,m,R,"X","Χ");u(h,m,R,"¬","\\neg",!0);u(h,m,R,"¬","\\lnot");u(h,m,R,"⊤","\\top");u(h,m,R,"⊥","\\bot");u(h,m,R,"∅","\\emptyset");u(h,T,R,"∅","\\varnothing");u(h,m,xe,"α","\\alpha",!0);u(h,m,xe,"β","\\beta",!0);u(h,m,xe,"γ","\\gamma",!0);u(h,m,xe,"δ","\\delta",!0);u(h,m,xe,"ϵ","\\epsilon",!0);u(h,m,xe,"ζ","\\zeta",!0);u(h,m,xe,"η","\\eta",!0);u(h,m,xe,"θ","\\theta",!0);u(h,m,xe,"ι","\\iota",!0);u(h,m,xe,"κ","\\kappa",!0);u(h,m,xe,"λ","\\lambda",!0);u(h,m,xe,"μ","\\mu",!0);u(h,m,xe,"ν","\\nu",!0);u(h,m,xe,"ξ","\\xi",!0);u(h,m,xe,"ο","\\omicron",!0);u(h,m,xe,"π","\\pi",!0);u(h,m,xe,"ρ","\\rho",!0);u(h,m,xe,"σ","\\sigma",!0);u(h,m,xe,"τ","\\tau",!0);u(h,m,xe,"υ","\\upsilon",!0);u(h,m,xe,"ϕ","\\phi",!0);u(h,m,xe,"χ","\\chi",!0);u(h,m,xe,"ψ","\\psi",!0);u(h,m,xe,"ω","\\omega",!0);u(h,m,xe,"ε","\\varepsilon",!0);u(h,m,xe,"ϑ","\\vartheta",!0);u(h,m,xe,"ϖ","\\varpi",!0);u(h,m,xe,"ϱ","\\varrho",!0);u(h,m,xe,"ς","\\varsigma",!0);u(h,m,xe,"φ","\\varphi",!0);u(h,m,ue,"∗","*",!0);u(h,m,ue,"+","+");u(h,m,ue,"−","-",!0);u(h,m,ue,"⋅","\\cdot",!0);u(h,m,ue,"∘","\\circ",!0);u(h,m,ue,"÷","\\div",!0);u(h,m,ue,"±","\\pm",!0);u(h,m,ue,"×","\\times",!0);u(h,m,ue,"∩","\\cap",!0);u(h,m,ue,"∪","\\cup",!0);u(h,m,ue,"∖","\\setminus",!0);u(h,m,ue,"∧","\\land");u(h,m,ue,"∨","\\lor");u(h,m,ue,"∧","\\wedge",!0);u(h,m,ue,"∨","\\vee",!0);u(h,m,R,"√","\\surd");u(h,m,jt,"⟨","\\langle",!0);u(h,m,jt,"∣","\\lvert");u(h,m,jt,"∥","\\lVert");u(h,m,Dt,"?","?");u(h,m,Dt,"!","!");u(h,m,Dt,"⟩","\\rangle",!0);u(h,m,Dt,"∣","\\rvert");u(h,m,Dt,"∥","\\rVert");u(h,m,C,"=","=");u(h,m,C,":",":");u(h,m,C,"≈","\\approx",!0);u(h,m,C,"≅","\\cong",!0);u(h,m,C,"≥","\\ge");u(h,m,C,"≥","\\geq",!0);u(h,m,C,"←","\\gets");u(h,m,C,">","\\gt",!0);u(h,m,C,"∈","\\in",!0);u(h,m,C,"","\\@not");u(h,m,C,"⊂","\\subset",!0);u(h,m,C,"⊃","\\supset",!0);u(h,m,C,"⊆","\\subseteq",!0);u(h,m,C,"⊇","\\supseteq",!0);u(h,T,C,"⊈","\\nsubseteq",!0);u(h,T,C,"⊉","\\nsupseteq",!0);u(h,m,C,"⊨","\\models");u(h,m,C,"←","\\leftarrow",!0);u(h,m,C,"≤","\\le");u(h,m,C,"≤","\\leq",!0);u(h,m,C,"<","\\lt",!0);u(h,m,C,"→","\\rightarrow",!0);u(h,m,C,"→","\\to");u(h,T,C,"≱","\\ngeq",!0);u(h,T,C,"≰","\\nleq",!0);u(h,m,$r," ","\\ ");u(h,m,$r," ","\\space");u(h,m,$r," ","\\nobreakspace");u(X,m,$r," ","\\ ");u(X,m,$r," "," ");u(X,m,$r," ","\\space");u(X,m,$r," ","\\nobreakspace");u(h,m,$r,null,"\\nobreak");u(h,m,$r,null,"\\allowbreak");u(h,m,Qs,",",",");u(h,m,Qs,";",";");u(h,T,ue,"⊼","\\barwedge",!0);u(h,T,ue,"⊻","\\veebar",!0);u(h,m,ue,"⊙","\\odot",!0);u(h,m,ue,"⊕","\\oplus",!0);u(h,m,ue,"⊗","\\otimes",!0);u(h,m,R,"∂","\\partial",!0);u(h,m,ue,"⊘","\\oslash",!0);u(h,T,ue,"⊚","\\circledcirc",!0);u(h,T,ue,"⊡","\\boxdot",!0);u(h,m,ue,"△","\\bigtriangleup");u(h,m,ue,"▽","\\bigtriangledown");u(h,m,ue,"†","\\dagger");u(h,m,ue,"⋄","\\diamond");u(h,m,ue,"⋆","\\star");u(h,m,ue,"◃","\\triangleleft");u(h,m,ue,"▹","\\triangleright");u(h,m,jt,"{","\\{");u(X,m,R,"{","\\{");u(X,m,R,"{","\\textbraceleft");u(h,m,Dt,"}","\\}");u(X,m,R,"}","\\}");u(X,m,R,"}","\\textbraceright");u(h,m,jt,"{","\\lbrace");u(h,m,Dt,"}","\\rbrace");u(h,m,jt,"[","\\lbrack",!0);u(X,m,R,"[","\\lbrack",!0);u(h,m,Dt,"]","\\rbrack",!0);u(X,m,R,"]","\\rbrack",!0);u(h,m,jt,"(","\\lparen",!0);u(h,m,Dt,")","\\rparen",!0);u(X,m,R,"<","\\textless",!0);u(X,m,R,">","\\textgreater",!0);u(h,m,jt,"⌊","\\lfloor",!0);u(h,m,Dt,"⌋","\\rfloor",!0);u(h,m,jt,"⌈","\\lceil",!0);u(h,m,Dt,"⌉","\\rceil",!0);u(h,m,R,"\\","\\backslash");u(h,m,R,"∣","|");u(h,m,R,"∣","\\vert");u(X,m,R,"|","\\textbar",!0);u(h,m,R,"∥","\\|");u(h,m,R,"∥","\\Vert");u(X,m,R,"∥","\\textbardbl");u(X,m,R,"~","\\textasciitilde");u(X,m,R,"\\","\\textbackslash");u(X,m,R,"^","\\textasciicircum");u(h,m,C,"↑","\\uparrow",!0);u(h,m,C,"⇑","\\Uparrow",!0);u(h,m,C,"↓","\\downarrow",!0);u(h,m,C,"⇓","\\Downarrow",!0);u(h,m,C,"↕","\\updownarrow",!0);u(h,m,C,"⇕","\\Updownarrow",!0);u(h,m,dt,"∐","\\coprod");u(h,m,dt,"⋁","\\bigvee");u(h,m,dt,"⋀","\\bigwedge");u(h,m,dt,"⨄","\\biguplus");u(h,m,dt,"⋂","\\bigcap");u(h,m,dt,"⋃","\\bigcup");u(h,m,dt,"∫","\\int");u(h,m,dt,"∫","\\intop");u(h,m,dt,"∬","\\iint");u(h,m,dt,"∭","\\iiint");u(h,m,dt,"∏","\\prod");u(h,m,dt,"∑","\\sum");u(h,m,dt,"⨂","\\bigotimes");u(h,m,dt,"⨁","\\bigoplus");u(h,m,dt,"⨀","\\bigodot");u(h,m,dt,"∮","\\oint");u(h,m,dt,"∯","\\oiint");u(h,m,dt,"∰","\\oiiint");u(h,m,dt,"⨆","\\bigsqcup");u(h,m,dt,"∫","\\smallint");u(X,m,Hn,"…","\\textellipsis");u(h,m,Hn,"…","\\mathellipsis");u(X,m,Hn,"…","\\ldots",!0);u(h,m,Hn,"…","\\ldots",!0);u(h,m,Hn,"⋯","\\@cdots",!0);u(h,m,Hn,"⋱","\\ddots",!0);u(h,m,R,"⋮","\\varvdots");u(X,m,R,"⋮","\\varvdots");u(h,m,Qe,"ˊ","\\acute");u(h,m,Qe,"ˋ","\\grave");u(h,m,Qe,"¨","\\ddot");u(h,m,Qe,"~","\\tilde");u(h,m,Qe,"ˉ","\\bar");u(h,m,Qe,"˘","\\breve");u(h,m,Qe,"ˇ","\\check");u(h,m,Qe,"^","\\hat");u(h,m,Qe,"⃗","\\vec");u(h,m,Qe,"˙","\\dot");u(h,m,Qe,"˚","\\mathring");u(h,m,xe,"","\\@imath");u(h,m,xe,"","\\@jmath");u(h,m,R,"ı","ı");u(h,m,R,"ȷ","ȷ");u(X,m,R,"ı","\\i",!0);u(X,m,R,"ȷ","\\j",!0);u(X,m,R,"ß","\\ss",!0);u(X,m,R,"æ","\\ae",!0);u(X,m,R,"œ","\\oe",!0);u(X,m,R,"ø","\\o",!0);u(X,m,R,"Æ","\\AE",!0);u(X,m,R,"Œ","\\OE",!0);u(X,m,R,"Ø","\\O",!0);u(X,m,Qe,"ˊ","\\'");u(X,m,Qe,"ˋ","\\`");u(X,m,Qe,"ˆ","\\^");u(X,m,Qe,"˜","\\~");u(X,m,Qe,"ˉ","\\=");u(X,m,Qe,"˘","\\u");u(X,m,Qe,"˙","\\.");u(X,m,Qe,"¸","\\c");u(X,m,Qe,"˚","\\r");u(X,m,Qe,"ˇ","\\v");u(X,m,Qe,"¨",'\\"');u(X,m,Qe,"˝","\\H");u(X,m,Qe,"◯","\\textcircled");var U1={"--":!0,"---":!0,"``":!0,"''":!0};u(X,m,R,"–","--",!0);u(X,m,R,"–","\\textendash");u(X,m,R,"—","---",!0);u(X,m,R,"—","\\textemdash");u(X,m,R,"‘","`",!0);u(X,m,R,"‘","\\textquoteleft");u(X,m,R,"’","'",!0);u(X,m,R,"’","\\textquoteright");u(X,m,R,"“","``",!0);u(X,m,R,"“","\\textquotedblleft");u(X,m,R,"”","''",!0);u(X,m,R,"”","\\textquotedblright");u(h,m,R,"°","\\degree",!0);u(X,m,R,"°","\\degree");u(X,m,R,"°","\\textdegree",!0);u(h,m,R,"£","\\pounds");u(h,m,R,"£","\\mathsterling",!0);u(X,m,R,"£","\\pounds");u(X,m,R,"£","\\textsterling",!0);u(h,T,R,"✠","\\maltese");u(X,T,R,"✠","\\maltese");var Ql='0123456789/@."';for(var Ti=0;Ti0)return Qt(i,c,s,r,a.concat(d));if(l){var f,p;if(l==="boldsymbol"){var g=q6(i,s,r,a,n);f=g.fontName,p=[g.fontClass]}else o?(f=G1[l].fontName,p=[l]):(f=j0(l,r.fontWeight,r.fontShape),p=[l,r.fontWeight,r.fontShape]);if(ei(i,f,s).metrics)return Qt(i,f,s,r,a.concat(p));if(U1.hasOwnProperty(i)&&f.slice(0,10)==="Typewriter"){for(var b=[],y=0;y{if(Xr(t.classes)!==Xr(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var s in e.style)if(e.style.hasOwnProperty(s)&&t.style[s]!==e.style[s])return!1;return!0},V6=t=>{for(var e=0;er&&(r=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>s&&(s=a.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=s},_t=function(e,r,n,s){var i=new A0(e,r,n,s);return vo(i),i},V1=(t,e,r,n)=>new A0(t,e,r,n),W6=function(e,r,n){var s=_t([e],[],r);return s.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),s.style.borderBottomWidth=ae(s.height),s.maxFontSize=1,s},G6=function(e,r,n,s){var i=new go(e,r,n,s);return vo(i),i},W1=function(e){var r=new E0(e);return vo(r),r},K6=function(e,r){return e instanceof E0?_t([],[e],r):e},Y6=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],s=-r[0].shift-r[0].elem.depth,i=s,a=1;a{var r=_t(["mspace"],[],e),n=tt(t,e);return r.style.marginRight=ae(n),r},j0=function(e,r,n){var s="";switch(e){case"amsrm":s="AMS";break;case"textrm":s="Main";break;case"textsf":s="SansSerif";break;case"texttt":s="Typewriter";break;default:s=e}var i;return r==="textbf"&&n==="textit"?i="BoldItalic":r==="textbf"?i="Bold":r==="textit"?i="Italic":i="Regular",s+"-"+i},G1={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"}},K1={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Z6=function(e,r){var[n,s,i]=K1[e],a=new Jr(n),o=new _r([a],{width:ae(s),height:ae(i),style:"width:"+ae(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=V1(["overlay"],[o],r);return l.height=i,l.style.height=ae(i),l.style.width=ae(s),l},z={fontMap:G1,makeSymbol:Qt,mathsym:H6,makeSpan:_t,makeSvgSpan:V1,makeLineSpan:W6,makeAnchor:G6,makeFragment:W1,wrapFragment:K6,makeVList:X6,makeOrd:j6,makeGlue:J6,staticSvg:Z6,svgData:K1,tryCombineChars:V6},et={number:3,unit:"mu"},cn={number:4,unit:"mu"},xr={number:5,unit:"mu"},Q6={mord:{mop:et,mbin:cn,mrel:xr,minner:et},mop:{mord:et,mop:et,mrel:xr,minner:et},mbin:{mord:cn,mop:cn,mopen:cn,minner:cn},mrel:{mord:xr,mop:xr,mopen:xr,minner:xr},mopen:{},mclose:{mop:et,mbin:cn,mrel:xr,minner:et},mpunct:{mord:et,mop:et,mrel:xr,mopen:et,mclose:et,mpunct:et,minner:et},minner:{mord:et,mop:et,mbin:cn,mrel:xr,mopen:et,mpunct:et,minner:et}},e5={mord:{mop:et},mop:{mord:et,mop:et},mbin:{},mrel:{},mopen:{},mclose:{mop:et},mpunct:{},minner:{mop:et}},Y1={},Ns={},Ds={};function ce(t){for(var{type:e,names:r,props:n,handler:s,htmlBuilder:i,mathmlBuilder:a}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:s},l=0;l{var w=y.classes[0],M=b.classes[0];w==="mbin"&&be.contains(r5,M)?y.classes[0]="mord":M==="mbin"&&be.contains(t5,w)&&(b.classes[0]="mord")},{node:f},p,g),sc(i,(b,y)=>{var w=ma(y),M=ma(b),S=w&&M?b.hasClass("mtight")?e5[w][M]:Q6[w][M]:null;if(S)return z.makeGlue(S,c)},{node:f},p,g),i},sc=function t(e,r,n,s,i){s&&e.push(s);for(var a=0;ap=>{e.splice(f+1,0,p),a++})(a)}s&&e.pop()},X1=function(e){return e instanceof E0||e instanceof go||e instanceof A0&&e.hasClass("enclosing")?e:null},i5=function t(e,r){var n=X1(e);if(n){var s=n.children;if(s.length){if(r==="right")return t(s[s.length-1],"right");if(r==="left")return t(s[0],"left")}}return e},ma=function(e,r){return e?(r&&(e=i5(e,r)),s5[e.classes[0]]||null):null},g0=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Or(r.concat(n))},Le=function(e,r,n){if(!e)return Or();if(Ns[e.type]){var s=Ns[e.type](e,r);if(n&&r.size!==n.size){s=Or(r.sizingClasses(n),[s],r);var i=r.sizeMultiplier/n.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new re("Got group of unknown type: '"+e.type+"'")};function U0(t,e){var r=Or(["base"],t,e),n=Or(["strut"]);return n.style.height=ae(r.height+r.depth),r.depth&&(n.style.verticalAlign=ae(-r.depth)),r.children.unshift(n),r}function ga(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=ft(t,e,"root"),s;n.length===2&&n[1].hasClass("tag")&&(s=n.pop());for(var i=[],a=[],o=0;o0&&(i.push(U0(a,e)),a=[]),i.push(n[o]));a.length>0&&i.push(U0(a,e));var c;r?(c=U0(ft(r,e,!0)),c.classes=["tag"],i.push(c)):s&&i.push(s);var d=Or(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),c){var f=c.children[0];f.style.height=ae(d.height+d.depth),d.depth&&(f.style.verticalAlign=ae(-d.depth))}return d}function J1(t){return new E0(t)}class Pt{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=Xr(this.classes));for(var n=0;n0&&(e+=' class ="'+be.escape(Xr(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}}class pr{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return be.escape(this.toText())}toText(){return this.text}}class a5{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",ae(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var ee={MathNode:Pt,TextNode:pr,SpaceNode:a5,newDocumentFragment:J1},Xt=function(e,r,n){return Je[r][e]&&Je[r][e].replace&&e.charCodeAt(0)!==55349&&!(U1.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=Je[r][e].replace),new ee.TextNode(e)},bo=function(e){return e.length===1?e[0]:new ee.MathNode("mrow",e)},yo=function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var s=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.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 i=e.text;if(be.contains(["\\imath","\\jmath"],i))return null;Je[s][i]&&Je[s][i].replace&&(i=Je[s][i].replace);var a=z.fontMap[n].fontName;return mo(i,a,s)?z.fontMap[n].variant:null};function Mi(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof pr&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof pr&&r.text===","}else return!1}var zt=function(e,r,n){if(e.length===1){var s=We(e[0],r);return n&&s instanceof Pt&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||Mi(a))){var c=l.children[0];c instanceof Pt&&c.type==="mn"&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var d=a.children[0];if(d instanceof pr&&d.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof pr&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(l),a=l}return i},Zr=function(e,r,n){return bo(zt(e,r,n))},We=function(e,r){if(!e)return new ee.MathNode("mrow");if(Ds[e.type]){var n=Ds[e.type](e,r);return n}else throw new re("Got group of unknown type: '"+e.type+"'")};function ic(t,e,r,n,s){var i=zt(t,r),a;i.length===1&&i[0]instanceof Pt&&be.contains(["mrow","mtable"],i[0].type)?a=i[0]:a=new ee.MathNode("mrow",i);var o=new ee.MathNode("annotation",[new ee.TextNode(e)]);o.setAttribute("encoding","application/x-tex");var l=new ee.MathNode("semantics",[a,o]),c=new ee.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var d=s?"katex":"katex-mathml";return z.makeSpan([d],[c])}var Z1=function(e){return new Tr({style:e.displayMode?ke.DISPLAY:ke.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Q1=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=z.makeSpan(n,[e])}return e},o5=function(e,r,n){var s=Z1(n),i;if(n.output==="mathml")return ic(e,r,s,n.displayMode,!0);if(n.output==="html"){var a=ga(e,s);i=z.makeSpan(["katex"],[a])}else{var o=ic(e,r,s,n.displayMode,!1),l=ga(e,s);i=z.makeSpan(["katex"],[o,l])}return Q1(i,n)},l5=function(e,r,n){var s=Z1(n),i=ga(e,s),a=z.makeSpan(["katex"],[i]);return Q1(a,n)},c5={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":"="},u5=function(e){var r=new ee.MathNode("mo",[new ee.TextNode(c5[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},d5={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]},h5=function(e){return e.type==="ordgroup"?e.body.length:1},f5=function(e,r){function n(){var o=4e5,l=e.label.slice(1);if(be.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=e,d=h5(c.base),f,p,g;if(d>5)l==="widehat"||l==="widecheck"?(f=420,o=2364,g=.42,p=l+"4"):(f=312,o=2340,g=.34,p="tilde4");else{var b=[1,1,2,2,3,3][d];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][b],f=[0,239,300,360,420][b],g=[0,.24,.3,.3,.36,.42][b],p=l+b):(o=[0,600,1033,2339,2340][b],f=[0,260,286,306,312][b],g=[0,.26,.286,.3,.306,.34][b],p="tilde"+b)}var y=new Jr(p),w=new _r([y],{width:"100%",height:ae(g),viewBox:"0 0 "+o+" "+f,preserveAspectRatio:"none"});return{span:z.makeSvgSpan([],[w],r),minWidth:0,height:g}}else{var M=[],S=d5[l],[E,D,I]=S,O=I/1e3,$=E.length,K,G;if($===1){var pe=S[3];K=["hide-tail"],G=[pe]}else if($===2)K=["halfarrow-left","halfarrow-right"],G=["xMinYMin","xMaxYMin"];else if($===3)K=["brace-left","brace-center","brace-right"],G=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+$+" children.");for(var ye=0;ye<$;ye++){var Ee=new Jr(E[ye]),Ge=new _r([Ee],{width:"400em",height:ae(O),viewBox:"0 0 "+o+" "+I,preserveAspectRatio:G[ye]+" slice"}),qe=z.makeSvgSpan([K[ye]],[Ge],r);if($===1)return{span:qe,minWidth:D,height:O};qe.style.height=ae(O),M.push(qe)}return{span:z.makeSpan(["stretchy"],M,r),minWidth:D,height:O}}}var{span:s,minWidth:i,height:a}=n();return s.height=a,s.style.height=ae(a),i>0&&(s.style.minWidth=ae(i)),s},p5=function(e,r,n,s,i){var a,o=e.height+e.depth+n+s;if(/fbox|color|angl/.test(r)){if(a=z.makeSpan(["stretchy",r],[],i),r==="fbox"){var l=i.color&&i.getColor();l&&(a.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new fa({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new fa({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new _r(c,{width:"100%",height:ae(o)});a=z.makeSvgSpan([],[d],i)}return a.height=o,a.style.height=ae(o),a},Lr={encloseSpan:p5,mathMLnode:u5,svgSpan:f5};function De(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 wo(t){var e=ti(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 ti(t){return t&&(t.type==="atom"||B6.hasOwnProperty(t.type))?t:null}var xo=(t,e)=>{var r,n,s;t&&t.type==="supsub"?(n=De(t.base,"accent"),r=n.base,t.base=r,s=$6(Le(t,e)),t.base=n):(n=De(t,"accent"),r=n.base);var i=Le(r,e.havingCrampedStyle()),a=n.isShifty&&be.isCharacterBox(r),o=0;if(a){var l=be.getBaseElem(r),c=Le(l,e.havingCrampedStyle());o=Zl(c).skew}var d=n.label==="\\c",f=d?i.height+i.depth:Math.min(i.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=Lr.svgSpan(n,e),p=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ae(2*o)+")",marginLeft:ae(2*o)}:void 0}]},e);else{var g,b;n.label==="\\vec"?(g=z.staticSvg("vec",e),b=z.svgData.vec[1]):(g=z.makeOrd({mode:n.mode,text:n.label},e,"textord"),g=Zl(g),g.italic=0,b=g.width,d&&(f+=g.depth)),p=z.makeSpan(["accent-body"],[g]);var y=n.label==="\\textcircled";y&&(p.classes.push("accent-full"),f=i.height);var w=o;y||(w-=b/2),p.style.left=ae(w),n.label==="\\textcircled"&&(p.style.top=".2em"),p=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]},e)}var M=z.makeSpan(["mord","accent"],[p],e);return s?(s.children[0]=M,s.height=Math.max(M.height,s.height),s.classes[0]="mord",s):M},ed=(t,e)=>{var r=t.isStretchy?Lr.mathMLnode(t.label):new ee.MathNode("mo",[Xt(t.label,t.mode)]),n=new ee.MathNode("mover",[We(t.base,e),r]);return n.setAttribute("accent","true"),n},m5=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));ce({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 r=Rs(e[0]),n=!m5.test(t.funcName),s=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:s,base:r}},htmlBuilder:xo,mathmlBuilder:ed});ce({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:xo,mathmlBuilder:ed});ce({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:s}},htmlBuilder:(t,e)=>{var r=Le(t.base,e),n=Lr.svgSpan(t,e),s=t.label==="\\utilde"?.12:0,i=z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:r}]},e);return z.makeSpan(["mord","accentunder"],[i],e)},mathmlBuilder:(t,e)=>{var r=Lr.mathMLnode(t.label),n=new ee.MathNode("munder",[We(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});var V0=t=>{var e=new ee.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};ce({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,r){var{parser:n,funcName:s}=t;return{type:"xArrow",mode:n.mode,label:s,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),s=z.wrapFragment(Le(t.body,n,e),e),i=t.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var a;t.below&&(n=e.havingStyle(r.sub()),a=z.wrapFragment(Le(t.below,n,e),e),a.classes.push(i+"-arrow-pad"));var o=Lr.svgSpan(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,c=-e.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||t.label==="\\xleftequilibrium")&&(c-=s.depth);var d;if(a){var f=-e.fontMetrics().axisHeight+a.height+.5*o.height+.111;d=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:c},{type:"elem",elem:o,shift:l},{type:"elem",elem:a,shift:f}]},e)}else d=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:c},{type:"elem",elem:o,shift:l}]},e);return d.children[0].children[0].children[1].classes.push("svg-align"),z.makeSpan(["mrel","x-arrow"],[d],e)},mathmlBuilder(t,e){var r=Lr.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var s=V0(We(t.body,e));if(t.below){var i=V0(We(t.below,e));n=new ee.MathNode("munderover",[r,i,s])}else n=new ee.MathNode("mover",[r,s])}else if(t.below){var a=V0(We(t.below,e));n=new ee.MathNode("munder",[r,a])}else n=V0(),n=new ee.MathNode("mover",[r,n]);return n}});var g5=z.makeSpan;function td(t,e){var r=ft(t.body,e,!0);return g5([t.mclass],r,e)}function rd(t,e){var r,n=zt(t.body,e);return t.mclass==="minner"?r=new ee.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new ee.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new ee.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ce({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,s=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:at(s),isCharacterBox:be.isCharacterBox(s)}},htmlBuilder:td,mathmlBuilder:rd});var ri=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"};ce({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:ri(e[0]),body:at(e[1]),isCharacterBox:be.isCharacterBox(e[1])}}});ce({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,s=e[1],i=e[0],a;n!=="\\stackrel"?a=ri(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:at(s)},l={type:"supsub",mode:i.mode,base:o,sup:n==="\\underset"?null:i,sub:n==="\\underset"?i:null};return{type:"mclass",mode:r.mode,mclass:a,body:[l],isCharacterBox:be.isCharacterBox(l)}},htmlBuilder:td,mathmlBuilder:rd});ce({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:ri(e[0]),body:at(e[0])}},htmlBuilder(t,e){var r=ft(t.body,e,!0),n=z.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=zt(t.body,e),n=new ee.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var v5={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ac=()=>({type:"styling",body:[],mode:"math",style:"display"}),oc=t=>t.type==="textord"&&t.text==="@",b5=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function y5(t,e,r){var n=v5[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var s=r.callFunction("\\\\cdleft",[e[0]],[]),i={type:"atom",text:n,mode:"math",family:"rel"},a=r.callFunction("\\Big",[i],[]),o=r.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[s,a,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function w5(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 r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new re("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],s=[n],i=0;i-1))if("<>AV".indexOf(c)>-1)for(var f=0;f<2;f++){for(var p=!0,g=l+1;gAV=|." after @',a[l]);var b=y5(c,d,t),y={type:"styling",body:[b],mode:"math",style:"display"};n.push(y),o=ac()}i%2===0?n.push(o):n.shift(),n=[],s.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var w=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:w,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}ce({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=z.wrapFragment(Le(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=ae(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new ee.MathNode("mrow",[We(t.label,e)]);return r=new ee.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new ee.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});ce({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=z.wrapFragment(Le(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new ee.MathNode("mrow",[We(t.fragment,e)])}});ce({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=De(e[0],"ordgroup"),s=n.body,i="",a=0;a=1114111)throw new re("\\@char with invalid code point "+i);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:c}}});var nd=(t,e)=>{var r=ft(t.body,e.withColor(t.color),!1);return z.makeFragment(r)},sd=(t,e)=>{var r=zt(t.body,e.withColor(t.color)),n=new ee.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n};ce({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=De(e[0],"color-token").color,s=e[1];return{type:"color",mode:r.mode,color:n,body:at(s)}},htmlBuilder:nd,mathmlBuilder:sd});ce({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,s=De(e[0],"color-token").color;r.gullet.macros.set("\\current@color",s);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:s,body:i}},htmlBuilder:nd,mathmlBuilder:sd});ce({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,s=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:s&&De(s,"size").value}},htmlBuilder(t,e){var r=z.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=ae(tt(t.size,e)))),r},mathmlBuilder(t,e){var r=new ee.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",ae(tt(t.size,e)))),r}});var va={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},id=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new re("Expected a control sequence",t);return e},x5=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},ad=(t,e,r,n)=>{var s=t.gullet.macros.get(r.text);s==null&&(r.noexpand=!0,s={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,s,n)};ce({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(va[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=va[n.text]),De(e.parseFunction(),"internal");throw new re("Invalid token after macro prefix",n)}});ce({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),s=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new re("Expected a control sequence",n);for(var i=0,a,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){a=e.gullet.future(),o[i].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new re('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new re('Argument number "'+n.text+'" out of order');i++,o.push([])}else{if(n.text==="EOF")throw new re("Expected a macro definition");o[i].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return a&&l.unshift(a),(r==="\\edef"||r==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(s,{tokens:l,numArgs:i,delimiters:o},r===va[r]),{type:"internal",mode:e.mode}}});ce({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=id(e.gullet.popToken());e.gullet.consumeSpaces();var s=x5(e);return ad(e,n,s,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});ce({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=id(e.gullet.popToken()),s=e.gullet.popToken(),i=e.gullet.popToken();return ad(e,n,i,r==="\\\\globalfuture"),e.gullet.pushToken(i),e.gullet.pushToken(s),{type:"internal",mode:e.mode}}});var Zn=function(e,r,n){var s=Je.math[e]&&Je.math[e].replace,i=mo(s||e,r,n);if(!i)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return i},ko=function(e,r,n,s){var i=n.havingBaseStyle(r),a=z.makeSpan(s.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},od=function(e,r,n){var s=r.havingBaseStyle(n),i=(1-r.sizeMultiplier/s.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ae(i),e.height-=i,e.depth+=i},k5=function(e,r,n,s,i,a){var o=z.makeSymbol(e,"Main-Regular",i,s),l=ko(o,r,s,a);return n&&od(l,s,r),l},S5=function(e,r,n,s){return z.makeSymbol(e,"Size"+r+"-Regular",n,s)},ld=function(e,r,n,s,i,a){var o=S5(e,r,i,s),l=ko(z.makeSpan(["delimsizing","size"+r],[o],s),ke.TEXT,s,a);return n&&od(l,s,ke.TEXT),l},Ni=function(e,r,n){var s;r==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=z.makeSpan(["delimsizinginner",s],[z.makeSpan([],[z.makeSymbol(e,r,n)])]);return{type:"elem",elem:i}},Di=function(e,r,n){var s=fr["Size4-Regular"][e.charCodeAt(0)]?fr["Size4-Regular"][e.charCodeAt(0)][4]:fr["Size1-Regular"][e.charCodeAt(0)][4],i=new Jr("inner",M6(e,Math.round(1e3*r))),a=new _r([i],{width:ae(s),height:ae(r),style:"width:"+ae(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=z.makeSvgSpan([],[a],n);return o.height=r,o.style.height=ae(r),o.style.width=ae(s),{type:"elem",elem:o}},ba=.008,W0={type:"kern",size:-1*ba},T5=["|","\\lvert","\\rvert","\\vert"],E5=["\\|","\\lVert","\\rVert","\\Vert"],cd=function(e,r,n,s,i,a){var o,l,c,d,f="",p=0;o=c=d=e,l=null;var g="Size1-Regular";e==="\\uparrow"?c=d="⏐":e==="\\Uparrow"?c=d="‖":e==="\\downarrow"?o=c="⏐":e==="\\Downarrow"?o=c="‖":e==="\\updownarrow"?(o="\\uparrow",c="⏐",d="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",c="‖",d="\\Downarrow"):be.contains(T5,e)?(c="∣",f="vert",p=333):be.contains(E5,e)?(c="∥",f="doublevert",p=556):e==="["||e==="\\lbrack"?(o="⎡",c="⎢",d="⎣",g="Size4-Regular",f="lbrack",p=667):e==="]"||e==="\\rbrack"?(o="⎤",c="⎥",d="⎦",g="Size4-Regular",f="rbrack",p=667):e==="\\lfloor"||e==="⌊"?(c=o="⎢",d="⎣",g="Size4-Regular",f="lfloor",p=667):e==="\\lceil"||e==="⌈"?(o="⎡",c=d="⎢",g="Size4-Regular",f="lceil",p=667):e==="\\rfloor"||e==="⌋"?(c=o="⎥",d="⎦",g="Size4-Regular",f="rfloor",p=667):e==="\\rceil"||e==="⌉"?(o="⎤",c=d="⎥",g="Size4-Regular",f="rceil",p=667):e==="("||e==="\\lparen"?(o="⎛",c="⎜",d="⎝",g="Size4-Regular",f="lparen",p=875):e===")"||e==="\\rparen"?(o="⎞",c="⎟",d="⎠",g="Size4-Regular",f="rparen",p=875):e==="\\{"||e==="\\lbrace"?(o="⎧",l="⎨",d="⎩",c="⎪",g="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="⎫",l="⎬",d="⎭",c="⎪",g="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(o="⎧",d="⎩",c="⎪",g="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(o="⎫",d="⎭",c="⎪",g="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(o="⎧",d="⎭",c="⎪",g="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(o="⎫",d="⎩",c="⎪",g="Size4-Regular");var b=Zn(o,g,i),y=b.height+b.depth,w=Zn(c,g,i),M=w.height+w.depth,S=Zn(d,g,i),E=S.height+S.depth,D=0,I=1;if(l!==null){var O=Zn(l,g,i);D=O.height+O.depth,I=2}var $=y+E+D,K=Math.max(0,Math.ceil((r-$)/(I*M))),G=$+K*I*M,pe=s.fontMetrics().axisHeight;n&&(pe*=s.sizeMultiplier);var ye=G/2-pe,Ee=[];if(f.length>0){var Ge=G-y-E,qe=Math.round(G*1e3),st=N6(f,Math.round(Ge*1e3)),_e=new Jr(f,st),Ce=(p/1e3).toFixed(3)+"em",ve=(qe/1e3).toFixed(3)+"em",Ke=new _r([_e],{width:Ce,height:ve,viewBox:"0 0 "+p+" "+qe}),Ze=z.makeSvgSpan([],[Ke],s);Ze.height=qe/1e3,Ze.style.width=Ce,Ze.style.height=ve,Ee.push({type:"elem",elem:Ze})}else{if(Ee.push(Ni(d,g,i)),Ee.push(W0),l===null){var Ye=G-y-E+2*ba;Ee.push(Di(c,Ye,s))}else{var me=(G-y-E-D)/2+2*ba;Ee.push(Di(c,me,s)),Ee.push(W0),Ee.push(Ni(l,g,i)),Ee.push(W0),Ee.push(Di(c,me,s))}Ee.push(W0),Ee.push(Ni(o,g,i))}var St=s.havingBaseStyle(ke.TEXT),ot=z.makeVList({positionType:"bottom",positionData:ye,children:Ee},St);return ko(z.makeSpan(["delimsizing","mult"],[ot],St),ke.TEXT,s,a)},Ri=80,Ii=.08,_i=function(e,r,n,s,i){var a=C6(e,s,n),o=new Jr(e,a),l=new _r([o],{width:"400em",height:ae(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return z.makeSvgSpan(["hide-tail"],[l],i)},A5=function(e,r){var n=r.havingBaseSizing(),s=fd("\\surd",e*n.sizeMultiplier,hd,n),i=n.sizeMultiplier,a=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l=0,c=0,d=0,f;return s.type==="small"?(d=1e3+1e3*a+Ri,e<1?i=1:e<1.4&&(i=.7),l=(1+a+Ii)/i,c=(1+a)/i,o=_i("sqrtMain",l,d,a,r),o.style.minWidth="0.853em",f=.833/i):s.type==="large"?(d=(1e3+Ri)*l0[s.size],c=(l0[s.size]+a)/i,l=(l0[s.size]+a+Ii)/i,o=_i("sqrtSize"+s.size,l,d,a,r),o.style.minWidth="1.02em",f=1/i):(l=e+a+Ii,c=e+a,d=Math.floor(1e3*e+a)+Ri,o=_i("sqrtTall",l,d,a,r),o.style.minWidth="0.742em",f=1.056),o.height=c,o.style.height=ae(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+a)*i}},ud=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],C5=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],dd=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],l0=[0,1.2,1.8,2.4,3],M5=function(e,r,n,s,i){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),be.contains(ud,e)||be.contains(dd,e))return ld(e,r,!1,n,s,i);if(be.contains(C5,e))return cd(e,l0[r],!1,n,s,i);throw new re("Illegal delimiter: '"+e+"'")},N5=[{type:"small",style:ke.SCRIPTSCRIPT},{type:"small",style:ke.SCRIPT},{type:"small",style:ke.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],D5=[{type:"small",style:ke.SCRIPTSCRIPT},{type:"small",style:ke.SCRIPT},{type:"small",style:ke.TEXT},{type:"stack"}],hd=[{type:"small",style:ke.SCRIPTSCRIPT},{type:"small",style:ke.SCRIPT},{type:"small",style:ke.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],R5=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.")},fd=function(e,r,n,s){for(var i=Math.min(2,3-s.style.size),a=i;ar)return n[a]}return n[n.length-1]},pd=function(e,r,n,s,i,a){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var o;be.contains(dd,e)?o=N5:be.contains(ud,e)?o=hd:o=D5;var l=fd(e,r,o,s);return l.type==="small"?k5(e,l.style,n,s,i,a):l.type==="large"?ld(e,l.size,n,s,i,a):cd(e,r,n,s,i,a)},I5=function(e,r,n,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,l=901,c=5/s.fontMetrics().ptPerEm,d=Math.max(r-o,n+o),f=Math.max(d/500*l,2*d-c);return pd(e,f,!0,s,i,a)},Dr={sqrtImage:A5,sizedDelim:M5,sizeToMaxHeight:l0,customSizedDelim:pd,leftRightDelim:I5},lc={"\\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}},_5=["(","\\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 ni(t,e){var r=ti(t);if(r&&be.contains(_5,r.text))return r;throw r?new re("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new re("Invalid delimiter type '"+t.type+"'",t)}ce({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 r=ni(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:lc[t.funcName].size,mclass:lc[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?z.makeSpan([t.mclass]):Dr.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(Xt(t.delim,t.mode));var r=new ee.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=ae(Dr.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function cc(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ce({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new re("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:ni(e[0],t).text,color:r}}});ce({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=ni(e[0],t),n=t.parser;++n.leftrightDepth;var s=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=De(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:s,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(t,e)=>{cc(t);for(var r=ft(t.body,e,!0,["mopen","mclose"]),n=0,s=0,i=!1,a=0;a{cc(t);var r=zt(t.body,e);if(t.left!=="."){var n=new ee.MathNode("mo",[Xt(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var s=new ee.MathNode("mo",[Xt(t.right,t.mode)]);s.setAttribute("fence","true"),t.rightColor&&s.setAttribute("mathcolor",t.rightColor),r.push(s)}return bo(r)}});ce({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=ni(e[0],t);if(!t.parser.leftrightDepth)throw new re("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if(t.delim===".")r=g0(e,[]);else{r=Dr.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?Xt("|","text"):Xt(t.delim,t.mode),n=new ee.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var So=(t,e)=>{var r=z.wrapFragment(Le(t.body,e),e),n=t.label.slice(1),s=e.sizeMultiplier,i,a=0,o=be.isCharacterBox(t.body);if(n==="sout")i=z.makeSpan(["stretchy","sout"]),i.height=e.fontMetrics().defaultRuleThickness/s,a=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=tt({number:.6,unit:"pt"},e),c=tt({number:.35,unit:"ex"},e),d=e.havingBaseSizing();s=s/d.sizeMultiplier;var f=r.height+r.depth+l+c;r.style.paddingLeft=ae(f/2+l);var p=Math.floor(1e3*f*s),g=E6(p),b=new _r([new Jr("phase",g)],{width:"400em",height:ae(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=z.makeSvgSpan(["hide-tail"],[b],e),i.style.height=ae(f),a=r.depth+l+c}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var y=0,w=0,M=0;/box/.test(n)?(M=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),y=e.fontMetrics().fboxsep+(n==="colorbox"?0:M),w=y):n==="angl"?(M=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),y=4*M,w=Math.max(0,.25-r.depth)):(y=o?.2:0,w=y),i=Lr.encloseSpan(r,n,y,w,e),/fbox|boxed|fcolorbox/.test(n)?(i.style.borderStyle="solid",i.style.borderWidth=ae(M)):n==="angl"&&M!==.049&&(i.style.borderTopWidth=ae(M),i.style.borderRightWidth=ae(M)),a=r.depth+w,t.backgroundColor&&(i.style.backgroundColor=t.backgroundColor,t.borderColor&&(i.style.borderColor=t.borderColor))}var S;if(t.backgroundColor)S=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:r,shift:0}]},e);else{var E=/cancel|phase/.test(n)?["svg-align"]:[];S=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:E}]},e)}return/cancel/.test(n)&&(S.height=r.height,S.depth=r.depth),/cancel/.test(n)&&!o?z.makeSpan(["mord","cancel-lap"],[S],e):z.makeSpan(["mord"],[S],e)},To=(t,e)=>{var r=0,n=new ee.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[We(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var s=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+s+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};ce({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:s}=t,i=De(e[0],"color-token").color,a=e[1];return{type:"enclose",mode:n.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:So,mathmlBuilder:To});ce({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:s}=t,i=De(e[0],"color-token").color,a=De(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:So,mathmlBuilder:To});ce({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});ce({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,s=e[0];return{type:"enclose",mode:r.mode,label:n,body:s}},htmlBuilder:So,mathmlBuilder:To});ce({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});var md={};function gr(t){for(var{type:e,names:r,props:n,handler:s,htmlBuilder:i,mathmlBuilder:a}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},l=0;l{var e=t.parser.settings;if(!e.displayMode)throw new re("{"+t.envName+"} can be used only in display mode.")};function Eo(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function nn(t,e,r){var{hskipBeforeAndAfter:n,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:f,leqno:p}=e;if(t.gullet.beginGroup(),c||t.gullet.macros.set("\\cr","\\\\\\relax"),!a){var g=t.gullet.expandMacroAsText("\\arraystretch");if(g==null)a=1;else if(a=parseFloat(g),!a||a<0)throw new re("Invalid \\arraystretch: "+g)}t.gullet.beginGroup();var b=[],y=[b],w=[],M=[],S=l!=null?[]:void 0;function E(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function D(){S&&(t.gullet.macros.get("\\df@tag")?(S.push(t.subparse([new Kt("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):S.push(!!l&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(E(),M.push(uc(t));;){var I=t.parseExpression(!1,c?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),I={type:"ordgroup",mode:t.mode,body:I},r&&(I={type:"styling",mode:t.mode,style:r,body:[I]}),b.push(I);var O=t.fetch().text;if(O==="&"){if(f&&b.length===f){if(c||o)throw new re("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(O==="\\end"){D(),b.length===1&&I.type==="styling"&&I.body[0].body.length===0&&(y.length>1||!d)&&y.pop(),M.length0&&(E+=.25),c.push({pos:E,isDashed:j[te]})}for(D(a[0]),n=0;n0&&(ye+=S,$j))for(n=0;n=o)){var lt=void 0;(s>0||e.hskipBeforeAndAfter)&&(lt=be.deflt(me.pregap,p),lt!==0&&(st=z.makeSpan(["arraycolsep"],[]),st.style.width=ae(lt),qe.push(st)));var U=[];for(n=0;n0){for(var we=z.makeLineSpan("hline",r,d),x=z.makeLineSpan("hdashline",r,d),N=[{type:"elem",elem:l,shift:0}];c.length>0;){var L=c.pop(),H=L.pos-Ee;L.isDashed?N.push({type:"elem",elem:x,shift:H}):N.push({type:"elem",elem:we,shift:H})}l=z.makeVList({positionType:"individualShift",children:N},r)}if(Ce.length===0)return z.makeSpan(["mord"],[l],r);var B=z.makeVList({positionType:"individualShift",children:Ce},r);return B=z.makeSpan(["tag"],[B],r),z.makeFragment([l,B])},O5={c:"center ",l:"left ",r:"right "},br=function(e,r){for(var n=[],s=new ee.MathNode("mtd",[],["mtr-glue"]),i=new ee.MathNode("mtd",[],["mml-eqn-num"]),a=0;a0){var b=e.cols,y="",w=!1,M=0,S=b.length;b[0].type==="separator"&&(p+="top ",M=1),b[b.length-1].type==="separator"&&(p+="bottom ",S-=1);for(var E=M;E0?"left ":"",p+=K[K.length-1].length>0?"right ":"";for(var G=1;G-1?"alignat":"align",i=e.envName==="split",a=nn(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:Eo(e.envName),emptySingleRow:!0,colSeparationType:s,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),o,l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var d="",f=0;f0&&g&&(w=1),n[b]={type:"align",align:y,pregap:w,postgap:0}}return a.colSeparationType=g?"align":"alignat",a};gr({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=ti(e[0]),n=r?[e[0]]:De(e[0],"ordgroup").body,s=n.map(function(a){var o=wo(a),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new re("Unknown column alignment: "+l,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return nn(t.parser,i,Ao(t.envName))},htmlBuilder:vr,mathmlBuilder:br});gr({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("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var s=t.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),r=s.fetch().text,"lcr".indexOf(r)===-1)throw new re("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),n.cols=[{type:"align",align:r}]}}var i=nn(t.parser,n,Ao(t.envName)),a=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(a).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=nn(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=ti(e[0]),n=r?[e[0]]:De(e[0],"ordgroup").body,s=n.map(function(a){var o=wo(a),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new re("Unknown column alignment: "+l,a)});if(s.length>1)throw new re("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5};if(i=nn(t.parser,i,"script"),i.body.length>0&&i.body[0].length>1)throw new re("{subarray} can contain only one column");return i},htmlBuilder:vr,mathmlBuilder:br});gr({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}]},r=nn(t.parser,e,Ao(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:vd,htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){be.contains(["gather","gather*"],t.envName)&&si(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Eo(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return nn(t.parser,e,"display")},htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:vd,htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){si(t);var e={autoTag:Eo(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return nn(t.parser,e,"display")},htmlBuilder:vr,mathmlBuilder:br});gr({type:"array",names:["CD"],props:{numArgs:0},handler(t){return si(t),w5(t.parser)},htmlBuilder:vr,mathmlBuilder:br});v("\\nonumber","\\gdef\\@eqnsw{0}");v("\\notag","\\nonumber");ce({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new re(t.funcName+" valid only within array environment")}});var dc=md;ce({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,s=e[0];if(s.type!=="ordgroup")throw new re("Invalid environment name",s);for(var i="",a=0;a{var r=t.font,n=e.withFont(r);return Le(t.body,n)},yd=(t,e)=>{var r=t.font,n=e.withFont(r);return We(t.body,n)},hc={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ce({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:r,funcName:n}=t,s=Rs(e[0]),i=n;return i in hc&&(i=hc[i]),{type:"font",mode:r.mode,font:i.slice(1),body:s}},htmlBuilder:bd,mathmlBuilder:yd});ce({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0],s=be.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:ri(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:s}}});ce({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:s}=t,{mode:i}=r,a=r.parseExpression(!0,s),o="math"+n.slice(1);return{type:"font",mode:i,font:o,body:{type:"ordgroup",mode:r.mode,body:a}}},htmlBuilder:bd,mathmlBuilder:yd});var wd=(t,e)=>{var r=e;return t==="display"?r=r.id>=ke.SCRIPT.id?r.text():ke.DISPLAY:t==="text"&&r.size===ke.DISPLAY.size?r=ke.TEXT:t==="script"?r=ke.SCRIPT:t==="scriptscript"&&(r=ke.SCRIPTSCRIPT),r},Co=(t,e)=>{var r=wd(t.size,e.style),n=r.fracNum(),s=r.fracDen(),i;i=e.havingStyle(n);var a=Le(t.numer,i,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;a.height=a.height0?b=3*p:b=7*p,y=e.fontMetrics().denom1):(f>0?(g=e.fontMetrics().num2,b=p):(g=e.fontMetrics().num3,b=3*p),y=e.fontMetrics().denom2);var w;if(d){var S=e.fontMetrics().axisHeight;g-a.depth-(S+.5*f){var r=new ee.MathNode("mfrac",[We(t.numer,e),We(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=tt(t.barSize,e);r.setAttribute("linethickness",ae(n))}var s=wd(t.size,e.style);if(s.size!==e.style.size){r=new ee.MathNode("mstyle",[r]);var i=s.size===ke.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var a=[];if(t.leftDelim!=null){var o=new ee.MathNode("mo",[new ee.TextNode(t.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}if(a.push(r),t.rightDelim!=null){var l=new ee.MathNode("mo",[new ee.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return bo(a)}return r};ce({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0],i=e[1],a,o=null,l=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:s,denom:i,hasBarLine:a,leftDelim:o,rightDelim:l,size:c,barSize:null}},htmlBuilder:Co,mathmlBuilder:Mo});ce({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0],i=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:s,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});ce({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,s;switch(r){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:s,token:n}}});var fc=["display","text","script","scriptscript"],pc=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};ce({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],s=e[5],i=Rs(e[0]),a=i.type==="atom"&&i.family==="open"?pc(i.text):null,o=Rs(e[1]),l=o.type==="atom"&&o.family==="close"?pc(o.text):null,c=De(e[2],"size"),d,f=null;c.isBlank?d=!0:(f=c.value,d=f.number>0);var p="auto",g=e[3];if(g.type==="ordgroup"){if(g.body.length>0){var b=De(g.body[0],"textord");p=fc[Number(b.text)]}}else g=De(g,"textord"),p=fc[Number(g.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:s,continued:!1,hasBarLine:d,barSize:f,leftDelim:a,rightDelim:l,size:p}},htmlBuilder:Co,mathmlBuilder:Mo});ce({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:s}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:De(e[0],"size").value,token:s}}});ce({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0],i=u6(De(e[1],"infix").size),a=e[2],o=i.number>0;return{type:"genfrac",mode:r.mode,numer:s,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Co,mathmlBuilder:Mo});var xd=(t,e)=>{var r=e.style,n,s;t.type==="supsub"?(n=t.sup?Le(t.sup,e.havingStyle(r.sup()),e):Le(t.sub,e.havingStyle(r.sub()),e),s=De(t.base,"horizBrace")):s=De(t,"horizBrace");var i=Le(s.base,e.havingBaseStyle(ke.DISPLAY)),a=Lr.svgSpan(s,e),o;if(s.isOver?(o=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a}]},e),o.children[0].children[0].children[1].classes.push("svg-align")):(o=z.makeVList({positionType:"bottom",positionData:i.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:i}]},e),o.children[0].children[0].children[0].classes.push("svg-align")),n){var l=z.makeSpan(["mord",s.isOver?"mover":"munder"],[o],e);s.isOver?o=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):o=z.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return z.makeSpan(["mord",s.isOver?"mover":"munder"],[o],e)},L5=(t,e)=>{var r=Lr.mathMLnode(t.label);return new ee.MathNode(t.isOver?"mover":"munder",[We(t.base,e),r])};ce({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:xd,mathmlBuilder:L5});ce({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],s=De(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:r.mode,href:s,body:at(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=ft(t.body,e,!1);return z.makeAnchor(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=Zr(t.body,e);return r instanceof Pt||(r=new Pt("mrow",[r])),r.setAttribute("href",t.href),r}});ce({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=De(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var s=[],i=0;i{var{parser:r,funcName:n,token:s}=t,i=De(e[0],"raw").string,a=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var c=i.split(","),d=0;d{var r=ft(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var s=z.makeSpan(n,r,e);for(var i in t.attributes)i!=="class"&&t.attributes.hasOwnProperty(i)&&s.setAttribute(i,t.attributes[i]);return s},mathmlBuilder:(t,e)=>Zr(t.body,e)});ce({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:at(e[0]),mathml:at(e[1])}},htmlBuilder:(t,e)=>{var r=ft(t.html,e,!1);return z.makeFragment(r)},mathmlBuilder:(t,e)=>Zr(t.mathml,e)});var Oi=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new re("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!P1(n))throw new re("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};ce({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,s={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(r[0])for(var l=De(r[0],"raw").string,c=l.split(","),d=0;d{var r=tt(t.height,e),n=0;t.totalheight.number>0&&(n=tt(t.totalheight,e)-r);var s=0;t.width.number>0&&(s=tt(t.width,e));var i={height:ae(r+n)};s>0&&(i.width=ae(s)),n>0&&(i.verticalAlign=ae(-n));var a=new L6(t.src,t.alt,i);return a.height=r,a.depth=n,a},mathmlBuilder:(t,e)=>{var r=new ee.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=tt(t.height,e),s=0;if(t.totalheight.number>0&&(s=tt(t.totalheight,e)-n,r.setAttribute("valign",ae(-s))),r.setAttribute("height",ae(n+s)),t.width.number>0){var i=tt(t.width,e);r.setAttribute("width",ae(i))}return r.setAttribute("src",t.src),r}});ce({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,s=De(e[0],"size");if(r.settings.strict){var i=n[1]==="m",a=s.value.unit==="mu";i?(a||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+s.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):a&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:s.value}},htmlBuilder(t,e){return z.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=tt(t.dimension,e);return new ee.SpaceNode(r)}});ce({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:s}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=z.makeSpan([],[Le(t.body,e)]),r=z.makeSpan(["inner"],[r],e)):r=z.makeSpan(["inner"],[Le(t.body,e)]);var n=z.makeSpan(["fix"],[]),s=z.makeSpan([t.alignment],[r,n],e),i=z.makeSpan(["strut"]);return i.style.height=ae(s.height+s.depth),s.depth&&(i.style.verticalAlign=ae(-s.depth)),s.children.unshift(i),s=z.makeSpan(["thinbox"],[s],e),z.makeSpan(["mord","vbox"],[s],e)},mathmlBuilder:(t,e)=>{var r=new ee.MathNode("mpadded",[We(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});ce({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,s=n.mode;n.switchMode("math");var i=r==="\\("?"\\)":"$",a=n.parseExpression(!1,i);return n.expect(i),n.switchMode(s),{type:"styling",mode:n.mode,style:"text",body:a}}});ce({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new re("Mismatched "+t.funcName)}});var mc=(t,e)=>{switch(e.style.size){case ke.DISPLAY.size:return t.display;case ke.TEXT.size:return t.text;case ke.SCRIPT.size:return t.script;case ke.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};ce({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:at(e[0]),text:at(e[1]),script:at(e[2]),scriptscript:at(e[3])}},htmlBuilder:(t,e)=>{var r=mc(t,e),n=ft(r,e,!1);return z.makeFragment(n)},mathmlBuilder:(t,e)=>{var r=mc(t,e);return Zr(r,e)}});var kd=(t,e,r,n,s,i,a)=>{t=z.makeSpan([],[t]);var o=r&&be.isCharacterBox(r),l,c;if(e){var d=Le(e,n.havingStyle(s.sup()),n);c={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(r){var f=Le(r,n.havingStyle(s.sub()),n);l={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var p;if(c&&l){var g=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+a;p=z.makeVList({positionType:"bottom",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ae(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ae(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var b=t.height-a;p=z.makeVList({positionType:"top",positionData:b,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ae(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else if(c){var y=t.depth+a;p=z.makeVList({positionType:"bottom",positionData:y,children:[{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ae(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var w=[p];if(l&&i!==0&&!o){var M=z.makeSpan(["mspace"],[],n);M.style.marginRight=ae(i),w.unshift(M)}return z.makeSpan(["mop","op-limits"],w,n)},Sd=["\\smallint"],qn=(t,e)=>{var r,n,s=!1,i;t.type==="supsub"?(r=t.sup,n=t.sub,i=De(t.base,"op"),s=!0):i=De(t,"op");var a=e.style,o=!1;a.size===ke.DISPLAY.size&&i.symbol&&!be.contains(Sd,i.name)&&(o=!0);var l;if(i.symbol){var c=o?"Size2-Regular":"Size1-Regular",d="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(d=i.name.slice(1),i.name=d==="oiint"?"\\iint":"\\iiint"),l=z.makeSymbol(i.name,c,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),d.length>0){var f=l.italic,p=z.staticSvg(d+"Size"+(o?"2":"1"),e);l=z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:o?.08:0}]},e),i.name="\\"+d,l.classes.unshift("mop"),l.italic=f}}else if(i.body){var g=ft(i.body,e,!0);g.length===1&&g[0]instanceof Yt?(l=g[0],l.classes[0]="mop"):l=z.makeSpan(["mop"],g,e)}else{for(var b=[],y=1;y{var r;if(t.symbol)r=new Pt("mo",[Xt(t.name,t.mode)]),be.contains(Sd,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new Pt("mo",zt(t.body,e));else{r=new Pt("mi",[new pr(t.name.slice(1))]);var n=new Pt("mo",[Xt("⁡","text")]);t.parentIsSupSub?r=new Pt("mrow",[r,n]):r=J1([r,n])}return r},z5={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ce({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:r,funcName:n}=t,s=n;return s.length===1&&(s=z5[s]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:qn,mathmlBuilder:C0});ce({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:at(n)}},htmlBuilder:qn,mathmlBuilder:C0});var $5={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ce({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:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:qn,mathmlBuilder:C0});ce({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:qn,mathmlBuilder:C0});ce({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=$5[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:qn,mathmlBuilder:C0});var Td=(t,e)=>{var r,n,s=!1,i;t.type==="supsub"?(r=t.sup,n=t.sub,i=De(t.base,"operatorname"),s=!0):i=De(t,"operatorname");var a;if(i.body.length>0){for(var o=i.body.map(f=>{var p=f.text;return typeof p=="string"?{type:"textord",mode:f.mode,text:p}:f}),l=ft(o,e.withFont("mathrm"),!0),c=0;c{for(var r=zt(t.body,e.withFont("mathrm")),n=!0,s=0;sd.toText()).join("");r=[new ee.TextNode(o)]}var l=new ee.MathNode("mi",r);l.setAttribute("mathvariant","normal");var c=new ee.MathNode("mo",[Xt("⁡","text")]);return t.parentIsSupSub?new ee.MathNode("mrow",[l,c]):ee.newDocumentFragment([l,c])};ce({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,s=e[0];return{type:"operatorname",mode:r.mode,body:at(s),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Td,mathmlBuilder:F5});v("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");bn({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?z.makeFragment(ft(t.body,e,!1)):z.makeSpan(["mord"],ft(t.body,e,!0),e)},mathmlBuilder(t,e){return Zr(t.body,e,!0)}});ce({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=Le(t.body,e.havingCrampedStyle()),n=z.makeLineSpan("overline-line",e),s=e.fontMetrics().defaultRuleThickness,i=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:n},{type:"kern",size:s}]},e);return z.makeSpan(["mord","overline"],[i],e)},mathmlBuilder(t,e){var r=new ee.MathNode("mo",[new ee.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new ee.MathNode("mover",[We(t.body,e),r]);return n.setAttribute("accent","true"),n}});ce({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:at(n)}},htmlBuilder:(t,e)=>{var r=ft(t.body,e.withPhantom(),!1);return z.makeFragment(r)},mathmlBuilder:(t,e)=>{var r=zt(t.body,e);return new ee.MathNode("mphantom",r)}});ce({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=z.makeSpan([],[Le(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=zt(at(t.body),e),n=new ee.MathNode("mphantom",r),s=new ee.MathNode("mpadded",[n]);return s.setAttribute("height","0px"),s.setAttribute("depth","0px"),s}});ce({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=z.makeSpan(["inner"],[Le(t.body,e.withPhantom())]),n=z.makeSpan(["fix"],[]);return z.makeSpan(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=zt(at(t.body),e),n=new ee.MathNode("mphantom",r),s=new ee.MathNode("mpadded",[n]);return s.setAttribute("width","0px"),s}});ce({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=De(e[0],"size").value,s=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:s}},htmlBuilder(t,e){var r=Le(t.body,e),n=tt(t.dy,e);return z.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new ee.MathNode("mpadded",[We(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});ce({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});ce({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,s=r[0],i=De(e[0],"size"),a=De(e[1],"size");return{type:"rule",mode:n.mode,shift:s&&De(s,"size").value,width:i.value,height:a.value}},htmlBuilder(t,e){var r=z.makeSpan(["mord","rule"],[],e),n=tt(t.width,e),s=tt(t.height,e),i=t.shift?tt(t.shift,e):0;return r.style.borderRightWidth=ae(n),r.style.borderTopWidth=ae(s),r.style.bottom=ae(i),r.width=n,r.height=s+i,r.depth=-i,r.maxFontSize=s*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=tt(t.width,e),n=tt(t.height,e),s=t.shift?tt(t.shift,e):0,i=e.color&&e.getColor()||"black",a=new ee.MathNode("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",ae(r)),a.setAttribute("height",ae(n));var o=new ee.MathNode("mpadded",[a]);return s>=0?o.setAttribute("height",ae(s)):(o.setAttribute("height",ae(s)),o.setAttribute("depth",ae(-s))),o.setAttribute("voffset",ae(s)),o}});function Ed(t,e,r){for(var n=ft(t,e,!1),s=e.sizeMultiplier/r.sizeMultiplier,i=0;i{var r=e.havingSize(t.size);return Ed(t.body,r,e)};ce({type:"sizing",names:gc,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:s}=t,i=s.parseExpression(!1,r);return{type:"sizing",mode:s.mode,size:gc.indexOf(n)+1,body:i}},htmlBuilder:B5,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=zt(t.body,r),s=new ee.MathNode("mstyle",n);return s.setAttribute("mathsize",ae(r.sizeMultiplier)),s}});ce({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,s=!1,i=!1,a=r[0]&&De(r[0],"ordgroup");if(a)for(var o="",l=0;l{var r=z.makeSpan([],[Le(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new ee.MathNode("mpadded",[We(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});ce({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,s=r[0],i=e[0];return{type:"sqrt",mode:n.mode,body:i,index:s}},htmlBuilder(t,e){var r=Le(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=z.wrapFragment(r,e);var n=e.fontMetrics(),s=n.defaultRuleThickness,i=s;e.style.idr.height+r.depth+a&&(a=(a+f-r.height-r.depth)/2);var p=l.height-r.height-a-c;r.style.paddingLeft=ae(d);var g=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:l},{type:"kern",size:c}]},e);if(t.index){var b=e.havingStyle(ke.SCRIPTSCRIPT),y=Le(t.index,b,e),w=.6*(g.height-g.depth),M=z.makeVList({positionType:"shift",positionData:-w,children:[{type:"elem",elem:y}]},e),S=z.makeSpan(["root"],[M]);return z.makeSpan(["mord","sqrt"],[S,g],e)}else return z.makeSpan(["mord","sqrt"],[g],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new ee.MathNode("mroot",[We(r,e),We(n,e)]):new ee.MathNode("msqrt",[We(r,e)])}});var vc={display:ke.DISPLAY,text:ke.TEXT,script:ke.SCRIPT,scriptscript:ke.SCRIPTSCRIPT};ce({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:s}=t,i=s.parseExpression(!0,r),a=n.slice(1,n.length-5);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(t,e){var r=vc[t.style],n=e.havingStyle(r).withFont("");return Ed(t.body,n,e)},mathmlBuilder(t,e){var r=vc[t.style],n=e.havingStyle(r),s=zt(t.body,n),i=new ee.MathNode("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[t.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var P5=function(e,r){var n=e.base;if(n)if(n.type==="op"){var s=n.limits&&(r.style.size===ke.DISPLAY.size||n.alwaysHandleSupSub);return s?qn:null}else if(n.type==="operatorname"){var i=n.alwaysHandleSupSub&&(r.style.size===ke.DISPLAY.size||n.limits);return i?Td:null}else{if(n.type==="accent")return be.isCharacterBox(n.base)?xo:null;if(n.type==="horizBrace"){var a=!e.sub;return a===n.isOver?xd:null}else return null}else return null};bn({type:"supsub",htmlBuilder(t,e){var r=P5(t,e);if(r)return r(t,e);var{base:n,sup:s,sub:i}=t,a=Le(n,e),o,l,c=e.fontMetrics(),d=0,f=0,p=n&&be.isCharacterBox(n);if(s){var g=e.havingStyle(e.style.sup());o=Le(s,g,e),p||(d=a.height-g.fontMetrics().supDrop*g.sizeMultiplier/e.sizeMultiplier)}if(i){var b=e.havingStyle(e.style.sub());l=Le(i,b,e),p||(f=a.depth+b.fontMetrics().subDrop*b.sizeMultiplier/e.sizeMultiplier)}var y;e.style===ke.DISPLAY?y=c.sup1:e.style.cramped?y=c.sup3:y=c.sup2;var w=e.sizeMultiplier,M=ae(.5/c.ptPerEm/w),S=null;if(l){var E=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(a instanceof Yt||E)&&(S=ae(-a.italic))}var D;if(o&&l){d=Math.max(d,y,o.depth+.25*c.xHeight),f=Math.max(f,c.sub2);var I=c.defaultRuleThickness,O=4*I;if(d-o.depth-(l.height-f)0&&(d+=$,f-=$)}var K=[{type:"elem",elem:l,shift:f,marginRight:M,marginLeft:S},{type:"elem",elem:o,shift:-d,marginRight:M}];D=z.makeVList({positionType:"individualShift",children:K},e)}else if(l){f=Math.max(f,c.sub1,l.height-.8*c.xHeight);var G=[{type:"elem",elem:l,marginLeft:S,marginRight:M}];D=z.makeVList({positionType:"shift",positionData:f,children:G},e)}else if(o)d=Math.max(d,y,o.depth+.25*c.xHeight),D=z.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:o,marginRight:M}]},e);else throw new Error("supsub must have either sup or sub.");var pe=ma(a,"right")||"mord";return z.makeSpan([pe],[a,z.makeSpan(["msupsub"],[D])],e)},mathmlBuilder(t,e){var r=!1,n,s;t.base&&t.base.type==="horizBrace"&&(s=!!t.sup,s===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var i=[We(t.base,e)];t.sub&&i.push(We(t.sub,e)),t.sup&&i.push(We(t.sup,e));var a;if(r)a=n?"mover":"munder";else if(t.sub)if(t.sup){var c=t.base;c&&c.type==="op"&&c.limits&&e.style===ke.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===ke.DISPLAY||c.limits)?a="munderover":a="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===ke.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===ke.DISPLAY)?a="munder":a="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===ke.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===ke.DISPLAY)?a="mover":a="msup"}return new ee.MathNode(a,i)}});bn({type:"atom",htmlBuilder(t,e){return z.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new ee.MathNode("mo",[Xt(t.text,t.mode)]);if(t.family==="bin"){var n=yo(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});var Ad={mi:"italic",mn:"normal",mtext:"normal"};bn({type:"mathord",htmlBuilder(t,e){return z.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new ee.MathNode("mi",[Xt(t.text,t.mode,e)]),n=yo(t,e)||"italic";return n!==Ad[r.type]&&r.setAttribute("mathvariant",n),r}});bn({type:"textord",htmlBuilder(t,e){return z.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=Xt(t.text,t.mode,e),n=yo(t,e)||"normal",s;return t.mode==="text"?s=new ee.MathNode("mtext",[r]):/[0-9]/.test(t.text)?s=new ee.MathNode("mn",[r]):t.text==="\\prime"?s=new ee.MathNode("mo",[r]):s=new ee.MathNode("mi",[r]),n!==Ad[s.type]&&s.setAttribute("mathvariant",n),s}});var Li={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},zi={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};bn({type:"spacing",htmlBuilder(t,e){if(zi.hasOwnProperty(t.text)){var r=zi[t.text].className||"";if(t.mode==="text"){var n=z.makeOrd(t,e,"textord");return n.classes.push(r),n}else return z.makeSpan(["mspace",r],[z.mathsym(t.text,t.mode,e)],e)}else{if(Li.hasOwnProperty(t.text))return z.makeSpan(["mspace",Li[t.text]],[],e);throw new re('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(zi.hasOwnProperty(t.text))r=new ee.MathNode("mtext",[new ee.TextNode(" ")]);else{if(Li.hasOwnProperty(t.text))return new ee.MathNode("mspace");throw new re('Unknown type of space "'+t.text+'"')}return r}});var bc=()=>{var t=new ee.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};bn({type:"tag",mathmlBuilder(t,e){var r=new ee.MathNode("mtable",[new ee.MathNode("mtr",[bc(),new ee.MathNode("mtd",[Zr(t.body,e)]),bc(),new ee.MathNode("mtd",[Zr(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});var yc={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},wc={"\\textbf":"textbf","\\textmd":"textmd"},H5={"\\textit":"textit","\\textup":"textup"},xc=(t,e)=>{var r=t.font;if(r){if(yc[r])return e.withTextFontFamily(yc[r]);if(wc[r])return e.withTextFontWeight(wc[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(H5[r])};ce({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:r,funcName:n}=t,s=e[0];return{type:"text",mode:r.mode,body:at(s),font:n}},htmlBuilder(t,e){var r=xc(t,e),n=ft(t.body,r,!0);return z.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=xc(t,e);return Zr(t.body,r)}});ce({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Le(t.body,e),n=z.makeLineSpan("underline-line",e),s=e.fontMetrics().defaultRuleThickness,i=z.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:s},{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:r}]},e);return z.makeSpan(["mord","underline"],[i],e)},mathmlBuilder(t,e){var r=new ee.MathNode("mo",[new ee.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new ee.MathNode("munder",[We(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});ce({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Le(t.body,e),n=e.fontMetrics().axisHeight,s=.5*(r.height-n-(r.depth+n));return z.makeVList({positionType:"shift",positionData:s,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new ee.MathNode("mpadded",[We(t.body,e)],["vcenter"])}});ce({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new re("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=kc(t),n=[],s=e.havingStyle(e.style.text()),i=0;it.body.replace(/ /g,t.star?"␣":" "),Vr=Y1,Cd=`[ \r ]`,q5="\\\\[a-zA-Z@]+",j5="\\\\[^\uD800-\uDFFF]",U5="("+q5+")"+Cd+"*",V5=`\\\\( |[ \r ]+ -?)[ \r ]*`,ya="[̀-ͯ]",W5=new RegExp(ya+"+$"),G5="("+Cd+"+)|"+(V5+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ya+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ya+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+U5)+("|"+j5+")");class Sc{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(G5,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new Gt("EOF",new $t(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new re("Unexpected character: '"+e[r]+"'",new Gt(e[r],new $t(this,r,r+1)));var s=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[s]===14){var i=e.indexOf(` -`,this.tokenRegex.lastIndex);return i===-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=i+1,this.lex()}return new Gt(s,new $t(this,r,this.tokenRegex.lastIndex))}}class K5{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new re("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}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,r,n){if(n===void 0&&(n=!1),n){for(var s=0;s0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}}var Y5=gd;g("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});g("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});g("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});g("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});g("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});g("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");g("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Tc={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};g("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new re("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=Tc[e.text],n==null||n>=r)throw new re("Invalid base-"+r+" digit "+e.text);for(var s;(s=Tc[t.future().text])!=null&&s{var s=t.consumeArg().tokens;if(s.length!==1)throw new re("\\newcommand's first argument must be a macro name");var i=s[0].text,a=t.isDefined(i);if(a&&!e)throw new re("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!r)throw new re("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(s=t.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var l="",c=t.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new re("Invalid number of arguments: "+l);o=parseInt(l),s=t.consumeArg().tokens}return a&&n||t.macros.set(i,{tokens:s,numArgs:o}),""};g("\\newcommand",t=>No(t,!1,!0,!1));g("\\renewcommand",t=>No(t,!0,!1,!1));g("\\providecommand",t=>No(t,!0,!0,!0));g("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});g("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});g("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Vr[r],Je.math[r],Je.text[r]),""});g("\\bgroup","{");g("\\egroup","}");g("~","\\nobreakspace");g("\\lq","`");g("\\rq","'");g("\\aa","\\r a");g("\\AA","\\r A");g("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");g("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");g("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");g("ℬ","\\mathscr{B}");g("ℰ","\\mathscr{E}");g("ℱ","\\mathscr{F}");g("ℋ","\\mathscr{H}");g("ℐ","\\mathscr{I}");g("ℒ","\\mathscr{L}");g("ℳ","\\mathscr{M}");g("ℛ","\\mathscr{R}");g("ℭ","\\mathfrak{C}");g("ℌ","\\mathfrak{H}");g("ℨ","\\mathfrak{Z}");g("\\Bbbk","\\Bbb{k}");g("·","\\cdotp");g("\\llap","\\mathllap{\\textrm{#1}}");g("\\rlap","\\mathrlap{\\textrm{#1}}");g("\\clap","\\mathclap{\\textrm{#1}}");g("\\mathstrut","\\vphantom{(}");g("\\underbar","\\underline{\\text{#1}}");g("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');g("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");g("\\ne","\\neq");g("≠","\\neq");g("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");g("∉","\\notin");g("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");g("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");g("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");g("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");g("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");g("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");g("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");g("⟂","\\perp");g("‼","\\mathclose{!\\mkern-0.8mu!}");g("∌","\\notni");g("⌜","\\ulcorner");g("⌝","\\urcorner");g("⌞","\\llcorner");g("⌟","\\lrcorner");g("©","\\copyright");g("®","\\textregistered");g("️","\\textregistered");g("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');g("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');g("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');g("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');g("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");g("⋮","\\vdots");g("\\varGamma","\\mathit{\\Gamma}");g("\\varDelta","\\mathit{\\Delta}");g("\\varTheta","\\mathit{\\Theta}");g("\\varLambda","\\mathit{\\Lambda}");g("\\varXi","\\mathit{\\Xi}");g("\\varPi","\\mathit{\\Pi}");g("\\varSigma","\\mathit{\\Sigma}");g("\\varUpsilon","\\mathit{\\Upsilon}");g("\\varPhi","\\mathit{\\Phi}");g("\\varPsi","\\mathit{\\Psi}");g("\\varOmega","\\mathit{\\Omega}");g("\\substack","\\begin{subarray}{c}#1\\end{subarray}");g("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");g("\\boxed","\\fbox{$\\displaystyle{#1}$}");g("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");g("\\implies","\\DOTSB\\;\\Longrightarrow\\;");g("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");g("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");g("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Ec={",":"\\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"};g("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in Ec?e=Ec[r]:(r.slice(0,4)==="\\not"||r in Je.math&&be.contains(["bin","rel"],Je.math[r].group))&&(e="\\dotsb"),e});var Do={")":!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};g("\\dotso",function(t){var e=t.future().text;return e in Do?"\\ldots\\,":"\\ldots"});g("\\dotsc",function(t){var e=t.future().text;return e in Do&&e!==","?"\\ldots\\,":"\\ldots"});g("\\cdots",function(t){var e=t.future().text;return e in Do?"\\@cdots\\,":"\\@cdots"});g("\\dotsb","\\cdots");g("\\dotsm","\\cdots");g("\\dotsi","\\!\\cdots");g("\\dotsx","\\ldots\\,");g("\\DOTSI","\\relax");g("\\DOTSB","\\relax");g("\\DOTSX","\\relax");g("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");g("\\,","\\tmspace+{3mu}{.1667em}");g("\\thinspace","\\,");g("\\>","\\mskip{4mu}");g("\\:","\\tmspace+{4mu}{.2222em}");g("\\medspace","\\:");g("\\;","\\tmspace+{5mu}{.2777em}");g("\\thickspace","\\;");g("\\!","\\tmspace-{3mu}{.1667em}");g("\\negthinspace","\\!");g("\\negmedspace","\\tmspace-{4mu}{.2222em}");g("\\negthickspace","\\tmspace-{5mu}{.277em}");g("\\enspace","\\kern.5em ");g("\\enskip","\\hskip.5em\\relax");g("\\quad","\\hskip1em\\relax");g("\\qquad","\\hskip2em\\relax");g("\\tag","\\@ifstar\\tag@literal\\tag@paren");g("\\tag@paren","\\tag@literal{({#1})}");g("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new re("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});g("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");g("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");g("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");g("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");g("\\newline","\\\\\\relax");g("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Md=ae(fr["Main-Regular"]["T".charCodeAt(0)][1]-.7*fr["Main-Regular"]["A".charCodeAt(0)][1]);g("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Md+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");g("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Md+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");g("\\hspace","\\@ifstar\\@hspacer\\@hspace");g("\\@hspace","\\hskip #1\\relax");g("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");g("\\ordinarycolon",":");g("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");g("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');g("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');g("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');g("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');g("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');g("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');g("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');g("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');g("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');g("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');g("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');g("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');g("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');g("∷","\\dblcolon");g("∹","\\eqcolon");g("≔","\\coloneqq");g("≕","\\eqqcolon");g("⩴","\\Coloneqq");g("\\ratio","\\vcentcolon");g("\\coloncolon","\\dblcolon");g("\\colonequals","\\coloneqq");g("\\coloncolonequals","\\Coloneqq");g("\\equalscolon","\\eqqcolon");g("\\equalscoloncolon","\\Eqqcolon");g("\\colonminus","\\coloneq");g("\\coloncolonminus","\\Coloneq");g("\\minuscolon","\\eqcolon");g("\\minuscoloncolon","\\Eqcolon");g("\\coloncolonapprox","\\Colonapprox");g("\\coloncolonsim","\\Colonsim");g("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");g("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");g("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");g("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");g("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");g("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");g("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");g("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");g("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");g("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");g("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");g("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");g("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");g("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");g("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");g("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");g("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");g("\\nleqq","\\html@mathml{\\@nleqq}{≰}");g("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");g("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");g("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");g("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");g("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");g("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");g("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");g("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");g("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");g("\\imath","\\html@mathml{\\@imath}{ı}");g("\\jmath","\\html@mathml{\\@jmath}{ȷ}");g("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");g("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");g("⟦","\\llbracket");g("⟧","\\rrbracket");g("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");g("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");g("⦃","\\lBrace");g("⦄","\\rBrace");g("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");g("⦵","\\minuso");g("\\darr","\\downarrow");g("\\dArr","\\Downarrow");g("\\Darr","\\Downarrow");g("\\lang","\\langle");g("\\rang","\\rangle");g("\\uarr","\\uparrow");g("\\uArr","\\Uparrow");g("\\Uarr","\\Uparrow");g("\\N","\\mathbb{N}");g("\\R","\\mathbb{R}");g("\\Z","\\mathbb{Z}");g("\\alef","\\aleph");g("\\alefsym","\\aleph");g("\\Alpha","\\mathrm{A}");g("\\Beta","\\mathrm{B}");g("\\bull","\\bullet");g("\\Chi","\\mathrm{X}");g("\\clubs","\\clubsuit");g("\\cnums","\\mathbb{C}");g("\\Complex","\\mathbb{C}");g("\\Dagger","\\ddagger");g("\\diamonds","\\diamondsuit");g("\\empty","\\emptyset");g("\\Epsilon","\\mathrm{E}");g("\\Eta","\\mathrm{H}");g("\\exist","\\exists");g("\\harr","\\leftrightarrow");g("\\hArr","\\Leftrightarrow");g("\\Harr","\\Leftrightarrow");g("\\hearts","\\heartsuit");g("\\image","\\Im");g("\\infin","\\infty");g("\\Iota","\\mathrm{I}");g("\\isin","\\in");g("\\Kappa","\\mathrm{K}");g("\\larr","\\leftarrow");g("\\lArr","\\Leftarrow");g("\\Larr","\\Leftarrow");g("\\lrarr","\\leftrightarrow");g("\\lrArr","\\Leftrightarrow");g("\\Lrarr","\\Leftrightarrow");g("\\Mu","\\mathrm{M}");g("\\natnums","\\mathbb{N}");g("\\Nu","\\mathrm{N}");g("\\Omicron","\\mathrm{O}");g("\\plusmn","\\pm");g("\\rarr","\\rightarrow");g("\\rArr","\\Rightarrow");g("\\Rarr","\\Rightarrow");g("\\real","\\Re");g("\\reals","\\mathbb{R}");g("\\Reals","\\mathbb{R}");g("\\Rho","\\mathrm{P}");g("\\sdot","\\cdot");g("\\sect","\\S");g("\\spades","\\spadesuit");g("\\sub","\\subset");g("\\sube","\\subseteq");g("\\supe","\\supseteq");g("\\Tau","\\mathrm{T}");g("\\thetasym","\\vartheta");g("\\weierp","\\wp");g("\\Zeta","\\mathrm{Z}");g("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");g("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");g("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");g("\\bra","\\mathinner{\\langle{#1}|}");g("\\ket","\\mathinner{|{#1}\\rangle}");g("\\braket","\\mathinner{\\langle{#1}\\rangle}");g("\\Bra","\\left\\langle#1\\right|");g("\\Ket","\\left|#1\\right\\rangle");var Nd=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=f=>p=>{t&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",o));var v=f;if(!f&&s.length){var b=p.future();b.text==="|"&&(p.popToken(),v=!0)}return{tokens:v?s:n,numArgs:0}};e.macros.set("|",l(!1)),s.length&&e.macros.set("\\|",l(!0));var c=e.consumeArg().tokens,d=e.expandTokens([...i,...c,...r]);return e.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};g("\\bra@ket",Nd(!1));g("\\bra@set",Nd(!0));g("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");g("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");g("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");g("\\angln","{\\angl n}");g("\\blue","\\textcolor{##6495ed}{#1}");g("\\orange","\\textcolor{##ffa500}{#1}");g("\\pink","\\textcolor{##ff00af}{#1}");g("\\red","\\textcolor{##df0030}{#1}");g("\\green","\\textcolor{##28ae7b}{#1}");g("\\gray","\\textcolor{gray}{#1}");g("\\purple","\\textcolor{##9d38bd}{#1}");g("\\blueA","\\textcolor{##ccfaff}{#1}");g("\\blueB","\\textcolor{##80f6ff}{#1}");g("\\blueC","\\textcolor{##63d9ea}{#1}");g("\\blueD","\\textcolor{##11accd}{#1}");g("\\blueE","\\textcolor{##0c7f99}{#1}");g("\\tealA","\\textcolor{##94fff5}{#1}");g("\\tealB","\\textcolor{##26edd5}{#1}");g("\\tealC","\\textcolor{##01d1c1}{#1}");g("\\tealD","\\textcolor{##01a995}{#1}");g("\\tealE","\\textcolor{##208170}{#1}");g("\\greenA","\\textcolor{##b6ffb0}{#1}");g("\\greenB","\\textcolor{##8af281}{#1}");g("\\greenC","\\textcolor{##74cf70}{#1}");g("\\greenD","\\textcolor{##1fab54}{#1}");g("\\greenE","\\textcolor{##0d923f}{#1}");g("\\goldA","\\textcolor{##ffd0a9}{#1}");g("\\goldB","\\textcolor{##ffbb71}{#1}");g("\\goldC","\\textcolor{##ff9c39}{#1}");g("\\goldD","\\textcolor{##e07d10}{#1}");g("\\goldE","\\textcolor{##a75a05}{#1}");g("\\redA","\\textcolor{##fca9a9}{#1}");g("\\redB","\\textcolor{##ff8482}{#1}");g("\\redC","\\textcolor{##f9685d}{#1}");g("\\redD","\\textcolor{##e84d39}{#1}");g("\\redE","\\textcolor{##bc2612}{#1}");g("\\maroonA","\\textcolor{##ffbde0}{#1}");g("\\maroonB","\\textcolor{##ff92c6}{#1}");g("\\maroonC","\\textcolor{##ed5fa6}{#1}");g("\\maroonD","\\textcolor{##ca337c}{#1}");g("\\maroonE","\\textcolor{##9e034e}{#1}");g("\\purpleA","\\textcolor{##ddd7ff}{#1}");g("\\purpleB","\\textcolor{##c6b9fc}{#1}");g("\\purpleC","\\textcolor{##aa87ff}{#1}");g("\\purpleD","\\textcolor{##7854ab}{#1}");g("\\purpleE","\\textcolor{##543b78}{#1}");g("\\mintA","\\textcolor{##f5f9e8}{#1}");g("\\mintB","\\textcolor{##edf2df}{#1}");g("\\mintC","\\textcolor{##e0e5cc}{#1}");g("\\grayA","\\textcolor{##f6f7f7}{#1}");g("\\grayB","\\textcolor{##f0f1f2}{#1}");g("\\grayC","\\textcolor{##e3e5e6}{#1}");g("\\grayD","\\textcolor{##d6d8da}{#1}");g("\\grayE","\\textcolor{##babec2}{#1}");g("\\grayF","\\textcolor{##888d93}{#1}");g("\\grayG","\\textcolor{##626569}{#1}");g("\\grayH","\\textcolor{##3b3e40}{#1}");g("\\grayI","\\textcolor{##21242c}{#1}");g("\\kaBlue","\\textcolor{##314453}{#1}");g("\\kaGreen","\\textcolor{##71B307}{#1}");var Dd={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class X5{constructor(e,r,n){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=r,this.expansionCount=0,this.feed(e),this.macros=new K5(Y5,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Sc(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 r,n,s;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:s,end:n}=this.consumeArg(["]"])}else({tokens:s,start:r,end:n}=this.consumeArg());return this.pushToken(new Gt("EOF",n.loc)),this.pushTokens(s),r.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var s=this.future(),i,a=0,o=0;do{if(i=this.popToken(),r.push(i),i.text==="{")++a;else if(i.text==="}"){if(--a,a===-1)throw new re("Extra }",i)}else if(i.text==="EOF")throw new re("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",i);if(e&&n)if((a===0||a===1&&e[o]==="{")&&i.text===e[o]){if(++o,o===e.length){r.splice(-o,o);break}}else o=0}while(a!==0||n);return s.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:s,end:i}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new re("The length of delimiters doesn't match the number of args!");for(var n=r[0],s=0;sthis.settings.maxExpand)throw new re("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,s=r.noexpand?null:this._getExpansion(n);if(s==null||e&&s.unexpandable){if(e&&s==null&&n[0]==="\\"&&!this.isDefined(n))throw new re("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var i=s.tokens,a=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var l=i[o];if(l.text==="#"){if(o===0)throw new re("Incomplete placeholder at end of macro body",l);if(l=i[--o],l.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(l.text))i.splice(o,2,...a[+l.text-1]);else throw new re("Not a valid argument number",l)}}}return this.pushTokens(i),i.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 Gt(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),r.push(s)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var s=typeof r=="function"?r(this):r;if(typeof s=="string"){var i=0;if(s.indexOf("#")!==-1)for(var a=s.replace(/##/g,"");a.indexOf("#"+(i+1))!==-1;)++i;for(var o=new Sc(s,this.settings),l=[],c=o.lex();c.text!=="EOF";)l.push(c),c=o.lex();l.reverse();var d={tokens:l,numArgs:i};return d}return s}isDefined(e){return this.macros.has(e)||Vr.hasOwnProperty(e)||Je.math.hasOwnProperty(e)||Je.text.hasOwnProperty(e)||Dd.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Vr.hasOwnProperty(e)&&!Vr[e].primitive}}var Ac=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,G0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),$i={"́":{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"}},Cc={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class ii{constructor(e,r){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 X5(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new re("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&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 r=this.nextToken;this.consume(),this.gullet.pushToken(new Gt("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(ii.endOfExpression.indexOf(s.text)!==-1||r&&s.text===r||e&&Vr[s.text]&&Vr[s.text].infix)break;var i=this.parseAtom(r);if(i){if(i.type==="internal")continue}else break;n.push(i)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,s=0;s=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var o=Je[this.mode][r].group,l=$t.range(e),c;if(F6.hasOwnProperty(o)){var d=o;c={type:"atom",mode:this.mode,family:d,loc:l,text:r}}else c={type:o,mode:this.mode,loc:l,text:r};a=c}else if(r.charCodeAt(0)>=128)this.settings.strict&&(B1(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),a={type:"textord",mode:"text",loc:$t.range(e),text:r};else return null;if(this.consume(),i)for(var f=0;f|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{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 r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.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 r7=new ze.Renderer;ze.setOptions({breaks:!1,gfm:!0,tables:!0,sanitize:!1,renderer:r7});const v0=t=>{if(!t||typeof t!="string")return"";try{const e=n7(t),r=ze.parse(e);return s7(r)}catch(e){return console.error("Markdown渲染失败:",e),`

渲染失败: ${e.message}
`}},n7=t=>t.replace(/\$\$([\s\S]*?)\$\$/g,(e,r)=>{try{return`
${Mc.renderToString(r.trim(),{displayMode:!0,throwOnError:!1})}
`}catch(n){return console.warn("数学公式渲染失败:",n),`
数学公式错误: ${r}
`}}).replace(/\$([^$\n]+?)\$/g,(e,r)=>{if(r.includes("\\")||r.includes("{")||r.includes("}")||r.includes("^")||r.includes("_")||r.includes("=")||r.includes("+")||r.includes("-")||r.includes("*")||r.includes("/")||r.includes("(")||r.includes(")"))try{return`${Mc.renderToString(r.trim(),{displayMode:!1,throwOnError:!1})}`}catch(n){return console.warn("数学公式渲染失败:",n),`数学公式错误: ${r}`}return e}),s7=t=>{let e=t.replace(//g,'
').replace(/
{const i=s.className.match(/language-(\w+)/);if(i)try{s.innerHTML=Gl.highlight(s.textContent,Gl.languages[i[1]],i[1])}catch(a){console.warn("语法高亮失败:",a)}}),r.innerHTML},i7=t=>{if(!t||typeof t!="string")return!1;const e=t.split(`
-`);let r=!1,n=!1;for(const a of e){const o=a.trim();o.includes("|")&&o.split("|").length>=3&&(r=!0),o.includes("|")&&o.includes("-")&&/^[\s\|\-\:]+$/.test(o)&&(n=!0)}const s=(t.match(/\|/g)||[]).length,i=s>=6;return r&&n||r&&i||r&&s>=4},a7=t=>!t||typeof t!="string"?!1:i7(t)?!0:[/#{1,6}\s+/,/\*\*.*?\*\*/,/\*.*?\*/,/`.*?`/,/```[\s\S]*?```/,/^\s*[-*+]\s+/m,/^\s*\d+\.\s+/m,/\[.*?\]\(.*?\)/,/!\[.*?\]\(.*?\)/,/\$\$.*?\$\$/,/\$.*?\$/].some(r=>r.test(t)),K0=t=>!t||typeof t!="string"?t||"":a7(t)||t.includes("|")?v0(t):t;const _o=(t,e)=>{const r=t.__vccOpts||t;for(const[n,s]of e)r[n]=s;return r},o7={class:"mindmap-container"},l7={key:0,class:"welcome-page"},c7={class:"ai-input-content"},u7=["disabled","onKeydown"],d7={class:"ai-input-actions"},h7=["disabled"],f7=["disabled"],p7={key:0},m7={key:1},g7={key:3,class:"save-controls"},v7={__name:"MindMap",setup(t,{expose:e}){const r=Oe(null),n=Oe(null),s=Oe(null),i=Oe({}),a=Oe({}),o=Oe(null),l=Oe(1),c=Oe(!0),d=Oe(!1),f=Oe(!1),p=Oe(null),v=Oe(""),b=Oe(!1);Oe(new Map),Oe(!1),Oe({x:0,y:0}),Oe(null);const y=()=>{c.value=!0,r.value&&(r.value.innerHTML=""),n.value&&(n.value=null)},w=()=>{c.value=!1},M=()=>{c.value=!1},S=()=>{if(!n.value||!r.value)return null;try{const k=r.value.querySelector(".map-canvas");if(k){const A=k.style.transform,_=n.value.scaleVal||1;return console.log("📍 保存位置:",{transform:A,scaleVal:_}),{transform:A,scaleVal:_}}}catch(k){console.warn("保存位置失败:",k)}return null},E=k=>{if(!(!k||!r.value||!n.value))try{const A=r.value.querySelector(".map-canvas");A&&k.transform&&(A.style.setProperty("transform",k.transform,"important"),k.scaleVal&&n.value.scaleVal!==k.scaleVal&&(n.value.scaleVal=k.scaleVal),A.style.setProperty("transform-origin","center center","important"),console.log("📍 恢复位置:",{transform:k.transform,scaleVal:k.scaleVal}))}catch(A){console.warn("恢复位置失败:",A)}},D=async(k,A=!1,_=!0)=>{try{const q=A?S():null;q?console.log("📍 保存当前位置用于保持原位:",q):!A&&!_&&console.log("📍 添加节点模式:不保存位置,等待居中到新节点"),console.log("🔍 loadMindmapData 被调用,数据:",k),console.log("🔍 数据字段:",Object.keys(k||{})),k&&k.id?(o.value=k.id,console.log("🔍 设置当前思维导图ID (data.id):",k.id)):k&&k.mindmapId?(o.value=k.mindmapId,console.log("🔍 设置当前思维导图ID (data.mindmapId):",k.mindmapId)):k&&k.nodeData&&k.nodeData.mindmapId?(o.value=k.nodeData.mindmapId,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmapId):",k.nodeData.mindmapId)):k&&k.nodeData&&k.nodeData.mindmap_id?(o.value=k.nodeData.mindmap_id,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmap_id):",k.nodeData.mindmap_id)):(console.warn("⚠️ 数据中没有找到 id 或 mindmapId 字段"),console.log("🔍 可用的字段:",Object.keys(k||{})),k&&k.nodeData&&console.log("🔍 nodeData字段:",Object.keys(k.nodeData||{}))),console.log("🔍 设置后的 currentMindmapId.value:",o.value),w(),await X0(),r.value||(console.warn("⚠️ 思维导图容器未准备好,等待DOM更新..."),await new Promise(Q=>setTimeout(Q,100)),r.value||console.warn("⚠️ 思维导图容器仍未准备好,尝试继续执行..."));try{if(r.value){console.log("🔍 创建Mind Elixir实例,设置markdown函数"),n.value=new gt({el:r.value,direction:gt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(Y,F)=>Y.includes("|")||Y.includes("**")||Y.includes("`")||Y.includes("#")||Y.includes("![")?K0(Y):Y,imageProxy:Y=>Y.startsWith("http://")||Y.startsWith("https://")?Y:Y.startsWith("/")?window.location.origin+Y:window.location.origin+"/"+Y}),console.log("✅ Mind Elixir实例创建完成,markdown函数已设置"),console.log("🔍 初始化Mind Elixir数据:",k);const Q=n.value.init(k);console.log("✅ Mind Elixir实例创建成功,初始化结果:",Q),q?(E(q),console.log("📍 初始化后立即恢复位置")):!A&&!_&&console.log("📍 跳过根节点居中,等待居中新节点")}else{console.warn("⚠️ 容器未准备好,延迟创建Mind Elixir实例..."),setTimeout(()=>{if(r.value){n.value=new gt({el:r.value,direction:gt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(Y,F)=>Y.includes("|")||Y.includes("**")||Y.includes("`")||Y.includes("#")||Y.includes("![")?K0(Y):Y});const Q=n.value.init(k);console.log("✅ Mind Elixir实例延迟创建成功"),q?(E(q),console.log("📍 延迟创建后立即恢复位置"),setTimeout(()=>{E(q),console.log("📍 延迟创建后二次确认位置恢复")},100)):!A&&!_&&console.log("📍 延迟创建后跳过根节点居中,等待居中新节点"),setTimeout(()=>{q?E(q):_&&O(),te(),I()},300)}},200);return}}catch{setTimeout(()=>{try{if(r.value){n.value=new gt({el:r.value,direction:gt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(F,he)=>F.includes("|")||F.includes("**")||F.includes("`")||F.includes("#")||F.includes("![")?K0(F):F});const Y=n.value.init(k);q?(E(q),console.log("📍 重试创建后立即恢复位置"),setTimeout(()=>{E(q),console.log("📍 重试创建后二次确认位置恢复")},100)):!A&&!_&&console.log("📍 重试创建后跳过根节点居中,等待居中新节点"),setTimeout(()=>{q?E(q):_&&O(),te(),I()},300)}}catch(Y){console.error("❌ Mind Elixir实例重试创建失败:",Y)}},500);return}setTimeout(()=>{A&&q?E(q):_&&O(),w(),te(),setTimeout(()=>{I()},500)},100)}catch{}},I=()=>{n.value&&r.value&&setTimeout(()=>{r.value.querySelectorAll("me-tpc, .topic, [data-id]").forEach((A,_)=>{var F;const q=A.getAttribute("data-id")||A.id||A.getAttribute("nodeid")||((F=A.querySelector("[data-id]"))==null?void 0:F.getAttribute("data-id"));if(!q)return;const Q=(he,fe)=>{for(const ge of he){if(ge.id===fe)return ge;if(ge.children){const Ie=Q(ge.children,fe);if(Ie)return Ie}}return null},Y=Q(n.value.data.nodeData,q);if(Y&&Y.data&&Y.data.des){let he=A.querySelector(".node-description");he||(he=document.createElement("div"),he.className="node-description",he.style.cssText=`
+?)[ \r	]*`,ya="[̀-ͯ]",W5=new RegExp(ya+"+$"),G5="("+Cd+"+)|"+(V5+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ya+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ya+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+U5)+("|"+j5+")");class Sc{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(G5,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new Kt("EOF",new Ft(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new re("Unexpected character: '"+e[r]+"'",new Kt(e[r],new Ft(this,r,r+1)));var s=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[s]===14){var i=e.indexOf(`
+`,this.tokenRegex.lastIndex);return i===-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=i+1,this.lex()}return new Kt(s,new Ft(this,r,this.tokenRegex.lastIndex))}}class K5{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new re("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}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,r,n){if(n===void 0&&(n=!1),n){for(var s=0;s0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}}var Y5=gd;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 r=t.future();return e[0].length===1&&e[0][0].text===r.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 Tc={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(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new re("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=Tc[e.text],n==null||n>=r)throw new re("Invalid base-"+r+" digit "+e.text);for(var s;(s=Tc[t.future().text])!=null&&s{var s=t.consumeArg().tokens;if(s.length!==1)throw new re("\\newcommand's first argument must be a macro name");var i=s[0].text,a=t.isDefined(i);if(a&&!e)throw new re("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!r)throw new re("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(s=t.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var l="",c=t.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new re("Invalid number of arguments: "+l);o=parseInt(l),s=t.consumeArg().tokens}return a&&n||t.macros.set(i,{tokens:s,numArgs:o}),""};v("\\newcommand",t=>No(t,!1,!0,!1));v("\\renewcommand",t=>No(t,!0,!1,!1));v("\\providecommand",t=>No(t,!0,!0,!0));v("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});v("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});v("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Vr[r],Je.math[r],Je.text[r]),""});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 Ec={",":"\\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",r=t.expandAfterFuture().text;return r in Ec?e=Ec[r]:(r.slice(0,4)==="\\not"||r in Je.math&&be.contains(["bin","rel"],Je.math[r].group))&&(e="\\dotsb"),e});var Do={")":!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 Do?"\\ldots\\,":"\\ldots"});v("\\dotsc",function(t){var e=t.future().text;return e in Do&&e!==","?"\\ldots\\,":"\\ldots"});v("\\cdots",function(t){var e=t.future().text;return e in Do?"\\@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 re("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 Md=ae(fr["Main-Regular"]["T".charCodeAt(0)][1]-.7*fr["Main-Regular"]["A".charCodeAt(0)][1]);v("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Md+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");v("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Md+"}{\\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 Nd=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=f=>p=>{t&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",o));var g=f;if(!f&&s.length){var b=p.future();b.text==="|"&&(p.popToken(),g=!0)}return{tokens:g?s:n,numArgs:0}};e.macros.set("|",l(!1)),s.length&&e.macros.set("\\|",l(!0));var c=e.consumeArg().tokens,d=e.expandTokens([...i,...c,...r]);return e.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};v("\\bra@ket",Nd(!1));v("\\bra@set",Nd(!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 Dd={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class X5{constructor(e,r,n){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=r,this.expansionCount=0,this.feed(e),this.macros=new K5(Y5,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Sc(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 r,n,s;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:s,end:n}=this.consumeArg(["]"])}else({tokens:s,start:r,end:n}=this.consumeArg());return this.pushToken(new Kt("EOF",n.loc)),this.pushTokens(s),r.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var s=this.future(),i,a=0,o=0;do{if(i=this.popToken(),r.push(i),i.text==="{")++a;else if(i.text==="}"){if(--a,a===-1)throw new re("Extra }",i)}else if(i.text==="EOF")throw new re("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",i);if(e&&n)if((a===0||a===1&&e[o]==="{")&&i.text===e[o]){if(++o,o===e.length){r.splice(-o,o);break}}else o=0}while(a!==0||n);return s.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:s,end:i}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new re("The length of delimiters doesn't match the number of args!");for(var n=r[0],s=0;sthis.settings.maxExpand)throw new re("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,s=r.noexpand?null:this._getExpansion(n);if(s==null||e&&s.unexpandable){if(e&&s==null&&n[0]==="\\"&&!this.isDefined(n))throw new re("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var i=s.tokens,a=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var l=i[o];if(l.text==="#"){if(o===0)throw new re("Incomplete placeholder at end of macro body",l);if(l=i[--o],l.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(l.text))i.splice(o,2,...a[+l.text-1]);else throw new re("Not a valid argument number",l)}}}return this.pushTokens(i),i.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 Kt(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),r.push(s)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var s=typeof r=="function"?r(this):r;if(typeof s=="string"){var i=0;if(s.indexOf("#")!==-1)for(var a=s.replace(/##/g,"");a.indexOf("#"+(i+1))!==-1;)++i;for(var o=new Sc(s,this.settings),l=[],c=o.lex();c.text!=="EOF";)l.push(c),c=o.lex();l.reverse();var d={tokens:l,numArgs:i};return d}return s}isDefined(e){return this.macros.has(e)||Vr.hasOwnProperty(e)||Je.math.hasOwnProperty(e)||Je.text.hasOwnProperty(e)||Dd.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Vr.hasOwnProperty(e)&&!Vr[e].primitive}}var Ac=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,G0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),$i={"́":{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"}},Cc={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class ii{constructor(e,r){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 X5(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new re("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&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 r=this.nextToken;this.consume(),this.gullet.pushToken(new Kt("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(ii.endOfExpression.indexOf(s.text)!==-1||r&&s.text===r||e&&Vr[s.text]&&Vr[s.text].infix)break;var i=this.parseAtom(r);if(i){if(i.type==="internal")continue}else break;n.push(i)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,s=0;s=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var o=Je[this.mode][r].group,l=Ft.range(e),c;if(F6.hasOwnProperty(o)){var d=o;c={type:"atom",mode:this.mode,family:d,loc:l,text:r}}else c={type:o,mode:this.mode,loc:l,text:r};a=c}else if(r.charCodeAt(0)>=128)this.settings.strict&&(B1(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),a={type:"textord",mode:"text",loc:Ft.range(e),text:r};else return null;if(this.consume(),i)for(var f=0;f|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{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 r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.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 r7=new ze.Renderer;ze.setOptions({breaks:!1,gfm:!0,tables:!0,sanitize:!1,renderer:r7});const v0=t=>{if(!t||typeof t!="string")return"";try{const e=n7(t),r=ze.parse(e);return s7(r)}catch(e){return console.error("Markdown渲染失败:",e),`
渲染失败: ${e.message}
`}},n7=t=>t.replace(/\$\$([\s\S]*?)\$\$/g,(e,r)=>{try{return`
${Mc.renderToString(r.trim(),{displayMode:!0,throwOnError:!1})}
`}catch(n){return console.warn("数学公式渲染失败:",n),`
数学公式错误: ${r}
`}}).replace(/\$([^$\n]+?)\$/g,(e,r)=>{if(r.includes("\\")||r.includes("{")||r.includes("}")||r.includes("^")||r.includes("_")||r.includes("=")||r.includes("+")||r.includes("-")||r.includes("*")||r.includes("/")||r.includes("(")||r.includes(")"))try{return`${Mc.renderToString(r.trim(),{displayMode:!1,throwOnError:!1})}`}catch(n){return console.warn("数学公式渲染失败:",n),`数学公式错误: ${r}`}return e}),s7=t=>{let e=t.replace(/
/g,'
').replace(/
{const i=s.className.match(/language-(\w+)/);if(i)try{s.innerHTML=Gl.highlight(s.textContent,Gl.languages[i[1]],i[1])}catch(a){console.warn("语法高亮失败:",a)}}),r.innerHTML},i7=t=>{if(!t||typeof t!="string")return!1;const e=t.split(`
+`);let r=!1,n=!1;for(const a of e){const o=a.trim();o.includes("|")&&o.split("|").length>=3&&(r=!0),o.includes("|")&&o.includes("-")&&/^[\s\|\-\:]+$/.test(o)&&(n=!0)}const s=(t.match(/\|/g)||[]).length,i=s>=6;return r&&n||r&&i||r&&s>=4},a7=t=>!t||typeof t!="string"?!1:i7(t)?!0:[/#{1,6}\s+/,/\*\*.*?\*\*/,/\*.*?\*/,/`.*?`/,/```[\s\S]*?```/,/^\s*[-*+]\s+/m,/^\s*\d+\.\s+/m,/\[.*?\]\(.*?\)/,/!\[.*?\]\(.*?\)/,/\$\$.*?\$\$/,/\$.*?\$/].some(r=>r.test(t)),K0=t=>!t||typeof t!="string"?t||"":a7(t)||t.includes("|")?v0(t):t;const _o=(t,e)=>{const r=t.__vccOpts||t;for(const[n,s]of e)r[n]=s;return r},o7={class:"mindmap-container"},l7={key:0,class:"welcome-page"},c7={class:"ai-input-content"},u7=["disabled","onKeydown"],d7={class:"ai-input-actions"},h7=["disabled"],f7=["disabled"],p7={key:0},m7={key:1},g7={key:3,class:"save-controls"},v7={__name:"MindMap",setup(t,{expose:e}){const r=Oe(null),n=Oe(null),s=Oe(null),i=Oe({}),a=Oe({}),o=Oe(null),l=Oe(1),c=Oe(!0),d=Oe(!1),f=Oe(!1),p=Oe(null),g=Oe(""),b=Oe(!1);Oe(new Map),Oe(!1),Oe({x:0,y:0}),Oe(null);const y=()=>{c.value=!0,r.value&&(r.value.innerHTML=""),n.value&&(n.value=null)},w=()=>{c.value=!1},M=()=>{c.value=!1},S=()=>{if(!n.value||!r.value)return null;try{const k=r.value.querySelector(".map-canvas");if(k){const A=k.style.transform,_=n.value.scaleVal||1;return console.log("📍 保存位置:",{transform:A,scaleVal:_}),{transform:A,scaleVal:_}}}catch(k){console.warn("保存位置失败:",k)}return null},E=k=>{if(!(!k||!r.value||!n.value))try{const A=r.value.querySelector(".map-canvas");A&&k.transform&&(A.style.setProperty("transform",k.transform,"important"),k.scaleVal&&n.value.scaleVal!==k.scaleVal&&(n.value.scaleVal=k.scaleVal),A.style.setProperty("transform-origin","center center","important"),console.log("📍 恢复位置:",{transform:k.transform,scaleVal:k.scaleVal}))}catch(A){console.warn("恢复位置失败:",A)}},D=async(k,A=!1,_=!0)=>{try{const q=A?S():null;q?console.log("📍 保存当前位置用于保持原位:",q):!A&&!_&&console.log("📍 添加节点模式:不保存位置,等待居中到新节点"),console.log("🔍 loadMindmapData 被调用,数据:",k),console.log("🔍 数据字段:",Object.keys(k||{})),k&&k.id?(o.value=k.id,console.log("🔍 设置当前思维导图ID (data.id):",k.id)):k&&k.mindmapId?(o.value=k.mindmapId,console.log("🔍 设置当前思维导图ID (data.mindmapId):",k.mindmapId)):k&&k.nodeData&&k.nodeData.mindmapId?(o.value=k.nodeData.mindmapId,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmapId):",k.nodeData.mindmapId)):k&&k.nodeData&&k.nodeData.mindmap_id?(o.value=k.nodeData.mindmap_id,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmap_id):",k.nodeData.mindmap_id)):(console.warn("⚠️ 数据中没有找到 id 或 mindmapId 字段"),console.log("🔍 可用的字段:",Object.keys(k||{})),k&&k.nodeData&&console.log("🔍 nodeData字段:",Object.keys(k.nodeData||{}))),console.log("🔍 设置后的 currentMindmapId.value:",o.value),w(),await X0(),r.value||(console.warn("⚠️ 思维导图容器未准备好,等待DOM更新..."),await new Promise(Q=>setTimeout(Q,100)),r.value||console.warn("⚠️ 思维导图容器仍未准备好,尝试继续执行..."));try{if(r.value){console.log("🔍 创建Mind Elixir实例,设置markdown函数"),n.value=new vt({el:r.value,direction:vt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(Y,F)=>Y.includes("|")||Y.includes("**")||Y.includes("`")||Y.includes("#")||Y.includes("![")?K0(Y):Y,imageProxy:Y=>Y.startsWith("http://")||Y.startsWith("https://")?Y:Y.startsWith("/")?window.location.origin+Y:window.location.origin+"/"+Y}),console.log("✅ Mind Elixir实例创建完成,markdown函数已设置"),console.log("🔍 初始化Mind Elixir数据:",k);const Q=n.value.init(k);console.log("✅ Mind Elixir实例创建成功,初始化结果:",Q),q?(E(q),console.log("📍 初始化后立即恢复位置")):!A&&!_&&console.log("📍 跳过根节点居中,等待居中新节点")}else{console.warn("⚠️ 容器未准备好,延迟创建Mind Elixir实例..."),setTimeout(()=>{if(r.value){n.value=new vt({el:r.value,direction:vt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(Y,F)=>Y.includes("|")||Y.includes("**")||Y.includes("`")||Y.includes("#")||Y.includes("![")?K0(Y):Y});const Q=n.value.init(k);console.log("✅ Mind Elixir实例延迟创建成功"),q?(E(q),console.log("📍 延迟创建后立即恢复位置"),setTimeout(()=>{E(q),console.log("📍 延迟创建后二次确认位置恢复")},100)):!A&&!_&&console.log("📍 延迟创建后跳过根节点居中,等待居中新节点"),setTimeout(()=>{q?E(q):_&&O(),te(),I()},300)}},200);return}}catch{setTimeout(()=>{try{if(r.value){n.value=new vt({el:r.value,direction:vt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(F,he)=>F.includes("|")||F.includes("**")||F.includes("`")||F.includes("#")||F.includes("![")?K0(F):F});const Y=n.value.init(k);q?(E(q),console.log("📍 重试创建后立即恢复位置"),setTimeout(()=>{E(q),console.log("📍 重试创建后二次确认位置恢复")},100)):!A&&!_&&console.log("📍 重试创建后跳过根节点居中,等待居中新节点"),setTimeout(()=>{q?E(q):_&&O(),te(),I()},300)}}catch(Y){console.error("❌ Mind Elixir实例重试创建失败:",Y)}},500);return}setTimeout(()=>{A&&q?E(q):_&&O(),w(),te(),setTimeout(()=>{I()},500)},100)}catch{}},I=()=>{n.value&&r.value&&setTimeout(()=>{r.value.querySelectorAll("me-tpc, .topic, [data-id]").forEach((A,_)=>{var F;const q=A.getAttribute("data-id")||A.id||A.getAttribute("nodeid")||((F=A.querySelector("[data-id]"))==null?void 0:F.getAttribute("data-id"));if(!q)return;const Q=(he,fe)=>{for(const ge of he){if(ge.id===fe)return ge;if(ge.children){const Ie=Q(ge.children,fe);if(Ie)return Ie}}return null},Y=Q(n.value.data.nodeData,q);if(Y&&Y.data&&Y.data.des){let he=A.querySelector(".node-description");he||(he=document.createElement("div"),he.className="node-description",he.style.cssText=`
             font-size: 11px;
             color: #666;
             margin-top: 6px;
@@ -430,21 +461,21 @@ l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
             line-height: 1.3;
             border-left: 3px solid #e0e0e0;
             display: block;
-          `,A.appendChild(he));const fe=Y.data.des;fe.length>150?(he.textContent=fe.substring(0,150)+"...",he.title=fe):he.textContent=fe}})},1e3)},O=()=>{try{if(n.value&&n.value.toCenter){n.value.toCenter(),console.log("✅ 使用 MindElixir toCenter 方法实现根节点居中");return}const k=r.value;if(!k)return;const A=k.querySelector(".map-canvas");if(!A)return;const _=A.querySelectorAll("me-tpc");if(_.length===0)return;let q=1/0,Q=-1/0,Y=1/0,F=-1/0;_.forEach(M0=>{const yn=M0.getBoundingClientRect(),N0=k.getBoundingClientRect(),Oo=yn.left-N0.left,Lo=yn.top-N0.top;q=Math.min(q,Oo),Q=Math.max(Q,Oo+yn.width),Y=Math.min(Y,Lo),F=Math.max(F,Lo+yn.height)});const he=(q+Q)/2,fe=(Y+F)/2,ge=k.clientWidth/2,Ie=k.clientHeight/2,$e=ge-he,mt=Ie-fe;A.style.transform=`translate(${$e}px, ${mt}px)`,A.style.opacity="1",A.style.transition="opacity 0.3s ease";const Rt=100,Jt=Math.max($e,Rt),yr=Math.max(mt,Rt);A.style.transform=`translate(${Jt}px, ${yr}px)`,A.style.opacity="1",A.style.visibility="visible"}catch{}},$=async k=>{if(!(!n.value||!k))try{console.log("🎯 开始处理新节点:",k);let A=null,_=0;const q=5;for(;!A&&_setTimeout(Q,50)));A?(console.log("✅ 找到节点元素:",A),n.value.scrollIntoView&&(n.value.scrollIntoView(A),console.log("✅ 节点已平滑居中显示")),setTimeout(()=>{n.value.beginEdit&&(n.value.beginEdit(A),console.log("✅ 节点已进入编辑状态"))},350)):console.error("❌ 多次尝试后仍未找到节点元素:",k)}catch(A){console.error("❌ 居中显示节点失败:",A)}},K=()=>{if(!s.value)return;if(n.value&&n.value.getNodeById)try{const A=n.value.getNodeById(s.value.id);if(A){const _=A.getBoundingClientRect(),q=r.value.getBoundingClientRect(),Q=_.left-q.left+_.width/2,Y=_.bottom-q.top+10;i.value={left:`${Q}px`,top:`${Y}px`};return}}catch{}let k=document.querySelector(`[data-id="${s.value.id}"]`);if(k||(k=document.querySelector(`.topic[data-id="${s.value.id}"]`)),k||(k=document.querySelector(`[data-node-id="${s.value.id}"]`)),k||(k=document.querySelector(`[data-nodeid="me${s.value.id}"]`)),!k){const A=document.querySelectorAll("me-tpc");for(const _ of A)if(_.getAttribute("data-nodeid")===`me${s.value.id}`){k=_;break}}if(!k){const A=document.querySelectorAll(".topic");for(const _ of A)if(_.textContent.trim()===s.value.topic){k=_;break}}if(k){const A=k.getBoundingClientRect(),_=r.value.getBoundingClientRect(),q=A.left-_.left+A.width/2,Q=A.bottom-_.top+10;i.value={left:`${q}px`,top:`${Q}px`}}else i.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},G=async()=>{s.value&&(await Z(s.value),s.value=null)},pe=async()=>{s.value&&(await ie(s.value),s.value=null)},ye=async()=>{s.value&&(await we(s.value),s.value=null)},Ee=async()=>{if(!s.value)return;console.log("Ask AI for node:",s.value);const k=parseFloat(i.value.left)||0,A=parseFloat(i.value.top)||0;a.value={left:`${k}px`,top:`${A+60}px`,transform:"translateX(-50%)"},f.value=!0,p.value=s.value},Ge=()=>{f.value=!1,p.value=null,v.value="",b.value=!1,s.value=null},qe=k=>{if(!k)return"";const A=[];return k.parent&&k.parent.topic&&A.push(`父节点: ${k.parent.topic}`),k.parent&&k.parent.parent&&k.parent.parent.topic&&A.push(`祖父节点: ${k.parent.parent.topic}`),A.join(" | ")},st=k=>{k.ctrlKey||k.metaKey||(k.preventDefault(),_e())},_e=async()=>{if(!(!v.value.trim()||!p.value||b.value)){b.value=!0;try{const k="你是一个专业的思维导图分析助手。请根据用户的问题和提供的节点信息,给出专业、有用的回答。",A=`节点信息:
+          `,A.appendChild(he));const fe=Y.data.des;fe.length>150?(he.textContent=fe.substring(0,150)+"...",he.title=fe):he.textContent=fe}})},1e3)},O=()=>{try{if(n.value&&n.value.toCenter){n.value.toCenter(),console.log("✅ 使用 MindElixir toCenter 方法实现根节点居中");return}const k=r.value;if(!k)return;const A=k.querySelector(".map-canvas");if(!A)return;const _=A.querySelectorAll("me-tpc");if(_.length===0)return;let q=1/0,Q=-1/0,Y=1/0,F=-1/0;_.forEach(M0=>{const yn=M0.getBoundingClientRect(),N0=k.getBoundingClientRect(),Oo=yn.left-N0.left,Lo=yn.top-N0.top;q=Math.min(q,Oo),Q=Math.max(Q,Oo+yn.width),Y=Math.min(Y,Lo),F=Math.max(F,Lo+yn.height)});const he=(q+Q)/2,fe=(Y+F)/2,ge=k.clientWidth/2,Ie=k.clientHeight/2,$e=ge-he,gt=Ie-fe;A.style.transform=`translate(${$e}px, ${gt}px)`,A.style.opacity="1",A.style.transition="opacity 0.3s ease";const Rt=100,Jt=Math.max($e,Rt),yr=Math.max(gt,Rt);A.style.transform=`translate(${Jt}px, ${yr}px)`,A.style.opacity="1",A.style.visibility="visible"}catch{}},$=async k=>{if(!(!n.value||!k))try{console.log("🎯 开始处理新节点:",k);let A=null,_=0;const q=5;for(;!A&&_setTimeout(Q,50)));A?(console.log("✅ 找到节点元素:",A),n.value.scrollIntoView&&(n.value.scrollIntoView(A),console.log("✅ 节点已平滑居中显示")),setTimeout(()=>{n.value.beginEdit&&(n.value.beginEdit(A),console.log("✅ 节点已进入编辑状态"))},350)):console.error("❌ 多次尝试后仍未找到节点元素:",k)}catch(A){console.error("❌ 居中显示节点失败:",A)}},K=()=>{if(!s.value)return;if(n.value&&n.value.getNodeById)try{const A=n.value.getNodeById(s.value.id);if(A){const _=A.getBoundingClientRect(),q=r.value.getBoundingClientRect(),Q=_.left-q.left+_.width/2,Y=_.bottom-q.top+10;i.value={left:`${Q}px`,top:`${Y}px`};return}}catch{}let k=document.querySelector(`[data-id="${s.value.id}"]`);if(k||(k=document.querySelector(`.topic[data-id="${s.value.id}"]`)),k||(k=document.querySelector(`[data-node-id="${s.value.id}"]`)),k||(k=document.querySelector(`[data-nodeid="me${s.value.id}"]`)),!k){const A=document.querySelectorAll("me-tpc");for(const _ of A)if(_.getAttribute("data-nodeid")===`me${s.value.id}`){k=_;break}}if(!k){const A=document.querySelectorAll(".topic");for(const _ of A)if(_.textContent.trim()===s.value.topic){k=_;break}}if(k){const A=k.getBoundingClientRect(),_=r.value.getBoundingClientRect(),q=A.left-_.left+A.width/2,Q=A.bottom-_.top+10;i.value={left:`${q}px`,top:`${Q}px`}}else i.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},G=async()=>{s.value&&(await Z(s.value),s.value=null)},pe=async()=>{s.value&&(await ie(s.value),s.value=null)},ye=async()=>{s.value&&(await we(s.value),s.value=null)},Ee=async()=>{if(!s.value)return;console.log("Ask AI for node:",s.value);const k=parseFloat(i.value.left)||0,A=parseFloat(i.value.top)||0;a.value={left:`${k}px`,top:`${A+60}px`,transform:"translateX(-50%)"},f.value=!0,p.value=s.value},Ge=()=>{f.value=!1,p.value=null,g.value="",b.value=!1,s.value=null},qe=k=>{if(!k)return"";const A=[];return k.parent&&k.parent.topic&&A.push(`父节点: ${k.parent.topic}`),k.parent&&k.parent.parent&&k.parent.parent.topic&&A.push(`祖父节点: ${k.parent.parent.topic}`),A.join(" | ")},st=k=>{k.ctrlKey||k.metaKey||(k.preventDefault(),_e())},_e=async()=>{if(!(!g.value.trim()||!p.value||b.value)){b.value=!0;try{const k="你是一个专业的思维导图分析助手。请根据用户的问题和提供的节点信息,给出专业、有用的回答。",A=`节点信息:
 当前节点:${p.value.topic}
 上下文:${qe(p.value)}
 
-用户问题:${v.value}
+用户问题:${g.value}
 
 请给出详细的回答,回答应该:
 1. 直接回答用户的问题
 2. 提供具体的建议或改进方案
 3. 保持专业和有用的语调
 4. 回答长度适中,便于在思维导图中展示`;console.log("发送AI请求:",{systemPrompt:k,userPrompt:A});const _=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:k,user_prompt:A,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!_.ok)throw new Error(`HTTP error! status: ${_.status}`);let q="";const Q=_.body.getReader(),Y=new TextDecoder;let F="";for(;;){const{done:he,value:fe}=await Q.read();if(he)break;F+=Y.decode(fe,{stream:!0});const ge=F.split(`
-`);F=ge.pop()||"";for(const Ie of ge)if(Ie.startsWith("data: "))try{const $e=JSON.parse(Ie.slice(6));if($e.type==="chunk")q+=$e.content;else if($e.type==="error")throw new Error($e.content)}catch($e){console.warn("解析流式数据失败:",$e)}}await Ze(p.value,v.value,q),Ge()}catch(k){console.error("AI请求失败:",k),alert("AI请求失败,请稍后重试")}finally{b.value=!1}}},Ce=k=>k.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(A,_)=>{if(_.includes(":")){const q=_.split(":");if(q.length>1)return`【${q[0]}】: ${q.slice(1).join(":")}`}return`【${_}】`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim,"  • $1").replace(/^\d+\. (.*$)/gim,"  $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/\n\n/g,`
+`);F=ge.pop()||"";for(const Ie of ge)if(Ie.startsWith("data: "))try{const $e=JSON.parse(Ie.slice(6));if($e.type==="chunk")q+=$e.content;else if($e.type==="error")throw new Error($e.content)}catch($e){console.warn("解析流式数据失败:",$e)}}await Ze(p.value,g.value,q),Ge()}catch(k){console.error("AI请求失败:",k),alert("AI请求失败,请稍后重试")}finally{b.value=!1}}},Ce=k=>k.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(A,_)=>{if(_.includes(":")){const q=_.split(":");if(q.length>1)return`【${q[0]}】: ${q.slice(1).join(":")}`}return`【${_}】`}).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,`
   `),ve=(k,A,_)=>{const q=k.split(`
-`);let Q=_,Y=[];for(let F=0;F0){const Jt=Ce(mt.join(`
+`);let Q=_,Y=[];for(let F=0;F0){const Jt=Ce(gt.join(`
 `));$e.topic=$e.topic+`
 
 `+Jt}A.children.push($e),F=Rt-1}else fe&&Y.push(fe)}if(Y.length>0){const F=Y.join(`
@@ -452,12 +483,12 @@ l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
 
 `).filter(fe=>fe.trim()).forEach(fe=>{const ge=Ce(fe.trim());if(ge){const Ie={id:`node_${Q++}`,topic:ge,children:[],level:(A.level||0)+1,data:{}};A.children.push(Ie)}})}return{nodeCounter:Q}},Ke=k=>{const A=k.split(`
 `);let _=null;const q=[];let Q=0,Y=[];if(A.forEach((F,he)=>{const fe=F.trim(),ge=fe.match(/^(#{1,6})\s+(.+)$/);if(ge){if(Y.length>0&&q.length>0){const Jt=Y.join(`
-`).trim();Jt&&(Q=ve(Jt,q[q.length-1],Q).nodeCounter),Y=[]}const Ie=ge[1].length,$e=ge[2].trim(),mt=Ce($e),Rt={id:`node_${Q++}`,topic:mt,children:[],level:Ie,data:{}};if(Ie===1&&!_)_=Rt,q.length=0,q.push(_);else{for(;q.length>1&&q[q.length-1].level>=Ie;)q.pop();q.length>0&&q[q.length-1].children.push(Rt),q.push(Rt)}}else fe&&Y.push(fe)}),Y.length>0&&q.length>0){const F=Y.join(`
+`).trim();Jt&&(Q=ve(Jt,q[q.length-1],Q).nodeCounter),Y=[]}const Ie=ge[1].length,$e=ge[2].trim(),gt=Ce($e),Rt={id:`node_${Q++}`,topic:gt,children:[],level:Ie,data:{}};if(Ie===1&&!_)_=Rt,q.length=0,q.push(_);else{for(;q.length>1&&q[q.length-1].level>=Ie;)q.pop();q.length>0&&q[q.length-1].children.push(Rt),q.push(Rt)}}else fe&&Y.push(fe)}),Y.length>0&&q.length>0){const F=Y.join(`
 `).trim();F&&(Q=ve(F,q[q.length-1],Q).nodeCounter)}return _||(_={id:"root",topic:"根节点",children:[],data:{}}),_},Ze=async(k,A,_)=>{var q,Q,Y;try{const he=(yr=>yr.replace(/^#+\s*/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/^\s*[-*+]\s*(?![|])/gm,"• ").replace(/\n{3,}/g,`
 
 `).trim())(_),fe=`# ${A}
 
-${he}`,ge=Ke(fe),Ie={title:A,des:`AI追问产生的节点 - ${new Date().toLocaleString()}`,parentId:k.id,isRoot:!1},$e=[];if(ge.children&&ge.children.length>0&&ge.children.forEach(yr=>{$e.push({title:yr.topic,des:"",parentId:null,isRoot:!1})}),console.log("当前思维导图ID:",o.value),!o.value)throw new Error("没有找到当前思维导图ID,无法创建节点");const mt=await it.addNodes(o.value,[Ie]);if(!mt.data||!mt.data.success)throw new Error("AI父节点创建失败");const Rt=(Y=(Q=(q=mt.data.data)==null?void 0:q.nodes)==null?void 0:Q[0])==null?void 0:Y.id;if(!Rt)throw new Error("无法获取创建的父节点ID");$e.forEach(yr=>{yr.parentId=Rt});let Jt=null;if($e.length>0&&(Jt=await it.addNodes(o.value,$e)),mt.data&&mt.data.success)await oe();else throw new Error("AI父节点创建失败")}catch(F){console.error("创建AI节点失败:",F),alert("创建AI回答节点失败: "+F.message)}},Ye=async()=>{if(s.value){try{const k=s.value.topic||s.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(k),me();else{const A=document.createElement("textarea");A.value=k,A.style.position="fixed",A.style.left="-999999px",A.style.top="-999999px",document.body.appendChild(A),A.focus(),A.select();const _=document.execCommand("copy");document.body.removeChild(A),_?me():St()}}catch{St()}s.value=null}},me=()=>{const k=document.createElement("div");k.textContent="文本已复制到剪贴板",k.style.cssText=`
+${he}`,ge=Ke(fe),Ie={title:A,des:`AI追问产生的节点 - ${new Date().toLocaleString()}`,parentId:k.id,isRoot:!1},$e=[];if(ge.children&&ge.children.length>0&&ge.children.forEach(yr=>{$e.push({title:yr.topic,des:"",parentId:null,isRoot:!1})}),console.log("当前思维导图ID:",o.value),!o.value)throw new Error("没有找到当前思维导图ID,无法创建节点");const gt=await it.addNodes(o.value,[Ie]);if(!gt.data||!gt.data.success)throw new Error("AI父节点创建失败");const Rt=(Y=(Q=(q=gt.data.data)==null?void 0:q.nodes)==null?void 0:Q[0])==null?void 0:Y.id;if(!Rt)throw new Error("无法获取创建的父节点ID");$e.forEach(yr=>{yr.parentId=Rt});let Jt=null;if($e.length>0&&(Jt=await it.addNodes(o.value,$e)),gt.data&>.data.success)await oe();else throw new Error("AI父节点创建失败")}catch(F){console.error("创建AI节点失败:",F),alert("创建AI回答节点失败: "+F.message)}},Ye=async()=>{if(s.value){try{const k=s.value.topic||s.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(k),me();else{const A=document.createElement("textarea");A.value=k,A.style.position="fixed",A.style.left="-999999px",A.style.top="-999999px",document.body.appendChild(A),A.focus(),A.select();const _=document.execCommand("copy");document.body.removeChild(A),_?me():St()}}catch{St()}s.value=null}},me=()=>{const k=document.createElement("div");k.textContent="文本已复制到剪贴板",k.style.cssText=`
     position: fixed;
     top: 20px;
     right: 20px;
@@ -498,7 +529,7 @@ ${he}`,ge=Ke(fe),Ie={title:A,des:`AI追问产生的节点 - ${new Date().toLocal
     z-index: 10000;
     box-shadow: 0 4px 12px rgba(0,0,0,0.15);
     animation: slideIn 0.3s ease;
-  `,document.body.appendChild(_),setTimeout(()=>{_.parentNode&&_.parentNode.removeChild(_)},2e3)},ft=()=>{const k=document.createElement("div");k.textContent="✅ 节点编辑已保存",k.style.cssText=`
+  `,document.body.appendChild(_),setTimeout(()=>{_.parentNode&&_.parentNode.removeChild(_)},2e3)},pt=()=>{const k=document.createElement("div");k.textContent="✅ 节点编辑已保存",k.style.cssText=`
     position: fixed;
     top: 20px;
     right: 20px;
@@ -510,7 +541,7 @@ ${he}`,ge=Ke(fe),Ie={title:A,des:`AI追问产生的节点 - ${new Date().toLocal
     z-index: 10000;
     box-shadow: 0 4px 12px rgba(0,0,0,0.15);
     animation: slideIn 0.3s ease;
-  `,document.body.appendChild(k),setTimeout(()=>{k.parentNode&&k.parentNode.removeChild(k)},2e3)},pt=()=>{const k=document.createElement("div");k.textContent="❌ 节点编辑保存失败",k.style.cssText=`
+  `,document.body.appendChild(k),setTimeout(()=>{k.parentNode&&k.parentNode.removeChild(k)},2e3)},mt=()=>{const k=document.createElement("div");k.textContent="❌ 节点编辑保存失败",k.style.cssText=`
     position: fixed;
     top: 20px;
     right: 20px;
@@ -522,7 +553,7 @@ ${he}`,ge=Ke(fe),Ie={title:A,des:`AI追问产生的节点 - ${new Date().toLocal
     z-index: 10000;
     box-shadow: 0 4px 12px rgba(0,0,0,0.15);
     animation: slideIn 0.3s ease;
-  `,document.body.appendChild(k),setTimeout(()=>{k.parentNode&&k.parentNode.removeChild(k)},3e3)},lt=async k=>{try{console.log("🎯 处理节点拖拽操作:",k.name),console.log("📦 操作详情:",{name:k.name,objs:k.objs,toObj:k.toObj}),setTimeout(async()=>{var A;try{const _=k.objs||[],q=k.toObj;if(!_.length||!q){console.warn("⚠️ 拖拽操作缺少必要信息");return}console.log(`📦 准备保存 ${_.length} 个节点的父子关系`);let Q=null;k.name==="moveNodeIn"?(Q=q.id,console.log(`📌 拖入操作:新父节点为 ${Q}`)):(k.name==="moveNodeBefore"||k.name==="moveNodeAfter")&&(Q=((A=q.parent)==null?void 0:A.id)||null,console.log(`📌 拖到兄弟位置:新父节点为 ${Q||"根节点"}`));const Y=_.map(async ge=>{try{console.log(`🔄 更新节点 ${ge.id} 的父节点为 ${Q||"根节点"}`);const Ie=await it.updateNode(ge.id,{newParentId:Q});return Ie.data&&Ie.data.success?(console.log(`✅ 节点 ${ge.id} 父子关系更新成功`),{success:!0,nodeId:ge.id}):(console.warn(`⚠️ 节点 ${ge.id} 父子关系更新失败:`,Ie),{success:!1,nodeId:ge.id})}catch(Ie){return console.error(`❌ 节点 ${ge.id} 父子关系更新失败:`,Ie),{success:!1,nodeId:ge.id,error:Ie}}}),F=await Promise.all(Y),he=F.filter(ge=>ge.success).length,fe=F.filter(ge=>!ge.success).length;console.log(`📊 拖拽保存结果: ${he} 成功, ${fe} 失败`)}catch(_){console.error("❌ 保存拖拽后的结构失败:",_),ot("❌ 节点拖拽保存失败","error")}},500)}catch(A){console.error("❌ 处理节点拖拽操作失败:",A)}},U=async k=>{try{const A=k.obj;A?await V(A):console.error("无法解析编辑操作:",k)}catch(A){console.error("处理编辑完成失败:",A)}},V=async k=>{var A,_;try{if(!o.value){console.error("无法获取思维导图ID");return}const q=await it.updateNode(k.id,{newTitle:k.topic,newDes:((A=k.data)==null?void 0:A.des)||"",newParentId:k.parentId||((_=k.parent)==null?void 0:_.id)});q.data&&q.data.success?ft():(console.error("更新节点编辑失败:",q.data),pt())}catch(q){console.error("更新节点编辑失败:",q),pt()}},Z=async k=>{var A;try{await x();const _=o.value||k.mindmap_id||k.mindmapId;if(!_){console.error("无法获取思维导图ID");return}const q=await it.addNodes(_,[{title:"新子节点",des:"子节点描述",parentId:k.id}]);if(q.data&&q.data.success){const Q=((A=q.data.data)==null?void 0:A.nodes)||[];if(Q.length>0){const Y=Q[0];try{await new Promise(he=>setTimeout(he,800));const F=await it.getMindmap(_);if(F.data&&F.data.nodeData){await D(F.data,!1,!1);try{console.log("🎯 开始居中显示新子节点:",Y.id),await $(Y.id)}catch(he){console.error("居中显示新节点失败:",he)}}else throw new Error("无法获取思维导图数据")}catch(F){console.error("刷新思维导图失败:",F)}}}}catch(_){console.error("添加子节点失败:",_)}},ie=async k=>{var A;try{await x(),console.log("添加兄弟节点到API:",k.id),console.log("节点信息:",{id:k.id,parentId:k.parentId,parent:k.parent,mindmap_id:k.mindmap_id,mindmapId:k.mindmapId});const _=o.value||k.mindmap_id||k.mindmapId;if(!_){console.error("无法获取思维导图ID");return}let q=k.parentId;!q&&k.parent&&(q=k.parent.id);const Q=await it.addNodes(_,[{title:"新兄弟节点",des:"兄弟节点描述",parentId:q}]);if(console.log("添加兄弟节点响应:",Q),Q.data&&Q.data.success){const Y=((A=Q.data.data)==null?void 0:A.nodes)||[];if(Y.length>0){const F=Y[0];console.log("新创建的兄弟节点:",F),console.log("🎯 使用MindElixir init方法重新初始化数据...");try{const he=await it.getMindmap(_);if(he.data&&he.data.nodeData){await D(he.data,!1,!1),console.log("✅ 思维导图刷新成功");try{console.log("🎯 开始居中显示新兄弟节点:",F.id),await $(F.id)}catch(fe){console.error("居中显示新节点失败:",fe)}}else throw new Error("无法获取思维导图数据")}catch(he){console.error("重新初始化失败,使用完整重新加载:",he);const fe=await it.getMindmap(_);fe.data&&fe.data.nodeData&&await D(fe.data,!0,!1)}}}}catch(_){console.error("添加兄弟节点失败:",_)}},we=async k=>{try{await x(),console.log("删除节点从API:",k.id);const A=await it.deleteNodes([k.id]);if(console.log("删除节点响应:",A),A.data&&A.data.success){const _=o.value||k.mindmap_id||k.mindmapId;if(_){const q=await it.getMindmap(_);q.data&&q.data.nodeData&&(await D(q.data,!0,!1),console.log("✅ 删除节点后思维导图已刷新,保持当前位置"))}}}catch(A){console.error("删除节点失败:",A)}},x=async()=>{const k=r.value;if(k){const A=k.querySelector("input:focus");if(A&&s.value){const _=A.value;_!==s.value.topic&&_.trim()!==""&&(console.log("保存当前编辑:",_),s.value.topic=_,await N(s.value))}}},N=async k=>{var A,_,q,Q,Y;try{console.log("保存Mind Elixir编辑,节点ID:",k.id),console.log("编辑内容:",{newTitle:k.topic,newDes:((A=k.data)==null?void 0:A.des)||""});const F=String(k.id),he=await it.updateNode(F,{newTitle:k.topic,newDes:((_=k.data)==null?void 0:_.des)||""});console.log("更新节点API响应:",he),console.log("节点编辑已保存到后端"),console.log("✅ 节点编辑已保存,无需重新加载")}catch(F){console.error("保存Mind Elixir编辑失败:",F),console.error("错误详情:",(q=F.response)==null?void 0:q.data),alert("保存编辑失败: "+(((Y=(Q=F.response)==null?void 0:Q.data)==null?void 0:Y.detail)||F.message))}},L=k=>{console.log("打开编辑模态框:",k),n.value.editText(k)},H=async(k,A,_)=>{var q,Q,Y;try{console.log("开始创建节点:",k.topic,"父节点ID:",_);const F=await it.addNodes(A,{title:k.topic||k.title||"无标题",des:((q=k.data)==null?void 0:q.des)||"",parentId:_});if(console.log("创建节点响应:",F),F.data&&F.data.success){const fe=(Y=(((Q=F.data.data)==null?void 0:Q.nodes)||[])[0])==null?void 0:Y.id;if(console.log("当前节点ID:",fe),k.children&&k.children.length>0){console.log("开始创建子节点,数量:",k.children.length);for(const ge of k.children)await H(ge,A,fe)}else console.log("节点没有子节点,创建完成")}else console.error("创建节点失败,响应:",F)}catch(F){console.error("创建节点失败:",F)}};let B=null,j=null;const te=()=>{if(!n.value)return;console.log("绑定事件监听器..."),B&&r.value.removeEventListener("wheel",B),j&&r.value.removeEventListener("click",j),B=_=>{if(_.ctrlKey||_.metaKey){_.preventDefault();const q=_.deltaY>0?.9:1.1,Q=Math.max(.3,Math.min(3,l.value*q));if(n.value){const Y=r.value.querySelector(".map-container");Y&&(Y.style.transform=`scale(${Q})`,l.value=Q,localStorage.setItem("mindmap-zoom-level",Q.toString()))}}},r.value.addEventListener("wheel",B),n.value.bus.addListener("select",_=>{s.value=_,setTimeout(()=>{K()},50)}),n.value.bus.addListener("selectNode",_=>{s.value=_,setTimeout(()=>{K()},50)}),n.value.bus.addListener("scale",_=>{Math.abs(_-1)<.01&&Math.abs(l.value-1)>.01&&setTimeout(()=>{ne()},50)}),window.zoomIntervalId&&clearInterval(window.zoomIntervalId);const k=setInterval(()=>{l.value!==1&&r.value&&se()},500);window.zoomIntervalId=k;let A=0;j=_=>{const q=Date.now();if(q-A<100)return;A=q;const Q=_.target,Y=Q.closest("me-tpc")||Q.closest(".topic")||(Q.classList.contains("topic")?Q:null)||(Q.tagName==="ME-TPC"?Q:null);if(Y){const F=Y.nodeObj;if(F){s.value=F;const he=r.value.getBoundingClientRect(),fe=Y.getBoundingClientRect(),ge=fe.left-he.left+fe.width/2,Ie=fe.bottom-he.top+8;i.value={left:`${ge}px`,top:`${Ie}px`}}}else s.value=null,f.value&&(f.value=!1,p.value=null,v.value="",b.value=!1)},r.value.addEventListener("click",j),n.value.bus.addListener("edit",_=>{console.log("edit事件触发:",_),L(_)}),n.value.bus.addListener("editFinish",_=>{console.log("editFinish事件触发:",_),U(_)}),n.value.bus.addListener("operation",_=>{console.log("Mind Elixir操作事件:",_),_.name==="moveNodeIn"||_.name==="moveNodeBefore"||_.name==="moveNodeAfter"?(console.log("检测到节点拖拽操作:",_.name,_),lt(_)):_.name==="finishEdit"&&(console.log("检测到编辑完成操作:",_),U(_))}),n.value.bus.addListener("removeNode",_=>{console.log("删除节点:",_),we(_)})},ne=()=>{if(n.value){const k=localStorage.getItem("mindmap-zoom-level");if(k){const A=parseFloat(k);if(A>=.3&&A<=3){const _=r.value.querySelector(".map-container");_&&(_.style.transform=`scale(${A})`,l.value=A)}}}},se=()=>{if(n.value&&l.value!==1&&r.value){const k=r.value.querySelector(".map-container");k&&(k.style.transform=`scale(${l.value})`)}},W=async()=>{var k;if(console.log("🚀🚀🚀 保存函数被调用 🚀🚀🚀"),console.log("🔍 mindElixir.value:",n.value),console.log("🔍 currentMindmapId.value:",o.value),console.log("🔍 mindmapEl.value:",r.value),console.log("🔍🔍🔍 全局状态检查开始 🔍🔍🔍"),console.log("🔍 - showWelcome:",c.value),console.log("🔍 - 是否有思维导图容器:",!!r.value),console.log("🔍 - MindElixir实例状态:",!!n.value),console.log("🔍🔍🔍 全局状态检查结束 🔍🔍🔍"),n.value&&n.value.data?(console.log("🔍🔍🔍 MindElixir数据检查开始 🔍🔍🔍"),console.log("🔍 - 数据对象:",n.value.data),console.log("🔍 - 数据字段:",Object.keys(n.value.data)),console.log("🔍 - 是否有nodeData:",!!n.value.data.nodeData),console.log("🔍 - 是否有nodes:",!!n.value.data.nodes),console.log("🔍🔍🔍 MindElixir数据检查结束 🔍🔍🔍")):console.log("⚠️ MindElixir数据不存在或为空"),!n.value||!o.value){if(console.warn("⚠️ 没有可保存的思维导图数据"),console.warn("🔍 mindElixir.value 状态:",!!n.value),console.warn("🔍 currentMindmapId.value 状态:",!!o.value),n.value&&n.value.data&&(console.log("🔍 尝试从MindElixir数据中获取ID"),console.log("🔍 MindElixir数据:",n.value.data),n.value.data.mindmapId?(o.value=n.value.data.mindmapId,console.log("🔍 从MindElixir数据中获取到mindmapId:",n.value.data.mindmapId)):n.value.data.mindmap_id&&(o.value=n.value.data.mindmap_id,console.log("🔍 从MindElixir数据中获取到mindmap_id:",n.value.data.mindmap_id))),!o.value&&n.value){if(console.log("🔍 尝试重新初始化MindElixir数据..."),console.log("🔍 MindElixir实例属性:",Object.keys(n.value)),console.log("🔍 MindElixir实例方法:",Object.getOwnPropertyNames(Object.getPrototypeOf(n.value))),n.value.getData){const A=n.value.getData();console.log("🔍 通过getData()获取的数据:",A),A&&A.nodeData&&(console.log("🔍 nodeData详情:",A.nodeData),A.nodeData.mindmapId?(o.value=A.nodeData.mindmapId,console.log("🔍 从nodeData.mindmapId获取到ID:",A.nodeData.mindmapId)):A.nodeData.mindmap_id?(o.value=A.nodeData.mindmap_id,console.log("🔍 从nodeData.mindmap_id获取到ID:",A.nodeData.mindmap_id)):(console.log("🔍 nodeData中没有找到mindmapId字段"),console.log("🔍 nodeData字段:",Object.keys(A.nodeData)))),!o.value&&A&&(console.log("🔍 检查其他可能的ID字段..."),A.id?(o.value=A.id,console.log("🔍 从data.id获取到ID:",A.id)):A.mindmapId&&(o.value=A.mindmapId,console.log("🔍 从data.mindmapId获取到ID:",A.mindmapId)))}n.value.mindElixirData&&(console.log("🔍 mindElixirData:",n.value.mindElixirData),n.value.mindElixirData.id&&(o.value=n.value.mindElixirData.id,console.log("🔍 从mindElixirData获取到ID:",n.value.mindElixirData.id)))}if(!o.value){console.warn("⚠️ 仍然无法获取思维导图ID,无法保存"),console.warn("🔍 建议:请先加载一个思维导图,然后再尝试保存");return}}try{console.log("💾 开始保存思维导图..."),console.log("🔍 当前思维导图ID:",o.value),console.log("🔍 MindElixir实例:",n.value);let A=null;if(n.value&&n.value.getData?(A=n.value.getData(),console.log("🔍 通过getData()获取的数据:",A)):(A=n.value.data,console.log("🔍 通过data属性获取的数据:",A)),!A){console.warn("⚠️ MindElixir数据为空");return}let _=[];console.log("🔍 数据结构分析:"),console.log("🔍 - currentData.nodeData:",A.nodeData),console.log("🔍 - currentData.nodes:",A.nodes),console.log("🔍 - currentData.nodeData.children:",(k=A.nodeData)==null?void 0:k.children);const q=F=>{F&&F.id&&(_.push(F),console.log(`🔍 收集节点: ${F.id} - ${F.topic||F.content||"无标题"}`),F.children&&F.children.length>0&&F.children.forEach(he=>q(he)))};if(A.nodeData)q(A.nodeData),console.log("🔍 从根节点收集到节点数量:",_.length);else if(A.nodes&&Array.isArray(A.nodes))A.nodes.forEach(F=>q(F)),console.log("🔍 从nodes数组收集到节点数量:",_.length);else if(Array.isArray(A))A.forEach(F=>q(F)),console.log("🔍 从currentData数组收集到节点数量:",_.length);else{console.warn("⚠️ 无法找到节点数据"),console.log("🔍 可用的数据字段:",Object.keys(A));return}if(_.length===0){console.warn("⚠️ 没有收集到任何节点");return}console.log("🔍 找到节点数据:",_),console.log("🔍 节点数量:",_.length),console.log("🔍 节点数据类型:",Array.isArray(_)?"数组":typeof _);const Q=[];if(_.forEach((F,he)=>{if(console.log(`🔍 处理节点 ${he}:`,F),F&&F.id){const fe=F.topic||F.content||F.text||"",ge=F.x||F.offsetX||0,Ie=F.y||F.offsetY||0;console.log(`🔍 节点 ${F.id} 内容:`,fe,"位置:",{x:ge,y:Ie});const $e={content:fe,position:{x:ge,y:Ie}};(F.parentId||F.parent)&&($e.parentId=F.parentId||F.parent,console.log(`🔍 节点 ${F.id} 父节点:`,$e.parentId)),console.log(`🔍 准备保存节点 ${F.id}:`,$e),Q.push(it.updateNode(F.id,$e).then(mt=>{console.log(`✅ 节点 ${F.id} 保存成功:`,mt)}).catch(mt=>{console.error(`❌ 节点 ${F.id} 保存失败:`,mt)}))}else console.warn(`⚠️ 节点 ${he} 缺少ID:`,F)}),console.log("🔍 准备保存的节点数量:",Q.length),Q.length===0){console.warn("⚠️ 没有找到需要保存的节点");return}const Y=await Promise.all(Q);console.log("🔍 保存结果:",Y),console.log("🎉 思维导图保存完成!"),console.log("🔄 保存完成,开始自动刷新..."),await oe()}catch(A){console.error("❌ 保存思维导图失败:",A)}},oe=async()=>{if(!o.value){console.warn("⚠️ 没有当前思维导图ID,无法刷新");return}try{console.log("🔄 开始刷新思维导图...");const k=await it.getMindmap(o.value);k.data&&k.data.nodeData?(console.log("✅ 获取到最新数据,开始刷新显示..."),await D(k.data,!0,!1),console.log("🎉 思维导图刷新完成!")):console.warn("⚠️ 无法获取思维导图数据")}catch(k){console.error("❌ 刷新思维导图失败:",k)}},le=async(k,A)=>{try{const _=String(o.value||"");if(n.value&&_&&_.startsWith("temp-")){console.log("🔄 检测到实时渲染的思维导图,将保存到数据库并更新ID");const Y=S();console.log("📍 保存当前位置:",Y);const F=await it.createMindmap(A||"预览思维导图",k);if(console.log("🔄 创建思维导图响应:",F),F.data&&F.data.id){const he=F.data.id;console.log("🎉 创建思维导图成功,新思维导图的ID是:",he);const fe=o.value;if(o.value=he,n.value&&n.value.data){n.value.data.mindmapId=he,n.value.data.id=he;const ge=Ie=>{Ie&&(Ie.mindmapId=he,Ie.children&&Ie.children.forEach($e=>ge($e)))};n.value.data.nodeData&&ge(n.value.data.nodeData)}console.log("✅ 已更新思维导图ID,保持视图状态"),console.log("🔄 从临时ID",fe,"更新为正式ID",he),Y&&setTimeout(()=>{E(Y),console.log("📍 已恢复位置和缩放状态")},100),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:he,title:A,timestamp:Date.now(),fromRealtime:!0}}));return}}console.log("🔄 没有检测到实时渲染的思维导图,使用标准保存流程");const Q=await it.createMindmap(A||"预览思维导图",k);if(console.log("🔄 创建思维导图响应:",Q),Q.data&&Q.data.id){const Y=Q.data.id;if(console.log("🎉 创建思维导图成功,新思维导图的ID是:",Y),console.log("📊 响应数据详情:",Q.data),Q.data.nodeData)console.log("✅ 思维导图创建时已包含节点数据,直接加载"),o.value=Y,w(),await D(Q.data),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:Y,title:A,timestamp:Date.now()}})),setTimeout(async()=>{try{console.log("🔄 重新加载思维导图数据...");const F=await it.getMindmap(Y);F.data&&F.data.nodeData&&(await D(F.data),console.log("✅ 思维导图数据重新加载成功"))}catch(F){console.error("❌ 重新加载思维导图失败:",F)}},1500);else{console.log("🔧 需要递归创建节点"),await H(k,Y,null),console.log("📥 开始加载新创建的思维导图,ID:",Y);const F=await it.getMindmap(Y);console.log("🔄 加载思维导图响应:",F),F.data&&F.data.nodeData?(console.log("✅ 成功获取思维导图数据,开始加载显示"),o.value=Y,w(),await D(F.data),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:Y,title:A,timestamp:Date.now()}})),setTimeout(async()=>{try{console.log("🔄 重新加载思维导图数据...");const he=await it.getMindmap(Y);he.data&&he.data.nodeData&&(await D(he.data),console.log("✅ 思维导图数据重新加载成功"))}catch(he){console.error("❌ 重新加载思维导图失败:",he)}},1500)):console.error("❌ 获取思维导图数据失败:",F)}}}catch(_){console.error("❌ 保存预览数据到数据库失败:",_)}},de=async k=>{try{if(console.log("📚 开始从历史记录加载思维导图:",k.title),w(),k.mindmapId){console.log("🎯 使用思维导图ID加载:",k.mindmapId);const A=await it.getMindmap(k.mindmapId);if(A.data&&A.data.nodeData)await D(A.data);else throw new Error("无法获取思维导图数据")}else if(k.json)console.log("📊 使用历史记录中的JSON数据"),await D(k.json);else if(k.markdown){console.log("📝 使用历史记录中的Markdown数据,尝试转换为JSON");try{const A=await convertMarkdownToJSON(k.markdown);if(A)await D(A);else throw new Error("Markdown转换失败")}catch(A){console.error("Markdown转换失败:",A)}}}catch(A){console.error("❌ 从历史记录加载思维导图失败:",A)}};Oa(async()=>{window.addEventListener("save-preview-to-database",k=>{console.log("🎯 收到保存到数据库事件:",k.detail),console.log("📋 事件详情 - 标题:",k.detail.title,"来源:",k.detail.source,"时间戳:",new Date(k.detail.timestamp).toLocaleString()),le(k.detail.data,k.detail.title)}),window.addEventListener("realtime-mindmap-update",k=>{console.log("🔄 收到实时思维导图更新事件:",k.detail),Re(k.detail.data,k.detail.title)}),window.addEventListener("loadMindmapFromHistory",k=>{console.log("📚 收到从历史记录加载思维导图事件:",k.detail),console.log("🔍 事件数据详情:",k.detail),de(k.detail)}),window.addEventListener("ai-sidebar-toggle",k=>{console.log("🤖 AI侧边栏折叠状态变化:",k.detail.isCollapsed),d.value=k.detail.isCollapsed}),y()});const Se=()=>{window.zoomIntervalId&&(clearInterval(window.zoomIntervalId),window.zoomIntervalId=null),r.value&&(B&&(r.value.removeEventListener("wheel",B),B=null),j&&(r.value.removeEventListener("click",j),j=null)),console.log("✅ 已清理所有定时器和事件监听器")};La(()=>{Se()}),e({showMindMapPage:M,cleanupIntervals:Se});const Re=async(k,A)=>{try{if(n.value){console.log("🔄 更新现有思维导图数据");try{const _=S(),q=String(o.value||""),Q=q&&q.startsWith("temp-")?q:`temp-${Date.now()}`,Y={nodeData:k,mindmapId:Q,id:Q,title:A||"AI生成中..."};(!q||!q.startsWith("temp-"))&&(o.value=Q,console.log("🆔 更新临时思维导图ID:",Q));const F=n.value.init(Y);_&&setTimeout(()=>{E(_)},100)}catch(_){console.error("❌ 更新思维导图数据失败:",_)}}else{w(),await X0();let _=0;for(;!r.value&&_<20;)await new Promise(F=>setTimeout(F,50)),await X0(),_++;if(!r.value){console.error("❌ 思维导图容器仍未准备好,跳过此次更新");return}n.value=new gt({el:r.value,direction:gt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!0,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(F,he)=>F.includes("|")||F.includes("**")||F.includes("`")||F.includes("#")||F.includes("$")||F.includes("![")?K0(F):F});const q=`temp-${Date.now()}`,Q={nodeData:k,mindmapId:q,id:q,title:A||"AI生成中..."};o.value=q,console.log("🆔 设置临时思维导图ID:",q);const Y=n.value.init(Q);console.log("✅ 实时思维导图实例创建成功"),te(),O()}}catch(_){console.error("❌ 实时更新思维导图失败:",_)}};return(k,A)=>(He(),Ue("div",o7,[c.value?(He(),Ue("div",l7,[J("div",{class:Ln(["welcome-content",{"ai-sidebar-collapsed":d.value}])},[...A[1]||(A[1]=[Ko('

🧠 思维导图工具

可视化您的想法,构建知识体系

🎯

智能AI生成

上传文档,AI自动生成思维导图结构

✏️

灵活编辑

拖拽节点,自由调整思维导图布局

💾

云端存储

自动保存,多设备同步访问

💡 提示:使用左侧AI侧边栏可以快速生成思维导图内容

',3)])],2)])):Sr("",!0),f.value?(He(),Ue("div",{key:1,class:"ai-input-area",style:On(a.value)},[J("div",{class:"ai-input-header"},[A[2]||(A[2]=J("span",{class:"ai-input-title"},"🤖 询问AI",-1)),J("button",{onClick:Ge,class:"ai-close-btn"},"×")]),J("div",c7,[hs(J("textarea",{"onUpdate:modelValue":A[0]||(A[0]=_=>v.value=_),placeholder:"请输入您的问题...",rows:"2",disabled:b.value,onKeydown:[bi(vi(st,["exact"]),["enter"]),bi(vi(_e,["ctrl"]),["enter"]),bi(vi(_e,["meta"]),["enter"])]},null,40,u7),[[Pa,v.value]]),J("div",d7,[J("button",{onClick:Ge,class:"btn-cancel",disabled:b.value}," 取消 ",8,h7),J("button",{onClick:_e,class:"btn-submit",disabled:!v.value.trim()||b.value},[b.value?(He(),Ue("span",p7,"AI思考中...")):(He(),Ue("span",m7,"询问AI"))],8,f7)])])],4)):Sr("",!0),c.value?Sr("",!0):(He(),Ue("div",{key:2,ref_key:"mindmapEl",ref:r,class:"mindmap-el"},null,512)),c.value?Sr("",!0):(He(),Ue("div",g7,[J("button",{onClick:W,class:"save-btn",title:"保存思维导图",style:{display:"none"}},[...A[3]||(A[3]=[J("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[J("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),J("polyline",{points:"17,21 17,13 7,13 7,21"}),J("polyline",{points:"7,3 7,8 15,8"})],-1),J("span",null,"保存",-1)])]),J("button",{onClick:oe,class:"refresh-btn",title:"刷新思维导图",style:{display:"none"}},[...A[4]||(A[4]=[J("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[J("path",{d:"M1 4v6h6"}),J("path",{d:"M23 20v-6h-6"}),J("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),J("span",null,"刷新",-1)])])])),s.value?(He(),Ue("div",{key:4,class:"context-menu",style:On(i.value)},[s.value.parentId||s.value.parent?(He(),Ue("div",{key:0,class:"context-menu-item",onClick:pe,title:"Add a sibling card"},[...A[5]||(A[5]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[J("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)])])):Sr("",!0),J("div",{class:"context-menu-item",onClick:G,title:"Add a child card"},[...A[6]||(A[6]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[J("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)])]),J("div",{class:"context-menu-item",onClick:Ye,title:"Copy text"},[...A[7]||(A[7]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[J("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)])]),J("div",{class:"context-menu-item ask-ai",onClick:Ee,title:"Ask AI"},[...A[8]||(A[8]=[Ko('',1)])]),J("div",{class:"context-menu-item delete",onClick:ye,title:"Delete"},[...A[9]||(A[9]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[J("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"}),J("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)):Sr("",!0)]))}},b7=_o(v7,[["__scopeId","data-v-e215cac4"]]),y7="modulepreload",w7=function(t){return"/"+t},Nc={},Dc=function(e,r,n){if(!r||r.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=w7(i),i in Nc)return;Nc[i]=!0;const a=i.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!n)for(let d=s.length-1;d>=0;d--){const f=s[d];if(f.href===i&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${o}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":y7,a||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),a)return new Promise((d,f)=>{c.addEventListener("load",d),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})};const x7={class:"ai-sidebar-wrapper"},k7=["title"],S7={key:0,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},T7={key:1,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},E7={class:"sidebar-content"},A7={class:"section"},C7={class:"input-group"},M7={key:0,class:"file-info"},N7={class:"file-details"},D7={class:"file-info-left"},R7={class:"file-name"},I7={class:"file-size"},_7={class:"button-group file-action-buttons"},O7=["disabled"],L7={key:0},z7={key:1},$7={key:0,class:"section"},F7={class:"history-list"},B7=["onClick"],P7={class:"history-title"},H7={class:"history-time"},q7={class:"section"},j7={class:"input-group"},U7={class:"button-group"},V7=["disabled"],W7={key:0},G7={key:1},K7={class:"section"},Y7={key:0,class:"processing-status"},X7={class:"result-container"},J7={class:"json-result"},Z7={class:"button-group"},Q7=["disabled"],e8={__name:"AISidebar",emits:["start-realtime-generation"],setup(t,{emit:e}){const r=e,n=Oe(!1),s=Oe(""),i=Oe(""),a=Oe(""),o=Oe(!1),l=Oe(!1),c=Oe([]),d=Oe(!1);Oe(""),Oe("");const f=Oe(!1),p=Oe(""),v=Oe(null),b=Oe(null),y=()=>{n.value=!n.value,window.dispatchEvent(new CustomEvent("ai-sidebar-toggle",{detail:{isCollapsed:n.value}}))},w=U=>{const V=U.target.files[0];V&&(b.value=V,me("文件上传成功!","success"))},M=U=>{U.preventDefault(),d.value=!1;const V=U.dataTransfer.files;if(V.length>0){const Z=V[0],ie=[".txt",".md",".doc",".docx",".pdf"],we="."+Z.name.split(".").pop().toLowerCase();ie.includes(we)?(b.value=Z,me("文件拖拽上传成功!","success")):me("不支持的文件格式!请上传 .txt, .md, .doc, .docx, .pdf 格式的文件","error")}},S=U=>{U.preventDefault(),d.value=!0},E=U=>{U.preventDefault(),d.value=!1},D=()=>{b.value=null,v.value&&(v.value.value="")},I=U=>{if(U===0)return"0 Bytes";const V=1024,Z=["Bytes","KB","MB","GB"],ie=Math.floor(Math.log(U)/Math.log(V));return parseFloat((U/Math.pow(V,ie)).toFixed(2))+" "+Z[ie]},O=async()=>{if(!b.value){me("请先上传文件","error");return}o.value=!0,r("start-realtime-generation");try{const U=await $(b.value);i.value="";const V=`你是一个专业的文档分析专家。请分析上传的文档内容,生成结构化的Markdown格式思维导图。要求: + `,document.body.appendChild(k),setTimeout(()=>{k.parentNode&&k.parentNode.removeChild(k)},3e3)},lt=async k=>{try{console.log("🎯 处理节点拖拽操作:",k.name),console.log("📦 操作详情:",{name:k.name,objs:k.objs,toObj:k.toObj}),setTimeout(async()=>{var A;try{const _=k.objs||[],q=k.toObj;if(!_.length||!q){console.warn("⚠️ 拖拽操作缺少必要信息");return}console.log(`📦 准备保存 ${_.length} 个节点的父子关系`);let Q=null;k.name==="moveNodeIn"?(Q=q.id,console.log(`📌 拖入操作:新父节点为 ${Q}`)):(k.name==="moveNodeBefore"||k.name==="moveNodeAfter")&&(Q=((A=q.parent)==null?void 0:A.id)||null,console.log(`📌 拖到兄弟位置:新父节点为 ${Q||"根节点"}`));const Y=_.map(async ge=>{try{console.log(`🔄 更新节点 ${ge.id} 的父节点为 ${Q||"根节点"}`);const Ie=await it.updateNode(ge.id,{newParentId:Q});return Ie.data&&Ie.data.success?(console.log(`✅ 节点 ${ge.id} 父子关系更新成功`),{success:!0,nodeId:ge.id}):(console.warn(`⚠️ 节点 ${ge.id} 父子关系更新失败:`,Ie),{success:!1,nodeId:ge.id})}catch(Ie){return console.error(`❌ 节点 ${ge.id} 父子关系更新失败:`,Ie),{success:!1,nodeId:ge.id,error:Ie}}}),F=await Promise.all(Y),he=F.filter(ge=>ge.success).length,fe=F.filter(ge=>!ge.success).length;console.log(`📊 拖拽保存结果: ${he} 成功, ${fe} 失败`)}catch(_){console.error("❌ 保存拖拽后的结构失败:",_),ot("❌ 节点拖拽保存失败","error")}},500)}catch(A){console.error("❌ 处理节点拖拽操作失败:",A)}},U=async k=>{try{const A=k.obj;A?await V(A):console.error("无法解析编辑操作:",k)}catch(A){console.error("处理编辑完成失败:",A)}},V=async k=>{var A,_;try{if(!o.value){console.error("无法获取思维导图ID");return}const q=await it.updateNode(k.id,{newTitle:k.topic,newDes:((A=k.data)==null?void 0:A.des)||"",newParentId:k.parentId||((_=k.parent)==null?void 0:_.id)});q.data&&q.data.success?pt():(console.error("更新节点编辑失败:",q.data),mt())}catch(q){console.error("更新节点编辑失败:",q),mt()}},Z=async k=>{var A;try{await x();const _=o.value||k.mindmap_id||k.mindmapId;if(!_){console.error("无法获取思维导图ID");return}const q=await it.addNodes(_,[{title:"新子节点",des:"子节点描述",parentId:k.id}]);if(q.data&&q.data.success){const Q=((A=q.data.data)==null?void 0:A.nodes)||[];if(Q.length>0){const Y=Q[0];try{await new Promise(he=>setTimeout(he,800));const F=await it.getMindmap(_);if(F.data&&F.data.nodeData){await D(F.data,!1,!1);try{console.log("🎯 开始居中显示新子节点:",Y.id),await $(Y.id)}catch(he){console.error("居中显示新节点失败:",he)}}else throw new Error("无法获取思维导图数据")}catch(F){console.error("刷新思维导图失败:",F)}}}}catch(_){console.error("添加子节点失败:",_)}},ie=async k=>{var A;try{await x(),console.log("添加兄弟节点到API:",k.id),console.log("节点信息:",{id:k.id,parentId:k.parentId,parent:k.parent,mindmap_id:k.mindmap_id,mindmapId:k.mindmapId});const _=o.value||k.mindmap_id||k.mindmapId;if(!_){console.error("无法获取思维导图ID");return}let q=k.parentId;!q&&k.parent&&(q=k.parent.id);const Q=await it.addNodes(_,[{title:"新兄弟节点",des:"兄弟节点描述",parentId:q}]);if(console.log("添加兄弟节点响应:",Q),Q.data&&Q.data.success){const Y=((A=Q.data.data)==null?void 0:A.nodes)||[];if(Y.length>0){const F=Y[0];console.log("新创建的兄弟节点:",F),console.log("🎯 使用MindElixir init方法重新初始化数据...");try{const he=await it.getMindmap(_);if(he.data&&he.data.nodeData){await D(he.data,!1,!1),console.log("✅ 思维导图刷新成功");try{console.log("🎯 开始居中显示新兄弟节点:",F.id),await $(F.id)}catch(fe){console.error("居中显示新节点失败:",fe)}}else throw new Error("无法获取思维导图数据")}catch(he){console.error("重新初始化失败,使用完整重新加载:",he);const fe=await it.getMindmap(_);fe.data&&fe.data.nodeData&&await D(fe.data,!0,!1)}}}}catch(_){console.error("添加兄弟节点失败:",_)}},we=async k=>{try{await x(),console.log("删除节点从API:",k.id);const A=await it.deleteNodes([k.id]);if(console.log("删除节点响应:",A),A.data&&A.data.success){const _=o.value||k.mindmap_id||k.mindmapId;if(_){const q=await it.getMindmap(_);q.data&&q.data.nodeData&&(await D(q.data,!0,!1),console.log("✅ 删除节点后思维导图已刷新,保持当前位置"))}}}catch(A){console.error("删除节点失败:",A)}},x=async()=>{const k=r.value;if(k){const A=k.querySelector("input:focus");if(A&&s.value){const _=A.value;_!==s.value.topic&&_.trim()!==""&&(console.log("保存当前编辑:",_),s.value.topic=_,await N(s.value))}}},N=async k=>{var A,_,q,Q,Y;try{console.log("保存Mind Elixir编辑,节点ID:",k.id),console.log("编辑内容:",{newTitle:k.topic,newDes:((A=k.data)==null?void 0:A.des)||""});const F=String(k.id),he=await it.updateNode(F,{newTitle:k.topic,newDes:((_=k.data)==null?void 0:_.des)||""});console.log("更新节点API响应:",he),console.log("节点编辑已保存到后端"),console.log("✅ 节点编辑已保存,无需重新加载")}catch(F){console.error("保存Mind Elixir编辑失败:",F),console.error("错误详情:",(q=F.response)==null?void 0:q.data),alert("保存编辑失败: "+(((Y=(Q=F.response)==null?void 0:Q.data)==null?void 0:Y.detail)||F.message))}},L=k=>{console.log("打开编辑模态框:",k),n.value.editText(k)},H=async(k,A,_)=>{var q,Q,Y;try{console.log("开始创建节点:",k.topic,"父节点ID:",_);const F=await it.addNodes(A,{title:k.topic||k.title||"无标题",des:((q=k.data)==null?void 0:q.des)||"",parentId:_});if(console.log("创建节点响应:",F),F.data&&F.data.success){const fe=(Y=(((Q=F.data.data)==null?void 0:Q.nodes)||[])[0])==null?void 0:Y.id;if(console.log("当前节点ID:",fe),k.children&&k.children.length>0){console.log("开始创建子节点,数量:",k.children.length);for(const ge of k.children)await H(ge,A,fe)}else console.log("节点没有子节点,创建完成")}else console.error("创建节点失败,响应:",F)}catch(F){console.error("创建节点失败:",F)}};let B=null,j=null;const te=()=>{if(!n.value)return;console.log("绑定事件监听器..."),B&&r.value.removeEventListener("wheel",B),j&&r.value.removeEventListener("click",j),B=_=>{if(_.ctrlKey||_.metaKey){_.preventDefault();const q=_.deltaY>0?.9:1.1,Q=Math.max(.3,Math.min(3,l.value*q));if(n.value){const Y=r.value.querySelector(".map-container");Y&&(Y.style.transform=`scale(${Q})`,l.value=Q,localStorage.setItem("mindmap-zoom-level",Q.toString()))}}},r.value.addEventListener("wheel",B),n.value.bus.addListener("select",_=>{s.value=_,setTimeout(()=>{K()},50)}),n.value.bus.addListener("selectNode",_=>{s.value=_,setTimeout(()=>{K()},50)}),n.value.bus.addListener("scale",_=>{Math.abs(_-1)<.01&&Math.abs(l.value-1)>.01&&setTimeout(()=>{ne()},50)}),window.zoomIntervalId&&clearInterval(window.zoomIntervalId);const k=setInterval(()=>{l.value!==1&&r.value&&se()},500);window.zoomIntervalId=k;let A=0;j=_=>{const q=Date.now();if(q-A<100)return;A=q;const Q=_.target,Y=Q.closest("me-tpc")||Q.closest(".topic")||(Q.classList.contains("topic")?Q:null)||(Q.tagName==="ME-TPC"?Q:null);if(Y){const F=Y.nodeObj;if(F){s.value=F;const he=r.value.getBoundingClientRect(),fe=Y.getBoundingClientRect(),ge=fe.left-he.left+fe.width/2,Ie=fe.bottom-he.top+8;i.value={left:`${ge}px`,top:`${Ie}px`}}}else s.value=null,f.value&&(f.value=!1,p.value=null,g.value="",b.value=!1)},r.value.addEventListener("click",j),n.value.bus.addListener("edit",_=>{console.log("edit事件触发:",_),L(_)}),n.value.bus.addListener("editFinish",_=>{console.log("editFinish事件触发:",_),U(_)}),n.value.bus.addListener("operation",_=>{console.log("Mind Elixir操作事件:",_),_.name==="moveNodeIn"||_.name==="moveNodeBefore"||_.name==="moveNodeAfter"?(console.log("检测到节点拖拽操作:",_.name,_),lt(_)):_.name==="finishEdit"&&(console.log("检测到编辑完成操作:",_),U(_))}),n.value.bus.addListener("removeNode",_=>{console.log("删除节点:",_),we(_)})},ne=()=>{if(n.value){const k=localStorage.getItem("mindmap-zoom-level");if(k){const A=parseFloat(k);if(A>=.3&&A<=3){const _=r.value.querySelector(".map-container");_&&(_.style.transform=`scale(${A})`,l.value=A)}}}},se=()=>{if(n.value&&l.value!==1&&r.value){const k=r.value.querySelector(".map-container");k&&(k.style.transform=`scale(${l.value})`)}},W=async()=>{var k;if(console.log("🚀🚀🚀 保存函数被调用 🚀🚀🚀"),console.log("🔍 mindElixir.value:",n.value),console.log("🔍 currentMindmapId.value:",o.value),console.log("🔍 mindmapEl.value:",r.value),console.log("🔍🔍🔍 全局状态检查开始 🔍🔍🔍"),console.log("🔍 - showWelcome:",c.value),console.log("🔍 - 是否有思维导图容器:",!!r.value),console.log("🔍 - MindElixir实例状态:",!!n.value),console.log("🔍🔍🔍 全局状态检查结束 🔍🔍🔍"),n.value&&n.value.data?(console.log("🔍🔍🔍 MindElixir数据检查开始 🔍🔍🔍"),console.log("🔍 - 数据对象:",n.value.data),console.log("🔍 - 数据字段:",Object.keys(n.value.data)),console.log("🔍 - 是否有nodeData:",!!n.value.data.nodeData),console.log("🔍 - 是否有nodes:",!!n.value.data.nodes),console.log("🔍🔍🔍 MindElixir数据检查结束 🔍🔍🔍")):console.log("⚠️ MindElixir数据不存在或为空"),!n.value||!o.value){if(console.warn("⚠️ 没有可保存的思维导图数据"),console.warn("🔍 mindElixir.value 状态:",!!n.value),console.warn("🔍 currentMindmapId.value 状态:",!!o.value),n.value&&n.value.data&&(console.log("🔍 尝试从MindElixir数据中获取ID"),console.log("🔍 MindElixir数据:",n.value.data),n.value.data.mindmapId?(o.value=n.value.data.mindmapId,console.log("🔍 从MindElixir数据中获取到mindmapId:",n.value.data.mindmapId)):n.value.data.mindmap_id&&(o.value=n.value.data.mindmap_id,console.log("🔍 从MindElixir数据中获取到mindmap_id:",n.value.data.mindmap_id))),!o.value&&n.value){if(console.log("🔍 尝试重新初始化MindElixir数据..."),console.log("🔍 MindElixir实例属性:",Object.keys(n.value)),console.log("🔍 MindElixir实例方法:",Object.getOwnPropertyNames(Object.getPrototypeOf(n.value))),n.value.getData){const A=n.value.getData();console.log("🔍 通过getData()获取的数据:",A),A&&A.nodeData&&(console.log("🔍 nodeData详情:",A.nodeData),A.nodeData.mindmapId?(o.value=A.nodeData.mindmapId,console.log("🔍 从nodeData.mindmapId获取到ID:",A.nodeData.mindmapId)):A.nodeData.mindmap_id?(o.value=A.nodeData.mindmap_id,console.log("🔍 从nodeData.mindmap_id获取到ID:",A.nodeData.mindmap_id)):(console.log("🔍 nodeData中没有找到mindmapId字段"),console.log("🔍 nodeData字段:",Object.keys(A.nodeData)))),!o.value&&A&&(console.log("🔍 检查其他可能的ID字段..."),A.id?(o.value=A.id,console.log("🔍 从data.id获取到ID:",A.id)):A.mindmapId&&(o.value=A.mindmapId,console.log("🔍 从data.mindmapId获取到ID:",A.mindmapId)))}n.value.mindElixirData&&(console.log("🔍 mindElixirData:",n.value.mindElixirData),n.value.mindElixirData.id&&(o.value=n.value.mindElixirData.id,console.log("🔍 从mindElixirData获取到ID:",n.value.mindElixirData.id)))}if(!o.value){console.warn("⚠️ 仍然无法获取思维导图ID,无法保存"),console.warn("🔍 建议:请先加载一个思维导图,然后再尝试保存");return}}try{console.log("💾 开始保存思维导图..."),console.log("🔍 当前思维导图ID:",o.value),console.log("🔍 MindElixir实例:",n.value);let A=null;if(n.value&&n.value.getData?(A=n.value.getData(),console.log("🔍 通过getData()获取的数据:",A)):(A=n.value.data,console.log("🔍 通过data属性获取的数据:",A)),!A){console.warn("⚠️ MindElixir数据为空");return}let _=[];console.log("🔍 数据结构分析:"),console.log("🔍 - currentData.nodeData:",A.nodeData),console.log("🔍 - currentData.nodes:",A.nodes),console.log("🔍 - currentData.nodeData.children:",(k=A.nodeData)==null?void 0:k.children);const q=F=>{F&&F.id&&(_.push(F),console.log(`🔍 收集节点: ${F.id} - ${F.topic||F.content||"无标题"}`),F.children&&F.children.length>0&&F.children.forEach(he=>q(he)))};if(A.nodeData)q(A.nodeData),console.log("🔍 从根节点收集到节点数量:",_.length);else if(A.nodes&&Array.isArray(A.nodes))A.nodes.forEach(F=>q(F)),console.log("🔍 从nodes数组收集到节点数量:",_.length);else if(Array.isArray(A))A.forEach(F=>q(F)),console.log("🔍 从currentData数组收集到节点数量:",_.length);else{console.warn("⚠️ 无法找到节点数据"),console.log("🔍 可用的数据字段:",Object.keys(A));return}if(_.length===0){console.warn("⚠️ 没有收集到任何节点");return}console.log("🔍 找到节点数据:",_),console.log("🔍 节点数量:",_.length),console.log("🔍 节点数据类型:",Array.isArray(_)?"数组":typeof _);const Q=[];if(_.forEach((F,he)=>{if(console.log(`🔍 处理节点 ${he}:`,F),F&&F.id){const fe=F.topic||F.content||F.text||"",ge=F.x||F.offsetX||0,Ie=F.y||F.offsetY||0;console.log(`🔍 节点 ${F.id} 内容:`,fe,"位置:",{x:ge,y:Ie});const $e={content:fe,position:{x:ge,y:Ie}};(F.parentId||F.parent)&&($e.parentId=F.parentId||F.parent,console.log(`🔍 节点 ${F.id} 父节点:`,$e.parentId)),console.log(`🔍 准备保存节点 ${F.id}:`,$e),Q.push(it.updateNode(F.id,$e).then(gt=>{console.log(`✅ 节点 ${F.id} 保存成功:`,gt)}).catch(gt=>{console.error(`❌ 节点 ${F.id} 保存失败:`,gt)}))}else console.warn(`⚠️ 节点 ${he} 缺少ID:`,F)}),console.log("🔍 准备保存的节点数量:",Q.length),Q.length===0){console.warn("⚠️ 没有找到需要保存的节点");return}const Y=await Promise.all(Q);console.log("🔍 保存结果:",Y),console.log("🎉 思维导图保存完成!"),console.log("🔄 保存完成,开始自动刷新..."),await oe()}catch(A){console.error("❌ 保存思维导图失败:",A)}},oe=async()=>{if(!o.value){console.warn("⚠️ 没有当前思维导图ID,无法刷新");return}try{console.log("🔄 开始刷新思维导图...");const k=await it.getMindmap(o.value);k.data&&k.data.nodeData?(console.log("✅ 获取到最新数据,开始刷新显示..."),await D(k.data,!0,!1),console.log("🎉 思维导图刷新完成!")):console.warn("⚠️ 无法获取思维导图数据")}catch(k){console.error("❌ 刷新思维导图失败:",k)}},le=async(k,A)=>{try{const _=String(o.value||"");if(n.value&&_&&_.startsWith("temp-")){console.log("🔄 检测到实时渲染的思维导图,将保存到数据库并更新ID");const Y=S();console.log("📍 保存当前位置:",Y);const F=await it.createMindmap(A||"预览思维导图",k);if(console.log("🔄 创建思维导图响应:",F),F.data&&F.data.id){const he=F.data.id;console.log("🎉 创建思维导图成功,新思维导图的ID是:",he);const fe=o.value;if(o.value=he,n.value&&n.value.data){n.value.data.mindmapId=he,n.value.data.id=he;const ge=Ie=>{Ie&&(Ie.mindmapId=he,Ie.children&&Ie.children.forEach($e=>ge($e)))};n.value.data.nodeData&&ge(n.value.data.nodeData)}console.log("✅ 已更新思维导图ID,保持视图状态"),console.log("🔄 从临时ID",fe,"更新为正式ID",he),Y&&setTimeout(()=>{E(Y),console.log("📍 已恢复位置和缩放状态")},100),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:he,title:A,timestamp:Date.now(),fromRealtime:!0}}));return}}console.log("🔄 没有检测到实时渲染的思维导图,使用标准保存流程");const Q=await it.createMindmap(A||"预览思维导图",k);if(console.log("🔄 创建思维导图响应:",Q),Q.data&&Q.data.id){const Y=Q.data.id;if(console.log("🎉 创建思维导图成功,新思维导图的ID是:",Y),console.log("📊 响应数据详情:",Q.data),Q.data.nodeData)console.log("✅ 思维导图创建时已包含节点数据,直接加载"),o.value=Y,w(),await D(Q.data),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:Y,title:A,timestamp:Date.now()}})),setTimeout(async()=>{try{console.log("🔄 重新加载思维导图数据...");const F=await it.getMindmap(Y);F.data&&F.data.nodeData&&(await D(F.data),console.log("✅ 思维导图数据重新加载成功"))}catch(F){console.error("❌ 重新加载思维导图失败:",F)}},1500);else{console.log("🔧 需要递归创建节点"),await H(k,Y,null),console.log("📥 开始加载新创建的思维导图,ID:",Y);const F=await it.getMindmap(Y);console.log("🔄 加载思维导图响应:",F),F.data&&F.data.nodeData?(console.log("✅ 成功获取思维导图数据,开始加载显示"),o.value=Y,w(),await D(F.data),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:Y,title:A,timestamp:Date.now()}})),setTimeout(async()=>{try{console.log("🔄 重新加载思维导图数据...");const he=await it.getMindmap(Y);he.data&&he.data.nodeData&&(await D(he.data),console.log("✅ 思维导图数据重新加载成功"))}catch(he){console.error("❌ 重新加载思维导图失败:",he)}},1500)):console.error("❌ 获取思维导图数据失败:",F)}}}catch(_){console.error("❌ 保存预览数据到数据库失败:",_)}},de=async k=>{try{if(console.log("📚 开始从历史记录加载思维导图:",k.title),w(),k.mindmapId){console.log("🎯 使用思维导图ID加载:",k.mindmapId);const A=await it.getMindmap(k.mindmapId);if(A.data&&A.data.nodeData)await D(A.data);else throw new Error("无法获取思维导图数据")}else if(k.json)console.log("📊 使用历史记录中的JSON数据"),await D(k.json);else if(k.markdown){console.log("📝 使用历史记录中的Markdown数据,尝试转换为JSON");try{const A=await convertMarkdownToJSON(k.markdown);if(A)await D(A);else throw new Error("Markdown转换失败")}catch(A){console.error("Markdown转换失败:",A)}}}catch(A){console.error("❌ 从历史记录加载思维导图失败:",A)}};Oa(async()=>{window.addEventListener("save-preview-to-database",k=>{console.log("🎯 收到保存到数据库事件:",k.detail),console.log("📋 事件详情 - 标题:",k.detail.title,"来源:",k.detail.source,"时间戳:",new Date(k.detail.timestamp).toLocaleString()),le(k.detail.data,k.detail.title)}),window.addEventListener("realtime-mindmap-update",k=>{console.log("🔄 收到实时思维导图更新事件:",k.detail),Re(k.detail.data,k.detail.title)}),window.addEventListener("loadMindmapFromHistory",k=>{console.log("📚 收到从历史记录加载思维导图事件:",k.detail),console.log("🔍 事件数据详情:",k.detail),de(k.detail)}),window.addEventListener("ai-sidebar-toggle",k=>{console.log("🤖 AI侧边栏折叠状态变化:",k.detail.isCollapsed),d.value=k.detail.isCollapsed}),y()});const Se=()=>{window.zoomIntervalId&&(clearInterval(window.zoomIntervalId),window.zoomIntervalId=null),r.value&&(B&&(r.value.removeEventListener("wheel",B),B=null),j&&(r.value.removeEventListener("click",j),j=null)),console.log("✅ 已清理所有定时器和事件监听器")};La(()=>{Se()}),e({showMindMapPage:M,cleanupIntervals:Se});const Re=async(k,A)=>{try{if(n.value){console.log("🔄 更新现有思维导图数据");try{const _=S(),q=String(o.value||""),Q=q&&q.startsWith("temp-")?q:`temp-${Date.now()}`,Y={nodeData:k,mindmapId:Q,id:Q,title:A||"AI生成中..."};(!q||!q.startsWith("temp-"))&&(o.value=Q,console.log("🆔 更新临时思维导图ID:",Q));const F=n.value.init(Y);_&&setTimeout(()=>{E(_)},100)}catch(_){console.error("❌ 更新思维导图数据失败:",_)}}else{w(),await X0();let _=0;for(;!r.value&&_<20;)await new Promise(F=>setTimeout(F,50)),await X0(),_++;if(!r.value){console.error("❌ 思维导图容器仍未准备好,跳过此次更新");return}n.value=new vt({el:r.value,direction:vt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!0,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(F,he)=>F.includes("|")||F.includes("**")||F.includes("`")||F.includes("#")||F.includes("$")||F.includes("![")?K0(F):F});const q=`temp-${Date.now()}`,Q={nodeData:k,mindmapId:q,id:q,title:A||"AI生成中..."};o.value=q,console.log("🆔 设置临时思维导图ID:",q);const Y=n.value.init(Q);console.log("✅ 实时思维导图实例创建成功"),te(),O()}}catch(_){console.error("❌ 实时更新思维导图失败:",_)}};return(k,A)=>(He(),Ue("div",o7,[c.value?(He(),Ue("div",l7,[J("div",{class:Ln(["welcome-content",{"ai-sidebar-collapsed":d.value}])},[...A[1]||(A[1]=[Ko('

🧠 思维导图工具

可视化您的想法,构建知识体系

🎯

智能AI生成

上传文档,AI自动生成思维导图结构

✏️

灵活编辑

拖拽节点,自由调整思维导图布局

💾

云端存储

自动保存,多设备同步访问

💡 提示:使用左侧AI侧边栏可以快速生成思维导图内容

',3)])],2)])):Sr("",!0),f.value?(He(),Ue("div",{key:1,class:"ai-input-area",style:On(a.value)},[J("div",{class:"ai-input-header"},[A[2]||(A[2]=J("span",{class:"ai-input-title"},"🤖 询问AI",-1)),J("button",{onClick:Ge,class:"ai-close-btn"},"×")]),J("div",c7,[hs(J("textarea",{"onUpdate:modelValue":A[0]||(A[0]=_=>g.value=_),placeholder:"请输入您的问题...",rows:"2",disabled:b.value,onKeydown:[bi(vi(st,["exact"]),["enter"]),bi(vi(_e,["ctrl"]),["enter"]),bi(vi(_e,["meta"]),["enter"])]},null,40,u7),[[Pa,g.value]]),J("div",d7,[J("button",{onClick:Ge,class:"btn-cancel",disabled:b.value}," 取消 ",8,h7),J("button",{onClick:_e,class:"btn-submit",disabled:!g.value.trim()||b.value},[b.value?(He(),Ue("span",p7,"AI思考中...")):(He(),Ue("span",m7,"询问AI"))],8,f7)])])],4)):Sr("",!0),c.value?Sr("",!0):(He(),Ue("div",{key:2,ref_key:"mindmapEl",ref:r,class:"mindmap-el"},null,512)),c.value?Sr("",!0):(He(),Ue("div",g7,[J("button",{onClick:W,class:"save-btn",title:"保存思维导图",style:{display:"none"}},[...A[3]||(A[3]=[J("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[J("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),J("polyline",{points:"17,21 17,13 7,13 7,21"}),J("polyline",{points:"7,3 7,8 15,8"})],-1),J("span",null,"保存",-1)])]),J("button",{onClick:oe,class:"refresh-btn",title:"刷新思维导图",style:{display:"none"}},[...A[4]||(A[4]=[J("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[J("path",{d:"M1 4v6h6"}),J("path",{d:"M23 20v-6h-6"}),J("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),J("span",null,"刷新",-1)])])])),s.value?(He(),Ue("div",{key:4,class:"context-menu",style:On(i.value)},[s.value.parentId||s.value.parent?(He(),Ue("div",{key:0,class:"context-menu-item",onClick:pe,title:"Add a sibling card"},[...A[5]||(A[5]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[J("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)])])):Sr("",!0),J("div",{class:"context-menu-item",onClick:G,title:"Add a child card"},[...A[6]||(A[6]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[J("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)])]),J("div",{class:"context-menu-item",onClick:Ye,title:"Copy text"},[...A[7]||(A[7]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[J("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)])]),J("div",{class:"context-menu-item ask-ai",onClick:Ee,title:"Ask AI"},[...A[8]||(A[8]=[Ko('',1)])]),J("div",{class:"context-menu-item delete",onClick:ye,title:"Delete"},[...A[9]||(A[9]=[J("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[J("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"}),J("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)):Sr("",!0)]))}},b7=_o(v7,[["__scopeId","data-v-e215cac4"]]),y7="modulepreload",w7=function(t){return"/"+t},Nc={},Dc=function(e,r,n){if(!r||r.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=w7(i),i in Nc)return;Nc[i]=!0;const a=i.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!n)for(let d=s.length-1;d>=0;d--){const f=s[d];if(f.href===i&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${o}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":y7,a||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),a)return new Promise((d,f)=>{c.addEventListener("load",d),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})};const x7={class:"ai-sidebar-wrapper"},k7=["title"],S7={key:0,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},T7={key:1,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},E7={class:"sidebar-content"},A7={class:"section"},C7={class:"input-group"},M7={key:0,class:"file-info"},N7={class:"file-details"},D7={class:"file-info-left"},R7={class:"file-name"},I7={class:"file-size"},_7={class:"button-group file-action-buttons"},O7=["disabled"],L7={key:0},z7={key:1},$7={key:0,class:"section"},F7={class:"history-list"},B7=["onClick"],P7={class:"history-title"},H7={class:"history-time"},q7={class:"section"},j7={class:"input-group"},U7={class:"button-group"},V7=["disabled"],W7={key:0},G7={key:1},K7={class:"section"},Y7={key:0,class:"processing-status"},X7={class:"result-container"},J7={class:"json-result"},Z7={class:"button-group"},Q7=["disabled"],e8={__name:"AISidebar",emits:["start-realtime-generation"],setup(t,{emit:e}){const r=e,n=Oe(!1),s=Oe(""),i=Oe(""),a=Oe(""),o=Oe(!1),l=Oe(!1),c=Oe([]),d=Oe(!1);Oe(""),Oe("");const f=Oe(!1),p=Oe(""),g=Oe(null),b=Oe(null),y=()=>{n.value=!n.value,window.dispatchEvent(new CustomEvent("ai-sidebar-toggle",{detail:{isCollapsed:n.value}}))},w=U=>{const V=U.target.files[0];V&&(b.value=V,me("文件上传成功!","success"))},M=U=>{U.preventDefault(),d.value=!1;const V=U.dataTransfer.files;if(V.length>0){const Z=V[0],ie=[".txt",".md",".doc",".docx",".pdf"],we="."+Z.name.split(".").pop().toLowerCase();ie.includes(we)?(b.value=Z,me("文件拖拽上传成功!","success")):me("不支持的文件格式!请上传 .txt, .md, .doc, .docx, .pdf 格式的文件","error")}},S=U=>{U.preventDefault(),d.value=!0},E=U=>{U.preventDefault(),d.value=!1},D=()=>{b.value=null,g.value&&(g.value.value="")},I=U=>{if(U===0)return"0 Bytes";const V=1024,Z=["Bytes","KB","MB","GB"],ie=Math.floor(Math.log(U)/Math.log(V));return parseFloat((U/Math.pow(V,ie)).toFixed(2))+" "+Z[ie]},O=async()=>{if(!b.value){me("请先上传文件","error");return}o.value=!0,r("start-realtime-generation");try{const U=await $(b.value);i.value="";const V=`你是一个专业的文档分析专家。请分析上传的文档内容,生成结构化的Markdown格式思维导图。要求: 1. 提取主要主题和关键概念 2. 组织成层次分明的结构 3. 使用清晰的标题和子标题 @@ -544,7 +575,7 @@ ${he}`,ge=Ke(fe),Ie={title:A,des:`AI追问产生的节点 - ${new Date().toLocal - 所有重要信息都要包含在思维导图中** 9. 输出格式:直接输出Markdown内容,不要添加任何说明文字或代码块标记`,Z=`请分析以下文档内容并生成结构化Markdown: -${U}`;await ye(V,Z),await Ge(),ot(b.value.name,i.value),setTimeout(async()=>{try{await Ye()}catch(ie){console.error("自动保存失败:",ie)}},1500)}catch(U){console.error("从文件生成Markdown失败:",U),me("生成失败: "+U.message,"error")}finally{o.value=!1}},$=U=>new Promise(async(V,Z)=>{try{const ie=U.type.includes("text")||U.name.endsWith(".txt")||U.name.endsWith(".md"),we=U.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||U.type==="application/msword"||U.name.endsWith(".docx")||U.name.endsWith(".doc"),x=U.type==="application/pdf"||U.name.endsWith(".pdf");if(ie){const N=new FileReader;N.onload=L=>V(L.target.result),N.onerror=()=>Z(new Error("文本文件读取失败")),N.readAsText(U)}else if(we){const N=await K(U);V(N)}else if(x){const N=await G(U);V(N)}else{const N=new FileReader;N.onload=L=>V(L.target.result),N.onerror=()=>Z(new Error("文件读取失败")),N.readAsText(U)}}catch(ie){Z(ie)}}),K=async U=>{try{if(U.name.endsWith(".docx")){const V=await Dc(()=>import("./index-d31726c8.js").then(we=>we.i),[]),Z=await U.arrayBuffer();return(await V.extractRawText({arrayBuffer:Z})).value}else if(U.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式,或安装相应的解析库")}catch(V){throw new Error(`Office文档解析失败: ${V.message}`)}},G=async U=>{try{const V=await Dc(()=>import("./pdf-fbea91e0.js"),[]);V.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const Z=await U.arrayBuffer(),ie=await V.getDocument({data:Z}).promise;let we="";for(let x=1;x<=ie.numPages;x++){const H=(await(await ie.getPage(x)).getTextContent()).items.map(B=>B.str).join(" ");we+=H+` +${U}`;await ye(V,Z),await Ge(),ot(b.value.name,i.value),setTimeout(async()=>{try{await Ye()}catch(ie){console.error("自动保存失败:",ie)}},1500)}catch(U){console.error("从文件生成Markdown失败:",U),me("生成失败: "+U.message,"error")}finally{o.value=!1}},$=U=>new Promise(async(V,Z)=>{try{const ie=U.type.includes("text")||U.name.endsWith(".txt")||U.name.endsWith(".md"),we=U.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||U.type==="application/msword"||U.name.endsWith(".docx")||U.name.endsWith(".doc"),x=U.type==="application/pdf"||U.name.endsWith(".pdf");if(ie){const N=new FileReader;N.onload=L=>V(L.target.result),N.onerror=()=>Z(new Error("文本文件读取失败")),N.readAsText(U)}else if(we){const N=await K(U);V(N)}else if(x){const N=await G(U);V(N)}else{const N=new FileReader;N.onload=L=>V(L.target.result),N.onerror=()=>Z(new Error("文件读取失败")),N.readAsText(U)}}catch(ie){Z(ie)}}),K=async U=>{try{if(U.name.endsWith(".docx")){const V=await Dc(()=>import("./index-c0ce386c.js").then(we=>we.i),[]),Z=await U.arrayBuffer();return(await V.extractRawText({arrayBuffer:Z})).value}else if(U.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式,或安装相应的解析库")}catch(V){throw new Error(`Office文档解析失败: ${V.message}`)}},G=async U=>{try{const V=await Dc(()=>import("./pdf-392e7863.js"),[]);V.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const Z=await U.arrayBuffer(),ie=await V.getDocument({data:Z}).promise;let we="";for(let x=1;x<=ie.numPages;x++){const H=(await(await ie.getPage(x)).getTextContent()).items.map(B=>B.str).join(" ");we+=H+` `}return we}catch(V){throw new Error(`PDF文件解析失败: ${V.message}`)}},pe=U=>U&&U.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(),ye=async(U,V)=>{const ie=U||`你是一位Markdown格式转换专家。你的任务是将用户提供的文章内容精确转换为结构化的Markdown格式。请遵循以下步骤: @@ -601,7 +632,7 @@ Level 4 标题用 ##### `).trim();if(L)if(ve(L)){console.log("🎯 检测到表格内容,创建表格节点");const H=v0(L);console.log("🎯 表格HTML内容:",H);const B={id:`node_${x++}`,topic:"",dangerouslySetInnerHTML:H,children:[],level:(V.level||0)+1,data:{}};V.children.push(B)}else L.split(` `).filter(B=>B.trim()).forEach(B=>{const j=Ee(B.trim());if(j){const te={id:`node_${x++}`,topic:j,children:[],level:(V.level||0)+1,data:{}};V.children.push(te)}})}return{nodeCounter:x}},ve=U=>{if(!U||typeof U!="string")return!1;U.includes("|")&&console.log("🔍 检查表格内容:",U.substring(0,200)+"...");const V=U.split(` -`);let Z=!1,ie=!1;for(const L of V){const H=L.trim();H.includes("|")&&H.split("|").length>=3&&(Z=!0,console.log("✅ 找到表格行:",H)),H.includes("|")&&H.includes("-")&&/^[\s\|\-\:]+$/.test(H)&&(ie=!0,console.log("✅ 找到分隔符行:",H))}const we=(U.match(/\|/g)||[]).length,x=we>=4,N=Z&&ie||Z&&x;return console.log("🔍 表格检测结果:",{hasTableRow:Z,hasSeparator:ie,pipeCount:we,hasMultiplePipes:x,result:N}),N},Ke=async()=>{if(!i.value){me("没有Markdown内容可复制","error");return}try{await navigator.clipboard.writeText(i.value),me("Markdown已复制到剪贴板","success")}catch{const V=document.createElement("textarea");V.value=i.value,document.body.appendChild(V),V.select(),document.execCommand("copy"),V.remove(),me("Markdown已复制到剪贴板","success")}},Ze=async()=>{try{await navigator.clipboard.writeText(a.value),me("JSON已复制到剪贴板","success")}catch(U){console.error("复制失败:",U),me("复制失败","error")}},Ye=async()=>{if(!a.value){me("请先生成或转换JSON数据","error");return}try{const U=JSON.parse(a.value),V=U.topic||U.title||`AI生成的思维导图_${new Date().toLocaleString()}`,Z=new CustomEvent("save-preview-to-database",{detail:{data:U,title:V,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(Z),setTimeout(()=>{me("思维导图已保存成功!","success"),b.value=null,v.value&&(v.value.value="")},2e3)}catch(U){console.error("JSON解析失败:",U),me("JSON格式错误,请检查数据","error")}},me=(U,V="info")=>{const Z=document.createElement("div");switch(Z.className=`notification notification-${V}`,Z.textContent=U,Z.style.cssText=` +`);let Z=!1,ie=!1;for(const L of V){const H=L.trim();H.includes("|")&&H.split("|").length>=3&&(Z=!0,console.log("✅ 找到表格行:",H)),H.includes("|")&&H.includes("-")&&/^[\s\|\-\:]+$/.test(H)&&(ie=!0,console.log("✅ 找到分隔符行:",H))}const we=(U.match(/\|/g)||[]).length,x=we>=4,N=Z&&ie||Z&&x;return console.log("🔍 表格检测结果:",{hasTableRow:Z,hasSeparator:ie,pipeCount:we,hasMultiplePipes:x,result:N}),N},Ke=async()=>{if(!i.value){me("没有Markdown内容可复制","error");return}try{await navigator.clipboard.writeText(i.value),me("Markdown已复制到剪贴板","success")}catch{const V=document.createElement("textarea");V.value=i.value,document.body.appendChild(V),V.select(),document.execCommand("copy"),V.remove(),me("Markdown已复制到剪贴板","success")}},Ze=async()=>{try{await navigator.clipboard.writeText(a.value),me("JSON已复制到剪贴板","success")}catch(U){console.error("复制失败:",U),me("复制失败","error")}},Ye=async()=>{if(!a.value){me("请先生成或转换JSON数据","error");return}try{const U=JSON.parse(a.value),V=U.topic||U.title||`AI生成的思维导图_${new Date().toLocaleString()}`,Z=new CustomEvent("save-preview-to-database",{detail:{data:U,title:V,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(Z),setTimeout(()=>{me("思维导图已保存成功!","success"),b.value=null,g.value&&(g.value.value="")},2e3)}catch(U){console.error("JSON解析失败:",U),me("JSON格式错误,请检查数据","error")}},me=(U,V="info")=>{const Z=document.createElement("div");switch(Z.className=`notification notification-${V}`,Z.textContent=U,Z.style.cssText=` position: fixed; top: 20px; right: 20px; @@ -623,8 +654,8 @@ Level 4 标题用 ##### from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } } - `,document.head.appendChild(ie)}document.body.appendChild(Z),setTimeout(()=>{Z.style.animation="slideOut 0.3s ease",setTimeout(()=>{Z.parentNode&&Z.parentNode.removeChild(Z)},300)},3e3)},St=()=>{i.value="",a.value="",me("内容已清空","info")},ot=(U,V,Z=null)=>{const ie={title:U,content:V,mindmapId:Z,timestamp:new Date};c.value.unshift(ie),c.value.length>10&&(c.value=c.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))},ft=async U=>{U.mindmapId?window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:U.mindmapId,title:U.title}})):(i.value=U.content,await Ge(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:U.content,json:a.value,title:U.title}})))},pt=U=>new Date(U).toLocaleString("zh-CN");Oa(()=>{const U=localStorage.getItem("ai-sidebar-history");if(U)try{c.value=JSON.parse(U)}catch(V){console.error("加载历史记录失败:",V)}window.addEventListener("add-to-history",V=>{const{title:Z,content:ie,timestamp:we}=V.detail;ot(Z,ie,null)}),window.addEventListener("mindmap-saved",V=>{const{mindmapId:Z,title:ie,timestamp:we}=V.detail,x=c.value.find(N=>N.title===ie||N.timestamp&&Math.abs(N.timestamp-we)<5e3);x?(x.mindmapId=Z,localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))):ot(ie,"",Z)}),i0(s,(V,Z)=>{}),i0(i,(V,Z)=>{})});const lt=async()=>{try{const U=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(!U.ok)throw new Error(`HTTP error! status: ${U.status}`);const V=U.body.getReader(),Z=new TextDecoder;let ie="";for(;;){const{done:we,value:x}=await V.read();if(we)break;ie+=Z.decode(x,{stream:!0});const N=ie.split(` -`);ie=N.pop()||"";for(const L of N)if(L.startsWith("data: "))try{const H=JSON.parse(L.slice(6))}catch(H){console.warn("解析测试数据失败:",H)}}}catch(U){console.error("❌ 测试流式API失败:",U)}};return window.testStreamAPI=lt,(U,V)=>(He(),Ue("div",x7,[J("div",{class:"sidebar-toggle",onClick:y,title:n.value?"展开AI助手":"折叠AI助手",style:On({left:n.value?"10px":"420px"})},[n.value?(He(),Ue("svg",S7,[...V[1]||(V[1]=[J("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(He(),Ue("svg",T7,[...V[2]||(V[2]=[J("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,k7),J("div",{class:Ln(["ai-sidebar",{"sidebar-collapsed":n.value}])},[hs(J("div",E7,[V[12]||(V[12]=J("div",{class:"sidebar-header"},[J("h3",null,"🤖 AI 助手"),J("p",null,"文档转思维导图工具"),J("div",{class:"collapse-hint"},[J("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),J("div",A7,[V[6]||(V[6]=J("h4",null,"📁 生成思维导图",-1)),J("div",C7,[V[4]||(V[4]=J("label",null,"上传文件:",-1)),J("div",{class:"file-upload-area",onDrop:M,onDragover:S,onDragleave:E},[J("input",{type:"file",ref_key:"fileInput",ref:v,onChange:w,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),J("div",{class:Ln(["file-upload-placeholder",{"drag-over":d.value}])},[...V[3]||(V[3]=[J("span",{class:"upload-icon"},"📎",-1),J("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),J("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),b.value?(He(),Ue("div",M7,[J("div",N7,[J("div",D7,[J("span",R7,"📄 "+ur(b.value.name),1),J("span",I7,"("+ur(I(b.value.size))+")",1)]),J("button",{onClick:D,class:"btn-remove",title:"删除文件"},[...V[5]||(V[5]=[J("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[J("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)])])])])):Sr("",!0),J("div",_7,[J("button",{onClick:O,disabled:!b.value||o.value,class:"btn-primary"},[o.value?(He(),Ue("span",L7,"AI生成中...")):(He(),Ue("span",z7,"AI生成思维导图"))],8,O7)])]),c.value.length>0?(He(),Ue("div",$7,[V[7]||(V[7]=J("h4",null,"📚 历史记录",-1)),J("div",F7,[(He(!0),Ue(er,null,du(c.value,(Z,ie)=>(He(),Ue("div",{key:ie,class:"history-item",onClick:we=>ft(Z)},[J("div",P7,ur(Z.title),1),J("div",H7,ur(pt(Z.timestamp)),1)],8,B7))),128))])])):Sr("",!0),J("div",q7,[V[9]||(V[9]=J("h4",null,"📝 AI生成的Markdown结果",-1)),J("div",j7,[V[8]||(V[8]=J("label",null,"Markdown内容:",-1)),hs(J("textarea",{"onUpdate:modelValue":V[0]||(V[0]=Z=>i.value=Z),placeholder:"AI生成的Markdown内容将显示在这里",rows:"6",readonly:"",class:"markdown-result"},null,512),[[Pa,i.value]])]),J("div",U7,[J("button",{onClick:Ge,disabled:l.value,class:"btn-secondary"},[l.value?(He(),Ue("span",W7,"转换中...")):(He(),Ue("span",G7,"🔄 转换为JSON"))],8,V7),J("button",{onClick:St,class:"btn-clear"},"清空"),J("button",{onClick:Ke,class:"btn-copy"},"📋 复制Markdown")])]),J("div",K7,[V[11]||(V[11]=J("h4",null,"📊 Markdown转JSON结果",-1)),f.value?(He(),Ue("div",Y7,[V[10]||(V[10]=J("div",{class:"spinner"},null,-1)),J("span",null,ur(p.value),1)])):Sr("",!0),J("div",X7,[J("pre",J7,ur(a.value||"JSON转换结果将显示在这里"),1),J("div",Z7,[J("button",{onClick:Ze,class:"btn-copy"},"📋 复制JSON"),J("button",{onClick:Ye,disabled:f.value,class:"btn-copy"},ur(f.value?"处理中...":"👁️ 预览"),9,Q7)])])])],512),[[zf,!n.value]])],2)]))}},t8=_o(e8,[["__scopeId","data-v-db77628b"]]);const r8={class:"markdown-test"},n8={class:"test-section"},s8={class:"test-section"},i8=["innerHTML"],a8={class:"test-section"},o8={class:"test-cases"},l8=["onClick"],c8={__name:"MarkdownTest",setup(t){const e=Oe(`# 测试标题 + `,document.head.appendChild(ie)}document.body.appendChild(Z),setTimeout(()=>{Z.style.animation="slideOut 0.3s ease",setTimeout(()=>{Z.parentNode&&Z.parentNode.removeChild(Z)},300)},3e3)},St=()=>{i.value="",a.value="",me("内容已清空","info")},ot=(U,V,Z=null)=>{const ie={title:U,content:V,mindmapId:Z,timestamp:new Date};c.value.unshift(ie),c.value.length>10&&(c.value=c.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))},pt=async U=>{U.mindmapId?window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:U.mindmapId,title:U.title}})):(i.value=U.content,await Ge(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:U.content,json:a.value,title:U.title}})))},mt=U=>new Date(U).toLocaleString("zh-CN");Oa(()=>{const U=localStorage.getItem("ai-sidebar-history");if(U)try{c.value=JSON.parse(U)}catch(V){console.error("加载历史记录失败:",V)}window.addEventListener("add-to-history",V=>{const{title:Z,content:ie,timestamp:we}=V.detail;ot(Z,ie,null)}),window.addEventListener("mindmap-saved",V=>{const{mindmapId:Z,title:ie,timestamp:we}=V.detail,x=c.value.find(N=>N.title===ie||N.timestamp&&Math.abs(N.timestamp-we)<5e3);x?(x.mindmapId=Z,localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))):ot(ie,"",Z)}),i0(s,(V,Z)=>{}),i0(i,(V,Z)=>{})});const lt=async()=>{try{const U=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(!U.ok)throw new Error(`HTTP error! status: ${U.status}`);const V=U.body.getReader(),Z=new TextDecoder;let ie="";for(;;){const{done:we,value:x}=await V.read();if(we)break;ie+=Z.decode(x,{stream:!0});const N=ie.split(` +`);ie=N.pop()||"";for(const L of N)if(L.startsWith("data: "))try{const H=JSON.parse(L.slice(6))}catch(H){console.warn("解析测试数据失败:",H)}}}catch(U){console.error("❌ 测试流式API失败:",U)}};return window.testStreamAPI=lt,(U,V)=>(He(),Ue("div",x7,[J("div",{class:"sidebar-toggle",onClick:y,title:n.value?"展开AI助手":"折叠AI助手",style:On({left:n.value?"10px":"420px"})},[n.value?(He(),Ue("svg",S7,[...V[1]||(V[1]=[J("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(He(),Ue("svg",T7,[...V[2]||(V[2]=[J("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,k7),J("div",{class:Ln(["ai-sidebar",{"sidebar-collapsed":n.value}])},[hs(J("div",E7,[V[12]||(V[12]=J("div",{class:"sidebar-header"},[J("h3",null,"🤖 AI 助手"),J("p",null,"文档转思维导图工具"),J("div",{class:"collapse-hint"},[J("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),J("div",A7,[V[6]||(V[6]=J("h4",null,"📁 生成思维导图",-1)),J("div",C7,[V[4]||(V[4]=J("label",null,"上传文件:",-1)),J("div",{class:"file-upload-area",onDrop:M,onDragover:S,onDragleave:E},[J("input",{type:"file",ref_key:"fileInput",ref:g,onChange:w,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),J("div",{class:Ln(["file-upload-placeholder",{"drag-over":d.value}])},[...V[3]||(V[3]=[J("span",{class:"upload-icon"},"📎",-1),J("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),J("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),b.value?(He(),Ue("div",M7,[J("div",N7,[J("div",D7,[J("span",R7,"📄 "+ur(b.value.name),1),J("span",I7,"("+ur(I(b.value.size))+")",1)]),J("button",{onClick:D,class:"btn-remove",title:"删除文件"},[...V[5]||(V[5]=[J("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[J("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)])])])])):Sr("",!0),J("div",_7,[J("button",{onClick:O,disabled:!b.value||o.value,class:"btn-primary"},[o.value?(He(),Ue("span",L7,"AI生成中...")):(He(),Ue("span",z7,"AI生成思维导图"))],8,O7)])]),c.value.length>0?(He(),Ue("div",$7,[V[7]||(V[7]=J("h4",null,"📚 历史记录",-1)),J("div",F7,[(He(!0),Ue(er,null,du(c.value,(Z,ie)=>(He(),Ue("div",{key:ie,class:"history-item",onClick:we=>pt(Z)},[J("div",P7,ur(Z.title),1),J("div",H7,ur(mt(Z.timestamp)),1)],8,B7))),128))])])):Sr("",!0),J("div",q7,[V[9]||(V[9]=J("h4",null,"📝 AI生成的Markdown结果",-1)),J("div",j7,[V[8]||(V[8]=J("label",null,"Markdown内容:",-1)),hs(J("textarea",{"onUpdate:modelValue":V[0]||(V[0]=Z=>i.value=Z),placeholder:"AI生成的Markdown内容将显示在这里",rows:"6",readonly:"",class:"markdown-result"},null,512),[[Pa,i.value]])]),J("div",U7,[J("button",{onClick:Ge,disabled:l.value,class:"btn-secondary"},[l.value?(He(),Ue("span",W7,"转换中...")):(He(),Ue("span",G7,"🔄 转换为JSON"))],8,V7),J("button",{onClick:St,class:"btn-clear"},"清空"),J("button",{onClick:Ke,class:"btn-copy"},"📋 复制Markdown")])]),J("div",K7,[V[11]||(V[11]=J("h4",null,"📊 Markdown转JSON结果",-1)),f.value?(He(),Ue("div",Y7,[V[10]||(V[10]=J("div",{class:"spinner"},null,-1)),J("span",null,ur(p.value),1)])):Sr("",!0),J("div",X7,[J("pre",J7,ur(a.value||"JSON转换结果将显示在这里"),1),J("div",Z7,[J("button",{onClick:Ze,class:"btn-copy"},"📋 复制JSON"),J("button",{onClick:Ye,disabled:f.value,class:"btn-copy"},ur(f.value?"处理中...":"👁️ 预览"),9,Q7)])])])],512),[[zf,!n.value]])],2)]))}},t8=_o(e8,[["__scopeId","data-v-db77628b"]]);const r8={class:"markdown-test"},n8={class:"test-section"},s8={class:"test-section"},i8=["innerHTML"],a8={class:"test-section"},o8={class:"test-cases"},l8=["onClick"],c8={__name:"MarkdownTest",setup(t){const e=Oe(`# 测试标题 这是一个**粗体**和*斜体*的测试。 @@ -691,4 +722,4 @@ function markdownToJSON(markdown) { \`\`\`python def hello_world(): print("Hello, World!") -\`\`\``}]),n=Ou(()=>{if(!e.value)return"";try{return v0(e.value)}catch(a){return`
渲染失败: ${a.message}
`}}),s=()=>{},i=a=>{e.value=a.content};return(a,o)=>(He(),Ue("div",r8,[o[4]||(o[4]=J("h2",null,"Markdown渲染测试",-1)),J("div",n8,[o[1]||(o[1]=J("h3",null,"输入Markdown内容",-1)),hs(J("textarea",{"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),placeholder:"输入markdown内容...",rows:"10",class:"markdown-input"},null,512),[[Pa,e.value]])]),J("div",s8,[o[2]||(o[2]=J("h3",null,"渲染结果",-1)),J("div",{class:"rendered-content",innerHTML:n.value},null,8,i8)]),J("div",a8,[o[3]||(o[3]=J("h3",null,"测试用例",-1)),J("button",{onClick:s,class:"test-btn"},"加载测试用例"),J("div",o8,[(He(!0),Ue(er,null,du(r.value,(l,c)=>(He(),Ue("button",{key:c,onClick:d=>i(l),class:"test-case-btn"},ur(l.name),9,l8))),128))])])]))}},u8=_o(c8,[["__scopeId","data-v-68a00828"]]);const d8={id:"app"},h8={class:"test-mode-toggle",style:{display:"none"}},f8={key:0,class:"test-mode"},p8={key:1},m8={class:"main-content"},g8={__name:"App",setup(t){const e=Oe(null),r=Oe(!1),n=()=>{r.value=!r.value},s=()=>{e.value&&e.value.showMindMapPage()};return(i,a)=>(He(),Ue("div",d8,[a[0]||(a[0]=Ru("« ",-1)),J("div",h8,[J("button",{onClick:n,class:"test-btn"},ur(r.value?"切换到思维导图":"测试Markdown渲染"),1)]),r.value?(He(),Ue("div",f8,[Ht(u8)])):(He(),Ue("div",p8,[Ht(t8,{onStartRealtimeGeneration:s}),J("div",m8,[Ht(b7,{ref_key:"mindMapRef",ref:e},null,512)])]))]))}};rp(g8).mount("#app");export{Dc as _,Wl as c,w8 as g}; +\`\`\``}]),n=Ou(()=>{if(!e.value)return"";try{return v0(e.value)}catch(a){return`
渲染失败: ${a.message}
`}}),s=()=>{},i=a=>{e.value=a.content};return(a,o)=>(He(),Ue("div",r8,[o[4]||(o[4]=J("h2",null,"Markdown渲染测试",-1)),J("div",n8,[o[1]||(o[1]=J("h3",null,"输入Markdown内容",-1)),hs(J("textarea",{"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),placeholder:"输入markdown内容...",rows:"10",class:"markdown-input"},null,512),[[Pa,e.value]])]),J("div",s8,[o[2]||(o[2]=J("h3",null,"渲染结果",-1)),J("div",{class:"rendered-content",innerHTML:n.value},null,8,i8)]),J("div",a8,[o[3]||(o[3]=J("h3",null,"测试用例",-1)),J("button",{onClick:s,class:"test-btn"},"加载测试用例"),J("div",o8,[(He(!0),Ue(er,null,du(r.value,(l,c)=>(He(),Ue("button",{key:c,onClick:d=>i(l),class:"test-case-btn"},ur(l.name),9,l8))),128))])])]))}},u8=_o(c8,[["__scopeId","data-v-68a00828"]]);const d8={id:"app"},h8={class:"test-mode-toggle",style:{display:"none"}},f8={key:0,class:"test-mode"},p8={key:1},m8={class:"main-content"},g8={__name:"App",setup(t){const e=Oe(null),r=Oe(!1),n=()=>{r.value=!r.value},s=()=>{e.value&&e.value.showMindMapPage()};return(i,a)=>(He(),Ue("div",d8,[a[0]||(a[0]=Ru("« ",-1)),J("div",h8,[J("button",{onClick:n,class:"test-btn"},ur(r.value?"切换到思维导图":"测试Markdown渲染"),1)]),r.value?(He(),Ue("div",f8,[qt(u8)])):(He(),Ue("div",p8,[qt(t8,{onStartRealtimeGeneration:s}),J("div",m8,[qt(b7,{ref_key:"mindMapRef",ref:e},null,512)])]))]))}};rp(g8).mount("#app");export{Dc as _,Wl as c,w8 as g}; diff --git a/frontend/dist/assets/index-d31726c8.js b/frontend/dist/assets/index-c0ce386c.js similarity index 99% rename from frontend/dist/assets/index-d31726c8.js rename to frontend/dist/assets/index-c0ce386c.js index 0c0832b..75379c0 100644 --- a/frontend/dist/assets/index-d31726c8.js +++ b/frontend/dist/assets/index-c0ce386c.js @@ -1,4 +1,4 @@ -import{g as jl,c as he}from"./index-d78cd498.js";function Xl(e,n){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var en={},la="1.13.7",Wo=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},oi=Array.prototype,fa=Object.prototype,Ro=typeof Symbol<"u"?Symbol.prototype:null,Vl=oi.push,Ft=oi.slice,gt=fa.toString,Hl=fa.hasOwnProperty,Su=typeof ArrayBuffer<"u",$l=typeof DataView<"u",Gl=Array.isArray,No=Object.keys,Oo=Object.create,Io=Su&&ArrayBuffer.isView,Zl=isNaN,Yl=isFinite,Bu=!{toString:null}.propertyIsEnumerable("toString"),Lo=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Kl=Math.pow(2,53)-1;function Ie(e,n){return n=n==null?e.length-1:+n,function(){for(var t=Math.max(arguments.length-n,0),i=Array(t),r=0;r=0&&t<=Kl}}function zu(e){return function(n){return n==null?void 0:n[e]}}const Gt=zu("byteLength"),nf=Pu(Gt);var tf=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function rf(e){return Io?Io(e)&&!mt(e):nf(e)&&tf.test(gt.call(e))}const xa=Su?rf:va(!1),qe=zu("length");function af(e){for(var n={},t=e.length,i=0;i":">",'"':""","'":"'","`":"`"},fs=ds(ls),sf=Ea(ls),hs=ds(sf),ps=ye.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Gi=/(.)^/,df={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},lf=/\\|'|\r|\n|\u2028|\u2029/g;function ff(e){return"\\"+df[e]}var hf=/^\s*(\w|\$)+\s*$/;function gs(e,n,t){!n&&t&&(n=t),n=Ca({},n,ye.templateSettings);var i=RegExp([(n.escape||Gi).source,(n.interpolate||Gi).source,(n.evaluate||Gi).source].join("|")+"|$","g"),r=0,a="__p+='";e.replace(i,function(s,d,g,b,m){return a+=e.slice(r,m).replace(lf,ff),r=m+s.length,d?a+=`'+ +import{g as jl,c as he}from"./index-90ac6040.js";function Xl(e,n){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var en={},la="1.13.7",Wo=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},oi=Array.prototype,fa=Object.prototype,Ro=typeof Symbol<"u"?Symbol.prototype:null,Vl=oi.push,Ft=oi.slice,gt=fa.toString,Hl=fa.hasOwnProperty,Su=typeof ArrayBuffer<"u",$l=typeof DataView<"u",Gl=Array.isArray,No=Object.keys,Oo=Object.create,Io=Su&&ArrayBuffer.isView,Zl=isNaN,Yl=isFinite,Bu=!{toString:null}.propertyIsEnumerable("toString"),Lo=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Kl=Math.pow(2,53)-1;function Ie(e,n){return n=n==null?e.length-1:+n,function(){for(var t=Math.max(arguments.length-n,0),i=Array(t),r=0;r=0&&t<=Kl}}function zu(e){return function(n){return n==null?void 0:n[e]}}const Gt=zu("byteLength"),nf=Pu(Gt);var tf=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function rf(e){return Io?Io(e)&&!mt(e):nf(e)&&tf.test(gt.call(e))}const xa=Su?rf:va(!1),qe=zu("length");function af(e){for(var n={},t=e.length,i=0;i":">",'"':""","'":"'","`":"`"},fs=ds(ls),sf=Ea(ls),hs=ds(sf),ps=ye.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Gi=/(.)^/,df={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},lf=/\\|'|\r|\n|\u2028|\u2029/g;function ff(e){return"\\"+df[e]}var hf=/^\s*(\w|\$)+\s*$/;function gs(e,n,t){!n&&t&&(n=t),n=Ca({},n,ye.templateSettings);var i=RegExp([(n.escape||Gi).source,(n.interpolate||Gi).source,(n.evaluate||Gi).source].join("|")+"|$","g"),r=0,a="__p+='";e.replace(i,function(s,d,g,b,m){return a+=e.slice(r,m).replace(lf,ff),r=m+s.length,d?a+=`'+ ((__t=(`+d+`))==null?'':_.escape(__t))+ '`:g?a+=`'+ ((__t=(`+g+`))==null?'':__t)+ diff --git a/frontend/dist/assets/pdf-fbea91e0.js b/frontend/dist/assets/pdf-392e7863.js similarity index 99% rename from frontend/dist/assets/pdf-fbea91e0.js rename to frontend/dist/assets/pdf-392e7863.js index b4aa753..3b9e556 100644 --- a/frontend/dist/assets/pdf-fbea91e0.js +++ b/frontend/dist/assets/pdf-392e7863.js @@ -1,4 +1,4 @@ -var FA=Object.defineProperty;var NA=(u,t,e)=>t in u?FA(u,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[t]=e;var k=(u,t,e)=>(NA(u,typeof t!="symbol"?t+"":t,e),e),dp=(u,t,e)=>{if(!t.has(u))throw TypeError("Cannot "+e)};var n=(u,t,e)=>(dp(u,t,"read from private field"),e?e.call(u):t.get(u)),d=(u,t,e)=>{if(t.has(u))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(u):t.set(u,e)},p=(u,t,e,s)=>(dp(u,t,"write to private field"),s?s.call(u,e):t.set(u,e),e);var St=(u,t,e,s)=>({set _(i){p(u,t,i,e)},get _(){return n(u,t,s)}}),b=(u,t,e)=>(dp(u,t,"access private method"),e);import{_ as OA}from"./index-d78cd498.js";const ie=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),wp=[.001,0,0,.001,0,0],up=1.35,Pe={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},ki={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Em="pdfjs_internal_editor_",$={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},X={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},BA={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},Ot={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},wd={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},wt={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},da={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},ep={ERRORS:0,WARNINGS:1,INFOS:5},Fl={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},ud={moveTo:0,lineTo:1,curveTo:2,closePath:3},HA={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let sp=ep.WARNINGS;function $A(u){Number.isInteger(u)&&(sp=u)}function zA(){return sp}function ip(u){sp>=ep.INFOS&&console.log(`Info: ${u}`)}function z(u){sp>=ep.WARNINGS&&console.log(`Warning: ${u}`)}function st(u){throw new Error(u)}function _t(u,t){u||st(t)}function GA(u){switch(u==null?void 0:u.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function Cm(u,t=null,e=null){if(!u)return null;if(e&&typeof u=="string"){if(e.addDefaultProtocol&&u.startsWith("www.")){const i=u.match(/\./g);(i==null?void 0:i.length)>=2&&(u=`http://${u}`)}if(e.tryConvertEncoding)try{u=XA(u)}catch{}}const s=t?URL.parse(u,t):URL.parse(u);return GA(s)?s:null}function Tm(u,t,e=!1){const s=URL.parse(u);return s?(s.hash=t,s.href):e&&Cm(u,"http://example.com")?u.split("#",1)[0]+`${t?`#${t}`:""}`:""}function V(u,t,e,s=!1){return Object.defineProperty(u,t,{value:e,enumerable:!s,configurable:!0,writable:!1}),e}const la=function(){function t(e,s){this.message=e,this.name=s}return t.prototype=new Error,t.constructor=t,t}();class sm extends la{constructor(t,e){super(t,"PasswordException"),this.code=e}}class fp extends la{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class vp extends la{constructor(t){super(t,"InvalidPDFException")}}class Kd extends la{constructor(t,e,s){super(t,"ResponseException"),this.status=e,this.missing=s}}class UA extends la{constructor(t){super(t,"FormatError")}}class kn extends la{constructor(t){super(t,"AbortException")}}function xm(u){(typeof u!="object"||(u==null?void 0:u.length)===void 0)&&st("Invalid argument for bytesToString");const t=u.length,e=8192;if(t>24&255,u>>16&255,u>>8&255,u&255)}function VA(){const u=new Uint8Array(4);return u[0]=1,new Uint32Array(u.buffer,0,1)[0]===1}function WA(){try{return new Function(""),!0}catch{return!1}}class Wt{static get isLittleEndian(){return V(this,"isLittleEndian",VA())}static get isEvalSupported(){return V(this,"isEvalSupported",WA())}static get isOffscreenCanvasSupported(){return V(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return V(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){const{platform:t,userAgent:e}=navigator;return V(this,"platform",{isAndroid:e.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:e.includes("Firefox")})}static get isCSSRoundSupported(){var t,e;return V(this,"isCSSRoundSupported",(e=(t=globalThis.CSS)==null?void 0:t.supports)==null?void 0:e.call(t,"width: round(1.5px, 1px)"))}}const pp=Array.from(Array(256).keys(),u=>u.toString(16).padStart(2,"0"));var Sa,vd,Hl,_p;class I{static makeHexColor(t,e,s){return`#${pp[t]}${pp[e]}${pp[s]}`}static domMatrixToTransform(t){return[t.a,t.b,t.c,t.d,t.e,t.f]}static scaleMinMax(t,e){let s;t[0]?(t[0]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[3],e[3]*=t[3]):(s=e[0],e[0]=e[1],e[1]=s,s=e[2],e[2]=e[3],e[3]=s,t[1]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static multiplyByDOMMatrix(t,e){return[t[0]*e.a+t[2]*e.b,t[1]*e.a+t[3]*e.b,t[0]*e.c+t[2]*e.d,t[1]*e.c+t[3]*e.d,t[0]*e.e+t[2]*e.f+t[4],t[1]*e.e+t[3]*e.f+t[5]]}static applyTransform(t,e,s=0){const i=t[s],r=t[s+1];t[s]=i*e[0]+r*e[2]+e[4],t[s+1]=i*e[1]+r*e[3]+e[5]}static applyTransformToBezier(t,e,s=0){const i=e[0],r=e[1],a=e[2],o=e[3],l=e[4],h=e[5];for(let c=0;c<6;c+=2){const f=t[s+c],g=t[s+c+1];t[s+c]=f*i+g*a+l,t[s+c+1]=f*r+g*o+h}}static applyInverseTransform(t,e){const s=t[0],i=t[1],r=e[0]*e[3]-e[1]*e[2];t[0]=(s*e[3]-i*e[2]+e[2]*e[5]-e[4]*e[3])/r,t[1]=(-s*e[1]+i*e[0]+e[4]*e[1]-e[5]*e[0])/r}static axialAlignedBoundingBox(t,e,s){const i=e[0],r=e[1],a=e[2],o=e[3],l=e[4],h=e[5],c=t[0],f=t[1],g=t[2],m=t[3];let A=i*c+l,y=A,v=i*g+l,w=v,S=o*f+h,_=S,E=o*m+h,C=E;if(r!==0||a!==0){const T=r*c,x=r*g,P=a*f,M=a*m;A+=P,w+=P,v+=M,y+=M,S+=T,C+=T,E+=x,_+=x}s[0]=Math.min(s[0],A,v,y,w),s[1]=Math.min(s[1],S,E,_,C),s[2]=Math.max(s[2],A,v,y,w),s[3]=Math.max(s[3],S,E,_,C)}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t,e){const s=t[0],i=t[1],r=t[2],a=t[3],o=s**2+i**2,l=s*r+i*a,h=r**2+a**2,c=(o+h)/2,f=Math.sqrt(c**2-(o*h-l**2));e[0]=Math.sqrt(c+f||1),e[1]=Math.sqrt(c-f||1)}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const s=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(s>i)return null;const r=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return r>a?null:[s,r,i,a]}static pointBoundingBox(t,e,s){s[0]=Math.min(s[0],t),s[1]=Math.min(s[1],e),s[2]=Math.max(s[2],t),s[3]=Math.max(s[3],e)}static rectBoundingBox(t,e,s,i,r){r[0]=Math.min(r[0],t,s),r[1]=Math.min(r[1],e,i),r[2]=Math.max(r[2],t,s),r[3]=Math.max(r[3],e,i)}static bezierBoundingBox(t,e,s,i,r,a,o,l,h){h[0]=Math.min(h[0],t,o),h[1]=Math.min(h[1],e,l),h[2]=Math.max(h[2],t,o),h[3]=Math.max(h[3],e,l),b(this,Hl,_p).call(this,t,s,r,o,e,i,a,l,3*(-t+3*(s-r)+o),6*(t-2*s+r),3*(s-t),h),b(this,Hl,_p).call(this,t,s,r,o,e,i,a,l,3*(-e+3*(i-a)+l),6*(e-2*i+a),3*(i-e),h)}}Sa=new WeakSet,vd=function(t,e,s,i,r,a,o,l,h,c){if(h<=0||h>=1)return;const f=1-h,g=h*h,m=g*h,A=f*(f*(f*t+3*h*e)+3*g*s)+m*i,y=f*(f*(f*r+3*h*a)+3*g*o)+m*l;c[0]=Math.min(c[0],A),c[1]=Math.min(c[1],y),c[2]=Math.max(c[2],A),c[3]=Math.max(c[3],y)},Hl=new WeakSet,_p=function(t,e,s,i,r,a,o,l,h,c,f,g){if(Math.abs(h)<1e-12){Math.abs(c)>=1e-12&&b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,-f/c,g);return}const m=c**2-4*f*h;if(m<0)return;const A=Math.sqrt(m),y=2*h;b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,(-c+A)/y,g),b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,(-c-A)/y,g)},d(I,Sa),d(I,Hl);function XA(u){return decodeURIComponent(escape(u))}let gp=null,im=null;function qA(u){return gp||(gp=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,im=new Map([["ſt","ſt"]])),u.replaceAll(gp,(t,e,s)=>e?e.normalize("NFKC"):im.get(s))}function km(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const u=new Uint8Array(32);return crypto.getRandomValues(u),xm(u)}const Hg="pdfjs_internal_id_";function YA(u,t,e){if(!Array.isArray(e)||e.length<2)return!1;const[s,i,...r]=e;if(!u(s)&&!Number.isInteger(s)||!t(i))return!1;const a=r.length;let o=!0;switch(i.name){case"XYZ":if(a<2||a>3)return!1;break;case"Fit":case"FitB":return a===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(a>1)return!1;break;case"FitR":if(a!==4)return!1;o=!1;break;default:return!1}for(const l of r)if(!(typeof l=="number"||o&&l===null))return!1;return!0}function ne(u,t,e){return Math.min(Math.max(u,t),e)}function Pm(u){return Uint8Array.prototype.toBase64?u.toBase64():btoa(xm(u))}function KA(u){return Uint8Array.fromBase64?Uint8Array.fromBase64(u):ad(atob(u))}typeof Promise.try!="function"&&(Promise.try=function(u,...t){return new Promise(e=>{e(u(...t))})});typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(u){return u.reduce((t,e)=>t+e,0)});const Is="http://www.w3.org/2000/svg",Fn=class Fn{};k(Fn,"CSS",96),k(Fn,"PDF",72),k(Fn,"PDF_TO_CSS_UNITS",Fn.CSS/Fn.PDF);let Pn=Fn;async function od(u,t="text"){if(gl(u,document.baseURI)){const e=await fetch(u);if(!e.ok)throw new Error(e.statusText);switch(t){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"json":return e.json()}return e.text()}return new Promise((e,s)=>{const i=new XMLHttpRequest;i.open("GET",u,!0),i.responseType=t,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(t){case"arraybuffer":case"blob":case"json":e(i.response);return}e(i.responseText);return}s(new Error(i.statusText))}},i.send(null)})}class ld{constructor({viewBox:t,userUnit:e,scale:s,rotation:i,offsetX:r=0,offsetY:a=0,dontFlip:o=!1}){this.viewBox=t,this.userUnit=e,this.scale=s,this.rotation=i,this.offsetX=r,this.offsetY=a,s*=e;const l=(t[2]+t[0])/2,h=(t[3]+t[1])/2;let c,f,g,m;switch(i%=360,i<0&&(i+=360),i){case 180:c=-1,f=0,g=0,m=1;break;case 90:c=0,f=1,g=1,m=0;break;case 270:c=0,f=-1,g=-1,m=0;break;case 0:c=1,f=0,g=0,m=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(g=-g,m=-m);let A,y,v,w;c===0?(A=Math.abs(h-t[1])*s+r,y=Math.abs(l-t[0])*s+a,v=(t[3]-t[1])*s,w=(t[2]-t[0])*s):(A=Math.abs(l-t[0])*s+r,y=Math.abs(h-t[1])*s+a,v=(t[2]-t[0])*s,w=(t[3]-t[1])*s),this.transform=[c*s,f*s,g*s,m*s,A-c*s*l-g*s*h,y-f*s*l-m*s*h],this.width=v,this.height=w}get rawDims(){const t=this.viewBox;return V(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:s=this.offsetX,offsetY:i=this.offsetY,dontFlip:r=!1}={}){return new ld({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:r})}convertToViewportPoint(t,e){const s=[t,e];return I.applyTransform(s,this.transform),s}convertToViewportRectangle(t){const e=[t[0],t[1]];I.applyTransform(e,this.transform);const s=[t[2],t[3]];return I.applyTransform(s,this.transform),[e[0],e[1],s[0],s[1]]}convertToPdfPoint(t,e){const s=[t,e];return I.applyInverseTransform(s,this.transform),s}}class $g extends la{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}}function np(u){const t=u.length;let e=0;for(;e{try{return new URL(o)}catch{try{return new URL(decodeURIComponent(o))}catch{try{return new URL(o,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(o),"https://foo.bar")}catch{return null}}}}})(u);if(!s)return t;const i=o=>{try{let l=decodeURIComponent(o);return l.includes("/")?(l=l.split("/").at(-1),l.test(/^\.pdf$/i)?l:o):l}catch{return o}},r=/\.pdf$/i,a=s.pathname.split("/").at(-1);if(r.test(a))return i(a);if(s.searchParams.size>0){const o=Array.from(s.searchParams.values()).reverse();for(const h of o)if(r.test(h))return i(h);const l=Array.from(s.searchParams.keys()).reverse();for(const h of l)if(r.test(h))return i(h)}if(s.hash){const l=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(s.hash);if(l)return i(l[0])}return t}class nm{constructor(){k(this,"started",Object.create(null));k(this,"times",[])}time(t){t in this.started&&z(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||z(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let e=0;for(const{name:s}of this.times)e=Math.max(s.length,e);for(const{name:s,start:i,end:r}of this.times)t.push(`${s.padEnd(e)} ${r-i}ms +var FA=Object.defineProperty;var NA=(u,t,e)=>t in u?FA(u,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[t]=e;var k=(u,t,e)=>(NA(u,typeof t!="symbol"?t+"":t,e),e),dp=(u,t,e)=>{if(!t.has(u))throw TypeError("Cannot "+e)};var n=(u,t,e)=>(dp(u,t,"read from private field"),e?e.call(u):t.get(u)),d=(u,t,e)=>{if(t.has(u))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(u):t.set(u,e)},p=(u,t,e,s)=>(dp(u,t,"write to private field"),s?s.call(u,e):t.set(u,e),e);var St=(u,t,e,s)=>({set _(i){p(u,t,i,e)},get _(){return n(u,t,s)}}),b=(u,t,e)=>(dp(u,t,"access private method"),e);import{_ as OA}from"./index-90ac6040.js";const ie=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),wp=[.001,0,0,.001,0,0],up=1.35,Pe={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},ki={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Em="pdfjs_internal_editor_",$={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},X={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},BA={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},Ot={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},wd={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},wt={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},da={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},ep={ERRORS:0,WARNINGS:1,INFOS:5},Fl={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},ud={moveTo:0,lineTo:1,curveTo:2,closePath:3},HA={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let sp=ep.WARNINGS;function $A(u){Number.isInteger(u)&&(sp=u)}function zA(){return sp}function ip(u){sp>=ep.INFOS&&console.log(`Info: ${u}`)}function z(u){sp>=ep.WARNINGS&&console.log(`Warning: ${u}`)}function st(u){throw new Error(u)}function _t(u,t){u||st(t)}function GA(u){switch(u==null?void 0:u.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function Cm(u,t=null,e=null){if(!u)return null;if(e&&typeof u=="string"){if(e.addDefaultProtocol&&u.startsWith("www.")){const i=u.match(/\./g);(i==null?void 0:i.length)>=2&&(u=`http://${u}`)}if(e.tryConvertEncoding)try{u=XA(u)}catch{}}const s=t?URL.parse(u,t):URL.parse(u);return GA(s)?s:null}function Tm(u,t,e=!1){const s=URL.parse(u);return s?(s.hash=t,s.href):e&&Cm(u,"http://example.com")?u.split("#",1)[0]+`${t?`#${t}`:""}`:""}function V(u,t,e,s=!1){return Object.defineProperty(u,t,{value:e,enumerable:!s,configurable:!0,writable:!1}),e}const la=function(){function t(e,s){this.message=e,this.name=s}return t.prototype=new Error,t.constructor=t,t}();class sm extends la{constructor(t,e){super(t,"PasswordException"),this.code=e}}class fp extends la{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class vp extends la{constructor(t){super(t,"InvalidPDFException")}}class Kd extends la{constructor(t,e,s){super(t,"ResponseException"),this.status=e,this.missing=s}}class UA extends la{constructor(t){super(t,"FormatError")}}class kn extends la{constructor(t){super(t,"AbortException")}}function xm(u){(typeof u!="object"||(u==null?void 0:u.length)===void 0)&&st("Invalid argument for bytesToString");const t=u.length,e=8192;if(t>24&255,u>>16&255,u>>8&255,u&255)}function VA(){const u=new Uint8Array(4);return u[0]=1,new Uint32Array(u.buffer,0,1)[0]===1}function WA(){try{return new Function(""),!0}catch{return!1}}class Wt{static get isLittleEndian(){return V(this,"isLittleEndian",VA())}static get isEvalSupported(){return V(this,"isEvalSupported",WA())}static get isOffscreenCanvasSupported(){return V(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return V(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){const{platform:t,userAgent:e}=navigator;return V(this,"platform",{isAndroid:e.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:e.includes("Firefox")})}static get isCSSRoundSupported(){var t,e;return V(this,"isCSSRoundSupported",(e=(t=globalThis.CSS)==null?void 0:t.supports)==null?void 0:e.call(t,"width: round(1.5px, 1px)"))}}const pp=Array.from(Array(256).keys(),u=>u.toString(16).padStart(2,"0"));var Sa,vd,Hl,_p;class I{static makeHexColor(t,e,s){return`#${pp[t]}${pp[e]}${pp[s]}`}static domMatrixToTransform(t){return[t.a,t.b,t.c,t.d,t.e,t.f]}static scaleMinMax(t,e){let s;t[0]?(t[0]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[3],e[3]*=t[3]):(s=e[0],e[0]=e[1],e[1]=s,s=e[2],e[2]=e[3],e[3]=s,t[1]<0&&(s=e[1],e[1]=e[3],e[3]=s),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(s=e[0],e[0]=e[2],e[2]=s),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static multiplyByDOMMatrix(t,e){return[t[0]*e.a+t[2]*e.b,t[1]*e.a+t[3]*e.b,t[0]*e.c+t[2]*e.d,t[1]*e.c+t[3]*e.d,t[0]*e.e+t[2]*e.f+t[4],t[1]*e.e+t[3]*e.f+t[5]]}static applyTransform(t,e,s=0){const i=t[s],r=t[s+1];t[s]=i*e[0]+r*e[2]+e[4],t[s+1]=i*e[1]+r*e[3]+e[5]}static applyTransformToBezier(t,e,s=0){const i=e[0],r=e[1],a=e[2],o=e[3],l=e[4],h=e[5];for(let c=0;c<6;c+=2){const f=t[s+c],g=t[s+c+1];t[s+c]=f*i+g*a+l,t[s+c+1]=f*r+g*o+h}}static applyInverseTransform(t,e){const s=t[0],i=t[1],r=e[0]*e[3]-e[1]*e[2];t[0]=(s*e[3]-i*e[2]+e[2]*e[5]-e[4]*e[3])/r,t[1]=(-s*e[1]+i*e[0]+e[4]*e[1]-e[5]*e[0])/r}static axialAlignedBoundingBox(t,e,s){const i=e[0],r=e[1],a=e[2],o=e[3],l=e[4],h=e[5],c=t[0],f=t[1],g=t[2],m=t[3];let A=i*c+l,y=A,v=i*g+l,w=v,S=o*f+h,_=S,E=o*m+h,C=E;if(r!==0||a!==0){const T=r*c,x=r*g,P=a*f,M=a*m;A+=P,w+=P,v+=M,y+=M,S+=T,C+=T,E+=x,_+=x}s[0]=Math.min(s[0],A,v,y,w),s[1]=Math.min(s[1],S,E,_,C),s[2]=Math.max(s[2],A,v,y,w),s[3]=Math.max(s[3],S,E,_,C)}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t,e){const s=t[0],i=t[1],r=t[2],a=t[3],o=s**2+i**2,l=s*r+i*a,h=r**2+a**2,c=(o+h)/2,f=Math.sqrt(c**2-(o*h-l**2));e[0]=Math.sqrt(c+f||1),e[1]=Math.sqrt(c-f||1)}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const s=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(s>i)return null;const r=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return r>a?null:[s,r,i,a]}static pointBoundingBox(t,e,s){s[0]=Math.min(s[0],t),s[1]=Math.min(s[1],e),s[2]=Math.max(s[2],t),s[3]=Math.max(s[3],e)}static rectBoundingBox(t,e,s,i,r){r[0]=Math.min(r[0],t,s),r[1]=Math.min(r[1],e,i),r[2]=Math.max(r[2],t,s),r[3]=Math.max(r[3],e,i)}static bezierBoundingBox(t,e,s,i,r,a,o,l,h){h[0]=Math.min(h[0],t,o),h[1]=Math.min(h[1],e,l),h[2]=Math.max(h[2],t,o),h[3]=Math.max(h[3],e,l),b(this,Hl,_p).call(this,t,s,r,o,e,i,a,l,3*(-t+3*(s-r)+o),6*(t-2*s+r),3*(s-t),h),b(this,Hl,_p).call(this,t,s,r,o,e,i,a,l,3*(-e+3*(i-a)+l),6*(e-2*i+a),3*(i-e),h)}}Sa=new WeakSet,vd=function(t,e,s,i,r,a,o,l,h,c){if(h<=0||h>=1)return;const f=1-h,g=h*h,m=g*h,A=f*(f*(f*t+3*h*e)+3*g*s)+m*i,y=f*(f*(f*r+3*h*a)+3*g*o)+m*l;c[0]=Math.min(c[0],A),c[1]=Math.min(c[1],y),c[2]=Math.max(c[2],A),c[3]=Math.max(c[3],y)},Hl=new WeakSet,_p=function(t,e,s,i,r,a,o,l,h,c,f,g){if(Math.abs(h)<1e-12){Math.abs(c)>=1e-12&&b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,-f/c,g);return}const m=c**2-4*f*h;if(m<0)return;const A=Math.sqrt(m),y=2*h;b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,(-c+A)/y,g),b(this,Sa,vd).call(this,t,e,s,i,r,a,o,l,(-c-A)/y,g)},d(I,Sa),d(I,Hl);function XA(u){return decodeURIComponent(escape(u))}let gp=null,im=null;function qA(u){return gp||(gp=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,im=new Map([["ſt","ſt"]])),u.replaceAll(gp,(t,e,s)=>e?e.normalize("NFKC"):im.get(s))}function km(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const u=new Uint8Array(32);return crypto.getRandomValues(u),xm(u)}const Hg="pdfjs_internal_id_";function YA(u,t,e){if(!Array.isArray(e)||e.length<2)return!1;const[s,i,...r]=e;if(!u(s)&&!Number.isInteger(s)||!t(i))return!1;const a=r.length;let o=!0;switch(i.name){case"XYZ":if(a<2||a>3)return!1;break;case"Fit":case"FitB":return a===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(a>1)return!1;break;case"FitR":if(a!==4)return!1;o=!1;break;default:return!1}for(const l of r)if(!(typeof l=="number"||o&&l===null))return!1;return!0}function ne(u,t,e){return Math.min(Math.max(u,t),e)}function Pm(u){return Uint8Array.prototype.toBase64?u.toBase64():btoa(xm(u))}function KA(u){return Uint8Array.fromBase64?Uint8Array.fromBase64(u):ad(atob(u))}typeof Promise.try!="function"&&(Promise.try=function(u,...t){return new Promise(e=>{e(u(...t))})});typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(u){return u.reduce((t,e)=>t+e,0)});const Is="http://www.w3.org/2000/svg",Fn=class Fn{};k(Fn,"CSS",96),k(Fn,"PDF",72),k(Fn,"PDF_TO_CSS_UNITS",Fn.CSS/Fn.PDF);let Pn=Fn;async function od(u,t="text"){if(gl(u,document.baseURI)){const e=await fetch(u);if(!e.ok)throw new Error(e.statusText);switch(t){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"json":return e.json()}return e.text()}return new Promise((e,s)=>{const i=new XMLHttpRequest;i.open("GET",u,!0),i.responseType=t,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(t){case"arraybuffer":case"blob":case"json":e(i.response);return}e(i.responseText);return}s(new Error(i.statusText))}},i.send(null)})}class ld{constructor({viewBox:t,userUnit:e,scale:s,rotation:i,offsetX:r=0,offsetY:a=0,dontFlip:o=!1}){this.viewBox=t,this.userUnit=e,this.scale=s,this.rotation=i,this.offsetX=r,this.offsetY=a,s*=e;const l=(t[2]+t[0])/2,h=(t[3]+t[1])/2;let c,f,g,m;switch(i%=360,i<0&&(i+=360),i){case 180:c=-1,f=0,g=0,m=1;break;case 90:c=0,f=1,g=1,m=0;break;case 270:c=0,f=-1,g=-1,m=0;break;case 0:c=1,f=0,g=0,m=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(g=-g,m=-m);let A,y,v,w;c===0?(A=Math.abs(h-t[1])*s+r,y=Math.abs(l-t[0])*s+a,v=(t[3]-t[1])*s,w=(t[2]-t[0])*s):(A=Math.abs(l-t[0])*s+r,y=Math.abs(h-t[1])*s+a,v=(t[2]-t[0])*s,w=(t[3]-t[1])*s),this.transform=[c*s,f*s,g*s,m*s,A-c*s*l-g*s*h,y-f*s*l-m*s*h],this.width=v,this.height=w}get rawDims(){const t=this.viewBox;return V(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:s=this.offsetX,offsetY:i=this.offsetY,dontFlip:r=!1}={}){return new ld({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:r})}convertToViewportPoint(t,e){const s=[t,e];return I.applyTransform(s,this.transform),s}convertToViewportRectangle(t){const e=[t[0],t[1]];I.applyTransform(e,this.transform);const s=[t[2],t[3]];return I.applyTransform(s,this.transform),[e[0],e[1],s[0],s[1]]}convertToPdfPoint(t,e){const s=[t,e];return I.applyInverseTransform(s,this.transform),s}}class $g extends la{constructor(t,e=0){super(t,"RenderingCancelledException"),this.extraDelay=e}}function np(u){const t=u.length;let e=0;for(;e{try{return new URL(o)}catch{try{return new URL(decodeURIComponent(o))}catch{try{return new URL(o,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(o),"https://foo.bar")}catch{return null}}}}})(u);if(!s)return t;const i=o=>{try{let l=decodeURIComponent(o);return l.includes("/")?(l=l.split("/").at(-1),l.test(/^\.pdf$/i)?l:o):l}catch{return o}},r=/\.pdf$/i,a=s.pathname.split("/").at(-1);if(r.test(a))return i(a);if(s.searchParams.size>0){const o=Array.from(s.searchParams.values()).reverse();for(const h of o)if(r.test(h))return i(h);const l=Array.from(s.searchParams.keys()).reverse();for(const h of l)if(r.test(h))return i(h)}if(s.hash){const l=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(s.hash);if(l)return i(l[0])}return t}class nm{constructor(){k(this,"started",Object.create(null));k(this,"times",[])}time(t){t in this.started&&z(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||z(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let e=0;for(const{name:s}of this.times)e=Math.max(s.length,e);for(const{name:s,start:i,end:r}of this.times)t.push(`${s.padEnd(e)} ${r-i}ms `);return t.join("")}}function gl(u,t){const e=t?URL.parse(u,t):URL.parse(u);return(e==null?void 0:e.protocol)==="http:"||(e==null?void 0:e.protocol)==="https:"}function je(u){u.preventDefault()}function vt(u){u.preventDefault(),u.stopPropagation()}function ZA(u){console.log("Deprecated API usage: "+u)}var $l;class Qd{static toDateObject(t){if(t instanceof Date)return t;if(!t||typeof t!="string")return null;n(this,$l)||p(this,$l,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const e=n(this,$l).exec(t);if(!e)return null;const s=parseInt(e[1],10);let i=parseInt(e[2],10);i=i>=1&&i<=12?i-1:0;let r=parseInt(e[3],10);r=r>=1&&r<=31?r:1;let a=parseInt(e[4],10);a=a>=0&&a<=23?a:0;let o=parseInt(e[5],10);o=o>=0&&o<=59?o:0;let l=parseInt(e[6],10);l=l>=0&&l<=59?l:0;const h=e[7]||"Z";let c=parseInt(e[8],10);c=c>=0&&c<=23?c:0;let f=parseInt(e[9],10)||0;return f=f>=0&&f<=59?f:0,h==="-"?(a+=c,o+=f):h==="+"&&(a-=c,o-=f),new Date(Date.UTC(s,i,r,a,o,l))}}$l=new WeakMap,d(Qd,$l,void 0);function ty(u,{scale:t=1,rotation:e=0}){const{width:s,height:i}=u.attributes.style,r=[0,0,parseInt(s),parseInt(i)];return new ld({viewBox:r,userUnit:1,scale:t,rotation:e})}function rp(u){if(u.startsWith("#")){const t=parseInt(u.slice(1),16);return[(t&16711680)>>16,(t&65280)>>8,t&255]}return u.startsWith("rgb(")?u.slice(4,-1).split(",").map(t=>parseInt(t)):u.startsWith("rgba(")?u.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):(z(`Not a valid color format: "${u}"`),[0,0,0])}function ey(u){const t=document.createElement("span");t.style.visibility="hidden",t.style.colorScheme="only light",document.body.append(t);for(const e of u.keys()){t.style.color=e;const s=window.getComputedStyle(t).color;u.set(e,rp(s))}t.remove()}function dt(u){const{a:t,b:e,c:s,d:i,e:r,f:a}=u.getTransform();return[t,e,s,i,r,a]}function os(u){const{a:t,b:e,c:s,d:i,e:r,f:a}=u.getTransform().invertSelf();return[t,e,s,i,r,a]}function ra(u,t,e=!1,s=!0){if(t instanceof ld){const{pageWidth:i,pageHeight:r}=t.rawDims,{style:a}=u,o=Wt.isCSSRoundSupported,l=`var(--total-scale-factor) * ${i}px`,h=`var(--total-scale-factor) * ${r}px`,c=o?`round(down, ${l}, var(--scale-round-x))`:`calc(${l})`,f=o?`round(down, ${h}, var(--scale-round-y))`:`calc(${h})`;!e||t.rotation%180===0?(a.width=c,a.height=f):(a.width=f,a.height=c)}s&&u.setAttribute("data-main-rotation",t.rotation)}class Ds{constructor(){const{pixelRatio:t}=Ds;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(t,e,s,i,r=-1){let a=1/0,o=1/0,l=1/0;s=Ds.capPixels(s,r),s>0&&(a=Math.sqrt(s/(t*e))),i!==-1&&(o=i/t,l=i/e);const h=Math.min(a,o,l);return this.sx>h||this.sy>h?(this.sx=h,this.sy=h,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(t,e){if(e>=0){const s=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+e/100));return t>0?Math.min(t,s):s}return t}}const Sp=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];var Pi,Mi,Ie,Hs,zl,Ea,Ca,Gl,ou,Mm,lu,Rm,hu,Dm,Ri,ua,Bn,ml;const Os=class Os{constructor(t){d(this,lu);d(this,hu);d(this,Ri);d(this,Bn);d(this,Pi,null);d(this,Mi,null);d(this,Ie,void 0);d(this,Hs,null);d(this,zl,null);d(this,Ea,null);d(this,Ca,null);p(this,Ie,t),n(Os,Gl)||p(Os,Gl,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"}))}render(){const t=p(this,Pi,document.createElement("div"));t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const e=n(this,Ie)._uiManager._signal;e instanceof AbortSignal&&!e.aborted&&(t.addEventListener("contextmenu",je,{signal:e}),t.addEventListener("pointerdown",b(Os,ou,Mm),{signal:e}));const s=p(this,Hs,document.createElement("div"));s.className="buttons",t.append(s);const i=n(this,Ie).toolbarPosition;if(i){const{style:r}=t,a=n(this,Ie)._uiManager.direction==="ltr"?1-i[0]:i[0];r.insetInlineEnd=`${100*a}%`,r.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return t}get div(){return n(this,Pi)}hide(){var t;n(this,Pi).classList.add("hidden"),(t=n(this,Mi))==null||t.hideDropdown()}show(){var t,e;n(this,Pi).classList.remove("hidden"),(t=n(this,zl))==null||t.shown(),(e=n(this,Ea))==null||e.shown()}addDeleteButton(){const{editorType:t,_uiManager:e}=n(this,Ie),s=document.createElement("button");s.classList.add("basic","deleteButton"),s.tabIndex=0,s.setAttribute("data-l10n-id",n(Os,Gl)[t]),b(this,Ri,ua).call(this,s)&&s.addEventListener("click",i=>{e.delete()},{signal:e._signal}),n(this,Hs).append(s)}async addAltText(t){const e=await t.render();b(this,Ri,ua).call(this,e),n(this,Hs).append(e,n(this,Bn,ml)),p(this,zl,t)}addComment(t){if(n(this,Ea))return;const e=t.render();e&&(b(this,Ri,ua).call(this,e),n(this,Hs).append(e,n(this,Bn,ml)),p(this,Ea,t),t.toolbar=this)}addColorPicker(t){if(n(this,Mi))return;p(this,Mi,t);const e=t.renderButton();b(this,Ri,ua).call(this,e),n(this,Hs).append(e,n(this,Bn,ml))}async addEditSignatureButton(t){const e=p(this,Ca,await t.renderEditButton(n(this,Ie)));b(this,Ri,ua).call(this,e),n(this,Hs).append(e,n(this,Bn,ml))}async addButton(t,e){switch(t){case"colorPicker":this.addColorPicker(e);break;case"altText":await this.addAltText(e);break;case"editSignature":await this.addEditSignatureButton(e);break;case"delete":this.addDeleteButton();break;case"comment":this.addComment(e);break}}updateEditSignatureButton(t){n(this,Ca)&&(n(this,Ca).title=t)}remove(){var t;n(this,Pi).remove(),(t=n(this,Mi))==null||t.destroy(),p(this,Mi,null)}};Pi=new WeakMap,Mi=new WeakMap,Ie=new WeakMap,Hs=new WeakMap,zl=new WeakMap,Ea=new WeakMap,Ca=new WeakMap,Gl=new WeakMap,ou=new WeakSet,Mm=function(t){t.stopPropagation()},lu=new WeakSet,Rm=function(t){n(this,Ie)._focusEventsAllowed=!1,vt(t)},hu=new WeakSet,Dm=function(t){n(this,Ie)._focusEventsAllowed=!0,vt(t)},Ri=new WeakSet,ua=function(t){const e=n(this,Ie)._uiManager._signal;return!(e instanceof AbortSignal)||e.aborted?!1:(t.addEventListener("focusin",b(this,lu,Rm).bind(this),{capture:!0,signal:e}),t.addEventListener("focusout",b(this,hu,Dm).bind(this),{capture:!0,signal:e}),t.addEventListener("contextmenu",je,{signal:e}),!0)},Bn=new WeakSet,ml=function(){const t=document.createElement("div");return t.className="divider",t},d(Os,ou),d(Os,Gl,null);let Ep=Os;var Ul,Hn,$s,cu,Lm,du,Im,jl,Cp;class sy{constructor(t){d(this,cu);d(this,du);d(this,jl);d(this,Ul,null);d(this,Hn,null);d(this,$s,void 0);p(this,$s,t)}show(t,e,s){const[i,r]=b(this,du,Im).call(this,e,s),{style:a}=n(this,Hn)||p(this,Hn,b(this,cu,Lm).call(this));t.append(n(this,Hn)),a.insetInlineEnd=`${100*i}%`,a.top=`calc(${100*r}% + var(--editor-toolbar-vert-offset))`}hide(){n(this,Hn).remove()}}Ul=new WeakMap,Hn=new WeakMap,$s=new WeakMap,cu=new WeakSet,Lm=function(){const t=p(this,Hn,document.createElement("div"));t.className="editToolbar",t.setAttribute("role","toolbar");const e=n(this,$s)._signal;e instanceof AbortSignal&&!e.aborted&&t.addEventListener("contextmenu",je,{signal:e});const s=p(this,Ul,document.createElement("div"));return s.className="buttons",t.append(s),n(this,$s).hasCommentManager()&&b(this,jl,Cp).call(this,"commentButton","pdfjs-comment-floating-button","pdfjs-comment-floating-button-label",()=>{n(this,$s).commentSelection("floating_button")}),b(this,jl,Cp).call(this,"highlightButton","pdfjs-highlight-floating-button1","pdfjs-highlight-floating-button-label",()=>{n(this,$s).highlightSelection("floating_button")}),t},du=new WeakSet,Im=function(t,e){let s=0,i=0;for(const r of t){const a=r.y+r.height;if(as){i=o,s=a;continue}e?o>i&&(i=o):o(s.drawImage(i,0,0,1,1,0,0,1,3),new Uint32Array(s.getImageData(0,0,1,1).data.buffer)[0]===0));return V(this,"_isSVGFittingCanvas",r)}async getFromFile(t){const{lastModified:e,name:s,size:i,type:r}=t;return b(this,xa,_d).call(this,`${e}_${s}_${i}_${r}`,t)}async getFromUrl(t){return b(this,xa,_d).call(this,t,t)}async getFromBlob(t,e){const s=await e;return b(this,xa,_d).call(this,t,s)}async getFromId(t){n(this,qt)||p(this,qt,new Map);const e=n(this,qt).get(t);if(!e)return null;if(e.bitmap)return e.refCounter+=1,e;if(e.file)return this.getFromFile(e.file);if(e.blobPromise){const{blobPromise:s}=e;return delete e.blobPromise,this.getFromBlob(e.id,s)}return this.getFromUrl(e.url)}getFromCanvas(t,e){n(this,qt)||p(this,qt,new Map);let s=n(this,qt).get(t);if(s!=null&&s.bitmap)return s.refCounter+=1,s;const i=new OffscreenCanvas(e.width,e.height);return i.getContext("2d").drawImage(e,0,0),s={bitmap:i.transferToImageBitmap(),id:`image_${n(this,Ta)}_${St(this,Vl)._++}`,refCounter:1,isSvg:!1},n(this,qt).set(t,s),n(this,qt).set(s.id,s),s}getSvgUrl(t){const e=n(this,qt).get(t);return e!=null&&e.isSvg?e.svgUrl:null}deleteId(t){var i;n(this,qt)||p(this,qt,new Map);const e=n(this,qt).get(t);if(!e||(e.refCounter-=1,e.refCounter!==0))return;const{bitmap:s}=e;if(!e.url&&!e.file){const r=new OffscreenCanvas(s.width,s.height);r.getContext("bitmaprenderer").transferFromImageBitmap(s),e.blobPromise=r.convertToBlob()}(i=s.close)==null||i.call(s),e.bitmap=null}isValidId(t){return t.startsWith(`image_${n(this,Ta)}_`)}};Ta=new WeakMap,Vl=new WeakMap,qt=new WeakMap,xa=new WeakSet,_d=async function(t,e){n(this,qt)||p(this,qt,new Map);let s=n(this,qt).get(t);if(s===null)return null;if(s!=null&&s.bitmap)return s.refCounter+=1,s;try{s||(s={bitmap:null,id:`image_${n(this,Ta)}_${St(this,Vl)._++}`,refCounter:0,isSvg:!1});let i;if(typeof e=="string"?(s.url=e,i=await od(e,"blob")):e instanceof File?i=s.file=e:e instanceof Blob&&(i=e),i.type==="image/svg+xml"){const r=Yg._isSVGFittingCanvas,a=new FileReader,o=new Image,l=new Promise((h,c)=>{o.onload=()=>{s.bitmap=o,s.isSvg=!0,h()},a.onload=async()=>{const f=s.svgUrl=a.result;o.src=await r?`${f}#svgView(preserveAspectRatio(none))`:f},o.onerror=a.onerror=c});a.readAsDataURL(i),await l}else s.bitmap=await createImageBitmap(i);s.refCounter=1}catch(i){z(i),s=null}return n(this,qt).set(t,s),s&&n(this,qt).set(s.id,s),s};let Tp=Yg;var gt,Di,Wl,ht;class ny{constructor(t=128){d(this,gt,[]);d(this,Di,!1);d(this,Wl,void 0);d(this,ht,-1);p(this,Wl,t)}add({cmd:t,undo:e,post:s,mustExec:i,type:r=NaN,overwriteIfSameType:a=!1,keepUndo:o=!1}){if(i&&t(),n(this,Di))return;const l={cmd:t,undo:e,post:s,type:r};if(n(this,ht)===-1){n(this,gt).length>0&&(n(this,gt).length=0),p(this,ht,0),n(this,gt).push(l);return}if(a&&n(this,gt)[n(this,ht)].type===r){o&&(l.undo=n(this,gt)[n(this,ht)].undo),n(this,gt)[n(this,ht)]=l;return}const h=n(this,ht)+1;h===n(this,Wl)?n(this,gt).splice(0,1):(p(this,ht,h),h=0;e--)if(n(this,gt)[e].type!==t){n(this,gt).splice(e+1,n(this,ht)-e),p(this,ht,e);return}n(this,gt).length=0,p(this,ht,-1)}}destroy(){p(this,gt,null)}}gt=new WeakMap,Di=new WeakMap,Wl=new WeakMap,ht=new WeakMap;var fu,Nm;class hd{constructor(t){d(this,fu);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:e}=Wt.platform;for(const[s,i,r={}]of t)for(const a of s){const o=a.startsWith("mac+");e&&o?(this.callbacks.set(a.slice(4),{callback:i,options:r}),this.allKeys.add(a.split("+").at(-1))):!e&&!o&&(this.callbacks.set(a,{callback:i,options:r}),this.allKeys.add(a.split("+").at(-1)))}}exec(t,e){if(!this.allKeys.has(e.key))return;const s=this.callbacks.get(b(this,fu,Nm).call(this,e));if(!s)return;const{callback:i,options:{bubbles:r=!1,args:a=[],checker:o=null}}=s;o&&!o(t,e)||(i.bind(t,...a,e)(),r||vt(e))}}fu=new WeakSet,Nm=function(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const e=this.buffer.join("+");return this.buffer.length=0,e};const pu=class pu{get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return ey(t),V(this,"_colors",t)}convert(t){const e=rp(t);if(!window.matchMedia("(forced-colors: active)").matches)return e;for(const[s,i]of this._colors)if(i.every((r,a)=>r===e[a]))return pu._colorsMapping.get(s);return e}getHexCode(t){const e=this._colors.get(t);return e?I.makeHexColor(...e):t}};k(pu,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let xp=pu;var ka,ue,Pa,Ct,Bt,Ma,zs,Ra,Fe,Gs,Li,Ii,Da,$n,cs,Ne,zn,Xl,ql,La,Yl,ds,Fi,Ia,Ni,us,gu,Oi,Fa,Kl,Bi,Gn,Na,Hi,Ql,Tt,Q,Us,$i,zi,Jl,Oa,Zl,Gi,fs,js,th,eh,Oe,Ba,Sd,sh,kp,mu,Om,bu,Bm,Un,bl,Au,Hm,yu,$m,wu,zm,ih,Pp,vu,Gm,nh,Mp,rh,Rp,_u,Um,Ht,Qt,qe,Fs,Su,jm,Eu,Vm,ah,Dp,Cu,Wm,jn,Al,oh,Lp;const wa=class wa{constructor(t,e,s,i,r,a,o,l,h,c,f,g,m,A,y,v){d(this,Ba);d(this,sh);d(this,mu);d(this,bu);d(this,Un);d(this,Au);d(this,yu);d(this,wu);d(this,ih);d(this,vu);d(this,nh);d(this,rh);d(this,_u);d(this,Ht);d(this,qe);d(this,Su);d(this,Eu);d(this,ah);d(this,Cu);d(this,jn);d(this,oh);d(this,ka,new AbortController);d(this,ue,null);d(this,Pa,null);d(this,Ct,new Map);d(this,Bt,new Map);d(this,Ma,null);d(this,zs,null);d(this,Ra,null);d(this,Fe,new ny);d(this,Gs,null);d(this,Li,null);d(this,Ii,null);d(this,Da,0);d(this,$n,new Set);d(this,cs,null);d(this,Ne,null);d(this,zn,new Set);k(this,"_editorUndoBar",null);d(this,Xl,!1);d(this,ql,!1);d(this,La,!1);d(this,Yl,null);d(this,ds,null);d(this,Fi,null);d(this,Ia,null);d(this,Ni,!1);d(this,us,null);d(this,gu,new iy);d(this,Oi,!1);d(this,Fa,!1);d(this,Kl,!1);d(this,Bi,null);d(this,Gn,null);d(this,Na,null);d(this,Hi,null);d(this,Ql,null);d(this,Tt,$.NONE);d(this,Q,new Set);d(this,Us,null);d(this,$i,null);d(this,zi,null);d(this,Jl,null);d(this,Oa,null);d(this,Zl,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});d(this,Gi,[0,0]);d(this,fs,null);d(this,js,null);d(this,th,null);d(this,eh,null);d(this,Oe,null);const w=this._signal=n(this,ka).signal;p(this,js,t),p(this,th,e),p(this,eh,s),p(this,Ma,i),p(this,Gs,r),p(this,$i,a),p(this,Oa,l),this._eventBus=o,o._on("editingaction",this.onEditingAction.bind(this),{signal:w}),o._on("pagechanging",this.onPageChanging.bind(this),{signal:w}),o._on("scalechanging",this.onScaleChanging.bind(this),{signal:w}),o._on("rotationchanging",this.onRotationChanging.bind(this),{signal:w}),o._on("setpreference",this.onSetPreference.bind(this),{signal:w}),o._on("switchannotationeditorparams",S=>this.updateParams(S.type,S.value),{signal:w}),window.addEventListener("pointerdown",()=>{p(this,Fa,!0)},{capture:!0,signal:w}),window.addEventListener("pointerup",()=>{p(this,Fa,!1)},{capture:!0,signal:w}),b(this,Au,Hm).call(this),b(this,_u,Um).call(this),b(this,ih,Pp).call(this),p(this,zs,l.annotationStorage),p(this,Yl,l.filterFactory),p(this,zi,h),p(this,Ia,c||null),p(this,Xl,f),p(this,ql,g),p(this,La,m),p(this,Ql,A||null),this.viewParameters={realScale:Pn.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=y||null,this._supportsPinchToZoom=v!==!1}static get _keyboardManager(){const t=wa.prototype,e=a=>n(a,js).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&a.hasSomethingToControl(),s=(a,{target:o})=>{if(o instanceof HTMLInputElement){const{type:l}=o;return l!=="text"&&l!=="number"}return!0},i=this.TRANSLATE_SMALL,r=this.TRANSLATE_BIG;return V(this,"_keyboardManager",new hd([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:s}],[["ctrl+z","mac+meta+z"],t.undo,{checker:s}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:s}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:s}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(a,{target:o})=>!(o instanceof HTMLButtonElement)&&n(a,js).contains(o)&&!a.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(a,{target:o})=>!(o instanceof HTMLButtonElement)&&n(a,js).contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-r,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[r,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-r],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,r],checker:e}]]))}destroy(){var t,e,s,i,r,a,o,l,h;(t=n(this,Oe))==null||t.resolve(),p(this,Oe,null),(e=n(this,ka))==null||e.abort(),p(this,ka,null),this._signal=null;for(const c of n(this,Bt).values())c.destroy();n(this,Bt).clear(),n(this,Ct).clear(),n(this,zn).clear(),(s=n(this,Hi))==null||s.clear(),p(this,ue,null),n(this,Q).clear(),n(this,Fe).destroy(),(i=n(this,Ma))==null||i.destroy(),(r=n(this,Gs))==null||r.destroy(),(a=n(this,$i))==null||a.destroy(),(o=n(this,us))==null||o.hide(),p(this,us,null),(l=n(this,Na))==null||l.destroy(),p(this,Na,null),p(this,Pa,null),n(this,ds)&&(clearTimeout(n(this,ds)),p(this,ds,null)),n(this,fs)&&(clearTimeout(n(this,fs)),p(this,fs,null)),(h=this._editorUndoBar)==null||h.destroy(),p(this,Oa,null)}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return n(this,Ql)}get useNewAltTextFlow(){return n(this,ql)}get useNewAltTextWhenAddingImage(){return n(this,La)}get hcmFilter(){return V(this,"hcmFilter",n(this,zi)?n(this,Yl).addHCMFilter(n(this,zi).foreground,n(this,zi).background):"none")}get direction(){return V(this,"direction",getComputedStyle(n(this,js)).direction)}get _highlightColors(){return V(this,"_highlightColors",n(this,Ia)?new Map(n(this,Ia).split(",").map(t=>(t=t.split("=").map(e=>e.trim()),t[1]=t[1].toUpperCase(),t))):null)}get highlightColors(){const{_highlightColors:t}=this;if(!t)return V(this,"highlightColors",null);const e=new Map,s=!!n(this,zi);for(const[i,r]of t){const a=i.endsWith("_HCM");if(s&&a){e.set(i.replace("_HCM",""),r);continue}!s&&!a&&e.set(i,r)}return V(this,"highlightColors",e)}get highlightColorNames(){return V(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}getNonHCMColor(t){if(!this._highlightColors)return t;const e=this.highlightColorNames.get(t);return this._highlightColors.get(e)||t}getNonHCMColorName(t){return this.highlightColorNames.get(t)||t}setCurrentDrawingSession(t){t?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),p(this,Ii,t)}setMainHighlightColorPicker(t){p(this,Na,t)}editAltText(t,e=!1){var s;(s=n(this,Ma))==null||s.editAltText(this,t,e)}hasCommentManager(){return!!n(this,Gs)}editComment(t,e){var s;(s=n(this,Gs))==null||s.open(this,t,e)}getSignature(t){var e;(e=n(this,$i))==null||e.getSignature({uiManager:this,editor:t})}get signatureManager(){return n(this,$i)}switchToMode(t,e){this._eventBus.on("annotationeditormodechanged",e,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,e){this._eventBus.dispatch("setpreference",{source:this,name:t,value:e})}onSetPreference({name:t,value:e}){switch(t){case"enableNewAltTextWhenAddingImage":p(this,La,e);break}}onPageChanging({pageNumber:t}){p(this,Da,t-1)}focusMainContainer(){n(this,js).focus()}findParent(t,e){for(const s of n(this,Bt).values()){const{x:i,y:r,width:a,height:o}=s.div.getBoundingClientRect();if(t>=i&&t<=i+a&&e>=r&&e<=r+o)return s}return null}disableUserSelect(t=!1){n(this,th).classList.toggle("noUserSelect",t)}addShouldRescale(t){n(this,zn).add(t)}removeShouldRescale(t){n(this,zn).delete(t)}onScaleChanging({scale:t}){var e;this.commitOrRemove(),this.viewParameters.realScale=t*Pn.PDF_TO_CSS_UNITS;for(const s of n(this,zn))s.onScaleChanging();(e=n(this,Ii))==null||e.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}highlightSelection(t="",e=!1){const s=document.getSelection();if(!s||s.isCollapsed)return;const{anchorNode:i,anchorOffset:r,focusNode:a,focusOffset:o}=s,l=s.toString(),c=b(this,Ba,Sd).call(this,s).closest(".textLayer"),f=this.getSelectionBoxes(c);if(!f)return;s.empty();const g=b(this,sh,kp).call(this,c),m=n(this,Tt)===$.NONE,A=()=>{const y=g==null?void 0:g.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:f,anchorNode:i,anchorOffset:r,focusNode:a,focusOffset:o,text:l});m&&this.showAllEditors("highlight",!0,!0),e&&(y==null||y.editComment())};if(m){this.switchToMode($.HIGHLIGHT,A);return}A()}commentSelection(t=""){this.highlightSelection(t,!0)}addToAnnotationStorage(t){!t.isEmpty()&&n(this,zs)&&!n(this,zs).has(t.id)&&n(this,zs).setValue(t.id,t)}a11yAlert(t,e=null){const s=n(this,eh);s&&(s.setAttribute("data-l10n-id",t),e?s.setAttribute("data-l10n-args",JSON.stringify(e)):s.removeAttribute("data-l10n-args"))}blur(){if(this.isShiftKeyDown=!1,n(this,Ni)&&(p(this,Ni,!1),b(this,Un,bl).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const e of n(this,Q))if(e.div.contains(t)){p(this,Gn,[e,t]),e._focusEventsAllowed=!1;break}}focus(){if(!n(this,Gn))return;const[t,e]=n(this,Gn);p(this,Gn,null),e.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),e.focus()}addEditListeners(){b(this,ih,Pp).call(this),b(this,nh,Mp).call(this)}removeEditListeners(){b(this,vu,Gm).call(this),b(this,rh,Rp).call(this)}dragOver(t){for(const{type:e}of t.dataTransfer.items)for(const s of n(this,Ne))if(s.isHandlingMimeForPasting(e)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const e of t.dataTransfer.items)for(const s of n(this,Ne))if(s.isHandlingMimeForPasting(e.type)){s.paste(e,this.currentLayer),t.preventDefault();return}}copy(t){var s;if(t.preventDefault(),(s=n(this,ue))==null||s.commitOrRemove(),!this.hasSelection)return;const e=[];for(const i of n(this,Q)){const r=i.serialize(!0);r&&e.push(r)}e.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(e))}cut(t){this.copy(t),this.delete()}async paste(t){t.preventDefault();const{clipboardData:e}=t;for(const r of e.items)for(const a of n(this,Ne))if(a.isHandlingMimeForPasting(r.type)){a.paste(r,this.currentLayer);return}let s=e.getData("application/pdfjs");if(!s)return;try{s=JSON.parse(s)}catch(r){z(`paste: "${r.message}".`);return}if(!Array.isArray(s))return;this.unselectAll();const i=this.currentLayer;try{const r=[];for(const l of s){const h=await i.deserialize(l);if(!h)return;r.push(h)}const a=()=>{for(const l of r)b(this,ah,Dp).call(this,l);b(this,oh,Lp).call(this,r)},o=()=>{for(const l of r)l.remove()};this.addCommands({cmd:a,undo:o,mustExec:!0})}catch(r){z(`paste: "${r.message}".`)}}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),n(this,Tt)!==$.NONE&&!this.isEditorHandlingKeyboard&&wa._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,n(this,Ni)&&(p(this,Ni,!1),b(this,Un,bl).call(this,"main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break;case"commentSelection":this.commentSelection("context_menu");break}}setEditingState(t){t?(b(this,yu,$m).call(this),b(this,nh,Mp).call(this),b(this,Ht,Qt).call(this,{isEditing:n(this,Tt)!==$.NONE,isEmpty:b(this,jn,Al).call(this),hasSomethingToUndo:n(this,Fe).hasSomethingToUndo(),hasSomethingToRedo:n(this,Fe).hasSomethingToRedo(),hasSelectedEditor:!1})):(b(this,wu,zm).call(this),b(this,rh,Rp).call(this),b(this,Ht,Qt).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!n(this,Ne)){p(this,Ne,t);for(const e of n(this,Ne))b(this,qe,Fs).call(this,e.defaultPropertiesToUpdate)}}getId(){return n(this,gu).id}get currentLayer(){return n(this,Bt).get(n(this,Da))}getLayer(t){return n(this,Bt).get(t)}get currentPageIndex(){return n(this,Da)}addLayer(t){n(this,Bt).set(t.pageIndex,t),n(this,Oi)?t.enable():t.disable()}removeLayer(t){n(this,Bt).delete(t.pageIndex)}async updateMode(t,e=null,s=!1,i=!1,r=!1){var a,o,l,h,c;if(n(this,Tt)!==t&&!(n(this,Oe)&&(await n(this,Oe).promise,!n(this,Oe)))){if(p(this,Oe,Promise.withResolvers()),(a=n(this,Ii))==null||a.commitOrRemove(),n(this,Tt)===$.POPUP&&((o=n(this,Gs))==null||o.hideSidebar()),p(this,Tt,t),t===$.NONE){this.setEditingState(!1),b(this,Eu,Vm).call(this),(l=this._editorUndoBar)==null||l.hide(),n(this,Oe).resolve();return}t===$.SIGNATURE&&await((h=n(this,$i))==null?void 0:h.loadSignatures()),t===$.POPUP&&(n(this,Pa)||p(this,Pa,await n(this,Oa).getAnnotationsByType(new Set(n(this,Ne).map(f=>f._editorType)))),(c=n(this,Gs))==null||c.showSidebar(n(this,Pa))),this.setEditingState(!0),await b(this,Su,jm).call(this),this.unselectAll();for(const f of n(this,Bt).values())f.updateMode(t);if(!e){s&&this.addNewEditorFromKeyboard(),n(this,Oe).resolve();return}for(const f of n(this,Ct).values())f.annotationElementId===e||f.id===e?(this.setSelected(f),r?f.editComment():i&&f.enterInEditMode()):f.unselect();n(this,Oe).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t.mode!==n(this,Tt)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...t})}updateParams(t,e){if(n(this,Ne)){switch(t){case X.CREATE:this.currentLayer.addNewEditor(e);return;case X.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(n(this,Jl)||p(this,Jl,new Map)).set(t,e),this.showAllEditors("highlight",e);break}if(this.hasSelection)for(const s of n(this,Q))s.updateParams(t,e);else for(const s of n(this,Ne))s.updateDefaultParams(t,e)}}showAllEditors(t,e,s=!1){var r;for(const a of n(this,Ct).values())a.editorType===t&&a.show(e);(((r=n(this,Jl))==null?void 0:r.get(X.HIGHLIGHT_SHOW_ALL))??!0)!==e&&b(this,qe,Fs).call(this,[[X.HIGHLIGHT_SHOW_ALL,e]])}enableWaiting(t=!1){if(n(this,Kl)!==t){p(this,Kl,t);for(const e of n(this,Bt).values())t?e.disableClick():e.enableClick(),e.div.classList.toggle("waiting",t)}}getEditors(t){const e=[];for(const s of n(this,Ct).values())s.pageIndex===t&&e.push(s);return e}getEditor(t){return n(this,Ct).get(t)}addEditor(t){n(this,Ct).set(t.id,t)}removeEditor(t){var e,s;t.div.contains(document.activeElement)&&(n(this,ds)&&clearTimeout(n(this,ds)),p(this,ds,setTimeout(()=>{this.focusMainContainer(),p(this,ds,null)},0))),n(this,Ct).delete(t.id),t.annotationElementId&&((e=n(this,Hi))==null||e.delete(t.annotationElementId)),this.unselect(t),(!t.annotationElementId||!n(this,$n).has(t.annotationElementId))&&((s=n(this,zs))==null||s.remove(t.id))}addDeletedAnnotationElement(t){n(this,$n).add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return n(this,$n).has(t)}removeDeletedAnnotationElement(t){n(this,$n).delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}setActiveEditor(t){n(this,ue)!==t&&(p(this,ue,t),t&&b(this,qe,Fs).call(this,t.propertiesToUpdate))}updateUI(t){n(this,Cu,Wm)===t&&b(this,qe,Fs).call(this,t.propertiesToUpdate)}updateUIForDefaultProperties(t){b(this,qe,Fs).call(this,t.defaultPropertiesToUpdate)}toggleSelected(t){if(n(this,Q).has(t)){n(this,Q).delete(t),t.unselect(),b(this,Ht,Qt).call(this,{hasSelectedEditor:this.hasSelection});return}n(this,Q).add(t),t.select(),b(this,qe,Fs).call(this,t.propertiesToUpdate),b(this,Ht,Qt).call(this,{hasSelectedEditor:!0})}setSelected(t){var e;this.updateToolbar({mode:t.mode,editId:t.id}),(e=n(this,Ii))==null||e.commitOrRemove();for(const s of n(this,Q))s!==t&&s.unselect();n(this,Q).clear(),n(this,Q).add(t),t.select(),b(this,qe,Fs).call(this,t.propertiesToUpdate),b(this,Ht,Qt).call(this,{hasSelectedEditor:!0})}isSelected(t){return n(this,Q).has(t)}get firstSelectedEditor(){return n(this,Q).values().next().value}unselect(t){t.unselect(),n(this,Q).delete(t),b(this,Ht,Qt).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return n(this,Q).size!==0}get isEnterHandled(){return n(this,Q).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){var t;n(this,Fe).undo(),b(this,Ht,Qt).call(this,{hasSomethingToUndo:n(this,Fe).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:b(this,jn,Al).call(this)}),(t=this._editorUndoBar)==null||t.hide()}redo(){n(this,Fe).redo(),b(this,Ht,Qt).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:n(this,Fe).hasSomethingToRedo(),isEmpty:b(this,jn,Al).call(this)})}addCommands(t){n(this,Fe).add(t),b(this,Ht,Qt).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:b(this,jn,Al).call(this)})}cleanUndoStack(t){n(this,Fe).cleanType(t)}delete(){var r;this.commitOrRemove();const t=(r=this.currentLayer)==null?void 0:r.endDrawingSession(!0);if(!this.hasSelection&&!t)return;const e=t?[t]:[...n(this,Q)],s=()=>{var a;(a=this._editorUndoBar)==null||a.show(i,e.length===1?e[0].editorType:e.length);for(const o of e)o.remove()},i=()=>{for(const a of e)b(this,ah,Dp).call(this,a)};this.addCommands({cmd:s,undo:i,mustExec:!0})}commitOrRemove(){var t;(t=n(this,ue))==null||t.commitOrRemove()}hasSomethingToControl(){return n(this,ue)||this.hasSelection}selectAll(){for(const t of n(this,Q))t.commit();b(this,oh,Lp).call(this,n(this,Ct).values())}unselectAll(){var t;if(!(n(this,ue)&&(n(this,ue).commitOrRemove(),n(this,Tt)!==$.NONE))&&!((t=n(this,Ii))!=null&&t.commitOrRemove())&&this.hasSelection){for(const e of n(this,Q))e.unselect();n(this,Q).clear(),b(this,Ht,Qt).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(t,e,s=!1){if(s||this.commitOrRemove(),!this.hasSelection)return;n(this,Gi)[0]+=t,n(this,Gi)[1]+=e;const[i,r]=n(this,Gi),a=[...n(this,Q)],o=1e3;n(this,fs)&&clearTimeout(n(this,fs)),p(this,fs,setTimeout(()=>{p(this,fs,null),n(this,Gi)[0]=n(this,Gi)[1]=0,this.addCommands({cmd:()=>{for(const l of a)n(this,Ct).has(l.id)&&(l.translateInPage(i,r),l.translationDone())},undo:()=>{for(const l of a)n(this,Ct).has(l.id)&&(l.translateInPage(-i,-r),l.translationDone())},mustExec:!1})},o));for(const l of a)l.translateInPage(t,e),l.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),p(this,cs,new Map);for(const t of n(this,Q))n(this,cs).set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!n(this,cs))return!1;this.disableUserSelect(!1);const t=n(this,cs);p(this,cs,null);let e=!1;for(const[{x:i,y:r,pageIndex:a},o]of t)o.newX=i,o.newY=r,o.newPageIndex=a,e||(e=i!==o.savedX||r!==o.savedY||a!==o.savedPageIndex);if(!e)return!1;const s=(i,r,a,o)=>{if(n(this,Ct).has(i.id)){const l=n(this,Bt).get(o);l?i._setParentAndPosition(l,r,a):(i.pageIndex=o,i.x=r,i.y=a)}};return this.addCommands({cmd:()=>{for(const[i,{newX:r,newY:a,newPageIndex:o}]of t)s(i,r,a,o)},undo:()=>{for(const[i,{savedX:r,savedY:a,savedPageIndex:o}]of t)s(i,r,a,o)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(n(this,cs))for(const s of n(this,cs).keys())s.drag(t,e)}rebuild(t){if(t.parent===null){const e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){var t;return((t=this.getActive())==null?void 0:t.shouldGetKeyboardEvents())||n(this,Q).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return n(this,ue)===t}getActive(){return n(this,ue)}getMode(){return n(this,Tt)}get imageManager(){return V(this,"imageManager",new Tp)}getSelectionBoxes(t){if(!t)return null;const e=document.getSelection();for(let h=0,c=e.rangeCount;h({x:(c-i)/a,y:1-(h+f-s)/r,width:g/a,height:f/r});break;case"180":o=(h,c,f,g)=>({x:1-(h+f-s)/r,y:1-(c+g-i)/a,width:f/r,height:g/a});break;case"270":o=(h,c,f,g)=>({x:1-(c+g-i)/a,y:(h-s)/r,width:g/a,height:f/r});break;default:o=(h,c,f,g)=>({x:(h-s)/r,y:(c-i)/a,width:f/r,height:g/a});break}const l=[];for(let h=0,c=e.rangeCount;h{g.type==="pointerup"&&g.button!==0||(h.abort(),l==null||l.toggleDrawing(!0),g.type==="pointerup"&&b(this,Un,bl).call(this,"main_toolbar"))};window.addEventListener("pointerup",f,{signal:c}),window.addEventListener("blur",f,{signal:c})}else l==null||l.toggleDrawing(!0),b(this,Un,bl).call(this,"main_toolbar")}},Un=new WeakSet,bl=function(t=""){n(this,Tt)===$.HIGHLIGHT?this.highlightSelection(t):n(this,Xl)&&b(this,mu,Om).call(this)},Au=new WeakSet,Hm=function(){document.addEventListener("selectionchange",b(this,bu,Bm).bind(this),{signal:this._signal})},yu=new WeakSet,$m=function(){if(n(this,Fi))return;p(this,Fi,new AbortController);const t=this.combinedSignal(n(this,Fi));window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})},wu=new WeakSet,zm=function(){var t;(t=n(this,Fi))==null||t.abort(),p(this,Fi,null)},ih=new WeakSet,Pp=function(){if(n(this,Bi))return;p(this,Bi,new AbortController);const t=this.combinedSignal(n(this,Bi));window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})},vu=new WeakSet,Gm=function(){var t;(t=n(this,Bi))==null||t.abort(),p(this,Bi,null)},nh=new WeakSet,Mp=function(){if(n(this,Li))return;p(this,Li,new AbortController);const t=this.combinedSignal(n(this,Li));document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})},rh=new WeakSet,Rp=function(){var t;(t=n(this,Li))==null||t.abort(),p(this,Li,null)},_u=new WeakSet,Um=function(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})},Ht=new WeakSet,Qt=function(t){Object.entries(t).some(([s,i])=>n(this,Zl)[s]!==i)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(n(this,Zl),t)}),n(this,Tt)===$.HIGHLIGHT&&t.hasSelectedEditor===!1&&b(this,qe,Fs).call(this,[[X.HIGHLIGHT_FREE,!0]]))},qe=new WeakSet,Fs=function(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})},Su=new WeakSet,jm=async function(){if(!n(this,Oi)){p(this,Oi,!0);const t=[];for(const e of n(this,Bt).values())t.push(e.enable());await Promise.all(t);for(const e of n(this,Ct).values())e.enable()}},Eu=new WeakSet,Vm=function(){if(this.unselectAll(),n(this,Oi)){p(this,Oi,!1);for(const t of n(this,Bt).values())t.disable();for(const t of n(this,Ct).values())t.disable()}},ah=new WeakSet,Dp=function(t){const e=n(this,Bt).get(t.pageIndex);e?e.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))},Cu=new WeakSet,Wm=function(){let t=null;for(t of n(this,Q));return t},jn=new WeakSet,Al=function(){if(n(this,Ct).size===0)return!0;if(n(this,Ct).size===1)for(const t of n(this,Ct).values())return t.isEmpty();return!1},oh=new WeakSet,Lp=function(t){for(const e of n(this,Q))e.unselect();n(this,Q).clear();for(const e of t)e.isEmpty()||(n(this,Q).add(e),e.select());b(this,Ht,Qt).call(this,{hasSelectedEditor:this.hasSelection})},k(wa,"TRANSLATE_SMALL",1),k(wa,"TRANSLATE_BIG",10);let aa=wa;var Mt,ps,Ye,Ha,gs,fe,$a,ms,oe,Vs,Vn,bs,Ui,Wn,yl,za,Ed;const Jt=class Jt{constructor(t){d(this,Wn);d(this,za);d(this,Mt,null);d(this,ps,!1);d(this,Ye,null);d(this,Ha,null);d(this,gs,null);d(this,fe,null);d(this,$a,!1);d(this,ms,null);d(this,oe,null);d(this,Vs,null);d(this,Vn,null);d(this,bs,!1);p(this,oe,t),p(this,bs,t._uiManager.useNewAltTextFlow),n(Jt,Ui)||p(Jt,Ui,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(t){Jt._l10n??(Jt._l10n=t)}async render(){const t=p(this,Ye,document.createElement("button"));t.className="altText",t.tabIndex="0";const e=p(this,Ha,document.createElement("span"));t.append(e),n(this,bs)?(t.classList.add("new"),t.setAttribute("data-l10n-id",n(Jt,Ui).missing),e.setAttribute("data-l10n-id",n(Jt,Ui)["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const s=n(this,oe)._uiManager._signal;t.addEventListener("contextmenu",je,{signal:s}),t.addEventListener("pointerdown",r=>r.stopPropagation(),{signal:s});const i=r=>{r.preventDefault(),n(this,oe)._uiManager.editAltText(n(this,oe)),n(this,bs)&&n(this,oe)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:n(this,Wn,yl)}})};return t.addEventListener("click",i,{capture:!0,signal:s}),t.addEventListener("keydown",r=>{r.target===t&&r.key==="Enter"&&(p(this,$a,!0),i(r))},{signal:s}),await b(this,za,Ed).call(this),t}finish(){n(this,Ye)&&(n(this,Ye).focus({focusVisible:n(this,$a)}),p(this,$a,!1))}isEmpty(){return n(this,bs)?n(this,Mt)===null:!n(this,Mt)&&!n(this,ps)}hasData(){return n(this,bs)?n(this,Mt)!==null||!!n(this,Vs):this.isEmpty()}get guessedText(){return n(this,Vs)}async setGuessedText(t){n(this,Mt)===null&&(p(this,Vs,t),p(this,Vn,await Jt._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t})),b(this,za,Ed).call(this))}toggleAltTextBadge(t=!1){var e;if(!n(this,bs)||n(this,Mt)){(e=n(this,ms))==null||e.remove(),p(this,ms,null);return}if(!n(this,ms)){const s=p(this,ms,document.createElement("div"));s.className="noAltTextBadge",n(this,oe).div.append(s)}n(this,ms).classList.toggle("hidden",!t)}serialize(t){let e=n(this,Mt);return!t&&n(this,Vs)===e&&(e=n(this,Vn)),{altText:e,decorative:n(this,ps),guessedText:n(this,Vs),textWithDisclaimer:n(this,Vn)}}get data(){return{altText:n(this,Mt),decorative:n(this,ps)}}set data({altText:t,decorative:e,guessedText:s,textWithDisclaimer:i,cancel:r=!1}){s&&(p(this,Vs,s),p(this,Vn,i)),!(n(this,Mt)===t&&n(this,ps)===e)&&(r||(p(this,Mt,t),p(this,ps,e)),b(this,za,Ed).call(this))}toggle(t=!1){n(this,Ye)&&(!t&&n(this,fe)&&(clearTimeout(n(this,fe)),p(this,fe,null)),n(this,Ye).disabled=!t)}shown(){n(this,oe)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:n(this,Wn,yl)}})}destroy(){var t,e;(t=n(this,Ye))==null||t.remove(),p(this,Ye,null),p(this,Ha,null),p(this,gs,null),(e=n(this,ms))==null||e.remove(),p(this,ms,null)}};Mt=new WeakMap,ps=new WeakMap,Ye=new WeakMap,Ha=new WeakMap,gs=new WeakMap,fe=new WeakMap,$a=new WeakMap,ms=new WeakMap,oe=new WeakMap,Vs=new WeakMap,Vn=new WeakMap,bs=new WeakMap,Ui=new WeakMap,Wn=new WeakSet,yl=function(){return n(this,Mt)&&"added"||n(this,Mt)===null&&this.guessedText&&"review"||"missing"},za=new WeakSet,Ed=async function(){var i,r,a;const t=n(this,Ye);if(!t)return;if(n(this,bs)){if(t.classList.toggle("done",!!n(this,Mt)),t.setAttribute("data-l10n-id",n(Jt,Ui)[n(this,Wn,yl)]),(i=n(this,Ha))==null||i.setAttribute("data-l10n-id",n(Jt,Ui)[`${n(this,Wn,yl)}-label`]),!n(this,Mt)){(r=n(this,gs))==null||r.remove();return}}else{if(!n(this,Mt)&&!n(this,ps)){t.classList.remove("done"),(a=n(this,gs))==null||a.remove();return}t.classList.add("done"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let e=n(this,gs);if(!e){p(this,gs,e=document.createElement("span")),e.className="tooltip",e.setAttribute("role","tooltip"),e.id=`alt-text-tooltip-${n(this,oe).id}`;const o=100,l=n(this,oe)._uiManager._signal;l.addEventListener("abort",()=>{clearTimeout(n(this,fe)),p(this,fe,null)},{once:!0}),t.addEventListener("mouseenter",()=>{p(this,fe,setTimeout(()=>{p(this,fe,null),n(this,gs).classList.add("show"),n(this,oe)._reportTelemetry({action:"alt_text_tooltip"})},o))},{signal:l}),t.addEventListener("mouseleave",()=>{var h;n(this,fe)&&(clearTimeout(n(this,fe)),p(this,fe,null)),(h=n(this,gs))==null||h.classList.remove("show")},{signal:l})}n(this,ps)?e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(e.removeAttribute("data-l10n-id"),e.textContent=n(this,Mt)),e.parentNode||t.append(e);const s=n(this,oe).getElementForAltText();s==null||s.setAttribute("aria-describedby",e.id)},d(Jt,Ui,null),k(Jt,"_l10n",null);let Jd=Jt;var As,Xn,Ke,lh,Ws,Ga,ji;class fd{constructor(t){d(this,As,null);d(this,Xn,!1);d(this,Ke,null);d(this,lh,null);d(this,Ws,null);d(this,Ga,null);d(this,ji,!1);p(this,Ke,t),this.toolbar=null}render(){if(!n(this,Ke)._uiManager.hasCommentManager())return null;const t=p(this,As,document.createElement("button"));t.className="comment",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-edit-comment-button");const e=n(this,Ke)._uiManager._signal;if(!(e instanceof AbortSignal)||e.aborted)return t;t.addEventListener("contextmenu",je,{signal:e}),t.addEventListener("pointerdown",i=>i.stopPropagation(),{signal:e});const s=i=>{i.preventDefault(),this.edit()};return t.addEventListener("click",s,{capture:!0,signal:e}),t.addEventListener("keydown",i=>{i.target===t&&i.key==="Enter"&&(p(this,Xn,!0),s(i))},{signal:e}),t}edit(){const{bottom:t,left:e,right:s}=n(this,Ke).getClientDimensions(),i={top:t};n(this,Ke)._uiManager.direction==="ltr"?i.right=s:i.left=e,n(this,Ke)._uiManager.editComment(n(this,Ke),i)}finish(){n(this,As)&&(n(this,As).focus({focusVisible:n(this,Xn)}),p(this,Xn,!1))}isDeleted(){return n(this,ji)||n(this,Ws)===""}hasBeenEdited(){return this.isDeleted()||n(this,Ws)!==n(this,lh)}serialize(){return this.data}get data(){return{text:n(this,Ws),date:n(this,Ga),deleted:n(this,ji)}}set data(t){if(t===null){p(this,Ws,""),p(this,ji,!0);return}p(this,Ws,t),p(this,Ga,new Date),p(this,ji,!1)}setInitialText(t){p(this,lh,t),this.data=t}toggle(t=!1){n(this,As)&&(n(this,As).disabled=!t)}shown(){}destroy(){var t;(t=n(this,As))==null||t.remove(),p(this,As,null),p(this,Ws,""),p(this,Ga,null),p(this,Ke,null),p(this,Xn,!1),p(this,ji,!1)}}As=new WeakMap,Xn=new WeakMap,Ke=new WeakMap,lh=new WeakMap,Ws=new WeakMap,Ga=new WeakMap,ji=new WeakMap;var Ua,qn,hh,ch,dh,uh,fh,Xs,Yn,qs,Kn,Ys,Tu,Xm,xu,qm,ku,Ym;const Kg=class Kg{constructor({container:t,isPinchingDisabled:e=null,isPinchingStopped:s=null,onPinchStart:i=null,onPinching:r=null,onPinchEnd:a=null,signal:o}){d(this,Tu);d(this,xu);d(this,ku);d(this,Ua,void 0);d(this,qn,!1);d(this,hh,null);d(this,ch,void 0);d(this,dh,void 0);d(this,uh,void 0);d(this,fh,void 0);d(this,Xs,null);d(this,Yn,void 0);d(this,qs,null);d(this,Kn,void 0);d(this,Ys,null);p(this,Ua,t),p(this,hh,s),p(this,ch,e),p(this,dh,i),p(this,uh,r),p(this,fh,a),p(this,Kn,new AbortController),p(this,Yn,AbortSignal.any([o,n(this,Kn).signal])),t.addEventListener("touchstart",b(this,Tu,Xm).bind(this),{passive:!1,signal:n(this,Yn)})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/Ds.pixelRatio}destroy(){var t,e;(t=n(this,Kn))==null||t.abort(),p(this,Kn,null),(e=n(this,Xs))==null||e.abort(),p(this,Xs,null)}};Ua=new WeakMap,qn=new WeakMap,hh=new WeakMap,ch=new WeakMap,dh=new WeakMap,uh=new WeakMap,fh=new WeakMap,Xs=new WeakMap,Yn=new WeakMap,qs=new WeakMap,Kn=new WeakMap,Ys=new WeakMap,Tu=new WeakSet,Xm=function(t){var i,r,a;if((i=n(this,ch))!=null&&i.call(this))return;if(t.touches.length===1){if(n(this,Xs))return;const o=p(this,Xs,new AbortController),l=AbortSignal.any([n(this,Yn),o.signal]),h=n(this,Ua),c={capture:!0,signal:l,passive:!1},f=g=>{var m;g.pointerType==="touch"&&((m=n(this,Xs))==null||m.abort(),p(this,Xs,null))};h.addEventListener("pointerdown",g=>{g.pointerType==="touch"&&(vt(g),f(g))},c),h.addEventListener("pointerup",f,c),h.addEventListener("pointercancel",f,c);return}if(!n(this,Ys)){p(this,Ys,new AbortController);const o=AbortSignal.any([n(this,Yn),n(this,Ys).signal]),l=n(this,Ua),h={signal:o,capture:!1,passive:!1};l.addEventListener("touchmove",b(this,xu,qm).bind(this),h);const c=b(this,ku,Ym).bind(this);l.addEventListener("touchend",c,h),l.addEventListener("touchcancel",c,h),h.capture=!0,l.addEventListener("pointerdown",vt,h),l.addEventListener("pointermove",vt,h),l.addEventListener("pointercancel",vt,h),l.addEventListener("pointerup",vt,h),(r=n(this,dh))==null||r.call(this)}if(vt(t),t.touches.length!==2||(a=n(this,hh))!=null&&a.call(this)){p(this,qs,null);return}let[e,s]=t.touches;e.identifier>s.identifier&&([e,s]=[s,e]),p(this,qs,{touch0X:e.screenX,touch0Y:e.screenY,touch1X:s.screenX,touch1Y:s.screenY})},xu=new WeakSet,qm=function(t){var E;if(!n(this,qs)||t.touches.length!==2)return;vt(t);let[e,s]=t.touches;e.identifier>s.identifier&&([e,s]=[s,e]);const{screenX:i,screenY:r}=e,{screenX:a,screenY:o}=s,l=n(this,qs),{touch0X:h,touch0Y:c,touch1X:f,touch1Y:g}=l,m=f-h,A=g-c,y=a-i,v=o-r,w=Math.hypot(y,v)||1,S=Math.hypot(m,A)||1;if(!n(this,qn)&&Math.abs(S-w)<=Kg.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(l.touch0X=i,l.touch0Y=r,l.touch1X=a,l.touch1Y=o,!n(this,qn)){p(this,qn,!0);return}const _=[(i+a)/2,(r+o)/2];(E=n(this,uh))==null||E.call(this,_,S,w)},ku=new WeakSet,Ym=function(t){var e;t.touches.length>=2||(n(this,Ys)&&(n(this,Ys).abort(),p(this,Ys,null),(e=n(this,fh))==null||e.call(this)),n(this,qs)&&(vt(t),p(this,qs,null),p(this,qn,!1)))};let Zd=Kg;var Qn,Qe,ot,$t,ja,Vi,ph,Jn,zt,Zn,Ks,Wi,gh,tr,pe,mh,er,Qs,ys,Va,Wa,Be,sr,bh,Pu,Ah,Ip,yh,Fp,Xa,Cd,Mu,Km,Ru,Qm,wh,Np,qa,Td,vh,Op,Du,Jm,Lu,Zm,Iu,tb,_h,Bp,Fu,eb,Sh,Hp,Nu,sb,Ou,ib,Bu,nb,Eh,$p,ir,wl;const G=class G{constructor(t){d(this,Ah);d(this,Xa);d(this,Mu);d(this,Ru);d(this,wh);d(this,qa);d(this,vh);d(this,Du);d(this,Lu);d(this,Iu);d(this,_h);d(this,Fu);d(this,Sh);d(this,Nu);d(this,Ou);d(this,Bu);d(this,Eh);d(this,ir);d(this,Qn,null);d(this,Qe,null);d(this,ot,null);d(this,$t,null);d(this,ja,!1);d(this,Vi,null);d(this,ph,"");d(this,Jn,!1);d(this,zt,null);d(this,Zn,null);d(this,Ks,null);d(this,Wi,null);d(this,gh,"");d(this,tr,!1);d(this,pe,null);d(this,mh,!1);d(this,er,!1);d(this,Qs,!1);d(this,ys,null);d(this,Va,0);d(this,Wa,0);d(this,Be,null);d(this,sr,null);k(this,"isSelected",!1);k(this,"_isCopy",!1);k(this,"_editToolbar",null);k(this,"_initialOptions",Object.create(null));k(this,"_initialData",null);k(this,"_isVisible",!0);k(this,"_uiManager",null);k(this,"_focusEventsAllowed",!0);d(this,bh,!1);d(this,Pu,G._zIndex++);this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null,this.annotationElementId=t.annotationElementId||null;const{rotation:e,rawDims:{pageWidth:s,pageHeight:i,pageX:r,pageY:a}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[s,i],this.pageTranslation=[r,a];const[o,l]=this.parentDimensions;this.x=t.x/o,this.y=t.y/l,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const t=G.prototype._resizeWithKeyboard,e=aa.TRANSLATE_SMALL,s=aa.TRANSLATE_BIG;return V(this,"_resizerKeyboardManager",new hd([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-e,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-s,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[e,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[s,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-e]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-s]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,e]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,s]}],[["Escape","mac+Escape"],G.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return V(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new ry({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t,e){if(G._l10n??(G._l10n=t),G._l10nResizer||(G._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),G._borderLineWidth!==-1)return;const s=getComputedStyle(document.documentElement);G._borderLineWidth=parseFloat(s.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){st("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return n(this,bh)}set _isDraggable(t){var e;p(this,bh,t),(e=this.div)==null||e.classList.toggle("draggable",t)}get isEnterHandled(){return!0}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(t*2),this.y+=this.width*t/(e*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(t*2),this.y-=this.width*t/(e*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=n(this,Pu)}setParent(t){t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):b(this,ir,wl).call(this),this.parent=t}focusin(t){this._focusEventsAllowed&&(n(this,tr)?p(this,tr,!1):this.parent.setSelected(this))}focusout(t){var s;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const e=t.relatedTarget;e!=null&&e.closest(`#${this.id}`)||(t.preventDefault(),(s=this.parent)!=null&&s.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,s,i){const[r,a]=this.parentDimensions;[s,i]=this.screenToPageTranslation(s,i),this.x=(t+s)/r,this.y=(e+i)/a,this.fixAndSetPosition()}_moveAfterPaste(t,e){const[s,i]=this.parentDimensions;this.setAt(t*s,e*i,this.width*s,this.height*i),this._onTranslated()}translate(t,e){b(this,Ah,Ip).call(this,this.parentDimensions,t,e)}translateInPage(t,e){n(this,pe)||p(this,pe,[this.x,this.y,this.width,this.height]),b(this,Ah,Ip).call(this,this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(t,e){n(this,pe)||p(this,pe,[this.x,this.y,this.width,this.height]);const{div:s,parentDimensions:[i,r]}=this;if(this.x+=t/i,this.y+=e/r,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:f,y:g}=this.div.getBoundingClientRect();this.parent.findNewParent(this,f,g)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:a,y:o}=this;const[l,h]=this.getBaseTranslation();a+=l,o+=h;const{style:c}=s;c.left=`${(100*a).toFixed(2)}%`,c.top=`${(100*o).toFixed(2)}%`,this._onTranslating(a,o),s.scrollIntoView({block:"nearest"})}_onTranslating(t,e){}_onTranslated(t,e){}get _hasBeenMoved(){return!!n(this,pe)&&(n(this,pe)[0]!==this.x||n(this,pe)[1]!==this.y)}get _hasBeenResized(){return!!n(this,pe)&&(n(this,pe)[2]!==this.width||n(this,pe)[3]!==this.height)}getBaseTranslation(){const[t,e]=this.parentDimensions,{_borderLineWidth:s}=G,i=s/t,r=s/e;switch(this.rotation){case 90:return[-i,r];case 180:return[i,r];case 270:return[i,-r];default:return[-i,-r]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const{div:{style:e},pageDimensions:[s,i]}=this;let{x:r,y:a,width:o,height:l}=this;if(o*=s,l*=i,r*=s,a*=i,this._mustFixPosition)switch(t){case 0:r=ne(r,0,s-o),a=ne(a,0,i-l);break;case 90:r=ne(r,0,s-l),a=ne(a,o,i);break;case 180:r=ne(r,o,s),a=ne(a,l,i);break;case 270:r=ne(r,l,s),a=ne(a,0,i-o);break}this.x=r/=s,this.y=a/=i;const[h,c]=this.getBaseTranslation();r+=h,a+=c,e.left=`${(100*r).toFixed(2)}%`,e.top=`${(100*a).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(t,e){var s;return b(s=G,yh,Fp).call(s,t,e,this.parentRotation)}pageTranslationToScreen(t,e){var s;return b(s=G,yh,Fp).call(s,t,e,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,s]}=this;return[e*t,s*t]}setDims(t,e){const[s,i]=this.parentDimensions,{style:r}=this.div;r.width=`${(100*t/s).toFixed(2)}%`,n(this,Jn)||(r.height=`${(100*e/i).toFixed(2)}%`)}fixDims(){const{style:t}=this.div,{height:e,width:s}=t,i=s.endsWith("%"),r=!n(this,Jn)&&e.endsWith("%");if(i&&r)return;const[a,o]=this.parentDimensions;i||(t.width=`${(100*parseFloat(s)/a).toFixed(2)}%`),!n(this,Jn)&&!r&&(t.height=`${(100*parseFloat(e)/o).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}_onResized(){}static _round(t){return Math.round(t*1e4)/1e4}_onResizing(){}altTextFinish(){var t;(t=n(this,ot))==null||t.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||n(this,er))return this._editToolbar;this._editToolbar=new Ep(this),this.div.append(this._editToolbar.render());const{toolbarButtons:t}=this;if(t)for(const[e,s]of t)await this._editToolbar.addButton(e,s);return this._editToolbar.addButton("comment",this.addCommentButton()),this._editToolbar.addButton("delete"),this._editToolbar}removeEditToolbar(){var t;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(t=n(this,ot))==null||t.destroy())}addContainer(t){var s;const e=(s=this._editToolbar)==null?void 0:s.div;e?e.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return n(this,ot)||(Jd.initialize(G._l10n),p(this,ot,new Jd(this)),n(this,Qn)&&(n(this,ot).data=n(this,Qn),p(this,Qn,null))),n(this,ot)}get altTextData(){var t;return(t=n(this,ot))==null?void 0:t.data}set altTextData(t){n(this,ot)&&(n(this,ot).data=t)}get guessedAltText(){var t;return(t=n(this,ot))==null?void 0:t.guessedText}async setGuessedAltText(t){var e;await((e=n(this,ot))==null?void 0:e.setGuessedText(t))}serializeAltText(t){var e;return(e=n(this,ot))==null?void 0:e.serialize(t)}hasAltText(){return!!n(this,ot)&&!n(this,ot).isEmpty()}hasAltTextData(){var t;return((t=n(this,ot))==null?void 0:t.hasData())??!1}addCommentButton(){return n(this,$t)?n(this,$t):p(this,$t,new fd(this))}get commentColor(){return null}get comment(){const t=n(this,$t);return{text:t.data.text,date:t.data.date,deleted:t.isDeleted(),color:this.commentColor}}set comment(t){n(this,$t)||p(this,$t,new fd(this)),n(this,$t).data=t}setCommentData(t){n(this,$t)||p(this,$t,new fd(this)),n(this,$t).setInitialText(t)}get hasEditedComment(){var t;return(t=n(this,$t))==null?void 0:t.hasBeenEdited()}async editComment(){n(this,$t)||p(this,$t,new fd(this)),n(this,$t).edit()}addComment(t){if(this.hasEditedComment){const[,,,i]=t.rect,[r]=this.pageDimensions,[a]=this.pageTranslation,o=a+r+1,l=i-100,h=o+180;t.popup={contents:this.comment.text,deleted:this.comment.deleted,rect:[o,l,h,i]}}}render(){var a;const t=this.div=document.createElement("div");t.setAttribute("data-editor-rotation",(360-this.rotation)%360),t.className=this.name,t.setAttribute("id",this.id),t.tabIndex=n(this,ja)?-1:0,t.setAttribute("role","application"),this.defaultL10nId&&t.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||t.classList.add("hidden"),this.setInForeground(),b(this,Sh,Hp).call(this);const[e,s]=this.parentDimensions;this.parentRotation%180!==0&&(t.style.maxWidth=`${(100*s/e).toFixed(2)}%`,t.style.maxHeight=`${(100*e/s).toFixed(2)}%`);const[i,r]=this.getInitialTranslation();return this.translate(i,r),Fm(this,t,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(n(this,sr)||p(this,sr,new Zd({container:t,isPinchingDisabled:()=>!this.isSelected,onPinchStart:b(this,Du,Jm).bind(this),onPinching:b(this,Lu,Zm).bind(this),onPinchEnd:b(this,Iu,tb).bind(this),signal:this._uiManager._signal}))),(a=this._uiManager._editorUndoBar)==null||a.hide(),t}pointerdown(t){const{isMac:e}=Wt.platform;if(t.button!==0||t.ctrlKey&&e){t.preventDefault();return}if(p(this,tr,!0),this._isDraggable){b(this,Fu,eb).call(this,t);return}b(this,_h,Bp).call(this,t)}_onStartDragging(){}_onStopDragging(){}moveInDOM(){n(this,ys)&&clearTimeout(n(this,ys)),p(this,ys,setTimeout(()=>{var t;p(this,ys,null),(t=this.parent)==null||t.moveEditorInDOM(this)},0))}_setParentAndPosition(t,e,s){t.changeParent(this),this.x=e,this.y=s,this.fixAndSetPosition(),this._onTranslated()}getRect(t,e,s=this.rotation){const i=this.parentScale,[r,a]=this.pageDimensions,[o,l]=this.pageTranslation,h=t/i,c=e/i,f=this.x*r,g=this.y*a,m=this.width*r,A=this.height*a;switch(s){case 0:return[f+h+o,a-g-c-A+l,f+h+m+o,a-g-c+l];case 90:return[f+c+o,a-g+h+l,f+c+A+o,a-g+h+m+l];case 180:return[f-h-m+o,a-g+c+l,f-h+o,a-g+c+A+l];case 270:return[f-c-A+o,a-g-h-m+l,f-c+o,a-g-h+l];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[s,i,r,a]=t,o=r-s,l=a-i;switch(this.rotation){case 0:return[s,e-a,o,l];case 90:return[s,e-i,l,o];case 180:return[r,e-i,o,l];case 270:return[r,e-a,l,o];default:throw new Error("Invalid rotation")}}getPDFRect(){return this.getRect(0,0)}onceAdded(t){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),p(this,er,!0),!0)}disableEditMode(){return this.isInEditMode()?(this.parent.setEditingState(!0),p(this,er,!1),!0):!1}isInEditMode(){return n(this,er)}shouldGetKeyboardEvents(){return n(this,Qs)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:t,left:e,bottom:s,right:i}=this.getClientDimensions(),{innerHeight:r,innerWidth:a}=window;return e0&&t0}rebuild(){b(this,Sh,Hp).call(this)}rotate(t){}resize(){}serializeDeleted(){var t;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((t=this._initialData)==null?void 0:t.popupRef)||""}}serialize(t=!1,e=null){st("An editor must be serializable")}static async deserialize(t,e,s){const i=new this.prototype.constructor({parent:e,id:e.getNextId(),uiManager:s,annotationElementId:t.annotationElementId});i.rotation=t.rotation,p(i,Qn,t.accessibilityData),i._isCopy=t.isCopy||!1;const[r,a]=i.pageDimensions,[o,l,h,c]=i.getRectInCurrentCoords(t.rect,a);return i.x=o/r,i.y=l/a,i.width=h/r,i.height=c/a,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var t,e;if((t=n(this,Wi))==null||t.abort(),p(this,Wi,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),n(this,ys)&&(clearTimeout(n(this,ys)),p(this,ys,null)),b(this,ir,wl).call(this),this.removeEditToolbar(),n(this,Be)){for(const s of n(this,Be).values())clearTimeout(s);p(this,Be,null)}this.parent=null,(e=n(this,sr))==null||e.destroy(),p(this,sr,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(b(this,Mu,Km).call(this),n(this,zt).classList.remove("hidden"))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),p(this,Ks,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const e=n(this,zt).children;if(!n(this,Qe)){p(this,Qe,Array.from(e));const a=b(this,Nu,sb).bind(this),o=b(this,Ou,ib).bind(this),l=this._uiManager._signal;for(const h of n(this,Qe)){const c=h.getAttribute("data-resizer-name");h.setAttribute("role","spinbutton"),h.addEventListener("keydown",a,{signal:l}),h.addEventListener("blur",o,{signal:l}),h.addEventListener("focus",b(this,Bu,nb).bind(this,c),{signal:l}),h.setAttribute("data-l10n-id",G._l10nResizer[c])}}const s=n(this,Qe)[0];let i=0;for(const a of e){if(a===s)break;i++}const r=(360-this.rotation+this.parentRotation)%360/90*(n(this,Qe).length/4);if(r!==i){if(ri)for(let o=0;o{var i,r;(i=this.div)!=null&&i.classList.contains("selectedEditor")&&((r=this._editToolbar)==null||r.show())});return}(e=this._editToolbar)==null||e.show(),(s=n(this,ot))==null||s.toggleAltTextBadge(!1)}}unselect(){var t,e,s,i,r;this.isSelected&&(this.isSelected=!1,(t=n(this,zt))==null||t.classList.add("hidden"),(e=this.div)==null||e.classList.remove("selectedEditor"),(s=this.div)!=null&&s.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(i=this._editToolbar)==null||i.hide(),(r=n(this,ot))==null||r.toggleAltTextBadge(!0))}updateParams(t,e){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(t){this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.id})}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return n(this,mh)}set isEditing(t){p(this,mh,t),this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,e){p(this,Jn,!0);const s=t/e,{style:i}=this.div;i.aspectRatio=s,i.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,e=!1){if(e){n(this,Be)||p(this,Be,new Map);const{action:s}=t;let i=n(this,Be).get(s);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(t),n(this,Be).delete(s),n(this,Be).size===0&&p(this,Be,null)},G._telemetryTimeout),n(this,Be).set(s,i);return}t.type||(t.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),p(this,ja,!1)}disable(){this.div&&(this.div.tabIndex=-1),p(this,ja,!0)}renderAnnotationElement(t){if(this.deleted)return t.hide(),null;let e=t.container.querySelector(".annotationContent");if(!e)e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.container.prepend(e);else if(e.nodeName==="CANVAS"){const s=e;e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),s.before(e)}return e}resetAnnotationElement(t){const{firstChild:e}=t.container;(e==null?void 0:e.nodeName)==="DIV"&&e.classList.contains("annotationContent")&&e.remove()}};Qn=new WeakMap,Qe=new WeakMap,ot=new WeakMap,$t=new WeakMap,ja=new WeakMap,Vi=new WeakMap,ph=new WeakMap,Jn=new WeakMap,zt=new WeakMap,Zn=new WeakMap,Ks=new WeakMap,Wi=new WeakMap,gh=new WeakMap,tr=new WeakMap,pe=new WeakMap,mh=new WeakMap,er=new WeakMap,Qs=new WeakMap,ys=new WeakMap,Va=new WeakMap,Wa=new WeakMap,Be=new WeakMap,sr=new WeakMap,bh=new WeakMap,Pu=new WeakMap,Ah=new WeakSet,Ip=function([t,e],s,i){[s,i]=this.screenToPageTranslation(s,i),this.x+=s/t,this.y+=i/e,this._onTranslating(this.x,this.y),this.fixAndSetPosition()},yh=new WeakSet,Fp=function(t,e,s){switch(s){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}},Xa=new WeakSet,Cd=function(t){switch(t){case 90:{const[e,s]=this.pageDimensions;return[0,-e/s,s/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,s]=this.pageDimensions;return[0,e/s,-s/e,0]}default:return[1,0,0,1]}},Mu=new WeakSet,Km=function(){if(n(this,zt))return;p(this,zt,document.createElement("div")),n(this,zt).classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],e=this._uiManager._signal;for(const s of t){const i=document.createElement("div");n(this,zt).append(i),i.classList.add("resizer",s),i.setAttribute("data-resizer-name",s),i.addEventListener("pointerdown",b(this,Ru,Qm).bind(this,s),{signal:e}),i.addEventListener("contextmenu",je,{signal:e}),i.tabIndex=-1}this.div.prepend(n(this,zt))},Ru=new WeakSet,Qm=function(t,e){var c;e.preventDefault();const{isMac:s}=Wt.platform;if(e.button!==0||e.ctrlKey&&s)return;(c=n(this,ot))==null||c.toggle(!1);const i=this._isDraggable;this._isDraggable=!1,p(this,Zn,[e.screenX,e.screenY]);const r=new AbortController,a=this._uiManager.combinedSignal(r);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",b(this,vh,Op).bind(this,t),{passive:!0,capture:!0,signal:a}),window.addEventListener("touchmove",vt,{passive:!1,signal:a}),window.addEventListener("contextmenu",je,{signal:a}),p(this,Ks,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const o=this.parent.div.style.cursor,l=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(e.target).cursor;const h=()=>{var f;r.abort(),this.parent.togglePointerEvents(!0),(f=n(this,ot))==null||f.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=o,this.div.style.cursor=l,b(this,qa,Td).call(this)};window.addEventListener("pointerup",h,{signal:a}),window.addEventListener("blur",h,{signal:a})},wh=new WeakSet,Np=function(t,e,s,i){this.width=s,this.height=i,this.x=t,this.y=e;const[r,a]=this.parentDimensions;this.setDims(r*s,a*i),this.fixAndSetPosition(),this._onResized()},qa=new WeakSet,Td=function(){if(!n(this,Ks))return;const{savedX:t,savedY:e,savedWidth:s,savedHeight:i}=n(this,Ks);p(this,Ks,null);const r=this.x,a=this.y,o=this.width,l=this.height;r===t&&a===e&&o===s&&l===i||this.addCommands({cmd:b(this,wh,Np).bind(this,r,a,o,l),undo:b(this,wh,Np).bind(this,t,e,s,i),mustExec:!0})},vh=new WeakSet,Op=function(t,e){const[s,i]=this.parentDimensions,r=this.x,a=this.y,o=this.width,l=this.height,h=G.MIN_SIZE/s,c=G.MIN_SIZE/i,f=b(this,Xa,Cd).call(this,this.rotation),g=(B,N)=>[f[0]*B+f[2]*N,f[1]*B+f[3]*N],m=b(this,Xa,Cd).call(this,360-this.rotation),A=(B,N)=>[m[0]*B+m[2]*N,m[1]*B+m[3]*N];let y,v,w=!1,S=!1;switch(t){case"topLeft":w=!0,y=(B,N)=>[0,0],v=(B,N)=>[B,N];break;case"topMiddle":y=(B,N)=>[B/2,0],v=(B,N)=>[B/2,N];break;case"topRight":w=!0,y=(B,N)=>[B,0],v=(B,N)=>[0,N];break;case"middleRight":S=!0,y=(B,N)=>[B,N/2],v=(B,N)=>[0,N/2];break;case"bottomRight":w=!0,y=(B,N)=>[B,N],v=(B,N)=>[0,0];break;case"bottomMiddle":y=(B,N)=>[B/2,N],v=(B,N)=>[B/2,0];break;case"bottomLeft":w=!0,y=(B,N)=>[0,N],v=(B,N)=>[B,0];break;case"middleLeft":S=!0,y=(B,N)=>[0,N/2],v=(B,N)=>[B,N/2];break}const _=y(o,l),E=v(o,l);let C=g(...E);const T=G._round(r+C[0]),x=G._round(a+C[1]);let P=1,M=1,D,R;if(e.fromKeyboard)({deltaX:D,deltaY:R}=e);else{const{screenX:B,screenY:N}=e,[Pt,At]=n(this,Zn);[D,R]=this.screenToPageTranslation(B-Pt,N-At),n(this,Zn)[0]=B,n(this,Zn)[1]=N}if([D,R]=A(D/s,R/i),w){const B=Math.hypot(o,l);P=M=Math.max(Math.min(Math.hypot(E[0]-_[0]-D,E[1]-_[1]-R)/B,1/o,1/l),h/o,c/l)}else S?P=ne(Math.abs(E[0]-_[0]-D),h,1)/o:M=ne(Math.abs(E[1]-_[1]-R),c,1)/l;const H=G._round(o*P),U=G._round(l*M);C=g(...v(H,U));const W=T-C[0],Y=x-C[1];n(this,pe)||p(this,pe,[this.x,this.y,this.width,this.height]),this.width=H,this.height=U,this.x=W,this.y=Y,this.setDims(s*H,i*U),this.fixAndSetPosition(),this._onResizing()},Du=new WeakSet,Jm=function(){var t;p(this,Ks,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height}),(t=n(this,ot))==null||t.toggle(!1),this.parent.togglePointerEvents(!1)},Lu=new WeakSet,Zm=function(t,e,s){let r=.7*(s/e)+1-.7;if(r===1)return;const a=b(this,Xa,Cd).call(this,this.rotation),o=(T,x)=>[a[0]*T+a[2]*x,a[1]*T+a[3]*x],[l,h]=this.parentDimensions,c=this.x,f=this.y,g=this.width,m=this.height,A=G.MIN_SIZE/l,y=G.MIN_SIZE/h;r=Math.max(Math.min(r,1/g,1/m),A/g,y/m);const v=G._round(g*r),w=G._round(m*r);if(v===g&&w===m)return;n(this,pe)||p(this,pe,[c,f,g,m]);const S=o(g/2,m/2),_=G._round(c+S[0]),E=G._round(f+S[1]),C=o(v/2,w/2);this.x=_-C[0],this.y=E-C[1],this.width=v,this.height=w,this.setDims(l*v,h*w),this.fixAndSetPosition(),this._onResizing()},Iu=new WeakSet,tb=function(){var t;(t=n(this,ot))==null||t.toggle(!0),this.parent.togglePointerEvents(!0),b(this,qa,Td).call(this)},_h=new WeakSet,Bp=function(t){const{isMac:e}=Wt.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)},Fu=new WeakSet,eb=function(t){const{isSelected:e}=this;this._uiManager.setUpDragSession();let s=!1;const i=new AbortController,r=this._uiManager.combinedSignal(i),a={capture:!0,passive:!1,signal:r},o=h=>{i.abort(),p(this,Vi,null),p(this,tr,!1),this._uiManager.endDragSession()||b(this,_h,Bp).call(this,h),s&&this._onStopDragging()};e&&(p(this,Va,t.clientX),p(this,Wa,t.clientY),p(this,Vi,t.pointerId),p(this,ph,t.pointerType),window.addEventListener("pointermove",h=>{s||(s=!0,this._onStartDragging());const{clientX:c,clientY:f,pointerId:g}=h;if(g!==n(this,Vi)){vt(h);return}const[m,A]=this.screenToPageTranslation(c-n(this,Va),f-n(this,Wa));p(this,Va,c),p(this,Wa,f),this._uiManager.dragSelectedEditors(m,A)},a),window.addEventListener("touchmove",vt,a),window.addEventListener("pointerdown",h=>{h.pointerType===n(this,ph)&&(n(this,sr)||h.isPrimary)&&o(h),vt(h)},a));const l=h=>{if(!n(this,Vi)||n(this,Vi)===h.pointerId){o(h);return}vt(h)};window.addEventListener("pointerup",l,{signal:r}),window.addEventListener("blur",l,{signal:r})},Sh=new WeakSet,Hp=function(){if(n(this,Wi)||!this.div)return;p(this,Wi,new AbortController);const t=this._uiManager.combinedSignal(n(this,Wi));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:t}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:t})},Nu=new WeakSet,sb=function(t){G._resizerKeyboardManager.exec(this,t)},Ou=new WeakSet,ib=function(t){var e;n(this,Qs)&&((e=t.relatedTarget)==null?void 0:e.parentNode)!==n(this,zt)&&b(this,ir,wl).call(this)},Bu=new WeakSet,nb=function(t){p(this,gh,n(this,Qs)?t:"")},Eh=new WeakSet,$p=function(t){if(n(this,Qe))for(const e of n(this,Qe))e.tabIndex=t},ir=new WeakSet,wl=function(){p(this,Qs,!1),b(this,Eh,$p).call(this,-1),b(this,qa,Td).call(this)},d(G,yh),k(G,"_l10n",null),k(G,"_l10nResizer",null),k(G,"_borderLineWidth",-1),k(G,"_colorManager",new xp),k(G,"_zIndex",1),k(G,"_telemetryTimeout",1e3);let rt=G;class ry extends rt{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const rm=3285377520,De=4294901760,ls=65535;class rb{constructor(t){this.h1=t?t&4294967295:rm,this.h2=t?t&4294967295:rm}update(t){let e,s;if(typeof t=="string"){e=new Uint8Array(t.length*2),s=0;for(let y=0,v=t.length;y>>8,e[s++]=w&255)}}else if(ArrayBuffer.isView(t))e=t.slice(),s=e.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const i=s>>2,r=s-i*4,a=new Uint32Array(e.buffer,0,i);let o=0,l=0,h=this.h1,c=this.h2;const f=3432918353,g=461845907,m=f&ls,A=g&ls;for(let y=0;y>>17,o=o*g&De|o*A&ls,h^=o,h=h<<13|h>>>19,h=h*5+3864292196):(l=a[y],l=l*f&De|l*m&ls,l=l<<15|l>>>17,l=l*g&De|l*A&ls,c^=l,c=c<<13|c>>>19,c=c*5+3864292196);switch(o=0,r){case 3:o^=e[i*4+2]<<16;case 2:o^=e[i*4+1]<<8;case 1:o^=e[i*4],o=o*f&De|o*m&ls,o=o<<15|o>>>17,o=o*g&De|o*A&ls,i&1?h^=o:c^=o}this.h1=h,this.h2=c}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=t*3981806797&De|t*36045&ls,e=e*4283543511&De|((e<<16|t>>>16)*2950163797&De)>>>16,t^=e>>>1,t=t*444984403&De|t*60499&ls,e=e*3301882366&De|((e<<16|t>>>16)*3120437893&De)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}const zp=Object.freeze({map:null,hash:"",transfer:void 0});var nr,rr,Gt,Hu,ab;class Gg{constructor(){d(this,Hu);d(this,nr,!1);d(this,rr,null);d(this,Gt,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,e){const s=n(this,Gt).get(t);return s===void 0?e:Object.assign(e,s)}getRawValue(t){return n(this,Gt).get(t)}remove(t){if(n(this,Gt).delete(t),n(this,Gt).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const e of n(this,Gt).values())if(e instanceof rt)return;this.onAnnotationEditor(null)}}setValue(t,e){const s=n(this,Gt).get(t);let i=!1;if(s!==void 0)for(const[r,a]of Object.entries(e))s[r]!==a&&(i=!0,s[r]=a);else i=!0,n(this,Gt).set(t,e);i&&b(this,Hu,ab).call(this),e instanceof rt&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(e.constructor._type)}has(t){return n(this,Gt).has(t)}get size(){return n(this,Gt).size}resetModified(){n(this,nr)&&(p(this,nr,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new ob(this)}get serializable(){if(n(this,Gt).size===0)return zp;const t=new Map,e=new rb,s=[],i=Object.create(null);let r=!1;for(const[a,o]of n(this,Gt)){const l=o instanceof rt?o.serialize(!1,i):o;l&&(t.set(a,l),e.update(`${a}:${JSON.stringify(l)}`),r||(r=!!l.bitmap))}if(r)for(const a of t.values())a.bitmap&&s.push(a.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfer:s}:zp}get editorStats(){let t=null;const e=new Map;for(const s of n(this,Gt).values()){if(!(s instanceof rt))continue;const i=s.telemetryFinalData;if(!i)continue;const{type:r}=i;e.has(r)||e.set(r,Object.getPrototypeOf(s).constructor),t||(t=Object.create(null));const a=t[r]||(t[r]=new Map);for(const[o,l]of Object.entries(i)){if(o==="type")continue;let h=a.get(o);h||(h=new Map,a.set(o,h));const c=h.get(l)??0;h.set(l,c+1)}}for(const[s,i]of e)t[s]=i.computeTelemetryFinalData(t[s]);return t}resetModifiedIds(){p(this,rr,null)}get modifiedIds(){if(n(this,rr))return n(this,rr);const t=[];for(const e of n(this,Gt).values())!(e instanceof rt)||!e.annotationElementId||!e.serialize()||t.push(e.annotationElementId);return p(this,rr,{ids:new Set(t),hash:t.join(",")})}[Symbol.iterator](){return n(this,Gt).entries()}}nr=new WeakMap,rr=new WeakMap,Gt=new WeakMap,Hu=new WeakSet,ab=function(){n(this,nr)||(p(this,nr,!0),typeof this.onSetModified=="function"&&this.onSetModified())};var Ch;class ob extends Gg{constructor(e){super();d(this,Ch,void 0);const{map:s,hash:i,transfer:r}=e.serializable,a=structuredClone(s,r?{transfer:r}:null);p(this,Ch,{map:a,hash:i,transfer:r})}get print(){st("Should not call PrintAnnotationStorage.print")}get serializable(){return n(this,Ch)}get modifiedIds(){return V(this,"modifiedIds",{ids:new Set,hash:""})}}Ch=new WeakMap;var Ya;class ay{constructor({ownerDocument:t=globalThis.document,styleElement:e=null}){d(this,Ya,new Set);this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),n(this,Ya).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:t,disableFontFace:e,_inspectFont:s}){if(!(!t||n(this,Ya).has(t.loadedName))){if(_t(!e,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:r,style:a}=t,o=new FontFace(i,r,a);this.addNativeFontFace(o);try{await o.load(),n(this,Ya).add(i),s==null||s(t)}catch{z(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(o)}return}st("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){await this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const s=t.createNativeFontFace();if(s){this.addNativeFontFace(s);try{await s.loaded}catch(i){throw z(`Failed to load font '${s.family}': '${i}'.`),t.disableFontFace=!0,i}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;await new Promise(s=>{const i=this._queueLoadingCallback(s);this._prepareFontLoadEvent(t,i)})}}get isFontLoadingAPISupported(){var e;const t=!!((e=this._document)!=null&&e.fonts);return V(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){return V(this,"isSyncFontLoadingSupported",ie||Wt.platform.isFirefox)}_queueLoadingCallback(t){function e(){for(_t(!i.done,"completeRequest() cannot be called twice."),i.done=!0;s.length>0&&s[0].done;){const r=s.shift();setTimeout(r.callback,0)}}const{loadingRequests:s}=this,i={done:!1,complete:e,callback:t};return s.push(i),i}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return V(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,e){function s(E,C){return E.charCodeAt(C)<<24|E.charCodeAt(C+1)<<16|E.charCodeAt(C+2)<<8|E.charCodeAt(C+3)&255}function i(E,C,T,x){const P=E.substring(0,C),M=E.substring(C+T);return P+x+M}let r,a;const o=this._document.createElement("canvas");o.width=1,o.height=1;const l=o.getContext("2d");let h=0;function c(E,C){if(++h>30){z("Load test font never loaded."),C();return}if(l.font="30px "+E,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){C();return}setTimeout(c.bind(null,E,C))}const f=`lt${Date.now()}${this.loadTestFontId++}`;let g=this._loadTestFont;g=i(g,976,f.length,f);const A=16,y=1482184792;let v=s(g,A);for(r=0,a=f.length-3;r{_.remove(),e.complete()})}}Ya=new WeakMap;class oy{constructor(t,e=null){this.compiledGlyphs=Object.create(null);for(const s in t)this[s]=t[s];this._inspectFont=e}createNativeFontFace(){var e;if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{const s={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(s.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,s)}return(e=this._inspectFont)==null||e.call(this,this),t}createFontFaceRule(){var s;if(!this.data||this.disableFontFace)return null;const t=`url(data:${this.mimetype};base64,${Pm(this.data)});`;let e;if(!this.cssFontInfo)e=`@font-face {font-family:"${this.loadedName}";src:${t}}`;else{let i=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(i+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),e=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${i}src:${t}}`}return(s=this._inspectFont)==null||s.call(this,this,t),e}getPathGenerator(t,e){if(this.compiledGlyphs[e]!==void 0)return this.compiledGlyphs[e];const s=this.loadedName+"_path_"+e;let i;try{i=t.get(s)}catch(a){z(`getPathGenerator - ignoring character: "${a}".`)}const r=new Path2D(i||"");return this.fontExtraProperties||t.delete(s),this.compiledGlyphs[e]=r}}function ly(u){if(u instanceof URL)return u.href;if(typeof u=="string"){if(ie)return u;const t=URL.parse(u,window.location);if(t)return t.href}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function hy(u){if(ie&&typeof Buffer<"u"&&u instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(u instanceof Uint8Array&&u.byteLength===u.buffer.byteLength)return u;if(typeof u=="string")return ad(u);if(u instanceof ArrayBuffer||ArrayBuffer.isView(u)||typeof u=="object"&&!isNaN(u==null?void 0:u.length))return new Uint8Array(u);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function pd(u){if(typeof u!="string")return null;if(u.endsWith("/"))return u;throw new Error(`Invalid factory url: "${u}" must include trailing slash.`)}const Gp=u=>typeof u=="object"&&Number.isInteger(u==null?void 0:u.num)&&u.num>=0&&Number.isInteger(u==null?void 0:u.gen)&&u.gen>=0,cy=u=>typeof u=="object"&&typeof(u==null?void 0:u.name)=="string",dy=YA.bind(null,Gp,cy);var Js,$u;class uy{constructor(){d(this,Js,new Map);d(this,$u,Promise.resolve())}postMessage(t,e){const s={data:structuredClone(t,e?{transfer:e}:null)};n(this,$u).then(()=>{for(const[i]of n(this,Js))i.call(this,s)})}addEventListener(t,e,s=null){let i=null;if((s==null?void 0:s.signal)instanceof AbortSignal){const{signal:r}=s;if(r.aborted){z("LoopbackPort - cannot use an `aborted` signal.");return}const a=()=>this.removeEventListener(t,e);i=()=>r.removeEventListener("abort",a),r.addEventListener("abort",a)}n(this,Js).set(e,i)}removeEventListener(t,e){const s=n(this,Js).get(e);s==null||s(),n(this,Js).delete(e)}terminate(){for(const[,t]of n(this,Js))t==null||t();n(this,Js).clear()}}Js=new WeakMap,$u=new WeakMap;const gd={DATA:1,ERROR:2},yt={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function am(){}function re(u){if(u instanceof kn||u instanceof vp||u instanceof sm||u instanceof Kd||u instanceof fp)return u;switch(u instanceof Error||typeof u=="object"&&u!==null||st('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),u.name){case"AbortException":return new kn(u.message);case"InvalidPDFException":return new vp(u.message);case"PasswordException":return new sm(u.message,u.code);case"ResponseException":return new Kd(u.message,u.status,u.missing);case"UnknownErrorException":return new fp(u.message,u.details)}return new fp(u.message,u.toString())}var Ka,zu,lb,Gu,hb,Uu,cb,Qa,xd;class vl{constructor(t,e,s){d(this,zu);d(this,Gu);d(this,Uu);d(this,Qa);d(this,Ka,new AbortController);this.sourceName=t,this.targetName=e,this.comObj=s,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),s.addEventListener("message",b(this,zu,lb).bind(this),{signal:n(this,Ka).signal})}on(t,e){const s=this.actionHandler;if(s[t])throw new Error(`There is already an actionName called "${t}"`);s[t]=e}send(t,e,s){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},s)}sendWithPromise(t,e,s){const i=this.callbackId++,r=Promise.withResolvers();this.callbackCapabilities[i]=r;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:i,data:e},s)}catch(a){r.reject(a)}return r.promise}sendWithStream(t,e,s,i){const r=this.streamId++,a=this.sourceName,o=this.targetName,l=this.comObj;return new ReadableStream({start:h=>{const c=Promise.withResolvers();return this.streamControllers[r]={controller:h,startCall:c,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:a,targetName:o,action:t,streamId:r,data:e,desiredSize:h.desiredSize},i),c.promise},pull:h=>{const c=Promise.withResolvers();return this.streamControllers[r].pullCall=c,l.postMessage({sourceName:a,targetName:o,stream:yt.PULL,streamId:r,desiredSize:h.desiredSize}),c.promise},cancel:h=>{_t(h instanceof Error,"cancel must have a valid reason");const c=Promise.withResolvers();return this.streamControllers[r].cancelCall=c,this.streamControllers[r].isClosed=!0,l.postMessage({sourceName:a,targetName:o,stream:yt.CANCEL,streamId:r,reason:re(h)}),c.promise}},s)}destroy(){var t;(t=n(this,Ka))==null||t.abort(),p(this,Ka,null)}}Ka=new WeakMap,zu=new WeakSet,lb=function({data:t}){if(t.targetName!==this.sourceName)return;if(t.stream){b(this,Uu,cb).call(this,t);return}if(t.callback){const s=t.callbackId,i=this.callbackCapabilities[s];if(!i)throw new Error(`Cannot resolve callback ${s}`);if(delete this.callbackCapabilities[s],t.callback===gd.DATA)i.resolve(t.data);else if(t.callback===gd.ERROR)i.reject(re(t.reason));else throw new Error("Unexpected callback case");return}const e=this.actionHandler[t.action];if(!e)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const s=this.sourceName,i=t.sourceName,r=this.comObj;Promise.try(e,t.data).then(function(a){r.postMessage({sourceName:s,targetName:i,callback:gd.DATA,callbackId:t.callbackId,data:a})},function(a){r.postMessage({sourceName:s,targetName:i,callback:gd.ERROR,callbackId:t.callbackId,reason:re(a)})});return}if(t.streamId){b(this,Gu,hb).call(this,t);return}e(t.data)},Gu=new WeakSet,hb=function(t){const e=t.streamId,s=this.sourceName,i=t.sourceName,r=this.comObj,a=this,o=this.actionHandler[t.action],l={enqueue(h,c=1,f){if(this.isCancelled)return;const g=this.desiredSize;this.desiredSize-=c,g>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),r.postMessage({sourceName:s,targetName:i,stream:yt.ENQUEUE,streamId:e,chunk:h},f)},close(){this.isCancelled||(this.isCancelled=!0,r.postMessage({sourceName:s,targetName:i,stream:yt.CLOSE,streamId:e}),delete a.streamSinks[e])},error(h){_t(h instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,r.postMessage({sourceName:s,targetName:i,stream:yt.ERROR,streamId:e,reason:re(h)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[e]=l,Promise.try(o,t.data,l).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.START_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.START_COMPLETE,streamId:e,reason:re(h)})})},Uu=new WeakSet,cb=function(t){const e=t.streamId,s=this.sourceName,i=t.sourceName,r=this.comObj,a=this.streamControllers[e],o=this.streamSinks[e];switch(t.stream){case yt.START_COMPLETE:t.success?a.startCall.resolve():a.startCall.reject(re(t.reason));break;case yt.PULL_COMPLETE:t.success?a.pullCall.resolve():a.pullCall.reject(re(t.reason));break;case yt.PULL:if(!o){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,success:!0});break}o.desiredSize<=0&&t.desiredSize>0&&o.sinkCapability.resolve(),o.desiredSize=t.desiredSize,Promise.try(o.onPull||am).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.PULL_COMPLETE,streamId:e,reason:re(h)})});break;case yt.ENQUEUE:if(_t(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(t.chunk);break;case yt.CLOSE:if(_t(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),b(this,Qa,xd).call(this,a,e);break;case yt.ERROR:_t(a,"error should have stream controller"),a.controller.error(re(t.reason)),b(this,Qa,xd).call(this,a,e);break;case yt.CANCEL_COMPLETE:t.success?a.cancelCall.resolve():a.cancelCall.reject(re(t.reason)),b(this,Qa,xd).call(this,a,e);break;case yt.CANCEL:if(!o)break;const l=re(t.reason);Promise.try(o.onCancel||am,l).then(function(){r.postMessage({sourceName:s,targetName:i,stream:yt.CANCEL_COMPLETE,streamId:e,success:!0})},function(h){r.postMessage({sourceName:s,targetName:i,stream:yt.CANCEL_COMPLETE,streamId:e,reason:re(h)})}),o.sinkCapability.reject(l),o.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}},Qa=new WeakSet,xd=async function(t,e){var s,i,r;await Promise.allSettled([(s=t.startCall)==null?void 0:s.promise,(i=t.pullCall)==null?void 0:i.promise,(r=t.cancelCall)==null?void 0:r.promise]),delete this.streamControllers[e]};var Th;class db{constructor({enableHWA:t=!1}){d(this,Th,!1);p(this,Th,t)}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const s=this._createCanvas(t,e);return{canvas:s,context:s.getContext("2d",{willReadFrequently:!n(this,Th)})}}reset(t,e,s){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||s<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=s}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){st("Abstract method `_createCanvas` called.")}}Th=new WeakMap;class fy extends db{constructor({ownerDocument:t=globalThis.document,enableHWA:e=!1}){super({enableHWA:e}),this._document=t}_createCanvas(t,e){const s=this._document.createElement("canvas");return s.width=t,s.height=e,s}}class ub{constructor({baseUrl:t=null,isCompressed:e=!0}){this.baseUrl=t,this.isCompressed=e}async fetch({name:t}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!t)throw new Error("CMap name must be specified.");const e=this.baseUrl+t+(this.isCompressed?".bcmap":"");return this._fetch(e).then(s=>({cMapData:s,isCompressed:this.isCompressed})).catch(s=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${e}`)})}async _fetch(t){st("Abstract method `_fetch` called.")}}class om extends ub{async _fetch(t){const e=await od(t,this.isCompressed?"arraybuffer":"text");return e instanceof ArrayBuffer?new Uint8Array(e):ad(e)}}class fb{addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,e,s,i,r){return"none"}destroy(t=!1){}}var ar,Ja,Zs,ti,Yt,or,lr,Rt,Xt,hr,_l,Xi,fa,Za,kd,qi,pa,ju,pb,xh,Up,Yi,ga,cr,Sl,dr,El,kh,jp,ur,Cl;class py extends fb{constructor({docId:e,ownerDocument:s=globalThis.document}){super();d(this,Rt);d(this,hr);d(this,Xi);d(this,Za);d(this,qi);d(this,ju);d(this,xh);d(this,Yi);d(this,cr);d(this,dr);d(this,kh);d(this,ur);d(this,ar,void 0);d(this,Ja,void 0);d(this,Zs,void 0);d(this,ti,void 0);d(this,Yt,void 0);d(this,or,void 0);d(this,lr,0);p(this,ti,e),p(this,Yt,s)}addFilter(e){if(!e)return"none";let s=n(this,Rt,Xt).get(e);if(s)return s;const[i,r,a]=b(this,Za,kd).call(this,e),o=e.length===1?i:`${i}${r}${a}`;if(s=n(this,Rt,Xt).get(o),s)return n(this,Rt,Xt).set(e,s),s;const l=`g_${n(this,ti)}_transfer_map_${St(this,lr)._++}`,h=b(this,qi,pa).call(this,l);n(this,Rt,Xt).set(e,h),n(this,Rt,Xt).set(o,h);const c=b(this,Yi,ga).call(this,l);return b(this,dr,El).call(this,i,r,a,c),h}addHCMFilter(e,s){var A;const i=`${e}-${s}`,r="base";let a=n(this,hr,_l).get(r);if((a==null?void 0:a.key)===i||(a?((A=a.filter)==null||A.remove(),a.key=i,a.url="none",a.filter=null):(a={key:i,url:"none",filter:null},n(this,hr,_l).set(r,a)),!e||!s))return a.url;const o=b(this,ur,Cl).call(this,e);e=I.makeHexColor(...o);const l=b(this,ur,Cl).call(this,s);if(s=I.makeHexColor(...l),n(this,Xi,fa).style.color="",e==="#000000"&&s==="#ffffff"||e===s)return a.url;const h=new Array(256);for(let y=0;y<=255;y++){const v=y/255;h[y]=v<=.03928?v/12.92:((v+.055)/1.055)**2.4}const c=h.join(","),f=`g_${n(this,ti)}_hcm_filter`,g=a.filter=b(this,Yi,ga).call(this,f);b(this,dr,El).call(this,c,c,c,g),b(this,xh,Up).call(this,g);const m=(y,v)=>{const w=o[y]/255,S=l[y]/255,_=new Array(v+1);for(let E=0;E<=v;E++)_[E]=w+E/v*(S-w);return _.join(",")};return b(this,dr,El).call(this,m(0,5),m(1,5),m(2,5),g),a.url=b(this,qi,pa).call(this,f),a.url}addAlphaFilter(e){let s=n(this,Rt,Xt).get(e);if(s)return s;const[i]=b(this,Za,kd).call(this,[e]),r=`alpha_${i}`;if(s=n(this,Rt,Xt).get(r),s)return n(this,Rt,Xt).set(e,s),s;const a=`g_${n(this,ti)}_alpha_map_${St(this,lr)._++}`,o=b(this,qi,pa).call(this,a);n(this,Rt,Xt).set(e,o),n(this,Rt,Xt).set(r,o);const l=b(this,Yi,ga).call(this,a);return b(this,kh,jp).call(this,i,l),o}addLuminosityFilter(e){let s=n(this,Rt,Xt).get(e||"luminosity");if(s)return s;let i,r;if(e?([i]=b(this,Za,kd).call(this,[e]),r=`luminosity_${i}`):r="luminosity",s=n(this,Rt,Xt).get(r),s)return n(this,Rt,Xt).set(e,s),s;const a=`g_${n(this,ti)}_luminosity_map_${St(this,lr)._++}`,o=b(this,qi,pa).call(this,a);n(this,Rt,Xt).set(e,o),n(this,Rt,Xt).set(r,o);const l=b(this,Yi,ga).call(this,a);return b(this,ju,pb).call(this,l),e&&b(this,kh,jp).call(this,i,l),o}addHighlightHCMFilter(e,s,i,r,a){var S;const o=`${s}-${i}-${r}-${a}`;let l=n(this,hr,_l).get(e);if((l==null?void 0:l.key)===o||(l?((S=l.filter)==null||S.remove(),l.key=o,l.url="none",l.filter=null):(l={key:o,url:"none",filter:null},n(this,hr,_l).set(e,l)),!s||!i))return l.url;const[h,c]=[s,i].map(b(this,ur,Cl).bind(this));let f=Math.round(.2126*h[0]+.7152*h[1]+.0722*h[2]),g=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),[m,A]=[r,a].map(b(this,ur,Cl).bind(this));g{const T=new Array(256),x=(g-f)/C,P=_/255,M=(E-_)/(255*C);let D=0;for(let R=0;R<=C;R++){const H=Math.round(f+R*x),U=P+R*M;for(let W=D;W<=H;W++)T[W]=U;D=H+1}for(let R=D;R<256;R++)T[R]=T[D-1];return T.join(",")},v=`g_${n(this,ti)}_hcm_${e}_filter`,w=l.filter=b(this,Yi,ga).call(this,v);return b(this,xh,Up).call(this,w),b(this,dr,El).call(this,y(m[0],A[0],5),y(m[1],A[1],5),y(m[2],A[2],5),w),l.url=b(this,qi,pa).call(this,v),l.url}destroy(e=!1){var s,i,r,a;e&&((s=n(this,or))!=null&&s.size)||((i=n(this,Zs))==null||i.parentNode.parentNode.remove(),p(this,Zs,null),(r=n(this,Ja))==null||r.clear(),p(this,Ja,null),(a=n(this,or))==null||a.clear(),p(this,or,null),p(this,lr,0))}}ar=new WeakMap,Ja=new WeakMap,Zs=new WeakMap,ti=new WeakMap,Yt=new WeakMap,or=new WeakMap,lr=new WeakMap,Rt=new WeakSet,Xt=function(){return n(this,Ja)||p(this,Ja,new Map)},hr=new WeakSet,_l=function(){return n(this,or)||p(this,or,new Map)},Xi=new WeakSet,fa=function(){if(!n(this,Zs)){const e=n(this,Yt).createElement("div"),{style:s}=e;s.visibility="hidden",s.contain="strict",s.width=s.height=0,s.position="absolute",s.top=s.left=0,s.zIndex=-1;const i=n(this,Yt).createElementNS(Is,"svg");i.setAttribute("width",0),i.setAttribute("height",0),p(this,Zs,n(this,Yt).createElementNS(Is,"defs")),e.append(i),i.append(n(this,Zs)),n(this,Yt).body.append(e)}return n(this,Zs)},Za=new WeakSet,kd=function(e){if(e.length===1){const h=e[0],c=new Array(256);for(let g=0;g<256;g++)c[g]=h[g]/255;const f=c.join(",");return[f,f,f]}const[s,i,r]=e,a=new Array(256),o=new Array(256),l=new Array(256);for(let h=0;h<256;h++)a[h]=s[h]/255,o[h]=i[h]/255,l[h]=r[h]/255;return[a.join(","),o.join(","),l.join(",")]},qi=new WeakSet,pa=function(e){if(n(this,ar)===void 0){p(this,ar,"");const s=n(this,Yt).URL;s!==n(this,Yt).baseURI&&(np(s)?z('#createUrl: ignore "data:"-URL for performance reasons.'):p(this,ar,Tm(s,"")))}return`url(${n(this,ar)}#${e})`},ju=new WeakSet,pb=function(e){const s=n(this,Yt).createElementNS(Is,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.append(s)},xh=new WeakSet,Up=function(e){const s=n(this,Yt).createElementNS(Is,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(s)},Yi=new WeakSet,ga=function(e){const s=n(this,Yt).createElementNS(Is,"filter");return s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("id",e),n(this,Xi,fa).append(s),s},cr=new WeakSet,Sl=function(e,s,i){const r=n(this,Yt).createElementNS(Is,s);r.setAttribute("type","discrete"),r.setAttribute("tableValues",i),e.append(r)},dr=new WeakSet,El=function(e,s,i,r){const a=n(this,Yt).createElementNS(Is,"feComponentTransfer");r.append(a),b(this,cr,Sl).call(this,a,"feFuncR",e),b(this,cr,Sl).call(this,a,"feFuncG",s),b(this,cr,Sl).call(this,a,"feFuncB",i)},kh=new WeakSet,jp=function(e,s){const i=n(this,Yt).createElementNS(Is,"feComponentTransfer");s.append(i),b(this,cr,Sl).call(this,i,"feFuncA",e)},ur=new WeakSet,Cl=function(e){return n(this,Xi,fa).style.color=e,rp(getComputedStyle(n(this,Xi,fa)).getPropertyValue("color"))};class gb{constructor({baseUrl:t=null}){this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!t)throw new Error("Font filename must be specified.");const e=`${this.baseUrl}${t}`;return this._fetch(e).catch(s=>{throw new Error(`Unable to load font data at: ${e}`)})}async _fetch(t){st("Abstract method `_fetch` called.")}}class lm extends gb{async _fetch(t){const e=await od(t,"arraybuffer");return new Uint8Array(e)}}class mb{constructor({baseUrl:t=null}){this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `wasmUrl` API parameter is provided.");if(!t)throw new Error("Wasm filename must be specified.");const e=`${this.baseUrl}${t}`;return this._fetch(e).catch(s=>{throw new Error(`Unable to load wasm data at: ${e}`)})}async _fetch(t){st("Abstract method `_fetch` called.")}}class hm extends mb{async _fetch(t){const e=await od(t,"arraybuffer");return new Uint8Array(e)}}ie&&z("Please use the `legacy` build in Node.js environments.");async function Ug(u){const e=await process.getBuiltinModule("fs").promises.readFile(u);return new Uint8Array(e)}class gy extends fb{}class my extends db{_createCanvas(t,e){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(t,e)}}class by extends ub{async _fetch(t){return Ug(t)}}class Ay extends gb{async _fetch(t){return Ug(t)}}class yy extends mb{async _fetch(t){return Ug(t)}}const ca="__forcedDependency";var ge,Zt,to,ws,eo,ei,J,tt,si,me,Ki,so,Qi,Ji;class wy{constructor(t){d(this,ge,{__proto__:null});d(this,Zt,{__proto__:null,transform:[],moveText:[],sameLineText:[],[ca]:[]});d(this,to,new Map);d(this,ws,[]);d(this,eo,[]);d(this,ei,[[1,0,0,1,0,0]]);d(this,J,[-1/0,-1/0,1/0,1/0]);d(this,tt,new Float64Array([1/0,1/0,-1/0,-1/0]));d(this,si,-1);d(this,me,new Set);d(this,Ki,new Map);d(this,so,new Map);d(this,Qi,void 0);d(this,Ji,void 0);p(this,Qi,t.width),p(this,Ji,t.height)}save(t){return p(this,ge,{__proto__:n(this,ge)}),p(this,Zt,{__proto__:n(this,Zt),transform:{__proto__:n(this,Zt).transform},moveText:{__proto__:n(this,Zt).moveText},sameLineText:{__proto__:n(this,Zt).sameLineText},[ca]:{__proto__:n(this,Zt)[ca]}}),p(this,J,{__proto__:n(this,J)}),n(this,ws).push([t,null]),this}restore(t){const e=Object.getPrototypeOf(n(this,ge));if(e===null)return this;p(this,ge,e),p(this,Zt,Object.getPrototypeOf(n(this,Zt))),p(this,J,Object.getPrototypeOf(n(this,J)));const s=n(this,ws).pop();return s!==void 0&&(s[1]=t),this}recordOpenMarker(t){return n(this,ws).push([t,null]),this}getOpenMarker(){return n(this,ws).length===0?null:n(this,ws).at(-1)[0]}recordCloseMarker(t){const e=n(this,ws).pop();return e!==void 0&&(e[1]=t),this}beginMarkedContent(t){return n(this,eo).push([t,null]),this}endMarkedContent(t){const e=n(this,eo).pop();return e!==void 0&&(e[1]=t),this}pushBaseTransform(t){return n(this,ei).push(I.multiplyByDOMMatrix(n(this,ei).at(-1),t.getTransform())),this}popBaseTransform(){return n(this,ei).length>1&&n(this,ei).pop(),this}recordSimpleData(t,e){return n(this,ge)[t]=e,this}recordIncrementalData(t,e){return n(this,Zt)[t].push(e),this}resetIncrementalData(t,e){return n(this,Zt)[t].length=0,this}recordNamedData(t,e){return n(this,to).set(t,e),this}recordFutureForcedDependency(t,e){return this.recordIncrementalData(ca,e),this}inheritSimpleDataAsFutureForcedDependencies(t){for(const e of t)e in n(this,ge)&&this.recordFutureForcedDependency(e,n(this,ge)[e]);return this}inheritPendingDependenciesAsFutureForcedDependencies(){for(const t of n(this,me))this.recordFutureForcedDependency(ca,t);return this}resetBBox(t){return p(this,si,t),n(this,tt)[0]=1/0,n(this,tt)[1]=1/0,n(this,tt)[2]=-1/0,n(this,tt)[3]=-1/0,this}get hasPendingBBox(){return n(this,si)!==-1}recordClipBox(t,e,s,i,r,a){const o=I.multiplyByDOMMatrix(n(this,ei).at(-1),e.getTransform()),l=[1/0,1/0,-1/0,-1/0];I.axialAlignedBoundingBox([s,r,i,a],o,l);const h=I.intersect(n(this,J),l);return h?(n(this,J)[0]=h[0],n(this,J)[1]=h[1],n(this,J)[2]=h[2],n(this,J)[3]=h[3]):(n(this,J)[0]=n(this,J)[1]=1/0,n(this,J)[2]=n(this,J)[3]=-1/0),this}recordBBox(t,e,s,i,r,a){const o=n(this,J);if(o[0]===1/0)return this;const l=I.multiplyByDOMMatrix(n(this,ei).at(-1),e.getTransform());if(o[0]===-1/0)return I.axialAlignedBoundingBox([s,r,i,a],l,n(this,tt)),this;const h=[1/0,1/0,-1/0,-1/0];return I.axialAlignedBoundingBox([s,r,i,a],l,h),n(this,tt)[0]=Math.min(n(this,tt)[0],Math.max(h[0],o[0])),n(this,tt)[1]=Math.min(n(this,tt)[1],Math.max(h[1],o[1])),n(this,tt)[2]=Math.max(n(this,tt)[2],Math.min(h[2],o[2])),n(this,tt)[3]=Math.max(n(this,tt)[3],Math.min(h[3],o[3])),this}recordCharacterBBox(t,e,s,i=1,r=0,a=0,o){const l=s.bbox;let h,c;if(l&&(h=l[2]!==l[0]&&l[3]!==l[1]&&n(this,so).get(s),h!==!1&&(c=[0,0,0,0],I.axialAlignedBoundingBox(l,s.fontMatrix,c),(i!==1||r!==0||a!==0)&&I.scaleMinMax([i,0,0,-i,r,a],c),h)))return this.recordBBox(t,e,c[0],c[2],c[1],c[3]);if(!o)return this.recordFullPageBBox(t);const f=o();return l&&c&&h===void 0&&(h=c[0]<=r-f.actualBoundingBoxLeft&&c[2]>=r+f.actualBoundingBoxRight&&c[1]<=a-f.actualBoundingBoxAscent&&c[3]>=a+f.actualBoundingBoxDescent,n(this,so).set(s,h),h)?this.recordBBox(t,e,c[0],c[2],c[1],c[3]):this.recordBBox(t,e,r-f.actualBoundingBoxLeft,r+f.actualBoundingBoxRight,a-f.actualBoundingBoxAscent,a+f.actualBoundingBoxDescent)}recordFullPageBBox(t){return n(this,tt)[0]=Math.max(0,n(this,J)[0]),n(this,tt)[1]=Math.max(0,n(this,J)[1]),n(this,tt)[2]=Math.min(n(this,Qi),n(this,J)[2]),n(this,tt)[3]=Math.min(n(this,Ji),n(this,J)[3]),this}getSimpleIndex(t){return n(this,ge)[t]}recordDependencies(t,e){const s=n(this,me),i=n(this,ge),r=n(this,Zt);for(const a of e)a in n(this,ge)?s.add(i[a]):a in r&&r[a].forEach(s.add,s);return this}copyDependenciesFromIncrementalOperation(t,e){const s=n(this,Ki),i=n(this,me);for(const r of n(this,Zt)[e])s.get(r).dependencies.forEach(i.add,i.add(r));return this}recordNamedDependency(t,e){return n(this,to).has(e)&&n(this,me).add(n(this,to).get(e)),this}recordOperation(t,e=!1){this.recordDependencies(t,[ca]);const s=new Set(n(this,me)),i=n(this,ws).concat(n(this,eo)),r=n(this,si)===t?{minX:n(this,tt)[0],minY:n(this,tt)[1],maxX:n(this,tt)[2],maxY:n(this,tt)[3]}:null;return n(this,Ki).set(t,{bbox:r,pairs:i,dependencies:s}),e||p(this,si,-1),n(this,me).clear(),this}bboxToClipBoxDropOperation(t){return n(this,si)!==-1&&(p(this,si,-1),n(this,J)[0]=Math.max(n(this,J)[0],n(this,tt)[0]),n(this,J)[1]=Math.max(n(this,J)[1],n(this,tt)[1]),n(this,J)[2]=Math.min(n(this,J)[2],n(this,tt)[2]),n(this,J)[3]=Math.min(n(this,J)[3],n(this,tt)[3])),n(this,me).clear(),this}_takePendingDependencies(){const t=n(this,me);return p(this,me,new Set),t}_extractOperation(t){const e=n(this,Ki).get(t);return n(this,Ki).delete(t),e}_pushPendingDependencies(t){for(const e of t)n(this,me).add(e)}take(){return n(this,so).clear(),Array.from(n(this,Ki),([t,{bbox:e,pairs:s,dependencies:i}])=>(s.forEach(r=>r.forEach(i.add,i)),i.delete(t),{minX:((e==null?void 0:e.minX)??0)/n(this,Qi),maxX:((e==null?void 0:e.maxX)??n(this,Qi))/n(this,Qi),minY:((e==null?void 0:e.minY)??0)/n(this,Ji),maxY:((e==null?void 0:e.maxY)??n(this,Ji))/n(this,Ji),dependencies:Array.from(i).sort((r,a)=>r-a),idx:t}))}}ge=new WeakMap,Zt=new WeakMap,to=new WeakMap,ws=new WeakMap,eo=new WeakMap,ei=new WeakMap,J=new WeakMap,tt=new WeakMap,si=new WeakMap,me=new WeakMap,Ki=new WeakMap,so=new WeakMap,Qi=new WeakMap,Ji=new WeakMap;var K,ct,io,Zi,no;const Qg=class Qg{constructor(t,e){d(this,K,void 0);d(this,ct,void 0);d(this,io,0);d(this,Zi,void 0);d(this,no,0);if(t instanceof Qg)return t;p(this,K,t),p(this,Zi,t._takePendingDependencies()),p(this,ct,e)}save(t){return St(this,no)._++,n(this,K).save(n(this,ct)),this}restore(t){return n(this,no)>0&&(n(this,K).restore(n(this,ct)),St(this,no)._--),this}recordOpenMarker(t){return St(this,io)._++,this}getOpenMarker(){return n(this,io)>0?n(this,ct):n(this,K).getOpenMarker()}recordCloseMarker(t){return St(this,io)._--,this}beginMarkedContent(t){return this}endMarkedContent(t){return this}pushBaseTransform(t){return n(this,K).pushBaseTransform(t),this}popBaseTransform(){return n(this,K).popBaseTransform(),this}recordSimpleData(t,e){return n(this,K).recordSimpleData(t,n(this,ct)),this}recordIncrementalData(t,e){return n(this,K).recordIncrementalData(t,n(this,ct)),this}resetIncrementalData(t,e){return n(this,K).resetIncrementalData(t,n(this,ct)),this}recordNamedData(t,e){return this}recordFutureForcedDependency(t,e){return n(this,K).recordFutureForcedDependency(t,n(this,ct)),this}inheritSimpleDataAsFutureForcedDependencies(t){return n(this,K).inheritSimpleDataAsFutureForcedDependencies(t),this}inheritPendingDependenciesAsFutureForcedDependencies(){return n(this,K).inheritPendingDependenciesAsFutureForcedDependencies(),this}resetBBox(t){return n(this,K).hasPendingBBox||n(this,K).resetBBox(n(this,ct)),this}get hasPendingBBox(){return n(this,K).hasPendingBBox}recordClipBox(t,e,s,i,r,a){return n(this,K).recordClipBox(n(this,ct),e,s,i,r,a),this}recordBBox(t,e,s,i,r,a){return n(this,K).recordBBox(n(this,ct),e,s,i,r,a),this}recordCharacterBBox(t,e,s,i,r,a,o){return n(this,K).recordCharacterBBox(n(this,ct),e,s,i,r,a,o),this}recordFullPageBBox(t){return n(this,K).recordFullPageBBox(n(this,ct)),this}getSimpleIndex(t){return n(this,K).getSimpleIndex(t)}recordDependencies(t,e){return n(this,K).recordDependencies(n(this,ct),e),this}copyDependenciesFromIncrementalOperation(t,e){return n(this,K).copyDependenciesFromIncrementalOperation(n(this,ct),e),this}recordNamedDependency(t,e){return n(this,K).recordNamedDependency(n(this,ct),e),this}recordOperation(t){n(this,K).recordOperation(n(this,ct),!0);const e=n(this,K)._extractOperation(n(this,ct));for(const s of e.dependencies)n(this,Zi).add(s);return n(this,Zi).delete(n(this,ct)),n(this,Zi).delete(null),this}bboxToClipBoxDropOperation(t){return n(this,K).bboxToClipBoxDropOperation(n(this,ct)),this}recordNestedDependencies(){n(this,K)._pushPendingDependencies(n(this,Zi))}take(){throw new Error("Unreachable")}};K=new WeakMap,ct=new WeakMap,io=new WeakMap,Zi=new WeakMap,no=new WeakMap;let tu=Qg;const Le={stroke:["path","transform","filter","strokeColor","strokeAlpha","lineWidth","lineCap","lineJoin","miterLimit","dash"],fill:["path","transform","filter","fillColor","fillAlpha","globalCompositeOperation","SMask"],imageXObject:["transform","SMask","filter","fillAlpha","strokeAlpha","globalCompositeOperation"],rawFillPath:["filter","fillColor","fillAlpha"],showText:["transform","leading","charSpacing","wordSpacing","hScale","textRise","moveText","textMatrix","font","filter","fillColor","textRenderingMode","SMask","fillAlpha","strokeAlpha","globalCompositeOperation"],transform:["transform"],transformAndFill:["transform","fillColor"]},Vt={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function Vp(u,t){if(!t)return;const e=t[2]-t[0],s=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],e,s),u.clip(i)}class jg{isModifyingCurrentTransform(){return!1}getPattern(){st("Abstract method `getPattern` called.")}}class vy extends jg{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let e;this._type==="axial"?e=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(e=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const s of this._colorStops)e.addColorStop(s[0],s[1]);return e}getPattern(t,e,s,i){let r;if(i===Vt.STROKE||i===Vt.FILL){const a=e.current.getClippedPathBoundingBox(i,dt(t))||[0,0,0,0],o=Math.ceil(a[2]-a[0])||1,l=Math.ceil(a[3]-a[1])||1,h=e.cachedCanvases.getCanvas("pattern",o,l),c=h.context;c.clearRect(0,0,c.canvas.width,c.canvas.height),c.beginPath(),c.rect(0,0,c.canvas.width,c.canvas.height),c.translate(-a[0],-a[1]),s=I.transform(s,[1,0,0,1,a[0],a[1]]),c.transform(...e.baseTransform),this.matrix&&c.transform(...this.matrix),Vp(c,this._bbox),c.fillStyle=this._createGradient(c),c.fill(),r=t.createPattern(h.canvas,"no-repeat");const f=new DOMMatrix(s);r.setTransform(f)}else Vp(t,this._bbox),r=this._createGradient(t);return r}}function mp(u,t,e,s,i,r,a,o){const l=t.coords,h=t.colors,c=u.data,f=u.width*4;let g;l[e+1]>l[s+1]&&(g=e,e=s,s=g,g=r,r=a,a=g),l[s+1]>l[i+1]&&(g=s,s=i,i=g,g=a,a=o,o=g),l[e+1]>l[s+1]&&(g=e,e=s,s=g,g=r,r=a,a=g);const m=(l[e]+t.offsetX)*t.scaleX,A=(l[e+1]+t.offsetY)*t.scaleY,y=(l[s]+t.offsetX)*t.scaleX,v=(l[s+1]+t.offsetY)*t.scaleY,w=(l[i]+t.offsetX)*t.scaleX,S=(l[i+1]+t.offsetY)*t.scaleY;if(A>=S)return;const _=h[r],E=h[r+1],C=h[r+2],T=h[a],x=h[a+1],P=h[a+2],M=h[o],D=h[o+1],R=h[o+2],H=Math.round(A),U=Math.round(S);let W,Y,B,N,Pt,At,Re,as;for(let it=H;it<=U;it++){if(itS?pt=1:v===S?pt=0:pt=(v-it)/(v-S),W=y-(y-w)*pt,Y=T-(T-M)*pt,B=x-(x-D)*pt,N=P-(P-R)*pt}let Z;itS?Z=1:Z=(A-it)/(A-S),Pt=m-(m-w)*Z,At=_-(_-M)*Z,Re=E-(E-D)*Z,as=C-(C-R)*Z;const Ls=Math.round(Math.min(W,Pt)),Ve=Math.round(Math.max(W,Pt));let We=f*it+Ls*4;for(let pt=Ls;pt<=Ve;pt++)Z=(W-pt)/(W-Pt),Z<0?Z=0:Z>1&&(Z=1),c[We++]=Y-(Y-At)*Z|0,c[We++]=B-(B-Re)*Z|0,c[We++]=N-(N-as)*Z|0,c[We++]=255}}function _y(u,t,e){const s=t.coords,i=t.colors;let r,a;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(s.length/o)-1,h=o-1;for(r=0;r=R?C=l:x=!0,D>=H?T=h:P=!0;const U=this.getSizeAndScale(C,this.ctx.canvas.width,_),W=this.getSizeAndScale(T,this.ctx.canvas.height,E),Y=t.cachedCanvases.getCanvas("pattern",U.size,W.size),B=Y.context,N=o.createCanvasGraphics(B);if(N.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(N,i,a),B.translate(-U.scale*c,-W.scale*f),N.transform(0,U.scale,0,0,W.scale,0,0),B.save(),(Pt=N.dependencyTracker)==null||Pt.save(),this.clipBbox(N,c,f,g,m),N.baseTransform=dt(N.ctx),N.executeOperatorList(s),N.endDrawing(),(as=(At=N.dependencyTracker)==null?void 0:(Re=At.restore()).recordNestedDependencies)==null||as.call(Re),B.restore(),x||P){const it=Y.canvas;x&&(C=l),P&&(T=h);const Z=this.getSizeAndScale(C,this.ctx.canvas.width,_),Ls=this.getSizeAndScale(T,this.ctx.canvas.height,E),Ve=Z.size,We=Ls.size,pt=t.cachedCanvases.getCanvas("pattern-workaround",Ve,We),lp=pt.context,hp=x?Math.floor(A/l):0,cp=P?Math.floor(y/h):0;for(let Mn=0;Mn<=hp;Mn++)for(let Rn=0;Rn<=cp;Rn++)lp.drawImage(it,Ve*Mn,We*Rn,Ve,We,0,0,Ve,We);return{canvas:pt.canvas,scaleX:Z.scale,scaleY:Ls.scale,offsetX:c,offsetY:f}}return{canvas:Y.canvas,scaleX:U.scale,scaleY:W.scale,offsetX:c,offsetY:f}}getSizeAndScale(t,e,s){const i=Math.max(Vu.MAX_PATTERN_SIZE,e);let r=Math.ceil(t*s);return r>=i?r=i:s=r/t,{scale:s,size:r}}clipBbox(t,e,s,i,r){const a=i-e,o=r-s;t.ctx.rect(e,s,a,o),I.axialAlignedBoundingBox([e,s,i,r],dt(t.ctx),t.current.minMax),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,e,s){const i=t.ctx,r=t.current;switch(e){case cm.COLORED:const{fillStyle:a,strokeStyle:o}=this.ctx;i.fillStyle=r.fillColor=a,i.strokeStyle=r.strokeColor=o;break;case cm.UNCOLORED:i.fillStyle=i.strokeStyle=s,r.fillColor=r.strokeColor=s;break;default:throw new UA(`Unsupported paint type: ${e}`)}}isModifyingCurrentTransform(){return!1}getPattern(t,e,s,i){let r=s;i!==Vt.SHADING&&(r=I.transform(r,e.baseTransform),this.matrix&&(r=I.transform(r,this.matrix)));const a=this.createPatternCanvas(e);let o=new DOMMatrix(r);o=o.translate(a.offsetX,a.offsetY),o=o.scale(1/a.scaleX,1/a.scaleY);const l=t.createPattern(a.canvas,"repeat");return l.setTransform(o),l}};k(Vu,"MAX_PATTERN_SIZE",3e3);let Wp=Vu;function Ty({src:u,srcPos:t=0,dest:e,width:s,height:i,nonBlackColor:r=4294967295,inverseDecode:a=!1}){const o=Wt.isLittleEndian?4278190080:255,[l,h]=a?[r,o]:[o,r],c=s>>3,f=s&7,g=u.length;e=new Uint32Array(e.buffer);let m=0;for(let A=0;A{u.save=u.__originalSave,u.restore=u.__originalRestore,u.rotate=u.__originalRotate,u.scale=u.__originalScale,u.translate=u.__originalTranslate,u.transform=u.__originalTransform,u.setTransform=u.__originalSetTransform,u.resetTransform=u.__originalResetTransform,u.clip=u.__originalClip,u.moveTo=u.__originalMoveTo,u.lineTo=u.__originalLineTo,u.bezierCurveTo=u.__originalBezierCurveTo,u.rect=u.__originalRect,u.closePath=u.__originalClosePath,u.beginPath=u.__originalBeginPath,delete u._removeMirroring},u.save=function(){t.save(),this.__originalSave()},u.restore=function(){t.restore(),this.__originalRestore()},u.translate=function(e,s){t.translate(e,s),this.__originalTranslate(e,s)},u.scale=function(e,s){t.scale(e,s),this.__originalScale(e,s)},u.transform=function(e,s,i,r,a,o){t.transform(e,s,i,r,a,o),this.__originalTransform(e,s,i,r,a,o)},u.setTransform=function(e,s,i,r,a,o){t.setTransform(e,s,i,r,a,o),this.__originalSetTransform(e,s,i,r,a,o)},u.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},u.rotate=function(e){t.rotate(e),this.__originalRotate(e)},u.clip=function(e){t.clip(e),this.__originalClip(e)},u.moveTo=function(e,s){t.moveTo(e,s),this.__originalMoveTo(e,s)},u.lineTo=function(e,s){t.lineTo(e,s),this.__originalLineTo(e,s)},u.bezierCurveTo=function(e,s,i,r,a,o){t.bezierCurveTo(e,s,i,r,a,o),this.__originalBezierCurveTo(e,s,i,r,a,o)},u.rect=function(e,s,i,r){t.rect(e,s,i,r),this.__originalRect(e,s,i,r)},u.closePath=function(){t.closePath(),this.__originalClosePath()},u.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}class Py{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,e,s){let i;return this.cache[t]!==void 0?(i=this.cache[t],this.canvasFactory.reset(i,e,s)):(i=this.canvasFactory.create(e,s),this.cache[t]=i),i}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const e=this.cache[t];this.canvasFactory.destroy(e),delete this.cache[t]}}}function md(u,t,e,s,i,r,a,o,l,h){const[c,f,g,m,A,y]=dt(u);if(f===0&&g===0){const S=a*c+A,_=Math.round(S),E=o*m+y,C=Math.round(E),T=(a+l)*c+A,x=Math.abs(Math.round(T)-_)||1,P=(o+h)*m+y,M=Math.abs(Math.round(P)-C)||1;return u.setTransform(Math.sign(c),0,0,Math.sign(m),_,C),u.drawImage(t,e,s,i,r,0,0,x,M),u.setTransform(c,f,g,m,A,y),[x,M]}if(c===0&&m===0){const S=o*g+A,_=Math.round(S),E=a*f+y,C=Math.round(E),T=(o+h)*g+A,x=Math.abs(Math.round(T)-_)||1,P=(a+l)*f+y,M=Math.abs(Math.round(P)-C)||1;return u.setTransform(0,Math.sign(f),Math.sign(g),0,_,C),u.drawImage(t,e,s,i,r,0,0,M,x),u.setTransform(c,f,g,m,A,y),[M,x]}u.drawImage(t,e,s,i,r,a,o,l,h);const v=Math.hypot(c,f),w=Math.hypot(g,m);return[v*l,w*h]}class pm{constructor(t,e,s){k(this,"alphaIsShape",!1);k(this,"fontSize",0);k(this,"fontSizeScale",1);k(this,"textMatrix",null);k(this,"textMatrixScale",1);k(this,"fontMatrix",wp);k(this,"leading",0);k(this,"x",0);k(this,"y",0);k(this,"lineX",0);k(this,"lineY",0);k(this,"charSpacing",0);k(this,"wordSpacing",0);k(this,"textHScale",1);k(this,"textRenderingMode",Ot.FILL);k(this,"textRise",0);k(this,"fillColor","#000000");k(this,"strokeColor","#000000");k(this,"patternFill",!1);k(this,"patternStroke",!1);k(this,"fillAlpha",1);k(this,"strokeAlpha",1);k(this,"lineWidth",1);k(this,"activeSMask",null);k(this,"transferMaps","none");s==null||s(this),this.clipBox=new Float32Array([0,0,t,e]),this.minMax=ya.slice()}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t.minMax=this.minMax.slice(),t}getPathBoundingBox(t=Vt.FILL,e=null){const s=this.minMax.slice();if(t===Vt.STROKE){e||st("Stroke bounding box must include transform."),I.singularValueDecompose2dScale(e,Me);const i=Me[0]*this.lineWidth/2,r=Me[1]*this.lineWidth/2;s[0]-=i,s[1]-=r,s[2]+=i,s[3]+=r}return s}updateClipFromPath(){const t=I.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(t){this.clipBox.set(t,0),this.minMax.set(ya,0)}getClippedPathBoundingBox(t=Vt.FILL,e=null){return I.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function gm(u,t){if(t instanceof ImageData){u.putImageData(t,0,0);return}const e=t.height,s=t.width,i=e%ce,r=(e-i)/ce,a=i===0?r:r+1,o=u.createImageData(s,ce);let l=0,h;const c=t.data,f=o.data;let g,m,A,y;if(t.kind===wd.GRAYSCALE_1BPP){const v=c.byteLength,w=new Uint32Array(f.buffer,0,f.byteLength>>2),S=w.length,_=s+7>>3,E=4294967295,C=Wt.isLittleEndian?4278190080:255;for(g=0;g_?s:T*8-7,M=P&-8;let D=0,R=0;for(;x>=1}for(;h=r&&(A=i,y=s*A),h=0,m=y;m--;)f[h++]=c[l++],f[h++]=c[l++],f[h++]=c[l++],f[h++]=255;u.putImageData(o,0,g*ce)}else throw new Error(`bad image kind: ${t.kind}`)}function mm(u,t){if(t.bitmap){u.drawImage(t.bitmap,0,0);return}const e=t.height,s=t.width,i=e%ce,r=(e-i)/ce,a=i===0?r:r+1,o=u.createImageData(s,ce);let l=0;const h=t.data,c=o.data;for(let f=0;ffm&&typeof s=="function",f=c?Date.now()+xy:0;let g=0;const m=this.commonObjs,A=this.objs;let y,v;for(;;){if(i!==void 0&&l===i.nextBreakPoint)return i.breakIt(l,s),l;if(!r||r.has(l))if(y=o[l],v=a[l]??null,y!==Fl.dependency)v===null?this[y](l):this[y](l,...v);else for(const S of v){(w=this.dependencyTracker)==null||w.recordNamedData(S,l);const _=S.startsWith("g_")?m:A;if(!_.has(S))return _.get(S,s),l}if(l++,l===h)return l;if(c&&++g>fm){if(Date.now()>f)return s(),l;g=0}}}endDrawing(){b(this,Ph,Xp).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),b(this,Mh,qp).call(this)}_scaleImage(t,e){const s=t.width??t.displayWidth,i=t.height??t.displayHeight;let r=Math.max(Math.hypot(e[0],e[1]),1),a=Math.max(Math.hypot(e[2],e[3]),1),o=s,l=i,h="prescale1",c,f;for(;r>2&&o>1||a>2&&l>1;){let g=o,m=l;r>2&&o>1&&(g=o>=16384?Math.floor(o/2)-1||1:Math.ceil(o/2),r/=o/g),a>2&&l>1&&(m=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l)/2,a/=l/m),c=this.cachedCanvases.getCanvas(h,g,m),f=c.context,f.clearRect(0,0,g,m),f.drawImage(t,0,0,o,l,0,0,g,m),t=c.canvas,o=g,l=m,h=h==="prescale1"?"prescale2":"prescale1"}return{img:t,paintWidth:o,paintHeight:l}}_createMaskCanvas(t,e){var D,R;const s=this.ctx,{width:i,height:r}=e,a=this.current.fillColor,o=this.current.patternFill,l=dt(s);let h,c,f,g;if((e.bitmap||e.data)&&e.count>1){const H=e.bitmap||e.data.buffer;c=JSON.stringify(o?l:[l.slice(0,4),a]),h=this._cachedBitmapsMap.get(H),h||(h=new Map,this._cachedBitmapsMap.set(H,h));const U=h.get(c);if(U&&!o){const W=Math.round(Math.min(l[0],l[2])+l[4]),Y=Math.round(Math.min(l[1],l[3])+l[5]);return(D=this.dependencyTracker)==null||D.recordDependencies(t,Le.transformAndFill),{canvas:U,offsetX:W,offsetY:Y}}f=U}f||(g=this.cachedCanvases.getCanvas("maskCanvas",i,r),mm(g.context,e));let m=I.transform(l,[1/i,0,0,-1/r,0,0]);m=I.transform(m,[1,0,0,1,0,-r]);const A=ya.slice();I.axialAlignedBoundingBox([0,0,i,r],m,A);const[y,v,w,S]=A,_=Math.round(w-y)||1,E=Math.round(S-v)||1,C=this.cachedCanvases.getCanvas("fillCanvas",_,E),T=C.context,x=y,P=v;T.translate(-x,-P),T.transform(...m),f||(f=this._scaleImage(g.canvas,os(T)),f=f.img,h&&o&&h.set(c,f)),T.imageSmoothingEnabled=bm(dt(T),e.interpolate),md(T,f,0,0,f.width,f.height,0,0,i,r),T.globalCompositeOperation="source-in";const M=I.transform(os(T),[1,0,0,1,-x,-P]);return T.fillStyle=o?a.getPattern(s,this,M,Vt.FILL):a,T.fillRect(0,0,i,r),h&&!o&&(this.cachedCanvases.delete("fillCanvas"),h.set(c,C.canvas)),(R=this.dependencyTracker)==null||R.recordDependencies(t,Le.transformAndFill),{canvas:C.canvas,offsetX:Math.round(x),offsetY:Math.round(P)}}setLineWidth(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("lineWidth",t),e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("lineCap",t),this.ctx.lineCap=My[e]}setLineJoin(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("lineJoin",t),this.ctx.lineJoin=Ry[e]}setMiterLimit(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("miterLimit",t),this.ctx.miterLimit=e}setDash(t,e,s){var r;(r=this.dependencyTracker)==null||r.recordSimpleData("dash",t);const i=this.ctx;i.setLineDash!==void 0&&(i.setLineDash(e),i.lineDashOffset=s)}setRenderingIntent(t,e){}setFlatness(t,e){}setGState(t,e){var s,i,r,a,o;for(const[l,h]of e)switch(l){case"LW":this.setLineWidth(t,h);break;case"LC":this.setLineCap(t,h);break;case"LJ":this.setLineJoin(t,h);break;case"ML":this.setMiterLimit(t,h);break;case"D":this.setDash(t,h[0],h[1]);break;case"RI":this.setRenderingIntent(t,h);break;case"FL":this.setFlatness(t,h);break;case"Font":this.setFont(t,h[0],h[1]);break;case"CA":(s=this.dependencyTracker)==null||s.recordSimpleData("strokeAlpha",t),this.current.strokeAlpha=h;break;case"ca":(i=this.dependencyTracker)==null||i.recordSimpleData("fillAlpha",t),this.ctx.globalAlpha=this.current.fillAlpha=h;break;case"BM":(r=this.dependencyTracker)==null||r.recordSimpleData("globalCompositeOperation",t),this.ctx.globalCompositeOperation=h;break;case"SMask":(a=this.dependencyTracker)==null||a.recordSimpleData("SMask",t),this.current.activeSMask=h?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":(o=this.dependencyTracker)==null||o.recordSimpleData("filter",t),this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(h);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(t){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,s=this.ctx.canvas.height,i="smaskGroupAt"+this.groupLevel,r=this.cachedCanvases.getCanvas(i,e,s);this.suspendedCtx=this.ctx;const a=this.ctx=r.context;a.setTransform(this.suspendedCtx.getTransform()),dl(this.suspendedCtx,a),ky(a,this.suspendedCtx),this.setGState(t,[["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),dl(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const e=this.current.activeSMask,s=this.suspendedCtx;this.composeSMask(s,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(t,e,s,i){const r=i[0],a=i[1],o=i[2]-r,l=i[3]-a;o===0||l===0||(this.genericComposeSMask(e.context,s,o,l,e.subtype,e.backdrop,e.transferMap,r,a,e.offsetX,e.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(s.canvas,0,0),t.restore())}genericComposeSMask(t,e,s,i,r,a,o,l,h,c,f){let g=t.canvas,m=l-c,A=h-f;if(a)if(m<0||A<0||m+s>g.width||A+i>g.height){const v=this.cachedCanvases.getCanvas("maskExtension",s,i),w=v.context;w.drawImage(g,-m,-A),w.globalCompositeOperation="destination-atop",w.fillStyle=a,w.fillRect(0,0,s,i),w.globalCompositeOperation="source-over",g=v.canvas,m=A=0}else{t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const v=new Path2D;v.rect(m,A,s,i),t.clip(v),t.globalCompositeOperation="destination-atop",t.fillStyle=a,t.fillRect(m,A,s,i),t.restore()}e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0),r==="Alpha"&&o?e.filter=this.filterFactory.addAlphaFilter(o):r==="Luminosity"&&(e.filter=this.filterFactory.addLuminosityFilter(o));const y=new Path2D;y.rect(l,h,s,i),e.clip(y),e.globalCompositeOperation="destination-in",e.drawImage(g,m,A,s,i,l,h,s,i),e.restore()}save(t){var s;this.inSMaskMode&&dl(this.ctx,this.suspendedCtx),this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone(),(s=this.dependencyTracker)==null||s.save(t)}restore(t){var e;if((e=this.dependencyTracker)==null||e.restore(t),this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&dl(this.suspendedCtx,this.ctx),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(t,e,s,i,r,a,o){var l;(l=this.dependencyTracker)==null||l.recordIncrementalData("transform",t),this.ctx.transform(e,s,i,r,a,o),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,s,i){let[r]=s;if(!i){r||(r=s[0]=new Path2D),this[e](t,r);return}if(this.dependencyTracker!==null){const a=e===Fl.stroke?this.current.lineWidth/2:0;this.dependencyTracker.resetBBox(t).recordBBox(t,this.ctx,i[0]-a,i[2]+a,i[1]-a,i[3]+a).recordDependencies(t,["transform"])}if(!(r instanceof Path2D)){const a=s[0]=new Path2D;for(let o=0,l=r.length;oum&&(c=um),this.current.fontSizeScale=s/c,this.ctx.font=`${h} ${l} ${c}px ${o}`}setTextRenderingMode(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("textRenderingMode",t),this.current.textRenderingMode=e}setTextRise(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("textRise",t),this.current.textRise=e}moveText(t,e,s){var i;(i=this.dependencyTracker)==null||i.resetIncrementalData("sameLineText").recordIncrementalData("moveText",t),this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=s}setLeadingMoveText(t,e,s){this.setLeading(t,-s),this.moveText(t,e,s)}setTextMatrix(t,e){var i;(i=this.dependencyTracker)==null||i.recordSimpleData("textMatrix",t);const{current:s}=this;s.textMatrix=e,s.textMatrixScale=Math.hypot(e[0],e[1]),s.x=s.lineX=0,s.y=s.lineY=0}nextLine(t){var e;this.moveText(t,0,this.current.leading),(e=this.dependencyTracker)==null||e.recordIncrementalData("moveText",this.dependencyTracker.getSimpleIndex("leading")??t)}paintChar(t,e,s,i,r,a){var w,S,_,E;const o=this.ctx,l=this.current,h=l.font,c=l.textRenderingMode,f=l.fontSize/l.fontSizeScale,g=c&Ot.FILL_STROKE_MASK,m=!!(c&Ot.ADD_TO_PATH_FLAG),A=l.patternFill&&!h.missingFile,y=l.patternStroke&&!h.missingFile;let v;if((h.disableFontFace||m||A||y)&&!h.missingFile&&(v=h.getPathGenerator(this.commonObjs,e)),v&&(h.disableFontFace||A||y)){o.save(),o.translate(s,i),o.scale(f,-f),(w=this.dependencyTracker)==null||w.recordCharacterBBox(t,o,h);let C;if(g===Ot.FILL||g===Ot.FILL_STROKE)if(r){C=o.getTransform(),o.setTransform(...r);const T=b(this,Rh,Yp).call(this,v,C,r);o.fill(T)}else o.fill(v);if(g===Ot.STROKE||g===Ot.FILL_STROKE)if(a){C||(C=o.getTransform()),o.setTransform(...a);const{a:T,b:x,c:P,d:M}=C,D=I.inverseTransform(a),R=I.transform([T,x,P,M,0,0],D);I.singularValueDecompose2dScale(R,Me),o.lineWidth*=Math.max(Me[0],Me[1])/f,o.stroke(b(this,Rh,Yp).call(this,v,C,a))}else o.lineWidth/=f,o.stroke(v);o.restore()}else(g===Ot.FILL||g===Ot.FILL_STROKE)&&(o.fillText(e,s,i),(S=this.dependencyTracker)==null||S.recordCharacterBBox(t,o,h,f,s,i,()=>o.measureText(e))),(g===Ot.STROKE||g===Ot.FILL_STROKE)&&(this.dependencyTracker&&((_=this.dependencyTracker)==null||_.recordCharacterBBox(t,o,h,f,s,i,()=>o.measureText(e)).recordDependencies(t,Le.stroke)),o.strokeText(e,s,i));m&&((this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:dt(o),x:s,y:i,fontSize:f,path:v}),(E=this.dependencyTracker)==null||E.recordCharacterBBox(t,o,h,f,s,i))}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const e=t.getImageData(0,0,10,10).data;let s=!1;for(let i=3;i0&&e[i]<255){s=!0;break}return V(this,"isFontSubpixelAAEnabled",s)}showText(t,e){var P,M,D,R;this.dependencyTracker&&(this.dependencyTracker.recordDependencies(t,Le.showText).copyDependenciesFromIncrementalOperation(t,"sameLineText").resetBBox(t),this.current.textRenderingMode&Ot.ADD_TO_PATH_FLAG&&this.dependencyTracker.recordFutureForcedDependency("textClip",t).inheritPendingDependenciesAsFutureForcedDependencies());const s=this.current,i=s.font;if(i.isType3Font){this.showType3Text(t,e),(P=this.dependencyTracker)==null||P.recordOperation(t).recordIncrementalData("sameLineText",t);return}const r=s.fontSize;if(r===0){(M=this.dependencyTracker)==null||M.recordOperation(t);return}const a=this.ctx,o=s.fontSizeScale,l=s.charSpacing,h=s.wordSpacing,c=s.fontDirection,f=s.textHScale*c,g=e.length,m=i.vertical,A=m?1:-1,y=i.defaultVMetrics,v=r*s.fontMatrix[0],w=s.textRenderingMode===Ot.FILL&&!i.disableFontFace&&!s.patternFill;a.save(),s.textMatrix&&a.transform(...s.textMatrix),a.translate(s.x,s.y+s.textRise),c>0?a.scale(f,-1):a.scale(f,1);let S,_;if(s.patternFill){a.save();const H=s.fillColor.getPattern(a,this,os(a),Vt.FILL);S=dt(a),a.restore(),a.fillStyle=H}if(s.patternStroke){a.save();const H=s.strokeColor.getPattern(a,this,os(a),Vt.STROKE);_=dt(a),a.restore(),a.strokeStyle=H}let E=s.lineWidth;const C=s.textMatrixScale;if(C===0||E===0){const H=s.textRenderingMode&Ot.FILL_STROKE_MASK;(H===Ot.STROKE||H===Ot.FILL_STROKE)&&(E=this.getSinglePixelWidth())}else E/=C;if(o!==1&&(a.scale(o,o),E/=o),a.lineWidth=E,i.isInvalidPDFjsFont){const H=[];let U=0;for(const Y of e)H.push(Y.unicode),U+=Y.width;const W=H.join("");if(a.fillText(W,0,0),this.dependencyTracker!==null){const Y=a.measureText(W);this.dependencyTracker.recordBBox(t,this.ctx,-Y.actualBoundingBoxLeft,Y.actualBoundingBoxRight,-Y.actualBoundingBoxAscent,Y.actualBoundingBoxDescent).recordOperation(t).recordIncrementalData("sameLineText",t)}s.x+=U*v*f,a.restore(),this.compose();return}let T=0,x;for(x=0;x0){Re=a.measureText(Y);const it=Re.width*1e3/r*o;if(AtRe??a.measureText(Y));else if(this.paintChar(t,Y,N,Pt,S,_),B){const it=N+r*B.offset.x/o,Z=Pt-r*B.offset.y/o;this.paintChar(t,B.fontChar,it,Z,S,_)}}const as=m?At*v-W*c:At*v+W*c;T+=as,U&&a.restore()}m?s.y-=T:s.x+=T*f,a.restore(),this.compose(),(R=this.dependencyTracker)==null||R.recordOperation(t).recordIncrementalData("sameLineText",t)}showType3Text(t,e){const s=this.ctx,i=this.current,r=i.font,a=i.fontSize,o=i.fontDirection,l=r.vertical?1:-1,h=i.charSpacing,c=i.wordSpacing,f=i.textHScale*o,g=i.fontMatrix||wp,m=e.length,A=i.textRenderingMode===Ot.INVISIBLE;let y,v,w,S;if(A||a===0)return;this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,s.save(),i.textMatrix&&s.transform(...i.textMatrix),s.translate(i.x,i.y+i.textRise),s.scale(f,o);const _=this.dependencyTracker;for(this.dependencyTracker=_?new tu(_,t):null,y=0;ynew Jg(a,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack},void 0,void 0,this.dependencyTracker?new tu(this.dependencyTracker,t):null)};s=new Wp(e,this.ctx,r,i)}else s=this._getPattern(t,e[1],e[2]);return s}setStrokeColorN(t,...e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("strokeColor",t),this.current.strokeColor=this.getColorN_Pattern(t,e),this.current.patternStroke=!0}setFillColorN(t,...e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("fillColor",t),this.current.fillColor=this.getColorN_Pattern(t,e),this.current.patternFill=!0}setStrokeRGBColor(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor=e,this.current.patternStroke=!1}setStrokeTransparent(t){var e;(e=this.dependencyTracker)==null||e.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(t,e){var s;(s=this.dependencyTracker)==null||s.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor=e,this.current.patternFill=!1}setFillTransparent(t){var e;(e=this.dependencyTracker)==null||e.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(t,e,s=null){let i;return this.cachedPatterns.has(e)?i=this.cachedPatterns.get(e):(i=Cy(this.getObject(t,e)),this.cachedPatterns.set(e,i)),s&&(i.matrix=s),i}shadingFill(t,e){var a;if(!this.contentVisible)return;const s=this.ctx;this.save(t);const i=this._getPattern(t,e);s.fillStyle=i.getPattern(s,this,os(s),Vt.SHADING);const r=os(s);if(r){const{width:o,height:l}=s.canvas,h=ya.slice();I.axialAlignedBoundingBox([0,0,o,l],r,h);const[c,f,g,m]=h;this.ctx.fillRect(c,f,g-c,m-f)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);(a=this.dependencyTracker)==null||a.resetBBox(t).recordFullPageBBox(t).recordDependencies(t,Le.transform).recordDependencies(t,Le.fill).recordOperation(t),this.compose(this.current.getClippedPathBoundingBox()),this.restore(t)}beginInlineImage(){st("Should not call beginInlineImage")}beginImageData(){st("Should not call beginImageData")}paintFormXObjectBegin(t,e,s){var i;if(this.contentVisible&&(this.save(t),this.baseTransformStack.push(this.baseTransform),e&&this.transform(t,...e),this.baseTransform=dt(this.ctx),s)){I.axialAlignedBoundingBox(s,this.baseTransform,this.current.minMax);const[r,a,o,l]=s,h=new Path2D;h.rect(r,a,o-r,l-a),this.ctx.clip(h),(i=this.dependencyTracker)==null||i.recordClipBox(t,this.ctx,r,o,a,l),this.endPath(t)}}paintFormXObjectEnd(t){this.contentVisible&&(this.restore(t),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t,e){var _;if(!this.contentVisible)return;this.save(t),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const s=this.ctx;e.isolated||ip("TODO: Support non-isolated groups."),e.knockout&&z("Knockout groups not supported.");const i=dt(s);if(e.matrix&&s.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let r=ya.slice();I.axialAlignedBoundingBox(e.bbox,dt(s),r);const a=[0,0,s.canvas.width,s.canvas.height];r=I.intersect(r,a)||[0,0,0,0];const o=Math.floor(r[0]),l=Math.floor(r[1]),h=Math.max(Math.ceil(r[2])-o,1),c=Math.max(Math.ceil(r[3])-l,1);this.current.startNewPathAndClipBox([0,0,h,c]);let f="groupAt"+this.groupLevel;e.smask&&(f+="_smask_"+this.smaskCounter++%2);const g=this.cachedCanvases.getCanvas(f,h,c),m=g.context;m.translate(-o,-l),m.transform(...i);let A=new Path2D;const[y,v,w,S]=e.bbox;if(A.rect(y,v,w-y,S-v),e.matrix){const E=new Path2D;E.addPath(A,new DOMMatrix(e.matrix)),A=E}m.clip(A),e.smask&&this.smaskStack.push({canvas:g.canvas,context:m,offsetX:o,offsetY:l,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}),(!e.smask||this.dependencyTracker)&&(s.setTransform(1,0,0,1,0,0),s.translate(o,l),s.save()),dl(s,m),this.ctx=m,(_=this.dependencyTracker)==null||_.inheritSimpleDataAsFutureForcedDependencies(["fillAlpha","strokeAlpha","globalCompositeOperation"]).pushBaseTransform(s),this.setGState(t,[["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(s),this.groupLevel++}endGroup(t,e){var r;if(!this.contentVisible)return;this.groupLevel--;const s=this.ctx,i=this.groupStack.pop();if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,(r=this.dependencyTracker)==null||r.popBaseTransform(),e.smask)this.tempSMask=this.smaskStack.pop(),this.restore(t),this.dependencyTracker&&this.ctx.restore();else{this.ctx.restore();const a=dt(this.ctx);this.restore(t),this.ctx.save(),this.ctx.setTransform(...a);const o=ya.slice();I.axialAlignedBoundingBox([0,0,s.canvas.width,s.canvas.height],a,o),this.ctx.drawImage(s.canvas,0,0),this.ctx.restore(),this.compose(o)}}beginAnnotation(t,e,s,i,r,a){if(b(this,Ph,Xp).call(this),bd(this.ctx),this.ctx.save(),this.save(t),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),s){const o=s[2]-s[0],l=s[3]-s[1];if(a&&this.annotationCanvasMap){i=i.slice(),i[4]-=s[0],i[5]-=s[1],s=s.slice(),s[0]=s[1]=0,s[2]=o,s[3]=l,I.singularValueDecompose2dScale(dt(this.ctx),Me);const{viewportScale:h}=this,c=Math.ceil(o*this.outputScaleX*h),f=Math.ceil(l*this.outputScaleY*h);this.annotationCanvas=this.canvasFactory.create(c,f);const{canvas:g,context:m}=this.annotationCanvas;this.annotationCanvasMap.set(e,g),this.annotationCanvas.savedCtx=this.ctx,this.ctx=m,this.ctx.save(),this.ctx.setTransform(Me[0],0,0,-Me[1],0,l*Me[1]),bd(this.ctx)}else{bd(this.ctx),this.endPath(t);const h=new Path2D;h.rect(s[0],s[1],o,l),this.ctx.clip(h)}}this.current=new pm(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(t,...i),this.transform(t,...r)}endAnnotation(t){this.annotationCanvas&&(this.ctx.restore(),b(this,Mh,qp).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t,e){var o;if(!this.contentVisible)return;const s=e.count;e=this.getObject(t,e.data,e),e.count=s;const i=this.ctx,r=this._createMaskCanvas(t,e),a=r.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(a,r.offsetX,r.offsetY),(o=this.dependencyTracker)==null||o.resetBBox(t).recordBBox(t,this.ctx,r.offsetX,r.offsetX+a.width,r.offsetY,r.offsetY+a.height).recordOperation(t),i.restore(),this.compose()}paintImageMaskXObjectRepeat(t,e,s,i=0,r=0,a,o){var f,g,m;if(!this.contentVisible)return;e=this.getObject(t,e.data,e);const l=this.ctx;l.save();const h=dt(l);l.transform(s,i,r,a,0,0);const c=this._createMaskCanvas(t,e);l.setTransform(1,0,0,1,c.offsetX-h[4],c.offsetY-h[5]),(f=this.dependencyTracker)==null||f.resetBBox(t);for(let A=0,y=o.length;Af?c/f:1,o=h>f?h/f:1}}this._cachedScaleForStroking[0]=a,this._cachedScaleForStroking[1]=o}return this._cachedScaleForStroking}rescaleAndStroke(t,e){const{ctx:s,current:{lineWidth:i}}=this,[r,a]=this.getScaleForStroking();if(r===a){s.lineWidth=(i||1)*r,s.stroke(t);return}const o=s.getLineDash();e&&s.save(),s.scale(r,a),bp.a=1/r,bp.d=1/a;const l=new Path2D;if(l.addPath(t,bp),o.length>0){const h=Math.max(r,a);s.setLineDash(o.map(c=>c/h)),s.lineDashOffset/=h}s.lineWidth=i||1,s.stroke(l),e&&s.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}};Ph=new WeakSet,Xp=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},Mh=new WeakSet,qp=function(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){const e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}},Rh=new WeakSet,Yp=function(t,e,s){const i=new Path2D;return i.addPath(t,new DOMMatrix(s).invertSelf().multiplySelf(e)),i};let _a=Jg;for(const u in Fl)_a.prototype[u]!==void 0&&(_a.prototype[Fl[u]]=_a.prototype[u]);var Dh,Lh;class Ti{static get workerPort(){return n(this,Dh)}static set workerPort(t){if(!(typeof Worker<"u"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");p(this,Dh,t)}static get workerSrc(){return n(this,Lh)}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");p(this,Lh,t)}}Dh=new WeakMap,Lh=new WeakMap,d(Ti,Dh,null),d(Ti,Lh,"");var ro,Ih;class Ly{constructor({parsedData:t,rawData:e}){d(this,ro,void 0);d(this,Ih,void 0);p(this,ro,t),p(this,Ih,e)}getRaw(){return n(this,Ih)}get(t){return n(this,ro).get(t)??null}[Symbol.iterator](){return n(this,ro).entries()}}ro=new WeakMap,Ih=new WeakMap;const ma=Symbol("INTERNAL");var Fh,Nh,Oh,ao;class Iy{constructor(t,{name:e,intent:s,usage:i,rbGroups:r}){d(this,Fh,!1);d(this,Nh,!1);d(this,Oh,!1);d(this,ao,!0);p(this,Fh,!!(t&Pe.DISPLAY)),p(this,Nh,!!(t&Pe.PRINT)),this.name=e,this.intent=s,this.usage=i,this.rbGroups=r}get visible(){if(n(this,Oh))return n(this,ao);if(!n(this,ao))return!1;const{print:t,view:e}=this.usage;return n(this,Fh)?(e==null?void 0:e.viewState)!=="OFF":n(this,Nh)?(t==null?void 0:t.printState)!=="OFF":!0}_setVisible(t,e,s=!1){t!==ma&&st("Internal method `_setVisible` called."),p(this,Oh,s),p(this,ao,e)}}Fh=new WeakMap,Nh=new WeakMap,Oh=new WeakMap,ao=new WeakMap;var tn,et,oo,lo,Bh,Kp;class Fy{constructor(t,e=Pe.DISPLAY){d(this,Bh);d(this,tn,null);d(this,et,new Map);d(this,oo,null);d(this,lo,null);if(this.renderingIntent=e,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,p(this,lo,t.order);for(const s of t.groups)n(this,et).set(s.id,new Iy(e,s));if(t.baseState==="OFF")for(const s of n(this,et).values())s._setVisible(ma,!1);for(const s of t.on)n(this,et).get(s)._setVisible(ma,!0);for(const s of t.off)n(this,et).get(s)._setVisible(ma,!1);p(this,oo,this.getHash())}}isVisible(t){if(n(this,et).size===0)return!0;if(!t)return ip("Optional content group not defined."),!0;if(t.type==="OCG")return n(this,et).has(t.id)?n(this,et).get(t.id).visible:(z(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return b(this,Bh,Kp).call(this,t.expression);if(!t.policy||t.policy==="AnyOn"){for(const e of t.ids){if(!n(this,et).has(e))return z(`Optional content group not found: ${e}`),!0;if(n(this,et).get(e).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const e of t.ids){if(!n(this,et).has(e))return z(`Optional content group not found: ${e}`),!0;if(!n(this,et).get(e).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const e of t.ids){if(!n(this,et).has(e))return z(`Optional content group not found: ${e}`),!0;if(!n(this,et).get(e).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const e of t.ids){if(!n(this,et).has(e))return z(`Optional content group not found: ${e}`),!0;if(n(this,et).get(e).visible)return!1}return!0}return z(`Unknown optional content policy ${t.policy}.`),!0}return z(`Unknown group type ${t.type}.`),!0}setVisibility(t,e=!0,s=!0){var r;const i=n(this,et).get(t);if(!i){z(`Optional content group not found: ${t}`);return}if(s&&e&&i.rbGroups.length)for(const a of i.rbGroups)for(const o of a)o!==t&&((r=n(this,et).get(o))==null||r._setVisible(ma,!1,!0));i._setVisible(ma,!!e,!0),p(this,tn,null)}setOCGState({state:t,preserveRB:e}){let s;for(const i of t){switch(i){case"ON":case"OFF":case"Toggle":s=i;continue}const r=n(this,et).get(i);if(r)switch(s){case"ON":this.setVisibility(i,!0,e);break;case"OFF":this.setVisibility(i,!1,e);break;case"Toggle":this.setVisibility(i,!r.visible,e);break}}p(this,tn,null)}get hasInitialVisibility(){return n(this,oo)===null||this.getHash()===n(this,oo)}getOrder(){return n(this,et).size?n(this,lo)?n(this,lo).slice():[...n(this,et).keys()]:null}getGroup(t){return n(this,et).get(t)||null}getHash(){if(n(this,tn)!==null)return n(this,tn);const t=new rb;for(const[e,s]of n(this,et))t.update(`${e}:${s.visible}`);return p(this,tn,t.hexdigest())}[Symbol.iterator](){return n(this,et).entries()}}tn=new WeakMap,et=new WeakMap,oo=new WeakMap,lo=new WeakMap,Bh=new WeakSet,Kp=function(t){const e=t.length;if(e<2)return!0;const s=t[0];for(let i=1;i0){const l=r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer;this._queuedChunks.push(l)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!s,this._isRangeSupported=!e,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener((l,h)=>{this._onReceiveData({begin:l,chunk:h})}),t.addProgressListener((l,h)=>{this._onProgress({loaded:l,total:h})}),t.addProgressiveReadListener(l=>{this._onReceiveData({chunk:l})}),t.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),t.transportReady()}_onReceiveData({begin:t,chunk:e}){const s=e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer;if(t===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(s):this._queuedChunks.push(s);else{const i=this._rangeReaders.some(function(r){return r._begin!==t?!1:(r._enqueue(s),!0)});_t(i,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var t;return((t=this._fullRequestReader)==null?void 0:t._loaded)??0}_onProgress(t){var e,s,i,r;t.total===void 0?(s=(e=this._rangeReaders[0])==null?void 0:e.onProgress)==null||s.call(e,{loaded:t.loaded}):(r=(i=this._fullRequestReader)==null?void 0:i.onProgress)==null||r.call(i,{loaded:t.loaded,total:t.total})}_onProgressiveDone(){var t;(t=this._fullRequestReader)==null||t.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){_t(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new Oy(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const s=new By(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeReaders.slice(0))s.cancel(t);this._pdfDataRangeTransport.abort()}}class Oy{constructor(t,e,s=!1,i=null){this._stream=t,this._done=s||!1,this._filename=zg(i)?i:null,this._queuedChunks=e||[],this._loaded=0;for(const r of this._queuedChunks)this._loaded+=r.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class By{constructor(t,e,s){this._stream=t,this._begin=e,this._end=s,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length===0)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const s of this._requests)s.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function Hy(u){let t=!0,e=s("filename\\*","i").exec(u);if(e){e=e[1];let c=o(e);return c=unescape(c),c=l(c),c=h(c),r(c)}if(e=a(u),e){const c=h(e);return r(c)}if(e=s("filename","i").exec(u),e){e=e[1];let c=o(e);return c=h(c),r(c)}function s(c,f){return new RegExp("(?:^|;)\\s*"+c+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',f)}function i(c,f){if(c){if(!/^[\x00-\xFF]+$/.test(f))return f;try{const g=new TextDecoder(c,{fatal:!0}),m=ad(f);f=g.decode(m),t=!1}catch{}}return f}function r(c){return t&&/[\x80-\xff]/.test(c)&&(c=i("utf-8",c),t&&(c=i("iso-8859-1",c))),c}function a(c){const f=[];let g;const m=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(g=m.exec(c))!==null;){let[,y,v,w]=g;if(y=parseInt(y,10),y in f){if(y===0)break;continue}f[y]=[v,w]}const A=[];for(let y=0;y{if(t._responseOrigin=ap(r.url),!wb(r.status))throw cd(r.status,i);this._reader=r.body.getReader(),this._headersCapability.resolve();const a=r.headers,{allowRangeRequests:o,suggestedLength:l}=Ab({responseHeaders:a,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=o,this._contentLength=l||this._contentLength,this._filename=yb(a),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new kn("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var s;await this._headersCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded,total:this._contentLength}),{value:_b(t),done:!1})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}class Gy{constructor(t,e,s){this._stream=t,this._reader=null,this._loaded=0;const i=t.source;this._withCredentials=i.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i.disableStream,this._abortController=new AbortController;const r=new Headers(t.headers);r.append("Range",`bytes=${e}-${s-1}`);const a=i.url;fetch(a,vb(r,this._withCredentials,this._abortController)).then(o=>{const l=ap(o.url);if(l!==t._responseOrigin)throw new Error(`Expected range response-origin "${l}" to match "${t._responseOrigin}".`);if(!wb(o.status))throw cd(o.status,a);this._readCapability.resolve(),this._reader=o.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var s;await this._readCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded}),{value:_b(t),done:!1})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}const Ap=200,yp=206;function Uy(u){const t=u.response;return typeof t!="string"?t:ad(t).buffer}class jy{constructor({url:t,httpHeaders:e,withCredentials:s}){k(this,"_responseOrigin",null);this.url=t,this.isHttp=/^https?:/i.test(t),this.headers=bb(this.isHttp,e),this.withCredentials=s||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(t){const e=new XMLHttpRequest,s=this.currXhrId++,i=this.pendingRequests[s]={xhr:e};e.open("GET",this.url),e.withCredentials=this.withCredentials;for(const[r,a]of this.headers)e.setRequestHeader(r,a);return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),i.expectedStatus=yp):i.expectedStatus=Ap,e.responseType="arraybuffer",_t(t.onError,"Expected `onError` callback to be provided."),e.onerror=()=>{t.onError(e.status)},e.onreadystatechange=this.onStateChange.bind(this,s),e.onprogress=this.onProgress.bind(this,s),i.onHeadersReceived=t.onHeadersReceived,i.onDone=t.onDone,i.onError=t.onError,i.onProgress=t.onProgress,e.send(null),s}onProgress(t,e){var i;const s=this.pendingRequests[t];s&&((i=s.onProgress)==null||i.call(s,e))}onStateChange(t,e){const s=this.pendingRequests[t];if(!s)return;const i=s.xhr;if(i.readyState>=2&&s.onHeadersReceived&&(s.onHeadersReceived(),delete s.onHeadersReceived),i.readyState!==4||!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],i.status===0&&this.isHttp){s.onError(i.status);return}const r=i.status||Ap;if(!(r===Ap&&s.expectedStatus===yp)&&r!==s.expectedStatus){s.onError(i.status);return}const o=Uy(i);if(r===yp){const l=i.getResponseHeader("Content-Range"),h=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);h?s.onDone({begin:parseInt(h[1],10),chunk:o}):(z('Missing or invalid "Content-Range" header.'),s.onError(0))}else o?s.onDone({begin:0,chunk:o}):s.onError(i.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}class Vy{constructor(t){this._source=t,this._manager=new jy(t),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return _t(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new Wy(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){const s=new Xy(this._manager,t,e);return s.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeRequestReaders.slice(0))s.cancel(t)}}class Wy{constructor(t,e){this._manager=t,this._url=e.url,this._fullRequestId=t.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,e=this._manager.getRequestXhr(t);this._manager._responseOrigin=ap(e.responseURL);const s=e.getAllResponseHeaders(),i=new Headers(s?s.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(o=>{const[l,...h]=o.split(": ");return[l,h.join(": ")]}):[]),{allowRangeRequests:r,suggestedLength:a}=Ab({responseHeaders:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});r&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=yb(i),this._isRangeSupported&&this._manager.abortRequest(t),this._headersCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=cd(t,this._url),this._headersCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){var e;(e=this.onProgress)==null||e.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersCapability.reject(t);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class Xy{constructor(t,e,s){this._manager=t,this._url=t.url,this._requestId=t.request({begin:e,end:s,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){var e;const t=ap((e=this._manager.getRequestXhr(this._requestId))==null?void 0:e.responseURL);t!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${t}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){var t;(t=this.onClosed)==null||t.call(this,this)}_onDone(t){const e=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0;for(const s of this._requests)s.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError??(this._storedError=cd(t,this._url));for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){var e;this.isStreamingSupported||(e=this.onProgress)==null||e.call(this,{loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const qy=/^[a-z][a-z0-9\-+.]+:/i;function Yy(u){if(qy.test(u))return new URL(u);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(u))}class Ky{constructor(t){this.source=t,this.url=Yy(t.url),_t(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var t;return((t=this._fullRequestReader)==null?void 0:t._loaded)??0}getFullReader(){return _t(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new Qy(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const s=new Jy(this,t,e);return this._rangeRequestReaders.push(s),s}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const s of this._rangeRequestReaders.slice(0))s.cancel(t)}}class Qy{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const e=t.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const s=process.getBuiltinModule("fs");s.promises.lstat(this._url).then(i=>{this._contentLength=i.size,this._setReadableStream(s.createReadStream(this._url)),this._headersCapability.resolve()},i=>{i.code==="ENOENT"&&(i=cd(0,this._url.href)),this._storedError=i,this._headersCapability.reject(i)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var s;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",e=>{this._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new kn("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class Jy{constructor(t,e,s){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const i=t.source;this._isStreamingSupported=!i.disableStream;const r=process.getBuiltinModule("fs");this._setReadableStream(r.createReadStream(this._url,{start:e,end:s-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){var s;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,(s=this.onProgress)==null||s.call(this,{loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",e=>{this._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}const ul=Symbol("INITIAL_DATA");var be,Hh,Qp;class Sb{constructor(){d(this,Hh);d(this,be,Object.create(null))}get(t,e=null){if(e){const i=b(this,Hh,Qp).call(this,t);return i.promise.then(()=>e(i.data)),null}const s=n(this,be)[t];if(!s||s.data===ul)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return s.data}has(t){const e=n(this,be)[t];return!!e&&e.data!==ul}delete(t){const e=n(this,be)[t];return!e||e.data===ul?!1:(delete n(this,be)[t],!0)}resolve(t,e=null){const s=b(this,Hh,Qp).call(this,t);s.data=e,s.resolve()}clear(){var t;for(const e in n(this,be)){const{data:s}=n(this,be)[e];(t=s==null?void 0:s.bitmap)==null||t.close()}p(this,be,Object.create(null))}*[Symbol.iterator](){for(const t in n(this,be)){const{data:e}=n(this,be)[t];e!==ul&&(yield[t,e])}}}be=new WeakMap,Hh=new WeakSet,Qp=function(t){var e;return(e=n(this,be))[t]||(e[t]={...Promise.withResolvers(),data:ul})};const Zy=1e5,ym=30;var Sm,en,le,$h,zh,fr,ii,Gh,Uh,pr,ho,co,sn,uo,jh,fo,gr,Vh,Wh,po,mr,Xh,nn,go,Wu,Eb,Xu,Cb,qh,Jp,mo,Pd,Yh,Zp,qu,Tb,Yu,xb;const ut=class ut{constructor({textContentSource:t,container:e,viewport:s}){d(this,Wu);d(this,Xu);d(this,qh);d(this,en,Promise.withResolvers());d(this,le,null);d(this,$h,!1);d(this,zh,!!((Sm=globalThis.FontInspector)!=null&&Sm.enabled));d(this,fr,null);d(this,ii,null);d(this,Gh,0);d(this,Uh,0);d(this,pr,null);d(this,ho,null);d(this,co,0);d(this,sn,0);d(this,uo,Object.create(null));d(this,jh,[]);d(this,fo,null);d(this,gr,[]);d(this,Vh,new WeakMap);d(this,Wh,null);var l;if(t instanceof ReadableStream)p(this,fo,t);else if(typeof t=="object")p(this,fo,new ReadableStream({start(h){h.enqueue(t),h.close()}}));else throw new Error('No "textContentSource" parameter specified.');p(this,le,p(this,ho,e)),p(this,sn,s.scale*Ds.pixelRatio),p(this,co,s.rotation),p(this,ii,{div:null,properties:null,ctx:null});const{pageWidth:i,pageHeight:r,pageX:a,pageY:o}=s.rawDims;p(this,Wh,[1,0,0,-1,-a,o+r]),p(this,Uh,i),p(this,Gh,r),b(l=ut,qu,Tb).call(l),ra(e,s),n(this,en).promise.finally(()=>{n(ut,go).delete(this),p(this,ii,null),p(this,uo,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:t,isFirefox:e}=Wt.platform;return V(this,"fontFamilyMap",new Map([["sans-serif",`${t&&e?"Calibri, ":""}sans-serif`],["monospace",`${t&&e?"Lucida Console, ":""}monospace`]]))}render(){const t=()=>{n(this,pr).read().then(({value:e,done:s})=>{if(s){n(this,en).resolve();return}n(this,fr)??p(this,fr,e.lang),Object.assign(n(this,uo),e.styles),b(this,Wu,Eb).call(this,e.items),t()},n(this,en).reject)};return p(this,pr,n(this,fo).getReader()),n(ut,go).add(this),t(),n(this,en).promise}update({viewport:t,onBefore:e=null}){var r;const s=t.scale*Ds.pixelRatio,i=t.rotation;if(i!==n(this,co)&&(e==null||e(),p(this,co,i),ra(n(this,ho),{rotation:i})),s!==n(this,sn)){e==null||e(),p(this,sn,s);const a={div:null,properties:null,ctx:b(r=ut,mo,Pd).call(r,n(this,fr))};for(const o of n(this,gr))a.properties=n(this,Vh).get(o),a.div=o,b(this,qh,Jp).call(this,a)}}cancel(){var e;const t=new kn("TextLayer task cancelled.");(e=n(this,pr))==null||e.cancel(t).catch(()=>{}),p(this,pr,null),n(this,en).reject(t)}get textDivs(){return n(this,gr)}get textContentItemsStr(){return n(this,jh)}static cleanup(){if(!(n(this,go).size>0)){n(this,po).clear();for(const{canvas:t}of n(this,mr).values())t.remove();n(this,mr).clear()}}};en=new WeakMap,le=new WeakMap,$h=new WeakMap,zh=new WeakMap,fr=new WeakMap,ii=new WeakMap,Gh=new WeakMap,Uh=new WeakMap,pr=new WeakMap,ho=new WeakMap,co=new WeakMap,sn=new WeakMap,uo=new WeakMap,jh=new WeakMap,fo=new WeakMap,gr=new WeakMap,Vh=new WeakMap,Wh=new WeakMap,po=new WeakMap,mr=new WeakMap,Xh=new WeakMap,nn=new WeakMap,go=new WeakMap,Wu=new WeakSet,Eb=function(t){var i,r;if(n(this,$h))return;(r=n(this,ii)).ctx??(r.ctx=b(i=ut,mo,Pd).call(i,n(this,fr)));const e=n(this,gr),s=n(this,jh);for(const a of t){if(e.length>Zy){z("Ignoring additional textDivs for performance reasons."),p(this,$h,!0);return}if(a.str===void 0){if(a.type==="beginMarkedContentProps"||a.type==="beginMarkedContent"){const o=n(this,le);p(this,le,document.createElement("span")),n(this,le).classList.add("markedContent"),a.id&&n(this,le).setAttribute("id",`${a.id}`),o.append(n(this,le))}else a.type==="endMarkedContent"&&p(this,le,n(this,le).parentNode);continue}s.push(a.str),b(this,Xu,Cb).call(this,a)}},Xu=new WeakSet,Cb=function(t){var y;const e=document.createElement("span"),s={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};n(this,gr).push(e);const i=I.transform(n(this,Wh),t.transform);let r=Math.atan2(i[1],i[0]);const a=n(this,uo)[t.fontName];a.vertical&&(r+=Math.PI/2);let o=n(this,zh)&&a.fontSubstitution||a.fontFamily;o=ut.fontFamilyMap.get(o)||o;const l=Math.hypot(i[2],i[3]),h=l*b(y=ut,Yu,xb).call(y,o,a,n(this,fr));let c,f;r===0?(c=i[4],f=i[5]-h):(c=i[4]+h*Math.sin(r),f=i[5]-h*Math.cos(r));const g="calc(var(--total-scale-factor) *",m=e.style;n(this,le)===n(this,ho)?(m.left=`${(100*c/n(this,Uh)).toFixed(2)}%`,m.top=`${(100*f/n(this,Gh)).toFixed(2)}%`):(m.left=`${g}${c.toFixed(2)}px)`,m.top=`${g}${f.toFixed(2)}px)`),m.fontSize=`${g}${(n(ut,nn)*l).toFixed(2)}px)`,m.fontFamily=o,s.fontSize=l,e.setAttribute("role","presentation"),e.textContent=t.str,e.dir=t.dir,n(this,zh)&&(e.dataset.fontName=a.fontSubstitutionLoadedName||t.fontName),r!==0&&(s.angle=r*(180/Math.PI));let A=!1;if(t.str.length>1)A=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){const v=Math.abs(t.transform[0]),w=Math.abs(t.transform[3]);v!==w&&Math.max(v,w)/Math.min(v,w)>1.5&&(A=!0)}if(A&&(s.canvasWidth=a.vertical?t.height:t.width),n(this,Vh).set(e,s),n(this,ii).div=e,n(this,ii).properties=s,b(this,qh,Jp).call(this,n(this,ii)),s.hasText&&n(this,le).append(e),s.hasEOL){const v=document.createElement("br");v.setAttribute("role","presentation"),n(this,le).append(v)}},qh=new WeakSet,Jp=function(t){var o;const{div:e,properties:s,ctx:i}=t,{style:r}=e;let a="";if(n(ut,nn)>1&&(a=`scale(${1/n(ut,nn)})`),s.canvasWidth!==0&&s.hasText){const{fontFamily:l}=r,{canvasWidth:h,fontSize:c}=s;b(o=ut,Yh,Zp).call(o,i,c*n(this,sn),l);const{width:f}=i.measureText(e.textContent);f>0&&(a=`scaleX(${h*n(this,sn)/f}) ${a}`)}s.angle!==0&&(a=`rotate(${s.angle}deg) ${a}`),a.length>0&&(r.transform=a)},mo=new WeakSet,Pd=function(t=null){let e=n(this,mr).get(t||(t=""));if(!e){const s=document.createElement("canvas");s.className="hiddenCanvasElement",s.lang=t,document.body.append(s),e=s.getContext("2d",{alpha:!1,willReadFrequently:!0}),n(this,mr).set(t,e),n(this,Xh).set(e,{size:0,family:""})}return e},Yh=new WeakSet,Zp=function(t,e,s){const i=n(this,Xh).get(t);e===i.size&&s===i.family||(t.font=`${e}px ${s}`,i.size=e,i.family=s)},qu=new WeakSet,Tb=function(){if(n(this,nn)!==null)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),p(this,nn,t.getBoundingClientRect().height),t.remove()},Yu=new WeakSet,xb=function(t,e,s){const i=n(this,po).get(t);if(i)return i;const r=b(this,mo,Pd).call(this,s);r.canvas.width=r.canvas.height=ym,b(this,Yh,Zp).call(this,r,ym,t);const a=r.measureText(""),o=a.fontBoundingBoxAscent,l=Math.abs(a.fontBoundingBoxDescent);r.canvas.width=r.canvas.height=0;let h=.8;return o?h=o/(o+l):(Wt.platform.isFirefox&&z("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),e.ascent?h=e.ascent:e.descent&&(h=1+e.descent)),n(this,po).set(t,h),h},d(ut,mo),d(ut,Yh),d(ut,qu),d(ut,Yu),d(ut,po,new Map),d(ut,mr,new Map),d(ut,Xh,new WeakMap),d(ut,nn,null),d(ut,go,new Set);let Nl=ut;class Ol{static textContent(t){const e=[],s={items:e,styles:Object.create(null)};function i(r){var l;if(!r)return;let a=null;const o=r.name;if(o==="#text")a=r.value;else if(Ol.shouldBuildText(o))(l=r==null?void 0:r.attributes)!=null&&l.textContent?a=r.attributes.textContent:r.value&&(a=r.value);else return;if(a!==null&&e.push({str:a}),!!r.children)for(const h of r.children)i(h)}return i(t),s}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}const tw=100;function ew(u={}){typeof u=="string"||u instanceof URL?u={url:u}:(u instanceof ArrayBuffer||ArrayBuffer.isView(u))&&(u={data:u});const t=new tg,{docId:e}=t,s=u.url?ly(u.url):null,i=u.data?hy(u.data):null,r=u.httpHeaders||null,a=u.withCredentials===!0,o=u.password??null,l=u.range instanceof kb?u.range:null,h=Number.isInteger(u.rangeChunkSize)&&u.rangeChunkSize>0?u.rangeChunkSize:2**16;let c=u.worker instanceof Bl?u.worker:null;const f=u.verbosity,g=typeof u.docBaseUrl=="string"&&!np(u.docBaseUrl)?u.docBaseUrl:null,m=pd(u.cMapUrl),A=u.cMapPacked!==!1,y=u.CMapReaderFactory||(ie?by:om),v=pd(u.iccUrl),w=pd(u.standardFontDataUrl),S=u.StandardFontDataFactory||(ie?Ay:lm),_=pd(u.wasmUrl),E=u.WasmFactory||(ie?yy:hm),C=u.stopAtErrors!==!0,T=Number.isInteger(u.maxImageSize)&&u.maxImageSize>-1?u.maxImageSize:-1,x=u.isEvalSupported!==!1,P=typeof u.isOffscreenCanvasSupported=="boolean"?u.isOffscreenCanvasSupported:!ie,M=typeof u.isImageDecoderSupported=="boolean"?u.isImageDecoderSupported:!ie&&(Wt.platform.isFirefox||!globalThis.chrome),D=Number.isInteger(u.canvasMaxAreaInBytes)?u.canvasMaxAreaInBytes:-1,R=typeof u.disableFontFace=="boolean"?u.disableFontFace:ie,H=u.fontExtraProperties===!0,U=u.enableXfa===!0,W=u.ownerDocument||globalThis.document,Y=u.disableRange===!0,B=u.disableStream===!0,N=u.disableAutoFetch===!0,Pt=u.pdfBug===!0,At=u.CanvasFactory||(ie?my:fy),Re=u.FilterFactory||(ie?gy:py),as=u.enableHWA===!0,it=u.useWasm!==!1,Z=l?l.length:u.length??NaN,Ls=typeof u.useSystemFonts=="boolean"?u.useSystemFonts:!ie&&!R,Ve=typeof u.useWorkerFetch=="boolean"?u.useWorkerFetch:!!(y===om&&S===lm&&E===hm&&m&&w&&_&&gl(m,document.baseURI)&&gl(w,document.baseURI)&&gl(_,document.baseURI)),We=null;$A(f);const pt={canvasFactory:new At({ownerDocument:W,enableHWA:as}),filterFactory:new Re({docId:e,ownerDocument:W}),cMapReaderFactory:Ve?null:new y({baseUrl:m,isCompressed:A}),standardFontDataFactory:Ve?null:new S({baseUrl:w}),wasmFactory:Ve?null:new E({baseUrl:_})};c||(c=Bl.create({verbosity:f,port:Ti.workerPort}),t._worker=c);const lp={docId:e,apiVersion:"5.4.149",data:i,password:o,disableAutoFetch:N,rangeChunkSize:h,length:Z,docBaseUrl:g,enableXfa:U,evaluatorOptions:{maxImageSize:T,disableFontFace:R,ignoreErrors:C,isEvalSupported:x,isOffscreenCanvasSupported:P,isImageDecoderSupported:M,canvasMaxAreaInBytes:D,fontExtraProperties:H,useSystemFonts:Ls,useWasm:it,useWorkerFetch:Ve,cMapUrl:m,iccUrl:v,standardFontDataUrl:w,wasmUrl:_}},hp={ownerDocument:W,pdfBug:Pt,styleElement:We,loadingParams:{disableAutoFetch:N,enableXfa:U}};return c.promise.then(function(){if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const cp=c.messageHandler.sendWithPromise("GetDocRequest",lp,i?[i.buffer]:null);let Mn;if(l)Mn=new Ny(l,{disableRange:Y,disableStream:B});else if(!i){if(!s)throw new Error("getDocument - no `url` parameter provided.");const Rn=gl(s)?$y:ie?Ky:Vy;Mn=new Rn({url:s,length:Z,httpHeaders:r,withCredentials:a,rangeChunkSize:h,disableRange:Y,disableStream:B})}return cp.then(Rn=>{if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const em=new vl(e,Rn,c.port),IA=new nw(em,t,Mn,hp,pt,as);t._transport=IA,em.send("Ready",null)})}).catch(t._capability.reject),t}var Ku;const Qu=class Qu{constructor(){k(this,"_capability",Promise.withResolvers());k(this,"_transport",null);k(this,"_worker",null);k(this,"docId",`d${St(Qu,Ku)._++}`);k(this,"destroyed",!1);k(this,"onPassword",null);k(this,"onProgress",null)}get promise(){return this._capability.promise}async destroy(){var t,e,s,i;this.destroyed=!0;try{(t=this._worker)!=null&&t.port&&(this._worker._pendingDestroy=!0),await((e=this._transport)==null?void 0:e.destroy())}catch(r){throw(s=this._worker)!=null&&s.port&&delete this._worker._pendingDestroy,r}this._transport=null,(i=this._worker)==null||i.destroy(),this._worker=null}async getData(){return this._transport.getData()}};Ku=new WeakMap,d(Qu,Ku,0);let tg=Qu;var br,Kh,Qh,Jh,Zh;class kb{constructor(t,e,s=!1,i=null){d(this,br,Promise.withResolvers());d(this,Kh,[]);d(this,Qh,[]);d(this,Jh,[]);d(this,Zh,[]);this.length=t,this.initialData=e,this.progressiveDone=s,this.contentDispositionFilename=i}addRangeListener(t){n(this,Zh).push(t)}addProgressListener(t){n(this,Jh).push(t)}addProgressiveReadListener(t){n(this,Qh).push(t)}addProgressiveDoneListener(t){n(this,Kh).push(t)}onDataRange(t,e){for(const s of n(this,Zh))s(t,e)}onDataProgress(t,e){n(this,br).promise.then(()=>{for(const s of n(this,Jh))s(t,e)})}onDataProgressiveRead(t){n(this,br).promise.then(()=>{for(const e of n(this,Qh))e(t)})}onDataProgressiveDone(){n(this,br).promise.then(()=>{for(const t of n(this,Kh))t()})}transportReady(){n(this,br).resolve()}requestDataRange(t,e){st("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}br=new WeakMap,Kh=new WeakMap,Qh=new WeakMap,Jh=new WeakMap,Zh=new WeakMap;class sw{constructor(t,e){this._pdfInfo=t,this._transport=e}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return V(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getAnnotationsByType(t,e){return this._transport.getAnnotationsByType(t,e)}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(e)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var ni,Ar,Tl;class iw{constructor(t,e,s,i=!1){d(this,Ar);d(this,ni,!1);this._pageIndex=t,this._pageInfo=e,this._transport=s,this._stats=i?new nm:null,this._pdfBug=i,this.commonObjs=s.commonObjs,this.objs=new Sb,this._intentStates=new Map,this.destroyed=!1,this.recordedGroups=null}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:e=this.rotate,offsetX:s=0,offsetY:i=0,dontFlip:r=!1}={}){return new ld({viewBox:this.view,userUnit:this.userUnit,scale:t,rotation:e,offsetX:s,offsetY:i,dontFlip:r})}getAnnotations({intent:t="display"}={}){const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return V(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var t;return((t=this._transport._htmlForXfa)==null?void 0:t.children[this._pageIndex])||null}render({canvasContext:t,canvas:e=t.canvas,viewport:s,intent:i="display",annotationMode:r=ki.ENABLE,transform:a=null,background:o=null,optionalContentConfigPromise:l=null,annotationCanvasMap:h=null,pageColors:c=null,printAnnotationStorage:f=null,isEditing:g=!1,recordOperations:m=!1,filteredOperationIndexes:A=null}){var P,M,D;(P=this._stats)==null||P.time("Overall");const y=this._transport.getRenderingIntent(i,r,f,g),{renderingIntent:v,cacheKey:w}=y;p(this,ni,!1),l||(l=this._transport.getOptionalContentConfig(v));let S=this._intentStates.get(w);S||(S=Object.create(null),this._intentStates.set(w,S)),S.streamReaderCancelTimeout&&(clearTimeout(S.streamReaderCancelTimeout),S.streamReaderCancelTimeout=null);const _=!!(v&Pe.PRINT);S.displayReadyCapability||(S.displayReadyCapability=Promise.withResolvers(),S.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(M=this._stats)==null||M.time("Page Request"),this._pumpOperatorList(y));const E=!this.recordedGroups&&(m||this._pdfBug&&((D=globalThis.StepperManager)==null?void 0:D.enabled)),C=R=>{var H,U,W;if(S.renderTasks.delete(T),E){const Y=(H=T.gfx)==null?void 0:H.dependencyTracker.take();Y?((U=T.stepper)==null||U.setOperatorGroups(Y),m&&(this.recordedGroups=Y)):m&&(this.recordedGroups=[])}_&&p(this,ni,!0),b(this,Ar,Tl).call(this),R?(T.capability.reject(R),this._abortOperatorList({intentState:S,reason:R instanceof Error?R:new Error(R)})):T.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(W=globalThis.Stats)!=null&&W.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},T=new eg({callback:C,params:{canvas:e,canvasContext:t,dependencyTracker:E?new wy(e):null,viewport:s,transform:a,background:o},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:h,operatorList:S.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!_,pdfBug:this._pdfBug,pageColors:c,enableHWA:this._transport.enableHWA,filteredOperationIndexes:A});(S.renderTasks||(S.renderTasks=new Set)).add(T);const x=T.task;return Promise.all([S.displayReadyCapability.promise,l]).then(([R,H])=>{var U;if(this.destroyed){C();return}if((U=this._stats)==null||U.time("Rendering"),!(H.renderingIntent&v))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");T.initializeGraphics({transparency:R,optionalContentConfig:H}),T.operatorListChanged()}).catch(C),x}getOperatorList({intent:t="display",annotationMode:e=ki.ENABLE,printAnnotationStorage:s=null,isEditing:i=!1}={}){var h;function r(){o.operatorList.lastChunk&&(o.opListReadCapability.resolve(o.operatorList),o.renderTasks.delete(l))}const a=this._transport.getRenderingIntent(t,e,s,i,!0);let o=this._intentStates.get(a.cacheKey);o||(o=Object.create(null),this._intentStates.set(a.cacheKey,o));let l;return o.opListReadCapability||(l=Object.create(null),l.operatorListChanged=r,o.opListReadCapability=Promise.withResolvers(),(o.renderTasks||(o.renderTasks=new Set)).add(l),o.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(h=this._stats)==null||h.time("Page Request"),this._pumpOperatorList(a)),o.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:e=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:e===!0},{highWaterMark:100,size(i){return i.items.length}})}getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(s=>Ol.textContent(s));const e=this.streamTextContent(t);return new Promise(function(s,i){function r(){a.read().then(function({value:l,done:h}){if(h){s(o);return}o.lang??(o.lang=l.lang),Object.assign(o.styles,l.styles),o.items.push(...l.items),r()},i)}const a=e.getReader(),o={items:[],styles:Object.create(null),lang:null};r()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(const s of e.renderTasks)t.push(s.completed),s.cancel();return this.objs.clear(),p(this,ni,!1),Promise.all(t)}cleanup(t=!1){p(this,ni,!0);const e=b(this,Ar,Tl).call(this);return t&&e&&this._stats&&(this._stats=new nm),e}_startRenderPage(t,e){var i,r;const s=this._intentStates.get(e);s&&((i=this._stats)==null||i.timeEnd("Page Request"),(r=s.displayReadyCapability)==null||r.resolve(t))}_renderPageChunk(t,e){for(let s=0,i=t.length;s{l.read().then(({value:f,done:g})=>{if(g){h.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(f,h),c())},f=>{if(h.streamReader=null,!this._transport.destroyed){if(h.operatorList){h.operatorList.lastChunk=!0;for(const g of h.renderTasks)g.operatorListChanged();b(this,Ar,Tl).call(this)}if(h.displayReadyCapability)h.displayReadyCapability.reject(f);else if(h.opListReadCapability)h.opListReadCapability.reject(f);else throw f}})};c()}_abortOperatorList({intentState:t,reason:e,force:s=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!s){if(t.renderTasks.size>0)return;if(e instanceof $g){let i=tw;e.extraDelay>0&&e.extraDelay<1e3&&(i+=e.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:e,force:!0})},i);return}}if(t.streamReader.cancel(new kn(e.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[i,r]of this._intentStates)if(r===t){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}}ni=new WeakMap,Ar=new WeakSet,Tl=function(){if(!n(this,ni)||this.destroyed)return!1;for(const{renderTasks:t,operatorList:e}of this._intentStates.values())if(t.size>0||!e.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),p(this,ni,!1),!0};var rn,Je,ri,yr,Ju,wr,vr,bo,Md,Zu,Pb,tf,Mb,_r,xl,Ao,Rd;const at=class at{constructor({name:t=null,port:e=null,verbosity:s=zA()}={}){d(this,bo);d(this,Zu);d(this,tf);d(this,_r);d(this,rn,Promise.withResolvers());d(this,Je,null);d(this,ri,null);d(this,yr,null);if(this.name=t,this.destroyed=!1,this.verbosity=s,e){if(n(at,vr).has(e))throw new Error("Cannot use more than one PDFWorker per port.");n(at,vr).set(e,this),b(this,Zu,Pb).call(this,e)}else b(this,tf,Mb).call(this)}get promise(){return n(this,rn).promise}get port(){return n(this,ri)}get messageHandler(){return n(this,Je)}destroy(){var t,e;this.destroyed=!0,(t=n(this,yr))==null||t.terminate(),p(this,yr,null),n(at,vr).delete(n(this,ri)),p(this,ri,null),(e=n(this,Je))==null||e.destroy(),p(this,Je,null)}static create(t){const e=n(this,vr).get(t==null?void 0:t.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new at(t)}static get workerSrc(){if(Ti.workerSrc)return Ti.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return V(this,"_setupFakeWorkerGlobal",(async()=>n(this,Ao,Rd)?n(this,Ao,Rd):(await OA(()=>import(this.workerSrc),[])).WorkerMessageHandler)())}};rn=new WeakMap,Je=new WeakMap,ri=new WeakMap,yr=new WeakMap,Ju=new WeakMap,wr=new WeakMap,vr=new WeakMap,bo=new WeakSet,Md=function(){n(this,rn).resolve(),n(this,Je).send("configure",{verbosity:this.verbosity})},Zu=new WeakSet,Pb=function(t){p(this,ri,t),p(this,Je,new vl("main","worker",t)),n(this,Je).on("ready",()=>{}),b(this,bo,Md).call(this)},tf=new WeakSet,Mb=function(){if(n(at,wr)||n(at,Ao,Rd)){b(this,_r,xl).call(this);return}let{workerSrc:t}=at;try{at._isSameOrigin(window.location,t)||(t=at._createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t,{type:"module"}),s=new vl("main","worker",e),i=()=>{r.abort(),s.destroy(),e.terminate(),this.destroyed?n(this,rn).reject(new Error("Worker was destroyed")):b(this,_r,xl).call(this)},r=new AbortController;e.addEventListener("error",()=>{n(this,yr)||i()},{signal:r.signal}),s.on("test",o=>{if(r.abort(),this.destroyed||!o){i();return}p(this,Je,s),p(this,ri,e),p(this,yr,e),b(this,bo,Md).call(this)}),s.on("ready",o=>{if(r.abort(),this.destroyed){i();return}try{a()}catch{b(this,_r,xl).call(this)}});const a=()=>{const o=new Uint8Array;s.send("test",o,[o.buffer])};a();return}catch{ip("The worker has been disabled.")}b(this,_r,xl).call(this)},_r=new WeakSet,xl=function(){n(at,wr)||(z("Setting up fake worker."),p(at,wr,!0)),at._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){n(this,rn).reject(new Error("Worker was destroyed"));return}const e=new uy;p(this,ri,e);const s=`fake${St(at,Ju)._++}`,i=new vl(s+"_worker",s,e);t.setup(i,e),p(this,Je,new vl(s,s+"_worker",e)),b(this,bo,Md).call(this)}).catch(t=>{n(this,rn).reject(new Error(`Setting up fake worker failed: "${t.message}".`))})},Ao=new WeakSet,Rd=function(){var t;try{return((t=globalThis.pdfjsWorker)==null?void 0:t.WorkerMessageHandler)||null}catch{return null}},d(at,Ao),d(at,Ju,0),d(at,wr,!1),d(at,vr,new WeakMap),ie&&(p(at,wr,!0),Ti.workerSrc||(Ti.workerSrc="./pdf.worker.mjs")),at._isSameOrigin=(t,e)=>{const s=URL.parse(t);if(!(s!=null&&s.origin)||s.origin==="null")return!1;const i=new URL(e,s);return s.origin===i.origin},at._createCDNWrapper=t=>{const e=`await import("${t}");`;return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))},at.fromPort=t=>{if(ZA("`PDFWorker.fromPort` - please use `PDFWorker.create` instead."),!(t!=null&&t.port))throw new Error("PDFWorker.fromPort - invalid method signature.");return at.create(t)};let Bl=at;var ai,vs,yo,wo,oi,Sr,kl;class nw{constructor(t,e,s,i,r,a){d(this,Sr);d(this,ai,new Map);d(this,vs,new Map);d(this,yo,new Map);d(this,wo,new Map);d(this,oi,null);this.messageHandler=t,this.loadingTask=e,this.commonObjs=new Sb,this.fontLoader=new ay({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=r.canvasFactory,this.filterFactory=r.filterFactory,this.cMapReaderFactory=r.cMapReaderFactory,this.standardFontDataFactory=r.standardFontDataFactory,this.wasmFactory=r.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=s,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.enableHWA=a,this.setupMessageHandler()}get annotationStorage(){return V(this,"annotationStorage",new Gg)}getRenderingIntent(t,e=ki.ENABLE,s=null,i=!1,r=!1){let a=Pe.DISPLAY,o=zp;switch(t){case"any":a=Pe.ANY;break;case"display":break;case"print":a=Pe.PRINT;break;default:z(`getRenderingIntent - invalid intent: ${t}`)}const l=a&Pe.PRINT&&s instanceof ob?s:this.annotationStorage;switch(e){case ki.DISABLE:a+=Pe.ANNOTATIONS_DISABLE;break;case ki.ENABLE:break;case ki.ENABLE_FORMS:a+=Pe.ANNOTATIONS_FORMS;break;case ki.ENABLE_STORAGE:a+=Pe.ANNOTATIONS_STORAGE,o=l.serializable;break;default:z(`getRenderingIntent - invalid annotationMode: ${e}`)}i&&(a+=Pe.IS_EDITING),r&&(a+=Pe.OPLIST);const{ids:h,hash:c}=l.modifiedIds,f=[a,o.hash,c];return{renderingIntent:a,cacheKey:f.join("_"),annotationStorageSerializable:o,modifiedIds:h}}destroy(){var s;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(s=n(this,oi))==null||s.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const i of n(this,vs).values())t.push(i._destroy());n(this,vs).clear(),n(this,yo).clear(),n(this,wo).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then(()=>{var i,r;this.commonObjs.clear(),this.fontLoader.clear(),n(this,ai).clear(),this.filterFactory.destroy(),Nl.cleanup(),(i=this._networkStream)==null||i.cancelAllRequests(new kn("Worker was terminated.")),(r=this.messageHandler)==null||r.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(s,i)=>{_t(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=r=>{this._lastProgress={loaded:r.loaded,total:r.total}},i.onPull=()=>{this._fullReader.read().then(function({value:r,done:a}){if(a){i.close();return}_t(r instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(r),1,[r])}).catch(r=>{i.error(r)})},i.onCancel=r=>{this._fullReader.cancel(r),i.ready.catch(a=>{if(!this.destroyed)throw a})}}),t.on("ReaderHeadersReady",async s=>{var o;await this._fullReader.headersReady;const{isStreamingSupported:i,isRangeSupported:r,contentLength:a}=this._fullReader;return(!i||!r)&&(this._lastProgress&&((o=e.onProgress)==null||o.call(e,this._lastProgress)),this._fullReader.onProgress=l=>{var h;(h=e.onProgress)==null||h.call(e,{loaded:l.loaded,total:l.total})}),{isStreamingSupported:i,isRangeSupported:r,contentLength:a}}),t.on("GetRangeReader",(s,i)=>{_t(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const r=this._networkStream.getRangeReader(s.begin,s.end);if(!r){i.close();return}i.onPull=()=>{r.read().then(function({value:a,done:o}){if(o){i.close();return}_t(a instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(a),1,[a])}).catch(a=>{i.error(a)})},i.onCancel=a=>{r.cancel(a),i.ready.catch(o=>{if(!this.destroyed)throw o})}}),t.on("GetDoc",({pdfInfo:s})=>{this._numPages=s.numPages,this._htmlForXfa=s.htmlForXfa,delete s.htmlForXfa,e._capability.resolve(new sw(s,this))}),t.on("DocException",s=>{e._capability.reject(re(s))}),t.on("PasswordRequest",s=>{p(this,oi,Promise.withResolvers());try{if(!e.onPassword)throw re(s);const i=r=>{r instanceof Error?n(this,oi).reject(r):n(this,oi).resolve({password:r})};e.onPassword(i,s.code)}catch(i){n(this,oi).reject(i)}return n(this,oi).promise}),t.on("DataLoaded",s=>{var i;(i=e.onProgress)==null||i.call(e,{loaded:s.length,total:s.length}),this.downloadInfoCapability.resolve(s)}),t.on("StartRenderPage",s=>{if(this.destroyed)return;n(this,vs).get(s.pageIndex)._startRenderPage(s.transparency,s.cacheKey)}),t.on("commonobj",([s,i,r])=>{var a;if(this.destroyed||this.commonObjs.has(s))return null;switch(i){case"Font":if("error"in r){const c=r.error;z(`Error during font loading: ${c}`),this.commonObjs.resolve(s,c);break}const o=this._params.pdfBug&&((a=globalThis.FontInspector)!=null&&a.enabled)?(c,f)=>globalThis.FontInspector.fontAdded(c,f):null,l=new oy(r,o);this.fontLoader.bind(l).catch(()=>t.sendWithPromise("FontFallback",{id:s})).finally(()=>{!l.fontExtraProperties&&l.data&&(l.data=null),this.commonObjs.resolve(s,l)});break;case"CopyLocalImage":const{imageRef:h}=r;_t(h,"The imageRef must be defined.");for(const c of n(this,vs).values())for(const[,f]of c.objs)if((f==null?void 0:f.ref)===h)return f.dataLen?(this.commonObjs.resolve(s,structuredClone(f)),f.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(s,r);break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),t.on("obj",([s,i,r,a])=>{var l;if(this.destroyed)return;const o=n(this,vs).get(i);if(!o.objs.has(s)){if(o._intentStates.size===0){(l=a==null?void 0:a.bitmap)==null||l.close();return}switch(r){case"Image":case"Pattern":o.objs.resolve(s,a);break;default:throw new Error(`Got unknown object type ${r}`)}}}),t.on("DocProgress",s=>{var i;this.destroyed||(i=e.onProgress)==null||i.call(e,{loaded:s.loaded,total:s.total})}),t.on("FetchBinaryData",async s=>{if(this.destroyed)throw new Error("Worker was destroyed.");const i=this[s.type];if(!i)throw new Error(`${s.type} not initialized, see the \`useWorkerFetch\` parameter.`);return i.fetch(s)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var s;this.annotationStorage.size<=0&&z("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:((s=this._fullReader)==null?void 0:s.filename)??null},e).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const e=t-1,s=n(this,yo).get(e);if(s)return s;const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then(r=>{if(this.destroyed)throw new Error("Transport destroyed");r.refStr&&n(this,wo).set(r.refStr,t);const a=new iw(e,r,this,this._params.pdfBug);return n(this,vs).set(e,a),a});return n(this,yo).set(e,i),i}getPageIndex(t){return Gp(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getFieldObjects(){return b(this,Sr,kl).call(this,"GetFieldObjects")}hasJSActions(){return b(this,Sr,kl).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getAnnotationsByType(t,e){return this.messageHandler.sendWithPromise("GetAnnotationsByType",{types:t,pageIndexesToSkip:e})}getDocJSActions(){return b(this,Sr,kl).call(this,"GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return b(this,Sr,kl).call(this,"GetOptionalContentConfig").then(e=>new Fy(e,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",e=n(this,ai).get(t);if(e)return e;const s=this.messageHandler.sendWithPromise(t,null).then(i=>{var r,a;return{info:i[0],metadata:i[1]?new Ly(i[1]):null,contentDispositionFilename:((r=this._fullReader)==null?void 0:r.filename)??null,contentLength:((a=this._fullReader)==null?void 0:a.contentLength)??null}});return n(this,ai).set(t,s),s}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(t=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of n(this,vs).values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),n(this,ai).clear(),this.filterFactory.destroy(!0),Nl.cleanup()}}cachedPageNumber(t){if(!Gp(t))return null;const e=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;return n(this,wo).get(e)??null}}ai=new WeakMap,vs=new WeakMap,yo=new WeakMap,wo=new WeakMap,oi=new WeakMap,Sr=new WeakSet,kl=function(t,e=null){const s=n(this,ai).get(t);if(s)return s;const i=this.messageHandler.sendWithPromise(t,e);return n(this,ai).set(t,i),i};var an;class rw{constructor(t){d(this,an,null);k(this,"onContinue",null);k(this,"onError",null);p(this,an,t)}get promise(){return n(this,an).capability.promise}cancel(t=0){n(this,an).cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=n(this,an).operatorList;if(!t)return!1;const{annotationCanvasMap:e}=n(this,an);return t.form||t.canvas&&(e==null?void 0:e.size)>0}}an=new WeakMap;var on,Er;const Nn=class Nn{constructor({callback:t,params:e,objs:s,commonObjs:i,annotationCanvasMap:r,operatorList:a,pageIndex:o,canvasFactory:l,filterFactory:h,useRequestAnimationFrame:c=!1,pdfBug:f=!1,pageColors:g=null,enableHWA:m=!1,filteredOperationIndexes:A=null}){d(this,on,null);this.callback=t,this.params=e,this.objs=s,this.commonObjs=i,this.annotationCanvasMap=r,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=h,this._pdfBug=f,this.pageColors=g,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=c===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new rw(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=e.canvas,this._canvasContext=e.canvas?null:e.canvasContext,this._enableHWA=m,this._dependencyTracker=e.dependencyTracker,this._filteredOperationIndexes=A}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:e}){var l,h;if(this.cancelled)return;if(this._canvas){if(n(Nn,Er).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");n(Nn,Er).add(this._canvas)}this._pdfBug&&((l=globalThis.StepperManager)!=null&&l.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport:s,transform:i,background:r,dependencyTracker:a}=this.params,o=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new _a(o,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:e},this.annotationCanvasMap,this.pageColors,a),this.gfx.beginDrawing({transform:i,viewport:s,transparency:t,background:r}),this.operatorListIdx=0,this.graphicsReady=!0,(h=this.graphicsReadyCallback)==null||h.call(this)}cancel(t=null,e=0){var s,i,r;this.running=!1,this.cancelled=!0,(s=this.gfx)==null||s.endDrawing(),n(this,on)&&(window.cancelAnimationFrame(n(this,on)),p(this,on,null)),n(Nn,Er).delete(this._canvas),t||(t=new $g(`Rendering cancelled, page ${this._pageIndex+1}`,e)),this.callback(t),(r=(i=this.task).onError)==null||r.call(i,t)}operatorListChanged(){var t;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(t=this.stepper)==null||t.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?p(this,on,window.requestAnimationFrame(()=>{p(this,on,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper,this._filteredOperationIndexes),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),n(Nn,Er).delete(this._canvas),this.callback())))}};on=new WeakMap,Er=new WeakMap,d(Nn,Er,new WeakSet);let eg=Nn;const aw="5.4.149",ow="9e2e9e209";var Ae,Cr,vo,xt,tc,_o,li,ec,ln,Ze,sc,ic,sg,nc,ig,rc,ng,hi,Dn,ef,Rb,_s,xi;const ae=class ae{constructor({editor:t=null,uiManager:e=null}){d(this,ic);d(this,nc);d(this,rc);d(this,hi);d(this,ef);d(this,_s);d(this,Ae,null);d(this,Cr,null);d(this,vo,void 0);d(this,xt,null);d(this,tc,!1);d(this,_o,!1);d(this,li,null);d(this,ec,void 0);d(this,ln,null);d(this,Ze,null);var s,i;t?(p(this,_o,!1),p(this,li,t)):p(this,_o,!0),p(this,Ze,(t==null?void 0:t._uiManager)||e),p(this,ec,n(this,Ze)._eventBus),p(this,vo,((s=t==null?void 0:t.color)==null?void 0:s.toUpperCase())||((i=n(this,Ze))==null?void 0:i.highlightColors.values().next().value)||"#FFFF98"),n(ae,sc)||p(ae,sc,Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"}))}static get _keyboardManager(){return V(this,"_keyboardManager",new hd([[["Escape","mac+Escape"],ae.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],ae.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],ae.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],ae.prototype._moveToPrevious],[["Home","mac+Home"],ae.prototype._moveToBeginning],[["End","mac+End"],ae.prototype._moveToEnd]]))}renderButton(){const t=p(this,Ae,document.createElement("button"));t.className="colorPicker",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),t.ariaHasPopup="true",n(this,li)&&(t.ariaControls=`${n(this,li).id}_colorpicker_dropdown`);const e=n(this,Ze)._signal;t.addEventListener("click",b(this,hi,Dn).bind(this),{signal:e}),t.addEventListener("keydown",b(this,rc,ng).bind(this),{signal:e});const s=p(this,Cr,document.createElement("span"));return s.className="swatch",s.ariaHidden="true",s.style.backgroundColor=n(this,vo),t.append(s),t}renderMainDropdown(){const t=p(this,xt,b(this,ic,sg).call(this));return t.ariaOrientation="horizontal",t.ariaLabelledBy="highlightColorPickerLabel",t}_colorSelectFromKeyboard(t){if(t.target===n(this,Ae)){b(this,hi,Dn).call(this,t);return}const e=t.target.getAttribute("data-color");e&&b(this,nc,ig).call(this,e,t)}_moveToNext(t){var e,s;if(!n(this,_s,xi)){b(this,hi,Dn).call(this,t);return}if(t.target===n(this,Ae)){(e=n(this,xt).firstChild)==null||e.focus();return}(s=t.target.nextSibling)==null||s.focus()}_moveToPrevious(t){var e,s;if(t.target===((e=n(this,xt))==null?void 0:e.firstChild)||t.target===n(this,Ae)){n(this,_s,xi)&&this._hideDropdownFromKeyboard();return}n(this,_s,xi)||b(this,hi,Dn).call(this,t),(s=t.target.previousSibling)==null||s.focus()}_moveToBeginning(t){var e;if(!n(this,_s,xi)){b(this,hi,Dn).call(this,t);return}(e=n(this,xt).firstChild)==null||e.focus()}_moveToEnd(t){var e;if(!n(this,_s,xi)){b(this,hi,Dn).call(this,t);return}(e=n(this,xt).lastChild)==null||e.focus()}hideDropdown(){var t,e;(t=n(this,xt))==null||t.classList.add("hidden"),n(this,Ae).ariaExpanded="false",(e=n(this,ln))==null||e.abort(),p(this,ln,null)}_hideDropdownFromKeyboard(){var t;if(!n(this,_o)){if(!n(this,_s,xi)){(t=n(this,li))==null||t.unselect();return}this.hideDropdown(),n(this,Ae).focus({preventScroll:!0,focusVisible:n(this,tc)})}}updateColor(t){if(n(this,Cr)&&(n(this,Cr).style.backgroundColor=t),!n(this,xt))return;const e=n(this,Ze).highlightColors.values();for(const s of n(this,xt).children)s.ariaSelected=e.next().value===t.toUpperCase()}destroy(){var t,e;(t=n(this,Ae))==null||t.remove(),p(this,Ae,null),p(this,Cr,null),(e=n(this,xt))==null||e.remove(),p(this,xt,null)}};Ae=new WeakMap,Cr=new WeakMap,vo=new WeakMap,xt=new WeakMap,tc=new WeakMap,_o=new WeakMap,li=new WeakMap,ec=new WeakMap,ln=new WeakMap,Ze=new WeakMap,sc=new WeakMap,ic=new WeakSet,sg=function(){const t=document.createElement("div"),e=n(this,Ze)._signal;t.addEventListener("contextmenu",je,{signal:e}),t.className="dropdown",t.role="listbox",t.ariaMultiSelectable="false",t.ariaOrientation="vertical",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),n(this,li)&&(t.id=`${n(this,li).id}_colorpicker_dropdown`);for(const[s,i]of n(this,Ze).highlightColors){const r=document.createElement("button");r.tabIndex="0",r.role="option",r.setAttribute("data-color",i),r.title=s,r.setAttribute("data-l10n-id",n(ae,sc)[s]);const a=document.createElement("span");r.append(a),a.className="swatch",a.style.backgroundColor=i,r.ariaSelected=i===n(this,vo),r.addEventListener("click",b(this,nc,ig).bind(this,i),{signal:e}),t.append(r)}return t.addEventListener("keydown",b(this,rc,ng).bind(this),{signal:e}),t},nc=new WeakSet,ig=function(t,e){e.stopPropagation(),n(this,ec).dispatch("switchannotationeditorparams",{source:this,type:X.HIGHLIGHT_COLOR,value:t}),this.updateColor(t)},rc=new WeakSet,ng=function(t){ae._keyboardManager.exec(this,t)},hi=new WeakSet,Dn=function(t){if(n(this,_s,xi)){this.hideDropdown();return}if(p(this,tc,t.detail===0),n(this,ln)||(p(this,ln,new AbortController),window.addEventListener("pointerdown",b(this,ef,Rb).bind(this),{signal:n(this,Ze).combinedSignal(n(this,ln))})),n(this,Ae).ariaExpanded="true",n(this,xt)){n(this,xt).classList.remove("hidden");return}const e=p(this,xt,b(this,ic,sg).call(this));n(this,Ae).append(e)},ef=new WeakSet,Rb=function(t){var e;(e=n(this,xt))!=null&&e.contains(t.target)||this.hideDropdown()},_s=new WeakSet,xi=function(){return n(this,xt)&&!n(this,xt).classList.contains("hidden")},d(ae,sc,null);let eu=ae;var Ss,ac,So,oc;const On=class On{constructor(t){d(this,Ss,null);d(this,ac,null);d(this,So,null);p(this,ac,t),p(this,So,t._uiManager),n(On,oc)||p(On,oc,Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"}))}renderButton(){if(n(this,Ss))return n(this,Ss);const{editorType:t,colorType:e,colorValue:s}=n(this,ac),i=p(this,Ss,document.createElement("input"));return i.type="color",i.value=s||"#000000",i.className="basicColorPicker",i.tabIndex=0,i.setAttribute("data-l10n-id",n(On,oc)[t]),i.addEventListener("input",()=>{n(this,So).updateParams(e,i.value)},{signal:n(this,So)._signal}),i}update(t){n(this,Ss)&&(n(this,Ss).value=t)}destroy(){var t;(t=n(this,Ss))==null||t.remove(),p(this,Ss,null)}hideDropdown(){}};Ss=new WeakMap,ac=new WeakMap,So=new WeakMap,oc=new WeakMap,d(On,oc,null);let su=On;function wm(u){return Math.floor(Math.max(0,Math.min(1,u))*255).toString(16).padStart(2,"0")}function fl(u){return Math.max(0,Math.min(255,255*u))}class vm{static CMYK_G([t,e,s,i]){return["G",1-Math.min(1,.3*t+.59*s+.11*e+i)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=fl(t),[t,t,t]}static G_HTML([t]){const e=wm(t);return`#${e}${e}${e}`}static RGB_G([t,e,s]){return["G",.3*t+.59*e+.11*s]}static RGB_rgb(t){return t.map(fl)}static RGB_HTML(t){return`#${t.map(wm).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,e,s,i]){return["RGB",1-Math.min(1,t+i),1-Math.min(1,s+i),1-Math.min(1,e+i)]}static CMYK_rgb([t,e,s,i]){return[fl(1-Math.min(1,t+i)),fl(1-Math.min(1,s+i)),fl(1-Math.min(1,e+i))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK([t,e,s]){const i=1-t,r=1-e,a=1-s,o=Math.min(i,r,a);return["CMYK",i,r,a,o]}}class lw{create(t,e,s=!1){if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),s||(i.setAttribute("width",`${t}px`),i.setAttribute("height",`${e}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${t} ${e}`),i}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){st("Abstract method `_createSVG` called.")}}class iu extends lw{_createSVG(t){return document.createElementNS(Is,t)}}class Db{static setupStorage(t,e,s,i,r){const a=i.getValue(e,{value:null});switch(s.name){case"textarea":if(a.value!==null&&(t.textContent=a.value),r==="print")break;t.addEventListener("input",o=>{i.setValue(e,{value:o.target.value})});break;case"input":if(s.attributes.type==="radio"||s.attributes.type==="checkbox"){if(a.value===s.attributes.xfaOn?t.setAttribute("checked",!0):a.value===s.attributes.xfaOff&&t.removeAttribute("checked"),r==="print")break;t.addEventListener("change",o=>{i.setValue(e,{value:o.target.checked?o.target.getAttribute("xfaOn"):o.target.getAttribute("xfaOff")})})}else{if(a.value!==null&&t.setAttribute("value",a.value),r==="print")break;t.addEventListener("input",o=>{i.setValue(e,{value:o.target.value})})}break;case"select":if(a.value!==null){t.setAttribute("value",a.value);for(const o of s.children)o.attributes.value===a.value?o.attributes.selected=!0:o.attributes.hasOwnProperty("selected")&&delete o.attributes.selected}t.addEventListener("input",o=>{const l=o.target.options,h=l.selectedIndex===-1?"":l[l.selectedIndex].value;i.setValue(e,{value:h})});break}}static setAttributes({html:t,element:e,storage:s=null,intent:i,linkService:r}){const{attributes:a}=e,o=t instanceof HTMLAnchorElement;a.type==="radio"&&(a.name=`${a.name}-${i}`);for(const[l,h]of Object.entries(a))if(h!=null)switch(l){case"class":h.length&&t.setAttribute(l,h.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",h);break;case"style":Object.assign(t.style,h);break;case"textContent":t.textContent=h;break;default:(!o||l!=="href"&&l!=="newWindow")&&t.setAttribute(l,h)}o&&r.addLinkAttributes(t,a.href,a.newWindow),s&&a.dataId&&this.setupStorage(t,a.dataId,e,s)}static render(t){var f,g;const e=t.annotationStorage,s=t.linkService,i=t.xfaHtml,r=t.intent||"display",a=document.createElement(i.name);i.attributes&&this.setAttributes({html:a,element:i,intent:r,linkService:s});const o=r!=="richText",l=t.div;if(l.append(a),t.viewport){const m=`matrix(${t.viewport.transform.join(",")})`;l.style.transform=m}o&&l.setAttribute("class","xfaLayer xfaFont");const h=[];if(i.children.length===0){if(i.value){const m=document.createTextNode(i.value);a.append(m),o&&Ol.shouldBuildText(i.name)&&h.push(m)}return{textDivs:h}}const c=[[i,-1,a]];for(;c.length>0;){const[m,A,y]=c.at(-1);if(A+1===m.children.length){c.pop();continue}const v=m.children[++c.at(-1)[1]];if(v===null)continue;const{name:w}=v;if(w==="#text"){const _=document.createTextNode(v.value);h.push(_),y.append(_);continue}const S=(f=v==null?void 0:v.attributes)!=null&&f.xmlns?document.createElementNS(v.attributes.xmlns,w):document.createElement(w);if(y.append(S),v.attributes&&this.setAttributes({html:S,element:v,storage:e,intent:r,linkService:s}),((g=v.children)==null?void 0:g.length)>0)c.push([v,-1,S]);else if(v.value){const _=document.createTextNode(v.value);o&&Ol.shouldBuildText(w)&&h.push(_),S.append(_)}}for(const m of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))m.setAttribute("readOnly",!0);return{textDivs:h}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}}const hw=9,oa=new WeakSet,cw=new Date().getTimezoneOffset()*60*1e3;class _m{static create(t){switch(t.data.annotationType){case wt.LINK:return new Vg(t);case wt.TEXT:return new dw(t);case wt.WIDGET:switch(t.data.fieldType){case"Tx":return new uw(t);case"Btn":return t.data.radioButton?new Nb(t):t.data.checkBox?new pw(t):new gw(t);case"Ch":return new mw(t);case"Sig":return new fw(t)}return new ha(t);case wt.POPUP:return new ag(t);case wt.FREETEXT:return new Ub(t);case wt.LINE:return new Aw(t);case wt.SQUARE:return new yw(t);case wt.CIRCLE:return new ww(t);case wt.POLYLINE:return new jb(t);case wt.CARET:return new _w(t);case wt.INK:return new Wg(t);case wt.POLYGON:return new vw(t);case wt.HIGHLIGHT:return new Vb(t);case wt.UNDERLINE:return new Sw(t);case wt.SQUIGGLY:return new Ew(t);case wt.STRIKEOUT:return new Cw(t);case wt.STAMP:return new Wb(t);case wt.FILEATTACHMENT:return new Tw(t);default:return new bt(t)}}}var Tr,Eo,ci,sf,Lb,lc,rg;const Zg=class Zg{constructor(t,{isRenderable:e=!1,ignoreBorder:s=!1,createQuadrilaterals:i=!1}={}){d(this,sf);d(this,lc);d(this,Tr,null);d(this,Eo,!1);d(this,ci,null);this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableComment=t.enableComment,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,e&&(this.container=this._createContainer(s)),i&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:t,richText:e}){return!!(t!=null&&t.str||e!=null&&e.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return Zg._hasPopupData(this.data)}get hasCommentButton(){return this.enableComment&&this._isEditable&&this.hasPopupElement}get commentButtonPosition(){const{quadPoints:t,rect:e}=this.data;let s=-1/0,i=-1/0;if((t==null?void 0:t.length)>=8){for(let r=0;ri?(i=t[r+1],s=t[r+2]):t[r+1]===i&&(s=Math.max(s,t[r+2]));return[s,i]}return e?[e[2],e[3]]:null}get commentButtonColor(){if(!this.data.color)return null;const[t,e,s]=this.data.color,r=255*(1-(this.data.opacity??1));return b(this,sf,Lb).call(this,Math.min(t+r,255),Math.min(e+r,255),Math.min(s+r,255))}_normalizePoint(t){const{page:{view:e},viewport:{rawDims:{pageWidth:s,pageHeight:i,pageX:r,pageY:a}}}=this.parent;return t[1]=e[3]-t[1]+e[1],t[0]=100*(t[0]-r)/s,t[1]=100*(t[1]-a)/i,t}updateEdited(t){var r;if(!this.container)return;t.rect&&(n(this,Tr)||p(this,Tr,{rect:this.data.rect.slice(0)}));const{rect:e,popup:s}=t;e&&b(this,lc,rg).call(this,e);let i=((r=n(this,ci))==null?void 0:r.popup)||this.popup;!i&&(s!=null&&s.text)&&(this._createPopup(s),i=n(this,ci).popup),i&&(i.updateEdited(t),s!=null&&s.deleted&&(i.remove(),p(this,ci,null),this.popup=null))}resetEdited(){var t;n(this,Tr)&&(b(this,lc,rg).call(this,n(this,Tr).rect),(t=n(this,ci))==null||t.popup.resetEdited(),p(this,Tr,null))}_createContainer(t){const{data:e,parent:{page:s,viewport:i}}=this,r=document.createElement("section");r.setAttribute("data-annotation-id",e.id),!(this instanceof ha)&&!(this instanceof Vg)&&(r.tabIndex=0);const{style:a}=r;if(a.zIndex=this.parent.zIndex,this.parent.zIndex+=2,e.alternativeText&&(r.title=e.alternativeText),e.noRotate&&r.classList.add("norotate"),!e.rect||this instanceof ag){const{rotation:y}=e;return!e.hasOwnCanvas&&y!==0&&this.setRotation(y,r),r}const{width:o,height:l}=this;if(!t&&e.borderStyle.width>0){a.borderWidth=`${e.borderStyle.width}px`;const y=e.borderStyle.horizontalCornerRadius,v=e.borderStyle.verticalCornerRadius;if(y>0||v>0){const S=`calc(${y}px * var(--total-scale-factor)) / calc(${v}px * var(--total-scale-factor))`;a.borderRadius=S}else if(this instanceof Nb){const S=`calc(${o}px * var(--total-scale-factor)) / calc(${l}px * var(--total-scale-factor))`;a.borderRadius=S}switch(e.borderStyle.style){case da.SOLID:a.borderStyle="solid";break;case da.DASHED:a.borderStyle="dashed";break;case da.BEVELED:z("Unimplemented border style: beveled");break;case da.INSET:z("Unimplemented border style: inset");break;case da.UNDERLINE:a.borderBottomStyle="solid";break}const w=e.borderColor||null;w?(p(this,Eo,!0),a.borderColor=I.makeHexColor(w[0]|0,w[1]|0,w[2]|0)):a.borderWidth=0}const h=I.normalizeRect([e.rect[0],s.view[3]-e.rect[1]+s.view[1],e.rect[2],s.view[3]-e.rect[3]+s.view[1]]),{pageWidth:c,pageHeight:f,pageX:g,pageY:m}=i.rawDims;a.left=`${100*(h[0]-g)/c}%`,a.top=`${100*(h[1]-m)/f}%`;const{rotation:A}=e;return e.hasOwnCanvas||A===0?(a.width=`${100*o/c}%`,a.height=`${100*l/f}%`):this.setRotation(A,r),r}setRotation(t,e=this.container){if(!this.data.rect)return;const{pageWidth:s,pageHeight:i}=this.parent.viewport.rawDims;let{width:r,height:a}=this;t%180!==0&&([r,a]=[a,r]),e.style.width=`${100*r/s}%`,e.style.height=`${100*a/i}%`,e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(e,s,i)=>{const r=i.detail[e],a=r[0],o=r.slice(1);i.target.style[s]=vm[`${a}_HTML`](o),this.annotationStorage.setValue(this.data.id,{[s]:vm[`${a}_rgb`](o)})};return V(this,"_commonActions",{display:e=>{const{display:s}=e.detail,i=s%2===1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:s===1||s===2})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:s}=e.detail;this.container.style.visibility=s?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:s,noView:s})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:e=>{const s=e.detail.rotation;this.setRotation(s),this.annotationStorage.setValue(this.data.id,{rotation:s})}})}_dispatchEventFromSandbox(t,e){const s=this._commonActions;for(const i of Object.keys(e.detail)){const r=t[i]||s[i];r==null||r(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const s=this._commonActions;for(const[i,r]of Object.entries(e)){const a=s[i];if(a){const o={detail:{[i]:r},target:t};a(o),delete e[i]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,s,i,r]=this.data.rect.map(y=>Math.fround(y));if(t.length===8){const[y,v,w,S]=t.subarray(2,6);if(i===y&&r===v&&e===w&&s===S)return}const{style:a}=this.container;let o;if(n(this,Eo)){const{borderColor:y,borderWidth:v}=a;a.borderWidth=0,o=["url('data:image/svg+xml;utf8,",'',``],this.container.classList.add("hasBorder")}const l=i-e,h=r-s,{svgFactory:c}=this,f=c.createElement("svg");f.classList.add("quadrilateralsContainer"),f.setAttribute("width",0),f.setAttribute("height",0),f.role="none";const g=c.createElement("defs");f.append(g);const m=c.createElement("clipPath"),A=`clippath_${this.data.id}`;m.setAttribute("id",A),m.setAttribute("clipPathUnits","objectBoundingBox"),g.append(m);for(let y=2,v=t.length;y`)}n(this,Eo)&&(o.push("')"),a.backgroundImage=o.join("")),this.container.append(f),this.container.style.clipPath=`url(#${A})`}_createPopup(t=null){const{data:e}=this;let s,i;t?(s={str:t.text},i=t.date):(s=e.contentsObj,i=e.modificationDate);const r=p(this,ci,new ag({data:{color:e.color,titleObj:e.titleObj,modificationDate:i,contentsObj:s,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]}));this.parent.div.append(r.render())}get hasPopupElement(){return!!(n(this,ci)||this.popup||this.data.popupRef)}render(){st("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,e=null){const s=[];if(this._fieldObjects){const i=this._fieldObjects[t];if(i)for(const{page:r,id:a,exportValues:o}of i){if(r===-1||a===e)continue;const l=typeof o=="string"?o:null,h=document.querySelector(`[data-element-id="${a}"]`);if(h&&!oa.has(h)){z(`_getElementsByName - element not allowed: ${a}`);continue}s.push({id:a,exportValue:l,domElement:h})}return s}for(const i of document.getElementsByName(t)){const{exportValue:r}=i,a=i.getAttribute("data-element-id");a!==e&&oa.has(i)&&s.push({id:a,exportValue:r,domElement:i})}return s}show(){var t;this.container&&(this.container.hidden=!1),(t=this.popup)==null||t.maybeShow()}hide(){var t;this.container&&(this.container.hidden=!0),(t=this.popup)==null||t.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",()=>{var s;(s=this.linkService.eventBus)==null||s.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}};Tr=new WeakMap,Eo=new WeakMap,ci=new WeakMap,sf=new WeakSet,Lb=function(t,e,s){t/=255,e/=255,s/=255;const i=Math.max(t,e,s),r=Math.min(t,e,s),a=(i+r)/2,o=((1+Math.sqrt(a))/2*100).toFixed(2);if(i===r)return`hsl(0, 0%, ${o}%)`;const l=i-r;let h;i===t?h=(e-s)/l+(e(s&&this.linkService.goToDestination(s),!1),(s||s==="")&&b(this,di,Ln).call(this),i&&(e.title=i)}_bindNamedAction(e,s,i=""){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(s),!1),i&&(e.title=i),b(this,di,Ln).call(this)}_bindJSAction(e,s){e.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(s.actions)){const a=i.get(r);a&&(e[a]=()=>{var o;return(o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:s.id,name:r}}),!1})}s.overlaidText&&(e.title=s.overlaidText),e.onclick||(e.onclick=()=>!1),b(this,di,Ln).call(this)}_bindResetFormAction(e,s){const i=e.onclick;if(i||(e.href=this.linkService.getAnchorUrl("")),b(this,di,Ln).call(this),!this._fieldObjects){z('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),i||(e.onclick=()=>!1);return}e.onclick=()=>{var f;i==null||i();const{fields:r,refs:a,include:o}=s,l=[];if(r.length!==0||a.length!==0){const g=new Set(a);for(const m of r){const A=this._fieldObjects[m]||[];for(const{id:y}of A)g.add(y)}for(const m of Object.values(this._fieldObjects))for(const A of m)g.has(A.id)===o&&l.push(A)}else for(const g of Object.values(this._fieldObjects))l.push(...g);const h=this.annotationStorage,c=[];for(const g of l){const{id:m}=g;switch(c.push(m),g.type){case"text":{const y=g.defaultValue||"";h.setValue(m,{value:y});break}case"checkbox":case"radiobutton":{const y=g.defaultValue===g.exportValues;h.setValue(m,{value:y});break}case"combobox":case"listbox":{const y=g.defaultValue||"";h.setValue(m,{value:y});break}default:continue}const A=document.querySelector(`[data-element-id="${m}"]`);if(A){if(!oa.has(A)){z(`_bindResetFormAction - element not allowed: ${m}`);continue}}else continue;A.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((f=this.linkService.eventBus)==null||f.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:c,name:"ResetForm"}})),!1}}}di=new WeakSet,Ln=function(){this.container.setAttribute("data-internal-link","")},nf=new WeakSet,Ib=function(e,s,i="",r=null){e.href=this.linkService.getAnchorUrl(""),s.description?e.title=s.description:i&&(e.title=i),e.onclick=()=>{var a;return(a=this.downloadManager)==null||a.openOrDownloadData(s.content,s.filename,r),!1},b(this,di,Ln).call(this)},rf=new WeakSet,Fb=function(e,s,i=""){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(s),!1),i&&(e.title=i),b(this,di,Ln).call(this)};class dw extends bt{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class ha extends bt{render(){return this.container}showElementAndHideCanvas(t){var e;this.data.hasOwnCanvas&&(((e=t.previousSibling)==null?void 0:e.nodeName)==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return Wt.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,e,s,i,r){s.includes("mouse")?t.addEventListener(s,a=>{var o;(o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(a),shift:a.shiftKey,modifier:this._getKeyModifier(a)}})}):t.addEventListener(s,a=>{var o;if(s==="blur"){if(!e.focused||!a.relatedTarget)return;e.focused=!1}else if(s==="focus"){if(e.focused)return;e.focused=!0}r&&((o=this.linkService.eventBus)==null||o.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:r(a)}}))})}_setEventListeners(t,e,s,i){var r,a,o;for(const[l,h]of s)(h==="Action"||(r=this.data.actions)!=null&&r[h])&&((h==="Focus"||h==="Blur")&&(e||(e={focused:!1})),this._setEventListener(t,e,l,h,i),h==="Focus"&&!((a=this.data.actions)!=null&&a.Blur)?this._setEventListener(t,e,"blur","Blur",null):h==="Blur"&&!((o=this.data.actions)!=null&&o.Focus)&&this._setEventListener(t,e,"focus","Focus",null))}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=e===null?"transparent":I.makeHexColor(e[0],e[1],e[2])}_setTextStyle(t){const e=["left","center","right"],{fontColor:s}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||hw,r=t.style;let a;const o=2,l=h=>Math.round(10*h)/10;if(this.data.multiLine){const h=Math.abs(this.data.rect[3]-this.data.rect[1]-o),c=Math.round(h/(up*i))||1,f=h/c;a=Math.min(i,l(f/up))}else{const h=Math.abs(this.data.rect[3]-this.data.rect[1]-o);a=Math.min(i,l(h/up))}r.fontSize=`calc(${a}px * var(--total-scale-factor))`,r.color=I.makeHexColor(s[0],s[1],s[2]),this.data.textAlignment!==null&&(r.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class uw extends ha{constructor(t){const e=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:e})}setPropertyOnSiblings(t,e,s,i){const r=this.annotationStorage;for(const a of this._getElementsByName(t.name,t.id))a.domElement&&(a.domElement[e]=s),r.setValue(a.id,{[i]:s})}render(){var i,r;const t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let s=null;if(this.renderForms){const a=t.getValue(e,{value:this.data.fieldValue});let o=a.value||"";const l=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;l&&o.length>l&&(o=o.slice(0,l));let h=a.formattedValue||((i=this.data.textContent)==null?void 0:i.join(` `))||null;h&&this.data.comb&&(h=h.replaceAll(/\s+/g,""));const c={userValue:o,formattedValue:h,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(s=document.createElement("textarea"),s.textContent=h??o,this.data.doNotScroll&&(s.style.overflowY="hidden")):(s=document.createElement("input"),s.type=this.data.password?"password":"text",s.setAttribute("value",h??o),this.data.doNotScroll&&(s.style.overflowX="hidden")),this.data.hasOwnCanvas&&(s.hidden=!0),oa.add(s),s.setAttribute("data-element-id",e),s.disabled=this.data.readOnly,s.name=this.data.fieldName,s.tabIndex=0;const{datetimeFormat:f,datetimeType:g,timeStep:m}=this.data,A=!!g&&this.enableScripting;f&&(s.title=f),this._setRequired(s,this.data.required),l&&(s.maxLength=l),s.addEventListener("input",v=>{t.setValue(e,{value:v.target.value}),this.setPropertyOnSiblings(s,"value",v.target.value,"value"),c.formattedValue=null}),s.addEventListener("resetform",v=>{const w=this.data.defaultFieldValue??"";s.value=c.userValue=w,c.formattedValue=null});let y=v=>{const{formattedValue:w}=c;w!=null&&(v.target.value=w),v.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){s.addEventListener("focus",w=>{var _;if(c.focused)return;const{target:S}=w;if(A&&(S.type=g,m&&(S.step=m)),c.userValue){const E=c.userValue;if(A)if(g==="time"){const C=new Date(E),T=[C.getHours(),C.getMinutes(),C.getSeconds()];S.value=T.map(x=>x.toString().padStart(2,"0")).join(":")}else S.value=new Date(E-cw).toISOString().split(g==="date"?"T":".",1)[0];else S.value=E}c.lastCommittedValue=S.value,c.commitKey=1,(_=this.data.actions)!=null&&_.Focus||(c.focused=!0)}),s.addEventListener("updatefromsandbox",w=>{this.showElementAndHideCanvas(w.target);const S={value(_){c.userValue=_.detail.value??"",A||t.setValue(e,{value:c.userValue.toString()}),_.target.value=c.userValue},formattedValue(_){const{formattedValue:E}=_.detail;c.formattedValue=E,E!=null&&_.target!==document.activeElement&&(_.target.value=E);const C={formattedValue:E};A&&(C.value=E),t.setValue(e,C)},selRange(_){_.target.setSelectionRange(..._.detail.selRange)},charLimit:_=>{var x;const{charLimit:E}=_.detail,{target:C}=_;if(E===0){C.removeAttribute("maxLength");return}C.setAttribute("maxLength",E);let T=c.userValue;!T||T.length<=E||(T=T.slice(0,E),C.value=c.userValue=T,t.setValue(e,{value:T}),(x=this.linkService.eventBus)==null||x.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:T,willCommit:!0,commitKey:1,selStart:C.selectionStart,selEnd:C.selectionEnd}}))}};this._dispatchEventFromSandbox(S,w)}),s.addEventListener("keydown",w=>{var E;c.commitKey=1;let S=-1;if(w.key==="Escape"?S=0:w.key==="Enter"&&!this.data.multiLine?S=2:w.key==="Tab"&&(c.commitKey=3),S===-1)return;const{value:_}=w.target;c.lastCommittedValue!==_&&(c.lastCommittedValue=_,c.userValue=_,(E=this.linkService.eventBus)==null||E.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:_,willCommit:!0,commitKey:S,selStart:w.target.selectionStart,selEnd:w.target.selectionEnd}}))});const v=y;y=null,s.addEventListener("blur",w=>{var E,C;if(!c.focused||!w.relatedTarget)return;(E=this.data.actions)!=null&&E.Blur||(c.focused=!1);const{target:S}=w;let{value:_}=S;if(A){if(_&&g==="time"){const T=_.split(":").map(x=>parseInt(x,10));_=new Date(2e3,0,1,T[0],T[1],T[2]||0).valueOf(),S.step=""}else _=new Date(_).valueOf();S.type="text"}c.userValue=_,c.lastCommittedValue!==_&&((C=this.linkService.eventBus)==null||C.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:_,willCommit:!0,commitKey:c.commitKey,selStart:w.target.selectionStart,selEnd:w.target.selectionEnd}})),v(w)}),(r=this.data.actions)!=null&&r.Keystroke&&s.addEventListener("beforeinput",w=>{var M;c.lastCommittedValue=null;const{data:S,target:_}=w,{value:E,selectionStart:C,selectionEnd:T}=_;let x=C,P=T;switch(w.inputType){case"deleteWordBackward":{const D=E.substring(0,C).match(/\w*[^\w]*$/);D&&(x-=D[0].length);break}case"deleteWordForward":{const D=E.substring(C).match(/^[^\w]*\w*/);D&&(P+=D[0].length);break}case"deleteContentBackward":C===T&&(x-=1);break;case"deleteContentForward":C===T&&(P+=1);break}w.preventDefault(),(M=this.linkService.eventBus)==null||M.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:E,change:S||"",willCommit:!1,selStart:x,selEnd:P}})}),this._setEventListeners(s,c,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],w=>w.target.value)}if(y&&s.addEventListener("blur",y),this.data.comb){const w=(this.data.rect[2]-this.data.rect[0])/l;s.classList.add("comb"),s.style.letterSpacing=`calc(${w}px * var(--total-scale-factor) - 1ch)`}}else s=document.createElement("div"),s.textContent=this.data.fieldValue,s.style.verticalAlign="middle",s.style.display="table-cell",this.data.hasOwnCanvas&&(s.hidden=!0);return this._setTextStyle(s),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class fw extends ha{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class pw extends ha{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,s=e.id;let i=t.getValue(s,{value:e.exportValue===e.fieldValue}).value;typeof i=="string"&&(i=i!=="Off",t.setValue(s,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const r=document.createElement("input");return oa.add(r),r.setAttribute("data-element-id",s),r.disabled=e.readOnly,this._setRequired(r,this.data.required),r.type="checkbox",r.name=e.fieldName,i&&r.setAttribute("checked",!0),r.setAttribute("exportValue",e.exportValue),r.tabIndex=0,r.addEventListener("change",a=>{const{name:o,checked:l}=a.target;for(const h of this._getElementsByName(o,s)){const c=l&&h.exportValue===e.exportValue;h.domElement&&(h.domElement.checked=c),t.setValue(h.id,{value:c})}t.setValue(s,{value:l})}),r.addEventListener("resetform",a=>{const o=e.defaultFieldValue||"Off";a.target.checked=o===e.exportValue}),this.enableScripting&&this.hasJSActions&&(r.addEventListener("updatefromsandbox",a=>{const o={value(l){l.target.checked=l.detail.value!=="Off",t.setValue(s,{value:l.target.checked})}};this._dispatchEventFromSandbox(o,a)}),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class Nb extends ha{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,s=e.id;let i=t.getValue(s,{value:e.fieldValue===e.buttonValue}).value;if(typeof i=="string"&&(i=i!==e.buttonValue,t.setValue(s,{value:i})),i)for(const a of this._getElementsByName(e.fieldName,s))t.setValue(a.id,{value:!1});const r=document.createElement("input");if(oa.add(r),r.setAttribute("data-element-id",s),r.disabled=e.readOnly,this._setRequired(r,this.data.required),r.type="radio",r.name=e.fieldName,i&&r.setAttribute("checked",!0),r.tabIndex=0,r.addEventListener("change",a=>{const{name:o,checked:l}=a.target;for(const h of this._getElementsByName(o,s))t.setValue(h.id,{value:!1});t.setValue(s,{value:l})}),r.addEventListener("resetform",a=>{const o=e.defaultFieldValue;a.target.checked=o!=null&&o===e.buttonValue}),this.enableScripting&&this.hasJSActions){const a=e.buttonValue;r.addEventListener("updatefromsandbox",o=>{const l={value:h=>{const c=a===h.detail.value;for(const f of this._getElementsByName(h.target.name)){const g=c&&f.id===s;f.domElement&&(f.domElement.checked=g),t.setValue(f.id,{value:g})}}};this._dispatchEventFromSandbox(l,o)}),this._setEventListeners(r,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],o=>o.target.checked)}return this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class gw extends Vg{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",s=>{this._dispatchEventFromSandbox({},s)})),t}}class mw extends ha{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,s=t.getValue(e,{value:this.data.fieldValue}),i=document.createElement("select");oa.add(i),i.setAttribute("data-element-id",e),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=0;let r=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",c=>{const f=this.data.defaultFieldValue;for(const g of i.options)g.selected=g.value===f});for(const c of this.data.options){const f=document.createElement("option");f.textContent=c.displayValue,f.value=c.exportValue,s.value.includes(c.exportValue)&&(f.setAttribute("selected",!0),r=!1),i.append(f)}let a=null;if(r){const c=document.createElement("option");c.value=" ",c.setAttribute("hidden",!0),c.setAttribute("selected",!0),i.prepend(c),a=()=>{c.remove(),i.removeEventListener("input",a),a=null},i.addEventListener("input",a)}const o=c=>{const f=c?"value":"textContent",{options:g,multiple:m}=i;return m?Array.prototype.filter.call(g,A=>A.selected).map(A=>A[f]):g.selectedIndex===-1?null:g[g.selectedIndex][f]};let l=o(!1);const h=c=>{const f=c.target.options;return Array.prototype.map.call(f,g=>({displayValue:g.textContent,exportValue:g.value}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",c=>{const f={value(g){a==null||a();const m=g.detail.value,A=new Set(Array.isArray(m)?m:[m]);for(const y of i.options)y.selected=A.has(y.value);t.setValue(e,{value:o(!0)}),l=o(!1)},multipleSelection(g){i.multiple=!0},remove(g){const m=i.options,A=g.detail.remove;m[A].selected=!1,i.remove(A),m.length>0&&Array.prototype.findIndex.call(m,v=>v.selected)===-1&&(m[0].selected=!0),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},clear(g){for(;i.length!==0;)i.remove(0);t.setValue(e,{value:null,items:[]}),l=o(!1)},insert(g){const{index:m,displayValue:A,exportValue:y}=g.detail.insert,v=i.children[m],w=document.createElement("option");w.textContent=A,w.value=y,v?v.before(w):i.append(w),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},items(g){const{items:m}=g.detail;for(;i.length!==0;)i.remove(0);for(const A of m){const{displayValue:y,exportValue:v}=A,w=document.createElement("option");w.textContent=y,w.value=v,i.append(w)}i.options.length>0&&(i.options[0].selected=!0),t.setValue(e,{value:o(!0),items:h(g)}),l=o(!1)},indices(g){const m=new Set(g.detail.indices);for(const A of g.target.options)A.selected=m.has(A.index);t.setValue(e,{value:o(!0)}),l=o(!1)},editable(g){g.target.disabled=!g.detail.editable}};this._dispatchEventFromSandbox(f,c)}),i.addEventListener("input",c=>{var m;const f=o(!0),g=o(!1);t.setValue(e,{value:f}),c.preventDefault(),(m=this.linkService.eventBus)==null||m.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:l,change:g,changeEx:f,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],c=>c.target.value)):i.addEventListener("input",function(c){t.setValue(e,{value:o(!0)})}),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class ag extends bt{constructor(t){const{data:e,elements:s}=t;super(t,{isRenderable:bt._hasPopupData(e)}),this.elements=s,this.popup=null}render(){const{container:t}=this;t.classList.add("popupAnnotation"),t.role="comment";const e=this.popup=new bw({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open,eventBus:this.linkService.eventBus}),s=[];for(const i of this.elements)i.popup=e,i.container.ariaHasPopup="dialog",s.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",s.map(i=>`${Hg}${i}`).join(",")),this.container}}var xr,af,of,kr,Co,ft,ui,hn,fi,hc,cc,To,Es,ye,pi,gi,dc,cn,xo,uc,mi,ko,Pr,dn,Po,Dd,lf,Ob,hf,Bb,Mo,Ld,fc,og,cf,Hb,df,$b,uf,zb,ff,Gb,Ro,Id,Do,Fd,pc,lg;class bw{constructor({container:t,color:e,elements:s,titleObj:i,modificationDate:r,contentsObj:a,richText:o,parent:l,rect:h,parentRect:c,open:f,eventBus:g=null}){d(this,Po);d(this,lf);d(this,hf);d(this,Mo);d(this,fc);d(this,cf);d(this,df);d(this,uf);d(this,ff);d(this,Ro);d(this,Do);d(this,pc);d(this,xr,b(this,uf,zb).bind(this));d(this,af,b(this,pc,lg).bind(this));d(this,of,b(this,Do,Fd).bind(this));d(this,kr,b(this,Ro,Id).bind(this));d(this,Co,null);d(this,ft,null);d(this,ui,null);d(this,hn,null);d(this,fi,null);d(this,hc,null);d(this,cc,null);d(this,To,null);d(this,Es,!1);d(this,ye,null);d(this,pi,null);d(this,gi,null);d(this,dc,null);d(this,cn,null);d(this,xo,null);d(this,uc,null);d(this,mi,null);d(this,ko,null);d(this,Pr,null);d(this,dn,!1);p(this,ft,t),p(this,ko,i),p(this,ui,a),p(this,mi,o),p(this,cc,l),p(this,Co,e),p(this,uc,h),p(this,To,c),p(this,fi,s),p(this,hc,g),p(this,hn,Qd.toDateObject(r)),this.trigger=s.flatMap(m=>m.getElementsToTriggerPopup()),b(this,Po,Dd).call(this),n(this,ft).hidden=!0,f&&b(this,Ro,Id).call(this)}render(){var i;if(n(this,ye))return;const t=p(this,ye,document.createElement("div"));if(t.className="popup",n(this,Co)){const r=t.style.outlineColor=I.makeHexColor(...n(this,Co));t.style.backgroundColor=`color-mix(in srgb, ${r} 30%, white)`}const e=document.createElement("span");if(e.className="header",(i=n(this,ko))!=null&&i.str){const r=document.createElement("span");r.className="title",e.append(r),{dir:r.dir,str:r.textContent}=n(this,ko)}if(t.append(e),n(this,hn)){const r=document.createElement("time");r.className="popupDate",r.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),r.setAttribute("data-l10n-args",JSON.stringify({dateObj:n(this,hn).valueOf()})),r.dateTime=n(this,hn).toISOString(),e.append(r)}const s=n(this,Mo,Ld);if(s)Db.render({xfaHtml:s,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{const r=this._formatContents(n(this,ui));t.append(r)}n(this,ft).append(t)}_formatContents({str:t,dir:e}){const s=document.createElement("p");s.classList.add("popupContent"),s.dir=e;const i=t.split(/(?:\r\n?|\n)/);for(let r=0,a=i.length;re.hasCommentButton);t&&(p(this,cn,t._normalizePoint(t.commentButtonPosition)),p(this,xo,t.commentButtonColor))},hf=new WeakSet,Bb=function(){if(n(this,dc)||(n(this,cn)||b(this,lf,Ob).call(this),!n(this,cn)))return;const t=p(this,dc,document.createElement("button"));t.className="annotationCommentButton";const e=n(this,fi)[0].container;t.style.zIndex=e.style.zIndex+1,t.tabIndex=0;const{signal:s}=n(this,pi);t.addEventListener("hover",n(this,kr),{signal:s}),t.addEventListener("keydown",n(this,xr),{signal:s}),t.addEventListener("click",()=>{var o;const[{data:{id:r},annotationEditorType:a}]=n(this,fi);(o=n(this,hc))==null||o.dispatch("switchannotationeditormode",{source:this,editId:r,mode:a,editComment:!0})},{signal:s});const{style:i}=t;i.left=`calc(${n(this,cn)[0]}%)`,i.top=`calc(${n(this,cn)[1]}% - var(--comment-button-dim))`,n(this,xo)&&(i.backgroundColor=n(this,xo)),e.after(t)},Mo=new WeakSet,Ld=function(){const t=n(this,mi),e=n(this,ui);return t!=null&&t.str&&(!(e!=null&&e.str)||e.str===t.str)&&n(this,mi).html||null},fc=new WeakSet,og=function(){var t,e,s;return((s=(e=(t=n(this,Mo,Ld))==null?void 0:t.attributes)==null?void 0:e.style)==null?void 0:s.fontSize)||0},cf=new WeakSet,Hb=function(){var t,e,s;return((s=(e=(t=n(this,Mo,Ld))==null?void 0:t.attributes)==null?void 0:e.style)==null?void 0:s.color)||null},df=new WeakSet,$b=function(t){const e=[],s={str:t,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:e}]}},i={style:{color:n(this,cf,Hb),fontSize:n(this,fc,og)?`calc(${n(this,fc,og)}px * var(--total-scale-factor))`:""}};for(const r of t.split(` `))e.push({name:"span",value:r,attributes:i});return s},uf=new WeakSet,zb=function(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||(t.key==="Enter"||t.key==="Escape"&&n(this,Es))&&b(this,Ro,Id).call(this)},ff=new WeakSet,Gb=function(){if(n(this,gi)!==null)return;const{page:{view:t},viewport:{rawDims:{pageWidth:e,pageHeight:s,pageX:i,pageY:r}}}=n(this,cc);let a=!!n(this,To),o=a?n(this,To):n(this,uc);for(const A of n(this,fi))if(!o||I.intersect(A.data.rect,o)!==null){o=A.data.rect,a=!0;break}const l=I.normalizeRect([o[0],t[3]-o[1]+t[1],o[2],t[3]-o[3]+t[1]]),h=5,c=a?o[2]-o[0]+h:0,f=l[0]+c,g=l[1];p(this,gi,[100*(f-i)/e,100*(g-r)/s]);const{style:m}=n(this,ft);m.left=`${n(this,gi)[0]}%`,m.top=`${n(this,gi)[1]}%`},Ro=new WeakSet,Id=function(){p(this,Es,!n(this,Es)),n(this,Es)?(b(this,Do,Fd).call(this),n(this,ft).addEventListener("click",n(this,kr)),n(this,ft).addEventListener("keydown",n(this,xr))):(b(this,pc,lg).call(this),n(this,ft).removeEventListener("click",n(this,kr)),n(this,ft).removeEventListener("keydown",n(this,xr)))},Do=new WeakSet,Fd=function(){n(this,ye)||this.render(),this.isVisible?n(this,Es)&&n(this,ft).classList.add("focused"):(b(this,ff,Gb).call(this),n(this,ft).hidden=!1,n(this,ft).style.zIndex=parseInt(n(this,ft).style.zIndex)+1e3)},pc=new WeakSet,lg=function(){n(this,ft).classList.remove("focused"),!(n(this,Es)||!this.isVisible)&&(n(this,ft).hidden=!0,n(this,ft).style.zIndex=parseInt(n(this,ft).style.zIndex)-1e3)};class Ub extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=$.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const e of this.textContent){const s=document.createElement("span");s.textContent=e,t.append(s)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}var gc;class Aw extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});d(this,gc,null)}render(){this.container.classList.add("lineAnnotation");const{data:e,width:s,height:i}=this,r=this.svgFactory.create(s,i,!0),a=p(this,gc,this.svgFactory.createElement("svg:line"));return a.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),a.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),a.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),a.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),a.setAttribute("stroke-width",e.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),r.append(a),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return n(this,gc)}addHighlightArea(){this.container.classList.add("highlightArea")}}gc=new WeakMap;var mc;class yw extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});d(this,mc,null)}render(){this.container.classList.add("squareAnnotation");const{data:e,width:s,height:i}=this,r=this.svgFactory.create(s,i,!0),a=e.borderStyle.width,o=p(this,mc,this.svgFactory.createElement("svg:rect"));return o.setAttribute("x",a/2),o.setAttribute("y",a/2),o.setAttribute("width",s-a),o.setAttribute("height",i-a),o.setAttribute("stroke-width",a||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),r.append(o),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return n(this,mc)}addHighlightArea(){this.container.classList.add("highlightArea")}}mc=new WeakMap;var bc;class ww extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});d(this,bc,null)}render(){this.container.classList.add("circleAnnotation");const{data:e,width:s,height:i}=this,r=this.svgFactory.create(s,i,!0),a=e.borderStyle.width,o=p(this,bc,this.svgFactory.createElement("svg:ellipse"));return o.setAttribute("cx",s/2),o.setAttribute("cy",i/2),o.setAttribute("rx",s/2-a/2),o.setAttribute("ry",i/2-a/2),o.setAttribute("stroke-width",a||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),r.append(o),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return n(this,bc)}addHighlightArea(){this.container.classList.add("highlightArea")}}bc=new WeakMap;var Ac;class jb extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0});d(this,Ac,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,vertices:s,borderStyle:i,popupRef:r},width:a,height:o}=this;if(!s)return this.container;const l=this.svgFactory.create(a,o,!0);let h=[];for(let f=0,g=s.length;f=0&&a.setAttribute("stroke-width",s||1),i)for(let o=0,l=n(this,Mr).length;o=1){let i=-1/0,r=-1/0;for(const a of e)for(let o=0,l=a.length;or?(r=a[o+1],i=a[o]):a[o+1]===r&&(i=Math.max(i,a[o]));if(i!==1/0)return[i,r]}return s?[s[2],s[3]]:null}}yc=new WeakMap,Mr=new WeakMap,wc=new WeakSet,hg=function(e,s){switch(e){case 90:return{transform:`rotate(90) translate(${-s[0]},${s[1]}) scale(1,-1)`,width:s[3]-s[1],height:s[2]-s[0]};case 180:return{transform:`rotate(180) translate(${-s[2]},${s[1]}) scale(1,-1)`,width:s[2]-s[0],height:s[3]-s[1]};case 270:return{transform:`rotate(270) translate(${-s[2]},${s[3]}) scale(1,-1)`,width:s[3]-s[1],height:s[2]-s[0]};default:return{transform:`translate(${-s[0]},${s[3]}) scale(1,-1)`,width:s[2]-s[0],height:s[3]-s[1]}}};class Vb extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=$.HIGHLIGHT}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),t){const s=document.createElement("mark");s.classList.add("overlaidText"),s.textContent=t,this.container.append(s)}return this.container}}class Sw extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),t){const s=document.createElement("u");s.classList.add("overlaidText"),s.textContent=t,this.container.append(s)}return this.container}}class Ew extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),t){const s=document.createElement("u");s.classList.add("overlaidText"),s.textContent=t,this.container.append(s)}return this.container}}class Cw extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),t){const s=document.createElement("s");s.classList.add("overlaidText"),s.textContent=t,this.container.append(s)}return this.container}}class Wb extends bt{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=$.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}var vc,_c,cg;class Tw extends bt{constructor(e){var i;super(e,{isRenderable:!0});d(this,_c);d(this,vc,null);const{file:s}=this.data;this.filename=s.filename,this.content=s.content,(i=this.linkService.eventBus)==null||i.dispatch("fileattachmentannotation",{source:this,...s})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:e,data:s}=this;let i;s.hasAppearance||s.fillAlpha===0?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(s.name)?"paperclip":"pushpin"}.svg`,s.fillAlpha&&s.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(s.fillAlpha*100)}%);`)),i.addEventListener("dblclick",b(this,_c,cg).bind(this)),p(this,vc,i);const{isMac:r}=Wt.platform;return e.addEventListener("keydown",a=>{a.key==="Enter"&&(r?a.metaKey:a.ctrlKey)&&b(this,_c,cg).call(this)}),!s.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),e.append(i),e}getElementsToTriggerPopup(){return n(this,vc)}addHighlightArea(){this.container.classList.add("highlightArea")}}vc=new WeakMap,_c=new WeakSet,cg=function(){var e;(e=this.downloadManager)==null||e.openOrDownloadData(this.content,this.filename)};var Sc,Rr,un,Ec,Cc,ug,Tc,fg;const tm=class tm{constructor({div:t,accessibilityManager:e,annotationCanvasMap:s,annotationEditorUIManager:i,page:r,viewport:a,structTreeLayer:o}){d(this,Cc);d(this,Tc);d(this,Sc,null);d(this,Rr,null);d(this,un,new Map);d(this,Ec,null);this.div=t,p(this,Sc,e),p(this,Rr,s),p(this,Ec,o||null),this.page=r,this.viewport=a,this.zIndex=0,this._annotationEditorUIManager=i}hasEditableAnnotations(){return n(this,un).size>0}async render(t){var a;const{annotations:e}=t,s=this.div;ra(s,this.viewport);const i=new Map,r={data:null,layer:s,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new iu,annotationStorage:t.annotationStorage||new Gg,enableComment:t.enableComment===!0,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const o of e){if(o.noHTML)continue;const l=o.annotationType===wt.POPUP;if(l){const f=i.get(o.id);if(!f)continue;r.elements=f}else if(o.rect[2]===o.rect[0]||o.rect[3]===o.rect[1])continue;r.data=o;const h=_m.create(r);if(!h.isRenderable)continue;if(!l&&o.popupRef){const f=i.get(o.popupRef);f?f.push(h):i.set(o.popupRef,[h])}const c=h.render();o.hidden&&(c.style.visibility="hidden"),await b(this,Cc,ug).call(this,c,o.id,r.elements),h._isEditable&&(n(this,un).set(h.data.id,h),(a=this._annotationEditorUIManager)==null||a.renderAnnotationElement(h))}b(this,Tc,fg).call(this)}async addLinkAnnotations(t,e){const s={data:null,layer:this.div,linkService:e,svgFactory:new iu,parent:this};for(const i of t){i.borderStyle||(i.borderStyle=tm._defaultBorderStyle),s.data=i;const r=_m.create(s);if(!r.isRenderable)continue;const a=r.render();await b(this,Cc,ug).call(this,a,i.id,null)}}update({viewport:t}){const e=this.div;this.viewport=t,ra(e,{rotation:t.rotation}),b(this,Tc,fg).call(this),e.hidden=!1}getEditableAnnotations(){return Array.from(n(this,un).values())}getEditableAnnotation(t){return n(this,un).get(t)}static get _defaultBorderStyle(){return V(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:da.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}};Sc=new WeakMap,Rr=new WeakMap,un=new WeakMap,Ec=new WeakMap,Cc=new WeakSet,ug=async function(t,e,s){var o,l;const i=t.firstChild||t,r=i.id=`${Hg}${e}`,a=await((o=n(this,Ec))==null?void 0:o.getAriaAttributes(r));if(a)for(const[h,c]of a)i.setAttribute(h,c);s?s.at(-1).container.after(t):(this.div.append(t),(l=n(this,Sc))==null||l.moveElementInDOM(this.div,t,i,!1))},Tc=new WeakSet,fg=function(){var e;if(!n(this,Rr))return;const t=this.div;for(const[s,i]of n(this,Rr)){const r=t.querySelector(`[data-annotation-id="${s}"]`);if(!r)continue;i.className="annotationContent";const{firstChild:a}=r;a?a.nodeName==="CANVAS"?a.replaceWith(i):a.classList.contains("annotationContent")?a.after(i):a.before(i):r.append(i);const o=n(this,un).get(s);o&&(o._hasNoCanvas?((e=this._annotationEditorUIManager)==null||e.setMissingCanvas(s,r.id,i),o._hasNoCanvas=!1):o.canvas=i)}n(this,Rr).clear()};let dg=tm;const Ad=/\r\n?|\n/g;var He,we,xc,Dr,ve,pf,Xb,gf,qb,mf,Yb,Lo,Nd,Io,Od,Fo,Bd,bf,Kb,kc,gg,Af,Qb;const nt=class nt extends rt{constructor(e){super({...e,name:"freeTextEditor"});d(this,pf);d(this,gf);d(this,mf);d(this,Lo);d(this,Fo);d(this,bf);d(this,Af);d(this,He,void 0);d(this,we,"");d(this,xc,`${this.id}-editor`);d(this,Dr,null);d(this,ve,void 0);k(this,"_colorPicker",null);p(this,He,e.color||nt._defaultColor||rt._defaultLineColor),p(this,ve,e.fontSize||nt._defaultFontSize),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static get _keyboardManager(){const e=nt.prototype,s=a=>a.isEmpty(),i=aa.TRANSLATE_SMALL,r=aa.TRANSLATE_BIG;return V(this,"_keyboardManager",new hd([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:s}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-r,0],checker:s}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[i,0],checker:s}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[r,0],checker:s}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:s}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-r],checker:s}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,i],checker:s}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,r],checker:s}]]))}static initialize(e,s){rt.initialize(e,s);const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,s){switch(e){case X.FREETEXT_SIZE:nt._defaultFontSize=s;break;case X.FREETEXT_COLOR:nt._defaultColor=s;break}}updateParams(e,s){switch(e){case X.FREETEXT_SIZE:b(this,pf,Xb).call(this,s);break;case X.FREETEXT_COLOR:b(this,gf,qb).call(this,s);break}}static get defaultPropertiesToUpdate(){return[[X.FREETEXT_SIZE,nt._defaultFontSize],[X.FREETEXT_COLOR,nt._defaultColor||rt._defaultLineColor]]}get propertiesToUpdate(){return[[X.FREETEXT_SIZE,n(this,ve)],[X.FREETEXT_COLOR,n(this,He)]]}get toolbarButtons(){return this._colorPicker||(this._colorPicker=new su(this)),[["colorPicker",this._colorPicker]]}get colorType(){return X.FREETEXT_COLOR}get colorValue(){return n(this,He)}_translateEmpty(e,s){this._uiManager.translateSelectedEditors(e,s,!0)}getInitialTranslation(){const e=this.parentScale;return[-nt._internalPadding*e,-(nt._internalPadding+n(this,ve))*e]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),p(this,Dr,new AbortController);const e=this._uiManager.combinedSignal(n(this,Dr));return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e}),!0}disableEditMode(){var e;return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",n(this,xc)),this._isDraggable=!0,(e=n(this,Dr))==null||e.abort(),p(this,Dr,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(e){var s;this.width||(this.enableEditMode(),e&&this.editorDiv.focus(),(s=this._initialOptions)!=null&&s.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=n(this,we),s=p(this,we,b(this,mf,Yb).call(this).trimEnd());if(e===s)return;const i=r=>{if(p(this,we,r),!r){this.remove();return}b(this,Fo,Bd).call(this),this._uiManager.rebuild(this),b(this,Lo,Nd).call(this)};this.addCommands({cmd:()=>{i(s)},undo:()=>{i(e)},mustExec:!1}),b(this,Lo,Nd).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&e.key==="Enter"&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){nt._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let e,s;(this._isCopy||this.annotationElementId)&&(e=this.x,s=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",n(this,xc)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${n(this,ve)}px * var(--total-scale-factor))`,i.color=n(this,He),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[r,a]=this.parentDimensions;if(this.annotationElementId){const{position:o}=this._initialData;let[l,h]=this.getInitialTranslation();[l,h]=this.pageTranslationToScreen(l,h);const[c,f]=this.pageDimensions,[g,m]=this.pageTranslation;let A,y;switch(this.rotation){case 0:A=e+(o[0]-g)/c,y=s+this.height-(o[1]-m)/f;break;case 90:A=e+(o[0]-g)/c,y=s-(o[1]-m)/f,[l,h]=[h,-l];break;case 180:A=e-this.width+(o[0]-g)/c,y=s-(o[1]-m)/f,[l,h]=[-l,-h];break;case 270:A=e+(o[0]-g-this.height*f)/c,y=s+(o[1]-m-this.width*c)/f,[l,h]=[-h,l];break}this.setAt(A*r,y*a,l,h)}else this._moveAfterPaste(e,s);b(this,Fo,Bd).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(e){var A,y,v;const s=e.clipboardData||window.clipboardData,{types:i}=s;if(i.length===1&&i[0]==="text/plain")return;e.preventDefault();const r=b(A=nt,kc,gg).call(A,s.getData("text")||"").replaceAll(Ad,` diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 68de3f2..f729b6b 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -23,7 +23,7 @@ flex-direction: column; } - + diff --git a/frontend/src/components/AISidebar.vue b/frontend/src/components/AISidebar.vue index 7ebdb40..09ffb42 100644 --- a/frontend/src/components/AISidebar.vue +++ b/frontend/src/components/AISidebar.vue @@ -307,7 +307,9 @@ const generateMarkdownFromFile = async () => { 7. **重要:如果原文档中包含表格,请完整保留表格结构: - 保持表格的Markdown格式 - 确保所有表格行都被包含 - - 不要省略任何表格内容** + - 不要省略任何表格内容 + - 对于合并单元格的表格,请使用HTML格式并正确使用rowspan和colspan属性 + - 如果表格结构复杂,优先使用HTML table标签而不是Markdown表格语法** 8. **重要:确保内容完整性: - 不要截断任何内容 - 保持原文的完整性 @@ -1251,9 +1253,17 @@ const hasTableContent = (content) => { return false; } + // 首先检查是否包含HTML表格标签 + const hasHtmlTable = content.includes(' { console.log("开始创建节点:", node.topic, "父节点ID:", parentId); // 创建当前节点 - const nodeResponse = await mindmapAPI.addNodes(mindmapId, { + const nodeData = { title: node.topic || node.title || "无标题", des: node.data?.des || "", parentId: parentId - }); + }; + + // 如果有HTML内容,添加到节点数据中 + if (node.dangerouslySetInnerHTML) { + nodeData.dangerouslySetInnerHTML = node.dangerouslySetInnerHTML; + } + + const nodeResponse = await mindmapAPI.addNodes(mindmapId, nodeData); console.log("创建节点响应:", nodeResponse); diff --git a/frontend/src/lib/mind-elixir/src/index.less b/frontend/src/lib/mind-elixir/src/index.less index ff7916a..22efa67 100644 --- a/frontend/src/lib/mind-elixir/src/index.less +++ b/frontend/src/lib/mind-elixir/src/index.less @@ -1,388 +1,388 @@ -.map-container { - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, - WenQuanYi Micro Hei, sans-serif; - user-select: none; - height: 100%; - width: 100%; - overflow: hidden; // prevent browser scroll container while dragging - font-size: 15px; - outline: none; // prevent browser default focus outline - touch-action: none; // use pointer events instead of touch events - * { - box-sizing: border-box; // must have, to make getComputedStyle work right - } - &::-webkit-scrollbar { - width: 0px; - height: 0px; - } - .selected { - outline: 2px solid var(--selected); - outline-offset: 1px; - } - .hyper-link { - text-decoration: none; - margin-left: 0.3em; - } - me-main > me-wrapper > me-parent > me-epd { - top: 50%; - transform: translateY(-50%); - } - me-epd { - top: 100%; - transform: translateY(-50%); - } - .lhs { - direction: rtl; - & > me-wrapper > me-parent > me-epd { - left: -10px; - } - me-epd { - left: 5px; - } - me-tpc { - direction: ltr; - } - } - .rhs { - & > me-wrapper > me-parent > me-epd { - right: -10px; - } - me-epd { - right: 5px; - } - } - background-color: var(--bgcolor); - .map-canvas { - position: relative; - user-select: none; - width: fit-content; // 100% width if not set - transform: scale(1); - me-nodes { - position: relative; - display: flex; - justify-content: center; - align-items: center; - height: max-content; - width: max-content; - padding: var(--map-padding); - } - } - me-main { - // primary node / main node - & > me-wrapper { - position: relative; // make subline svg's offsetParent be the main node - margin: var(--main-gap-y) var(--main-gap-x); - & > me-parent { - margin: 10px; - padding: 0; - & > me-tpc { - border-radius: var(--main-radius); - background-color: var(--main-bgcolor); - border: 2px solid var(--main-color); - color: var(--main-color); - padding: 8px 25px; - } - } - } - } - me-wrapper { - display: block; - pointer-events: none; - width: fit-content; - // position: relative; - } - me-children, - me-parent { - display: inline-block; - vertical-align: middle; - } - me-root { - position: relative; - margin: 45px 0; - z-index: 10; - me-tpc { - font-size: 25px; - color: var(--root-color); - padding: 10px 30px; - border-radius: var(--root-radius); - border: var(--root-border-color) 2px solid; - background-color: var(--root-bgcolor); - } - } - me-parent { - position: relative; // for locating expand button - cursor: pointer; - padding: 6px var(--node-gap-x); - margin-top: var(--node-gap-y); - z-index: 10; - me-tpc { - position: relative; - border-radius: 3px; - color: var(--color); - padding: var(--topic-padding); - - // drag preview - .insert-preview { - position: absolute; - width: 100%; - left: 0px; - z-index: 9; - } - .show { - background: #7ad5ff; - pointer-events: none; - opacity: 0.7; - border-radius: 3px; - } - .before { - height: 14px; - top: -14px; - } - .in { - height: 100%; - top: 0px; - } - .after { - height: 14px; - bottom: -14px; - } - } - me-epd { - position: absolute; - height: 18px; - width: 18px; - opacity: 0.8; - background-image: url('./icons/add-circle.svg'); - background-repeat: no-repeat; - background-size: contain; - background-position: center; - - pointer-events: all; - z-index: 9; - &.minus { - background-image: url('./icons/minus-circle.svg') !important; - transition: opacity 0.3s; - opacity: 0; - @media (hover: hover) { - &:hover { - opacity: 0.8; - } - } - @media (hover: none) { - & { - opacity: 0.8; - } - } - } - } - } - - // iconfont - .icon { - width: 1em; - height: 1em; - vertical-align: -0.15em; - fill: currentColor; - overflow: hidden; - } - .lines, - .summary, - .subLines, - .topiclinks, - .linkcontroller { - position: absolute; - height: 102%; - width: 100%; - top: 0; - left: 0; - } - .topiclinks, - .linkcontroller, - .summary { - pointer-events: none; - z-index: 20; - } - - .summary > g, - .topiclinks > g { - cursor: pointer; - pointer-events: stroke; - z-index: 20; - } - - .lines, - .subLines { - pointer-events: none; - } - - #input-box { - position: absolute; - top: 0; - left: 0; - width: max-content; // let words expand the div and keep max length at the same time - max-width: 35em; - direction: ltr; - user-select: auto; - pointer-events: auto; - color: var(--color); - background-color: var(--bgcolor); - z-index: 100; - } - - me-tpc { - display: block; - max-width: 35em; - white-space: pre-wrap; - pointer-events: all; - & > * { - // tags,icons,images should not response to click event - pointer-events: none; - } - & > a, - & > iframe { - pointer-events: auto; - } - & > .text { - display: inline-block; - text-align: center; // 确保文本居中对齐,避免与连线错位 - width: 100%; // 确保文本容器占满节点宽度 - // Allow links inside markdown text to be clickable - a { - pointer-events: auto; - } - } - & > img { - display: block; - margin-bottom: 8px; - object-fit: cover; - max-width: 200px !important; - max-height: 150px !important; - width: auto !important; - height: auto !important; - } - - // 更具体的选择器,确保覆盖所有图片 - img { - max-width: 200px !important; - max-height: 150px !important; - width: auto !important; - height: auto !important; - } - } - .circle { - position: absolute; - height: 10px; - width: 10px; - margin-top: -5px; - margin-left: -5px; - border-radius: 100%; - background: #757575; - border: 2px solid #ffffff; - z-index: 50; - - cursor: pointer; - } - - .tags { - direction: ltr; - span { - display: inline-block; - border-radius: 3px; - padding: 2px 4px; - background: #d6f0f8; - color: #276f86; - margin: 0px; - font-size: 12px; - line-height: 1.3em; - margin-right: 4px; - margin-top: 2px; - } - } - .icons { - display: inline-block; - direction: ltr; - margin-left: 5px; - span { - display: inline-block; - line-height: 1.3em; - } - } - - .mind-elixir-ghost { - position: fixed; - top: -100%; - left: -100%; - box-sizing: content-box; - opacity: 0.5; - background-color: var(--main-bgcolor); - border: 2px solid var(--main-color); - color: var(--main-color); - max-width: 200px; - width: fit-content; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - padding: 8px 16px; - border-radius: 6px; - } - - .selection-area { - background: #4f90f22d; - border: 1px solid #4f90f2; - } - - /* Markdown表格样式 */ - .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 !important; /* 覆盖MindElixir的pre-wrap */ - } - - .markdown-table th, - .markdown-table td { - border: 1px solid #e0e0e0; - padding: 8px 12px; - text-align: left; - vertical-align: top; - position: relative; - white-space: normal !important; /* 覆盖MindElixir的pre-wrap */ - } - - .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; - } -} +.map-container { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, + WenQuanYi Micro Hei, sans-serif; + user-select: none; + height: 100%; + width: 100%; + overflow: hidden; // prevent browser scroll container while dragging + font-size: 15px; + outline: none; // prevent browser default focus outline + touch-action: none; // use pointer events instead of touch events + * { + box-sizing: border-box; // must have, to make getComputedStyle work right + } + &::-webkit-scrollbar { + width: 0px; + height: 0px; + } + .selected { + outline: 2px solid var(--selected); + outline-offset: 1px; + } + .hyper-link { + text-decoration: none; + margin-left: 0.3em; + } + me-main > me-wrapper > me-parent > me-epd { + top: 50%; + transform: translateY(-50%); + } + me-epd { + top: 100%; + transform: translateY(-50%); + } + .lhs { + direction: rtl; + & > me-wrapper > me-parent > me-epd { + left: -10px; + } + me-epd { + left: 5px; + } + me-tpc { + direction: ltr; + } + } + .rhs { + & > me-wrapper > me-parent > me-epd { + right: -10px; + } + me-epd { + right: 5px; + } + } + background-color: var(--bgcolor); + .map-canvas { + position: relative; + user-select: none; + width: fit-content; // 100% width if not set + transform: scale(1); + me-nodes { + position: relative; + display: flex; + justify-content: center; + align-items: center; + height: max-content; + width: max-content; + padding: var(--map-padding); + } + } + me-main { + // primary node / main node + & > me-wrapper { + position: relative; // make subline svg's offsetParent be the main node + margin: var(--main-gap-y) var(--main-gap-x); + & > me-parent { + margin: 10px; + padding: 0; + & > me-tpc { + border-radius: var(--main-radius); + background-color: var(--main-bgcolor); + border: 2px solid var(--main-color); + color: var(--main-color); + padding: 8px 25px; + } + } + } + } + me-wrapper { + display: block; + pointer-events: none; + width: fit-content; + // position: relative; + } + me-children, + me-parent { + display: inline-block; + vertical-align: middle; + } + me-root { + position: relative; + margin: 45px 0; + z-index: 10; + me-tpc { + font-size: 25px; + color: var(--root-color); + padding: 10px 30px; + border-radius: var(--root-radius); + border: var(--root-border-color) 2px solid; + background-color: var(--root-bgcolor); + } + } + me-parent { + position: relative; // for locating expand button + cursor: pointer; + padding: 6px var(--node-gap-x); + margin-top: var(--node-gap-y); + z-index: 10; + me-tpc { + position: relative; + border-radius: 3px; + color: var(--color); + padding: var(--topic-padding); + + // drag preview + .insert-preview { + position: absolute; + width: 100%; + left: 0px; + z-index: 9; + } + .show { + background: #7ad5ff; + pointer-events: none; + opacity: 0.7; + border-radius: 3px; + } + .before { + height: 14px; + top: -14px; + } + .in { + height: 100%; + top: 0px; + } + .after { + height: 14px; + bottom: -14px; + } + } + me-epd { + position: absolute; + height: 18px; + width: 18px; + opacity: 0.8; + background-image: url('./icons/add-circle.svg'); + background-repeat: no-repeat; + background-size: contain; + background-position: center; + + pointer-events: all; + z-index: 9; + &.minus { + background-image: url('./icons/minus-circle.svg') !important; + transition: opacity 0.3s; + opacity: 0; + @media (hover: hover) { + &:hover { + opacity: 0.8; + } + } + @media (hover: none) { + & { + opacity: 0.8; + } + } + } + } + } + + // iconfont + .icon { + width: 1em; + height: 1em; + vertical-align: -0.15em; + fill: currentColor; + overflow: hidden; + } + .lines, + .summary, + .subLines, + .topiclinks, + .linkcontroller { + position: absolute; + height: 102%; + width: 100%; + top: 0; + left: 0; + } + .topiclinks, + .linkcontroller, + .summary { + pointer-events: none; + z-index: 20; + } + + .summary > g, + .topiclinks > g { + cursor: pointer; + pointer-events: stroke; + z-index: 20; + } + + .lines, + .subLines { + pointer-events: none; + } + + #input-box { + position: absolute; + top: 0; + left: 0; + width: max-content; // let words expand the div and keep max length at the same time + max-width: 35em; + direction: ltr; + user-select: auto; + pointer-events: auto; + color: var(--color); + background-color: var(--bgcolor); + z-index: 100; + } + + me-tpc { + display: block; + max-width: 35em; + white-space: pre-wrap; + pointer-events: all; + & > * { + // tags,icons,images should not response to click event + pointer-events: none; + } + & > a, + & > iframe { + pointer-events: auto; + } + & > .text { + display: inline-block; + text-align: center; // 确保文本居中对齐,避免与连线错位 + width: 100%; // 确保文本容器占满节点宽度 + // Allow links inside markdown text to be clickable + a { + pointer-events: auto; + } + } + & > img { + display: block; + margin-bottom: 8px; + object-fit: cover; + max-width: 200px !important; + max-height: 150px !important; + width: auto !important; + height: auto !important; + } + + // 更具体的选择器,确保覆盖所有图片 + img { + max-width: 200px !important; + max-height: 150px !important; + width: auto !important; + height: auto !important; + } + } + .circle { + position: absolute; + height: 10px; + width: 10px; + margin-top: -5px; + margin-left: -5px; + border-radius: 100%; + background: #757575; + border: 2px solid #ffffff; + z-index: 50; + + cursor: pointer; + } + + .tags { + direction: ltr; + span { + display: inline-block; + border-radius: 3px; + padding: 2px 4px; + background: #d6f0f8; + color: #276f86; + margin: 0px; + font-size: 12px; + line-height: 1.3em; + margin-right: 4px; + margin-top: 2px; + } + } + .icons { + display: inline-block; + direction: ltr; + margin-left: 5px; + span { + display: inline-block; + line-height: 1.3em; + } + } + + .mind-elixir-ghost { + position: fixed; + top: -100%; + left: -100%; + box-sizing: content-box; + opacity: 0.5; + background-color: var(--main-bgcolor); + border: 2px solid var(--main-color); + color: var(--main-color); + max-width: 200px; + width: fit-content; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding: 8px 16px; + border-radius: 6px; + } + + .selection-area { + background: #4f90f22d; + border: 1px solid #4f90f2; + } + + /* Markdown表格样式 */ + .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 !important; /* 覆盖MindElixir的pre-wrap */ + } + + .markdown-table th, + .markdown-table td { + border: 1px solid #e0e0e0; + padding: 8px 12px; + text-align: left; + vertical-align: top; + position: relative; + white-space: normal !important; /* 覆盖MindElixir的pre-wrap */ + } + + .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; + } +} diff --git a/frontend/src/lib/mind-elixir/src/plugin/exportImage.ts b/frontend/src/lib/mind-elixir/src/plugin/exportImage.ts index 0654659..3e39872 100644 --- a/frontend/src/lib/mind-elixir/src/plugin/exportImage.ts +++ b/frontend/src/lib/mind-elixir/src/plugin/exportImage.ts @@ -29,15 +29,17 @@ function generateSvgText(tpc: HTMLElement, tpcStyle: CSSStyleDeclaration, x: num } const lines = content!.split('\n') - // 计算行高,避免重复计算 + // 计算行高和字体大小 const lineHeight = parseFloat(tpcStyle.lineHeight) || parseFloat(tpcStyle.fontSize) * 1.2 const fontSize = parseFloat(tpcStyle.fontSize) + const paddingTop = parseInt(tpcStyle.paddingTop) || 8 + const paddingLeft = parseInt(tpcStyle.paddingLeft) || 8 lines.forEach((line, index) => { const text = document.createElementNS(ns, 'text') setAttributes(text, { - x: x + parseInt(tpcStyle.paddingLeft) + '', - y: y + parseInt(tpcStyle.paddingTop) + fontSize + (lineHeight * index) + '', + x: x + paddingLeft + '', + y: y + paddingTop + fontSize + (lineHeight * index) + '', 'text-anchor': 'start', 'font-family': tpcStyle.fontFamily, 'font-size': `${tpcStyle.fontSize}`, @@ -51,8 +53,96 @@ function generateSvgText(tpc: HTMLElement, tpcStyle: CSSStyleDeclaration, x: num } function generateSvgTextUsingForeignObject(tpc: HTMLElement, tpcStyle: CSSStyleDeclaration, x: number, y: number) { - // 直接使用原生SVG文本渲染,避免foreignObject的复杂性 - return generateSvgText(tpc, tpcStyle, x, y) + const g = document.createElementNS(ns, 'g') + + // 检查是否包含HTML内容(表格、复杂结构等) + const tpcWithText = tpc as Topic + const hasHTMLContent = !!(tpcWithText.text && tpcWithText.text.innerHTML && tpcWithText.text.innerHTML !== tpcWithText.text.textContent) + const hasTableContent = !!(tpcWithText.text && tpcWithText.text.innerHTML && tpcWithText.text.innerHTML.includes(' { + const htmlCell = cell as HTMLElement + htmlCell.style.cssText = ` + border: 1px solid #ccc; + padding: 4px 8px; + text-align: center; + vertical-align: top; + font-size: ${parseFloat(tpcStyle.fontSize) * 0.9}px; + ` + }) + } + + // 为其他元素添加样式 + const lists = div.querySelectorAll('ul, ol') + lists.forEach(list => { + const htmlList = list as HTMLElement + htmlList.style.cssText = ` + margin: 4px 0; + padding-left: 20px; + text-align: left; + ` + }) + + const listItems = div.querySelectorAll('li') + listItems.forEach(item => { + const htmlItem = item as HTMLElement + htmlItem.style.cssText = ` + margin: 2px 0; + line-height: 1.3; + ` + }) + + foreignObject.appendChild(div) + g.appendChild(foreignObject) + console.log('✅ 使用foreignObject渲染HTML内容') + } else { + // 对于纯文本内容,使用原生SVG文本渲染 + return generateSvgText(tpc, tpcStyle, x, y) + } + + return g } function createElBox(mei: MindElixirInstance, tpc: Topic) { @@ -260,13 +350,20 @@ const generateSvg = async (mei: MindElixirInstance, noForeignObject = false) => mapDiv.querySelectorAll('.hyper-link').forEach(hl => { g.appendChild(convertAToSvg(mei, hl as HTMLAnchorElement)) }) - // 处理图片元素 + // 处理图片元素 - 只处理不在节点内的独立图片 const imgPromises = Array.from(mapDiv.querySelectorAll('img')).map(async (img) => { + // 检查图片是否在节点内,如果在节点内则跳过(因为节点已经包含了图片和文字) + const isInNode = img.closest('me-tpc') + if (isInNode) { + return null // 跳过节点内的图片,因为节点已经包含了完整内容 + } return await convertImgToSvg(mei, img) }) const imgElements = await Promise.all(imgPromises) imgElements.forEach(imgEl => { - g.appendChild(imgEl) + if (imgEl) { + g.appendChild(imgEl) + } }) setAttributes(g, { x: padding + '',