`}),f.setOffset(new d.Pixel(-18,-10)),f.on("click",({lnglat:l})=>{p.setZoom(13),p.setCenter(l)})}}}),O().then(({data:A})=>{const f=A.map(e=>({lnglat:[e.lng,e.lat],...e}));w&&w.setData(f)}).catch(A=>{}),o()}).catch(()=>{throw m.loading=!1,"地图加载失败,请重新加载"})}),S(()=>{p&&p.destroy()&&p.clearEvents("click")}),(n,s)=>{const d=R("loading");return B((I(),D("div",Z,null,512)),[[d,m.loading]])}}});const q=y(z,[["__scopeId","data-v-2ac3e490"]]),K=F(q),Q=h({name:"MapPage",__name:"index",setup(v){return(w,p)=>(I(),J(Y(K)))}});const V=y(Q,[["__scopeId","data-v-bad3ff67"]]);export{V as default};
+import{Z as x,O as _,al as k,d as h,ag as C,ak as E,am as P,a9 as S,j as R,m as B,k as D,a7 as j,f as I,_ as y,R as F,e as J,u as Y}from"./index-4d06789b.js";var b={exports:{}};(function(v,w){(function(p,M){v.exports=M()})(x,function(){function p(e){var r=[];return e.AMapUI&&r.push(M(e.AMapUI)),e.Loca&&r.push(m(e.Loca)),Promise.all(r)}function M(e){return new Promise(function(r,a){var i=[];if(e.plugins)for(var t=0;tk.request("get","/getMapInfo",{params:v}),T="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAUCAMAAADSpG8HAAAC91BMVEUAAAAAJQskNR8JNS8AAAAHwgAu2CIAZQIDGgccFA8aTDwVvRAtwyUNqQgcZhgsXSUQQQ0BJQcHMwIpJw4BAQCM63sRRDct5xwHswAMOzAv4SAIxAAr3xofuhZWzUwYRTMqnDEvtyRDvjgKMSwBjQCWkJRdxFNnm2A0cy8KLSgknR0hQTEydjNDYzFhjFpocEsXig9wimhcTi45hy0kTy1Vg0hQLx0EPABCSkAYSxwATQc0UjIFCwOU/4mt/6YP7wXI/8Gh/5eK/4CG/3tJfla5/7K3/7Ck/5tL/0Yq/h0ANxDi/9DG/77D/7vA/7jG/7Cz/6yb/5Gd/4WY/4GF/oFrl3Zy9WtTh2Fj319F2kklakMgbjgOSDAx/yoALBgc8RECIQ7N/8bL/7Sx/6m6/6Oq/6Gm/6Cb/5aX/410oYRuln+U/3tklXNZjGtY019Ou15y/1RV/0YlZUUs1j1E/jk8/ysiYisWZiMFUh8CsR0i6hkj/xUd2RMa+hAAPgwK+gDa/8nT/8bW/7/a/73O/7m9/7W//6qLrZyt/5qk/5GY/JB/rI2k/4eK8YeO/3aI/3N6/21w/2Jf/2Jt72Jj5GJNemJLhmBEgVtOxlhR1lZAgVE2aFEzdE0ye0w/5Uk+nkdGzUY1TUVG4EQ+u0ElXzsicTkhZjgsijYsrDI37i0kgiwhSCwAoxsTnBsY0hALgBAAEQgN4gcHowUS/wT/////8PeWt8HI47WlxK/K/6aUuqGm/52f7Zyx/5qt/5XCupS9/5C+pI+U9456m4uI9oSS/4CE/4B+9nqa/3hkjHBVgWxUxWGA/2BNtl5WvFtS4Vll/1hGpFhY2ldd/FRa71Ne+lI6eFJAXlFq/05Ks01U2ExS9EcxTUAldz481zssRDszyDcfWTc9+jAXyzAx2S4PYSwIUiscOSkitygVMSgLwyYCvCEfpiEDyCAAvR4i3xwe1xwQaxoj9xgQShcKaBYKQBYMWBQU7BAMbA8X8A0J1wsFdgsAAABw6AJ/AAAAPXRSTlMAZ1XZBPPiqUM7/v7d04B2aFdSSRb68uzp5+fn5N/e3drT0MzKxsW+vr27tLOysLCrqqmno6CQj4aEd3Ig/fi2ogAAAkNJREFUKM9ioACwmIMIFCEBYz1DU34ODkFLHUYIEORWUpPjkeU1EICp0T1xYGfnpOLKNWveva2sfP3qcfG8eZGXI0J6LhR6+qtCzBPef2by5IiI4yEhR3p7D3U5uqfYrir/5rUh4VZH2MqwLRpgRUbbN62etWR+c1ODNxA0NDa22JbHxdXVbfBysusKu10rBFKkWPD1evjDm82+vr4+Pg4ODokOHeeyor28vP68CT6WHlLKDlLEFrv6pMuyvCY3N9dWPz+gukT/xZk7plXUJfwo9PCYNJEXrKjqTqhLdESLXXJAAEidb2LSglntu7ozD5fVxsbbV0uDFMnULAx1WTrFPy011S4ZqMzVISlyblZOZnd7WY1nvH09K0gRQOLrwIraHN3d01LtgOr8/Bfdzc3NzclCUiS17j7Qukspgenpju670+zsXNsWRU+dPi38VHkVXBHb++c5LssW7LXNCHR0dAwMdHdLufd09pxr02d/9Pz0036zBEgRT2xCePiSxZ1OtrYZGba2Ts62+x48K4qKmhOzvsR+Y221CkiR1o2El1O5lh91dnZ2cnJydp4wsW9FTBFQVRx36aMS+83gcALMbNumz8tXrcgODgrqCQoKDs7O7ltbURETE/e7tOrJrz1hHCBFnAcLPAqvzJyRl3c6/+LZ/PwZM89HFr9Yu/7Lh+8bqydstYCkAv2k/gKPyPnyzJJcc8WYmZmVNbVNFDxWxpZc7RdVZ4KlFSZrPj5+YWAqs2ESgQqxW3EKMTFxArnEAgDLUd+tnLfEzAAAAABJRU5ErkJggg==",Z={id:"mapview",ref:"mapview"},z=h({name:"Amap",__name:"Amap",setup(v){let w,p;const M=j(),m=C({loading:!E()}),o=()=>{p&&p.on("complete",()=>{m.loading=!1})};return P(()=>{if(!M)return;const{MapConfigure:n}=M.appContext.config.globalProperties.$config,{options:s}=n;N.load({key:n.amapKey,version:"2.0",plugins:["AMap.MarkerCluster"]}).then(d=>{p=new d.Map(M.refs.mapview,s),p.plugin(["AMap.ToolBar","AMap.MapType"],()=>{p.addControl(new d.ToolBar),p.addControl(new d.MapType({defaultType:0}))}),w=new d.MarkerCluster(p,[],{gridSize:80,maxZoom:14,renderMarker(A){const{marker:f,data:e}=A;if(Array.isArray(e)&&e[0]){const{driver:r,plateNumber:a,orientation:i}=e[0],t=``;f.setContent(t),f.setLabel({direction:"bottom",offset:new d.Pixel(-4,0),content:`
${a}(${r})
`}),f.setOffset(new d.Pixel(-18,-10)),f.on("click",({lnglat:l})=>{p.setZoom(13),p.setCenter(l)})}}}),O().then(({data:A})=>{const f=A.map(e=>({lnglat:[e.lng,e.lat],...e}));w&&w.setData(f)}).catch(A=>{}),o()}).catch(()=>{throw m.loading=!1,"地图加载失败,请重新加载"})}),S(()=>{p&&p.destroy()&&p.clearEvents("click")}),(n,s)=>{const d=R("loading");return B((I(),D("div",Z,null,512)),[[d,m.loading]])}}});const q=y(z,[["__scopeId","data-v-2ac3e490"]]),K=F(q),Q=h({name:"MapPage",__name:"index",setup(v){return(w,p)=>(I(),J(Y(K)))}});const V=y(Q,[["__scopeId","data-v-bad3ff67"]]);export{V as default};
diff --git a/dist/static/js/index-73b7807d.js b/dist/static/js/index-b7766fc4.js
similarity index 93%
rename from dist/static/js/index-73b7807d.js
rename to dist/static/js/index-b7766fc4.js
index 38e9fdaad..4b0695636 100644
--- a/dist/static/js/index-73b7807d.js
+++ b/dist/static/js/index-b7766fc4.js
@@ -1 +1 @@
-import{d as A,x as B,al as F,n as N,g as a,u as K,F as p,ar as R,as as c,at as d,a6 as T,R as X,r as D,c as j,k as w,l as z,f as V,e as G,w as L,i as I,C as M,aa as J,_ as O}from"./index-7f2011bd.js";const i="stay",h="hs-on",f="hs-off",_="hs-range",g="both-left-sides",S="both-right-sides";let H="right",b=[],s=[];const P={HsKey:{type:Number||String,default:0},disabled:{type:Boolean,default:!1},value:{type:Number,default:0},max:{type:Array,default(){return[1,2,3,4,5,6,7,8,9,10]}},echo:{type:Array,default(){return[]}}},Q=A({name:"ReSelector",props:P,emits:["selectedVal"],setup(l,{emit:m}){const o=T(),y=l.value,v=B(()=>l.disabled),q=B(()=>{const e=[];let t=0,n=y;for(y!==Math.floor(y)&&n--;t{if(!l.disabled){if(s.length===1){b.length<1&&b.push({index:e});let t=b[0].index;if(e>t)for(H="right",R(!1,S,document.querySelector(".hs-select__item"+s[0].index));e>=t;)c(document.querySelector(".hs-select__item"+t),_),t++;else for(H="left",R(!0,S,document.querySelector(".hs-select__item"+s[0].index));e<=t;)c(document.querySelector(".hs-select__item"+t),_),t--}c(document.querySelector("."+f+e),h)}},u=e=>{if(l.disabled)return;const t=document.querySelector("."+f+e);if(t.className.includes(i))return!1;if(d(t,h),s.length===1){const n=b[0].index;if(e>=n)for(let r=0;r<=e;r++)d(document.querySelector(".hs-select__item"+r),_);else for(;e<=n;)d(document.querySelector(".hs-select__item"+e),_),e++}},x=(e,t)=>{if(l.disabled)return;const n=s.length;n<2?(s.push({item:t,index:e}),c(document.querySelector("."+f+e),i),c(document.querySelector(".hs-select__item"+s[0].index),g),s[1]&&(H==="right"?c(document.querySelector(".hs-select__item"+s[1].index),S):c(document.querySelector(".hs-select__item"+s[1].index),g)),n===1&&(H==="right"?m("selectedVal",{left:s[0].item,right:s[1].item,whole:s}):m("selectedVal",{left:s[1].item,right:s[0].item,whole:s}))):N(()=>{s.forEach(r=>{d(document.querySelector("."+f+r.index),h,i),d(document.querySelector(".hs-select__item"+r.index),g,S)}),s=[],b=[];for(let r=0;r<=l.max.length;r++){const $=document.querySelector(".hs-select__item"+r);$&&d($,_)}s.push({item:t,index:e}),c(document.querySelector("."+f+e),i),c(document.querySelector(".hs-select__item"+s[0].index),g)})},E=e=>{if(e.length!==0){if(e.length>2||e.length===1)throw"传入的数组长度必须是2";for(e.sort((t,n)=>t-n),c(o.refs["hsdiv"+l.HsKey+e[0]],h,i),c(o.refs["hstd"+l.HsKey+e[0]],g),c(o.refs["hsdiv"+l.HsKey+e[1]],h,i),c(o.refs["hstd"+l.HsKey+e[1]],S);e[1]>=e[0];)c(o.refs["hstd"+l.HsKey+e[0]],_),e[0]++}};return F(()=>{N(()=>{E(l.echo)})}),()=>a(p,null,[a("table",{cellspacing:"0",cellpadding:"0"},[a("tbody",null,[a("tr",null,[l.max.map((e,t)=>a("td",{"data-index":l.HsKey,ref:`hstd${l.HsKey}${t}`,class:`hs-select__item${t}`,onMousemove:()=>C(t),onMouseleave:()=>u(t),onClick:()=>x(t,e),style:{cursor:K(v)?"auto":"pointer",textAlign:"center"},key:t},[a("div",{ref:`hsdiv${l.HsKey}${t}`,class:`hs-item ${[K(q)[t]+t]}`},[a("span",null,[e])])]))])])])])}}),U=X(Q),W={class:"card-header"},Y={key:0,class:"mt-3"},Z=A({name:"Selector",__name:"index",setup(l){const m=D(""),o=D([{title:"基本使用",echo:[],disabled:!1},{title:"回显模式",echo:[2,7],disabled:!0}]),y=({left:v,right:q})=>{m.value=`${v}-${q}`};return(v,q)=>{const C=j("el-card");return V(),w("div",null,[(V(!0),w(p,null,z(o.value,(u,x)=>(V(),G(C,{class:"box-card",key:x,shadow:"never"},{header:L(()=>[I("div",W,[I("span",null,M(u.title),1)])]),default:L(()=>[a(K(U),{HsKey:x,echo:u.echo,onSelectedVal:y,disabled:u.disabled},null,8,["HsKey","echo","disabled"]),u.disabled?J("",!0):(V(),w("h4",Y,"选中范围:"+M(m.value),1))]),_:2},1024))),128))])}}});const ee=O(Z,[["__scopeId","data-v-2c78a51a"]]);export{ee as default};
+import{d as A,x as B,am as F,n as N,g as a,u as K,F as p,as as R,at as c,au as d,a7 as T,R as X,r as D,c as j,k as w,l as z,f as V,e as G,w as L,i as I,C as M,ab as J,_ as O}from"./index-4d06789b.js";const i="stay",h="hs-on",f="hs-off",_="hs-range",g="both-left-sides",S="both-right-sides";let H="right",b=[],s=[];const P={HsKey:{type:Number||String,default:0},disabled:{type:Boolean,default:!1},value:{type:Number,default:0},max:{type:Array,default(){return[1,2,3,4,5,6,7,8,9,10]}},echo:{type:Array,default(){return[]}}},Q=A({name:"ReSelector",props:P,emits:["selectedVal"],setup(l,{emit:m}){const o=T(),y=l.value,v=B(()=>l.disabled),q=B(()=>{const e=[];let t=0,n=y;for(y!==Math.floor(y)&&n--;t{if(!l.disabled){if(s.length===1){b.length<1&&b.push({index:e});let t=b[0].index;if(e>t)for(H="right",R(!1,S,document.querySelector(".hs-select__item"+s[0].index));e>=t;)c(document.querySelector(".hs-select__item"+t),_),t++;else for(H="left",R(!0,S,document.querySelector(".hs-select__item"+s[0].index));e<=t;)c(document.querySelector(".hs-select__item"+t),_),t--}c(document.querySelector("."+f+e),h)}},u=e=>{if(l.disabled)return;const t=document.querySelector("."+f+e);if(t.className.includes(i))return!1;if(d(t,h),s.length===1){const n=b[0].index;if(e>=n)for(let r=0;r<=e;r++)d(document.querySelector(".hs-select__item"+r),_);else for(;e<=n;)d(document.querySelector(".hs-select__item"+e),_),e++}},x=(e,t)=>{if(l.disabled)return;const n=s.length;n<2?(s.push({item:t,index:e}),c(document.querySelector("."+f+e),i),c(document.querySelector(".hs-select__item"+s[0].index),g),s[1]&&(H==="right"?c(document.querySelector(".hs-select__item"+s[1].index),S):c(document.querySelector(".hs-select__item"+s[1].index),g)),n===1&&(H==="right"?m("selectedVal",{left:s[0].item,right:s[1].item,whole:s}):m("selectedVal",{left:s[1].item,right:s[0].item,whole:s}))):N(()=>{s.forEach(r=>{d(document.querySelector("."+f+r.index),h,i),d(document.querySelector(".hs-select__item"+r.index),g,S)}),s=[],b=[];for(let r=0;r<=l.max.length;r++){const $=document.querySelector(".hs-select__item"+r);$&&d($,_)}s.push({item:t,index:e}),c(document.querySelector("."+f+e),i),c(document.querySelector(".hs-select__item"+s[0].index),g)})},E=e=>{if(e.length!==0){if(e.length>2||e.length===1)throw"传入的数组长度必须是2";for(e.sort((t,n)=>t-n),c(o.refs["hsdiv"+l.HsKey+e[0]],h,i),c(o.refs["hstd"+l.HsKey+e[0]],g),c(o.refs["hsdiv"+l.HsKey+e[1]],h,i),c(o.refs["hstd"+l.HsKey+e[1]],S);e[1]>=e[0];)c(o.refs["hstd"+l.HsKey+e[0]],_),e[0]++}};return F(()=>{N(()=>{E(l.echo)})}),()=>a(p,null,[a("table",{cellspacing:"0",cellpadding:"0"},[a("tbody",null,[a("tr",null,[l.max.map((e,t)=>a("td",{"data-index":l.HsKey,ref:`hstd${l.HsKey}${t}`,class:`hs-select__item${t}`,onMousemove:()=>C(t),onMouseleave:()=>u(t),onClick:()=>x(t,e),style:{cursor:K(v)?"auto":"pointer",textAlign:"center"},key:t},[a("div",{ref:`hsdiv${l.HsKey}${t}`,class:`hs-item ${[K(q)[t]+t]}`},[a("span",null,[e])])]))])])])])}}),U=X(Q),W={class:"card-header"},Y={key:0,class:"mt-3"},Z=A({name:"Selector",__name:"index",setup(l){const m=D(""),o=D([{title:"基本使用",echo:[],disabled:!1},{title:"回显模式",echo:[2,7],disabled:!0}]),y=({left:v,right:q})=>{m.value=`${v}-${q}`};return(v,q)=>{const C=j("el-card");return V(),w("div",null,[(V(!0),w(p,null,z(o.value,(u,x)=>(V(),G(C,{class:"box-card",key:x,shadow:"never"},{header:L(()=>[I("div",W,[I("span",null,M(u.title),1)])]),default:L(()=>[a(K(U),{HsKey:x,echo:u.echo,onSelectedVal:y,disabled:u.disabled},null,8,["HsKey","echo","disabled"]),u.disabled?J("",!0):(V(),w("h4",Y,"选中范围:"+M(m.value),1))]),_:2},1024))),128))])}}});const ee=O(Z,[["__scopeId","data-v-2c78a51a"]]);export{ee as default};
diff --git a/dist/static/js/index-b78333e1.js b/dist/static/js/index-b78333e1.js
new file mode 100644
index 000000000..db9fc6f69
--- /dev/null
+++ b/dist/static/js/index-b78333e1.js
@@ -0,0 +1 @@
+import{_ as o}from"./index.vue_vue_type_script_setup_true_lang-f2aa878b.js";import"./columns-6d0926f0.js";import"./index-4d06789b.js";import"./data-9ed8da17.js";import"./message-27bfab89.js";import"./edit-pen-37b5ced2.js";import"./check-3815600c.js";export{o as default};
diff --git a/dist/static/js/index-b8ca24d9.js b/dist/static/js/index-b8ca24d9.js
deleted file mode 100644
index 882fc9844..000000000
--- a/dist/static/js/index-b8ca24d9.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as o}from"./index.vue_vue_type_script_setup_true_lang-051d3926.js";import"./columns-34cd2d1c.js";import"./data-83a29565.js";import"./index-7f2011bd.js";export{o as default};
diff --git a/dist/static/js/index-bb7471e0.js b/dist/static/js/index-bb7471e0.js
new file mode 100644
index 000000000..9a201cb4b
--- /dev/null
+++ b/dist/static/js/index-bb7471e0.js
@@ -0,0 +1 @@
+import{_ as o}from"./index.vue_vue_type_script_setup_true_lang-4c26edbf.js";import"./index.vue_vue_type_script_setup_true_lang-08e53e8c.js";import"./columns-553d7e0e.js";import"./message-27bfab89.js";import"./index-4d06789b.js";import"./data-9ed8da17.js";import"./index.vue_vue_type_script_setup_true_lang-f842a86e.js";import"./columns-8ee0d7d1.js";export{o as default};
diff --git a/dist/static/js/index-40baccd4.js b/dist/static/js/index-bb8eaa9a.js
similarity index 92%
rename from dist/static/js/index-40baccd4.js
rename to dist/static/js/index-bb8eaa9a.js
index a805bf460..b4d6aee7c 100644
--- a/dist/static/js/index-40baccd4.js
+++ b/dist/static/js/index-bb8eaa9a.js
@@ -1,8 +1,8 @@
-import{d as G,af as J,x as ne,a as Z,g as s,b as Re,ae as P,F as Pe,y as M,U as se,r as V,bu as tn,n as De,ai as nn,aP as ln,v as Fe,s as on,bv as rn,B as an,bw as sn,c as he,j as cn,k as ht,w as q,f as pe,m as ge,e as xe,A as pt,u as oe,i as Se,an as Te,l as un,ao as ft,_ as dn}from"./index-7f2011bd.js";import{_ as mn}from"./Bar.vue_vue_type_script_setup_true_lang-bf6e19b3.js";import{_ as hn}from"./Pie.vue_vue_type_script_setup_true_lang-fcb8b9b4.js";import{_ as pn}from"./Line.vue_vue_type_script_setup_true_lang-c4358f28.js";import{T as ze}from"./index-03a3e5bd.js";import{d as fn}from"./index-24261e1a.js";import{_ as gn}from"./Github.vue_vue_type_script_setup_true_lang-85a9f653.js";import{u as vn}from"./index-4fcc0fcc.js";import"./app-e09cfff8.js";import"./columns-de1e7d7f.js";import"./office-building-cc7a1721.js";import"./iphone-bcaa848c.js";import"./user-3-fill-70ba8c19.js";var bn=Object.defineProperty,kn=Object.defineProperties,yn=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,vt=(l,e,t)=>e in l?bn(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t,Q=(l,e)=>{for(var t in e||(e={}))wn.call(e,t)&&vt(l,t,e[t]);if(gt)for(var t of gt(e))xn.call(e,t)&&vt(l,t,e[t]);return l},Le=(l,e)=>kn(l,yn(e));const d="md-editor",$n="md-editor-v3",Cn="https://at.alicdn.com/t/c/font_2605852_gymddm8qwtd.js",U="https://cdnjs.cloudflare.com/ajax/libs",_n=`${U}/highlight.js/11.7.0/highlight.min.js`,bt={main:`${U}/prettier/2.8.0/standalone.js`,markdown:`${U}/prettier/2.8.0/parser-markdown.js`},kt={css:`${U}/cropperjs/1.5.13/cropper.min.css`,js:`${U}/cropperjs/1.5.13/cropper.min.js`},En=`${U}/screenfull.js/5.2.0/screenfull.min.js`,Nt=["bold","underline","italic","strikeThrough","-","title","sub","sup","quote","unorderedList","orderedList","task","-","codeRow","code","link","image","table","mermaid","katex","-","revoke","next","save","=","prettier","pageFullscreen","fullscreen","preview","htmlPreview","catalog","github"],Ut=["markdownTotal","=","scrollSwitch"],yt={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Img Link",upload:"Upload Img",clip2upload:"Clip Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Word Count",scrollAuto:"Scroll Auto"}}},Sn=`${U}/mermaid/9.3.0/mermaid.min.js`,wt={js:`${U}/KaTeX/0.16.3/katex.min.js`,css:`${U}/KaTeX/0.16.3/katex.min.css`},xt={a11y:{light:`${U}/highlight.js/11.7.0/styles/a11y-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/a11y-dark.min.css`},atom:{light:`${U}/highlight.js/11.7.0/styles/atom-one-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/atom-one-dark.min.css`},github:{light:`${U}/highlight.js/11.7.0/styles/github.min.css`,dark:`${U}/highlight.js/11.7.0/styles/github-dark.min.css`},gradient:{light:`${U}/highlight.js/11.7.0/styles/gradient-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/gradient-dark.min.css`},kimbie:{light:`${U}/highlight.js/11.7.0/styles/kimbie-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/kimbie-dark.min.css`},paraiso:{light:`${U}/highlight.js/11.7.0/styles/paraiso-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/paraiso-dark.min.css`},qtcreator:{light:`${U}/highlight.js/11.7.0/styles/qtcreator-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${U}/highlight.js/11.7.0/styles/stackoverflow-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/stackoverflow-dark.min.css`}},W={markedRenderer:l=>l,markedExtensions:[],markedOptions:{},editorExtensions:{},editorConfig:{}},Tn=l=>{if(l)for(const e in l){const t=l[e];t&&(W[e]=t)}};class zn{constructor(){this.pools={}}remove(e,t,n){const o=this.pools[e]&&this.pools[e][t];o&&(this.pools[e][t]=o.filter(a=>a!==n))}clear(e){this.pools[e]={}}on(e,t){return this.pools[e]||(this.pools[e]={}),this.pools[e][t.name]||(this.pools[e][t.name]=[]),this.pools[e][t.name].push(t.callback),this.pools[e][t.name].includes(t.callback)}emit(e,t,...n){this.pools[e]||(this.pools[e]={});const o=this.pools[e][t];o&&o.forEach(a=>{try{a(...n)}catch(r){console.error(`${t} monitor event exception!`,r)}})}}var b=new zn;const ce=(l,e=0,t=e)=>new Promise((n,i)=>{l.setSelectionRange?setTimeout(()=>{l.setSelectionRange(e,t),l.focus(),n(!0)},0):(console.error("Can not reset position!"),i())}),lt=(l,e,t)=>{const{deviationStart:n=0,deviationEnd:i=0,direct:o=!1,select:a=!1}=t;let r="";if(l.selectionStart||l.selectionStart===0){const m=l.selectionStart,u=l.selectionEnd||0,{prefixVal:c=l.value.substring(0,m),subfixVal:h=l.value.substring(u,l.value.length)}=t;r=c+e+h,ce(l,a?m+n:m+e.length+i,m+e.length+i)}else r+=e;return o&&(l.value=r),r},In=(l,e={newWindow:!0,nofollow:!0})=>{l||console.error("error link!");const t=document.createElement("a");t.href=l,t.style.display="none",e.newWindow&&(t.target="_blank"),e.nofollow&&(t.rel="noopener noreferrer"),document.body.appendChild(t),t.click(),document.body.removeChild(t)},$t=(l,e)=>{const t=tt(()=>{l.removeEventListener("scroll",n),l.addEventListener("scroll",n),e.removeEventListener("scroll",n),e.addEventListener("scroll",n)},50),n=i=>{const o=l.clientHeight,a=e.clientHeight,r=l.scrollHeight,m=e.scrollHeight,u=(r-o)/(m-a);i.target===l?(e.removeEventListener("scroll",n),e.scrollTo({top:l.scrollTop/u}),t()):(l.removeEventListener("scroll",n),l.scrollTo({top:e.scrollTop*u}),t())};return[t,()=>{l.removeEventListener("scroll",n),e.removeEventListener("scroll",n)}]},An=(l,e="image.png")=>{const t=l.split(","),n=t[0].match(/:(.*?);/);if(n){const i=n[1],o=atob(t[1]);let a=o.length;const r=new Uint8Array(a);for(;a--;)r[a]=o.charCodeAt(a);return new File([r],e,{type:i})}return null},Ct=l=>{if(!l.trim())return l;const e=l.split(`
-`),t=[''];return e.forEach(()=>{t.push("")}),t.push(""),`${l}${t.join("")}`},tt=(l,e=200)=>{let t=0;return(...n)=>{t&&clearTimeout(t),t=window.setTimeout(()=>{l.apply(globalThis,n),t=0},e)}},Fn=(l,e=200)=>{let t=0,n=null;return(...i)=>{const o=a=>{t===0&&(t=a),a-t>=e?(l.apply(globalThis,n),n=null,t=0):window.requestAnimationFrame(o)};n===null&&window.requestAnimationFrame(o),n=i}},_t=(l,e="$")=>{const t=l.split(e);let n=e,i="";for(let o=1;o{var e;return navigator.userAgent.indexOf("Firefox")>-1?l.value.substring(l.selectionStart,l.selectionEnd):((e=window.getSelection())==null?void 0:e.toString())||""},Dn=(l,e)=>{const t=l==null?void 0:l.getBoundingClientRect();if(e===document.documentElement)return t.top-e.clientTop;const n=e==null?void 0:e.getBoundingClientRect();return t.top-n.top},Rn=(l,e)=>{const t=Q({},l);return e.forEach(n=>{Reflect.deleteProperty(t,n)}),t},Et=(l,e)=>{const t=n=>{const i=l.parentElement||document.body,o=i.offsetWidth,a=i.offsetHeight,{clientWidth:r}=document.documentElement,{clientHeight:m}=document.documentElement,u=n.offsetX,c=n.offsetY,h=p=>{let w=p.x+document.body.scrollLeft-document.body.clientLeft-u,C=p.y+document.body.scrollTop-document.body.clientTop-c;w=w<1?1:w{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",f)};document.addEventListener("mouseup",f)};return l.addEventListener("mousedown",t),()=>{l.removeEventListener("mousedown",t)}},te=(l,e="")=>{const t=document.getElementById(l.id);t?e!==""&&l.onload instanceof Function&&(Reflect.get(window,e)?l.onload(new Event("load")):t.addEventListener("load",l.onload)):document.head.appendChild(l)},Pn=tt((l,e,t)=>{const n=document.getElementById(l);n&&n.setAttribute(e,t)},10),Ye="onSave",at="changeCatalogVisible",qt="changeFullscreen",St="pageFullscreenChanged",Tt="fullscreenChanged",zt="previewChanged",It="htmlPreviewChanged",At="catalogVisibleChanged",Vt="textarea_focus",jn=(l,e)=>{const{editorId:t,noPrettier:n,previewOnly:i}=l,o=J({buildFinished:!1,html:""}),a=r=>{if(r.target===document.querySelector(`#${l.editorId}-textarea`))if(b.emit(t,"selectTextChange"),r.ctrlKey||r.metaKey)switch(r.code){case"KeyS":{r.shiftKey?b.emit(t,"replace","strikeThrough"):(b.emit(t,Ye,l.modelValue),r.preventDefault());break}case"KeyB":{b.emit(t,"replace","bold"),r.preventDefault();break}case"KeyU":{r.shiftKey?(b.emit(t,"replace","unorderedList"),r.preventDefault()):(b.emit(t,"replace","underline"),r.preventDefault());break}case"KeyI":{r.shiftKey?(b.emit(t,"openModals","image"),r.preventDefault()):(b.emit(t,"replace","italic"),r.preventDefault());break}case"Digit1":{b.emit(t,"replace","h1"),r.preventDefault();break}case"Digit2":{b.emit(t,"replace","h2"),r.preventDefault();break}case"Digit3":{b.emit(t,"replace","h3"),r.preventDefault();break}case"Digit4":{b.emit(t,"replace","h4"),r.preventDefault();break}case"Digit5":{b.emit(t,"replace","h5"),r.preventDefault();break}case"Digit6":{b.emit(t,"replace","h6"),r.preventDefault();break}case"ArrowUp":{b.emit(t,"replace","sup"),r.preventDefault();break}case"ArrowDown":{b.emit(t,"replace","sub"),r.preventDefault();break}case"KeyQ":{if(r.key==="a"){r.target.select();return}b.emit(t,"replace","quote"),r.preventDefault();break}case"KeyA":if(r.key==="q"){b.emit(t,"replace","quote"),r.preventDefault();break}else return;case"KeyO":{b.emit(t,"replace","orderedList"),r.preventDefault();break}case"KeyC":{if(r.shiftKey)b.emit(t,"replace","code"),r.preventDefault();else if(r.altKey)b.emit(t,"replace","codeRow"),r.preventDefault();else{r.preventDefault(),b.emit(t,"replace","ctrlC");break}break}case"KeyL":{b.emit(t,"openModals","link"),r.preventDefault();break}case"KeyZ":{if(r.key==="w")return;r.shiftKey?(b.emit(t,"ctrlShiftZ"),r.preventDefault()):(b.emit(t,"ctrlZ"),r.preventDefault());break}case"KeyW":if(r.key==="z"){r.shiftKey?(b.emit(t,"ctrlShiftZ"),r.preventDefault()):(b.emit(t,"ctrlZ"),r.preventDefault());break}else return;case"KeyF":{r.shiftKey&&(n||(b.emit(t,"replace","prettier"),r.preventDefault()));break}case"KeyT":{r.altKey&&r.shiftKey&&(b.emit(t,"replace","table"),r.preventDefault());break}case"KeyX":{b.emit(t,"replace","ctrlX"),r.preventDefault();break}case"KeyD":{r.preventDefault(),b.emit(t,"replace","ctrlD");break}}else r.code==="Tab"&&(r.preventDefault(),r.shiftKey?b.emit(t,"replace","shiftTab"):b.emit(t,"replace","tab"))};M(()=>l.modelValue,()=>{o.buildFinished=!1}),Z(()=>{i||(window.addEventListener("keydown",a),b.on(t,{name:"buildFinished",callback(r){o.buildFinished=!0,o.html=r}}),b.on(t,{name:Ye,callback(){const r=new Promise(m=>{if(o.buildFinished)m(o.html);else{const u=c=>{m(c),b.remove(t,"buildFinished",u)};b.on(t,{name:"buildFinished",callback:u})}});l.onSave?l.onSave(l.modelValue,r):e.emit("onSave",l.modelValue,r)}}))}),Re(()=>{i||window.removeEventListener("keydown",a)})},On=l=>{var e;const{editorId:t,previewOnly:n}=l,i=(e=W==null?void 0:W.editorExtensions)==null?void 0:e.highlight;se("editorId",t),se("tabWidth",l.tabWidth),se("theme",ne(()=>l.theme)),se("highlight",ne(()=>{const a=Q(Q({},xt),i==null?void 0:i.css),r=l.codeStyleReverse&&l.codeStyleReverseList.includes(l.previewTheme)?"dark":l.theme;return{js:(i==null?void 0:i.js)||_n,css:a[l.codeTheme]?a[l.codeTheme][r]:xt.atom[r]}})),se("historyLength",l.historyLength),se("previewOnly",n),se("showCodeRowNumber",l.showCodeRowNumber);const o=ne(()=>{var a;const r=Q(Q({},yt),(a=W==null?void 0:W.editorConfig)==null?void 0:a.languageUserDefined);return r[l.language]?r[l.language]:yt["zh-CN"]});se("usedLanguageText",o),se("previewTheme",ne(()=>l.previewTheme))},Hn=l=>{var e,t,n,i,o,a;const{noPrettier:r,previewOnly:m,noIconfont:u,noUploadImg:c}=l,{editorExtensions:h}=W,f=r||!!((t=(e=W.editorExtensions)==null?void 0:e.prettier)!=null&&t.prettierInstance),p=r||!!((i=(n=W.editorExtensions)==null?void 0:n.prettier)!=null&&i.parserMarkdownInstance),w=c||!!((a=(o=W.editorExtensions)==null?void 0:o.cropper)!=null&&a.instance);Z(()=>{var C,y,g,x;const E=document.createElement("script");E.src=(h==null?void 0:h.iconfont)||Cn,E.id=`${d}-icon`;const S=document.createElement("script"),z=document.createElement("script");S.src=((C=h==null?void 0:h.prettier)==null?void 0:C.standaloneJs)||bt.main,S.id=`${d}-prettier`,z.src=((y=h==null?void 0:h.prettier)==null?void 0:y.parserMarkdownJs)||bt.markdown,z.id=`${d}-prettierMD`;const R=document.createElement("link");R.rel="stylesheet",R.href=((g=h==null?void 0:h.cropper)==null?void 0:g.css)||kt.css,R.id=`${d}-cropperCss`;const F=document.createElement("script");F.src=((x=h==null?void 0:h.cropper)==null?void 0:x.js)||kt.js,F.id=`${d}-cropper`,m||(u||te(E),w||(te(R),te(F)),f||te(S),p||te(z))})},Bn=(l,e)=>{const{editorId:t,previewOnly:n}=l,i=J({pageFullscreen:l.pageFullscreen,fullscreen:!1,preview:l.preview,htmlPreview:l.preview?!1:l.htmlPreview}),o=(m,u)=>{i[m]=u===void 0?!i[m]:u,m==="preview"&&i.preview?i.htmlPreview=!1:m==="htmlPreview"&&i.htmlPreview&&(i.preview=!1)};let a="";const r=()=>{i.pageFullscreen||i.fullscreen?document.body.style.overflow="hidden":document.body.style.overflow=a};return M(()=>[i.pageFullscreen,i.fullscreen],r),Z(()=>{n||b.on(t,{name:"uploadImage",callback(m,u){const c=h=>{b.emit(t,"replace","image",{desc:"",urls:h}),u&&u()};l.onUploadImg?l.onUploadImg(m,c):e.emit("onUploadImg",m,c)}}),a=document.body.style.overflow,r()}),[i,o]},Mn=l=>{const{editorId:e}=l,t=V(!1);Z(()=>{b.on(e,{name:at,callback:i=>{i===void 0?t.value=!t.value:t.value=i}})});const n=ne(()=>!l.toolbarsExclude.includes("catalog")&&l.toolbars.includes("catalog"));return[t,n]},Nn=(l,e,t,n,i)=>{const{editorId:o}=l;M(()=>n.pageFullscreen,r=>{b.emit(o,St,r)}),M(()=>n.fullscreen,r=>{b.emit(o,Tt,r)}),M(()=>n.preview,r=>{b.emit(o,zt,r)}),M(()=>n.htmlPreview,r=>{b.emit(o,It,r)}),M(t,r=>{b.emit(o,At,r)});const a={on(r,m){switch(r){case"pageFullscreen":{b.on(o,{name:St,callback(u){m(u)}});break}case"fullscreen":{b.on(o,{name:Tt,callback(u){m(u)}});break}case"preview":{b.on(o,{name:zt,callback(u){m(u)}});break}case"htmlPreview":{b.on(o,{name:It,callback(u){m(u)}});break}case"catalog":{b.on(o,{name:At,callback(u){m(u)}});break}}},togglePageFullscreen(r){i("pageFullscreen",r)},toggleFullscreen(r){b.emit(o,qt,r)},togglePreview(r){i("preview",r)},toggleHtmlPreview(r){i("htmlPreview",r)},toggleCatalog(r){b.emit(o,at,r)},triggerSave(){b.emit(o,Ye)},insert(r){b.emit(o,"replace","universal",{generate:r})},focus(){b.emit(o,Vt)}};e.expose(a)};var Un=G({setup(){return()=>s("div",{class:`${d}-divider`},null)}});const le=({instance:l,ctx:e,props:t={}},n="default")=>{const i=(l==null?void 0:l.$slots[n])||(e==null?void 0:e.slots[n]);return(i?i(l):"")||t[n]},qn=()=>({trigger:{type:String,default:"hover"},overlay:{type:[String,Object],default:""},visible:{type:Boolean,default:!1},onChange:{type:Function,default:()=>()=>{}},relative:{type:String,default:"html"}});var Ce=G({props:qn(),setup(l,e){const t=`${d}-dropdown-hidden`,n=J({overlayClass:[t],overlayStyle:{},triggerHover:!1,overlayHover:!1}),i=V(),o=V(),a=()=>{var h;l.trigger==="hover"&&(n.triggerHover=!0);const f=i.value,p=o.value,w=f.getBoundingClientRect(),C=f.offsetTop,y=f.offsetLeft,g=w.height,x=w.width,E=((h=document.querySelector(l.relative))==null?void 0:h.scrollLeft)||0;n.overlayStyle=Le(Q({},n.overlayStyle),{top:C+g+"px",left:y-p.offsetWidth/2+x/2-E+"px"}),l.onChange(!0)},r=()=>{n.overlayHover=!0};M(()=>l.visible,h=>{h?n.overlayClass=n.overlayClass.filter(f=>f!==t):n.overlayClass.push(t)});const m=h=>{const f=i.value,p=o.value;!f.contains(h.target)&&!p.contains(h.target)&&l.onChange(!1)};let u=-1;const c=h=>{i.value===h.target?n.triggerHover=!1:n.overlayHover=!1,clearTimeout(u),u=window.setTimeout(()=>{!n.overlayHover&&!n.triggerHover&&l.onChange(!1)},10)};return Z(()=>{l.trigger==="click"?(i.value.addEventListener("click",a),document.addEventListener("click",m)):(i.value.addEventListener("mouseenter",a),i.value.addEventListener("mouseleave",c),o.value.addEventListener("mouseenter",r),o.value.addEventListener("mouseleave",c))}),Re(()=>{l.trigger==="click"?(i.value.removeEventListener("click",a),document.removeEventListener("click",m)):(i.value.removeEventListener("mouseenter",a),i.value.removeEventListener("mouseleave",c),o.value.removeEventListener("mouseenter",r),o.value.removeEventListener("mouseleave",c))}),()=>{const h=le({ctx:e}),f=le({props:l,ctx:e},"overlay"),p=tn(h instanceof Array?h[0]:h,{ref:i}),w=s("div",{class:[`${d}-dropdown`,n.overlayClass],style:n.overlayStyle,ref:o},[s("div",{class:`${d}-dropdown-overlay`},[f instanceof Array?f[0]:f])]);return[p,w]}}});const Vn=()=>({title:{type:String,default:""},visible:{type:Boolean,default:!1},width:{type:String,default:"auto"},height:{type:String,default:"auto"},onClose:{type:Function,default:()=>()=>{}},showAdjust:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},onAdjust:{type:Function,default:()=>()=>{}},class:{type:String}});var st=G({props:Vn(),setup(l,e){const t=V(l.visible),n=V([`${d}-modal`]),i=V(),o=V();let a=()=>{};const r=J({initPos:{left:"0px",top:"0px"},historyPos:{left:"0px",top:"0px"}}),m=ne(()=>l.isFullscreen?{width:"100%",height:"100%"}:{width:l.width,height:l.height});return Z(()=>{a=Et(o.value,(u,c)=>{r.initPos.left=u+"px",r.initPos.top=c+"px"})}),Re(()=>{a()}),M(()=>l.isFullscreen,u=>{u?a():a=Et(o.value,(c,h)=>{r.initPos.left=c+"px",r.initPos.top=h+"px"})}),M(()=>l.visible,u=>{u?(n.value.push("zoom-in"),t.value=u,De(()=>{const c=i.value.offsetWidth/2,h=i.value.offsetHeight/2,f=document.documentElement.clientWidth/2,p=document.documentElement.clientHeight/2;r.initPos.left=f-c+"px",r.initPos.top=p-h+"px"}),setTimeout(()=>{n.value=n.value.filter(c=>c!=="zoom-in")},140)):(n.value.push("zoom-out"),setTimeout(()=>{n.value=n.value.filter(c=>c!=="zoom-out"),t.value=u},130))}),()=>{const u=le({ctx:e}),c=le({props:l,ctx:e},"title");return s("div",{class:[l.class],style:{display:t.value?"block":"none"}},[s("div",{class:`${d}-modal-mask`,onClick:l.onClose},null),s("div",{class:n.value,style:Q(Q({},r.initPos),m.value),ref:i},[s("div",{class:`${d}-modal-header`,ref:o},[c||""]),s("div",{class:`${d}-modal-body`},[u]),s("div",{class:`${d}-modal-func`},[l.showAdjust&&s("div",{class:`${d}-modal-adjust`,onClick:h=>{h.stopPropagation(),l.isFullscreen?r.initPos=r.historyPos:(r.historyPos=r.initPos,r.initPos={left:"0",top:"0"}),l.onAdjust(!l.isFullscreen)}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":`#md-editor-icon-${l.isFullscreen?"suoxiao":"fangda"}`},null)])]),s("div",{class:`${d}-modal-close`,onClick:h=>{h.stopPropagation(),l.onClose&&l.onClose()}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-close"},null)])])])])])}}});const Kn=()=>({type:{type:String,default:"link"},visible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>()=>{}},onOk:{type:Function,default:()=>()=>{}}});var Zn=G({props:Kn(),setup(l){const e=P("usedLanguageText"),t=P("editorId"),n=ne(()=>{var o,a;switch(l.type){case"link":return(o=e.value.linkModalTips)==null?void 0:o.linkTitle;case"image":return(a=e.value.linkModalTips)==null?void 0:a.imageTitle;default:return""}}),i=J({desc:"",url:""});return M(()=>l.visible,o=>{o||setTimeout(()=>{i.desc="",i.url=""},200)}),()=>s(st,{title:n.value,visible:l.visible,onClose:l.onCancel},{default:()=>{var o,a,r,m,u;return[s("div",{class:`${d}-form-item`},[s("label",{class:`${d}-label`,for:`link-desc-${t}`},[(o=e.value.linkModalTips)==null?void 0:o.descLabel]),s("input",{placeholder:(a=e.value.linkModalTips)==null?void 0:a.descLabelPlaceHolder,class:`${d}-input`,id:`link-desc-${t}`,type:"text",value:i.desc,onChange:c=>{i.desc=c.target.value},autocomplete:"off"},null)]),s("div",{class:`${d}-form-item`},[s("label",{class:`${d}-label`,for:`link-url-${t}`},[(r=e.value.linkModalTips)==null?void 0:r.urlLabel]),s("input",{placeholder:(m=e.value.linkModalTips)==null?void 0:m.urlLabelPlaceHolder,class:`${d}-input`,id:`link-url-${t}`,type:"text",value:i.url,onChange:c=>{i.url=c.target.value},autocomplete:"off"},null)]),s("div",{class:`${d}-form-item`},[s("button",{class:[`${d}-btn`,`${d}-btn-row`],type:"button",onClick:()=>{l.onOk(i),i.desc="",i.url=""}},[(u=e.value.linkModalTips)==null?void 0:u.buttonOK])])]}})}});const Gn=()=>({visible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>()=>{}},onOk:{type:Function,default:()=>()=>{}}});var Wn=G({props:Gn(),setup(l){var e,t;const n=P("usedLanguageText"),i=P("editorId");let o=(t=(e=W==null?void 0:W.editorExtensions)==null?void 0:e.cropper)==null?void 0:t.instance;const a=V(),r=V(),m=V(),u=J({cropperInited:!1,imgSelected:!1,imgSrc:"",isFullscreen:!1});let c=null;M(()=>l.visible,()=>{l.visible&&!u.cropperInited&&(o=o||window.Cropper,a.value.onchange=()=>{if(!o){b.emit(i,"errorCatcher",{name:"Cropper",message:"Cropper is undefined"});return}const f=a.value.files||[];if(u.imgSelected=!0,(f==null?void 0:f.length)>0){const p=new FileReader;p.onload=w=>{u.imgSrc=w.target.result,De(()=>{c=new o(r.value,{viewMode:2,preview:`.${d}-clip-preview-target`})})},p.readAsDataURL(f[0])}})}),M(()=>[u.imgSelected],()=>{m.value.style=""}),M(()=>u.isFullscreen,()=>{De(()=>{c==null||c.destroy(),m.value.style="",r.value&&(c=new o(r.value,{viewMode:2,preview:`.${d}-clip-preview-target`}))})});const h=()=>{c.clear(),c.destroy(),c=null,a.value.value="",u.imgSelected=!1};return()=>{var f;return s(st,{class:`${d}-modal-clip`,title:(f=n.value.clipModalTips)==null?void 0:f.title,visible:l.visible,onClose:l.onCancel,showAdjust:!0,isFullscreen:u.isFullscreen,onAdjust:p=>{u.isFullscreen=p},width:"668px",height:"421px"},{default:()=>{var p,w;return[s("div",{class:`${d}-form-item ${d}-clip`},[s("div",{class:`${d}-clip-main`},[u.imgSelected?s("div",{class:`${d}-clip-cropper`},[s("img",{src:u.imgSrc,ref:r,style:{display:"none"},alt:""},null),s("div",{class:`${d}-clip-delete`,onClick:h},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-delete"},null)])])]):s("div",{class:`${d}-clip-upload`,onClick:()=>{a.value.click()}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-upload"},null)])])]),s("div",{class:`${d}-clip-preview`},[s("div",{class:`${d}-clip-preview-target`,ref:m},null)])]),s("div",{class:`${d}-form-item`},[s("button",{class:`${d}-btn`,type:"button",onClick:()=>{if(c){const C=c.getCroppedCanvas();b.emit(i,"uploadImage",[An(C.toDataURL("image/png"))],l.onOk),h()}}},[((p=n.value.clipModalTips)==null?void 0:p.buttonUpload)||((w=n.value.linkModalTips)==null?void 0:w.buttonOK)])]),s("input",{ref:a,accept:"image/*",type:"file",multiple:!1,style:{display:"none"}},null)]}})}}});const Xn=()=>({type:{type:String,default:"link"},linkVisible:{type:Boolean,default:!1},clipVisible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>()=>{}},onOk:{type:Function,default:()=>()=>{}}});var Qn=G({props:Xn(),setup(l){return()=>s(Pe,null,[s(Zn,{type:l.type,visible:l.linkVisible,onOk:l.onOk,onCancel:l.onCancel},null),s(Wn,{visible:l.clipVisible,onOk:l.onOk,onCancel:l.onCancel},null)])}});const Yn=l=>{var e,t,n,i;const o=P("editorId"),a=P("previewOnly");let r=(t=(e=W.editorExtensions)==null?void 0:e.screenfull)==null?void 0:t.instance;const m=(i=(n=W.editorExtensions)==null?void 0:n.screenfull)==null?void 0:i.js,u=V(!1),c=p=>{if(!r){b.emit(o,"errorCatcher",{name:"fullscreen",message:"fullscreen is undefined"});return}r.isEnabled?(u.value=!0,(p===void 0?!r.isFullscreen:p)?r.request():r.exit()):console.error("browser does not support screenfull!")},h=()=>{r&&r.isEnabled&&r.on("change",()=>{(u.value||l.setting.fullscreen)&&(u.value=!1,l.updateSetting("fullscreen"))})},f=()=>{r=window.screenfull,h()};return Z(()=>{if(h(),!a&&!r){const p=document.createElement("script");p.src=m||En,p.onload=f,p.id=`${d}-screenfull`,te(p,"screenfull")}}),Z(()=>{a||b.on(o,{name:qt,callback:c})}),{fullscreenHandler:c}},Jn=()=>({tableShape:{type:Array,default:()=>[6,4]},onSelected:{type:Function,default:()=>{}}}),el=G({name:"TableShape",props:Jn(),setup(l){const e=J({x:-1,y:-1});return()=>s("div",{class:`${d}-table-shape`,onMouseleave:()=>{e.x=-1,e.y=-1}},[new Array(l.tableShape[1]).fill("").map((t,n)=>s("div",{class:`${d}-table-shape-row`,key:`table-shape-row-${n}`},[new Array(l.tableShape[0]).fill("").map((i,o)=>s("div",{class:`${d}-table-shape-col`,key:`table-shape-col-${o}`,onMouseenter:()=>{e.x=n,e.y=o},onClick:()=>{l.onSelected(e)}},[s("div",{class:[`${d}-table-shape-col-default`,n<=e.x&&o<=e.y&&`${d}-table-shape-col-include`]},null)]))]))])}}),tl=()=>({noPrettier:{type:Boolean},toolbars:{type:Array,default:()=>[]},toolbarsExclude:{type:Array,default:()=>[]},setting:{type:Object,default:()=>({})},screenfull:{type:Object,default:null},screenfullJs:{type:String,default:""},updateSetting:{type:Function,default:()=>()=>{}},tableShape:{type:Array,default:()=>[6,4]},defToolbars:{type:Object},noUploadImg:{type:Boolean}});var nl=G({name:"MDEditorToolbar",props:tl(),setup(l){const e=P("editorId"),t=P("usedLanguageText"),{fullscreenHandler:n}=Yn(l),i=`${e}-toolbar-wrapper`,o=J({title:!1,catalog:!1,image:!1,table:!1,mermaid:!1,katex:!1}),a=(p,w)=>{b.emit(e,"replace",p,w)},r=J({type:"link",linkVisible:!1,clipVisible:!1}),m=V();Z(()=>{b.on(e,{name:"openModals",callback(p){r.type=p,r.linkVisible=!0}})});const u=ne(()=>{const p=l.toolbars.filter(g=>!l.toolbarsExclude.includes(g)),w=p.indexOf("="),C=w===-1?p:p.slice(0,w+1),y=w===-1?[]:p.slice(w,Number.MAX_SAFE_INTEGER);return[C,y]}),c=V(),h=()=>{b.emit(e,"uploadImage",Array.from(c.value.files||[])),c.value.value=""};Z(()=>{c.value.addEventListener("change",h)});const f=p=>{var w,C,y,g,x,E,S,z,R,F,v,K,O,H,T,k,$,D,L,j,Y,ae,ee,be,je,Oe,He,me,Be,Me,fe,Ne,Ue,ke,ye,qe,Ve,we,Ke,Ze,Ee,dt,mt;if(Nt.includes(p))switch(p){case"-":return s(Un,null,null);case"bold":return s("div",{class:`${d}-toolbar-item`,title:(w=t.value.toolbarTips)==null?void 0:w.bold,onClick:()=>{a("bold")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-bold"},null)])]);case"underline":return s("div",{class:`${d}-toolbar-item`,title:(C=t.value.toolbarTips)==null?void 0:C.underline,onClick:()=>{a("underline")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-underline"},null)])]);case"italic":return s("div",{class:`${d}-toolbar-item`,title:(y=t.value.toolbarTips)==null?void 0:y.italic,onClick:()=>{a("italic")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-italic"},null)])]);case"strikeThrough":return s("div",{class:`${d}-toolbar-item`,title:(g=t.value.toolbarTips)==null?void 0:g.strikeThrough,onClick:()=>{a("strikeThrough")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-strike-through"},null)])]);case"title":return s(Ce,{relative:`#${i}`,visible:o.title,onChange:B=>{o.title=B},overlay:s("ul",{class:`${d}-menu`,onClick:()=>{o.title=!1}},[s("li",{class:`${d}-menu-item`,onClick:()=>{a("h1")}},[(x=t.value.titleItem)==null?void 0:x.h1]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("h2")}},[(E=t.value.titleItem)==null?void 0:E.h2]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("h3")}},[(S=t.value.titleItem)==null?void 0:S.h3]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("h4")}},[(z=t.value.titleItem)==null?void 0:z.h4]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("h5")}},[(R=t.value.titleItem)==null?void 0:R.h5]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("h6")}},[(F=t.value.titleItem)==null?void 0:F.h6])])},{default:()=>{var B;return[s("div",{class:`${d}-toolbar-item`,title:(B=t.value.toolbarTips)==null?void 0:B.title},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-title"},null)])])]}});case"sub":return s("div",{class:`${d}-toolbar-item`,title:(v=t.value.toolbarTips)==null?void 0:v.sub,onClick:()=>{a("sub")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-sub"},null)])]);case"sup":return s("div",{class:`${d}-toolbar-item`,title:(K=t.value.toolbarTips)==null?void 0:K.sup,onClick:()=>{a("sup")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-sup"},null)])]);case"quote":return s("div",{class:`${d}-toolbar-item`,title:(O=t.value.toolbarTips)==null?void 0:O.quote,onClick:()=>{a("quote")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-quote"},null)])]);case"unorderedList":return s("div",{class:`${d}-toolbar-item`,title:(H=t.value.toolbarTips)==null?void 0:H.unorderedList,onClick:()=>{a("unorderedList")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-unordered-list"},null)])]);case"orderedList":return s("div",{class:`${d}-toolbar-item`,title:(T=t.value.toolbarTips)==null?void 0:T.orderedList,onClick:()=>{a("orderedList")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-ordered-list"},null)])]);case"task":return s("div",{class:`${d}-toolbar-item`,title:(k=t.value.toolbarTips)==null?void 0:k.task,onClick:()=>{a("task")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-task"},null)])]);case"codeRow":return s("div",{class:`${d}-toolbar-item`,title:($=t.value.toolbarTips)==null?void 0:$.codeRow,onClick:()=>{a("codeRow")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-code-row"},null)])]);case"code":return s("div",{class:`${d}-toolbar-item`,title:(D=t.value.toolbarTips)==null?void 0:D.code,onClick:()=>{a("code")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-code"},null)])]);case"link":return s("div",{class:`${d}-toolbar-item`,title:(L=t.value.toolbarTips)==null?void 0:L.link,onClick:()=>{r.type="link",r.linkVisible=!0}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-link"},null)])]);case"image":return l.noUploadImg?s("div",{class:`${d}-toolbar-item`,title:(j=t.value.toolbarTips)==null?void 0:j.image,onClick:()=>{r.type="image",r.linkVisible=!0}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-image"},null)])]):s(Ce,{relative:`#${i}`,visible:o.image,onChange:B=>{o.image=B},overlay:s("ul",{class:`${d}-menu`,onClick:()=>{o.title=!1}},[s("li",{class:`${d}-menu-item`,onClick:()=>{r.type="image",r.linkVisible=!0}},[(Y=t.value.imgTitleItem)==null?void 0:Y.link]),s("li",{class:`${d}-menu-item`,onClick:()=>{c.value.click()}},[(ae=t.value.imgTitleItem)==null?void 0:ae.upload]),s("li",{class:`${d}-menu-item`,onClick:()=>{r.clipVisible=!0}},[(ee=t.value.imgTitleItem)==null?void 0:ee.clip2upload])])},{default:()=>{var B;return[s("div",{class:`${d}-toolbar-item`,title:(B=t.value.toolbarTips)==null?void 0:B.image},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-image"},null)])])]}});case"table":return s(Ce,{relative:`#${i}`,visible:o.table,onChange:B=>{o.table=B},key:"bar-table",overlay:s(el,{tableShape:l.tableShape,onSelected:B=>{a("table",{selectedShape:B})}},null)},{default:()=>{var B;return[s("div",{class:`${d}-toolbar-item`,title:(B=t.value.toolbarTips)==null?void 0:B.table},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-table"},null)])])]}});case"revoke":return s("div",{class:`${d}-toolbar-item`,title:(be=t.value.toolbarTips)==null?void 0:be.revoke,onClick:()=>{b.emit(e,"ctrlZ")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-revoke"},null)])]);case"next":return s("div",{class:`${d}-toolbar-item`,title:(je=t.value.toolbarTips)==null?void 0:je.next,onClick:()=>{b.emit(e,"ctrlShiftZ")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-next"},null)])]);case"save":return s("div",{class:`${d}-toolbar-item`,title:(Oe=t.value.toolbarTips)==null?void 0:Oe.save,onClick:()=>{b.emit(e,Ye)}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-baocun"},null)])]);case"prettier":return l.noPrettier?"":s("div",{class:`${d}-toolbar-item`,title:(He=t.value.toolbarTips)==null?void 0:He.prettier,onClick:()=>{a("prettier")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-prettier"},null)])]);case"pageFullscreen":return!l.setting.fullscreen&&s("div",{class:`${d}-toolbar-item`,title:(me=t.value.toolbarTips)==null?void 0:me.pageFullscreen,onClick:()=>{l.updateSetting("pageFullscreen")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":`#md-editor-icon-${l.setting.pageFullscreen?"suoxiao":"fangda"}`},null)])]);case"fullscreen":return s("div",{class:`${d}-toolbar-item`,title:(Be=t.value.toolbarTips)==null?void 0:Be.fullscreen,onClick:()=>{n()}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":`#md-editor-icon-${l.setting.fullscreen?"fullscreen-exit":"fullscreen"}`},null)])]);case"preview":return s("div",{class:`${d}-toolbar-item`,title:(Me=t.value.toolbarTips)==null?void 0:Me.preview,onClick:()=>{l.updateSetting("preview")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-preview"},null)])]);case"htmlPreview":return s("div",{class:`${d}-toolbar-item`,title:(fe=t.value.toolbarTips)==null?void 0:fe.htmlPreview,onClick:()=>{l.updateSetting("htmlPreview")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-coding"},null)])]);case"catalog":return s("div",{class:`${d}-toolbar-item`,title:(Ne=t.value.toolbarTips)==null?void 0:Ne.catalog,onClick:()=>{b.emit(e,at)},key:"bar-catalog"},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-catalog"},null)])]);case"github":return s("div",{class:`${d}-toolbar-item`,title:(Ue=t.value.toolbarTips)==null?void 0:Ue.github,onClick:()=>In("https://github.com/imzbf/md-editor-v3")},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-github"},null)])]);case"mermaid":return s(Ce,{relative:`#${i}`,visible:o.mermaid,onChange:B=>{o.mermaid=B},overlay:s("ul",{class:`${d}-menu`,onClick:()=>{o.mermaid=!1}},[s("li",{class:`${d}-menu-item`,onClick:()=>{a("flow")}},[(ke=t.value.mermaid)==null?void 0:ke.flow]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("sequence")}},[(ye=t.value.mermaid)==null?void 0:ye.sequence]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("gantt")}},[(qe=t.value.mermaid)==null?void 0:qe.gantt]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("class")}},[(Ve=t.value.mermaid)==null?void 0:Ve.class]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("state")}},[(we=t.value.mermaid)==null?void 0:we.state]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("pie")}},[(Ke=t.value.mermaid)==null?void 0:Ke.pie]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("relationship")}},[(Ze=t.value.mermaid)==null?void 0:Ze.relationship]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("journey")}},[(Ee=t.value.mermaid)==null?void 0:Ee.journey])]),key:"bar-mermaid"},{default:()=>{var B;return[s("div",{class:`${d}-toolbar-item`,title:(B=t.value.toolbarTips)==null?void 0:B.mermaid},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-mermaid"},null)])])]}});case"katex":return s(Ce,{relative:`#${i}`,visible:o.katex,onChange:B=>{o.katex=B},overlay:s("ul",{class:`${d}-menu`,onClick:()=>{o.katex=!1}},[s("li",{class:`${d}-menu-item`,onClick:()=>{a("katexInline")}},[(dt=t.value.katex)==null?void 0:dt.inline]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("katexBlock")}},[(mt=t.value.katex)==null?void 0:mt.block])]),key:"bar-katex"},{default:()=>{var B;return[s("div",{class:`${d}-toolbar-item`,title:(B=t.value.toolbarTips)==null?void 0:B.katex},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-formula"},null)])])]}})}else return l.defToolbars instanceof Array?l.defToolbars[p]||"":l.defToolbars&&l.defToolbars.children instanceof Array&&l.defToolbars.children[p]||""};return()=>{const p=u.value[0].map(C=>f(C)),w=u.value[1].map(C=>f(C));return s(Pe,null,[l.toolbars.length>0&&s("div",{class:`${d}-toolbar-wrapper`,id:i},[s("div",{class:`${d}-toolbar`},[s("div",{class:`${d}-toolbar-left`,ref:m},[p]),s("div",{class:`${d}-toolbar-right`},[w])])]),s("input",{ref:c,accept:"image/*",type:"file",multiple:!0,style:{display:"none"}},null),s(Qn,{linkVisible:r.linkVisible,clipVisible:r.clipVisible,type:r.type,onCancel:()=>{r.linkVisible=!1,r.clipVisible=!1},onOk:C=>{C&&a(r.type,{desc:C.desc,url:C.url}),r.linkVisible=!1,r.clipVisible=!1}},null)])}}});function Kt(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let _e=Kt();function ll(l){_e=l}const Zt=/[&<>"']/,il=new RegExp(Zt.source,"g"),Gt=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ol=new RegExp(Gt.source,"g"),rl={"&":"&","<":"<",">":">",'"':""","'":"'"},Ft=l=>rl[l];function X(l,e){if(e){if(Zt.test(l))return l.replace(il,Ft)}else if(Gt.test(l))return l.replace(ol,Ft);return l}const al=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Wt(l){return l.replace(al,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const sl=/(^|[^\[])\^/g;function N(l,e){l=typeof l=="string"?l:l.source,e=e||"";const t={replace:(n,i)=>(i=i.source||i,i=i.replace(sl,"$1"),l=l.replace(n,i),t),getRegex:()=>new RegExp(l,e)};return t}const cl=/[^\w:]/g,ul=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Lt(l,e,t){if(l){let n;try{n=decodeURIComponent(Wt(t)).replace(cl,"").toLowerCase()}catch{return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}e&&!ul.test(t)&&(t=pl(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const Ge={},dl=/^[^:]+:\/*[^/]*$/,ml=/^([^:]+:)[\s\S]*$/,hl=/^([^:]+:\/*[^/]*)[\s\S]*$/;function pl(l,e){Ge[" "+l]||(dl.test(l)?Ge[" "+l]=l+"/":Ge[" "+l]=Xe(l,"/",!0)),l=Ge[" "+l];const t=l.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:l.replace(ml,"$1")+e:e.charAt(0)==="/"?t?e:l.replace(hl,"$1")+e:l+e}const Je={exec:function(){}};function ie(l){let e=1,t,n;for(;e{let m=!1,u=a;for(;--u>=0&&r[u]==="\\";)m=!m;return m?"|":" |"}),n=t.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>e)n.splice(e);else for(;n.length1;)e&1&&(t+=l),e>>=1,l+=l;return t+l}function Pt(l,e,t,n){const i=e.href,o=e.title?X(e.title):null,a=l[1].replace(/\\([\[\]])/g,"$1");if(l[0].charAt(0)!=="!"){n.state.inLink=!0;const r={type:"link",raw:t,href:i,title:o,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,r}return{type:"image",raw:t,href:i,title:o,text:X(a)}}function gl(l,e){const t=l.match(/^(\s+)(?:```)/);if(t===null)return e;const n=t[1];return e.split(`
+import{d as G,ag as J,x as ne,a as Z,g as s,b as Re,af as P,F as Pe,y as M,U as se,r as V,bw as tn,n as De,aj as nn,aQ as ln,v as Fe,s as on,bx as rn,B as an,by as sn,c as he,j as cn,k as ht,w as q,f as pe,m as ge,e as xe,A as pt,u as oe,i as Se,ao as Te,l as un,ap as ft,_ as dn}from"./index-4d06789b.js";import{_ as mn}from"./Bar.vue_vue_type_script_setup_true_lang-47ffed98.js";import{_ as hn}from"./Pie.vue_vue_type_script_setup_true_lang-b70002e1.js";import{_ as pn}from"./Line.vue_vue_type_script_setup_true_lang-cf1d2e3f.js";import{T as ze}from"./index-90838534.js";import{d as fn}from"./index-7cec3c6a.js";import{_ as gn}from"./Github.vue_vue_type_script_setup_true_lang-c49b6836.js";import{u as vn}from"./index-ab1f0454.js";import"./app-9aecf872.js";import"./columns-e5e3a767.js";import"./office-building-cc7a1721.js";import"./iphone-bcaa848c.js";import"./user-3-fill-70ba8c19.js";var bn=Object.defineProperty,kn=Object.defineProperties,yn=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,vt=(l,e,t)=>e in l?bn(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t,X=(l,e)=>{for(var t in e||(e={}))wn.call(e,t)&&vt(l,t,e[t]);if(gt)for(var t of gt(e))xn.call(e,t)&&vt(l,t,e[t]);return l},Le=(l,e)=>kn(l,yn(e));const d="md-editor",$n="md-editor-v3",Cn="https://at.alicdn.com/t/c/font_2605852_gymddm8qwtd.js",U="https://cdnjs.cloudflare.com/ajax/libs",_n=`${U}/highlight.js/11.7.0/highlight.min.js`,bt={main:`${U}/prettier/2.8.0/standalone.js`,markdown:`${U}/prettier/2.8.0/parser-markdown.js`},kt={css:`${U}/cropperjs/1.5.13/cropper.min.css`,js:`${U}/cropperjs/1.5.13/cropper.min.js`},En=`${U}/screenfull.js/5.2.0/screenfull.min.js`,Nt=["bold","underline","italic","strikeThrough","-","title","sub","sup","quote","unorderedList","orderedList","task","-","codeRow","code","link","image","table","mermaid","katex","-","revoke","next","save","=","prettier","pageFullscreen","fullscreen","preview","htmlPreview","catalog","github"],Ut=["markdownTotal","=","scrollSwitch"],yt={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Img Link",upload:"Upload Img",clip2upload:"Clip Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Word Count",scrollAuto:"Scroll Auto"}}},Sn=`${U}/mermaid/9.3.0/mermaid.min.js`,wt={js:`${U}/KaTeX/0.16.3/katex.min.js`,css:`${U}/KaTeX/0.16.3/katex.min.css`},xt={a11y:{light:`${U}/highlight.js/11.7.0/styles/a11y-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/a11y-dark.min.css`},atom:{light:`${U}/highlight.js/11.7.0/styles/atom-one-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/atom-one-dark.min.css`},github:{light:`${U}/highlight.js/11.7.0/styles/github.min.css`,dark:`${U}/highlight.js/11.7.0/styles/github-dark.min.css`},gradient:{light:`${U}/highlight.js/11.7.0/styles/gradient-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/gradient-dark.min.css`},kimbie:{light:`${U}/highlight.js/11.7.0/styles/kimbie-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/kimbie-dark.min.css`},paraiso:{light:`${U}/highlight.js/11.7.0/styles/paraiso-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/paraiso-dark.min.css`},qtcreator:{light:`${U}/highlight.js/11.7.0/styles/qtcreator-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${U}/highlight.js/11.7.0/styles/stackoverflow-light.min.css`,dark:`${U}/highlight.js/11.7.0/styles/stackoverflow-dark.min.css`}},W={markedRenderer:l=>l,markedExtensions:[],markedOptions:{},editorExtensions:{},editorConfig:{}},Tn=l=>{if(l)for(const e in l){const t=l[e];t&&(W[e]=t)}};class zn{constructor(){this.pools={}}remove(e,t,n){const o=this.pools[e]&&this.pools[e][t];o&&(this.pools[e][t]=o.filter(a=>a!==n))}clear(e){this.pools[e]={}}on(e,t){return this.pools[e]||(this.pools[e]={}),this.pools[e][t.name]||(this.pools[e][t.name]=[]),this.pools[e][t.name].push(t.callback),this.pools[e][t.name].includes(t.callback)}emit(e,t,...n){this.pools[e]||(this.pools[e]={});const o=this.pools[e][t];o&&o.forEach(a=>{try{a(...n)}catch(r){console.error(`${t} monitor event exception!`,r)}})}}var b=new zn;const ce=(l,e=0,t=e)=>new Promise((n,i)=>{l.setSelectionRange?setTimeout(()=>{l.setSelectionRange(e,t),l.focus(),n(!0)},0):(console.error("Can not reset position!"),i())}),lt=(l,e,t)=>{const{deviationStart:n=0,deviationEnd:i=0,direct:o=!1,select:a=!1}=t;let r="";if(l.selectionStart||l.selectionStart===0){const m=l.selectionStart,u=l.selectionEnd||0,{prefixVal:c=l.value.substring(0,m),subfixVal:h=l.value.substring(u,l.value.length)}=t;r=c+e+h,ce(l,a?m+n:m+e.length+i,m+e.length+i)}else r+=e;return o&&(l.value=r),r},In=(l,e={newWindow:!0,nofollow:!0})=>{l||console.error("error link!");const t=document.createElement("a");t.href=l,t.style.display="none",e.newWindow&&(t.target="_blank"),e.nofollow&&(t.rel="noopener noreferrer"),document.body.appendChild(t),t.click(),document.body.removeChild(t)},$t=(l,e)=>{const t=tt(()=>{l.removeEventListener("scroll",n),l.addEventListener("scroll",n),e.removeEventListener("scroll",n),e.addEventListener("scroll",n)},50),n=i=>{const o=l.clientHeight,a=e.clientHeight,r=l.scrollHeight,m=e.scrollHeight,u=(r-o)/(m-a);i.target===l?(e.removeEventListener("scroll",n),e.scrollTo({top:l.scrollTop/u}),t()):(l.removeEventListener("scroll",n),l.scrollTo({top:e.scrollTop*u}),t())};return[t,()=>{l.removeEventListener("scroll",n),e.removeEventListener("scroll",n)}]},An=(l,e="image.png")=>{const t=l.split(","),n=t[0].match(/:(.*?);/);if(n){const i=n[1],o=atob(t[1]);let a=o.length;const r=new Uint8Array(a);for(;a--;)r[a]=o.charCodeAt(a);return new File([r],e,{type:i})}return null},Ct=l=>{if(!l.trim())return l;const e=l.split(`
+`),t=[''];return e.forEach(()=>{t.push("")}),t.push(""),`${l}${t.join("")}`},tt=(l,e=200)=>{let t=0;return(...n)=>{t&&clearTimeout(t),t=window.setTimeout(()=>{l.apply(globalThis,n),t=0},e)}},Fn=(l,e=200)=>{let t=0,n=null;return(...i)=>{const o=a=>{t===0&&(t=a),a-t>=e?(l.apply(globalThis,n),n=null,t=0):window.requestAnimationFrame(o)};n===null&&window.requestAnimationFrame(o),n=i}},_t=(l,e="$")=>{const t=l.split(e);let n=e,i="";for(let o=1;o{var e;return navigator.userAgent.indexOf("Firefox")>-1?l.value.substring(l.selectionStart,l.selectionEnd):((e=window.getSelection())==null?void 0:e.toString())||""},Dn=(l,e)=>{const t=l==null?void 0:l.getBoundingClientRect();if(e===document.documentElement)return t.top-e.clientTop;const n=e==null?void 0:e.getBoundingClientRect();return t.top-n.top},Rn=(l,e)=>{const t=X({},l);return e.forEach(n=>{Reflect.deleteProperty(t,n)}),t},Et=(l,e)=>{const t=n=>{const i=l.parentElement||document.body,o=i.offsetWidth,a=i.offsetHeight,{clientWidth:r}=document.documentElement,{clientHeight:m}=document.documentElement,u=n.offsetX,c=n.offsetY,h=p=>{let w=p.x+document.body.scrollLeft-document.body.clientLeft-u,C=p.y+document.body.scrollTop-document.body.clientTop-c;w=w<1?1:w{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",f)};document.addEventListener("mouseup",f)};return l.addEventListener("mousedown",t),()=>{l.removeEventListener("mousedown",t)}},te=(l,e="")=>{const t=document.getElementById(l.id);t?e!==""&&l.onload instanceof Function&&(Reflect.get(window,e)?l.onload(new Event("load")):t.addEventListener("load",l.onload)):document.head.appendChild(l)},Pn=tt((l,e,t)=>{const n=document.getElementById(l);n&&n.setAttribute(e,t)},10),Ye="onSave",at="changeCatalogVisible",qt="changeFullscreen",St="pageFullscreenChanged",Tt="fullscreenChanged",zt="previewChanged",It="htmlPreviewChanged",At="catalogVisibleChanged",Vt="textarea_focus",jn=(l,e)=>{const{editorId:t,noPrettier:n,previewOnly:i}=l,o=J({buildFinished:!1,html:""}),a=r=>{if(r.target===document.querySelector(`#${l.editorId}-textarea`))if(b.emit(t,"selectTextChange"),r.ctrlKey||r.metaKey)switch(r.code){case"KeyS":{r.shiftKey?b.emit(t,"replace","strikeThrough"):(b.emit(t,Ye,l.modelValue),r.preventDefault());break}case"KeyB":{b.emit(t,"replace","bold"),r.preventDefault();break}case"KeyU":{r.shiftKey?(b.emit(t,"replace","unorderedList"),r.preventDefault()):(b.emit(t,"replace","underline"),r.preventDefault());break}case"KeyI":{r.shiftKey?(b.emit(t,"openModals","image"),r.preventDefault()):(b.emit(t,"replace","italic"),r.preventDefault());break}case"Digit1":{b.emit(t,"replace","h1"),r.preventDefault();break}case"Digit2":{b.emit(t,"replace","h2"),r.preventDefault();break}case"Digit3":{b.emit(t,"replace","h3"),r.preventDefault();break}case"Digit4":{b.emit(t,"replace","h4"),r.preventDefault();break}case"Digit5":{b.emit(t,"replace","h5"),r.preventDefault();break}case"Digit6":{b.emit(t,"replace","h6"),r.preventDefault();break}case"ArrowUp":{b.emit(t,"replace","sup"),r.preventDefault();break}case"ArrowDown":{b.emit(t,"replace","sub"),r.preventDefault();break}case"KeyQ":{if(r.key==="a"){r.target.select();return}b.emit(t,"replace","quote"),r.preventDefault();break}case"KeyA":if(r.key==="q"){b.emit(t,"replace","quote"),r.preventDefault();break}else return;case"KeyO":{b.emit(t,"replace","orderedList"),r.preventDefault();break}case"KeyC":{if(r.shiftKey)b.emit(t,"replace","code"),r.preventDefault();else if(r.altKey)b.emit(t,"replace","codeRow"),r.preventDefault();else{r.preventDefault(),b.emit(t,"replace","ctrlC");break}break}case"KeyL":{b.emit(t,"openModals","link"),r.preventDefault();break}case"KeyZ":{if(r.key==="w")return;r.shiftKey?(b.emit(t,"ctrlShiftZ"),r.preventDefault()):(b.emit(t,"ctrlZ"),r.preventDefault());break}case"KeyW":if(r.key==="z"){r.shiftKey?(b.emit(t,"ctrlShiftZ"),r.preventDefault()):(b.emit(t,"ctrlZ"),r.preventDefault());break}else return;case"KeyF":{r.shiftKey&&(n||(b.emit(t,"replace","prettier"),r.preventDefault()));break}case"KeyT":{r.altKey&&r.shiftKey&&(b.emit(t,"replace","table"),r.preventDefault());break}case"KeyX":{b.emit(t,"replace","ctrlX"),r.preventDefault();break}case"KeyD":{r.preventDefault(),b.emit(t,"replace","ctrlD");break}}else r.code==="Tab"&&(r.preventDefault(),r.shiftKey?b.emit(t,"replace","shiftTab"):b.emit(t,"replace","tab"))};M(()=>l.modelValue,()=>{o.buildFinished=!1}),Z(()=>{i||(window.addEventListener("keydown",a),b.on(t,{name:"buildFinished",callback(r){o.buildFinished=!0,o.html=r}}),b.on(t,{name:Ye,callback(){const r=new Promise(m=>{if(o.buildFinished)m(o.html);else{const u=c=>{m(c),b.remove(t,"buildFinished",u)};b.on(t,{name:"buildFinished",callback:u})}});l.onSave?l.onSave(l.modelValue,r):e.emit("onSave",l.modelValue,r)}}))}),Re(()=>{i||window.removeEventListener("keydown",a)})},On=l=>{var e;const{editorId:t,previewOnly:n}=l,i=(e=W==null?void 0:W.editorExtensions)==null?void 0:e.highlight;se("editorId",t),se("tabWidth",l.tabWidth),se("theme",ne(()=>l.theme)),se("highlight",ne(()=>{const a=X(X({},xt),i==null?void 0:i.css),r=l.codeStyleReverse&&l.codeStyleReverseList.includes(l.previewTheme)?"dark":l.theme;return{js:(i==null?void 0:i.js)||_n,css:a[l.codeTheme]?a[l.codeTheme][r]:xt.atom[r]}})),se("historyLength",l.historyLength),se("previewOnly",n),se("showCodeRowNumber",l.showCodeRowNumber);const o=ne(()=>{var a;const r=X(X({},yt),(a=W==null?void 0:W.editorConfig)==null?void 0:a.languageUserDefined);return r[l.language]?r[l.language]:yt["zh-CN"]});se("usedLanguageText",o),se("previewTheme",ne(()=>l.previewTheme))},Hn=l=>{var e,t,n,i,o,a;const{noPrettier:r,previewOnly:m,noIconfont:u,noUploadImg:c}=l,{editorExtensions:h}=W,f=r||!!((t=(e=W.editorExtensions)==null?void 0:e.prettier)!=null&&t.prettierInstance),p=r||!!((i=(n=W.editorExtensions)==null?void 0:n.prettier)!=null&&i.parserMarkdownInstance),w=c||!!((a=(o=W.editorExtensions)==null?void 0:o.cropper)!=null&&a.instance);Z(()=>{var C,y,g,x;const E=document.createElement("script");E.src=(h==null?void 0:h.iconfont)||Cn,E.id=`${d}-icon`;const S=document.createElement("script"),z=document.createElement("script");S.src=((C=h==null?void 0:h.prettier)==null?void 0:C.standaloneJs)||bt.main,S.id=`${d}-prettier`,z.src=((y=h==null?void 0:h.prettier)==null?void 0:y.parserMarkdownJs)||bt.markdown,z.id=`${d}-prettierMD`;const R=document.createElement("link");R.rel="stylesheet",R.href=((g=h==null?void 0:h.cropper)==null?void 0:g.css)||kt.css,R.id=`${d}-cropperCss`;const F=document.createElement("script");F.src=((x=h==null?void 0:h.cropper)==null?void 0:x.js)||kt.js,F.id=`${d}-cropper`,m||(u||te(E),w||(te(R),te(F)),f||te(S),p||te(z))})},Bn=(l,e)=>{const{editorId:t,previewOnly:n}=l,i=J({pageFullscreen:l.pageFullscreen,fullscreen:!1,preview:l.preview,htmlPreview:l.preview?!1:l.htmlPreview}),o=(m,u)=>{i[m]=u===void 0?!i[m]:u,m==="preview"&&i.preview?i.htmlPreview=!1:m==="htmlPreview"&&i.htmlPreview&&(i.preview=!1)};let a="";const r=()=>{i.pageFullscreen||i.fullscreen?document.body.style.overflow="hidden":document.body.style.overflow=a};return M(()=>[i.pageFullscreen,i.fullscreen],r),Z(()=>{n||b.on(t,{name:"uploadImage",callback(m,u){const c=h=>{b.emit(t,"replace","image",{desc:"",urls:h}),u&&u()};l.onUploadImg?l.onUploadImg(m,c):e.emit("onUploadImg",m,c)}}),a=document.body.style.overflow,r()}),[i,o]},Mn=l=>{const{editorId:e}=l,t=V(!1);Z(()=>{b.on(e,{name:at,callback:i=>{i===void 0?t.value=!t.value:t.value=i}})});const n=ne(()=>!l.toolbarsExclude.includes("catalog")&&l.toolbars.includes("catalog"));return[t,n]},Nn=(l,e,t,n,i)=>{const{editorId:o}=l;M(()=>n.pageFullscreen,r=>{b.emit(o,St,r)}),M(()=>n.fullscreen,r=>{b.emit(o,Tt,r)}),M(()=>n.preview,r=>{b.emit(o,zt,r)}),M(()=>n.htmlPreview,r=>{b.emit(o,It,r)}),M(t,r=>{b.emit(o,At,r)});const a={on(r,m){switch(r){case"pageFullscreen":{b.on(o,{name:St,callback(u){m(u)}});break}case"fullscreen":{b.on(o,{name:Tt,callback(u){m(u)}});break}case"preview":{b.on(o,{name:zt,callback(u){m(u)}});break}case"htmlPreview":{b.on(o,{name:It,callback(u){m(u)}});break}case"catalog":{b.on(o,{name:At,callback(u){m(u)}});break}}},togglePageFullscreen(r){i("pageFullscreen",r)},toggleFullscreen(r){b.emit(o,qt,r)},togglePreview(r){i("preview",r)},toggleHtmlPreview(r){i("htmlPreview",r)},toggleCatalog(r){b.emit(o,at,r)},triggerSave(){b.emit(o,Ye)},insert(r){b.emit(o,"replace","universal",{generate:r})},focus(){b.emit(o,Vt)}};e.expose(a)};var Un=G({setup(){return()=>s("div",{class:`${d}-divider`},null)}});const le=({instance:l,ctx:e,props:t={}},n="default")=>{const i=(l==null?void 0:l.$slots[n])||(e==null?void 0:e.slots[n]);return(i?i(l):"")||t[n]},qn=()=>({trigger:{type:String,default:"hover"},overlay:{type:[String,Object],default:""},visible:{type:Boolean,default:!1},onChange:{type:Function,default:()=>()=>{}},relative:{type:String,default:"html"}});var Ce=G({props:qn(),setup(l,e){const t=`${d}-dropdown-hidden`,n=J({overlayClass:[t],overlayStyle:{},triggerHover:!1,overlayHover:!1}),i=V(),o=V(),a=()=>{var h;l.trigger==="hover"&&(n.triggerHover=!0);const f=i.value,p=o.value,w=f.getBoundingClientRect(),C=f.offsetTop,y=f.offsetLeft,g=w.height,x=w.width,E=((h=document.querySelector(l.relative))==null?void 0:h.scrollLeft)||0;n.overlayStyle=Le(X({},n.overlayStyle),{top:C+g+"px",left:y-p.offsetWidth/2+x/2-E+"px"}),l.onChange(!0)},r=()=>{n.overlayHover=!0};M(()=>l.visible,h=>{h?n.overlayClass=n.overlayClass.filter(f=>f!==t):n.overlayClass.push(t)});const m=h=>{const f=i.value,p=o.value;!f.contains(h.target)&&!p.contains(h.target)&&l.onChange(!1)};let u=-1;const c=h=>{i.value===h.target?n.triggerHover=!1:n.overlayHover=!1,clearTimeout(u),u=window.setTimeout(()=>{!n.overlayHover&&!n.triggerHover&&l.onChange(!1)},10)};return Z(()=>{l.trigger==="click"?(i.value.addEventListener("click",a),document.addEventListener("click",m)):(i.value.addEventListener("mouseenter",a),i.value.addEventListener("mouseleave",c),o.value.addEventListener("mouseenter",r),o.value.addEventListener("mouseleave",c))}),Re(()=>{l.trigger==="click"?(i.value.removeEventListener("click",a),document.removeEventListener("click",m)):(i.value.removeEventListener("mouseenter",a),i.value.removeEventListener("mouseleave",c),o.value.removeEventListener("mouseenter",r),o.value.removeEventListener("mouseleave",c))}),()=>{const h=le({ctx:e}),f=le({props:l,ctx:e},"overlay"),p=tn(h instanceof Array?h[0]:h,{ref:i}),w=s("div",{class:[`${d}-dropdown`,n.overlayClass],style:n.overlayStyle,ref:o},[s("div",{class:`${d}-dropdown-overlay`},[f instanceof Array?f[0]:f])]);return[p,w]}}});const Vn=()=>({title:{type:String,default:""},visible:{type:Boolean,default:!1},width:{type:String,default:"auto"},height:{type:String,default:"auto"},onClose:{type:Function,default:()=>()=>{}},showAdjust:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},onAdjust:{type:Function,default:()=>()=>{}},class:{type:String}});var st=G({props:Vn(),setup(l,e){const t=V(l.visible),n=V([`${d}-modal`]),i=V(),o=V();let a=()=>{};const r=J({initPos:{left:"0px",top:"0px"},historyPos:{left:"0px",top:"0px"}}),m=ne(()=>l.isFullscreen?{width:"100%",height:"100%"}:{width:l.width,height:l.height});return Z(()=>{a=Et(o.value,(u,c)=>{r.initPos.left=u+"px",r.initPos.top=c+"px"})}),Re(()=>{a()}),M(()=>l.isFullscreen,u=>{u?a():a=Et(o.value,(c,h)=>{r.initPos.left=c+"px",r.initPos.top=h+"px"})}),M(()=>l.visible,u=>{u?(n.value.push("zoom-in"),t.value=u,De(()=>{const c=i.value.offsetWidth/2,h=i.value.offsetHeight/2,f=document.documentElement.clientWidth/2,p=document.documentElement.clientHeight/2;r.initPos.left=f-c+"px",r.initPos.top=p-h+"px"}),setTimeout(()=>{n.value=n.value.filter(c=>c!=="zoom-in")},140)):(n.value.push("zoom-out"),setTimeout(()=>{n.value=n.value.filter(c=>c!=="zoom-out"),t.value=u},130))}),()=>{const u=le({ctx:e}),c=le({props:l,ctx:e},"title");return s("div",{class:[l.class],style:{display:t.value?"block":"none"}},[s("div",{class:`${d}-modal-mask`,onClick:l.onClose},null),s("div",{class:n.value,style:X(X({},r.initPos),m.value),ref:i},[s("div",{class:`${d}-modal-header`,ref:o},[c||""]),s("div",{class:`${d}-modal-body`},[u]),s("div",{class:`${d}-modal-func`},[l.showAdjust&&s("div",{class:`${d}-modal-adjust`,onClick:h=>{h.stopPropagation(),l.isFullscreen?r.initPos=r.historyPos:(r.historyPos=r.initPos,r.initPos={left:"0",top:"0"}),l.onAdjust(!l.isFullscreen)}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":`#md-editor-icon-${l.isFullscreen?"suoxiao":"fangda"}`},null)])]),s("div",{class:`${d}-modal-close`,onClick:h=>{h.stopPropagation(),l.onClose&&l.onClose()}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-close"},null)])])])])])}}});const Kn=()=>({type:{type:String,default:"link"},visible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>()=>{}},onOk:{type:Function,default:()=>()=>{}}});var Zn=G({props:Kn(),setup(l){const e=P("usedLanguageText"),t=P("editorId"),n=ne(()=>{var o,a;switch(l.type){case"link":return(o=e.value.linkModalTips)==null?void 0:o.linkTitle;case"image":return(a=e.value.linkModalTips)==null?void 0:a.imageTitle;default:return""}}),i=J({desc:"",url:""});return M(()=>l.visible,o=>{o||setTimeout(()=>{i.desc="",i.url=""},200)}),()=>s(st,{title:n.value,visible:l.visible,onClose:l.onCancel},{default:()=>{var o,a,r,m,u;return[s("div",{class:`${d}-form-item`},[s("label",{class:`${d}-label`,for:`link-desc-${t}`},[(o=e.value.linkModalTips)==null?void 0:o.descLabel]),s("input",{placeholder:(a=e.value.linkModalTips)==null?void 0:a.descLabelPlaceHolder,class:`${d}-input`,id:`link-desc-${t}`,type:"text",value:i.desc,onChange:c=>{i.desc=c.target.value},autocomplete:"off"},null)]),s("div",{class:`${d}-form-item`},[s("label",{class:`${d}-label`,for:`link-url-${t}`},[(r=e.value.linkModalTips)==null?void 0:r.urlLabel]),s("input",{placeholder:(m=e.value.linkModalTips)==null?void 0:m.urlLabelPlaceHolder,class:`${d}-input`,id:`link-url-${t}`,type:"text",value:i.url,onChange:c=>{i.url=c.target.value},autocomplete:"off"},null)]),s("div",{class:`${d}-form-item`},[s("button",{class:[`${d}-btn`,`${d}-btn-row`],type:"button",onClick:()=>{l.onOk(i),i.desc="",i.url=""}},[(u=e.value.linkModalTips)==null?void 0:u.buttonOK])])]}})}});const Gn=()=>({visible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>()=>{}},onOk:{type:Function,default:()=>()=>{}}});var Wn=G({props:Gn(),setup(l){var e,t;const n=P("usedLanguageText"),i=P("editorId");let o=(t=(e=W==null?void 0:W.editorExtensions)==null?void 0:e.cropper)==null?void 0:t.instance;const a=V(),r=V(),m=V(),u=J({cropperInited:!1,imgSelected:!1,imgSrc:"",isFullscreen:!1});let c=null;M(()=>l.visible,()=>{l.visible&&!u.cropperInited&&(o=o||window.Cropper,a.value.onchange=()=>{if(!o){b.emit(i,"errorCatcher",{name:"Cropper",message:"Cropper is undefined"});return}const f=a.value.files||[];if(u.imgSelected=!0,(f==null?void 0:f.length)>0){const p=new FileReader;p.onload=w=>{u.imgSrc=w.target.result,De(()=>{c=new o(r.value,{viewMode:2,preview:`.${d}-clip-preview-target`})})},p.readAsDataURL(f[0])}})}),M(()=>[u.imgSelected],()=>{m.value.style=""}),M(()=>u.isFullscreen,()=>{De(()=>{c==null||c.destroy(),m.value.style="",r.value&&(c=new o(r.value,{viewMode:2,preview:`.${d}-clip-preview-target`}))})});const h=()=>{c.clear(),c.destroy(),c=null,a.value.value="",u.imgSelected=!1};return()=>{var f;return s(st,{class:`${d}-modal-clip`,title:(f=n.value.clipModalTips)==null?void 0:f.title,visible:l.visible,onClose:l.onCancel,showAdjust:!0,isFullscreen:u.isFullscreen,onAdjust:p=>{u.isFullscreen=p},width:"668px",height:"421px"},{default:()=>{var p,w;return[s("div",{class:`${d}-form-item ${d}-clip`},[s("div",{class:`${d}-clip-main`},[u.imgSelected?s("div",{class:`${d}-clip-cropper`},[s("img",{src:u.imgSrc,ref:r,style:{display:"none"},alt:""},null),s("div",{class:`${d}-clip-delete`,onClick:h},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-delete"},null)])])]):s("div",{class:`${d}-clip-upload`,onClick:()=>{a.value.click()}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-upload"},null)])])]),s("div",{class:`${d}-clip-preview`},[s("div",{class:`${d}-clip-preview-target`,ref:m},null)])]),s("div",{class:`${d}-form-item`},[s("button",{class:`${d}-btn`,type:"button",onClick:()=>{if(c){const C=c.getCroppedCanvas();b.emit(i,"uploadImage",[An(C.toDataURL("image/png"))],l.onOk),h()}}},[((p=n.value.clipModalTips)==null?void 0:p.buttonUpload)||((w=n.value.linkModalTips)==null?void 0:w.buttonOK)])]),s("input",{ref:a,accept:"image/*",type:"file",multiple:!1,style:{display:"none"}},null)]}})}}});const Qn=()=>({type:{type:String,default:"link"},linkVisible:{type:Boolean,default:!1},clipVisible:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>()=>{}},onOk:{type:Function,default:()=>()=>{}}});var Xn=G({props:Qn(),setup(l){return()=>s(Pe,null,[s(Zn,{type:l.type,visible:l.linkVisible,onOk:l.onOk,onCancel:l.onCancel},null),s(Wn,{visible:l.clipVisible,onOk:l.onOk,onCancel:l.onCancel},null)])}});const Yn=l=>{var e,t,n,i;const o=P("editorId"),a=P("previewOnly");let r=(t=(e=W.editorExtensions)==null?void 0:e.screenfull)==null?void 0:t.instance;const m=(i=(n=W.editorExtensions)==null?void 0:n.screenfull)==null?void 0:i.js,u=V(!1),c=p=>{if(!r){b.emit(o,"errorCatcher",{name:"fullscreen",message:"fullscreen is undefined"});return}r.isEnabled?(u.value=!0,(p===void 0?!r.isFullscreen:p)?r.request():r.exit()):console.error("browser does not support screenfull!")},h=()=>{r&&r.isEnabled&&r.on("change",()=>{(u.value||l.setting.fullscreen)&&(u.value=!1,l.updateSetting("fullscreen"))})},f=()=>{r=window.screenfull,h()};return Z(()=>{if(h(),!a&&!r){const p=document.createElement("script");p.src=m||En,p.onload=f,p.id=`${d}-screenfull`,te(p,"screenfull")}}),Z(()=>{a||b.on(o,{name:qt,callback:c})}),{fullscreenHandler:c}},Jn=()=>({tableShape:{type:Array,default:()=>[6,4]},onSelected:{type:Function,default:()=>{}}}),el=G({name:"TableShape",props:Jn(),setup(l){const e=J({x:-1,y:-1});return()=>s("div",{class:`${d}-table-shape`,onMouseleave:()=>{e.x=-1,e.y=-1}},[new Array(l.tableShape[1]).fill("").map((t,n)=>s("div",{class:`${d}-table-shape-row`,key:`table-shape-row-${n}`},[new Array(l.tableShape[0]).fill("").map((i,o)=>s("div",{class:`${d}-table-shape-col`,key:`table-shape-col-${o}`,onMouseenter:()=>{e.x=n,e.y=o},onClick:()=>{l.onSelected(e)}},[s("div",{class:[`${d}-table-shape-col-default`,n<=e.x&&o<=e.y&&`${d}-table-shape-col-include`]},null)]))]))])}}),tl=()=>({noPrettier:{type:Boolean},toolbars:{type:Array,default:()=>[]},toolbarsExclude:{type:Array,default:()=>[]},setting:{type:Object,default:()=>({})},screenfull:{type:Object,default:null},screenfullJs:{type:String,default:""},updateSetting:{type:Function,default:()=>()=>{}},tableShape:{type:Array,default:()=>[6,4]},defToolbars:{type:Object},noUploadImg:{type:Boolean}});var nl=G({name:"MDEditorToolbar",props:tl(),setup(l){const e=P("editorId"),t=P("usedLanguageText"),{fullscreenHandler:n}=Yn(l),i=`${e}-toolbar-wrapper`,o=J({title:!1,catalog:!1,image:!1,table:!1,mermaid:!1,katex:!1}),a=(p,w)=>{b.emit(e,"replace",p,w)},r=J({type:"link",linkVisible:!1,clipVisible:!1}),m=V();Z(()=>{b.on(e,{name:"openModals",callback(p){r.type=p,r.linkVisible=!0}})});const u=ne(()=>{const p=l.toolbars.filter(g=>!l.toolbarsExclude.includes(g)),w=p.indexOf("="),C=w===-1?p:p.slice(0,w+1),y=w===-1?[]:p.slice(w,Number.MAX_SAFE_INTEGER);return[C,y]}),c=V(),h=()=>{b.emit(e,"uploadImage",Array.from(c.value.files||[])),c.value.value=""};Z(()=>{c.value.addEventListener("change",h)});const f=p=>{var w,C,y,g,x,E,S,z,R,F,v,K,O,H,T,k,$,D,L,j,Y,ae,ee,be,je,Oe,He,me,Be,Me,fe,Ne,Ue,ke,ye,qe,Ve,we,Ke,Ze,Ee,dt,mt;if(Nt.includes(p))switch(p){case"-":return s(Un,null,null);case"bold":return s("div",{class:`${d}-toolbar-item`,title:(w=t.value.toolbarTips)==null?void 0:w.bold,onClick:()=>{a("bold")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-bold"},null)])]);case"underline":return s("div",{class:`${d}-toolbar-item`,title:(C=t.value.toolbarTips)==null?void 0:C.underline,onClick:()=>{a("underline")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-underline"},null)])]);case"italic":return s("div",{class:`${d}-toolbar-item`,title:(y=t.value.toolbarTips)==null?void 0:y.italic,onClick:()=>{a("italic")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-italic"},null)])]);case"strikeThrough":return s("div",{class:`${d}-toolbar-item`,title:(g=t.value.toolbarTips)==null?void 0:g.strikeThrough,onClick:()=>{a("strikeThrough")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-strike-through"},null)])]);case"title":return s(Ce,{relative:`#${i}`,visible:o.title,onChange:B=>{o.title=B},overlay:s("ul",{class:`${d}-menu`,onClick:()=>{o.title=!1}},[s("li",{class:`${d}-menu-item`,onClick:()=>{a("h1")}},[(x=t.value.titleItem)==null?void 0:x.h1]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("h2")}},[(E=t.value.titleItem)==null?void 0:E.h2]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("h3")}},[(S=t.value.titleItem)==null?void 0:S.h3]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("h4")}},[(z=t.value.titleItem)==null?void 0:z.h4]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("h5")}},[(R=t.value.titleItem)==null?void 0:R.h5]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("h6")}},[(F=t.value.titleItem)==null?void 0:F.h6])])},{default:()=>{var B;return[s("div",{class:`${d}-toolbar-item`,title:(B=t.value.toolbarTips)==null?void 0:B.title},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-title"},null)])])]}});case"sub":return s("div",{class:`${d}-toolbar-item`,title:(v=t.value.toolbarTips)==null?void 0:v.sub,onClick:()=>{a("sub")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-sub"},null)])]);case"sup":return s("div",{class:`${d}-toolbar-item`,title:(K=t.value.toolbarTips)==null?void 0:K.sup,onClick:()=>{a("sup")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-sup"},null)])]);case"quote":return s("div",{class:`${d}-toolbar-item`,title:(O=t.value.toolbarTips)==null?void 0:O.quote,onClick:()=>{a("quote")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-quote"},null)])]);case"unorderedList":return s("div",{class:`${d}-toolbar-item`,title:(H=t.value.toolbarTips)==null?void 0:H.unorderedList,onClick:()=>{a("unorderedList")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-unordered-list"},null)])]);case"orderedList":return s("div",{class:`${d}-toolbar-item`,title:(T=t.value.toolbarTips)==null?void 0:T.orderedList,onClick:()=>{a("orderedList")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-ordered-list"},null)])]);case"task":return s("div",{class:`${d}-toolbar-item`,title:(k=t.value.toolbarTips)==null?void 0:k.task,onClick:()=>{a("task")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-task"},null)])]);case"codeRow":return s("div",{class:`${d}-toolbar-item`,title:($=t.value.toolbarTips)==null?void 0:$.codeRow,onClick:()=>{a("codeRow")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-code-row"},null)])]);case"code":return s("div",{class:`${d}-toolbar-item`,title:(D=t.value.toolbarTips)==null?void 0:D.code,onClick:()=>{a("code")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-code"},null)])]);case"link":return s("div",{class:`${d}-toolbar-item`,title:(L=t.value.toolbarTips)==null?void 0:L.link,onClick:()=>{r.type="link",r.linkVisible=!0}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-link"},null)])]);case"image":return l.noUploadImg?s("div",{class:`${d}-toolbar-item`,title:(j=t.value.toolbarTips)==null?void 0:j.image,onClick:()=>{r.type="image",r.linkVisible=!0}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-image"},null)])]):s(Ce,{relative:`#${i}`,visible:o.image,onChange:B=>{o.image=B},overlay:s("ul",{class:`${d}-menu`,onClick:()=>{o.title=!1}},[s("li",{class:`${d}-menu-item`,onClick:()=>{r.type="image",r.linkVisible=!0}},[(Y=t.value.imgTitleItem)==null?void 0:Y.link]),s("li",{class:`${d}-menu-item`,onClick:()=>{c.value.click()}},[(ae=t.value.imgTitleItem)==null?void 0:ae.upload]),s("li",{class:`${d}-menu-item`,onClick:()=>{r.clipVisible=!0}},[(ee=t.value.imgTitleItem)==null?void 0:ee.clip2upload])])},{default:()=>{var B;return[s("div",{class:`${d}-toolbar-item`,title:(B=t.value.toolbarTips)==null?void 0:B.image},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-image"},null)])])]}});case"table":return s(Ce,{relative:`#${i}`,visible:o.table,onChange:B=>{o.table=B},key:"bar-table",overlay:s(el,{tableShape:l.tableShape,onSelected:B=>{a("table",{selectedShape:B})}},null)},{default:()=>{var B;return[s("div",{class:`${d}-toolbar-item`,title:(B=t.value.toolbarTips)==null?void 0:B.table},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-table"},null)])])]}});case"revoke":return s("div",{class:`${d}-toolbar-item`,title:(be=t.value.toolbarTips)==null?void 0:be.revoke,onClick:()=>{b.emit(e,"ctrlZ")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-revoke"},null)])]);case"next":return s("div",{class:`${d}-toolbar-item`,title:(je=t.value.toolbarTips)==null?void 0:je.next,onClick:()=>{b.emit(e,"ctrlShiftZ")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-next"},null)])]);case"save":return s("div",{class:`${d}-toolbar-item`,title:(Oe=t.value.toolbarTips)==null?void 0:Oe.save,onClick:()=>{b.emit(e,Ye)}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-baocun"},null)])]);case"prettier":return l.noPrettier?"":s("div",{class:`${d}-toolbar-item`,title:(He=t.value.toolbarTips)==null?void 0:He.prettier,onClick:()=>{a("prettier")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-prettier"},null)])]);case"pageFullscreen":return!l.setting.fullscreen&&s("div",{class:`${d}-toolbar-item`,title:(me=t.value.toolbarTips)==null?void 0:me.pageFullscreen,onClick:()=>{l.updateSetting("pageFullscreen")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":`#md-editor-icon-${l.setting.pageFullscreen?"suoxiao":"fangda"}`},null)])]);case"fullscreen":return s("div",{class:`${d}-toolbar-item`,title:(Be=t.value.toolbarTips)==null?void 0:Be.fullscreen,onClick:()=>{n()}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":`#md-editor-icon-${l.setting.fullscreen?"fullscreen-exit":"fullscreen"}`},null)])]);case"preview":return s("div",{class:`${d}-toolbar-item`,title:(Me=t.value.toolbarTips)==null?void 0:Me.preview,onClick:()=>{l.updateSetting("preview")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-preview"},null)])]);case"htmlPreview":return s("div",{class:`${d}-toolbar-item`,title:(fe=t.value.toolbarTips)==null?void 0:fe.htmlPreview,onClick:()=>{l.updateSetting("htmlPreview")}},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-coding"},null)])]);case"catalog":return s("div",{class:`${d}-toolbar-item`,title:(Ne=t.value.toolbarTips)==null?void 0:Ne.catalog,onClick:()=>{b.emit(e,at)},key:"bar-catalog"},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-catalog"},null)])]);case"github":return s("div",{class:`${d}-toolbar-item`,title:(Ue=t.value.toolbarTips)==null?void 0:Ue.github,onClick:()=>In("https://github.com/imzbf/md-editor-v3")},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-github"},null)])]);case"mermaid":return s(Ce,{relative:`#${i}`,visible:o.mermaid,onChange:B=>{o.mermaid=B},overlay:s("ul",{class:`${d}-menu`,onClick:()=>{o.mermaid=!1}},[s("li",{class:`${d}-menu-item`,onClick:()=>{a("flow")}},[(ke=t.value.mermaid)==null?void 0:ke.flow]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("sequence")}},[(ye=t.value.mermaid)==null?void 0:ye.sequence]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("gantt")}},[(qe=t.value.mermaid)==null?void 0:qe.gantt]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("class")}},[(Ve=t.value.mermaid)==null?void 0:Ve.class]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("state")}},[(we=t.value.mermaid)==null?void 0:we.state]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("pie")}},[(Ke=t.value.mermaid)==null?void 0:Ke.pie]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("relationship")}},[(Ze=t.value.mermaid)==null?void 0:Ze.relationship]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("journey")}},[(Ee=t.value.mermaid)==null?void 0:Ee.journey])]),key:"bar-mermaid"},{default:()=>{var B;return[s("div",{class:`${d}-toolbar-item`,title:(B=t.value.toolbarTips)==null?void 0:B.mermaid},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-mermaid"},null)])])]}});case"katex":return s(Ce,{relative:`#${i}`,visible:o.katex,onChange:B=>{o.katex=B},overlay:s("ul",{class:`${d}-menu`,onClick:()=>{o.katex=!1}},[s("li",{class:`${d}-menu-item`,onClick:()=>{a("katexInline")}},[(dt=t.value.katex)==null?void 0:dt.inline]),s("li",{class:`${d}-menu-item`,onClick:()=>{a("katexBlock")}},[(mt=t.value.katex)==null?void 0:mt.block])]),key:"bar-katex"},{default:()=>{var B;return[s("div",{class:`${d}-toolbar-item`,title:(B=t.value.toolbarTips)==null?void 0:B.katex},[s("svg",{class:`${d}-icon`,"aria-hidden":"true"},[s("use",{"xlink:href":"#md-editor-icon-formula"},null)])])]}})}else return l.defToolbars instanceof Array?l.defToolbars[p]||"":l.defToolbars&&l.defToolbars.children instanceof Array&&l.defToolbars.children[p]||""};return()=>{const p=u.value[0].map(C=>f(C)),w=u.value[1].map(C=>f(C));return s(Pe,null,[l.toolbars.length>0&&s("div",{class:`${d}-toolbar-wrapper`,id:i},[s("div",{class:`${d}-toolbar`},[s("div",{class:`${d}-toolbar-left`,ref:m},[p]),s("div",{class:`${d}-toolbar-right`},[w])])]),s("input",{ref:c,accept:"image/*",type:"file",multiple:!0,style:{display:"none"}},null),s(Xn,{linkVisible:r.linkVisible,clipVisible:r.clipVisible,type:r.type,onCancel:()=>{r.linkVisible=!1,r.clipVisible=!1},onOk:C=>{C&&a(r.type,{desc:C.desc,url:C.url}),r.linkVisible=!1,r.clipVisible=!1}},null)])}}});function Kt(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let _e=Kt();function ll(l){_e=l}const Zt=/[&<>"']/,il=new RegExp(Zt.source,"g"),Gt=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ol=new RegExp(Gt.source,"g"),rl={"&":"&","<":"<",">":">",'"':""","'":"'"},Ft=l=>rl[l];function Q(l,e){if(e){if(Zt.test(l))return l.replace(il,Ft)}else if(Gt.test(l))return l.replace(ol,Ft);return l}const al=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Wt(l){return l.replace(al,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const sl=/(^|[^\[])\^/g;function N(l,e){l=typeof l=="string"?l:l.source,e=e||"";const t={replace:(n,i)=>(i=i.source||i,i=i.replace(sl,"$1"),l=l.replace(n,i),t),getRegex:()=>new RegExp(l,e)};return t}const cl=/[^\w:]/g,ul=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Lt(l,e,t){if(l){let n;try{n=decodeURIComponent(Wt(t)).replace(cl,"").toLowerCase()}catch{return null}if(n.indexOf("javascript:")===0||n.indexOf("vbscript:")===0||n.indexOf("data:")===0)return null}e&&!ul.test(t)&&(t=pl(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const Ge={},dl=/^[^:]+:\/*[^/]*$/,ml=/^([^:]+:)[\s\S]*$/,hl=/^([^:]+:\/*[^/]*)[\s\S]*$/;function pl(l,e){Ge[" "+l]||(dl.test(l)?Ge[" "+l]=l+"/":Ge[" "+l]=Qe(l,"/",!0)),l=Ge[" "+l];const t=l.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:l.replace(ml,"$1")+e:e.charAt(0)==="/"?t?e:l.replace(hl,"$1")+e:l+e}const Je={exec:function(){}};function ie(l){let e=1,t,n;for(;e{let m=!1,u=a;for(;--u>=0&&r[u]==="\\";)m=!m;return m?"|":" |"}),n=t.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>e)n.splice(e);else for(;n.length1;)e&1&&(t+=l),e>>=1,l+=l;return t+l}function Pt(l,e,t,n){const i=e.href,o=e.title?Q(e.title):null,a=l[1].replace(/\\([\[\]])/g,"$1");if(l[0].charAt(0)!=="!"){n.state.inLink=!0;const r={type:"link",raw:t,href:i,title:o,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,r}return{type:"image",raw:t,href:i,title:o,text:Q(a)}}function gl(l,e){const t=l.match(/^(\s+)(?:```)/);if(t===null)return e;const n=t[1];return e.split(`
`).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[a]=o;return a.length>=n.length?i.slice(n.length):i}).join(`
-`)}class ct{constructor(e){this.options=e||_e}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Xe(n,`
-`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],i=gl(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const i=Xe(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,i,o,a,r,m,u,c,h,f,p,w,C=t[1].trim();const y=C.length>1,g={type:"list",raw:"",ordered:y,start:y?+C.slice(0,-1):"",loose:!1,items:[]};C=y?`\\d{1,9}\\${C.slice(-1)}`:`\\${C}`,this.options.pedantic&&(C=y?C:"[*+-]");const x=new RegExp(`^( {0,3}${C})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;e&&(w=!1,!(!(t=x.exec(e))||this.rules.block.hr.test(e)));){if(n=t[0],e=e.substring(n.length),c=t[2].split(`
+`)}class ct{constructor(e){this.options=e||_e}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Qe(n,`
+`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],i=gl(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const i=Qe(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,i,o,a,r,m,u,c,h,f,p,w,C=t[1].trim();const y=C.length>1,g={type:"list",raw:"",ordered:y,start:y?+C.slice(0,-1):"",loose:!1,items:[]};C=y?`\\d{1,9}\\${C.slice(-1)}`:`\\${C}`,this.options.pedantic&&(C=y?C:"[*+-]");const x=new RegExp(`^( {0,3}${C})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;e&&(w=!1,!(!(t=x.exec(e))||this.rules.block.hr.test(e)));){if(n=t[0],e=e.substring(n.length),c=t[2].split(`
`,1)[0],h=e.split(`
`,1)[0],this.options.pedantic?(a=2,p=c.trimLeft()):(a=t[2].search(/[^ ]/),a=a>4?1:a,p=c.slice(a),a+=t[1].length),m=!1,!c&&/^ *$/.test(h)&&(n+=h+`
`,e=e.substring(h.length+1),w=!0),!w){const S=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`),z=new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),R=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),F=new RegExp(`^ {0,${Math.min(3,a-1)}}#`);for(;e&&(f=e.split(`
@@ -10,9 +10,9 @@ import{d as G,af as J,x as ne,a as Z,g as s,b as Re,ae as P,F as Pe,y as M,U as
`+c.slice(a);else if(!m)p+=`
`+c;else break;!m&&!c.trim()&&(m=!0),n+=f+`
`,e=e.substring(f.length+1)}}g.loose||(u?g.loose=!0:/\n *\n *$/.test(n)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(p),i&&(o=i[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:n,task:!!i,checked:o,loose:!1,text:p}),g.raw+=n}g.items[g.items.length-1].raw=n.trimRight(),g.items[g.items.length-1].text=p.trimRight(),g.raw=g.raw.trimRight();const E=g.items.length;for(r=0;rR.type==="space"),z=S.every(R=>{const F=R.raw.split("");let v=0;for(const K of F)if(K===`
-`&&(v+=1),v>1)return!0;return!1});!g.loose&&S.length&&z&&(g.loose=!0,g.items[r].loose=!0)}return g}}html(e){const t=this.rules.block.html.exec(e);if(t){const n={type:"html",raw:t[0],pre:!this.options.sanitizer&&(t[1]==="pre"||t[1]==="script"||t[1]==="style"),text:t[0]};if(this.options.sanitize){const i=this.options.sanitizer?this.options.sanitizer(t[0]):X(t[0]);n.type="paragraph",n.text=i,n.tokens=this.lexer.inline(i)}return n}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(/\s+/g," "),i=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:i,title:o}}}table(e){const t=this.rules.block.table.exec(e);if(t){const n={type:"table",header:Dt(t[1]).map(i=>({text:i})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
+`&&(v+=1),v>1)return!0;return!1});!g.loose&&S.length&&z&&(g.loose=!0,g.items[r].loose=!0)}return g}}html(e){const t=this.rules.block.html.exec(e);if(t){const n={type:"html",raw:t[0],pre:!this.options.sanitizer&&(t[1]==="pre"||t[1]==="script"||t[1]==="style"),text:t[0]};if(this.options.sanitize){const i=this.options.sanitizer?this.options.sanitizer(t[0]):Q(t[0]);n.type="paragraph",n.text=i,n.tokens=this.lexer.inline(i)}return n}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(/\s+/g," "),i=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:i,title:o}}}table(e){const t=this.rules.block.table.exec(e);if(t){const n={type:"table",header:Dt(t[1]).map(i=>({text:i})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(n.header.length===n.align.length){n.raw=t[0];let i=n.align.length,o,a,r,m;for(o=0;o({text:u}));for(i=n.header.length,a=0;a/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):X(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const a=Xe(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{const a=fl(t[2],"()");if(a>-1){const m=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,m).trim(),t[3]=""}}let i=t[2],o="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),Pt(t,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(/\s+/g," ");if(i=t[i.toLowerCase()],!i){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return Pt(n,i,n[0],this.lexer)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrong.lDelim.exec(e);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;const o=i[1]||i[2]||"";if(!o||o&&(n===""||this.rules.inline.punctuation.exec(n))){const a=i[0].length-1;let r,m,u=a,c=0;const h=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);(i=h.exec(t))!=null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(m=r.length,i[3]||i[4]){u+=m;continue}else if((i[5]||i[6])&&a%3&&!((a+m)%3)){c+=m;continue}if(u-=m,u>0)continue;m=Math.min(m,m+u+c);const f=e.slice(0,a+i.index+(i[0].length-r.length)+m);if(Math.min(a,m)%2){const w=f.slice(1,-1);return{type:"em",raw:f,text:w,tokens:this.lexer.inlineTokens(w)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const i=/[^ ]/.test(n),o=/^ /.test(n)&&/ $/.test(n);return i&&o&&(n=n.substring(1,n.length-1)),n=X(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let i,o;return n[2]==="@"?(i=X(this.options.mangle?t(n[1]):n[1]),o="mailto:"+i):(i=X(n[1]),o=i),{type:"link",raw:n[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let i,o;if(n[2]==="@")i=X(this.options.mangle?t(n[0]):n[0]),o="mailto:"+i;else{let a;do a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(a!==n[0]);i=X(n[0]),n[1]==="www."?o="http://"+i:o=i}return{type:"link",raw:n[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):X(n[0]):n[0]:i=X(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:i}}}}const A={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Je,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};A._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;A._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;A.def=N(A.def).replace("label",A._label).replace("title",A._title).getRegex();A.bullet=/(?:[*+-]|\d{1,9}[.)])/;A.listItemStart=N(/^( *)(bull) */).replace("bull",A.bullet).getRegex();A.list=N(A.list).replace(/bull/g,A.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+A.def.source+")").getRegex();A._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";A._comment=/|$)/;A.html=N(A.html,"i").replace("comment",A._comment).replace("tag",A._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();A.paragraph=N(A._paragraph).replace("hr",A.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",A._tag).getRegex();A.blockquote=N(A.blockquote).replace("paragraph",A.paragraph).getRegex();A.normal=ie({},A);A.gfm=ie({},A.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});A.gfm.table=N(A.gfm.table).replace("hr",A.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",A._tag).getRegex();A.gfm.paragraph=N(A._paragraph).replace("hr",A.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",A.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",A._tag).getRegex();A.pedantic=ie({},A.normal,{html:N(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",A._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Je,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:N(A.normal._paragraph).replace("hr",A.hr).replace("heading",` *#{1,6} *[^
+`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Q(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Q(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const a=Qe(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{const a=fl(t[2],"()");if(a>-1){const m=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,m).trim(),t[3]=""}}let i=t[2],o="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),Pt(t,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(/\s+/g," ");if(i=t[i.toLowerCase()],!i){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return Pt(n,i,n[0],this.lexer)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrong.lDelim.exec(e);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;const o=i[1]||i[2]||"";if(!o||o&&(n===""||this.rules.inline.punctuation.exec(n))){const a=i[0].length-1;let r,m,u=a,c=0;const h=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);(i=h.exec(t))!=null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(m=r.length,i[3]||i[4]){u+=m;continue}else if((i[5]||i[6])&&a%3&&!((a+m)%3)){c+=m;continue}if(u-=m,u>0)continue;m=Math.min(m,m+u+c);const f=e.slice(0,a+i.index+(i[0].length-r.length)+m);if(Math.min(a,m)%2){const w=f.slice(1,-1);return{type:"em",raw:f,text:w,tokens:this.lexer.inlineTokens(w)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const i=/[^ ]/.test(n),o=/^ /.test(n)&&/ $/.test(n);return i&&o&&(n=n.substring(1,n.length-1)),n=Q(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let i,o;return n[2]==="@"?(i=Q(this.options.mangle?t(n[1]):n[1]),o="mailto:"+i):(i=Q(n[1]),o=i),{type:"link",raw:n[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let i,o;if(n[2]==="@")i=Q(this.options.mangle?t(n[0]):n[0]),o="mailto:"+i;else{let a;do a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(a!==n[0]);i=Q(n[0]),n[1]==="www."?o="http://"+i:o=i}return{type:"link",raw:n[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Q(n[0]):n[0]:i=Q(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:i}}}}const A={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Je,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};A._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;A._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;A.def=N(A.def).replace("label",A._label).replace("title",A._title).getRegex();A.bullet=/(?:[*+-]|\d{1,9}[.)])/;A.listItemStart=N(/^( *)(bull) */).replace("bull",A.bullet).getRegex();A.list=N(A.list).replace(/bull/g,A.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+A.def.source+")").getRegex();A._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";A._comment=/|$)/;A.html=N(A.html,"i").replace("comment",A._comment).replace("tag",A._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();A.paragraph=N(A._paragraph).replace("hr",A.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",A._tag).getRegex();A.blockquote=N(A.blockquote).replace("paragraph",A.paragraph).getRegex();A.normal=ie({},A);A.gfm=ie({},A.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});A.gfm.table=N(A.gfm.table).replace("hr",A.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",A._tag).getRegex();A.gfm.paragraph=N(A._paragraph).replace("hr",A.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",A.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",A._tag).getRegex();A.pedantic=ie({},A.normal,{html:N(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",A._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Je,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:N(A.normal._paragraph).replace("hr",A.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",A.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const _={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Je,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Je,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";_.punctuation=N(_.punctuation).replace(/punctuation/g,_._punctuation).getRegex();_.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;_.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;_._comment=N(A._comment).replace("(?:-->|$)","-->").getRegex();_.emStrong.lDelim=N(_.emStrong.lDelim).replace(/punct/g,_._punctuation).getRegex();_.emStrong.rDelimAst=N(_.emStrong.rDelimAst,"g").replace(/punct/g,_._punctuation).getRegex();_.emStrong.rDelimUnd=N(_.emStrong.rDelimUnd,"g").replace(/punct/g,_._punctuation).getRegex();_._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;_._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;_._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])?)+(?![-_])/;_.autolink=N(_.autolink).replace("scheme",_._scheme).replace("email",_._email).getRegex();_._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;_.tag=N(_.tag).replace("comment",_._comment).replace("attribute",_._attribute).getRegex();_._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;_._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;_._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;_.link=N(_.link).replace("label",_._label).replace("href",_._href).replace("title",_._title).getRegex();_.reflink=N(_.reflink).replace("label",_._label).replace("ref",A._label).getRegex();_.nolink=N(_.nolink).replace("ref",A._label).getRegex();_.reflinkSearch=N(_.reflinkSearch,"g").replace("reflink",_.reflink).replace("nolink",_.nolink).getRegex();_.normal=ie({},_);_.pedantic=ie({},_.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:N(/^!?\[(label)\]\((.*?)\)/).replace("label",_._label).getRegex(),reflink:N(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_._label).getRegex()});_.gfm=ie({},_.normal,{escape:N(_.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),e+=""+n+";";return e}class de{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_e,this.options.tokenizer=this.options.tokenizer||new ct,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:A.normal,inline:_.normal};this.options.pedantic?(t.block=A.pedantic,t.inline=_.pedantic):this.options.gfm&&(t.block=A.gfm,this.options.breaks?t.inline=_.breaks:t.inline=_.gfm),this.tokenizer.rules=t}static get rules(){return{block:A,inline:_}}static lex(e,t){return new de(t).lex(e)}static lexInline(e,t){return new de(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
`),this.blockTokens(e,this.tokens);let t;for(;t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(r,m,u)=>m+" ".repeat(u.length));let n,i,o,a;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(r=>(n=r.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),i=t[t.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
@@ -24,8 +24,8 @@ import{d as G,af as J,x as ne,a as Z,g as s,b as Re,ae as P,F as Pe,y as M,U as
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(n),a=o.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),i=t[t.length-1],i&&i.type==="text"?(i.raw+=`
`+n.raw,i.text+=`
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(n);continue}if(e){const r="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(r);break}else throw new Error(r)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,i,o,a=e,r,m,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)c.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,r.index)+"["+Rt("a",r[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,r.index)+"["+Rt("a",r[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(r=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,r.index+r[0].length-2)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(m||(u=""),m=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(n=c.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),i=t[t.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),i=t[t.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,a,u)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e,jt)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e,jt))){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const h=e.slice(1);let f;this.options.extensions.startInline.forEach(function(p){f=p.call({lexer:this},h),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(o=e.substring(0,c+1))}if(n=this.tokenizer.inlineText(o,vl)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(u=n.raw.slice(-1)),m=!0,i=t[t.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):t.push(n);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}}class ut{constructor(e){this.options=e||_e}code(e,t,n){const i=(t||"").match(/\S*/)[0];if(this.options.highlight){const o=this.options.highlight(e,i);o!=null&&o!==e&&(n=!0,e=o)}return e=e.replace(/\n$/,"")+`
-`,i?'
`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`${n}>
-`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?" ":" "}del(e){return`${e}`}link(e,t,n){if(e=Lt(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let i='"+n+"",i}image(e,t,n){if(e=Lt(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let i=`":">",i}text(e){return e}}class Qt{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class Yt{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,i=0;if(this.seen.hasOwnProperty(n)){i=this.seen[e];do i++,n=e+"-"+i;while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=i,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class re{constructor(e){this.options=e||_e,this.options.renderer=this.options.renderer||new ut,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Qt,this.slugger=new Yt}static parse(e,t){return new re(t).parse(e)}static parseInline(e,t){return new re(t).parseInline(e)}parse(e,t=!0){let n="",i,o,a,r,m,u,c,h,f,p,w,C,y,g,x,E,S,z,R;const F=e.length;for(i=0;i0&&x.tokens[0].type==="paragraph"?(x.tokens[0].text=z+" "+x.tokens[0].text,x.tokens[0].tokens&&x.tokens[0].tokens.length>0&&x.tokens[0].tokens[0].type==="text"&&(x.tokens[0].tokens[0].text=z+" "+x.tokens[0].tokens[0].text)):x.tokens.unshift({type:"text",text:z}):g+=z),g+=this.parse(x.tokens,y),f+=this.renderer.listitem(g,S,E);n+=this.renderer.list(f,w,C);continue}case"html":{n+=this.renderer.html(p.text);continue}case"paragraph":{n+=this.renderer.paragraph(this.parseInline(p.tokens));continue}case"text":{for(f=p.tokens?this.parseInline(p.tokens):p.text;i+1"u"||l===null)throw new Error("marked(): input parameter is undefined or null");if(typeof l!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(l)+", string expected");if(typeof e=="function"&&(t=e,e=null),e=ie({},I.defaults,e||{}),Xt(e),t){const i=e.highlight;let o;try{o=de.lex(l,e)}catch(m){return t(m)}const a=function(m){let u;if(!m)try{e.walkTokens&&I.walkTokens(o,e.walkTokens),u=re.parse(o,e)}catch(c){m=c}return e.highlight=i,m?t(m):t(null,u)};if(!i||i.length<3||(delete e.highlight,!o.length))return a();let r=0;I.walkTokens(o,function(m){m.type==="code"&&(r++,setTimeout(()=>{i(m.text,m.lang,function(u,c){if(u)return a(u);c!=null&&c!==m.text&&(m.text=c,m.escaped=!0),r--,r===0&&a()})},0))}),r===0&&a();return}function n(i){if(i.message+=`
-Please report this to https://github.com/markedjs/marked.`,e.silent)return"
An error occurred:
"+X(i.message+"",!0)+"
";throw i}try{const i=de.lex(l,e);if(e.walkTokens){if(e.async)return Promise.all(I.walkTokens(i,e.walkTokens)).then(()=>re.parse(i,e)).catch(n);I.walkTokens(i,e.walkTokens)}return re.parse(i,e)}catch(i){n(i)}}I.options=I.setOptions=function(l){return ie(I.defaults,l),ll(I.defaults),I};I.getDefaults=Kt;I.defaults=_e;I.use=function(...l){const e=I.defaults.extensions||{renderers:{},childTokens:{}};l.forEach(t=>{const n=ie({},t);if(n.async=I.defaults.async||n.async,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const o=e.renderers[i.name];o?e.renderers[i.name]=function(...a){let r=i.renderer.apply(this,a);return r===!1&&(r=o.apply(this,a)),r}:e.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");e[i.level]?e[i.level].unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),t.renderer){const i=I.defaults.renderer||new ut;for(const o in t.renderer){const a=i[o];i[o]=(...r)=>{let m=t.renderer[o].apply(i,r);return m===!1&&(m=a.apply(i,r)),m}}n.renderer=i}if(t.tokenizer){const i=I.defaults.tokenizer||new ct;for(const o in t.tokenizer){const a=i[o];i[o]=(...r)=>{let m=t.tokenizer[o].apply(i,r);return m===!1&&(m=a.apply(i,r)),m}}n.tokenizer=i}if(t.walkTokens){const i=I.defaults.walkTokens;n.walkTokens=function(o){let a=[];return a.push(t.walkTokens.call(this,o)),i&&(a=a.concat(i.call(this,o))),a}}I.setOptions(n)})};I.walkTokens=function(l,e){let t=[];for(const n of l)switch(t=t.concat(e.call(I,n)),n.type){case"table":{for(const i of n.header)t=t.concat(I.walkTokens(i.tokens,e));for(const i of n.rows)for(const o of i)t=t.concat(I.walkTokens(o.tokens,e));break}case"list":{t=t.concat(I.walkTokens(n.items,e));break}default:I.defaults.extensions&&I.defaults.extensions.childTokens&&I.defaults.extensions.childTokens[n.type]?I.defaults.extensions.childTokens[n.type].forEach(function(i){t=t.concat(I.walkTokens(n[i],e))}):n.tokens&&(t=t.concat(I.walkTokens(n.tokens,e)))}return t};I.parseInline=function(l,e){if(typeof l>"u"||l===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof l!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(l)+", string expected");e=ie({},I.defaults,e||{}),Xt(e);try{const t=de.lexInline(l,e);return e.walkTokens&&I.walkTokens(t,e.walkTokens),re.parseInline(t,e)}catch(t){if(t.message+=`
-Please report this to https://github.com/markedjs/marked.`,e.silent)return"
An error occurred:
"+X(t.message+"",!0)+"
";throw t}};I.Parser=re;I.parser=re.parse;I.Renderer=ut;I.TextRenderer=Qt;I.Lexer=de;I.lexer=de.lex;I.Tokenizer=ct;I.Slugger=Yt;I.parse=I;re.parse;de.lex;var bl=function(){var l=document.getSelection();if(!l.rangeCount)return function(){};for(var e=document.activeElement,t=[],n=0;n"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=Ot[e.format]||Ot.default;window.clipboardData.setData(h,l)}else c.clipboardData.clearData(),c.clipboardData.setData(e.format,l);e.onCopy&&(c.preventDefault(),e.onCopy(c.clipboardData))}),document.body.appendChild(r),o.selectNodeContents(r),a.addRange(o);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");m=!0}catch(c){t&&console.error("unable to copy using execCommand: ",c),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",l),e.onCopy&&e.onCopy(window.clipboardData),m=!0}catch(h){t&&console.error("unable to copy using clipboardData: ",h),t&&console.error("falling back to prompt"),n=wl("message"in e?e.message:yl),window.prompt(n,l)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),r&&document.body.removeChild(r),i()}return m}var Ae=xl;/*! medium-zoom 1.0.8 | MIT License | https://github.com/francoischalifour/medium-zoom */var ve=Object.assign||function(l){for(var e=1;e${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?" ":" "}del(e){return`${e}`}link(e,t,n){if(e=Lt(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let i='"+n+"",i}image(e,t,n){if(e=Lt(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let i=`":">",i}text(e){return e}}class Xt{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class Yt{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,i=0;if(this.seen.hasOwnProperty(n)){i=this.seen[e];do i++,n=e+"-"+i;while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=i,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class re{constructor(e){this.options=e||_e,this.options.renderer=this.options.renderer||new ut,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Xt,this.slugger=new Yt}static parse(e,t){return new re(t).parse(e)}static parseInline(e,t){return new re(t).parseInline(e)}parse(e,t=!0){let n="",i,o,a,r,m,u,c,h,f,p,w,C,y,g,x,E,S,z,R;const F=e.length;for(i=0;i0&&x.tokens[0].type==="paragraph"?(x.tokens[0].text=z+" "+x.tokens[0].text,x.tokens[0].tokens&&x.tokens[0].tokens.length>0&&x.tokens[0].tokens[0].type==="text"&&(x.tokens[0].tokens[0].text=z+" "+x.tokens[0].tokens[0].text)):x.tokens.unshift({type:"text",text:z}):g+=z),g+=this.parse(x.tokens,y),f+=this.renderer.listitem(g,S,E);n+=this.renderer.list(f,w,C);continue}case"html":{n+=this.renderer.html(p.text);continue}case"paragraph":{n+=this.renderer.paragraph(this.parseInline(p.tokens));continue}case"text":{for(f=p.tokens?this.parseInline(p.tokens):p.text;i+1"u"||l===null)throw new Error("marked(): input parameter is undefined or null");if(typeof l!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(l)+", string expected");if(typeof e=="function"&&(t=e,e=null),e=ie({},I.defaults,e||{}),Qt(e),t){const i=e.highlight;let o;try{o=de.lex(l,e)}catch(m){return t(m)}const a=function(m){let u;if(!m)try{e.walkTokens&&I.walkTokens(o,e.walkTokens),u=re.parse(o,e)}catch(c){m=c}return e.highlight=i,m?t(m):t(null,u)};if(!i||i.length<3||(delete e.highlight,!o.length))return a();let r=0;I.walkTokens(o,function(m){m.type==="code"&&(r++,setTimeout(()=>{i(m.text,m.lang,function(u,c){if(u)return a(u);c!=null&&c!==m.text&&(m.text=c,m.escaped=!0),r--,r===0&&a()})},0))}),r===0&&a();return}function n(i){if(i.message+=`
+Please report this to https://github.com/markedjs/marked.`,e.silent)return"
An error occurred:
"+Q(i.message+"",!0)+"
";throw i}try{const i=de.lex(l,e);if(e.walkTokens){if(e.async)return Promise.all(I.walkTokens(i,e.walkTokens)).then(()=>re.parse(i,e)).catch(n);I.walkTokens(i,e.walkTokens)}return re.parse(i,e)}catch(i){n(i)}}I.options=I.setOptions=function(l){return ie(I.defaults,l),ll(I.defaults),I};I.getDefaults=Kt;I.defaults=_e;I.use=function(...l){const e=I.defaults.extensions||{renderers:{},childTokens:{}};l.forEach(t=>{const n=ie({},t);if(n.async=I.defaults.async||n.async,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const o=e.renderers[i.name];o?e.renderers[i.name]=function(...a){let r=i.renderer.apply(this,a);return r===!1&&(r=o.apply(this,a)),r}:e.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");e[i.level]?e[i.level].unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),t.renderer){const i=I.defaults.renderer||new ut;for(const o in t.renderer){const a=i[o];i[o]=(...r)=>{let m=t.renderer[o].apply(i,r);return m===!1&&(m=a.apply(i,r)),m}}n.renderer=i}if(t.tokenizer){const i=I.defaults.tokenizer||new ct;for(const o in t.tokenizer){const a=i[o];i[o]=(...r)=>{let m=t.tokenizer[o].apply(i,r);return m===!1&&(m=a.apply(i,r)),m}}n.tokenizer=i}if(t.walkTokens){const i=I.defaults.walkTokens;n.walkTokens=function(o){let a=[];return a.push(t.walkTokens.call(this,o)),i&&(a=a.concat(i.call(this,o))),a}}I.setOptions(n)})};I.walkTokens=function(l,e){let t=[];for(const n of l)switch(t=t.concat(e.call(I,n)),n.type){case"table":{for(const i of n.header)t=t.concat(I.walkTokens(i.tokens,e));for(const i of n.rows)for(const o of i)t=t.concat(I.walkTokens(o.tokens,e));break}case"list":{t=t.concat(I.walkTokens(n.items,e));break}default:I.defaults.extensions&&I.defaults.extensions.childTokens&&I.defaults.extensions.childTokens[n.type]?I.defaults.extensions.childTokens[n.type].forEach(function(i){t=t.concat(I.walkTokens(n[i],e))}):n.tokens&&(t=t.concat(I.walkTokens(n.tokens,e)))}return t};I.parseInline=function(l,e){if(typeof l>"u"||l===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof l!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(l)+", string expected");e=ie({},I.defaults,e||{}),Qt(e);try{const t=de.lexInline(l,e);return e.walkTokens&&I.walkTokens(t,e.walkTokens),re.parseInline(t,e)}catch(t){if(t.message+=`
+Please report this to https://github.com/markedjs/marked.`,e.silent)return"