(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-089036cc"],{"0010":function(e,t,n){"use strict";n.d(t,"a",(function(){return R})),n.d(t,"b",(function(){return S})),n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return w})),n.d(t,"h",(function(){return T})),n.d(t,"i",(function(){return O})),n.d(t,"j",(function(){return C}));var a=n("0ac0"),l=n("304a"),o=n("5313");function r(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function i(e,t,n){var l=e.selection,r=l.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var i=s(r);if(!i){var u=r.blockRange(),d=u&&Object(a["k"])(u);return null!=d&&(t&&t(e.tr.lift(u,d).scrollIntoView()),!0)}var p=i.nodeBefore;if(!p.type.spec.isolating&&x(e,i,t))return!0;if(0==r.parent.content.size&&(c(p,"end")||o["c"].isSelectable(p))){if(t){var h=e.tr.deleteRange(r.before(),r.after());h.setSelection(c(p,"end")?o["f"].findFrom(h.doc.resolve(h.mapping.map(i.pos,-1)),-1):o["c"].create(h.doc,i.pos-p.nodeSize)),t(h.scrollIntoView())}return!0}return!(!p.isAtom||i.depth!=r.depth-1)&&(t&&t(e.tr.delete(i.pos-p.nodeSize,i.pos).scrollIntoView()),!0)}function c(e,t,n){for(;e;e="start"==t?e.firstChild:e.lastChild){if(e.isTextblock)return!0;if(n&&1!=e.childCount)return!1}return!1}function u(e,t,n){var a=e.selection,l=a.$head,r=a.empty,i=l;if(!r)return!1;if(l.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):l.parentOffset>0)return!1;i=s(l)}var c=i&&i.nodeBefore;return!(!c||!o["c"].isSelectable(c))&&(t&&t(e.tr.setSelection(o["c"].create(e.doc,i.pos-c.nodeSize)).scrollIntoView()),!0)}function s(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function d(e,t,n){var a=e.selection,l=a.$cursor;if(!l||(n?!n.endOfTextblock("forward",e):l.parentOffset=0;t--){var n=e.node(t);if(e.index(t)+11&&l.after()!=l.end(-1)){var o=l.before();if(Object(a["g"])(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}var r=l.blockRange(),i=r&&Object(a["k"])(r);return null!=i&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)}function y(e,t){var n=e.selection,l=n.$from,r=n.$to;if(e.selection instanceof o["c"]&&e.selection.node.isBlock)return!(!l.parentOffset||!Object(a["g"])(e.doc,l.pos))&&(t&&t(e.tr.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(t){var i=r.parentOffset==r.parent.content.size,c=e.tr;(e.selection instanceof o["h"]||e.selection instanceof o["a"])&&c.deleteSelection();var u=0==l.depth?null:m(l.node(-1).contentMatchAt(l.indexAfter(-1))),s=i&&u?[{type:u}]:null,d=Object(a["g"])(c.doc,c.mapping.map(l.pos),1,s);if(s||d||!Object(a["g"])(c.doc,c.mapping.map(l.pos),1,u&&[{type:u}])||(s=[{type:u}],d=!0),d&&(c.split(c.mapping.map(l.pos),1,s),!i&&!l.parentOffset&&l.parent.type!=u)){var p=c.mapping.map(l.before()),h=c.doc.resolve(p);l.node(-1).canReplaceWith(h.index(),h.index()+1,u)&&c.setNodeMarkup(c.mapping.map(l.before()),u)}t(c.scrollIntoView())}return!0}function w(e,t){return t&&t(e.tr.setSelection(new o["a"](e.doc))),!0}function k(e,t,n){var l=t.nodeBefore,o=t.nodeAfter,r=t.index();return!!(l&&o&&l.type.compatibleContent(o.type))&&(!l.content.size&&t.parent.canReplace(r-1,r)?(n&&n(e.tr.delete(t.pos-l.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(r,r+1)||!o.isTextblock&&!Object(a["f"])(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,l.type,l.contentMatchAt(l.childCount)).join(t.pos).scrollIntoView()),!0))}function x(e,t,n){var r,i,u=t.nodeBefore,s=t.nodeAfter;if(u.type.spec.isolating||s.type.spec.isolating)return!1;if(k(e,t,n))return!0;var d=t.parent.canReplace(t.index(),t.index()+1);if(d&&(r=(i=u.contentMatchAt(u.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){for(var p=t.pos+s.nodeSize,h=l["c"].empty,f=r.length-1;f>=0;f--)h=l["c"].from(r[f].create(null,h));h=l["c"].from(u.copy(h));var m=e.tr.step(new a["b"](t.pos-1,p,t.pos,p,new l["j"](h,1,0),r.length,!0)),v=p+2*r.length;Object(a["f"])(m.doc,v)&&m.join(v),n(m.scrollIntoView())}return!0}var b=o["f"].findFrom(t,1),g=b&&b.$from.blockRange(b.$to),y=g&&Object(a["k"])(g);if(null!=y&&y>=t.depth)return n&&n(e.tr.lift(g,y).scrollIntoView()),!0;if(d&&c(s,"start",!0)&&c(u,"end")){for(var w=u,x=[];;){if(x.push(w),w.isTextblock)break;w=w.lastChild}for(var C=s,T=1;!C.isTextblock;C=C.firstChild)T++;if(w.canReplace(w.childCount,w.childCount,C.content)){if(n){for(var M=l["c"].empty,O=x.length-1;O>=0;O--)M=l["c"].from(x[O].copy(M));var S=e.tr.step(new a["b"](t.pos-x.length,t.pos+s.nodeSize,t.pos+T,t.pos+s.nodeSize-T,new l["j"](M,x.length,0),0,!0));n(S.scrollIntoView())}return!0}}return!1}function C(e,t){return function(n,l){var o=n.selection,r=o.$from,i=o.$to,c=r.blockRange(i),u=c&&Object(a["i"])(c,e,t);return!!u&&(l&&l(n.tr.wrap(c,u).scrollIntoView()),!0)}}function T(e,t){return function(n,a){var l=n.selection,o=l.from,r=l.to,i=!1;return n.doc.nodesBetween(o,r,(function(a,l){if(i)return!1;if(a.isTextblock&&!a.hasMarkup(e,t))if(a.type==e)i=!0;else{var o=n.doc.resolve(l),r=o.index();i=o.parent.canReplaceWith(r,r+1,e)}})),!!i&&(a&&a(n.tr.setBlockType(o,r,e,t).scrollIntoView()),!0)}}function M(e,t,n){for(var a=function(a){var l=t[a],o=l.$from,r=l.$to,i=0==o.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(o.pos,r.pos,(function(e){if(i)return!1;i=e.inlineContent&&e.type.allowsMarkType(n)})),i)return{v:!0}},l=0;l(e,t,n)=>{if(t){const e=/^1[3|4|5|7|8][0-9]\d{8}$/;if(!e.test(t))return n(new Error("请输入正确的手机号"));n()}else;},o=(e,t="phone")=>{if(a(e))return[];const{require:n,validator:o}=e&&{...e},r=[];n&&r.push({required:!0,message:"请输入手机号",trigger:"blur"}),o&&r.push({min:11,message:"手机号格式不正确",trigger:"blur"},{trigger:"blur",validator:l()});const i={};return i[t]=r,{...i}},r=()=>(e,t,n)=>{t&&(/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(t)||n(new Error("输入的身份证长度或格式错误")));var a={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"};a[parseInt(null===t||void 0===t?void 0:t.substr(0,2))]||n(new Error("身份证地区非法"));var l=(t.substr(6,4)+"-"+Number(t.substr(10,2))+"-"+Number(t.substr(12,2))).replace(/-/g,"/"),o=new Date(l);l!==o.getFullYear()+"/"+(o.getMonth()+1)+"/"+o.getDate()&&n(new Error("身份证上的出生日期非法"));for(var r=0,i=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],c="10X98765432",u=0;u{if(a(e))return[];const{require:n,validator:l}=e&&{...e},o=[];n&&o.push({required:!0,message:"请输入身份证号",trigger:"blur"}),l&&o.push({trigger:"blur",validator:r()});const i={};return i[t]=o,{...i}},c=(e,t="addredd")=>{if(a(e))return[];const{require:n}=e&&{...e},l=[];n&&l.push({required:!0,message:"请选择地址",trigger:"change"});const o={};return o[t]=l,{...o}},u=()=>(e,t,n)=>{const a=/^([a-zA-Z0-9]+[-_\.]?)+@[a-zA-Z0-9]+\.[a-z]+$/;if(t){if(!a.test(t))return n(new Error("请输入正确的邮箱地址"));n()}else;},s=(e,t="email")=>{if(a(e))return[];const{require:n,validator:l}=e&&{...e},o=[];n&&o.push({required:!0,message:"请输入邮箱",trigger:"blur"}),l&&o.push({trigger:"change",validator:u()});const r={};return r[t]=o,{...r}}},"0ac0":function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return y})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return D})),n.d(t,"g",(function(){return N})),n.d(t,"h",(function(){return R})),n.d(t,"i",(function(){return T})),n.d(t,"j",(function(){return L})),n.d(t,"k",(function(){return C}));var a=n("304a"),l=65535,o=Math.pow(2,16);function r(e,t){return e+t*o}function i(e){return e&l}function c(e){return(e-(e&l))/o}var u=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=null),this.pos=e,this.deleted=t,this.recover=n},s=function e(t,n){if(void 0===n&&(n=!1),!t.length&&e.empty)return e.empty;this.ranges=t,this.inverted=n};s.prototype.recover=function(e){var t=0,n=i(e);if(!this.inverted)for(var a=0;ae)break;var s=this.ranges[i+l],d=this.ranges[i+o],p=c+s;if(e<=p){var h=s?e==c?-1:e==p?1:t:t,f=c+a+(h<0?0:d);if(n)return f;var m=e==(t<0?c:p)?null:r(i/3,e-c);return new u(f,t<0?e!=c:e!=p,m)}a+=d-s}return n?e+a:new u(e+a)},s.prototype.touches=function(e,t){for(var n=0,a=i(t),l=this.inverted?2:1,o=this.inverted?1:2,r=0;re)break;var u=this.ranges[r+l],s=c+u;if(e<=s&&r==3*a)return!0;n+=this.ranges[r+o]-u}return!1},s.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,a=0,l=0;a=0;t--){var a=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=a&&a>t?n-a-1:null)}},d.prototype.invert=function(){var e=new d;return e.appendMappingInverted(this),e},d.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;nl&&i0},h.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(h.prototype,f);var v=Object.create(null),b=function(){};b.prototype.apply=function(e){return m()},b.prototype.getMap=function(){return s.empty},b.prototype.invert=function(e){return m()},b.prototype.map=function(e){return m()},b.prototype.merge=function(e){return null},b.prototype.toJSON=function(){return m()},b.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=v[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},b.jsonID=function(e,t){if(e in v)throw new RangeError("Duplicate use of step JSON ID "+e);return v[e]=t,t.prototype.jsonID=e,t};var g=function(e,t){this.doc=e,this.failed=t};g.ok=function(e){return new g(e,null)},g.fail=function(e){return new g(null,e)},g.fromReplace=function(e,t,n,l){try{return g.ok(e.replace(t,n,l))}catch(o){if(o instanceof a["h"])return g.fail(o.message);throw o}};var y=function(e){function t(t,n,a,l){e.call(this),this.from=t,this.to=n,this.slice=a,this.structure=!!l}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&k(e,this.from,this.to)?g.fail("Structure replace would overwrite content"):g.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new s([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),a=e.mapResult(this.to,-1);return n.deleted&&a.deleted?null:new t(n.pos,Math.max(n.pos,a.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?a["j"].empty:new a["j"](e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var l=this.slice.size+e.slice.size==0?a["j"].empty:new a["j"](this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),l,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,a["j"].fromJSON(e,n.slice),!!n.structure)},t}(b);b.jsonID("replace",y);var w=function(e){function t(t,n,a,l,o,r,i){e.call(this),this.from=t,this.to=n,this.gapFrom=a,this.gapTo=l,this.slice=o,this.insert=r,this.structure=!!i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(k(e,this.from,this.gapFrom)||k(e,this.gapTo,this.to)))return g.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return g.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?g.fromReplace(e,this.from,this.to,n):g.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),a=e.mapResult(this.to,-1),l=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return n.deleted&&a.deleted||la.pos?null:new t(n.pos,a.pos,l,o,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,a["j"].fromJSON(e,n.slice),n.insert,!!n.structure)},t}(b);function k(e,t,n){var a=e.resolve(t),l=n-t,o=a.depth;while(l>0&&o>0&&a.indexAfter(o)==a.node(o).childCount)o--,l--;if(l>0){var r=a.node(o).maybeChild(a.indexAfter(o));while(l>0){if(!r||r.isLeaf)return!0;r=r.firstChild,l--}}return!1}function x(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function C(e){for(var t=e.parent,n=t.content.cutByIndex(e.startIndex,e.endIndex),a=e.depth;;--a){var l=e.$from.node(a),o=e.$from.index(a),r=e.$to.indexAfter(a);if(ao;i--,c--){var u=l.node(i),s=l.index(i);if(u.type.spec.isolating)return!1;var d=u.content.cutByIndex(s,u.childCount),p=a&&a[c]||u;if(p!=u&&(d=d.replaceChild(0,p.type.create(p.attrs))),!u.canReplace(s+1,u.childCount)||!p.type.validContent(d))return!1}var h=l.indexAfter(o),f=a&&a[0];return l.node(o).canReplaceWith(h,h,f?f.type:l.node(o+1).type)}function D(e,t){var n=e.resolve(t),a=n.index();return A(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(a,a+1)}function A(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function L(e,t,n){void 0===n&&(n=-1);for(var a=e.resolve(t),l=a.depth;;l--){var o=void 0,r=void 0,i=a.index(l);if(l==a.depth?(o=a.nodeBefore,r=a.nodeAfter):n>0?(o=a.node(l+1),i++,r=a.node(l).maybeChild(i)):(o=a.node(l).maybeChild(i-1),r=a.node(l+1)),o&&!o.isTextblock&&A(o,r)&&a.node(l).canReplace(i,i+1))return t;if(0==l)break;t=n<0?a.before(l):a.after(l)}}function I(e,t,n){var a=e.resolve(t);if(a.parent.canReplaceWith(a.index(),a.index(),n))return t;if(0==a.parentOffset)for(var l=a.depth-1;l>=0;l--){var o=a.index(l);if(a.node(l).canReplaceWith(o,o,n))return a.before(l+1);if(o>0)return null}if(a.parentOffset==a.parent.content.size)for(var r=a.depth-1;r>=0;r--){var i=a.indexAfter(r);if(a.node(r).canReplaceWith(i,i,n))return a.after(r+1);if(i=0;i--){var c=i==a.depth?0:a.pos<=(a.start(i+1)+a.end(i+1))/2?-1:1,u=a.index(i)+(c>0?1:0),s=a.node(i),d=!1;if(1==r)d=s.canReplace(u,u,l);else{var p=s.contentMatchAt(u).findWrapping(l.firstChild.type);d=p&&s.canReplaceWith(u,u,p[0])}if(d)return 0==c?a.pos:c<0?a.before(i+1):a.after(i+1)}return null}function j(e,t,n){for(var l=[],o=0;ot;p--)h||n.index(p)>0?(h=!0,s=a["c"].from(n.node(p).copy(s)),d++):c--;for(var f=a["c"].empty,m=0,v=o,b=!1;v>t;v--)b||l.after(v+1)=0;l--){if(n.size){var o=t[l].type.contentMatch.matchFragment(n);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=a["c"].from(t[l].type.create(t[l].attrs,n))}var r=e.start,i=e.end;return this.step(new w(r,i,r,i,new a["j"](n,0,0),t.length,!0))},h.prototype.setBlockType=function(e,t,n,l){var o=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var r=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,l)&&E(o.doc,o.mapping.slice(r).map(t),n)){o.clearIncompatible(o.mapping.slice(r).map(t,1),n);var i=o.mapping.slice(r),c=i.map(t,1),u=i.map(t+e.nodeSize,1);return o.step(new w(c,u,c+1,u-1,new a["j"](a["c"].from(n.create(l,null,e.marks)),0,0),1,!0)),!1}})),this},h.prototype.setNodeMarkup=function(e,t,n,l){var o=this.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);var r=t.create(n,null,l||o.marks);if(o.isLeaf)return this.replaceWith(e,e+o.nodeSize,r);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new w(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new a["j"](a["c"].from(r),0,0),1,!0))},h.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var l=this.doc.resolve(e),o=a["c"].empty,r=a["c"].empty,i=l.depth,c=l.depth-t,u=t-1;i>c;i--,u--){o=a["c"].from(l.node(i).copy(o));var s=n&&n[u];r=a["c"].from(s?s.type.create(s.attrs,r):l.node(i).copy(r))}return this.step(new y(e,e,new a["j"](o.append(r),t,t),!0))},h.prototype.join=function(e,t){void 0===t&&(t=1);var n=new y(e-t,e+t,a["j"].empty,!0);return this.step(n)};var B=function(e){function t(t,n,a){e.call(this),this.from=t,this.to=n,this.mark=a}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),l=e.resolve(this.from),o=l.node(l.sharedDepth(this.to)),r=new a["j"](j(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return g.fromReplace(e,this.from,this.to,r)},t.prototype.invert=function(){return new P(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),a=e.mapResult(this.to,-1);return n.deleted&&a.deleted||n.pos>=a.pos?null:new t(n.pos,a.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(b);b.jsonID("addMark",B);var P=function(e){function t(t,n,a){e.call(this),this.from=t,this.to=n,this.mark=a}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),l=new a["j"](j(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return g.fromReplace(e,this.from,this.to,l)},t.prototype.invert=function(){return new B(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),a=e.mapResult(this.to,-1);return n.deleted&&a.deleted||n.pos>=a.pos?null:new t(n.pos,a.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(b);function V(e,t,n,l){if(void 0===n&&(n=t),void 0===l&&(l=a["j"].empty),t==n&&!l.size)return null;var o=e.resolve(t),r=e.resolve(n);return F(o,r,l)?new y(t,n,l):new H(o,r,l).fit()}function F(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}b.jsonID("removeMark",P),h.prototype.addMark=function(e,t,n){var a=this,l=[],o=[],r=null,i=null;return this.doc.nodesBetween(e,t,(function(a,c,u){if(a.isInline){var s=a.marks;if(!n.isInSet(s)&&u.type.allowsMarkType(n.type)){for(var d=Math.max(c,e),p=Math.min(c+a.nodeSize,t),h=n.addToSet(s),f=0;f=0;h--)this.step(o[h]);return this},h.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=a["j"].empty);var l=V(this.doc,e,t,n);return l&&this.step(l),this},h.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new a["j"](a["c"].from(n),0,0))},h.prototype.delete=function(e,t){return this.replace(e,t,a["j"].empty)},h.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var H=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var l=0;l<=e.depth;l++){var o=e.node(l);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(l))})}this.placed=a["c"].empty;for(var r=e.depth;r>0;r--)this.placed=a["c"].from(e.node(r).copy(this.placed))},z={depth:{configurable:!0}};function _(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(_(e.firstChild.content,t-1,n)))}function q(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(q(e.lastChild.content,t-1,n)))}function $(e,t){for(var n=0;n1&&(l=l.replaceChild(0,U(l.firstChild,t-1,1==l.childCount?n-1:0))),t>0&&(l=e.type.contentMatch.fillBefore(l).append(l),n<=0&&(l=l.append(e.type.contentMatch.matchFragment(l).fillBefore(a["c"].empty,!0)))),e.copy(l)}function W(e,t,n,a,l){var o=e.node(t),r=l?e.indexAfter(t):e.index(t);if(r==o.childCount&&!n.compatibleContent(o.type))return null;var i=a.fillBefore(o.content,!0,r);return i&&!J(n,o.content,r)?i:null}function J(e,t,n){for(var a=n;al){var i=o.contentMatchAt(0),c=i.fillBefore(e).append(e);e=c.append(i.matchFragment(c).fillBefore(a["c"].empty,!0))}return e}function G(e,t){for(var n=[],a=Math.min(e.depth,t.depth),l=a;l>=0;l--){var o=e.start(l);if(ot.pos+(t.depth-l)||e.node(l).type.spec.isolating||t.node(l).type.spec.isolating)break;(o==t.start(l)||l==e.depth&&l==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&l&&t.start(l-1)==o-1)&&n.push(l)}return n}z.depth.get=function(){return this.frontier.length-1},H.prototype.fit=function(){while(this.unplaced.size){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,l=this.$from,o=this.close(t<0?this.$to:l.doc.resolve(t));if(!o)return null;var r=this.placed,i=l.depth,c=o.depth;while(i&&c&&1==r.childCount)r=r.firstChild.content,i--,c--;var u=new a["j"](r,i,c);return t>-1?new w(l.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||l.pos!=this.$to.pos?new y(l.pos,o.pos,u):void 0},H.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--){var n=void 0,l=void 0;t?(l=$(this.unplaced.content,t-1).firstChild,n=l.content):n=this.unplaced.content;for(var o=n.firstChild,r=this.depth;r>=0;r--){var i=this.frontier[r],c=i.type,u=i.match,s=void 0,d=void 0;if(1==e&&(o?u.matchType(o.type)||(d=u.fillBefore(a["c"].from(o),!1)):c.compatibleContent(l.type)))return{sliceDepth:t,frontierDepth:r,parent:l,inject:d};if(2==e&&o&&(s=u.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:r,parent:l,wrap:s};if(l&&u.matchType(l.type))break}}},H.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,l=e.openEnd,o=$(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new a["j"](t,n+1,Math.max(l,o.size+n>=t.size-l?n+1:0)),!0)},H.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,l=e.openEnd,o=$(t,n);if(o.childCount<=1&&n>0){var r=t.size-n<=n+o.size;this.unplaced=new a["j"](_(t,n-1,1),n-1,r?n-1:l)}else this.unplaced=new a["j"](_(t,n,1),n,l)},H.prototype.placeNodes=function(e){var t=e.sliceDepth,n=e.frontierDepth,l=e.parent,o=e.inject,r=e.wrap;while(this.depth>n)this.closeFrontierNode();if(r)for(var i=0;i1||0==s||g.content.size)&&(f=y,p.push(U(g.mark(m.allowedMarks(g.marks)),1==d?s:0,d==u.childCount?b:-1)))}var w=d==u.childCount;w||(b=-1),this.placed=q(this.placed,n,a["c"].from(p)),this.frontier[n].match=f,w&&b<0&&l&&l.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var k=0,x=u;k1&&l==this.$to.end(--a))++l;return l},H.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],a=n.match,l=n.type,o=t=0;i--){var c=this.frontier[i],u=c.match,s=c.type,d=W(e,i,s,u,!0);if(!d||d.childCount)continue e}return{depth:t,fit:r,move:o?e.doc.resolve(e.after(t+1)):e}}}},H.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;while(this.depth>t.depth)this.closeFrontierNode();t.fit.childCount&&(this.placed=q(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var a=e.node(n),l=a.type.contentMatch.fillBefore(a.content,!0,e.index(n));this.openFrontierNode(a.type,a.attrs,l)}return e},H.prototype.openFrontierNode=function(e,t,n){var l=this.frontier[this.depth];l.match=l.match.matchType(e),this.placed=q(this.placed,this.depth,a["c"].from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},H.prototype.closeFrontierNode=function(){var e=this.frontier.pop(),t=e.match.fillBefore(a["c"].empty,!0);t.childCount&&(this.placed=q(this.placed,this.frontier.length,t))},Object.defineProperties(H.prototype,z),h.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var l=this.doc.resolve(e),o=this.doc.resolve(t);if(F(l,o,n))return this.step(new y(e,t,n));var r=G(l,this.doc.resolve(t));0==r[r.length-1]&&r.pop();var i=-(l.depth+1);r.unshift(i);for(var c=l.depth,u=l.pos-1;c>0;c--,u--){var s=l.node(c).type.spec;if(s.defining||s.isolating)break;r.indexOf(c)>-1?i=c:l.before(c)==u&&r.splice(1,0,-c)}for(var d=r.indexOf(i),p=[],h=n.openStart,f=n.content,m=0;;m++){var v=f.firstChild;if(p.push(v),m==n.openStart)break;f=v.content}h>0&&p[h-1].type.spec.defining&&l.node(d).type!=p[h-1].type?h-=1:h>=2&&p[h-1].isTextblock&&p[h-2].type.spec.defining&&l.node(d).type!=p[h-2].type&&(h-=2);for(var b=n.openStart;b>=0;b--){var g=(b+h+1)%(n.openStart+1),w=p[g];if(w)for(var k=0;k=0;S--){if(this.replace(e,t,n),this.steps.length>O)break;var E=r[S];E<0||(e=l.before(E),t=o.after(E))}return this},h.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var l=I(this.doc,e,n.type);null!=l&&(e=t=l)}return this.replaceRange(e,t,new a["j"](a["c"].from(n),0,0))},h.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),a=this.doc.resolve(t),l=G(n,a),o=0;o0&&(i||n.node(r-1).canReplace(n.index(r-1),a.indexAfter(r-1))))return this.delete(n.before(r),a.after(r))}for(var c=1;c<=n.depth&&c<=a.depth;c++)if(e-n.start(c)==n.depth-c&&t>n.end(c)&&a.end(c)-t!=a.depth-c)return this.delete(n.before(c),t);return this.delete(e,t)}},"0cb2":function(e,t,n){var a=n("e330"),l=n("7b0b"),o=Math.floor,r=a("".charAt),i=a("".replace),c=a("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,a,d,p){var h=n+e.length,f=a.length,m=s;return void 0!==d&&(d=l(d),m=u),i(p,m,(function(l,i){var u;switch(r(i,0)){case"$":return"$";case"&":return e;case"`":return c(t,0,n);case"'":return c(t,h);case"<":u=d[c(i,1,-1)];break;default:var s=+i;if(0===s)return l;if(s>f){var p=o(s/10);return 0===p?l:p<=f?void 0===a[p-1]?r(i,1):a[p-1]+r(i,1):l}u=a[s-1]}return void 0===u?"":u}))}},"11d8":function(e,t,n){},"1a11":function(e,t,n){e.exports=n.p+"static/img/icon_043.d3e1cb75.png"},"2a03":function(e,t,n){"use strict";n("9541")},"2c73":function(e,t,n){"use strict";n("a521")},"2fc6":function(e,t,n){"use strict";n("7d03")},"304a":function(e,t,n){"use strict";function a(e){this.content=e}n.d(t,"a",(function(){return pe})),n.d(t,"b",(function(){return Ne})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return ue})),n.d(t,"f",(function(){return B})),n.d(t,"g",(function(){return I})),n.d(t,"h",(function(){return h})),n.d(t,"i",(function(){return se})),n.d(t,"j",(function(){return f})),a.prototype={constructor:a,find:function(e){for(var t=0;t>1}},a.from=function(e){if(e instanceof a)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new a(t)};var l=a;function o(e,t,n){for(var a=0;;a++){if(a==e.childCount||a==t.childCount)return e.childCount==t.childCount?null:n;var l=e.child(a),r=t.child(a);if(l!=r){if(!l.sameMarkup(r))return n;if(l.isText&&l.text!=r.text){for(var i=0;l.text[i]==r.text[i];i++)n++;return n}if(l.content.size||r.content.size){var c=o(l.content,r.content,n+1);if(null!=c)return c}n+=l.nodeSize}else n+=l.nodeSize}}function r(e,t,n,a){for(var l=e.childCount,o=t.childCount;;){if(0==l||0==o)return l==o?null:{a:n,b:a};var i=e.child(--l),c=t.child(--o),u=i.nodeSize;if(i!=c){if(!i.sameMarkup(c))return{a:n,b:a};if(i.isText&&i.text!=c.text){var s=0,d=Math.min(i.text.length,c.text.length);while(se&&!1!==n(i,a+r,l,o)&&i.content.size){var u=r+1;i.nodesBetween(Math.max(0,e-u),Math.min(i.content.size,t-u),n,a+u)}r=c}},i.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},i.prototype.textBetween=function(e,t,n,a){var l="",o=!0;return this.nodesBetween(e,t,(function(r,i){r.isText?(l+=r.text.slice(Math.max(e,i)-i,t-i),o=!n):r.isLeaf&&a?(l+=a,o=!n):!o&&r.isBlock&&(l+=n,o=!0)}),0),l},i.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,a=this.content.slice(),l=0;for(t.isText&&t.sameMarkup(n)&&(a[a.length-1]=t.withText(t.text+n.text),l=1);le)for(var l=0,o=0;oe&&((ot)&&(r=r.isText?r.cut(Math.max(0,e-o),Math.min(r.text.length,t-o)):r.cut(Math.max(0,e-o-1),Math.min(r.content.size,t-o-1))),n.push(r),a+=r.nodeSize),o=c}return new i(n,a)},i.prototype.cutByIndex=function(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))},i.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var a=this.content.slice(),l=this.size+t.nodeSize-n.nodeSize;return a[e]=t,new i(a,l)},i.prototype.addToStart=function(e){return new i([e].concat(this.content),this.size+e.nodeSize)},i.prototype.addToEnd=function(e){return new i(this.content.concat(e),this.size+e.nodeSize)},i.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;tthis.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,a=0;;n++){var l=this.child(n),o=a+l.nodeSize;if(o>=e)return o==e||t>0?s(n+1,o):s(n,a);a=o}},i.prototype.toString=function(){return"<"+this.toStringInner()+">"},i.prototype.toStringInner=function(){return this.content.join(", ")},i.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},i.fromJSON=function(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))},i.fromArray=function(e){if(!e.length)return i.empty;for(var t,n=0,a=0;athis.type.rank&&(t||(t=e.slice(0,a)),t.push(this),n=!0),t&&t.push(l)}}return t||(t=e.slice()),n||t.push(this),t},p.prototype.removeFromSet=function(e){for(var t=0;te.depth)throw new h("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new h("Inconsistent open depths");return y(e,t,n,0)}function y(e,t,n,a){var l=e.index(a),o=e.node(a);if(l==t.index(a)&&a=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function C(e,t,n,a){var l=(t||e).node(n),o=0,r=t?t.index(n):l.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(x(e.nodeAfter,a),o++));for(var i=o;il&&k(e,t,l+1),r=a.depth>l&&k(n,a,l+1),c=[];return C(null,e,l,c),o&&r&&t.index(l)==n.index(l)?(w(o,r),x(T(o,M(e,t,n,a,l+1)),c)):(o&&x(T(o,O(e,t,l+1)),c),C(t,n,l,c),r&&x(T(r,O(n,a,l+1)),c)),C(a,null,l,c),new i(c)}function O(e,t,n){var a=[];if(C(null,e,n,a),e.depth>n){var l=k(e,t,n+1);x(T(l,O(e,t,n+1)),a)}return C(t,null,n,a),new i(a)}function S(e,t){for(var n=t.depth-e.openStart,a=t.node(n),l=a.copy(e.content),o=n-1;o>=0;o--)l=t.node(o).copy(i.from(l));return{start:l.resolveNoCache(e.openStart+n),end:l.resolveNoCache(l.content.size-e.openEnd-n)}}m.size.get=function(){return this.content.size-this.openStart-this.openEnd},f.prototype.insertAt=function(e,t){var n=b(this.content,e+this.openStart,t,null);return n&&new f(n,this.openStart,this.openEnd)},f.prototype.removeBetween=function(e,t){return new f(v(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},f.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},f.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},f.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},f.fromJSON=function(e,t){if(!t)return f.empty;var n=t.openStart||0,a=t.openEnd||0;if("number"!=typeof n||"number"!=typeof a)throw new RangeError("Invalid input for Slice.fromJSON");return new f(i.fromJSON(e,t.content),n,a)},f.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,a=0,l=e.firstChild;l&&!l.isLeaf&&(t||!l.type.spec.isolating);l=l.firstChild)n++;for(var o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)a++;return new f(e,n,a)},Object.defineProperties(f.prototype,m),f.empty=new f(i.empty,0,0);var E=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n},N={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};E.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},N.parent.get=function(){return this.node(this.depth)},N.doc.get=function(){return this.node(0)},E.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},E.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},E.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},E.prototype.start=function(e){return e=this.resolveDepth(e),0==e?0:this.path[3*e-1]+1},E.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},E.prototype.before=function(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},E.prototype.after=function(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},N.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},N.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],a=e.child(t);return n?e.child(t).cut(n):a},N.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},E.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],a=0==t?0:this.path[3*t-1]+1,l=0;l0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},E.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new I(this,e,n)},E.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},E.prototype.max=function(e){return e.pos>this.pos?e:this},E.prototype.min=function(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],a=0,l=t,o=e;;){var r=o.content.findIndex(l),i=r.index,c=r.offset,u=l-c;if(n.push(o,i,a+c),!u)break;if(o=o.child(i),o.isText)break;l=u-1,a+=c+1}return new E(t,n,l)},E.resolveCached=function(e,t){for(var n=0;ne&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(a=!0),!a})),a},P.isBlock.get=function(){return this.type.isBlock},P.isTextblock.get=function(){return this.type.isTextblock},P.inlineContent.get=function(){return this.type.inlineContent},P.isInline.get=function(){return this.type.isInline},P.isText.get=function(){return this.type.isText},P.isLeaf.get=function(){return this.type.isLeaf},P.isAtom.get=function(){return this.type.isAtom},B.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),F(this.marks,e)},B.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},B.prototype.canReplace=function(e,t,n,a,l){void 0===n&&(n=i.empty),void 0===a&&(a=0),void 0===l&&(l=n.childCount);var o=this.contentMatchAt(e).matchFragment(n,a,l),r=o&&o.matchFragment(this.content,t);if(!r||!r.validEnd)return!1;for(var c=a;c=0;n--)t=e[n].type.name+"("+t+")";return t}var H=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},z={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};H.parse=function(e,t){var n=new _(e,t);if(null==n.next)return H.empty;var a=$(n);n.next&&n.err("Unexpected trailing text");var l=ee(Z(a));return te(l,n),l},H.prototype.matchType=function(e){for(var t=0;t>1},H.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},H.prototype.toString=function(){var e=[];function t(n){e.push(n);for(var a=1;a"+e.indexOf(t.next[l+1]);return a})).join("\n")},Object.defineProperties(H.prototype,z),H.empty=new H(!0);var _=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},q={next:{configurable:!0}};function $(e){var t=[];do{t.push(U(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function U(e){var t=[];do{t.push(W(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function W(e){for(var t=X(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=K(e,t)}return t}function J(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function K(e,t){var n=J(e),a=n;return e.eat(",")&&(a="}"!=e.next?J(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:a,expr:t}}function G(e,t){var n=e.nodeTypes,a=n[t];if(a)return[a];var l=[];for(var o in n){var r=n[o];r.groups.indexOf(t)>-1&&l.push(r)}return 0==l.length&&e.err("No node type or group '"+t+"' found"),l}function X(e){if(e.eat("(")){var t=$(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=G(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}function Z(e){var t=[[]];return l(o(e,0),n()),t;function n(){return t.push([])-1}function a(e,n,a){var l={term:a,to:n};return t[e].push(l),l}function l(e,t){e.forEach((function(e){return e.to=t}))}function o(e,t){if("choice"==e.type)return e.exprs.reduce((function(e,n){return e.concat(o(n,t))}),[]);if("seq"==e.type)for(var r=0;;r++){var i=o(e.exprs[r],t);if(r==e.exprs.length-1)return i;l(i,t=n())}else{if("star"==e.type){var c=n();return a(t,c),l(o(e.expr,c),c),[a(c)]}if("plus"==e.type){var u=n();return l(o(e.expr,t),u),l(o(e.expr,u),u),[a(u)]}if("opt"==e.type)return[a(t)].concat(o(e.expr,t));if("range"==e.type){for(var s=t,d=0;d-1&&l[o+1];Y(e,a).forEach((function(e){r||l.push(n,r=[]),-1==r.indexOf(e)&&r.push(e)}))}}))}));for(var o=t[a.join(",")]=new H(a.indexOf(e.length-1)>-1),r=0;r-1},oe.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t-1};var se=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=l.from(e.nodes),this.spec.marks=l.from(e.marks),this.nodes=oe.compile(this.spec.nodes,this),this.marks=ue.compile(this.spec.marks,this);var n=Object.create(null);for(var a in this.nodes){if(a in this.marks)throw new RangeError(a+" can not be both a node and a mark");var o=this.nodes[a],r=o.spec.content||"",i=o.spec.marks;o.contentMatch=n[r]||(n[r]=H.parse(r,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==i?null:i?de(this,i.split(" ")):""!=i&&o.inlineContent?null:[]}for(var c in this.marks){var u=this.marks[c],s=u.spec.excludes;u.excluded=null==s?[u]:""==s?[]:de(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function de(e,t){for(var n=[],a=0;a-1)&&n.push(r=c)}if(!r)throw new SyntaxError("Unknown mark type: '"+t[a]+"'")}return n}se.prototype.node=function(e,t,n,a){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof oe))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,a)},se.prototype.text=function(e,t){var n=this.nodes.text;return new V(n,n.defaultAttrs,e,p.setFrom(t))},se.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},se.prototype.nodeFromJSON=function(e){return B.fromJSON(this,e)},se.prototype.markFromJSON=function(e){return p.fromJSON(this,e)},se.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var pe=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)})),this.normalizeLists=!this.tags.some((function(t){if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;var n=e.nodes[t.node];return n.contentMatch.matchType(n)}))};pe.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ke(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},pe.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ke(this,t,!0);return n.addAll(e,null,t.from,t.to),f.maxOpen(n.finish())},pe.prototype.matchTag=function(e,t,n){for(var a=n?this.tags.indexOf(n)+1:0;ae.length&&(61!=o.style.charCodeAt(e.length)||o.style.slice(e.length+1)!=t))){if(o.getAttrs){var r=o.getAttrs(t);if(!1===r)continue;o.attrs=r}return o}}},pe.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,a=0;a=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]},we.prototype.applyPending=function(e){for(var t=0,n=this.pendingMarks;t=0;a--){var l=this.nodes[a],o=l.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,n=l,!o.length))break;if(l.solid)break}if(!t)return!1;this.sync(n);for(var r=0;rthis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},ke.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ke.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},xe.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,a=n.length-1;a>=0;a--)e+=n[a].nodeSize;t&&e++}return e},ke.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),a=this.options.context,l=!this.isOpen&&(!a||a.parent.type==this.nodes[0].type),o=-(a?a.depth+1:0)+(l?0:1),r=function(e,i){for(;e>=0;e--){var c=n[e];if(""==c){if(e==n.length-1||0==e)continue;for(;i>=o;i--)if(r(e-1,i))return!0;return!1}var u=i>0||0==i&&l?t.nodes[i].type:a&&i>=o?a.node(i-o).type:null;if(!u||u.name!=c&&-1==u.groups.indexOf(c))return!1;i--}return!0};return r(n.length-1,this.open)},ke.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var a in this.parser.schema.nodes){var l=this.parser.schema.nodes[a];if(l.isTextblock&&l.defaultAttrs)return l}},ke.prototype.addPendingMark=function(e){var t=Ee(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)},ke.prototype.removePendingMark=function(e,t){for(var n=this.open;n>=0;n--){var a=this.nodes[n],l=a.pendingMarks.lastIndexOf(e);if(l>-1)a.pendingMarks=e.removeFromSet(a.pendingMarks);else{a.activeMarks=e.removeFromSet(a.activeMarks);var o=a.popFromStashMark(e);o&&a.type&&a.type.allowsMarkType(o.type)&&(a.activeMarks=o.addToSet(a.activeMarks))}if(a==t)break}},Object.defineProperties(ke.prototype,xe);var Ne=function(e,t){this.nodes=e||{},this.marks=t||{}};function De(e){var t={};for(var n in e){var a=e[n].spec.toDOM;a&&(t[n]=a)}return t}function Ae(e){return e.document||window.document}Ne.prototype.serializeFragment=function(e,t,n){var a=this;void 0===t&&(t={}),n||(n=Ae(t).createDocumentFragment());var l=n,o=null;return e.forEach((function(e){if(o||e.marks.length){o||(o=[]);var n=0,r=0;while(n=0;a--){var l=this.serializeMark(e.marks[a],e.isInline,t);l&&((l.contentDOM||l.dom).appendChild(n),n=l.dom)}return n},Ne.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var a=this.marks[e.type.name];return a&&Ne.renderSpec(Ae(n),a(e,t))},Ne.renderSpec=function(e,t,n){if(void 0===n&&(n=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var a=t[0],l=a.indexOf(" ");l>0&&(n=a.slice(0,l),a=a.slice(l+1));var o=null,r=n?e.createElementNS(n,a):e.createElement(a),i=t[1],c=1;if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i))for(var u in c=2,i)if(null!=i[u]){var s=u.indexOf(" ");s>0?r.setAttributeNS(u.slice(0,s),u.slice(s+1),i[u]):r.setAttribute(u,i[u])}for(var d=c;dc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:r,contentDOM:r}}var h=Ne.renderSpec(e,p,n),f=h.dom,m=h.contentDOM;if(r.appendChild(f),m){if(o)throw new RangeError("Multiple content holes");o=m}}return{dom:r,contentDOM:o}},Ne.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ne(this.nodesFromSchema(e),this.marksFromSchema(e)))},Ne.nodesFromSchema=function(e){var t=De(e.nodes);return t.text||(t.text=function(e){return e.text}),t},Ne.marksFromSchema=function(e){return De(e.marks)}},"383f6":function(e,t,n){"use strict";n("11d8")},"39d3":function(e,t,n){"use strict";n("499d")},"3d78":function(e,t,n){"use strict";n("5979")},"42a3":function(e,t,n){},"44e7":function(e,t,n){var a=n("861d"),l=n("c6b6"),o=n("b622"),r=o("match");e.exports=function(e){var t;return a(e)&&(void 0!==(t=e[r])?!!t:"RegExp"==l(e))}},"44fe":function(e,t,n){e.exports={menuText:"#bfcbd9",menuActiveText:"#fff",subMenuActiveText:"#f4f4f5",menuBg:"#304156",menuHover:"#263445",subMenuBg:"#1f2d3d",subMenuHover:"#001528",sideBarWidth:"210px"}},"499d":function(e,t,n){},5313:function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return M})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return N})),n.d(t,"e",(function(){return L})),n.d(t,"f",(function(){return r})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return u}));var a=n("304a"),l=n("0ac0"),o=Object.create(null),r=function(e,t,n){this.ranges=n||[new c(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},i={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};i.anchor.get=function(){return this.$anchor.pos},i.head.get=function(){return this.$head.pos},i.from.get=function(){return this.$from.pos},i.to.get=function(){return this.$to.pos},i.$from.get=function(){return this.ranges[0].$from},i.$to.get=function(){return this.ranges[0].$to},i.empty.get=function(){for(var e=this.ranges,t=0;t=0;l--){var o=t<0?m(e.node(0),e.node(l),e.before(l+1),e.index(l),t,n):m(e.node(0),e.node(l),e.after(l+1),e.index(l)+1,t,n);if(o)return o}},r.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new h(e.node(0))},r.atStart=function(e){return m(e,e,0,0,1)||new h(e)},r.atEnd=function(e){return m(e,e,e.content.size,e.childCount,-1)||new h(e)},r.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=o[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},r.jsonID=function(e,t){if(e in o)throw new RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t},r.prototype.getBookmark=function(){return u.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(r.prototype,i),r.prototype.visible=!0;var c=function(e,t){this.$from=e,this.$to=t},u=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,a){var l=n.resolve(a.map(this.head));if(!l.parent.inlineContent)return e.near(l);var o=n.resolve(a.map(this.anchor));return new t(o.parent.inlineContent?o:l,l)},t.prototype.replace=function(t,n){if(void 0===n&&(n=a["j"].empty),e.prototype.replace.call(this,t,n),n==a["j"].empty){var l=this.$from.marksAcross(this.$to);l&&t.ensureMarks(l)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new s(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var a=e.resolve(t);return new this(a,n==t?a:e.resolve(n))},t.between=function(n,a,l){var o=n.pos-a.pos;if(l&&!o||(l=o>=0?1:-1),!a.parent.inlineContent){var r=e.findFrom(a,l,!0)||e.findFrom(a,-l,!0);if(!r)return e.near(a,l);a=r.$head}return n.parent.inlineContent||(0==o?n=a:(n=(e.findFrom(n,-l,!0)||e.findFrom(n,l,!0)).$anchor,n.pos0?0:1);l>0?r=0;r+=l){var i=t.child(r);if(i.isAtom){if(!o&&d.isSelectable(i))return d.create(e,n-(l<0?i.nodeSize:0))}else{var c=m(e,i,n+l,l<0?i.childCount:0,l,o);if(c)return c}n+=i.nodeSize*l}}function v(e,t,n){var a=e.steps.length-1;if(!(a0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=g,this},t.prototype.ensureMarks=function(e){return a["d"].sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(this.updated&g)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=this.updated&~g,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||a["d"].none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var a=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(a.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var l=this.storedMarks;if(!l){var o=this.doc.resolve(t);l=n==t?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,a.text(e,l)),this.selection.empty||this.setSelection(r.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=y,this},n.scrolledIntoView.get=function(){return(this.updated&y)>0},Object.defineProperties(t.prototype,n),t}(l["e"]);function k(e,t){return t&&e?e.bind(t):e}var x=function(e,t,n){this.name=e,this.init=k(t.init,n),this.apply=k(t.apply,n)},C=[new x("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new x("selection",{init:function(e,t){return e.selection||r.atStart(t.doc)},apply:function(e){return e.selection}}),new x("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,a){return a.selection.$cursor?e.storedMarks:null}}),new x("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],T=function(e,t){var n=this;this.schema=e,this.fields=C.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new x(e.key,e.spec.state,e))}))},M=function(e){this.config=e},O={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};O.schema.get=function(){return this.config.schema},O.plugins.get=function(){return this.config.plugins},M.prototype.apply=function(e){return this.applyTransaction(e).state},M.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n-1&&S.splice(t,1)},Object.defineProperties(M.prototype,O);var S=[];function E(e,t,n){for(var a in e){var l=e[a];l instanceof Function?l=l.bind(t):"handleDOMEvents"==a&&(l=E(l,t,{})),n[a]=l}return n}var N=function(e){this.props={},e.props&&E(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:A("plugin")};N.prototype.getState=function(e){return e[this.key]};var D=Object.create(null);function A(e){return e in D?e+"$"+ ++D[e]:(D[e]=0,e+"$")}var L=function(e){void 0===e&&(e="key"),this.key=A(e)};L.prototype.get=function(e){return e.config.pluginsByKey[this.key]},L.prototype.getState=function(e){return e[this.key]}},5591:function(e,t,n){},"576a":function(e,t,n){"use strict";n.d(t,"a",(function(){return Cn})),n.d(t,"b",(function(){return Sn})),n.d(t,"c",(function(){return Hn}));var a=n("5313"),l=n("304a"),o=n("0ac0"),r={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var i=/Edge\/(\d+)/.exec(navigator.userAgent),c=/MSIE \d/.test(navigator.userAgent),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);r.mac=/Mac/.test(navigator.platform);var s=r.ie=!!(c||u||i);r.ie_version=c?document.documentMode||6:u?+u[1]:i?+i[1]:null,r.gecko=!s&&/gecko\/(\d+)/i.test(navigator.userAgent),r.gecko_version=r.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var d=!s&&/Chrome\/(\d+)/.exec(navigator.userAgent);r.chrome=!!d,r.chrome_version=d&&+d[1],r.safari=!s&&/Apple Computer/.test(navigator.vendor),r.ios=r.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),r.android=/Android \d/.test(navigator.userAgent),r.webkit="webkitFontSmoothing"in document.documentElement.style,r.webkit_version=r.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var p=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},h=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},f=null,m=function(e,t,n){var a=f||(f=document.createRange());return a.setEnd(e,null==n?e.nodeValue.length:n),a.setStart(e,t||0),a},v=function(e,t,n,a){return n&&(g(e,t,n,a,-1)||g(e,t,n,a,1))},b=/^(img|br|input|textarea|hr)$/i;function g(e,t,n,a,l){for(;;){if(e==n&&t==a)return!0;if(t==(l<0?0:y(e))){var o=e.parentNode;if(1!=o.nodeType||k(e)||b.test(e.nodeName)||"false"==e.contentEditable)return!1;t=p(e)+(l<0?0:1),e=o}else{if(1!=e.nodeType)return!1;if(e=e.childNodes[t+(l<0?-1:0)],"false"==e.contentEditable)return!1;t=l<0?y(e):0}}}function y(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function w(e,t,n){for(var a=0==t,l=t==y(e);a||l;){if(e==n)return!0;var o=p(e);if(e=e.parentNode,!e)return!1;a=a&&0==o,l=l&&o==y(e)}}function k(e){for(var t,n=e;n;n=n.parentNode)if(t=n.pmViewDesc)break;return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var x=function(e){var t=e.isCollapsed;return t&&r.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function C(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function T(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function M(e,t){return"number"==typeof e?e:e[t]}function O(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,a=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*a}}function S(e,t,n){for(var a=e.someProp("scrollThreshold")||0,l=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument,r=n||e.dom;;r=h(r)){if(!r)break;if(1==r.nodeType){var i=r==o.body||1!=r.nodeType,c=i?T(o):O(r),u=0,s=0;if(t.topc.bottom-M(a,"bottom")&&(s=t.bottom-c.bottom+M(l,"bottom")),t.leftc.right-M(a,"right")&&(u=t.right-c.right+M(l,"right")),u||s)if(i)o.defaultView.scrollBy(u,s);else{var d=r.scrollLeft,p=r.scrollTop;s&&(r.scrollTop+=s),u&&(r.scrollLeft+=u);var f=r.scrollLeft-d,m=r.scrollTop-p;t={left:t.left-f,top:t.top-m,right:t.right-f,bottom:t.bottom-m}}if(i)break}}}function E(e){for(var t,n,a=e.dom.getBoundingClientRect(),l=Math.max(0,a.top),o=(a.left+a.right)/2,r=l+1;r=l-20){t=i,n=c.top;break}}}return{refDOM:t,refTop:n,stack:N(e.dom)}}function N(e){for(var t=[],n=e.ownerDocument;e;e=h(e))if(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e==n)break;return t}function D(e){var t=e.refDOM,n=e.refTop,a=e.stack,l=t?t.getBoundingClientRect().top:0;A(a,0==l?0:l-n)}function A(e,t){for(var n=0;n=i){r=Math.max(p.bottom,r),i=Math.min(p.top,i);var h=p.left>t.left?p.left-t.left:p.right=(p.left+p.right)/2?1:0));continue}}!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(o=u+1)}}return n&&3==n.nodeType?j(n,a):!n||l&&1==n.nodeType?{node:e,offset:o}:R(n,a)}function j(e,t){for(var n=e.nodeValue.length,a=document.createRange(),l=0;l=(o.left+o.right)/2?1:0)}}return{node:e,offset:0}}function B(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function P(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(i.left+i.right)/2?1:-1}return e.docView.posFromDOM(l,o,r)}function F(e,t,n,a){for(var l=-1,o=t;;){if(o==e.dom)break;var r=e.docView.nearestDesc(o,!0);if(!r)return null;if(r.node.isBlock&&r.parent){var i=r.dom.getBoundingClientRect();if(i.left>a.left||i.top>a.top)l=r.posBefore;else{if(!(i.right-1?l:e.docView.posFromDOM(t,n)}function H(e,t,n){var a=e.childNodes.length;if(a&&n.topt.top&&o++}l==e.dom&&o==l.childNodes.length-1&&1==l.lastChild.nodeType&&t.top>l.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==l.nodeType&&"BR"==l.childNodes[o-1].nodeName||(s=F(e,l,o,t))}null==s&&(s=V(e,d,t));var b=e.docView.nearestDesc(d,!0);return{pos:s,inside:b?b.posAtStart-b.border:-1}}function _(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var q=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function $(e,t,n){var a=e.docView.domFromPos(t,n<0?-1:1),l=a.node,o=a.offset,i=r.webkit||r.gecko;if(3==l.nodeType){if(!i||!q.test(l.nodeValue)&&(n<0?o:o!=l.nodeValue.length)){var c=o,u=o,s=n<0?1:-1;return n<0&&!o?(u++,s=-1):n>=0&&o==l.nodeValue.length?(c--,s=1):n<0?c--:u++,U(_(m(l,c,u),s),s<0)}var d=_(m(l,o,o),n);if(r.gecko&&o&&/\s/.test(l.nodeValue[o-1])&&o=0)}if(o&&(n<0||o==y(l))){var b=l.childNodes[o-1],g=3==b.nodeType?m(b,y(b)-(i?0:1)):1!=b.nodeType||"BR"==b.nodeName&&b.nextSibling?null:b;if(g)return U(_(g,1),!1)}if(o=0)}function U(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function W(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function J(e,t,n){var a=e.state,l=e.root.activeElement;a!=t&&e.updateState(t),l!=e.dom&&e.focus();try{return n()}finally{a!=t&&e.updateState(a),l!=e.dom&&l&&l.focus()}}function K(e,t,n){var a=t.selection,l="up"==n?a.$from:a.$to;return J(e,t,(function(){for(var t=e.docView.domFromPos(l.pos,"up"==n?-1:1),a=t.node;;){var o=e.docView.nearestDesc(a,!0);if(!o)break;if(o.node.isBlock){a=o.dom;break}a=o.dom.parentNode}for(var r=$(e,l.pos,1),i=a.firstChild;i;i=i.nextSibling){var c=void 0;if(1==i.nodeType)c=i.getClientRects();else{if(3!=i.nodeType)continue;c=m(i,0,i.nodeValue.length).getClientRects()}for(var u=0;us.top&&("up"==n?s.bottomr.bottom-1))return!1}}return!0}))}var G=/[\u0590-\u08ac]/;function X(e,t,n){var a=t.selection,l=a.$head;if(!l.parent.isTextblock)return!1;var o=l.parentOffset,r=!o,i=o==l.parent.content.size,c=getSelection();return G.test(l.parent.textContent)&&c.modify?J(e,t,(function(){var t=c.getRangeAt(0),a=c.focusNode,o=c.focusOffset,r=c.caretBidiLevel;c.modify("move",n,"character");var i=l.depth?e.docView.domAfterPos(l.before()):e.dom,u=!i.contains(1==c.focusNode.nodeType?c.focusNode:c.focusNode.parentNode)||a==c.focusNode&&o==c.focusOffset;return c.removeAllRanges(),c.addRange(t),null!=r&&(c.caretBidiLevel=r),u})):"left"==n||"backward"==n?r:i}var Z=null,Q=null,Y=!1;function ee(e,t,n){return Z==t&&Q==n?Y:(Z=t,Q=n,Y="up"==n||"down"==n?K(e,t,n):X(e,t,n))}var te=0,ne=1,ae=2,le=3,oe=function(e,t,n,a){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=a,this.dirty=te},re={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0}};oe.prototype.matchesWidget=function(){return!1},oe.prototype.matchesMark=function(){return!1},oe.prototype.matchesNode=function(){return!1},oe.prototype.matchesHack=function(e){return!1},re.beforePosition.get=function(){return!1},oe.prototype.parseRule=function(){return null},oe.prototype.stopEvent=function(){return!1},re.size.get=function(){for(var e=0,t=0;tp(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var c=e;;c=c.parentNode){if(c==this.dom){i=!1;break}if(c.parentNode.firstChild!=c)break}if(null==i&&t==e.childNodes.length)for(var u=e;;u=u.parentNode){if(u==this.dom){i=!0;break}if(u.parentNode.lastChild!=u)break}}return(null==i?n>0:i)?this.posAtEnd:this.posAtStart},oe.prototype.nearestDesc=function(e,t){for(var n=!0,a=e;a;a=a.parentNode){var l=this.getDesc(a);if(l&&(!t||l.node)){if(!n||!l.nodeDOM||(1==l.nodeDOM.nodeType?l.nodeDOM.contains(1==e.nodeType?e:e.parentNode):l.nodeDOM==e))return l;n=!1}}},oe.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},oe.prototype.posFromDOM=function(e,t,n){for(var a=e;a;a=a.parentNode){var l=this.getDesc(a);if(l)return l.localPosFromDOM(e,t,n)}return-1},oe.prototype.descAt=function(e){for(var t=0,n=0;t=e:r>e)&&(r>e||a+1>=this.children.length||!this.children[a+1].beforePosition))return o.domFromPos(e-n-o.border,t);n=r}},oe.prototype.parseRange=function(e,t,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var a=-1,l=-1,o=n,r=0;;r++){var i=this.children[r],c=o+i.size;if(-1==a&&e<=c){var u=o+i.border;if(e>=u&&t<=c-i.border&&i.node&&i.contentDOM&&this.contentDOM.contains(i.contentDOM))return i.parseRange(e,t,u);e=o;for(var s=r;s>0;s--){var d=this.children[s-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){a=p(d.dom)+1;break}e-=d.size}-1==a&&(a=0)}if(a>-1&&(c>t||r==this.children.length-1)){t=c;for(var h=r+1;hc&&ot){var M=d;d=h,h=M}var O=document.createRange();O.setEnd(h.node,h.offset),O.setStart(d.node,d.offset),f.removeAllRanges(),f.addRange(O)}}},oe.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},re.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},oe.prototype.markDirty=function(e,t){for(var n=0,a=0;a=n:en){var r=n+l.border,i=o-l.border;if(e>=r&&t<=i)return this.dirty=e==n||t==o?ae:ne,void(e!=r||t!=i||!l.contentLost&&l.dom.parentNode==this.contentDOM?l.markDirty(e-r,t-r):l.dirty=le);l.dirty=l.dom==l.contentDOM&&l.dom.parentNode==this.contentDOM?ae:le}n=o}this.dirty=ae},oe.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?ae:ne;t.dirty0&&(o=Le(o,0,e,a));for(var i=0;i-1?i:null,u=i&&i.pos<0,s=new Me(this,c&&c.node);Ee(this.node,this.innerDeco,(function(t,r,i){t.spec.marks?s.syncToMarks(t.spec.marks,a,e):t.type.side>=0&&!i&&s.syncToMarks(r==n.node.childCount?l["d"].none:n.node.child(r).marks,a,e),s.placeWidget(t,e,o)}),(function(t,n,l,r){var c;s.syncToMarks(t.marks,a,e),s.findNodeMatch(t,n,l,r)||u&&e.state.selection.from>o&&e.state.selection.to-1&&s.updateNodeAt(t,n,l,c,e)||s.updateNextNode(t,n,l,e,r)||s.addNode(t,n,l,e,o),o+=t.nodeSize})),s.syncToMarks(ie,a,e),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||this.dirty==ae)&&(c&&this.protectLocalComposition(e,c),ve(this.contentDOM,this.children,e),r.ios&&Ne(this.dom))},t.prototype.localCompositionInfo=function(e,t){var n=e.state.selection,l=n.from,o=n.to;if(!(!(e.state.selection instanceof a["h"])||lt+this.node.content.size)){var r=e.root.getSelection(),i=De(r.focusNode,r.focusOffset);if(i&&this.dom.contains(i.parentNode)){if(this.node.inlineContent){var c=i.nodeValue,u=Ae(this.node.content,c,l-t,o-t);return u<0?null:{node:i,pos:u,text:c}}return{node:i,pos:-1}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,a=t.pos,l=t.text;if(!this.getDesc(n)){for(var o=n;;o=o.parentNode){if(o.parentNode==this.contentDOM)break;while(o.previousSibling)o.parentNode.removeChild(o.previousSibling);while(o.nextSibling)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=null)}var r=new ue(this,o,n,l);e.compositionNodes.push(r),this.children=Le(this.children,a,a+l.length,e,r)}},t.prototype.update=function(e,t,n,a){return!(this.dirty==le||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,a),!0)},t.prototype.updateInner=function(e,t,n,a){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(a,this.posAtStart),this.dirty=te},t.prototype.updateOuterDeco=function(e){if(!Ce(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=we(this.dom,this.nodeDOM,ye(this.outerDeco,this.node,t),ye(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(t.prototype,n),t}(oe);function pe(e,t,n,a,l){return xe(a,t,e),new de(null,e,t,n,a,a,a,l,0)}var he=function(e){function t(t,n,a,l,o,r,i){e.call(this,t,n,a,l,o,null,r,i)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.parseRule=function(){var e=this.nodeDOM.parentNode;while(e&&e!=this.dom&&!e.pmIsDeco)e=e.parentNode;return{skip:e||!0}},t.prototype.update=function(e,t,n,a){return!(this.dirty==le||this.dirty!=te&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),this.dirty==te&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,a.trackWrites==this.nodeDOM&&(a.trackWrites=null)),this.node=e,this.dirty=te,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,a){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,a)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,a){var l=this.node.cut(e,n),o=document.createTextNode(l.text);return new t(this.parent,l,this.outerDeco,this.innerDeco,o,o,a)},t.prototype.markDirty=function(t,n){e.prototype.markDirty.call(this,t,n),this.dom==this.nodeDOM||0!=t&&n!=this.nodeDOM.nodeValue.length||(this.dirty=le)},n.domAtom.get=function(){return!1},Object.defineProperties(t.prototype,n),t}(de),fe=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(e){return this.dirty==te&&this.dom.nodeName==e},n.domAtom.get=function(){return!0},Object.defineProperties(t.prototype,n),t}(oe),me=function(e){function t(t,n,a,l,o,r,i,c,u,s){e.call(this,t,n,a,l,o,r,i,u,s),this.spec=c}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,a,l){if(this.dirty==le)return!1;if(this.spec.update){var o=this.spec.update(t,n,a);return o&&this.updateInner(t,n,a,l),o}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,a,l)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,a,l){this.spec.setSelection?this.spec.setSelection(t,n,a):e.prototype.setSelection.call(this,t,n,a,l)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(de);function ve(e,t,n){for(var a=e.firstChild,l=!1,o=0;o0&&a>0;a--){var o=t[a-1],r=o.node;if(r){if(r!=e.child(n-1))break;--n,l.set(o,n)}}return{index:n,matched:l}}function Se(e,t){return e.type.side-t.type.side}function Ee(e,t,n,a){var l=t.locals(e),o=0;if(0!=l.length)for(var r=0,i=[],c=null,u=0;;){if(ro)i.push(l[r++]);var v=o+h.nodeSize;if(h.isText){var b=v;r0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=y(e)}else{if(!(1==e.nodeType&&t=n){var s=c.lastIndexOf(t,a-i);if(s>=0&&s+t.length+i>=n)return i+s}}}return-1}function Le(e,t,n,a,l){for(var o=[],r=0,i=0;r=n||s<=t?o.push(c):(un&&o.push(c.slice(n-u,c.size,a)))}return o}function Ie(e,t){var n=e.root.getSelection(),l=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),r=o&&0==o.size,i=e.docView.posFromDOM(n.focusNode,n.focusOffset);if(i<0)return null;var c,u,s=l.resolve(i);if(x(n)){c=s;while(o&&!o.node)o=o.parent;if(o&&o.node.isAtom&&a["c"].isSelectable(o.node)&&o.parent&&(!o.node.isInline||!w(n.focusNode,n.focusOffset,o.dom))){var d=o.posBefore;u=new a["c"](i==d?s:l.resolve(d))}}else{var p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(p<0)return null;c=l.resolve(p)}if(!u){var h="pointer"==t||e.state.selection.head>1,o=Math.min(l,e.length);while(a-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{var c=se.create(this.top,e[l],t,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,l++}},Me.prototype.findNodeMatch=function(e,t,n,a){var l=this.top.children,o=-1;if(a>=this.preMatch.index){for(var r=this.index;r0?l.max(o):l.min(o),i=r.parent.inlineContent?r.depth?e.doc.resolve(t>0?r.after():r.before()):null:r;return i&&a["f"].findFrom(i,t)}function Ge(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Xe(e,t,n){var l=e.state.selection;if(!(l instanceof a["h"])){if(l instanceof a["c"]&&l.node.isInline)return Ge(e,new a["h"](t>0?l.$to:l.$from));var o=Ke(e.state,t);return!!o&&Ge(e,o)}if(!l.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=Ke(e.state,t);return!!(i&&i instanceof a["c"])&&Ge(e,i)}if(!(r.mac&&n.indexOf("m")>-1)){var c,u=l.$head,s=u.textOffset?null:t<0?u.nodeBefore:u.nodeAfter;if(!s||s.isText)return!1;var d=t<0?u.pos-s.nodeSize:u.pos;return!!(s.isAtom||(c=e.docView.descAt(d))&&!c.contentDOM)&&(a["c"].isSelectable(s)?Ge(e,new a["c"](t<0?e.state.doc.resolve(u.pos-s.nodeSize):u)):!!r.webkit&&Ge(e,new a["h"](e.state.doc.resolve(t<0?d:d+s.nodeSize))))}}function Ze(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Qe(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Ye(e){var t=e.root.getSelection(),n=t.focusNode,a=t.focusOffset;if(n){var l,o,i=!1;for(r.gecko&&1==n.nodeType&&a0){if(1!=n.nodeType)break;var c=n.childNodes[a-1];if(Qe(c))l=n,o=--a;else{if(3!=c.nodeType)break;n=c,a=n.nodeValue.length}}else{if(tt(n))break;var u=n.previousSibling;while(u&&Qe(u))l=n.parentNode,o=p(u),u=u.previousSibling;if(u)n=u,a=Ze(n);else{if(n=n.parentNode,n==e.dom)break;a=0}}i?nt(e,t,n,a):l&&nt(e,t,l,o)}}function et(e){var t=e.root.getSelection(),n=t.focusNode,a=t.focusOffset;if(n){for(var l,o,r=Ze(n);;)if(a-1)return!1;if(r.mac&&n.indexOf("m")>-1)return!1;var o=l.$from,i=l.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var c=Ke(e.state,t);if(c&&c instanceof a["c"])return Ge(e,c)}if(!o.parent.inlineContent){var u=t<0?o:i,s=l instanceof a["a"]?a["f"].near(u,t):a["f"].findFrom(u,t);return!!s&&Ge(e,s)}return!1}function lt(e,t){if(!(e.state.selection instanceof a["h"]))return!0;var n=e.state.selection,l=n.$head,o=n.$anchor,r=n.empty;if(!l.sameParent(o))return!0;if(!r)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var i=!l.textOffset&&(t<0?l.nodeBefore:l.nodeAfter);if(i&&!i.isText){var c=e.state.tr;return t<0?c.delete(l.pos-i.nodeSize,l.pos):c.delete(l.pos,l.pos+i.nodeSize),e.dispatch(c),!0}return!1}function ot(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function rt(e){if(r.safari&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,a=t.focusOffset;if(n&&1==n.nodeType&&0==a&&n.firstChild&&"false"==n.firstChild.contentEditable){var l=n.firstChild;ot(e,l,!0),setTimeout((function(){return ot(e,l,!1)}),20)}}}function it(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function ct(e,t){var n=t.keyCode,a=it(t);return 8==n||r.mac&&72==n&&"c"==a?lt(e,-1)||Ye(e):46==n||r.mac&&68==n&&"c"==a?lt(e,1)||et(e):13==n||27==n||(37==n?Xe(e,-1,a)||Ye(e):39==n?Xe(e,1,a)||et(e):38==n?at(e,-1,a)||Ye(e):40==n?rt(e)||at(e,1,a)||et(e):a==(r.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function ut(e,t,n){var a=e.docView.parseRange(t,n),o=a.node,i=a.fromOffset,c=a.toOffset,u=a.from,s=a.to,d=e.root.getSelection(),p=null,h=d.anchorNode;if(h&&e.dom.contains(1==h.nodeType?h:h.parentNode)&&(p=[{node:h,offset:d.anchorOffset}],x(d)||p.push({node:d.focusNode,offset:d.focusOffset})),r.chrome&&8===e.lastKeyCode)for(var f=c;f>i;f--){var m=o.childNodes[f-1],v=m.pmViewDesc;if("BR"==m.nodeName&&!v){c=f;break}if(!v||v.size)break}var b=e.state.doc,g=e.someProp("domParser")||l["a"].fromSchema(e.state.schema),y=b.resolve(u),w=null,k=g.parse(o,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:i,to:c,preserveWhitespace:!y.parent.type.spec.code||"full",editableContent:!0,findPositions:p,ruleFromNode:st,context:y});if(p&&null!=p[0].pos){var C=p[0].pos,T=p[1]&&p[1].pos;null==T&&(T=C),w={anchor:C+u,head:T+u}}return{doc:k,sel:w,from:u,to:s}}function st(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(r.safari&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||r.safari&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0}}function dt(e,t,n,l,o){if(t<0){var i=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,c=Ie(e,i);if(c&&!e.state.selection.eq(c)){var u=e.state.tr.setSelection(c);"pointer"==i?u.setMeta("pointer",!0):"key"==i&&u.scrollIntoView(),e.dispatch(u)}}else{var s=e.state.doc.resolve(t),d=s.sharedDepth(n);t=s.before(d+1),n=e.state.doc.resolve(n).after(d+1);var p=e.state.selection,h=ut(e,t,n);if(r.chrome&&e.cursorWrapper&&h.sel&&h.sel.anchor==e.cursorWrapper.deco.from){var f=e.cursorWrapper.deco.type.toDOM.nextSibling,m=f&&f.nodeValue?f.nodeValue.length:1;h.sel={anchor:h.sel.anchor+m,head:h.sel.anchor+m}}var v,b,g=e.state.doc,y=g.slice(h.from,h.to);8===e.lastKeyCode&&Date.now()-100Date.now()-225||r.android)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&e.someProp("handleKeyDown",(function(t){return t(e,C(13,"Enter"))})))return void(e.lastIOSEnter=0);if(h.sel){var k=pt(e,e.state.doc,h.sel);k&&!k.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(k))}return}w={start:p.from,endA:p.to,endB:p.to}}e.domChangeCount++,e.state.selection.frome.state.selection.from&&w.start<=e.state.selection.from+2?w.start=e.state.selection.from:w.endA=e.state.selection.to-2&&(w.endB+=e.state.selection.to-w.endA,w.endA=e.state.selection.to)),r.ie&&r.ie_version<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>h.from&&" "==h.doc.textBetween(w.start-h.from-1,w.start-h.from+1)&&(w.start--,w.endA--,w.endB--);var x,T=h.doc.resolveNoCache(w.start-h.from),M=h.doc.resolveNoCache(w.endB-h.from),O=T.sameParent(M)&&T.parent.inlineContent;if((r.ios&&e.lastIOSEnter>Date.now()-225&&(!O||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!O&&T.posw.start&&ft(g,w.start,w.endA,T,M)&&e.someProp("handleKeyDown",(function(t){return t(e,C(8,"Backspace"))})))r.android&&r.chrome&&e.domObserver.suppressSelectionUpdates();else{r.chrome&&r.android&&w.toB==w.from&&(e.lastAndroidDelete=Date.now()),r.android&&!O&&T.start()!=M.start()&&0==M.parentOffset&&T.depth==M.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==w.endA&&(w.endB-=2,M=h.doc.resolveNoCache(w.endB-h.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,C(13,"Enter"))}))}),20));var S,E,N,D,A=w.start,L=w.endA;if(O)if(T.pos==M.pos)r.ie&&r.ie_version<=11&&0==T.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return je(e)}),20)),S=e.state.tr.delete(A,L),E=g.resolve(w.start).marksAcross(g.resolve(w.endA));else if(w.endA==w.endB&&(D=g.resolve(w.start))&&(N=ht(T.parent.content.cut(T.parentOffset,M.parentOffset),D.parent.content.cut(D.parentOffset,w.endA-D.start()))))S=e.state.tr,"add"==N.type?S.addMark(A,L,N.mark):S.removeMark(A,L,N.mark);else if(T.parent.child(T.index()).isText&&T.index()==M.index()-(M.textOffset?0:1)){var I=T.parent.textBetween(T.parentOffset,M.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,A,L,I)})))return;S=e.state.tr.insertText(I,A,L)}if(S||(S=e.state.tr.replace(A,L,h.doc.slice(w.start-h.from,w.endB-h.from))),h.sel){var R=pt(e,S.doc,h.sel);R&&!(r.chrome&&r.android&&e.composing&&R.empty&&(w.start!=w.endB||e.lastAndroidDeletet.content.size?null:$e(e,t.resolve(n.anchor),t.resolve(n.head))}function ht(e,t){for(var n,a,o,r=e.firstChild.marks,i=t.firstChild.marks,c=r,u=i,s=0;sn||mt(r,!0,!1)0&&(t||e.indexAfter(a)==e.node(a).childCount))a--,l++,t=!1;if(n){var o=e.node(a).maybeChild(e.indexAfter(a));while(o&&!o.isLeaf)o=o.firstChild,l++}return l}function vt(e,t,n,a,l){var o=e.findDiffStart(t,n);if(null==o)return null;var r=e.findDiffEnd(t,n+e.size,n+t.size),i=r.a,c=r.b;if("end"==l){var u=Math.max(0,o-Math.min(i,c));a-=i+u-o}if(i=i?o-a:0;o-=s,c=o+(c-i),i=o}else if(c=c?o-a:0;o-=d,i=o+(i-c),c=o}return{start:o,endA:i,endB:c}}function bt(e,t){var n=[],a=t.content,o=t.openStart,r=t.openEnd;while(o>1&&r>1&&1==a.childCount&&1==a.firstChild.childCount){o--,r--;var i=a.firstChild;n.push(i.type.name,i.attrs!=i.type.defaultAttrs?i.attrs:null),a=i.content}var c=e.someProp("clipboardSerializer")||l["b"].fromSchema(e.state.schema),u=St(),s=u.createElement("div");s.appendChild(c.serializeFragment(a,{document:u}));var d,p=s.firstChild;while(p&&1==p.nodeType&&(d=Mt[p.nodeName.toLowerCase()])){for(var h=d.length-1;h>=0;h--){var f=u.createElement(d[h]);while(s.firstChild)f.appendChild(s.firstChild);s.appendChild(f)}p=s.firstChild}p&&1==p.nodeType&&p.setAttribute("data-pm-slice",o+" "+r+" "+JSON.stringify(n));var m=e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n");return{dom:s,text:m}}function gt(e,t,n,a,o){var i,c,u=o.parent.type.spec.code;if(!n&&!t)return null;var s=t&&(a||u||!n);if(s){if(e.someProp("transformPastedText",(function(e){t=e(t,u||a)})),u)return new l["j"](l["c"].from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0);var d=e.someProp("clipboardTextParser",(function(e){return e(t,o,a)}));if(d)c=d;else{var p=o.marks(),h=e.state,f=h.schema,m=l["b"].fromSchema(f);i=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){i.appendChild(document.createElement("p")).appendChild(m.serializeNode(f.text(e,p)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),i=Et(n),r.webkit&&Nt(i);var v=i&&i.querySelector("[data-pm-slice]"),b=v&&/^(\d+) (\d+) (.*)/.exec(v.getAttribute("data-pm-slice"));if(!c){var g=e.someProp("clipboardParser")||e.someProp("domParser")||l["a"].fromSchema(e.state.schema);c=g.parseSlice(i,{preserveWhitespace:!(!s&&!b),context:o})}return c=b?Dt(Tt(c,+b[1],+b[2]),b[3]):l["j"].maxOpen(yt(c.content,o),!1),e.someProp("transformPasted",(function(e){c=e(c)})),c}function yt(e,t){if(e.childCount<2)return e;for(var n=function(n){var a=t.node(n),o=a.contentMatchAt(t.index(n)),r=void 0,i=[];if(e.forEach((function(e){if(i){var t,n=o.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&r.length&&kt(n,r,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=xt(i[i.length-1],r.length));var a=wt(e,n);i.push(a),o=o.matchType(a.type,a.attrs),r=n}}})),i)return{v:l["c"].from(i)}},a=t.depth;a>=0;a--){var o=n(a);if(o)return o.v}return e}function wt(e,t,n){void 0===n&&(n=0);for(var a=t.length-1;a>=n;a--)e=t[a].create(null,l["c"].from(e));return e}function kt(e,t,n,a,o){if(o=n&&(c=t<0?i.contentMatchAt(0).fillBefore(c,e.childCount>1||r<=o).append(c):c.append(i.contentMatchAt(i.childCount).fillBefore(l["c"].empty,!0))),e.replaceChild(t<0?0:e.childCount-1,i.copy(c))}function Tt(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,a=St().createElement("div"),l=/<([a-z][^>\s]+)/i.exec(e);if((n=l&&Mt[l[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return""+e+">"})).reverse().join("")),a.innerHTML=e,n)for(var o=0;o=0;c-=2){var u=a.nodes[n[c]];if(!u||u.hasRequiredAttrs())break;o=l["c"].from(u.create(n[c+1],o)),r++,i++}return new l["j"](o,r,i)}var At={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Lt=r.ie&&r.ie_version<=11,It=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};It.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},It.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var Rt=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;te.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new It,Lt&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Rt.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},Rt.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Rt.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,At),Lt&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Rt.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&We(this.view)&&!this.ignoreSelectionChange(t),a=-1,l=-1,o=!1,i=[];if(this.view.editable)for(var c=0;c1){var s=i.filter((function(e){return"BR"==e.nodeName}));if(2==s.length){var d=s[0],p=s[1];d.parentNode&&d.parentNode.parentNode==p.parentNode?p.remove():d.remove()}}(a>-1||n)&&(a>-1&&(this.view.docView.markDirty(a,l),Bt(this.view)),this.handleDOMChange(a,l,o,i),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||je(this.view),this.currentSelection.set(t))}},Rt.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var a=0;ao.depth?t(e,n,o.nodeAfter,o.before(a),l,!0):t(e,n,o.node(a),o.before(a),l,!1)})))return{v:!0}},i=o.depth+1;i>0;i--){var c=r(i);if(c)return c.v}return!1}function Gt(e,t,n){e.focused||e.focus();var a=e.state.tr.setSelection(t);"pointer"==n&&a.setMeta("pointer",!0),e.dispatch(a)}function Xt(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),l=n.nodeAfter;return!!(l&&l.isAtom&&a["c"].isSelectable(l))&&(Gt(e,new a["c"](n),"pointer"),!0)}function Zt(e,t){if(-1==t)return!1;var n,l,o=e.state.selection;o instanceof a["c"]&&(n=o.node);for(var r=e.state.doc.resolve(t),i=r.depth+1;i>0;i--){var c=i>r.depth?r.nodeAfter:r.node(i);if(a["c"].isSelectable(c)){l=n&&o.$from.depth>0&&i>=o.$from.depth&&r.before(o.$from.depth+1)==o.$from.pos?r.before(o.$from.depth):r.before(i);break}}return null!=l&&(Gt(e,a["c"].create(e.state.doc,l),"pointer"),!0)}function Qt(e,t,n,a,l){return Kt(e,"handleClickOn",t,n,a)||e.someProp("handleClick",(function(n){return n(e,t,a)}))||(l?Zt(e,n):Xt(e,n))}function Yt(e,t,n,a){return Kt(e,"handleDoubleClickOn",t,n,a)||e.someProp("handleDoubleClick",(function(n){return n(e,t,a)}))}function en(e,t,n,a){return Kt(e,"handleTripleClickOn",t,n,a)||e.someProp("handleTripleClick",(function(n){return n(e,t,a)}))||tn(e,n,a)}function tn(e,t,n){if(0!=n.button)return!1;var l=e.state.doc;if(-1==t)return!!l.inlineContent&&(Gt(e,a["h"].create(l,0,l.content.size),"pointer"),!0);for(var o=l.resolve(t),r=o.depth+1;r>0;r--){var i=r>o.depth?o.nodeAfter:o.node(r),c=o.before(r);if(i.inlineContent)Gt(e,a["h"].create(l,c+1,c+1+i.content.size),"pointer");else{if(!a["c"].isSelectable(i))continue;Gt(e,a["c"].create(l,c),"pointer")}return!0}}function nn(e){return sn(e)}Vt.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!on(e,t))if(229!=t.keyCode&&e.domObserver.forceFlush(),e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!r.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||ct(e,t)?t.preventDefault():Ht(e,"key");else{var n=Date.now();e.lastIOSEnter=n,e.lastIOSEnterFallbackTimeout=setTimeout((function(){e.lastIOSEnter==n&&(e.someProp("handleKeyDown",(function(t){return t(e,C(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},Vt.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Vt.keypress=function(e,t){if(!(on(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||r.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof a["h"])||!n.$from.sameParent(n.$to)){var l=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,l)}))||e.dispatch(e.state.tr.insertText(l).scrollIntoView()),t.preventDefault()}}};var an=r.mac?"metaKey":"ctrlKey";Pt.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=nn(e),a=Date.now(),l="singleClick";a-e.lastClick.time<500&&Jt(t,e.lastClick)&&!t[an]&&("singleClick"==e.lastClick.type?l="doubleClick":"doubleClick"==e.lastClick.type&&(l="tripleClick")),e.lastClick={time:a,x:t.clientX,y:t.clientY,type:l};var o=e.posAtCoords(Wt(t));o&&("singleClick"==l?(e.mouseDown&&e.mouseDown.done(),e.mouseDown=new ln(e,o,t,n)):("doubleClick"==l?Yt:en)(e,o.pos,o.inside,t)?t.preventDefault():Ht(e,"pointer"))};var ln=function(e,t,n,l){var o,i,c=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=l,this.selectNode=n[an],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),i=t.inside;else{var u=e.state.doc.resolve(t.pos);o=u.parent,i=u.depth?u.before():0}this.mightDrag=null;var s=l?null:n.target,d=s?e.docView.nearestDesc(s,!0):null;this.target=d?d.dom:null;var p=e.state,h=p.selection;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||h instanceof a["c"]&&h.from<=i&&h.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&r.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){c.view.mouseDown==c&&c.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ht(e,"pointer")};function on(e,t){return!!e.composing||!!(r.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}ln.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},ln.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Wt(e))),this.allowDefault||!t?Ht(this.view,"pointer"):Qt(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||r.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||r.chrome&&!(this.view.state.selection instanceof a["h"])&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Gt(this.view,a["f"].near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Ht(this.view,"pointer")}},ln.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),Ht(this.view,"pointer"),0==e.buttons&&this.done()},Pt.touchdown=function(e){nn(e),Ht(e,"pointer")},Pt.contextmenu=function(e){return nn(e)};var rn=r.android?5e3:-1;function cn(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return sn(e)}),t))}function un(e){e.composing=!1;while(e.compositionNodes.length>0)e.compositionNodes.pop().markParentsDirty()}function sn(e,t){if(e.domObserver.forceFlush(),un(e),t||e.docView.dirty){var n=Ie(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}function dn(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var a=getSelection(),l=document.createRange();l.selectNodeContents(t),e.dom.blur(),a.removeAllRanges(),a.addRange(l),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}Vt.compositionstart=Vt.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),sn(e,!0),e.markCursor=null;else if(sn(e),r.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var a=e.root.getSelection(),l=a.focusNode,o=a.focusOffset;l&&1==l.nodeType&&0!=o;){var i=o<0?l.lastChild:l.childNodes[o-1];if(!i)break;if(3==i.nodeType){a.collapse(i,i.nodeValue.length);break}l=i,o=-1}e.composing=!0}cn(e,rn)},Vt.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,cn(e,20))};var pn=r.ie&&r.ie_version<15||r.ios&&r.webkit_version<604;function hn(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}function fn(e,t){if(e.dom.parentNode){var n=e.shiftKey||e.state.selection.$from.parent.type.spec.code,a=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(a.contentEditable="true"),a.style.cssText="position: fixed; left: -10000px; top: 10px",a.focus(),setTimeout((function(){e.focus(),a.parentNode&&a.parentNode.removeChild(a),n?mn(e,a.value,null,t):mn(e,a.textContent,a.innerHTML,t)}),50)}}function mn(e,t,n,a){var o=gt(e,t,n,e.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,a,o||l["j"].empty)})))return!0;if(!o)return!1;var r=hn(o),i=r?e.state.tr.replaceSelectionWith(r,e.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(i.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Pt.copy=Vt.cut=function(e,t){var n=e.state.selection,a="cut"==t.type;if(!n.empty){var l=pn?null:t.clipboardData,o=n.content(),r=bt(e,o),i=r.dom,c=r.text;l?(t.preventDefault(),l.clearData(),l.setData("text/html",i.innerHTML),l.setData("text/plain",c)):dn(e,i),a&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Vt.paste=function(e,t){var n=pn?null:t.clipboardData;n&&mn(e,n.getData("text/plain"),n.getData("text/html"),t)?t.preventDefault():fn(e,t)};var vn=function(e,t){this.slice=e,this.move=t},bn=r.mac?"altKey":"ctrlKey";for(var gn in Pt.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var l=e.state.selection,o=l.empty?null:e.posAtCoords(Wt(t));if(o&&o.pos>=l.from&&o.pos<=(l instanceof a["c"]?l.to-1:l.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(a["c"].create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var r=e.docView.nearestDesc(t.target,!0);r&&r.node.type.spec.draggable&&r!=e.docView&&e.dispatch(e.state.tr.setSelection(a["c"].create(e.state.doc,r.posBefore)))}var i=e.state.selection.content(),c=bt(e,i),u=c.dom,s=c.text;t.dataTransfer.clearData(),t.dataTransfer.setData(pn?"Text":"text/html",u.innerHTML),t.dataTransfer.effectAllowed="copyMove",pn||t.dataTransfer.setData("text/plain",s),e.dragging=new vn(i,!t[bn])}},Pt.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},Vt.dragover=Vt.dragenter=function(e,t){return t.preventDefault()},Vt.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var r=e.posAtCoords(Wt(t));if(r){var i=e.state.doc.resolve(r.pos);if(i){var c=n&&n.slice;c?e.someProp("transformPasted",(function(e){c=e(c)})):c=gt(e,t.dataTransfer.getData(pn?"Text":"text/plain"),pn?null:t.dataTransfer.getData("text/html"),!1,i);var u=n&&!t[bn];if(e.someProp("handleDrop",(function(n){return n(e,t,c||l["j"].empty,u)})))t.preventDefault();else if(c){t.preventDefault();var s=c?Object(o["h"])(e.state.doc,i.pos,c):i.pos;null==s&&(s=i.pos);var d=e.state.tr;u&&d.deleteSelection();var p=d.mapping.map(s),h=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,f=d.doc;if(h?d.replaceRangeWith(p,p,c.content.firstChild):d.replaceRange(p,p,c),!d.doc.eq(f)){var m=d.doc.resolve(p);if(h&&a["c"].isSelectable(c.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(c.content.firstChild))d.setSelection(new a["c"](m));else{var v=d.mapping.map(s);d.mapping.maps[d.mapping.maps.length-1].forEach((function(e,t,n,a){return v=a})),d.setSelection($e(e,m,d.doc.resolve(v)))}e.focus(),e.dispatch(d.setMeta("uiEvent","drop"))}}}}}},Pt.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.root.getSelection())&&je(e)}),20))},Pt.blur=function(e){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),e.domObserver.currentSelection.set({}),e.focused=!1)},Pt.beforeinput=function(e,t){if(r.chrome&&r.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,C(8,"Backspace"))})))){var t=e.state.selection,a=t.$cursor;a&&a.pos>0&&e.dispatch(e.state.tr.delete(a.pos-1,a.pos).scrollIntoView())}}),50)}},Vt)Pt[gn]=Vt[gn];function yn(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var a in t)if(!(a in e))return!1;return!0}var wn=function(e,t){this.spec=t||On,this.side=this.spec.side||0,this.toDOM=e};wn.prototype.map=function(e,t,n,a){var l=e.mapResult(t.from+a,this.side<0?-1:1),o=l.pos,r=l.deleted;return r?null:new Cn(o-n,o-n,this)},wn.prototype.valid=function(){return!0},wn.prototype.eq=function(e){return this==e||e instanceof wn&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&yn(this.spec,e.spec))};var kn=function(e,t){this.spec=t||On,this.attrs=e};kn.prototype.map=function(e,t,n,a){var l=e.map(t.from+a,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+a,this.spec.inclusiveEnd?1:-1)-n;return l>=o?null:new Cn(l,o,this)},kn.prototype.valid=function(e,t){return t.from=e&&(!l||l(r.spec))&&n.push(r.copy(r.from+a,r.to+a))}for(var i=0;ie){var c=this.children[i]+1;this.children[i+2].findInner(e-c,t-c,n,a+c,l)}},Sn.prototype.map=function(e,t,n){return this==En||0==e.maps.length?this:this.mapInner(e,t,0,0,n||On)},Sn.prototype.mapInner=function(e,t,n,a,l){for(var o,r=0;rr&&u.to=e){this.children[l]==e&&(n=this.children[l+2]);break}for(var o=e+1,r=o+t.content.size,i=0;io&&c.type instanceof kn){var u=Math.max(o,c.from)-o,s=Math.min(r,c.to)-o;uc+o||(t>=i[r]+o?i[r+1]=-1:n>=l&&(u=a-n-(t-e))&&(i[r]+=u,i[r+1]+=u))}},u=0;u=a.content.size){s=!0;continue}var f=n.map(e[d+1]+o,-1),m=f-l,v=a.content.findIndex(h),b=v.index,g=v.offset,y=a.maybeChild(b);if(y&&g==h&&g+y.nodeSize==m){var w=i[d+2].mapInner(n,y,p+1,e[d]+o+1,r);w!=En?(i[d]=h,i[d+1]=m,i[d+2]=w):(i[d+1]=-2,s=!0)}else s=!0}if(s){var k=Ln(i,e,t||[],n,l,o,r),x=jn(k,a,0,r);t=x.local;for(var C=0;Cn&&r.to0)t++;e.splice(t,0,n)}function Fn(e){var t=[];return e.someProp("decorations",(function(n){var a=n(e.state);a&&a!=En&&t.push(a)})),e.cursorWrapper&&t.push(Sn.create(e.state.doc,[e.cursorWrapper.deco])),Nn.from(t)}Nn.prototype.forChild=function(e,t){if(t.isLeaf)return Sn.empty;for(var n=[],a=0;al.scrollToSelection?"to selection":"preserve",p=o||!this.docView.matchesNode(e.doc,s,u);!p&&e.selection.eq(l.selection)||(i=!0);var h="preserve"==d&&i&&null==this.dom.style.overflowAnchor&&E(this);if(i){this.domObserver.stop();var f=p&&(r.ie||r.chrome)&&!this.composing&&!l.selection.empty&&!e.selection.empty&&Un(l.selection,e.selection);if(p){var m=r.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!o&&this.docView.update(e.doc,s,u,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=pe(e.doc,s,u,this.dom,this)),m&&!this.trackWrites&&(f=!0)}f||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&Je(this))?je(this,f):(_e(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(l),"reset"==d)this.dom.scrollTop=0;else if("to selection"==d){var v=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(e){return e(n)}))||(e.selection instanceof a["c"]?S(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),v):S(this,this.coordsAtPos(e.selection.head,1),v))}else h&&D(h)},Hn.prototype.destroyPluginViews=function(){var e;while(e=this.pluginViews.pop())e.destroy&&e.destroy()},Hn.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins)for(var t=0;t=0&&afe}function ve(e,t){var n="https://www.google-analytics.com/collect",a=location.hostname,l="event",o="use",r="TOAST UI "+e+" for "+a+": Statistics",i=window.localStorage.getItem(r);(pe(window.tui)||!1!==window.tui.usageStatistics)&&(i&&!me(i)||(window.localStorage.setItem(r,(new Date).getTime()),setTimeout((function(){"interactive"!==document.readyState&&"complete"!==document.readyState||he(n,{v:1,t:l,tid:t,cid:a,dp:a,dh:e,el:e,ec:o})}),1e3)))}var be=ve;/Mac/.test(navigator.platform);var ge=/[\u0020]+/g,ye=/[>(){}[\]+-.!#|]/g,we=/<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-._]*)\s*\/?>||<([a-zA-Z_][a-zA-Z0-9\-.:/]*)>/g,ke=/\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/g,xe=/[*_~`]/g,Ce=/!\[.*\]\(.*\)/g,Te=/[[\]]/g,Me=/(?:^|[^\\])\\(?!\\)/g,Oe='[&<>"]',Se=new RegExp(Oe,"g");function Ee(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return e}}function Ne(e){return Se.test(e)?e.replace(Se,Ee):e}function De(){be("editor","UA-129966929-1")}function Ae(e,t){return-1!==e.indexOf(t)}var Le=["rel","target","hreflang","type"],Ie={codeblock:/(^ {4}[^\n]+\n*)+/,thematicBreak:/^ *((\* *){3,}|(- *){3,} *|(_ *){3,}) */,atxHeading:/^(#{1,6}) +[\s\S]+/,seTextheading:/^([^\n]+)\n *(=|-){2,} */,blockquote:/^( *>[^\n]+.*)+/,list:/^ *(\*+|-+|\d+\.) [\s\S]+/,def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? */,link:/!?\[.*\]\(.*\)/,reflink:/!?\[.*\]\s*\[([^\]]*)\]/,verticalBar:/\u007C/,fencedCodeblock:/^((`|~){3,})/};function Re(e){if(!e)return null;var t={};return Le.forEach((function(n){F(e[n])||(t[n]=e[n])})),t}function je(e,t){for(var n="",a=0;ae[0]&&n=t&&e<=n}function $e(e){return"object"===typeof e&&null!==e}function Ue(e,t){var n=h({},e);return e&&t&&Object.keys(t).forEach((function(e){$e(n[e])?Array.isArray(t[e])?n[e]=We(t[e]):n.hasOwnProperty(e)?n[e]=Ue(n[e],t[e]):n[e]=Je(t[e]):n[e]=t[e]})),n}function We(e){return e.map((function(e){return $e(e)?Array.isArray(e)?We(e):Je(e):e}))}function Je(e){var t=Object.keys(e);return t.length?t.reduce((function(t,n){return $e(e[n])?t[n]=Array.isArray(e[n])?We(e[n]):Je(e[n]):t[n]=e[n],t}),{}):e}function Ke(e,t){return void 0===t&&(t={}),Object.keys(t).forEach((function(n){e.hasOwnProperty(n)&&"object"===typeof e[n]?Array.isArray(t[n])?e[n]=t[n]:Ke(e[n],t[n]):e[n]=t[n]})),e}function Ge(e,t){return e>t?[t,e]:[e,t]}function Xe(e){var t=/^\s(\S*)/g;return t.test(e)}function Ze(e){var t=/(\S*)\s$/g;return t.test(e)}var Qe=M;function Ye(e){var t;try{t=Array.prototype.slice.call(e)}catch(n){t=[],Qe(e,(function(e){t.push(e)}))}return t}var et=Ye;function tt(e,t){var n=e.nodes.paragraph;return t?n.create(null,k(t)?e.text(t):t):n.createAndFill()}function nt(e,t,n){return e.text(t,n)}function at(e,t,n){void 0===n&&(n=t);var a=e.doc.content.size,l=a>0?a-1:1;return r["h"].create(e.doc,Math.min(t,l),Math.min(n,l))}function lt(e,t,n){var a=t.pos;return e.replaceWith(a,a,tt(n)),e.setSelection(at(e,a+1))}function ot(e){for(var t=e.state,n=e.from,l=e.startIndex,o=e.endIndex,r=e.createText,i=t.tr,c=t.doc,u=t.schema,s=l;s<=o;s+=1){var d=c.child(s),p=d.nodeSize,h=d.textContent,f=d.content,m=r(h),v=m?nt(u,m):a["c"].empty,b=i.mapping.map(n),g=b+f.size;i.replaceWith(b,g,v),n+=p}return i}function rt(e,t,n,a){var l=n.length;e.split(t).delete(t-l,t).insert(e.mapping.map(t),a).setSelection(at(e,e.mapping.map(t)-l))}function it(e){return e.sourcepos[0][0]}function ct(e){return e.sourcepos[1][0]}function ut(e){return e.sourcepos[0][1]}function st(e){return e.sourcepos[1][1]}function dt(e){var t=e.type;return"htmlBlock"===t||"htmlInline"===t}function pt(e){var t=e.type;return"strike"===t||"strong"===t||"emph"===t||"code"===t||"link"===t||"image"===t}function ht(e){return e&&"codeBlock"===e.type}function ft(e){return e&&("item"===e.type||"list"===e.type)}function mt(e){return ft(e)&&"ordered"===e.listData.type}function vt(e){return ft(e)&&"ordered"!==e.listData.type}function bt(e){return e&&("tableCell"===e.type||"tableDelimCell"===e.type)}function gt(e){switch(e.type){case"code":case"text":case"emph":case"strong":case"strike":case"link":case"image":case"htmlInline":case"linebreak":case"softbreak":case"customInline":return!0;default:return!1}}function yt(e,t,n){void 0===n&&(n=!0),e=n?e:e.parent;while(e&&"document"!==e.type){if(t(e))return e;e=e.parent}return null}function wt(e,t,n){void 0===n&&(n=!0),e=n?e:e.parent;while(e&&"document"!==e.type)t(e),e=e.parent}function kt(e,t){return[e[0],e[1]+t]}function xt(e,t){return[e[0],t]}function Ct(e){var t=e.firstChild.literal;switch(e.type){case"emph":return"*"+t+"*";case"strong":return"**"+t+"**";case"strike":return"~~"+t+"~~";case"code":return"`"+t+"`";case"link":case"image":var n=e,a=n.destination,l=n.title,o="link"===e.type?"":"!";return o+"["+t+"]("+a+(l?' "'+l+'"':"")+")";default:return null}}function Tt(e){switch(e.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}function Mt(e){var t=[],n=e.walker(),a=null;while(a=n.next()){var l=a.node;"text"===l.type&&t.push(l.literal)}return t.join("")}var Ot=[],St={},Et=/\$\$widget\d+\s/;function Nt(e){var t=e.search(Et);if(-1!==t){var n=e.substring(t),a=n.replace(Et,"").replace("$$","");e=e.substring(0,t),e+=Nt(a)}return e}function Dt(e,t){return"$$"+e+" "+t+"$$"}function At(e,t){var n=St[e],a=n.rule,l=n.toDOM,o=Nt(t).match(a);return o&&(t=o[0]),l(t)}function Lt(){return Ot}function It(e){Ot=e,Ot.forEach((function(e,t){St["widget"+t]=e}))}function Rt(e,t,n,a){return e.concat(jt(t,n,a))}function jt(e,t,n){void 0===n&&(n=0);var a=[],l=(Ot[n]||{}).rule,o=n+1;if(e=Nt(e),l&&l.test(e)){var r=void 0;while(-1!==(r=e.search(l))){var i=e.substring(0,r);i&&(a=Rt(a,i,t,o)),e=e.substring(r);var c=e.match(l)[0],u="widget"+n;a.push(t.nodes.widget.create({info:u},t.text(Dt(u,c)))),e=e.substring(c.length)}e&&(a=Rt(a,e,t,o))}else e&&(a=n-1)}var _t=zt,qt=P,$t=et,Ut=Element.prototype,Wt=Ut.matches||Ut.webkitMatchesSelector||Ut.mozMatchesSelector||Ut.msMatchesSelector||function(e){var t=this.document||this.ownerDocument;return qt(this,$t(t.querySelectorAll(e)))>-1};function Jt(e,t){return Wt.call(e,t)}var Kt=Jt,Gt="[A-Za-z][A-Za-z0-9-]*",Xt="[a-zA-Z_:][a-zA-Z0-9:._-]*",Zt="[^\"'=<>`\\x00-\\x20]+",Qt="'[^']*'",Yt='"[^"]*"',en="(?:"+Zt+"|"+Qt+"|"+Yt+")",tn="(?:\\s*=\\s*"+en+")",nn="(?:\\s+"+Xt+tn+"?)",an="<("+Gt+")("+nn+")*\\s*/?>",ln="("+Gt+")\\s*[>]",on="(?:"+an+"|"+ln+")",rn=new RegExp("^"+on,"i"),cn=/ /i,un=/|/,sn="
",dn="a";function pn(e,t,n){var a=parseInt(e.left,10),l=parseInt(e.top,10),o=parseInt(e.width,10)+parseInt(e.paddingLeft,10)+parseInt(e.paddingRight,10),r=parseInt(e.height,10)+parseInt(e.paddingTop,10)+parseInt(e.paddingBottom,10);return t>=a&&t<=a+o&&n>=l&&n<=l+r}var hn="toastui-editor-";function fn(){for(var e=[],t=0;t <\/p>/gi,"
"),n=new RegExp(on,"ig"),a=t.match(n);return null===a||void 0===a||a.forEach((function(e,n){if(cn.test(e)){var l=sn;if(n){var o=a[n-1],r=o.match(an);if(r&&!/br/i.test(r[1])){var i=r[1];l=""+i+"><"+i+">"}}t=t.replace(cn,l)}})),t}var Dn=new r["e"]("widget"),An=5,Ln=function(){function e(e,t){var n=this;this.popup=null,this.removeWidget=function(){n.popup&&(n.rootEl.removeChild(n.popup),n.popup=null)},this.rootEl=e.dom.parentElement,this.eventEmitter=t,this.eventEmitter.listen("blur",this.removeWidget),this.eventEmitter.listen("loadUI",(function(){n.rootEl=On(e.dom.parentElement,"."+fn("defaultUI"))})),this.eventEmitter.listen("removePopupWidget",this.removeWidget)}return e.prototype.update=function(e){var t=Dn.getState(e.state);if(this.removeWidget(),t){var n=t.node,a=t.style,l=e.coordsAtPos(t.pos),o=l.top,r=l.left,i=l.bottom,c=i-o,u=this.rootEl.getBoundingClientRect(),s=o-u.top;R(n,{opacity:"0"}),this.rootEl.appendChild(n),R(n,{position:"absolute",left:r-u.left+An+"px",top:("bottom"===a?s+c-An:s-c)+"px",opacity:"1"}),this.popup=n,e.focus()}},e.prototype.destroy=function(){this.eventEmitter.removeEventHandler("blur",this.removeWidget)},e}();function In(e){return new r["d"]({key:Dn,state:{init:function(){return null},apply:function(e){return e.getMeta("widget")}},view:function(t){return new Ln(t,e)}})}function Rn(e){e.listen("addImageBlobHook",(function(e,t){var n=new FileReader;n.onload=function(e){var n=e.target;return t(n.result)},n.readAsDataURL(e)}))}function jn(e,t,n){var a=function(n,a){e.emit("command","addImage",{imageUrl:n,altText:a||t.name||"image"})};e.emit("addImageBlobHook",t,a,n)}function Bn(e){var t=et(e).filter((function(e){var t=e.type;return-1!==t.indexOf("image")}));if(1===t.length){var n=t[0];if(n)return n.getAsFile()}return null}function Pn(e){var t=e.eventEmitter;return new r["d"]({props:{handleDOMEvents:{drop:function(e,n){var a,l=null===(a=n.dataTransfer)||void 0===a?void 0:a.files;return l&&M(l,(function(e){return-1===e.type.indexOf("image")||(n.preventDefault(),n.stopPropagation(),jn(t,e,n.type),!1)})),!0}}}})}var Vn=function(){function e(){}return Object.defineProperty(e.prototype,"type",{get:function(){return"node"},enumerable:!1,configurable:!0}),e.prototype.setContext=function(e){this.context=e},e}();function Fn(e){var t=document.createElement("span"),n=At(e.attrs.info,e.textContent);return t.className="tui-widget",t.appendChild(n),{dom:t}}function Hn(e){return"widget"===e.type.name}var zn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"widget"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{attrs:{info:{default:null}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:function(){return["span",{class:"tui-widget"},0]},parseDOM:[{tag:"span.tui-widget",getAttrs:function(e){var t=e.textContent,n=t.match(/\$\$(widget\d+)/),a=n[1];return{info:a}}}]}},enumerable:!1,configurable:!0}),t}(Vn),_n=function(){function e(e){this.timer=null,this.el=document.createElement("div"),this.el.className="toastui-editor",this.eventEmitter=e,this.placeholder={text:""}}return e.prototype.createState=function(){return r["b"].create({schema:this.schema,plugins:this.createPlugins()})},e.prototype.initEvent=function(){var e=this,t=e.eventEmitter,n=e.view,a=e.editorType;n.dom.addEventListener("focus",(function(){return t.emit("focus",a)})),n.dom.addEventListener("blur",(function(){return t.emit("blur",a)}))},e.prototype.emitChangeEvent=function(e){this.eventEmitter.emit("caretChange",this.editorType),e.docChanged&&this.eventEmitter.emit("change",this.editorType)},Object.defineProperty(e.prototype,"defaultPlugins",{get:function(){var e=this.createInputRules(),t=f(f([],this.keymaps),[Object(i["a"])(h({"Shift-Enter":c["a"].Enter},c["a"])),Object(s["a"])(),Vt(this.placeholder),In(this.eventEmitter),Pn(this.context)]);return e?t.concat(e):t},enumerable:!1,configurable:!0}),e.prototype.createInputRules=function(){var e=Lt(),t=e.map((function(e){var t=e.rule;return new u["a"](t,(function(e,n,a,l){var o=e.schema,r=e.tr,i=e.doc,c=n.input.match(new RegExp(t,"g")),u=i.resolve(a),s=u.parent,d=0;if(Hn(s)&&(s=u.node(u.depth-1)),s.forEach((function(e){return Hn(e)&&(d+=1)})),c.length>d){var p=_e(c),h=jt(p,o);return r.replaceWith(l-p.length+1,l,h)}return null}))}));return t.length?Object(u["b"])({rules:t}):null},e.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.createSchema=function(){return new a["i"]({nodes:this.specs.nodes,marks:this.specs.marks})},e.prototype.createKeymaps=function(e){var t=Pt(),n=t.undo,a=t.redo,l=this.specs.keymaps(e),o={"Mod-z":n(),"Shift-Mod-z":a()};return e?l.concat(Object(i["a"])(o)):l},e.prototype.createCommands=function(){return this.specs.commands(this.view)},e.prototype.createPluginProps=function(){var e=this;return this.extraPlugins.map((function(t){return t(e.eventEmitter)}))},e.prototype.focus=function(){var e=this;this.clearTimer(),this.timer=setTimeout((function(){e.view.focus(),e.view.dispatch(e.view.state.tr.scrollIntoView())}))},e.prototype.blur=function(){this.view.dom.blur()},e.prototype.destroy=function(){var e=this;this.clearTimer(),this.view.destroy(),Object.keys(this).forEach((function(t){delete e[t]}))},e.prototype.moveCursorToStart=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(at(t,1)).scrollIntoView()),e&&this.focus()},e.prototype.moveCursorToEnd=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(at(t,t.doc.content.size-1)).scrollIntoView()),e&&this.focus()},e.prototype.setScrollTop=function(e){this.view.dom.scrollTop=e},e.prototype.getScrollTop=function(){return this.view.dom.scrollTop},e.prototype.setPlaceholder=function(e){this.placeholder.text=e,this.view.dispatch(this.view.state.tr.scrollIntoView())},e.prototype.setHeight=function(e){R(this.el,{height:e+"px"})},e.prototype.setMinHeight=function(e){R(this.el,{minHeight:e+"px"})},e.prototype.getElement=function(){return this.el},e}();function qn(e){return e instanceof Function}var $n=qn,Un=["Enter","Shift-Enter","Mod-Enter","Tab","Shift-Tab","Delete","Backspace","Mod-Delete","Mod-Backspace","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Mod-d","Mod-D","Alt-ArrowUp","Alt-ArrowDown"];function Wn(e,t,n){return e.focus(),t(n)(e.state,e.dispatch,e)}var Jn=function(){function e(e){this.specs=e}return Object.defineProperty(e.prototype,"nodes",{get:function(){return this.specs.filter((function(e){return"node"===e.type})).reduce((function(e,t){var n,a=t.name,l=t.schema;return h(h({},e),(n={},n[a]=l,n))}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"marks",{get:function(){return this.specs.filter((function(e){return"mark"===e.type})).reduce((function(e,t){var n,a=t.name,l=t.schema;return h(h({},e),(n={},n[a]=l,n))}),{})},enumerable:!1,configurable:!0}),e.prototype.commands=function(e,t){var n=this.specs.filter((function(e){var t=e.commands;return t})).reduce((function(t,n){var a={},l=n.commands();return $n(l)?a[n.name]=function(t){return Wn(e,l,t)}:Object.keys(l).forEach((function(t){a[t]=function(n){return Wn(e,l[t],n)}})),h(h({},t),a)}),{}),a=Pt();return Object.keys(a).forEach((function(t){n[t]=function(n){return Wn(e,a[t],n)}})),t&&Object.keys(t).forEach((function(a){n[a]=function(n){return Wn(e,t[a],n)}})),n},e.prototype.keymaps=function(e){var t=this.specs.filter((function(e){return e.keymaps})).map((function(e){return e.keymaps()}));return t.map((function(t){return e||Object.keys(t).forEach((function(e){Ae(Un,e)||delete t[e]})),Object(i["a"])(t)}))},e.prototype.setContext=function(e){this.specs.forEach((function(t){t.setContext(e)}))},e}();function Kn(e){var t=e.from,n=e.to;return e instanceof r["a"]?[t+1,n-1]:[t,n]}function Gn(e){return e.index(0)+1}function Xn(e,t,n){void 0===n&&(n=1);var a=0;return e.forEach((function(e,l){Hn(e)&&l+2 ?/,el=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:mn("block-quote")},0]}}},enumerable:!1,configurable:!0}),t.prototype.createBlockQuoteText=function(e,t){return t?e.replace(Ya,"").trim():"> "+e.trim()},t.prototype.extendBlockQuote=function(){var e=this;return function(t,n){var a=t.selection,l=t.doc,o=t.tr,r=t.schema,i=ea(a),c=i.endFromOffset,u=i.endToOffset,s=i.endIndex,d=i.to,p=Qa(l,s),h=Ya.test(p);if(h&&d>c&&a.empty){var f=!p.replace(Ya,"").trim();if(f)o.deleteRange(c,u).split(o.mapping.map(u));else{var m=p.slice(d-c).trim(),v=nt(r,e.createBlockQuoteText(m));rt(o,u,m,v)}return n(o),!0}return!1}},t.prototype.commands=function(){var e=this;return function(){return function(t,n){var a=t.selection,l=t.doc,o=ea(a),r=o.startFromOffset,i=o.endToOffset,c=o.startIndex,u=o.endIndex,s=Ya.test(Qa(l,c)),d=ot({state:t,startIndex:c,endIndex:u,from:r,createText:function(t){return e.createBlockQuoteText(t,s)}});return n(d.setSelection(at(d,d.mapping.map(i)))),!0}}},t.prototype.keymaps=function(){var e=this.commands()();return{"alt-q":e,"alt-Q":e,Enter:this.extendBlockQuote()}},t}(Xa),tl=/(^\s*)([-*+] |[\d]+\. )/,nl=/(^\s*)([\d])+\.( \[[ xX]])? /,al=/^(\s*)((\d+)([.)]\s(?:\[(?:x|\s)\]\s)?))(.*)/,ll=/(^\s*)([-*+]|[\d]+\.)( \[[ xX]])? /,ol=/^(\s*)([-*+]+(\s(?:\[(?:x|\s)\]\s)?))(.*)/,rl=/(^\s*)([-*+] |[\d]+\. )(\[[ xX]] )/,il=/(^\s*)([-*+])( \[[ xX]]) /;function cl(e){return nl.test(e)?"ordered":"bullet"}function ul(e){var t=0;while(e&&"document"!==e.type)"list"===e.type&&(t+=1),e=e.parent;return t}function sl(e,t,n,a){var l=e.getLineTexts(),o=l.length,r=[],i=t;while(a?i1){i=a?i+1:i-1;var c=e.findFirstNodeAtLine(i),u=ul(c);if(u===n)r.push({line:i,depth:n,mdNode:c});else if(u0;u-=1){var s=t.findFirstNodeAtLine(u),d=Za(n,u),p=d&&!!yt(s,(function(e){return ft(e)})),h=al.exec(Za(n,u));if(!h&&!p)break;if(h||!p){var f=h,m=f[1],v=f[3];if(!m){r=Number(v),i=u;break}}else c+=1}var b=r+a-i-c,g=[{text:b+". "+o,line:a}];return{changedResults:g}},task:function(e){var t=e.doc,n=e.line,a=Za(t,n),l=[{text:"* [ ] "+a,line:n}];return{changedResults:l}}},gl={bullet:function(e){var t=e.line,n=e.doc,a=Za(n,t),l=ol.exec(a),o=l[1],r=l[2];return{listSyntax:""+o+r}},ordered:function(e){var t=e.toastMark,n=e.line,a=e.mdNode,l=e.doc,o=ul(a),r=Za(l,n),i=al.exec(r),c=i[1],u=i[3],s=i[4],d=Number(u)+1,p=""+c+d+s,f=sl(t,n,o,!0),m=f.filter((function(e){var t=al.exec(Za(l,e.line));return t&&t[1].length===c.length&&!!yt(e.mdNode,(function(e){return mt(e)}))}));return h({listSyntax:p},fl(l,m,"ordered",d))}};function yl(e,t,n,a,l){var o=[],r=Za(e,n),i=al.exec(r);while(i){var c=i[1],u=i[4],s=i[5],d=c.length;if(d===l)o.push(nt(t,""+c+a+u+s)),a+=1,n+=1;else if(d>l){var p=yl(e,t,n,1,d);n=p.line,o=o.concat(p.nodes)}if(de.childCount)break;r=Za(e,n),i=al.exec(r)}return{nodes:o,line:n}}var wl=/(^\s{1,4})(.*)/;function kl(e,t,n){return e0){var s=a.child(u-1),d=s.nodeSize,p=s.textContent;return n.delete(i-d,i).split(n.mapping.map(c)).insert(n.mapping.map(c),nt(o,p)),t(n),!0}return!1}},t.prototype.commands=function(){return{indent:this.indent(),outdent:this.outdent()}},t.prototype.keymaps=function(){return{Tab:this.indent(!0)(),"Shift-Tab":this.outdent(!0)(),"Mod-d":this.deleteLines(),"Mod-D":this.deleteLines(),"Alt-ArrowUp":this.moveUp(),"Alt-ArrowDown":this.moveDown()}},t}(Vn),Ml=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),t}(Vn),Ol=/^#{1,6}\s/,Sl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{attrs:{level:{default:1},seText:{default:!1}},toDOM:function(e){var t=e.attrs,n=t.level,a=t.seText,l="heading|heading"+n;return a&&(l+="|delimiter|setext"),["span",{class:mn.apply(void 0,l.split("|"))},0]}}},enumerable:!1,configurable:!0}),t.prototype.createHeadingText=function(e,t,n){var a=t.replace(n,"").trim(),l="";while(e>0)l+="#",e-=1;return l+" "+a},t.prototype.commands=function(){var e=this;return function(t){return function(n,a){var l=t.level,o=ea(n.selection),r=o.startFromOffset,i=o.endToOffset,c=o.startIndex,u=o.endIndex,s=ot({state:n,from:r,startIndex:c,endIndex:u,createText:function(t){var n=t.match(Ol),a=n?n[0]:"";return e.createHeadingText(l,t,a)}});return a(s.setSelection(at(s,s.mapping.map(i)))),!0}}},t}(Xa),El="```",Nl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:mn("code-block")},0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(){return function(e,t){var n=e.selection,a=e.schema,l=e.tr,o=ea(n),r=o.startFromOffset,i=o.endToOffset,c=nt(a,El);return l.insert(r,c).split(r+El.length),l.split(l.mapping.map(i)).insert(l.mapping.map(i),c),t(l.setSelection(at(l,l.mapping.map(i)-(El.length+2)))),!0}}},t.prototype.keepIndentation=function(){var e=this;return function(t,n){var a=t.selection,l=t.tr,o=t.doc,r=t.schema,i=e.context.toastMark,c=ea(a),u=c.startFromOffset,s=c.endToOffset,d=c.endIndex,p=c.from,h=c.to,f=Qa(o,d);if(p===h&&f.trim()){var m=f.match(/^\s+/),v=i.findFirstNodeAtLine(d+1);if(ht(v)&&m){var b=m[0],g=f.slice(h-u),y=nt(r,b+g);return rt(l,s,g,y),n(l),!0}}return!1}},t.prototype.keymaps=function(){var e=this.commands()();return{"Shift-Mod-p":e,"Shift-Mod-P":e,Enter:this.keepIndentation()}},t}(Xa),Dl=/\||\s/g;function Al(e){return[Il(e),Il(e,!0)]}function Ll(e,t){for(var n=[],a=0;a0&&(t+="\n")})),t},t.prototype.setSelection=function(e,t){void 0===t&&(t=e);var n=this.view.state.tr,a=Yn(n.doc,e,t),l=a[0],o=a[1];this.view.dispatch(n.setSelection(at(n,l,o)).scrollIntoView())},t.prototype.replaceSelection=function(e,t,n){var l,o=this.view.state,r=o.tr,i=o.schema,c=o.doc,u=e.split(ho),s=u.map((function(e){return tt(i,jt(e,i))})),d=new a["j"](a["c"].from(s),1,1);if(this.focus(),t&&n){var p=Yn(c,t,n),h=p[0],f=p[1];l=r.replaceRange(h,f,d)}else l=r.replaceSelection(d);this.view.dispatch(l.scrollIntoView())},t.prototype.deleteSelection=function(e,t){var n,a=this.view.state,l=a.tr,o=a.doc;if(e&&t){var r=Yn(o,e,t),i=r[0],c=r[1];n=l.deleteRange(i,c)}else n=l.deleteSelection();this.view.dispatch(n.scrollIntoView())},t.prototype.getSelectedText=function(e,t){var n=this.view.state,a=n.doc,l=n.selection,o=l.from,r=l.to;if(e&&t){var i=Yn(a,e,t);o=i[0],r=i[1]}return a.textBetween(o,r,"\n")},t.prototype.getSelection=function(){var e=this.view.state.selection,t=e.from,n=e.to;return Zn(this.view.state.tr.doc,t,n)},t.prototype.setMarkdown=function(e,t){void 0===t&&(t=!0);var n=e.split(ho),a=this.view.state,l=a.tr,o=a.doc,r=a.schema,i=n.map((function(e){return tt(r,jt(e,r))}));this.view.dispatch(l.replaceWith(0,o.content.size,i)),t&&this.moveCursorToEnd(!0)},t.prototype.addWidget=function(e,t,n){var a=this.view.state,l=a.tr,o=a.doc,r=a.selection,i=n?Yn(o,n,n)[0]:r.to;this.view.dispatch(l.setMeta("widget",{pos:i,node:e,style:t}))},t.prototype.replaceWithWidget=function(e,t,n){var a=this.view.state,l=a.tr,o=a.schema,r=a.doc,i=Yn(r,e,t),c=jt(n,o);this.view.dispatch(l.replaceWith(i[0],i[1],c))},t.prototype.getRangeInfoOfNode=function(e){var t=this.view.state,n=t.doc,a=t.selection,l=e||Zn(n,a.from)[0],o=this.toastMark.findNodeAtPosition(l);return"text"===o.type&&"paragraph"!==o.parent.type&&(o=o.parent),o.sourcepos[1][1]+=1,{range:o.sourcepos,type:o.type}},t.prototype.getMarkdown=function(){return this.toastMark.getLineTexts().map((function(e){return Nt(e)})).join("\n")},t.prototype.getToastMark=function(){return this.toastMark},t}(_n),mo="_feEventKey";function vo(e,t){var n,a=e[mo];return a||(a=e[mo]={}),n=a[t],n||(n=a[t]=[]),n}var bo=vo,go=k,yo=D,wo=bo;function ko(e,t,n){go(t)?yo(t.split(/\s+/g),(function(t){xo(e,t,n)})):yo(t,(function(t,n){xo(e,n,t)}))}function xo(e,t,n){var a,l=wo(e,t);n?(yo(l,(function(l,o){return n!==l.handler||(Co(e,t,l.wrappedHandler),a=o,!1)})),l.splice(a,1)):(yo(l,(function(n){Co(e,t,n.wrappedHandler)})),l.splice(0,l.length))}function Co(e,t,n){"removeEventListener"in e?e.removeEventListener(t,n):"detachEvent"in e&&e.detachEvent("on"+t,n)}var To=ko,Mo=k,Oo=D,So=bo;function Eo(e,t,n,a){Mo(t)?Oo(t.split(/\s+/g),(function(t){No(e,t,n,a)})):Oo(t,(function(t,a){No(e,a,t,n)}))}function No(e,t,n,a){function l(t){n.call(a||e,t||window.event)}"addEventListener"in e?e.addEventListener(t,l):"attachEvent"in e&&e.attachEvent("on"+t,l),Do(e,t,n,l)}function Do(e,t,n,a){var l=So(e,t),o=!1;Oo(l,(function(e){return e.handler!==n||(o=!0,!1)})),o||l.push({handler:n,wrappedHandler:a})}var Ao=Eo,Lo=function(e,t){return Lo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Lo(e,t)};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function Io(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Lo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ro=function(){return Ro=Object.assign||function(e){for(var t,n=1,a=arguments.length;n=55296&&o<=57343){if(o>=55296&&o<=56319&&a+1=56320&&r<=57343)){c+=encodeURIComponent(e[a]+e[a+1]),a++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[a]);return c}Fo.defaultChars=";/?:@&=+$,-_.!~*'()#",Fo.componentChars="-_.!~*'()";var Ho=Fo,zo={},_o={},qo="Á",$o="á",Uo="Ă",Wo="ă",Jo="∾",Ko="∿",Go="∾̳",Xo="Â",Zo="â",Qo="´",Yo="А",er="а",tr="Æ",nr="æ",ar="",lr="𝔄",or="𝔞",rr="À",ir="à",cr="ℵ",ur="ℵ",sr="Α",dr="α",pr="Ā",hr="ā",fr="⨿",mr="&",vr="&",br="⩕",gr="⩓",yr="∧",wr="⩜",kr="⩘",xr="⩚",Cr="∠",Tr="⦤",Mr="∠",Or="⦨",Sr="⦩",Er="⦪",Nr="⦫",Dr="⦬",Ar="⦭",Lr="⦮",Ir="⦯",Rr="∡",jr="∟",Br="⊾",Pr="⦝",Vr="∢",Fr="Å",Hr="⍼",zr="Ą",_r="ą",qr="𝔸",$r="𝕒",Ur="⩯",Wr="≈",Jr="⩰",Kr="≊",Gr="≋",Xr="'",Zr="",Qr="≈",Yr="≊",ei="Å",ti="å",ni="𝒜",ai="𝒶",li="≔",oi="*",ri="≈",ii="≍",ci="Ã",ui="ã",si="Ä",di="ä",pi="∳",hi="⨑",fi="≌",mi="϶",vi="‵",bi="∽",gi="⋍",yi="∖",wi="⫧",ki="⊽",xi="⌅",Ci="⌆",Ti="⌅",Mi="⎵",Oi="⎶",Si="≌",Ei="Б",Ni="б",Di="„",Ai="∵",Li="∵",Ii="∵",Ri="⦰",ji="϶",Bi="ℬ",Pi="ℬ",Vi="Β",Fi="β",Hi="ℶ",zi="≬",_i="𝔅",qi="𝔟",$i="⋂",Ui="◯",Wi="⋃",Ji="⨀",Ki="⨁",Gi="⨂",Xi="⨆",Zi="★",Qi="▽",Yi="△",ec="⨄",tc="⋁",nc="⋀",ac="⤍",lc="⧫",oc="▪",rc="▴",ic="▾",cc="◂",uc="▸",sc="␣",dc="▒",pc="░",hc="▓",fc="█",mc="=⃥",vc="≡⃥",bc="⫭",gc="⌐",yc="𝔹",wc="𝕓",kc="⊥",xc="⊥",Cc="⋈",Tc="⧉",Mc="┐",Oc="╕",Sc="╖",Ec="╗",Nc="┌",Dc="╒",Ac="╓",Lc="╔",Ic="─",Rc="═",jc="┬",Bc="╤",Pc="╥",Vc="╦",Fc="┴",Hc="╧",zc="╨",_c="╩",qc="⊟",$c="⊞",Uc="⊠",Wc="┘",Jc="╛",Kc="╜",Gc="╝",Xc="└",Zc="╘",Qc="╙",Yc="╚",eu="│",tu="║",nu="┼",au="╪",lu="╫",ou="╬",ru="┤",iu="╡",cu="╢",uu="╣",su="├",du="╞",pu="╟",hu="╠",fu="‵",mu="˘",vu="˘",bu="¦",gu="𝒷",yu="ℬ",wu="⁏",ku="∽",xu="⋍",Cu="⧅",Tu="\\",Mu="⟈",Ou="•",Su="•",Eu="≎",Nu="⪮",Du="≏",Au="≎",Lu="≏",Iu="Ć",Ru="ć",ju="⩄",Bu="⩉",Pu="⩋",Vu="∩",Fu="⋒",Hu="⩇",zu="⩀",_u="ⅅ",qu="∩︀",$u="⁁",Uu="ˇ",Wu="ℭ",Ju="⩍",Ku="Č",Gu="č",Xu="Ç",Zu="ç",Qu="Ĉ",Yu="ĉ",es="∰",ts="⩌",ns="⩐",as="Ċ",ls="ċ",os="¸",rs="¸",is="⦲",cs="¢",us="·",ss="·",ds="𝔠",ps="ℭ",hs="Ч",fs="ч",ms="✓",vs="✓",bs="Χ",gs="χ",ys="ˆ",ws="≗",ks="↺",xs="↻",Cs="⊛",Ts="⊚",Ms="⊝",Os="⊙",Ss="®",Es="Ⓢ",Ns="⊖",Ds="⊕",As="⊗",Ls="○",Is="⧃",Rs="≗",js="⨐",Bs="⫯",Ps="⧂",Vs="∲",Fs="”",Hs="’",zs="♣",_s="♣",qs=":",$s="∷",Us="⩴",Ws="≔",Js="≔",Ks=",",Gs="@",Xs="∁",Zs="∘",Qs="∁",Ys="ℂ",ed="≅",td="⩭",nd="≡",ad="∮",ld="∯",od="∮",rd="𝕔",id="ℂ",cd="∐",ud="∐",sd="©",dd="©",pd="℗",hd="∳",fd="↵",md="✗",vd="⨯",bd="𝒞",gd="𝒸",yd="⫏",wd="⫑",kd="⫐",xd="⫒",Cd="⋯",Td="⤸",Md="⤵",Od="⋞",Sd="⋟",Ed="↶",Nd="⤽",Dd="⩈",Ad="⩆",Ld="≍",Id="∪",Rd="⋓",jd="⩊",Bd="⊍",Pd="⩅",Vd="∪︀",Fd="↷",Hd="⤼",zd="⋞",_d="⋟",qd="⋎",$d="⋏",Ud="¤",Wd="↶",Jd="↷",Kd="⋎",Gd="⋏",Xd="∲",Zd="∱",Qd="⌭",Yd="†",ep="‡",tp="ℸ",np="↓",ap="↡",lp="⇓",op="‐",rp="⫤",ip="⊣",cp="⤏",up="˝",sp="Ď",dp="ď",pp="Д",hp="д",fp="‡",mp="⇊",vp="ⅅ",bp="ⅆ",gp="⤑",yp="⩷",wp="°",kp="∇",xp="Δ",Cp="δ",Tp="⦱",Mp="⥿",Op="𝔇",Sp="𝔡",Ep="⥥",Np="⇃",Dp="⇂",Ap="´",Lp="˙",Ip="˝",Rp="`",jp="˜",Bp="⋄",Pp="⋄",Vp="⋄",Fp="♦",Hp="♦",zp="¨",_p="ⅆ",qp="ϝ",$p="⋲",Up="÷",Wp="÷",Jp="⋇",Kp="⋇",Gp="Ђ",Xp="ђ",Zp="⌞",Qp="⌍",Yp="$",eh="𝔻",th="𝕕",nh="¨",ah="˙",lh="⃜",oh="≐",rh="≑",ih="≐",ch="∸",uh="∔",sh="⊡",dh="⌆",ph="∯",hh="¨",fh="⇓",mh="⇐",vh="⇔",bh="⫤",gh="⟸",yh="⟺",wh="⟹",kh="⇒",xh="⊨",Ch="⇑",Th="⇕",Mh="∥",Oh="⤓",Sh="↓",Eh="↓",Nh="⇓",Dh="⇵",Ah="̑",Lh="⇊",Ih="⇃",Rh="⇂",jh="⥐",Bh="⥞",Ph="⥖",Vh="↽",Fh="⥟",Hh="⥗",zh="⇁",_h="↧",qh="⊤",$h="⤐",Uh="⌟",Wh="⌌",Jh="𝒟",Kh="𝒹",Gh="Ѕ",Xh="ѕ",Zh="⧶",Qh="Đ",Yh="đ",ef="⋱",tf="▿",nf="▾",af="⇵",lf="⥯",of="⦦",rf="Џ",cf="џ",uf="⟿",sf="É",df="é",pf="⩮",hf="Ě",ff="ě",mf="Ê",vf="ê",bf="≖",gf="≕",yf="Э",wf="э",kf="⩷",xf="Ė",Cf="ė",Tf="≑",Mf="ⅇ",Of="≒",Sf="𝔈",Ef="𝔢",Nf="⪚",Df="È",Af="è",Lf="⪖",If="⪘",Rf="⪙",jf="∈",Bf="⏧",Pf="ℓ",Vf="⪕",Ff="⪗",Hf="Ē",zf="ē",_f="∅",qf="∅",$f="◻",Uf="∅",Wf="▫",Jf=" ",Kf=" ",Gf=" ",Xf="Ŋ",Zf="ŋ",Qf=" ",Yf="Ę",em="ę",tm="𝔼",nm="𝕖",am="⋕",lm="⧣",om="⩱",rm="ε",im="Ε",cm="ε",um="ϵ",sm="≖",dm="≕",pm="≂",hm="⪖",fm="⪕",mm="⩵",vm="=",bm="≂",gm="≟",ym="⇌",wm="≡",km="⩸",xm="⧥",Cm="⥱",Tm="≓",Mm="ℯ",Om="ℰ",Sm="≐",Em="⩳",Nm="≂",Dm="Η",Am="η",Lm="Ð",Im="ð",Rm="Ë",jm="ë",Bm="€",Pm="!",Vm="∃",Fm="∃",Hm="ℰ",zm="ⅇ",_m="ⅇ",qm="≒",$m="Ф",Um="ф",Wm="♀",Jm="ffi",Km="ff",Gm="ffl",Xm="𝔉",Zm="𝔣",Qm="fi",Ym="◼",ev="▪",tv="fj",nv="♭",av="fl",lv="▱",ov="ƒ",rv="𝔽",iv="𝕗",cv="∀",uv="∀",sv="⋔",dv="⫙",pv="ℱ",hv="⨍",fv="½",mv="⅓",vv="¼",bv="⅕",gv="⅙",yv="⅛",wv="⅔",kv="⅖",xv="¾",Cv="⅗",Tv="⅜",Mv="⅘",Ov="⅚",Sv="⅝",Ev="⅞",Nv="⁄",Dv="⌢",Av="𝒻",Lv="ℱ",Iv="ǵ",Rv="Γ",jv="γ",Bv="Ϝ",Pv="ϝ",Vv="⪆",Fv="Ğ",Hv="ğ",zv="Ģ",_v="Ĝ",qv="ĝ",$v="Г",Uv="г",Wv="Ġ",Jv="ġ",Kv="≥",Gv="≧",Xv="⪌",Zv="⋛",Qv="≥",Yv="≧",eb="⩾",tb="⪩",nb="⩾",ab="⪀",lb="⪂",ob="⪄",rb="⋛︀",ib="⪔",cb="𝔊",ub="𝔤",sb="≫",db="⋙",pb="⋙",hb="ℷ",fb="Ѓ",mb="ѓ",vb="⪥",bb="≷",gb="⪒",yb="⪤",wb="⪊",kb="⪊",xb="⪈",Cb="≩",Tb="⪈",Mb="≩",Ob="⋧",Sb="𝔾",Eb="𝕘",Nb="`",Db="≥",Ab="⋛",Lb="≧",Ib="⪢",Rb="≷",jb="⩾",Bb="≳",Pb="𝒢",Vb="ℊ",Fb="≳",Hb="⪎",zb="⪐",_b="⪧",qb="⩺",$b=">",Ub=">",Wb="≫",Jb="⋗",Kb="⦕",Gb="⩼",Xb="⪆",Zb="⥸",Qb="⋗",Yb="⋛",eg="⪌",tg="≷",ng="≳",ag="≩︀",lg="≩︀",og="ˇ",rg=" ",ig="½",cg="ℋ",ug="Ъ",sg="ъ",dg="⥈",pg="↔",hg="⇔",fg="↭",mg="^",vg="ℏ",bg="Ĥ",gg="ĥ",yg="♥",wg="♥",kg="…",xg="⊹",Cg="𝔥",Tg="ℌ",Mg="ℋ",Og="⤥",Sg="⤦",Eg="⇿",Ng="∻",Dg="↩",Ag="↪",Lg="𝕙",Ig="ℍ",Rg="―",jg="─",Bg="𝒽",Pg="ℋ",Vg="ℏ",Fg="Ħ",Hg="ħ",zg="≎",_g="≏",qg="⁃",$g="‐",Ug="Í",Wg="í",Jg="",Kg="Î",Gg="î",Xg="И",Zg="и",Qg="İ",Yg="Е",ey="е",ty="¡",ny="⇔",ay="𝔦",ly="ℑ",oy="Ì",ry="ì",iy="ⅈ",cy="⨌",uy="∭",sy="⧜",dy="℩",py="IJ",hy="ij",fy="Ī",my="ī",vy="ℑ",by="ⅈ",gy="ℐ",yy="ℑ",wy="ı",ky="ℑ",xy="⊷",Cy="Ƶ",Ty="⇒",My="℅",Oy="∞",Sy="⧝",Ey="ı",Ny="⊺",Dy="∫",Ay="∬",Ly="ℤ",Iy="∫",Ry="⊺",jy="⋂",By="⨗",Py="⨼",Vy="",Fy="",Hy="Ё",zy="ё",_y="Į",qy="į",$y="𝕀",Uy="𝕚",Wy="Ι",Jy="ι",Ky="⨼",Gy="¿",Xy="𝒾",Zy="ℐ",Qy="∈",Yy="⋵",ew="⋹",tw="⋴",nw="⋳",aw="∈",lw="",ow="Ĩ",rw="ĩ",iw="І",cw="і",uw="Ï",sw="ï",dw="Ĵ",pw="ĵ",hw="Й",fw="й",mw="𝔍",vw="𝔧",bw="ȷ",gw="𝕁",yw="𝕛",ww="𝒥",kw="𝒿",xw="Ј",Cw="ј",Tw="Є",Mw="є",Ow="Κ",Sw="κ",Ew="ϰ",Nw="Ķ",Dw="ķ",Aw="К",Lw="к",Iw="𝔎",Rw="𝔨",jw="ĸ",Bw="Х",Pw="х",Vw="Ќ",Fw="ќ",Hw="𝕂",zw="𝕜",_w="𝒦",qw="𝓀",$w="⇚",Uw="Ĺ",Ww="ĺ",Jw="⦴",Kw="ℒ",Gw="Λ",Xw="λ",Zw="⟨",Qw="⟪",Yw="⦑",ek="⟨",tk="⪅",nk="ℒ",ak="«",lk="⇤",ok="⤟",rk="←",ik="↞",ck="⇐",uk="⤝",sk="↩",dk="↫",pk="⤹",hk="⥳",fk="↢",mk="⤙",vk="⤛",bk="⪫",gk="⪭",yk="⪭︀",wk="⤌",kk="⤎",xk="❲",Ck="{",Tk="[",Mk="⦋",Ok="⦏",Sk="⦍",Ek="Ľ",Nk="ľ",Dk="Ļ",Ak="ļ",Lk="⌈",Ik="{",Rk="Л",jk="л",Bk="⤶",Pk="“",Vk="„",Fk="⥧",Hk="⥋",zk="↲",_k="≤",qk="≦",$k="⟨",Uk="⇤",Wk="←",Jk="←",Kk="⇐",Gk="⇆",Xk="↢",Zk="⌈",Qk="⟦",Yk="⥡",ex="⥙",tx="⇃",nx="⌊",ax="↽",lx="↼",ox="⇇",rx="↔",ix="↔",cx="⇔",ux="⇆",sx="⇋",dx="↭",px="⥎",hx="↤",fx="⊣",mx="⥚",vx="⋋",bx="⧏",gx="⊲",yx="⊴",wx="⥑",kx="⥠",xx="⥘",Cx="↿",Tx="⥒",Mx="↼",Ox="⪋",Sx="⋚",Ex="≤",Nx="≦",Dx="⩽",Ax="⪨",Lx="⩽",Ix="⩿",Rx="⪁",jx="⪃",Bx="⋚︀",Px="⪓",Vx="⪅",Fx="⋖",Hx="⋚",zx="⪋",_x="⋚",qx="≦",$x="≶",Ux="≶",Wx="⪡",Jx="≲",Kx="⩽",Gx="≲",Xx="⥼",Zx="⌊",Qx="𝔏",Yx="𝔩",eC="≶",tC="⪑",nC="⥢",aC="↽",lC="↼",oC="⥪",rC="▄",iC="Љ",cC="љ",uC="⇇",sC="≪",dC="⋘",pC="⌞",hC="⇚",fC="⥫",mC="◺",vC="Ŀ",bC="ŀ",gC="⎰",yC="⎰",wC="⪉",kC="⪉",xC="⪇",CC="≨",TC="⪇",MC="≨",OC="⋦",SC="⟬",EC="⇽",NC="⟦",DC="⟵",AC="⟵",LC="⟸",IC="⟷",RC="⟷",jC="⟺",BC="⟼",PC="⟶",VC="⟶",FC="⟹",HC="↫",zC="↬",_C="⦅",qC="𝕃",$C="𝕝",UC="⨭",WC="⨴",JC="∗",KC="_",GC="↙",XC="↘",ZC="◊",QC="◊",YC="⧫",eT="(",tT="⦓",nT="⇆",aT="⌟",lT="⇋",oT="⥭",rT="",iT="⊿",cT="‹",uT="𝓁",sT="ℒ",dT="↰",pT="↰",hT="≲",fT="⪍",mT="⪏",vT="[",bT="‘",gT="‚",yT="Ł",wT="ł",kT="⪦",xT="⩹",CT="<",TT="<",MT="≪",OT="⋖",ST="⋋",ET="⋉",NT="⥶",DT="⩻",AT="◃",LT="⊴",IT="◂",RT="⦖",jT="⥊",BT="⥦",PT="≨︀",VT="≨︀",FT="¯",HT="♂",zT="✠",_T="✠",qT="↦",$T="↦",UT="↧",WT="↤",JT="↥",KT="▮",GT="⨩",XT="М",ZT="м",QT="—",YT="∺",eM="∡",tM=" ",nM="ℳ",aM="𝔐",lM="𝔪",oM="℧",rM="µ",iM="*",cM="⫰",uM="∣",sM="·",dM="⊟",pM="−",hM="∸",fM="⨪",mM="∓",vM="⫛",bM="…",gM="∓",yM="⊧",wM="𝕄",kM="𝕞",xM="∓",CM="𝓂",TM="ℳ",MM="∾",OM="Μ",SM="μ",EM="⊸",NM="⊸",DM="∇",AM="Ń",LM="ń",IM="∠⃒",RM="≉",jM="⩰̸",BM="≋̸",PM="ʼn",VM="≉",FM="♮",HM="ℕ",zM="♮",_M=" ",qM="≎̸",$M="≏̸",UM="⩃",WM="Ň",JM="ň",KM="Ņ",GM="ņ",XM="≇",ZM="⩭̸",QM="⩂",YM="Н",eO="н",tO="–",nO="⤤",aO="↗",lO="⇗",oO="↗",rO="≠",iO="≐̸",cO="",uO="",sO="",dO="",pO="≢",hO="⤨",fO="≂̸",mO="≫",vO="≪",bO="\n",gO="∄",yO="∄",wO="𝔑",kO="𝔫",xO="≧̸",CO="≱",TO="≱",MO="≧̸",OO="⩾̸",SO="⩾̸",EO="⋙̸",NO="≵",DO="≫⃒",AO="≯",LO="≯",IO="≫̸",RO="↮",jO="⇎",BO="⫲",PO="∋",VO="⋼",FO="⋺",HO="∋",zO="Њ",_O="њ",qO="↚",$O="⇍",UO="‥",WO="≦̸",JO="≰",KO="↚",GO="⇍",XO="↮",ZO="⇎",QO="≰",YO="≦̸",eS="⩽̸",tS="⩽̸",nS="≮",aS="⋘̸",lS="≴",oS="≪⃒",rS="≮",iS="⋪",cS="⋬",uS="≪̸",sS="∤",dS="",pS=" ",hS="𝕟",fS="ℕ",mS="⫬",vS="¬",bS="≢",gS="≭",yS="∦",wS="∉",kS="≠",xS="≂̸",CS="∄",TS="≯",MS="≱",OS="≧̸",SS="≫̸",ES="≹",NS="⩾̸",DS="≵",AS="≎̸",LS="≏̸",IS="∉",RS="⋵̸",jS="⋹̸",BS="∉",PS="⋷",VS="⋶",FS="⧏̸",HS="⋪",zS="⋬",_S="≮",qS="≰",$S="≸",US="≪̸",WS="⩽̸",JS="≴",KS="⪢̸",GS="⪡̸",XS="∌",ZS="∌",QS="⋾",YS="⋽",eE="⊀",tE="⪯̸",nE="⋠",aE="∌",lE="⧐̸",oE="⋫",rE="⋭",iE="⊏̸",cE="⋢",uE="⊐̸",sE="⋣",dE="⊂⃒",pE="⊈",hE="⊁",fE="⪰̸",mE="⋡",vE="≿̸",bE="⊃⃒",gE="⊉",yE="≁",wE="≄",kE="≇",xE="≉",CE="∤",TE="∦",ME="∦",OE="⫽⃥",SE="∂̸",EE="⨔",NE="⊀",DE="⋠",AE="⊀",LE="⪯̸",IE="⪯̸",RE="⤳̸",jE="↛",BE="⇏",PE="↝̸",VE="↛",FE="⇏",HE="⋫",zE="⋭",_E="⊁",qE="⋡",$E="⪰̸",UE="𝒩",WE="𝓃",JE="∤",KE="∦",GE="≁",XE="≄",ZE="≄",QE="∤",YE="∦",eN="⋢",tN="⋣",nN="⊄",aN="⫅̸",lN="⊈",oN="⊂⃒",rN="⊈",iN="⫅̸",cN="⊁",uN="⪰̸",sN="⊅",dN="⫆̸",pN="⊉",hN="⊃⃒",fN="⊉",mN="⫆̸",vN="≹",bN="Ñ",gN="ñ",yN="≸",wN="⋪",kN="⋬",xN="⋫",CN="⋭",TN="Ν",MN="ν",ON="#",SN="№",EN=" ",NN="≍⃒",DN="⊬",AN="⊭",LN="⊮",IN="⊯",RN="≥⃒",jN=">⃒",BN="⤄",PN="⧞",VN="⤂",FN="≤⃒",HN="<⃒",zN="⊴⃒",_N="⤃",qN="⊵⃒",$N="∼⃒",UN="⤣",WN="↖",JN="⇖",KN="↖",GN="⤧",XN="Ó",ZN="ó",QN="⊛",YN="Ô",eD="ô",tD="⊚",nD="О",aD="о",lD="⊝",oD="Ő",rD="ő",iD="⨸",cD="⊙",uD="⦼",sD="Œ",dD="œ",pD="⦿",hD="𝔒",fD="𝔬",mD="˛",vD="Ò",bD="ò",gD="⧁",yD="⦵",wD="Ω",kD="∮",xD="↺",CD="⦾",TD="⦻",MD="‾",OD="⧀",SD="Ō",ED="ō",ND="Ω",DD="ω",AD="Ο",LD="ο",ID="⦶",RD="⊖",jD="𝕆",BD="𝕠",PD="⦷",VD="“",FD="‘",HD="⦹",zD="⊕",_D="↻",qD="⩔",$D="∨",UD="⩝",WD="ℴ",JD="ℴ",KD="ª",GD="º",XD="⊶",ZD="⩖",QD="⩗",YD="⩛",eA="Ⓢ",tA="𝒪",nA="ℴ",aA="Ø",lA="ø",oA="⊘",rA="Õ",iA="õ",cA="⨶",uA="⨷",sA="⊗",dA="Ö",pA="ö",hA="⌽",fA="‾",mA="⏞",vA="⎴",bA="⏜",gA="¶",yA="∥",wA="∥",kA="⫳",xA="⫽",CA="∂",TA="∂",MA="П",OA="п",SA="%",EA=".",NA="‰",DA="⊥",AA="‱",LA="𝔓",IA="𝔭",RA="Φ",jA="φ",BA="ϕ",PA="ℳ",VA="☎",FA="Π",HA="π",zA="⋔",_A="ϖ",qA="ℏ",$A="ℎ",UA="ℏ",WA="⨣",JA="⊞",KA="⨢",GA="+",XA="∔",ZA="⨥",QA="⩲",YA="±",eL="±",tL="⨦",nL="⨧",aL="±",lL="ℌ",oL="⨕",rL="𝕡",iL="ℙ",cL="£",uL="⪷",sL="⪻",dL="≺",pL="≼",hL="⪷",fL="≺",mL="≼",vL="≺",bL="⪯",gL="≼",yL="≾",wL="⪯",kL="⪹",xL="⪵",CL="⋨",TL="⪯",ML="⪳",OL="≾",SL="′",EL="″",NL="ℙ",DL="⪹",AL="⪵",LL="⋨",IL="∏",RL="∏",jL="⌮",BL="⌒",PL="⌓",VL="∝",FL="∝",HL="∷",zL="∝",_L="≾",qL="⊰",$L="𝒫",UL="𝓅",WL="Ψ",JL="ψ",KL=" ",GL="𝔔",XL="𝔮",ZL="⨌",QL="𝕢",YL="ℚ",eI="⁗",tI="𝒬",nI="𝓆",aI="ℍ",lI="⨖",oI="?",rI="≟",iI='"',cI='"',uI="⇛",sI="∽̱",dI="Ŕ",pI="ŕ",hI="√",fI="⦳",mI="⟩",vI="⟫",bI="⦒",gI="⦥",yI="⟩",wI="»",kI="⥵",xI="⇥",CI="⤠",TI="⤳",MI="→",OI="↠",SI="⇒",EI="⤞",NI="↪",DI="↬",AI="⥅",LI="⥴",II="⤖",RI="↣",jI="↝",BI="⤚",PI="⤜",VI="∶",FI="ℚ",HI="⤍",zI="⤏",_I="⤐",qI="❳",$I="}",UI="]",WI="⦌",JI="⦎",KI="⦐",GI="Ř",XI="ř",ZI="Ŗ",QI="ŗ",YI="⌉",eR="}",tR="Р",nR="р",aR="⤷",lR="⥩",oR="”",rR="”",iR="↳",cR="ℜ",uR="ℛ",sR="ℜ",dR="ℝ",pR="ℜ",hR="▭",fR="®",mR="®",vR="∋",bR="⇋",gR="⥯",yR="⥽",wR="⌋",kR="𝔯",xR="ℜ",CR="⥤",TR="⇁",MR="⇀",OR="⥬",SR="Ρ",ER="ρ",NR="ϱ",DR="⟩",AR="⇥",LR="→",IR="→",RR="⇒",jR="⇄",BR="↣",PR="⌉",VR="⟧",FR="⥝",HR="⥕",zR="⇂",_R="⌋",qR="⇁",$R="⇀",UR="⇄",WR="⇌",JR="⇉",KR="↝",GR="↦",XR="⊢",ZR="⥛",QR="⋌",YR="⧐",ej="⊳",tj="⊵",nj="⥏",aj="⥜",lj="⥔",oj="↾",rj="⥓",ij="⇀",cj="˚",uj="≓",sj="⇄",dj="⇌",pj="",hj="⎱",fj="⎱",mj="⫮",vj="⟭",bj="⇾",gj="⟧",yj="⦆",wj="𝕣",kj="ℝ",xj="⨮",Cj="⨵",Tj="⥰",Mj=")",Oj="⦔",Sj="⨒",Ej="⇉",Nj="⇛",Dj="›",Aj="𝓇",Lj="ℛ",Ij="↱",Rj="↱",jj="]",Bj="’",Pj="’",Vj="⋌",Fj="⋊",Hj="▹",zj="⊵",_j="▸",qj="⧎",$j="⧴",Uj="⥨",Wj="℞",Jj="Ś",Kj="ś",Gj="‚",Xj="⪸",Zj="Š",Qj="š",Yj="⪼",eB="≻",tB="≽",nB="⪰",aB="⪴",lB="Ş",oB="ş",rB="Ŝ",iB="ŝ",cB="⪺",uB="⪶",sB="⋩",dB="⨓",pB="≿",hB="С",fB="с",mB="⊡",vB="⋅",bB="⩦",gB="⤥",yB="↘",wB="⇘",kB="↘",xB="§",CB=";",TB="⤩",MB="∖",OB="∖",SB="✶",EB="𝔖",NB="𝔰",DB="⌢",AB="♯",LB="Щ",IB="щ",RB="Ш",jB="ш",BB="↓",PB="←",VB="∣",FB="∥",HB="→",zB="↑",_B="",qB="Σ",$B="σ",UB="ς",WB="ς",JB="∼",KB="⩪",GB="≃",XB="≃",ZB="⪞",QB="⪠",YB="⪝",eP="⪟",tP="≆",nP="⨤",aP="⥲",lP="←",oP="∘",rP="∖",iP="⨳",cP="⧤",uP="∣",sP="⌣",dP="⪪",pP="⪬",hP="⪬︀",fP="Ь",mP="ь",vP="⌿",bP="⧄",gP="/",yP="𝕊",wP="𝕤",kP="♠",xP="♠",CP="∥",TP="⊓",MP="⊓︀",OP="⊔",SP="⊔︀",EP="√",NP="⊏",DP="⊑",AP="⊏",LP="⊑",IP="⊐",RP="⊒",jP="⊐",BP="⊒",PP="□",VP="□",FP="⊓",HP="⊏",zP="⊑",_P="⊐",qP="⊒",$P="⊔",UP="▪",WP="□",JP="▪",KP="→",GP="𝒮",XP="𝓈",ZP="∖",QP="⌣",YP="⋆",eV="⋆",tV="☆",nV="★",aV="ϵ",lV="ϕ",oV="¯",rV="⊂",iV="⋐",cV="⪽",uV="⫅",sV="⊆",dV="⫃",pV="⫁",hV="⫋",fV="⊊",mV="⪿",vV="⥹",bV="⊂",gV="⋐",yV="⊆",wV="⫅",kV="⊆",xV="⊊",CV="⫋",TV="⫇",MV="⫕",OV="⫓",SV="⪸",EV="≻",NV="≽",DV="≻",AV="⪰",LV="≽",IV="≿",RV="⪰",jV="⪺",BV="⪶",PV="⋩",VV="≿",FV="∋",HV="∑",zV="∑",_V="♪",qV="¹",$V="²",UV="³",WV="⊃",JV="⋑",KV="⪾",GV="⫘",XV="⫆",ZV="⊇",QV="⫄",YV="⊃",eF="⊇",tF="⟉",nF="⫗",aF="⥻",lF="⫂",oF="⫌",rF="⊋",iF="⫀",cF="⊃",uF="⋑",sF="⊇",dF="⫆",pF="⊋",hF="⫌",fF="⫈",mF="⫔",vF="⫖",bF="⤦",gF="↙",yF="⇙",wF="↙",kF="⤪",xF="ß",CF="\t",TF="⌖",MF="Τ",OF="τ",SF="⎴",EF="Ť",NF="ť",DF="Ţ",AF="ţ",LF="Т",IF="т",RF="⃛",jF="⌕",BF="𝔗",PF="𝔱",VF="∴",FF="∴",HF="∴",zF="Θ",_F="θ",qF="ϑ",$F="ϑ",UF="≈",WF="∼",JF=" ",KF=" ",GF=" ",XF="≈",ZF="∼",QF="Þ",YF="þ",eH="˜",tH="∼",nH="≃",aH="≅",lH="≈",oH="⨱",rH="⊠",iH="×",cH="⨰",uH="∭",sH="⤨",dH="⌶",pH="⫱",hH="⊤",fH="𝕋",mH="𝕥",vH="⫚",bH="⤩",gH="‴",yH="™",wH="™",kH="▵",xH="▿",CH="◃",TH="⊴",MH="≜",OH="▹",SH="⊵",EH="◬",NH="≜",DH="⨺",AH="⃛",LH="⨹",IH="⧍",RH="⨻",jH="⏢",BH="𝒯",PH="𝓉",VH="Ц",FH="ц",HH="Ћ",zH="ћ",_H="Ŧ",qH="ŧ",$H="≬",UH="↞",WH="↠",JH="Ú",KH="ú",GH="↑",XH="↟",ZH="⇑",QH="⥉",YH="Ў",ez="ў",tz="Ŭ",nz="ŭ",az="Û",lz="û",oz="У",rz="у",iz="⇅",cz="Ű",uz="ű",sz="⥮",dz="⥾",pz="𝔘",hz="𝔲",fz="Ù",mz="ù",vz="⥣",bz="↿",gz="↾",yz="▀",wz="⌜",kz="⌜",xz="⌏",Cz="◸",Tz="Ū",Mz="ū",Oz="¨",Sz="_",Ez="⏟",Nz="⎵",Dz="⏝",Az="⋃",Lz="⊎",Iz="Ų",Rz="ų",jz="𝕌",Bz="𝕦",Pz="⤒",Vz="↑",Fz="↑",Hz="⇑",zz="⇅",_z="↕",qz="↕",$z="⇕",Uz="⥮",Wz="↿",Jz="↾",Kz="⊎",Gz="↖",Xz="↗",Zz="υ",Qz="ϒ",Yz="ϒ",e_="Υ",t_="υ",n_="↥",a_="⊥",l_="⇈",o_="⌝",r_="⌝",i_="⌎",c_="Ů",u_="ů",s_="◹",d_="𝒰",p_="𝓊",h_="⋰",f_="Ũ",m_="ũ",v_="▵",b_="▴",g_="⇈",y_="Ü",w_="ü",k_="⦧",x_="⦜",C_="ϵ",T_="ϰ",M_="∅",O_="ϕ",S_="ϖ",E_="∝",N_="↕",D_="⇕",A_="ϱ",L_="ς",I_="⊊︀",R_="⫋︀",j_="⊋︀",B_="⫌︀",P_="ϑ",V_="⊲",F_="⊳",H_="⫨",z_="⫫",__="⫩",q_="В",$_="в",U_="⊢",W_="⊨",J_="⊩",K_="⊫",G_="⫦",X_="⊻",Z_="∨",Q_="⋁",Y_="≚",eq="⋮",tq="|",nq="‖",aq="|",lq="‖",oq="∣",rq="|",iq="❘",cq="≀",uq=" ",sq="𝔙",dq="𝔳",pq="⊲",hq="⊂⃒",fq="⊃⃒",mq="𝕍",vq="𝕧",bq="∝",gq="⊳",yq="𝒱",wq="𝓋",kq="⫋︀",xq="⊊︀",Cq="⫌︀",Tq="⊋︀",Mq="⊪",Oq="⦚",Sq="Ŵ",Eq="ŵ",Nq="⩟",Dq="∧",Aq="⋀",Lq="≙",Iq="℘",Rq="𝔚",jq="𝔴",Bq="𝕎",Pq="𝕨",Vq="℘",Fq="≀",Hq="≀",zq="𝒲",_q="𝓌",qq="⋂",$q="◯",Uq="⋃",Wq="▽",Jq="𝔛",Kq="𝔵",Gq="⟷",Xq="⟺",Zq="Ξ",Qq="ξ",Yq="⟵",e$="⟸",t$="⟼",n$="⋻",a$="⨀",l$="𝕏",o$="𝕩",r$="⨁",i$="⨂",c$="⟶",u$="⟹",s$="𝒳",d$="𝓍",p$="⨆",h$="⨄",f$="△",m$="⋁",v$="⋀",b$="Ý",g$="ý",y$="Я",w$="я",k$="Ŷ",x$="ŷ",C$="Ы",T$="ы",M$="¥",O$="𝔜",S$="𝔶",E$="Ї",N$="ї",D$="𝕐",A$="𝕪",L$="𝒴",I$="𝓎",R$="Ю",j$="ю",B$="ÿ",P$="Ÿ",V$="Ź",F$="ź",H$="Ž",z$="ž",_$="З",q$="з",$$="Ż",U$="ż",W$="ℨ",J$="",K$="Ζ",G$="ζ",X$="𝔷",Z$="ℨ",Q$="Ж",Y$="ж",eU="⇝",tU="𝕫",nU="ℤ",aU="𝒵",lU="𝓏",oU="",rU="",iU={Aacute:qo,aacute:$o,Abreve:Uo,abreve:Wo,ac:Jo,acd:Ko,acE:Go,Acirc:Xo,acirc:Zo,acute:Qo,Acy:Yo,acy:er,AElig:tr,aelig:nr,af:ar,Afr:lr,afr:or,Agrave:rr,agrave:ir,alefsym:cr,aleph:ur,Alpha:sr,alpha:dr,Amacr:pr,amacr:hr,amalg:fr,amp:mr,AMP:vr,andand:br,And:gr,and:yr,andd:wr,andslope:kr,andv:xr,ang:Cr,ange:Tr,angle:Mr,angmsdaa:Or,angmsdab:Sr,angmsdac:Er,angmsdad:Nr,angmsdae:Dr,angmsdaf:Ar,angmsdag:Lr,angmsdah:Ir,angmsd:Rr,angrt:jr,angrtvb:Br,angrtvbd:Pr,angsph:Vr,angst:Fr,angzarr:Hr,Aogon:zr,aogon:_r,Aopf:qr,aopf:$r,apacir:Ur,ap:Wr,apE:Jr,ape:Kr,apid:Gr,apos:Xr,ApplyFunction:Zr,approx:Qr,approxeq:Yr,Aring:ei,aring:ti,Ascr:ni,ascr:ai,Assign:li,ast:oi,asymp:ri,asympeq:ii,Atilde:ci,atilde:ui,Auml:si,auml:di,awconint:pi,awint:hi,backcong:fi,backepsilon:mi,backprime:vi,backsim:bi,backsimeq:gi,Backslash:yi,Barv:wi,barvee:ki,barwed:xi,Barwed:Ci,barwedge:Ti,bbrk:Mi,bbrktbrk:Oi,bcong:Si,Bcy:Ei,bcy:Ni,bdquo:Di,becaus:Ai,because:Li,Because:Ii,bemptyv:Ri,bepsi:ji,bernou:Bi,Bernoullis:Pi,Beta:Vi,beta:Fi,beth:Hi,between:zi,Bfr:_i,bfr:qi,bigcap:$i,bigcirc:Ui,bigcup:Wi,bigodot:Ji,bigoplus:Ki,bigotimes:Gi,bigsqcup:Xi,bigstar:Zi,bigtriangledown:Qi,bigtriangleup:Yi,biguplus:ec,bigvee:tc,bigwedge:nc,bkarow:ac,blacklozenge:lc,blacksquare:oc,blacktriangle:rc,blacktriangledown:ic,blacktriangleleft:cc,blacktriangleright:uc,blank:sc,blk12:dc,blk14:pc,blk34:hc,block:fc,bne:mc,bnequiv:vc,bNot:bc,bnot:gc,Bopf:yc,bopf:wc,bot:kc,bottom:xc,bowtie:Cc,boxbox:Tc,boxdl:Mc,boxdL:Oc,boxDl:Sc,boxDL:Ec,boxdr:Nc,boxdR:Dc,boxDr:Ac,boxDR:Lc,boxh:Ic,boxH:Rc,boxhd:jc,boxHd:Bc,boxhD:Pc,boxHD:Vc,boxhu:Fc,boxHu:Hc,boxhU:zc,boxHU:_c,boxminus:qc,boxplus:$c,boxtimes:Uc,boxul:Wc,boxuL:Jc,boxUl:Kc,boxUL:Gc,boxur:Xc,boxuR:Zc,boxUr:Qc,boxUR:Yc,boxv:eu,boxV:tu,boxvh:nu,boxvH:au,boxVh:lu,boxVH:ou,boxvl:ru,boxvL:iu,boxVl:cu,boxVL:uu,boxvr:su,boxvR:du,boxVr:pu,boxVR:hu,bprime:fu,breve:mu,Breve:vu,brvbar:bu,bscr:gu,Bscr:yu,bsemi:wu,bsim:ku,bsime:xu,bsolb:Cu,bsol:Tu,bsolhsub:Mu,bull:Ou,bullet:Su,bump:Eu,bumpE:Nu,bumpe:Du,Bumpeq:Au,bumpeq:Lu,Cacute:Iu,cacute:Ru,capand:ju,capbrcup:Bu,capcap:Pu,cap:Vu,Cap:Fu,capcup:Hu,capdot:zu,CapitalDifferentialD:_u,caps:qu,caret:$u,caron:Uu,Cayleys:Wu,ccaps:Ju,Ccaron:Ku,ccaron:Gu,Ccedil:Xu,ccedil:Zu,Ccirc:Qu,ccirc:Yu,Cconint:es,ccups:ts,ccupssm:ns,Cdot:as,cdot:ls,cedil:os,Cedilla:rs,cemptyv:is,cent:cs,centerdot:us,CenterDot:ss,cfr:ds,Cfr:ps,CHcy:hs,chcy:fs,check:ms,checkmark:vs,Chi:bs,chi:gs,circ:ys,circeq:ws,circlearrowleft:ks,circlearrowright:xs,circledast:Cs,circledcirc:Ts,circleddash:Ms,CircleDot:Os,circledR:Ss,circledS:Es,CircleMinus:Ns,CirclePlus:Ds,CircleTimes:As,cir:Ls,cirE:Is,cire:Rs,cirfnint:js,cirmid:Bs,cirscir:Ps,ClockwiseContourIntegral:Vs,CloseCurlyDoubleQuote:Fs,CloseCurlyQuote:Hs,clubs:zs,clubsuit:_s,colon:qs,Colon:$s,Colone:Us,colone:Ws,coloneq:Js,comma:Ks,commat:Gs,comp:Xs,compfn:Zs,complement:Qs,complexes:Ys,cong:ed,congdot:td,Congruent:nd,conint:ad,Conint:ld,ContourIntegral:od,copf:rd,Copf:id,coprod:cd,Coproduct:ud,copy:sd,COPY:dd,copysr:pd,CounterClockwiseContourIntegral:hd,crarr:fd,cross:md,Cross:vd,Cscr:bd,cscr:gd,csub:yd,csube:wd,csup:kd,csupe:xd,ctdot:Cd,cudarrl:Td,cudarrr:Md,cuepr:Od,cuesc:Sd,cularr:Ed,cularrp:Nd,cupbrcap:Dd,cupcap:Ad,CupCap:Ld,cup:Id,Cup:Rd,cupcup:jd,cupdot:Bd,cupor:Pd,cups:Vd,curarr:Fd,curarrm:Hd,curlyeqprec:zd,curlyeqsucc:_d,curlyvee:qd,curlywedge:$d,curren:Ud,curvearrowleft:Wd,curvearrowright:Jd,cuvee:Kd,cuwed:Gd,cwconint:Xd,cwint:Zd,cylcty:Qd,dagger:Yd,Dagger:ep,daleth:tp,darr:np,Darr:ap,dArr:lp,dash:op,Dashv:rp,dashv:ip,dbkarow:cp,dblac:up,Dcaron:sp,dcaron:dp,Dcy:pp,dcy:hp,ddagger:fp,ddarr:mp,DD:vp,dd:bp,DDotrahd:gp,ddotseq:yp,deg:wp,Del:kp,Delta:xp,delta:Cp,demptyv:Tp,dfisht:Mp,Dfr:Op,dfr:Sp,dHar:Ep,dharl:Np,dharr:Dp,DiacriticalAcute:Ap,DiacriticalDot:Lp,DiacriticalDoubleAcute:Ip,DiacriticalGrave:Rp,DiacriticalTilde:jp,diam:Bp,diamond:Pp,Diamond:Vp,diamondsuit:Fp,diams:Hp,die:zp,DifferentialD:_p,digamma:qp,disin:$p,div:Up,divide:Wp,divideontimes:Jp,divonx:Kp,DJcy:Gp,djcy:Xp,dlcorn:Zp,dlcrop:Qp,dollar:Yp,Dopf:eh,dopf:th,Dot:nh,dot:ah,DotDot:lh,doteq:oh,doteqdot:rh,DotEqual:ih,dotminus:ch,dotplus:uh,dotsquare:sh,doublebarwedge:dh,DoubleContourIntegral:ph,DoubleDot:hh,DoubleDownArrow:fh,DoubleLeftArrow:mh,DoubleLeftRightArrow:vh,DoubleLeftTee:bh,DoubleLongLeftArrow:gh,DoubleLongLeftRightArrow:yh,DoubleLongRightArrow:wh,DoubleRightArrow:kh,DoubleRightTee:xh,DoubleUpArrow:Ch,DoubleUpDownArrow:Th,DoubleVerticalBar:Mh,DownArrowBar:Oh,downarrow:Sh,DownArrow:Eh,Downarrow:Nh,DownArrowUpArrow:Dh,DownBreve:Ah,downdownarrows:Lh,downharpoonleft:Ih,downharpoonright:Rh,DownLeftRightVector:jh,DownLeftTeeVector:Bh,DownLeftVectorBar:Ph,DownLeftVector:Vh,DownRightTeeVector:Fh,DownRightVectorBar:Hh,DownRightVector:zh,DownTeeArrow:_h,DownTee:qh,drbkarow:$h,drcorn:Uh,drcrop:Wh,Dscr:Jh,dscr:Kh,DScy:Gh,dscy:Xh,dsol:Zh,Dstrok:Qh,dstrok:Yh,dtdot:ef,dtri:tf,dtrif:nf,duarr:af,duhar:lf,dwangle:of,DZcy:rf,dzcy:cf,dzigrarr:uf,Eacute:sf,eacute:df,easter:pf,Ecaron:hf,ecaron:ff,Ecirc:mf,ecirc:vf,ecir:bf,ecolon:gf,Ecy:yf,ecy:wf,eDDot:kf,Edot:xf,edot:Cf,eDot:Tf,ee:Mf,efDot:Of,Efr:Sf,efr:Ef,eg:Nf,Egrave:Df,egrave:Af,egs:Lf,egsdot:If,el:Rf,Element:jf,elinters:Bf,ell:Pf,els:Vf,elsdot:Ff,Emacr:Hf,emacr:zf,empty:_f,emptyset:qf,EmptySmallSquare:$f,emptyv:Uf,EmptyVerySmallSquare:Wf,emsp13:Jf,emsp14:Kf,emsp:Gf,ENG:Xf,eng:Zf,ensp:Qf,Eogon:Yf,eogon:em,Eopf:tm,eopf:nm,epar:am,eparsl:lm,eplus:om,epsi:rm,Epsilon:im,epsilon:cm,epsiv:um,eqcirc:sm,eqcolon:dm,eqsim:pm,eqslantgtr:hm,eqslantless:fm,Equal:mm,equals:vm,EqualTilde:bm,equest:gm,Equilibrium:ym,equiv:wm,equivDD:km,eqvparsl:xm,erarr:Cm,erDot:Tm,escr:Mm,Escr:Om,esdot:Sm,Esim:Em,esim:Nm,Eta:Dm,eta:Am,ETH:Lm,eth:Im,Euml:Rm,euml:jm,euro:Bm,excl:Pm,exist:Vm,Exists:Fm,expectation:Hm,exponentiale:zm,ExponentialE:_m,fallingdotseq:qm,Fcy:$m,fcy:Um,female:Wm,ffilig:Jm,fflig:Km,ffllig:Gm,Ffr:Xm,ffr:Zm,filig:Qm,FilledSmallSquare:Ym,FilledVerySmallSquare:ev,fjlig:tv,flat:nv,fllig:av,fltns:lv,fnof:ov,Fopf:rv,fopf:iv,forall:cv,ForAll:uv,fork:sv,forkv:dv,Fouriertrf:pv,fpartint:hv,frac12:fv,frac13:mv,frac14:vv,frac15:bv,frac16:gv,frac18:yv,frac23:wv,frac25:kv,frac34:xv,frac35:Cv,frac38:Tv,frac45:Mv,frac56:Ov,frac58:Sv,frac78:Ev,frasl:Nv,frown:Dv,fscr:Av,Fscr:Lv,gacute:Iv,Gamma:Rv,gamma:jv,Gammad:Bv,gammad:Pv,gap:Vv,Gbreve:Fv,gbreve:Hv,Gcedil:zv,Gcirc:_v,gcirc:qv,Gcy:$v,gcy:Uv,Gdot:Wv,gdot:Jv,ge:Kv,gE:Gv,gEl:Xv,gel:Zv,geq:Qv,geqq:Yv,geqslant:eb,gescc:tb,ges:nb,gesdot:ab,gesdoto:lb,gesdotol:ob,gesl:rb,gesles:ib,Gfr:cb,gfr:ub,gg:sb,Gg:db,ggg:pb,gimel:hb,GJcy:fb,gjcy:mb,gla:vb,gl:bb,glE:gb,glj:yb,gnap:wb,gnapprox:kb,gne:xb,gnE:Cb,gneq:Tb,gneqq:Mb,gnsim:Ob,Gopf:Sb,gopf:Eb,grave:Nb,GreaterEqual:Db,GreaterEqualLess:Ab,GreaterFullEqual:Lb,GreaterGreater:Ib,GreaterLess:Rb,GreaterSlantEqual:jb,GreaterTilde:Bb,Gscr:Pb,gscr:Vb,gsim:Fb,gsime:Hb,gsiml:zb,gtcc:_b,gtcir:qb,gt:$b,GT:Ub,Gt:Wb,gtdot:Jb,gtlPar:Kb,gtquest:Gb,gtrapprox:Xb,gtrarr:Zb,gtrdot:Qb,gtreqless:Yb,gtreqqless:eg,gtrless:tg,gtrsim:ng,gvertneqq:ag,gvnE:lg,Hacek:og,hairsp:rg,half:ig,hamilt:cg,HARDcy:ug,hardcy:sg,harrcir:dg,harr:pg,hArr:hg,harrw:fg,Hat:mg,hbar:vg,Hcirc:bg,hcirc:gg,hearts:yg,heartsuit:wg,hellip:kg,hercon:xg,hfr:Cg,Hfr:Tg,HilbertSpace:Mg,hksearow:Og,hkswarow:Sg,hoarr:Eg,homtht:Ng,hookleftarrow:Dg,hookrightarrow:Ag,hopf:Lg,Hopf:Ig,horbar:Rg,HorizontalLine:jg,hscr:Bg,Hscr:Pg,hslash:Vg,Hstrok:Fg,hstrok:Hg,HumpDownHump:zg,HumpEqual:_g,hybull:qg,hyphen:$g,Iacute:Ug,iacute:Wg,ic:Jg,Icirc:Kg,icirc:Gg,Icy:Xg,icy:Zg,Idot:Qg,IEcy:Yg,iecy:ey,iexcl:ty,iff:ny,ifr:ay,Ifr:ly,Igrave:oy,igrave:ry,ii:iy,iiiint:cy,iiint:uy,iinfin:sy,iiota:dy,IJlig:py,ijlig:hy,Imacr:fy,imacr:my,image:vy,ImaginaryI:by,imagline:gy,imagpart:yy,imath:wy,Im:ky,imof:xy,imped:Cy,Implies:Ty,incare:My,in:"∈",infin:Oy,infintie:Sy,inodot:Ey,intcal:Ny,int:Dy,Int:Ay,integers:Ly,Integral:Iy,intercal:Ry,Intersection:jy,intlarhk:By,intprod:Py,InvisibleComma:Vy,InvisibleTimes:Fy,IOcy:Hy,iocy:zy,Iogon:_y,iogon:qy,Iopf:$y,iopf:Uy,Iota:Wy,iota:Jy,iprod:Ky,iquest:Gy,iscr:Xy,Iscr:Zy,isin:Qy,isindot:Yy,isinE:ew,isins:tw,isinsv:nw,isinv:aw,it:lw,Itilde:ow,itilde:rw,Iukcy:iw,iukcy:cw,Iuml:uw,iuml:sw,Jcirc:dw,jcirc:pw,Jcy:hw,jcy:fw,Jfr:mw,jfr:vw,jmath:bw,Jopf:gw,jopf:yw,Jscr:ww,jscr:kw,Jsercy:xw,jsercy:Cw,Jukcy:Tw,jukcy:Mw,Kappa:Ow,kappa:Sw,kappav:Ew,Kcedil:Nw,kcedil:Dw,Kcy:Aw,kcy:Lw,Kfr:Iw,kfr:Rw,kgreen:jw,KHcy:Bw,khcy:Pw,KJcy:Vw,kjcy:Fw,Kopf:Hw,kopf:zw,Kscr:_w,kscr:qw,lAarr:$w,Lacute:Uw,lacute:Ww,laemptyv:Jw,lagran:Kw,Lambda:Gw,lambda:Xw,lang:Zw,Lang:Qw,langd:Yw,langle:ek,lap:tk,Laplacetrf:nk,laquo:ak,larrb:lk,larrbfs:ok,larr:rk,Larr:ik,lArr:ck,larrfs:uk,larrhk:sk,larrlp:dk,larrpl:pk,larrsim:hk,larrtl:fk,latail:mk,lAtail:vk,lat:bk,late:gk,lates:yk,lbarr:wk,lBarr:kk,lbbrk:xk,lbrace:Ck,lbrack:Tk,lbrke:Mk,lbrksld:Ok,lbrkslu:Sk,Lcaron:Ek,lcaron:Nk,Lcedil:Dk,lcedil:Ak,lceil:Lk,lcub:Ik,Lcy:Rk,lcy:jk,ldca:Bk,ldquo:Pk,ldquor:Vk,ldrdhar:Fk,ldrushar:Hk,ldsh:zk,le:_k,lE:qk,LeftAngleBracket:$k,LeftArrowBar:Uk,leftarrow:Wk,LeftArrow:Jk,Leftarrow:Kk,LeftArrowRightArrow:Gk,leftarrowtail:Xk,LeftCeiling:Zk,LeftDoubleBracket:Qk,LeftDownTeeVector:Yk,LeftDownVectorBar:ex,LeftDownVector:tx,LeftFloor:nx,leftharpoondown:ax,leftharpoonup:lx,leftleftarrows:ox,leftrightarrow:rx,LeftRightArrow:ix,Leftrightarrow:cx,leftrightarrows:ux,leftrightharpoons:sx,leftrightsquigarrow:dx,LeftRightVector:px,LeftTeeArrow:hx,LeftTee:fx,LeftTeeVector:mx,leftthreetimes:vx,LeftTriangleBar:bx,LeftTriangle:gx,LeftTriangleEqual:yx,LeftUpDownVector:wx,LeftUpTeeVector:kx,LeftUpVectorBar:xx,LeftUpVector:Cx,LeftVectorBar:Tx,LeftVector:Mx,lEg:Ox,leg:Sx,leq:Ex,leqq:Nx,leqslant:Dx,lescc:Ax,les:Lx,lesdot:Ix,lesdoto:Rx,lesdotor:jx,lesg:Bx,lesges:Px,lessapprox:Vx,lessdot:Fx,lesseqgtr:Hx,lesseqqgtr:zx,LessEqualGreater:_x,LessFullEqual:qx,LessGreater:$x,lessgtr:Ux,LessLess:Wx,lesssim:Jx,LessSlantEqual:Kx,LessTilde:Gx,lfisht:Xx,lfloor:Zx,Lfr:Qx,lfr:Yx,lg:eC,lgE:tC,lHar:nC,lhard:aC,lharu:lC,lharul:oC,lhblk:rC,LJcy:iC,ljcy:cC,llarr:uC,ll:sC,Ll:dC,llcorner:pC,Lleftarrow:hC,llhard:fC,lltri:mC,Lmidot:vC,lmidot:bC,lmoustache:gC,lmoust:yC,lnap:wC,lnapprox:kC,lne:xC,lnE:CC,lneq:TC,lneqq:MC,lnsim:OC,loang:SC,loarr:EC,lobrk:NC,longleftarrow:DC,LongLeftArrow:AC,Longleftarrow:LC,longleftrightarrow:IC,LongLeftRightArrow:RC,Longleftrightarrow:jC,longmapsto:BC,longrightarrow:PC,LongRightArrow:VC,Longrightarrow:FC,looparrowleft:HC,looparrowright:zC,lopar:_C,Lopf:qC,lopf:$C,loplus:UC,lotimes:WC,lowast:JC,lowbar:KC,LowerLeftArrow:GC,LowerRightArrow:XC,loz:ZC,lozenge:QC,lozf:YC,lpar:eT,lparlt:tT,lrarr:nT,lrcorner:aT,lrhar:lT,lrhard:oT,lrm:rT,lrtri:iT,lsaquo:cT,lscr:uT,Lscr:sT,lsh:dT,Lsh:pT,lsim:hT,lsime:fT,lsimg:mT,lsqb:vT,lsquo:bT,lsquor:gT,Lstrok:yT,lstrok:wT,ltcc:kT,ltcir:xT,lt:CT,LT:TT,Lt:MT,ltdot:OT,lthree:ST,ltimes:ET,ltlarr:NT,ltquest:DT,ltri:AT,ltrie:LT,ltrif:IT,ltrPar:RT,lurdshar:jT,luruhar:BT,lvertneqq:PT,lvnE:VT,macr:FT,male:HT,malt:zT,maltese:_T,Map:"⤅",map:qT,mapsto:$T,mapstodown:UT,mapstoleft:WT,mapstoup:JT,marker:KT,mcomma:GT,Mcy:XT,mcy:ZT,mdash:QT,mDDot:YT,measuredangle:eM,MediumSpace:tM,Mellintrf:nM,Mfr:aM,mfr:lM,mho:oM,micro:rM,midast:iM,midcir:cM,mid:uM,middot:sM,minusb:dM,minus:pM,minusd:hM,minusdu:fM,MinusPlus:mM,mlcp:vM,mldr:bM,mnplus:gM,models:yM,Mopf:wM,mopf:kM,mp:xM,mscr:CM,Mscr:TM,mstpos:MM,Mu:OM,mu:SM,multimap:EM,mumap:NM,nabla:DM,Nacute:AM,nacute:LM,nang:IM,nap:RM,napE:jM,napid:BM,napos:PM,napprox:VM,natural:FM,naturals:HM,natur:zM,nbsp:_M,nbump:qM,nbumpe:$M,ncap:UM,Ncaron:WM,ncaron:JM,Ncedil:KM,ncedil:GM,ncong:XM,ncongdot:ZM,ncup:QM,Ncy:YM,ncy:eO,ndash:tO,nearhk:nO,nearr:aO,neArr:lO,nearrow:oO,ne:rO,nedot:iO,NegativeMediumSpace:cO,NegativeThickSpace:uO,NegativeThinSpace:sO,NegativeVeryThinSpace:dO,nequiv:pO,nesear:hO,nesim:fO,NestedGreaterGreater:mO,NestedLessLess:vO,NewLine:bO,nexist:gO,nexists:yO,Nfr:wO,nfr:kO,ngE:xO,nge:CO,ngeq:TO,ngeqq:MO,ngeqslant:OO,nges:SO,nGg:EO,ngsim:NO,nGt:DO,ngt:AO,ngtr:LO,nGtv:IO,nharr:RO,nhArr:jO,nhpar:BO,ni:PO,nis:VO,nisd:FO,niv:HO,NJcy:zO,njcy:_O,nlarr:qO,nlArr:$O,nldr:UO,nlE:WO,nle:JO,nleftarrow:KO,nLeftarrow:GO,nleftrightarrow:XO,nLeftrightarrow:ZO,nleq:QO,nleqq:YO,nleqslant:eS,nles:tS,nless:nS,nLl:aS,nlsim:lS,nLt:oS,nlt:rS,nltri:iS,nltrie:cS,nLtv:uS,nmid:sS,NoBreak:dS,NonBreakingSpace:pS,nopf:hS,Nopf:fS,Not:mS,not:vS,NotCongruent:bS,NotCupCap:gS,NotDoubleVerticalBar:yS,NotElement:wS,NotEqual:kS,NotEqualTilde:xS,NotExists:CS,NotGreater:TS,NotGreaterEqual:MS,NotGreaterFullEqual:OS,NotGreaterGreater:SS,NotGreaterLess:ES,NotGreaterSlantEqual:NS,NotGreaterTilde:DS,NotHumpDownHump:AS,NotHumpEqual:LS,notin:IS,notindot:RS,notinE:jS,notinva:BS,notinvb:PS,notinvc:VS,NotLeftTriangleBar:FS,NotLeftTriangle:HS,NotLeftTriangleEqual:zS,NotLess:_S,NotLessEqual:qS,NotLessGreater:$S,NotLessLess:US,NotLessSlantEqual:WS,NotLessTilde:JS,NotNestedGreaterGreater:KS,NotNestedLessLess:GS,notni:XS,notniva:ZS,notnivb:QS,notnivc:YS,NotPrecedes:eE,NotPrecedesEqual:tE,NotPrecedesSlantEqual:nE,NotReverseElement:aE,NotRightTriangleBar:lE,NotRightTriangle:oE,NotRightTriangleEqual:rE,NotSquareSubset:iE,NotSquareSubsetEqual:cE,NotSquareSuperset:uE,NotSquareSupersetEqual:sE,NotSubset:dE,NotSubsetEqual:pE,NotSucceeds:hE,NotSucceedsEqual:fE,NotSucceedsSlantEqual:mE,NotSucceedsTilde:vE,NotSuperset:bE,NotSupersetEqual:gE,NotTilde:yE,NotTildeEqual:wE,NotTildeFullEqual:kE,NotTildeTilde:xE,NotVerticalBar:CE,nparallel:TE,npar:ME,nparsl:OE,npart:SE,npolint:EE,npr:NE,nprcue:DE,nprec:AE,npreceq:LE,npre:IE,nrarrc:RE,nrarr:jE,nrArr:BE,nrarrw:PE,nrightarrow:VE,nRightarrow:FE,nrtri:HE,nrtrie:zE,nsc:_E,nsccue:qE,nsce:$E,Nscr:UE,nscr:WE,nshortmid:JE,nshortparallel:KE,nsim:GE,nsime:XE,nsimeq:ZE,nsmid:QE,nspar:YE,nsqsube:eN,nsqsupe:tN,nsub:nN,nsubE:aN,nsube:lN,nsubset:oN,nsubseteq:rN,nsubseteqq:iN,nsucc:cN,nsucceq:uN,nsup:sN,nsupE:dN,nsupe:pN,nsupset:hN,nsupseteq:fN,nsupseteqq:mN,ntgl:vN,Ntilde:bN,ntilde:gN,ntlg:yN,ntriangleleft:wN,ntrianglelefteq:kN,ntriangleright:xN,ntrianglerighteq:CN,Nu:TN,nu:MN,num:ON,numero:SN,numsp:EN,nvap:NN,nvdash:DN,nvDash:AN,nVdash:LN,nVDash:IN,nvge:RN,nvgt:jN,nvHarr:BN,nvinfin:PN,nvlArr:VN,nvle:FN,nvlt:HN,nvltrie:zN,nvrArr:_N,nvrtrie:qN,nvsim:$N,nwarhk:UN,nwarr:WN,nwArr:JN,nwarrow:KN,nwnear:GN,Oacute:XN,oacute:ZN,oast:QN,Ocirc:YN,ocirc:eD,ocir:tD,Ocy:nD,ocy:aD,odash:lD,Odblac:oD,odblac:rD,odiv:iD,odot:cD,odsold:uD,OElig:sD,oelig:dD,ofcir:pD,Ofr:hD,ofr:fD,ogon:mD,Ograve:vD,ograve:bD,ogt:gD,ohbar:yD,ohm:wD,oint:kD,olarr:xD,olcir:CD,olcross:TD,oline:MD,olt:OD,Omacr:SD,omacr:ED,Omega:ND,omega:DD,Omicron:AD,omicron:LD,omid:ID,ominus:RD,Oopf:jD,oopf:BD,opar:PD,OpenCurlyDoubleQuote:VD,OpenCurlyQuote:FD,operp:HD,oplus:zD,orarr:_D,Or:qD,or:$D,ord:UD,order:WD,orderof:JD,ordf:KD,ordm:GD,origof:XD,oror:ZD,orslope:QD,orv:YD,oS:eA,Oscr:tA,oscr:nA,Oslash:aA,oslash:lA,osol:oA,Otilde:rA,otilde:iA,otimesas:cA,Otimes:uA,otimes:sA,Ouml:dA,ouml:pA,ovbar:hA,OverBar:fA,OverBrace:mA,OverBracket:vA,OverParenthesis:bA,para:gA,parallel:yA,par:wA,parsim:kA,parsl:xA,part:CA,PartialD:TA,Pcy:MA,pcy:OA,percnt:SA,period:EA,permil:NA,perp:DA,pertenk:AA,Pfr:LA,pfr:IA,Phi:RA,phi:jA,phiv:BA,phmmat:PA,phone:VA,Pi:FA,pi:HA,pitchfork:zA,piv:_A,planck:qA,planckh:$A,plankv:UA,plusacir:WA,plusb:JA,pluscir:KA,plus:GA,plusdo:XA,plusdu:ZA,pluse:QA,PlusMinus:YA,plusmn:eL,plussim:tL,plustwo:nL,pm:aL,Poincareplane:lL,pointint:oL,popf:rL,Popf:iL,pound:cL,prap:uL,Pr:sL,pr:dL,prcue:pL,precapprox:hL,prec:fL,preccurlyeq:mL,Precedes:vL,PrecedesEqual:bL,PrecedesSlantEqual:gL,PrecedesTilde:yL,preceq:wL,precnapprox:kL,precneqq:xL,precnsim:CL,pre:TL,prE:ML,precsim:OL,prime:SL,Prime:EL,primes:NL,prnap:DL,prnE:AL,prnsim:LL,prod:IL,Product:RL,profalar:jL,profline:BL,profsurf:PL,prop:VL,Proportional:FL,Proportion:HL,propto:zL,prsim:_L,prurel:qL,Pscr:$L,pscr:UL,Psi:WL,psi:JL,puncsp:KL,Qfr:GL,qfr:XL,qint:ZL,qopf:QL,Qopf:YL,qprime:eI,Qscr:tI,qscr:nI,quaternions:aI,quatint:lI,quest:oI,questeq:rI,quot:iI,QUOT:cI,rAarr:uI,race:sI,Racute:dI,racute:pI,radic:hI,raemptyv:fI,rang:mI,Rang:vI,rangd:bI,range:gI,rangle:yI,raquo:wI,rarrap:kI,rarrb:xI,rarrbfs:CI,rarrc:TI,rarr:MI,Rarr:OI,rArr:SI,rarrfs:EI,rarrhk:NI,rarrlp:DI,rarrpl:AI,rarrsim:LI,Rarrtl:II,rarrtl:RI,rarrw:jI,ratail:BI,rAtail:PI,ratio:VI,rationals:FI,rbarr:HI,rBarr:zI,RBarr:_I,rbbrk:qI,rbrace:$I,rbrack:UI,rbrke:WI,rbrksld:JI,rbrkslu:KI,Rcaron:GI,rcaron:XI,Rcedil:ZI,rcedil:QI,rceil:YI,rcub:eR,Rcy:tR,rcy:nR,rdca:aR,rdldhar:lR,rdquo:oR,rdquor:rR,rdsh:iR,real:cR,realine:uR,realpart:sR,reals:dR,Re:pR,rect:hR,reg:fR,REG:mR,ReverseElement:vR,ReverseEquilibrium:bR,ReverseUpEquilibrium:gR,rfisht:yR,rfloor:wR,rfr:kR,Rfr:xR,rHar:CR,rhard:TR,rharu:MR,rharul:OR,Rho:SR,rho:ER,rhov:NR,RightAngleBracket:DR,RightArrowBar:AR,rightarrow:LR,RightArrow:IR,Rightarrow:RR,RightArrowLeftArrow:jR,rightarrowtail:BR,RightCeiling:PR,RightDoubleBracket:VR,RightDownTeeVector:FR,RightDownVectorBar:HR,RightDownVector:zR,RightFloor:_R,rightharpoondown:qR,rightharpoonup:$R,rightleftarrows:UR,rightleftharpoons:WR,rightrightarrows:JR,rightsquigarrow:KR,RightTeeArrow:GR,RightTee:XR,RightTeeVector:ZR,rightthreetimes:QR,RightTriangleBar:YR,RightTriangle:ej,RightTriangleEqual:tj,RightUpDownVector:nj,RightUpTeeVector:aj,RightUpVectorBar:lj,RightUpVector:oj,RightVectorBar:rj,RightVector:ij,ring:cj,risingdotseq:uj,rlarr:sj,rlhar:dj,rlm:pj,rmoustache:hj,rmoust:fj,rnmid:mj,roang:vj,roarr:bj,robrk:gj,ropar:yj,ropf:wj,Ropf:kj,roplus:xj,rotimes:Cj,RoundImplies:Tj,rpar:Mj,rpargt:Oj,rppolint:Sj,rrarr:Ej,Rrightarrow:Nj,rsaquo:Dj,rscr:Aj,Rscr:Lj,rsh:Ij,Rsh:Rj,rsqb:jj,rsquo:Bj,rsquor:Pj,rthree:Vj,rtimes:Fj,rtri:Hj,rtrie:zj,rtrif:_j,rtriltri:qj,RuleDelayed:$j,ruluhar:Uj,rx:Wj,Sacute:Jj,sacute:Kj,sbquo:Gj,scap:Xj,Scaron:Zj,scaron:Qj,Sc:Yj,sc:eB,sccue:tB,sce:nB,scE:aB,Scedil:lB,scedil:oB,Scirc:rB,scirc:iB,scnap:cB,scnE:uB,scnsim:sB,scpolint:dB,scsim:pB,Scy:hB,scy:fB,sdotb:mB,sdot:vB,sdote:bB,searhk:gB,searr:yB,seArr:wB,searrow:kB,sect:xB,semi:CB,seswar:TB,setminus:MB,setmn:OB,sext:SB,Sfr:EB,sfr:NB,sfrown:DB,sharp:AB,SHCHcy:LB,shchcy:IB,SHcy:RB,shcy:jB,ShortDownArrow:BB,ShortLeftArrow:PB,shortmid:VB,shortparallel:FB,ShortRightArrow:HB,ShortUpArrow:zB,shy:_B,Sigma:qB,sigma:$B,sigmaf:UB,sigmav:WB,sim:JB,simdot:KB,sime:GB,simeq:XB,simg:ZB,simgE:QB,siml:YB,simlE:eP,simne:tP,simplus:nP,simrarr:aP,slarr:lP,SmallCircle:oP,smallsetminus:rP,smashp:iP,smeparsl:cP,smid:uP,smile:sP,smt:dP,smte:pP,smtes:hP,SOFTcy:fP,softcy:mP,solbar:vP,solb:bP,sol:gP,Sopf:yP,sopf:wP,spades:kP,spadesuit:xP,spar:CP,sqcap:TP,sqcaps:MP,sqcup:OP,sqcups:SP,Sqrt:EP,sqsub:NP,sqsube:DP,sqsubset:AP,sqsubseteq:LP,sqsup:IP,sqsupe:RP,sqsupset:jP,sqsupseteq:BP,square:PP,Square:VP,SquareIntersection:FP,SquareSubset:HP,SquareSubsetEqual:zP,SquareSuperset:_P,SquareSupersetEqual:qP,SquareUnion:$P,squarf:UP,squ:WP,squf:JP,srarr:KP,Sscr:GP,sscr:XP,ssetmn:ZP,ssmile:QP,sstarf:YP,Star:eV,star:tV,starf:nV,straightepsilon:aV,straightphi:lV,strns:oV,sub:rV,Sub:iV,subdot:cV,subE:uV,sube:sV,subedot:dV,submult:pV,subnE:hV,subne:fV,subplus:mV,subrarr:vV,subset:bV,Subset:gV,subseteq:yV,subseteqq:wV,SubsetEqual:kV,subsetneq:xV,subsetneqq:CV,subsim:TV,subsub:MV,subsup:OV,succapprox:SV,succ:EV,succcurlyeq:NV,Succeeds:DV,SucceedsEqual:AV,SucceedsSlantEqual:LV,SucceedsTilde:IV,succeq:RV,succnapprox:jV,succneqq:BV,succnsim:PV,succsim:VV,SuchThat:FV,sum:HV,Sum:zV,sung:_V,sup1:qV,sup2:$V,sup3:UV,sup:WV,Sup:JV,supdot:KV,supdsub:GV,supE:XV,supe:ZV,supedot:QV,Superset:YV,SupersetEqual:eF,suphsol:tF,suphsub:nF,suplarr:aF,supmult:lF,supnE:oF,supne:rF,supplus:iF,supset:cF,Supset:uF,supseteq:sF,supseteqq:dF,supsetneq:pF,supsetneqq:hF,supsim:fF,supsub:mF,supsup:vF,swarhk:bF,swarr:gF,swArr:yF,swarrow:wF,swnwar:kF,szlig:xF,Tab:CF,target:TF,Tau:MF,tau:OF,tbrk:SF,Tcaron:EF,tcaron:NF,Tcedil:DF,tcedil:AF,Tcy:LF,tcy:IF,tdot:RF,telrec:jF,Tfr:BF,tfr:PF,there4:VF,therefore:FF,Therefore:HF,Theta:zF,theta:_F,thetasym:qF,thetav:$F,thickapprox:UF,thicksim:WF,ThickSpace:JF,ThinSpace:KF,thinsp:GF,thkap:XF,thksim:ZF,THORN:QF,thorn:YF,tilde:eH,Tilde:tH,TildeEqual:nH,TildeFullEqual:aH,TildeTilde:lH,timesbar:oH,timesb:rH,times:iH,timesd:cH,tint:uH,toea:sH,topbot:dH,topcir:pH,top:hH,Topf:fH,topf:mH,topfork:vH,tosa:bH,tprime:gH,trade:yH,TRADE:wH,triangle:kH,triangledown:xH,triangleleft:CH,trianglelefteq:TH,triangleq:MH,triangleright:OH,trianglerighteq:SH,tridot:EH,trie:NH,triminus:DH,TripleDot:AH,triplus:LH,trisb:IH,tritime:RH,trpezium:jH,Tscr:BH,tscr:PH,TScy:VH,tscy:FH,TSHcy:HH,tshcy:zH,Tstrok:_H,tstrok:qH,twixt:$H,twoheadleftarrow:UH,twoheadrightarrow:WH,Uacute:JH,uacute:KH,uarr:GH,Uarr:XH,uArr:ZH,Uarrocir:QH,Ubrcy:YH,ubrcy:ez,Ubreve:tz,ubreve:nz,Ucirc:az,ucirc:lz,Ucy:oz,ucy:rz,udarr:iz,Udblac:cz,udblac:uz,udhar:sz,ufisht:dz,Ufr:pz,ufr:hz,Ugrave:fz,ugrave:mz,uHar:vz,uharl:bz,uharr:gz,uhblk:yz,ulcorn:wz,ulcorner:kz,ulcrop:xz,ultri:Cz,Umacr:Tz,umacr:Mz,uml:Oz,UnderBar:Sz,UnderBrace:Ez,UnderBracket:Nz,UnderParenthesis:Dz,Union:Az,UnionPlus:Lz,Uogon:Iz,uogon:Rz,Uopf:jz,uopf:Bz,UpArrowBar:Pz,uparrow:Vz,UpArrow:Fz,Uparrow:Hz,UpArrowDownArrow:zz,updownarrow:_z,UpDownArrow:qz,Updownarrow:$z,UpEquilibrium:Uz,upharpoonleft:Wz,upharpoonright:Jz,uplus:Kz,UpperLeftArrow:Gz,UpperRightArrow:Xz,upsi:Zz,Upsi:Qz,upsih:Yz,Upsilon:e_,upsilon:t_,UpTeeArrow:n_,UpTee:a_,upuparrows:l_,urcorn:o_,urcorner:r_,urcrop:i_,Uring:c_,uring:u_,urtri:s_,Uscr:d_,uscr:p_,utdot:h_,Utilde:f_,utilde:m_,utri:v_,utrif:b_,uuarr:g_,Uuml:y_,uuml:w_,uwangle:k_,vangrt:x_,varepsilon:C_,varkappa:T_,varnothing:M_,varphi:O_,varpi:S_,varpropto:E_,varr:N_,vArr:D_,varrho:A_,varsigma:L_,varsubsetneq:I_,varsubsetneqq:R_,varsupsetneq:j_,varsupsetneqq:B_,vartheta:P_,vartriangleleft:V_,vartriangleright:F_,vBar:H_,Vbar:z_,vBarv:__,Vcy:q_,vcy:$_,vdash:U_,vDash:W_,Vdash:J_,VDash:K_,Vdashl:G_,veebar:X_,vee:Z_,Vee:Q_,veeeq:Y_,vellip:eq,verbar:tq,Verbar:nq,vert:aq,Vert:lq,VerticalBar:oq,VerticalLine:rq,VerticalSeparator:iq,VerticalTilde:cq,VeryThinSpace:uq,Vfr:sq,vfr:dq,vltri:pq,vnsub:hq,vnsup:fq,Vopf:mq,vopf:vq,vprop:bq,vrtri:gq,Vscr:yq,vscr:wq,vsubnE:kq,vsubne:xq,vsupnE:Cq,vsupne:Tq,Vvdash:Mq,vzigzag:Oq,Wcirc:Sq,wcirc:Eq,wedbar:Nq,wedge:Dq,Wedge:Aq,wedgeq:Lq,weierp:Iq,Wfr:Rq,wfr:jq,Wopf:Bq,wopf:Pq,wp:Vq,wr:Fq,wreath:Hq,Wscr:zq,wscr:_q,xcap:qq,xcirc:$q,xcup:Uq,xdtri:Wq,Xfr:Jq,xfr:Kq,xharr:Gq,xhArr:Xq,Xi:Zq,xi:Qq,xlarr:Yq,xlArr:e$,xmap:t$,xnis:n$,xodot:a$,Xopf:l$,xopf:o$,xoplus:r$,xotime:i$,xrarr:c$,xrArr:u$,Xscr:s$,xscr:d$,xsqcup:p$,xuplus:h$,xutri:f$,xvee:m$,xwedge:v$,Yacute:b$,yacute:g$,YAcy:y$,yacy:w$,Ycirc:k$,ycirc:x$,Ycy:C$,ycy:T$,yen:M$,Yfr:O$,yfr:S$,YIcy:E$,yicy:N$,Yopf:D$,yopf:A$,Yscr:L$,yscr:I$,YUcy:R$,yucy:j$,yuml:B$,Yuml:P$,Zacute:V$,zacute:F$,Zcaron:H$,zcaron:z$,Zcy:_$,zcy:q$,Zdot:$$,zdot:U$,zeetrf:W$,ZeroWidthSpace:J$,Zeta:K$,zeta:G$,zfr:X$,Zfr:Z$,ZHcy:Q$,zhcy:Y$,zigrarr:eU,zopf:tU,Zopf:nU,Zscr:aU,zscr:lU,zwj:oU,zwnj:rU},cU="Á",uU="á",sU="Â",dU="â",pU="´",hU="Æ",fU="æ",mU="À",vU="à",bU="&",gU="&",yU="Å",wU="å",kU="Ã",xU="ã",CU="Ä",TU="ä",MU="¦",OU="Ç",SU="ç",EU="¸",NU="¢",DU="©",AU="©",LU="¤",IU="°",RU="÷",jU="É",BU="é",PU="Ê",VU="ê",FU="È",HU="è",zU="Ð",_U="ð",qU="Ë",$U="ë",UU="½",WU="¼",JU="¾",KU=">",GU=">",XU="Í",ZU="í",QU="Î",YU="î",eW="¡",tW="Ì",nW="ì",aW="¿",lW="Ï",oW="ï",rW="«",iW="<",cW="<",uW="¯",sW="µ",dW="·",pW=" ",hW="¬",fW="Ñ",mW="ñ",vW="Ó",bW="ó",gW="Ô",yW="ô",wW="Ò",kW="ò",xW="ª",CW="º",TW="Ø",MW="ø",OW="Õ",SW="õ",EW="Ö",NW="ö",DW="¶",AW="±",LW="£",IW='"',RW='"',jW="»",BW="®",PW="®",VW="§",FW="",HW="¹",zW="²",_W="³",qW="ß",$W="Þ",UW="þ",WW="×",JW="Ú",KW="ú",GW="Û",XW="û",ZW="Ù",QW="ù",YW="¨",eJ="Ü",tJ="ü",nJ="Ý",aJ="ý",lJ="¥",oJ="ÿ",rJ={Aacute:cU,aacute:uU,Acirc:sU,acirc:dU,acute:pU,AElig:hU,aelig:fU,Agrave:mU,agrave:vU,amp:bU,AMP:gU,Aring:yU,aring:wU,Atilde:kU,atilde:xU,Auml:CU,auml:TU,brvbar:MU,Ccedil:OU,ccedil:SU,cedil:EU,cent:NU,copy:DU,COPY:AU,curren:LU,deg:IU,divide:RU,Eacute:jU,eacute:BU,Ecirc:PU,ecirc:VU,Egrave:FU,egrave:HU,ETH:zU,eth:_U,Euml:qU,euml:$U,frac12:UU,frac14:WU,frac34:JU,gt:KU,GT:GU,Iacute:XU,iacute:ZU,Icirc:QU,icirc:YU,iexcl:eW,Igrave:tW,igrave:nW,iquest:aW,Iuml:lW,iuml:oW,laquo:rW,lt:iW,LT:cW,macr:uW,micro:sW,middot:dW,nbsp:pW,not:hW,Ntilde:fW,ntilde:mW,Oacute:vW,oacute:bW,Ocirc:gW,ocirc:yW,Ograve:wW,ograve:kW,ordf:xW,ordm:CW,Oslash:TW,oslash:MW,Otilde:OW,otilde:SW,Ouml:EW,ouml:NW,para:DW,plusmn:AW,pound:LW,quot:IW,QUOT:RW,raquo:jW,reg:BW,REG:PW,sect:VW,shy:FW,sup1:HW,sup2:zW,sup3:_W,szlig:qW,THORN:$W,thorn:UW,times:WW,Uacute:JW,uacute:KW,Ucirc:GW,ucirc:XW,Ugrave:ZW,ugrave:QW,uml:YW,Uuml:eJ,uuml:tJ,Yacute:nJ,yacute:aJ,yen:lJ,yuml:oJ},iJ="&",cJ="'",uJ=">",sJ="<",dJ='"',pJ={amp:iJ,apos:cJ,gt:uJ,lt:sJ,quot:dJ},hJ={},fJ={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},mJ=Bo&&Bo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hJ,"__esModule",{value:!0});var vJ=mJ(fJ),bJ=String.fromCodePoint||function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};function gJ(e){return e>=55296&&e<=57343||e>1114111?"�":(e in vJ.default&&(e=vJ.default[e]),bJ(e))}hJ.default=gJ;var yJ=Bo&&Bo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_o,"__esModule",{value:!0}),_o.decodeHTML=_o.decodeHTMLStrict=_o.decodeXML=void 0;var wJ=yJ(iU),kJ=yJ(rJ),xJ=yJ(pJ),CJ=yJ(hJ),TJ=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function MJ(e){var t=SJ(e);return function(e){return String(e).replace(TJ,t)}}_o.decodeXML=MJ(xJ.default),_o.decodeHTMLStrict=MJ(wJ.default);var OJ=function(e,t){return e1?FJ(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}function zJ(e,t){return function(n){return n.replace(t,(function(t){return e[t]})).replace(VJ,HJ)}}var _J=new RegExp(LJ.source+"|"+VJ.source,"g");function qJ(e){return e.replace(_J,HJ)}function $J(e){return e.replace(LJ,HJ)}function UJ(e){return function(t){return t.replace(_J,(function(t){return e[t]||HJ(t)}))}}EJ.escape=qJ,EJ.escapeUTF8=$J,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var t=_o,n=EJ;function a(e,n){return(!n||n<=0?t.decodeXML:t.decodeHTML)(e)}function l(e,n){return(!n||n<=0?t.decodeXML:t.decodeHTMLStrict)(e)}function o(e,t){return(!t||t<=0?n.encodeXML:n.encodeHTML)(e)}e.decode=a,e.decodeStrict=l,e.encode=o;var r=EJ;Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return r.encodeXML}}),Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return r.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return r.encodeNonAsciiHTML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return r.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return r.escapeUTF8}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return r.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return r.encodeHTML}});var i=_o;Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return i.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return i.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return i.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return i.decodeXML}})}(zo);var WJ="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",JJ=92,KJ=/[\\&]/,GJ="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",XJ=new RegExp("\\\\"+GJ+"|"+WJ,"gi"),ZJ='[&<>"]',QJ=new RegExp(ZJ,"g"),YJ=function(e){return e.charCodeAt(0)===JJ?e.charAt(1):zo.decodeHTML(e)};function eK(e){return KJ.test(e)?e.replace(XJ,YJ):e}function tK(e){try{return Ho(e)}catch(t){return e}}function nK(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return e}}function aK(e){return QJ.test(e)?e.replace(QJ,nK):e}function lK(e,t){for(var n=[],a=0;a`\\x00-\\x20]+",HK="'[^']*'",zK='"[^"]*"',_K="(?:"+FK+"|"+HK+"|"+zK+")",qK="(?:\\s*=\\s*"+_K+")",$K="(?:\\s+"+VK+qK+"?)",UK="<"+PK+$K+"*\\s*/?>",WK=""+PK+"\\s*[>]",JK="\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e",KK="[<][?].*?[?][>]",GK="]*>",XK="",ZK="(?:"+UK+"|"+WK+"|"+JK+"|"+KK+"|"+GK+"|"+XK+")",QK=new RegExp("^"+ZK,"i");if(String.fromCodePoint)BK=function(e){try{return String.fromCodePoint(e)}catch(t){if(t instanceof RangeError)return String.fromCharCode(65533);throw t}};else{var YK=String.fromCharCode,eG=Math.floor;BK=function(){for(var e=[],t=0;t1114111||eG(u)!==u)return String.fromCharCode(65533);u<=65535?o.push(u):(u-=65536,n=55296+(u>>10),a=u%1024+56320,o.push(n,a)),(r+1===i||o.length>l)&&(c+=YK.apply(void 0,o),o.length=0)}return c}}var tG=BK,nG="(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+",aG="[^<\\s]*[^!.,:*_?~\\s]",lG="[\\w.+-]+@(?:[\\w-]+\\.)+[\\w-]+";function oG(e){var t=/\)+$/.exec(e);if(t){for(var n=0,a=0,l=e;ar&&d.push(jK(l.substring(r,m[0]),s(r,m[0]-1)));var g=OK("link",s.apply(void 0,m));g.appendChild(jK(b,s.apply(void 0,m))),g.destination=v,g.extendedAutolink=!0,d.push(g),r=m[1]+1}r?@\[\]\\^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\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-\u2E42\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\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/),BG=new RegExp('^(?:"('+RG+'|[^"\\x00])*"|\'('+RG+"|[^'\\x00])*'|\\(("+RG+"|[^()\\x00])*\\))"),PG=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,VG=new RegExp("^"+GJ),FG=new RegExp("^"+WJ,"i"),HG=/`+/,zG=/^`+/,_G=/\.\.\./g,qG=/--+/g,$G=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,UG=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,WG=/^ *(?:\n *)?/,JG=/^[ \t\n\x0b\x0c\x0d]/,KG=/^\s/,GG=/ *$/,XG=/^ */,ZG=/^ *(?:\n|$)/,QG=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,YG=/^[^\n`\[\]\\!<&*_'"~$]+/m,eX=function(){function e(e){this.subject="",this.delimiters=null,this.brackets=null,this.pos=0,this.lineStartNum=0,this.lineIdx=0,this.lineOffsets=[0],this.linePosOffset=0,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.options=e}return e.prototype.sourcepos=function(e,t){var n=this.linePosOffset+this.lineOffsets[this.lineIdx],a=this.lineStartNum+this.lineIdx,l=[a,e+n];return"number"===typeof t?[l,[a,t+n]]:l},e.prototype.nextLine=function(){this.lineIdx+=1,this.linePosOffset=-this.pos},e.prototype.match=function(e){var t=e.exec(this.subject.slice(this.pos));return null===t?null:(this.pos+=t.index+t[0].length,t[0])},e.prototype.peek=function(){return this.pos1){var c=dG(i);this.lineIdx+=i.length-1,this.linePosOffset=-(this.pos-c.length-n.length),r[1]=this.sourcepos(this.pos),o=i.join(" ")}var u=OK("code",r);return o.length>0&&null!==o.match(/[^ ]/)&&" "==o[0]&&" "==o[o.length-1]?u.literal=o.slice(1,o.length-1):u.literal=o,u.tickCount=n.length,e.appendChild(u),!0}return this.pos=l,e.appendChild(jK(n,this.sourcepos(t,this.pos-1))),!0},e.prototype.parseBackslash=function(e){var t,n=this.subject;this.pos+=1;var a=this.pos;return this.peek()===bG?(this.pos+=1,t=OK("linebreak",this.sourcepos(this.pos-1,this.pos)),e.appendChild(t),this.nextLine()):VG.test(n.charAt(this.pos))?(e.appendChild(jK(n.charAt(this.pos),this.sourcepos(a,this.pos))),this.pos+=1):e.appendChild(jK("\\",this.sourcepos(a,a))),!0},e.prototype.parseAutolink=function(e){var t,n,a,l=this.pos+1;return(t=this.match($G))?(n=t.slice(1,t.length-1),a=OK("link",this.sourcepos(l,this.pos)),a.destination=tK("mailto:"+n),a.title="",a.appendChild(jK(n,this.sourcepos(l+1,this.pos-1))),e.appendChild(a),!0):!!(t=this.match(UG))&&(n=t.slice(1,t.length-1),a=OK("link",this.sourcepos(l,this.pos)),a.destination=tK(n),a.title="",a.appendChild(jK(n,this.sourcepos(l+1,this.pos-1))),e.appendChild(a),!0)},e.prototype.parseHtmlTag=function(e){var t=this.pos+1,n=this.match(QK);if(null===n)return!1;var a=OK("htmlInline",this.sourcepos(t,this.pos));return a.literal=n,e.appendChild(a),!0},e.prototype.scanDelims=function(e){var t=0,n=this.pos;if(e===AG||e===LG)t++,this.pos++;else while(this.peek()===e)t++,this.pos++;if(0===t||t<2&&(e===CG||e===IG))return this.pos=n,null;var a,l=0===n?"\n":this.subject.charAt(n-1),o=this.peek();a=-1===o?"\n":tG(o);var r,i,c=KG.test(a),u=jG.test(a),s=KG.test(l),d=jG.test(l),p=!c&&(!u||s||d),h=!s&&(!d||c||u);return e===yG?(r=p&&(!h||d),i=h&&(!p||u)):e===AG||e===LG?(r=p&&!h,i=h):e===IG?(r=!c,i=!s):(r=p,i=h),this.pos=n,{numdelims:t,canOpen:r,canClose:i}},e.prototype.handleDelim=function(e,t){var n=this.scanDelims(e);if(!n)return!1;var a,l=n.numdelims,o=this.pos+1;this.pos+=l,a=e===AG?"’":e===LG?"“":this.subject.slice(o-1,this.pos);var r=jK(a,this.sourcepos(o,this.pos));return t.appendChild(r),(n.canOpen||n.canClose)&&(this.options.smart||e!==AG&&e!==LG)&&(this.delimiters={cc:e,numdelims:l,origdelims:l,node:r,previous:this.delimiters,next:null,canOpen:n.canOpen,canClose:n.canClose},this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},e.prototype.removeDelimiter=function(e){null!==e.previous&&(e.previous.next=e.next),null===e.next?this.delimiters=e.previous:e.next.previous=e.previous},e.prototype.removeDelimitersBetween=function(e,t){e.next!==t&&(e.next=t,t.previous=e)},e.prototype.processEmphasis=function(e){var t,n,a,l,o,r,i,c=!1,u=(t={},t[yG]=[e,e,e],t[gG]=[e,e,e],t[AG]=[e],t[LG]=[e],t[CG]=[e],t[IG]=[e],t);a=this.delimiters;while(null!==a&&a.previous!==e)a=a.previous;while(null!==a){var s=a.cc,d=s===yG||s===gG;if(a.canClose){n=a.previous,i=!1;while(null!==n&&n!==e&&n!==u[s][d?a.origdelims%3:0]){if(c=d&&(a.canOpen||n.canClose)&&a.origdelims%3!==0&&(n.origdelims+a.origdelims)%3===0,n.cc===a.cc&&n.canOpen&&!c){i=!0;break}n=n.previous}if(l=a,d||s===CG||s===IG)if(i){if(n){var p=a.numdelims>=2&&n.numdelims>=2?2:1,h=d?0:1;o=n.node,r=a.node;var f=d?1===p?"emph":"strong":"strike";s===IG&&(f="customInline");var m=OK(f),v=o.sourcepos[1],b=r.sourcepos[0];m.sourcepos=[[v[0],v[1]-p+1],[b[0],b[1]+p-1]],o.sourcepos[1][1]-=p,r.sourcepos[0][1]+=p,o.literal=o.literal.slice(p),r.literal=r.literal.slice(p),n.numdelims-=p,a.numdelims-=p;var g=o.next,y=void 0;while(g&&g!==r)y=g.next,g.unlink(),m.appendChild(g),g=y;if(s===IG){var w=m.firstChild,k=w.literal||"",x=k.split(/\s/)[0];m.info=x,k.length<=x.length?w.unlink():(w.sourcepos[0][1]+=x.length,w.literal=k.replace(x+" ",""))}if(o.insertAfter(m),this.removeDelimitersBetween(n,a),n.numdelims<=h&&(0===n.numdelims&&o.unlink(),this.removeDelimiter(n)),a.numdelims<=h){0===a.numdelims&&r.unlink();var C=a.next;this.removeDelimiter(a),a=C}}}else a=a.next;else s===AG?(a.node.literal="’",i&&(n.node.literal="‘"),a=a.next):s===LG&&(a.node.literal="”",i&&(n.node.literal="“"),a=a.next);i||(u[s][d?l.origdelims%3:0]=l.previous,l.canOpen||this.removeDelimiter(l))}else a=a.next}while(null!==this.delimiters&&this.delimiters!==e)this.removeDelimiter(this.delimiters)},e.prototype.parseLinkTitle=function(){var e=this.match(BG);return null===e?null:eK(e.substr(1,e.length-2))},e.prototype.parseLinkDestination=function(){var e=this.match(PG);if(null===e){if(this.peek()===TG)return null;var t=this.pos,n=0,a=void 0;while(-1!==(a=this.peek()))if(a===OG&&VG.test(this.subject.charAt(this.pos+1)))this.pos+=1,-1!==this.peek()&&(this.pos+=1);else if(a===EG)this.pos+=1,n+=1;else if(a===NG){if(n<1)break;this.pos+=1,n-=1}else{if(null!==JG.exec(tG(a)))break;this.pos+=1}return this.pos===t&&a!==NG||0!==n?null:(e=this.subject.substr(t,this.pos-t),tK(eK(e)))}return tK(eK(e.substr(1,e.length-2)))},e.prototype.parseLinkLabel=function(){var e=this.match(QG);return null===e||e.length>1001?0:e.length},e.prototype.parseOpenBracket=function(e){var t=this.pos;this.pos+=1;var n=jK("[",this.sourcepos(this.pos,this.pos));return e.appendChild(n),this.addBracket(n,t,!1),!0},e.prototype.parseBang=function(e){var t=this.pos;if(this.pos+=1,this.peek()===kG){this.pos+=1;var n=jK("![",this.sourcepos(this.pos-1,this.pos));e.appendChild(n),this.addBracket(n,t+1,!0)}else{n=jK("!",this.sourcepos(this.pos,this.pos));e.appendChild(n)}return!0},e.prototype.parseCloseBracket=function(e){var t=null,n=null,a=!1;this.pos+=1;var l=this.pos,o=this.brackets;if(null===o)return e.appendChild(jK("]",this.sourcepos(l,l))),!0;if(!o.active)return e.appendChild(jK("]",this.sourcepos(l,l))),this.removeBracket(),!0;var r=o.image,i=this.pos;this.peek()===EG&&(this.pos++,this.spnl()&&null!==(t=this.parseLinkDestination())&&this.spnl()&&(JG.test(this.subject.charAt(this.pos-1))&&(n=this.parseLinkTitle()),1)&&this.spnl()&&this.peek()===NG?(this.pos+=1,a=!0):this.pos=i);var c="";if(!a){var u=this.pos,s=this.parseLinkLabel();if(s>2?c=this.subject.slice(u,u+s):o.bracketAfter||(c=this.subject.slice(o.index,l)),0===s&&(this.pos=i),c){c=pG(c);var d=this.refMap[c];d&&(t=d.destination,n=d.title,a=!0)}}if(a){var p=OK(r?"image":"link");p.destination=t,p.title=n||"",p.sourcepos=[o.startpos,this.sourcepos(this.pos)];var h=o.node.next,f=void 0;while(h)f=h.next,h.unlink(),p.appendChild(h),h=f;if(e.appendChild(p),this.processEmphasis(o.previousDelimiter),this.removeBracket(),o.node.unlink(),!r){o=this.brackets;while(null!==o)o.image||(o.active=!1),o=o.previous}return this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:c}),!0}return this.removeBracket(),this.pos=l,e.appendChild(jK("]",this.sourcepos(l,l))),this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:c}),!0},e.prototype.addBracket=function(e,t,n){null!==this.brackets&&(this.brackets.bracketAfter=!0),this.brackets={node:e,startpos:this.sourcepos(t+(n?0:1)),previous:this.brackets,previousDelimiter:this.delimiters,index:t,image:n,active:!0}},e.prototype.removeBracket=function(){this.brackets&&(this.brackets=this.brackets.previous)},e.prototype.parseEntity=function(e){var t,n=this.pos+1;return!!(t=this.match(FG))&&(e.appendChild(jK(zo.decodeHTML(t),this.sourcepos(n,this.pos))),!0)},e.prototype.parseString=function(e){var t,n=this.pos+1;if(t=this.match(YG)){if(this.options.smart){var a=t.replace(_G,"…").replace(qG,(function(e){var t=0,n=0;return e.length%3===0?n=e.length/3:e.length%2===0?t=e.length/2:e.length%3===2?(t=1,n=(e.length-2)/3):(t=2,n=(e.length-4)/3),lK("—",n)+lK("–",t)}));e.appendChild(jK(a,this.sourcepos(n,this.pos)))}else{var l=jK(t,this.sourcepos(n,this.pos));e.appendChild(l)}return!0}return!1},e.prototype.parseNewline=function(e){this.pos+=1;var t=e.lastChild;if(t&&"text"===t.type&&" "===t.literal[t.literal.length-1]){var n=" "===t.literal[t.literal.length-2],a=t.literal.length;t.literal=t.literal.replace(GG,"");var l=a-t.literal.length;t.sourcepos[1][1]-=l,e.appendChild(OK(n?"linebreak":"softbreak",this.sourcepos(this.pos-l,this.pos)))}else e.appendChild(OK("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(XG),!0},e.prototype.parseReference=function(e,t){if(!this.options.referenceDefinition)return 0;this.subject=e.stringContent,this.pos=0;var n=null,a=this.pos,l=this.parseLinkLabel();if(0===l)return 0;var o=this.subject.substr(0,l);if(this.peek()!==DG)return this.pos=a,0;this.pos++,this.spnl();var r=this.parseLinkDestination();if(null===r)return this.pos=a,0;var i=this.pos;this.spnl(),this.pos!==i&&(n=this.parseLinkTitle()),null===n&&(n="",this.pos=i);var c=!0;if(null===this.match(ZG)&&(""===n?c=!1:(n="",this.pos=i,c=null!==this.match(ZG))),!c)return this.pos=a,0;var u=pG(o);if(""===u)return this.pos=a,0;var s=this.getReferenceDefSourcepos(e);e.sourcepos[0][0]=s[1][0]+1;var d=OK("refDef",s);return d.title=n,d.dest=r,d.label=u,e.insertBefore(d),t[u]?this.refDefCandidateMap[d.id]=d:t[u]=VZ(d),this.pos-a},e.prototype.mergeTextNodes=function(e){var t,n=[];while(t=e.next()){var a=t.entering,l=t.node;if(a&&"text"===l.type)n.push(l);else if(1===n.length)n=[];else if(n.length>1){var o=n[0],r=n[n.length-1];o.sourcepos&&r.sourcepos&&(o.sourcepos[1]=r.sourcepos[1]),o.next=r.next,o.next&&(o.next.prev=o);for(var i=1;i0&&kX(yX(n,e.offset)))e.advanceOffset(1,!0),l--;return 0},finalize:function(e,t){if(null!==t.stringContent){var n=t.stringContent,a=n.indexOf("\n"),l=n.slice(0,a),o=n.slice(a+1),r=l.match(/^(\s*)(.*)/);t.info=eK(r[2].trim()),t.literal=o,t.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},TX={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},MX={continue:function(){return 0},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},OX={continue:function(){return 0},finalize:function(e,t){var n=t.firstChild;while(n){if(gX(n)&&n.next){t.listData.tight=!1;break}var a=n.firstChild;while(a){if(gX(a)&&(n.next||a.next)){t.listData.tight=!1;break}a=a.next}n=n.next}},canContain:function(e){return"item"===e},acceptsLines:!1},SX={continue:function(e){var t=e.currentLine;return e.indented||yX(t,e.nextNonspace)!==pX?1:(e.advanceNextNonspace(),e.advanceOffset(1,!1),kX(yX(t,e.offset))&&e.advanceOffset(1,!0),0)},finalize:function(){},canContain:function(e){return"item"!==e},acceptsLines:!1},EX={continue:function(e,t){if(e.blank){if(null===t.firstChild)return 1;e.advanceNextNonspace()}else{if(!(e.indent>=t.listData.markerOffset+t.listData.padding))return 1;e.advanceOffset(t.listData.markerOffset+t.listData.padding,!0)}return 0},finalize:nX,canContain:function(e){return"item"!==e},acceptsLines:!1},NX={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},DX={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},AX={continue:function(e,t){var n=e.currentLine,a=e.indent;if(t.isFenced){var l=a<=3&&n.charAt(e.nextNonspace)===t.fenceChar&&n.slice(e.nextNonspace).match(bX);if(l&&l[0].length>=t.fenceLength)return e.lastLineLength=e.offset+a+l[0].length,e.finalize(t,e.lineNumber),2;var o=t.fenceOffset;while(o>0&&kX(yX(n,e.offset)))e.advanceOffset(1,!0),o--}else if(a>=sX)e.advanceOffset(sX,!0);else{if(!e.blank)return 1;e.advanceNextNonspace()}return 0},finalize:function(e,t){var n;if(null!==t.stringContent){if(t.isFenced){var a=t.stringContent,l=a.indexOf("\n"),o=a.slice(0,l),r=a.slice(l+1),i=o.match(/^(\s*)(.*)/);t.infoPadding=i[1].length,t.info=eK(i[2].trim()),t.literal=r}else t.literal=null===(n=t.stringContent)||void 0===n?void 0:n.replace(/(\n *)+$/,"\n");t.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},LX={continue:function(e,t){return!e.blank||6!==t.htmlBlockType&&7!==t.htmlBlockType?0:1},finalize:function(e,t){var n;t.literal=(null===(n=t.stringContent)||void 0===n?void 0:n.replace(/(\n *)+$/,""))||null,t.stringContent=null},canContain:function(){return!1},acceptsLines:!0},IX={continue:function(e){return e.blank?1:0},finalize:function(e,t){if(null!==t.stringContent){var n,a=!1;while(yX(t.stringContent,0)===mX&&(n=e.inlineParser.parseReference(t,e.refMap)))t.stringContent=t.stringContent.slice(n),a=!0;a&&wX(t.stringContent)&&t.unlink()}},canContain:function(){return!1},acceptsLines:!0},RX=TX,jX=TX,BX={document:MX,list:OX,blockQuote:SX,item:EX,heading:NX,thematicBreak:DX,codeBlock:AX,htmlBlock:LX,paragraph:IX,table:aX,tableBody:lX,tableHead:oX,tableRow:cX,tableCell:uX,tableDelimRow:rX,tableDelimCell:iX,refDef:RX,customBlock:CX,frontMatter:jX};function PX(e){for(var t=0,n=0,a=[],l=0;l=o.columns.length&&(e.ignored=!0),l.appendChild(e)})),2},_X=/^(\$\$)(\s*[a-zA-Z])+/,qX=/^(\$\$)(\s*[a-zA-Z])+.*(\$\$)/,$X=function(e){var t;if(!e.indented&&!qX.test(e.currentLine)&&(t=e.currentLine.match(_X))){var n=t[1].length;e.closeUnmatchedBlocks();var a=e.addChild("customBlock",e.nextNonspace);return a.syntaxLength=n,a.offset=e.indent,e.advanceNextNonspace(),e.advanceOffset(n,!1),2}return 0},UX=/^`{3,}(?!.*`)|^~{3,}/,WX=[/./,/^<(?:script|pre|style)(?:\s|>|$)/i,/^/,/\?>/,/>/,/\]\]>/],fZ=/^[#`~*+_=<>0-9-;$]/,mZ=/\r\n|\n|\r/;function vZ(){return OK("document",[[1,1],[0,0]])}var bZ={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},gZ=function(){function e(e){this.options=Ro(Ro({},bZ),e),this.doc=vZ(),this.tip=this.doc,this.oldtip=this.doc,this.lineNumber=0,this.offset=0,this.column=0,this.nextNonspace=0,this.nextNonspaceColumn=0,this.indent=0,this.currentLine="",this.indented=!1,this.blank=!1,this.partiallyConsumedTab=!1,this.allClosed=!0,this.lastMatchedContainer=this.doc,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.lastLineLength=0,this.lines=[],this.options.frontMatter&&(BX.frontMatter=pZ,uZ.unshift(dZ)),this.inlineParser=new eX(this.options)}return e.prototype.advanceOffset=function(e,t){void 0===t&&(t=!1);var n,a,l,o=this.currentLine;while(e>0&&(l=o[this.offset]))"\t"===l?(n=4-this.column%4,t?(this.partiallyConsumedTab=n>e,a=n>e?e:n,this.column+=a,this.offset+=this.partiallyConsumedTab?0:1,e-=a):(this.partiallyConsumedTab=!1,this.column+=n,this.offset+=1,e-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,e-=1)},e.prototype.advanceNextNonspace=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},e.prototype.findNextNonspace=function(){var e,t=this.currentLine,n=this.offset,a=this.column;while(""!==(e=t.charAt(n)))if(" "===e)n++,a++;else{if("\t"!==e)break;n++,a+=4-a%4}this.blank="\n"===e||"\r"===e||""===e,this.nextNonspace=n,this.nextNonspaceColumn=a,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=sX},e.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var e=4-this.column%4;this.tip.stringContent+=lK(" ",e)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+"\n"},e.prototype.addChild=function(e,t){while(!BX[this.tip.type].canContain(e))this.finalize(this.tip,this.lineNumber-1);var n=t+1,a=OK(e,[[this.lineNumber,n],[0,0]]);return a.stringContent="",this.tip.appendChild(a),this.tip=a,a},e.prototype.closeUnmatchedBlocks=function(){if(!this.allClosed){while(this.oldtip!==this.lastMatchedContainer){var e=this.oldtip.parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=e}this.allClosed=!0}},e.prototype.finalize=function(e,t){var n=e.parent;e.open=!1,e.sourcepos[1]=[t,this.lastLineLength],BX[e.type].finalize(this,e),this.tip=n},e.prototype.processInlines=function(e){var t,n=this.options.customParser,a=e.walker();this.inlineParser.refMap=this.refMap,this.inlineParser.refLinkCandidateMap=this.refLinkCandidateMap,this.inlineParser.refDefCandidateMap=this.refDefCandidateMap,this.inlineParser.options=this.options;while(t=a.next()){var l=t.node,o=t.entering,r=l.type;n&&n[r]&&n[r](l,{entering:o,options:this.options}),o||"paragraph"!==r&&"heading"!==r&&("tableCell"!==r||l.ignored)||this.inlineParser.parse(l)}},e.prototype.incorporateLine=function(e){var t=this.doc;this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,-1!==e.indexOf("\0")&&(e=e.replace(/\0/g,"�")),this.currentLine=e;var n,a=!0;while((n=t.lastChild)&&n.open){switch(t=n,this.findNextNonspace(),BX[t.type]["continue"](this,t)){case 0:break;case 1:a=!1;break;case 2:return void(this.lastLineLength=e.length);default:throw new Error("continue returned illegal value, must be 0, 1, or 2")}if(!a){t=t.parent;break}}this.allClosed=t===this.oldtip,this.lastMatchedContainer=t;var l="paragraph"!==t.type&&BX[t.type].acceptsLines,o=uZ.length;while(!l){if(this.findNextNonspace(),"table"!==t.type&&"tableBody"!==t.type&&"paragraph"!==t.type&&!this.indented&&!fZ.test(e.slice(this.nextNonspace))){this.advanceNextNonspace();break}var r=0;while(r=1&&t.htmlBlockType<=5&&hZ[t.htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=e.length,this.finalize(t,this.lineNumber))):this.offsett[0]?-1:e[1]t[1]?-1:0}function wZ(e,t){var n=e[0],a=e[1];return 1===yZ(a,t)?1:-1===yZ(n,t)?-1:0}function kZ(e,t){if(e.parent===t.parent&&e!==t){var n=e.next;while(n&&n!==t){for(var a=n.next,l=0,o=["parent","prev","next"];l=0;n-=1)e.prependChild(t[n])}function MZ(e,t){if(e&&e.parent&&0!==t){var n,a=e.parent.walker();a.resumeAt(e,!0);while(n=a.next()){var l=n.node,o=n.entering;o&&(l.sourcepos[0][0]+=t,l.sourcepos[1][0]+=t)}}}function OZ(e,t){var n=e[0],a=e[1];return a[0]t?-1:0}function SZ(e,t){var n=e.firstChild;while(n){var a=OZ(n.sourcepos,t);if(0===a)return n;if(-1===a)return n.prev||n;n=n.next}return e.lastChild}function EZ(e){while(e.lastChild)e=e.lastChild;return e}function NZ(e){while(e.parent&&"document"!==e.parent.type&&e.parent.sourcepos[0][0]===e.sourcepos[0][0])e=e.parent;return e}function DZ(e,t){var n=e.firstChild,a=null;while(n){var l=OZ(n.sourcepos,t);if(0===l){if(n.sourcepos[0][0]===t||!n.firstChild)return n;a=n,n=n.firstChild}else{if(-1===l)break;a=n,n=n.next}}return a?NZ(EZ(a)):null}function AZ(e,t){var n=e,a=null;while(n){var l=wZ(n.sourcepos,t);if(0===l){if(!n.firstChild)return n;a=n,n=n.firstChild}else{if(-1===l)return a;if(!n.next)return a;n=n.next}}return n}function LZ(e){return sK(e)||null}function IZ(e,t,n){if(void 0===n&&(n=null),t){var a=t.walker();while(t&&t!==n){e(t);var l=a.next();if(!l)break;t=l.node}}}function RZ(e){var t=LZ(e);if(!t)return!0;while(t&&"document"!==t.type){if(!t.parent&&!t.prev&&!t.next)return!0;t=t.parent}return!1}var jZ=/\r\n|\n|\r/;function BZ(e){var t=e.match(/^[ \t]+/);if(t&&(t[0].length>=2||/\t/.test(t[0])))return!0;var n=t?e.slice(t.length):e;return XX.test(n)||ZX.test(n)}function PZ(e){return!wX(e)&&-1!==e.indexOf("|")}function VZ(e){var t=e.id,n=e.title,a=e.sourcepos,l=e.dest;return{id:t,title:n,sourcepos:a,unlinked:!1,destination:l}}var FZ=function(){function e(e,t){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!(null===t||void 0===t?void 0:t.referenceDefinition),this.parser=new gZ(t),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},e=e||"",this.lineTexts=e.split(jZ),this.root=this.parser.parse(e,this.lineTexts)}return e.prototype.updateLineTexts=function(e,t,n){var a,l=e[0],o=e[1],r=t[0],i=t[1],c=n.split(jZ),u=c.length,s=this.lineTexts[l-1],d=this.lineTexts[r-1];c[0]=s.slice(0,o-1)+c[0],c[u-1]=c[u-1]+d.slice(i-1);var p=r-l+1;return(a=this.lineTexts).splice.apply(a,jo([l-1,p],c)),u-p},e.prototype.updateRootNodeState=function(){if(1===this.lineTexts.length&&""===this.lineTexts[0])return this.root.lastLineBlank=!0,void(this.root.sourcepos=[[1,1],[1,0]]);this.root.lastChild&&(this.root.lastLineBlank=this.root.lastChild.lastLineBlank);var e=this.lineTexts,t=e.length-1;while(""===e[t])t-=1;e.length-2>t&&(t+=1),this.root.sourcepos[1]=[t+1,e[t].length]},e.prototype.replaceRangeNodes=function(e,t,n){e?(CZ(e,n),kZ(e,t),[e.id,t.id].forEach((function(e){return dK(e)})),e.unlink()):t?(CZ(t,n),dK(t.id),t.unlink()):TZ(this.root,n)},e.prototype.getNodeRange=function(e,t){var n=SZ(this.root,e[0]),a=SZ(this.root,t[0]);return a&&a.next&&t[0]+1===a.next.sourcepos[0][0]&&(a=a.next),[n,a]},e.prototype.trigger=function(e,t){this.eventHandlerMap[e].forEach((function(e){e(t)}))},e.prototype.extendEndLine=function(e){while(""===this.lineTexts[e])e+=1;return e},e.prototype.parseRange=function(e,t,n,a){e&&e.prev&&(DK(e.prev)&&BZ(this.lineTexts[n-1])||AK(e.prev)&&PZ(this.lineTexts[n-1]))&&(e=e.prev,n=e.sourcepos[0][0]);var l=this.lineTexts.slice(n-1,a),o=this.parser.partialParseStart(n,l),r=t?t.next:this.root.firstChild,i=o.lastChild,c=i&&SK(i)&&i.open,u=i&&IK(i)&&i.open,s=i&&DK(i);while((c||u)&&r||s&&r&&("list"===r.type||r.sourcepos[0][1]>=2)){var d=this.extendEndLine(r.sourcepos[1][0]);this.parser.partialParseExtends(this.lineTexts.slice(a,d)),e||(e=t),t=r,a=d,r=r.next}this.parser.partialParseFinish();var p=xZ(o);return{newNodes:p,extStartNode:e,extEndNode:t}},e.prototype.getRemovedNodeRange=function(e,t){return!e||e&&LK(e)||t&&LK(t)?null:{id:[e.id,t.id],line:[e.sourcepos[0][0]-1,t.sourcepos[1][0]-1]}},e.prototype.markDeletedRefMap=function(e,t){var n=this;if(!mG(this.refMap)){var a=function(e){if(LK(e)){var t=n.refMap[e.label];t&&e.id===t.id&&(t.unlinked=!0)}};e&&IZ(a,e.parent,t),t&&IZ(a,t)}},e.prototype.replaceWithNewRefDefState=function(e){var t=this;if(!mG(this.refMap)){var n=function(e){if(LK(e)){var n=e.label,a=t.refMap[n];a&&!a.unlinked||(t.refMap[n]=VZ(e))}};e.forEach((function(e){IZ(n,e)}))}},e.prototype.replaceWithRefDefCandidate=function(){var e=this;mG(this.refDefCandidateMap)||hG(this.refDefCandidateMap,(function(t,n){var a=n.label,l=n.sourcepos,o=e.refMap[a];(!o||o.unlinked||o.sourcepos[0][0]>l[0][0])&&(e.refMap[a]=VZ(n))}))},e.prototype.getRangeWithRefDef=function(e,t,n,a,l){if(this.referenceDefinition&&!mG(this.refMap)){var o=SZ(this.root,e-1),r=SZ(this.root,t+1);o&&LK(o)&&o!==n&&o!==a&&(n=o,e=n.sourcepos[0][0]),r&&LK(r)&&r!==n&&r!==a&&(a=r,t=this.extendEndLine(a.sourcepos[1][0]+l))}return[n,a,e,t]},e.prototype.parse=function(e,t,n){void 0===n&&(n=0);var a=this.getNodeRange(e,t),l=a[0],o=a[1],r=l?Math.min(l.sourcepos[0][0],e[0]):e[0],i=this.extendEndLine((o?Math.max(o.sourcepos[1][0],t[0]):t[0])+n),c=this.parseRange.apply(this,this.getRangeWithRefDef(r,i,l,o,n)),u=c.newNodes,s=c.extStartNode,d=c.extEndNode,p=this.getRemovedNodeRange(s,d),h=d?d.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(s,d),this.replaceRangeNodes(s,d,u),this.replaceWithNewRefDefState(u)):this.replaceRangeNodes(s,d,u),{nodes:u,removedNodeRange:p,nextNode:h}},e.prototype.parseRefLink=function(){var e=this,t=[];return mG(this.refMap)||hG(this.refMap,(function(n,a){a.unlinked&&delete e.refMap[n],hG(e.refLinkCandidateMap,(function(a,l){var o=l.node,r=l.refLabel;r===n&&t.push(e.parse(o.sourcepos[0],o.sourcepos[1]))}))})),t},e.prototype.removeUnlinkedCandidate=function(){mG(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach((function(e){hG(e,(function(t){RZ(t)&&delete e[t]}))}))},e.prototype.editMarkdown=function(e,t,n){var a=this.updateLineTexts(e,t,n),l=this.parse(e,t,a),o=fG(l,"nextNode");MZ(l.nextNode,a),this.updateRootNodeState();var r=[o];return this.referenceDefinition&&(this.removeUnlinkedCandidate(),this.replaceWithRefDefCandidate(),r=r.concat(this.parseRefLink())),this.trigger("change",r),r},e.prototype.getLineTexts=function(){return this.lineTexts},e.prototype.getRootNode=function(){return this.root},e.prototype.findNodeAtPosition=function(e){var t=AZ(this.root,e);return t&&t!==this.root?t:null},e.prototype.findFirstNodeAtLine=function(e){return DZ(this.root,e)},e.prototype.on=function(e,t){this.eventHandlerMap[e].push(t)},e.prototype.off=function(e,t){var n=this.eventHandlerMap[e],a=n.indexOf(t);n.splice(a,1)},e.prototype.findNodeById=function(e){return LZ(e)},e.prototype.removeAllNode=function(){pK()},e}(),HZ=["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"],zZ=new RegExp("<(/?(?:"+HZ.join("|")+")[^>]*>)","ig");function _Z(e){return zZ.test(e)?e.replace(zZ,(function(e,t){return"<"+t})):e}var qZ={heading:function(e,t){var n=t.entering;return{type:n?"openTag":"closeTag",tagName:"h"+e.level,outerNewLine:!0}},text:function(e){return{type:"text",content:e.literal}},softbreak:function(e,t){var n=t.options;return{type:"html",content:n.softbreak}},linebreak:function(){return{type:"html",content:" \n"}},emph:function(e,t){var n=t.entering;return{type:n?"openTag":"closeTag",tagName:"em"}},strong:function(e,t){var n=t.entering;return{type:n?"openTag":"closeTag",tagName:"strong"}},paragraph:function(e,t){var n,a=t.entering,l=null===(n=e.parent)||void 0===n?void 0:n.parent;return l&&"list"===l.type&&l.listData.tight?null:{type:a?"openTag":"closeTag",tagName:"p",outerNewLine:!0}},thematicBreak:function(){return{type:"openTag",tagName:"hr",outerNewLine:!0,selfClose:!0}},blockQuote:function(e,t){var n=t.entering;return{type:n?"openTag":"closeTag",tagName:"blockquote",outerNewLine:!0,innerNewLine:!0}},list:function(e,t){var n=t.entering,a=e.listData,l=a.type,o=a.start,r="bullet"===l?"ul":"ol",i={};return"ol"===r&&null!==o&&1!==o&&(i.start=o.toString()),{type:n?"openTag":"closeTag",tagName:r,attributes:i,outerNewLine:!0}},item:function(e,t){var n=t.entering;return{type:n?"openTag":"closeTag",tagName:"li",outerNewLine:!0}},htmlInline:function(e,t){var n=t.options,a=n.tagFilter?_Z(e.literal):e.literal;return{type:"html",content:a}},htmlBlock:function(e,t){var n=t.options,a=n.tagFilter?_Z(e.literal):e.literal;return n.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:a},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:a,outerNewLine:!0}},code:function(e){return[{type:"openTag",tagName:"code"},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(e){var t=e.info,n=t?t.split(/\s+/):[],a=[];return n.length>0&&n[0].length>0&&a.push("language-"+aK(n[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:a},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre",outerNewLine:!0}]},link:function(e,t){var n=t.entering;if(n){var a=e,l=a.title,o=a.destination;return{type:"openTag",tagName:"a",attributes:Ro({href:aK(o)},l&&{title:aK(l)})}}return{type:"closeTag",tagName:"a"}},image:function(e,t){var n=t.getChildrenText,a=t.skipChildren,l=e,o=l.title,r=l.destination;return a(),{type:"openTag",tagName:"img",selfClose:!0,attributes:Ro({src:aK(r),alt:n(e)},o&&{title:aK(o)})}},customBlock:function(e,t,n){var a=e.info.trim().toLowerCase(),l=n[a];if(l)try{return l(e,t)}catch(o){console.warn("[@toast-ui/editor] - The error occurred when "+a+" block node was parsed in markdown renderer: "+o)}return[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"text",content:e.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},frontMatter:function(e){return[{type:"openTag",tagName:"div",outerNewLine:!0,attributes:{style:"white-space: pre; display: none;"}},{type:"text",content:e.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},customInline:function(e,t,n){var a=e,l=a.info,o=a.firstChild,r=l.trim().toLowerCase(),i=n[r],c=t.entering;if(i)try{return i(e,t)}catch(u){console.warn("[@toast-ui/editor] - The error occurred when "+r+" inline node was parsed in markdown renderer: "+u)}return c?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+l+(o?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},$Z={strike:function(e,t){var n=t.entering;return{type:n?"openTag":"closeTag",tagName:"del"}},item:function(e,t){var n=t.entering,a=e.listData,l=a.checked,o=a.task;if(n){var r={type:"openTag",tagName:"li",outerNewLine:!0};return o?[r,{type:"openTag",tagName:"input",selfClose:!0,attributes:Ro(Ro({},l&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:r}return{type:"closeTag",tagName:"li",outerNewLine:!0}},table:function(e,t){var n=t.entering;return{type:n?"openTag":"closeTag",tagName:"table",outerNewLine:!0}},tableHead:function(e,t){var n=t.entering;return{type:n?"openTag":"closeTag",tagName:"thead",outerNewLine:!0}},tableBody:function(e,t){var n=t.entering;return{type:n?"openTag":"closeTag",tagName:"tbody",outerNewLine:!0}},tableRow:function(e,t){var n=t.entering;if(n)return{type:"openTag",tagName:"tr",outerNewLine:!0};var a=[];if(e.lastChild)for(var l=e.parent.parent.columns.length,o=e.lastChild.endIdx,r=o+1;r0&&this.buffer.push(' class="'+a.join(" ")+'"'),l&&Object.keys(l).forEach((function(e){var n=l[e];t.buffer.push(" "+e+'="'+n+'"')})),e.selfClose&&this.buffer.push(" /"),this.buffer.push(">")},e.prototype.generateCloseTagString=function(e){var t=e.tagName;this.buffer.push(""+t+">")},e.prototype.addNewLine=function(){this.buffer.length&&"\n"!==dG(dG(this.buffer))&&this.buffer.push("\n")},e.prototype.addOuterNewLine=function(e){e.outerNewLine&&this.addNewLine()},e.prototype.addInnerNewLine=function(e){e.innerNewLine&&this.addNewLine()},e.prototype.renderTextNode=function(e){this.buffer.push(aK(e.content))},e.prototype.renderRawHtmlNode=function(e){this.addOuterNewLine(e),this.buffer.push(e.content),this.addOuterNewLine(e)},e.prototype.renderElementNode=function(e){"openTag"===e.type?(this.addOuterNewLine(e),this.generateOpenTagString(e),e.selfClose?this.addOuterNewLine(e):this.addInnerNewLine(e)):(this.addInnerNewLine(e),this.generateCloseTagString(e),this.addOuterNewLine(e))},e}();
/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */function KZ(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?n-1:0),l=1;l/gm),RQ=tQ(/^data-[\-\w.\u00B7-\uFFFF]/),jQ=tQ(/^aria-[\-\w]+$/),BQ=tQ(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PQ=tQ(/^(?:\w+script|data):/i),VQ=tQ(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),FQ="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function HQ(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:zQ(),t=function(e){return qQ(e)};if(t.version="2.3.3",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,a=e.document,l=e.DocumentFragment,o=e.HTMLTemplateElement,r=e.Node,i=e.Element,c=e.NodeFilter,u=e.NamedNodeMap,s=void 0===u?e.NamedNodeMap||e.MozNamedAttrMap:u,d=e.Text,p=e.Comment,h=e.DOMParser,f=e.trustedTypes,m=i.prototype,v=wQ(m,"cloneNode"),b=wQ(m,"nextSibling"),g=wQ(m,"childNodes"),y=wQ(m,"parentNode");if("function"===typeof o){var w=a.createElement("template");w.content&&w.content.ownerDocument&&(a=w.content.ownerDocument)}var k=_Q(f,n),x=k&&ee?k.createHTML(""):"",C=a,T=C.implementation,M=C.createNodeIterator,O=C.createDocumentFragment,S=C.getElementsByTagName,E=n.importNode,N={};try{N=yQ(a).documentMode?a.documentMode:{}}catch(Fe){}var D={};t.isSupported="function"===typeof y&&T&&"undefined"!==typeof T.createHTMLDocument&&9!==N;var A=LQ,L=IQ,I=RQ,R=jQ,j=PQ,B=VQ,P=BQ,V=null,F=gQ({},[].concat(HQ(kQ),HQ(xQ),HQ(CQ),HQ(MQ),HQ(SQ))),H=null,z=gQ({},[].concat(HQ(EQ),HQ(NQ),HQ(DQ),HQ(AQ))),_=null,q=null,$=!0,U=!0,W=!1,J=!1,K=!1,G=!1,X=!1,Z=!1,Q=!1,Y=!0,ee=!1,te=!0,ne=!0,ae=!1,le={},oe=null,re=gQ({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ie=null,ce=gQ({},["audio","video","img","source","image","track"]),ue=null,se=gQ({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",pe="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml",fe=he,me=!1,ve=void 0,be=["application/xhtml+xml","text/html"],ge="text/html",ye=void 0,we=null,ke=a.createElement("form"),xe=function(e){we&&we===e||(e&&"object"===("undefined"===typeof e?"undefined":FQ(e))||(e={}),e=yQ(e),V="ALLOWED_TAGS"in e?gQ({},e.ALLOWED_TAGS):F,H="ALLOWED_ATTR"in e?gQ({},e.ALLOWED_ATTR):z,ue="ADD_URI_SAFE_ATTR"in e?gQ(yQ(se),e.ADD_URI_SAFE_ATTR):se,ie="ADD_DATA_URI_TAGS"in e?gQ(yQ(ce),e.ADD_DATA_URI_TAGS):ce,oe="FORBID_CONTENTS"in e?gQ({},e.FORBID_CONTENTS):re,_="FORBID_TAGS"in e?gQ({},e.FORBID_TAGS):{},q="FORBID_ATTR"in e?gQ({},e.FORBID_ATTR):{},le="USE_PROFILES"in e&&e.USE_PROFILES,$=!1!==e.ALLOW_ARIA_ATTR,U=!1!==e.ALLOW_DATA_ATTR,W=e.ALLOW_UNKNOWN_PROTOCOLS||!1,J=e.SAFE_FOR_TEMPLATES||!1,K=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,Y=!1!==e.RETURN_DOM_IMPORT,ee=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,te=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||P,fe=e.NAMESPACE||he,ve=ve=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?ge:e.PARSER_MEDIA_TYPE,ye="application/xhtml+xml"===ve?function(e){return e}:uQ,J&&(U=!1),Q&&(Z=!0),le&&(V=gQ({},[].concat(HQ(SQ))),H=[],!0===le.html&&(gQ(V,kQ),gQ(H,EQ)),!0===le.svg&&(gQ(V,xQ),gQ(H,NQ),gQ(H,AQ)),!0===le.svgFilters&&(gQ(V,CQ),gQ(H,NQ),gQ(H,AQ)),!0===le.mathMl&&(gQ(V,MQ),gQ(H,DQ),gQ(H,AQ))),e.ADD_TAGS&&(V===F&&(V=yQ(V)),gQ(V,e.ADD_TAGS)),e.ADD_ATTR&&(H===z&&(H=yQ(H)),gQ(H,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&gQ(ue,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(oe===re&&(oe=yQ(oe)),gQ(oe,e.FORBID_CONTENTS)),ne&&(V["#text"]=!0),K&&gQ(V,["html","head","body"]),V.table&&(gQ(V,["tbody"]),delete _.tbody),eQ&&eQ(e),we=e)},Ce=gQ({},["mi","mo","mn","ms","mtext"]),Te=gQ({},["foreignobject","desc","title","annotation-xml"]),Me=gQ({},xQ);gQ(Me,CQ),gQ(Me,TQ);var Oe=gQ({},MQ);gQ(Oe,OQ);var Se=function(e){var t=y(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});var n=uQ(e.tagName),a=uQ(t.tagName);if(e.namespaceURI===pe)return t.namespaceURI===he?"svg"===n:t.namespaceURI===de?"svg"===n&&("annotation-xml"===a||Ce[a]):Boolean(Me[n]);if(e.namespaceURI===de)return t.namespaceURI===he?"math"===n:t.namespaceURI===pe?"math"===n&&Te[a]:Boolean(Oe[n]);if(e.namespaceURI===he){if(t.namespaceURI===pe&&!Te[a])return!1;if(t.namespaceURI===de&&!Ce[a])return!1;var l=gQ({},["title","style","font","a","script"]);return!Oe[n]&&(l[n]||!Me[n])}return!1},Ee=function(e){cQ(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(Fe){try{e.outerHTML=x}catch(Fe){e.remove()}}},Ne=function(e,n){try{cQ(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(Fe){cQ(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!H[e])if(Z||Q)try{Ee(n)}catch(Fe){}else try{n.setAttribute(e,"")}catch(Fe){}},De=function(e){var t=void 0,n=void 0;if(X)e=" "+e;else{var l=sQ(e,/^[\r\n\t ]+/);n=l&&l[0]}"application/xhtml+xml"===ve&&(e=''+e+"");var o=k?k.createHTML(e):e;if(fe===he)try{t=(new h).parseFromString(o,ve)}catch(Fe){}if(!t||!t.documentElement){t=T.createDocument(fe,"template",null);try{t.documentElement.innerHTML=me?"":o}catch(Fe){}}var r=t.body||t.documentElement;return e&&n&&r.insertBefore(a.createTextNode(n),r.childNodes[0]||null),fe===he?S.call(t,K?"html":"body")[0]:K?t.documentElement:r},Ae=function(e){return M.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Le=function(e){return!(e instanceof d||e instanceof p)&&!("string"===typeof e.nodeName&&"string"===typeof e.textContent&&"function"===typeof e.removeChild&&e.attributes instanceof s&&"function"===typeof e.removeAttribute&&"function"===typeof e.setAttribute&&"string"===typeof e.namespaceURI&&"function"===typeof e.insertBefore)},Ie=function(e){return"object"===("undefined"===typeof r?"undefined":FQ(r))?e instanceof r:e&&"object"===("undefined"===typeof e?"undefined":FQ(e))&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName},Re=function(e,n,a){D[e]&&rQ(D[e],(function(e){e.call(t,n,a,we)}))},je=function(e){var n=void 0;if(Re("beforeSanitizeElements",e,null),Le(e))return Ee(e),!0;if(sQ(e.nodeName,/[\u0080-\uFFFF]/))return Ee(e),!0;var a=ye(e.nodeName);if(Re("uponSanitizeElement",e,{tagName:a,allowedTags:V}),!Ie(e.firstElementChild)&&(!Ie(e.content)||!Ie(e.content.firstElementChild))&&fQ(/<[/\w]/g,e.innerHTML)&&fQ(/<[/\w]/g,e.textContent))return Ee(e),!0;if("select"===a&&fQ(/=0;--c)l.insertBefore(v(o[c],!0),b(e))}return Ee(e),!0}return e instanceof i&&!Se(e)?(Ee(e),!0):"noscript"!==a&&"noembed"!==a||!fQ(/<\/no(script|embed)/i,e.innerHTML)?(J&&3===e.nodeType&&(n=e.textContent,n=dQ(n,A," "),n=dQ(n,L," "),e.textContent!==n&&(cQ(t.removed,{element:e.cloneNode()}),e.textContent=n)),Re("afterSanitizeElements",e,null),!1):(Ee(e),!0)},Be=function(e,t,n){if(te&&("id"===t||"name"===t)&&(n in a||n in ke))return!1;if(U&&!q[t]&&fQ(I,t));else if($&&fQ(R,t));else{if(!H[t]||q[t])return!1;if(ue[t]);else if(fQ(P,dQ(n,B,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==pQ(n,"data:")||!ie[e]){if(W&&!fQ(j,dQ(n,B,"")));else if(n)return!1}else;}return!0},Pe=function(e){var n=void 0,a=void 0,l=void 0,o=void 0;Re("beforeSanitizeAttributes",e,null);var r=e.attributes;if(r){var i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};o=r.length;while(o--){n=r[o];var c=n,u=c.name,s=c.namespaceURI;if(a=hQ(n.value),l=ye(u),i.attrName=l,i.attrValue=a,i.keepAttr=!0,i.forceKeepAttr=void 0,Re("uponSanitizeAttribute",e,i),a=i.attrValue,!i.forceKeepAttr&&(Ne(u,e),i.keepAttr))if(fQ(/\/>/i,a))Ne(u,e);else{J&&(a=dQ(a,A," "),a=dQ(a,L," "));var d=ye(e.nodeName);if(Be(d,l,a))try{s?e.setAttributeNS(s,u,a):e.setAttribute(u,a),iQ(t.removed)}catch(Fe){}}}Re("afterSanitizeAttributes",e,null)}},Ve=function e(t){var n=void 0,a=Ae(t);Re("beforeSanitizeShadowDOM",t,null);while(n=a.nextNode())Re("uponSanitizeShadowNode",n,null),je(n)||(n.content instanceof l&&e(n.content),Pe(n));Re("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(a,o){var i=void 0,c=void 0,u=void 0,s=void 0,d=void 0;if(me=!a,me&&(a="\x3c!--\x3e"),"string"!==typeof a&&!Ie(a)){if("function"!==typeof a.toString)throw mQ("toString is not a function");if(a=a.toString(),"string"!==typeof a)throw mQ("dirty is not a string, aborting")}if(!t.isSupported){if("object"===FQ(e.toStaticHTML)||"function"===typeof e.toStaticHTML){if("string"===typeof a)return e.toStaticHTML(a);if(Ie(a))return e.toStaticHTML(a.outerHTML)}return a}if(G||xe(o),t.removed=[],"string"===typeof a&&(ae=!1),ae);else if(a instanceof r)i=De("\x3c!----\x3e"),c=i.ownerDocument.importNode(a,!0),1===c.nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?i=c:i.appendChild(c);else{if(!Z&&!J&&!K&&-1===a.indexOf("<"))return k&&ee?k.createHTML(a):a;if(i=De(a),!i)return Z?null:x}i&&X&&Ee(i.firstChild);var p=Ae(ae?a:i);while(u=p.nextNode())3===u.nodeType&&u===s||je(u)||(u.content instanceof l&&Ve(u.content),Pe(u),s=u);if(s=null,ae)return a;if(Z){if(Q){d=O.call(i.ownerDocument);while(i.firstChild)d.appendChild(i.firstChild)}else d=i;return Y&&(d=E.call(n,d,!0)),d}var h=K?i.outerHTML:i.innerHTML;return J&&(h=dQ(h,A," "),h=dQ(h,L," ")),k&&ee?k.createHTML(h):h},t.setConfig=function(e){xe(e),G=!0},t.clearConfig=function(){we=null,G=!1},t.isValidAttribute=function(e,t,n){we||xe({});var a=ye(e),l=ye(t);return Be(a,l,n)},t.addHook=function(e,t){"function"===typeof t&&(D[e]=D[e]||[],cQ(D[e],t))},t.removeHook=function(e){D[e]&&iQ(D[e])},t.removeHooks=function(e){D[e]&&(D[e]=[])},t.removeAllHooks=function(){D={}},t}var $Q=qQ(),UQ=["iframe","embed"],WQ=[];function JQ(e){Ae(UQ,e)&&WQ.push(e.toLowerCase())}function KQ(e,t){return $Q.sanitize(e,h({ADD_TAGS:WQ,ADD_ATTR:["rel","target","hreflang","type"],FORBID_TAGS:["input","script","textarea","form","button","select","meta","style","link","title","object","base"]},t))}function GQ(e,t){return e.literal.replace(new RegExp("(<\\s*"+t+"[^>]*>)|("+t+"\\s*[>])","ig"),"").trim()}function XQ(e){e=e.match(rn)[0];var t=e.match(new RegExp(nn,"g"));return t?t.reduce((function(e,t){var n=t.trim().split("="),a=n[0],l=n.slice(1);return l.length&&(e[a]=l.join("=").replace(/'|"/g,"").trim()),e}),{}):{}}function ZQ(e){return et(e.attributes).reduce((function(e,t){return e[t.nodeName]=t.nodeValue,e}),{})}function QQ(e,t,n,a){var l=a.getToDOMNode(t)(e),o=n(l.outerHTML),r=document.createElement("div");r.innerHTML=o,l=r.firstChild;var i=ZQ(l);return{dom:l,htmlAttrs:i}}var YQ={htmlBlock:function(e,t,n){return{atom:!0,content:"block+",group:"block",attrs:{htmlAttrs:{default:{}},childrenHTML:{default:""},htmlBlock:{default:!0}},parseDOM:[{tag:e,getAttrs:function(e){return{htmlAttrs:ZQ(e),childrenHTML:e.innerHTML}}}],toDOM:function(a){var l=QQ(a,e,t,n),o=l.dom,r=l.htmlAttrs;return r.class=r.class?r.class+" html-block":"html-block",f([e,r],et(o.childNodes))}}},htmlInline:function(e,t,n){return{attrs:{htmlAttrs:{default:{}},htmlInline:{default:!0}},parseDOM:[{tag:e,getAttrs:function(e){return{htmlAttrs:ZQ(e)}}}],toDOM:function(a){var l=QQ(a,e,t,n).htmlAttrs;return[e,l,0]}}}};function eY(e,t,n){var a={nodes:{},marks:{}};return["htmlBlock","htmlInline"].forEach((function(l){e[l]&&Object.keys(e[l]).forEach((function(e){var o="htmlBlock"===l?"nodes":"marks";JQ(e),a[o][e]=YQ[l](e,t,n)}))})),a}var tY=/^\s*<\s*\//,nY={paragraph:function(e,t){var n=t.entering,a=t.origin,l=t.options;return l.nodeId?{type:n?"openTag":"closeTag",outerNewLine:!0,tagName:"p"}:a()},softbreak:function(e){var t=e.prev&&"htmlInline"===e.prev.type,n=t&&/ /.test(e.prev.literal),a=n?"\n":" \n";return{type:"html",content:a}},item:function(e,t){var n=t.entering;if(n){var a={},l=[];return e.listData.task&&(a["data-task"]="",l.push("task-list-item"),e.listData.checked&&(l.push("checked"),a["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:l,attributes:a,outerNewLine:!0}}return{type:"closeTag",tagName:"li",outerNewLine:!0}},code:function(e){var t={"data-backticks":String(e.tickCount)};return[{type:"openTag",tagName:"code",attributes:t},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(e){var t=e,n=t.fenceLength,a=t.info,l=a?a.split(/\s+/):[],o=[],r={};if(n>3&&(r["data-backticks"]=n),l.length>0&&l[0].length>0){var i=l[0];o.push("lang-"+i),r["data-language"]=i}return[{type:"openTag",tagName:"pre",classNames:o},{type:"openTag",tagName:"code",attributes:r},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(e,t){var n=t.origin,a=t.entering,l=t.skipChildren,o=e.info;if(-1!==o.indexOf("widget")&&a){l();var r=Bt(e),i=At(o,r).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:i},{type:"closeTag",tagName:"span"}]}return n()}};function aY(e,t){var n=h({},nY);return e&&(n.link=function(t,n){var a=n.entering,l=n.origin,o=l();return a&&(o.attributes=h(h({},o.attributes),e)),o}),t&&Object.keys(t).forEach((function(e){var a=n[e],l=t[e];a&&$n(l)?n[e]=function(e,t){var n=h({},t);return n.origin=function(){return a(e,t)},l(e,n)}:Ae(["htmlBlock","htmlInline"],e)&&!$n(l)?n[e]=function(e,t){var n=e.literal.match(rn);if(n){var a=n[0],o=n[1],r=n[3],i=(o||r).toLowerCase(),c=l[i],u=GQ(e,i);if(c){var s=h({},e);return s.attrs=XQ(a),s.childrenHTML=u,s.type=i,t.entering=!tY.test(e.literal),c(s,t)}}return t.origin()}:n[e]=l})),n}var lY=["list","item","blockQuote"],oY=["UL","OL","BLOCKQUOTE"];function rY(e,t){var n,a=e.child(t);return!a.childCount||1===a.childCount&&!(null===(n=a.firstChild.text)||void 0===n?void 0:n.trim())}function iY(e,t,n){var a=it(t)-1,l=ct(t)-1,o=n[a].getBoundingClientRect(),r=n[l].offsetTop-n[a].offsetTop+n[l].clientHeight;return{height:r<=0?n[a].clientHeight:r+cY(e,n,Math.min(l+1,e.childCount-1)),rect:o}}function cY(e,t,n){var a=e.childCount-1,l=0;while(n<=a&&rY(e,n))l+=t[n].clientHeight,n+=1;return l}function uY(e,t){while(!e.getAttribute("data-nodeid")&&e.parentElement!==t)e=e.parentElement;return e}function sY(e,t){var n=0;while(e&&e!==t){if(Ae(oY,e.tagName)||(n+=e.offsetTop),e.offsetParent===t.offsetParent)break;e=e.parentElement}return n}function dY(e,t){var n=t,a=null;while(n){var l=n.firstElementChild;if(!l)break;var o=pY(l,e,sY(n,t));a=n,n=o}var r=n||a;return r===t?null:r}function pY(e,t,n){return e&&t>n+e.offsetTop?pY(e.nextElementSibling,t,n)||e:null}function hY(e,t,n,a){var l=Math.min((e-t)/n,1);return l*a}function fY(e,t){var n=e.querySelector('[data-nodeid="'+t.id+'"]');while(!n||pt(t))t=t.parent,n=e.querySelector('[data-nodeid="'+t.id+'"]');return mY({mdNode:t,el:n})}function mY(e){var t=e.mdNode,n=e.el;while((Ae(lY,t.type)||"table"===t.type)&&t.firstChild)t=t.firstChild,n=n.firstElementChild;return{mdNode:t,el:n}}var vY={};function bY(e,t){vY[e]=vY[e]||{},vY[e].height=t}function gY(e,t){vY[e]=vY[e]||{},vY[e].offsetTop=t}function yY(e){return vY[e]&&vY[e].height}function wY(e){return vY[e]&&vY[e].offsetTop}function kY(e){e&&(delete vY[Number(e.getAttribute("data-nodeid"))],et(e.children).forEach((function(e){kY(e)})))}function xY(e,t,n){var a=yY(n),l=wY(n),o=a||e.clientHeight,r=l||sY(e,t)||e.offsetTop;return a||bY(n,o),l||gY(n,r),{nodeHeight:o,offsetTop:r}}var CY=fn("md-preview-highlight");function TY(e,t){var n=e.firstChild;while(n&&n.next){if(ut(n.next)>t+1)break;n=n.next}return n}var MY=function(){function e(e,t){var n=document.createElement("div");this.el=n,this.eventEmitter=e,this.isViewer=!!t.isViewer,this.el.className=fn("md-preview");var a=t.linkAttributes,l=t.customHTMLRenderer,o=t.sanitizer,r=t.highlight,i=void 0!==r&&r;this.renderer=new JZ({gfm:!0,nodeId:!0,convertors:aY(a,l)}),this.cursorNodeId=null,this.sanitizer=o,this.initEvent(i),this.initContentSection(),this.isViewer&&(this.previewContent.style.overflowWrap="break-word")}return e.prototype.initContentSection=function(){this.previewContent=Tn('
'),this.isViewer||this.el.appendChild(this.previewContent)},e.prototype.toggleActive=function(e){Cn(this.el,"active",e)},e.prototype.initEvent=function(e){var t=this;this.eventEmitter.listen("updatePreview",this.update.bind(this)),this.isViewer||(e&&(this.eventEmitter.listen("changeToolbarState",(function(e){var n=e.mdNode,a=e.cursorPos;t.updateCursorNode(n,a)})),this.eventEmitter.listen("blur",(function(){t.removeHighlight()}))),Ao(this.el,"scroll",(function(e){t.eventEmitter.emit("scroll","preview",dY(e.target.scrollTop,t.previewContent))})),this.eventEmitter.listen("changePreviewTabPreview",(function(){return t.toggleActive(!0)})),this.eventEmitter.listen("changePreviewTabWrite",(function(){return t.toggleActive(!1)})))},e.prototype.removeHighlight=function(){if(this.cursorNodeId){var e=this.getElementByNodeId(this.cursorNodeId);e&&le(e,CY)}},e.prototype.updateCursorNode=function(e,t){e&&(e=yt(e,(function(e){return!gt(e)})),"tableRow"===e.type?e=TY(e,t[1]):"tableBody"===e.type&&(e=null));var n=e?e.id:null;if(this.cursorNodeId!==n){var a=this.getElementByNodeId(this.cursorNodeId),l=this.getElementByNodeId(n);a&&le(a,CY),l&&Q(l,CY),this.cursorNodeId=n}},e.prototype.getElementByNodeId=function(e){return e?this.previewContent.querySelector('[data-nodeid="'+e+'"]'):null},e.prototype.update=function(e){var t=this;e.forEach((function(e){return t.replaceRangeNodes(e)})),this.eventEmitter.emit("afterPreviewRender",this)},e.prototype.replaceRangeNodes=function(e){var t=this,n=e.nodes,a=e.removedNodeRange,l=this.previewContent,o=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(n.map((function(e){return t.renderer.render(e)})).join("")));if(a){var r=a.id,i=r[0],c=r[1],u=this.getElementByNodeId(i),s=this.getElementByNodeId(c);if(u){u.insertAdjacentHTML("beforebegin",o);var d=u;while(d&&d!==s){var p=d.nextElementSibling;kn(d),kY(d),d=p}(null===d||void 0===d?void 0:d.parentNode)&&(kn(d),kY(d))}}else l.insertAdjacentHTML("afterbegin",o)},e.prototype.getRenderer=function(){return this.renderer},e.prototype.destroy=function(){To(this.el,"scroll"),this.el=null},e.prototype.getElement=function(){return this.el},e.prototype.getHTML=function(){return this.previewContent.innerHTML},e.prototype.setHTML=function(e){this.previewContent.innerHTML=e},e.prototype.setHeight=function(e){R(this.el,{height:e+"px"})},e.prototype.setMinHeight=function(e){R(this.el,{minHeight:e+"px"})},e}();function OY(e,t){var n=e.depth;while(n){var a=e.node(n);if(t(a,n))return{node:a,depth:n,offset:n>0?e.before(n):0};n-=1}return null}function SY(e){return!!OY(e,(function(e){var t=e.type;return"listItem"===t.name||"bulletList"===t.name||"orderedList"===t.name}))}function EY(e){return!!OY(e,(function(e){var t=e.type;return"tableHeadCell"===t.name||"tableBodyCell"===t.name}))}function NY(e){return OY(e,(function(e){var t=e.type;return"listItem"===t.name}))}function DY(e){return{tag:e,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return h({},t&&{rawHTML:t})}}}function AY(e){return Object.keys(e).reduce((function(t,n){return"rawHTML"!==n&&e[n]&&(n="className"===n?"class":n,t[n]=e[n]),t}),{})}function LY(e){return{tag:e,getAttrs:function(e){return["rawHTML","colspan","rowspan","extended"].reduce((function(t,n){var a="rawHTML"===n?"data-raw-html":n,l=e.getAttribute(a);return l&&(t[n]=Ae(["rawHTML","extended"],n)?l:Number(l)),t}),{})}}}function IY(){return{htmlAttrs:{default:null},classNames:{default:null}}}function RY(e){var t=e.htmlAttrs,n=e.classNames;return h(h({},t),{class:n?n.join(" "):null})}function jY(e,t){var n=e.parent,a=e.startIndex,l=e.endIndex,o=n.contentMatchAt(a).findWrapping(t);if(o){var r=o.length?o[0]:t;return n.canReplaceWith(a,l,r)?o:null}return null}function BY(e,t){var n=e.parent,a=e.startIndex,l=e.endIndex,o=n.child(a),r=t.contentMatch.findWrapping(o.type);if(r){for(var i=r.length?r[r.length-1]:t,c=i.contentMatch,u=a;c&&u=0;h-=1)p=a["c"].from(n[h].type.create(n[h].attrs,p));e.step(new o["b"](i-(l?2:0),c,i,c,new a["j"](p,0,0),n.length,!0));var f=0;for(h=0;h=2&&o.node(i-1).type.compatibleContent(n)&&0===t.startIndex&&o.index(i-1)){var s=e.doc.resolve(t.start-2);c=new a["g"](s,s,i),t.endIndex0){var s=u.parent,d=s.child(u.startIndex-1);if(d.type!==e)return!1;var p=d.lastChild&&d.lastChild.type===s.type,h=p?a["c"].from(e.create()):null,f=new a["j"](a["c"].from(e.create(null,a["c"].from(s.type.create(null,h)))),p?3:1,0),m=u.start,v=u.end;return l.step(new o["b"](m-(p?3:1),v,m,v,f,1,!0)),n(l),!0}return!1}}function WY(e,t,n){var l=t.$from,r=t.$to,i=t.end,c=t.depth,u=t.parent,s=r.end(c);return ii;r-=1)l-=n.child(r).nodeSize,e.delete(l-1,l+1);var c=e.doc.resolve(t.start),u=c.nodeAfter,s=0===t.startIndex,d=t.endIndex===n.childCount,p=c.node(-1),h=c.index(-1),f=p.canReplace(h+(s?0:1),h+1,null===u||void 0===u?void 0:u.content.append(d?a["c"].empty:a["c"].from(n)));if(u&&f){var m=c.pos,v=m+u.nodeSize;e.step(new o["b"](m-(s?1:0),v+(d?1:0),m+1,v-1,new a["j"]((s?a["c"].empty:a["c"].from(n.copy(a["c"].empty))).append(d?a["c"].empty:a["c"].from(n.copy(a["c"].empty))),s?0:1,d?0:1),s?0:1))}return e}function KY(e){return function(t,n){var a=t.tr,l=t.selection,o=l.$from,r=l.$to,i=o.blockRange(r,(function(t){var n=t.childCount,a=t.firstChild;return!!n&&a.type===e}));if(i){var c=o.node(i.depth-1).type===e,u=c?WY(a,i,e):JY(a,i);return n(u),!0}return!1}}function GY(e){return function(t,n){var l=t.tr,i=t.selection,c=i.$from,u=i.$to;if(c.depth<2||!c.sameParent(u))return!1;var s=c.node(-1);if(s.type!==e)return!1;if(0===c.parent.content.size&&c.node(-1).childCount===c.indexAfter(-1)){if(2===c.depth||c.node(-3).type!==e||c.index(-2)!==c.node(-2).childCount-1)return!1;for(var d=c.index(-1)>0,p=a["c"].empty,h=c.depth-(d?1:2);h>=c.depth-3;h-=1)p=a["c"].from(c.node(h).copy(p));return p=p.append(a["c"].from(e.createAndFill())),l.replace(d?c.before():c.before(-1),c.after(-3),new a["j"](p,d?3:2,2)),l.setSelection(r["f"].near(l.doc.resolve(c.pos+(d?3:2)))),n(l),!0}var f=u.pos===c.end()?s.contentMatchAt(0).defaultType:null,m=f&&[null,{type:f}];return l.delete(c.pos,u.pos),!!Object(o["g"])(l.doc,c.pos,2,m)&&(l.split(c.pos,2,m),n(l),!0)}}function XY(){return function(){return function(e,t){var n=e.selection,a=e.schema,l=n.$from,o=n.$to,r=l.blockRange(o);return!(!r||!SY(l))&&UY(a.nodes.listItem)(e,t)}}}function ZY(){return function(){return function(e,t){var n=e.selection,a=e.schema,l=n.$from,o=n.$to,r=l.blockRange(o);return!(!r||!SY(l))&&KY(a.nodes.listItem)(e,t)}}}function QY(){return{indent:XY(),outdent:ZY()}}var YY=new Map,e0=function(){function e(e,t,n,a){this.table=e,this.tableRows=t,this.tableStartPos=n,this.rowInfo=a}return e.create=function(t){var n=OY(t,(function(e){var t=e.type;return"table"===t.name}));if(n){var a=n.node,l=n.depth,o=n.offset,r=YY.get(a);if((null===r||void 0===r?void 0:r.tableStartPos)===o+1)return r;var i=[],c=t.start(l),u=a.child(0),s=a.child(1),d=t0(u,c),p=t0(s,c+u.nodeSize);u.forEach((function(e){return i.push(e)})),s.forEach((function(e){return i.push(e)}));var h=new e(a,i,c,d.concat(p));return YY.set(a,h),h}return null},Object.defineProperty(e.prototype,"totalRowCount",{get:function(){return this.rowInfo.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalColumnCount",{get:function(){return this.rowInfo[0].length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tableStartOffset",{get:function(){return this.tableStartPos},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tableEndOffset",{get:function(){return this.tableStartPos+this.table.nodeSize-1},enumerable:!1,configurable:!0}),e.prototype.getCellInfo=function(e,t){return this.rowInfo[e][t]},e.prototype.posAt=function(e,t){for(var n=0,a=this.tableStartPos;;n+=1){var l=a+this.tableRows[n].nodeSize;if(n===e){var o=t;while(oe.pos)return[t,a];return[0,0]},e.prototype.getRectOffsets=function(e,t){var n,a,l;void 0===t&&(t=e),e.pos>t.pos&&(n=[t,e],e=n[0],t=n[1]);var o=this.getCellIndex(e),r=o[0],i=o[1],c=this.getCellIndex(t),u=c[0],s=c[1];return a=Ge(r,u),r=a[0],u=a[1],l=Ge(i,s),i=l[0],s=l[1],this.getSpannedOffsets({startRowIdx:r,startColIdx:i,endRowIdx:u,endColIdx:s})},e.prototype.getSpannedOffsets=function(e){return e},e}(),t0=function(e,t){var n=[];return e.forEach((function(e,a){var l={rowspanMap:{},colspanMap:{},length:0};e.forEach((function(e,n){var o=e.nodeSize,r=0;while(l[r])r+=1;l[r]={offset:t+a+n+2,nodeSize:o},l.length+=1})),n.push(l)})),n};function n0(e,t){return Ke(e0.prototype,e),t0=t,e0}function a0(e,t,n){for(var a=n.startRowIdx,l=n.startColIdx,o=n.endRowIdx,i=n.endColIdx,c=[],u=a;u<=o;u+=1)for(var s=l;s<=i;s+=1){var d=t.getCellInfo(u,s),p=d.offset,h=d.nodeSize;c.push(new r["g"](e.resolve(p+1),e.resolve(p+h-1)))}return c}function l0(e,t){var n=[];return e.childCount&&n.push(e),t.childCount&&n.push(t),a["c"].from(n)}var o0=function(e){function t(t,n){void 0===n&&(n=t);var a=this,l=t.node(0),o=e0.create(t),r=o.getRectOffsets(t,n),i=a0(l,o,r);return a=e.call(this,i[0].$from,i[0].$to,i)||this,a.startCell=t,a.endCell=n,a.offsetMap=o,a.isCellSelection=!0,a.visible=!1,a}return p(t,e),t.prototype.map=function(e,n){var a=this.startCell.pos,l=this.endCell.pos,o=e.resolve(n.map(a)),i=e.resolve(n.map(l)),c=e0.create(o);if(this.offsetMap.totalColumnCount>c.totalColumnCount||this.offsetMap.totalRowCount>c.totalRowCount){var u={tableBody:1,tableRow:2,tableCell:3,paragraph:4},s=u[i.parent.type.name],d=i.end(i.depth-s),p=Math.min(d-4,i.pos);return r["h"].create(e,p)}return new t(o,i)},t.prototype.eq=function(e){return e instanceof t&&e.startCell.pos===this.startCell.pos&&e.endCell.pos===this.endCell.pos},t.prototype.content=function(){for(var e=this.startCell.node(-2),t=this.startCell.start(-2),n=e.child(1).firstChild,l=e.child(0).type.create(),o=e.child(1).type.create(),r=e0.create(this.startCell),i=r.getRectOffsets(this.startCell,this.endCell),c=i.startRowIdx,u=i.startColIdx,s=i.endRowIdx,d=i.endColIdx,p=!1,h=c;h<=s;h+=1){for(var f=[],m=u;m<=d;m+=1){var v=r.getCellInfo(h,m).offset,b=e.nodeAt(v-t);b&&(p="tableHeadCell"===b.type.name,r.extendedRowspan(h,m)||r.extendedColspan(h,m)?f.push(b.type.create({extended:!0})):f.push(b.copy(b.content)))}var g=n.copy(a["c"].from(f)),y=p?l:o;y.content=y.content.append(a["c"].from(g))}return new a["j"](l0(l,o),1,1)},t}(r["f"]);function r0(e,t,n){for(var a=t.nodes,l=a.tableRow,o=a.tableHeadCell,r=a.paragraph,i=[],c=0;c0&&l>0||"table"===(null===(t=n.firstChild)||void 0===t?void 0:t.type.name)))a-=1,l-=1,n=n.firstChild.content;if("tableHead"===n.firstChild.type.name||"tableBody"===n.firstChild.type.name)return n}return null}function h0(e){var t=e.startRowIdx,n=e.startColIdx,a=e.endRowIdx,l=e.endColIdx,o=a-t+1,r=l-n+1;return{rowCount:o,columnCount:r}}function f0(e,t){return h(h({},e.attrs),t)}var m0=new r["e"]("cellSelection"),v0=2,b0=function(){function e(e){this.view=e,this.handlers={mousedown:this.handleMousedown.bind(this),mousemove:this.handleMousemove.bind(this),mouseup:this.handleMouseup.bind(this)},this.startCellPos=null,this.init()}return e.prototype.init=function(){this.view.dom.addEventListener("mousedown",this.handlers.mousedown)},e.prototype.handleMousedown=function(e){var t=u0(e.target,this.view.dom);if(e.button!==v0){if(t){var n=this.getCellPos(e);n&&(this.startCellPos=n),this.bindEvent()}}else e.preventDefault()},e.prototype.handleMousemove=function(e){var t,n=m0.getState(this.view.state),a=this.getCellPos(e),l=this.startCellPos;n?t=this.view.state.doc.resolve(n):l!==a&&(t=l),t&&l&&a&&this.setCellSelection(l,a)},e.prototype.handleMouseup=function(){this.startCellPos=null,this.unbindEvent(),null!==m0.getState(this.view.state)&&this.view.dispatch(this.view.state.tr.setMeta(m0,-1))},e.prototype.bindEvent=function(){var e=this.view.dom;e.addEventListener("mousemove",this.handlers.mousemove),e.addEventListener("mouseup",this.handlers.mouseup)},e.prototype.unbindEvent=function(){var e=this.view.dom;e.removeEventListener("mousemove",this.handlers.mousemove),e.removeEventListener("mouseup",this.handlers.mouseup)},e.prototype.getCellPos=function(e){var t=e.clientX,n=e.clientY,a=this.view.posAtCoords({left:t,top:n});if(a){var l=this.view.state.doc,o=l.resolve(a.pos),r=s0(o);if(r){var i=o.before(r.depth);return l.resolve(i)}}return null},e.prototype.setCellSelection=function(e,t){var n=this.view.state,a=n.selection,l=n.tr,o=null===m0.getState(this.view.state),r=new o0(e,t);if(o||!a.eq(r)){var i=l.setSelection(r);o&&i.setMeta(m0,t.pos),this.view.dispatch(i)}},e.prototype.destroy=function(){this.view.dom.removeEventListener("mousedown",this.handlers.mousedown)},e}(),g0=fn("cell-selected");function y0(e){var t=e.selection,n=e.doc;if(t instanceof o0){var a=[],o=t.ranges;return o.forEach((function(e){var t=e.$from,n=e.$to;a.push(l["a"].node(t.pos-1,n.pos+1,{class:g0}))})),l["b"].create(n,a)}return null}function w0(){return new r["d"]({key:m0,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(m0);if(n)return-1===n?null:n;if(ce(t)||!e.docChanged)return t;var a=e.mapping.mapResult(t),l=a.deleted,o=a.pos;return l?null:o}},props:{decorations:y0,createSelectionBetween:function(e){var t=e.state;return ce(m0.getState(t))?null:t.selection}},view:function(e){return new b0(e)}})}var k0=function(){function e(){this.keys=[],this.values=[]}return e.prototype.getKeyIndex=function(e){return P(e,this.keys)},e.prototype.get=function(e){return this.values[this.getKeyIndex(e)]},e.prototype.set=function(e,t){var n=this.getKeyIndex(e);return n>-1?this.values[n]=t:(this.keys.push(e),this.values.push(t)),this},e.prototype.has=function(e){return this.getKeyIndex(e)>-1},e.prototype.delete=function(e){var t=this.getKeyIndex(e);return t>-1&&(this.keys.splice(t,1),this.values.splice(t,1),!0)},e.prototype.forEach=function(e,t){var n=this;void 0===t&&(t=this),this.values.forEach((function(a,l){a&&n.keys[l]&&e.call(t,a,n.keys[l],n)}))},e.prototype.clear=function(){this.keys=[],this.values=[]},e}(),x0="en-US",C0=function(){function e(){this.code=x0,this.langs=new k0}return e.prototype.setCode=function(e){this.code=e||x0},e.prototype.setLanguage=function(e,t){var n=this;e=[].concat(e),e.forEach((function(e){if(n.langs.has(e)){var a=n.langs.get(e);n.langs.set(e,y(a,t))}else n.langs.set(e,t)}))},e.prototype.get=function(e,t){t||(t=this.code);var n=this.langs.get(t);n||(n=this.langs.get(x0));var a=n[e];if(!a)throw new Error('There is no text key "'+e+'" in '+t);return a},e}(),T0=new C0,M0=[[{action:"Add row to up",command:"addRowToUp",disableInThead:!0,className:"add-row-up"},{action:"Add row to down",command:"addRowToDown",disableInThead:!0,className:"add-row-down"},{action:"Remove row",command:"removeRow",disableInThead:!0,className:"remove-row"}],[{action:"Add column to left",command:"addColumnToLeft",className:"add-column-left"},{action:"Add column to right",command:"addColumnToRight",className:"add-column-right"},{action:"Remove column",command:"removeColumn",className:"remove-column"}],[{action:"Align column to left",command:"alignColumn",payload:{align:"left"},className:"align-column-left"},{action:"Align column to center",command:"alignColumn",payload:{align:"center"},className:"align-column-center"},{action:"Align column to right",command:"alignColumn",payload:{align:"right"},className:"align-column-right"}],[{action:"Remove table",command:"removeTable",className:"remove-table"}]];function O0(e,t){return M0.map((function(n){return n.map((function(n){var a=n.action,l=n.command,o=n.payload,r=n.disableInThead,i=n.className;return{label:T0.get(a),onClick:function(){e.emit("command",l,o)},disabled:t&&!!r,className:i}}))})).concat()}function S0(e){return new r["d"]({props:{handleDOMEvents:{contextmenu:function(t,n){var a=u0(n.target,t.dom);if(a){n.preventDefault();var l=n,o=l.clientX,r=l.clientY,i=t.dom.parentNode.getBoundingClientRect(),c=i.left,u=i.top,s="TH"===a.nodeName;return e.emit("contextmenu",{pos:{left:o-c+10+"px",top:r-u+30+"px"},menuGroups:O0(e,s),tableCell:a}),!0}return!1}}}})}function E0(){return new r["d"]({props:{handleDOMEvents:{mousedown:function(e,t){var n=t,a=n.clientX,l=n.clientY,o=e.posAtCoords({left:a,top:l});if(o){var r=e.state,i=r.doc,c=r.tr,u=i.resolve(o.pos),s=NY(u),d=t.target,p=getComputedStyle(d,":before"),f=t,m=f.offsetX,v=f.offsetY;if(!s||!pn(p,m,v))return!1;t.preventDefault();var b=u.before(s.depth),g=s.node.attrs;return c.setNodeMarkup(b,null,h(h({},g),{checked:!g.checked})),e.dispatch(c),!0}return!1}}}})}var N0=["image","link","customBlock","frontMatter"],D0=["strong","strike","emph","code"],A0=["bulletList","orderedList","taskList"];function L0(e,t){var n=e.type.name;return"listItem"===n?e.attrs.task?"taskList":t.type.name:-1!==n.indexOf("table")?"table":n}function I0(e,t){t[e]={active:!0},A0.filter((function(t){return t!==e})).forEach((function(e){t[e]&&delete t[e]}))}function R0(e,t,n,a){D0.forEach((function(l){var o=n.marks[l],r=e.marksAcross(t)||[],i=!!o.isInSet(r);i&&(a[l]={active:!0})}))}function j0(e,t,n){var a=e.$from,l=e.$to,o=e.from,r=e.to,i={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}};return t.nodesBetween(o,r,(function(e,t,o){var r=L0(e,o);Ae(N0,r)||(Ae(A0,r)?(I0(r,i),i.indent.disabled=!1,i.outdent.disabled=!1):"paragraph"===r||"text"===r?R0(a,l,n,i):i[r]={active:!0})})),i}function B0(e){return new r["d"]({view:function(){return{update:function(t){var n=t.state,a=n.selection,l=n.doc,o=n.schema;e.emit("changeToolbarState",{toolbarState:j0(a,l,o)})}}}})}var P0=function(){function e(e,t,n,a){var o=this;this.openEditor=function(){if(o.innerEditorView)throw new Error("The editor is already opened.");o.dom.draggable=!1,o.wrapper.style.display="none",o.innerViewContainer.style.display="block",o.innerEditorView=new l["c"](o.innerViewContainer,{state:r["b"].create({doc:o.node,plugins:[Object(i["a"])({"Mod-z":function(){return Object(s["c"])(o.innerEditorView.state,o.innerEditorView.dispatch)},"Shift-Mod-z":function(){return Object(s["b"])(o.innerEditorView.state,o.innerEditorView.dispatch)},Tab:function(e,t){return t(e.tr.insertText("\t")),!0},Enter:c["f"],Escape:function(){return o.cancelEditing(),!0},"Ctrl-Enter":function(){return o.saveAndFinishEditing(),!0}}),Object(s["a"])()]}),dispatchTransaction:function(e){return o.dispatchInner(e)},handleDOMEvents:{mousedown:function(){return o.editorView.hasFocus()&&o.innerEditorView.focus(),!0},blur:function(){return o.saveAndFinishEditing(),!0}}}),o.innerEditorView.focus()},this.node=e,this.editorView=t,this.getPos=n,this.toDOMAdaptor=a,this.innerEditorView=null,this.canceled=!1,this.dom=document.createElement("div"),this.dom.className=fn("custom-block"),this.wrapper=document.createElement("div"),this.wrapper.className=fn("custom-block-view"),this.createInnerViewContainer(),this.renderCustomBlock(),this.dom.appendChild(this.innerViewContainer),this.dom.appendChild(this.wrapper)}return e.prototype.renderToolArea=function(){var e=this,t=document.createElement("div"),n=document.createElement("span"),a=document.createElement("button");t.className="tool",n.textContent=this.node.attrs.info,n.className="info",a.type="button",a.addEventListener("click",(function(){return e.openEditor()})),t.appendChild(n),t.appendChild(a),this.wrapper.appendChild(t)},e.prototype.renderCustomBlock=function(){var e=this.toDOMAdaptor.getToDOMNode(this.node.attrs.info);if(e){var t=e(this.node);while(this.wrapper.hasChildNodes())this.wrapper.removeChild(this.wrapper.lastChild);t&&this.wrapper.appendChild(t),this.renderToolArea()}},e.prototype.createInnerViewContainer=function(){this.innerViewContainer=document.createElement("div"),this.innerViewContainer.className=fn("custom-block-editor"),this.innerViewContainer.style.display="none"},e.prototype.closeEditor=function(){this.innerEditorView&&(this.innerEditorView.destroy(),this.innerEditorView=null,this.innerViewContainer.style.display="none"),this.wrapper.style.display="block"},e.prototype.saveAndFinishEditing=function(){var e=this.editorView.state.selection.to,t=this.editorView.state;this.editorView.dispatch(t.tr.setSelection(at(t.tr,e))),this.editorView.focus(),this.renderCustomBlock(),this.closeEditor()},e.prototype.cancelEditing=function(){var e=Object(s["d"])(this.innerEditorView.state);this.canceled=!0;while(e--)Object(s["c"])(this.innerEditorView.state,this.innerEditorView.dispatch),Object(s["c"])(this.editorView.state,this.editorView.dispatch);this.canceled=!1;var t=this.editorView.state.selection.to,n=this.editorView.state;this.editorView.dispatch(n.tr.setSelection(r["h"].create(n.doc,t))),this.editorView.focus(),this.closeEditor()},e.prototype.dispatchInner=function(e){var t=this.innerEditorView.state.applyTransaction(e),n=t.state,a=t.transactions;if(this.innerEditorView.updateState(n),!this.canceled&&$n(this.getPos)){for(var l=this.editorView.state.tr,r=o["d"].offset(this.getPos()+1),i=0;i
":"";return""+l+t.innerHTML}var l1="\x3c!--StartFragment--\x3e",o1="\x3c!--EndFragment--\x3e";function r1(e){var t=e.indexOf(l1),n=e.lastIndexOf(o1);return t>-1&&n>-1&&(e=e.slice(t+l1.length,n)),e.replace(/ ]*>/g,sn)}function i1(e){return/<\/td>((?!<\/tr>)[\s\S])*$/i.test(e)&&(e=""+e+" "),/<\/tr>((?!<\/table>)[\s\S])*$/i.test(e)&&(e=""),e}function c1(e){return e=r1(e),e=i1(e),G0(e)&&(e=a1(e)),e}function u1(e){var t=e.reduce((function(e,t){return e.childCount>t.childCount?e:t}));return t.childCount}function s1(e,t,n){for(var a=[],l=e.childCount,o=0;o1&&(t+=a-1)})),r=Math.max(r,t)},c=0;c=o&&h<=i-u){var y=n.getCellInfo(h,c-s),w=e.mapping.map(y.offset),k=b+k1(s);l[p]={rowIdx:h,startColIdx:r,endColIdx:c,dummyOffsets:[w,k]},p+=1}}}function O1(e,t,n,a,l){var o=a.addedRowCount,r=a.addedColumnCount,i=a.startColIdx,c=a.endColIdx,u=e.mapping.maps.length,s=n.tableEndOffset-2,d=i0(o,n.totalColumnCount+r,t),p=s;e.insert(e.mapping.slice(u).map(p),d);for(var h=0;h=1)return a.delete(o.start(-1)-1,o.end(-1)),t(a),!0;var s=o.node(-3);if(s.type===i)return a.delete(o.start(-2)-1,o.end(-1)),t(a),!0}return!1}},t.prototype.keymaps=function(){var e=function(e,t){return GY(e.schema.nodes.listItem)(e,t)};return{Backspace:this.liftToPrevListItem(),Enter:e}},t}(Vn),H1=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{attrs:h({rawHTML:{default:null}},IY()),content:"block+",group:"block",parseDOM:[DY("blockquote")],toDOM:function(e){var t=e.attrs;return["blockquote",RY(t),0]}}},enumerable:!1,configurable:!0}),t.prototype.commands=function(){return function(){return function(e,t){return Object(c["j"])(e.schema.nodes.blockQuote)(e,t)}}},t.prototype.keymaps=function(){var e=this.commands()();return{"Alt-q":e,"Alt-Q":e}},t}(Vn),z1={left:Z1,right:X1,up:Q1,down:Y1};function _1(e,t,n){var a=n[0],l=n[1],o=t.resolve(e.before(a-1));return l===a&&!o.nodeBefore}function q1(e){var t,n,a=e.depth;while(a){if(n=e.node(a),"tableBodyCell"===n.type.name)break;if("listItem"===n.type.name){var l=e.node(a-1),o=l.lastChild===n,r="paragraph"!==(null===(t=n.lastChild)||void 0===t?void 0:t.type.name);return!!o&&!r}a-=1}return!1}function $1(e,t,n,a,l){var o=t[0],r=t[1],i=t[2];if("left"===e||"up"===e){if(l&&!_1(n,a,[o,r]))return!1;var c=n.before(i),u=a.resolve(c).nodeBefore;if(u)return!1}return!0}function U1(e,t,n,a,l){if("right"===e||"down"===e){if(l&&!q1(n))return!1;var o=n.after(t),r=a.resolve(o).nodeAfter;if(r)return!1}return!0}function W1(e,t,n,a){var l=t[0],o=t[1],r=l+3,i=o>=r,c=i?l+1:o,u=$1(e,[o,r,c],n,a,i),s=U1(e,c,n,a,i);return u&&s}function J1(e,t,n){var a=n[0],l=n[1],o=t.getRowspanStartInfo(a,l),r="up"===e&&0===a,i="down"===e&&((null===o||void 0===o?void 0:o.count)>1?a+o.count-1:a)===t.totalRowCount-1;return r||i}function K1(e,t,n){var a=e.doc.resolve(t.tableStartOffset-1);return a.nodeBefore?e.setSelection(r["f"].near(a,-1)):lt(e,a,n)}function G1(e,t,n,a){void 0===a&&(a=!1);var l=e.doc.resolve(t.tableEndOffset);return a||!l.nodeAfter?lt(e,l,n):e.setSelection(r["f"].near(l,1))}function X1(e,t){var n=e[0],a=e[1],l=t.totalRowCount,o=t.totalColumnCount,r=a===o-1,i=n===l-1&&r;if(!i){var c=a+1,u=t.getColspanStartInfo(n,a);(null===u||void 0===u?void 0:u.count)>1&&(c+=u.count-1),(r||c===o)&&(n+=1,c=0);var s=t.getCellInfo(n,c).offset;return s+2}return null}function Z1(e,t){var n=e[0],a=e[1],l=t.totalColumnCount,o=0===a,r=0===n&&o;if(!r){a-=1,o&&(n-=1,a=l-1);var i=t.getCellInfo(n,a),c=i.offset,u=i.nodeSize;return c+u-2}return null}function Q1(e,t){var n=e[0],a=e[1];if(n>0){var l=t.getCellInfo(n-1,a),o=l.offset,r=l.nodeSize;return o+r-2}return null}function Y1(e,t){var n=e[0],a=e[1],l=t.totalRowCount;if(n1&&(o+=r.count-1);var i=t.getCellInfo(o,a).offset;return i+2}return null}function e2(e,t,n,a){var l=z1[e],o=l(n,a);if(o){var i="right"===e||"down"===e?1:-1;return t.setSelection(r["f"].near(t.doc.resolve(o),i))}return null}function t2(e,t,n){var a=n[0],l=n[1];if("up"===e||"down"===e)return!1;var o=t.tableStartOffset,r=t.tableEndOffset,i=t.getCellInfo(a,l),c=i.offset,u=i.nodeSize,s="left"===e?o:r,d="left"===e?c-2:c+u+3;return s===d}function n2(e,t,n){var a=e.doc.resolve(t.before(n-3));return e.setSelection(new r["c"](a))}function a2(e,t,n){var a,l,o;return"up"===e?(a=n.startRowIdx,l=0,o=-1):(a=n.endRowIdx,l=t.totalColumnCount-1,o=t.getCellInfo(a,l).nodeSize+1),{targetRowIdx:a,insertColIdx:l,nodeSize:o}}function l2(e,t,n){var a=e.getCellInfo(t,0).offset,l=e.getCellInfo(t,n-1),o=l.offset,r=l.nodeSize;return{from:a,to:o+r}}var o2=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return{content:"tableHead{1} tableBody{1}",group:"block",attrs:h({rawHTML:{default:null}},IY()),parseDOM:[DY("table")],toDOM:function(e){var t=e.attrs;return["table",RY(t),0]}}},enumerable:!1,configurable:!0}),t.prototype.addTable=function(){return function(e){return void 0===e&&(e={rowCount:2,columnCount:1,data:[]}),function(t,n){var a=e.rowCount,l=e.columnCount,o=e.data,r=t.schema,i=t.selection,c=t.tr,u=i.from,s=i.to,d=i.$from,p=u===s;if(p&&!EY(d)){var h=r.nodes,f=h.tableHead,m=h.tableBody,v=null===o||void 0===o?void 0:o.slice(0,l),b=null===o||void 0===o?void 0:o.slice(l,o.length),g=r0(l,r,v),y=i0(a-1,l,r,b),w=r.nodes.table.create(null,[f.create(null,g),m.create(null,y)]);return n(c.replaceSelectionWith(w)),!0}return!1}}},t.prototype.removeTable=function(){return function(){return function(e,t){var n=e.selection,a=e.tr,l=e0.create(n.$anchor);if(l){var o=l.tableStartOffset,r=l.tableEndOffset,i=o-1,c=at(a.delete(i,r),i);return t(a.setSelection(c)),!0}return!1}}},t.prototype.addColumn=function(e){return function(){return function(t,n){var a=t.selection,l=t.tr,o=t.schema,r=d0(a),i=r.anchor,c=r.head;if(i&&c){for(var u=e0.create(i),s=u.getRectOffsets(i,c),d="left"===e?s.startColIdx:s.endColIdx+1,p=h0(s).columnCount,h=u.totalRowCount,f=0;f=h;b-=1){var g=i.getCellInfo(v,b),y=g.offset,w=g.nodeSize,k=a.mapping.slice(m).map(y),x=k+w;a.delete(k,x)}return t(a),!0}return!1}}},t.prototype.addRow=function(e){return function(){return function(t,n){var a=t.selection,l=t.schema,o=t.tr,r=d0(a),i=r.anchor,c=r.head;if(i&&c){var u=e0.create(i),s=u.totalColumnCount,d=u.getRectOffsets(i,c),p=h0(d).rowCount,h=a2(e,u,d),f=h.targetRowIdx,m=h.insertColIdx,v=h.nodeSize,b=0===f;if(!b){for(var g=[],y=o.mapping.map(u.posAt(f,m))+v,w=[],k=0;k=p;v-=1){var b=l2(i,v,u),g=b.from,y=b.to;a.delete(g-1,y+1)}return t(a),!0}return!1}}},t.prototype.alignColumn=function(){return function(e){return void 0===e&&(e={align:"center"}),function(t,n){var a=e.align,l=t.selection,o=t.tr,r=d0(l),i=r.anchor,c=r.head;if(i&&c){for(var u=e0.create(i),s=u.totalRowCount,d=u.getRectOffsets(i,c),p=d.startColIdx,h=d.endColIdx,f=0;f=r&&d(o)&&(i+=t,c=i+a)}))}return{range:[i,c],type:u}},t}(_n),M2=F,O2=ce;function S2(e){return!M2(e)&&!O2(e)}var E2=S2,N2=E2;function D2(e){return N2(e)&&!1!==e}var A2=D2,L2=A2;function I2(e){return!L2(e)}var R2=I2,j2=["afterPreviewRender","updatePreview","changeMode","needChangeMode","command","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","scroll","contextmenu","show","hide","changeLanguage","changeToolbarState","toggleScrollSync","mixinTableOffsetMapPrototype","setFocusedNode","removePopupWidget","query","openPopup","closePopup","addImageBlobHook","beforePreviewRender","beforeConvertWysiwygToMarkdown","load","loadUI","change","caretChange","destroy","focus","blur","keydown","keyup"],B2=function(){function e(){var e=this;this.events=new k0,this.eventTypes=j2.reduce((function(e,t){return h(h({},e),{type:t})}),{}),this.hold=!1,j2.forEach((function(t){e.addEventType(t)}))}return e.prototype.listen=function(e,t){var n=this.getTypeInfo(e),a=this.events.get(n.type)||[];if(!this.hasEventType(n.type))throw new Error("There is no event type "+n.type);n.namespace&&(t.namespace=n.namespace),a.push(t),this.events.set(n.type,a)},e.prototype.emit=function(e){for(var t=[],n=1;n=0&&n.splice(a,1)}},e.prototype.removeEventHandlerWithTypeInfo=function(e,t){var n=[],a=this.events.get(e);a&&(a.map((function(e){return e.namespace!==t&&n.push(e),null})),this.events.set(e,n))},e.prototype.getEvents=function(){return this.events},e.prototype.holdEventInvoke=function(e){this.hold=!0,e(),this.hold=!1},e}(),P2=function(){function e(e,t,n,a){this.eventEmitter=e,this.mdCommands=t,this.wwCommands=n,this.getEditorType=a,this.initEvent()}return e.prototype.initEvent=function(){var e=this;this.eventEmitter.listen("command",(function(t,n){e.exec(t,n)}))},e.prototype.addCommand=function(e,t,n){"markdown"===e?this.mdCommands[t]=n:this.wwCommands[t]=n},e.prototype.deleteCommand=function(e,t){"markdown"===e?delete this.mdCommands[t]:delete this.wwCommands[t]},e.prototype.exec=function(e,t){var n=this.getEditorType();"markdown"===n?this.mdCommands[e](t):this.wwCommands[e](t)},e}();function V2(e){return"\n"===e[e.length-1]?e.slice(0,e.length-1):e}function F2(e,t){var n=e.schema,a=t.literal,l=a.match(rn);if(l){var o=l[1],r=l[3],i=(o||r).toLowerCase();return"htmlInline"===t.type&&!(!n.marks[i]&&!n.nodes[i])}return!1}function H2(e){var t=e.type;return Ae(["text","strong","emph","strike","image","link","code"],t)}function z2(e){return"softbreak"===(null===e||void 0===e?void 0:e.type)}function _2(e){var t=e.type,n=e.literal,a="htmlInline"===t&&n.match(rn);if(a){var l=a[1],o=a[3],r=l||o;if(r)return Ae(["ul","ol","li"],r.toLowerCase())}return!1}function q2(e){var t=e.literal,n=/data-task/.test(t),a=/data-task-checked/.test(t);return{task:n,checked:a}}function $2(e){for(var t=[],n=1;n=0;l-=1){var o=this.stack[l];if(!(null===(n=o.attrs)||void 0===n?void 0:n.rawHTML))break;o.content.length?this.closeNode():this.stack.pop()}},e.prototype.convert=function(e,t){var n=e.walker(),a=n.next(),l=function(){var e=a.node,l=a.entering,r=o.convertors[e.type],i=!1;if(r){var c={entering:l,leaf:!Tt(e),getChildrenText:Mt,options:{gfm:!0,nodeId:!1,tagFilter:!1,softbreak:"\n"},skipChildren:function(){i=!0}};if(o.closeUnmatchedHTMLInline(e,l),r(o,e,c),(null===t||void 0===t?void 0:t.node)===e){var u=o.stack.reduce((function(e,t){return e+t.content.reduce((function(e,t){return e+t.nodeSize}),0)}),0)+1;t.setMappedPos(u)}}i&&(n.resumeAt(e,!1),n.next()),a=n.next()},o=this;while(a)l()},e.prototype.convertNode=function(e,t){return this.convert(e,t),this.stack.length?this.closeNode():null},e}();function e3(e,t,n){var a=n[0],l=n[1];e.write(a),e.convertInline(t),e.write(l)}function t3(e,t,n){var a=t.node,l=t.parent,o=n[0],r=n[1];e.stopNewline=!0,e.write(o),e.convertNode(a),e.write(r),"doc"===(null===l||void 0===l?void 0:l.type.name)&&(e.closeBlock(a),e.stopNewline=!1)}function n3(e,t){var n=e.length,a="",l="";return"left"===t?(a=":",n-=1):"right"===t?(l=":",n-=1):"center"===t&&(a=":",l=":",n-=2),""+a+je("-",Math.max(n,3))+l}var a3={text:function(e,t){var n,a=t.node,l=null!==(n=a.text)&&void 0!==n?n:"";(a.marks||[]).some((function(e){return"link"===e.type.name}))?e.text(Pe(l),!1):e.text(l)},paragraph:function(e,t){var n=t.node,a=t.parent,l=t.index,o=void 0===l?0:l;if(e.stopNewline)e.convertInline(n);else{var r=0===o,i=!r&&a.child(o-1),c=i&&0===i.childCount,u=o\n");else if(!d||c||r)e.convertInline(n),s?e.write("\n"):e.closeBlock(n);else{if("listItem"===(null===a||void 0===a?void 0:a.type.name)){var p=e.getDelim();e.setDelim(""),e.write(" "),e.setDelim(p)}e.write("\n")}}},heading:function(e,t,n){var a=t.node,l=n.delim,o=a.attrs.headingType;"atx"===o?(e.write(l+" "),e.convertInline(a),e.closeBlock(a)):(e.convertInline(a),e.ensureNewLine(),e.write(l),e.closeBlock(a))},codeBlock:function(e,t,n){var a=t.node,l=n.delim,o=n.text,r=l,i=r[0],c=r[1];e.write(i),e.ensureNewLine(),e.text(o,!1),e.ensureNewLine(),e.write(c),e.closeBlock(a)},blockQuote:function(e,t,n){var a=t.node,l=t.parent,o=n.delim;(null===l||void 0===l?void 0:l.type.name)===a.type.name&&e.flushClose(1),e.wrapBlock(o,null,a,(function(){return e.convertNode(a)}))},bulletList:function(e,t,n){var a=t.node,l=n.delim;e.convertList(a,je(" ",4),(function(){return l+" "}))},orderedList:function(e,t){var n=t.node,a=n.attrs.order||1;e.convertList(n,je(" ",4),(function(e){var t=String(a+e);return t+". "}))},listItem:function(e,t){var n=t.node,a=n.attrs,l=a.task,o=a.checked;l&&e.write("["+(o?"x":" ")+"] "),e.convertNode(n)},image:function(e,t,n){var a=n.attrs;e.write("+")")},thematicBreak:function(e,t,n){var a=t.node,l=n.delim;e.write(l),e.closeBlock(a)},table:function(e,t){var n=t.node;e.convertNode(n),e.closeBlock(n)},tableHead:function(e,t,n){var a=t.node,l=n.delim,o=a.firstChild;e.convertNode(a);var r=null!==l&&void 0!==l?l:"";!l&&o&&o.forEach((function(e){var t=e.textContent,n=e.attrs,a=n3(t,n.align);r+="| "+a+" "})),e.write(r+"|"),e.ensureNewLine()},tableBody:function(e,t){var n=t.node;e.convertNode(n)},tableRow:function(e,t){var n=t.node;e.convertNode(n),e.write("|"),e.ensureNewLine()},tableHeadCell:function(e,t,n){var a=t.node,l=n.delim,o=void 0===l?"| ":l;e.write(o),e.convertTableCell(a),e.write(" ")},tableBodyCell:function(e,t,n){var a=t.node,l=n.delim,o=void 0===l?"| ":l;e.write(o),e.convertTableCell(a),e.write(" ")},customBlock:function(e,t,n){var a=t.node,l=n.delim,o=n.text,r=l,i=r[0],c=r[1];e.write(i),e.ensureNewLine(),e.text(o,!1),e.ensureNewLine(),e.write(c),e.closeBlock(a)},frontMatter:function(e,t,n){var a=t.node,l=n.text;e.text(l,!1),e.closeBlock(a)},widget:function(e,t,n){var a=n.text;e.write(a)},html:function(e,t,n){var a=t.node,l=n.text;e.write(l),a.attrs.htmlBlock&&e.closeBlock(a)},htmlComment:function(e,t,n){var a=t.node,l=n.text;e.write(l),e.closeBlock(a)}};function l3(e,t){var n=t.state,a=t.nodeInfo,l=t.params,o=l.rawHTML;o?P(e,["heading","codeBlock"])>-1?e3(n,a.node,o):P(e,["image","thematicBreak"])>-1?n.write(o):t3(n,a,o):a3[e](n,a,l)}function o3(e,t){var n=e.text,a=/`+/g,l=0;if(e.isText&&n){var o=a.exec(n);while(o)l=Math.max(l,o[0].length),o=a.exec(n)}for(var r=l>0&&t>0?" `":"`",i=0;i0&&t<0&&(r+=" "),r}function r3(e){return e?["<"+e+">",""+e+">"]:null}function i3(e){return e?"<"+e+">":null}function c3(e){return e?""+e+">":null}var u3={heading:function(e){var t=e.node,n=t.attrs,a=n.level,l=je("#",a);return"setext"===n.headingType&&(l=1===a?"===":"---"),{delim:l,rawHTML:r3(n.rawHTML)}},codeBlock:function(e){var t=e.node,n=t,a=n.attrs,l=n.textContent;return{delim:["```"+(a.language||""),"```"],rawHTML:r3(a.rawHTML),text:l}},blockQuote:function(e){var t=e.node;return{delim:"> ",rawHTML:r3(t.attrs.rawHTML)}},bulletList:function(e,t){var n=e.node,a=t.inTable,l=n.attrs.rawHTML;return a&&(l=l||"ul"),{delim:"*",rawHTML:r3(l)}},orderedList:function(e,t){var n=e.node,a=t.inTable,l=n.attrs.rawHTML;return a&&(l=l||"ol"),{rawHTML:r3(l)}},listItem:function(e,t){var n=e.node,a=t.inTable,l=n.attrs,o=l.task,r=l.checked,i=n.attrs.rawHTML;a&&(i=i||"li");var c=o?' class="task-list-item'+(r?" checked":"")+'"':"",u=o?" data-task"+(r?" data-task-checked":""):"";return{rawHTML:i?["<"+i+c+u+">",""+i+">"]:null}},table:function(e){var t=e.node;return{rawHTML:r3(t.attrs.rawHTML)}},tableHead:function(e){var t=e.node;return{rawHTML:r3(t.attrs.rawHTML)}},tableBody:function(e){var t=e.node;return{rawHTML:r3(t.attrs.rawHTML)}},tableRow:function(e){var t=e.node;return{rawHTML:r3(t.attrs.rawHTML)}},tableHeadCell:function(e){var t=e.node;return{rawHTML:r3(t.attrs.rawHTML)}},tableBodyCell:function(e){var t=e.node;return{rawHTML:r3(t.attrs.rawHTML)}},image:function(e){var t=e.node,n=t.attrs,a=n.rawHTML,l=n.altText,o=n.imageUrl.replace(/&/g,"&"),r=l?' alt="'+Ne(l)+'"':"";return{rawHTML:a?"<"+a+' src="'+Ne(o)+'"'+r+">":null,attrs:{altText:Pe(l||""),imageUrl:o}}},thematicBreak:function(e){var t=e.node;return{delim:"***",rawHTML:i3(t.attrs.rawHTML)}},customBlock:function(e){var t=e.node,n=t,a=n.attrs,l=n.textContent;return{delim:["$$"+a.info,"$$"],text:l}},frontMatter:function(e){var t=e.node;return{text:t.textContent}},widget:function(e){var t=e.node;return{text:t.textContent}},strong:function(e,t,n){var a=e.node,l=t.entering,o=a.attrs.rawHTML,r="**";return n||(r=l?"":" "),{delim:r,rawHTML:l?i3(o):c3(o)}},emph:function(e,t,n){var a=e.node,l=t.entering,o=a.attrs.rawHTML,r="*";return n||(r=l?"":" "),{delim:r,rawHTML:l?i3(o):c3(o)}},strike:function(e,t,n){var a=e.node,l=t.entering,o=a.attrs.rawHTML,r="~~";return n||(r=l?"":""),{delim:r,rawHTML:l?i3(o):c3(o)}},link:function(e,t){var n=e.node,a=t.entering,l=n.attrs,o=l.title,r=l.rawHTML,i=l.linkUrl.replace(/&/g,"&"),c=o?' title="'+Ne(o)+'"':"";return a?{delim:"[",rawHTML:r?"<"+r+' href="'+Ne(i)+'"'+c+">":null}:{delim:"]("+i+(o?" "+Fe(Pe(o)):"")+")",rawHTML:c3(r)}},code:function(e,t){var n=e.node,a=e.parent,l=e.index,o=void 0===l?0:l,r=t.entering,i=r?o3(a.child(o),-1):o3(a.child(o-1),1),c=r?i3(n.attrs.rawHTML):c3(n.attrs.rawHTML);return{delim:i,rawHTML:c}},htmlComment:function(e){var t=e.node;return{text:t.textContent}},html:function(e,t){var n=e.node,a=t.entering,l=n.type.name,o=n.attrs.htmlAttrs,r="<"+l,i=""+l+">";return Object.keys(o).forEach((function(e){r+=" "+e+'="'+o[e].replace(/"/g,"'")+'"'})),r+=">",n.attrs.htmlInline?{rawHTML:a?r:i}:{text:""+r+n.attrs.childrenHTML+i}}},s3={strong:{mixable:!0,removedEnclosingWhitespace:!0},emph:{mixable:!0,removedEnclosingWhitespace:!0},strike:{mixable:!0,removedEnclosingWhitespace:!0},code:{escape:!1},link:null,html:null};function d3(e){var t={},n=Object.keys(a3);return n.forEach((function(n){t[n]=function(t,a){var l=a3[n];if(l){var o=e[n],r=o?o(a,{inTable:t.inTable}):{};l3(n,{state:t,nodeInfo:a,params:r})}}})),t}function p3(e){var t={},n=Object.keys(s3);return n.forEach((function(n){t[n]=function(t,a,l){var o=s3[n],r=e[n],i=r&&t&&!F(a),c=i?r(t,{entering:a},l):{};return h(h({},c),o)}})),t}function h3(e){var t=Object.keys(e);t.forEach((function(t){var n=u3[t],a=e[t];u3[t]=n?function(e,t){return t.origin=function(){return n(e,t)},a(e,t)}:a,delete e[t]}));var n=d3(u3),a=p3(u3);return{nodeTypeConvertors:n,markTypeConvertors:a}}var f3=function(){function e(e){var t=e.nodeTypeConvertors,n=e.markTypeConvertors;this.nodeTypeConvertors=t,this.markTypeConvertors=n,this.delim="",this.result="",this.closed=!1,this.tightList=!1,this.stopNewline=!1,this.inTable=!1}return e.prototype.getMarkConvertor=function(e){var t=e.attrs.htmlInline?"html":e.type.name;return this.markTypeConvertors[t]},e.prototype.isInBlank=function(){return/(^|\n)$/.test(this.result)},e.prototype.isBetweenSpaces=function(e,t){var n,a,l=e.content,o=0===t||Ze(null!==(n=l.child(t-1).text)&&void 0!==n?n:dn),r=t>=l.childCount-1||Xe(null!==(a=l.child(t+1).text)&&void 0!==a?a:dn);return o&&r},e.prototype.markText=function(e,t,n,a){var l=this.getMarkConvertor(e);if(l){var o=this.isBetweenSpaces(n,t?a:a-1),r=l({node:e,parent:n,index:a},t,o),i=r.delim,c=r.rawHTML;return c||i}return""},e.prototype.setDelim=function(e){this.delim=e},e.prototype.getDelim=function(){return this.delim},e.prototype.flushClose=function(e){if(!this.stopNewline&&this.closed){if(this.isInBlank()||(this.result+="\n"),e||(e=2),e>1){var t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(var a=1;aw?i=i.slice(0,w).concat(p).concat(i.slice(w,y)).concat(i.slice(y+1,g)):w>y&&(i=i.slice(0,y).concat(i.slice(y+1,w)).concat(p).concat(i.slice(w,g)));break}}}var x=0;while(x")}})),this.stopNewline=!1,this.inTable=!1},e.prototype.convertNode=function(e,t){var n=this;return e.forEach((function(a,l,o){if(n.convertBlock(a,e,o),(null===t||void 0===t?void 0:t.node)===a){var r=n.result.split("\n");t.setMappedPos([r.length,_e(r).length+1])}})),this.result},e}(),m3=function(){function e(e,t,n,a){var l=this;this.setMappedPos=function(e){l.mappedPosWhenConverting=e},this.schema=e,this.eventEmitter=a,this.focusedNode=null,this.mappedPosWhenConverting=null,this.toWwConvertors=Z2(n),this.toMdConvertors=h3(t||{}),this.eventEmitter.listen("setFocusedNode",(function(e){return l.focusedNode=e}))}return e.prototype.getMappedPos=function(){return this.mappedPosWhenConverting},e.prototype.getInfoForPosSync=function(){return{node:this.focusedNode,setMappedPos:this.setMappedPos}},e.prototype.toWysiwygModel=function(e){var t=new Y2(this.schema,this.toWwConvertors);return t.convertNode(e,this.getInfoForPosSync())},e.prototype.toMarkdownText=function(e){var t=new f3(this.toMdConvertors),n=t.convertNode(e,this.getInfoForPosSync());return n=this.eventEmitter.emitReduce("beforeConvertWysiwygToMarkdown",n),n},e}();function v3(e,t,n){var o={Plugin:r["d"],PluginKey:r["e"],Selection:r["f"],TextSelection:r["h"]},i={Decoration:l["a"],DecorationSet:l["b"]},c={Fragment:a["c"]},s={InputRule:u["a"],inputRules:u["b"],undoInputRule:u["c"]},d={eventEmitter:t,usageStatistics:n,pmState:o,pmView:i,pmModel:c,pmRules:s,i18n:T0};if(C(e)){var p=e[0],h=e[1],f=void 0===h?{}:h;return p(d,f)}return e(d)}function b3(e,t,n){return t.listen("mixinTableOffsetMapPrototype",n0),(null!==e&&void 0!==e?e:[]).reduce((function(e,a){var l=v3(a,t,n);if(!l)throw new Error("The return value of the executed plugin is empty.");var o=l.markdownParsers,r=l.toHTMLRenderers,i=l.toMarkdownRenderers,c=l.markdownPlugins,u=l.wysiwygPlugins,s=l.wysiwygNodeViews,d=l.markdownCommands,p=l.wysiwygCommands,f=l.toolbarItems;return r&&(e.toHTMLRenderers=Ue(e.toHTMLRenderers,r)),i&&(e.toMarkdownRenderers=Ue(e.toMarkdownRenderers,i)),c&&(e.mdPlugins=e.mdPlugins.concat(c)),u&&(e.wwPlugins=e.wwPlugins.concat(u)),s&&(e.wwNodeViews=h(h({},e.wwNodeViews),s)),d&&(e.mdCommands=h(h({},e.mdCommands),d)),p&&(e.wwCommands=h(h({},e.wwCommands),p)),f&&(e.toolbarItems=e.toolbarItems.concat(f)),o&&(e.markdownParsers=h(h({},e.markdownParsers),o)),e}),{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var g3="data-task",y3="data-task-disabled",w3="checked";function k3(e){["htmlBlock","htmlInline"].forEach((function(t){e[t]&&Object.keys(e[t]).forEach((function(e){return JQ(e)}))}))}var x3=function(){function e(e){var t=this;this.options=y({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},e),this.eventEmitter=new B2;var n=Re(this.options.linkAttributes),a=b3(this.options.plugins,this.eventEmitter,this.options.usageStatistics)||{},l=a.toHTMLRenderers,o=a.markdownParsers,r=this.options,i=r.customHTMLRenderer,c=r.extendedAutolinks,u=r.referenceDefinition,s=r.frontMatter,d=r.customHTMLSanitizer,p={linkAttributes:n,customHTMLRenderer:h(h({},l),i),extendedAutolinks:c,referenceDefinition:u,frontMatter:s,sanitizer:d||KQ};k3(p.customHTMLRenderer),this.options.events&&b(this.options.events,(function(e,n){t.on(n,e)}));var f=this.options,m=f.el,v=f.initialValue,g=f.theme,w=m.innerHTML;"light"!==g&&m.classList.add(fn(g)),m.innerHTML="",this.toastMark=new FZ("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:c,referenceDefinition:u,disallowDeepHeading:!0,frontMatter:s,customParser:o}),this.preview=new MY(this.eventEmitter,h(h({},p),{isViewer:!0})),Ao(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),v?this.setMarkdown(v):w&&this.preview.setHTML(w),m.appendChild(this.preview.previewContent),this.eventEmitter.emit("load",this)}return e.prototype.toggleTask=function(e){var t=e.target,n=getComputedStyle(t,":before");!t.hasAttribute(y3)&&t.hasAttribute(g3)&&pn(n,e.offsetX,e.offsetY)&&(Cn(t,w3),this.eventEmitter.emit("change",{source:"viewer",date:e}))},e.prototype.setMarkdown=function(e){var t=this.toastMark.getLineTexts(),n=t.length,a=_e(t),l=[n,a.length+1],o=this.toastMark.editMarkdown([1,1],l,e||"");this.eventEmitter.emit("updatePreview",o)},e.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},e.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},e.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},e.prototype.destroy=function(){To(this.preview.el,"mousedown",this.toggleTask.bind(this)),this.preview.destroy(),this.eventEmitter.emit("destroy")},e.prototype.isViewer=function(){return!0},e.prototype.isMarkdownMode=function(){return!1},e.prototype.isWysiwygMode=function(){return!1},e}();function C3(e){return e instanceof a["f"]}function T3(e){var t=["document","blockQuote","bulletList","orderedList","listItem","paragraph","heading","emph","strong","strike","link","image","table","tableHead","tableBody","tableRow","tableHeadCell","tableBodyCell"];return Ae(t,e)}function M3(e){var t=e.attrs,n=e.type,a=n.name,l={type:a,wysiwygNode:!0,literal:!T3(a)&&C3(e)?e.textContent:null},o={heading:{level:t.level},link:{destination:t.linkUrl,title:t.title},image:{destination:t.imageUrl},codeBlock:{info:t.language},bulletList:{type:"list",listData:{type:"bullet"}},orderedList:{type:"list",listData:{type:"ordered",start:t.order}},listItem:{type:"item",listData:{task:t.task,checked:t.checked}},tableHeadCell:{type:"tableCell",cellType:"head",align:t.align},tableBodyCell:{type:"tableCell",cellType:"body",align:t.align},customBlock:{info:t.info}},r=o[a],i=h(h({},l),r),c=e.attrs,u=c.htmlAttrs,s=c.childrenHTML;return u?h(h({},i),{attrs:u,childrenHTML:s}):i}var O3={openTag:function(e,t){var n=e,a=n.tagName,l=n.classNames,o=n.attributes,r=document.createElement(a),i={};l&&(r.className=l.join(" ")),o&&(i=h(h({},i),o)),En(i,r),t.push(r)},closeTag:function(e,t){if(t.length>1){var n=t.pop();_e(t).appendChild(n)}},html:function(e,t){_e(t).insertAdjacentHTML("beforeend",e.content)},text:function(e,t){var n=document.createTextNode(e.content);_e(t).appendChild(n)}},S3=function(){function e(e,t){var n=aY(e,t),a=h(h({},t.htmlBlock),t.htmlInline);this.customConvertorKeys=Object.keys(t).concat(Object.keys(a)),this.renderer=new JZ({gfm:!0,convertors:h(h({},n),a)}),this.convertors=this.renderer.getConvertors()}return e.prototype.generateTokens=function(e){var t=M3(e),n={entering:!0,leaf:!!C3(e)&&e.isLeaf,options:this.renderer.getOptions(),getChildrenText:function(){return C3(e)?e.textContent:""},skipChildren:function(){return!1}},a=this.convertors[e.type.name],l=a(t,n,this.convertors),o=C(l)?l:[l];return(T3(e.type.name)||e.attrs.htmlInline)&&(n.entering=!1,o.push({type:"text",content:C3(e)?e.textContent:""}),o=o.concat(a(t,n,this.convertors))),o},e.prototype.toDOMNode=function(e){var t=this.generateTokens(e),n=[];return t.forEach((function(e){return O3[e.type](e,n)})),n[0]},e.prototype.getToDOMNode=function(e){return Ae(this.customConvertorKeys,e)?this.toDOMNode.bind(this):null},e}(),E3=100,N3=15,D3=null,A3=null;function L3(e,t){var n=t.syncScrollTop,a=t.releaseEventBlock;A3&&clearTimeout(A3),n(e),A3=setTimeout((function(){a()}),N3)}function I3(e,t,n){var a=t-e,l=Date.now(),o=function(){var r,i=Date.now(),c=(i-l)/E3;D3&&clearTimeout(D3),c<1?(r=e+a*Math.cos((1-c)*Math.PI/2),L3(Math.ceil(r),n),D3=setTimeout(o,1)):(L3(t,n),D3=null)};o()}var R3=18,j3=function(){function e(e,t,n){this.latestEditorScrollTop=null,this.latestPreviewScrollTop=null,this.blockedScroll=null,this.active=!0,this.timer=null;var a=t.previewContent,l=t.el;this.previewRoot=a,this.previewEl=l,this.mdEditor=e,this.editorView=e.view,this.toastMark=e.getToastMark(),this.eventEmitter=n,this.addScrollSyncEvent()}return e.prototype.addScrollSyncEvent=function(){var e=this;this.eventEmitter.listen("afterPreviewRender",(function(){e.clearTimer(),e.timer=setTimeout((function(){e.syncPreviewScrollTop(!0)}),200)})),this.eventEmitter.listen("scroll",(function(t,n){e.active&&("editor"===t&&"editor"!==e.blockedScroll?e.syncPreviewScrollTop():"preview"===t&&"preview"!==e.blockedScroll&&e.syncEditorScrollTop(n))})),this.eventEmitter.listen("toggleScrollSync",(function(t){e.active=t}))},e.prototype.getMdNodeAtPos=function(e,t){var n=e.content.findIndex(t.pos),a=n.index;return this.toastMark.findFirstNodeAtLine(a+1)},e.prototype.getScrollTopByCaretPos=function(){var e=this.mdEditor.getSelection(),t=this.toastMark.findFirstNodeAtLine(e[0][0]),n=this.previewEl.clientHeight,a=fY(this.previewRoot,t).el,l=sY(a,this.previewRoot)||a.offsetTop,o=a.clientHeight,r=l+o-.5*n;this.latestEditorScrollTop=null;var i=a.getBoundingClientRect().top-this.previewEl.getBoundingClientRect().top;return iM.top?Math.min((i-M.top)/T,1):0;g=O+S*E}g=this.getResolvedScrollTop("editor",h,g,d),this.latestEditorScrollTop=h}g!==d&&this.run("editor",g,d)}},e.prototype.syncEditorScrollTop=function(e){var t=this,n=t.toastMark,a=t.editorView,l=t.previewRoot,o=t.previewEl,r=a.dom,i=a.state,c=o.scrollTop,u=o.clientHeight,s=o.scrollHeight,d=s-c<=u,p=r.scrollTop,h=d?r.scrollHeight:0;if(c&&e&&!d){if(e=uY(e,l),!e.getAttribute("data-nodeid"))return;var f=r.children,m=Number(e.getAttribute("data-nodeid")),v=fY(this.previewRoot,n.findNodeById(m)),b=v.mdNode,g=v.el,y=it(b);h=f[y-1].offsetTop;var w=iY(i.doc,b,f).height,k=xY(g,l,m),x=k.nodeHeight,C=k.offsetTop;h+=hY(c,C,x,w),h=this.getResolvedScrollTop("preview",c,h,p),this.latestPreviewScrollTop=c}h!==p&&this.run("preview",h,p)},e.prototype.getResolvedScrollTop=function(e,t,n,a){var l="editor"===e?this.latestEditorScrollTop:this.latestPreviewScrollTop;return null===l?n:l","i");return t.replace(n,"")}return t},e.prototype.insertText=function(e){this.getCurrentModeEditor().replaceSelection(e)},e.prototype.setSelection=function(e,t){this.getCurrentModeEditor().setSelection(e,t)},e.prototype.replaceSelection=function(e,t,n){this.getCurrentModeEditor().replaceSelection(e,t,n)},e.prototype.deleteSelection=function(e,t){this.getCurrentModeEditor().deleteSelection(e,t)},e.prototype.getSelectedText=function(e,t){return this.getCurrentModeEditor().getSelectedText(e,t)},e.prototype.getRangeInfoOfNode=function(e){return this.getCurrentModeEditor().getRangeInfoOfNode(e)},e.prototype.addWidget=function(e,t,n){this.getCurrentModeEditor().addWidget(e,t,n)},e.prototype.replaceWithWidget=function(e,t,n){this.getCurrentModeEditor().replaceWithWidget(e,t,n)},e.prototype.setHeight=function(e){var t=this.options.el;k(e)&&("auto"===e?Q(t,"auto-height"):le(t,"auto-height"),this.setMinHeight(this.getMinHeight())),R(t,{height:e}),this.height=e},e.prototype.getHeight=function(){return this.height},e.prototype.setMinHeight=function(e){if(e!==this.minHeight){var t=this.height||this.options.height;"auto"!==t&&this.options.el.querySelector("."+fn("main"))&&(e=Math.min(parseInt(e,10),parseInt(t,10)-75)+"px");var n=parseInt(e,10);this.minHeight=e,this.wwEditor.setMinHeight(n),this.mdEditor.setMinHeight(n),this.preview.setMinHeight(n)}},e.prototype.getMinHeight=function(){return this.minHeight},e.prototype.isMarkdownMode=function(){return"markdown"===this.mode},e.prototype.isWysiwygMode=function(){return"wysiwyg"===this.mode},e.prototype.isViewer=function(){return!1},e.prototype.getCurrentPreviewStyle=function(){return this.mdPreviewStyle},e.prototype.changeMode=function(e,t){if(this.mode!==e){if(this.mode=e,this.isWysiwygMode()){var n=this.toastMark.getRootNode(),a=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(a)}else{a=this.wwEditor.getModel();this.mdEditor.setMarkdown(this.convertor.toMarkdownText(a),!t)}if(this.eventEmitter.emit("removePopupWidget"),this.eventEmitter.emit("changeMode",e),!t){var l=this.convertor.getMappedPos();this.focus(),this.isWysiwygMode()&&re(l)?this.wwEditor.setSelection(l):Array.isArray(l)&&this.mdEditor.setSelection(l)}}},e.prototype.destroy=function(){var e=this;this.wwEditor.destroy(),this.mdEditor.destroy(),this.preview.destroy(),this.scrollSync.destroy(),this.eventEmitter.emit("destroy"),this.eventEmitter.getEvents().forEach((function(t,n){return e.off(n)}))},e.prototype.hide=function(){this.eventEmitter.emit("hide")},e.prototype.show=function(){this.eventEmitter.emit("show")},e.prototype.setScrollTop=function(e){this.getCurrentModeEditor().setScrollTop(e)},e.prototype.getScrollTop=function(){return this.getCurrentModeEditor().getScrollTop()},e.prototype.reset=function(){this.wwEditor.setModel([]),this.mdEditor.setMarkdown("")},e.prototype.getSelection=function(){return this.getCurrentModeEditor().getSelection()},e.prototype.setPlaceholder=function(e){this.placeholder=e,this.mdEditor.setPlaceholder(e),this.wwEditor.setPlaceholder(e)},e.prototype.getEditorElements=function(){return{mdEditor:this.mdEditor.getElement(),mdPreview:this.preview.getElement(),wwEditor:this.wwEditor.getElement()}},e.prototype.convertPosToMatchEditorMode=function(e,t,n){var a,l;void 0===t&&(t=e),void 0===n&&(n=this.mode);var o=this.mdEditor.view.state.doc,r=Array.isArray(e),i=Array.isArray(t),c=e,u=t;if(r!==i)throw new Error("Types of arguments must be same");return"markdown"!==n||r||i?"wysiwyg"===n&&r&&i&&(l=Yn(o,e,t),c=l[0],u=l[1]):(a=Zn(o,e,t),c=a[0],u=a[1]),[c,u]},e}();function F3(e){for(var t,n,a=arguments,l=1,o="",r="",i=[0],c=function(e){1===l&&(e||(o=o.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?i.push(e?a[e]:o):3===l&&(e||o)?(i[1]=e?a[e]:o,l=2):2===l&&"..."===o&&e?i[2]=Ke(i[2]||{},a[e]):2===l&&o&&!e?(i[2]=i[2]||{})[o]=!0:l>=5&&(5===l?((i[2]=i[2]||{})[n]=e?o?o+a[e]:a[e]:o,l=6):(e||o)&&(i[2][n]+=e?o+a[e]:o)),o=""},u=0;u"===t?(l=1,o=""):o=t+o[0]:r?t===r?r="":o+=t:'"'===t||"'"===t?r=t:">"===t?(c(),l=1):l&&("="===t?(l=5,n=o,o=""):"/"===t&&(l<5||">"===e[u][a+1])?(c(),3===l&&(i=i[0]),l=i,(i=i[0]).push(this.apply(null,l.slice(1))),l=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(c(),l=2):o+=t),3===l&&"!--"===o&&(l=4,i=i[0])}return c(),i.length>2?i.slice(1):i[1]}function H3(e){return"boolean"===typeof e||e instanceof Boolean}var z3=H3,_3=function(){function e(e){this.current=e,this.root=e,this.entering=!0}return e.prototype.walk=function(){var e=this,t=e.entering,n=e.current;return n?(t?n.firstChild?(this.current=n.firstChild,this.entering=!0):this.entering=!1:n===this.root?this.current=null:n.next?(this.current=n.next,this.entering=!0):(this.current=n.parent,this.entering=!1),{vnode:n,entering:t}):null},e}(),q3=function(){function e(e,t,n){this.parent=null,this.old=null,this.firstChild=null,this.next=null,this.skip=!1,this.type=e,this.props=t,this.children=n,this.props.children=n,t.ref&&(this.ref=t.ref,delete t.ref),t.key&&(this.key=t.key,delete t.key)}return e.prototype.walker=function(){return new _3(this)},e.removalNodes=[],e}();function $3(e){return new q3("TEXT_NODE",{nodeValue:e},[])}function U3(e,t){var n=e;z3(e)||null==e?n=null:(k(e)||re(e))&&(n=$3(String(e))),n&&t.push(n)}function W3(e,t){for(var n=[],a=2;a\n \n
\n
\n
0},e}(),W4="undefined"!==typeof WeakMap?new WeakMap:new w4,J4=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=N4.getInstance(),a=new U4(t,n,this);W4.set(this,a)}return e}();["observe","unobserve","disconnect"].forEach((function(e){J4.prototype[e]=function(){var t;return(t=W4.get(this))[e].apply(t,arguments)}}));var K4,G4,X4,Z4,Q4,Y4,e5,t5,n5,a5,l5,o5,r5,i5,c5,u5,s5=function(){return"undefined"!==typeof x4.ResizeObserver?x4.ResizeObserver:J4}(),d5=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.execCommand=function(e){var t=On(e.target,"li");this.props.execCommand("heading",{level:Number(t.getAttribute("data-level"))})},t.prototype.render=function(){var e=this;return J3(G4||(G4=m(["\n
\n "],["\n
\n "])),(function(t){return e.execCommand(t)}),T0.get("Headings"),[1,2,3,4,5,6].map((function(e){return J3(K4||(K4=m(['\n
\n <',">"," ","$>\n \n "],['\n
\n <',">"," ","$>\n \n "])),e,"h"+e,T0.get("Heading"),e)})),T0.get("Paragraph"))},t}(h4),p5=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.toggleTab=function(e,t){this.props.onClick(e,t)},t.prototype.render=function(){var e=this;return J3(Z4||(Z4=m(['\n
\n ',"\n
\n "],['\n
\n ',"\n
\n "])),fn("tabs"),this.props.tabs.map((function(t){var n=t.name,a=t.text,l=e.props.activeTab===n;return J3(X4||(X4=m(['\n
\n ',"\n
\n "],['\n
\n ',"\n
\n "])),l?" active":"",(function(t){return e.toggleTab(t,n)}),T0.get(a),l?"true":"false",l?"0":"-1",T0.get(a))})))},t}(h4),h5="ui",f5=function(e){function t(t){var n=e.call(this,t)||this;return n.initialize=function(e){void 0===e&&(e="file");var t=n.refs.url;t.value="",n.refs.altText.value="",n.refs.file.value="",le(t,"wrong"),n.setState({activeTab:e,file:null,fileNameElClassName:""})},n.execCommand=function(){"file"===n.state.activeTab?n.emitAddImageBlob():n.emitAddImage()},n.toggleTab=function(e,t){t!==n.state.activeTab&&n.initialize(t)},n.showFileSelectBox=function(){n.refs.file.click()},n.changeFile=function(e){var t=e.target.files;(null===t||void 0===t?void 0:t.length)&&n.setState({file:t[0]})},n.state={activeTab:"file",file:null,fileNameElClassName:""},n.tabs=[{name:"file",text:"File"},{name:"url",text:"URL"}],n}return p(t,e),t.prototype.emitAddImageBlob=function(){var e=this,t=this.refs.file.files,n=this.refs.altText,a=" wrong";if(null===t||void 0===t?void 0:t.length){a="";var l=t.item(0),o=function(t,a){return e.props.execCommand("addImage",{imageUrl:t,altText:a||n.value})};this.props.eventEmitter.emit("addImageBlobHook",l,o,h5)}this.setState({fileNameElClassName:a})},t.prototype.emitAddImage=function(){var e=this.refs.url,t=this.refs.altText,n=e.value,a=t.value||"image";le(e,"wrong"),n.length?n&&this.props.execCommand("addImage",{imageUrl:n,altText:a}):Q(e,"wrong")},t.prototype.preventSelectStart=function(e){e.preventDefault()},t.prototype.updated=function(){this.props.show||this.initialize()},t.prototype.render=function(){var e=this,t=this.state,n=t.activeTab,a=t.file,l=t.fileNameElClassName;return J3(Q4||(Q4=m(['\n
\n <'," tabs="," activeTab="," onClick=",' />\n
\n ',' \n \n
\n
\n ',' \n \n \n \n
\n
',' \n
\n
\n
\n \n <'," tabs="," activeTab="," onClick=",' />\n \n ',' \n \n
\n \n ',' \n \n \n \n
\n ',' \n \n \n
\n \n ',' \n \n ',' \n \n \n
\n \n ',' \n \n ',' \n \n \n \n
'],['
'])),i))}a.push(J3(t5||(t5=m(['',"
"],['',"
"])),fn("table-row"),o))}return J3(n5||(n5=m(['',"
"],['',"
"])),fn("table"),a)},t.prototype.render=function(){var e=this,t=this.getTableRange(),n=this.getSelectionAreaBound();return J3(a5||(a5=m(['\n \n ',"
\n \n "],['\n \n ',"
\n \n "])),T0.get("Insert table"),fn("table-selection"),(function(t){return e.refs.tableEl=t}),this.extendSelectionRange,this.execCommand,this.createTableArea(t),fn("table-selection-layer"),n,fn("table-description"),this.getDescription())},t}(h4),O5=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.mounted=function(){this.refs.el.appendChild(this.props.body)},t.prototype.updated=function(e){this.refs.el.replaceChild(this.props.body,e.body)},t.prototype.render=function(){var e=this;return J3(l5||(l5=m(["
"],["
"])),(function(t){return e.refs.el=t}))},t}(h4);function S5(e){return k(e)?N5(e):e}function E5(){var e=document.createElement("label"),t=document.createElement("input"),n=document.createElement("span");e.className="scroll-sync active",t.type="checkbox",t.checked=!0,n.className="switch";var a=function(n){return t.addEventListener("change",(function(t){var a=t.target.checked;a?Q(e,"active"):le(e,"active"),n("toggleScrollSync",{active:a})}))};return e.appendChild(t),e.appendChild(n),{name:"scrollSync",el:e,onMounted:a}}function N5(e){var t;switch(e){case"heading":t={name:"heading",className:"heading",tooltip:T0.get("Headings"),state:"heading"};break;case"bold":t={name:"bold",className:"bold",command:"bold",tooltip:T0.get("Bold"),state:"strong"};break;case"italic":t={name:"italic",className:"italic",command:"italic",tooltip:T0.get("Italic"),state:"emph"};break;case"strike":t={name:"strike",className:"strike",command:"strike",tooltip:T0.get("Strike"),state:"strike"};break;case"hr":t={name:"hr",className:"hrline",command:"hr",tooltip:T0.get("Line"),state:"thematicBreak"};break;case"quote":t={name:"quote",className:"quote",command:"blockQuote",tooltip:T0.get("Blockquote"),state:"blockQuote"};break;case"ul":t={name:"ul",className:"bullet-list",command:"bulletList",tooltip:T0.get("Unordered list"),state:"bulletList"};break;case"ol":t={name:"ol",className:"ordered-list",command:"orderedList",tooltip:T0.get("Ordered list"),state:"orderedList"};break;case"task":t={name:"task",className:"task-list",command:"taskList",tooltip:T0.get("Task"),state:"taskList"};break;case"table":t={name:"table",className:"table",tooltip:T0.get("Insert table"),state:"table"};break;case"image":t={name:"image",className:"image",tooltip:T0.get("Insert image")};break;case"link":t={name:"link",className:"link",tooltip:T0.get("Insert link")};break;case"code":t={name:"code",className:"code",command:"code",tooltip:T0.get("Code"),state:"code"};break;case"codeblock":t={name:"codeblock",className:"codeblock",command:"codeBlock",tooltip:T0.get("Insert CodeBlock"),state:"codeBlock"};break;case"indent":t={name:"indent",className:"indent",command:"indent",tooltip:T0.get("Indent"),state:"indent"};break;case"outdent":t={name:"outdent",className:"outdent",command:"outdent",tooltip:T0.get("Outdent"),state:"outdent"};break;case"scrollSync":t=E5();break;case"more":t={name:"more",className:"more",tooltip:T0.get("More")};break}return"scrollSync"!==t.name&&(t.className+=" "+fn("toolbar-icons")),t}function D5(e,t){var n=t.el,a=t.pos,l=t.popup,o=t.initialValues;switch(e){case"heading":return{render:function(e){return J3(o5||(o5=m(["<"," ..."," />"],["<"," ..."," />"])),d5,e)},className:fn("popup-add-heading"),fromEl:n,pos:a};case"link":return{render:function(e){return J3(r5||(r5=m(["<"," ..."," />"],["<"," ..."," />"])),m5,e)},className:fn("popup-add-link"),fromEl:n,pos:a,initialValues:o};case"image":return{render:function(e){return J3(i5||(i5=m(["<"," ..."," />"],["<"," ..."," />"])),f5,e)},className:fn("popup-add-image"),fromEl:n,pos:a};case"table":return{render:function(e){return J3(c5||(c5=m(["<"," ..."," />"],["<"," ..."," />"])),M5,e)},className:fn("popup-add-table"),fromEl:n,pos:a};case"customPopupBody":return l?h({render:function(e){return J3(u5||(u5=m(["<"," ..."," body="," />"],["<"," ..."," body="," />"])),O5,e,l.body)},fromEl:n,pos:a},l):null;default:return null}}function A5(e){e.hidden=e.length===e.filter((function(e){return e.hidden})).length}function L5(e,t){var n=function(e){return e.hidden="scrollSync"===e.name&&t,e};return e.reduce((function(e,t){e.push(t.map((function(e){return n(S5(e))})));var a=e[(e.length||1)-1];return a&&A5(a),e}),[])}function I5(e,t){e.forEach((function(e){e.forEach((function(e){return e.hidden="scrollSync"===e.name&&t})),A5(e)}))}var R5,j5,B5=20,P5=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleMousedown=function(e){On(e.target,"."+fn("popup"))||On(e.target,t.props.info.fromEl)||t.props.hidePopup()},t}return p(t,e),t.prototype.mounted=function(){document.addEventListener("mousedown",this.handleMousedown),this.props.eventEmitter.listen("closePopup",this.props.hidePopup)},t.prototype.beforeDestroy=function(){document.removeEventListener("mousedown",this.handleMousedown)},t.prototype.updated=function(e){var t=this.props,n=t.show,a=t.info;if(n&&a.pos&&e.show!==n){var l=h({},a.pos),o=this.refs.el.offsetWidth,r=On(this.refs.el,"."+fn("toolbar")),i=r.offsetWidth;l.left+o>=i&&(l.left=i-o-B5),ze(this.state.popupPos,l)||this.setState({popupPos:l})}},t.prototype.render=function(){var e=this,t=this.props,n=t.info,a=t.show,l=t.hidePopup,o=t.eventEmitter,r=t.execCommand,i=n||{},c=i.className,u=void 0===c?"":c,s=i.style,d=i.render,p=i.initialValues,f=void 0===p?{}:p,v=h(h({display:a?"block":"none"},s),this.state.popupPos);return J3(R5||(R5=m(['\n \n "],['\n \n "])),fn("popup"),u,v,(function(t){return e.refs.el=t}),fn("popup-body"),d&&d({eventEmitter:o,show:a,hidePopup:l,execCommand:r,initialValues:f}))},t}(h4),V5=6;function F5(e){return function(t){function n(e){var n=t.call(this,e)||this;return n.showTooltip=function(e){var t=n.props.item.tooltip;if(!n.props.disabled&&t){var a=n.getBound(e),l=a.left+V5+"px",o=a.top+V5+"px";R(n.props.tooltipRef.current,{display:"block",left:l,top:o}),n.props.tooltipRef.current.querySelector(".text").textContent=t}},n.hideTooltip=function(){R(n.props.tooltipRef.current,"display","none")},n.state={active:!1,disabled:e.disabled},n.addEvent(),n}return p(n,t),n.prototype.addEvent=function(){var e=this,t=this.props,n=t.item,a=t.eventEmitter;n.state&&a.listen("changeToolbarState",(function(t){var a,l=t.toolbarState,o=null!==(a=l[n.state])&&void 0!==a?a:{},r=o.active,i=o.disabled;e.setState({active:!!r,disabled:null!==i&&void 0!==i?i:e.props.disabled})}))},n.prototype.getBound=function(e){var t=Sn(e,On(e,"."+fn("toolbar"))),n=t.offsetLeft,a=t.offsetTop;return{left:n,top:e.offsetHeight+a}},n.prototype.render=function(){return J3(j5||(j5=m(["\n <","\n ...","\n active=","\n showTooltip=","\n hideTooltip=","\n getBound=","\n disabled=","\n />\n "],["\n <","\n ...","\n active=","\n showTooltip=","\n hideTooltip=","\n getBound=","\n disabled=","\n />\n "])),e,this.props,this.state.active,this.showTooltip,this.hideTooltip,this.getBound,this.state.disabled||this.props.disabled)},n}(h4)}var H5,z5,_5,q5,$5,U5,W5,J5,K5,G5,X5,Z5,Q5,Y5,e6=80,t6=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.showTooltip=function(){t.props.showTooltip(t.refs.el)},t.execCommand=function(){var e=t.props,n=e.item,a=e.execCommand,l=e.setPopupInfo,o=e.getBound,r=e.eventEmitter,i=n.command,c=n.name,u=n.popup;if(i)a(i);else{var s=u?"customPopupBody":c,d=r.emit("query","getPopupInitialValues",{popupName:s})[0],p=D5(s,{el:t.refs.el,pos:o(t.refs.el),popup:u,initialValues:d});p&&l(p)}},t}return p(t,e),t.prototype.mounted=function(){this.setItemWidth()},t.prototype.updated=function(e){e.item.name!==this.props.item.name&&this.setItemWidth()},t.prototype.setItemWidth=function(){var e=this.props,t=e.setItemWidth,n=e.item;t&&t(n.name,Mn(this.refs.el)+(n.hidden?e6:0))},t.prototype.render=function(){var e=this,t=this.props,n=t.hideTooltip,a=t.disabled,l=t.item,o=t.active,r=h({display:l.hidden?"none":null},l.style),i=(l.className||"")+(o?" active":"");return J3(H5||(H5=m(["\n \n \n
';this.tooltipRef.current=Tn(e,this.refs.el)},t.prototype.hiddenScrollSync=function(){return"wysiwyg"===this.props.editorType||"tab"===this.props.previewStyle},t.prototype.movePrevItemToDropdownToolbar=function(e,t,n,a){var l=function(e){var t=e.pop();t&&a.push(t)};if(e>1)l(n);else{var o=_e(t);o&&l(o)}},t.prototype.classifyToolbarItems=function(){var e=this,t=0,n=this.refs.el.clientWidth,a=this.refs.el.querySelector("."+fn("toolbar-divider")),l=a?Mn(a):0,o=[],r=[],i=!1;return this.initialItems.forEach((function(a,c){var u=[],s=[];a.forEach((function(a,l){a.hidden||(t+=e.itemWidthMap[a.name],t>n-u6?(i||(e.movePrevItemToDropdownToolbar(l,o,u,s),i=!0),s.push(a)):u.push(a))})),u.length&&(A5(u),o.push(u)),s.length&&(A5(s),r.push(s)),c
\n \n <'," tabs="," activeTab="," onClick=",' />\n
\n \n
\n <'," tabs="," activeTab="," onClick=",' />\n
\n
\n
'," \n \n "],["\n
\n '," \n \n "])),c,r?" disabled":"",o,n))})),t.push(J3(G5||(G5=m(['"],['"])),a)),t}),[]):[]},t.prototype.render=function(){var e=h({display:this.state.pos?"block":"none"},this.state.pos);return J3(X5||(X5=m(['
\n ',"\n
"],['
\n ',"\n
"])),fn("context-menu"),e,this.getMenuGroupElements())},t}(h4),p6=function(e){function t(t){var n=e.call(this,t)||this;n.changeMode=function(e){e!==n.state.editorType&&n.setState({editorType:e})},n.changePreviewStyle=function(e){e!==n.state.previewStyle&&n.setState({previewStyle:e})},n.hide=function(){n.setState({hide:!0})},n.show=function(){n.setState({hide:!1})};var a=t.editorType,l=t.previewStyle;return n.state={editorType:a,previewStyle:l,hide:!1},n.addEvent(),n}return p(t,e),t.prototype.mounted=function(){var e=this.props.slots,t=e.wwEditor,n=e.mdEditor,a=e.mdPreview;this.refs.wwContainer.appendChild(t),this.refs.mdContainer.insertAdjacentElement("afterbegin",n),this.refs.mdContainer.appendChild(a)},t.prototype.insertToolbarItem=function(e,t){this.toolbar.insertToolbarItem(e,t)},t.prototype.removeToolbarItem=function(e){this.toolbar.removeToolbarItem(e)},t.prototype.render=function(){var e=this,t=this.props,n=t.eventEmitter,a=t.hideModeSwitch,l=t.toolbarItems,o=t.theme,r=this.state,i=r.hide,c=r.previewStyle,u=r.editorType,s=i?" hidden":"",d=fn("markdown"===u?"md-mode":"ww-mode"),p=fn("md")+"-"+c+"-style",h=fn(["light"!==o,o+" "]);return J3(Q5||(Q5=m(['\n
\n
\n
\n
\n
\n
\n
\n
\n
",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),r="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),i="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),u="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),s=o&&(c||+o[1]<57)||i&&c,d=0;d<10;d++)a[48+d]=a[96+d]=String(d);for(d=1;d<=24;d++)a[d+111]="F"+d;for(d=65;d<=90;d++)a[d]=String.fromCharCode(d+32),l[d]=String.fromCharCode(d);for(var p in a)l.hasOwnProperty(p)||(l[p]=a[p]);function h(e){var t=s&&(e.ctrlKey||e.altKey||e.metaKey)||(r||u)&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key,n=!t&&e.key||(e.shiftKey?l:a)[e.keyCode]||e.key||"Unidentified";return"Esc"==n&&(n="Escape"),"Del"==n&&(n="Delete"),"Left"==n&&(n="ArrowLeft"),"Up"==n&&(n="ArrowUp"),"Right"==n&&(n="ArrowRight"),"Down"==n&&(n="ArrowDown"),n}var f=n("5313"),m="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function v(e){var t,n,a,l,o=e.split(/-(?!$)/),r=o[o.length-1];"Space"==r&&(r=" ");for(var i=0;i
127)&&(l=a[n.keyCode])&&l!=o){var c=t[g(l,n,!0)];if(c&&c(e.state,e.dispatch,e))return!0}else if(r&&n.shiftKey){var u=t[g(o,n,!0)];if(u&&u(e.state,e.dispatch,e))return!0}return!1}}},8589:function(e,t,n){"use strict";var a=n("7a23"),l=n("267e");const o={class:"value"};var r={__name:"index",props:{placeholder:{default:"请输入图标名称",type:String},modelValue:{default:"",type:String},width:{default:l["a"],type:String}},emits:["update:modelValue"],setup(e,{emit:t}){const l=Object(a["ref"])([]),r=(e,t)=>{const n=e?l.value.filter(i(e)):l.value;t(n)},i=e=>t=>0===t.value.toLowerCase().indexOf(e.toLowerCase()),c=e=>{t("update:modelValue",e.value)},u=()=>{const e=n("51ff"),t=e.keys().map(e=>{const t=e.split("/")[1],n=t.split(".")[0];return{value:n,link:n}});return t};Object(a["ref"])(!1);Object(a["onMounted"])(()=>{l.value=u()});const s=e=>{t("update:modelValue",e)};return(t,n)=>{const l=Object(a["resolveComponent"])("SvgIcon"),i=Object(a["resolveComponent"])("el-autocomplete");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"form-item-box choose-icon-zj",style:Object(a["normalizeStyle"])({width:e.width})},[Object(a["createVNode"])(i,Object(a["mergeProps"])(t.$attrs,{modelValue:e.modelValue,"onUpdate:modelValue":n[0]||(n[0]=e=>Object(a["isRef"])(modelValue)?modelValue.value=e:null),"fetch-suggestions":r,"popper-class":"choose-icon-zj-autocomplete",placeholder:e.placeholder,onChange:s,onSelect:c}),{prefix:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{icon:e.modelValue},null,8,["icon"])]),default:Object(a["withCtx"])(({item:e})=>[Object(a["createVNode"])(l,{icon:e.link},null,8,["icon"]),Object(a["createElementVNode"])("div",o,Object(a["toDisplayString"])(e.value),1)]),_:1},16,["modelValue","placeholder"])],4)}}};const i=r;t["a"]=i},8726:function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return N})),n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return D}));var a=200,l=function(){};l.prototype.append=function(e){return e.length?(e=l.from(e),!this.length&&e||e.length=t?l.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},l.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},l.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},l.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var a=[];return this.forEach((function(t,n){return a.push(e(t,n))}),t,n),a},l.from=function(e){return e instanceof l?e:e&&e.length?new o(e):l.empty};var o=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,a){for(var l=t;l=n;l--)if(!1===e(this.values[l],a+l))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=a)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=a)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(l);l.empty=new o([]);var r=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return el&&!1===this.right.forEachInner(e,Math.max(t-l,0),Math.min(this.length,n)-l,a+l))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,a){var l=this.left.length;return!(t>l&&!1===this.right.forEachInvertedInner(e,t-l,Math.max(n,l)-l,a+l))&&(!(n=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(l),i=l,c=i,u=n("0ac0"),s=n("5313"),d=500,p=function(e,t){this.items=e,this.eventCount=t};function h(e,t){var n;return e.forEach((function(e,a){if(e.selection&&0==t--)return n=a,!1})),e.slice(n)}p.prototype.popEvent=function(e,t){var n=this;if(0==this.eventCount)return null;for(var a,l,o=this.items.length;;o--){var r=this.items.get(o-1);if(r.selection){--o;break}}t&&(a=this.remapping(o,this.items.length),l=a.maps.length);var i,c,u=e.tr,s=[],d=[];return this.items.forEach((function(e,t){if(!e.step)return a||(a=n.remapping(o,t+1),l=a.maps.length),l--,void d.push(e);if(a){d.push(new f(e.map));var r,h=e.step.map(a.slice(l));h&&u.maybeStep(h).doc&&(r=u.mapping.maps[u.mapping.maps.length-1],s.push(new f(r,null,null,s.length+d.length))),l--,r&&a.appendMap(r,l)}else u.maybeStep(e.step);return e.selection?(i=a?e.selection.map(a.slice(l)):e.selection,c=new p(n.items.slice(0,o).append(d.reverse().concat(s)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:c,transform:u,selection:i}},p.prototype.addTransform=function(e,t,n,a){for(var l=[],o=this.eventCount,r=this.items,i=!a&&r.length?r.get(r.length-1):null,c=0;cv&&(r=h(r,m),o-=m),new p(r.append(l),o)},p.prototype.remapping=function(e,t){var n=new u["a"];return this.items.forEach((function(t,a){var l=null!=t.mirrorOffset&&a-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:null;n.appendMap(t.map,l)}),e,t),n},p.prototype.addMaps=function(e){return 0==this.eventCount?this:new p(this.items.append(e.map((function(e){return new f(e)}))),this.eventCount)},p.prototype.rebased=function(e,t){if(!this.eventCount)return this;var n=[],a=Math.max(0,this.items.length-t),l=e.mapping,o=e.steps.length,r=this.eventCount;this.items.forEach((function(e){e.selection&&r--}),a);var i=t;this.items.forEach((function(t){var a=l.getMirror(--i);if(null!=a){o=Math.min(o,a);var c=l.maps[a];if(t.step){var u=e.steps[a].invert(e.docs[a]),s=t.selection&&t.selection.map(l.slice(i+1,a));s&&r++,n.push(new f(c,u,s))}else n.push(new f(c))}}),a);for(var c=[],u=t;ud&&(h=h.compress(this.items.length-n.length)),h},p.prototype.emptyItemCount=function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e},p.prototype.compress=function(e){void 0===e&&(e=this.items.length);var t=this.remapping(0,e),n=t.maps.length,a=[],l=0;return this.items.forEach((function(o,r){if(r>=e)a.push(o),o.selection&&l++;else if(o.step){var i=o.step.map(t.slice(n)),c=i&&i.getMap();if(n--,c&&t.appendMap(c,n),i){var u=o.selection&&o.selection.map(t.slice(n));u&&l++;var s,d=new f(c.invert(),i,u),p=a.length-1;(s=a.length&&a[p].merge(d))?a[p]=s:a.push(d)}}else o.map&&n--}),this.items.length,0),new p(c.from(a.reverse()),l)},p.empty=new p(c.empty,0);var f=function(e,t,n,a){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=a};f.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new f(t.getMap().invert(),t,this.selection)}};var m=function(e,t,n,a){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=a},v=20;function b(e,t,n,a){var l,o=n.getMeta(M);if(o)return o.historyState;n.getMeta(O)&&(e=new m(e.done,e.undone,null,0));var r=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(r&&r.getMeta(M))return r.getMeta(M).redo?new m(e.done.addTransform(n,null,a,T(t)),e.undone,y(n.mapping.maps[n.steps.length-1]),e.prevTime):new m(e.done,e.undone.addTransform(n,null,a,T(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||r&&!1===r.getMeta("addToHistory"))return(l=n.getMeta("rebased"))?new m(e.done.rebased(n,l),e.undone.rebased(n,l),w(e.prevRanges,n.mapping),e.prevTime):new m(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),w(e.prevRanges,n.mapping),e.prevTime);var i=0==e.prevTime||!r&&(e.prevTime<(n.time||0)-a.newGroupDelay||!g(n,e.prevRanges)),c=r?w(e.prevRanges,n.mapping):y(n.mapping.maps[n.steps.length-1]);return new m(e.done.addTransform(n,i?t.selection.getBookmark():null,a,T(t)),p.empty,c,n.time)}function g(e,t){if(!t)return!1;if(!e.docChanged)return!0;var n=!1;return e.mapping.maps[0].forEach((function(e,a){for(var l=0;l=t[l]&&(n=!0)})),n}function y(e){var t=[];return e.forEach((function(e,n,a,l){return t.push(a,l)})),t}function w(e,t){if(!e)return null;for(var n=[],a=0;a
* @license MIT
*/
(function(t,a){e.exports=a(n("5865"))})(self,(function(e){return function(){"use strict";var t={213:function(t){t.exports=e}},n={};function a(e){var l=n[e];if(void 0!==l)return l.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,a),o.exports}!function(){a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,{a:t}),t}}(),function(){a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}();var l={};return function(){a.r(l);var e=a(213),t=a.n(e);t().setLanguage("zh-CN",{Markdown:"Markdown",WYSIWYG:"所见即所得",Write:"编辑",Preview:"预览",Headings:"标题",Paragraph:"文本",Bold:"加粗",Italic:"斜体字",Strike:"删除线",Code:"内嵌代码",Line:"水平线",Blockquote:"引用块","Unordered list":"无序列表","Ordered list":"有序列表",Task:"任务",Indent:"缩进",Outdent:"减少缩进","Insert link":"插入链接","Insert CodeBlock":"插入代码块","Insert table":"插入表格","Insert image":"插入图片",Heading:"标题","Image URL":"图片网址","Select image file":"选择图片文件","Choose a file":"选择一个文件","No file":"没有文件",Description:"说明",OK:"确认",More:"更多",Cancel:"取消",File:"文件",URL:"URL","Link text":"链接文本","Add row to up":"向上添加行","Add row to down":"在下方添加行","Add column to left":"在左侧添加列","Add column to right":"在右侧添加列","Remove row":"删除行","Remove column":"删除列","Align column to left":"左对齐","Align column to center":"居中对齐","Align column to right":"右对齐","Remove table":"删除表格","Would you like to paste as table?":"需要粘贴为表格吗?","Text color":"文字颜色","Auto scroll enabled":"自动滚动已启用","Auto scroll disabled":"自动滚动已禁用","Choose language":"选择语言"})}(),l}()}))},f513:function(e,t,n){},f522:function(e,t,n){},f95e:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return u}));var a=n("5313"),l=(n("0ac0"),function(e,t){this.match=e,this.handler="string"==typeof t?o(t):t});function o(e){return function(t,n,a,l){var o=e;if(n[1]){var r=n[0].lastIndexOf(n[1]);o+=n[0].slice(r+n[1].length),a+=r;var i=a-l;i>0&&(o=n[0].slice(r-i,r)+o,a=l)}return t.tr.insertText(o,a,l)}}var r=500;function i(e){var t=e.rules,n=new a["d"]({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,a,l,o){return c(e,a,l,o,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout((function(){var a=e.state.selection,l=a.$cursor;l&&c(e,l.pos,l.pos,"",t,n)}))}}},isInputRules:!0});return n}function c(e,t,n,a,l,o){if(e.composing)return!1;var i=e.state,c=i.doc.resolve(t);if(c.parent.type.spec.code)return!1;for(var u=c.parent.textBetween(Math.max(0,c.parentOffset-r),c.parentOffset,null,"")+a,s=0;s=0;c--)r.step(i.steps[c].invert(i.docs[c]));if(o.text){var u=r.doc.resolve(o.from).marks();r.replaceWith(o.from,o.to,e.schema.text(o.text,u))}else r.delete(o.from,o.to);t(r)}return!0}}return!1}new l(/--$/,"—"),new l(/\.\.\.$/,"…"),new l(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new l(/"$/,"”"),new l(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new l(/'$/,"’")}}]);