UNPKG

@kangc/v-md-editor

Version:
1 lines 99.7 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define("VMdEditor",["vue"],e):"object"==typeof exports?exports.VMdEditor=e(require("vue")):t.VMdEditor=e(t.Vue)}("undefined"!=typeof self?self:this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=110)}([function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return l})),n.d(e,"h",(function(){return u})),n.d(e,"i",(function(){return f})),n.d(e,"j",(function(){return d})),n.d(e,"k",(function(){return h})),n.d(e,"l",(function(){return p})),n.d(e,"m",(function(){return m})),n.d(e,"n",(function(){return v})),n.d(e,"o",(function(){return g})),n.d(e,"p",(function(){return b})),n.d(e,"q",(function(){return y})),n.d(e,"r",(function(){return w})),n.d(e,"s",(function(){return x})),n.d(e,"t",(function(){return _})),n.d(e,"u",(function(){return k})),n.d(e,"v",(function(){return C}));var r="bold",i="clear",o="code",a="fullscreen",s="h1",c="h2",l="h3",u="h4",f="h5",d="h6",h="hr",p="image",m="italic",v="link",g="ol",b="quote",y="redo",w="strikethrough",x="sync-scroll",_="table",k="ul",C="undo"},function(t,e,n){"use strict";n.d(e,"e",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return c})),n.d(e,"b",(function(){return l}));var r=Object.prototype.toString,i=function(t){return"[object Object]"===r.call(t)};function o(t,e){return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}function a(t){for(var e={},n=0;n<t.length;n++)t[n]&&o(e,t[n]);return e}function s(t,e){e.keys().forEach((function(n){t[n]=e(n)}))}function c(t){return/([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi.test(t)}function l(t){var e,n,r=t.selected,i=t.InsertGetter,o=t.selectedGetter,a=void 0===o?function(t){return t}:o,s=t.ignoreEmptyLine,c=void 0===s||s;return r?(n=a(r),e=i(r,1),-1!==r.indexOf("\n")&&(n=e=r.split("\n").map((function(t,e){return c&&!t?"":i(t,e+1).replace(a(null),"")})).join("\n"))):(e=i(null,1),n=a(r)),{insertContent:e,newSelected:n}}},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=c):i&&(c=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:l}}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r="data-v-md-line",i="data-v-md-heading",o="data-v-md-anchor"},function(t,e,n){"use strict";e.a={PREVIEW:"preview",EDITABLE:"editable",EDIT:"edit"}},function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t){var e=0;return t===window?e=t.pageYOffset:t&&(e=t.scrollTop),e}function i(t,e){t===window?window.scrollTo(window.pageYOffset,e):t&&(t.scrollTop=e)}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}))},function(t,e,n){"use strict";var r=n(5),i=n(12),o=n.n(i),a={svg:[],altGlyph:[],altGlyphDef:[],altGlyphItem:[],animate:[],animateColor:[],animateMotion:[],animateTransform:[],circle:[],clipPath:[],"color-profile":[],cursor:[],"definition-src":[],defs:[],desc:[],ellipse:[],feBlend:[],feColorMatrix:[],feComponentTransfer:[],feComposite:[],feConvolveMatrix:[],feDiffuseLighting:[],feDisplacementMap:[],feDistantLight:[],feFlood:[],feFuncA:[],feFuncB:[],feFuncG:[],feFuncR:[],feGaussianBlur:[],feImage:[],feMerge:[],feMergeNode:[],feMorphology:[],feOffset:[],fePointLight:[],feSpecularLighting:[],feSpotLight:[],feTile:[],feTurbulence:[],filter:[],font:[],foreignObject:[],g:[],glyph:[],glyphRef:[],hkern:[],image:[],line:[],linearGradient:[],marker:[],mask:[],metadata:[],"missing-glyph":[],mpath:[],path:[],pattern:[],polygon:[],polyline:[],radialGradient:[],rect:[],set:[],stop:[],style:[],switch:[],symbol:[],text:[],textPath:[],title:[],tref:[],tspan:[],use:[],view:[],vkern:[]},s={math:[],annotation:[],semantics:[],mtext:[],mn:[],mo:[],mi:[],mspace:[],mover:[],munder:[],munderover:[],msup:[],msub:[],msubsup:[],mfrac:[],mroot:[],msqrt:[],mtable:[],mtr:[],mtd:[],mlabeledtr:[],mrow:[],menclose:[],mstyle:[],mpadded:[],mphantom:[],mglyph:[]},c=["style","align","class","id"],l=["data-"],u=Object(r.a)({},{input:["type"],ol:["reversed","start","type"],button:["type"],summary:[]},s,a),f={whiteList:Object(r.a)({},o.a.getDefaultWhiteList(),u),onIgnoreTagAttr:function(t,e,n){if(a[t]||s[t]||c.find((function(t){return t===e}))||l.find((function(t){return e.startsWith(t)})))return e+'="'+o.a.escapeAttrValue(n)+'"'}},d=new o.a.FilterXSS(f);d.extend=function(t){var e=d.options;Object.keys(t).forEach((function(n){if("whiteList"===n)Object.keys(t.whiteList).forEach((function(n){var r=t.whiteList[n],i=e.whiteList;i[n]?i[n]=[].concat(i[n],r):i[n]=r}));else if("onIgnoreTagAttr"===n){var r=e.onIgnoreTagAttr;e.onIgnoreTagAttr=function(){for(var e,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=r.call.apply(r,[this].concat(i)),s=(e=t.onIgnoreTagAttr).call.apply(e,[this].concat(i));return a||s}}else e[n]=t[n]}))};e.a=d},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r=n(6);function i(t){var e=t.currentScrollTop,n=t.scrollToTop,r=t.scrollFn,i=t.percent,o=void 0===i?10:i,a=t.onScrollEnd,s=n>e?"down":"up",c=o/100*(n-e);window.requestAnimationFrame((function t(){e+=c,"down"===s&&e>=n||"up"===s&&e<=n?(r(n),window.cancelAnimationFrame(void 0),a&&window.requestAnimationFrame(a)):(r(e),window.requestAnimationFrame(t))}))}function o(t){var e=t.scrollTarget,n=t.scrollToTop,o=t.percent,a=void 0===o?10:o,s=t.onScrollEnd;i({currentScrollTop:Object(r.a)(e),scrollToTop:n,scrollFn:function(t){return Object(r.b)(e,t)},percent:a,onScrollEnd:s})}},function(t,e,n){"use strict";var r=n(11),i=n.n(r),o=n(1),a=Object.prototype.hasOwnProperty;function s(t,e){return Object.keys(e).forEach((function(n){!function(t,e,n){var r=e[n];null!=r&&(a.call(t,n)&&Object(o.e)(r)?t[n]=s(Object(t[n]),e[n]):t[n]=r)}(t,e,n)})),t}var c=i.a.prototype,l=i.a.util.defineReactive;l(c,"$vMdEditorLang","zh-CN"),l(c,"$vMdEditorLangConfig",{"zh-CN":{}});e.a={use:function(t,e){var n;c.$vMdEditorLang=t,this.add(((n={})[t]=e,n))},add:function(t){void 0===t&&(t={}),s(c.$vMdEditorLangConfig,t)}}},function(t,e,n){"use strict";n.r(e);var r=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-md-editor-preview",style:{tabSize:this.tabSize,"-moz-tab-size":this.tabSize,"-o-tab-size":this.tabSize},on:{click:this.handlePreviewClick}},[e("div",{class:[this.themeConfig.previewClass],domProps:{innerHTML:this._s(this.html)}})])};r._withStripped=!0;var i=n(7),o=n(18),a=n(15),s=function(t){return t},c={name:"v-md-preview",mixins:[a.a,o.a],props:{text:{type:String,default:""},theme:Object},data:function(){return{html:""}},computed:{themeConfig:function(){return c.themeConfig||{}},markdownParser:function(){return this.themeConfig.markdownParser},markdownLoader:function(){var t;return(null==(t=this.markdownParser)?void 0:t.render.bind(this.markdownParser))||s}},watch:{text:function(){this.handleTextChange()},langConfig:function(){this.handleTextChange()}},created:function(){var t=this;(this.theme&&c.use(this.theme),"function"!=typeof this.markdownLoader||this.markdownLoader===s)?console.warn("Please configure your markdown parser"):c.markdownExtenders.forEach((function(e){e(t.markdownParser,(function(){return t.langConfig}))}));this.handleTextChange()},methods:{handleTextChange:function(){this.html=i.a.process(this.markdownLoader(this.text)),this.$emit("change",this.text,this.html)}},theme:function(t){c.themeConfig=t},markdownExtenders:[],extendMarkdown:function(t){c.markdownExtenders.push(t)}},l=c,u=n(2),f=Object(u.a)(l,r,[],!1,null,null,null);f.options.__file="src/preview.vue";var d=f.exports,h=n(9);n(19);d.version="1.7.12",d.install=function(t){t.component(d.name,d)},d.xss=i.a,d.lang=h.a,d.use=function(t,e){return"function"==typeof t?t(d,e):t.install(d,e),d};e.default=d},function(e,n){e.exports=t},function(t,e,n){var r=n(28),i=n(31),o=n(35);function a(t,e){return new o(e).process(t)}for(var s in(e=t.exports=a).filterXSS=a,e.FilterXSS=o,r)e[s]=r[s];for(var s in i)e[s]=i[s];"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)},function(t,e,n){t.exports=n(71)},function(t,e,n){"use strict";function r(t,e){var n=e.accept;return Object.keys(t).filter((function(e){var r=t[e],i=r.type,o=r.name,a=o.indexOf(".")>-1?"."+o.split(".").pop():"",s=i.replace(/\/.*$/,"");return n.split(",").map((function(t){return t.trim()})).filter((function(t){return t})).some((function(t){return/\..+$/.test(t)?a===t:/\/\*$/.test(t)?s===t.replace(/\/\*$/,""):!!/^[^\/]+\/[^\/]+$/.test(t)&&i===t}))})).map((function(e){return t[e]}))}function i(t){var e=[];return Object.keys(t.items).forEach((function(n){var r=t.items[n];if("file"===r.kind){var i=r.getAsFile();i&&e.push(i)}})),e}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}))},function(t,e,n){"use strict";e.a={computed:{langConfig:function(){return this.$vMdEditorLangConfig[this.$vMdEditorLang]}}}},function(t,e,n){var r=n(29),i=n(33);for(var o in(e=t.exports=function(t,e){return new i(e).process(t)}).FilterCSS=i,r)e[o]=r[o];"undefined"!=typeof window&&(window.filterCSS=t.exports)},function(t,e){t.exports={indexOf:function(t,e){var n,r;if(Array.prototype.indexOf)return t.indexOf(e);for(n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},forEach:function(t,e,n){var r,i;if(Array.prototype.forEach)return t.forEach(e,n);for(r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}}},function(t,e,n){"use strict";var r=n(6),i=n(8),o=n(3);e.a={props:{scrollContainer:{type:Function,default:function(){return window}},top:{type:Number,default:0},tabSize:{type:Number,default:2}},methods:{handlePreviewClick:function(t){var e=t.target;if("IMG"!==e.tagName){var n=e.getAttribute(o.a),r=this.$el.querySelector("["+o.b+'="'+n+'"]');r&&this.scrollToTarget({target:r})}else{if(!e.getAttribute("src"))return;var i=Array.from(this.$el.querySelectorAll("img")),a=i.map((function(t){return t.getAttribute("src")})).filter((function(t){return t})),s=i.indexOf(e);this.$emit("image-click",a,s)}},getOffsetTop:function(t,e){var n=t.getBoundingClientRect();return e===window||e===document.documentElement?n.top:n.top-e.getBoundingClientRect().top},scrollToTarget:function(t){var e=t.target,n=t.scrollContainer,o=void 0===n?this.scrollContainer():n,a=t.top,s=void 0===a?this.top:a,c=t.onScrollEnd,l=this.getOffsetTop(e,o),u=Object(r.a)(o)+l-s;Object(i.a)({scrollTarget:o,scrollToTop:u,onScrollEnd:c})},scrollToLine:function(t){var e=t.lineIndex,n=t.onScrollEnd;if(e){var r=this.$el.querySelector("["+o.c+'="'+e+'"]');r&&this.scrollToTarget({target:r,onScrollEnd:n})}}}}},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,c,"next",t)}function c(t){r(a,i,o,s,c,"throw",t)}s(void 0)}))}}n.d(e,"a",(function(){return i}))},function(t,e,n){var r=n(16).FilterCSS,i=n(16).getDefaultWhiteList,o=n(17);function a(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var s=new r;function c(t){return t.replace(l,"&lt;").replace(u,"&gt;")}var l=/</g,u=/>/g,f=/"/g,d=/&quot;/g,h=/&#([a-zA-Z0-9]*);?/gim,p=/&colon;?/gim,m=/&newline;?/gim,v=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,g=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,b=/u\s*r\s*l\s*\(.*/gi;function y(t){return t.replace(f,"&quot;")}function w(t){return t.replace(d,'"')}function x(t){return t.replace(h,(function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))}))}function _(t){return t.replace(p,":").replace(m," ")}function k(t){for(var e="",n=0,r=t.length;n<r;n++)e+=t.charCodeAt(n)<32?" ":t.charAt(n);return o.trim(e)}function C(t){return t=k(t=_(t=x(t=w(t))))}function S(t){return t=c(t=y(t))}var E=/<!--[\s\S]*?-->/g;e.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},e.getDefaultWhiteList=a,e.onTag=function(t,e,n){},e.onIgnoreTag=function(t,e,n){},e.onTagAttr=function(t,e,n){},e.onIgnoreTagAttr=function(t,e,n){},e.safeAttrValue=function(t,e,n,r){if(n=C(n),"href"===e||"src"===e){if("#"===(n=o.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"data:image/"!==n.substr(0,11)&&"ftp://"!==n.substr(0,6)&&"./"!==n.substr(0,2)&&"../"!==n.substr(0,3)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===e){if(v.lastIndex=0,v.test(n))return""}else if("style"===e){if(g.lastIndex=0,g.test(n))return"";if(b.lastIndex=0,b.test(n)&&(v.lastIndex=0,v.test(n)))return"";!1!==r&&(n=(r=r||s).process(n))}return n=S(n)},e.escapeHtml=c,e.escapeQuote=y,e.unescapeQuote=w,e.escapeHtmlEntities=x,e.escapeDangerHtml5Entities=_,e.clearNonPrintableCharacter=k,e.friendlyAttrValue=C,e.escapeAttrValue=S,e.onIgnoreTagStripAll=function(){return""},e.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var n=!Array.isArray(t),r=[],i=!1;return{onIgnoreTag:function(a,s,c){if(function(e){return!!n||-1!==o.indexOf(t,e)}(a)){if(c.isClosing){var l="[/removed]",u=c.position+l.length;return r.push([!1!==i?i:c.position,u]),i=!1,l}return i||(i=c.position),"[removed]"}return e(a,s,c)},remove:function(t){var e="",n=0;return o.forEach(r,(function(r){e+=t.slice(n,r[0]),n=r[1]})),e+=t.slice(n)}}},e.stripCommentTag=function(t){return t.replace(E,"")},e.stripBlankChar=function(t){var e=t.split("");return(e=e.filter((function(t){var e=t.charCodeAt(0);return 127!==e&&(!(e<=31)||(10===e||13===e))}))).join("")},e.cssFilter=s,e.getDefaultCSSWhiteList=i},function(t,e){function n(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}var r=/javascript\s*\:/gim;e.whiteList=n(),e.getDefaultWhiteList=n,e.onAttr=function(t,e,n){},e.onIgnoreAttr=function(t,e,n){},e.safeAttrValue=function(t,e){return r.test(e)?"":e}},function(t,e){t.exports={indexOf:function(t,e){var n,r;if(Array.prototype.indexOf)return t.indexOf(e);for(n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},forEach:function(t,e,n){var r,i;if(Array.prototype.forEach)return t.forEach(e,n);for(r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}}},function(t,e,n){var r=n(17);function i(t){var e=r.spaceIndex(t);if(-1===e)var n=t.slice(1,-1);else n=t.slice(1,e+1);return"/"===(n=r.trim(n).toLowerCase()).slice(0,1)&&(n=n.slice(1)),"/"===n.slice(-1)&&(n=n.slice(0,-1)),n}function o(t){return"</"===t.slice(0,2)}var a=/[^a-zA-Z0-9_:\.\-]/gim;function s(t,e){for(;e<t.length;e++){var n=t[e];if(" "!==n)return"="===n?e:-1}}function c(t,e){for(;e>0;e--){var n=t[e];if(" "!==n)return"="===n?e:-1}}function l(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}e.parseTag=function(t,e,n){"use strict";var r="",a=0,s=!1,c=!1,l=0,u=t.length,f="",d="";t:for(l=0;l<u;l++){var h=t.charAt(l);if(!1===s){if("<"===h){s=l;continue}}else if(!1===c){if("<"===h){r+=n(t.slice(a,l)),s=l,a=l;continue}if(">"===h){r+=n(t.slice(a,s)),f=i(d=t.slice(s,l+1)),r+=e(s,r.length,f,d,o(d)),a=l+1,s=!1;continue}if('"'===h||"'"===h)for(var p=1,m=t.charAt(l-p);""===m.trim()||"="===m;){if("="===m){c=h;continue t}m=t.charAt(l-++p)}}else if(h===c){c=!1;continue}}return a<t.length&&(r+=n(t.substr(a))),r},e.parseAttr=function(t,e){"use strict";var n=0,i=[],o=!1,u=t.length;function f(t,n){if(!((t=(t=r.trim(t)).replace(a,"").toLowerCase()).length<1)){var o=e(t,n||"");o&&i.push(o)}}for(var d=0;d<u;d++){var h,p=t.charAt(d);if(!1!==o||"="!==p)if(!1===o||d!==n||'"'!==p&&"'"!==p||"="!==t.charAt(d-1))if(/\s|\n|\t/.test(p)){if(t=t.replace(/\s|\n|\t/g," "),!1===o){if(-1===(h=s(t,d))){f(r.trim(t.slice(n,d))),o=!1,n=d+1;continue}d=h-1;continue}if(-1===(h=c(t,d-1))){f(o,l(r.trim(t.slice(n,d)))),o=!1,n=d+1;continue}}else;else{if(-1===(h=t.indexOf(p,d+1)))break;f(o,r.trim(t.slice(n+1,h))),o=!1,n=(d=h)+1}else o=t.slice(n,d),n=d+1}return n<t.length&&(!1===o?f(t.slice(n)):f(o,l(r.trim(t.slice(n))))),r.trim(i.join(" "))}},function(t,e,n){"use strict";n.r(e);var r=n(13),i=n.n(r),o=n(27),a=n(0),s=n(14);e.default={name:a.l,icon:"v-md-icon-img",title:function(t){return t.langConfig.image.toolbar},menus:[{name:"image-link",text:function(t){return t.langConfig.imageLink.toolbar},action:function(t,e){null!=e&&e.insertWithSize?t.execCommand(a.l,{width:"auto",height:"auto"}):t.execCommand(a.l)}},{name:"upload-image",text:function(t){return t.langConfig.uploadImage.toolbar},action:function(t){t.uploadConfig=t.uploadImgConfig,t.$nextTick(Object(o.a)(i.a.mark((function e(){var n,r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$refs.uploadFile.upload();case 2:n=e.sent,r=Object(s.a)(n.target.files,t.uploadImgConfig),t.emitUploadImage(n,r);case 5:case"end":return e.stop()}}),e)}))))}}]}},function(t,e,n){var r=n(29),i=n(34);n(30);function o(t){return null==t}function a(t){(t=function(t){var e={};for(var n in t)e[n]=t[n];return e}(t||{})).whiteList=t.whiteList||r.whiteList,t.onAttr=t.onAttr||r.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||r.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||r.safeAttrValue,this.options=t}a.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,n=e.whiteList,r=e.onAttr,a=e.onIgnoreAttr,s=e.safeAttrValue;return i(t,(function(t,e,i,c,l){var u=n[i],f=!1;if(!0===u?f=u:"function"==typeof u?f=u(c):u instanceof RegExp&&(f=u.test(c)),!0!==f&&(f=!1),c=s(i,c)){var d,h={position:e,sourcePosition:t,source:l,isWhite:f};return f?o(d=r(i,c,h))?i+":"+c:d:o(d=a(i,c,h))?void 0:d}}))},t.exports=a},function(t,e,n){var r=n(30);t.exports=function(t,e){";"!==(t=r.trimRight(t))[t.length-1]&&(t+=";");var n=t.length,i=!1,o=0,a=0,s="";function c(){if(!i){var n=r.trim(t.slice(o,a)),c=n.indexOf(":");if(-1!==c){var l=r.trim(n.slice(0,c)),u=r.trim(n.slice(c+1));if(l){var f=e(o,s.length,l,u,n);f&&(s+=f+"; ")}}}o=a+1}for(;a<n;a++){var l=t[a];if("/"===l&&"*"===t[a+1]){var u=t.indexOf("*/",a+2);if(-1===u)break;o=(a=u+1)+1,i=!1}else"("===l?i=!0:")"===l?i=!1:";"===l?i||c():"\n"===l&&c()}return r.trim(s)}},function(t,e,n){var r=n(16).FilterCSS,i=n(28),o=n(31),a=o.parseTag,s=o.parseAttr,c=n(17);function l(t){return null==t}function u(t){(t=function(t){var e={};for(var n in t)e[n]=t[n];return e}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=i.onIgnoreTagStripAll),t.whiteList=t.whiteList||i.whiteList,t.onTag=t.onTag||i.onTag,t.onTagAttr=t.onTagAttr||i.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||i.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||i.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||i.safeAttrValue,t.escapeHtml=t.escapeHtml||i.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new r(t.css))}u.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,n=e.whiteList,r=e.onTag,o=e.onIgnoreTag,u=e.onTagAttr,f=e.onIgnoreTagAttr,d=e.safeAttrValue,h=e.escapeHtml,p=this.cssFilter;e.stripBlankChar&&(t=i.stripBlankChar(t)),e.allowCommentTag||(t=i.stripCommentTag(t));var m=!1;if(e.stripIgnoreTagBody){m=i.StripTagBody(e.stripIgnoreTagBody,o);o=m.onIgnoreTag}var v=a(t,(function(t,e,i,a,m){var v,g={sourcePosition:t,position:e,isClosing:m,isWhite:n.hasOwnProperty(i)};if(!l(v=r(i,a,g)))return v;if(g.isWhite){if(g.isClosing)return"</"+i+">";var b=function(t){var e=c.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var n="/"===(t=c.trim(t.slice(e+1,-1)))[t.length-1];return n&&(t=c.trim(t.slice(0,-1))),{html:t,closing:n}}(a),y=n[i],w=s(b.html,(function(t,e){var n,r=-1!==c.indexOf(y,t);return l(n=u(i,t,e,r))?r?(e=d(i,t,e,p))?t+'="'+e+'"':t:l(n=f(i,t,e,r))?void 0:n:n}));a="<"+i;return w&&(a+=" "+w),b.closing&&(a+=" /"),a+=">"}return l(v=o(i,a,g))?h(a):v}),h);return m&&(v=m.remove(v)),v},t.exports=u},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,c=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function a(){n&&(n=!1,t()),r&&c()}function s(){o(a)}function c(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,e);i=t}return c}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),l=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},u=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||i},f=g(0,0,0,0);function d(t){return parseFloat(t)||0}function h(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+d(t["border-"+n+"-width"])}),0)}function p(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return f;var r=u(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=d(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=d(r.width),c=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=h(r,"left","right")+o),Math.round(c+a)!==n&&(c-=h(r,"top","bottom")+a)),!function(t){return t===u(t).document.documentElement}(t)){var l=Math.round(s+o)-e,p=Math.round(c+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(p)&&(c-=p)}return g(i.left,i.top,s,c)}var m="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof u(t).SVGGraphicsElement}:function(t){return t instanceof u(t).SVGElement&&"function"==typeof t.getBBox};function v(t){return r?m(t)?function(t){var e=t.getBBox();return g(0,0,e.width,e.height)}(t):p(t):f}function g(t,e,n,r){return{x:t,y:e,width:n,height:r}}var b=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=g(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=v(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),y=function(t,e){var n,r,i,o,a,s,c,u=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(s.prototype),l(c,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),c);l(this,{target:t,contentRect:u})},w=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof u(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new b(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof u(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new y(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),x="undefined"!=typeof WeakMap?new WeakMap:new n,_=function t(e){if(!(this instanceof t))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=c.getInstance(),r=new w(e,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){_.prototype[t]=function(){var e;return(e=x.get(this))[t].apply(e,arguments)}}));var k=void 0!==i.ResizeObserver?i.ResizeObserver:_;e.a=k}).call(this,n(90))},function(t,e,n){"use strict";n.d(e,"a",(function(){return Nt}));var r=n(9),i=n(1),o={};function a(t,e,n){e?"function"==typeof n?t[e]=n:console.error("The command must be registered as a function: "+e):console.error("Command name is required")}Object(i.c)(o,n(41));var s=n(5),c={};function l(t,e,n){e?t[e]=Object(s.a)({},n):console.error("Toolbar name is required")}Object(i.c)(c,n(64));n(85);var u=n(10),f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"v-md-editor",class:["v-md-editor--"+t.mode,{"v-md-editor--fullscreen":t.fullscreen,"v-md-editor--left-area-reverse":t.leftAreaReverse}],style:{height:t.heightGetter}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!t.isPreviewMode,expression:"!isPreviewMode"}],staticClass:"v-md-editor__left-area",style:{width:t.leftAreaVisible?t.leftAreaWidth:0,borderWidth:t.leftAreaVisible?"1px":0}},[n("div",{staticClass:"v-md-editor__left-area-title",style:{height:t.toolbarHeight+"px",lineHeight:t.toolbarHeight+"px"}},[t._v("\n "+t._s(t.leftAreaTitle)+"\n ")]),n("div",{staticClass:"v-md-editor__left-area-body"},[t._t("left-area")],2)]),n("div",{staticClass:"v-md-editor__right-area"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!t.isPreviewMode,expression:"!isPreviewMode"}],ref:"toolbarWrapper",staticClass:"v-md-editor__toolbar"},[n("editor-toolbar",{staticClass:"v-md-editor__toolbar-left",attrs:{groups:t.leftToolbarGroup,toolbars:t.toolbars,"disabled-menus":t.disabledMenus},on:{"item-click":t.handleToolbarItemClick,"toolbar-menu-click":t.handleToolbarMenuClick}}),n("editor-toolbar",{staticClass:"v-md-editor__toolbar-right",attrs:{groups:t.rightToolbarGroup,toolbars:t.toolbars,"disabled-mens":t.disabledMenus},on:{"item-click":t.handleToolbarItemClick,"toolbar-menu-click":t.handleToolbarMenuClick}})],1),n("div",{staticClass:"v-md-editor__main"},[n("div",{directives:[{name:"show",rawName:"v-show",value:!t.isPreviewMode,expression:"!isPreviewMode"}],ref:"editorWrapper",staticClass:"v-md-editor__editor-wrapper",on:{click:t.handleEditorWrapperClick}},[t._t("editor")],2),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.isEditMode,expression:"!isEditMode"}],ref:"previewWrapper",staticClass:"v-md-editor__preview-wrapper"},[t._t("preview")],2),t._t("default")],2)])])};f._withStripped=!0;var d=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.groups.length?n("ul",[t._l(t.groups,(function(e,r){return[t._l(e,(function(e){return n("toolbar-item",{key:e,attrs:{name:e,title:t.getConfig(e,"title"),icon:t.getConfig(e,"icon"),text:t.getConfig(e,"text"),active:t.getConfig(e,"active"),menus:t.getConfig(e,"menus"),"disabled-menus":t.disabledMenus},on:{click:function(n){return t.$emit("item-click",t.toolbars[e])},"menu-click":function(e){return t.$emit("toolbar-menu-click",arguments[0])}}})})),r!==t.groups.length-1?n("li",{staticClass:"v-md-editor__toolbar-divider"}):t._e()]}))],2):t._e()};d._withStripped=!0;var h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:t.hideMenu,expression:"hideMenu"}],staticClass:"v-md-editor__toolbar-item",class:[t.icon,"v-md-editor__toolbar-item-"+t.name,{"v-md-editor__toolbar-item--active":t.active||t.menuActive},{"v-md-editor__toolbar-item--menu":t.hasMenu}],on:{mousedown:function(t){t.preventDefault()},mouseleave:t.handleHideTooltip,mousemove:t.showTooltip,click:function(e){return e.stopPropagation(),t.handleClick(e)}}},[t._v("\n "+t._s(t.text)+"\n "),n("v-md-tooltip",{ref:"tooltip",attrs:{text:t.title}}),t.hasMenu?n("v-md-menu",{ref:"menu",attrs:{mode:t.menuMode,menus:t.menuItems,"item-width":t.menus.itemWidth,"row-num":t.menus.rowNum,visible:t.menuActive},on:{"update:visible":function(e){t.menuActive=e},"item-click":function(e){return t.$emit("menu-click",arguments[0])}}}):t._e(),t.hasMenu?n("i",{ref:"menuCtrl",staticClass:"v-md-icon-arrow-down v-md-editor__menu-ctrl"}):t._e()],1)};h._withStripped=!0;var p=function(){var t=this.$createElement,e=this._self._c||t;return e("transition",{attrs:{name:"v-md-fade-in"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:this.visible,expression:"visible"}],staticClass:"v-md-editor__tooltip",style:{left:this.position.x+"px",top:this.position.y+"px"}},[this._v("\n "+this._s(this.text)+"\n ")])])};p._withStripped=!0;var m={name:"v-md-tooltip",props:{text:String},data:function(){return{position:{x:0,y:0},visible:!1}},methods:{show:function(t){this.position={x:t.x,y:t.y},this.visible=!0,this.$nextTick(this.calculateLayout)},hide:function(){this.visible=!1},calculateLayout:function(){var t=this.$el.getBoundingClientRect().right,e=document.documentElement.clientWidth;e-t<0&&(this.position.x-=t-e)}}},v=(n(86),n(2)),g=Object(v.a)(m,p,[],!1,null,null,null);g.options.__file="src/components/toolbar-item/tooltip.vue";var b=g.exports,y=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"v-md-zoom-in-top"}},[n("ul",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"v-md-editor__menu",class:["v-md-editor__menu--"+t.mode],style:t.style,on:{mousemove:function(t){t.stopPropagation()},click:function(t){t.stopPropagation()}}},[t.isListMode?t._l(t.menus,(function(e){return n("li",{key:e.name,staticClass:"v-md-editor__menu-item",class:["v-md-editor__menu-item-"+e.name,e.class],on:{click:function(n){return n.stopPropagation(),t.handleClick(e)}}},[e.render?n("v-md-render",{attrs:{render:e.render,editor:t.$self}}):[t._v(t._s(t.getText(e.text)))]],2)})):[n("li",t._l(t.rowCount,(function(e){return n("div",{staticClass:"v-md-editor__menu-row"},t._l(t.getRowMenus(e),(function(e){return n("span",{key:e.name,staticClass:"v-md-editor__menu-item",class:["v-md-editor__menu-item-"+e.name,e.class],style:{width:t.itemWidth},on:{click:function(n){return n.stopPropagation(),t.handleClick(e)}}},[t._v(t._s(e.text))])})),0)})),0)]],2)])};y._withStripped=!0;var w,x={name:"v-md-render",functional:!0,props:{render:Function},render:function(t,e){var n=e.data,r=e.props;return r.render.apply(r,[t].concat(n.$attrs))}},_="list",k="panel",C={name:"v-md-menu",components:(w={},w[x.name]=x,w),inject:["markdownEditor"],props:{mode:{type:String,default:k},menus:Array,itemWidth:{type:String,default:"30px"},rowNum:{type:Number,default:10},visible:Boolean},data:function(){return{style:{left:0}}},computed:{rowCount:function(){return Math.ceil(this.menus.length/this.rowNum)},isListMode:function(){return this.mode===_}},watch:{visible:function(){this.visible&&this.$nextTick(this.calculateLayout)}},methods:{calculateLayout:function(){var t=this.$el.getBoundingClientRect().right;document.documentElement.clientWidth-t<0&&(this.style={right:0})},getRowMenus:function(t){var e=t*this.rowNum,n=e-this.rowNum;return this.menus.slice(n,e)},getText:function(t){return"function"==typeof t?t(this.markdownEditor):t},hide:function(){this.$emit("update:visible",!1)},handleClick:function(t){this.$emit("item-click",t),this.hide()}}},S=(n(87),Object(v.a)(C,y,[],!1,null,null,null));S.options.__file="src/components/toolbar-item/menu.vue";var E,T=S.exports,j=[],O="@@clickoutsideContext",A="undefined"==typeof window,L=0;function I(t,e,n){return function(r,i){void 0===r&&(r={}),void 0===i&&(i={}),n&&n.context&&r.target&&i.target&&!t.contains(r.target)&&!t.contains(i.target)&&t!==r.target&&(e.expression&&t[O].methodName&&n.context[t[O].methodName]?n.context[t[O].methodName]():t[O].bindingFn&&t[O].bindingFn())}}A||(document.addEventListener("mousedown",(function(t){E=t})),document.addEventListener("mouseup",(function(t){j.forEach((function(e){return e[O].documentHandler(t,E)}))})));var M,$={name:"toolbar-item",directives:{Clickoutside:{bind:function(t,e,n){j.push(t);var r=L++;t[O]={id:r,documentHandler:I(t,e,n),methodName:e.expression,bindingFn:e.value}},update:function(t,e,n){t[O].documentHandler=I(t,e,n),t[O].methodName=e.expression,t[O].bindingFn=e.value},unbind:function(t){for(var e=j.length,n=0;n<e;n++)if(j[n][O].id===t[O].id){j.splice(n,1);break}delete t[O]}}},components:(M={},M[b.name]=b,M[T.name]=T,M),props:{name:String,title:String,active:Boolean,text:String,icon:String,menus:[Array,Object],disabledMenus:Array},data:function(){return{menuActive:!1}},computed:{hasMenu:function(){var t;return null==(t=this.menuItems)?void 0:t.length},menuItems:function(){var t=this,e=Object(i.e)(this.menus)?this.menus.items:this.menus;return null==e?void 0:e.filter((function(e){var n,r=e.name;return!(null!=(n=t.disabledMenus)&&n.includes(t.name+"/"+r))}))},menuMode:function(){return Object(i.e)(this.menus)?this.menus.mode:_}},methods:{hideMenu:function(){this.hasMenu&&(this.menuActive=!1)},showMenu:function(){this.hasMenu&&(this.menuActive=!0)},handleClick:function(t){this.$emit("click"),this.menuActive?this.hideMenu():this.showMenu(),this.hasMenu?this.handleHideTooltip():this.showTooltip(t)},showTooltip:function(t){var e=this,n=this.$el,r=t.target,i=this.$refs.menuCtrl;if(r!==n&&r!==i||this.menuActive)this.handleHideTooltip();else{this.timmer&&clearTimeout(this.timmer);var o=n.getBoundingClientRect(),a=t.clientX-o.left,s=t.clientY-o.top;this.timmer=setTimeout((function(){var t;null==(t=e.$refs.tooltip)||t.show({x:a-2,y:s+20})}),100)}},handleHideTooltip:function(){this.timmer&&clearTimeout(this.timmer),this.$refs.tooltip.hide()}}},z=(n(88),Object(v.a)($,h,[],!1,null,null,null));z.options.__file="src/components/toolbar-item/index.vue";var D,H=z.exports,R={name:"editor-toolbar",inject:["markdownEditor"],components:(D={},D[H.name]=H,D),props:{groups:Array,toolbars:Object,disabledMenus:Array},methods:{getConfig:function(t,e){var n=this.toolbars[t][e];return"function"==typeof n?n(this.markdownEditor):n}}},F=(n(89),Object(v.a)(R,d,[],!1,null,null,null));F.options.__file="src/components/toolbar.vue";var N,P=F.exports,W=n(36),G="undefined"==typeof window,B=function(t){t.forEach((function(t){var e=t.target.__resizeListeners__||[];e.length&&e.forEach((function(t){t()}))}))},K=function(t,e){G||(t.__resizeListeners__||(t.__resizeListeners__=[],t.__ro__=new W.a(B),t.__ro__.observe(t)),t.__resizeListeners__.push(e))},q=function(t,e){t&&t.__resizeListeners__&&(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),t.__resizeListeners__.length||t.__ro__.disconnect())},V=n(4),U={name:"v-md-container",components:(N={},N[P.name]=P,N),props:{leftToolbar:String,rightToolbar:String,toolbars:Object,fullscreen:Boolean,height:String,noresize:Boolean,disabledMenus:Array,leftAreaVisible:Boolean,leftAreaTitle:String,leftAreaWidth:{type:String,default:"200px"},leftAreaReverse:Boolean,mode:{type:String,default:V.a.EDITABLE}},data:function(){return{toolbarHeight:41}},computed:{heightGetter:function(){return this.fullscreen?"auto":this.height},leftToolbarGroup:function(){return this.getToolbarConfig(this.leftToolbar)},rightToolbarGroup:function(){return this.getToolbarConfig(this.rightToolbar)},isPreviewMode:function(){return this.mode===V.a.PREVIEW},isEditMode:function(){return this.mode===V.a.EDIT}},mounted:function(){this.noresize||(K(this.$refs.editorWrapper,this.handleResize),K(this.$refs.toolbarWrapper,this.handleToolbarWrapperResize))},beforeDestroy:function(){this.noresize||(q(this.$refs.editorWrapper,this.handleResize),q(this.$refs.toolbarWrapper,this.handleToolbarWrapperResize))},methods:{handleResize:function(){this.$emit("resize")},handleToolbarWrapperResize:function(){var t=this.$refs.toolbarWrapper;t&&(this.toolbarHeight=t.offsetHeight)},getToolbarConfig:function(t){var e=this;return t.split("|").map((function(t){return t.split(" ").filter((function(t){return t&&e.toolbars[t]}))}))},handleEditorWrapperClick:function(t){this.$emit("editor-wrapper-click",