2026-07-27 09:50:33 +08:00
const _ _vite _ _mapDeps = ( i , m = _ _vite _ _mapDeps , d = ( m . f || ( m . f = [ "assets/index-D7-_AoG_.js" , "assets/index-DdQQsURt.js" , "assets/index-BlLFpInm.css" , "assets/index-6qzG7q2G.js" , "assets/index-C5hiplkI.js" , "assets/index-BrwIOYLV.js" , "assets/index-B1sgwzvr.js" , "assets/index-BeEQlZ2c.js" , "assets/index-L_W64-If.js" , "assets/index-D0PHUA6Q.js" , "assets/index-BD259pYv.js" , "assets/index-B0vsWwKd.js" , "assets/index-CqrXATMB.js" , "assets/index-ZXFcnL3j.js" , "assets/index-CaUd8fDM.js" , "assets/index-CZLgP3Md.js" , "assets/index-BAhGkGCe.js" , "assets/dockerfile-BKs6k2Af.js" , "assets/simple-mode-GW_nhZxv.js" , "assets/factor-kuTfRLto.js" , "assets/nsis-LdVXkNf5.js" , "assets/pug-DeIclll2.js" , "assets/javascript-iXu5QeM3.js" , "assets/index-CDXXwsn0.js" , "assets/index-Df8aziuP.js" ] ) ) ) => i . map ( i => d [ i ] ) ;
var bv = Object . defineProperty ; var Ef = t => { throw TypeError ( t ) } ; var vv = ( t , e , i ) => e in t ? bv ( t , e , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : i } ) : t [ e ] = i ; var Ze = ( t , e , i ) => vv ( t , typeof e != "symbol" ? e + "" : e , i ) , va = ( t , e , i ) => e . has ( t ) || Ef ( "Cannot " + i ) ; var S = ( t , e , i ) => ( va ( t , e , "read from private field" ) , i ? i . call ( t ) : e . get ( t ) ) , oe = ( t , e , i ) => e . has ( t ) ? Ef ( "Cannot add the same private member more than once" ) : e instanceof WeakSet ? e . add ( t ) : e . set ( t , i ) , U = ( t , e , i , n ) => ( va ( t , e , "write to private field" ) , n ? n . call ( t , i ) : e . set ( t , i ) , i ) , j = ( t , e , i ) => ( va ( t , e , "access private method" ) , i ) ; var mo = ( t , e , i , n ) => ( { set _ ( r ) { U ( t , e , r , i ) } , get _ ( ) { return S ( t , e , n ) } } ) ; import { d as Te , B as H , s as $ , D as te , G as Ae , H as Mn , ao as ys , z as ct , y as pe , F as Ct , M as Gs , bf as yv , a9 as si , aQ as Tn , P as li , j as He , I as xs , bg as xv , aD as A , an as kv } from "./index-DdQQsURt.js" ; const Sv = t => { const e = typeof t ; return e !== "function" && e !== "object" || t === null } , wv = t => { const e = t . flags === "" ? void 0 : t . flags ; return new RegExp ( t . source , e ) } , Ur = ( t , e = new WeakMap ) => { if ( t === null || Sv ( t ) ) return t ; if ( e . has ( t ) ) return e . get ( t ) ; if ( t instanceof RegExp ) return wv ( t ) ; if ( t instanceof Date ) return new Date ( t . getTime ( ) ) ; if ( t instanceof Function ) return t ; if ( t instanceof Map ) { const n = new Map ; return e . set ( t , n ) , t . forEach ( ( r , s ) => { n . set ( s , Ur ( r , e ) ) } ) , n } if ( t instanceof Set ) { const n = new Set ; e . set ( t , n ) ; for ( const r of t ) n . add ( Ur ( r , e ) ) ; return n } if ( Array . isArray ( t ) ) { const n = [ ] ; return e . set ( t , n ) , t . forEach ( r => { n . push ( Ur ( r , e ) ) } ) , n } const i = { } ; e . set ( t , i ) ; for ( const n in t ) Object . prototype . hasOwnProperty . call ( t , n ) && ( i [ n ] = Ur ( t [ n ] , e ) ) ; return i } , Kp = ( t , e = 200 ) => { let i = 0 ; return ( ... n ) => new Promise ( r => { i && ( clearTimeout ( i ) , r ( "cancel" ) ) , i = window . setTimeout ( ( ) => { t . apply ( void 0 , n ) , i = 0 , r ( "done" ) } , e ) } ) } , $v = ( t , e = { _blank : ! 0 , nofollow : ! 0 } ) => { const i = document . createElement ( "a" ) ; i . href = t , e . _blank && ( i . target = "_blank" ) , e . nofollow && ( i . rel = "noopener noreferrer" ) , i . click ( ) } , Jp = ( ) => { let t = - 1 ; return ( e , i , n , r = 100 ) => { const s = ( ) => { n && ( typeof r == "number" ? setTimeout ( n , r ) : n ( ) ) } ; t !== - 1 && ( cancelAnimationFrame ( t ) , s ( ) ) ; let o = e . scrollTop ; const l = ( ) => { t = - 1 ; const a = i - o ; o = o + a / 5 , Math . abs ( a ) < 1 ? ( e . scrollTo ( 0 , i ) , s ( ) ) : ( e . scrollTo ( 0 , o ) , t = requestAnimationFrame ( l ) ) } ; t = requestAnimationFrame ( l ) } } , Qv = ( t , e = 200 ) => { let i = 0 , n = null ; const r = s => { i === 0 && ( i = s ) , s - i >= e ? ( t . apply ( void 0 , n ) , n = null , i = 0 ) : window . requestAnimationFrame ( r ) } ; return ( ... s ) => { n === null && window . requestAnimationFrame ( r ) , n = s } } , _v = t => { const e = i => { const { scrollHeight : n , scrollWidth : r , offsetHeight : s , offsetWidth : o , scrollLeft : l , scrollTop : a } = t , u = i . x , c = i . y , h = d => { const p = a + c - d . y , m = l + u - d . x , O = n - s , g = r - o , b = { } ; m >= 0 && m <= g && ( b . left = m ) , p >= 0 && p <= O && ( b . top = p ) , t . scroll ( b ) } ; document . addEventListener ( "mousemove" , h ) ; const f = ( ) => { document . removeEventListener ( "mousemove" , h ) , document . removeEventListener ( "mouseup" , f ) } ; document . addEventListener ( "mouseup" , f ) } ; return t . addEventListener ( "mousedown" , e ) , ( ) => { t . removeEventListener ( "mousedown" , e ) } } , mu = ( ) => ` ${ Date . now ( ) . toString ( 36 ) } ${ Math . random ( ) . toString ( 36 ) . substring ( 2 ) } ` , fl = t => t !== null && typeof t == "object" && ! Array . isArray ( t ) , Pv = new Set ( [ "__proto__" , "constructor" , "prototype" ] ) , Cv = t => ! Pv . has ( t ) , Gl = ( t , e , i = { } ) => { if ( Array . isArray ( t ) && Array . isArray ( e ) ) return Ou ( t , e , i ) ; const { excludeKeys : n } = i , r = t , s = e ; for ( const o of Object . keys ( s ) ) { if ( ! Cv ( o ) ) continue ; const l = s [ o ] , a = r [ o ] ; n && n ( o ) ? r [ o ] = l : Array . isArray ( l ) && Array . isArray ( a ) ? r [ o ] = Ou ( a , l , i ) : fl ( l ) && fl ( a ) ? r [ o ] = Gl ( a , l , i ) : r [ o ] = l } return t } , Ou = ( t , e , i ) => { const n = t . slice ( ) ; return e . forEach ( ( r , s ) => { const o = n [ s ] ; Array . isArray ( r ) && Array . isArray ( o ) ? n [ s ] = Ou ( o , r , i ) : fl ( r ) && fl ( o ) ? n [ s ] = Gl ( o , r , i ) : n [ s ] = r } ) , n } , x = "md-editor" , Pe = "https://unpkg.com" , Tv = ` ${ Pe } /@highlightjs/cdn-assets@11.10.0/highlight.min.js ` , Rf = { main : ` ${ Pe } /prettier@3.3.3/standalone.js ` , markdown : ` ${ Pe } /prettier@3.3.3/plugins/markdown.js ` } , Av = { css : ` ${ Pe } /cropperjs@1.6.2/dist/cropper.min.css ` , js : ` ${ Pe } /cropperjs@1.6.2/dist/cropper.min.js ` } , Ev = ` ${ Pe } /screenfull@5.2.0/dist/screenfull.js ` , Rv = ` ${ Pe } /mermaid@11.9.0/dist/mermaid.min.js ` , Dv = { js : ` ${ Pe } /katex@0.16.22/dist/katex.min.js ` , css : ` ${ Pe } /katex@0.16.22/dist/katex.min.css ` } , gu = { a11y : { light : ` ${ Pe } /@highlightjs/cdn-assets@11.10.0/styles/a11y-light.min.css ` , dark : ` ${ Pe } /@highlightjs/cdn-assets@11.10.0/st
2026-07-24 11:28:14 +08:00
Expects a CSS selector , a Node element , a NodeList or an array .
See : https : //github.com/francoischalifour/medium-zoom`)}},Yv=function(e){var i=document.createElement("div");return i.classList.add("medium-zoom-overlay"),i.style.background=e,i},Nv=function(e){var i=e.getBoundingClientRect(),n=i.top,r=i.left,s=i.width,o=i.height,l=e.cloneNode(),a=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,u=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return l.removeAttribute("id"),l.style.position="absolute",l.style.top=n+a+"px",l.style.left=r+u+"px",l.style.width=s+"px",l.style.height=o+"px",l.style.transform="",l},jn=function(e,i){var n=gn({bubbles:!1,cancelable:!1,detail:void 0},i);if(typeof window.CustomEvent=="function")return new CustomEvent(e,n);var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r},Gv=function t(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(T){function M(){}T(M,M)},r=function(T){var M=T.target;if(M===R){p();return}y.indexOf(M)!==-1&&m({target:M})},s=function(){if(!(v||!_.original)){var T=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(Q-T)>P.scrollOffset&&setTimeout(p,150)}},o=function(T){var M=T.key||T.keyCode;(M==="Escape"||M==="Esc"||M===27)&&p()},l=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=T;if(T.background&&(R.style.background=T.background),T.container&&T.container instanceof Object&&(M.container=gn({},P.container,T.container)),T.template){var F=Uo(T.template)?T.template:document.querySelector(T.template);M.template=F}return P=gn({},P,M),y.forEach(function(B){B.dispatchEvent(jn("medium-zoom:update",{detail:{zoom:L}}))}),L},a=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t(gn({},P,T))},u=function(){for(var T=arguments.length,M=Array(T),F=0;F<T;F++)M[F]=arguments[F];var B=M.reduce(function(Y,J){return[].concat(Y,Bf(J))},[]);return B.filter(function(Y){return y.indexOf(Y)===-1}).forEach(function(Y){y.push(Y),Y.classList.add("medium-zoom-image")}),w.forEach(function(Y){var J=Y.type,ee=Y.listener,re=Y.options;B.forEach(function(ue){ue.addEventListener(J,ee,re)})}),L},c=function(){for(var T=arguments.length,M=Array(T),F=0;F<T;F++)M[F]=arguments[F];_.zoomed&&p();var B=M.length>0?M.reduce(function(Y,J){return[].concat(Y,Bf(J))},[]):y;return B.forEach(function(Y){Y.classList.remove("medium-zoom-image"),Y.dispatchEvent(jn("medium-zoom:detach",{detail:{zoom:L}}))}),y=y.filter(function(Y){return B.indexOf(Y)===-1}),L},h=function(T,M){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return y.forEach(function(B){B.addEventListener("medium-zoom:"+T,M,F)}),w.push({type:"medium-zoom:"+T,listener:M,options:F}),L},f=function(T,M){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return y.forEach(function(B){B.removeEventListener("medium-zoom:"+T,M,F)}),w=w.filter(function(B){return!(B.type==="medium-zoom:"+T&&B.listener.toString()===M.toString())}),L},d=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=T.target,F=function(){var Y={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},J=void 0,ee=void 0;if(P.container)if(P.container instanceof Object)Y=gn({},Y,P.container),J=Y.width-Y.left-Y.right-P.margin*2,ee=Y.height-Y.top-Y.bottom-P.margin*2;else{var re=Uo(P.container)?P.container:document.querySelector(P.container),ue=re.getBoundingClientRect(),ye=ue.width,Oe=ue.height,le=ue.left,Se=ue.top;Y=gn({},Y,{width:ye,height:Oe,left:le,top:Se})}J=J||Y.width-P.margin*2,ee=ee||Y.height-P.margin*2;var et=_.zoomedHd||_.original,Pi=Ff(et)?J:et.naturalWidth||J,dn=Ff(et)?ee:et.naturalHeight||ee,pn=et.getBoundingClientRect(),ao=pn.top,uo=pn.left,In=pn.width,Xn=pn.height,co=Math.min(Math.max(In,Pi),J)/In,ho=Math.min(Math.max(Xn,dn),ee)/Xn,zn=Math.min(co,ho),fo=(-uo+(J-In)/2+P.margin+Y.left)/zn,po=(-ao+(ee-Xn)/2+P.margin+Y.top)/zn,zr="scale("+zn+") translate3d("+fo+"px, "+po+"px, 0)";_.zoomed.style.
` ," "],sy=["{","}","|"," \\ ","^"," ` "].concat(ry),oy=[" ' "].concat(sy),Wf=[" % "," / "," ? "," ; "," # "].concat(oy),Yf=[" / "," ? "," # "],ly=255,Nf=/^[+a-z0-9A-Z_-]{0,63}$/,ay=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Gf={javascript:!0," javascript : ":!0},Uf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0," http : ":!0," https : ":!0," ftp : ":!0," gopher : ":!0," file : ":!0};function Cc(t,e){if(t&&t instanceof ml)return t;const i=new ml;return i.parse(t,e),i}ml.prototype.parse=function(t,e){let i,n,r,s=t;if(s=s.trim(),!e&&t.split(" # ").length===1){const u=ny.exec(s);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let o=ty.exec(s);if(o&&(o=o[0],i=o.toLowerCase(),this.protocol=o,s=s.substr(o.length)),(e||o||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(r=s.substr(0,2)===" //",r&&!(o&&Gf[o])&&(s=s.substr(2),this.slashes=!0)),!Gf[o]&&(r||o&&!Uf[o])){let u=-1;for(let p=0;p<Yf.length;p++)n=s.indexOf(Yf[p]),n!==-1&&(u===-1||n<u)&&(u=n);let c,h;u===-1?h=s.lastIndexOf("@"):h=s.lastIndexOf("@",u),h!==-1&&(c=s.slice(0,h),s=s.slice(h+1),this.auth=c),u=-1;for(let p=0;p<Wf.length;p++)n=s.indexOf(Wf[p]),n!==-1&&(u===-1||n<u)&&(u=n);u===-1&&(u=s.length),s[u-1]===":"&&u--;const f=s.slice(0,u);s=s.slice(u),this.parseHost(f),this.hostname=this.hostname||"";const d=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!d){const p=this.hostname.split(/\./);for(let m=0,O=p.length;m<O;m++){const g=p[m];if(g&&!g.match(Nf)){let b="";for(let y=0,w=g.length;y<w;y++)g.charCodeAt(y)>127?b+="x":b+=g[y];if(!b.match(Nf)){const y=p.slice(0,m),w=p.slice(m+1),v=g.match(ay);v&&(y.push(v[1]),w.unshift(v[2])),w.length&&(s=w.join(".")+s),this.hostname=y.join(".");break}}}}this.hostname.length>ly&&(this.hostname=""),d&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=s.indexOf("#");l!==-1&&(this.hash=s.substr(l),s=s.slice(0,l));const a=s.indexOf("?");return a!==-1&&(this.search=s.substr(a),s=s.slice(0,a)),s&&(this.pathname=s),Uf[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ml.prototype.parseHost=function(t){let e=iy.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const uy=Object.freeze(Object.defineProperty({__proto__:null,decode:pr,encode:Us,format:Pc,parse:Cc},Symbol.toStringTag,{value:"Module"})),lm=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,am=/[\0-\x1F\x7F-\x9F]/,cy=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Tc=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uD
` };Qi.fence=function(t,e,i,n,r){const s=t[e],o=s.info?mr(s.info).trim():"";let l="",a="";if(o){const c=o.split(/( \s +)/g);l=c[0],a=c.slice(2).join("")}let u;if(i.highlight?u=i.highlight(s.content,l,a)||sn(s.content):u=sn(s.content),u.indexOf("<pre")===0)return u+ `
` ;if(o){const c=s.attrIndex("class"),h=s.attrs?s.attrs.slice():[];c<0?h.push(["class",i.langPrefix+l]):(h[c]=h[c].slice(),h[c][1]+=" "+i.langPrefix+l);const f={attrs:h};return ` < pre > < code$ { r . renderAttrs ( f ) } > $ { u } < / c o d e > < / p r e >
` }return ` < pre > < code$ { r . renderAttrs ( s ) } > $ { u } < / c o d e > < / p r e >
` };Qi.image=function(t,e,i,n,r){const s=t[e];return s.attrs[s.attrIndex("alt")][1]=r.renderInlineAsText(s.children,i,n),r.renderToken(t,e,i)};Qi.hardbreak=function(t,e,i){return i.xhtmlOut? ` < br / >
` : ` < br >
` };Qi.softbreak=function(t,e,i){return i.breaks?i.xhtmlOut? ` < br / >
` : ` < br >
` : `
` };Qi.text=function(t,e){return sn(t[e].content)};Qi.html_block=function(t,e){return t[e].content};Qi.html_inline=function(t,e){return t[e].content};function Ar(){this.rules=Kl({},Qi)}Ar.prototype.renderAttrs=function(e){let i,n,r;if(!e.attrs)return"";for(r="",i=0,n=e.attrs.length;i<n;i++)r+=" "+sn(e.attrs[i][0])+'="'+sn(e.attrs[i][1])+'"';return r};Ar.prototype.renderToken=function(e,i,n){const r=e[i];let s="";if(r.hidden)return"";r.block&&r.nesting!==-1&&i&&e[i-1].hidden&&(s+= `
` ),s+=(r.nesting===-1?"</":"<")+r.tag,s+=this.renderAttrs(r),r.nesting===0&&n.xhtmlOut&&(s+=" /");let o=!1;if(r.block&&(o=!0,r.nesting===1&&i+1<e.length)){const l=e[i+1];(l.type==="inline"||l.hidden||l.nesting===-1&&l.tag===r.tag)&&(o=!1)}return s+=o? ` >
` :">",s};Ar.prototype.renderInline=function(t,e,i){let n="";const r=this.rules;for(let s=0,o=t.length;s<o;s++){const l=t[s].type;typeof r[l]<"u"?n+=r[l](t,s,e,i,this):n+=this.renderToken(t,s,e)}return n};Ar.prototype.renderInlineAsText=function(t,e,i){let n="";for(let r=0,s=t.length;r<s;r++)switch(t[r].type){case"text":n+=t[r].content;break;case"image":n+=this.renderInlineAsText(t[r].children,e,i);break;case"html_inline":case"html_block":n+=t[r].content;break;case"softbreak":case"hardbreak":n+= `
` ;break}return n};Ar.prototype.render=function(t,e,i){let n="";const r=this.rules;for(let s=0,o=t.length;s<o;s++){const l=t[s].type;l==="inline"?n+=this.renderInline(t[s].children,e,i):typeof r[l]<"u"?n+=r[l](t,s,e,i,this):n+=this.renderToken(t,s,e,i)}return n};function yt(){this.__rules__=[],this.__cache__=null}yt.prototype.__find__=function(t){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1};yt.prototype.__compile__=function(){const t=this,e=[""];t.__rules__.forEach(function(i){i.enabled&&i.alt.forEach(function(n){e.indexOf(n)<0&&e.push(n)})}),t.__cache__={},e.forEach(function(i){t.__cache__[i]=[],t.__rules__.forEach(function(n){n.enabled&&(i&&n.alt.indexOf(i)<0||t.__cache__[i].push(n.fn))})})};yt.prototype.at=function(t,e,i){const n=this.__find__(t),r=i||{};if(n===-1)throw new Error("Parser rule not found: "+t);this.__rules__[n].fn=e,this.__rules__[n].alt=r.alt||[],this.__cache__=null};yt.prototype.before=function(t,e,i,n){const r=this.__find__(t),s=n||{};if(r===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(r,0,{name:e,enabled:!0,fn:i,alt:s.alt||[]}),this.__cache__=null};yt.prototype.after=function(t,e,i,n){const r=this.__find__(t),s=n||{};if(r===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(r+1,0,{name:e,enabled:!0,fn:i,alt:s.alt||[]}),this.__cache__=null};yt.prototype.push=function(t,e,i){const n=i||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:n.alt||[]}),this.__cache__=null};yt.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);const i=[];return t.forEach(function(n){const r=this.__find__(n);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[r].enabled=!0,i.push(n)},this),this.__cache__=null,i};yt.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(i){i.enabled=!1}),this.enable(t,e)};yt.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);const i=[];return t.forEach(function(n){const r=this.__find__(n);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[r].enabled=!1,i.push(n)},this),this.__cache__=null,i};yt.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};function ui(t,e,i){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=i,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ui.prototype.attrIndex=function(e){if(!this.attrs)return-1;const i=this.attrs;for(let n=0,r=i.length;n<r;n++)if(i[n][0]===e)return n;return-1};ui.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]};ui.prototype.attrSet=function(e,i){const n=this.attrIndex(e),r=[e,i];n<0?this.attrPush(r):this.attrs[n]=r};ui.prototype.attrGet=function(e){const i=this.attrIndex(e);let n=null;return i>=0&&(n=this.attrs[i][1]),n};ui.prototype.attrJoin=function(e,i){const n=this.attrIndex(e);n<0?this.attrPush([e,i]):this.attrs[n][1]=this.attrs[n][1]+" "+i};function Om(t,e,i){this.src=t,this.env=i,this.tokens=[],this.inlineMode=!1,this.md=e}Om.prototype.Token=ui;const qy=/ \r \n ?| \n /g,Wy=/ \0 /g;function Yy(t){let e;e=t.src.replace(qy, `
` ),e=e.replace(Wy,"<22> "),t.src=e}function Ny(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}function Gy(t){const e=t.tokens;for(let i=0,n=e.length;i<n;i++){const r=e[i];r.type==="inline"&&t.md.inline.parse(r.content,t.md,t.env,r.children)}}function Uy(t){return/^<a[> \s ]/i.test(t)}function Hy(t){return/^< \/ a \s *>/i.test(t)}function Ky(t){const e=t.tokens;if(t.md.options.linkify)for(let i=0,n=e.length;i<n;i++){if(e[i].type!=="inline"||!t.md.linkify.pretest(e[i].content))continue;let r=e[i].children,s=0;for(let o=r.length-1;o>=0;o--){const l=r[o];if(l.type==="link_close"){for(o--;r[o].level!==l.level&&r[o].type!=="link_open";)o--;continue}if(l.type==="html_inline"&&(Uy(l.content)&&s>0&&s--,Hy(l.content)&&s++),!(s>0)&&l.type==="text"&&t.md.linkify.test(l.content)){const a=l.content;let u=t.md.linkify.match(a);const c=[];let h=l.level,f=0;u.length>0&&u[0].index===0&&o>0&&r[o-1].type==="text_special"&&(u=u.slice(1));for(let d=0;d<u.length;d++){const p=u[d].url,m=t.md.normalizeLink(p);if(!t.md.validateLink(m))continue;let O=u[d].text;u[d].schema?u[d].schema==="mailto:"&&!/^mailto:/i.test(O)?O=t.md.normalizeLinkText("mailto:"+O).replace(/^mailto:/,""):O=t.md.normalizeLinkText(O):O=t.md.normalizeLinkText("http://"+O).replace(/^http: \/ \/ /,"");const g=u[d].index;if(g>f){const v=new t.Token("text","",0);v.content=a.slice(f,g),v.level=h,c.push(v)}const b=new t.Token("link_open","a",1);b.attrs=[["href",m]],b.level=h++,b.markup="linkify",b.info="auto",c.push(b);const y=new t.Token("text","",0);y.content=O,y.level=h,c.push(y);const w=new t.Token("link_close","a",-1);w.level=--h,w.markup="linkify",w.info="auto",c.push(w),f=u[d].lastIndex}if(f<a.length){const d=new t.Token("text","",0);d.content=a.slice(f),d.level=h,c.push(d)}e[i].children=r=dm(r,o,c)}}}}const gm=/ \+ -| \. \. | \? \? \? \? |!!!!|,,|--/,Jy=/ \( (c|tm|r) \) /i,ex=/ \( (c|tm|r) \) /ig,tx={c:"©",r:"®",tm:"™"};function ix(t,e){return tx[e.toLowerCase()]}function nx(t){let e=0;for(let i=t.length-1;i>=0;i--){const n=t[i];n.type==="text"&&!e&&(n.content=n.content.replace(ex,ix)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function rx(t){let e=0;for(let i=t.length-1;i>=0;i--){const n=t[i];n.type==="text"&&!e&&gm.test(n.content)&&(n.content=n.content.replace(/ \+ -/g,"±").replace(/ \. {2,}/g,"…").replace(/([?!])…/g," $ 1..").replace(/([?!]){4,}/g," $ 1 $ 1 $ 1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]| $ )/mg," $ 1—").replace(/(^| \s )--(?= \s | $ )/mg," $ 1– ").replace(/(^|[^- \s ])--(?=[^- \s ]| $ )/mg," $ 1– ")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function sx(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(Jy.test(t.tokens[e].content)&&nx(t.tokens[e].children),gm.test(t.tokens[e].content)&&rx(t.tokens[e].children))}const ox=/['"]/,Kf=/['"]/g,Jf="’ ";function bo(t,e,i,n){t[e]||(t[e]=[]),t[e].push({pos:i,ch:n})}function lx(t,e){let i="",n=0;e.sort((r,s)=>r.pos-s.pos);for(let r=0;r<e.length;r++){const s=e[r];i+=t.slice(n,s.pos)+s.ch,n=s.pos+1}return i+t.slice(n)}function ax(t,e){let i;const n=[],r={};for(let s=0;s<t.length;s++){const o=t[s],l=t[s].level;for(i=n.length-1;i>=0&&!(n[i].level<=l);i--);if(n.length=i+1,o.type!=="text")continue;const a=o.content;let u=0;const c=a.length;e:for(;u<c;){Kf.lastIndex=u;const h=Kf.exec(a);if(!h)break;let f=!0,d=!0;u=h.index+1;const p=h[0]==="'";let m=32;if(h.index-1>=0)m=a.charCodeAt(h.index-1);else for(i=s-1;i>=0&&!(t[i].type==="softbreak"||t[i].type==="hardbreak");i--)if(t[i].content){m=t[i].content.charCodeAt(t[i].content.length-1);break}let O=32;if(u<c)O=a.charCodeAt(u);else for(i=s+1;i<t.length&&!(t[i].type==="softbreak"||t[i].type==="hardbreak");i++)if(t[i].content){O=t[i].content.charCodeAt(0);break}const g= $ s(m)||ws(m),b= $ s(O)||ws(O),y=Ss(m),w=Ss(O);if(w?f=!1:b&&(y||g||(f=!1)),y?d=!1:g&&(w||b||(d=!1)),O===34&&h[0]==='"'&&m>=48&&m<=57&&(d=f=!1),f&&d&&(f=g,d=b),!f&&!d){p&&bo(r,s,h.index,Jf);continue}if(d)for(i=
` ,s.map=[e,t.line],!0}function px(t,e,i,n){let r=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||r+3>s)return!1;const o=t.src.charCodeAt(r);if(o!==126&&o!==96)return!1;let l=r;r=t.skipChars(r,o);let a=r-l;if(a<3)return!1;const u=t.src.slice(l,r),c=t.src.slice(r,s);if(o===96&&c.indexOf(String.fromCharCode(o))>=0)return!1;if(n)return!0;let h=e,f=!1;for(;h++,!(h>=i||(r=l=t.bMarks[h]+t.tShift[h],s=t.eMarks[h],r<s&&t.sCount[h]<t.blkIndent));)if(t.src.charCodeAt(r)===o&&!(t.sCount[h]-t.blkIndent>=4)&&(r=t.skipChars(r,o),!(r-l<a)&&(r=t.skipSpaces(r),!(r<s)))){f=!0;break}a=t.sCount[e],t.line=h+(f?1:0);const d=t.push("fence","code",0);return d.info=c,d.content=t.getLines(e+1,h,a,!0),d.markup=u,d.map=[e,t.line],!0}function mx(t,e,i,n){let r=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];const o=t.lineMax;if(t.sCount[e]-t.blkIndent>=4||t.src.charCodeAt(r)!==62)return!1;if(n)return!0;const l=[],a=[],u=[],c=[],h=t.md.block.ruler.getRules("blockquote"),f=t.parentType;t.parentType="blockquote";let d=!1,p;for(p=e;p<i;p++){const y=t.sCount[p]<t.blkIndent;if(r=t.bMarks[p]+t.tShift[p],s=t.eMarks[p],r>=s)break;if(t.src.charCodeAt(r++)===62&&!y){let v=t.sCount[p]+1,Q,P;t.src.charCodeAt(r)===32?(r++,v++,P=!1,Q=!0):t.src.charCodeAt(r)===9?(Q=!0,(t.bsCount[p]+v)%4===3?(r++,v++,P=!1):P=!0):Q=!1;let _=v;for(l.push(t.bMarks[p]),t.bMarks[p]=r;r<s;){const R=t.src.charCodeAt(r);if(Qe(R))R===9?_+=4-(_+t.bsCount[p]+(P?1:0))%4:_++;else break;r++}d=r>=s,a.push(t.bsCount[p]),t.bsCount[p]=t.sCount[p]+1+(Q?1:0),u.push(t.sCount[p]),t.sCount[p]=_-v,c.push(t.tShift[p]),t.tShift[p]=r-t.bMarks[p];continue}if(d)break;let w=!1;for(let v=0,Q=h.length;v<Q;v++)if(h[v](t,p,i,!0)){w=!0;break}if(w){t.lineMax=p,t.blkIndent!==0&&(l.push(t.bMarks[p]),a.push(t.bsCount[p]),c.push(t.tShift[p]),u.push(t.sCount[p]),t.sCount[p]-=t.blkIndent);break}l.push(t.bMarks[p]),a.push(t.bsCount[p]),c.push(t.tShift[p]),u.push(t.sCount[p]),t.sCount[p]=-1}const m=t.blkIndent;t.blkIndent=0;const O=t.push("blockquote_open","blockquote",1);O.markup=">";const g=[e,0];O.map=g,t.md.block.tokenize(t,e,p);const b=t.push("blockquote_close","blockquote",-1);b.markup=">",t.lineMax=o,t.parentType=f,g[1]=t.line;for(let y=0;y<c.length;y++)t.bMarks[y+e]=l[y],t.tShift[y+e]=c[y],t.sCount[y+e]=u[y],t.bsCount[y+e]=a[y];return t.blkIndent=m,!0}function Ox(t,e,i,n){const r=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;let s=t.bMarks[e]+t.tShift[e];const o=t.src.charCodeAt(s++);if(o!==42&&o!==45&&o!==95)return!1;let l=1;for(;s<r;){const u=t.src.charCodeAt(s++);if(u!==o&&!Qe(u))return!1;u===o&&l++}if(l<3)return!1;if(n)return!0;t.line=e+1;const a=t.push("hr","hr",0);return a.map=[e,t.line],a.markup=Array(l+1).join(String.fromCharCode(o)),!0}function td(t,e){const i=t.eMarks[e];let n=t.bMarks[e]+t.tShift[e];const r=t.src.charCodeAt(n++);if(r!==42&&r!==45&&r!==43)return-1;if(n<i){const s=t.src.charCodeAt(n);if(!Qe(s))return-1}return n}function id(t,e){const i=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];let r=i;if(r+1>=n)return-1;let s=t.src.charCodeAt(r++);if(s<48||s>57)return-1;for(;;){if(r>=n)return-1;if(s=t.src.charCodeAt(r++),s>=48&&s<=57){if(r-i>=10)return-1;continue}if(s===41||s===46)break;return-1}return r<n&&(s=t.src.charCodeAt(r),!Qe(s))?-1:r}function gx(t,e){const i=t.level+2;for(let n=e+2,r=t.tokens.length-2;n<r;n++)t.tokens[n].level===i&&t.tokens[n].type==="paragraph_open"&&(t.tokens[n+2].hidden=!0,t.tokens[n].hidden=!0,n+=2)}function bx(t,e,i,n){let r,s,o,l,a=e,u=!0;if(t.sCount[a]-t.blkIndent>=4||t.listIndent>=0&&t.sCount[a]-t.listIndent>=4&&t.sCount[a]<t.blkIndent)return!1;let c=!1;n&&t.parentType==="paragraph"&&t.sCount[a]>=t.blkIndent&&(c=!0);let h,f,d;if((d=id(t,a))>=0){if(h=!0,o=t.bMarks[a]+t.tShift[a],f=Number(t.src.slice(o,d-1)),c&&f!==1)return!1}else if((d=td(t,a))>=0)h=!1;else return!1;if(c&&t.skipSpaces(d)>=t.eMarks[a])return!1;if(n)return!0;const p=t.src.charCodeAt(d-1),m=t.tokens.length;h?(l=t.push("ordered_list_open","ol",1),f!==1&&(l.attrs=[["start",f]])):l=t.push("bullet_list_open","ul",1);const O=[a,0];l.map=O,l.markup=String.fromCharCode(p);let g=!1;const b=t.md.block.ruler.ge
` ),n=['<span rn-wrapper aria-hidden="true">'];return i.forEach(()=>{n.push("<span></span>")}),n.push("</span>"), ` < span class = "${x}-code-block" > $ { t } < / s p a n > $ { n . j o i n ( " " ) } ` } , N 2 = ( t , e ) = > { i f ( ! t | | ! e ) r e t u r n 0 ; c o n s t i = t = = n u l l ? v o i d 0 : t . g e t B o u n d i n g C l i e n t R e c t ( ) ; i f ( e = = = d o c u m e n t . d o c u m e n t E l e m e n t ) r e t u r n i . t o p - e . c l i e n t T o p ; c o n s t n = e = = n u l l ? v o i d 0 : e . g e t B o u n d i n g C l i e n t R e c t ( ) ; r e t u r n i . t o p - n . t o p } , c d = ( ( ) = > { l e t t = 0 ; r e t u r n ( ) = > + + t } ) ( ) ; v a r G 2 = { h a s S u b s c r i b e r s : ! 1 } , U 2 = G 2 , H 2 = t y p e o f p e r f o r m a n c e = = " o b j e c t " & & p e r f o r m a n c e & & t y p e o f p e r f o r m a n c e . n o w = = " f u n c t i o n " ? p e r f o r m a n c e : D a t e , M m = n e w S e t , h d = t y p e o f p r o c e s s = = " o b j e c t " & & p r o c e s s ? p r o c e s s : { } , K 2 = ( t , e , i , n ) = > { t y p e o f h d . e m i t W a r n i n g = = " f u n c t i o n " ? h d . e m i t W a r n i n g ( t , e , i , n ) : c o n s o l e . e r r o r ( ` [ $ { i } ] $ { e } : $ { t } ` ) } , J 2 = t = > ! M m . h a s ( t ) , B i = t = > ! ! t & & t = = = M a t h . f l o o r ( t ) & & t > 0 & & i s F i n i t e ( t ) , Z m = t = > B i ( t ) ? t < = M a t h . p o w ( 2 , 8 ) ? U i n t 8 A r r a y : t < = M a t h . p o w ( 2 , 1 6 ) ? U i n t 1 6 A r r a y : t < = M a t h . p o w ( 2 , 3 2 ) ? U i n t 3 2 A r r a y : t < = N u m b e r . M A X _ S A F E _ I N T E G E R ? H o : n u l l : n u l l , H o = c l a s s e x t e n d s A r r a y { c o n s t r u c t o r ( t ) { s u p e r ( t ) , t h i s . f i l l ( 0 ) } } , w i , a r , e k = ( w i = c l a s s { c o n s t r u c t o r ( e , i ) { Z e ( t h i s , " h e a p " ) ; Z e ( t h i s , " l e n g t h " ) ; i f ( ! S ( w i , a r ) ) t h r o w n e w T y p e E r r o r ( " i n s t a n t i a t e S t a c k u s i n g S t a c k . c r e a t e ( n ) " ) ; t h i s . h e a p = n e w i ( e ) , t h i s . l e n g t h = 0 } s t a t i c c r e a t e ( e ) { l e t i = Z m ( e ) ; i f ( ! i ) r e t u r n [ ] ; U ( w i , a r , ! 0 ) ; l e t n = n e w w i ( e , i ) ; r e t u r n U ( w i , a r , ! 1 ) , n } p u s h ( e ) { t h i s . h e a p [ t h i s . l e n g t h + + ] = e } p o p ( ) { r e t u r n t h i s . h e a p [ - - t h i s . l e n g t h ] } } , a r = n e w W e a k M a p , o e ( w i , a r , ! 1 ) , w i ) , U p , H p , X t , w t , U t , S n , H t , u r , c r , K t , j e , J t , I e , _ e , n e , o t , $ t , i t , V e , e i , q e , t i , i i , Q t , _ t , n i , h r , l t , w n , Z , x u , $ n , A i , Y s , P t , I m , Q n , f r , N s , V i , q i , k u , V n , K o , X m , z m , J o , w e , S u , j m , F m , H r , w u , K r , W i , $ u , d r , t k = ( d r = c l a s s { c o n s t r u c t o r ( e ) { o e ( t h i s , Z ) ; o e ( t h i s , X t ) ; o e ( t h i s , w t ) ; o e ( t h i s , U t ) ; o e ( t h i s , S n ) ; o e ( t h i s , H t ) ; o e ( t h i s , u r ) ; o e ( t h i s , c r ) ; o e ( t h i s , K t ) ; Z e ( t h i s , " t t l " ) ; Z e ( t h i s , " t t l R e s o l u t i o n " ) ; Z e ( t h i s , " t t l A u t o p u r g e " ) ; Z e ( t h i s , " u p d a t e A g e O n G e t " ) ; Z e ( t h i s , " u p d a t e A g e O n H a s " ) ; Z e ( t h i s , " a l l o w S t a l e " ) ; Z e ( t h i s , " n o D i s p o s e O n S e t " ) ; Z e ( t h i s , " n o U p d a t e T T L " ) ; Z e ( t h i s , " m a x E n t r y S i z e " ) ; Z e ( t h i s , " s i z e C a l c u l a t i o n " ) ; Z e ( t h i s , " n o D e l e t e O n F e t c h R e j e c t i o n " ) ; Z e ( t h i s , " n o D e l e t e O n S t a l e G e t " ) ; Z e ( t h i s , " a l l o w S t a l e O n F e t c h A b o r t " ) ; Z e ( t h i s , " a l l o w S t a l e O n F e t c h R e j e c t i o n " ) ; Z e ( t h i s , " i g n o r e F e t c h A b o r t " ) ; Z e ( t h i s , " b a c k g r o u n d F e t c h S i z e " ) ; o e ( t h i s , j e ) ; o e ( t h i s , J t ) ; o e ( t h i s , I e ) ; o e ( t h i s , _ e ) ; o e ( t h i s , n e ) ; o e ( t h i s , o t ) ; o e ( t h i s , $ t ) ; o e ( t h i s , i t ) ; o e ( t h i s , V e ) ; o e ( t h i s , e i ) ; o e ( t h i s , q e ) ; o e ( t h i s , t i ) ; o e ( t h i s , i i ) ; o e ( t h i s , Q t ) ; o e ( t h i s , _ t ) ; o e ( t h i s , n i ) ; o e ( t h i s , h r ) ; o e ( t h i s , l t ) ; o e ( t h i s , w n ) ; o e ( t h i s , $ n , ( ) = > { } ) ; o e ( t h i s , A i , ( ) = > { } ) ; o e ( t h i s , Y s , ( ) = > { } ) ; o e ( t h i s , P t , ( ) = > ! 1 ) ; o e ( t h i s , Q n , e = > { } ) ; o e ( t h i s , f r , ( e , i , n ) = > { } ) ; o e ( t h i s , N s , ( e , i , n , r ) = > { i f ( n | | r ) t h r o w n e w T y p e E r r o r ( " c a n n o t s e t s i z e w i t h o u t s e t t i n g m a x S i z e o r m a x E n t r y S i z e o n c a c h e " ) ; r e t u r n 0 } ) ; Z e ( t h i s , U p , " L R U C a c h e " ) ; l e t { m a x : i = 0 , t t l : n , t t l R e s o l u t i o n : r = 1 , t t l A u t o p u r g e : s , u p d a t e A g e O n G e t : o , u p d a t e A g e O n H a s : l , a l l o w S t a l e : a , d i s p o s e : u , o n I n s e r t : c , d i s p o s e A f t e r : h , n o D i s p o s e O n S e t : f , n o U p d a t e T T L : d , m a x S i z e : p = 0 , m a x E n t r y S i z e : m = 0 , s i z e C a l c u l a t i o n : O , f e t c h M e t h o d : g , m e m o M e t h o d : b , n o D e l e t e O n F e t c h R e j e c t i o n : y , n o D e l e t e O n S t a l e G e t : w , a l l o w S t a l e O n F e t c h R e j e c t i o n : v , a l l o w S t a l e O n F e t c h A b o r t : Q , i g n o r e F e t c h A b o r t : P , b a c k g r o u n d F e t c h S i z e : _ = 1 , p e r f : R } = e ; i f ( t h i s . b a c k g r o u n d F e t c h S i z e = _ , R ! = = v o i d 0 & & t y p e o f ( R = = n u l l ? v o i d 0 : R . n o w ) ! = " f u n c t i o n " ) t h r o w n e w T y p e E r r o r ( " p e r f o p t i o n m u s t h a v e a n o w ( ) m e t h o d i f s p e c i f i e d " ) ; i f ( U ( t h i s , K t , R ? ? H 2 ) , i ! = = 0 & & ! B i ( i ) ) t h r o w n e w T y p e E r r o r ( " m a x o p t i o n m u s t b e a n o n n e g a t i v e i n t e g e r " ) ; l e t L = i ? Z m ( i ) : A r r a y ; i f ( ! L ) t h r o w n e w E r r o r ( " i n v a l i d m a x v a l u e : " + i ) ; i f ( U ( t h i s , X t , i ) , U ( t h i s , w t , p ) , t h i s . m a x E n t r y S i z e = m | | S ( t h i s , w t ) , t h i s . s i z e C a l c u l a t i o n = O , t h i s . s i z e C a l c u l a t i o n ) { i f ( ! S ( t h i s , w t ) & & ! t h i s . m a x E n t r y S i z e ) t h r o w n e w T y p e E r r o r ( " c a n n o t s e t s i z e C a l c u l a t i o n w i t h o u t s e t t i n g m a x S i z e o r m a x E n t r y S i z e " ) ; i f ( t y p e o f t h i s . s i z e C a l c u l a t i o n ! = " f u n c t i o n " ) t h r o w n e w T y p e E r r o r ( " s i z e C a l c u l a t i o n s e t t o n o n - f u n c t i o n " ) } i f ( b ! = = v o i d 0 & & t y p e o f b ! = " f u n c t i o n " ) t h r o w n e w T y p e E r r o r ( " m e m o M e t h o d m u s t b e a f u n c t i o n i f d e f i n e d " ) ; i f ( U ( t h i s , c r , b ) , g ! = = v o i d 0 & & t y p e o f g ! = " f u n c t i o n " ) t h r o w n e w T y p e E r r o r ( " f e t c h M e t h o d m u s t b e a f u n c t i o n i f s p e c i f i e d " ) ; i f ( U ( t h i s , u r , g ) , U ( t h i s , h r , ! ! g ) , U ( t h i s , I e , n e w M a p ) , U ( t h i s , _ e , A r r a y . f r o m ( { l e n g t h : i } ) . f i l l ( v o i d 0 ) ) , U ( t h i s , n e , A r r a y . f r o m ( { l e n g t h : i } ) . f i l l ( v o i d 0 ) ) , U ( t h i s , o t , n e w L ( i ) ) , U ( t h i s , $ t , n e w L ( i ) ) , U ( t h i s , i t , 0 ) , U ( t h i s , V e , 0 ) , U ( t h i s , e i , e k . c r e a t e ( i ) ) , U (
` :"")+e.getLines(i+1,a,e.tShift[i],!0)+(l&&l.trim()?l:""),p.map=[i,e.line],p.markup=d.open,!0}return!1},ck=(t,{katexRef:e,inlineDelimiters:i,blockDelimiters:n})=>{const r=(o,l,a,u,c)=>{const h=o[l],f={attrs:gl(h,[["class", ` $ { x } - katex - inline ` ]])};if(e.value){const d=e.value.renderToString(h.content,Me.katexConfig({throwOnError:!1}));return ` < span $ { c . renderAttrs ( f ) } data - processed > $ { d } < / s p a n > ` } e l s e r e t u r n ` < s p a n $ { c . r e n d e r A t t r s ( f ) } > $ { h . c o n t e n t } < / s p a n > ` } , s = ( o , l , a , u , c ) = > { c o n s t h = o [ l ] , f = { a t t r s : g l ( h , [ [ " c l a s s " , ` $ { x } - k a t e x - b l o c k ` ] ] ) } ; i f ( e . v a l u e ) { c o n s t d = e . v a l u e . r e n d e r T o S t r i n g ( h . c o n t e n t , M e . k a t e x C o n f i g ( { t h r o w O n E r r o r : ! 1 , d i s p l a y M o d e : ! 0 } ) ) ; r e t u r n ` < p $ { c . r e n d e r A t t r s ( f ) } d a t a - p r o c e s s e d > $ { d } < / p > ` } e l s e r e t u r n ` < p $ { c . r e n d e r A t t r s ( f ) } > $ { h . c o n t e n t } < / p > ` } ; t . i n l i n e . r u l e r . b e f o r e ( " e s c a p e " , " m a t h _ i n l i n e " , a k ( { d e l i m i t e r s : i | | f d . i n l i n e } ) ) , t . b l o c k . r u l e r . a f t e r ( " b l o c k q u o t e " , " m a t h _ b l o c k " , u k ( { d e l i m i t e r s : n | | f d . b l o c k } ) , { a l t : [ " p a r a g r a p h " , " r e f e r e n c e " , " b l o c k q u o t e " , " l i s t " ] } ) , t . r e n d e r e r . r u l e s . m a t h _ i n l i n e = r , t . r e n d e r e r . r u l e s . m a t h _ b l o c k = s } , h k = ( t , e ) = > { e = e | | { } ; c o n s t i = 3 , n = e . m a r k e r | | " ! " , r = n . c h a r C o d e A t ( 0 ) , s = n . l e n g t h ; l e t o = " " , l = " " ; c o n s t a = ( c , h , f , d , p ) = > { c o n s t m = c [ h ] ; r e t u r n m . t y p e = = = " a d m o n i t i o n _ o p e n " ? c [ h ] . a t t r P u s h ( [ " c l a s s " , ` $ { x } - a d m o n i t i o n $ { x } - a d m o n i t i o n - $ { m . i n f o } ` ] ) : m . t y p e = = = " a d m o n i t i o n _ t i t l e _ o p e n " & & c [ h ] . a t t r P u s h ( [ " c l a s s " , ` $ { x } - a d m o n i t i o n - t i t l e ` ] ) , p . r e n d e r T o k e n ( c , h , f ) } , u = c = > { c o n s t h = c . t r i m ( ) . s p l i t ( " " , 2 ) ; l = " " , o = h [ 0 ] , h . l e n g t h > 1 & & ( l = c . s u b s t r i n g ( o . l e n g t h + 2 ) ) } ; t . b l o c k . r u l e r . b e f o r e ( " c o d e " , " a d m o n i t i o n " , ( c , h , f , d ) = > { l e t p , m , O , g = ! 1 , b = c . b M a r k s [ h ] + c . t S h i f t [ h ] , y = c . e M a r k s [ h ] ; i f ( r ! = = c . s r c . c h a r C o d e A t ( b ) ) r e t u r n ! 1 ; f o r ( p = b + 1 ; p < = y & & n [ ( p - b ) % s ] = = = c . s r c [ p ] ; p + + ) ; c o n s t w = M a t h . f l o o r ( ( p - b ) / s ) ; i f ( w ! = = i ) r e t u r n ! 1 ; p - = ( p - b ) % s ; c o n s t v = c . s r c . s l i c e ( b , p ) , Q = c . s r c . s l i c e ( p , y ) ; i f ( u ( Q ) , d ) r e t u r n ! 0 ; f o r ( m = h ; m + + , ! ( m > = f | | ( b = c . b M a r k s [ m ] + c . t S h i f t [ m ] , y = c . e M a r k s [ m ] , b < y & & c . s C o u n t [ m ] < c . b l k I n d e n t ) ) ; ) i f ( r = = = c . s r c . c h a r C o d e A t ( b ) & & ! ( c . s C o u n t [ m ] - c . b l k I n d e n t > = 4 ) ) { f o r ( p = b + 1 ; p < = y & & n [ ( p - b ) % s ] = = = c . s r c [ p ] ; p + + ) ; i f ( ! ( M a t h . f l o o r ( ( p - b ) / s ) < w ) & & ( p - = ( p - b ) % s , p = c . s k i p S p a c e s ( p ) , ! ( p < y ) ) ) { g = ! 0 ; b r e a k } } c o n s t P = c . p a r e n t T y p e , _ = c . l i n e M a x ; r e t u r n c . p a r e n t T y p e = " r o o t " , c . l i n e M a x = m , O = c . p u s h ( " a d m o n i t i o n _ o p e n " , " d i v " , 1 ) , O . m a r k u p = v , O . b l o c k = ! 0 , O . i n f o = o , O . m a p = [ h , m ] , l & & ( O = c . p u s h ( " a d m o n i t i o n _ t i t l e _ o p e n " , " p " , 1 ) , O . m a r k u p = v + " " + o , O . m a p = [ h , m ] , O = c . p u s h ( " i n l i n e " , " " , 0 ) , O . c o n t e n t = l , O . m a p = [ h , c . l i n e - 1 ] , O . c h i l d r e n = [ ] , O = c . p u s h ( " a d m o n i t i o n _ t i t l e _ c l o s e " , " p " , - 1 ) , O . m a r k u p = v + " " + o ) , c . m d . b l o c k . t o k e n i z e ( c , h + 1 , m ) , O = c . p u s h ( " a d m o n i t i o n _ c l o s e " , " d i v " , - 1 ) , O . m a r k u p = c . s r c . s l i c e ( b , p ) , O . b l o c k = ! 0 , c . p a r e n t T y p e = P , c . l i n e M a x = _ , c . l i n e = m + ( g ? 1 : 0 ) , ! 0 } , { a l t : [ " p a r a g r a p h " , " r e f e r e n c e " , " b l o c k q u o t e " , " l i s t " ] } ) , t . r e n d e r e r . r u l e s . a d m o n i t i o n _ o p e n = a , t . r e n d e r e r . r u l e s . a d m o n i t i o n _ t i t l e _ o p e n = a , t . r e n d e r e r . r u l e s . a d m o n i t i o n _ t i t l e _ c l o s e = a , t . r e n d e r e r . r u l e s . a d m o n i t i o n _ c l o s e = a } , f k = ( t , e ) = > { t . r e n d e r e r . r u l e s . h e a d i n g _ o p e n = ( i , n ) = > { v a r r ; c o n s t s = i [ n ] , o = ( ( r = i [ n + 1 ] . c h i l d r e n ) = = n u l l ? v o i d 0 : r . r e d u c e ( ( a , u ) = > a + ( [ " t e x t " , " c o d e _ i n l i n e " , " m a t h _ i n l i n e " ] . i n c l u d e s ( u . t y p e ) & & u . c o n t e n t | | " " ) , " " ) ) | | " " , l = s . m a r k u p . l e n g t h ; r e t u r n e . h e a d s R e f . v a l u e . p u s h ( { t e x t : o , l e v e l : l , l i n e : s . m a p [ 0 ] } ) , s . m a p & & s . l e v e l = = = 0 & & s . a t t r S e t ( " i d " , e . m d H e a d i n g I d ( o , l , e . h e a d s R e f . v a l u e . l e n g t h ) ) , t . r e n d e r e r . r e n d e r T o k e n ( i , n , e ) } , t . r e n d e r e r . r u l e s . h e a d i n g _ c l o s e = ( i , n , r , s , o ) = > o . r e n d e r T o k e n ( i , n , r ) } , d k = ( t , e ) = > { c o n s t i = t . r e n d e r e r . r u l e s . f e n c e , n = t . u t i l s . u n e s c a p e A l l , r = / \ [ ( \ w * ) ( ? : : ( [ \ w ] * ) ) ? \ ] / , s = / : : ( o p e n | c l o s e ) / , o = h = > h . i n f o ? n ( h . i n f o ) . t r i m ( ) : " " , l = h = > { c o n s t f = o ( h ) , [ d = n u l l , p = " " ] = ( r . e x e c ( f ) | | [ ] ) . s l i c e ( 1 ) ; r e t u r n [ d , p ] } , a = h = > { c o n s t f = o ( h ) ; r e t u r n f ? f . s p l i t ( / ( \ s + ) / g ) [ 0 ] : " " } , u = h = > { c o n s t f = h . i n f o . m a t c h ( s ) | | [ ] , d = f [ 1 ] = = = " o p e n " | | f [ 1 ] ! = = " c l o s e " & & e . c o d e F o l d a b l e & & h . c o n t e n t . t r i m ( ) . s p l i t ( `
` ).length<e.autoFoldThreshold,p=f[1]||e.codeFoldable?"details":"div",m=f[1]||e.codeFoldable?"summary":"div";return{open:d,tagContainer:p,tagHeader:m}},c=(h,f,d,p,m)=>{var O;if(h[f].hidden)return"";const g=(O=e.usedLanguageTextRef.value)==null?void 0:O.copyCode.text,b=e.customIconRef.value.copy||g,y=!!e.customIconRef.value.copy,w= ` < span class = "${x}-collapse-tips" > $ { os ( "collapse-tips" , e . customIconRef . value ) } < / s p a n > ` , [ v ] = l ( h [ f ] ) ; i f ( v = = = n u l l ) { c o n s t { o p e n : e e , t a g C o n t a i n e r : r e , t a g H e a d e r : u e } = u ( h [ f ] ) , y e = [ [ " c l a s s " , ` $ { x } - c o d e ` ] ] ; e e & & y e . p u s h ( [ " o p e n " , " " ] ) ; c o n s t O e = { a t t r s : g l ( h [ f ] , y e ) } ; h [ f ] . i n f o = h [ f ] . i n f o . r e p l a c e ( s , " " ) ; c o n s t l e = i ( h , f , d , p , m ) ; r e t u r n `
< $ { re } $ { m . renderAttrs ( Oe ) } >
< $ { ue } class = "${x}-code-head" >
< div class = "${x}-code-flag" > < span > < / s p a n > < s p a n > < / s p a n > < s p a n > < / s p a n > < / d i v >
< div class = "${x}-code-action" >
< span class = "${x}-code-lang" > $ { t . utils . escapeHtml ( h [ f ] . info . trim ( ) ) } < / s p a n >
< span class = "${x}-copy-button" data - tips = "${g}" $ { y ? " data-is-icon=true" : "" } > $ { b } < / s p a n >
$ { e . extraTools instanceof Function ? e . extraTools ( { lang : h [ f ] . info . trim ( ) } ) : e . extraTools || "" }
$ { re === "details" ? w : "" }
< / d i v >
< / $ { u e } >
$ { le }
< / $ { r e } >
` }let Q,P,_,R,L="",I="",T="";const{open:M,tagContainer:F,tagHeader:B}=u(h[f]),Y=[["class", ` $ { x } - code ` ]];M&&Y.push(["open",""]);const J={attrs:gl(h[f],Y)};for(let ee=f;ee<h.length&&(Q=h[ee],[P,_]=l(Q),P===v);ee++){Q.info=Q.info.replace(r,"").replace(s,""),Q.hidden=!0;const re= ` $ { x } - codetab - $ { e . editorId } - $ { f } - $ { ee - f } ` ;R=ee-f>0?"":"checked",L+= `
< li >
< input
type = "radio"
id = "label-${x}-codetab-label-1-${e.editorId}-${f}-${ee-f}"
name = "${x}-codetab-label-${e.editorId}-${f}"
class = "${re}"
$ { R }
>
< label
for = "label-${x}-codetab-label-1-${e.editorId}-${f}-${ee-f}"
onclick = "this.getRootNode().querySelectorAll('.${re}').forEach(e => e.click())"
>
$ { t . utils . escapeHtml ( _ || a ( Q ) ) }
< / l a b e l >
< / l i > ` , I + = `
< div role = "tabpanel" >
< input
type = "radio"
name = "${x}-codetab-pre-${e.editorId}-${f}"
class = "${re}"
$ { R }
role = "presentation" >
$ { i ( h , ee , d , p , m ) }
< / d i v > ` , T + = `
< input
type = "radio"
name = "${x}-codetab-lang-${e.editorId}-${f}"
class = "${re}"
$ { R }
role = "presentation" >
< span class = $ { x } - code - lang role = "note" > $ { t . utils . escapeHtml ( a ( Q ) ) } < / s p a n > ` } r e t u r n `
< $ { F } $ { m . renderAttrs ( J ) } >
< $ { B } class = "${x}-code-head" >
< div class = "${x}-code-flag" >
< ul class = "${x}-codetab-label" role = "tablist" > $ { L } < / u l >
< / d i v >
< div class = "${x}-code-action" >
< span class = "${x}-codetab-lang" > $ { T } < / s p a n >
< span class = "${x}-copy-button" data - tips = "${g}" $ { y ? " data-is-icon=true" : "" } > $ { b } < / s p a n >
$ { e . extraTools instanceof Function ? e . extraTools ( { lang : h [ f ] . info . trim ( ) } ) : e . extraTools || "" }
$ { F === "details" ? w : "" }
< / d i v >
< / $ { B } >
$ { I }
< / $ { F } >
` };t.renderer.rules.fence=c,t.renderer.rules.code_block=c},dd=(t,e,i)=>{const n=t.attrIndex(e),r=[e,i];n<0?t.attrPush(r):(t.attrs=t.attrs||[],t.attrs[n]=r)},pk=t=>t.type==="inline",mk=t=>t.type==="paragraph_open",Ok=t=>t.type==="list_item_open",gk=t=>t.content.indexOf("[ ] ")===0||t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0,bk=(t,e)=>pk(t[e])&&mk(t[e-1])&&Ok(t[e-2])&&gk(t[e]),vk=(t,e)=>{const i=t[e].level-1;for(let n=e-1;n>=0;n--)if(t[n].level===i)return n;return-1},yk=t=>{const e=new t("html_inline","",0);return e.content="<label>",e},xk=t=>{const e=new t("html_inline","",0);return e.content="</label>",e},kk=(t,e,i)=>{const n=new i("html_inline","",0);return n.content='<label class="task-list-item-label" for="'+e+'">'+t+"</label>",n.attrs=[{for:e}],n},Sk=(t,e,i)=>{const n=new e("html_inline","",0),r=i.enabled?" ":' disabled="" ';return t.content.indexOf("[ ] ")===0?n.content='<input class="task-list-item-checkbox"'+r+'type="checkbox">':(t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0)&&(n.content='<input class="task-list-item-checkbox" checked=""'+r+'type="checkbox">'),n},wk=(t,e,i)=>{if(t.children=t.children||[],t.children.unshift(Sk(t,e,i)),t.children[1].content=t.children[1].content.slice(3),t.content=t.content.slice(3),i.label)if(i.labelAfter){t.children.pop();const n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);t.children[0].content=t.children[0].content.slice(0,-1)+' id="'+n+'">',t.children.push(kk(t.content,n,e))}else t.children.unshift(yk(e)),t.children.push(xk(e))}, $ k=(t,e={})=>{t.core.ruler.after("inline","github-task-lists",i=>{const n=i.tokens;for(let r=2;r<n.length;r++)bk(n,r)&&(wk(n[r],i.Token,e),dd(n[r-2],"class","task-list-item"+(e.enabled?" enabled":" ")),dd(n[vk(n,r-2)],"class","contains-task-list"))})},Qk=t=>{t.core.ruler.push("init-line-number",e=>(e.tokens.forEach(i=>{i.map&&(i.attrs||(i.attrs=[]),i.attrs.push(["data-line",i.map[0].toString()]))}),!0))},_k=(t,e)=>{const{editorConfig:i,markdownItConfig:n,markdownItPlugins:r,editorExtensions:s}=Me,o=H("editorId"),l=H("language"),a=H("usedLanguageText"),u=H("showCodeRowNumber"),c=H("theme"),h=H("customIcon"),f=H("rootRef"),d=pe([]);let p=()=>{};const m=rk(t),O=ok(t),{reRenderRef:g,replaceMermaid:b}=sk(t),y=Wt({html:!0,breaks:!0,linkify:!0});n(y,{editorId:o});const w=[{type:"image",plugin:X2,options:{figcaption:!0,classes:"md-zoom"}},{type:"admonition",plugin:hk,options:{}},{type:"taskList",plugin: $ k,options:{}},{type:"heading",plugin:fk,options:{mdHeadingId:t.mdHeadingId,headsRef:d}},{type:"code",plugin:dk,options:{editorId:o,usedLanguageTextRef:a,codeFoldable:t.codeFoldable,autoFoldThreshold:t.autoFoldThreshold,customIconRef:h}},{type:"sub",plugin:F2,options:{}},{type:"sup",plugin:q2,options:{}}];t.noKatex||w.push({type:"katex",plugin:ck,options:{katexRef:O}}),t.noMermaid||w.push({type:"mermaid",plugin:lk,options:{themeRef:c}}),r(w,{editorId:o}).forEach(T=>{y.use(T.plugin,T.options)});const v=y.options.highlight;y.set({highlight:(T,M,F)=>{if(v){const J=v(T,M,F);if(J)return J}let B;!t.noHighlight&&m.value?m.value.getLanguage(M)?B=m.value.highlight(T,{language:M,ignoreIllegals:!0}).value:B=m.value.highlightAuto(T).value:B=y.utils.escapeHtml(T);const Y=u?Y2(B.replace(/^ \n +| \n + $ /g,""),T.replace(/^ \n +| \n + $ /g,"")): ` < span class = "${x}-code-block" > $ { B . replace ( /^\n+|\n+$/g , "" ) } < / s p a n > ` ; r e t u r n ` < p r e > < c o d e c l a s s = " l a n g u a g e - $ { M } " l a n g u a g e = $ { M } > $ { Y } < / c o d e > < / p r e > ` } } ) , Q k ( y ) ; c o n s t Q = p e ( ` _ a r t i c l e - k e y _ $ { m u ( ) } ` ) , P = p e ( t . s a n i t i z e ( y . r e n d e r ( t . m o d e l V a l u e , { s r c L i n e s : t . m o d e l V a l u e . s p l i t ( `
` )}))),_=()=>{X.emit(o,Go,P.value),t.onHtmlChanged(P.value),t.onGetCatalog(d.value),X.emit(o,ss,d.value),li(()=>{b().then(()=>{var T,M;(T=s.mermaid)!=null&&T.enableZoom&&(p(),p=jf((M=f.value)==null?void 0:M.querySelectorAll( ` # $ { o } p . $ { x } - mermaid : not ( [ data - closed = false ] ) ` ),{customIcon:h.value}))})})},R=()=>{d.value=[],P.value=t.sanitize(y.render(t.modelValue,{srcLines:t.modelValue.split( `
` )})),_()},L=He(()=>(t.noKatex||O.value)&&(t.noHighlight||m.value));let I=-1;return te([si(t,"modelValue"),L,g,l],()=>{I=window.setTimeout(()=>{R()},e?0:i.renderDelay)}),te(()=>t.setting.preview,()=>{t.setting.preview&&li(()=>{b().then(()=>{var T,M;(T=s.mermaid)!=null&&T.enableZoom&&(p(),p=jf((M=f.value)==null?void 0:M.querySelectorAll( ` # $ { o } p . $ { x } - mermaid : not ( [ data - closed = false ] ) ` ),{customIcon:h.value}))}),X.emit(o,ss,d.value)})}),Ae(_),Ae(()=>{X.on(o,{name:nm,callback(){X.emit(o,ss,d.value)}}),X.on(o,{name:_c,callback:()=>{Q.value= ` _article - key _$ { mu ( ) } ` ,R()}})}),Mn(()=>{p(),clearTimeout(I)}),{html:P,key:Q}},pd={checked:{regexp:/- \[ x \] /,value:"- [ ]"},unChecked:{regexp:/- \[ \s \] /,value:"- [x]"}},Pk=(t,e)=>{const i=H("editorId"),n=H("rootRef");let r=()=>{};const s=()=>{if(!n.value)return!1;const o=n.value.querySelectorAll(".task-list-item.enabled"),l=a=>{var u;a.preventDefault();const c=a.target.checked?"unChecked":"checked",h=(u=a.target.parentElement)==null?void 0:u.dataset.line;if(!h)return;const f=Number(h),d=t.modelValue.split( `
` ),p=d[Number(f)].replace(pd[c].regexp,pd[c].value);t.previewOnly?(d[Number(f)]=p,t.onChange(d.join( `
` ))):X.emit(i,sm,f+1,p)};o.forEach(a=>{a.addEventListener("click",l)}),r=()=>{o.forEach(a=>{a.removeEventListener("click",l)})}};Mn(()=>{r()}),te([e],()=>{r(),li(s)},{immediate:!0})},Ck=(t,e,i)=>{const n=()=>{li(()=>{var s;(s=t.onRemount)==null||s.call(t)})},r=s=>{s&&n()};te([e,i],n),te(()=>t.setting.preview,r),te(()=>t.setting.htmlPreview,r),Ae(n)},Bm={modelValue:{type:String,default:""},onChange:{type:Function,default:()=>{}},setting:{type:Object,default:()=>({preview:!0})},onHtmlChanged:{type:Function,default:()=>{}},onGetCatalog:{type:Function,default:()=>{}},mdHeadingId:{type:Function,default:()=>""},noMermaid:{type:Boolean,default:!1},sanitize:{type:Function,default:t=>t},noKatex:{type:Boolean,default:!1},formatCopiedText:{type:Function,default:t=>t},noHighlight:{type:Boolean,default:!1},previewOnly:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean},sanitizeMermaid:{type:Function},codeFoldable:{type:Boolean},autoFoldThreshold:{type:Number},onRemount:{type:Function}},Tk={...Bm,updateModelValue:{type:Function,default:()=>{}},placeholder:{type:String,default:""},scrollAuto:{type:Boolean},autofocus:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},maxlength:{type:Number},autoDetectCode:{type:Boolean},onBlur:{type:Function,default:()=>{}},onFocus:{type:Function,default:()=>{}},noPrettier:{type:Boolean},completions:{type:Array},catalogVisible:{type:Boolean},theme:{type:String,default:"light"},onInput:{type:Function},onDrop:{type:Function,default:()=>{}},inputBoxWidth:{type:String},oninputBoxWidthChange:{type:Function},transformImgUrl:{type:Function,default:t=>t},catalogLayout:{type:String},catalogMaxDepth:{type:Number}},Ak=t=>{const i=new DOMParser().parseFromString(t,"text/html");return Array.from(i.body.childNodes)},Ek=(t,e)=>{const i=[],n=[];if(t.forEach((r,s)=>{const o=e[s];if(!o){i.push({index:s,newNode:r});return}(r.nodeType!==o.nodeType||r.textContent!==o.textContent||r.nodeType===1&&r.outerHTML!==o.outerHTML)&&i.push({index:s,newNode:r})}),e.length>t.length)for(let r=t.length;r<e.length;r++)n.push(e[r]);return{updates:i,deletes:n}},Rk=Te({name:"UpdateOnDemand",props:{html:{type:String,required:!0}},setup(t){const e=H("editorId"),i=H("previewTheme"),n=H("showCodeRowNumber"),r=pe(),s=t.html,o=(l,a)=>{r.value&&(a.forEach(u=>{u.remove()}),l.forEach(({index:u,newNode:c})=>{var h,f,d;const p=(h=r.value)==null?void 0:h.childNodes[u];p?(d=r.value)==null||d.replaceChild(c.cloneNode(!0),p):(f=r.value)==null||f.appendChild(c.cloneNode(!0))}))};return te(()=>t.html,l=>{var a;const u=Ak(l),c=Array.from(((a=r.value)==null?void 0:a.childNodes)||[]),{updates:h,deletes:f}=Ek(u,c);o(h,f)}),()=> $ ("div",{id: ` $ { e } - preview ` ,class:[ ` $ { x } - preview ` , ` $ { i == null ? void 0 : i . value } - theme ` ,n&& ` $ { x } - scrn ` ],innerHTML:s,ref:r},null)}}),Vm=Te({name:"ContentPreview",props:Bm,setup(t){const e=H("editorId"),{html:i,key:n}=_k(t,t.previewOnly);return nk(t,i,n),ik(t,i),Pk(t,i),Ck(t,i,n),()=> $ (Gs,null,[t.setting.preview&& $ ("div",{id: ` $ { e } - preview - wrapper ` ,class: ` $ { x } - preview - wrapper ` ,key:"content-preview-wrapper"},[ $ (Rk,{key:n.value,html:i.value},null)]),!t.previewOnly&&t.setting.htmlPreview&& $ ("div",{id: ` $ { e } - html - wrapper ` ,class: ` $ { x } - preview - wrapper ` ,key:"html-preview-wrapper"},[ $ ("div",{class: ` $ { x } - html ` },[i.value])])])}}),Dk=(t,e,i)=>{const{editorId:n}=i,r=ct({buildFinished:!1,html:""});te(()=>t.modelValue,()=>{r.buildFinished=!1}),Ae(()=>{X.on(n,{name:Go,callback(s){r.buildFinished=!0,r.html=s}}),X.on(n,{name:Ul,callback(){const s=new Promise(o=>{if(r.buildFinished)o(r.html);else{const l=a=>{o(a),X.remove(n,Go,l)};X.on(n,{name:Go,callback:l})}});t.onSave?t.onSave(t.modelValue,s):e.emit("onSave",t.modelValue,s)}})})},qm=(t,e)=>{const i=Me.editorExtensions.highlight,n=Me.editorExtensionsAttrs.highlight,r=jk(t);Ct("editorId",r),Ct("rootRef",e),Ct("theme",He(()=>t.theme)),Ct("language",He(()=>t.language)),Ct("highlight",He(()=>{const{js:o}=i,l={...gu,...i.css},{js:a,css:u={}}=n||{},c=t.codeStyleReverse&&t.codeStyleReverseList.includes(t.previewTheme)?"dark":t.theme,h=l[t.codeTheme]?l[t.codeTheme][c]:gu.atom[c],f=l[t.codeTheme]&&u[t.codeThe
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Wk=t=>t.replace(/ ( [ a - z0 - 9 ] ) ( [ A - Z ] ) / g , "$1-$2" ) . toLowerCase ( ) ; / * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /var yo={xmlns:"http:/ / www . w3 . org / 2000 / svg ",width:24,height:24,viewBox:" 0 0 24 24 ",fill:" none ",stroke:" currentColor "," stroke - width ":2," stroke - linecap ":" round "," stroke - linejoin ":" round " } ; / * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* / c o n s t Y k = ( { s i z e : t , s t r o k e W i d t h : e = 2 , a b s o l u t e S t r o k e W i d t h : i , c o l o r : n , i c o n N o d e : r , n a m e : s , c l a s s : o , . . . l } , { s l o t s : a } ) = > x s ( " s v g " , { . . . y o , w i d t h : t | | y o . w i d t h , h e i g h t : t | | y o . h e i g h t , s t r o k e : n | | y o . s t r o k e , " s t r o k e - w i d t h " : i ? N u m b e r ( e ) * 2 4 / N u m b e r ( t ) : e , c l a s s : [ " l u c i d e " , ` l u c i d e - $ { W k ( s ? ? " i c o n " ) } ` ] , . . . l } , [ . . . r . m a p ( u = > x s ( . . . u ) ) , . . . a . d e f a u l t ? [ a . d e f a u l t ( ) ] : [ ] ] ) ; / * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const me=(t,e)=>(i,{slots:n})=>xs(Yk,{...i,iconNode:e,name:t},n);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Nk=me("BoldIcon",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Gk=me("ChartAreaIcon",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Uk=me("CodeXmlIcon",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Hk=me("CodeIcon",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Kk=me("ExpandIcon",[["path",{d:"m21 21-6-6m6 6v-4.8m0 4.8h-4.8",key:"1c15vz"}],["path",{d:"M3 16.2V21m0 0h4.8M3 21l6-6",key:"1fsnz2"}],["path",{d:"M21 7.8V3m0 0h-4.8M21 3l-6 6",key:"hawz9i"}],["path",{d:"M3 7.8V3m0 0h4.8M3 3l6 6",key:"u9ee12"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Jk=me("EyeIcon",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const eS=me("ForwardIcon",[["polyline",{points:"15 17 20 12 15 7",key:"1w3sku"}],["path",{d:"M4 18v-2a4 4 0 0 1 4-4h12",key:"jmiej9"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const tS=me("HeadingIcon",[["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M6 20V4",key:"1w1bmo"}],["path",{d:"M18 20V4",key:"o2hl4u"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const iS=me("ImageIcon",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const nS=me("ItalicIcon",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const rS=me("LinkIcon",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const sS=me("ListOrderedIcon",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const oS=me("ListTodoIcon",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const lS=me("ListTreeIcon",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const aS=me("ListIcon",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const uS=me("Maximize2Icon",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const cS=me("Minimize2Icon",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const hS=me("QuoteIcon",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const fS=me("ReplyIcon",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const dS=me("SaveIcon",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const pS=me("ShrinkIcon",[["path",{d:"m15 15 6 6m-6-6v4.8m0-4.8h4.8",key:"17vawe"}],["path",{d:"M9 19.8V15m0 0H4.2M9 15l-6 6",key:"chjx8e"}],["path",{d:"M15 4.2V9m0 0h4.8M15 9l6-6",key:"lav6yq"}],["path",{d:"M9 4.2V9m0 0H4.2M9 9 3 3",key:"1pxi2q"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const md=me("SquareCodeIcon",[["path",{d:"M10 9.5 8 12l2 2.5",key:"3mjy60"}],["path",{d:"m14 9.5 2 2.5-2 2.5",key:"1bir2l"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const mS=me("SquareSigmaIcon",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M16 8.9V7H8l4 5-4 5h8v-1.9",key:"9nih0i"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const OS=me("StrikethroughIcon",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const gS=me("SubscriptIcon",[["path",{d:"m4 5 8 8",key:"1eunvl"}],["path",{d:"m12 5-8 8",key:"1ah0jp"}],["path",{d:"M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07",key:"e8ta8j"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const bS=me("SuperscriptIcon",[["path",{d:"m4 19 8-8",key:"hr47gm"}],["path",{d:"m12 19-8-8",key:"1dhhmo"}],["path",{d:"M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06",key:"1dfcux"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const vS=me("TableIcon",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const yS=me("Trash2Icon",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const xS=me("UnderlineIcon",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const kS=me("UploadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const SS=me("ViewIcon",[["path",{d:"M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2",key:"mrq65r"}],["path",{d:"M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2",key:"be3xqs"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]);/ * *
* @ license lucide - vue - next v0 . 453.0 - ISC
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const wS=me("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),$S=()=>$("svg",{xmlns:"http:/ / www . w3 . org / 2000 / svg ",viewBox:" 0 0 24 24 ",fill:" none ",stroke:" currentColor "," stroke - width ":" 2 "," stroke - linecap ":" round "," stroke - linejoin ":" round ",class:" lucide lucide - github - icon "},[$(" path ",{d:" M15 22 v - 4 a4 . 8 4.8 0 0 0 - 1 - 3.5 c3 0 6 - 2 6 - 5.5 . 08 - 1.25 - . 27 - 2.48 - 1 - 3.5 . 28 - 1.15 . 28 - 2.35 0 - 3.5 0 0 - 1 0 - 3 1.5 - 2.64 - . 5 - 5.36 - . 5 - 8 0 C6 2 5 2 5 2 c - . 3 1.15 - . 3 2.35 0 3.5 A5 . 403 5.403 0 0 0 4 9 c0 3.5 3 5.5 6 5.5 - . 39.49 - . 68 1.05 - . 85 1.65 - . 17.6 - . 22 1.23 - . 15 1.85 v4 "},null),$(" path ",{d:" M9 18 c - 4.51 2 - 5 - 2 - 7 - 2 "},null)]),QS={bold:Nk,underline:xS,italic:nS," strike - through ":OS,title:tS,sub:gS,sup:bS,quote:hS," unordered - list ":aS," ordered - list ":sS,task:oS," code - row ":Hk,code:md,link:rS,image:iS,table:vS,revoke:fS,next:eS,save:dS,prettier:md,minimize:cS,maximize:uS," fullscreen - exit ":pS,fullscreen:Kk," preview - only ":SS,preview:Jk," preview - html ":Uk,catalog:lS,github:$S,mermaid:Gk,formula:mS,close:wS,delete:yS,upload:kS},_S=Te({name:`${x}-icon-set`,props:{name:{type:String,default:" "}},setup(t){return()=>xs(QS[t.name],{class:`${x}-icon`})}}),ce=Te({name:`${x}-icon`,props:{name:{type:String,default:" "}},setup(t){const e=H(" customIcon ");return()=>{const i=e.value[t.name];return typeof i==" object "?typeof i.component==" object "?xs(i.component,i.props):$(" span ",{innerHTML:i.component},null):$(_S,{name:t.name},null)}}}),PS={title:{type:[String,Object],default:" "},visible:{type:Boolean,default:!1},width:{type:String,default:" auto "},height:{type:String,default:" auto "},onClose:{type:Function},showAdjust:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},onAdjust:{type:Function,default:()=>{}},class:{type:String,default:void 0},style:{type:[Object,String],default:()=>({})},showMask:{type:Boolean,default:!0}},_n=Te({name:" MdModal ",props:PS,emits:[" onClose "],setup(t,e){const i=H(" theme "),n=H(" rootRef "),r=pe(t.visible),s=pe([`${x}-modal`]),o=pe(),l=pe(),a=pe(),u=Tn();let c=()=>{};const h=ct({maskStyle:{zIndex:-1},modalStyle:{zIndex:-1},initPos:{left:" 0 px ",top:" 0 px "},historyPos:{left:" 0 px ",top:" 0 px "}}),f=He(()=>t.isFullscreen?{width:" 100 % ",height:" 100 % "}:{width:t.width,height:t.height});te(()=>t.isFullscreen,m=>{m?c():li(()=>{c=zf(l.value,(O,g)=>{h.initPos.left=O+" px ",h.initPos.top=g+" px "})})}),te(()=>t.visible,m=>{m?(h.maskStyle.zIndex=Me.editorConfig.zIndex+cd(),h.modalStyle.zIndex=Me.editorConfig.zIndex+cd(),s.value.push(" zoom - in "),r.value=m,li(()=>{const O=o.value.offsetWidth/2,g=o.value.offsetHeight/2,b=document.documentElement.clientWidth/2,y=document.documentElement.clientHeight/2;h.initPos.left=b-O+" px ",h.initPos.top=y-g+" px ",t.isFullscreen||(c=zf(l.value,(w,v)=>{h.initPos.left=w+" px ",h.initPos.top=v+" px "}))}),setTimeout(()=>{s.value=s.value.filter(O=>O!==" zoom - in ")},140)):(s.value.push(" zoom - out "),c(),setTimeout(()=>{s.value=s.value.filter(O=>O!==" zoom - out "),r.value=m},130))});const d=He(()=>({display:r.value?" block ":" none "})),p=He(()=>typeof t.style==" string "?[t.style,d.value].join(" ; "):t.style instanceof Object?{...d.value,...t.style}:d.value);return Ae(()=>{var m;const O=(m=n.value)==null?void 0:m.getRootNode();a.value=O instanceof Document?document.body:O}),()=>{const m=ht({ctx:e}),O=ht({props:t,ctx:e}," title ");return a.value?$(xv,{to:a.value},{default:()=>[$(" div ",{ref:u,class:`${x}-modal-container`," data - theme ":i.value},[$(" div ",{class:t.class,style:p.value},[t.showMask&&$(" div ",{class:`${x}-modal-mask`,style:h.maskStyle,onClick:()=>{var g;(g=t.onClose)==null||g.call(t),e.emit(" onClose ")}},null),$(" div ",{class:s.value,style:{...h.modalStyle,...h.initPos,...f.value},ref:o},[$(" div ",{class:`${x}-modal-header`,ref:l},[O||" "]),$(" div ",{class:`${x}-modal-body`},[m]),$(" div ",{class:`${x}-modal-func`},[t.showAdjust&&$(" div ",{class:`${x}-modal-adjust`,onClick:g=>{g.stopPropagation(),t.isFullscreen?h.initPos=h.historyPos:(h.historyPos=h.initPos,h.initPos={left:" 0 ",top:" 0 "}),t.onAdjust(!t.isFullscreen)}},[$(ce,{name:t.isFullscreen?" minimize ":" maximize "},null)]),$(" div " , { class : ` ${ x } -modal-close ` , onClick : g => { var b ; g . stopPropa
` ){[e,i]=Or(this,e,i);let r="";for(let s=0,o=0;s<=i&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(r+=n),e<a&&i>s&&(r+=l.slice(Math.max(0,e-s),i-s)),s=a+1}return r}flatten(e){for(let i of this.text)e.push(i)}scanIdentical(){return 0}static split(e,i){let n=[],r=-1;for(let s of e)n.push(s),r+=s.length+1,n.length==32&&(i.push(new Le(n,r)),n=[],r=-1);return r>-1&&i.push(new Le(n,r)),i}}class Oi extends de{constructor(e,i){super(),this.children=e,this.length=i,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,i,n,r){for(let s=0;;s++){let o=this.children[s],l=r+o.length,a=n+o.lines-1;if((i?a:l)>=e)return o.lineInner(e,i,n,r);r=l+1,n=a+1}}decompose(e,i,n,r){for(let s=0,o=0;o<=i&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&i>=o){let u=r&((o<=e?1:0)|(a>=i?2:0));o>=e&&a<=i&&!u?n.push(l):l.decompose(e-o,i-o,n,u)}o=a+1}}replace(e,i,n){if([e,i]=Or(this,e,i),n.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let o=this.children[r],l=s+o.length;if(e>=s&&i<=l){let a=o.replace(e-s,i-s,n),u=this.lines-o.lines+a.lines;if(a.lines<u>>4&&a.lines>u>>6){let c=this.children.slice();return c[r]=a,new Oi(c,this.length-(i-e)+n.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,i,n)}sliceString(e,i=this.length,n= `
` ){[e,i]=Or(this,e,i);let r="";for(let s=0,o=0;s<this.children.length&&o<=i;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(r+=n),e<a&&i>o&&(r+=l.sliceString(e-o,i-o,n)),o=a+1}return r}flatten(e){for(let i of this.children)i.flatten(e)}scanIdentical(e,i){if(!(e instanceof Oi))return 0;let n=0,[r,s,o,l]=i>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=i,s+=i){if(r==o||s==l)return n;let a=this.children[r],u=e.children[s];if(a!=u)return n+a.scanIdentical(u,i);n+=a.length+1}}static from(e,i=e.reduce((n,r)=>n+r.length+1,-1)){let n=0;for(let d of e)n+=d.lines;if(n<32){let d=[];for(let p of e)p.flatten(d);return new Le(d,i)}let r=Math.max(32,n>>5),s=r<<1,o=r>>1,l=[],a=0,u=-1,c=[];function h(d){let p;if(d.lines>s&&d instanceof Oi)for(let m of d.children)h(m);else d.lines>o&&(a>o||!a)?(f(),l.push(d)):d instanceof Le&&a&&(p=c[c.length-1])instanceof Le&&d.lines+p.lines<=32?(a+=d.lines,u+=d.length+1,c[c.length-1]=new Le(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>r&&f(),a+=d.lines,u+=d.length+1,c.push(d))}function f(){a!=0&&(l.push(c.length==1?c[0]:Oi.from(c,u)),u=-1,a=c.length=0)}for(let d of e)h(d);return f(),l.length==1?l[0]:new Oi(l,i)}}de.empty=new Le([""],0);function ZS(t){let e=-1;for(let i of t)e+=i.length+1;return e}function tl(t,e,i=0,n=1e9){for(let r=0,s=0,o=!0;s<t.length&&r<=n;s++){let l=t[s],a=r+l.length;a>=i&&(a>n&&(l=l.slice(0,n-r)),r<i&&(l=l.slice(i-r)),o?(e[e.length-1]+=l,o=!1):e.push(l)),r=a+1}return e}function vd(t,e,i){return tl(t,[""],e,i)}class as{constructor(e,i=1){this.dir=i,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[i>0?1:(e instanceof Le?e.text.length:e.children.length)<<1]}nextInner(e,i){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],s=this.offsets[n],o=s>>1,l=r instanceof Le?r.text.length:r.children.length;if(o==(i>0?l:0)){if(n==0)return this.done=!0,this.value="",this;i>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(i>0?0:1)){if(this.offsets[n]+=i,e==0)return this.lineBreak=!0,this.value= `
` ,this;e--}else if(r instanceof Le){let a=r.text[o+(i<0?-1:0)];if(this.offsets[n]+=i,a.length>Math.max(0,e))return this.value=e==0?a:i>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[o+(i<0?-1:0)];e>a.length?(e-=a.length,this.offsets[n]+=i):(i<0&&this.offsets[n]--,this.nodes.push(a),this.offsets.push(i>0?1:(a instanceof Le?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Jm{constructor(e,i,n){this.value="",this.done=!1,this.cursor=new as(e,i>n?-1:1),this.pos=i>n?e.length:0,this.from=Math.min(i,n),this.to=Math.max(i,n)}nextInner(e,i){if(i<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,i<0?this.pos-this.to:this.from-this.pos);let n=i<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*i,this.value=r.length<=n?r:i<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class eO{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:i,lineBreak:n,value:r}=this.inner.next(e);return i&&this.afterBreak?(this.value="",this.afterBreak=!1):i?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(de.prototype[Symbol.iterator]=function(){return this.iter()},as.prototype[Symbol.iterator]=Jm.prototype[Symbol.iterator]=eO.prototype[Symbol.iterator]=function(){return this});let IS=class{constructor(e,i,n,r){this.from=e,this.to=i,this.number=n,this.text=r}get length(){return this.to-this.from}};function Or(t,e,i){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,i))]}function Ge(t,e,i=!0,n=!0){return LS(t,e,i,n)}function XS(t){return t>=56320&&t<57344}function zS(t){return t>=55296&&t<56320}function Ni(t,e){let i=t.charCodeAt(e);if(!zS(i)||e+1==t.length)return i;let n=t.charCodeAt(e+1);return XS(n)?(i-55296<<10)+(n-56320)+65536:i}function tO(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function vn(t){return t<65536?1:2}const _u=/ \r \n ?| \n /;var ut=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(ut||(ut={}));class $ i{constructor(e){this.sections=e}get length(){let e=0;for(let i=0;i<this.sections.length;i+=2)e+=this.sections[i];return e}get newLength(){let e=0;for(let i=0;i<this.sections.length;i+=2){let n=this.sections[i+1];e+=n<0?this.sections[i]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let i=0,n=0,r=0;i<this.sections.length;){let s=this.sections[i++],o=this.sections[i++];o<0?(e(n,r,s),r+=s):r+=o,n+=s}}iterChangedRanges(e,i=!1){Pu(this,e,i)}get invertedDesc(){let e=[];for(let i=0;i<this.sections.length;){let n=this.sections[i++],r=this.sections[i++];r<0?e.push(n,r):e.push(r,n)}return new $ i(e)}composeDesc(e){return this.empty?e:e.empty?this:iO(this,e)}mapDesc(e,i=!1){return e.empty?this:Cu(this,e,i)}mapPos(e,i=-1,n=ut.Simple){let r=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],u=r+l;if(a<0){if(u>e)return s+(e-r);s+=l}else{if(n!=ut.Simple&&u>=e&&(n==ut.TrackDel&&r<e&&u>e||n==ut.TrackBefore&&r<e||n==ut.TrackAfter&&u>e))return null;if(u>e||u==e&&i<0&&!l)return e==r||i<0?s:s+a;s+=a}r=u}if(e>r)throw new RangeError( ` Position $ { e } is out of range for changeset of length $ { r } ` );return s}touchesRange(e,i=e){for(let n=0,r=0;n<this.sections.length&&r<=i;){let s=this.sections[n++],o=this.sections[n++],l=r+s;if(o>=0&&r<=i&&l>=e)return r<e&&l>i?"cover":!0;r=l}return!1}toString(){let e="";for(let i=0;i<this.sections.length;){let n=this.sections[i++],r=this.sections[i++];e+=(e?" ":"")+n+(r>=
` }get readOnly(){return this.facet(cO)}phrase(e,...i){for(let n of this.facet(fe.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return i.length&&(e=e.replace(/ \$ ( \$ | \d *)/g,(n,r)=>{if(r==" $ ")return" $ ";let s=+(r||1);return!s||s>i.length?n:i[s-1]})),e}languageDataAt(e,i,n=-1){let r=[];for(let s of this.facet(sO))for(let o of s(this,i,n))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){let i=this.languageDataAt("wordChars",e);return HS(i.length?i[0]:"")}wordAt(e){let{text:i,from:n,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-n,l=e-n;for(;o>0;){let a=Ge(i,o,!1);if(s(i.slice(a,o))!=Je.Word)break;o=a}for(;l<r;){let a=Ge(i,l);if(s(i.slice(l,a))!=Je.Word)break;l=a}return o==l?null:E.range(o+n,l+n)}}fe.allowMultipleSelections=Eu;fe.tabSize=G.define({combine:t=>t.length?t[0]:4});fe.lineSeparator=oO;fe.readOnly=cO;fe.phrases=G.define({compare(t,e){let i=Object.keys(t),n=Object.keys(e);return i.length==n.length&&i.every(r=>t[r]==e[r])}});fe.languageData=sO;fe.changeFilter=lO;fe.transactionFilter=aO;fe.transactionExtender=uO;gi.reconfigure=ae.define();function na(t,e,i={}){let n={};for(let r of t)for(let s of Object.keys(r)){let o=r[s],l=n[s];if(l===void 0)n[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(i,s))n[s]=i[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let r in e)n[r]===void 0&&(n[r]=e[r]);return n}class on{eq(e){return this==e}range(e,i=e){return Lu.create(e,i,this)}}on.prototype.startSide=on.prototype.endSide=0;on.prototype.point=!1;on.prototype.mapMode=ut.TrackDel;function Ic(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}let Lu=class dO{constructor(e,i,n){this.from=e,this.to=i,this.value=n}static create(e,i,n){return new dO(e,i,n)}};function Mu(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Xc{constructor(e,i,n,r){this.from=e,this.to=i,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,i,n,r=0){let s=n?this.to:this.from;for(let o=r,l=s.length;;){if(o==l)return o;let a=o+l>>1,u=s[a]-e||(n?this.value[a].endSide:this.value[a].startSide)-i;if(a==o)return u>=0?o:l;u>=0?l=a:o=a+1}}between(e,i,n,r){for(let s=this.findIndex(i,-1e9,!0),o=this.findIndex(n,1e9,!1,s);s<o;s++)if(r(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,i){let n=[],r=[],s=[],o=-1,l=-1;for(let a=0;a<this.value.length;a++){let u=this.value[a],c=this.from[a]+e,h=this.to[a]+e,f,d;if(c==h){let p=i.mapPos(c,u.startSide,u.mapMode);if(p==null||(f=d=p,u.startSide!=u.endSide&&(d=i.mapPos(c,u.endSide),d<f)))continue}else if(f=i.mapPos(c,u.startSide),d=i.mapPos(h,u.endSide),f>d||f==d&&u.startSide>0&&u.endSide<=0)continue;(d-f||u.endSide-u.startSide)<0||(o<0&&(o=f),u.point&&(l=Math.max(l,d-f)),n.push(u),r.push(f-o),s.push(d-o))}return{mapped:n.length?new Xc(r,s,n,l):null,pos:o}}}class be{constructor(e,i,n,r){this.chunkPos=e,this.chunk=i,this.nextLayer=n,this.maxPoint=r}static create(e,i,n,r){return new be(e,i,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let i of this.chunk)e+=i.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:i=[],sort:n=!1,filterFrom:r=0,filterTo:s=this.length}=e,o=e.filter;if(i.length==0&&!o)return this;if(n&&(i=i.slice().sort(Mu)),this.isEmpty)return i.length?be.of(i):this;let l=new pO(this,null,-1).goto(0),a=0,u=[],c=new gr;for(;l.value||a<i.length;)if(a<i.length&&(l.from-i[a].from||l.startSide-i[a].value.startSide)>=0){let h=i[a++];c.addInner(h.from,h.to,h.value)||u.push(h)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==i.length||this.chunkEnd(l.chunkIndex)<i[a].from)&&(!o||r>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||r>l.to||s<l.from||o(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||u.push(Lu.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLaye
` )}static newName(){let e= $ d[wd]||1;return $ d[wd]=e+1,Iu+e.toString(36)}static mount(e,i,n){let r=e[Xu],s=n&&n.nonce;r?s&&r.setNonce(s):r=new ew(e,s),r.mount(Array.isArray(i)?i:[i],e)}}let Qd=new Map;class ew{constructor(e,i){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=Qd.get(n);if(s)return e[Xu]=s;this.sheet=new r.CSSStyleSheet,Qd.set(n,this)}else this.styleTag=n.createElement("style"),i&&this.styleTag.setAttribute("nonce",i);this.modules=[],e[Xu]=this}mount(e,i){let n=this.sheet,r=0,s=0;for(let o=0;o<e.length;o++){let l=e[o],a=this.modules.indexOf(l);if(a<s&&a>-1&&(this.modules.splice(a,1),s--,a=-1),a==-1){if(this.modules.splice(s++,0,l),n)for(let u=0;u<l.rules.length;u++)n.insertRule(l.rules[u],r++)}else{for(;s<a;)r+=this.modules[s++].rules.length;r+=l.rules.length,s++}}if(n)i.adoptedStyleSheets.indexOf(this.sheet)<0&&(i.adoptedStyleSheets=[this.sheet,...i.adoptedStyleSheets]);else{let o="";for(let a=0;a<this.modules.length;a++)o+=this.modules[a].getRules()+ `
` ;this.styleTag.textContent=o;let l=i.head||i;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var an={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:" ` ",219:" [ ",220:" \ \ ",221:" ] ",222:" '"},Cs={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:' "'},tw=typeof navigator<" u "&&/Mac/.test(navigator.platform),iw=typeof navigator<" u "&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ke=0;Ke<10;Ke++)an[48+Ke]=an[96+Ke]=String(Ke);for(var Ke=1;Ke<=24;Ke++)an[Ke+111]=" F "+Ke;for(var Ke=65;Ke<=90;Ke++)an[Ke]=String.fromCharCode(Ke+32),Cs[Ke]=String.fromCharCode(Ke);for(var Ca in an)Cs.hasOwnProperty(Ca)||(Cs[Ca]=an[Ca]);function nw(t){var e=tw&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||iw&&t.shiftKey&&t.key&&t.key.length==1||t.key==" Unidentified ",i=!e&&t.key||(t.shiftKey?Cs:an)[t.keyCode]||t.key||" Unidentified ";return i==" Esc "&&(i=" Escape "),i==" Del "&&(i=" Delete "),i==" Left "&&(i=" ArrowLeft "),i==" Up "&&(i=" ArrowUp "),i==" Right "&&(i=" ArrowRight "),i==" Down "&&(i=" ArrowDown "),i}function We(){var t=arguments[0];typeof t==" string "&&(t=document.createElement(t));var e=1,i=arguments[1];if(i&&typeof i==" object "&&i.nodeType==null&&!Array.isArray(i)){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=i[n];typeof r==" string "?t.setAttribute(n,r):r!=null&&(t[n]=r)}e++}for(;e<arguments.length;e++)mO(t,arguments[e]);return t}function mO(t,e){if(typeof e==" string ")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var i=0;i<e.length;i++)mO(t,e[i]);else throw new RangeError(" Unsupported child node : "+e)}let at=typeof navigator<" u "?navigator:{userAgent:" ",vendor:" ",platform:" "},zu=typeof document<" u "?document:{documentElement:{style:{}}};const ju=/Edge\/(\d+)/.exec(at.userAgent),OO=/MSIE \d/.test(at.userAgent),Fu=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(at.userAgent),ra=!!(OO||Fu||ju),_d=!ra&&/gecko\/(\d+)/i.test(at.userAgent),Ta=!ra&&/Chrome\/(\d+)/.exec(at.userAgent),Pd=" webkitFontSmoothing "in zu.documentElement.style,Bu=!ra&&/Apple Computer/.test(at.vendor),Cd=Bu&&(/Mobile\/\w+/.test(at.userAgent)||at.maxTouchPoints>2);var q={mac:Cd||/Mac/.test(at.platform),windows:/Win/.test(at.platform),linux:/Linux|X11/.test(at.platform),ie:ra,ie_version:OO?zu.documentMode||6:Fu?+Fu[1]:ju?+ju[1]:0,gecko:_d,gecko_version:_d?+(/Firefox\/(\d+)/.exec(at.userAgent)||[0,0])[1]:0,chrome:!!Ta,chrome_version:Ta?+Ta[1]:0,ios:Cd,android:/Android\b/.test(at.userAgent),webkit:Pd,webkit_version:Pd?+(/\bAppleWebKit\/(\d+)/.exec(at.userAgent)||[0,0])[1]:0,safari:Bu,safari_version:Bu?+(/\bVersion\/(\d+(\.\d+)?)/.exec(at.userAgent)||[0,0])[1]:0,tabSize:zu.documentElement.style.tabSize!=null?" tab - size ":" - moz - tab - size "};function zc(t,e){for(let i in t)i==" class "&&e.class?e.class+=" "+t.class:i==" style "&&e.style?e.style+=" ; "+t.style:e[i]=t[i];return e}const yl=Object.create(null);function jc(t,e,i){if(t==e)return!0;t||(t=yl),e||(e=yl);let n=Object.keys(t),r=Object.keys(e);if(n.length-0!=r.length-0)return!1;for(let s of n)if(s!=i&&(r.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function rw(t,e){for(let i=t.attributes.length-1;i>=0;i--){let n=t.attributes[i].name;e[n]==null&&t.removeAttribute(n)}for(let i in e){let n=e[i];i==" style " ? t . style . cssText = n : t . getAttribute ( i ) != n && t . setAttribute ( i , n ) } } function Td ( t , e , i ) { let n = ! 1 ; if ( e ) for ( let r in e ) i && r in i || ( n
` ,r=t.state.doc.line(r.number+(i?1:-1)),s=t.bidiSpans(r),u=t.visualLineSide(r,!i)}if(a){if(!a(c))return l}else{if(!n)return u;a=n(c)}l=u}}function Ww(t,e,i){let n=t.state.charCategorizer(e),r=n(i);return s=>{let o=n(s);return r==Je.Space&&(r=o),r==o}}function Yw(t,e,i,n){let r=e.head,s=i?1:-1;if(r==(i?t.state.doc.length:0))return E.cursor(r,e.assoc);let o=e.goalColumn,l,a=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(r,e.assoc||((e.empty?i:e.head==e.from)?1:-1)),c=t.documentTop;if(u)o==null&&(o=u.left-a.left),l=s<0?u.top:u.bottom;else{let p=t.viewState.lineBlockAt(r);o==null&&(o=Math.min(a.right-a.left,t.defaultCharacterWidth*(r-p.from))),l=(s<0?p.top:p.bottom)+c}let h=a.left+o,f=t.viewState.heightOracle.textHeight>>1,d=n??f;for(let p=0;;p+=f){let m=l+(d+p)*s,O=Hu(t,{x:h,y:m},!1,s);if(i?m>a.bottom:m<a.top)return E.cursor(O.pos,O.assoc);let g=t.coordsAtPos(O.pos,O.assoc),b=g?(g.top+g.bottom)/2:0;if(!g||(i?b>l:b<l))return E.cursor(O.pos,O.assoc,void 0,o)}}function ds(t,e,i){for(;;){let n=0;for(let r of t)r.between(e-1,e+1,(s,o,l)=>{if(e>s&&e<o){let a=n||i||(e-s<o-e?-1:1);e=a<0?s:o,n=a}});if(!n)return e}}function qO(t,e){let i=null;for(let n=0;n<e.ranges.length;n++){let r=e.ranges[n],s=null;if(r.empty){let o=ds(t,r.from,0);o!=r.from&&(s=E.cursor(o,-1))}else{let o=ds(t,r.from,-1),l=ds(t,r.to,1);(o!=r.from||l!=r.to)&&(r.undirectional?s=E.undirectionalRange(r.from,r.to):s=E.range(r.from==r.anchor?o:l,r.from==r.head?o:l))}s&&(i||(i=e.ranges.slice()),i[n]=s)}return i?E.create(i,e.mainIndex):e}function La(t,e,i){let n=ds(t.state.facet(to).map(r=>r(t)),i.from,e.head>i.from?-1:1);return n==i.from?i:E.cursor(n,n<i.from?1:-1)}class bi{constructor(e,i){this.pos=e,this.assoc=i}}function Hu(t,e,i,n){let r=t.contentDOM.getBoundingClientRect(),s=r.top+t.viewState.paddingTop,{x:o,y:l}=e,a=l-s,u;for(;;){if(a<0)return new bi(0,1);if(a>t.viewState.docHeight)return new bi(t.state.doc.length,-1);if(u=t.elementAtHeight(a),n==null)break;if(u.type==ft.Text){if(n<0?u.to<t.viewport.from:u.from>t.viewport.to)break;let f=t.docView.coordsAt(n<0?u.from:u.to,n>0?-1:1);if(f&&(n<0?f.top<=a+s:f.bottom>=a+s))break}let h=t.viewState.heightOracle.textHeight/2;a=n>0?u.bottom+h:u.top-h}if(t.viewport.from>=u.to||t.viewport.to<=u.from){if(i)return null;if(u.type==ft.Text){let h=Vw(t,r,u,o,l);return new bi(h,h==u.from?1:-1)}}if(u.type!=ft.Text)return a<(u.top+u.bottom)/2?new bi(u.from,1):new bi(u.to,-1);let c=t.docView.lineAt(u.from,2);return(!c||c.length!=u.length)&&(c=t.docView.lineAt(u.from,-2)),new Nw(t,o,l,t.textDirectionAt(u.from)).scanTile(c,u.from)}class Nw{constructor(e,i,n,r){this.view=e,this.x=i,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,i){let{line:n,spans:r}=this.bidiSpansAt(e);return r[xi.find(r,e-n.from,-1,i)].level==this.baseDir}dirAt(e,i){let{line:n,spans:r}=this.bidiSpansAt(e);return r[xi.find(r,e-n.from,-1,i)].dir}bidiIn(e,i){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<i)}scan(e,i,n=!1){let r=0,s=e.length-1,o=new Set,l=this.bidiIn(e[0],e[s]),a,u,c=-1,h=1e9,f;e:for(;r<s;){let p=s-r,m=r+s>>1;t:if(o.has(m)){let g=r+Math.floor(Math.random()*p);for(let b=0;b<p;b++){if(!o.has(g)){m=g;break t}g++,g==s&&(g=r)}break e}o.add(m);let O=i(m);if(O)for(let g=0;g<O.length;g++){let b=O[g],y=0;if(!(b.width==0&&O.length>1)){if(b.bottom<this.y)(!a||a.bottom<b.bottom)&&(a=b),y=1;else if(b.top>this.y)(!u||u.top>b.top)&&(u=b),y=-1;else{let w=b.left>this.x?this.x-b.left:b.right<this.x?this.x-b.right:0,v=Math.abs(w);v<h&&(c=m,h=v,f=b),w&&(y=w<0==(this.baseDir==Ce.LTR)?-1:1)}y==-1&&(!l||this.baseDirAt(e[m],1))?s=m:y==1&&(!l||this.baseDirAt(e[m+1],-1))&&(r=m+1)}}}if(!f){if(!u&&!a)return{i:e[0],after:!1};let p=a&&(!u||this.y-a.bottom<u.top-this.y)?a:u;return this.y=(p.top+p.bottom)/2,this.scan(e,i,!0)}if(h&&!n){let{top:p,bottom:m}=f;if(a&&a.bottom>(p+p+m)/3)return this.y=a.bottom-1,this.scan(e,i,!0);if(u&&u.top<(p+m+m)/3)
` &&t.lineWrapping&&(n&&(n=E.single(n.main.anchor-1,n.main.head-1)),i={from:s.from,to:s.to,insert:de.of([" "])}),i)return Nc(t,i,n,o);if(n&&! $ l(n,s)){let l=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(l=!0),a=t.inputState.lastSelectionOrigin,a=="select.pointer"&&(n=qO(r.facet(to).map(u=>u(t)),n))),t.dispatch({selection:n,scrollIntoView:l,userEvent:a}),!0}else return!1}function Nc(t,e,i,n=-1){if(q.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if(q.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ir(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||n==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&ir(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&ir(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,l=()=>o||(o=Jw(t,e,i));return t.state.facet(RO).some(a=>a(t,e.from,e.to,s,l))||t.dispatch(l()),!0}function Jw(t,e,i){let n,r=t.state,s=r.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let a=e.from<s.from?-1:1,u=a<0?s.from:s.to,c=ds(r.facet(to).map(h=>h(t)),u,a);e.from==c&&(o=c)}if(o>-1)n={changes:e,selection:E.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=s.from<e.from?r.sliceDoc(s.from,e.from):"",u=s.to>e.to?r.sliceDoc(e.to,s.to):"";n=r.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+u))}else{let a=r.changes(e),u=i&&i.main.to<=a.newLength?i.main:void 0;if(r.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let c=t.state.sliceDoc(e.from,e.to),h,f=i&&VO(t,i.main.head);if(f){let p=e.insert.length-(e.to-e.from);h={from:f.from,to:f.to-p}}else h=t.state.doc.lineAt(s.head);let d=s.to-e.to;n=r.changeByRange(p=>{if(p.from==s.from&&p.to==s.to)return{changes:a,range:u||p.map(a)};let m=p.to-d,O=m-c.length;if(t.state.sliceDoc(O,m)!=c||m>=h.from&&O<=h.to)return{range:p};let g=r.changes({from:O,to:m,insert:e.insert}),b=p.to-s.to;return{changes:g,range:u?E.range(Math.max(0,u.anchor+b),Math.max(0,u.head+b)):p.map(g)}})}else n={changes:a,selection:u&&r.selection.replaceRange(u)}}let l="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,l+=".compose",t.inputState.compositionFirstChange&&(l+=".start",t.inputState.compositionFirstChange=!1)),r.update(n,{userEvent:l,scrollIntoView:!0})}function NO(t,e,i,n){let r=Math.min(t.length,e.length),s=0;for(;s<r&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==r&&t.length==e.length)return null;let o=t.length,l=e.length;for(;o>0&&l>0&&t.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(n=="end"){let a=Math.max(0,s-Math.min(o,l));i-=o+a-s}if(o<s&&t.length<e.length){let a=i<=s&&i>=o?s-i:0;s-=a,l=s+(l-o),o=s}else if(l<s){let a=i<=s&&i>=l?s-i:0;s-=a,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function e3(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:n,focusNode:r,focusOffset:s}=t.observer.selectionRange;return i&&(e.push(new Id(i,n)),(r!=i||s!=n)&&e.push(new Id(r,s))),e}function t3(t,e){if(t.length==0)return null;let i=t[0].pos,n=t.length==2?t[1].pos:i;return i>-1&&n>-1?E.single(i+e,n+e):null}function $ l(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class i3{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,th
` ))};if((q.mac||q.android)&&h.from==o-1&&/^ \. ? $ /.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:l,to:a,insert:de.of([n.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let f=this.to-this.from+(h.to-h.from+h.insert.length);Nc(e,h,E.single(this.toEditorPos(n.selectionStart,f),this.toEditorPos(n.selectionEnd,f)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),h.from<h.to&&!h.insert.length&&e.inputState.composing>=0&&!/[ \\ p{Alphabetic} \\ p{Number}_]/.test(i.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(i.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],s=null;for(let o=this.toEditorPos(n.rangeStart),l=this.toEditorPos(n.rangeEnd);o<l;o++){let a=e.coordsForChar(o);s=a&&new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)||s||new DOMRect,r.push(s)}i.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=n=>{let r=[];for(let s of n.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let a=this.toEditorPos(s.rangeStart),u=this.toEditorPos(s.rangeEnd);if(a<u){let c= ` text - decoration : underline $ { /^[a-z]/ . test ( o ) ? o + " " : o == "Dashed" ? "dashed " : o == "Squiggle" ? "wavy " : "" } $ { /thin/i . test ( l ) ? 1 : 2 } px ` ;r.push(ve.mark({attributes:{style:c}}).range(a,u))}}}e.dispatch({effects:IO.of(ve.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)i.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{let r=As(n.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let i=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((s,o,l,a,u)=>{if(n)return;let c=u.length-(o-s);if(r&&o>=r.to)if(r.from==s&&r.to==o&&r.insert.eq(u)){r=this.pendingContextChange=null,i+=c,this.to+=c;return}else r=null,this.revertPending(e.state);if(s+=i,o+=i,o<=this.from)this.from+=c,this.to+=c;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+u.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),u.toString()),this.to+=c}i+=c}),r&&!n&&this.revertPending(e.state),!n}update(e){let i=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||i)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:i}=e.selection.main;this.from=Math.max(0,i-1e4),this.to=Math.min(e.doc.length,i+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let i=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(i.from),this.toContextPos(i.from+i.insert.length),e.doc.sliceString(i.from,i.to))}setSelection(e){let{main:i}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,i.anchor))),r=this.toContextPos(i.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:i}=e.selection.main;return!(this.from>0&&i-this.from<500||this.to<e.doc.length&&this.to-i<500||this.to-this.from>1e4*3)}toEditorPos(e,i=this.to-this.from){e=Math.min(e,i);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+thi
` &&(i="");else{let n=i.indexOf( `
` );n>-1&&(i=i.slice(0,n))}return e+i.length<=this.to?i:i.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,i=this.lineAfter(e),n=e+i.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=n||(i=i.slice(0,s-(n-i.length)),r++,r==this.ranges.length))break;let o=this.ranges[r].from,l=this.lineAfter(o);i+=l,n=o+l.length}return{line:i,end:n}}skipGapsTo(e,i,n){for(;;){let r=this.ranges[this.rangeIndex].to,s=e+i;if(n>0?r>s:r>=s)break;let o=this.ranges[++this.rangeIndex].from;i+=o-r}return i}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,i,n,r){let s=4;if(this.ranges.length>1){r=this.skipGapsTo(i,r,1),i+=r;let l=this.chunk.length;r=this.skipGapsTo(n,r,-1),n+=r,s+=this.chunk.length-l}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==i?this.chunk[o+2]=n:this.chunk.push(e,i,n,s),r}parseLine(e){let{line:i,end:n}=this.nextLine(),r=0,{streamParser:s}=this.lang,o=new Dg(i,e?e.state.tabSize:4,e?Ln(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=Mg(s.token,o,this.state);if(l&&(r=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,r)),o.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=se.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:G $ ,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new se(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new se(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function Mg(t,e,i){e.start=e.pos;for(let n=0;n<10;n++){let r=t(e,i);if(e.pos>e.start)return r}throw new Error("Stream parser failed to advance stream.")}const rh=Object.create(null),Ms=[ze.none],G $ =new Rr(Ms),w0=[], $ 0=Object.create(null),Zg=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Zg[t]=Xg(rh,e);class Ig{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),Zg)}resolve(e){return e?this.table[e]||(this.table[e]=Xg(this.extra,e)):0}}const U $ =new Ig(rh);function Va(t,e){w0.indexOf(t)>-1||(w0.push(t),console.warn(e))}function Xg(t,e){let i=[];for(let l of e.split(" ")){let a=[];for(let u of l.split(".")){let c=t[u]||k[u];c?typeof c=="function"?a.length?a=a.map(c):Va(u, ` Modifier $ { u } used at start of tag ` ):a.length?Va(u, ` Tag $ { u } used as modifier ` ):a=Array.isArray(c)?c:[c]:Va(u, ` Unknown highlighting tag $ { u } ` )}for(let u of a)i.push(u)}if(!i.length)return 0;let n=e.replace(/ /g,"_"),r=n+" "+i.map(l=>l.id),s= $ 0[r];if(s)return s.id;let o= $ 0[r]=ze.define({id:Ms.length,name:n,props:[Dr({[n]:i})]});return Ms.push(o),o.id}function H $ (t,e){let i=ze.define({id:Ms.length,name:"Document",props:[nn.add(()=>t),Mr.add(()=>n=>e.getIndent(n))],top:!0});return Ms.push(i),i}Ce.RTL,Ce.LTR;const K $ =t=>{let{state:e}=t,i=e.doc.lineAt(e.selection.main.from),n=oh(t.state,i.from);return n.line?J $ (t):n.block?tQ(t):!1};function sh(t,e){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let r=t(e,i);return r?(n(i.update(r)),!0):!1}}const J $ =sh(rQ,0),eQ=sh(zg,0),tQ=sh((t,e)=>zg(t,e,nQ(e)),0);function oh(t,e){let i=t.languageDataAt("commentTokens",e,1);return i.length?i[0]:{}}const qr=50;function iQ(t,{open:e,close:i},n,r){let s=t.sliceDoc(n-qr,n),o=t.sliceDoc(r,r+qr),l=/ \s * $ /.exec(s)[0].length,a=/^ \s */.exec(o)[0].length,u=s.length-l;if(s.slice(u-e.length,u)==e&&o.slice(a,a+i.length)==i)return{open:{pos:n-l,margin:l&&1},close:{pos:r+a,margin:a&&1}};let c,h;r-n<=
2026-07-27 09:50:33 +08:00
` :n=="r"?" \r ":n=="t"?" ":" \\ ")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new v_(this):new O_(this)}getCursor(e,i=0,n){let r=e.doc?e:fe.create({doc:e});return n==null&&(n=r.doc.length),this.regexp?Yn(this,r,i,n):Wn(this,r,i,n)}}class S1{constructor(e){this.spec=e}}function p_(t,e,i){return(n,r,s,o)=>{if(i&&!i(n,r,s,o))return!1;let l=n>=o&&r<=o+s.length?s.slice(n-o,r-o):e.doc.sliceString(n,r);return t(l,e,n,r)}}function Wn(t,e,i,n){let r;return t.wholeWord&&(r=m_(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(r=p_(t.test,e,r)),new Zs(e.doc,t.unquoted,i,n,t.caseSensitive?void 0:s=>s.toLowerCase(),r)}function m_(t,e){return(i,n,r,s)=>((s>i||s+r.length<n)&&(s=Math.max(0,i-2),r=t.sliceString(s,Math.min(t.length,n+2))),(e(Ll(r,i-s))!=Je.Word||e(Ml(r,i-s))!=Je.Word)&&(e(Ml(r,n-s))!=Je.Word||e(Ll(r,n-s))!=Je.Word))}class O_ extends S1{constructor(e){super(e)}nextMatch(e,i,n){let r=Wn(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let s=Math.min(e.doc.length,i+this.spec.unquoted.length);r=Wn(this.spec,e,0,s).nextOverlapping()}return r.done||r.value.from==i&&r.value.to==n?null:r.value}prevMatchInRange(e,i,n){for(let r=n;;){let s=Math.max(i,r-1e4-this.spec.unquoted.length),o=Wn(this.spec,e,s,r),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(s==i)return null;r-=1e4}}prevMatch(e,i,n){let r=this.prevMatchInRange(e,0,i);return r||(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=i||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,i){let n=Wn(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=i)return null;r.push(n.value)}return r}highlight(e,i,n,r){let s=Wn(this.spec,e,Math.max(0,i-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function g_(t,e,i){return(n,r,s)=>(!i||i(n,r,s))&&t(s[0],e,n,r)}function Yn(t,e,i,n){let r;return t.wholeWord&&(r=b_(e.charCategorizer(e.selection.main.head))),t.test&&(r=g_(t.test,e,r)),new y1(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:r},i,n)}function Ll(t,e){return t.slice(Ge(t,e,!1),e)}function Ml(t,e){return t.slice(e,Ge(t,e))}function b_(t){return(e,i,n)=>!n[0].length||(t(Ll(n.input,n.index))!=Je.Word||t(Ml(n.input,n.index))!=Je.Word)&&(t(Ml(n.input,n.index+n[0].length))!=Je.Word||t(Ll(n.input,n.index+n[0].length))!=Je.Word)}class v_ extends S1{nextMatch(e,i,n){let r=Yn(this.spec,e,n,e.doc.length).next();return r.done&&(r=Yn(this.spec,e,0,i).next()),r.done?null:r.value}prevMatchInRange(e,i,n){for(let r=1;;r++){let s=Math.max(i,n-r*1e4),o=Yn(this.spec,e,s,n),l=null;for(;!o.next().done;)l=o.value;if(l&&(s==i||l.from>s+10))return l;if(s==i)return null}}prevMatch(e,i,n){return this.prevMatchInRange(e,0,i)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/ \$ ([ $ &]| \d +)/g,(i,n)=>{if(n=="&")return e.match[0];if(n==" $ ")return" $ ";for(let r=n.length;r>0;r--){let s=+n.slice(0,r);if(s>0&&s<e.match.length)return e.match[s]+n.slice(r)}return i})}matchAll(e,i){let n=Yn(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=i)return null;r.push(n.value)}return r}highlight(e,i,n,r){let s=Yn(this.spec,e,Math.max(0,i-250),Math.min(n+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const Is=ae.define(),ch=ae.define(),rn=Yt.define({create(t){return new Ya(fc(t).create(),null)},update(t,e){for(let i of e.effects)i.is(Is)?t=new Ya(i.value.create(),t.panel):i.is(ch)&&(t=new Ya(t.query,i.value?hh:null));return t},provide:t=>Pl.from(t,e=>e.panel)});class Ya{constructor(e,i){this.query=e,this.panel=i}}const y_=ve.mark({class:"cm-searchMatch"}),x_=ve.mark({class:"cm-searchMatch cm-searchMatch-selected"}),k_=Mt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(rn))}update(t){let e=t.state.field(rn);(e!=t.startState.field(rn)||t.do
2026-07-24 11:28:14 +08:00
` +i.scrub(),s=this.advance(r);return s>-1&&s<r.length?this.complete(e,n,s):!1}finish(e,i){return(this.stage==2||this.stage==3)&&ps(i.content,this.pos)==i.content.length?this.complete(e,i,i.content.length):!1}complete(e,i,n){return e.addLeafElement(i,he(z.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(K1(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(he(z.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(U1(e,ps(e,this.pos),this.start)))return-1}else if(this.stage==2){let i=ps(e,this.pos),n=0;if(i>this.pos){let r=H1(e,i,this.start);if(r){let s=Ua(e,r.to-this.start);s>0&&(this.nextStage(r),n=s)}}return n||(n=Ua(e,this.pos)),n>0&&n<e.length?n:-1}else return Ua(e,this.pos)}}}function Ua(t,e){for(;e<t.length;e++){let i=t.charCodeAt(e);if(i==10)break;if(!Gt(i))return-1}return e}class yP{nextLine(e,i,n){let r=i.depth<e.stack.length?-1:X1(i),s=i.next;if(r<0)return!1;let o=he(z.HeaderMark,e.lineStart+i.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,he(s==61?z.SetextHeading1:z.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),o])),!0}finish(){return!1}}const B1={LinkReference(t,e){return e.content.charCodeAt(0)==91?new vP(e):null},SetextHeading(){return new yP}},xP=[(t,e)=>I1(e)>=0,(t,e)=>L1(e)>=0,(t,e)=>M1(e)>=0,(t,e)=>kh(e,t,!0)>=0,(t,e)=>Sh(e,t,!0)>=0,(t,e)=>xh(e,t,!0)>=0,(t,e)=>F1(e,t,!0)>=0],kP={text:"",end:0};class SP{constructor(e,i,n,r){this.parser=e,this.input=i,this.ranges=r,this.line=new bP,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=jl.create(z.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new QP(n,i):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!r||e.markers[n].from<r.end);){let s=e.markers[n++];this.addNode(s.type,s.from,s.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let r=n(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}let i=new gP(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let r=n(this,i);r&&i.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,i))break e}for(let n of i.parsers)if(n.nextLine(this,e,i))return null;i.content+= `
2026-07-24 15:10:48 +08:00
` +e.scrub();for(let n of e.markers)i.marks.push(n)}return this.finishLeaf(i),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let i=this.fragments.takeNodes(this);return i?(this.absoluteLineStart+=i,this.lineStart=J1(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let i=kP;if(i.end=e,e>=this.to)i.text="";else if(i.text=this.lineChunkAt(e),i.end+=i.text.length,this.ranges.length>1){let n=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<i.end;){r++;let s=this.ranges[r].from,o=this.lineChunkAt(s);i.end=s+o.length,i.text=i.text.slice(0,this.ranges[r-1].to-n)+o,n=i.end-i.text.length}}return i}readLine(){let{line:e}=this,{text:i,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(i);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],s=this.parser.skipContextMarkup[r.type];if(!s)throw new Error("Unhandled block context "+z[r.type]);let o=this.line.markers.length;if(!s(r,this,e)){this.line.markers.length>o&&(r.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let i=this.input.chunk(e),n;if(this.input.lineChunks)n=i== `
2026-07-24 11:28:14 +08:00
` ?"":i;else{let r=i.indexOf( `
` );n=r<0?i:i.slice(0,r)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,i,n=0){this.block=jl.create(e,n,this.lineStart+i,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,i,n=0){this.startContext(this.parser.getNodeType(e),i,n)}addNode(e,i,n){typeof e=="number"&&(e=new se(this.parser.nodeSet.types[e],_r,_r,(n??this.prevLineEnd())-i)),this.block.addChild(e,i-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,i){this.addNode(this.buffer.writeElements(Oc(i.children,e.marks),-i.from).finish(i.type,i.to-i.from),i.from)}finishContext(){let e=this.stack.pop(),i=this.stack[this.stack.length-1];i.addChild(e.toTree(this.parser.nodeSet),e.from-i.from),this.block=i}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?V1(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let i=Oc(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(i,-e.start).finish(z.Paragraph,e.content.length),e.start)}elt(e,i,n,r){return typeof e=="string"?he(this.parser.getNodeType(e),i,n,r):new Y1(e,i)}get buffer(){return new W1(this.parser.nodeSet)}}function V1(t,e,i,n,r){let s=t[e].to,o=[],l=[],a=i.from+n;function u(c,h){for(;h?c>=s:c>s;){let f=t[e+1].from-s;n+=f,c+=f,e++,s=t[e].to}}for(let c=i.firstChild;c;c=c.nextSibling){u(c.from+n,!0);let h=c.from+n,f,d=r.get(c.tree);d?f=d:c.to+n>s?(f=V1(t,e,c,n,r),u(c.to+n,!1)):f=c.toTree(),o.push(f),l.push(h-a)}return u(i.to+n,!1),new se(i.type,o,l,i.to+n-a,i.tree?i.tree.propValues:void 0)}class Oa extends ua{constructor(e,i,n,r,s,o,l,a,u){super(),this.nodeSet=e,this.blockParsers=i,this.leafBlockParsers=n,this.blockNames=r,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=l,this.inlineNames=a,this.wrappers=u,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,i,n){let r=new SP(this,e,i,n);for(let s of this.wrappers)r=s(r,e,i,n);return r}configure(e){let i=mc(e);if(!i)return this;let{nodeSet:n,skipContextMarkup:r}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),l=this.blockNames.slice(),a=this.inlineParsers.slice(),u=this.inlineNames.slice(),c=this.endLeafBlock.slice(),h=this.wrappers;if(Wr(i.defineNodes)){r=Object.assign({},r);let f=n.types.slice(),d;for(let p of i.defineNodes){let{name:m,block:O,composite:g,style:b}=typeof p=="string"?{name:p}:p;if(f.some(v=>v.name==m))continue;g&&(r[f.length]=(v,Q,P)=>g(Q,P,v.value));let y=f.length,w=g?["Block","BlockContext"]:O?y>=z.ATXHeading1&&y<=z.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;f.push(ze.define({id:y,name:m,props:w&&[[K.group,w]]})),b&&(d||(d={}),Array.isArray(b)||b instanceof Et?d[m]=b:Object.assign(d,b))}n=new Rr(f),d&&(n=n.extend(Dr(d)))}if(Wr(i.props)&&(n=n.extend(...i.props)),Wr(i.remove))for(let f of i.remove){let d=this.blockNames.indexOf(f),p=this.inlineNames.indexOf(f);d>-1&&(s[d]=o[d]=void 0),p>-1&&(a[p]=void 0)}if(Wr(i.parseBlock))for(let f of i.parseBlock){let d=l.indexOf(f.name);if(d>-1)s[d]=f.parse,o[d]=f.leaf;else{let p=f.before?Bo(l,f.before):f.after?Bo(l,f.after)+1:l.length-1;s.splice(p,0,f.parse),o.splice(p,0,f.leaf),l.splice(p,0,f.name)}f.endLeaf&&c.push(f.endLeaf)}if(Wr(i.parseInline))for(let f of i.parseInline){let d=u.indexOf(f.name);if(d>-1)a[d]=f.parse;else{let p=f.before?Bo(u,f.before):f.after?Bo(u,f.after)+1:u.length-1;a.splice(p,0,f.parse),u.splice(p,0,f.name)}}return i.wrap&&(h=h.concat(i.wrap)),new Oa(n,s,o,l,c,r,a,u,h)}getNodeType(e){let i=this.nodeTypes[e];if(i==null)throw new RangeError( ` Unknown node type '${e}' ` );return i}parseInline(e,i){let n=new wh(this,e,i);e:for(let r=i;r<n.end;){let s=n.char(r);for(let o of this.inlineParsers)if(o){let l=o(n,s,r);if(l>=0){r=l;continue e}}r++}return n.resolveM
` ;)s--;this.fragmentEnd=s?s-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=i;if(!n.childAfter(r))return!1}}matches(e){let i=this.cursor.tree;return i&&i.prop(K.contextHash)==e}takeNodes(e){let i=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,l=e.block.children.length,a=o,u=l;for(;;){if(i.to-n>r){if(i.type.isAnonymous&&i.firstChild())continue;break}let c=J1(i.from-n,e.ranges);if(i.to-n<=e.ranges[e.rangeI].to)e.addNode(i.tree,c);else{let h=new se(e.parser.nodeSet.types[z.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(h,i.tree),e.addNode(h,c)}if(i.type.is("Block")&&( $ P.indexOf(i.type.id)<0?(o=i.to-n,l=e.block.children.length):(o=a,l=u),a=i.to-n,u=e.block.children.length),!i.nextSibling())break}for(;e.block.children.length>l;)e.block.children.pop(),e.block.positions.pop();return o-s}};function J1(t,e){let i=t;for(let n=1;n<e.length;n++){let r=e[n-1].to,s=e[n].from;r<t&&(i-=s-r)}return i}const _P=Dr({"Blockquote/...":k.quote,HorizontalRule:k.contentSeparator,"ATXHeading1/... SetextHeading1/...":k.heading1,"ATXHeading2/... SetextHeading2/...":k.heading2,"ATXHeading3/...":k.heading3,"ATXHeading4/...":k.heading4,"ATXHeading5/...":k.heading5,"ATXHeading6/...":k.heading6,"Comment CommentBlock":k.comment,Escape:k.escape,Entity:k.character,"Emphasis/...":k.emphasis,"StrongEmphasis/...":k.strong,"Link/... Image/...":k.link,"OrderedList/... BulletList/...":k.list,"BlockQuote/...":k.quote,"InlineCode CodeText":k.monospace,"URL Autolink":k.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":k.processingInstruction,"CodeInfo LinkLabel":k.labelName,LinkTitle:k.string,Paragraph:k.content}),PP=new Oa(new Rr(q1).extend(_P),Object.keys(Fo).map(t=>Fo[t]),Object.keys(Fo).map(t=>B1[t]),Object.keys(Fo),xP,D1,Object.keys(Ha).map(t=>Ha[t]),Object.keys(Ha),[]);function CP(t,e,i){let n=[];for(let r=t.firstChild,s=e;;r=r.nextSibling){let o=r?r.from:i;if(o>s&&n.push({from:s,to:o}),!r)break;s=r.to}return n}function TP(t){let{codeParser:e,htmlParser:i}=t;return{wrap:wg((r,s)=>{let o=r.type.id;if(e&&(o==z.CodeBlock||o==z.FencedCode)){let l="";if(o==z.FencedCode){let u=r.node.getChild(z.CodeInfo);u&&(l=s.read(u.from,u.to))}let a=e(l);if(a)return{parser:a,overlay:u=>u.type.id==z.CodeText,bracketed:o==z.FencedCode}}else if(i&&(o==z.HTMLBlock||o==z.HTMLTag||o==z.CommentBlock))return{parser:i,overlay:CP(r.node,r.from,r.to)};return null})}}const AP={resolve:"Strikethrough",mark:"StrikethroughMark"},EP={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":k.strikethrough}},{name:"StrikethroughMark",style:k.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,i){if(e!=126||t.char(i+1)!=126||t.char(i+2)==126)return-1;let n=t.slice(i-1,i),r=t.slice(i+2,i+3),s=/ \s |^ $ /.test(n),o=/ \s |^ $ /.test(r),l=Fs.test(n),a=Fs.test(r);return t.addDelimiter(AP,i,i+2,!o&&(!a||s||l),!s&&(!l||o||a))},after:"Emphasis"}]};function ms(t,e,i=0,n,r=0){let s=0,o=!0,l=-1,a=-1,u=!1,c=()=>{n.push(t.elt("TableCell",r+l,r+a,t.parser.parseInline(e.slice(l,a),r+l)))};for(let h=i;h<e.length;h++){let f=e.charCodeAt(h);f==124&&!u?((!o||l>-1)&&s++,o=!1,n&&(l>-1&&c(),n.push(t.elt("TableDelimiter",h+r,h+r+1))),l=a=-1):(u||f!=32&&f!=9)&&(l<0&&(l=h),a=h+1),u=!u&&f==92}return l>-1&&(s++,n&&c()),s}function N0(t,e){for(let i=e;i<t.length;i++){let n=t.charCodeAt(i);if(n==124)return!0;n==92&&i++}return!1}const eb=/^[> \s ]* \| ?( \s *:?-+:? \s * \| )+( \s *:?-+:? \s *)? $ /;class G0{constructor(){this.rows=null}nextLine(e,i,n){if(this.rows==null){this.rows=!1;let r;if((i.next==45||i.next==58||i.next==124)&&eb.test(r=i.text.slice(i.pos))){let s=[];ms(e,n.content,0,s,n.start)==ms(e,r,0)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,s),e.elt("TableDelimiter",e.lineStart+i.pos,e.lineStart+i.text.length)])}}else if(this.rows){let r=[];ms(e,i.text,i.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+i.pos,e.lineStart+i.text.leng
\ $ { }
} catch ( \ $ { error } ) {
\ $ { }
} ` ,{label:"try",detail:"/ catch block",type:"keyword"}),mt("if ( ${ } ) { \n ${ } \n }",{label:"if",detail:"block",type:"keyword"}),mt( ` if ( \ $ { } ) {
\ $ { }
} else {
\ $ { }
} ` ,{label:"if",detail:"/ else block",type:"keyword"}),mt( ` class \ $ { name } {
constructor ( \ $ { params } ) {
\ $ { }
}
} ` ,{label:"class",detail:"definition",type:"keyword"}),mt('import { ${ names } } from " ${ module } " \n ${ } ',{label:"import",detail:"named",type:"keyword"}),mt('import ${ name } from " ${ module } " \n ${ } ',{label:"import",detail:"default",type:"keyword"})],Sb=Ch.concat([mt("interface ${ name } { \n ${ } \n }",{label:"interface",detail:"definition",type:"keyword"}),mt("type ${ name } = ${ type } ",{label:"type",detail:"definition",type:"keyword"}),mt("enum ${ name } { \n ${ } \n }",{label:"enum",detail:"definition",type:"keyword"})]),Sp=new Sg,wb=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Yr(t){return(e,i)=>{let n=e.node.getChild("VariableDefinition");return n&&i(n,t),!0}}const WT=["FunctionDeclaration"],YT={FunctionDeclaration:Yr("function"),ClassDeclaration:Yr("class"),ClassExpression:()=>!0,EnumDeclaration:Yr("constant"),TypeAliasDeclaration:Yr("type"),NamespaceDeclaration:Yr("namespace"),VariableDefinition(t,e){t.matchContext(WT)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function $ b(t,e){let i=Sp.get(e);if(i)return i;let n=[],r=!0;function s(o,l){let a=t.sliceString(o.from,o.to);n.push({label:a,type:l})}return e.cursor(ge.IncludeAnonymous).iterate(o=>{if(r)r=!1;else if(o.name){let l=YT[o.name];if(l&&l(o,s)||wb.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of $ b(t,o.node))n.push(l);return!1}}),Sp.set(e,n),n}const Yl=/^[ \w $ \x a1- \u ffff][ \w $ \d \x a1- \u ffff]* $ /,Th=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Qb(t){let e=Re(t.state).resolveInner(t.pos,-1);if(Th.indexOf(e.name)>-1)return null;let i=e.name=="VariableName"||e.to-e.from<20&&Yl.test(t.state.sliceDoc(e.from,e.to));if(!i&&!t.explicit)return null;let n=[];for(let r=e;r;r=r.parent)wb.has(r.name)&&(n=n.concat( $ b(t.state.doc,r)));return{options:n,from:i?e.from:t.pos,validFor:Yl}}function su(t,e,i){var n;let r=[];for(;;){let s=e.firstChild,o;if((s==null?void 0:s.name)=="VariableName")return r.push(t(s)),{path:r.reverse(),name:i};if((s==null?void 0:s.name)=="MemberExpression"&&((n=o=s.lastChild)===null||n===void 0?void 0:n.name)=="PropertyName")r.push(t(o)),e=s;else return null}}function _b(t){let e=n=>t.state.doc.sliceString(n.from,n.to),i=Re(t.state).resolveInner(t.pos,-1);return i.name=="PropertyName"?su(e,i.parent,e(i)):(i.name=="."||i.name=="?.")&&i.parent.name=="MemberExpression"?su(e,i.parent,""):Th.indexOf(i.name)>-1?null:i.name=="VariableName"||i.to-i.from<20&&Yl.test(e(i))?{path:[],name:e(i)}:i.name=="MemberExpression"?su(e,i,""):t.explicit?{path:[],name:""}:null}function NT(t,e){let i=t,n=[],r=new Set;for(let s=0;;s++){for(let l of(Object.getOwnPropertyNames||Object.keys)(t)){if(!/^[a-zA-Z_ $ \x aa- \u ffdc][ \w $ \x aa- \u ffdc]* $ /.test(l)||r.has(l))continue;r.add(l);let a;try{a=i[l]}catch{continue}n.push({label:l,type:typeof a=="function"?/^[A-Z]/.test(l)?"class":e?"function":"method":e?"variable":"property",boost:-s})}let o=Object.getPrototypeOf(t);if(!o)return n;t=o}}function GT(t){let e=new Map;return i=>{let n=_b(i);if(!n)return null;let r=t;for(let o of n.path)if(r=r[o],!r)return null;let s=e.get(r);return s||e.set(r,s=NT(r,!n.path.length)),{from:i.pos-n.name.length,options:s,validFor:Yl}}}const qt=Sr.define({name:"javascript",parser:qT.configure({props:[Mr.add({IfStatement:ol({except:/^ \s *({|else \b )/}),TryStatement:ol({except:/^ \s *({|catch \b |finally \b )/}),LabeledStatement:M $ ,SwitchBody:t=>{let e=t.textAfter,i=/^ \s * \} /.test(e),n=/^ \s *(case|default) \b /.test(e);return t.baseIndent+(i?0:n?1:2)*t.unit},Block:L $ ({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":ol({except:/^ \s *{/}),JSXElement(t){let e=/^ \s *< \/ /.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/ \s * \} /.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTa
$$
` , `
$$
` ,4,-4]},X5=(t,e)=>{const i=e.getSelectedText(),[n,r,s,o]=I5[t];return{text: ` $ { n } $ { i } $ { r } ` ,options:{deviationStart:s,deviationEnd:o}}},z5={quote:"> ",unorderedList:"- ",orderedList:1,task:"- [ ] "},j5=(t,e)=>{const[i,n,r]=Zh(e,{wholeLine:!0}),s=i.split( `
` ),o=z5[t],l=t==="orderedList"?s.map((c,h)=> ` $ { o + h } . $ { c } ` ):s.map(c=> ` $ { o } $ { c } ` ),a=t==="orderedList"?"1. ":o.toString(),u=s.length===1?a.length:0;return{text:l.join( `
` ),options:{deviationStart:u,replaceStart:n,replaceEnd:r}}},F5=(t,e)=>{const[i,n,r]=Zh(e),s=t.mode||"language",o= `
\ ` \` \` ${ s }
$ { t . text || i || "" }
\ ` \` \`
` ;return{text:o,options:{deviationStart:4,deviationEnd:4+s.length-o.length,replaceStart:n,replaceEnd:r}}},B5=t=>({text: `
\ ` \` \` mermaid
$ { { flow : ` flowchart TD
Start -- > Stop ` ,sequence: ` sequenceDiagram
A - >> B : hello !
B -- >> A : hi ! ` ,gantt: ` gantt
title Gantt Chart
dateFormat YYYY - MM - DD ` ,class: ` classDiagram
class Animal ` ,state: ` stateDiagram - v2
s1 -- > s2 ` ,pie: ` pie
"Dogs" : 386
"Cats" : 85
"Rats" : 15 ` ,relationship: ` erDiagram
CAR || -- o { NAMED - DRIVER : allows ` ,journey: ` journey
title My Journey ` ,...Me.editorConfig.mermaidTemplate}[t]}
\ ` \` \`
` ,options:{deviationStart:12,deviationEnd:-5}}),V5=t=>{const{desc:e="",url:i="",urls:n}=t;let r="";const s=i===""&&(!n||n instanceof Array&&n.length===0);return n instanceof Array?r=n.reduce((o,l)=>{const{url:a="",alt:u="",title:c=""}=typeof l=="object"?l:{url:l};return o+ ` ! [ $ { u } ] ( $ { a } $ { c ? " '" + c + "'" : "" } )
` },""):r= ` ! [ $ { e } ] ( $ { i } )
` ,{text:r,options:{select:i==="",deviationStart:s?r.length-i.length-2:r.length,deviationEnd:s?-2:0}}},q5=t=>{const{selectedShape:e={x:1,y:1}}=t,{x:i,y:n}=e;let r= `
| Column ` ;for(let s=0;s<=n;s++)r+=" |";r+= `
| ` ;for(let s=0;s<=n;s++)r+=" - |";for(let s=0;s<=i;s++){r+= `
| ` ;for(let o=0;o<=n;o++)r+=" |"}return r+= `
` ,{text:r,options:{deviationStart:3,deviationEnd:10-r.length}}},W5=(t,e)=>{const{generate:i}=e,n=i(t);return{text:n.targetValue,options:{select:n.select??!0,deviationStart:n.deviationStart||0,deviationEnd:n.deviationEnd||0}}},Zh=(t,e={wholeLine:!1})=>{const i=t.view.state,n=i.selection.main;if(n.empty){const r=i.doc.lineAt(n.from);return[i.doc.lineAt(n.from).text,r.from,r.to]}else if(e.wholeLine){const r=i.doc.lineAt(n.from),s=i.doc.lineAt(n.to);return[i.doc.sliceString(r.from,s.to),r.from,s.to]}return[i.doc.sliceString(n.from,n.to),n.from,n.to]},Y5="#e5c07b",Ap="var(--md-color)",N5="#56b6c2",G5="#ffffff",is="var(--md-color)",Ep="#e5c07b",U5="#e5c07b",H5="var(--md-color)",Rp="#d19a66",K5="#c678dd",J5="#21252b",e6="#2c313a",Dp="var(--md-bk-color)",du="var(--md-bk-color)",t6="#ceedfa33",Lp="#528bff",i6=W.theme({"&":{color:is,backgroundColor:Dp},".cm-content":{caretColor:Lp},".cm-cursor, .cm-dropCursor":{borderLeftColor:Lp},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:t6},".cm-panels":{backgroundColor:J5,color:is},".cm-panels.cm-panels-top":{borderBottom:"1px solid var(--md-border-color)"},".cm-panels.cm-panels-bottom":{borderTop:"1px solid var(--md-border-color)"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#ceedfa33"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Dp,color:is,borderRight:"1px solid",borderColor:"var(--md-border-color)"},".cm-activeLineGutter":{backgroundColor:e6},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"1px solid var(--md-border-color)",backgroundColor:du},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:du,borderBottomColor:du},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{color:is}}},{dark:!0}),n6=ro.define([{tag:k.keyword,color:K5},{tag:[k.name,k.deleted,k.character,k.propertyName,k.macroName],color:Ap},{tag:[k.function(k.variableName),k.labelName],color:U5},{tag:[k.color,k.constant(k.name),k.standard(k.name)],color:Rp},{tag:[k.definition(k.name),k.separator],color:is},{tag:[k.typeName,k.className,k.number,k.changed,k.annotation,k.modifier,k.self,k.namespace],color:Y5},{tag:[k.operator,k.operatorKeyword,k.url,k.escape,k.regexp,k.link,k.special(k.string)],color:N5},{tag:[k.meta,k.comment],color:Ep},{tag:k.strong,fontWeight:"bold"},{tag:k.emphasis,fontStyle:"italic"},{tag:k.strikethrough,textDecoration:"line-through"},{tag:k.link,color:Ep,textDecoration:"underline"},{tag:k.heading,fontWeight:"bold",color:Ap},{tag:[k.atom,k.bool,k.special(k.variableName)],color:Rp},{tag:[k.processingInstruction,k.string,k.inserted],color:H5},{tag:k.invalid,color:G5}]),Mp=[i6,Eg(n6)],r6="#e5c07b",Zp="var(--md-color)",s6="#56b6c2",o6="#fff",ns="#3f4a54",Ip="#2d8cf0",l6="#2d8cf0",a6="#3f4a54",Xp="#d19a66",u6="#c678dd",c6="#f6f6f6",h6="#ceedfa33",zp="var(--md-bk-color)",pu="var(--md-bk-color)",f6="#bad5fa",jp="#3f4a54",d6=W.theme({"&":{color:ns,backgroundColor:zp},".cm-content":{caretColor:jp},".cm-cursor, .cm-dropCursor":{borderLeftColor:jp},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:f6},".cm-panels":{backgroundColor:c6,color:ns},".cm-panels.cm-panels-top":{borderBottom:"1px solid var(--md-border-color)"},".cm-panels.cm-panels-bottom":{borderTop:"1px solid var(--md-border-color)"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#ceedfa33"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchi
| - | - | - |
| content | content | content |
| content | content | content | ` },{label:" $ ",type:"text",apply:qo(" $ ","",""," $ ","type")},{label:" $ $ ",type:"text",apply:qo(" $ $ ","", `
` , `
$$ ` ,"title")},...["note","abstract","info","tip","success","question","warning","failure","danger","bug","example","quote","hint","caution","error","attention"].map(r=>({label: ` ! ! ! $ { r } ` ,type:"text",apply:qo("!!!", ` $ { r } ` ," Title", `
! ! ! ` ,"title")}))]}};return dP({override:t?[e,...t]:[e]})},Fn=t=>{const e=new gi;return n=>(e.get(t.state)?t.dispatch({effects:e.reconfigure(n)}):t.dispatch({effects:ae.appendConfig.of(e.of(n))}),!0)};class m6{constructor(e){Fi(this,"view"),Fi(this,"maxLength",Number.MAX_SAFE_INTEGER),Fi(this,"toggleTabSize"),Fi(this,"togglePlaceholder"),Fi(this,"setExtensions"),Fi(this,"toggleDisabled"),Fi(this,"toggleReadOnly"),Fi(this,"toggleMaxlength"),this.view=e,this.toggleTabSize=Fn(this.view),this.togglePlaceholder=Fn(this.view),this.setExtensions=Fn(this.view),this.toggleDisabled=Fn(this.view),this.toggleReadOnly=Fn(this.view),this.toggleMaxlength=Fn(this.view)}getValue(){return this.view.state.doc.toString()}setValue(e,i=0,n=this.view.state.doc.length){this.view.dispatch({changes:{from:i,to:n,insert:e}})}getSelectedText(){const{from:e,to:i}=this.view.state.selection.main;return this.view.state.sliceDoc(e,i)}replaceSelectedText(e,i,n){const r={select:!0,deviationStart:0,deviationEnd:0,replaceAll:!1,replaceStart:-1,replaceEnd:-1,...i};try{if(r.replaceAll){if(this.setValue(e),e.length>this.maxLength)throw new Error("The input text is too long");return}if(this.view.state.doc.length-this.getSelectedText().length+e.length>this.maxLength)throw new Error("The input text is too long");const{from:s}=this.view.state.selection.main;r.replaceStart!==-1?this.view.dispatch({changes:{from:r.replaceStart,to:r.replaceEnd,insert:e}}):this.view.dispatch(this.view.state.replaceSelection(e)),r.select&&this.view.dispatch({selection:{anchor:r.replaceStart===-1?s+r.deviationStart:r.replaceStart+r.deviationStart,head:r.replaceStart===-1?s+e.length+r.deviationEnd:r.replaceStart+e.length+r.deviationEnd}}),this.view.focus()}catch(s){if(s.message==="The input text is too long")X.emit(n,hn,{name:"overlength",message:s.message,data:e});else throw s}}setTabSize(e){this.toggleTabSize([fe.tabSize.of(e),Lr.of(" ".repeat(e))])}setPlaceholder(e){this.togglePlaceholder(K3(e))}focus(e){if(this.view.focus(),!e)return;let i=0,n=0,r=0;switch(e){case"start":break;case"end":{i=n=r=this.getValue().length;break}default:i=e.rangeAnchor||e.cursorPos,n=e.rangeHead||e.cursorPos,r=e.cursorPos}this.view.dispatch({scrollIntoView:!0,selection:E.create([E.range(i,n),E.cursor(r)],1)})}setDisabled(e){this.toggleDisabled([W.editable.of(!e)])}setReadOnly(e){this.toggleReadOnly([fe.readOnly.of(e)])}setMaxLength(e){this.maxLength=e,this.toggleMaxlength([fe.changeFilter.of(i=>i.newDoc.length<=e)])}}const O6=(t,e)=>{const i=H("editorId"),n=s=>{s instanceof Promise?s.then(o=>{X.emit(i,xe,"universal",{generate(){return{targetValue:o}}})}).catch(o=>{console.error(o)}):X.emit(i,xe,"universal",{generate(){return{targetValue:s}}})};return s=>{var o,l,a;if(!s.clipboardData)return;if(s.clipboardData.files.length>0){const{files:m}=s.clipboardData;X.emit(i,Hl,Array.from(m).filter(O=>/image \/ .*/.test(O.type))),s.preventDefault();return}const u=s.clipboardData.getData("text/plain"),c=((o=e.value)==null?void 0:o.view.state.selection.main.to)||0,h=((l=e.value)==null?void 0:l.view.state.doc.lineAt(c).from)||0,f=((a=e.value)==null?void 0:a.view.state.doc.sliceString(h,c))||"",d=/! \[ .* \] \( \s * $ /.test(f),p=/! \[ .* \] \( (.*) \s ?.* \) /.test(u);if(d){const m=t.transformImgUrl(u);n(m),s.preventDefault();return}else if(p){const m=u.match(new RegExp( ` ( ? <= ! \ \ [ . * \ \ ] \ \ ( ) ( [ ^ ) \ \ s ] + ) ( ? = \ \ s ? [ "']?.*[" ' ] ? \ \ ) ) ` ,"g"));m?Promise.all(m.map(O=>t.transformImgUrl(O))).then(O=>{n(O.reduce((g,b,y)=>g.replace(m[y],b),u))}):n(u),s.preventDefault();return}if(t.autoDetectCode&&s.clipboardData.types.includes("vscode-editor-data")){const m=JSON.parse(s.clipboardData.getData("vscode-editor-data"));X.emit(i,xe,"code",{mode:m.mode,text:s.clipboardData.getData("text/plain")}),s.preventDefault();return}t.maxlength&&u.length+t.modelValue.length>t.maxlength&&X.emit(i,hn,{name:"overlength",message:"The input text is too long",data:u})}},g6=(t,e)=>[{key:"Ctrl-b",mac:"Cmd-b",run:()=>(X.emit(t,xe,"bold"),!0)},{key:"Ctrl-d",mac:"Cmd-d",run:m1,preventDefault:!0},{key:"Ctrl-s",mac:"Cmd-s",run:w=>(X.emit(t,Ul,w.state.doc.toString()),!0),shift:()=>(X.emit(t,x
` &&l()}return Gr.trim(o)}var z6=X6,Wo=Zn,j6=z6;function qp(t){return t==null}function F6(t){var e={};for(var i in t)e[i]=t[i];return e}function sv(t){t=F6(t||{}),t.whiteList=t.whiteList||Wo.whiteList,t.onAttr=t.onAttr||Wo.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||Wo.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||Wo.safeAttrValue,this.options=t}sv.prototype.process=function(t){if(t=t||"",t=t.toString(),!t)return"";var e=this,i=e.options,n=i.whiteList,r=i.onAttr,s=i.onIgnoreAttr,o=i.safeAttrValue,l=j6(t,function(a,u,c,h,f){var d=n[c],p=!1;if(d===!0?p=d:typeof d=="function"?p=d(h):d instanceof RegExp&&(p=d.test(h)),p!==!0&&(p=!1),h=o(c,h),!!h){var m={position:u,sourcePosition:a,source:f,isWhite:p};if(p){var O=r(c,h,m);return qp(O)?c+":"+h:O}else{var O=s(c,h,m);if(!qp(O))return O}}});return l};var B6=sv;(function(t,e){var i=Zn,n=B6;function r(o,l){var a=new n(l);return a.process(o)}e=t.exports=r,e.FilterCSS=n;for(var s in i)e[s]=i[s];typeof window<"u"&&(window.filterCSS=t.exports)})(Sc,Sc.exports);var Ih=Sc.exports,Xh={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var n,r;if(Array.prototype.forEach)return t.forEach(e,i);for(n=0,r=t.length;n<r;n++)e.call(i,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^ \s *)|( \s * $ )/g,"")},spaceIndex:function(t){var e=/ \s | \n | \t /,i=e.exec(t);return i?i.index:-1}},V6=Ih.FilterCSS,q6=Ih.getDefaultWhiteList,Nl=Xh;function ov(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var lv=new V6;function W6(t,e,i){}function Y6(t,e,i){}function N6(t,e,i){}function G6(t,e,i){}function av(t){return t.replace(H6,"<").replace(K6,">")}function U6(t,e,i,n){if(i=pv(i),e==="href"||e==="src"){if(i=Nl.trim(i),i==="#")return"#";if(!(i.substr(0,7)==="http://"||i.substr(0,8)==="https://"||i.substr(0,7)==="mailto:"||i.substr(0,4)==="tel:"||i.substr(0,11)==="data:image/"||i.substr(0,6)==="ftp://"||i.substr(0,2)==="./"||i.substr(0,3)==="../"||i[0]==="#"||i[0]==="/"))return""}else if(e==="background"){if(Yo.lastIndex=0,Yo.test(i))return""}else if(e==="style"){if(Wp.lastIndex=0,Wp.test(i)||(Yp.lastIndex=0,Yp.test(i)&&(Yo.lastIndex=0,Yo.test(i))))return"";n!==!1&&(n=n||lv,i=n.process(i))}return i=mv(i),i}var H6=/</g,K6=/>/g,J6=/"/g,e4=/"/g,t4=/&#([a-zA-Z0-9]*);?/gim,i4=/:?/gim,n4=/&newline;?/gim,Yo=/((j \s *a \s *v \s *a|v \s *b|l \s *i \s *v \s *e) \s *s \s *c \s *r \s *i \s *p \s *t \s *|m \s *o \s *c \s *h \s *a):/gi,Wp=/e \s *x \s *p \s *r \s *e \s *s \s *s \s *i \s *o \s *n \s * \( .*/gi,Yp=/u \s *r \s *l \s * \( .*/gi;function uv(t){return t.replace(J6,""")}function cv(t){return t.replace(e4,'"')}function hv(t){return t.replace(t4,function(i,n){return n[0]==="x"||n[0]==="X"?String.fromCharCode(parseInt(n.substr(1),16)):String.fromCharCode(parseInt(n,10))})}function fv(t){return t.replace(i4,":").replace(n4," ")}function dv(t){for(var e="",i=0,n=t.length;i<n;i++)e+=t.charCodeAt(i)<32?" ":t.charAt(i);return Nl.trim(e)}function pv(t){return t=cv(t),t=hv(t),t=fv(t