!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.wangEditor=t():e.wangEditor=t()}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=139)}([function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(146)},function(e,t,n){"use strict";var o=n(0),r=o(n(1)),i=o(n(92)),a=o(n(3)),l=o(n(26)),u=o(n(20)),c=o(n(118)),s=o(n(27)),f=o(n(94)),d=o(n(73)),p=o(n(74)),v=o(n(55)),h=function(e,t){for(var n=0,o=t.length,r=e.length;n=t&&(e%=t),w(this.elems[e])},e.prototype.first=function(){return this.get(0)},e.prototype.last=function(){var e=this.length;return this.get(e-1)},e.prototype.on=function(e,t,n){var o;return e?("function"==typeof t&&(n=t,t=""),(0,a.default)(o=this).call(o,(function(o){if(t){var r=function(e){var o=e.target;o.matches(t)&&n.call(o,e)};o.addEventListener(e,r),g.push({elem:o,selector:t,fn:n,agentFn:r})}else o.addEventListener(e,n)}))):this},e.prototype.off=function(e,t,n){var o;return e?("function"==typeof t&&(n=t,t=""),(0,a.default)(o=this).call(o,(function(o){if(t){for(var r=-1,i=0;i]+>/g,(function(){return""}))},e.prototype.html=function(e){var t=this.elems[0];return e?(t.innerHTML=e,this):t.innerHTML},e.prototype.val=function(){var e,t=this.elems[0];return(0,u.default)(e=t.value).call(e)},e.prototype.focus=function(){var e;return(0,a.default)(e=this).call(e,(function(e){e.focus()}))},e.prototype.prev=function(){return w(this.elems[0].previousElementSibling)},e.prototype.next=function(){return w(this.elems[0].nextElementSibling)},e.prototype.getNextSibling=function(){return w(this.elems[0].nextSibling)},e.prototype.parent=function(){return w(this.elems[0].parentElement)},e.prototype.parentUntil=function(e,t){var n=t||this.elems[0];if("BODY"===n.nodeName)return null;var o=n.parentElement;return null===o?null:o.matches(e)?w(o):this.parentUntil(e,o)},e.prototype.parentUntilEditor=function(e,t,n){var o=n||this.elems[0];if(w(o).equal(t.$textContainerElem)||w(o).equal(t.$toolbarElem))return null;var r=o.parentElement;return null===r?null:r.matches(e)?w(r):this.parentUntilEditor(e,t,r)},e.prototype.equal=function(t){return t instanceof e?this.elems[0]===t.elems[0]:t instanceof HTMLElement&&this.elems[0]===t},e.prototype.insertBefore=function(e){var t,n=w(e).elems[0];return n?(0,a.default)(t=this).call(t,(function(e){n.parentNode.insertBefore(e,n)})):this},e.prototype.insertAfter=function(e){var t,n=w(e).elems[0],o=n&&n.nextSibling;return n?(0,a.default)(t=this).call(t,(function(e){var t=n.parentNode;o?t.insertBefore(e,o):t.appendChild(e)})):this},e.prototype.data=function(e,t){if(null==t)return this.dataSource.get(e);this.dataSource.set(e,t)},e.prototype.getNodeTop=function(e){if(this.length<1)return this;var t=this.parent();return e.$textElem.equal(this)||e.$textElem.equal(t)?this:(t.prior=this,t.getNodeTop(e))},e.prototype.getOffsetData=function(){var e=this.elems[0];return{top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight,parent:e.offsetParent}},e.prototype.scrollTop=function(e){this.elems[0].scrollTo({top:e})},e}();function w(){for(var e=[],t=0;t/gm,">").replace(/"/gm,""").replace(/(\r\n|\r|\n)/g,"
")},t.replaceSpecialSymbol=function(e){return e.replace(/</gm,"<").replace(/>/gm,">").replace(/"/gm,'"')},t.forEach=function(e,t){for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n))if(!1===t(n,e[n]))break}},t.arrForEach=function(e,t){var n,o,r=e.length||0;for(n=0;n

',t.EMPTY_P_LAST_REGEX=/

<\/p>$/gim,t.EMPTY_P_REGEX=/

/gim},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(143))},function(e,t){e.exports={}},function(e,t,n){var o=n(9),r=n(81),i=n(17),a=n(63),l=n(85),u=n(107),c=r("wks"),s=o.Symbol,f=u?s:s&&s.withoutSetter||a;e.exports=function(e){return i(c,e)&&(l||"string"==typeof c[e])||(l&&i(s,e)?c[e]=s[e]:c[e]=f("Symbol."+e)),c[e]}},function(e,t,n){var o=n(10),r=n(17),i=n(97),a=n(19).f;e.exports=function(e){var t=o.Symbol||(o.Symbol={});r(t,e)||a(t,e,{value:i.f(e)})}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var o=n(13);e.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var o=n(10);e.exports=function(e){return o[e+"Prototype"]}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(15),r=n(19),i=n(36);e.exports=o?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(15),r=n(102),i=n(25),a=n(59),l=Object.defineProperty;t.f=o?l:function(e,t,n){if(i(e),t=a(t,!0),i(n),r)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=n(198)},function(e,t,n){"use strict";var o,r=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function l(e){for(var t=-1,n=0;n0){var o=null==n?void 0:n.getNodeName();o&&"I"===o&&t.addClass(a)}}));var l=new v.default(r,o);return r.dropList=l,t.on("click",(function(){var e;null!=n.selection.getRange()&&(t.css("z-index",n.zIndex.get("menu")),(0,u.default)(e=n.txt.eventHooks.dropListMenuHoverEvents).call(e,(function(e){return e()})),l.show())})).on("mouseleave",(function(){t.css("z-index","auto"),l.hideTimeoutId=(0,c.default)((function(){l.hide()}))})),r}return s(t,e),t}(p.default);t.default=h},function(e,t,n){var o=n(14);e.exports=function(e){if(!o(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){e.exports=n(194)},function(e,t,n){e.exports=n(207)},function(e,t,n){var o=n(76),r=n(47);e.exports=function(e){return o(r(e))}},function(e,t,n){var o=n(10),r=n(9),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(o[e])||i(r[e]):o[e]&&o[e][t]||r[e]&&r[e][t]}},function(e,t,n){var o=n(48),r=n(76),i=n(39),a=n(37),l=n(91),u=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,s=4==e,f=6==e,d=7==e,p=5==e||f;return function(v,h,A,g){for(var m,y,w=i(v),x=r(w),E=o(h,A,3),b=a(x.length),_=0,C=g||l,S=t?C(v,b):n||d?C(v,0):void 0;b>_;_++)if((p||_ in x)&&(y=E(m=x[_],_,w),e))if(t)S[_]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return _;case 2:u.call(S,m)}else switch(e){case 4:return!1;case 7:u.call(S,m)}return f?-1:c||s?s:S}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},function(e,t,n){e.exports=n(290)},function(e,t,n){"use strict";var o=n(0),r=o(n(106)),i=o(n(322)),a=o(n(324)),l=o(n(1)),u=o(n(3)),c=o(n(31)),s=o(n(129)),f=function(e,t,n,o){return new(n||(n=r.default))((function(r,i){function a(e){try{u(o.next(e))}catch(e){i(e)}}function l(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((o=o.apply(e,t||[])).next())}))},d=function(e,t){var n,o,r,l,u={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return l={next:c(0),throw:c(1),return:c(2)},"function"==typeof i.default&&(l[a.default]=function(){return this}),l;function c(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,o=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(r=u.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]');var o=t.editor;o.txt.eventHooks.clickEvents.push(e.hideCurAllPanels),o.txt.eventHooks.toolbarClickEvents.push(e.hideCurAllPanels),o.txt.eventHooks.dropListMenuHoverEvents.push(e.hideCurAllPanels)}return e.prototype.create=function(){var t=this,n=this.menu;if(!e.createdMenus.has(n)){var o=this.conf,r=this.$container,i=o.width||300,a=n.editor.$toolbarElem.getBoundingClientRect(),l=n.$elem.getBoundingClientRect(),s=a.height+a.top-l.top,p=(a.width-i)/2+a.left-l.left;r.css("width",i+"px").css("margin-top",s+"px").css("margin-left",p+"px").css("z-index",n.editor.zIndex.get("panel"));var A=v.default('');r.append(A),A.on("click",(function(){t.remove()}));var g=v.default('

    '),m=v.default('
    ');r.append(g).append(m);var y=o.height;y&&m.css("height",y+"px").css("overflow-y","auto");var w=o.tabs||[],x=[],E=[];(0,u.default)(w).call(w,(function(e,t){if(e){var n=e.title||"",o=e.tpl||"",r=v.default('
  • '+n+"
  • ");g.append(r);var i=v.default(o);m.append(i),x.push(r),E.push(i),0===t?(r.data("active",!0),r.addClass("w-e-active")):i.hide(),r.on("click",(function(){r.data("active")||((0,u.default)(x).call(x,(function(e){e.data("active",!1),e.removeClass("w-e-active")})),(0,u.default)(E).call(E,(function(e){e.hide()})),r.data("active",!0),r.addClass("w-e-active"),i.show())}))}})),r.on("click",(function(e){e.stopPropagation()})),n.$elem.append(r),(0,u.default)(w).call(w,(function(e,n){if(e){var o=e.events||[];(0,u.default)(o).call(o,(function(e){var o=e.selector,r=e.type,i=e.fn||h.EMPTY_FN,a=E[n];(0,c.default)(a).call(a,o).on(r,(function(e){return f(t,void 0,void 0,(function(){return d(this,(function(t){switch(t.label){case 0:return e.stopPropagation(),[4,i(e)];case 1:return t.sent()&&this.remove(),[2]}}))}))}))}))}}));var b=(0,c.default)(r).call(r,"input[type=text],textarea");b.length&&b.get(0).focus(),e.hideCurAllPanels(),n.setPanel(this),e.createdMenus.add(n)}},e.prototype.remove=function(){var t=this.menu,n=this.$container;n&&n.remove(),e.createdMenus.delete(t)},e.hideCurAllPanels=function(){var t;0!==e.createdMenus.size&&(0,u.default)(t=e.createdMenus).call(t,(function(e){var t=e.panel;t&&t.remove()}))},e.createdMenus=new s.default,e}();t.default=A},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";var o,r=n(0),i=r(n(5)),a=r(n(4)),l=r(n(1)),u=(o=function(e,t){return(o=i.default||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?(0,a.default)(t):(n.prototype=t.prototype,new n)}),c=function(e){return e&&e.__esModule?e:{default:e}};(0,l.default)(t,"__esModule",{value:!0});var s=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),t.prototype.setPanel=function(e){this.panel=e},t}(c(n(98)).default);t.default=s},function(e,t,n){"use strict";var o=n(0),r=o(n(1)),i=o(n(3)),a=o(n(55)),l=function(e){return e&&e.__esModule?e:{default:e}};(0,r.default)(t,"__esModule",{value:!0});var u=l(n(2)),c=function(){function e(e,t,n){this.editor=e,this.$targetElem=t,this.conf=n,this._show=!1,this._isInsertTextContainer=!1;var o=u.default("
    ");o.addClass("w-e-tooltip"),this.$container=o}return e.prototype.getPositionData=function(){var e=this.$container,t=0,n=0,o=document.documentElement.scrollTop,r=this.$targetElem.getBoundingClientRect(),i=this.editor.$textElem.getBoundingClientRect(),a=this.$targetElem.getOffsetData(),l=u.default(a.parent),c=this.editor.$textElem.elems[0].scrollTop;if(this._isInsertTextContainer=l.equal(this.editor.$textContainerElem),this._isInsertTextContainer){var s=l.getBoundingClientRect().height,f=a.top,d=a.left,p=a.height,v=f-c;v>25?(t=v-20-15,e.addClass("w-e-tooltip-up")):v+p+200?v:0)+20+10,e.addClass("w-e-tooltip-down")),n=d<0?0:d}else r.top<20||r.top-i.top<20?(t=r.bottom+o+5,e.addClass("w-e-tooltip-down")):(t=r.top+o-20-15,e.addClass("w-e-tooltip-up")),n=r.left<0?0:r.left;return{top:t,left:n}},e.prototype.appendMenus=function(){var e=this,t=this.conf,n=this.editor,o=this.$targetElem,r=this.$container;(0,i.default)(t).call(t,(function(t,i){var a=t.$elem,l=u.default("
    ");l.addClass("w-e-tooltip-item-wrapper "),l.append(a),r.append(l),a.on("click",(function(r){r.preventDefault(),t.onClick(n,o)&&e.remove()}))}))},e.prototype.create=function(){var e,t,n=this.editor,o=this.$container;this.appendMenus();var r=this.getPositionData(),i=r.top,l=r.left;o.css("top",i+"px"),o.css("left",l+"px"),o.css("z-index",n.zIndex.get("tooltip")),this._isInsertTextContainer?this.editor.$textContainerElem.append(o):u.default("body").append(o),this._show=!0,n.beforeDestroy((0,a.default)(e=this.remove).call(e,this)),n.txt.eventHooks.onBlurEvents.push((0,a.default)(t=this.remove).call(t,this))},e.prototype.remove=function(){this.$container.remove(),this._show=!1},(0,r.default)(e.prototype,"isShow",{get:function(){return this._show},enumerable:!1,configurable:!0}),e}();t.default=c},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var o=n(61),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t){e.exports=!0},function(e,t,n){var o=n(47);e.exports=function(e){return Object(o(e))}},function(e,t,n){var o=n(25),r=n(169),i=n(37),a=n(48),l=n(170),u=n(171),c=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var s,f,d,p,v,h,A,g=n&&n.that,m=!(!n||!n.AS_ENTRIES),y=!(!n||!n.IS_ITERATOR),w=!(!n||!n.INTERRUPTED),x=a(t,g,1+m+w),E=function(e){return s&&u(s),new c(!0,e)},b=function(e){return m?(o(e),w?x(e[0],e[1],E):x(e[0],e[1])):w?x(e,E):x(e)};if(y)s=e;else{if("function"!=typeof(f=l(e)))throw TypeError("Target is not iterable");if(r(f)){for(d=0,p=i(e.length);p>d;d++)if((v=b(e[d]))&&v instanceof c)return v;return new c(!1)}s=f.call(e)}for(h=s.next;!(A=h.call(s)).done;){try{v=b(A.value)}catch(e){throw u(s),e}if("object"==typeof v&&v&&v instanceof c)return v}return new c(!1)}},function(e,t){e.exports={}},function(e,t,n){var o=n(86),r=n(19).f,i=n(18),a=n(17),l=n(173),u=n(11)("toStringTag");e.exports=function(e,t,n,c){if(e){var s=n?e:e.prototype;a(s,u)||r(s,u,{configurable:!0,value:t}),c&&!o&&i(s,"toString",l)}}},function(e,t,n){var o,r,i,a=n(178),l=n(9),u=n(14),c=n(18),s=n(17),f=n(82),d=n(62),p=n(50),v=l.WeakMap;if(a){var h=f.state||(f.state=new v),A=h.get,g=h.has,m=h.set;o=function(e,t){return t.facade=e,m.call(h,e,t),t},r=function(e){return A.call(h,e)||{}},i=function(e){return g.call(h,e)}}else{var y=d("state");p[y]=!0,o=function(e,t){return t.facade=e,c(e,y,t),t},r=function(e){return s(e,y)?e[y]:{}},i=function(e){return s(e,y)}}e.exports={set:o,get:r,has:i,enforce:function(e){return i(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){e.exports=n(266)},function(e,t,n){"use strict";var o=n(0),r=o(n(1)),i=o(n(3)),a=function(e){return e&&e.__esModule?e:{default:e}};(0,r.default)(t,"__esModule",{value:!0}),t.createElementFragment=t.createDocumentFragment=t.createElement=t.insertBefore=t.getEndPoint=t.getStartPoint=t.updateRange=t.filterSelectionNodes=void 0;var l=n(136),u=a(n(2));function c(e){return document.createElement(e)}t.filterSelectionNodes=function(e){var t=[];return(0,i.default)(e).call(e,(function(e){var n=e.getNodeName();if(n!==l.ListType.OrderedList&&n!==l.ListType.UnorderedList)t.push(e);else if(e.prior)t.push(e.prior);else{var o=e.children();null==o||(0,i.default)(o).call(o,(function(e){t.push(u.default(e))}))}})),t},t.updateRange=function(e,t,n){var o=e.selection,r=document.createRange();t.length>1?(r.setStart(t.elems[0],0),r.setEnd(t.elems[t.length-1],t.elems[t.length-1].childNodes.length)):r.selectNodeContents(t.elems[0]),n&&r.collapse(!1),o.saveRange(r),o.restoreSelection()},t.getStartPoint=function(e){var t;return e.prior?e.prior:u.default(null===(t=e.children())||void 0===t?void 0:t.elems[0])},t.getEndPoint=function(e){var t;return e.prior?e.prior:u.default(null===(t=e.children())||void 0===t?void 0:t.last().elems[0])},t.insertBefore=function(e,t,n){void 0===n&&(n=null),e.parent().elems[0].insertBefore(t,n)},t.createElement=c,t.createDocumentFragment=function(){return document.createDocumentFragment()},t.createElementFragment=function(e,t,n){return void 0===n&&(n="li"),(0,i.default)(e).call(e,(function(e){var o=c(n);o.innerHTML=e.html(),t.append(o),e.remove()})),t}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var o=n(33);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var o,r=n(25),i=n(144),a=n(80),l=n(50),u=n(105),c=n(77),s=n(62),f=s("IE_PROTO"),d=function(){},p=function(e){return"