22 lines
317 KiB
JavaScript
22 lines
317 KiB
JavaScript
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define("MavonEditor",["vue"],t):"object"==typeof exports?exports.MavonEditor=t(require("vue")):e.MavonEditor=t(e.Vue)}(window,(function(__WEBPACK_EXTERNAL_MODULE__0__){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=79)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty;function o(e,t){return n.call(e,t)}function i(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 a(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=r(62);var p=/[&<>"]/,d=/[&<>"]/g,h={"&":"&","<":"<",">":">",'"':"""};function f(e){return h[e]}var _=/[.?*+^$[\]\\(){}|-]/g;var m=r(40);t.lib={},t.lib.mdurl=r(63),t.lib.ucmicro=r(145),t.assign=function(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(r){e[r]=t[r]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=o,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,r){return t||function(e,t){var r=0;return o(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&i(r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(r):e}(e,r)}))},t.isValidEntityCode=i,t.fromCodePoint=a,t.escapeHtml=function(e){return p.test(e)?e.replace(d,f):e},t.arrayReplaceAt=function(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(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},t.isMdAsciiPunct=function(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}},t.isPunctChar=function(e){return m.test(e)},t.escapeRE=function(e){return e.replace(_,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=(e,t)=>{const r=e.__vccOpts||e;for(const[e,n]of t)r[e]=n;r
|
||
|
/**
|
||
|
* @Author: chenhuachao <chc>
|
||
|
* @Date: 2017-11-26T15:57:48+08:00
|
||
|
* @Email: chenhuachaoxyz@gmail.com
|
||
|
* @Filename: index.js
|
||
|
* @Last modified by: chc
|
||
|
* @Last modified time: 2017-11-26T16:00:49+08:00
|
||
|
* @License: MIT
|
||
|
* @Copyright: 2017
|
||
|
*/var n=null;function o(e,t){var r,n,o=e.posMax,i=!0,a=!0;return r=t>0?e.src.charCodeAt(t-1):-1,n=t+1<=o?e.src.charCodeAt(t+1):-1,(32===r||9===r||n>=48&&n<=57)&&(a=!1),32!==n&&9!==n||(i=!1),{can_open:i,can_close:a}}function i(e,t){if(!n&&window.katex&&(n=window.katex),!n)return!1;var r,i,a,s;if("$"!==e.src[e.pos])return!1;if(!o(e,e.pos).can_open)return t||(e.pending+="$"),e.pos+=1,!0;for(i=r=e.pos+1;-1!==(i=e.src.indexOf("$",i));){for(s=i-1;"\\"===e.src[s];)s-=1;if((i-s)%2==1)break;i+=1}return-1===i?(t||(e.pending+="$"),e.pos=r,!0):i-r==0?(t||(e.pending+="$$"),e.pos=r+1,!0):o(e,i).can_close?(t||((a=e.push("math_inline","math",0)).markup="$",a.content=e.src.slice(r,i)),e.pos=i+1,!0):(t||(e.pending+="$"),e.pos=r,!0)}function a(e,t,r,o){if(!n&&window.katex&&(n=window.katex),!n)return!1;var i,a,s,l,c,u=!1,p=e.bMarks[t]+e.tShift[t],d=e.eMarks[t];if(p+2>d)return!1;if("$$"!==e.src.slice(p,p+2))return!1;if(p+=2,i=e.src.slice(p,d),o)return!0;for("$$"===i.trim().slice(-2)&&(i=i.trim().slice(0,-2),u=!0),s=t;!u&&!(++s>=r)&&!((p=e.bMarks[s]+e.tShift[s])<(d=e.eMarks[s])&&e.tShift[s]<e.blkIndent);)"$$"===e.src.slice(p,d).trim().slice(-2)&&(l=e.src.slice(0,d).lastIndexOf("$$"),a=e.src.slice(p,l),u=!0);return e.line=s+1,(c=e.push("math_block","math",0)).block=!0,c.content=(i&&i.trim()?i+"\n":"")+e.getLines(t+1,s,e.tShift[t],!0)+(a&&a.trim()?a:""),c.map=[t,e.line],c.markup="$$",!0}e.exports=function(e,t){t=t||{};e.inline.ruler.after("escape","math_inline",i),e.block.ruler.after("blockquote","math_block",a,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=function(e,r){return function(e){!n&&window.katex&&(n=window.katex),t.displayMode=!1;try{return n.renderToString(e,t)}catch(r){return t.throwOnError&&console.log(r),e}}(e[r].content)},e.renderer.rules.math_block=function(e,r){return function(e){!n&&window.katex&&(n=window.katex),t.displayMode=!0;try{return"<p>"+n.renderToString(e,t)+"</p>"}catch(r){return t.throwOnError&&console.log(r),e}}(e[r].content)+"\n"}}},function(e,t){
|
||
|
/**
|
||
|
* @Author: HuaChao Chen <chc>
|
||
|
* @Date: 2017-06-12T21:06:58+08:00
|
||
|
* @Email: chenhuachaoxyz@gmail.com
|
||
|
* @Filename: index.js
|
||
|
* @Last modified by: chc
|
||
|
* @Last modified time: 2017-06-12T21:18:15+08:00
|
||
|
* @License: MIT
|
||
|
* @Copyright: 2017
|
||
|
*/
|
||
|
e.exports=function(e,t){e.image_add=function(t,r){e.__image instanceof Object||(e.__image={}),e.__image[t]=r},e.image_del=function(t){e.__image instanceof Object||(e.__image={}),delete e.__image[t]};var r=e.renderer.rules.image;e.renderer.rules.image=function(t,n,o,i,a){var s=t[n].attrs;if(e.__image instanceof Object)for(var l=0;l<s.length;l++)if("src"==s[l][0]&&e.__image.hasOwnProperty(t[n].attrs[l][1])){s.push(["rel",s[l][1]]),s[l][1]=e.__image[t[n].attrs[l][1]];break}return r(t,n,o,i,a)}}},function(e,t,r){"use strict";r(71)},function(e,t,r){(t=r(43)(!1)).push([e.i,".op-icon.dropdown-wrapper.dropdown[data-v-218640b4]{position:relative}.op-icon.dropdown-wrapper.dropdown[type=button][data-v-218640b4]{-webkit-appearance:unset}.op-icon.dropdown-wrapper.dropdown .popup-dropdown[data-v-218640b4]{position:absolute;display:block;background:#fff;top:32px;left:-45px;min-width:130px;z-index:1600;border:1px solid #ebeef5;border-radius:4px;box-shadow:0 2px 12px 0 rgba(0,0,0,0.1)}.op-icon.dropdown-wrapper.dropdown .popup-dropdown .dropdown-item[data-v-218640b4]:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.op-icon.dropdown-wrapper.dropdown .popup-dropdown .dropdown-item[data-v-218640b4]:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.op-icon.dropdown-wrapper.dropdown .popup-dropdown.op-header[data-v-218640b4]{left:-30px;min-width:90px}.op-icon.dropdown-wrapper.dropdown .popup-dropdown.fade-enter-active[data-v-218640b4],.op-icon.dropdown-wrapper.dropdown .popup-dropdown.fade-leave-active[data-v-218640b4]{opacity:1}.op-icon.dropdown-wrapper.dropdown .popup-dropdown.fade-enter[data-v-218640b4],.op-icon.dropdown-wrapper.dropdown .popup-dropdown.fade-leave-active[data-v-218640b4]{opacity:0}.op-icon.dropdown-wrapper.dropdown .popup-dropdown.transition[data-v-218640b4],.op-icon.dropdown-wrapper.dropdown .popup-dropdown.transition .dropdown-item[data-v-218640b4]{transition:all .2s linear 0s}.op-icon.dropdown-wrapper.dropdown .dropdown-item[data-v-218640b4]{height:40px;line-height:40px;font-size:14px;color:#606266;position:relative}.op-icon.dropdown-wrapper.dropdown .dropdown-item[data-v-218640b4]:hover{color:#303133;background-color:#e9e9eb}.op-icon.dropdown-wrapper.dropdown .dropdown-item input[data-v-218640b4]{position:absolute;font-size:100px;right:0;top:0;opacity:0;cursor:pointer}.op-icon.dropdown-wrapper.dropdown .dropdown-images[data-v-218640b4]{box-sizing:border-box}.op-icon.dropdown-wrapper.dropdown .dropdown-images button[data-v-218640b4]{position:absolute;top:-1px;right:5px;font-size:14px}.op-icon.dropdown-wrapper.dropdown .dropdown-images button[data-v-218640b4]:hover{color:#f56c6c;background-color:transparent}.op-icon.dropdown-wrapper.dropdown .dropdown-images span[data-v-218640b4]{display:inline-block;width:80px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.op-icon.dropdown-wrapper.dropdown .dropdown-images:hover .image-show[data-v-218640b4]{display:block !important}.op-icon.dropdown-wrapper.dropdown .dropdown-images .image-show[data-v-218640b4]{display:none;position:absolute;left:-128px;top:0;width:120px;height:90px;object-fit:contain;border:1px solid #f2f6fc}.op-icon.dropdown-wrapper.dropdown .dropdown-images .image-show.transition[data-v-218640b4]{transition:all .2s linear 0s}.op-icon.dropdown-wrapper.dropdown .dropdown-images.transition[data-v-218640b4]{transition:all .2s linear 0s}.add-image-link-wrapper[data-v-218640b4]{position:fixed;left:0;right:0;top:0;bottom:0;background:rgba(0,0,0,0.7);z-index:1600;transition:all .1s linear 0s}.add-image-link-wrapper.fade-enter-active[data-v-218640b4],.add-image-link-wrapper.fade-leave-active[data-v-218640b4]{opacity:1}.add-image-link-wrapper.fade-enter[data-v-218640b4],.add-image-link-wrapper.fade-leave-active[data-v-218640b4]{opacity:0}.add-image-link-wrapper .add-image-link[data-v-218640b4]{position:fixed;box-sizing:border-box;text-align:center;width:24%;left:38%;height:auto;padding:40px;top:25%;transition:all .1s linear 0s;z-index:3;background:#fff;border-radius:2px}@media only screen and (max-width:1500px){.add-image-l
|