bookstack/public/dist/app.js

55 lines
288 KiB
JavaScript
Raw Normal View History

var vu=Object.create;var Ct=Object.defineProperty;var yu=Object.getOwnPropertyDescriptor;var wu=Object.getOwnPropertyNames;var xu=Object.getPrototypeOf,ku=Object.prototype.hasOwnProperty;var Cu=(n,e,t)=>e in n?Ct(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var _u=(n,e)=>()=>(n&&(e=n(n=0)),e);var E=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),_t=(n,e)=>{for(var t in e)Ct(n,t,{get:e[t],enumerable:!0})},qo=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of wu(e))!ku.call(n,r)&&r!==t&&Ct(n,r,{get:()=>e[r],enumerable:!(i=yu(e,r))||i.enumerable});return n};var Bo=(n,e,t)=>(t=n!=null?vu(xu(n)):{},qo(e||!n||!n.__esModule?Ct(t,"default",{value:n,enumerable:!0}):t,n)),Eu=n=>qo(Ct({},"__esModule",{value:!0}),n);var de=(n,e,t)=>(Cu(n,typeof e!="symbol"?e+"":e,t),t),Su=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var re=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)};var L=(n,e,t)=>(Su(n,e,"access private method"),t);var xs=E((db,Ch)=>{Ch.exports={Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",amp:"&",AMP:"&",andand:"\u2A55",And:"\u2A53",and:"\u2227",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angmsd:"\u2221",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",apacir:"\u2A6F",ap:"\u2248",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvb
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u01
`," "],Th=["{","}","|","\\","^","`"].concat(Lh),Ih=["'"].concat(Th),$s=["%","/","?",";","#"].concat(Ih),Fs=["/","?","#"],$h=255,Ms=/^[+a-z0-9A-Z_-]{0,63}$/,Fh=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,qs={javascript:!0,"javascript:":!0},Bs={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Mh(n,e){if(n&&n instanceof li)return n;var t=new li;return t.parse(n,e),t}li.prototype.parse=function(n,e){var t,i,r,o,s,a=n;if(a=a.trim(),!e&&n.split("#").length===1){var l=Dh.exec(a);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var c=Sh.exec(a);if(c&&(c=c[0],r=c.toLowerCase(),this.protocol=c,a=a.substr(c.length)),(e||c||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=a.substr(0,2)==="//",s&&!(c&&qs[c])&&(a=a.substr(2),this.slashes=!0)),!qs[c]&&(s||c&&!Bs[c])){var u=-1;for(t=0;t<Fs.length;t++)o=a.indexOf(Fs[t]),o!==-1&&(u===-1||o<u)&&(u=o);var h,d;for(u===-1?d=a.lastIndexOf("@"):d=a.lastIndexOf("@",u),d!==-1&&(h=a.slice(0,d),a=a.slice(d+1),this.auth=h),u=-1,t=0;t<$s.length;t++)o=a.indexOf($s[t]),o!==-1&&(u===-1||o<u)&&(u=o);u===-1&&(u=a.length),a[u-1]===":"&&u--;var p=a.slice(0,u);a=a.slice(u),this.parseHost(p),this.hostname=this.hostname||"";var f=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!f){var m=this.hostname.split(/\./);for(t=0,i=m.length;t<i;t++){var w=m[t];if(w&&!w.match(Ms)){for(var v="",g=0,k=w.length;g<k;g++)w.charCodeAt(g)>127?v+="x":v+=w[g];if(!v.match(Ms)){var y=m.slice(0,t),_=m.slice(t+1),x=w.match(Fh);x&&(y.push(x[1]),_.unshift(x[2])),_.length&&(a=_.join(".")+a),this.hostname=y.join(".");break}}}}this.hostname.length>$h&&(this.hostname=""),f&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var S=a.indexOf("#");S!==-1&&(this.hash=a.substr(S),a=a.slice(0,S));var D=a.indexOf("?");return D!==-1&&(this.search=a.substr(D),a=a.slice(0,D)),a&&(this.pathname=a),Bs[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};li.prototype.parseHost=function(n){var e=Ah.exec(n);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),n=n.substr(0,n.length-e.length)),n&&(this.hostname=n)};Ps.exports=Mh});var Hr=E((yb,Gt)=>{"use strict";Gt.exports.encode=Ss();Gt.exports.decode=Ls();Gt.exports.format=Is();Gt.exports.parse=Os()});var Ur=E((wb,Ns)=>{Ns.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var jr=E((xb,Rs)=>{Rs.exports=/[\0-\x1F\x7F-\x9F]/});var Hs=E((kb,zs)=>{zs.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/});var Vr=E((Cb,Us)=>{Us.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var js=E(ft=>{"use strict";ft.Any=Ur();ft.Cc=jr();ft.Cf=Hs();ft.P=oi();ft.Z=Vr()});var O=E(J=>{"use strict";function qh(n){return Object.prototype.toString.call(n)}function Bh(n){return qh(n)==="[object String]"}var Ph=Object.prototype.hasOwnProperty;function Ws(n,e){return Ph.call(n,e)}function Oh(n){var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(t){if(t){if(typeof t!="object")throw new TypeError(t+"must be object");Object.keys(t).forEach(function(i){n[i]=t[i]})}}),n}function Nh(n,e,t){return[].concat(n.slice(0,e),t,n.slice(e+1))}function Gs(n){return!(n>=55296&&n<=57343||n>=64976&&n<=65007||(n&65535)===65535||(n&65535)===65534||n>=0&&n<=8||n===11||n>=14&&n<=31||n>=127&&n<=159||n>1114111)}function Zs(n){if(n>65535){n-=65536;var e=55296+(n>>10),t=56320+(n&1023);return String.fromCharCode(e,t)}return String.fromCharCode(n)}var Ks=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,Rh=/&([a-z#][a-z0-9]{1,31});/gi,zh=new RegExp(Ks.source+"|"+Rh.source,"gi"),Hh=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,Vs=zr();function Uh(n,e){var t=0;return Ws(Vs,e)?Vs[e]:e.charCodeAt(0)===35&&Hh.test(e)&&(t=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Gs(t))?Zs(t):n}function jh(n){return n.indexOf("\\")<0?n:n.replace(Ks,"$1")}function Vh(n){return n.indexOf("\\
`};Ae.fence=function(n,e,t,i,r){var o=n[e],s=o.info?ad(o.info).trim():"",a="",l="",c,u,h,d,p;return s&&(h=s.split(/(\s+)/g),a=h[0],l=h.slice(2).join("")),t.highlight?c=t.highlight(o.content,a,l)||Je(o.content):c=Je(o.content),c.indexOf("<pre")===0?c+`
`:s?(u=o.attrIndex("class"),d=o.attrs?o.attrs.slice():[],u<0?d.push(["class",t.langPrefix+a]):(d[u]=d[u].slice(),d[u][1]+=" "+t.langPrefix+a),p={attrs:d},"<pre><code"+r.renderAttrs(p)+">"+c+`</code></pre>
`):"<pre><code"+r.renderAttrs(o)+">"+c+`</code></pre>
`};Ae.image=function(n,e,t,i,r){var o=n[e];return o.attrs[o.attrIndex("alt")][1]=r.renderInlineAsText(o.children,t,i),r.renderToken(n,e,t)};Ae.hardbreak=function(n,e,t){return t.xhtmlOut?`<br />
`:`<br>
`};Ae.softbreak=function(n,e,t){return t.breaks?t.xhtmlOut?`<br />
`:`<br>
`:`
`};Ae.text=function(n,e){return Je(n[e].content)};Ae.html_block=function(n,e){return n[e].content};Ae.html_inline=function(n,e){return n[e].content};function mt(){this.rules=sd({},Ae)}mt.prototype.renderAttrs=function(e){var t,i,r;if(!e.attrs)return"";for(r="",t=0,i=e.attrs.length;t<i;t++)r+=" "+Je(e.attrs[t][0])+'="'+Je(e.attrs[t][1])+'"';return r};mt.prototype.renderToken=function(e,t,i){var r,o="",s=!1,a=e[t];return a.hidden?"":(a.block&&a.nesting!==-1&&t&&e[t-1].hidden&&(o+=`
`),o+=(a.nesting===-1?"</":"<")+a.tag,o+=this.renderAttrs(a),a.nesting===0&&i.xhtmlOut&&(o+=" /"),a.block&&(s=!0,a.nesting===1&&t+1<e.length&&(r=e[t+1],(r.type==="inline"||r.hidden||r.nesting===-1&&r.tag===a.tag)&&(s=!1))),o+=s?`>
`:">",o)};mt.prototype.renderInline=function(n,e,t){for(var i,r="",o=this.rules,s=0,a=n.length;s<a;s++)i=n[s].type,typeof o[i]<"u"?r+=o[i](n,s,e,t,this):r+=this.renderToken(n,s,e);return r};mt.prototype.renderInlineAsText=function(n,e,t){for(var i="",r=0,o=n.length;r<o;r++)n[r].type==="text"?i+=n[r].content:n[r].type==="image"?i+=this.renderInlineAsText(n[r].children,e,t):n[r].type==="softbreak"&&(i+=`
`);return i};mt.prototype.render=function(n,e,t){var i,r,o,s="",a=this.rules;for(i=0,r=n.length;i<r;i++)o=n[i].type,o==="inline"?s+=this.renderInline(n[i].children,e,t):typeof a[o]<"u"?s+=a[n[i].type](n,i,e,t,this):s+=this.renderToken(n,i,e,t);return s};ra.exports=mt});var ui=E((Ib,sa)=>{"use strict";function Ce(){this.__rules__=[],this.__cache__=null}Ce.prototype.__find__=function(n){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===n)return e;return-1};Ce.prototype.__compile__=function(){var n=this,e=[""];n.__rules__.forEach(function(t){t.enabled&&t.alt.forEach(function(i){e.indexOf(i)<0&&e.push(i)})}),n.__cache__={},e.forEach(function(t){n.__cache__[t]=[],n.__rules__.forEach(function(i){i.enabled&&(t&&i.alt.indexOf(t)<0||n.__cache__[t].push(i.fn))})})};Ce.prototype.at=function(n,e,t){var i=this.__find__(n),r=t||{};if(i===-1)throw new Error("Parser rule not found: "+n);this.__rules__[i].fn=e,this.__rules__[i].alt=r.alt||[],this.__cache__=null};Ce.prototype.before=function(n,e,t,i){var r=this.__find__(n),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(r,0,{name:e,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null};Ce.prototype.after=function(n,e,t,i){var r=this.__find__(n),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(r+1,0,{name:e,enabled:!0,fn:t,alt:o.alt||[]}),this.__cache__=null};Ce.prototype.push=function(n,e,t){var i=t||{};this.__rules__.push({name:n,enabled:!0,fn:e,alt:i.alt||[]}),this.__cache__=null};Ce.prototype.enable=function(n,e){Array.isArray(n)||(n=[n]);var t=[];return n.forEach(function(i){var r=this.__find__(i);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!0,t.push(i)},this),this.__cache__=null,t};Ce.prototype.enableOnly=function(n,e){Array.isArray(n)||(n=[n]),this.__rules__.forEach(function(t){t.enabled=!1}),this.enable(n,e)};Ce.prototype.disable=function(n,e){Array.isArray(n)||(n=[n]);var t=[];return n.forEach(function(i){var r=this.__find__(i);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!1,t.push(i)},this),this.__cache__=null,t};Ce.prototype.getRules=function(n){return this.__cache__===null&&this.__compile__(),this.__cache__[n]||[]};sa.exports=Ce});var la=E(($b,aa)=>{"use strict";var ld=/\r\n?|\n/g,cd=/\0/g;aa.exports=function(e){var t;t=e.src.replace(ld,`
`),t=t.replace(cd,"\uFFFD"),e.src=t}});var ua=E((Fb,ca)=>{"use strict";ca.exports=function(e){var t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}});var da=E((Mb,ha)=>{"use strict";ha.exports=function(e){var t=e.tokens,i,r,o;for(r=0,o=t.length;r<o;r++)i=t[r],i.type==="inline"&&e.md.inline.parse(i.content,e.md,e.env,i.children)}});var fa=E((qb,pa)=>{"use strict";var ud=O().arrayReplaceAt;function hd(n){return/^<a[>\s]/i.test(n)}function dd(n){return/^<\/a\s*>/i.test(n)}pa.exports=function(e){var t,i,r,o,s,a,l,c,u,h,d,p,f,m,w,v,g=e.tokens,k;if(e.md.options.linkify){for(i=0,r=g.length;i<r;i++)if(!(g[i].type!=="inline"||!e.md.linkify.pretest(g[i].content)))for(o=g[i].children,f=0,t=o.length-1;t>=0;t--){if(a=o[t],a.type==="link_close"){for(t--;o[t].level!==a.level&&o[t].type!=="link_open";)t--;continue}if(a.type==="html_inline"&&(hd(a.content)&&f>0&&f--,dd(a.content)&&f++),!(f>0)&&a.type==="text"&&e.md.linkify.test(a.content)){for(u=a.content,k=e.md.linkify.match(u),l=[],p=a.level,d=0,k.length>0&&k[0].index===0&&t>0&&o[t-1].type==="text_special"&&(k=k.slice(1)),c=0;c<k.length;c++)m=k[c].url,w=e.md.normalizeLink(m),e.md.validateLink(w)&&(v=k[c].text,k[c].schema?k[c].schema==="mailto:"&&!/^mailto:/i.test(v)?v=e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):v=e.md.normalizeLinkText(v):v=e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),h=k[c].index,h>d&&(s=new e.Token("text","",0),s.content=u.slice(d,h),s.level=p,l.push(s)),s=new e.Token("link_open","a",1),s.attrs=[["href",w]],s.level=p++,s.markup="linkify",s.info="auto",l.push(s),s=new e.Token("text","",0),s.content=v,s.level=p,l.push(s),s=new e.Token("link_close","a",-1),s.level=--p,s.markup="linkify",s.info="auto",l.push(s),d=k[c].lastIndex);d<u.length&&(s=new e.Token("text","",0),s.content=u.slice(d),s.level=p,l.push(s)),g[i].children=o=ud(o,t,l)}}}}});var ba=E((Bb,ga)=>{"use strict";var ma=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,pd=/\((c|tm|r)\)/i,fd=/\((c|tm|r)\)/ig,md={c:"\xA9",r:"\xAE",tm:"\u2122"};function gd(n,e){return md[e.toLowerCase()]}function bd(n){var e,t,i=0;for(e=n.length-1;e>=0;e--)t=n[e],t.type==="text"&&!i&&(t.content=t.content.replace(fd,gd)),t.type==="link_open"&&t.info==="auto"&&i--,t.type==="link_close"&&t.info==="auto"&&i++}function vd(n){var e,t,i=0;for(e=n.length-1;e>=0;e--)t=n[e],t.type==="text"&&!i&&ma.test(t.content)&&(t.content=t.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),t.type==="link_open"&&t.info==="auto"&&i--,t.type==="link_close"&&t.info==="auto"&&i++}ga.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(pd.test(e.tokens[t].content)&&bd(e.tokens[t].children),ma.test(e.tokens[t].content)&&vd(e.tokens[t].children))}});var _a=E((Pb,Ca)=>{"use strict";var va=O().isWhiteSpace,ya=O().isPunctChar,wa=O().isMdAsciiPunct,yd=/['"]/,xa=/['"]/g,ka="\u2019";function hi(n,e,t){return n.slice(0,e)+t+n.slice(e+1)}function wd(n,e){var t,i,r,o,s,a,l,c,u,h,d,p,f,m,w,v,g,k,y,_,x;for(y=[],t=0;t<n.length;t++){for(i=n[t],l=n[t].level,g=y.length-1;g>=0&&!(y[g].level<=l);g--);if(y.length=g+1,i.type==="text"){r=i.content,s=0,a=r.length;e:for(;s<a&&(xa.lastIndex=s,o=xa.exec(r),!!o);){if(w=v=!0,s=o.index+1,k=o[0]==="'",u=32,o.index-1>=0)u=r.charCodeAt(o.index-1);else for(g=t-1;g>=0&&!(n[g].type==="softbreak"||n[g].type==="hardbreak");g--)if(n[g].content){u=n[g].content.charCodeAt(n[g].content.length-1);break}if(h=32,s<a)h=r.charCodeAt(s);else for(g=t+1;g<n.length&&!(n[g].type==="softbreak"||n[g].type==="hardbreak");g++)if(n[g].content){h=n[g].content.charCodeAt(0);break}if(d=wa(u)||ya(String.fromCharCode(u)),p=wa(h)||ya(String.fromCharCode(h)),f=va(u),m=va(h),m?w=!1:p&&(f||d||(w=!1)),f?v=!1:d&&(m||p||(v=!1)),h===34&&o[0]==='"'&&u>=48&&u<=57&&(v=w=!1),w&&v&&(w=
`,s.map=[t,e.line],!0}});var Na=E((jb,Oa)=>{"use strict";Oa.exports=function(e,t,i,r){var o,s,a,l,c,u,h,d=!1,p=e.bMarks[t]+e.tShift[t],f=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||p+3>f||(o=e.src.charCodeAt(p),o!==126&&o!==96)||(c=p,p=e.skipChars(p,o),s=p-c,s<3)||(h=e.src.slice(c,p),a=e.src.slice(p,f),o===96&&a.indexOf(String.fromCharCode(o))>=0))return!1;if(r)return!0;for(l=t;l++,!(l>=i||(p=c=e.bMarks[l]+e.tShift[l],f=e.eMarks[l],p<f&&e.sCount[l]<e.blkIndent));)if(e.src.charCodeAt(p)===o&&!(e.sCount[l]-e.blkIndent>=4)&&(p=e.skipChars(p,o),!(p-c<s)&&(p=e.skipSpaces(p),!(p<f)))){d=!0;break}return s=e.sCount[t],e.line=l+(d?1:0),u=e.push("fence","code",0),u.info=a,u.content=e.getLines(t+1,l,s,!0),u.markup=h,u.map=[t,e.line],!0}});var Ha=E((Vb,za)=>{"use strict";var Ra=O().isSpace;za.exports=function(e,t,i,r){var o,s,a,l,c,u,h,d,p,f,m,w,v,g,k,y,_,x,S,D,q=e.lineMax,T=e.bMarks[t]+e.tShift[t],I=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(T++)!==62)return!1;if(r)return!0;for(l=p=e.sCount[t]+1,e.src.charCodeAt(T)===32?(T++,l++,p++,o=!1,y=!0):e.src.charCodeAt(T)===9?(y=!0,(e.bsCount[t]+p)%4===3?(T++,l++,p++,o=!1):o=!0):y=!1,f=[e.bMarks[t]],e.bMarks[t]=T;T<I&&(s=e.src.charCodeAt(T),Ra(s));){s===9?p+=4-(p+e.bsCount[t]+(o?1:0))%4:p++;T++}for(m=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),u=T>=I,g=[e.sCount[t]],e.sCount[t]=p-l,k=[e.tShift[t]],e.tShift[t]=T-e.bMarks[t],x=e.md.block.ruler.getRules("blockquote"),v=e.parentType,e.parentType="blockquote",d=t+1;d<i&&(D=e.sCount[d]<e.blkIndent,T=e.bMarks[d]+e.tShift[d],I=e.eMarks[d],!(T>=I));d++){if(e.src.charCodeAt(T++)===62&&!D){for(l=p=e.sCount[d]+1,e.src.charCodeAt(T)===32?(T++,l++,p++,o=!1,y=!0):e.src.charCodeAt(T)===9?(y=!0,(e.bsCount[d]+p)%4===3?(T++,l++,p++,o=!1):o=!0):y=!1,f.push(e.bMarks[d]),e.bMarks[d]=T;T<I&&(s=e.src.charCodeAt(T),Ra(s));){s===9?p+=4-(p+e.bsCount[d]+(o?1:0))%4:p++;T++}u=T>=I,m.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),g.push(e.sCount[d]),e.sCount[d]=p-l,k.push(e.tShift[d]),e.tShift[d]=T-e.bMarks[d];continue}if(u)break;for(_=!1,a=0,c=x.length;a<c;a++)if(x[a](e,d,i,!0)){_=!0;break}if(_){e.lineMax=d,e.blkIndent!==0&&(f.push(e.bMarks[d]),m.push(e.bsCount[d]),k.push(e.tShift[d]),g.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}f.push(e.bMarks[d]),m.push(e.bsCount[d]),k.push(e.tShift[d]),g.push(e.sCount[d]),e.sCount[d]=-1}for(w=e.blkIndent,e.blkIndent=0,S=e.push("blockquote_open","blockquote",1),S.markup=">",S.map=h=[t,0],e.md.block.tokenize(e,t,d),S=e.push("blockquote_close","blockquote",-1),S.markup=">",e.lineMax=q,e.parentType=v,h[1]=e.line,a=0;a<k.length;a++)e.bMarks[a+t]=f[a],e.tShift[a+t]=k[a],e.sCount[a+t]=g[a],e.bsCount[a+t]=m[a];return e.blkIndent=w,!0}});var ja=E((Wb,Ua)=>{"use strict";var Cd=O().isSpace;Ua.exports=function(e,t,i,r){var o,s,a,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||(o=e.src.charCodeAt(c++),o!==42&&o!==45&&o!==95))return!1;for(s=1;c<u;){if(a=e.src.charCodeAt(c++),a!==o&&!Cd(a))return!1;a===o&&s++}return s<3?!1:(r||(e.line=t+1,l=e.push("hr","hr",0),l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(o))),!0)}});var Ka=E((Gb,Za)=>{"use strict";var Ga=O().isSpace;function Va(n,e){var t,i,r,o;return i=n.bMarks[e]+n.tShift[e],r=n.eMarks[e],t=n.src.charCodeAt(i++),t!==42&&t!==45&&t!==43||i<r&&(o=n.src.charCodeAt(i),!Ga(o))?-1:i}function Wa(n,e){var t,i=n.bMarks[e]+n.tShift[e],r=i,o=n.eMarks[e];if(r+1>=o||(t=n.src.charCodeAt(r++),t<48||t>57))return-1;for(;;){if(r>=o)return-1;if(t=n.src.charCodeAt(r++),t>=48&&t<=57){if(r-i>=10)return-1;continue}if(t===41||t===46)break;return-1}return r<o&&(t=n.src.charCodeAt(r),!Ga(t))?-1:r}function _d(n,e){var t,i,r=n.level+2;for(t=e+2,i=n.tokens.length-2;t<i;t++)n.tokens[t].level===r&&n.tokens[t].type==="paragraph_open"&&(n.tokens[t+2].hidden=!0,n.tokens[t].hidden=!0,t+=2)}Za.exports=function(e,t,i,r){var o,s,a,l,c,u,h,d,p,f,m,w,v,g,k,y,_,x,S,D,q,T,I,H,R,ee,ge,V,Pe=!1,Oe=!0;if(e.sCount[t]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&e.parentType==="paragraph"&&e.sCount[t]>=e.blkInde
`);lr(e)}}function $u(n){n.status&&n.status>=400&&n.data&&n.data.message&&lr(n.data.message)}var ur={};_t(ur,{HttpError:()=>on,createXMLHttpRequest:()=>Mu,delete:()=>Nu,get:()=>qu,patch:()=>Ou,post:()=>Bu,put:()=>Pu});async function Fu(n){if(n.status===204)return null;let t=(n.headers.get("Content-Type")||"").split(";")[0].split("/").pop();return t==="javascript"||t==="json"?n.json():n.text()}var on=class extends Error{constructor(e,t){super(e.statusText),this.data=t,this.headers=e.headers,this.redirected=e.redirected,this.status=e.status,this.statusText=e.statusText,this.url=e.url,this.original=e}};function Mu(n,e,t={}){let i=document.querySelector("meta[name=token]").getAttribute("content"),r=new XMLHttpRequest;for(let[o,s]of Object.entries(t))r.addEventListener(o,s.bind(r));return r.open(n,e),r.withCredentials=!0,r.setRequestHeader("X-CSRF-TOKEN",i),r}async function Po(n,e={}){let t=n;if(t.startsWith("http")||(t=window.baseUrl(t)),e.params){let l=new URL(t);for(let c of Object.keys(e.params)){let u=e.params[c];typeof u<"u"&&u!==null&&l.searchParams.set(c,u)}t=l.toString()}let i=document.querySelector("meta[name=token]").getAttribute("content"),r={...e,credentials:"same-origin"};r.headers={...r.headers||{},baseURL:window.baseUrl(""),"X-CSRF-TOKEN":i};let o=await fetch(t,r),s=await Fu(o),a={data:s,headers:o.headers,redirected:o.redirected,status:o.status,statusText:o.statusText,url:o.url,original:o};if(!o.ok)throw new on(o,s);return a}async function sn(n,e,t=null){let i={method:n,body:t};return typeof t=="object"&&!(t instanceof FormData)&&(i.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},i.body=JSON.stringify(t)),t instanceof FormData&&n!=="post"&&(t.append("_method",n),i.method="post"),Po(e,i)}async function qu(n,e={}){return Po(n,{method:"GET",params:e})}async function Bu(n,e=null){return sn("POST",n,e)}async function Pu(n,e=null){return sn("PUT",n,e)}async function Ou(n,e=null){return sn("PATCH",n,e)}async function Nu(n,e=null){return sn("DELETE",n,e)}var hr=class{constructor(){this.store=new Map,this.parseTranslations()}parseTranslations(){let e=document.querySelectorAll('meta[name="translation"]');for(let t of e){let i=t.getAttribute("key"),r=t.getAttribute("value");this.store.set(i,r)}}get(e,t){let i=this.getTransText(e);return this.performReplacements(i,t)}getPlural(e,t,i){let r=this.getTransText(e);return this.parsePlural(r,t,i)}parsePlural(e,t,i){let r=e.split("|"),o=/^{([0-9]+)}/,s=/^\[([0-9]+),([0-9*]+)]/,a=null;for(let l of r){let c=l.match(o);if(c!==null&&Number(c[1])===t){a=l.replace(o,"").trim();break}let u=l.match(s);if(u!==null&&Number(u[1])<=t&&(u[2]==="*"||Number(u[2])>=t)){a=l.replace(s,"").trim();break}}return a===null&&r.length>1&&(a=t===1?r[0]:r[1]),a===null&&(a=r[0]),this.performReplacements(a,i)}getTransText(e){let t=this.store.get(e);return t===void 0&&console.warn(`Translation with key "${e}" does not exist`),t}performReplacements(e,t){if(!t)return e;let i=e.match(/:(\S+)/g);if(i===null)return e;let r=e;return i.forEach(o=>{let s=o.substring(1);typeof t[s]>"u"||(r=r.replace(o,t[s]))}),r}},Oo=hr;var gr={};_t(gr,{first:()=>Uu,firstOnElement:()=>Vu,get:()=>ju,init:()=>fr,register:()=>mr});function dr(n){let e=i=>i.slice(0,1).toUpperCase()+i.slice(1),t=n.split("-");return t[0]+t.slice(1).map(e).join("")}function No(n){return n.replace(/[A-Z]/g,(e,t)=>(t>0?"-":"")+e.toLowerCase())}var Et={},Ro={},pr=new WeakMap;function Ru(n,e){let t={},i={},r=`${n}@`,o=`[refs*="${r}"]`,s=[...e.querySelectorAll(o)];e.matches(o)&&s.push(e);for(let a of s){let l=a.getAttribute("refs").split(" ").filter(c=>c.startsWith(r)).map(c=>c.replace(r,"")).map(dr);for(let c of l)t[c]=a,typeof i[c]>"u"&&(i[c]=[]),i[c].push(a)}return{refs:t,manyRefs:i}}function zu(n,e){let t={},i=`option:${n}:`;for(let{name:r,value:o}of e.attributes)if(r.startsWith(i)){let s=r.replace(i,"");t[dr(s)]=o||""}return t}function Hu(n,e){let t=Ro[n];if(t===void 0)return;let i;try{i=new t,i.$name=n,i.$el=e;let o=Ru(n,e);i.$refs=o.refs,i.$manyRefs=o.manyRefs,i.$opts=zu(n,e),i.setup()}catch(o){console.error("Failed to cre
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var eh="1.15.0";function Ie(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var $e=Ie(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ut=Ie(/Edge/i),Wo=Ie(/firefox/i),Ot=Ie(/safari/i)&&!Ie(/chrome/i)&&!Ie(/android/i),ns=Ie(/iP(ad|od|hone)/i),is=Ie(/chrome/i)&&Ie(/android/i),rs={capture:!1,passive:!1};function P(n,e,t){n.addEventListener(e,t,!$e&&rs)}function B(n,e,t){n.removeEventListener(e,t,!$e&&rs)}function Dn(n,e){if(e){if(e[0]===">"&&(e=e.substring(1)),n)try{if(n.matches)return n.matches(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e)}catch{return!1}return!1}}function th(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function xe(n,e,t,i){if(n){t=t||document;do{if(e!=null&&(e[0]===">"?n.parentNode===t&&Dn(n,e):Dn(n,e))||i&&n===t)return n;if(n===t)break}while(n=th(n))}return null}var Go=/\s+/g;function X(n,e,t){if(n&&e)if(n.classList)n.classList[t?"add":"remove"](e);else{var i=(" "+n.className+" ").replace(Go," ").replace(" "+e+" "," ");n.className=(i+(t?" "+e:"")).replace(Go," ")}}function A(n,e,t){var i=n&&n.style;if(i){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(t=n.currentStyle),e===void 0?t:t[e];!(e in i)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),i[e]=t+(typeof t=="string"?"":"px")}}function Xe(n,e){var t="";if(typeof n=="string")t=n;else do{var i=A(n,"transform");i&&i!=="none"&&(t=i+" "+t)}while(!e&&(n=n.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function os(n,e,t){if(n){var i=n.getElementsByTagName(e),r=0,o=i.length;if(t)for(;r<o;r++)t(i[r],r);return i}return[]}function Ee(){var n=document.scrollingElement;return n||document.documentElement}function j(n,e,t,i,r){if(!(!n.getBoundingClientRect&&n!==window)){var o,s,a,l,c,u,h;if(n!==window&&n.parentNode&&n!==Ee()?(o=n.getBoundingClientRect(),s=o.top,a=o.left,l=o.bottom,c=o.right,u=o.height,h=o.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(e||t)&&n!==window&&(r=r||n.parentNode,!$e))do if(r&&r.getBoundingClientRect&&(A(r,"transform")!=="none"||t&&A(r,"position")!=="static")){var d=r.getBoundingClientRect();s-=d.top+parseInt(A(r,"border-top-width")),a-=d.left+parseInt(A(r,"border-left-width")),l=s+o.height,c=a+o.width;break}while(r=r.parentNode);if(i&&n!==window){var p=Xe(r||n),f=p&&p.a,m=p&&p.d;p&&(s/=m,a/=f,h/=f,u/=m,l=s+u,c=a+h)}return{top:s,left:a,bottom:l,right:c,width:h,height:u}}}function Zo(n,e,t){for(var i=je(n,!0),r=j(n)[e];i;){var o=j(i)[t],s=void 0;if(t==="top"||t==="left"?s=r>=o:s=r<=o,!s)return i;if(i===Ee())break;i=je(i,!1)}return!1}function ht(n,e,t,i){for(var r=0,o=0,s=n.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==$.ghost&&(i||s[o]!==$.dragged)&&xe(s[o],t.draggable,n,!1)){if(r===e)return s[o];r++}o++}return null}function Pr(n,e){for(var t=n.lastElementChild;t&&(t===$.ghost||A(t,"display")==="none"||e&&!Dn(t,e));)t=t.previousElementSibling;return t||null}function Y(n,e){var t=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==$.clone&&(!e||Dn(n,e))&&t++;return t}function Ko(n){var e=0,t=0,i=Ee();if(n)do{var r=Xe(n),o=r.a,s=r.d;e+=n.scrollLeft*o,t+=n.scrollTop*s}while(n!==i&&(n=n.parentNode));return[e,t]}function nh(n,e){for(var t in n)if(n.hasOwnProperty(t)){for(var i in e)if(e.hasOwnProperty(i)&&e[i]===n[t][i])return Number(t)}return-1}function je(n,e){if(!n||!n.getBoundingClientRect)return Ee();var t=n,i=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=A(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Ee();if(i||e)return t;i=!0}}while(t=t.parentNode);re
`).map(u=>u.indexOf(`drawio-diagram="${r}"`)!==-1?l:u).join(`
`);L(this,wt,Ei).call(this,c,i),tt()}).catch(a=>{this.handleDrawingUploadError(a)})})}handleDrawingUploadError(e){e.status===413?window.$events.emit("error",this.editor.config.text.serverUploadLimit):window.$events.emit("error",this.editor.config.text.imageUploadError),console.error(e)}fullScreen(){let{container:e}=this.editor.config,t=e.classList.contains("fullscreen");e.classList.toggle("fullscreen",!t),document.body.classList.toggle("markdown-fullscreen",!t)}scrollToText(e){if(!e)return;let t=this.editor.cm.state.doc,i=1,r=-1;for(let s of t.iterLines()){if(s.includes(e)){r=i;break}i+=1}if(r===-1)return;let o=t.line(r);L(this,Di,Hc).call(this,o.from,o.to,!0),this.focus()}focus(){this.editor.cm.hasFocus||this.editor.cm.focus()}insertContent(e){L(this,Be,nt).call(this,e,e.length)}prependContent(e){e=L(this,tn,Lo).call(this,e);let i=L(this,ie,ce).call(this).from+e.length+1;L(this,ue,ve).call(this,0,0,`${e}
`,i),this.focus()}appendContent(e){e=L(this,tn,Lo).call(this,e),L(this,ue,ve).call(this,this.editor.cm.state.doc.length,`
${e}`),this.focus()}replaceContent(e){L(this,wt,Ei).call(this,e)}replaceLineStart(e){let t=L(this,ie,ce).call(this),i=this.editor.cm.state.doc.lineAt(t.from),r=i.text,o=r.split(" ")[0];if(o===e){let c=r.replace(`${e} `,""),u=t.from+(c.length-r.length);L(this,ue,ve).call(this,i.from,i.to,c,u);return}let s=r;/^[#>`]/.test(o)?s=r.replace(o,e).trim():e!==""&&(s=`${e} ${r}`);let l=t.from+(s.length-r.length);L(this,ue,ve).call(this,i.from,i.to,s,l)}wrapSelection(e,t){let i=L(this,ie,ce).call(this),r=L(this,We,vt).call(this,i);if(!r){L(this,xt,Si).call(this,e,t);return}let o=r,s;r.startsWith(e)&&r.endsWith(t)?(o=r.slice(e.length,r.length-t.length),s=i.extend(i.from,i.to-(e.length+t.length))):(o=`${e}${r}${t}`,s=i.extend(i.from,i.to+(e.length+t.length))),L(this,ue,ve).call(this,i.from,i.to,o,s.anchor,s.head)}replaceLineStartForOrderedList(){let e=L(this,ie,ce).call(this),t=this.editor.cm.state.doc.lineAt(e.from),r=this.editor.cm.state.doc.line(t.number-1).text.match(/^(\s*)(\d)([).])\s/)||[],o=(Number(r[2])||0)+1,s=r[1]||"",a=r[3]||".",l=`${s}${o}${a}`;return this.replaceLineStart(l)}cycleCalloutTypeAtSelection(){let e=L(this,ie,ce).call(this),t=this.editor.cm.state.doc.lineAt(e.from),i=["info","success","warning","danger"],r=i.join("|"),s=new RegExp(`class="((${r})\\s+callout|callout\\s+(${r}))"`,"i").exec(t.text),a=(s?s[2]||s[3]:"").toLowerCase();if(a===i[i.length-1])L(this,xt,Si).call(this,`<p class="callout ${i[i.length-1]}">`,"</p>");else if(a==="")L(this,xt,Si).call(this,'<p class="callout info">',"</p>");else{let l=i.indexOf(a)+1,c=i[l],u=t.text.replace(s[0],s[0].replace(a,c)),h=u.length-t.text.length;L(this,ue,ve).call(this,t.from,t.to,u,e.anchor+h,e.head+h)}}syncDisplayPosition(e){let t=e.target;if(Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)<1){this.editor.display.scrollToIndex(-1);return}let r=this.editor.cm.lineBlockAtHeight(t.scrollTop),o=this.editor.cm.state.sliceDoc(0,r.from),l=new DOMParser().parseFromString(this.editor.markdown.render(o),"text/html").documentElement.querySelectorAll("body > *");this.editor.display.scrollToIndex(l.length)}async insertTemplate(e,t,i){let r=this.editor.cm.posAtCoords({x:t,y:i},!1),{data:o}=await window.$http.get(`/templates/${e}`),s=o.markdown||o.html;L(this,ue,ve).call(this,r,r,s,r)}insertClipboardImages(e,t,i){let r=this.editor.cm.posAtCoords({x:t,y:i},!1);for(let o of e)this.uploadImage(o,r)}async uploadImage(e,t=null){if(e===null||e.type.indexOf("image")!==0)return;let i="png";if(t===null&&(t=L(this,ie,ce).call(this).from),e.name){let c=e.name.match(/\.(.+)$/);c.length>1&&(i=c[1])}let r=`image-${Math.random().toString(16).slice(2)}`,s=`![](${window.baseUrl(`/loading.gif#upload${r}`)})`;L(this,ue,ve).call(this,t,t,s,t);let a=`image-${Date.now()}.${i}`,l=new FormData;l.append("file",e,a),l.append("uploaded_to",this.editor.config.pageId);try{let{data:c}=await window.$http.post("/images/gallery",l),u=`[![](${c.thumbs.display})](${c.url})`;L(this,nn,To).call(this,s,u)}catch(c){window.$events.emit("error",this.editor.config.text.imageUploadError),L(this,nn,To).call(this,s,""),console.error(c)}}};en=new WeakSet,Do=function(e,t){let i=`<div drawio-diagram="${e.id}"><img src="${e.url}"></div>`;L(this,Be,nt).call(this,i,i.length,t)},yt=new WeakSet,_i=function(){return this.editor.cm.state.doc.toString()},wt=new WeakSet,Ei=function(e,t=null){t=t||L(this,ie,ce).call(this),L(this,ue,ve).call(this,0,this.editor.cm.state.doc.length,e,t.from),this.focus()},Be=new WeakSet,nt=function(e,t=0,i=null){i=i||this.editor.cm.state.selection.main;let r=i.from+t;L(this,ue,ve).call(this,i.from,i.to,e,r),this.focus()},We=new WeakSet,vt=function(e=null){return e=e||L(this,ie,ce).call(this),this.editor.cm.state.sliceDoc(e.from,e.to)},ie=new WeakSet,ce=function(){return this.editor.cm.state.selection.main},tn=new WeakSet,Lo=function(e){return e.replace(/\r\n|\r/g,`
`)},nn=new WeakSet,To=function(e,t){let i=L(this,yt,_i).call(this).replace(e,t);L(this,wt,Ei).call(this,i)},xt=new WeakSet,Si=function(e,t){let i=L(this,ie,ce).call(this),r=this.editor.cm.state.doc.lineAt(i.from),o=r.text,s,a=0;o.startsWith(e)&&o.endsWith(t)?(s=o.slice(e.length,o.length-t.length),a=-e.length):(s=`${e}${o}${t}`,a=e.length),L(this,ue,ve).call(this,r.from,r.to,s,i.from+a)},ue=new WeakSet,ve=function(e,t=null,i=null,r=null,o=null){let s={changes:{from:e,to:t,insert:i}};r&&(s.selection={anchor:r},o&&(s.selection.head=o)),this.editor.cm.dispatch(s)},Di=new WeakSet,Hc=function(e,t,i=!1){this.editor.cm.dispatch({selection:{anchor:e,head:t},scrollIntoView:i})};var Li=class{constructor(e){this.settingMap={scrollSync:!0,showPreview:!0,editorWidth:50},this.changeListeners={},this.loadFromLocalStorage(),this.applyToInputs(e),this.listenToInputChanges(e)}applyToInputs(e){for(let t of e){let i=t.getAttribute("name").replace("md-","");t.checked=this.settingMap[i]}}listenToInputChanges(e){for(let t of e)t.addEventListener("change",()=>{let i=t.getAttribute("name").replace("md-","");this.set(i,t.checked)})}loadFromLocalStorage(){let e=window.localStorage.getItem("md-editor-settings");if(!e)return;let t=JSON.parse(e);for(let[i,r]of Object.entries(t))r!==null&&this.settingMap[i]!==void 0&&(this.settingMap[i]=r)}set(e,t){this.settingMap[e]=t,window.localStorage.setItem("md-editor-settings",JSON.stringify(this.settingMap));for(let i of this.changeListeners[e]||[])i(t)}get(e){return this.settingMap[e]||null}onChange(e,t){let i=this.changeListeners[e]||[];i.push(t),this.changeListeners[e]=i}};function Ti({html:n,markdown:e}){return e||n}function Uc(n){window.$events.listen("editor::replace",e=>{let t=Ti(e);n.actions.replaceContent(t)}),window.$events.listen("editor::append",e=>{let t=Ti(e);n.actions.appendContent(t)}),window.$events.listen("editor::prepend",e=>{let t=Ti(e);n.actions.prependContent(t)}),window.$events.listen("editor::insert",e=>{let t=Ti(e);n.actions.insertContent(t)}),window.$events.listen("editor::focus",()=>{n.actions.focus()})}function wf(n){let e={};return e["Shift-Mod-i"]=()=>n.actions.insertImage(),e["Mod-s"]=()=>window.$events.emit("editor-save-draft"),e["Mod-Enter"]=()=>window.$events.emit("editor-save-page"),e["Shift-Mod-k"]=()=>n.actions.showLinkSelector(),e["Mod-k"]=()=>n.actions.insertLink(),e["Mod-1"]=()=>n.actions.replaceLineStart("##"),e["Mod-2"]=()=>n.actions.replaceLineStart("###"),e["Mod-3"]=()=>n.actions.replaceLineStart("####"),e["Mod-4"]=()=>n.actions.replaceLineStart("#####"),e["Mod-5"]=()=>n.actions.replaceLineStart(""),e["Mod-d"]=()=>n.actions.replaceLineStart(""),e["Mod-6"]=()=>n.actions.replaceLineStart(">"),e["Mod-q"]=()=>n.actions.replaceLineStart(">"),e["Mod-7"]=()=>n.actions.wrapSelection("\n```\n","\n```"),e["Mod-8"]=()=>n.actions.wrapSelection("`","`"),e["Shift-Mod-e"]=()=>n.actions.wrapSelection("`","`"),e["Mod-9"]=()=>n.actions.cycleCalloutTypeAtSelection(),e["Mod-p"]=()=>n.actions.replaceLineStart("-"),e["Mod-o"]=()=>n.actions.replaceLineStartForOrderedList(),e}function jc(n){let e=wf(n),t=[],i=r=>()=>(r(),!0);for(let[r,o]of Object.entries(e))t.push({key:r,run:i(o),preventDefault:!0});return t}async function Vc(n){let e=await window.importVersioned("code");function t(a){a.docChanged&&n.actions.updateAndRender()}let i=Re(n.actions.syncDisplayPosition.bind(n.actions),100,!1),r=n.settings.get("scrollSync");n.settings.onChange("scrollSync",a=>{r=a});let o={scroll:a=>r&&i(a),drop:a=>{let l=a.dataTransfer.getData("bookstack/template");l&&(a.preventDefault(),n.actions.insertTemplate(l,a.pageX,a.pageY));let u=new Fe(a.dataTransfer).getImages();u.length>0&&(a.stopPropagation(),a.preventDefault(),n.actions.insertClipboardImages(u,a.pageX,a.pageY))},paste:a=>{let l=new Fe(a.clipboardData||a.dataTransfer);if(!l.hasItems()||l.containsTabularData())return;let c=l.getImages();for(let u of c)n.actions.uploadImage(u)}},s=e.markdownEditor(n.config.inputEl,t,o,jc(n));return window.mdEditorView=s,s}async function Wc(n){let e={config:n,markdown:new yi,settings:new Li(n.settingInputs)};return e.ac
`).length;t.style.height=`${i*20+40}px`,this.editingComment=e}updateComment(e){let t=e.target;e.preventDefault();let r={text:t.querySelector("textarea").value,parent_id:this.parentId||null};this.showLoading(t);let o=this.editingComment.getAttribute("comment");window.$http.put(`/comment/${o}`,r).then(s=>{let a=document.createElement("div");a.innerHTML=s.data,this.editingComment.innerHTML=a.children[0].innerHTML,window.$events.success(this.updatedText),window.$components.init(this.editingComment),this.closeUpdateForm(),this.editingComment=null}).catch(window.$events.showValidationErrors).then(()=>{this.hideLoading(t)})}deleteComment(e){let t=e.getAttribute("comment");this.showLoading(e.querySelector("[comment-content]")),window.$http.delete(`/comment/${t}`).then(()=>{e.parentNode.removeChild(e),window.$events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(e){e.preventDefault(),e.stopPropagation();let i={text:this.formInput.value,parent_id:this.parentId||null};this.showLoading(this.form),window.$http.post(`/comment/${this.pageId}`,i).then(r=>{let o=Ne(r.data);this.container.appendChild(o),window.$components.init(o),window.$events.success(this.createdText),this.resetForm(),this.updateCount()}).catch(r=>{window.$events.showValidationErrors(r),this.hideLoading(this.form)})}updateCount(){let e=this.container.children.length;this.elem.querySelector("[comments-title]").textContent=window.trans_plural(this.countText,e,{count:e})}resetForm(){this.formInput.value="",this.formContainer.appendChild(this.form),this.hideForm(),this.removeReplyTo(),this.hideLoading(this.form)}showForm(){this.formContainer.style.display="block",this.formContainer.parentNode.style.display="block",this.addButtonContainer.style.display="none",this.formInput.focus(),this.formInput.scrollIntoView({behavior:"smooth"})}hideForm(){this.formContainer.style.display="none",this.formContainer.parentNode.style.display="none",this.getCommentCount()>0?this.elem.appendChild(this.addButtonContainer):this.commentCountBar.appendChild(this.addButtonContainer),this.addButtonContainer.style.display="block"}getCommentCount(){return this.elem.querySelectorAll(".comment-box[comment]").length}setReply(e){this.showForm(),this.parentId=Number(e.getAttribute("local-id")),this.replyToRow.style.display="block";let t=this.replyToRow.querySelector("a");t.textContent=`#${this.parentId}`,t.href=`#comment${this.parentId}`}removeReplyTo(){this.parentId=null,this.replyToRow.style.display="none"}showLoading(e){let t=e.querySelectorAll(".form-group");for(let i of t)i.style.display="none";e.querySelector(".form-group.loading").style.display="block"}hideLoading(e){let t=e.querySelectorAll(".form-group");for(let i of t)i.style.display="block";e.querySelector(".form-group.loading").style.display="none"}};function xf(n,e){br(`a[href="#${n}"]`,t=>{t.closest("li").classList.toggle("current-heading",e)})}function kf(n){for(let e of n){let t=e.intersectionRatio===1;xf(e.target.id,t)}}function Cf(n){let e={rootMargin:"0px 0px 0px 0px",threshold:1},t=new IntersectionObserver(kf,e);for(let i of n)t.observe(i)}var Bi=class extends b{setup(){if(this.container=this.$el,this.pageId=this.$opts.pageId,window.importVersioned("code").then(t=>t.highlight()),this.setupNavHighlighting(),this.setupDetailsCodeBlockRefresh(),window.location.hash){let t=window.location.hash.replace(/%20/g," ").substring(1);this.goToText(t)}let e=document.querySelector(".sidebar-page-nav");e&&W(e,"a","click",(t,i)=>{t.preventDefault(),window.$components.first("tri-layout").showContent();let r=i.getAttribute("href").substr(1);this.goToText(r),window.history.pushState(null,null,`#${r}`)})}goToText(e){let t=document.getElementById(e);if(br(".page-content [data-highlighted]",i=>{i.removeAttribute("data-highlighted"),i.style.backgroundColor=null}),t!==null)Dt(t);else{let i=zo(".page-content > div > *",e);i&&Dt(i)}}setupNavHighlighting(){let e=document.querySelector(".sidebar-page-nav"),t=document.querySelector(".page-content").querySelectorAll("h1, h2, h3, h4, h5, h6");t.length>0&&e!==null&&Cf(t)}setupDetailsCodeBl
`);return a.textContent}connectedCallback(){let s=Date.now();if(this.editor)return;this.cleanChildContent();let a=this.getContent(),c=a.split(`
`).length*19.2+18+24;this.style.height=`${c}px`;let u=this.shadowRoot.querySelector(".CodeMirrorContainer"),h=d=>{this.editor=d.wysiwygView(u,this.shadowRoot,a,this.getLanguage()),setTimeout(()=>{this.style.height=null},12)};window.importVersioned("code").then(d=>{let p=Date.now()-s<20?20:0;setTimeout(()=>h(d),p)})}cleanChildContent(){let s=this.querySelector("pre");if(s)for(let a of s.childNodes)a.nodeName==="#text"&&a.textContent==="\uFEFF"&&a.remove()}}t.customElements.define("code-block",i)}function Of(n){n.ui.registry.addIcon("codeblock",'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5Z"/><path d="M11.103 15.423c.277.277.277.738 0 .922a.692.692 0 0 1-1.106 0l-4.057-3.78a.738.738 0 0 1 0-1.107l4.057-3.872c.276-.277.83-.277 1.106 0a.724.724 0 0 1 0 1.014L7.6 12.012ZM12.897 8.577c-.245-.312-.2-.675.08-.955.28-.281.727-.27 1.027.033l4.057 3.78a.738.738 0 0 1 0 1.107l-4.057 3.872c-.277.277-.83.277-1.107 0a.724.724 0 0 1 0-1.014l3.504-3.412z"/></svg>'),n.ui.registry.addButton("codeeditor",{tooltip:"Insert code block",icon:"codeblock",onAction(){n.execCommand("codeeditor")}}),n.ui.registry.addButton("editcodeeditor",{tooltip:"Edit code block",icon:"edit-block",onAction(){n.execCommand("codeeditor")}}),n.addCommand("codeeditor",()=>{let e=n.selection.getNode(),t=e.ownerDocument;if(nu(e))iu(n,e);else{let i=n.selection.getContent({format:"text"});ru(n,i,"",(r,o)=>{let s=t.createElement("pre"),a=t.createElement("code");a.classList.add(`language-${o}`),a.innerText=r,s.append(a),n.insertContent(s.outerHTML)})}}),n.on("dblclick",()=>{let e=n.selection.getNode();nu(e)&&iu(n,e)}),n.on("PreInit",()=>{n.parser.addNodeFilter("pre",e=>{for(let t of e){let i=window.tinymce.html.Node.create("code-block",{contenteditable:"false"}),r=t.getAll("span");for(let o of r)o.unwrap();t.attr("style",null),t.wrap(i)}}),n.parser.addNodeFilter("code-block",e=>{for(let t of e)t.attr("contenteditable","false")}),n.serializer.addNodeFilter("code-block",e=>{for(let t of e)t.unwrap()})}),n.ui.registry.addContextToolbar("codeeditor",{predicate(e){return e.nodeName.toLowerCase()==="code-block"},items:"editcodeeditor",position:"node",scope:"node"}),n.on("PreInit",()=>{Pf(n)})}function ou(){return Of}var he=null,ot=null,rt={};function Io(n){return n.hasAttribute("drawio-diagram")}function Nf(n,e=null){he=n,ot=e,window.$components.first("image-manager").show(i=>{if(e){let r=e.querySelector("img");he.undoManager.transact(()=>{he.dom.setAttrib(r,"src",i.url),he.dom.setAttrib(e,"drawio-diagram",i.id)})}else{let r=`<div drawio-diagram="${i.id}" contenteditable="false"><img src="${i.url}"></div>`;he.insertContent(r)}},"drawio")}async function Rf(n){let e=`image-${Math.random().toString(16).slice(2)}`,t=window.baseUrl("/loading.gif"),i=r=>{r.status===413?window.$events.emit("error",rt.translations.serverUploadLimitText):window.$events.emit("error",rt.translations.imageUploadErrorText),console.error(r)};if(ot){tt();let r=ot.querySelector("img");try{let o=await Ao(n,rt.pageId);he.undoManager.transact(()=>{he.dom.setAttrib(r,"src",o.url),he.dom.setAttrib(ot,"drawio-diagram",o.id)})}catch(o){i(o)}return}setTimeout(async()=>{he.insertContent(`<div drawio-diagram contenteditable="false"><img src="${t}" id="${e}"></div>`),tt();try{let r=await Ao(n,rt.pageId);he.undoManager.transact(()=>{he.dom.setAttrib(e,"src",r.url),he.dom.get(e).parentNode.setAttribute("drawio-diagram",r.id)})}catch(r){he.dom.remove(e),i(r)}},5)}function zf(){if(!ot)return Promise.resolve("");let n=ot.getAttribute("drawio-diagram");return Ci(n)}function su(n,e=null){he=n,ot=e,Qt(rt.drawioUrl,zf,Rf)}function Hf(n){n.addCommand("drawio",()=>{let e=n.selection.getNode();su(n,Io(e)?e:null)}),n.ui.registry.addIcon("diagram",`<svg width="24" height="24" fill="${rt.darkMode?"#BBB":"#000000"}" xmlns="http://www.w3.org/2000/svg"><path d="M20.716 7.639V2.845h-4.794v1.598h-7.99V2.845H3.138v4.794h1.598v7.99H3.138v4.794h4.794v-1.598h7.99v1.598h4.794v-4.794h-1.598v-7.99zM4.736 4.443h1.598V6.04H4.736zm1.598 14.382H4.736v-1.598h1.598zm9.588-1.598h-
`),e=n.findIndex(i=>i.trim()==="<!-- Start: custom user content -->"),t=n.findIndex(i=>i.trim()==="<!-- End: custom user content -->");return e===-1||t===-1?"":n.slice(e+1,t).join(`
`)}function um(n){n.serializer.addNodeFilter("br",e=>{for(let t of e)if(t.parent&&t.parent.name==="code"){let i=window.tinymce.html.Node.create("#text");i.value=`
`,t.replace(i)}})}function hm(n){return function(t){function i(){n.darkMode&&t.contentDocument.documentElement.classList.add("dark-mode"),window.$events.emit("editor-html-change","")}t.on("ExecCommand change input NodeChange ObjectResized",i),Kc(t),Jc(t,n),t.on("init",()=>{i(),Xc(t),window.editor=t,Zc(t)}),t.on("PreInit",()=>{um(t)}),window.$events.emitPublic(n.containerElement,"editor-tinymce::setup",{editor:t}),t.ui.registry.addButton("inlinecode",{tooltip:"Inline code",icon:"sourcecode",onAction(){t.execCommand("mceToggleFormat",!1,"code")}})}}function dm(n){return`
html, body, html.dark-mode {
background: ${n.darkMode?"#222":"#fff"};
}
body {
padding-left: 15px !important;
padding-right: 15px !important;
height: initial !important;
margin:0!important;
margin-left: auto! important;
margin-right: auto !important;
overflow-y: hidden !important;
}`.trim().replace(`
`,"")}function mu(n){return window.tinymce.addI18n(n.language,n.translationMap),{width:"100%",height:"100%",selector:"#html-editor",cache_suffix:`?version=${document.querySelector('script[src*="/dist/app.js"]').getAttribute("src").split("?version=")[1]}`,content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:n.darkMode?"tinymce-5-dark":"tinymce-5",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,language:n.language,directionality:n.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/"),end_container_on_empty_block:!0,remove_trailing_brs:!1,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:"pre[*],svg[*],div[drawio-diagram],details[*],summary[*],div[*],li[class|checked|style]",automatic_uploads:!1,custom_elements:"doc-root,code-block",valid_children:["-div[p|h1|h2|h3|h4|h5|h6|blockquote|code-block]","+div[pre|img]","-doc-root[doc-root|#text]","-li[details]","+code-block[pre]","+doc-root[p|h1|h2|h3|h4|h5|h6|blockquote|code-block|div]"].join(","),plugins:lm(n),contextmenu:!1,toolbar:Qc(n),content_style:dm(n),style_formats:rm,style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:om,table_style_by_css:!0,table_use_colgroups:!0,file_picker_types:"file image",color_map:sm,file_picker_callback:am,paste_preprocess(t,i){let{content:r}=i;r.indexOf('<img src="file://')!==-1&&(i.content="")},init_instance_callback(t){let i=t.getDoc().querySelector("head");i.innerHTML+=cm()},setup(t){tu(t),eu(t),hm(n)(t)}}}var sr=class extends b{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.tinyMceConfig=mu({language:this.$opts.language,containerElement:this.elem,darkMode:this.isDarkMode,textDirection:this.textDirection,drawioUrl:this.getDrawIoUrl(),pageId:Number(this.pageId),translations:{imageUploadErrorText:this.$opts.imageUploadErrorText,serverUploadLimitText:this.$opts.serverUploadLimitText},translationMap:window.editor_translations}),window.$events.emitPublic(this.elem,"editor-tinymce::pre-init",{config:this.tinyMceConfig}),window.tinymce.init(this.tinyMceConfig).then(e=>{this.editor=e[0]})}getDrawIoUrl(){let e=document.querySelector("[drawio-url]");return e?e.getAttribute("drawio-url"):""}getContent(){return{html:this.editor.getContent()}}};window.baseUrl=function(e){let t=e,i=document.querySelector('meta[name="base-url"]').getAttribute("content");return i[i.length-1]==="/"&&(i=i.slice(0,i.length-1)),t[0]==="/"&&(t=t.slice(1)),`${i}/${t}`};window.importVersioned=function(e){let t=document.querySelector('link[href*="/dist/styles.css?version="]').href.split("?version=").pop();return import(window.baseUrl(`dist/${e}.js?version=${t}`))};window.$http=ur;window.$events=cr;var kt=new Oo;window.trans=kt.get.bind(kt);window.trans_choice=kt.getPlural.bind(kt);window.trans_plural=kt.parsePlural.bind(kt);mr(Fo);window.$components=gr;fr();
/*! Bundled license information:
sortablejs/modular/sortable.esm.js:
(**!
* Sortable 1.15.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*)
*/
//# sourceMappingURL=app.js.map