(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-413bfb5f"],{"0031":function(e,t,n){e.exports=n.p+"img/classic12.png"},"0068":function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e)}function i(e){return"[object String]"===r(e)}var o=Object.prototype.hasOwnProperty;function a(e,t){return o.call(e,t)}function s(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!==typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e}function l(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function c(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function h(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var u=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,d=/&([a-z#][a-z0-9]{1,31});/gi,f=new RegExp(u.source+"|"+d.source,"gi"),p=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i,m=n("bd68");function g(e,t){var n;return a(m,t)?m[t]:35===t.charCodeAt(0)&&p.test(t)&&(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),c(n))?h(n):e}function v(e){return e.indexOf("\\")<0?e:e.replace(u,"$1")}function b(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(f,(function(e,t,n){return t||g(e,n)}))}var y=/[&<>"]/,w=/[&<>"]/g,x={"&":"&","<":"<",">":">",'"':"""};function k(e){return x[e]}function C(e){return y.test(e)?e.replace(w,k):e}var T=/[.?*+^$[\]\\(){}|-]/g;function A(e){return e.replace(T,"\\$&")}function S(e){switch(e){case 9:case 32:return!0}return!1}function E(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var M=n("7ca0");function N(e){return M.test(e)}function O(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function D(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}t.lib={},t.lib.mdurl=n("d8a6"),t.lib.ucmicro=n("d5d1"),t.assign=s,t.isString=i,t.has=a,t.unescapeMd=v,t.unescapeAll=b,t.isValidEntityCode=c,t.fromCodePoint=h,t.escapeHtml=C,t.arrayReplaceAt=l,t.isSpace=S,t.isWhiteSpace=E,t.isMdAsciiPunct=O,t.isPunctChar=N,t.escapeRE=A,t.normalizeReference=D},"006f":function(e,t,n){},"0082":function(e,t,n){e.exports=n.p+"img/ditu.svg"},"00ee":function(e,t,n){"use strict";var r=n("b622"),i=r("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},"013e":function(e,t,n){},"027d":function(e,t,n){e.exports=n.p+"img/zhongyangjie.svg"},"02a0":function(e,t,n){e.exports=n.p+"img/a-18-xiguan.svg"},"030b":function(e,t,n){"use strict";n("4928")},"032e":function(e,t,n){e.exports=n.p+"img/gold.jpg"},"0455":function(e,t,n){e.exports=n.p+"img/zhongqiujie.svg"},"049e":function(e,t,n){e.exports=n.p+"img/shiyan.svg"},"05c4":function(e,t,n){e.exports=n.p+"img/romanticPurple.jpg"},"0613":function(e,t,n){e.exports=n.p+"img/a-6-jiancebi.svg"},"0628":function(e,t,n){var r,i,o=n("bbc7"),a=n("2ed7").isArray;function s(e){var t=o.copyOptions(e);return o.ensureFlagExists("ignoreDeclaration",t),o.ensureFlagExists("ignoreInstruction",t),o.ensureFlagExists("ignoreAttributes",t),o.ensureFlagExists("ignoreText",t),o.ensureFlagExists("ignoreComment",t),o.ensureFlagExists("ignoreCdata",t),o.ensureFlagExists("ignoreDoctype",t),o.ensureFlagExists("compact",t),o.ensureFlagExists("indentText",t),o.ensureFlagExists("indentCdata",t),o.ensureFlagExists("indentAttributes",t),o.ensureFlagExists("indentInstruction",t),o.ensureFlagExists("fullTagEmptyElement",t),o.ensureFlagExists("noQuotesForNativeAttributes",t),o.ensureSpacesExists(t),"number"===typeof t.spaces&&(t.spaces=Array(t.spaces+1).join(" ")),o.ensureKeyExists("declaration",t),o.ensureKeyExists("instruction",t),o.ensureKeyExists("attributes",t),o.ensureKeyExists("text",t),o.ensureKeyExists("comment",t),o.ensureKeyExists("cdata",t),o.ensureKeyExists("doctype",t),o.ensureKeyExists("type",t),o.ensureKeyExists("name",t),o.ensureKeyExists("elements",t),o.checkFnExists("doctype",t),o.checkFnExists("instruction",t),o.checkFnExists("cdata",t),o.checkFnExists("comment",t),o.checkFnExists("text",t),o.checkFnExists("instructionName",t),o.checkFnExists("elementName",t),o.checkFnExists("attributeName",t),o.checkFnExists("attributeValue",t),o.checkFnExists("attributes",t),o.checkFnExists("fullTagEmptyElement",t),t}function l(e,t,n){return(!n&&e.spaces?"\n":"")+Array(t+1).join(e.spaces)}function c(e,t,n){if(t.ignoreAttributes)return"";"attributesFn"in t&&(e=t.attributesFn(e,i,r));var o,a,s,c,h=[];for(o in e)e.hasOwnProperty(o)&&null!==e[o]&&void 0!==e[o]&&(c=t.noQuotesForNativeAttributes&&"string"!==typeof e[o]?"":'"',a=""+e[o],a=a.replace(/"/g,"""),s="attributeNameFn"in t?t.attributeNameFn(o,a,i,r):o,h.push(t.spaces&&t.indentAttributes?l(t,n+1,!1):" "),h.push(s+"="+c+("attributeValueFn"in t?t.attributeValueFn(a,o,i,r):a)+c));return e&&Object.keys(e).length&&t.spaces&&t.indentAttributes&&h.push(l(t,n,!1)),h.join("")}function h(e,t,n){return r=e,i="xml",t.ignoreDeclaration?"":""}function u(e,t,n){if(t.ignoreInstruction)return"";var o;for(o in e)if(e.hasOwnProperty(o))break;var a="instructionNameFn"in t?t.instructionNameFn(o,e[o],i,r):o;if("object"===typeof e[o])return r=e,i=a,""+a+c(e[o][t.attributesKey],t,n)+"?>";var s=e[o]?e[o]:"";return"instructionFn"in t&&(s=t.instructionFn(s,o,i,r)),""+a+(s?" "+s:"")+"?>"}function d(e,t){return t.ignoreComment?"":"\x3c!--"+("commentFn"in t?t.commentFn(e,i,r):e)+"--\x3e"}function f(e,t){return t.ignoreCdata?"":"","]]]]>"))+"]]>"}function p(e,t){return t.ignoreDoctype?"":""}function m(e,t){return t.ignoreText?"":(e=""+e,e=e.replace(/&/g,"&"),e=e.replace(/&/g,"&").replace(//g,">"),"textFn"in t?t.textFn(e,i,r):e)}function g(e,t){var n;if(e.elements&&e.elements.length)for(n=0;nk((l-n)/w)&&T("overflow"),n+=(s-t)*w,t=s,a=0;as&&(n=s-l),o=n;o>=0;o--){for(var u=!0,d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return A(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return M(this,e,t,n);case"base64":return N(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var z=4096;function I(e){var t=e.length;if(t<=z)return String.fromCharCode.apply(String,e);var n="",r=0;while(r",e},e}(),Ce={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},Te=function(){function e(e,t,n,r,i,o,a,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=o||0,this.classes=a||[],this.style=s||{},this.maxFontSize=0;var l=P(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Ce[this.text])}var t=e.prototype;return t.hasClass=function(e){return m.contains(this.classes,e)},t.toNode=function(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&(t=document.createElement("span"),t.style.marginRight=me(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=ge(this.classes)),this.style)this.style.hasOwnProperty(n)&&(t=t||document.createElement("span"),t.style[n]=this.style[n]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=m.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+m.escape(n)+'"');var i=m.escape(this.text);return e?(t+=">",t+=i,t+="",t):i},e}(),Ae=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);for(var r=0;r
0?3*u:7*u,p=t.fontMetrics().denom1):(h>0?(d=t.fontMetrics().num2,f=u):(d=t.fontMetrics().num3,f=3*u),p=t.fontMetrics().denom2),c){var w=t.fontMetrics().axisHeight;d-a.depth-(w+.5*h)
/i,sn=/|/,ln="
";function cn(e,t,n){var r=parseInt(e.left,10),i=parseInt(e.top,10),o=parseInt(e.width,10)+parseInt(e.paddingLeft,10)+parseInt(e.paddingRight,10),a=parseInt(e.height,10)+parseInt(e.paddingTop,10)+parseInt(e.paddingBottom,10);return t>=r&&t<=r+o&&n>=i&&n<=i+a}var hn="toastui-editor-";function un(){for(var e=[],t=0;t
<\/p>/gi,""),n=new RegExp(rn,"ig"),r=t.match(n);return null===r||void 0===r||r.forEach((function(e,n){if(an.test(e)){var i=ln;if(n){var o=r[n-1],a=o.match(tn);if(a&&!/br/i.test(a[1])){var s=a[1];i=""+s+"><"+s+">"}}t=t.replace(an,i)}})),t}function En(e){var t=//g,n=/ class="ProseMirror-trailingBreak"/g,r=e;return r=r.replace(t,""),r=r.replace(n,""),r}var Mn=new a["PluginKey"]("widget"),Nn=5,On=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=Cn(e.dom.parentElement,"."+un("defaultUI"))})),this.eventEmitter.listen("removePopupWidget",this.removeWidget)}return e.prototype.update=function(e){var t=Mn.getState(e.state);if(this.removeWidget(),t){var n=t.node,r=t.style,i=e.coordsAtPos(t.pos),o=i.top,a=i.left,s=i.bottom,l=s-o,c=this.rootEl.getBoundingClientRect(),h=o-c.top;I(n,{opacity:"0"}),this.rootEl.appendChild(n),I(n,{position:"absolute",left:a-c.left+Nn+"px",top:("bottom"===r?h+l-Nn:h-l)+"px",opacity:"1"}),this.popup=n,e.focus()}},e.prototype.destroy=function(){this.eventEmitter.removeEventHandler("blur",this.removeWidget)},e}();function Dn(e){return new a["Plugin"]({key:Mn,state:{init:function(){return null},apply:function(e){return e.getMeta("widget")}},view:function(t){return new On(t,e)}})}function Ln(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 zn(e,t,n){var r=function(n,r){e.emit("command","addImage",{imageUrl:n,altText:r||t.name||"image"})};e.emit("addImageBlobHook",t,r,n)}function In(e){var t=Qe(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 Rn(e){var t=e.eventEmitter;return new a["Plugin"]({props:{handleDOMEvents:{drop:function(e,n){var r,i=null===(r=n.dataTransfer)||void 0===r?void 0:r.files;return i&&A(i,(function(e){return-1===e.type.indexOf("image")||(n.preventDefault(),n.stopPropagation(),zn(t,e,n.type),!1)})),!0}}}})}var Fn=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 Pn(e){var t=document.createElement("span"),n=Nt(e.attrs.info,e.textContent);return t.className="tui-widget",t.appendChild(n),{dom:t}}function Bn(e){return"widget"===e.type.name}var jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(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+)/),r=n[1];return{info:r}}}]}},enumerable:!1,configurable:!0}),t}(Fn),Hn=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 a["EditorState"].create({schema:this.schema,plugins:this.createPlugins()})},e.prototype.initEvent=function(){var e=this,t=e.eventEmitter,n=e.view,r=e.editorType;n.dom.addEventListener("focus",(function(){return t.emit("focus",r)})),n.dom.addEventListener("blur",(function(){return t.emit("blur",r)}))},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=p(p([],this.keymaps),[Object(s["keymap"])(f({"Shift-Enter":l["a"].Enter},l["a"])),Object(h["a"])(),Ft(this.placeholder),Dn(this.eventEmitter),Rn(this.context)]);return e?t.concat(e):t},enumerable:!1,configurable:!0}),e.prototype.createInputRules=function(){var e=Ot(),t=e.map((function(e){var t=e.rule;return new c["InputRule"](t,(function(e,n,r,i){var o=e.schema,a=e.tr,s=e.doc,l=n.input.match(new RegExp(t,"g")),c=s.resolve(r),h=c.parent,u=0;if(Bn(h)&&(h=c.node(c.depth-1)),h.forEach((function(e){return Bn(e)&&(u+=1)})),l.length>u){var d=qe(l),f=zt(d,o);return a.replaceWith(i-d.length+1,i,f)}return null}))}));return t.length?Object(c["inputRules"])({rules:t}):null},e.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.createSchema=function(){return new r["Schema"]({nodes:this.specs.nodes,marks:this.specs.marks})},e.prototype.createKeymaps=function(e){var t=Rt(),n=t.undo,r=t.redo,i=this.specs.keymaps(e),o={"Mod-z":n(),"Shift-Mod-z":r()};return e?i.concat(Object(s["keymap"])(o)):i},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(tt(t,1)).scrollIntoView()),e&&this.focus()},e.prototype.moveCursorToEnd=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(tt(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){I(this.el,{height:e+"px"})},e.prototype.setMinHeight=function(e){I(this.el,{minHeight:e+"px"})},e.prototype.getElement=function(){return this.el},e}();function Un(e){return e instanceof Function}var qn=Un,Wn=["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 _n(e,t,n){return e.focus(),t(n)(e.state,e.dispatch,e)}var Gn=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,r=t.name,i=t.schema;return f(f({},e),(n={},n[r]=i,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,r=t.name,i=t.schema;return f(f({},e),(n={},n[r]=i,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 r={},i=n.commands();return qn(i)?r[n.name]=function(t){return _n(e,i,t)}:Object.keys(i).forEach((function(t){r[t]=function(n){return _n(e,i[t],n)}})),f(f({},t),r)}),{}),r=Rt();return Object.keys(r).forEach((function(t){n[t]=function(n){return _n(e,r[t],n)}})),t&&Object.keys(t).forEach((function(r){n[r]=function(n){return _n(e,t[r],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){De(Wn,e)||delete t[e]})),Object(s["keymap"])(t)}))},e.prototype.setContext=function(e){this.specs.forEach((function(t){t.setContext(e)}))},e}();function Vn(e){var t=e.from,n=e.to;return e instanceof a["AllSelection"]?[t+1,n-1]:[t,n]}function Kn(e){return e.index(0)+1}function Yn(e,t,n){void 0===n&&(n=1);var r=0;return e.forEach((function(e,i){Bn(e)&&i+2
\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,r=t.entering,i=null===(n=e.parent)||void 0===n?void 0:n.parent;return i&&"list"===i.type&&i.listData.tight?null:{type:r?"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,r=e.listData,i=r.type,o=r.start,a="bullet"===i?"ul":"ol",s={};return"ol"===a&&null!==o&&1!==o&&(s.start=o.toString()),{type:n?"openTag":"closeTag",tagName:a,attributes:s,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,r=n.tagFilter?HJ(e.literal):e.literal;return{type:"html",content:r}},htmlBlock:function(e,t){var n=t.options,r=n.tagFilter?HJ(e.literal):e.literal;return n.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:r},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:r,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+/):[],r=[];return n.length>0&&n[0].length>0&&r.push("language-"+tY(n[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:r},{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 r=e,i=r.title,o=r.destination;return{type:"openTag",tagName:"a",attributes:Lo({href:tY(o)},i&&{title:tY(i)})}}return{type:"closeTag",tagName:"a"}},image:function(e,t){var n=t.getChildrenText,r=t.skipChildren,i=e,o=i.title,a=i.destination;return r(),{type:"openTag",tagName:"img",selfClose:!0,attributes:Lo({src:tY(a),alt:n(e)},o&&{title:tY(o)})}},customBlock:function(e,t,n){var r=e.info.trim().toLowerCase(),i=n[r];if(i)try{return i(e,t)}catch(o){console.warn("[@toast-ui/editor] - The error occurred when "+r+" 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 r=e,i=r.info,o=r.firstChild,a=i.trim().toLowerCase(),s=n[a],l=t.entering;if(s)try{return s(e,t)}catch(c){console.warn("[@toast-ui/editor] - The error occurred when "+a+" inline node was parsed in markdown renderer: "+c)}return l?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+i+(o?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},qJ={strike:function(e,t){var n=t.entering;return{type:n?"openTag":"closeTag",tagName:"del"}},item:function(e,t){var n=t.entering,r=e.listData,i=r.checked,o=r.task;if(n){var a={type:"openTag",tagName:"li",outerNewLine:!0};return o?[a,{type:"openTag",tagName:"input",selfClose:!0,attributes:Lo(Lo({},i&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:a}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 r=[];if(e.lastChild)for(var i=e.parent.parent.columns.length,o=e.lastChild.endIdx,a=o+1;a0&&this.buffer.push(' class="'+r.join(" ")+'"'),i&&Object.keys(i).forEach((function(e){var n=i[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"!==cX(cX(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(tY(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 VJ(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t
/.test(e.prev.literal),r=n?"\n":"
\n";return{type:"html",content:r}},item:function(e,t){var n=t.entering;if(n){var r={},i=[];return e.listData.task&&(r["data-task"]="",i.push("task-list-item"),e.listData.checked&&(i.push("checked"),r["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:i,attributes:r,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,r=t.info,i=r?r.split(/\s+/):[],o=[],a={};if(n>3&&(a["data-backticks"]=n),i.length>0&&i[0].length>0){var s=i[0];o.push("lang-"+s),a["data-language"]=s}return[{type:"openTag",tagName:"pre",classNames:o},{type:"openTag",tagName:"code",attributes:a},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(e,t){var n=t.origin,r=t.entering,i=t.skipChildren,o=e.info;if(-1!==o.indexOf("widget")&&r){i();var a=It(e),s=Nt(o,a).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:s},{type:"closeTag",tagName:"span"}]}return n()}};function t$(e,t){var n=f({},e$);return e&&(n.link=function(t,n){var r=n.entering,i=n.origin,o=i();return r&&(o.attributes=f(f({},o.attributes),e)),o}),t&&Object.keys(t).forEach((function(e){var r=n[e],i=t[e];r&&qn(i)?n[e]=function(e,t){var n=f({},t);return n.origin=function(){return r(e,t)},i(e,n)}:De(["htmlBlock","htmlInline"],e)&&!qn(i)?n[e]=function(e,t){var n=e.literal.match(on);if(n){var r=n[0],o=n[1],a=n[3],s=(o||a).toLowerCase(),l=i[s],c=KQ(e,s);if(l){var h=f({},e);return h.attrs=YQ(r),h.childrenHTML=c,h.type=s,t.entering=!$Q.test(e.literal),l(h,t)}}return t.origin()}:n[e]=i})),n}var n$=["list","item","blockQuote"],r$=["UL","OL","BLOCKQUOTE"];function i$(e,t){var n,r=e.child(t);return!r.childCount||1===r.childCount&&!(null===(n=r.firstChild.text)||void 0===n?void 0:n.trim())}function o$(e,t,n){var r=ot(t)-1,i=at(t)-1,o=n[r].getBoundingClientRect(),a=n[i].offsetTop-n[r].offsetTop+n[i].clientHeight;return{height:a<=0?n[r].clientHeight:a+a$(e,n,Math.min(i+1,e.childCount-1)),rect:o}}function a$(e,t,n){var r=e.childCount-1,i=0;while(n<=r&&i$(e,n))i+=t[n].clientHeight,n+=1;return i}function s$(e,t){while(!e.getAttribute("data-nodeid")&&e.parentElement!==t)e=e.parentElement;return e}function l$(e,t){var n=0;while(e&&e!==t){if(De(r$,e.tagName)||(n+=e.offsetTop),e.offsetParent===t.offsetParent)break;e=e.parentElement}return n}function c$(e,t){var n=t,r=null;while(n){var i=n.firstElementChild;if(!i)break;var o=h$(i,e,l$(n,t));r=n,n=o}var a=n||r;return a===t?null:a}function h$(e,t,n){return e&&t>n+e.offsetTop?h$(e.nextElementSibling,t,n)||e:null}function u$(e,t,n,r){var i=Math.min((e-t)/n,1);return i*r}function d$(e,t){var n=e.querySelector('[data-nodeid="'+t.id+'"]');while(!n||ht(t))t=t.parent,n=e.querySelector('[data-nodeid="'+t.id+'"]');return f$({mdNode:t,el:n})}function f$(e){var t=e.mdNode,n=e.el;while((De(n$,t.type)||"table"===t.type)&&t.firstChild)t=t.firstChild,n=n.firstElementChild;return{mdNode:t,el:n}}var p$={};function m$(e,t){p$[e]=p$[e]||{},p$[e].height=t}function g$(e,t){p$[e]=p$[e]||{},p$[e].offsetTop=t}function v$(e){return p$[e]&&p$[e].height}function b$(e){return p$[e]&&p$[e].offsetTop}function y$(e){e&&(delete p$[Number(e.getAttribute("data-nodeid"))],Qe(e.children).forEach((function(e){y$(e)})))}function w$(e,t,n){var r=v$(n),i=b$(n),o=r||e.clientHeight,a=i||l$(e,t)||e.offsetTop;return r||m$(n,o),i||g$(n,a),{nodeHeight:o,offsetTop:a}}var x$=un("md-preview-highlight");function k$(e,t){var n=e.firstChild;while(n&&n.next){if(st(n.next)>t+1)break;n=n.next}return n}var C$=function(){function e(e,t){var n=document.createElement("div");this.el=n,this.eventEmitter=e,this.isViewer=!!t.isViewer,this.el.className=un("md-preview");var r=t.linkAttributes,i=t.customHTMLRenderer,o=t.sanitizer,a=t.highlight,s=void 0!==a&&a;this.renderer=new GJ({gfm:!0,nodeId:!0,convertors:t$(r,i)}),this.cursorNodeId=null,this.sanitizer=o,this.initEvent(s),this.initContentSection(),this.isViewer&&(this.previewContent.style.overflowWrap="break-word")}return e.prototype.initContentSection=function(){this.previewContent=xn(''),this.isViewer||this.el.appendChild(this.previewContent)},e.prototype.toggleActive=function(e){wn(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,r=e.cursorPos;t.updateCursorNode(n,r)})),this.eventEmitter.listen("blur",(function(){t.removeHighlight()}))),No(this.el,"scroll",(function(e){t.eventEmitter.emit("scroll","preview",c$(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&&ie(e,x$)}},e.prototype.updateCursorNode=function(e,t){e&&(e=vt(e,(function(e){return!gt(e)})),"tableRow"===e.type?e=k$(e,t[1]):"tableBody"===e.type&&(e=null));var n=e?e.id:null;if(this.cursorNodeId!==n){var r=this.getElementByNodeId(this.cursorNodeId),i=this.getElementByNodeId(n);r&&ie(r,x$),i&&Q(i,x$),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,r=e.removedNodeRange,i=this.previewContent,o=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(n.map((function(e){return t.renderer.render(e)})).join("")));if(r){var a=r.id,s=a[0],l=a[1],c=this.getElementByNodeId(s),h=this.getElementByNodeId(l);if(c){c.insertAdjacentHTML("beforebegin",o);var u=c;while(u&&u!==h){var d=u.nextElementSibling;bn(u),y$(u),u=d}(null===u||void 0===u?void 0:u.parentNode)&&(bn(u),y$(u))}}else i.insertAdjacentHTML("afterbegin",o)},e.prototype.getRenderer=function(){return this.renderer},e.prototype.destroy=function(){ko(this.el,"scroll"),this.el=null},e.prototype.getElement=function(){return this.el},e.prototype.getHTML=function(){return En(this.previewContent.innerHTML)},e.prototype.setHTML=function(e){this.previewContent.innerHTML=e},e.prototype.setHeight=function(e){I(this.el,{height:e+"px"})},e.prototype.setMinHeight=function(e){I(this.el,{minHeight:e+"px"})},e}();function T$(e,t){var n=e.depth;while(n){var r=e.node(n);if(t(r,n))return{node:r,depth:n,offset:n>0?e.before(n):0};n-=1}return null}function A$(e){return!!T$(e,(function(e){var t=e.type;return"listItem"===t.name||"bulletList"===t.name||"orderedList"===t.name}))}function S$(e){return!!T$(e,(function(e){var t=e.type;return"tableHeadCell"===t.name||"tableBodyCell"===t.name}))}function E$(e){return T$(e,(function(e){var t=e.type;return"listItem"===t.name}))}function M$(e){return{tag:e,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return f({},t&&{rawHTML:t})}}}function N$(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 O$(e){return{tag:e,getAttrs:function(e){return["rawHTML","colspan","rowspan","extended"].reduce((function(t,n){var r="rawHTML"===n?"data-raw-html":n,i=e.getAttribute(r);return i&&(t[n]=De(["rawHTML","extended"],n)?i:Number(i)),t}),{})}}}function D$(){return{htmlAttrs:{default:null},classNames:{default:null}}}function L$(e){var t=e.htmlAttrs,n=e.classNames;return f(f({},t),{class:n?n.join(" "):null})}function z$(e,t){var n=e.parent,r=e.startIndex,i=e.endIndex,o=n.contentMatchAt(r).findWrapping(t);if(o){var a=o.length?o[0]:t;return n.canReplaceWith(r,i,a)?o:null}return null}function I$(e,t){var n=e.parent,r=e.startIndex,i=e.endIndex,o=n.child(r),a=t.contentMatch.findWrapping(o.type);if(a){for(var s=a.length?a[a.length-1]:t,l=s.contentMatch,c=r;l&&c=0;f-=1)d=r["Fragment"].from(n[f].type.create(n[f].attrs,d));e.step(new o["b"](s-(i?2:0),l,s,l,new r["Slice"](d,0,0),n.length,!0));var p=0;for(f=0;f