Repository: wanglin2/mind-map Branch: main Commit: fc4f93a38ee2 Files: 195 Total size: 6.8 MB Directory structure: gitextract_r5aeeteh/ ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── README_EN.md ├── README_MORE_EN.md ├── README_MORE_ZH.md ├── copy.js ├── dist/ │ ├── css/ │ │ ├── app.css │ │ ├── chunk-2f9a41ed.css │ │ ├── chunk-3222d6ee.css │ │ └── chunk-vendors.css │ └── js/ │ ├── app.js │ ├── chunk-2f9a41ed.js │ ├── chunk-3222d6ee.js │ └── chunk-vendors.js ├── index.html ├── nginx.conf ├── simple-mind-map/ │ ├── .eslintrc.js │ ├── .prettierignore │ ├── .prettierrc │ ├── README.md │ ├── bin/ │ │ ├── createPluginsTypeFiles.js │ │ └── wsServer.mjs │ ├── example/ │ │ ├── exampleData.js │ │ └── exportFullData.json │ ├── full.js │ ├── index.js │ ├── package.json │ ├── scripts/ │ │ └── walkJsFiles.js │ └── src/ │ ├── constants/ │ │ ├── constant.js │ │ └── defaultOptions.js │ ├── core/ │ │ ├── command/ │ │ │ ├── Command.js │ │ │ ├── KeyCommand.js │ │ │ └── keyMap.js │ │ ├── event/ │ │ │ └── Event.js │ │ ├── render/ │ │ │ ├── Render.js │ │ │ ├── TextEdit.js │ │ │ └── node/ │ │ │ ├── MindMapNode.js │ │ │ ├── Shape.js │ │ │ ├── Style.js │ │ │ ├── nodeCommandWraps.js │ │ │ ├── nodeCooperate.js │ │ │ ├── nodeCreateContents.js │ │ │ ├── nodeExpandBtn.js │ │ │ ├── nodeExpandBtnPlaceholderRect.js │ │ │ ├── nodeGeneralization.js │ │ │ ├── nodeLayout.js │ │ │ ├── nodeModifyWidth.js │ │ │ └── quickCreateChildBtn.js │ │ └── view/ │ │ └── View.js │ ├── layouts/ │ │ ├── Base.js │ │ ├── CatalogOrganization.js │ │ ├── Fishbone.js │ │ ├── LogicalStructure.js │ │ ├── MindMap.js │ │ ├── OrganizationStructure.js │ │ ├── Timeline.js │ │ ├── VerticalTimeline.js │ │ └── fishboneUtils.js │ ├── parse/ │ │ ├── markdown.js │ │ ├── markdownTo.js │ │ ├── toMarkdown.js │ │ ├── toTxt.js │ │ └── xmind.js │ ├── plugins/ │ │ ├── AssociativeLine.js │ │ ├── Cooperate.js │ │ ├── Demonstrate.js │ │ ├── Drag.js │ │ ├── Export.js │ │ ├── ExportPDF.js │ │ ├── ExportXMind.js │ │ ├── Formula.js │ │ ├── FormulaStyle.js │ │ ├── KeyboardNavigation.js │ │ ├── MindMapLayoutPro.js │ │ ├── MiniMap.js │ │ ├── NodeBase64ImageStorage.js │ │ ├── NodeImgAdjust.js │ │ ├── OuterFrame.js │ │ ├── Painter.js │ │ ├── RainbowLines.js │ │ ├── RichText.js │ │ ├── Scrollbar.js │ │ ├── Search.js │ │ ├── Select.js │ │ ├── TouchEvent.js │ │ ├── Watermark.js │ │ ├── associativeLine/ │ │ │ ├── associativeLineControls.js │ │ │ ├── associativeLineText.js │ │ │ └── associativeLineUtils.js │ │ └── outerFrame/ │ │ ├── outerFrameText.js │ │ └── outerFrameUtils.js │ ├── svg/ │ │ ├── btns.js │ │ └── icons.js │ ├── theme/ │ │ ├── default.js │ │ └── index.js │ └── utils/ │ ├── AutoMove.js │ ├── BatchExecution.js │ ├── Lru.js │ ├── index.js │ ├── mersenneTwister.js │ ├── simulateCSSBackgroundInCanvas.js │ └── xmind.js └── web/ ├── .prettierignore ├── .prettierrc ├── babel.config.js ├── package.json ├── public/ │ └── index.html ├── scripts/ │ ├── ai.js │ ├── createNodeImageList.js │ └── updateVersion.js ├── src/ │ ├── App.vue │ ├── api/ │ │ └── index.js │ ├── assets/ │ │ ├── icon-font/ │ │ │ └── iconfont.css │ │ └── svg/ │ │ ├── business/ │ │ │ └── 商务 │ │ ├── education/ │ │ │ └── 教育 │ │ ├── festival/ │ │ │ └── 节日 │ │ ├── food/ │ │ │ └── 食物 │ │ ├── medicine/ │ │ │ └── 医疗 │ │ ├── tools/ │ │ │ └── 工具 │ │ └── travel/ │ │ └── 旅行 │ ├── components/ │ │ └── ImgUpload/ │ │ ├── index.vue │ │ └── style.less │ ├── config/ │ │ ├── constant.js │ │ ├── en.js │ │ ├── icon.js │ │ ├── image.js │ │ ├── index.js │ │ ├── vi.js │ │ ├── zh.js │ │ └── zhtw.js │ ├── i18n.js │ ├── lang/ │ │ ├── en_us.js │ │ ├── index.js │ │ ├── vi_vn.js │ │ ├── zh_cn.js │ │ └── zh_tw.js │ ├── main.js │ ├── pages/ │ │ ├── Doc.vue │ │ └── Edit/ │ │ ├── Index.vue │ │ └── components/ │ │ ├── AiChat.vue │ │ ├── AiConfigDialog.vue │ │ ├── AiCreate.vue │ │ ├── AssociativeLineStyle.vue │ │ ├── BaseStyle.vue │ │ ├── Color.vue │ │ ├── Contextmenu.vue │ │ ├── Count.vue │ │ ├── Demonstrate.vue │ │ ├── Edit.vue │ │ ├── Export.vue │ │ ├── FormulaSidebar.vue │ │ ├── Fullscreen.vue │ │ ├── Import.vue │ │ ├── MouseAction.vue │ │ ├── Navigator.vue │ │ ├── NavigatorToolbar.vue │ │ ├── NodeHyperlink.vue │ │ ├── NodeIcon.vue │ │ ├── NodeIconSidebar.vue │ │ ├── NodeIconToolbar.vue │ │ ├── NodeImage.vue │ │ ├── NodeImgPlacementToolbar.vue │ │ ├── NodeImgPreview.vue │ │ ├── NodeNote.vue │ │ ├── NodeNoteContentShow.vue │ │ ├── NodeNoteSidebar.vue │ │ ├── NodeOuterFrame.vue │ │ ├── NodeTag.vue │ │ ├── NodeTagStyle.vue │ │ ├── Outline.vue │ │ ├── OutlineEdit.vue │ │ ├── OutlineSidebar.vue │ │ ├── RichTextToolbar.vue │ │ ├── Scale.vue │ │ ├── Scrollbar.vue │ │ ├── Search.vue │ │ ├── Setting.vue │ │ ├── ShortcutKey.vue │ │ ├── Sidebar.vue │ │ ├── SidebarTrigger.vue │ │ ├── Structure.vue │ │ ├── Style.vue │ │ ├── Theme.vue │ │ ├── Toolbar.vue │ │ └── ToolbarNodeBtnList.vue │ ├── router.js │ ├── store.js │ ├── style/ │ │ └── outlineTree.less │ └── utils/ │ ├── ai.js │ ├── handleClipboardText.js │ ├── index.js │ └── loading.js └── vue.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ node_modules .DS_Store dist_electron simple-mind-map/dist simple-mind-map/types utools/dist ================================================ FILE: Dockerfile ================================================ FROM nginx RUN mkdir /app COPY ./index.html /app/ COPY ./dist /app/dist/ COPY nginx.conf /etc/nginx/nginx.conf ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2021-2023 The MindMap Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================
|
drawon.cn(桌案) |
|
hi |
|
黄智彪@一米一栗科技 |
沨沄 |
行 |
|
小土渣的宇宙 |
Chris |
仓鼠 |
风格 |
LiuJL |
Kyle |
秀树因馨雨 |
黄泳 |
ccccs |
炫 |
|
晏江 |
梁辉 |
千帆 |
布林 |
达仁科技 |
沐风牧草 |
俊奇 |
庆国 |
Matt |
雨馨 |
|
峰 |
御风 |
兔子快跑 |
LSHM |
newplayer |
|
Think |
志斌 |
qp |
ZXR |
花儿朵朵 |
suka |
水车 |
才镇 |
小米bbᯤ²ᴳ |
*棐 |
|
南风 |
蜉蝣撼大叔 |
乙 |
敏 |
有希 |
樊笼 |
小逗比 |
天清如愿 |
敬明朗 |
飞箭 |
|
戚永峰 |
moom |
张扬 |
长沙利奥软件 |
HaHN |
继龙 |
欣 |
易空小易 |
国发 |
建明 |
|
汪津合 |
博文 |
慕智打印-兰兰 |
锦冰 |
旭东 |
橘半 |
pluvet |
皇登攀 |
SR |
逆水行舟 |
|
L |
sunniberg |
sunniberg |
在下青铜五 |
木星二号 |
阿晨 |
铁 |
Alex |
子豪 |
宏涛 |
|
最多5个字 |
ZX |
协成 |
木木 |
好名字 |
lsytyrt |
buddy |
小川 |
Tobin |
夏虫不语冰 |
|
晴空 |
。 |
Jeffrey |
张文建 |
Lawliet |
一叶孤舟 |
Eric |
Joe |
中文网字计划-江夏尧 |
海云 |
|
皮老板 |
h.r.w |
时光匆匆 |
广兴 |
一亩三 |
xbkkjbs0246658 |
4399行星元帅 |
Xavier |
:) |
可米阳光 |
|
MrFujing |
Sword |
好好先生Ervin |
胡永刚 |
旋风 |
星夜寒 |
神话 |
Towards the future |
安嘉 |
${ye(e)}
`).join("")};let ee=null;const te=e=>{ee||(ee=document.createElement("div")),ee.innerHTML=e;const t=ee.querySelectorAll(".ql-formula");Array.from(t).forEach(e=>{const t=document.createTextNode("$smmformula$");e.parentNode.replaceChild(t,e)});const n=ee.childNodes;let o=[];for(let i=0;i${ye(e)}
`).join(""),t.length>0){e=e.replace(/\$smmformula\$/g,''),ee.innerHTML=e;const n=ee.querySelectorAll(".smmformula");Array.from(n).forEach((e,n)=>{e.parentNode.replaceChild(t[n],e)}),e=ee.innerHTML}return e},ne=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),oe=(e,t)=>{const n={};return Object.keys(t).forEach(o=>{const i=e[o],r=t[o];if(z(i)===z(r)){if("Object"===z(i)){if(JSON.stringify(i)!==JSON.stringify(r))return void(n[o]=r)}else if(i!==r)return void(n[o]=r)}else n[o]=r}),n},ie=e=>!/^_/.test(e)&&!i["f"].includes(e),re=e=>{const t=[...d["c"]],n=Object.keys(e);for(let o=0;oC(l/v)&&A("overflow"),s*=v}t=b.length+1,k=z(w-o,t,0==o),C(w/t)>l-x&&A("overflow"),x+=C(w/t),w%=t,b.splice(w++,0,x)}return M(b)}function L(e){var t,n,i,r,o,s,a,u,p,v,b,y,w,x,S,T=[];for(e=E(e),y=e.length,t=m,n=0,o=f,s=0;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var i=n===t?0:4-n%4;return[n,i]}function h(e){var t=c(e),n=t[0],i=t[1];return 3*(n+i)/4-i}function d(e,t,n){return 3*(t+n)/4-n}function u(e){var t,n,i=c(e),s=i[0],a=i[1],l=new o(d(e,s,a)),h=0,u=a>0?s-4:s;for(n=0;n>16&255,l[h++]=t>>8&255,l[h++]=255&t;return 2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[h++]=255&t),1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[h++]=t>>8&255,l[h++]=255&t),l}function p(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function f(e,t,n){for(var i,r=[],o=t;o=s)return-1;if(n=e.src.charCodeAt(o++),n<48||n>57)return-1;for(;;){if(o>=s)return-1;if(n=e.src.charCodeAt(o++),!(n>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-r>=10)return-1}return o=4)return!1;if(e.listIndent>=0&&e.sCount[I]-e.listIndent>=4&&e.sCount[I]=e.pos)throw new Error("inline rule didn't increment state.pos");break}if(t){if(e.pos>=s)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},s.prototype.parse=function(e,t,n,i){var r,o,s,a=new this.State(e,t,n,i);for(this.tokenize(a),o=this.ruler2.getRules(""),s=o.length,r=0;rn)switch(r[o]){case"textNode":O(e);break;case"cdata":N(e,"oncdata",e.cdata),e.cdata="";break;case"script":N(e,"onscript",e.script),e.script="";break;default:D(e,"Max buffer length exceeded: "+r[o])}i=Math.max(i,a)}var l=t.MAX_BUFFER_LENGTH-i;e.bufferCheckPosition=l+e.position}function a(e){for(var t=0,n=r.length;t",void(e.state=T.TEXT);if(e.script){if("script"!==e.tagName)return e.script+=""+e.tagName+">",e.tagName="",void(e.state=T.SCRIPT);N(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());var i=n;while(t--){var r=e.tags[t];if(r.name===i)break;I(e,"Unexpected close tag")}if(t<0)return I(e,"Unmatched closing tag: "+e.tagName),e.textNode+=""+e.tagName+">",void(e.state=T.TEXT);e.tagName=n;var o=e.tags.length;while(o-- >t){var s=e.tag=e.tags.pop();e.tagName=e.tag.name,N(e,"onclosetag",e.tagName);var a={};for(var l in s.ns)a[l]=s.ns[l];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&s.ns!==c.ns&&Object.keys(s.ns).forEach((function(t){var n=s.ns[t];N(e,"onclosenamespace",{prefix:t,uri:n})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=T.TEXT}function H(e){var t,n=e.entity,i=n.toLowerCase(),r="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[i]?e.ENTITIES[i]:(n=i,"#"===n.charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),t=parseInt(n,16),r=t.toString(16)):(n=n.slice(1),t=parseInt(n,10),r=t.toString(10))),n=n.replace(/^0+/,""),isNaN(t)||r.toLowerCase()!==n?(I(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function q(e,t){"<"===t?(e.state=T.OPEN_WAKA,e.startTagPosition=e.position):x(t)||(I(e,"Non-whitespace before first tag."),e.textNode=t,e.state=T.TEXT)}function U(e,t){var n="";return t
/i,an=/|/,ln="
";function cn(e,t,n){var i=parseInt(e.left,10),r=parseInt(e.top,10),o=parseInt(e.width,10)+parseInt(e.paddingLeft,10)+parseInt(e.paddingRight,10),s=parseInt(e.height,10)+parseInt(e.paddingTop,10)+parseInt(e.paddingBottom,10);return t>=i&&t<=i+o&&n>=r&&n<=r+s}var hn="toastui-editor-";function dn(){for(var e=[],t=0;t
<\/p>/gi,""),n=new RegExp(rn,"ig"),i=t.match(n);return null===i||void 0===i||i.forEach((function(e,n){if(sn.test(e)){var r=ln;if(n){var o=i[n-1],s=o.match(tn);if(s&&!/br/i.test(s[1])){var a=s[1];r=""+a+"><"+a+">"}}t=t.replace(sn,r)}})),t}function En(e){var t=//g,n=/ class="ProseMirror-trailingBreak"/g,i=e;return i=i.replace(t,""),i=i.replace(n,""),i}var Mn=new s["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=kn(e.dom.parentElement,"."+dn("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,i=t.style,r=e.coordsAtPos(t.pos),o=r.top,s=r.left,a=r.bottom,l=a-o,c=this.rootEl.getBoundingClientRect(),h=o-c.top;I(n,{opacity:"0"}),this.rootEl.appendChild(n),I(n,{position:"absolute",left:s-c.left+Nn+"px",top:("bottom"===i?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 zn(e){return new s["Plugin"]({key:Mn,state:{init:function(){return null},apply:function(e){return e.getMeta("widget")}},view:function(t){return new On(t,e)}})}function Dn(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 Ln(e,t,n){var i=function(n,i){e.emit("command","addImage",{imageUrl:n,altText:i||t.name||"image"})};e.emit("addImageBlobHook",t,i,n)}function In(e){var t=_e(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 Fn(e){var t=e.eventEmitter;return new s["Plugin"]({props:{handleDOMEvents:{drop:function(e,n){var i,r=null===(i=n.dataTransfer)||void 0===i?void 0:i.files;return r&&S(r,(function(e){return-1===e.type.indexOf("image")||(n.preventDefault(),n.stopPropagation(),Ln(t,e,n.type),!1)})),!0}}}})}var Rn=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 u(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+)/),i=n[1];return{info:i}}}]}},enumerable:!1,configurable:!0}),t}(Rn),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 s["EditorState"].create({schema:this.schema,plugins:this.createPlugins()})},e.prototype.initEvent=function(){var e=this,t=e.eventEmitter,n=e.view,i=e.editorType;n.dom.addEventListener("focus",(function(){return t.emit("focus",i)})),n.dom.addEventListener("blur",(function(){return t.emit("blur",i)}))},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(a["keymap"])(p({"Shift-Enter":l["a"].Enter},l["a"])),Object(h["a"])(),Rt(this.placeholder),zn(this.eventEmitter),Fn(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,i,r){var o=e.schema,s=e.tr,a=e.doc,l=n.input.match(new RegExp(t,"g")),c=a.resolve(i),h=c.parent,d=0;if(Bn(h)&&(h=c.node(c.depth-1)),h.forEach((function(e){return Bn(e)&&(d+=1)})),l.length>d){var u=Ue(l),p=Lt(u,o);return s.replaceWith(r-u.length+1,r,p)}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 i["Schema"]({nodes:this.specs.nodes,marks:this.specs.marks})},e.prototype.createKeymaps=function(e){var t=Ft(),n=t.undo,i=t.redo,r=this.specs.keymaps(e),o={"Mod-z":n(),"Shift-Mod-z":i()};return e?r.concat(Object(a["keymap"])(o)):r},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 qn(e){return e instanceof Function}var Un=qn,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 Gn(e,t,n){return e.focus(),t(n)(e.state,e.dispatch,e)}var Vn=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,i=t.name,r=t.schema;return p(p({},e),(n={},n[i]=r,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,i=t.name,r=t.schema;return p(p({},e),(n={},n[i]=r,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 i={},r=n.commands();return Un(r)?i[n.name]=function(t){return Gn(e,r,t)}:Object.keys(r).forEach((function(t){i[t]=function(n){return Gn(e,r[t],n)}})),p(p({},t),i)}),{}),i=Ft();return Object.keys(i).forEach((function(t){n[t]=function(n){return Gn(e,i[t],n)}})),t&&Object.keys(t).forEach((function(i){n[i]=function(n){return Gn(e,t[i],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){ze(Wn,e)||delete t[e]})),Object(a["keymap"])(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 s["AllSelection"]?[t+1,n-1]:[t,n]}function Yn(e){return e.index(0)+1}function Zn(e,t,n){void 0===n&&(n=1);var i=0;return e.forEach((function(e,r){Bn(e)&&r+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,i=t.entering,r=null===(n=e.parent)||void 0===n?void 0:n.parent;return r&&"list"===r.type&&r.listData.tight?null:{type:i?"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,i=e.listData,r=i.type,o=i.start,s="bullet"===r?"ul":"ol",a={};return"ol"===s&&null!==o&&1!==o&&(a.start=o.toString()),{type:n?"openTag":"closeTag",tagName:s,attributes:a,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,i=n.tagFilter?HJ(e.literal):e.literal;return{type:"html",content:i}},htmlBlock:function(e,t){var n=t.options,i=n.tagFilter?HJ(e.literal):e.literal;return n.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:i},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:i,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+/):[],i=[];return n.length>0&&n[0].length>0&&i.push("language-"+tZ(n[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:i},{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 i=e,r=i.title,o=i.destination;return{type:"openTag",tagName:"a",attributes:Do({href:tZ(o)},r&&{title:tZ(r)})}}return{type:"closeTag",tagName:"a"}},image:function(e,t){var n=t.getChildrenText,i=t.skipChildren,r=e,o=r.title,s=r.destination;return i(),{type:"openTag",tagName:"img",selfClose:!0,attributes:Do({src:tZ(s),alt:n(e)},o&&{title:tZ(o)})}},customBlock:function(e,t,n){var i=e.info.trim().toLowerCase(),r=n[i];if(r)try{return r(e,t)}catch(o){console.warn("[@toast-ui/editor] - The error occurred when "+i+" 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 i=e,r=i.info,o=i.firstChild,s=r.trim().toLowerCase(),a=n[s],l=t.entering;if(a)try{return a(e,t)}catch(c){console.warn("[@toast-ui/editor] - The error occurred when "+s+" inline node was parsed in markdown renderer: "+c)}return l?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+r+(o?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},UJ={strike:function(e,t){var n=t.entering;return{type:n?"openTag":"closeTag",tagName:"del"}},item:function(e,t){var n=t.entering,i=e.listData,r=i.checked,o=i.task;if(n){var s={type:"openTag",tagName:"li",outerNewLine:!0};return o?[s,{type:"openTag",tagName:"input",selfClose:!0,attributes:Do(Do({},r&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:s}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 i=[];if(e.lastChild)for(var r=e.parent.parent.columns.length,o=e.lastChild.endIdx,s=o+1;s
/.test(e.prev.literal),i=n?"\n":"
\n";return{type:"html",content:i}},item:function(e,t){var n=t.entering;if(n){var i={},r=[];return e.listData.task&&(i["data-task"]="",r.push("task-list-item"),e.listData.checked&&(r.push("checked"),i["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:r,attributes:i,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,i=t.info,r=i?i.split(/\s+/):[],o=[],s={};if(n>3&&(s["data-backticks"]=n),r.length>0&&r[0].length>0){var a=r[0];o.push("lang-"+a),s["data-language"]=a}return[{type:"openTag",tagName:"pre",classNames:o},{type:"openTag",tagName:"code",attributes:s},{type:"text",content:e.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(e,t){var n=t.origin,i=t.entering,r=t.skipChildren,o=e.info;if(-1!==o.indexOf("widget")&&i){r();var s=It(e),a=Nt(o,s).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:a},{type:"closeTag",tagName:"span"}]}return n()}};function t$(e,t){var n=p({},e$);return e&&(n.link=function(t,n){var i=n.entering,r=n.origin,o=r();return i&&(o.attributes=p(p({},o.attributes),e)),o}),t&&Object.keys(t).forEach((function(e){var i=n[e],r=t[e];i&&Un(r)?n[e]=function(e,t){var n=p({},t);return n.origin=function(){return i(e,t)},r(e,n)}:ze(["htmlBlock","htmlInline"],e)&&!Un(r)?n[e]=function(e,t){var n=e.literal.match(on);if(n){var i=n[0],o=n[1],s=n[3],a=(o||s).toLowerCase(),l=r[a],c=Y_(e,a);if(l){var h=p({},e);return h.attrs=Z_(i),h.childrenHTML=c,h.type=a,t.entering=!$_.test(e.literal),l(h,t)}}return t.origin()}:n[e]=r})),n}var n$=["list","item","blockQuote"],i$=["UL","OL","BLOCKQUOTE"];function r$(e,t){var n,i=e.child(t);return!i.childCount||1===i.childCount&&!(null===(n=i.firstChild.text)||void 0===n?void 0:n.trim())}function o$(e,t,n){var i=ot(t)-1,r=st(t)-1,o=n[i].getBoundingClientRect(),s=n[r].offsetTop-n[i].offsetTop+n[r].clientHeight;return{height:s<=0?n[i].clientHeight:s+s$(e,n,Math.min(r+1,e.childCount-1)),rect:o}}function s$(e,t,n){var i=e.childCount-1,r=0;while(n<=i&&r$(e,n))r+=t[n].clientHeight,n+=1;return r}function a$(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(ze(i$,e.tagName)||(n+=e.offsetTop),e.offsetParent===t.offsetParent)break;e=e.parentElement}return n}function c$(e,t){var n=t,i=null;while(n){var r=n.firstElementChild;if(!r)break;var o=h$(r,e,l$(n,t));i=n,n=o}var s=n||i;return s===t?null:s}function h$(e,t,n){return e&&t>n+e.offsetTop?h$(e.nextElementSibling,t,n)||e:null}function d$(e,t,n,i){var r=Math.min((e-t)/n,1);return r*i}function u$(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 p$({mdNode:t,el:n})}function p$(e){var t=e.mdNode,n=e.el;while((ze(n$,t.type)||"table"===t.type)&&t.firstChild)t=t.firstChild,n=n.firstElementChild;return{mdNode:t,el:n}}var f$={};function m$(e,t){f$[e]=f$[e]||{},f$[e].height=t}function g$(e,t){f$[e]=f$[e]||{},f$[e].offsetTop=t}function v$(e){return f$[e]&&f$[e].height}function b$(e){return f$[e]&&f$[e].offsetTop}function y$(e){e&&(delete f$[Number(e.getAttribute("data-nodeid"))],_e(e.children).forEach((function(e){y$(e)})))}function w$(e,t,n){var i=v$(n),r=b$(n),o=i||e.clientHeight,s=r||l$(e,t)||e.offsetTop;return i||m$(n,o),r||g$(n,s),{nodeHeight:o,offsetTop:s}}var x$=dn("md-preview-highlight");function C$(e,t){var n=e.firstChild;while(n&&n.next){if(at(n.next)>t+1)break;n=n.next}return n}var k$=function(){function e(e,t){var n=document.createElement("div");this.el=n,this.eventEmitter=e,this.isViewer=!!t.isViewer,this.el.className=dn("md-preview");var i=t.linkAttributes,r=t.customHTMLRenderer,o=t.sanitizer,s=t.highlight,a=void 0!==s&&s;this.renderer=new VJ({gfm:!0,nodeId:!0,convertors:t$(i,r)}),this.cursorNodeId=null,this.sanitizer=o,this.initEvent(a),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,i=e.cursorPos;t.updateCursorNode(n,i)})),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&&re(e,x$)}},e.prototype.updateCursorNode=function(e,t){e&&(e=vt(e,(function(e){return!gt(e)})),"tableRow"===e.type?e=C$(e,t[1]):"tableBody"===e.type&&(e=null));var n=e?e.id:null;if(this.cursorNodeId!==n){var i=this.getElementByNodeId(this.cursorNodeId),r=this.getElementByNodeId(n);i&&re(i,x$),r&&_(r,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,i=e.removedNodeRange,r=this.previewContent,o=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(n.map((function(e){return t.renderer.render(e)})).join("")));if(i){var s=i.id,a=s[0],l=s[1],c=this.getElementByNodeId(a),h=this.getElementByNodeId(l);if(c){c.insertAdjacentHTML("beforebegin",o);var d=c;while(d&&d!==h){var u=d.nextElementSibling;bn(d),y$(d),d=u}(null===d||void 0===d?void 0:d.parentNode)&&(bn(d),y$(d))}}else r.insertAdjacentHTML("afterbegin",o)},e.prototype.getRenderer=function(){return this.renderer},e.prototype.destroy=function(){Co(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 A$(e,t){var n=e.depth;while(n){var i=e.node(n);if(t(i,n))return{node:i,depth:n,offset:n>0?e.before(n):0};n-=1}return null}function S$(e){return!!A$(e,(function(e){var t=e.type;return"listItem"===t.name||"bulletList"===t.name||"orderedList"===t.name}))}function T$(e){return!!A$(e,(function(e){var t=e.type;return"tableHeadCell"===t.name||"tableBodyCell"===t.name}))}function E$(e){return A$(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 p({},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 i="rawHTML"===n?"data-raw-html":n,r=e.getAttribute(i);return r&&(t[n]=ze(["rawHTML","extended"],n)?r:Number(r)),t}),{})}}}function z$(){return{htmlAttrs:{default:null},classNames:{default:null}}}function D$(e){var t=e.htmlAttrs,n=e.classNames;return p(p({},t),{class:n?n.join(" "):null})}function L$(e,t){var n=e.parent,i=e.startIndex,r=e.endIndex,o=n.contentMatchAt(i).findWrapping(t);if(o){var s=o.length?o[0]:t;return n.canReplaceWith(i,r,s)?o:null}return null}function I$(e,t){var n=e.parent,i=e.startIndex,r=e.endIndex,o=n.child(i),s=t.contentMatch.findWrapping(o.type);if(s){for(var a=s.length?s[s.length-1]:t,l=a.contentMatch,c=i;l&&c
=p;v-=1){var b=a.getCellInfo(g,v),y=b.offset,w=b.nodeSize,x=i.mapping.slice(m).map(y),C=x+w;i.delete(x,C)}return t(i),!0}return!1}}},t.prototype.addRow=function(e){return function(){return function(t,n){var i=t.selection,r=t.schema,o=t.tr,s=c0(i),a=s.anchor,l=s.head;if(a&&l){var c=_$.create(a),h=c.totalColumnCount,d=c.getRectOffsets(a,l),u=d0(d).rowCount,p=t2(e,c,d),f=p.targetRowIdx,m=p.insertColIdx,g=p.nodeSize,v=0===f;if(!v){for(var b=[],y=o.mapping.map(c.posAt(f,m))+g,w=[],x=0;x
"),e.setDelim(u)}e.write("\n")}}},heading:function(e,t,n){var i=t.node,r=n.delim,o=i.attrs.headingType;"atx"===o?(e.write(r+" "),e.convertInline(i),e.closeBlock(i)):(e.convertInline(i),e.ensureNewLine(),e.write(r),e.closeBlock(i))},codeBlock:function(e,t,n){var i=t.node,r=n.delim,o=n.text,s=r,a=s[0],l=s[1];e.write(a),e.ensureNewLine(),e.text(o,!1),e.ensureNewLine(),e.write(l),e.closeBlock(i)},blockQuote:function(e,t,n){var i=t.node,r=t.parent,o=n.delim;(null===r||void 0===r?void 0:r.type.name)===i.type.name&&e.flushClose(1),e.wrapBlock(o,null,i,(function(){return e.convertNode(i)}))},bulletList:function(e,t,n){var i=t.node,r=n.delim;e.convertList(i,Fe(" ",4),(function(){return r+" "}))},orderedList:function(e,t){var n=t.node,i=n.attrs.order||1;e.convertList(n,Fe(" ",4),(function(e){var t=String(i+e);return t+". "}))},listItem:function(e,t){var n=t.node,i=n.attrs,r=i.task,o=i.checked;r&&e.write("["+(o?"x":" ")+"] "),e.convertNode(n)},image:function(e,t,n){var i=n.attrs;e.write("+")")},thematicBreak:function(e,t,n){var i=t.node,r=n.delim;e.write(r),e.closeBlock(i)},table:function(e,t){var n=t.node;e.convertNode(n),e.closeBlock(n)},tableHead:function(e,t,n){var i=t.node,r=n.delim,o=i.firstChild;e.convertNode(i);var s=null!==r&&void 0!==r?r:"";!r&&o&&o.forEach((function(e){var t=e.textContent,n=e.attrs,i=e3(t,n.align);s+="| "+i+" "})),e.write(s+"|"),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 i=t.node,r=n.delim,o=void 0===r?"| ":r;e.write(o),e.convertTableCell(i),e.write(" ")},tableBodyCell:function(e,t,n){var i=t.node,r=n.delim,o=void 0===r?"| ":r;e.write(o),e.convertTableCell(i),e.write(" ")},customBlock:function(e,t,n){var i=t.node,r=n.delim,o=n.text,s=r,a=s[0],l=s[1];e.write(a),e.ensureNewLine(),e.text(o,!1),e.ensureNewLine(),e.write(l),e.closeBlock(i)},frontMatter:function(e,t,n){var i=t.node,r=n.text;e.text(r,!1),e.closeBlock(i)},widget:function(e,t,n){var i=n.text;e.write(i)},html:function(e,t,n){var i=t.node,r=n.text;e.write(r),i.attrs.htmlBlock&&e.closeBlock(i)},htmlComment:function(e,t,n){var i=t.node,r=n.text;e.write(r),e.closeBlock(i)}};function n3(e,t){var n=t.state,i=t.nodeInfo,r=t.params,o=r.rawHTML;o?P(e,["heading","codeBlock"])>-1?_2(n,i.node,o):P(e,["image","thematicBreak"])>-1?n.write(o):$2(n,i,o):t3[e](n,i,r)}function i3(e,t){var n=e.text,i=/`+/g,r=0;if(e.isText&&n){var o=i.exec(n);while(o)r=Math.max(r,o[0].length),o=i.exec(n)}for(var s=r>0&&t>0?" `":"`",a=0;a\n ','\n
\n "],["\n \n ','\n
\n "])),(function(t){return e.execCommand(t)}),C0.get("Headings"),[1,2,3,4,5,6].map((function(e){return V3(K4||(K4=m(['\n