text: !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.wangEditor=t()}(this,function(){"use strict";function l(e){return e&&(e instanceof HTMLCollection||e instanceof NodeList)}var r=[];function d(e){if(e){if(e instanceof d)return e;var t,n,i,o,r=(this.selector=e).nodeType,a=[];9===r||1===r?a=[e]:l(e)||e instanceof Array?a=e:"string"==typeof e&&(a=0===(e=e.replace("/\n/mg","").trim()).indexOf("<")?(i=e,o=void 0,(o=document.createElement("div")).innerHTML=i,o.children):(t=e,l(n=document.querySelectorAll(t))?n:[n]));var c=a.length;if(!c)return this;for(var s=void 0,s=0;s<c;s++)this[s]=a[s];this.length=c}}function g(e){return new d(e)}d.prototype={constructor:d,forEach:function(e){for(var t=void 0,t=0;t<this.length;t++){var n=this[t];if(!1===e.call(n,n,t))break}return this},clone:function(t){var n=[];return this.forEach(function(e){n.push(e.cloneNode(!!t))}),g(n)},get:function(e){var t=this.length;return t<=e&&(e%=t),g(this[e])},first:function(){return this.get(0)},last:function(){var e=this.length;return this.get(e-1)},on:function(e,n,i){i||(i=n,n=null);var o=[],o=e.split(/\s+/);return this.forEach(function(t){o.forEach(function(e){e&&(r.push({elem:t,type:e,fn:i}),n?t.addEventListener(e,function(e){var t=e.target;t.matches(n)&&i.call(t,e)}):t.addEventListener(e,i))})})},off:function(t,n){return this.forEach(function(e){e.removeEventListener(t,n)})},attr:function(t,n){return null==n?this[0].getAttribute(t):this.forEach(function(e){e.setAttribute(t,n)})},addClass:function(n){return n?this.forEach(function(e){var t=void 0;e.className?((t=(t=e.className.split(/\s/)).filter(function(e){return!!e.trim()})).indexOf(n)<0&&t.push(n),e.className=t.join(" ")):e.className=n}):this},removeClass:function(n){return n?this.forEach(function(e){var t=void 0;e.className&&(t=(t=e.className.split(/\s/)).filter(function(e){return!(!(e=e.trim())||e===n)}),e.className=t.join(" "))}):this},css:function(i,e){var o=i+":"+e+";";return this.forEach(function(e){var t=(e.getAttribute("style")||"").trim(),n=[];t?(t.split(";").forEach(function(e){var t=e.split(":").map(function(e){return e.trim()});2===t.length&&n.push(t[0]+":"+t[1])}),(n=n.map(function(e){return 0===e.indexOf(i)?o:e})).indexOf(o)<0&&n.push(o),e.setAttribute("style",n.join("; "))):e.setAttribute("style",o)})},show:function(){return this.css("display","block")},hide:function(){return this.css("display","none")},children:function(){var e=this[0];return e?g(e.children):null},childNodes:function(){var e=this[0];return e?g(e.childNodes):null},append:function(e){return this.forEach(function(t){e.forEach(function(e){t.appendChild(e)})})},remove:function(){return this.forEach(function(e){var t;e.remove?e.remove():(t=e.parentElement)&&t.removeChild(e)})},isContain:function(e){var t=this[0],n=e[0];return t.contains(n)},getSizeData:function(){return this[0].getBoundingClientRect()},getNodeName:function(){return this[0].nodeName},find:function(e){return g(this[0].querySelectorAll(e))},text:function(t){return t?this.forEach(function(e){e.innerHTML=t}):this[0].innerHTML.replace(/<.*?>/g,function(){return""})},html:function(e){var t=this[0];return null==e?t.innerHTML:(t.innerHTML=e,this)},val:function(){return this[0].value.trim()},focus:function(){return this.forEach(function(e){e.focus()})},parent:function(){return g(this[0].parentElement)},parentUntil:function(e,t){var n=document.querySelectorAll(e),i=n.length;if(!i)return null;var o=t||this[0];if("BODY"===o.nodeName)return null;for(var r=o.parentElement,a=void 0,a=0;a<i;a++)if(r===n[a])return g(r);return this.parentUntil(e,r)},equal:function(e){return 1===e.nodeType?this[0]===e:this[0]===e[0]},insertBefore:function(e){var t=g(e)[0];return t?this.forEach(function(e){t.parentNode.insertBefore(e,t)}):this},insertAfter:function(e){var n=g(e)[0];return n?this.forEach(function(e){var t=n.parentNode;t.lastChild===n?t.appendChild(e):t.insertBefore(e,n.nextSibling)}):this}},g.offAll=function(){r.forEach(function(e){var t=e.elem,n=e.type,i=e.fn;t.removeEventListener(n,i)})};var t={menus:["head","bold","fontSize","fontName","italic","underline","strikeThrough","foreColor","backColor","link","list","justify","quote","emoticon","image","table","video","code","undo","redo"],fontNames:["宋体","楷体","楷体GB2312","微软雅黑","Arial","Tahoma","Verdana"],colors:["rgb(0,0,0)","rgba(0,0,0,65)","#1890ff","#13c2c2","#52c41a","#2f54eb","#722ed1","#eb2f96","#fadb14","#faad14","#fa541c","#f5222d","#ffffff"],emotions:[{title:"默认",type:"image",content:[{alt:"[坏笑]",src:"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/50/pcmoren_huaixiao_org.png"},{alt:"[舔屏]",src:"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/pcmoren_tian_org.png"},{alt:"[污]",src:"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3c/pcmoren_wu_org.png"}]},{title:"新浪",type:"image",content:[{src:"http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/7a/shenshou_thumb.gif",alt:"[草泥马]"},{src:"http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/60/horse2_thumb.gif",alt:"[神马]"},{src:"http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/bc/fuyun_thumb.gif",alt:"[浮云]"}]},{title:"emoji",type:"emoji",content:"😀 😃 😄 😁 😆 😅 😂 😊 😇 🙂 🙃 😉 😓 😪 😴 🙄 🤔 😬 🤐".split(/\s/)}],zIndex:2,debug:!1,linkCheck:function(){return!0},linkImgCheck:function(){return!0},pasteFilterStyle:!0,pasteIgnoreImg:!1,pasteTextHandle:function(e){return e},showLinkImg:!0,linkImgCallback:function(){},uploadImgMaxSize:5242880,uploadImgShowBase64:!1,uploadFileName:"",uploadImgParams:{},uploadImgHeaders:{},withCredentials:!1,uploadImgTimeout:1e4,uploadImgHooks:{before:function(){},success:function(){},fail:function(){},error:function(){},timeout:function(){}},qiniu:!1,width:"100%",minHeight:"100px",maxHeight:"400px",textBgColor:"#ffffff",toolBarSize:""},u={_ua:navigator.userAgent,isWebkit:function(){return/webkit/i.test(this._ua)},isIE:function(){return"ActiveXObject"in window}};function E(e,t){var n=void 0;for(n in e)if(e.hasOwnProperty(n)&&!1===t.call(e,n,e[n]))break}function _(e,t){for(var n,i=void 0,o=e.length||0,i=0;i<o&&(n=e[i],!1!==t.call(e,n,i));i++);}function v(e){return e+Math.random().toString().slice(2)}function p(e){return null==e?"":e.replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;").replace(/(\r\n|\r|\n)/g,"<br/>")}function h(e){return"function"==typeof e}function e(e){this.editor=e,this.$elem=g('<div class="w-e-menu">\n  <i class="icon-bold"></i>\n        </div>'),this.type="click",this._active=!1}e.prototype={constructor:e,onClick:function(){var e=this.editor,t=e.selection.isSelectionEmpty();t&&e.selection.createEmptyRange(),e.cmd.do("bold"),t&&(e.selection.collapseRange(),e.selection.restoreSelection())},tryChangeActive:function(){var e=this.editor,t=this.$elem;e.cmd.queryCommandState("bold")?(this._active=!0,t.addClass("w-e-active")):(this._active=!1,t.removeClass("w-e-active"))}};var b=function(e,t){var n=e.config.langArgs||[],i=t;return n.forEach(function(e){var t=e.reg,n=e.val;t.test(i)&&(i=i.replace(t,function(){return n}))}),i},f=function(){};function i(e,t){var r=this,a=e.editor;this.menu=e,this.opt=t;var n,i=g('<div class="w-e-droplist"></div>'),o=t.$title;o&&(n=o.html(),n=b(a,n),o.html(n),o.addClass("w-e-dp-title"),i.append(o));var c=t.list||[],s=t.type||"list",l=t.onClick||f,d=g('<ul class="'+("list"===s?"w-e-list":"w-e-block")+'"></ul>');i.append(d),c.forEach(function(e){var t=e.$elem,n=t.html(),n=b(a,n);t.html(n);var i=e.value,o=g('<li class="w-e-item"></li>');t&&(o.append(t),d.append(o),o.on("click",function(e){l(i),r.hideTimeoutId=setTimeout(function(){r.hide()},0)}))}),i.on("mouseleave",function(e){r.hideTimeoutId=setTimeout(function(){r.hide()},0)}),this.$container=i,this._rendered=!1,this._show=!1}function n(e){var t=this;this.editor=e,this.$elem=g('<div class="w-e-menu"><i class="icon-number"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new i(this,{width:100,$title:g("<p>设置标题</p>"),type:"list",list:[{$elem:g("<h1>H1</h1>"),value:"<h1>"},{$elem:g("<h2>H2</h2>"),value:"<h2>"},{$elem:g("<h3>H3</h3>"),value:"<h3>"},{$elem:g("<h4>H4</h4>"),value:"<h4>"},{$elem:g("<h5>H5</h5>"),value:"<h5>"},{$elem:g("<p>正文</p>"),value:"<p>"}],onClick:function(e){t._command(e)}})}function o(e){var t=this;this.editor=e,this.$elem=g('<div class="w-e-menu"><i class="icon-font-size"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new i(this,{width:160,$title:g("<p>字号</p>"),type:"list",list:[{$elem:g('<span style="font-size: x-small;">x-small</span>'),value:"1"},{$elem:g('<span style="font-size: small;">small</span>'),value:"2"},{$elem:g("<span>normal</span>"),value:"3"},{$elem:g('<span style="font-size: large;">large</span>'),value:"4"},{$elem:g('<span style="font-size: x-large;">x-large</span>'),value:"5"},{$elem:g('<span style="font-size: xx-large;">xx-large</span>'),value:"6"}],onClick:function(e){t._command(e)}})}function a(e){var t=this;this.editor=e,this.$elem=g('<div class="w-e-menu"><i class="icon-line-height"></i></div>'),this.type="droplist",this._active=!1;var n=e.config.fontNames||[];this.droplist=new i(this,{width:100,$title:g("<p>字体</p>"),type:"list",list:n.map(function(e){return{$elem:g('<span style="font-family: '+e+';">'+e+"</span>"),value:e}}),onClick:function(e){t._command(e)}})}i.prototype={constructor:i,show:function(){this.hideTimeoutId&&clearTimeout(this.hideTimeoutId);var e,t,n=this.menu.$elem,i=this.$container;this._show||(this._rendered?i.show():(e=n.getSizeData().height||0,t=this.opt.width||100,i.css("margin-top",e+"px").css("width",t+"px"),n.append(i),this._rendered=!0),this._show=!0)},hide:function(){this.showTimeoutId&&clearTimeout(this.showTimeoutId);var e=this.$container;this._show&&(e.hide(),this._show=!1)}},n.prototype={constructor:n,_command:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();t.$textElem.equal(n)||t.cmd.do("formatBlock",e)},tryChangeActive:function(){var e=this.editor,t=this.$elem,n=e.cmd.queryCommandValue("formatBlock");/^h/i.test(n)?(this._active=!0,t.addClass("w-e-active")):(this._active=!1,t.removeClass("w-e-active"))}},o.prototype={constructor:o,_command:function(e){this.editor.cmd.do("fontSize",e)}},a.prototype={constructor:a,_command:function(e){this.editor.cmd.do("fontName",e)}};function w(){}var x=[];function m(e,t){this.menu=e,this.opt=t}function c(e){this.editor=e,this.$elem=g('<div class="w-e-menu"><i class="icon-link"></i></div>'),this.type="panel",this._active=!1}function s(e){this.editor=e,this.$elem=g('<div class="w-e-menu">\n   <i class="icon-italic"></i>\n        </div>'),this.type="click",this._active=!1}function y(e){this.editor=e,this.$elem=g('<div class="w-e-menu">\n            <i class="icon-redo"></i>\n        </div>'),this.type="click",this._active=!1}function C(e){this.editor=e,this.$elem=g('<div class="w-e-menu">\n            <i class="icon-strikethrough"></i>\n        </div>'),this.type="click",this._active=!1}function k(e){this.editor=e,this.$elem=g('<div class="w-e-menu">\n            <i class="icon-underline"></i>\n        </div>'),this.type="click",this._active=!1}function S(e){this.editor=e,this.$elem=g('<div class="w-e-menu">\n            <i class="icon-undo"></i>\n        </div>'),this.type="click",this._active=!1}function I(e){var t=this;this.editor=e,this.$elem=g('<div class="w-e-menu"><i class="icon-unorderedlist"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new i(this,{width:120,$title:g("<p>设置列表</p>"),type:"list",list:[{$elem:g('<span><i class="icon-orderedlist"></i> 有序列表</span>'),value:"insertOrderedList"},{$elem:g('<span><i class="icon-unorderedlist"></i> 无序列表</span>'),value:"insertUnorderedList"}],onClick:function(e){t._command(e)}})}function A(e){var t=this;this.editor=e,this.$elem=g('<div class="w-e-menu"><i class="icon-align-left"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new i(this,{width:100,$title:g("<p>对齐方式</p>"),type:"list",list:[{$elem:g('<span><i class="icon-align-left"></i> 靠左</span>'),value:"justifyLeft"},{$elem:g('<span><i class="icon-align-center"></i> 居中</span>'),value:"justifyCenter"},{$elem:g('<span><i class="icon-align-right"></i> 靠右</span>'),value:"justifyRight"}],onClick:function(e){t._command(e)}})}function T(e){var t=this;this.editor=e,this.$elem=g('<div class="w-e-menu"><i class="icon-font-colors"></i></div>'),this.type="droplist";var n=e.config.colors||[];this._active=!1,this.droplist=new i(this,{width:120,$title:g("<p>文字颜色</p>"),type:"inline-block",list:n.map(function(e){return"#ffffff"===e?{$elem:g('<span style="background-color:'+e+';border:1px solid #e8e8e8" class="color-block"></span>'),value:e}:{$elem:g('<span style="background-color:'+e+';" class="color-block"></span>'),value:e}}),onClick:function(e){t._command(e)}})}function R(e){var t=this;this.editor=e,this.$elem=g('<div class="w-e-menu"><i class="icon-bg-colors"></i></div>'),this.type="droplist";var n=e.config.colors||[];this._active=!1,this.droplist=new i(this,{width:120,$title:g("<p>背景色</p>"),type:"inline-block",list:n.map(function(e){return"#ffffff"===e?{$elem:g('<span style="background-color:'+e+';border:1px solid #e8e8e8" class="color-block"></span>'),value:e}:{$elem:g('<span style="background-color:'+e+';" class="color-block"></span>'),value:e}}),onClick:function(e){t._command(e)}})}function N(e){this.editor=e,this.$elem=g('<div class="w-e-menu">\n            <i class="icon-block"></i>\n        </div>'),this.type="click",this._active=!1}function H(e){this.editor=e,this.$elem=g('<div class="w-e-menu">\n            <i class="icon-code"></i>\n        </div>'),this.type="panel",this._active=!1}function L(e){this.editor=e,this.$elem=g('<div class="w-e-menu">\n            <i class="icon-smile"></i>\n        </div>'),this.type="panel",this._active=!1}function z(e){this.editor=e,this.$elem=g('<div class="w-e-menu"><i class="icon-table"></i></div>'),this.type="panel",this._active=!1}function O(e){this.editor=e,this.$elem=g('<div class="w-e-menu"><i class="icon-video"></i></div>'),this.type="panel",this._active=!1}function j(e){this.editor=e;var t=v("w-e-img");this.$elem=g('<div class="w-e-menu" id="'+t+'"><i class="icon-image"></i></div>'),e.imgMenuId=t,this.type="panel",this._active=!1}m.prototype={constructor:m,show:function(){var a,e,t,n,i,o,r,c,s,l,d,u,p,h,f=this,m=this.menu;0<=x.indexOf(m)||(a=m.editor,e=g("body"),t=a.$textContainerElem,n=this.opt,i=g('<div class="w-e-panel-container"></div>'),o=n.width||300,i.css("width",o+"px").css("margin-left",(0-o)/2+"px"),r=g('<i class="icon-close w-e-panel-close"></i>'),i.append(r),r.on("click",function(){f.hide()}),c=g('<ul class="w-e-panel-tab-title"></ul>'),s=g('<div class="w-e-panel-tab-content"></div>'),i.append(c).append(s),(l=n.height)&&s.css("height",l+"px").css("overflow-y","auto"),d=n.tabs||[],u=[],p=[],d.forEach(function(e,t){var n,i,o,r;e&&(n=e.title||"",i=e.tpl||"",n=b(a,n),i=b(a,i),o=g('<li class="w-e-item">'+n+"</li>"),c.append(o),r=g(i),s.append(r),o._index=t,u.push(o),p.push(r),0===t?(o._active=!0,o.addClass("w-e-active")):r.hide(),o.on("click",function(e){o._active||(u.forEach(function(e){e._active=!1,e.removeClass("w-e-active")}),p.forEach(function(e){e.hide()}),o._active=!0,o.addClass("w-e-active"),r.show())}))}),i.on("click",function(e){e.stopPropagation()}),e.on("click",function(e){f.hide()}),t.append(i),d.forEach(function(e,o){e&&(e.events||[]).forEach(function(e){var t=e.selector,n=e.type,i=e.fn||w;p[o].find(t).on(n,function(e){e.stopPropagation(),i(e)&&f.hide()})})}),(h=i.find("input[type=text],textarea")).length&&h.get(0).focus(),this.$container=i,this._hideOtherPanels(),x.push(m))},hide:function(){var t=this.menu,e=this.$container;e&&e.remove(),x=x.filter(function(e){return e!==t})},_hideOtherPanels:function(){x.length&&x.forEach(function(e){var t=e.panel||{};t.hide&&t.hide()})}},c.prototype={constructor:c,onClick:function(){var e=this.editor,t=void 0;if(this._active){if(!(t=e.selection.getSelectionContainerElem()))return;e.selection.createRangeByElem(t),e.selection.restoreSelection(),this._createPanel(t.text(),t.attr("href"))}else e.selection.isSelectionEmpty()?this._createPanel("",""):this._createPanel(e.selection.getSelectionText(),"")},_createPanel:function(e,t){var o=this,r=v("input-link"),a=v("input-text"),n=v("btn-ok"),i=v("btn-del"),c=this._active?"inline-block":"none",s=new m(this,{width:300,tabs:[{title:"链接",tpl:'<div>\n                            <input id="'+a+'" type="text" class="block" value="'+e+'" placeholder="链接文字"/></td>\n                            <input id="'+r+'" type="text" class="block" value="'+t+'" placeholder="http://..."/></td>\n                            <div class="w-e-button-container">\n                                <button id="'+n+'" class="right">插入</button>\n                                <button id="'+i+'" class="gray right" style="display:'+c+'">删除链接</button>\n                            </div>\n                        </div>',events:[{selector:"#"+n,type:"click",fn:function(){var e=g("#"+r),t=g("#"+a),n=e.val(),i=t.val();return o._insertLink(i,n),!0}},{selector:"#"+i,type:"click",fn:function(){return o._delLink(),!0}}]}]});s.show(),this.panel=s},_delLink:function(){var e,t;!this._active||(e=this.editor).selection.getSelectionContainerElem()&&(t=e.selection.getSelectionText(),e.cmd.do("insertHTML","<span>"+t+"</span>"))},_insertLink:function(e,t){var n=this.editor,i=n.config.linkCheck,o=!0;i&&"function"==typeof i&&(o=i(e,t)),!0===o?n.cmd.do("insertHTML",'<a href="'+t+'" target="_blank">'+e+"</a>"):alert(o)},tryChangeActive:function(){var e=this.editor,t=this.$elem,n=e.selection.getSelectionContainerElem();n&&("A"===n.getNodeName()?(this._active=!0,t.addClass("w-e-active")):(this._active=!1,t.removeClass("w-e-active")))}},s.prototype={constructor:s,onClick:function(){var e=this.editor,t=e.selection.isSelectionEmpty();t&&e.selection.createEmptyRange(),e.cmd.do("italic"),t&&(e.selection.collapseRange(),e.selection.restoreSelection())},tryChangeActive:function(){var e=this.editor,t=this.$elem;e.cmd.queryCommandState("italic")?(this._active=!0,t.addClass("w-e-active")):(this._active=!1,t.removeClass("w-e-active"))}},y.prototype={constructor:y,onClick:function(){this.editor.cmd.do("redo")}},C.prototype={constructor:C,onClick:function(){var e=this.editor,t=e.selection.isSelectionEmpty();t&&e.selection.createEmptyRange(),e.cmd.do("strikeThrough"),t&&(e.selection.collapseRange(),e.selection.restoreSelection())},tryChangeActive:function(){var e=this.editor,t=this.$elem;e.cmd.queryCommandState("strikeThrough")?(this._active=!0,t.addClass("w-e-active")):(this._active=!1,t.removeClass("w-e-active"))}},k.prototype={constructor:k,onClick:function(){var e=this.editor,t=e.selection.isSelectionEmpty();t&&e.selection.createEmptyRange(),e.cmd.do("underline"),t&&(e.selection.collapseRange(),e.selection.restoreSelection())},tryChangeActive:function(){var e=this.editor,t=this.$elem;e.cmd.queryCommandState("underline")?(this._active=!0,t.addClass("w-e-active")):(this._active=!1,t.removeClass("w-e-active"))}},S.prototype={constructor:S,onClick:function(){this.editor.cmd.do("undo")}},I.prototype={constructor:I,_command:function(e){var t,n,i=this.editor,o=i.$textElem;i.selection.restoreSelection(),i.cmd.queryCommandState(e)||(i.cmd.do(e),"LI"===(t=i.selection.getSelectionContainerElem()).getNodeName()&&(t=t.parent()),!1!==/^ol|ul$/i.test(t.getNodeName())&&(t.equal(o)||((n=t.parent()).equal(o)||(t.insertAfter(n),n.remove()))))},tryChangeActive:function(){var e=this.editor,t=this.$elem;e.cmd.queryCommandState("insertUnOrderedList")||e.cmd.queryCommandState("insertOrderedList")?(this._active=!0,t.addClass("w-e-active")):(this._active=!1,t.removeClass("w-e-active"))}},A.prototype={constructor:A,_command:function(e){this.editor.cmd.do(e)}},T.prototype={constructor:T,_command:function(e){this.editor.cmd.do("foreColor",e)}},R.prototype={constructor:R,_command:function(e){this.editor.cmd.do("backColor",e)}},N.prototype={constructor:N,onClick:function(){var e=this.editor,t=e.selection.getSelectionContainerElem(),n=t.getNodeName();if(u.isIE()){if("P"===n)return g("<blockquote>"+t.text()+"</blockquote>").insertAfter(t),void t.remove();"BLOCKQUOTE"===n&&(g("<p>"+t.text()+"</p>").insertAfter(t),t.remove())}else"BLOCKQUOTE"===n?e.cmd.do("formatBlock","<P>"):e.cmd.do("formatBlock","<BLOCKQUOTE>")},tryChangeActive:function(){var e=this.editor,t=this.$elem,n=e.cmd.queryCommandValue("formatBlock");/^BLOCKQUOTE$/i.test(n)?(this._active=!0,t.addClass("w-e-active")):(this._active=!1,t.removeClass("w-e-active"))}},H.prototype={constructor:H,onClick:function(){var e,t=this.editor,n=t.selection.getSelectionStartElem(),i=t.selection.getSelectionEndElem(),o=t.selection.isSelectionEmpty(),r=t.selection.getSelectionText();if(n.equal(i))return o?void(this._active?this._createPanel(n.html()):this._createPanel()):(e=g("<code>"+r+"</code>"),t.cmd.do("insertElem",e),t.selection.createRangeByElem(e,!1),void t.selection.restoreSelection());t.selection.restoreSelection()},_createPanel:function(e){var n=this,i=(e=e||"")?"edit":"new",o=v("texxt"),t=v("btn"),r=new m(this,{width:500,tabs:[{title:"插入代码",tpl:'<div>\n                        <textarea id="'+o+'" style="height:145px;;">'+e+'</textarea>\n                        <div class="w-e-button-container">\n                            <button id="'+t+'" class="right">插入</button>\n                        </div>\n                    <div>',events:[{selector:"#"+t,type:"click",fn:function(){var e=g("#"+o),t=p(t=e.val()||e.html());return"new"==i?n._insertCode(t):n._updateCode(t),!0}}]}]});r.show(),this.panel=r},_insertCode:function(e){this.editor.cmd.do("insertHTML","<pre><code>"+e+"</code></pre><p><br></p>")},_updateCode:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();n&&(n.html(e),t.selection.restoreSelection())},tryChangeActive:function(){var e,t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();i&&(e=i.parent(),"CODE"===i.getNodeName()&&"PRE"===e.getNodeName()?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active")))}},L.prototype={constructor:L,onClick:function(){this._createPanel()},_createPanel:function(){var o=this,e=this.editor.config.emotions||[],r=[];e.forEach(function(e){var t=e.type,n=e.content||[],i="";"emoji"===t&&n.forEach(function(e){e&&(i+='<span class="w-e-item">'+e+"</span>")}),"image"===t&&n.forEach(function(e){var t=e.src,n=e.alt;t&&(i+='<span class="w-e-item"><img src="'+t+'" alt="'+n+'" data-w-e="1"/></span>')}),r.push({title:e.title,tpl:'<div class="w-e-emoticon-container">'+i+"</div>",events:[{selector:"span.w-e-item",type:"click",fn:function(e){var t=g(e.target),n=void 0,n="IMG"===t.getNodeName()?t.parent().html():"<span>"+t.html()+"</span>";return o._insert(n),!0}}]})});var t=new m(this,{width:300,height:200,tabs:r});t.show(),this.panel=t},_insert:function(e){this.editor.cmd.do("insertHTML",e)}},z.prototype={constructor:z,onClick:function(){this._active?this._createEditPanel():this._createInsertPanel()},_createInsertPanel:function(){var n=this,e=v("btn"),i=v("row"),o=v("col"),t=new m(this,{width:250,tabs:[{title:"插入表格",tpl:'<div>\n                        <p style="text-align:left; padding:5px 0;">\n                            创建\n                            <input id="'+i+'" type="text" value="5" style="width:40px;text-align:center;"/>\n                            行\n                            <input id="'+o+'" type="text" value="5" style="width:40px;text-align:center;"/>\n                            列的表格\n                        </p>\n                        <div class="w-e-button-container">\n                            <button id="'+e+'" class="right">插入</button>\n                        </div>\n                    </div>',events:[{selector:"#"+e,type:"click",fn:function(){var e=parseInt(g("#"+i).val()),t=parseInt(g("#"+o).val());return e&&t&&0<e&&0<t&&n._insert(e,t),!0}}]}]});t.show(),this.panel=t},_insert:function(e,t){for(var n=void 0,i=void 0,o='<table border="0" width="100%" cellpadding="0" cellspacing="0">',n=0;n<e;n++){if(o+="<tr>",0===n)for(i=0;i<t;i++)o+="<th>&nbsp;</th>";else for(i=0;i<t;i++)o+="<td>&nbsp;</td>";o+="</tr>"}o+="</table><p><br></p>";var r=this.editor;r.cmd.do("insertHTML",o),r.cmd.do("enableObjectResizing",!1),r.cmd.do("enableInlineTableEditing",!1)},_createEditPanel:function(){var e=this,t=v("add-row"),n=v("add-col"),i=v("del-row"),o=v("del-col"),r=v("del-table");new m(this,{width:320,tabs:[{title:"编辑表格",tpl:'<div>\n                        <div class="w-e-button-container" style="border-bottom:1px solid #f1f1f1;padding-bottom:5px;margin-bottom:5px;">\n                            <button id="'+t+'" class="left">增加行</button>\n                            <button id="'+i+'" class="red left">删除行</button>\n                            <button id="'+n+'" class="left">增加列</button>\n                            <button id="'+o+'" class="red left">删除列</button>\n                        </div>\n                        <div class="w-e-button-container">\n                            <button id="'+r+'" class="gray left">删除表格</button>\n                        </dv>\n                    </div>',events:[{selector:"#"+t,type:"click",fn:function(){return e._addRow(),!0}},{selector:"#"+n,type:"click",fn:function(){return e._addCol(),!0}},{selector:"#"+i,type:"click",fn:function(){return e._delRow(),!0}},{selector:"#"+o,type:"click",fn:function(){return e._delCol(),!0}},{selector:"#"+r,type:"click",fn:function(){return e._delTable(),!0}}]}]}).show()},_getLocationData:function(){var n={},i=this.editor.selection.getSelectionContainerElem();if(i){var e=i.getNodeName();if("TD"===e||"TH"===e){var o=i.parent(),t=o.children(),r=t.length;t.forEach(function(e,t){if(e===i[0])return!(n.td={index:t,elem:e,length:r})});var a=o.parent().children(),c=a.length;return a.forEach(function(e,t){if(e===o[0])return!(n.tr={index:t,elem:e,length:c})}),n}}},_addRow:function(){var e=this._getLocationData();if(e){for(var t=g(e.tr.elem),n=e.td.length,i=document.createElement("tr"),o="",r=void 0,r=0;r<n;r++)o+="<td>&nbsp;</td>";i.innerHTML=o,g(i).insertAfter(t)}},_addCol:function(){var e,i,t=this._getLocationData();t&&(e=t.tr,i=t.td.index,g(e.elem).parent().children().forEach(function(e){var t=g(e).children().get(i),n=t.getNodeName().toLowerCase();g(document.createElement(n)).insertAfter(t)}))},_delRow:function(){var e=this._getLocationData();e&&g(e.tr.elem).remove()},_delCol:function(){var e,t,n=this._getLocationData();n&&(e=n.tr,t=n.td.index,g(e.elem).parent().children().forEach(function(e){g(e).children().get(t).remove()}))},_delTable:function(){var e,t=this.editor.selection.getSelectionContainerElem();!t||(e=t.parentUntil("table"))&&e.remove()},tryChangeActive:function(){var e,t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();i&&("TD"===(e=i.getNodeName())||"TH"===e?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active")))}},O.prototype={constructor:O,onClick:function(){this._createPanel()},_createPanel:function(){var t=this,n=v("text-val"),e=v("btn"),i=new m(this,{width:350,tabs:[{title:"插入视频",tpl:'<div>\n                        <input id="'+n+'" type="text" class="block" placeholder="格式如：<iframe src=... ></iframe>"/>\n                        <div class="w-e-button-container">\n                            <button id="'+e+'" class="right">插入</button>\n                        </div>\n                    </div>',events:[{selector:"#"+e,type:"click",fn:function(){var e=g("#"+n).val().trim();return e&&t._insert(e),!0}}]}]});i.show(),this.panel=i},_insert:function(e){this.editor.cmd.do("insertHTML",e+"<p><br></p>")}},j.prototype={constructor:j,onClick:function(){this.editor.config.qiniu||(this._active?this._createEditPanel():this._createInsertPanel())},_createEditPanel:function(){var t=this.editor,e=v("width-30"),n=v("width-50"),i=v("width-100"),o=v("del-btn"),r=new m(this,{width:300,tabs:[{title:"编辑图片",tpl:'<div>\n                    <div class="w-e-button-container" style="border-bottom:1px solid #f1f1f1;padding-bottom:5px;margin-bottom:5px;">\n                        <span style="float:left;font-size:14px;margin:4px 5px 0 5px;color:#333;">最大宽度：</span>\n                        <button id="'+e+'" class="left">30%</button>\n                        <button id="'+n+'" class="left">50%</button>\n                        <button id="'+i+'" class="left">100%</button>\n                    </div>\n                    <div class="w-e-button-container">\n                        <button id="'+o+'" class="gray left">删除图片</button>\n                    </dv>\n                </div>',events:[{selector:"#"+e,type:"click",fn:function(){var e=t._selectedImg;return e&&e.css("max-width","30%"),!0}},{selector:"#"+n,type:"click",fn:function(){var e=t._selectedImg;return e&&e.css("max-width","50%"),!0}},{selector:"#"+i,type:"click",fn:function(){var e=t._selectedImg;return e&&e.css("max-width","100%"),!0}},{selector:"#"+o,type:"click",fn:function(){var e=t._selectedImg;return e&&e.remove(),!0}}]}]});r.show(),this.panel=r},_createInsertPanel:function(){var e=this.editor,n=e.uploadImg,t=e.config,i=v("up-trigger"),o=v("up-file"),r=v("link-url"),a=v("link-btn"),c=[{title:"上传图片",tpl:'<div class="w-e-up-img-container">\n                    <div id="'+i+'" class="w-e-up-btn">\n                        <i class="icon-cloud-upload"></i>\n <div class="upload-text">&#35831;&#36873;&#25321;&#22270;&#29255;&#24320;&#22987;&#19978;&#20256;</div>                   </div>\n                    <div style="display:none;">\n                        <input id="'+o+'" type="file" multiple="multiple" accept="image/jpg,image/jpeg,image/png,image/gif,image/bmp"/>\n                    </div>\n                </div>',events:[{selector:"#"+i,type:"click",fn:function(){var e=g("#"+o)[0];if(!e)return!0;e.click()}},{selector:"#"+o,type:"change",fn:function(){var e=g("#"+o)[0];if(!e)return!0;var t=e.files;return t.length&&n.uploadImg(t),!0}}]},{title:"网络图片",tpl:'<div>\n                    <input id="'+r+'" type="text" class="block" placeholder="图片链接"/></td>\n                    <div class="w-e-button-container">\n                        <button id="'+a+'" class="right">插入</button>\n                    </div>\n                </div>',events:[{selector:"#"+a,type:"click",fn:function(){var e=g("#"+r).val().trim();return e&&n.insertLinkImg(e),!0}}]}],s=[];(t.uploadImgShowBase64||t.uploadImgServer||t.customUploadImg)&&window.FileReader&&s.push(c[0]),t.showLinkImg&&s.push(c[1]);var l=new m(this,{width:300,tabs:s});l.show(),this.panel=l},tryChangeActive:function(){var e=this.editor,t=this.$elem;e._selectedImg?(this._active=!0,t.addClass("w-e-active")):(this._active=!1,t.removeClass("w-e-active"))}};var B={};function P(e){this.editor=e,this.menus={}}function $(e){var t=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData;return p(null==t?window.clipboardData&&window.clipboardData.getData("text"):t.getData("text/plain"))}function D(e){this.editor=e}function M(e){this.editor=e}function q(e){this.editor=e,this._currentRange=null}function K(e){this.editor=e,this._time=0,this._isShow=!1,this._isRender=!1,this._timeoutId=0,this.$textContainer=e.$textContainerElem,this.$bar=g('<div class="w-e-progress"></div>')}B.bold=e,B.head=n,B.fontSize=o,B.fontName=a,B.link=c,B.italic=s,B.redo=y,B.strikeThrough=C,B.underline=k,B.undo=S,B.list=I,B.justify=A,B.foreColor=T,B.backColor=R,B.quote=N,B.code=H,B.emoticon=L,B.table=z,B.video=O,B.image=j,P.prototype={constructor:P,init:function(){var n=this,i=this.editor;((i.config||{}).menus||[]).forEach(function(e){var t=B[e];t&&"function"==typeof t&&(n.menus[e]=new t(i))}),this._addToToolbar(),this._bindEvent()},_addToToolbar:function(){var e=this.editor,i=e.$toolbarElem,t=this.menus,o=e.config.zIndex+1;E(t,function(e,t){var n=t.$elem;n&&(n.css("z-index",o),i.append(n))})},_bindEvent:function(){var e=this.menus,r=this.editor;E(e,function(e,t){var n,i,o=t.type;o&&(n=t.$elem,i=t.droplist,t.panel,"click"===o&&t.onClick&&n.on("click",function(e){null!=r.selection.getRange()&&t.onClick(e)}),"droplist"===o&&i&&n.on("mouseenter",function(e){null!=r.selection.getRange()&&(i.showTimeoutId=setTimeout(function(){i.show()},200))}).on("mouseleave",function(e){i.hideTimeoutId=setTimeout(function(){i.hide()},0)}),"panel"===o&&t.onClick&&n.on("click",function(e){e.stopPropagation(),null!=r.selection.getRange()&&t.onClick(e)}))})},changeActive:function(){E(this.menus,function(e,t){t.tryChangeActive&&setTimeout(function(){t.tryChangeActive()},100)})}},D.prototype={constructor:D,init:function(){this._bindEvent()},clear:function(){this.html("<p><br></p>")},html:function(e){var t=this.editor,n=t.$textElem,i=void 0;if(null==e)return i=n.html(),i=i.replace(/\u200b/gm,""),i;n.html(e),t.initSelection()},getJSON:function(){return function s(e){var l=[];return(e.childNodes()||[]).forEach(function(e){var t=void 0,n=e.nodeType;if(3===n&&(t=p(t=e.textContent)),1===n){(t={}).tag=e.nodeName.toLowerCase();for(var i=[],o=e.attributes||{},r=o.length||0,a=0;a<r;a++){var c=o[a];i.push({name:c.name,value:c.value})}t.attrs=i,t.children=s(g(e))}l.push(t)}),l}(this.editor.$textElem)},text:function(e){var t=this.editor,n=t.$textElem,i=void 0;if(null==e)return i=n.text(),i=i.replace(/\u200b/gm,""),i;n.text("<p>"+e+"</p>"),t.initSelection()},append:function(e){var t=this.editor;t.$textElem.append(g(e)),t.initSelection()},_bindEvent:function(){this._saveRangeRealTime(),this._enterKeyHandle(),this._clearHandle(),this._pasteHandle(),this._tabHandle(),this._imgHandle(),this._dragHandle()},_saveRangeRealTime:function(){var t=this.editor,n=t.$textElem;function i(e){t.selection.saveRange(),t.menus.changeActive()}n.on("keyup",i),n.on("mousedown",function(e){n.on("mouseleave",i)}),n.on("mouseup",function(e){i(),n.off("mouseleave",i)})},_enterKeyHandle:function(){var s=this.editor,i=s.$textElem;function o(e){var t=g("<p><br></p>");t.insertBefore(e),s.selection.createRangeByElem(t,!0),s.selection.restoreSelection(),e.remove()}i.on("keyup",function(e){var t,n;13===e.keyCode&&(t=s.selection.getSelectionContainerElem(),"<code><br></code>"!==(n=t.parent()).html()?n.equal(i)&&"P"!==t.getNodeName()&&(t.text()||o(t)):o(t))}),i.on("keydown",function(e){13===e.keyCode?function(e){var t=s.selection.getSelectionContainerElem();if(t){var n=t.parent(),i=t.getNodeName(),o=n.getNodeName();if("CODE"===i&&"PRE"===o&&s.cmd.queryCommandSupported("insertHTML")){if(!0===s._willBreakCode){var r=g("<p><br></p>");return r.insertAfter(n),s.selection.createRangeByElem(r,!0),s.selection.restoreSelection(),s._willBreakCode=!1,e.preventDefault()}var a=s.selection.getRange().startOffset;s.cmd.do("insertHTML","\n"),s.selection.saveRange(),s.selection.getRange().startOffset===a&&s.cmd.do("insertHTML","\n");var c=t.html().length;s.selection.getRange().startOffset+1===c&&(s._willBreakCode=!0),e.preventDefault()}}}(e):s._willBreakCode=!1})},_clearHandle:function(){var i=this.editor,o=i.$textElem;o.on("keydown",function(e){8===e.keyCode&&("<p><br></p>"!==o.html().toLowerCase().trim()||e.preventDefault())}),o.on("keyup",function(e){var t,n;8===e.keyCode&&(t=void 0,(n=o.html().toLowerCase().trim())&&"<br>"!==n||(t=g("<p><br/></p>"),o.html(""),o.append(t),i.selection.createRangeByElem(t,!1,!0),i.selection.restoreSelection()))})},_pasteHandle:function(){var r=this.editor,e=r.config,a=e.pasteFilterStyle,c=e.pasteTextHandle,s=e.pasteIgnoreImg,t=r.$textElem,l=0;function d(){var e=Date.now(),t=100<=e-l?!0:!1;return l=e,t}t.on("paste",function(e){if(!u.isIE()&&(e.preventDefault(),d())){var t=function(e,t,n){var i=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData,o=void 0,r=void 0;if(null==i?o=window.clipboardData&&window.clipboardData.getData("text"):(o=i.getData("text/plain"),r=i.getData("text/html")),!r&&o&&(r="<p>"+p(o)+"</p>"),r){var a=r.split("</html>");return 2===a.length&&(r=a[0]),r=(r=(r=r.replace(/<(meta|script|link).+?>/gim,"")).replace(/<!--.*?-->/gm,"")).replace(/\s?data-.+?=('|").+?('|")/gim,""),n&&(r=r.replace(/<img.+?>/gim,"")),r=t?r.replace(/\s?(class|style)=('|").*?('|")/gim,""):r.replace(/\s?class=('|").*?('|")/gim,"")}}(e,a,s),n=(n=$(e)).replace(/\n/gm,"<br>"),i=r.selection.getSelectionContainerElem();if(i){var o=i.getNodeName();if("CODE"===o||"PRE"===o)return c&&h(c)&&(n=""+(c(n)||"")),void r.cmd.do("insertHTML","<p>"+n+"</p>");if(t)try{c&&h(c)&&(t=""+(c(t)||"")),r.cmd.do("insertHTML",t)}catch(e){c&&h(c)&&(n=""+(c(n)||"")),r.cmd.do("insertHTML","<p>"+n+"</p>")}else l=0}}}),t.on("paste",function(e){var t,n,i;u.isIE()||(e.preventDefault(),!d()||(t=function(e){var i=[];if($(e))return i;var t=(e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData||{}).items;return t&&E(t,function(e,t){var n=t.type;/image/i.test(n)&&i.push(t.getAsFile())}),i}(e))&&t.length&&(!(n=r.selection.getSelectionContainerElem())||"CODE"!==(i=n.getNodeName())&&"PRE"!==i&&r.uploadImg.uploadImg(t)))})},_tabHandle:function(){var r=this.editor;r.$textElem.on("keydown",function(e){var t,n,i,o;9===e.keyCode&&(!r.cmd.queryCommandSupported("insertHTML")||(t=r.selection.getSelectionContainerElem())&&(n=t.parent(),i=t.getNodeName(),o=n.getNodeName(),"CODE"===i&&"PRE"===o?r.cmd.do("insertHTML","    "):r.cmd.do("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"),e.preventDefault()))})},_imgHandle:function(){var n=this.editor,e=n.$textElem;e.on("click","img",function(e){var t=g(this);"1"!==t.attr("data-w-e")&&(n._selectedImg=t,n.selection.createRangeByElem(t),n.selection.restoreSelection())}),e.on("click  keyup",function(e){e.target.matches("img")||(n._selectedImg=null)})},_dragHandle:function(){var n=this.editor;g(document).on("dragleave drop dragenter dragover",function(e){e.preventDefault()}),n.$textElem.on("drop",function(e){e.preventDefault();var t=e.dataTransfer&&e.dataTransfer.files;t&&t.length&&n.uploadImg.uploadImg(t)})}},M.prototype={constructor:M,do:function(e,t){var n,i=this.editor;i._useStyleWithCSS||(document.execCommand("styleWithCSS",null,!0),i._useStyleWithCSS=!0),i.selection.getRange()&&(i.selection.restoreSelection(),this[n="_"+e]?this[n](t):this._execCommand(e,t),i.menus.changeActive(),i.selection.saveRange(),i.selection.restoreSelection(),i.change&&i.change())},_insertHTML:function(e){var t=this.editor.selection.getRange();this.queryCommandSupported("insertHTML")?this._execCommand("insertHTML",e):t.insertNode?(t.deleteContents(),t.insertNode(g(e)[0])):t.pasteHTML&&t.pasteHTML(e)},_insertElem:function(e){var t=this.editor.selection.getRange();t.insertNode&&(t.deleteContents(),t.insertNode(e[0]))},_execCommand:function(e,t){document.execCommand(e,!1,t)},queryCommandValue:function(e){return document.queryCommandValue(e)},queryCommandState:function(e){return document.queryCommandState(e)},queryCommandSupported:function(e){return document.queryCommandSupported(e)}},q.prototype={constructor:q,getRange:function(){return this._currentRange},saveRange:function(e){var t,n,i;e?this._currentRange=e:0!==(t=window.getSelection()).rangeCount&&(n=t.getRangeAt(0),(i=this.getSelectionContainerElem(n))&&("false"===i.attr("contenteditable")||i.parentUntil("[contenteditable=false]")||this.editor.$textElem.isContain(i)&&(this._currentRange=n)))},collapseRange:function(e){null==e&&(e=!1);var t=this._currentRange;t&&t.collapse(e)},getSelectionText:function(){return this._currentRange?this._currentRange.toString():""},getSelectionContainerElem:function(e){var t;if(e=e||this._currentRange)return g(1===(t=e.commonAncestorContainer).nodeType?t:t.parentNode)},getSelectionStartElem:function(e){var t;if(e=e||this._currentRange)return g(1===(t=e.startContainer).nodeType?t:t.parentNode)},getSelectionEndElem:function(e){var t;if(e=e||this._currentRange)return g(1===(t=e.endContainer).nodeType?t:t.parentNode)},isSelectionEmpty:function(){var e=this._currentRange;return!(!e||!e.startContainer||e.startContainer!==e.endContainer||e.startOffset!==e.endOffset)},restoreSelection:function(){var e=window.getSelection();e.removeAllRanges(),e.addRange(this._currentRange)},createEmptyRange:function(){var e,t=this.editor,n=this.getRange();if(n&&this.isSelectionEmpty())try{u.isWebkit()?(t.cmd.do("insertHTML","&#8203;"),n.setEnd(n.endContainer,n.endOffset+1),this.saveRange(n)):(e=g("<strong>&#8203;</strong>"),t.cmd.do("insertElem",e),this.createRangeByElem(e,!0))}catch(e){}},createRangeByElem:function(e,t,n){var i,o;e.length&&(i=e[0],o=document.createRange(),n?o.selectNodeContents(i):o.selectNode(i),"boolean"==typeof t&&o.collapse(t),this.saveRange(o))}},K.prototype={constructor:K,show:function(e){var t,n,i=this;this._isShow||(this._isShow=!0,t=this.$bar,this._isRender?this._isRender=!0:this.$textContainer.append(t),100<Date.now()-this._time&&e<=1&&(t.css("width",100*e+"%"),this._time=Date.now()),(n=this._timeoutId)&&clearTimeout(n),n=setTimeout(function(){i._hide()},500))},_hide:function(){this.$bar.remove(),this._time=0,this._isShow=!1,this._isRender=!1}};var F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function U(e){this.editor=e}U.prototype={constructor:U,_alert:function(e,t){var n=this.editor,i=n.config.debug,o=n.config.customAlert;if(i)throw new Error("wangEditor: "+(t||e));(o&&"function"==typeof o?o:alert)(e)},insertLinkImg:function(t){var e,n,i,o,r,a=this;t&&(e=this.editor,o=void 0,(i=(n=e.config).linkImgCheck)&&"function"==typeof i&&"string"==typeof(o=i(t))?alert(o):(e.cmd.do("insertHTML",'<img src="'+t+'" style="max-width:100%;"/>'),(r=document.createElement("img")).onload=function(){var e=n.linkImgCallback;e&&"function"==typeof e&&e(t),r=null},r.onerror=function(){r=null,a._alert("插入图片错误",'wangEditor: 插入图片出错，图片链接是 "'+t+'"，下载该链接失败')},r.onabort=function(){r=null},r.src=t))},uploadImg:function(e){var i=this;if(e&&e.length){var o=this.editor,t=o.config,n=t.uploadImgServer,r=t.uploadImgShowBase64,a=t.uploadImgMaxSize,c=a/1024/1024,s=t.uploadImgMaxLength||1e4,l=t.uploadFileName||"",d=t.uploadImgParams||{},u=t.uploadImgParamsWithUrl,p=t.uploadImgHeaders||{},h=t.uploadImgHooks||{},f=t.uploadImgTimeout||3e3,m=t.withCredentials;null==m&&(m=!1);var g=t.customUploadImg;if(g||n||r){var v=[],b=[];if(_(e,function(e){var t=e.name,n=e.size;t&&n&&(!1!==/\.(jpg|jpeg|png|bmp|gif|webp)$/i.test(t)?a<n?b.push("【"+t+"】大于 "+c+"M"):v.push(e):b.push("【"+t+"】不是图片"))}),b.length)this._alert("图片验证未通过: \n"+b.join("\n"));else if(v.length>s)this._alert("一次最多上传"+s+"张图片");else if(g&&"function"==typeof g)g(v,this.insertLinkImg.bind(this));else{var w=new FormData;if(_(v,function(e){var t=l||e.name;w.append(t,e)}),n&&"string"==typeof n){var x=n.split("#"),n=x[0],y=x[1]||"";E(d,function(e,t){u&&(0<n.indexOf("?")?n+="&":n+="?",n=n+e+"="+t),w.append(e,t)}),y&&(n+="#"+y);var C=new XMLHttpRequest;if(C.open("POST",n),C.timeout=f,C.ontimeout=function(){h.timeout&&"function"==typeof h.timeout&&h.timeout(C,o),i._alert("上传图片超时")},C.upload&&(C.upload.onprogress=function(e){var t,n=new K(o);e.lengthComputable&&(t=e.loaded/e.total,n.show(t))}),C.onreadystatechange=function(){var t=void 0;if(4===C.readyState){if(C.status<200||300<=C.status)return h.error&&"function"==typeof h.error&&h.error(C,o),void i._alert("上传图片发生错误","上传图片发生错误，服务器返回状态是 "+C.status);if("object"!==(void 0===(t=C.responseText)?"undefined":F(t)))try{t=JSON.parse(t)}catch(e){return h.fail&&"function"==typeof h.fail&&h.fail(C,o,t),void i._alert("上传图片失败","上传图片返回结果错误，返回结果是: "+t)}h.customInsert||"0"==t.errno?(h.customInsert&&"function"==typeof h.customInsert?h.customInsert(i.insertLinkImg.bind(i),t,o):(t.data||[]).forEach(function(e){i.insertLinkImg(e)}),h.success&&"function"==typeof h.success&&h.success(C,o,t)):(h.fail&&"function"==typeof h.fail&&h.fail(C,o,t),i._alert("上传图片失败","上传图片返回结果错误，返回结果 errno="+t.errno))}},h.before&&"function"==typeof h.before){var k=h.before(C,o,v);if(k&&"object"===(void 0===k?"undefined":F(k))&&k.prevent)return void this._alert(k.msg)}return E(p,function(e,t){C.setRequestHeader(e,t)}),C.withCredentials=m,void C.send(w)}r&&_(e,function(e){var t=i,n=new FileReader;n.readAsDataURL(e),n.onload=function(){t.insertLinkImg(this.result)}})}}}}};var G=1;function V(e,t){if(null==e)throw new Error("错误：初始化编辑器时候未传入任何参数，请查阅文档");this.id="wangEditor-"+G++,this.toolbarSelector=e,this.textSelector=t,this.customConfig={}}V.prototype={constructor:V,_initConfig:function(){this.config=Object.assign({},t,this.customConfig);var e=this.config.lang||{},n=[];E(e,function(e,t){n.push({reg:new RegExp(e,"img"),val:t})}),this.config.langArgs=n},_initDom:function(){var o=this,e=g(this.toolbarSelector),t=this.textSelector,n=this.config,i=n.zIndex,r=n.minHeight,a=n.maxHeight,c=n.textBgColor,s=n.toolBarSize,l=void 0,d=void 0,u=void 0,p=void 0;null==t?(l=g("<div></div>"),d=g("<div></div>"),p=e.children(),e.append(l).append(d)):(l=e,p=(d=g(t)).children()),(u=g("<div></div>")).attr("contenteditable","true"),p&&p.length?u.append(p):u.append(g("<p><br></p>")),d.append(u),l.addClass("w-e-toolbar"),l.addClass("w-e-toolbar-"+s),d.addClass("w-e-text-container"),d.css("z-index",i),u.addClass("w-e-text").css("min-height",r).css("max-height",a).css("background-color",c);var h=v("toolbar-elem");l.attr("id",h);var f=v("text-elem");u.attr("id",f),this.$toolbarElem=l,this.$textContainerElem=d,this.$textElem=u,this.toolbarElemId=h,this.textElemId=f;var m=!0;d.on("compositionstart",function(){m=!1}),d.on("compositionend",function(){m=!0}),d.on("click keyup",function(){m&&o.change&&o.change()}),l.on("click",function(){this.change&&this.change()}),(n.onfocus||n.onblur)&&(this.isFocus=!1,g(document).on("click",function(e){var t=u.isContain(g(e.target)),n=l.isContain(g(e.target)),i=l[0]==e.target;if(t)o.isFocus||o.onfocus&&o.onfocus(),o.isFocus=!0;else{if(n&&!i)return;o.isFocus&&o.onblur&&o.onblur(),o.isFocus=!1}}))},_initCommand:function(){this.cmd=new M(this)},_initSelectionAPI:function(){this.selection=new q(this)},_initUploadImg:function(){this.uploadImg=new U(this)},_initMenus:function(){this.menus=new P(this),this.menus.init()},_initText:function(){this.txt=new D(this),this.txt.init()},initSelection:function(e){var t=this.$textElem,n=t.children();if(!n.length)return t.append(g("<p><br></p>")),void this.initSelection();var i=n.last();if(e){var o=i.html().toLowerCase(),r=i.getNodeName();if("<br/>"!==o&&"<br/>"!==o||"P"!==r)return t.append(g("<p><br></p>")),void this.initSelection()}this.selection.createRangeByElem(i,!1,!0),this.selection.restoreSelection()},_bindEvent:function(){var t=0,n=this.txt.html(),e=this.config,i=e.onchangeTimeout;(!(i=parseInt(i,10))||i<=0)&&(i=200);var o=e.onchange;o&&"function"==typeof o&&(this.change=function(){var e=this.txt.html();e.length===n.length&&e===n||(t&&clearTimeout(t),t=setTimeout(function(){o(e),n=e},i))});var r=e.onblur;r&&"function"==typeof r&&(this.onblur=function(){var e=this.txt.html();r(e)});var a=e.onfocus;a&&"function"==typeof a&&(this.onfocus=function(){a()})},create:function(){this._initConfig(),this._initDom(),this._initCommand(),this._initSelectionAPI(),this._initText(),this._initMenus(),this._initUploadImg(),this.initSelection(!0),this._bindEvent()},_offAllEvent:function(){g.offAll()}};try{document}catch(e){throw new Error("请在浏览器环境下运行")}"function"!=typeof Object.assign&&(Object.assign=function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i<arguments.length;i++){var o=arguments[i];if(null!=o)for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])}return n});var Z=document.createElement("style");return Z.type="text/css",Z.innerHTML='.w-e-menu-panel,.w-e-text-container,.w-e-toolbar{padding:0;margin:0;box-sizing:border-box}.w-e-menu-panel *,.w-e-text-container *,.w-e-toolbar *{padding:0;margin:0;box-sizing:border-box}.w-e-clear-fix:after{content:"";display:table;clear:both}.w-e-toolbar .w-e-droplist{position:absolute;left:0;top:0;padding:4px 0;text-align:left;list-style-type:none;background-color:#fff;background-clip:padding-box;border-radius:4px;outline:0;box-shadow:0 2px 8px rgba(0,0,0,.15);-webkit-transform:translateZ(0);z-index:3}.w-e-droplist:before{content:"";position:absolute;left:14px;top:-3px;display:block;background-color:#fff;width:8px;height:8px;transform:rotate(45deg)}.w-e-toolbar .w-e-droplist .w-e-dp-title{text-align:center;color:#999;line-height:2;font-size:14px;border-bottom:1px solid #f0f0f0;margin-bottom:5px}.w-e-toolbar .w-e-droplist ul.w-e-list{list-style:none;line-height:1}.w-e-droplist ul.w-e-list li.w-e-item{clear:both;margin:0;padding:5px 12px;color:rgba(0,0,0,.65);font-weight:400;font-size:14px;line-height:22px;white-space:nowrap;cursor:pointer;transition:all .3s}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover{background-color:#e6f7ff;color:#1890ff}.w-e-toolbar .w-e-droplist ul.w-e-block{list-style:none;text-align:left;padding:5px;display:flex;flex-wrap:wrap}ul.w-e-block .color-block{display:inline-block;height:20px;width:100%;border-radius:4px}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item{flex:0 0 25%;height:20px;width:20px;text-align:center;padding:0 3px;margin-bottom:6px}@font-face{font-family:antd-icon;src:url(data:application/x-font-woff2;charset=utf-8;base64,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) format(\'woff2\');font-style:normal;font-size:inherit}[class*=icon-],[class^=icon-]{font-family:antd-icon!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-bulb:before{content:"\\e7c3"}.icon-block:before{content:"\\e7e0"}.icon-number:before{content:"\\e802"}.icon-close:before{content:"\\e803"}.icon-smile:before{content:"\\e783"}.icon-undo:before{content:"\\e787"}.icon-redo:before{content:"\\e788"}.icon-cloud-upload:before{content:"\\e7d9"}.icon-video:before{content:"\\e7da"}.icon-image:before{content:"\\e7de"}.icon-table:before{content:"\\e7df"}.icon-link:before{content:"\\e7e2"}.icon-unorderedlist:before{content:"\\e7f4"}.icon-orderedlist:before{content:"\\e7f5"}.icon-align-right:before{content:"\\e7f6"}.icon-align-center:before{content:"\\e7f7"}.icon-align-left:before{content:"\\e7f8"}.icon-bold:before{content:"\\e7f9"}.icon-font-colors:before{content:"\\e7fa"}.icon-font-size:before{content:"\\e7fb"}.icon-line-height:before{content:"\\e7fc"}.icon-strikethrough:before{content:"\\e7fd"}.icon-underline:before{content:"\\e7fe"}.icon-italic:before{content:"\\e7ff"}.icon-code:before{content:"\\e800"}.icon-bg-colors:before{content:"\\e801"}.w-e-toolbar{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;padding:5px;align-items:center;background-color:#fafafa;border:1px solid #d9d9d9;border-radius:4px 4px 0 0}.w-e-toolbar.w-e-toolbar-small{height:40px;line-height:40px}.w-e-toolbar .w-e-menu{position:relative;text-align:center;padding:0 10px;height:40px;line-height:40px;cursor:pointer;color:rgba(0,0,0,.65);font-size:18px;border-radius:4px}.w-e-toolbar.w-e-toolbar-small>.w-e-menu{padding:0 6px;height:30px;line-height:30px}.w-e-toolbar .w-e-menu:focus,.w-e-toolbar .w-e-menu:hover{background-color:#e6f7ff;color:#1890ff}.w-e-toolbar .w-e-active i,.w-e-toolbar .w-e-active:hover i{color:#1890ff}.w-e-panel-container{position:absolute;top:0;left:50%;padding:4px 0;text-align:left;list-style-type:none;background-color:#fff;background-clip:padding-box;border-radius:4px;outline:0;box-shadow:0 2px 8px rgba(0,0,0,.15);-webkit-transform:translateZ(0);z-index:3}.w-e-text-container .w-e-panel-container .w-e-panel-close{position:absolute;right:0;top:0;padding:5px;margin:2px 5px 0 0;cursor:pointer;color:#999}.w-e-text-container .w-e-panel-container .w-e-panel-close:hover{color:#333}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title{list-style:none;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;margin:2px 10px 0 10px;border-bottom:1px solid #e8e8e8}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-item{padding:3px 5px;color:#999;cursor:pointer;margin:0 3px;position:relative;top:1px}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-active{color:#1890ff;border-bottom:1px solid #1890ff;cursor:default}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content{padding:10px 15px 10px 15px;font-size:16px}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content button:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus{outline:0}.w-e-panel-tab-content textarea{box-sizing:border-box;margin:0;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;width:100%;padding:4px 11px;color:rgba(0,0,0,.65);font-size:14px;line-height:1.5;background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:4px;transition:all .3s}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus{border-color:#40a9ff;border-right-width:1px!important;outline:0;box-shadow:0 0 0 2px rgba(24,144,255,.2)}.w-e-panel-tab-content textarea::-webkit-scrollbar{width:6px;height:6px;padding-top:8px;background-color:transparent}.w-e-panel-tab-content textarea::-webkit-scrollbar-thumb{background-color:#d9d9d9}.w-e-panel-tab-content input[type=text]{box-sizing:border-box;margin:0;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;width:100%;height:32px;padding:4px 11px;color:rgba(0,0,0,.65);font-size:14px;line-height:1.5;background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:4px;transition:all .3s}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].small{width:30px;text-align:center}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].block{display:block;width:100%;margin:10px 0}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus{outline:0;box-shadow:0 0 0 2px rgba(24,144,255,.2);border-color:#40a9ff;border-right-width:1px!important}.w-e-panel-tab-content .w-e-button-container button{line-height:1.499;position:relative;display:inline-block;font-weight:400;white-space:nowrap;text-align:center;background-image:none;cursor:pointer;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:manipulation;height:32px;padding:0 15px;font-size:14px;border-radius:4px;color:rgba(0,0,3,.65);color:#fff;background-color:#1890ff;border:1px solid #1890ff;text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px 0 rgba(0,0,0,.045)}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left{float:left;margin-right:10px}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right{float:right;margin-left:10px}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray{color:#999}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red{color:#c24f4a}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover{color:#fff;background-color:#40a9ff;border-color:#40a9ff}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after{content:"";display:table;clear:both}.w-e-text-container .w-e-panel-container .w-e-emoticon-container .w-e-item{cursor:pointer;font-size:18px;padding:0 3px;display:inline-block;margin-bottom:4px}.w-e-text-container .w-e-panel-container .w-e-up-img-container{text-align:center}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn{color:#999;cursor:pointer;font-size:50px;line-height:1;border:1px dashed #e8e8e8;border-radius:4px;background-color:#fafafa}.w-e-up-btn .upload-text{font-size:14px;margin-bottom:20px;color:rgba(0,0,0,.65)}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover{color:#1890ff;border-color:#1890ff;transition:all .4s}.w-e-text::-webkit-scrollbar{width:6px;height:6px;padding-top:8px;background-color:transparent}.w-e-text::-webkit-scrollbar-thumb{background-color:#d9d9d9}.w-e-text-container{position:relative}.w-e-text-container .w-e-progress{position:absolute;background-color:#1e88e5;bottom:0;left:0;height:1px}.w-e-text{padding:0 20px;min-height:100px;max-height:400px;border:1px solid #d9d9d9;border-top:none;border-radius:0 0 4px 4px;overflow-y:auto}.w-e-text h1,.w-e-text h2,.w-e-text h3,.w-e-text h4,.w-e-text h5,.w-e-text p,.w-e-text pre,.w-e-text table{margin:10px 0;line-height:1.5}.w-e-text ol,.w-e-text ul{margin:10px 0 10px 20px}.w-e-text blockquote{display:block;border-left:8px solid #d0e5f2;padding:5px 10px;margin:10px 0;line-height:1.4;font-size:100%;background-color:#f1f1f1}.w-e-text code{display:inline-block;background-color:#f1f1f1;border-radius:3px;padding:3px 5px;margin:0 3px}.w-e-text pre code{display:block}.w-e-text table{border-top:1px solid #ccc;border-left:1px solid #ccc}.w-e-text table td,.w-e-text table th{border-bottom:1px solid #ccc;border-right:1px solid #ccc;padding:3px 5px}.w-e-text table th{border-bottom:2px solid #ccc;text-align:center}.w-e-text:focus{outline:0}.w-e-text img{cursor:pointer}.w-e-text img:hover{box-shadow:0 0 5px #333}',document.getElementsByTagName("HEAD").item(0).appendChild(Z),window.wangEditor||V});
  //# sourceMappingURL=wang-editor-antd.min.js.map
  