@syncfusion/ej2-richtexteditor 24.1.41 → 24.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/dist/ej2-richtexteditor.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +11 -6
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +11 -6
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/editor-manager/plugin/selection-commands.js +1 -2
- package/src/editor-manager/plugin/toolbar-status.js +3 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +5 -2
- package/src/rich-text-editor/base/interface.d.ts +1 -0
- package/src/rich-text-editor/base/rich-text-editor.js +3 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-richtexteditor.min.js
|
|
3
|
-
* version : 24.1.
|
|
3
|
+
* version : 24.1.45
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
8
|
* applicable laws.
|
|
9
9
|
*/
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionFilemanager"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionNavigations"),require("SyncfusionSplitbuttons")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionPopups","SyncfusionFilemanager","SyncfusionInputs","SyncfusionButtons","SyncfusionNavigations","SyncfusionSplitbuttons"],t):"object"==typeof exports?exports.SyncfusionRichtexteditor=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionFilemanager"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionNavigations"),require("SyncfusionSplitbuttons")):e.SyncfusionRichtexteditor=t(e.SyncfusionBase,e.SyncfusionPopups,e.SyncfusionFilemanager,e.SyncfusionInputs,e.SyncfusionButtons,e.SyncfusionNavigations,e.SyncfusionSplitbuttons)}(this,function(e,t,n,i,r,o,s){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=88)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return a}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"j",function(){return h}),n.d(t,"k",function(){return p}),n.d(t,"l",function(){return m}),n.d(t,"m",function(){return f}),n.d(t,"n",function(){return g}),n.d(t,"o",function(){return b}),n.d(t,"p",function(){return v}),n.d(t,"q",function(){return C}),n.d(t,"r",function(){return y}),n.d(t,"s",function(){return N}),n.d(t,"t",function(){return S}),n.d(t,"u",function(){return E}),n.d(t,"v",function(){return T}),n.d(t,"w",function(){return O}),n.d(t,"x",function(){return w}),n.d(t,"y",function(){return k}),n.d(t,"z",function(){return L}),n.d(t,"A",function(){return _}),n.d(t,"B",function(){return x}),n.d(t,"C",function(){return D}),n.d(t,"D",function(){return M}),n.d(t,"E",function(){return R}),n.d(t,"F",function(){return B}),n.d(t,"G",function(){return A}),n.d(t,"H",function(){return I}),n.d(t,"I",function(){return P}),n.d(t,"J",function(){return U}),n.d(t,"K",function(){return H}),n.d(t,"L",function(){return j}),n.d(t,"M",function(){return F}),n.d(t,"N",function(){return q}),n.d(t,"O",function(){return z}),n.d(t,"P",function(){return V}),n.d(t,"Q",function(){return Q}),n.d(t,"R",function(){return W}),n.d(t,"S",function(){return K}),n.d(t,"T",function(){return G}),n.d(t,"U",function(){return X}),n.d(t,"V",function(){return Y}),n.d(t,"W",function(){return J}),n.d(t,"X",function(){return $}),n.d(t,"Y",function(){return Z}),n.d(t,"Z",function(){return ee}),n.d(t,"_0",function(){return te}),n.d(t,"_1",function(){return ne}),n.d(t,"_2",function(){return ie}),n.d(t,"_3",function(){return re}),n.d(t,"_4",function(){return oe}),n.d(t,"_5",function(){return se}),n.d(t,"_6",function(){return ae}),n.d(t,"_7",function(){return le}),n.d(t,"_8",function(){return de}),n.d(t,"_9",function(){return ce}),n.d(t,"_10",function(){return ue}),n.d(t,"_11",function(){return he}),n.d(t,"_12",function(){return pe}),n.d(t,"_13",function(){return me}),n.d(t,"_14",function(){return fe}),n.d(t,"_15",function(){return ge}),n.d(t,"_16",function(){return be}),n.d(t,"_17",function(){return ve}),n.d(t,"_18",function(){return Ce}),n.d(t,"_19",function(){return ye}),n.d(t,"_20",function(){return Ne}),n.d(t,"_21",function(){return Se}),n.d(t,"_22",function(){return Ee}),n.d(t,"_23",function(){return Te}),n.d(t,"_24",function(){return Oe}),n.d(t,"_25",function(){return we}),n.d(t,"_26",function(){return ke}),n.d(t,"_27",function(){return Le}),n.d(t,"_28",function(){return _e}),n.d(t,"_29",function(){return xe}),n.d(t,"_30",function(){return De}),n.d(t,"_31",function(){return Me}),n.d(t,"_32",function(){return Re}),n.d(t,"_33",function(){return Be}),n.d(t,"_34",function(){return Ae}),n.d(t,"_35",function(){return Ie}),n.d(t,"_36",function(){return Pe}),n.d(t,"_37",function(){return Ue}),n.d(t,"_38",function(){return He}),n.d(t,"_39",function(){return je}),n.d(t,"_40",function(){return Fe}),n.d(t,"_41",function(){return qe}),n.d(t,"_42",function(){return ze}),n.d(t,"_43",function(){return Ve}),n.d(t,"_44",function(){return Qe}),n.d(t,"_45",function(){return We}),n.d(t,"_46",function(){return Ke}),n.d(t,"_47",function(){return Ge}),n.d(t,"_48",function(){return Xe}),n.d(t,"_49",function(){return Ye}),n.d(t,"_50",function(){return Je}),n.d(t,"_51",function(){return $e}),n.d(t,"_52",function(){return Ze}),n.d(t,"_53",function(){return et}),n.d(t,"_54",function(){return tt}),n.d(t,"_55",function(){return nt}),n.d(t,"_56",function(){return it}),n.d(t,"_57",function(){return rt}),n.d(t,"_58",function(){return ot}),n.d(t,"_59",function(){return st}),n.d(t,"_60",function(){return at}),n.d(t,"_61",function(){return lt}),n.d(t,"_62",function(){return dt}),n.d(t,"_63",function(){return ct}),n.d(t,"_64",function(){return ut}),n.d(t,"_65",function(){return ht}),n.d(t,"_66",function(){return pt}),n.d(t,"_67",function(){return mt}),n.d(t,"_68",function(){return ft}),n.d(t,"_69",function(){return gt}),n.d(t,"_70",function(){return bt}),n.d(t,"_71",function(){return vt}),n.d(t,"_72",function(){return Ct}),n.d(t,"_73",function(){return yt}),n.d(t,"_74",function(){return Nt}),n.d(t,"_75",function(){return St}),n.d(t,"_76",function(){return Et}),n.d(t,"_77",function(){return Tt}),n.d(t,"_78",function(){return Ot}),n.d(t,"_79",function(){return wt}),n.d(t,"_80",function(){return kt}),n.d(t,"_81",function(){return Lt}),n.d(t,"_82",function(){return _t}),n.d(t,"_83",function(){return xt}),n.d(t,"_84",function(){return Dt}),n.d(t,"_85",function(){return Mt}),n.d(t,"_86",function(){return Rt}),n.d(t,"_87",function(){return Bt}),n.d(t,"_88",function(){return At}),n.d(t,"_89",function(){return It}),n.d(t,"_90",function(){return Pt}),n.d(t,"_91",function(){return Ut}),n.d(t,"_92",function(){return Ht}),n.d(t,"_93",function(){return jt}),n.d(t,"_94",function(){return Ft}),n.d(t,"_95",function(){return qt}),n.d(t,"_96",function(){return zt}),n.d(t,"_97",function(){return Vt});var i="create",r="destroy",o="tableclass",s="load",a="initial-load",l="content-changed",d="initial-end",c="iframe-click",u="destroy",h="toolbarClick",p="toolbar-refresh",m="refresh-begin",f="toolbar-updated",g="bind-on-end",b="render-color-picker",v="html-toolbar-click",C="markdown-toolbar-click",y="destroy-color-picker",N="model-changed",S="tableModulekeyUp",E="keyUp",T="keyDown",O="mouseUp",w="toolbarCreated",k="toolbarRenderComplete",L="enableFullScreen",_="disableFullScreen",x="dropDownSelect",D="beforeDropDownItemRender",M="execCommandCallBack",R="image-toolbar-action",B="audio-toolbar-action",A="video-toolbar-action",I="link-toolbar-action",P="resize",U="resizeStart",H="resizing",j="resizeStop",F="undo",q="redo",z="insertLink",V="unLink",Q="editLink",W="openLink",K="actionBegin",G="actionComplete",X="updatedToolbarStatus",Y="actionSuccess",J="updateToolbarItem",$="insertImage",Z="insertAudio",ee="insertVideo",te="insertCompleted",ne="justifyLeft",ie="justifyRight",re="justifyCenter",oe="break",se="inline",ae="insertImgLink",le="imgAltText",de="delete",ce="delete",ue="delete",he="caption",pe="imageSize",me="videoSize",fe="sourceCode",ge="updateSource",be="toolbarOpen",ve="beforeDropDownOpen",Ce="selection-save",ye="selection-restore",Ne="expandPopupClick",Se="count",Ee="contentFocus",Te="contentBlur",Oe="mouseDown",we="sourceCodeMouseDown",ke="editAreaClick",Le="scroll",_e="contentscroll",xe="colorPickerChanged",De="tableColorPickerChanged",Me="focusChange",Re="selectAll",Be="selectRange",Ae="getSelectedHtml",Ie="renderInlineToolbar",Pe="paste-content",Ue="imageModule",He="rtl-mode",je="createTable",Fe="docClick",qe="table-toolbar-action",ze="checkUndoStack",Ve="readOnlyMode",Qe="moduleDestroy",We="pasteClean",Ke="enterHandler",Ge="beforeDialogOpen",Xe="clearDialogObj",Ye="dialogOpen",Je="beforeDialogClose",$e="dialogClose",Ze="beforeQuickToolbarOpen",et="quickToolbarOpen",tt="quickToolbarClose",nt="popupHide",it="imageSelected",rt="imageUploading",ot="imageUploadSuccess",st="imageUploadFailed",at="imageRemoving",lt="fileSelected",dt="fileUploading",ct="fileUploadSuccess",ut="fileUploadFailed",ht="fileRemoving",pt="afterImageDelete",mt="afterMediaDelete",ft="drop",gt="xhtmlValidation",bt="beforeImageUpload",vt="beforeFileUpload",Ct="resizeInitialized",yt="renderFileManager",Nt="beforeImageDrop",St="dynamicModule",Et="beforePasteCleanup",Tt="afterPasteCleanup",Ot="updateTbItemsStatus",wt="showLinkDialog",kt="closeLinkDialog",Lt="showImageDialog",_t="showAudioDialog",xt="showVideoDialog",Dt="closeImageDialog",Mt="closeAudioDialog",Rt="closeVideoDialog",Bt="showTableDialog",At="closeTableDialog",It="closeTableDialog",Pt="formatPainterClick",Ut="formatPainterDoubleClick",Ht="emojiPicker",jt="destroyTooltip",Ft="hidePopup",qt="cleanupResizeElements",zt="address:empty, article:empty, aside:empty, blockquote:empty,\n details:empty, dd:empty, div:empty, dl:empty, dt:empty, fieldset:empty, footer:empty,form:empty, h1:empty,\n h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty, li:empty, main:empty, nav:empty,\n noscript:empty, output:empty, p:empty, pre:empty, section:empty, td:empty, th:empty",Vt="a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,\ncanvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,\nins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,\nq:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,\ntemplate:empty, textarea:empty, time:empty, u:empty, tt:empty, var:empty, wbr:empty"},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return a}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"j",function(){return h}),n.d(t,"k",function(){return p}),n.d(t,"l",function(){return m}),n.d(t,"m",function(){return f}),n.d(t,"n",function(){return g}),n.d(t,"o",function(){return b}),n.d(t,"p",function(){return v}),n.d(t,"q",function(){return C}),n.d(t,"r",function(){return y}),n.d(t,"s",function(){return N}),n.d(t,"t",function(){return S}),n.d(t,"u",function(){return E}),n.d(t,"v",function(){return T}),n.d(t,"w",function(){return O}),n.d(t,"x",function(){return w}),n.d(t,"y",function(){return k}),n.d(t,"z",function(){return L}),n.d(t,"A",function(){return _}),n.d(t,"B",function(){return x}),n.d(t,"C",function(){return D}),n.d(t,"D",function(){return M}),n.d(t,"E",function(){return R}),n.d(t,"F",function(){return B}),n.d(t,"G",function(){return A}),n.d(t,"H",function(){return I}),n.d(t,"I",function(){return P}),n.d(t,"J",function(){return U}),n.d(t,"K",function(){return H}),n.d(t,"L",function(){return j}),n.d(t,"M",function(){return F}),n.d(t,"N",function(){return q}),n.d(t,"O",function(){return z}),n.d(t,"P",function(){return V}),n.d(t,"Q",function(){return Q}),n.d(t,"R",function(){return W}),n.d(t,"S",function(){return K}),n.d(t,"T",function(){return G}),n.d(t,"U",function(){return X}),n.d(t,"V",function(){return Y}),n.d(t,"W",function(){return J}),n.d(t,"X",function(){return $}),n.d(t,"Y",function(){return Z}),n.d(t,"Z",function(){return ee}),n.d(t,"_0",function(){return te}),n.d(t,"_1",function(){return ne}),n.d(t,"_2",function(){return ie}),n.d(t,"_3",function(){return re}),n.d(t,"_4",function(){return oe}),n.d(t,"_5",function(){return se}),n.d(t,"_6",function(){return ae}),n.d(t,"_7",function(){return le}),n.d(t,"_8",function(){return de}),n.d(t,"_9",function(){return ce}),n.d(t,"_10",function(){return ue}),n.d(t,"_11",function(){return he}),n.d(t,"_12",function(){return pe}),n.d(t,"_13",function(){return me}),n.d(t,"_14",function(){return fe}),n.d(t,"_15",function(){return ge}),n.d(t,"_16",function(){return be}),n.d(t,"_17",function(){return ve}),n.d(t,"_18",function(){return Ce}),n.d(t,"_19",function(){return ye}),n.d(t,"_20",function(){return Ne}),n.d(t,"_21",function(){return Se}),n.d(t,"_22",function(){return Ee}),n.d(t,"_23",function(){return Te}),n.d(t,"_24",function(){return Oe}),n.d(t,"_25",function(){return we}),n.d(t,"_26",function(){return ke}),n.d(t,"_27",function(){return Le}),n.d(t,"_28",function(){return _e}),n.d(t,"_29",function(){return xe}),n.d(t,"_30",function(){return De}),n.d(t,"_31",function(){return Me}),n.d(t,"_32",function(){return Re}),n.d(t,"_33",function(){return Be}),n.d(t,"_34",function(){return Ae}),n.d(t,"_35",function(){return Ie}),n.d(t,"_36",function(){return Pe}),n.d(t,"_37",function(){return Ue}),n.d(t,"_38",function(){return He}),n.d(t,"_39",function(){return je}),n.d(t,"_40",function(){return Fe}),n.d(t,"_41",function(){return qe}),n.d(t,"_42",function(){return ze}),n.d(t,"_43",function(){return Ve}),n.d(t,"_44",function(){return Qe}),n.d(t,"_45",function(){return We}),n.d(t,"_46",function(){return Ke}),n.d(t,"_47",function(){return Ge}),n.d(t,"_48",function(){return Xe}),n.d(t,"_49",function(){return Ye}),n.d(t,"_50",function(){return Je}),n.d(t,"_51",function(){return $e}),n.d(t,"_52",function(){return Ze}),n.d(t,"_53",function(){return et}),n.d(t,"_54",function(){return tt}),n.d(t,"_55",function(){return nt}),n.d(t,"_56",function(){return it}),n.d(t,"_57",function(){return rt}),n.d(t,"_58",function(){return ot}),n.d(t,"_59",function(){return st}),n.d(t,"_60",function(){return at}),n.d(t,"_61",function(){return lt}),n.d(t,"_62",function(){return dt}),n.d(t,"_63",function(){return ct}),n.d(t,"_64",function(){return ut}),n.d(t,"_65",function(){return ht}),n.d(t,"_66",function(){return pt}),n.d(t,"_67",function(){return mt}),n.d(t,"_68",function(){return ft}),n.d(t,"_69",function(){return gt});var i="e-richtexteditor",r="e-rtl",o="e-content",s="e-disabled",a="rte-iframe-script-sheet",l="rte-iframe-style-sheet",d="e-rte-toolbar",c="e-rte-tb-fixed",u="e-rte-tb-float",h="e-rte-tb-abs-float",p="e-rte-inline",m="e-rte-tb-inline",f="e-rte-tb-expand",g="e-rte-full-screen",b="e-rte-quick-toolbar",v="e-rte-text-quicktoolbar",C="e-rte-pop",y="e-tb-static",N="e-rte-quick-popup",S="e-quick-dropdown",E="e-rte-image-popup",T="e-rte-text-popup",O="e-rte-inline-popup",w="e-rte-inline-dropdown",k="e-rte-dropdown-popup",L="e-rte-dropdown-icons",_="e-rte-dropdown-items",x="e-rte-dropdown-btn",D="e-rte-content",M="e-toolbar-item",R="e-toolbar-extended",B="e-toolbar-wrapper",A="e-popup",I="e-separator",P="e-minimize",U="e-maximize",H="e-back",j="e-show",F="e-hide",q="e-visible",z="e-focused",V="e-remove-white-space",Q="e-imgright",W="e-imgleft",K="e-imgcenter",G="e-imgbreak",X="e-audio-break",Y="e-clickelem",J="e-video-clickelem",$="e-audio-wrap",Z="e-video-wrap",ee="e-video-break",te="e-img-caption",ne="e-rte-img-caption",ie="e-caption-inline",re="e-imginline",oe="e-audio-inline",se="e-video-inline",ae="e-rte-character-count",le="e-warning",de="e-error",ce="e-icons",ue="e-active",he="e-expand-open",pe="e-rte-elements",me="e-tbar-btn",fe="e-rte-horizontal-separator",ge="e-tbar-ios-fixed",be="e-rte-list-primary-content",ve="e-rte-numberformatlist-dropdown",Ce="e-rte-bulletformatlist-dropdown",ye="e-formats-tbar-btn",Ne="e-font-name-tbar-btn",Se="e-font-size-tbar-btn",Ee="e-alignment-tbar-btn",Te="e-rte-fontcolor-element",Oe="e-rte-backgroundcolor-element",we="e-rte-color-content",ke="e-rte-fontcolor-dropdown",Le="e-rte-backgroundcolor-dropdown",_e="e-rte-square-palette",xe="e-rte-fontcolor-colorpicker",De="e-rte-backgroundcolor-colorpicker",Me="e-rte-readonly",Re="e-cell-select",Be="e-dashed-border",Ae="e-alternate-border",Ie="e-column-resize",Pe="e-row-resize",Ue="e-table-box",He="e-rte-hidden",je="e-rte-keepformat",Fe="e-rte-removeformat",qe="e-rte-plainformat",ze="e-rte-pasteok",Ve="e-rte-pastecancel",Qe="e-rte-dialog-minheight",We="e-resize-handle",Ke="e-south-east",Ge="e-rte-image",Xe="e-resize",Ye="e-img-focus",Je="e-audio-focus",$e="e-video-focus",Ze="e-rte-drag-image",et="e-rte-upload-popup",tt="e-popup-open",nt="e-img-resize",it="e-droparea",rt="e-img-inner",ot="e-upload-files",st="e-rte-dialog-upload",at="e-rte-resize",lt="e-custom-tile",dt="e-nocolor-item",ct="e-rte-table",ut="e-rte-table-border",ht="e-rte-table-resize",pt="e-rte-fixed-tb-expand",mt="e-rte-toolbar-enabled",ft="e-south-west",gt="e-rte-srctextarea"},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return a}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"j",function(){return h}),n.d(t,"k",function(){return p}),n.d(t,"l",function(){return m}),n.d(t,"m",function(){return f}),n.d(t,"n",function(){return g}),n.d(t,"o",function(){return b});var i="keydown",r="action",o="format-type",s="keydown-handler",a="list-type",l="keyup-handler",d="keyup",c="model_changed_plugin",u="model_changed",h="ms_word_cleanup_plugin",p="ms_word_cleanup",m="onBegin",f="actionBegin",g="format_painter_actions",b="emoji_picker_actions"},function(e,t,n){"use strict";function i(e,t){var n=-1;return t.some(function(t,i){return"string"==typeof t&&e===t.toLocaleLowerCase()&&(n=i,!0)}),n}function r(e,t){var n=!1;return e.classList.contains(t)&&(n=!0),n}function o(e,t,i,r){for(var o,s,a=0;a<e.length;a++){if("value"===i&&e[a].value.toLocaleLowerCase()===t.toLocaleLowerCase()){o=e[a];break}if("text"===i&&e[a].text.toLocaleLowerCase()===t.toLocaleLowerCase()){o=e[a];break}if("subCommand"===i&&e[a].subCommand.toLocaleLowerCase()===t.toLocaleLowerCase()){o=e[a];break}}if(!n.i(k.isNullOrUndefined)(o))switch(r){case"text":s=o.text;break;case"value":s=o.value;break;case"iconCss":s=o.iconCss}return s}function s(){var e=!1;return k.Browser.isDevice&&k.Browser.isIos&&(e=!0),e}function a(e){return n.i(k.isNullOrUndefined)(e)?"":e}function l(e,t,n){return n?window.pageYOffset+t.getBoundingClientRect().top+e.clientY:e.pageY}function d(e,t){var n=t.getService("rteLocale"),i=D.a[""+e];return n.getConstant(i)}function c(e,t,r){w(r);for(var s=e.dropDownModule,l=e.args,d=Object.keys(e.args),c=0,u=d;c<u.length;c++)for(var h=u[c],p=0;p<e.tbItems.length;p++){var m=e.tbItems[p].subCommand,f=m&&m.toLocaleLowerCase();if(m&&f===h||"UL"===m&&"unorderedlist"===h||"OL"===m&&"orderedlist"===h||"pre"===f&&"insertcode"===h||"NumberFormatList"===m&&"numberFormatList"===h||"BulletFormatList"===m&&"bulletFormatList"===h)if("boolean"==typeof l[""+h])!0===l[""+h]?n.i(k.addClass)([e.tbElements[p]],[L._10]):n.i(k.removeClass)([e.tbElements[p]],[L._10]);else if(("string"==typeof l[""+h]||null===l[""+h])&&i(h,e.parent.toolbarSettings.items)>=-1){var g=l[""+h]?l[""+h]:"",b="";switch(h){case"formats":if(n.i(k.isNullOrUndefined)(s.formatDropDown)||t||!n.i(k.isNullOrUndefined)(s.formatDropDown)&&s.formatDropDown.isDestroyed)break;var v=e.parent.format.types,C=n.i(k.isNullOrUndefined)(e.parent.format.default)?v[0].text:e.parent.format.default;b="empty"===g?"":o(v,g,"subCommand","text"),s.formatDropDown.content='<span style="display: inline-flex;width:'+e.parent.format.width+'" ><span class="e-rte-dropdown-btn-text'+(n.i(k.isNullOrUndefined)(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+(n.i(k.isNullOrUndefined)(b)?C:b)+"</span></span>",s.formatDropDown.dataBind();break;case"alignments":if(n.i(k.isNullOrUndefined)(s.alignDropDown)||!n.i(k.isNullOrUndefined)(s.alignDropDown)&&s.alignDropDown.isDestroyed)break;var y=x.a;b=o(y,g,"subCommand","iconCss"),s.alignDropDown.iconCss=n.i(k.isNullOrUndefined)(b)?"e-icons e-justify-left":b,s.alignDropDown.dataBind();break;case"fontname":if(n.i(k.isNullOrUndefined)(s.fontNameDropDown)||t||!n.i(k.isNullOrUndefined)(s.fontNameDropDown)&&s.fontNameDropDown.isDestroyed)break;var N=e.parent.fontFamily.items;b="empty"===g?"":o(N,g,"value","text");var S=n.i(k.isNullOrUndefined)(e.parent.fontFamily.default)?N[0].text:e.parent.fontFamily.default,E=n.i(k.isNullOrUndefined)(b)?S:b;s.fontNameDropDown.content='<span style="display: inline-flex;width:'+e.parent.fontFamily.width+'" ><span class="e-rte-dropdown-btn-text'+(n.i(k.isNullOrUndefined)(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+E+"</span></span>",s.fontNameDropDown.dataBind();break;case"fontsize":if(n.i(k.isNullOrUndefined)(s.fontSizeDropDown)||!n.i(k.isNullOrUndefined)(s.fontSizeDropDown)&&s.fontSizeDropDown.isDestroyed)break;var T=e.parent.fontSize.items,O=n.i(k.isNullOrUndefined)(e.parent.fontSize.default)?T[1].text:e.parent.fontSize.default;b="empty"===g?"":o(T,""===g?O.replace(/\s/g,""):g,"value","text"),s.fontSizeDropDown.content='<span style="display: inline-flex;width:'+e.parent.fontSize.width+'" ><span class="e-rte-dropdown-btn-text'+(n.i(k.isNullOrUndefined)(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+a(b)+"</span></span>",s.fontSizeDropDown.dataBind();break;case"bulletFormatList":case"numberFormatList":n.i(k.removeClass)([e.tbElements[p]],[L._10])}}}}function u(e){return"object"==typeof e?e:[e]}function h(e,t){for(var n=[],i=0;i<e.length;i++)for(var r=0;r<t.length;r++)if("Separator"!==t[r].type){if(("OrderedList"===e[i]||"NumberFormatList"===e[i])&&"OL"===t[r].subCommand){n.push(r);break}if(("UnorderedList"===e[i]||"BulletFormatList"===e[i])&&"UL"===t[r].subCommand){n.push(r);break}if("InsertCode"===e[i]&&"Pre"===t[r].subCommand){n.push(r);break}if("FileManager"===e[i]&&"File"===t[r].subCommand){n.push(r);break}if("object"==typeof e[i]&&"Custom"===e[i].command){n.push(i);break}if(e[i]===t[r].subCommand){n.push(r);break}}return n}function p(e,t){for(var i=0,r=h(u(M),e.toolbarObj.items),o=n.i(k.selectAll)("."+L.D,e.toolbarObj.element),s=Object.keys(t),a=0,l=s;a<l.length;a++){var d=l[a],c=o[r[i]];c&&e.toolbarObj.enableItems(c,t[""+d]),i++}}function m(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!1,!0),e.dispatchEvent(n)}function f(e){var t=n.i(k.createElement)("template");return t.innerHTML=e,t.content instanceof DocumentFragment?t.content:document.createRange().createContextualFragment(e)}function g(e,t){var n=[];for(t=t.firstChild;t;t=t.nextSibling)3===t.nodeType?n.push(t):n=n.concat(g(e,t));return n}function b(e){for(var t={},n=Object.keys(e),i=0;i<Object.keys(e).length;i++)t[n[i].toLocaleLowerCase()]=e[n[i]];return t}function v(e,t){var n;return null!==e&&""!==e?(n=t.enableHtmlEncode?C(S(e),t):C(e,t),t.setProperties({value:n},!0)):n="DIV"===t.enterKey?t.enableHtmlEncode?"<div><br/></div>":"<div><br/></div>":"BR"===t.enterKey?t.enableHtmlEncode?"<br/>":"<br/>":t.enableHtmlEncode?"<p><br/></p>":"<p><br/></p>",n}function C(e,t){var i=document.createElement("div"),r=document.createElement("div"),o=i.childNodes;if(i.innerHTML=e,i.setAttribute("class","tempDiv"),o.length>0){for(var s=void 0,a=void 0,l=void 0;i.firstChild;){for(var d=i.querySelectorAll(_._96),c=0;c<d.length;c++)d[c].innerHTML="<br>";for(var u=i.querySelectorAll("p"),c=0;c<u.length;c++)0===u[c].textContent.trim().length&&1===u[c].childNodes.length&&"#text"===u[c].childNodes[0].nodeName&&n.i(k.isNullOrUndefined)(u[c].childNodes[0].textContent.match(/\u00a0/g))&&(u[c].innerHTML="<br>");for(var h=i.querySelectorAll(_._97),c=0;c<h.length;c++)h[c].innerHTML="​";"BR"!==t.enterKey&&("#text"===i.firstChild.nodeName&&(i.firstChild.textContent.indexOf("\n")<0||""!==i.firstChild.textContent.trim())||R.indexOf(i.firstChild.nodeName.toLocaleLowerCase())>=0)?(s?a.appendChild(i.firstChild):(l="DIV"===t.enterKey?n.i(k.createElement)("div"):n.i(k.createElement)("p"),r.appendChild(l),l.appendChild(i.firstChild)),a=l,s=!0):"#text"===i.firstChild.nodeName&&("\n"===i.firstChild.textContent||i.firstChild.textContent.indexOf("\n")>=0&&""===i.firstChild.textContent.trim())?n.i(k.detach)(i.firstChild):(r.appendChild(i.firstChild),s=!1)}for(var p=r.querySelectorAll("img"),c=0;c<p.length;c++)p[c].classList.contains(L._47)||p[c].classList.add(L._47),p[c].classList.contains(L._3)||p[c].classList.contains(L.T)||p[c].classList.add(L._3)}return r.innerHTML}function y(e){return"DIV"===e.enterKey?e.enableHtmlEncode?"<div><br/></div>":"<div><br/></div>":"BR"===e.enterKey?e.enableHtmlEncode?"<br/>":"<br/>":e.enableHtmlEncode?"<p><br/></p>":"<p><br/></p>"}function N(e){return"<p><br></p>"===e||"<p><br></p>"===e||"<div><br></div>"===e||"<div><br></div>"===e||"<br>"===e||"<br>"===e||""===e}function S(e){return e.replace(/&/g,"&").replace(/&lt;/g,"<").replace(/</g,"<").replace(/&gt;/g,">").replace(/>/g,">").replace(/ /g," ").replace(/&nbsp;/g," ").replace(/"/g,"")}function E(e,t){if(t.enableHtmlSanitizer){var i=k.SanitizeHtmlHelper.beforeSanitize();i.selectors.tags[2]&&i.selectors.tags[2].indexOf("iframe")>-1&&(i.selectors.tags[2]="iframe:not(.e-rte-embed-url)");var r={cancel:!1,helper:null};n.i(k.extend)(i,i,r),t.trigger("beforeSanitizeHtml",i),i.cancel&&!n.i(k.isNullOrUndefined)(i.helper)?e=i.helper(e):i.cancel||(e=k.SanitizeHtmlHelper.serializeValue(i,e))}return e}function T(e){for(var t=e.split(","),n=t[0].match(/:(.*?);/)[1],i=atob(t[1]),r=i.length,o=new Uint8Array(r);r--;)o[r]=i.charCodeAt(r);return new Blob([o],{type:n})}function O(e,t,n){for(var i=0;t.length>i;i++)if(t[i].value===n.value||t[i].value===n.subCommand)return e.localeObj.getConstant(t[i].locale);return n.text}function w(e){x.b.forEach(function(t,n){x.b[n].text=O(e,D.b,x.b[n])}),x.c.forEach(function(t,n){x.c[n].text=O(e,D.c,x.c[n])}),x.d.forEach(function(t,n){x.d[n].text=O(e,D.d,x.d[n])}),x.e.forEach(function(t,n){x.e[n].text=O(e,D.e,x.e[n])})}t.a=i,t.b=r,t.c=o,t.d=s,t.e=a,t.f=l,t.g=d,t.h=c,t.i=u,t.j=h,t.k=p,t.l=m,t.m=f,t.n=g,t.o=b,t.p=v,t.q=C,t.r=y,t.s=N,t.t=S,t.u=E,t.v=T,t.w=O,t.x=w;var k=n(0),L=(n.n(k),n(2)),_=n(1),x=n(17),D=n(73),M=["Undo","Redo"],R=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","strike","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o});var i;!function(e){e[e.Toolbar=0]="Toolbar",e[e.Content=1]="Content",e[e.Popup=2]="Popup",e[e.LinkToolbar=3]="LinkToolbar",e[e.TextToolbar=4]="TextToolbar",e[e.ImageToolbar=5]="ImageToolbar",e[e.AudioToolbar=6]="AudioToolbar",e[e.VideoToolbar=7]="VideoToolbar",e[e.InlineToolbar=8]="InlineToolbar",e[e.TableToolbar=9]="TableToolbar"}(i||(i={}));var r;!function(e){e.Expand="Expand",e.MultiRow="MultiRow",e.Scrollable="Scrollable"}(r||(r={}));var o;!function(e){e.InsertLink="InsertLink",e.InsertImage="InsertImage",e.InsertAudio="InsertAudio",e.InsertVideo="InsertVideo",e.InsertTable="InsertTable"}(o||(o={}))},function(e,t,n){"use strict";function i(){var e=!1;return d.Browser.isDevice&&d.Browser.isIos&&(e=!0),e}function r(e,t){if("BODY"===e.nodeName&&!n.i(d.isNullOrUndefined)(t)){var i=top.window.document.querySelector(t);n.i(d.isNullOrUndefined)(i)||i.contentWindow.focus()}}function o(e,t){var i=document.createElement("div");i.innerHTML=e,i.setAttribute("class","tempDiv");var r=document.createElement("div");if(i.childNodes.length>0){for(var o=void 0,s=void 0,a=void 0;i.firstChild;)"#text"===i.firstChild.nodeName&&(i.firstChild.textContent.indexOf("\n")<0||""!==i.firstChild.textContent.trim())||c.indexOf(i.firstChild.nodeName.toLocaleLowerCase())>=0?o?(s.appendChild(i.firstChild),s=a,o=!0):"BR"===t?(r.appendChild(i.firstChild),s=r):(a=n.i(d.createElement)("p"),r.appendChild(a),a.appendChild(i.firstChild),s=a,o=!0):"#text"===i.firstChild.nodeName&&("\n"===i.firstChild.textContent||i.firstChild.textContent.indexOf("\n")>=0&&""===i.firstChild.textContent.trim())?n.i(d.detach)(i.firstChild):(r.appendChild(i.firstChild),o=!1);for(var l=r.querySelectorAll("table"),u=0;u<l.length;u++){"0"===l[u].getAttribute("border")&&l[u].removeAttribute("border");for(var h=l[u].querySelectorAll("td"),p=0;p<h.length;p++)"none"===h[p].style.borderLeft&&h[p].style.removeProperty("border-left"),"none"===h[p].style.borderRight&&h[p].style.removeProperty("border-right"),"none"===h[p].style.borderBottom&&h[p].style.removeProperty("border-bottom"),"none"===h[p].style.borderTop&&h[p].style.removeProperty("border-top"),"none"===h[p].style.border&&h[p].style.removeProperty("border");l[u].classList.contains("e-rte-table")||l[u].classList.add("e-rte-table")}for(var m=r.querySelectorAll("img"),u=0;u<m.length;u++)m[u].classList.contains("e-rte-image")||m[u].classList.add("e-rte-image"),m[u].classList.contains("e-imginline")||m[u].classList.contains("e-imgbreak")||m[u].classList.add("e-imginline")}return r.innerHTML}function s(e){var t=e;do{t.childNodes.length>0&&(t=t.childNodes[0])}while(t.childNodes.length>0);return t}function a(){return{bold:!1,italic:!1,subscript:!1,superscript:!1,strikethrough:!1,orderedlist:!1,unorderedlist:!1,numberFormatList:!1,bulletFormatList:!1,underline:!1,alignments:null,backgroundcolor:null,fontcolor:null,fontname:null,fontsize:null,formats:null,createlink:!1,insertcode:!1}}function l(){return{bold:!1,italic:!1,subscript:!1,superscript:!1,strikethrough:!1,orderedlist:!1,uppercase:!1,lowercase:!1,inlinecode:!1,unorderedlist:!1,formats:null}}t.b=i,t.c=r,t.d=o,t.e=s,t.a=a,t.f=l;var d=n(0),c=(n.n(d),["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","strike","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"])},function(e,t,n){"use strict";n.d(t,"r",function(){return i}),n.d(t,"q",function(){return r}),n.d(t,"p",function(){return o}),n.d(t,"b",function(){return s}),n.d(t,"x",function(){return a}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return d}),n.d(t,"e",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return h}),n.d(t,"h",function(){return p}),n.d(t,"i",function(){return m}),n.d(t,"j",function(){return f}),n.d(t,"l",function(){return g}),n.d(t,"k",function(){return b}),n.d(t,"m",function(){return v}),n.d(t,"z",function(){return C}),n.d(t,"y",function(){return y}),n.d(t,"A",function(){return N}),n.d(t,"a",function(){return S}),n.d(t,"u",function(){return E}),n.d(t,"s",function(){return T}),n.d(t,"o",function(){return O}),n.d(t,"v",function(){return w}),n.d(t,"w",function(){return k}),n.d(t,"n",function(){return L}),n.d(t,"t",function(){return _});var i="INSERT-IMAGE",r="INSERT-AUDIO",o="INSERT-VIDEO",s="INSERT-TABLE",a="INSERT-LINK",l="INSERT-ROW",d="INSERT-COLUMN",c="DELETE-ROW",u="DELETE-COLUMN",h="REMOVE-TABLE",p="TABLE-HEADER",m="TABLE_VERTICAL_ALIGN",f="TABLE_MERGE",g="TABLE_VERTICAL_SPLIT",b="TABLE_HORIZONTAL_SPLIT",v="TABLE_MOVE",C="alignment-type",y="indent-type",N="p",S=["address","article","aside","audio","blockquote","canvas","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tbody","td","tfoot","th","thead","tr","ul","video","body"],E=["td","th"],T=["table","tbody","td","tfoot","th","thead","tr"],O="selection-type",w="inserthtml-type",k="insert-text-type",L="clear-type",_=["area","base","br","embed","hr","img","input","param","source","track","wbr","iframe","td","table"]},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(11),r=n(12),o=n(7),s=n(0),a=(n.n(s),n(19)),l=n(6),d=function(){function e(){}return e.Insert=function(e,t,l,d,c){var u;if("string"==typeof t){var h=document.createElement("div");h.innerHTML=t,u=d?h:h.firstChild}else if(d&&(n.i(s.isNullOrUndefined)(t)||n.i(s.isNullOrUndefined)(t.classList)||!t.classList.contains("pasteContent"))){var h=document.createElement("div");h.appendChild(t),u=h}else u=t;var p=new i.a,m=new r.a,f=p.getRange(e);if(f.startContainer!==l||f.startContainer!==f.endContainer||0!==f.startOffset||f.startOffset!==f.endOffset||0!==l.textContent.length||"P"!==l.children[0].tagName&&"DIV"!==l.children[0].tagName&&"BR"!==l.children[0].tagName||(p.setSelectionText(e,f.startContainer.children[0],f.startContainer.children[0],0,0),f=p.getRange(e)),f.startContainer===l&&f.startContainer===f.endContainer&&0===f.startOffset&&f.startOffset===f.endOffset&&l.textContent.trim().length>0){var g=this.findFirstTextNode(f.startContainer);n.i(s.isNullOrUndefined)(g)||(p.setSelectionText(e,g,g,0,0),f=p.getRange(e))}if("BR"===f.startContainer.nodeName&&0===f.startOffset&&f.startOffset===f.endOffset&&f.startContainer===f.endContainer){var b=Array.prototype.slice.call(f.startContainer.parentElement.childNodes).indexOf(f.startContainer);p.setSelectionText(e,f.startContainer.parentElement,f.startContainer.parentElement,b,b),f=p.getRange(e)}var v=f.startOffset===f.endOffset&&0===f.startOffset&&f.startContainer===f.endContainer,C=f.collapsed,y=this.getNodeCollection(f,p,u),N="table"===u.nodeName.toLowerCase()?this.closestEle(y[0].parentNode,l):y[0];if(d||!n.i(s.isNullOrUndefined)(u)&&!n.i(s.isNullOrUndefined)(u.classList)&&u.classList.contains("pasteContent"))return void this.pasteInsertHTML(y,u,f,p,m,e,C,N,l,c);if(l!==f.startContainer&&(!C&&(N.nodeType!==Node.ELEMENT_NODE||-1===o.s.indexOf(N.tagName.toLocaleLowerCase()))||"table"===u.nodeName.toLowerCase()&&N&&-1===o.s.indexOf(N.tagName.toLocaleLowerCase()))){var S=m.GetSpliceNode(f,N),E=S.previousSibling,T=S.parentNode;if(1===y.length||"table"===u.nodeName.toLowerCase()&&0===S.childElementCount)p.setSelectionContents(e,S),f=p.getRange(e);else{var O=m.GetSpliceNode(f,y[y.length-1].parentElement);O=n.i(s.isNullOrUndefined)(O)?S:O,p.setSelectionText(e,S,O,0,3===O.nodeType?O.textContent.length:O.childNodes.length),f=p.getRange(e)}f.extractContents(),"TABLE"===t.tagName&&this.removeEmptyElements(l);for(var w=0;w<y.length;w++)if(3!==y[w].nodeType&&null!=y[w].parentNode){if("IMG"===y[w].nodeName)continue;y[w].parentNode.removeChild(y[w])}if(E)a.a.AppendBefore(u,E,!0);else{for(var k=null;T!==l&&T.firstChild&&""===T.textContent.trim();){var L=T.parentNode;k=T,T=L}null!==k&&(T=k),T.firstChild&&(T!==l||"TABLE"===u.nodeName&&v&&T===f.startContainer&&T===f.endContainer)?""===T.textContent.trim()&&T!==l?(a.a.AppendBefore(u,T,!1),n.i(s.detach)(T)):a.a.AppendBefore(u,T.firstChild,!1):n.i(s.isNullOrUndefined)(S.previousSibling)&&"TABLE"===t.tagName?T.prepend(u):T.appendChild(u)}"IMG"===u.nodeName?this.imageFocus(u,p,e):3!==u.nodeType?p.setSelectionText(e,u,u,0,u.childNodes.length):p.setSelectionText(e,u,u,0,u.textContent.length)}else{if(f.deleteContents(),v&&""===f.startContainer.textContent&&"BR"!==f.startContainer.nodeName&&(f.startContainer.innerHTML=""),s.Browser.isIE){var _=e.createDocumentFragment();_.appendChild(u),f.insertNode(_)}else if(1===f.startContainer.nodeType&&"hr"===f.startContainer.nodeName.toLowerCase()&&"hr"===f.endContainer.nodeName.toLowerCase()){var x=f.startContainer.nextElementSibling;x&&(x.querySelector("br")&&n.i(s.detach)(x.querySelector("br")),x.appendChild(u))}else"BR"===f.startContainer.nodeName?f.startContainer.parentElement.insertBefore(u,f.startContainer):f.insertNode(u);3!==u.nodeType&&u.childNodes.length>0?p.setSelectionText(e,u,u,1,1):"IMG"===u.nodeName?this.imageFocus(u,p,e):3!==u.nodeType?p.setSelectionContents(e,u):p.setSelectionText(e,u,u,u.textContent.length,u.textContent.length)}},e.findFirstTextNode=function(e){if(e.nodeType===Node.TEXT_NODE)return e;for(var t=0;t<e.childNodes.length;t++){var i=this.findFirstTextNode(e.childNodes[t]);if(!n.i(s.isNullOrUndefined)(i))return i}return null},e.pasteInsertHTML=function(e,t,i,r,a,l,d,c,u,h){var p=i.startOffset===i.endOffset&&i.startContainer===i.endContainer;if(p&&i.startContainer===u&&""===u.textContent){var m=this.getImmediateBlockNode(e[e.length-1],u);r.setSelectionText(l,m,m,0,0),i=r.getRange(l)}var f,g,b,v;u!==i.startContainer&&(!d&&(c.nodeType!==Node.ELEMENT_NODE||-1===o.s.indexOf(c.tagName.toLocaleLowerCase()))||"table"===t.nodeName.toLowerCase()&&c&&-1===o.s.indexOf(c.tagName.toLocaleLowerCase()))&&(v=a.GetSpliceNode(i,c),g=n.i(s.isNullOrUndefined)(v.previousSibling)?v.parentNode.previousSibling:v.previousSibling,1===e.length?(r.setSelectionContents(l,v),i=r.getRange(l),b=!0):(f=a.GetSpliceNode(i,e[e.length-1].parentElement),f=n.i(s.isNullOrUndefined)(f)?v:f,r.setSelectionText(l,v,f,0,3===f.nodeType?f.textContent.length:f.childNodes.length),i=r.getRange(l),b=!1));var C=!1;this.removingComments(t);for(var y=t.childNodes,N=0;N<y.length;N++)if(o.a.indexOf(y[N].nodeName.toLocaleLowerCase())>=0){C=!0;break}var S,E=document.createDocumentFragment();if(C){for(var T=i.startContainer;!n.i(s.isNullOrUndefined)(T)&&"PRE"!==T.nodeName&&T!==u;)T=T.parentElement;if(n.i(s.isNullOrUndefined)(t)||n.i(s.isNullOrUndefined)(T)||"PRE"!==T.nodeName){this.insertTempNode(i,t,e,a,u);var O=!0,w=void 0,k=void 0,L=void 0;for(this.contentsDeleted||i.deleteContents();t.firstChild;)if("#text"!==t.firstChild.nodeName||""!==t.firstChild.textContent.trim())if("#text"===t.firstChild.nodeName&&O||this.inlineNode.indexOf(t.firstChild.nodeName.toLocaleLowerCase())>=0&&O){if(S=t.firstChild,n.i(s.isNullOrUndefined)(t.previousElementSibling)){var _="DIV"===h?n.i(s.createElement)("div"):n.i(s.createElement)("p");t.parentElement.insertBefore(_,t)}"BR"===t.previousElementSibling.nodeName?t.parentElement.insertBefore(t.firstChild,t):t.previousElementSibling.appendChild(t.firstChild)}else S=t.firstChild,"#text"===t.firstChild.nodeName||this.inlineNode.indexOf(t.firstChild.nodeName.toLocaleLowerCase())>=0?(w?(L.appendChild(t.firstChild),E.appendChild(L)):(k="DIV"===h?n.i(s.createElement)("div"):n.i(s.createElement)("p"),k.appendChild(t.firstChild),E.appendChild(k)),L=k,w=!0):(E.appendChild(t.firstChild),w=!1),O=!1;else n.i(s.detach)(t.firstChild);t.parentNode.replaceChild(E,t)}else i.insertNode(t),S=t.lastChild}else if(p){var x=n.i(s.createElement)("span",{className:"tempSpan"}),D=n.i(s.closest)(i.startContainer.parentElement,"a");if(3===i.startContainer.nodeType&&D&&n.i(s.closest)(D,"span")){var M=this.getImmediateBlockNode(i.startContainer,u);M.querySelectorAll("br").length>0&&n.i(s.detach)(M.querySelector("br"));var R=n.i(s.closest)(D,"span");R.appendChild(x)}else i.insertNode(x);for(;t.firstChild;)S=t.firstChild,E.appendChild(t.firstChild);x.parentNode.replaceChild(E,x)}else{for(;t.firstChild;)S=t.firstChild,E.appendChild(t.firstChild);b?v.parentNode.replaceChild(E,v):(i.deleteContents(),n.i(s.isNullOrUndefined)(f)||n.i(s.detach)(f),n.i(s.isNullOrUndefined)(g)?u.appendChild(E):g.parentNode.appendChild(E))}"#text"===S.nodeName?this.placeCursorEnd(S,t,r,l,u):this.cursorPos(S,t,r,l,u,h)},e.placeCursorEnd=function(e,t,i,r,o){for(e="BR"===e.nodeName?n.i(s.isNullOrUndefined)(e.previousSibling)?e.parentNode:e.previousSibling:e;!n.i(s.isNullOrUndefined)(e)&&"#text"!==e.nodeName&&"IMG"!==e.nodeName&&"BR"!==e.nodeName&&"HR"!==e.nodeName;){if(!n.i(s.isNullOrUndefined)(e.lastChild)&&"P"===e.lastChild.nodeName&&""===e.lastChild.innerHTML){var a=n.i(s.createElement)("br");e.lastChild.appendChild(a)}e=e.lastChild}e=n.i(s.isNullOrUndefined)(e)?t:e,"IMG"===e.nodeName?this.imageFocus(e,i,r):i.setSelectionText(r,e,e,e.textContent.length,e.textContent.length),this.removeEmptyElements(o)},e.getNodeCollection=function(e,t,n){var i=[];return e.startOffset===e.endOffset&&e.startContainer===e.endContainer&&"BR"!==e.startContainer.nodeName&&e.startContainer.childNodes.length>0&&("TD"===e.startContainer.nodeName||3!==e.startContainer.nodeType&&n.classList&&n.classList.contains("pasteContent"))?i.push(e.startContainer.childNodes[e.endOffset]):i=t.getInsertNodeCollection(e),i},e.insertTempNode=function(e,t,r,o,a){if(e.startContainer!==a||n.i(s.isNullOrUndefined)(e.startContainer.childNodes[e.endOffset-1])||"TABLE"!==e.startContainer.childNodes[e.endOffset-1].nodeName)if(e.startContainer!==a||n.i(s.isNullOrUndefined)(e.startContainer.childNodes[e.endOffset])||"TABLE"!==e.startContainer.childNodes[e.endOffset].nodeName)if(e.startContainer===e.endContainer&&3!==e.startContainer.nodeType&&"HR"===t.firstChild.nodeName)e.startContainer.classList.contains("e-content")||"BODY"===e.startContainer.nodeName?e.startContainer.appendChild(t):e.startContainer.parentNode.insertBefore(t,e.startContainer);else{var l=this.getImmediateBlockNode(r[r.length-1],a);if((n.i(s.isNullOrUndefined)(l)||n.i(s.isNullOrUndefined)(l.parentElement))&&3!==e.endContainer.nodeType&&(l=e.endContainer,e.setEnd(l,e.endContainer.textContent.length)),"BODY"===l.nodeName&&e.startContainer===e.endContainer&&1===e.startContainer.nodeType&&(l=e.startContainer),l.closest("LI")&&t&&t.firstElementChild&&("OL"===t.firstElementChild.tagName||"UL"===t.firstElementChild.tagName))for(var d=void 0;t.firstElementChild.lastElementChild&&"LI"===t.firstElementChild.lastElementChild.tagName;)d=t.firstElementChild.lastElementChild,d.style.removeProperty("margin-left"),d.style.removeProperty("margin-top"),d.style.removeProperty("margin-bottom"),t.firstElementChild.insertAdjacentElement("afterend",d);if("TD"===l.nodeName||"TH"===l.nodeName||"TR"===l.nodeName){var c=n.i(s.createElement)("span",{className:"tempSpan"});e.insertNode(c),c.parentNode.replaceChild(t,c)}else{var u=new i.a,h=this.getNodeCollection(e,u,t)[this.getNodeCollection(e,u,t).length-1],p=void 0;if("BR"!==h.nodeName&&"HR"!==h.nodeName&&("#text"!==h.nodeName||n.i(s.isNullOrUndefined)(h.parentElement)||"LI"!==h.parentElement.nodeName)||n.i(s.isNullOrUndefined)(h.parentElement)||0!==h.parentElement.textContent.trim().length){if(("#text"===h.nodeName||"BR"===h.nodeName)&&!n.i(s.isNullOrUndefined)(h.parentElement)&&("LI"===h.parentElement.nodeName||l===a&&h.parentElement===l)&&h.parentElement.textContent.trim().length>0)return p=h,"LI"!==h.parentElement.nodeName||n.i(s.isNullOrUndefined)(h.nextSibling)||"BR"!==h.nextSibling.nodeName||n.i(s.detach)(h.nextSibling),e.collapsed||e.deleteContents(),e.insertNode(t),void(this.contentsDeleted=!0);p=o.GetSpliceNode(e,l)}else p=h,"LI"!==h.parentElement.nodeName||n.i(s.isNullOrUndefined)(h.nextSibling)||"BR"!==h.nextSibling.nodeName||n.i(s.detach)(h.nextSibling);p.parentNode.replaceChild(t,p)}}else e.startContainer.insertBefore(t,e.startContainer.childNodes[e.endOffset]);else n.i(s.isNullOrUndefined)(e.startContainer.childNodes[e.endOffset-1].nextSibling)?e.startContainer.appendChild(t):e.startContainer.insertBefore(t,e.startContainer.childNodes[e.endOffset-1].nextSibling)},e.cursorPos=function(e,t,i,r,o,a){e.classList.add("lastNode"),o.innerHTML=n.i(l.d)(o.innerHTML,a),e=o.querySelector(".lastNode"),n.i(s.isNullOrUndefined)(e)||(this.placeCursorEnd(e,t,i,r,o),e.classList.remove("lastNode"),0===e.classList.length&&e.removeAttribute("class"))},e.imageFocus=function(e,t,n){var i=document.createTextNode(" ");e.parentNode.insertBefore(i,e.nextSibling),t.setSelectionText(n,e.nextSibling,e.nextSibling,0,0)},e.getImmediateBlockNode=function(e,t){do{e=e.parentNode}while(e&&o.a.indexOf(e.nodeName.toLocaleLowerCase())<0);return e},e.removingComments=function(e){var t=e.innerHTML;t=t.replace(/<!--[\s\S]*?-->/g,""),e.innerHTML=t},e.findDetachEmptyElem=function(e){var t;if(n.i(s.isNullOrUndefined)(e.parentElement))t=null;else{t=!(e.parentElement.textContent.length>0&&e.parentElement.textContent.match(/\u00a0/g)&&e.parentElement.textContent.match(/\u00a0/g).length>0)&&""===e.parentElement.textContent.trim()&&"true"!==e.parentElement.contentEditable&&n.i(s.isNullOrUndefined)(e.parentElement.querySelector("img"))?this.findDetachEmptyElem(e.parentElement):e}return t},e.removeEmptyElements=function(e){for(var t=e.querySelectorAll(":empty"),i=Array.from(t).filter(function(e){return!e.closest("svg")&&!e.closest("canvas")}),r=0;r<i.length;r++){var a=!0;if("DIV"===i[r].tagName&&(a="none"===i[r].style.borderBottom||""===i[r].style.borderBottom),o.t.indexOf(i[r].tagName.toLowerCase())<0&&a){var l=this.findDetachEmptyElem(i[r]);n.i(s.isNullOrUndefined)(l)||n.i(s.detach)(l)}}},e.closestEle=function(e,t){for(var i=e;i&&1===i.nodeType;){if(i.parentNode===t||!n.i(s.isNullOrUndefined)(i.parentNode.tagName)&&-1!==o.u.indexOf(i.parentNode.tagName.toLocaleLowerCase()))return i;i=i.parentNode}return null},e.inlineNode=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],e.contentsDeleted=!1,e}()},function(e,n){e.exports=t},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"c",function(){return r}),n.d(t,"b",function(){return o}),n.d(t,"e",function(){return s}),n.d(t,"a",function(){return a}),n.d(t,"f",function(){return l});var i="lists-commands",r="command-type",o="link-commands",s="clear-commands",a="insert-table",l="insert-text"},function(e,t,n){"use strict";var i=n(20);n.d(t,"a",function(){return i.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(11),r=n(0),o=(n.n(r),n(19)),s=function(){function e(){this.enterAction="P",this.position=-1,this.nodeSelection=new i.a}return e.prototype.GetSpliceNode=function(e,t){return t=this.SplitNode(e,t,!0),t=this.SplitNode(e,t,!1)},e.prototype.SplitNode=function(e,t,n){if(t){var i=e.cloneRange(),r=t.parentNode,s=this.nodeSelection.getIndex(t);i.collapse(n),n?i.setStartBefore(t):i.setEndAfter(t);var a=i.extractContents();if(n){if(t=r.childNodes[s],(a=this.spliceEmptyNode(a,!1))&&a.childNodes.length>0){var l=!(1!==a.childNodes.length||"IMG"===a.childNodes[0].nodeName||a.querySelectorAll("img").length>0||!this.isRteElm(a)||""!==a.textContent);if(!l)if(t)o.a.AppendBefore(a,t);else{r.appendChild(a);var d=document.createElement("div");d.innerHTML="",t=d.firstChild,r.appendChild(t)}}}else if(t=r.childNodes.length>1?r.childNodes[s]:r.childNodes[0],(a=this.spliceEmptyNode(a,!0))&&a.childNodes.length>0){var l=!(1!==a.childNodes.length||"IMG"===a.childNodes[0].nodeName||!this.isRteElm(a)||""!==a.textContent);if(!l)if(t)o.a.AppendBefore(a,t,!0);else{r.appendChild(a);var d=document.createElement("div");d.innerHTML="",r.insertBefore(d.firstChild,r.firstChild),t=r.firstChild}}return t}return null},e.prototype.isRteElm=function(e){var t=!0;if(1===e.childNodes.length&&"IMG"!==e.childNodes[0].nodeName)for(var i=e.childNodes[0],o=0;!n.i(r.isNullOrUndefined)(i.childNodes)&&o<i.childNodes.length;o++)("IMG"===i.childNodes[o].nodeName||"SPAN"===i.childNodes[o].nodeName&&(i.childNodes[o].classList.contains("e-video-wrap")||i.childNodes[o].classList.contains("e-embed-video-wrap")||i.childNodes[o].classList.contains("e-audio-wrap")))&&(t=!1);else t=!0;return t},e.prototype.spliceEmptyNode=function(e,t){var n;return n=1===e.childNodes.length&&"#text"===e.childNodes[0].nodeName&&""===e.childNodes[0].textContent||""===e.textContent?-1:e.childNodes.length-1,n>-1&&!t?this.spliceEmptyNode(e.childNodes[n],t):n>-1?this.spliceEmptyNode(e.childNodes[0],t):3===e.nodeType||11===e.nodeType||"IMG"===e.nodeName||e.classList.contains("e-video-wrap")||e.classList.contains("e-audio-wrap")||e.parentNode.removeChild(e),e},e.prototype.GetCursorStart=function(e,t,n){e=n?e:e.reverse();for(var i=e[0],r=0;r<e.length&&(n?e[r]<t:e[r]>=t);r++)i=e[r];return i},e.prototype.GetCursorRange=function(e,t,n){var i=e.createRange(),r=[];r.push(0);for(var o=this.TrimLineBreak(n.data),s=o.indexOf(" ",0);-1!==s;)r.indexOf(s)<0&&r.push(s),new RegExp("\\s").test(o[s-1])&&r.indexOf(s-1)<0&&r.push(s-1),new RegExp("\\s").test(o[s+1])&&r.push(s+1),s=o.indexOf(" ",s+1);if(r.push(o.length),r.indexOf(t.startOffset)>=0||r.indexOf(t.startOffset-1)>=0&&(1!==t.startOffset||1===t.startOffset&&new RegExp("\\s").test(o[0]))||r[r.length-1]-1===t.startOffset&&!new RegExp("\\s").test(o[0]))i=t,this.position=1;else{var a=this.GetCursorStart(r,t.startOffset,!0);this.position=t.startOffset-a,i.setStart(t.startContainer,a),i.setEnd(t.startContainer,this.GetCursorStart(r,t.startOffset,!1))}return i},e.prototype.GetCursorNode=function(e,t,n){return this.GetSpliceNode(this.GetCursorRange(e,t,n),n)},e.prototype.TrimLineBreak=function(e){return e.replace(/(\r\n\t|\n|\r\t)/gm," ")},e}()},function(e,t){e.exports=n},function(e,t){e.exports=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return a}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return c});var i={h6:"###### ",h5:"##### ",h4:"#### ",h3:"### ",h2:"## ",h1:"# ",blockquote:"> ",pre:"```\n",p:""},r={Bold:"**",Italic:"*",StrikeThrough:"~~",InlineCode:"`",SubScript:"<sub>",SuperScript:"<sup>",UpperCase:"A-Z",LowerCase:"a-z"},o={OL:"1. ",UL:"- "},s={"toolbar-focus":"alt+f10",escape:"27","insert-link":"ctrl+k","insert-image":"ctrl+shift+i","insert-audio":"ctrl+shift+a","insert-video":"ctrl+alt+v","insert-table":"ctrl+shift+e",undo:"ctrl+z",redo:"ctrl+y",copy:"ctrl+c",cut:"ctrl+x",paste:"ctrl+v",bold:"ctrl+b",italic:"ctrl+i",underline:"ctrl+u",strikethrough:"ctrl+shift+s",uppercase:"ctrl+shift+u",lowercase:"ctrl+shift+l",superscript:"ctrl+shift+=",subscript:"ctrl+=",indents:"ctrl+]",outdents:"ctrl+[","html-source":"ctrl+shift+h","full-screen":"ctrl+shift+f","decrease-fontsize":"ctrl+shift+<","increase-fontsize":"ctrl+shift+>","justify-center":"ctrl+e","justify-full":"ctrl+j","justify-left":"ctrl+l","justify-right":"ctrl+r","clear-format":"ctrl+shift+r","ordered-list":"ctrl+shift+o","unordered-list":"ctrl+alt+o",space:"32",enter:"13",tab:"tab",delete:"46","format-copy":"alt+shift+c","format-paste":"alt+shift+v"},a={"toolbar-focus":"alt+f10",escape:"27","insert-link":"ctrl+k","insert-image":"ctrl+shift+i","insert-table":"ctrl+shift+e",undo:"ctrl+z",redo:"ctrl+y",copy:"ctrl+c",cut:"ctrl+x",paste:"ctrl+v",bold:"ctrl+b",italic:"ctrl+i",strikethrough:"ctrl+shift+s",uppercase:"ctrl+shift+u",lowercase:"ctrl+shift+l",superscript:"ctrl+shift+=",subscript:"ctrl+=","full-screen":"ctrl+shift+f","ordered-list":"ctrl+shift+o","unordered-list":"ctrl+alt+o"},l={b:["strong"],strong:["b"],i:["emp","cite"],emp:["i","cite"],cite:["i","emp"]},d={first:"MsoListParagraphCxSpFirst",middle:"MsoListParagraphCxSpMiddle",last:"MsoListParagraphCxSpLast"},c=["BR","IMG"]},function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return d});var i=n(7),r=n(0),o=(n.n(r),n(11)),s=n(15),a=n(6),l={startSelection:"e-editor-select-start",endSelection:"e-editor-select-end"},d=function(){function e(e,t){this.parent=e,this.nodeSelection=new o.a,this.currentDocument=t}return e.prototype.contents=function(e){return e&&"IFRAME"!==e.tagName?Array.prototype.slice.call(e.childNodes||[]):[]},e.prototype.isBlockNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&i.a.indexOf(e.tagName.toLowerCase())>=0},e.prototype.isLink=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&"a"===e.tagName.toLowerCase()},e.prototype.blockParentNode=function(e){for(;e&&e.parentNode!==this.parent&&(!e.parentNode||!this.hasClass(e.parentNode,"e-node-inner"));null)if(e=e.parentNode,this.isBlockNode(e))return e;return e},e.prototype.rawAttributes=function(e){var t={},n=e.attributes;if(n.length>0)for(var i=0;i<n.length;i++){var r=n[i];t[r.nodeName]=r.value}return t},e.prototype.attributes=function(e){if(!e)return"";for(var t="",n=this.rawAttributes(e),i=Object.keys(n).sort(),r=0;r<i.length;r++){var o=i[r],s=n[""+o];s.indexOf("'")<0&&s.indexOf('"')>=0?t+=" "+o+"='"+s+"'":s.indexOf('"')>=0&&s.indexOf("'")>=0?(s=s.replace(/"/g,"""),t+=" "+o+'="'+s+'"'):t+=" "+o+'="'+s+'"'}return t},e.prototype.clearAttributes=function(e){for(var t=e.attributes,n=t.length-1;n>=0;n--){var i=t[n];e.removeAttribute(i.nodeName)}},e.prototype.openTagString=function(e){return"<"+e.tagName.toLowerCase()+this.attributes(e)+">"},e.prototype.closeTagString=function(e){return"</"+e.tagName.toLowerCase()+">"},e.prototype.createTagString=function(e,t,n){return"<"+e.toLowerCase()+this.attributes(t)+">"+n+"</"+e.toLowerCase()+">"},e.prototype.isList=function(e){return!!e&&["UL","OL"].indexOf(e.tagName)>=0},e.prototype.isElement=function(e){return e===this.parent},e.prototype.isEditable=function(e){return(!e.getAttribute||"true"===e.getAttribute("contenteditable"))&&["STYLE","SCRIPT"].indexOf(e.tagName)<0},e.prototype.hasClass=function(e,t){return e&&e.classList&&e.classList.contains(t)},e.prototype.replaceWith=function(e,t){e.parentNode.insertBefore(this.parseHTMLFragment(t),e),n.i(r.detach)(e)},e.prototype.parseHTMLFragment=function(e){var t=n.i(r.createElement)("template");return t.innerHTML=e,t.content instanceof DocumentFragment?t.content:document.createRange().createContextualFragment(e)},e.prototype.wrap=function(e,t){return e.parentNode.insertBefore(t,e),t=e.previousSibling,t.appendChild(e),t},e.prototype.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e.prototype.wrapInner=function(e,t){for(e.appendChild(t),t=e.querySelector(".e-rte-wrap-inner"),t.classList.remove("e-rte-wrap-inner"),0===t.classList.length&&t.removeAttribute("class");e.firstChild!==t;)t.appendChild(e.firstChild);return t},e.prototype.unWrap=function(e){for(var t=e.parentNode,n=[];e.firstChild;)n.push(e.firstChild),t.insertBefore(e.firstChild,e);return n=n.length>0?n:[e.parentNode],t.removeChild(e),n},e.prototype.getSelectedNode=function(e,t){return e.nodeType===Node.ELEMENT_NODE&&e.childNodes.length>0&&e.childNodes[t-1]&&e.childNodes[t-1].nodeType===Node.ELEMENT_NODE&&(e.childNodes[t-1].classList.contains(l.startSelection)||e.childNodes[t-1].classList.contains(l.endSelection))?e=e.childNodes[t-1]:e.nodeType===Node.ELEMENT_NODE&&e.childNodes.length>0&&e.childNodes[t]&&(e=e.childNodes[t]),e.nodeType===Node.TEXT_NODE&&(e=e.parentNode),e},e.prototype.nodeFinds=function(e,t){for(var n=[],i=0;i<t.length;i++)e.contains(t[i])&&e!==t[i]&&n.push(t[i]);return n},e.prototype.isEditorArea=function(){var e,t=this.getRangePoint(0);for(e=t.commonAncestorContainer;e&&!this.isElement(e);null)e=e.parentNode;return!!this.isElement(e)},e.prototype.getRangePoint=function(e){var t=this.getSelection(),n=[];if(t&&t.getRangeAt&&t.rangeCount){n=[];for(var i=0;i<t.rangeCount;i++)n.push(t.getRangeAt(i))}else n=[this.currentDocument.createRange()];return void 0!==e?n[e]:n},e.prototype.getSelection=function(){return this.nodeSelection.get(this.currentDocument)},e.prototype.getPreviousNode=function(e){for(e=e.previousElementSibling;e&&"\n"===e.textContent;null)e=e.previousElementSibling;return e},e.prototype.encode=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML.replace(/<br\s*[\/]?>/gi,"\n")},e.prototype.saveMarker=function(e,t){var n,r,o=this.parent.querySelector("."+l.startSelection),s=this.parent.querySelector("."+l.endSelection);if(this.hasClass(o,l.startSelection)&&o.classList.length>1){var a=this.createTagString(i.A,o,this.encode(o.textContent));this.replaceWith(o,a),o=this.parent.querySelector("."+l.startSelection),o.classList.remove(l.startSelection),n=o.childNodes[0]}else n=this.unWrap(o)[0];if(this.hasClass(s,l.endSelection)&&s.classList.length>1){var a=this.createTagString(i.A,s,this.encode(s.textContent));this.replaceWith(s,a),s=this.parent.querySelector("."+l.endSelection),s.classList.remove(l.endSelection),r=s.childNodes[0]}else r=s?this.unWrap(s)[0]:n;return e.startContainer=e.getNodeArray(n,!0),e.endContainer=e.getNodeArray(r,!1),e},e.prototype.marker=function(e,t){return'<span class="'+e+'">'+t+"</span>"},e.prototype.setMarker=function(e){var t=e.range,o=t.startContainer.childNodes,s=o.length>1&&"TABLE"===o[0].nodeName,d=(s?n.i(a.e)(o[t.startOffset+1]):o[t.startOffset>0?t.startOffset-1:t.startOffset])||t.startContainer,c=t.endContainer.childNodes[t.endOffset>0?t.endOffset-1:t.endOffset]||t.endContainer;if(d.nodeType===Node.ELEMENT_NODE&&c.nodeType===Node.ELEMENT_NODE&&(d.contains(c)||c.contains(d))){var u=d.contains(c)?d:c;if(u.nodeType!==Node.TEXT_NODE){for(var h=[],p=[],m=u;u.contains(m);null)h.indexOf(m)<0&&m.childNodes&&m.childNodes.length?(h.push(m),m=m.childNodes[0]):m.nextSibling?m=m.nextSibling:m.parentNode&&(m=m.parentNode,h.push(m)),p.indexOf(m)<0&&(m.nodeType===Node.TEXT_NODE||i.u.indexOf(m.parentNode.tagName.toLocaleLowerCase())>=0&&("BR"===m.tagName||"IMG"===m.tagName))&&p.push(m);p.length&&(d=d.contains(c)?p[0]:d,c=p[p.length-1])}}if(d!==c){if(d.nodeType!==Node.TEXT_NODE&&("BR"===d.tagName&&i.u.indexOf(d.parentNode.tagName.toLocaleLowerCase())>=0||"IMG"===d.tagName)){this.replaceWith(d,this.marker(l.startSelection,this.encode(d.textContent)));t.startContainer.querySelector("."+l.startSelection).appendChild(d)}else if(3!==d.nodeType&&"#text"!==d.nodeName&&"BR"!==d.nodeName){var f=this.marker(l.startSelection,"");n.i(r.append)([this.parseHTMLFragment(f)],d)}else this.replaceWith(d,this.marker(l.startSelection,this.encode(d.textContent)));if(c.nodeType!==Node.TEXT_NODE&&"BR"===c.tagName&&i.u.indexOf(c.parentNode.tagName.toLocaleLowerCase())>=0){this.replaceWith(c,this.marker(l.endSelection,this.encode(c.textContent)));t.endContainer.querySelector("."+l.endSelection).appendChild(c)}else this.ensureSelfClosingTag(c,l.endSelection,t)}else this.ensureSelfClosingTag(d,l.startSelection,t)},e.prototype.ensureSelfClosingTag=function(e,t,i){var o=!1;if(3===e.nodeType)this.replaceWith(e,this.marker(t,this.encode(e.textContent)));else if("BR"===e.tagName){this.replaceWith(e,this.marker(t,this.encode(e.textContent)));var a=i.startContainer.querySelector("."+t);a.parentElement.appendChild(e)}else{if("IMG"===e.tagName){var d=document.createElement("p");e.parentElement.insertBefore(d,e),d.appendChild(e),e=d.children[0]}if("TABLE"===e.tagName)if(o=!0,""===e.textContent){var c=e.querySelectorAll("td");e=c[c.length-1],e=n.i(r.isNullOrUndefined)(e.childNodes[0])?e:e.childNodes[0]}else{for(var u=e.lastChild;3!==u.nodeType&&"#text"!==u.nodeName&&"BR"!==u.nodeName;)u=u.lastChild;e=u}for(var h=0;h<s.h.length;h++)e=e.tagName!==s.h[h]||o?e:e.parentNode;if(3===e.nodeType&&"#text"===e.nodeName)this.replaceWith(e,this.marker(t,this.encode(e.textContent)));else if("BR"===e.nodeName){this.replaceWith(e,this.marker(l.endSelection,this.encode(e.textContent)));var p=i.endContainer.querySelector("."+l.endSelection);p.appendChild(e)}else{var m=this.marker(t,"");n.i(r.append)([this.parseHTMLFragment(m)],e)}}},e.prototype.createTempNode=function(e){var t=e.textContent;if("BR"===e.tagName){var n="<"+i.A+"></"+i.A+">",r=e.parentNode;i.u.indexOf(r.tagName.toLocaleLowerCase())>=0&&(e=this.wrap(e,this.parseHTMLFragment(n)))}else if(e.nodeType!==Node.TEXT_NODE&&(e.classList.contains(l.startSelection)||e.classList.contains(l.endSelection))||t.replace(/\n/g,"").replace(/(^ *)|( *$)/g,"").length>0||t.length&&t.indexOf("\n")<0){var n="<"+i.A+"></"+i.A+">",o=e;e=this.wrap(e,this.parseHTMLFragment(n));var s=o.nodeType===Node.ELEMENT_NODE&&o.firstChild&&"BR"===o.firstChild.nodeName&&(o.classList.contains(l.startSelection)||o.classList.contains(l.endSelection));!s&&e.nextElementSibling&&"BR"===e.nextElementSibling.tagName&&e.appendChild(e.nextElementSibling)}return e},e.prototype.getImageTagInSelection=function(){var e=this.getSelection();return this.isEditorArea()&&e.rangeCount?e.focusNode.querySelectorAll("img"):null},e.prototype.blockNodes=function(){var e=[],t=this.getSelection();if(this.isEditorArea()&&t.rangeCount)for(var o=this.getRangePoint(),s=0;s<o.length;s++){var a=void 0,d=o[s],c=this.getSelectedNode(d.startContainer,d.startOffset),u=this.getSelectedNode(d.endContainer,d.endOffset);if(this.isBlockNode(c)&&e.indexOf(c)<0&&e.push(c),(a=this.blockParentNode(c))&&e.indexOf(a)<0)if(i.u.indexOf(a.tagName.toLocaleLowerCase())>=0&&("BR"===c.tagName||c.nodeType===Node.TEXT_NODE||c.classList.contains(l.startSelection)||c.classList.contains(l.endSelection))){var h=c.previousSibling&&c.previousSibling.nodeType===Node.TEXT_NODE?c.previousSibling:c;c.nextSibling||c.previousSibling||"BR"!==c.tagName?e.push(this.createTempNode(h)):e.push(h)}else e.push(a);for(var p=[],m=c;m!==u&&m!==this.parent;null)p.indexOf(m)<0&&m.childNodes&&m.childNodes.length?(p.push(m),m=m.childNodes[0]):m&&8!==m.nodeType&&("BR"===m.tagName||m.nodeType===Node.TEXT_NODE&&""!==m.textContent.trim()||m.nodeType!==Node.TEXT_NODE&&(m.classList.contains(l.startSelection)||m.classList.contains(l.endSelection)))&&i.u.indexOf(m.parentNode.tagName.toLocaleLowerCase())>=0?m=this.createTempNode(m):m.nextSibling&&8!==m.nextSibling.nodeType&&("BR"===m.nextSibling.tagName||m.nextSibling.nodeType===Node.TEXT_NODE||m.nextSibling.classList.contains(l.startSelection)||m.nextSibling.classList.contains(l.endSelection))&&i.u.indexOf(m.nextSibling.parentNode.tagName.toLocaleLowerCase())>=0?m=this.createTempNode(m.nextSibling):m.nextSibling?m=m.nextSibling:m.parentNode&&(m=m.parentNode,p.push(m)),e.indexOf(m)<0&&m.nodeType===Node.ELEMENT_NODE&&i.u.indexOf(m.parentNode.tagName.toLocaleLowerCase())>=0&&(m.classList.contains(l.startSelection)||m.classList.contains(l.endSelection))&&e.push(this.createTempNode(m)),this.isBlockNode(m)&&this.ignoreTableTag(m)&&p.indexOf(m)<0&&e.indexOf(m)<0&&(m!==u||d.endOffset>0)&&e.push(m),"IMG"===m.nodeName&&"true"===m.parentElement.contentEditable&&e.push(m);a=this.blockParentNode(u),a&&this.ignoreTableTag(a)&&e.indexOf(a)<0&&!n.i(r.isNullOrUndefined)(a.previousElementSibling)&&"IMG"!==a.previousElementSibling.tagName&&e.push(a)}for(var f=e.length-1;f>0;f--){var p=this.nodeFinds(e[f],e);if(p.length){var g=e[f].querySelectorAll("ul, ol");if("LI"===e[f].tagName&&g.length>0)continue;e.splice(f,1)}}return e},e.prototype.ignoreTableTag=function(e){return!(i.s.indexOf(e.tagName.toLocaleLowerCase())>=0)},e}()},function(e,t,n){"use strict";function i(e,t,n){for(var i=0;t.length>i;i++)if(t[i].value===n.subCommand)return e.localeObj.getConstant(t[i].locale);return n.text}function r(e){l.forEach(function(t,n){l[n].text=i(e,a,l[n])}),m.forEach(function(t,n){m[n].text=i(e,u,m[n])}),f.forEach(function(t,n){f[n].text=i(e,h,f[n])}),g.forEach(function(t,n){g[n].text=i(e,p,g[n])}),C.forEach(function(t,n){C[n].text=i(e,v,C[n])}),N.forEach(function(t,n){N[n].text=i(e,y,N[n])}),E.forEach(function(t,n){E[n].text=i(e,S,E[n])}),O.forEach(function(t,n){O[n].text=i(e,T,O[n])})}n.d(t,"l",function(){return o}),n.d(t,"v",function(){return s}),n.d(t,"a",function(){return l}),n.d(t,"t",function(){return d}),n.d(t,"u",function(){return c}),n.d(t,"q",function(){return m}),n.d(t,"s",function(){return f}),n.d(t,"r",function(){return g}),n.d(t,"o",function(){return b}),n.d(t,"m",function(){return C}),n.d(t,"n",function(){return N}),n.d(t,"p",function(){return E}),n.d(t,"g",function(){return O}),n.d(t,"f",function(){return w}),n.d(t,"b",function(){return k}),n.d(t,"i",function(){return L}),n.d(t,"c",function(){return _}),n.d(t,"j",function(){return x}),n.d(t,"k",function(){return D}),n.d(t,"d",function(){return M}),n.d(t,"e",function(){return R}),t.x=r,n.d(t,"w",function(){return B}),n.d(t,"h",function(){return A});var o=["alignments","formats","fontname","fontsize","fontcolor","backgroundcolor","align","display","audiolayoutoption","videolayoutoption","videoalign","tablerows","tablecolumns","tablecell","tablecellhorizontalalign","tablecellverticalalign","styles","numberformatlist","bulletformatlist"],s={alignments:{id:"Alignments",icon:"e-alignments",tooltip:"Alignments",command:"Alignments",subCommand:"Alignments"},justifyleft:{id:"JustifyLeft",icon:"e-justify-left",tooltip:"JustifyLeft",command:"Alignments",subCommand:"JustifyLeft"},justifycenter:{id:"JustifyCenter",icon:"e-justify-center",tooltip:"JustifyCenter",command:"Alignments",subCommand:"JustifyCenter"},justifyright:{id:"JustifyRight",icon:"e-justify-right",tooltip:"JustifyRight",command:"Alignments",subCommand:"JustifyRight"},justifyfull:{id:"JustifyFull",icon:"e-justify-full",tooltip:"JustifyFull",command:"Alignments",subCommand:"JustifyFull"},fontname:{id:"FontName",icon:"e-font-name",tooltip:"Font Name",command:"Font",subCommand:"FontName"},fontsize:{id:"FontSize",icon:"e-font-size",tooltip:"Font Size",command:"Font",subCommand:"FontSize"},fontcolor:{id:"FontColor",icon:"e-rte-font-color",tooltip:"Font Color",command:"Font",subCommand:"FontColor",value:"#ff0000ff"},backgroundcolor:{id:"BackgroundColor",icon:"e-background-color",tooltip:"Background Color",command:"Font",subCommand:"BackgroundColor",value:"#ffff00ff"},bold:{id:"Bold",icon:"e-bold",tooltip:"Bold",command:"Style",subCommand:"Bold"},italic:{id:"Italic",icon:"e-italic",tooltip:"Italic",command:"Style",subCommand:"Italic"},underline:{id:"Underline",icon:"e-underline",tooltip:"Underline",command:"Style",subCommand:"Underline"},strikethrough:{id:"StrikeThrough",icon:"e-strike-through",tooltip:"StrikeThrough",command:"Style",subCommand:"StrikeThrough"},clearformat:{id:"ClearFormat",icon:"e-clear-format",tooltip:"Clear Format",command:"Clear",subCommand:"ClearFormat"},clearall:{id:"ClearAll",icon:"e-clear-all",tooltip:"Clear All",command:"Clear",subCommand:"ClearAll"},cut:{id:"Cut",icon:"e-cut",tooltip:"Cut",command:"ClipBoard",subCommand:"Cut"},copy:{id:"Copy",icon:"e-copy",tooltip:"Copy",command:"ClipBoard",subCommand:"Copy"},paste:{id:"Paste",icon:"e-paste",tooltip:"Paste",command:"ClipBoard",subCommand:"Paste"},unorderedlist:{id:"UnorderedList",icon:"e-unorder-list",tooltip:"Bulleted List",command:"Lists",subCommand:"UL"},orderedlist:{id:"OrderedList",icon:"e-order-list",tooltip:"Numbered List",command:"Lists",subCommand:"OL"},numberformatlist:{id:"NumberFormatList",icon:"e-order-list",tooltip:"Number Format List",command:"NumberFormatList",subCommand:"NumberFormatList"},bulletformatlist:{id:"BulletFormatList",icon:"e-unorder-list",tooltip:"Bullet Format List",command:"BulletFormatList",subCommand:"BulletFormatList"},indent:{id:"Indent",icon:"e-indent",tooltip:"Increase Indent",command:"Indents",subCommand:"Indent"},outdent:{id:"Outdent",icon:"e-outdent",tooltip:"Decrease Indent",command:"Indents",subCommand:"Outdent"},undo:{id:"Undo",icon:"e-undo",tooltip:"Undo",command:"Actions",subCommand:"Undo"},redo:{id:"Redo",icon:"e-redo",tooltip:"Redo",command:"Actions",subCommand:"Redo"},superscript:{id:"SuperScript",icon:"e-super-script",tooltip:"Superscript",command:"Effects",subCommand:"SuperScript"},subscript:{id:"SubScript",icon:"e-sub-script",tooltip:"Subscript",command:"Effects",subCommand:"SubScript"},createlink:{id:"CreateLink",icon:"e-create-link",tooltip:"Insert Hyperlink",command:"Links",subCommand:"CreateLink"},openlink:{id:"OpenLink",icon:"e-open-link",tooltip:"Open Link",command:"Links",subCommand:"OpenLink"},editlink:{id:"EditLink",icon:"e-edit-link",tooltip:"Edit Link",command:"Links",subCommand:"EditLink"},removelink:{id:"RemoveLink",icon:"e-remove-link",tooltip:"Remove Link",command:"Links",subCommand:"RemoveLink"},image:{id:"Image",icon:"e-image",tooltip:"Insert Image",command:"Images",subCommand:"Image"},audio:{id:"Audio",icon:"e-audio",tooltip:"Insert Audio",command:"Audios",subCommand:"Audio"},video:{id:"Video",icon:"e-video",tooltip:"Insert Video",command:"Videos",subCommand:"Video"},filemanager:{id:"FileManager",icon:"e-rte-file-manager",tooltip:"File Manager",command:"Files",subCommand:"File"},createtable:{id:"CreateTable",icon:"e-create-table",tooltip:"Create Table",command:"Table",subCommand:"CreateTable"},removetable:{id:"removeTable",icon:"e-remove-table",tooltip:"Remove Table",command:"removeTable",subCommand:"removeTable"},replace:{id:"Replace",icon:"e-replace",tooltip:"Replace",command:"Images",subCommand:"Replace"},audioreplace:{id:"AudioReplace",icon:"e-audio-replace",tooltip:"Audio Replace",command:"Audios",subCommand:"AudioReplace"},audioremove:{id:"AudioRemove",icon:"e-audio-remove",tooltip:"Audio Remove",command:"Audios",subCommand:"AudioRemove"},audiolayoutoption:{id:"AudioLayoutOption",icon:"e-audio-display",tooltip:"Audio LayoutOption",command:"Audios",subCommand:"AudioLayoutOption"},videoreplace:{id:"VideoReplace",icon:"e-video-replace",tooltip:"Video Replace",command:"Videos",subCommand:"VideoReplace"},videoalign:{id:"VideoAlign",icon:"e-video-align",tooltip:"Video Align",command:"Videos",subCommand:"VideoAlign"},videoremove:{id:"VideoRemove",icon:"e-video-remove",tooltip:"Video Remove",command:"Videos",subCommand:"VideoRemove"},videolayoutoption:{id:"VideoLayoutOption",icon:"e-video-display",tooltip:"Video LayoutOption",command:"Videos",subCommand:"VideoLayoutOption"},videodimension:{id:"VideoDimension",icon:"e-video-dimension",tooltip:"Video Dimension",command:"Videos",subCommand:"VideoDimension"},align:{id:"Align",icon:"e-align",tooltip:"Align",command:"Images",subCommand:"Align"},caption:{id:"Caption",icon:"e-caption",tooltip:"Image Caption",command:"Images",subCommand:"Caption"},remove:{id:"Remove",icon:"e-remove",tooltip:"Remove",command:"Images",subCommand:"Remove"},openimagelink:{id:"OpenImageLink",icon:"e-open-link",tooltip:"Open Link",command:"Images",subCommand:"OpenImageLink"},editimagelink:{id:"EditImageLink",icon:"e-edit-link",tooltip:"Edit Link",command:"Images",subCommand:"EditImageLink"},removeimagelink:{id:"RemoveImageLink",icon:"e-remove-link",tooltip:"Remove Link",command:"Images",subCommand:"RemoveImageLink"},insertlink:{id:"InsertLink",icon:"e-insert-link",tooltip:"Insert Link",command:"Images",subCommand:"InsertLink"},display:{id:"Display",icon:"e-display",tooltip:"Display",command:"Images",subCommand:"Display"},alttext:{id:"AltText",icon:"e-alt-text",tooltip:"Alternative Text",command:"Images",subCommand:"AltText"},dimension:{id:"Dimension",icon:"e-img-dimension",tooltip:"Change Size",command:"Images",subCommand:"Dimension"},fullscreen:{id:"Maximize",icon:"e-maximize",tooltip:"Maximize",command:"View",subCommand:"Maximize"},maximize:{id:"Maximize",icon:"e-maximize",tooltip:"Maximize",command:"FullScreen",subCommand:"Maximize"},minimize:{id:"Minimize",icon:"e-minimize",tooltip:"Minimize",command:"FullScreen",subCommand:"Minimize"},lowercase:{id:"LowerCase",icon:"e-lower-case",tooltip:"Lower Case",command:"Casing",subCommand:"LowerCase"},uppercase:{id:"UpperCase",icon:"e-upper-case",tooltip:"Upper Case",command:"Casing",subCommand:"UpperCase"},print:{id:"Print",icon:"e-print",tooltip:"Print",command:"Print",subCommand:"Print"},formats:{id:"Formats",icon:"e-formats",tooltip:"Formats",command:"Formats",subCommand:"Formats"},sourcecode:{id:"SourceCode",icon:"e-source-code",tooltip:"Source Code",command:"SourceCode",subCommand:"SourceCode"},preview:{id:"Preview",icon:"e-preview",tooltip:"Preview",command:"Preview",subCommand:"Preview"},viewside:{id:"ViewSide",icon:"e-view-side",tooltip:"ViewSide",command:"ViewSide",subCommand:"ViewSide"},insertcode:{id:"InsertCode",icon:"e-insert-code",tooltip:"Insert Code",command:"Formats",subCommand:"Pre"},tableheader:{id:"TableHeader",icon:"e-table-header",tooltip:"Table Header",command:"Table",subCommand:"TableHeader"},tableremove:{id:"TableRemove",icon:"e-table-remove",tooltip:"Table Remove",command:"Table",subCommand:"TableRemove"},tablerows:{id:"TableRows",icon:"e-table-rows",tooltip:"Table Rows",command:"Table",subCommand:"TableRows"},tablecolumns:{id:"TableColumns",icon:"e-table-columns",tooltip:"Table Columns",command:"Table",subCommand:"TableColumns"},tablecell:{id:"TableCell",icon:"e-table-cell",tooltip:"Table Cell",command:"Table",subCommand:"TableCell"},tablecellbackground:{id:"TableCellBackground",icon:"e-table-cell-background",tooltip:"Table Cell Background",command:"Table",subCommand:"TableCellBackground"},tablecellhorizontalalign:{id:"TableCellHorizontalAlign",icon:"e-table-cell-horizontalAlign",tooltip:"Table Cell HorizontalAlign",command:"Table",subCommand:"TableCellHorizontalAlign"},tablecellverticalalign:{id:"TableCellVerticalAlign",icon:"e-table-cell-verticalAlign",tooltip:"Table Cell VerticalAlign",command:"Table",subCommand:"TableCellVerticalAlign"},tableeditproperties:{id:"TableEditProperties",icon:"e-table-edit-properties",tooltip:"Table Edit Properties",command:"Table",subCommand:"TableEditProperties"},styles:{id:"Styles",icon:"e-table-styles",tooltip:"Styles",command:"Table",subCommand:"Styles"},formatpainter:{id:"FormatPainter",icon:"e-rte-format-painter",tooltip:"Format Painter",command:"FormatPainter",subCommand:"FormatPainter"},emojipicker:{id:"EmojiPicker",icon:"e-emoji",tooltip:"Emoji Icon",command:"EmojiPicker",subCommand:"EmojiPicker"}},a=[{locale:"alignmentsDropDownLeft",value:"JustifyLeft"},{locale:"alignmentsDropDownCenter",value:"JustifyCenter"},{locale:"alignmentsDropDownRight",value:"JustifyRight"},{locale:"alignmentsDropDownJustify",value:"JustifyFull"}],l=[{iconCss:"e-icons e-justify-left",text:"Align Left",command:"Alignments",subCommand:"JustifyLeft"},{iconCss:"e-icons e-justify-center",text:"Align Center",command:"Alignments",subCommand:"JustifyCenter"},{iconCss:"e-icons e-justify-right",text:"Align Right",command:"Alignments",subCommand:"JustifyRight"},{iconCss:"e-icons e-justify-full",text:"Align Justify",command:"Alignments",subCommand:"JustifyFull"}],d=[{iconCss:"e-icons e-justify-left",command:"Images",subCommand:"JustifyLeft"},{iconCss:"e-icons e-justify-center",command:"Images",subCommand:"JustifyCenter"},{iconCss:"e-icons e-justify-right",command:"Images",subCommand:"JustifyRight"}],c=[{iconCss:"e-icons e-justify-left",command:"Videos",subCommand:"JustifyLeft"},{iconCss:"e-icons e-justify-center",command:"Videos",subCommand:"JustifyCenter"},{iconCss:"e-icons e-justify-right",command:"Videos",subCommand:"JustifyRight"}],u=[{locale:"imageDisplayDropDownInline",value:"Inline"},{locale:"imageDisplayDropDownBreak",value:"Break"}],h=[{locale:"audioLayoutOptionDropDownInline",value:"Inline"},{locale:"audioLayoutOptionDropDownBreak",value:"Break"}],p=[{locale:"videoLayoutOptionDropDownInline",value:"Inline"},{locale:"videoLayoutOptionDropDownBreak",value:"Break"}],m=[{text:"Inline",cssClass:"e-inline",command:"Images",subCommand:"Inline"},{text:"Break",cssClass:"e-break",command:"Images",subCommand:"Break"}],f=[{text:"Inline",cssClass:"e-audio-inline",command:"Audios",subCommand:"Inline"},{text:"Break",cssClass:"e-audio-break",command:"Audios",subCommand:"Break"}],g=[{text:"Inline",cssClass:"e-video-inline",command:"Videos",subCommand:"Inline"},{text:"Break",cssClass:"e-video-break",command:"Videos",subCommand:"Break"}],b=[{iconCss:"e-icons e-cell-merge",text:"Merge cells",command:"Table",subCommand:"Merge"},{iconCss:"e-icons e-cell-horizontal-split",text:"Horizontal split",command:"Table",subCommand:"HorizontalSplit"},{iconCss:"e-icons e-cell-vertical-split",text:"Vertical split",command:"Table",subCommand:"VerticalSplit"}],v=[{locale:"tableInsertRowDropDownBefore",value:"InsertRowBefore"},{locale:"tableInsertRowDropDownAfter",value:"InsertRowAfter"},{locale:"tableInsertRowDropDownDelete",value:"DeleteRow"}],C=[{iconCss:"e-icons e-insert-row-before",text:"Insert row before",command:"Table",subCommand:"InsertRowBefore"},{iconCss:"e-icons e-insert-row-after",text:"Insert row after",command:"Table",subCommand:"InsertRowAfter"},{iconCss:"e-icons e-delete-row",text:"Delete row",command:"Table",subCommand:"DeleteRow"}],y=[{locale:"tableInsertColumnDropDownLeft",value:"InsertColumnLeft"},{locale:"tableInsertColumnDropDownRight",value:"InsertColumnRight"},{locale:"tableInsertColumnDropDownDelete",value:"DeleteColumn"}],N=[{iconCss:"e-icons e-insert-column-left",text:"Insert column left",command:"Table",subCommand:"InsertColumnLeft"},{iconCss:"e-icons e-insert-column-right",text:"Insert column right",command:"Table",subCommand:"InsertColumnRight"},{iconCss:"e-icons e-delete-column",text:"Delete column",command:"Table",subCommand:"DeleteColumn"}],S=[{locale:"tableVerticalAlignDropDownTop",value:"AlignTop"},{locale:"tableVerticalAlignDropDownMiddle",value:"AlignMiddle"},{locale:"tableVerticalAlignDropDownBottom",value:"AlignBottom"}],E=[{iconCss:"e-icons e-align-top",text:"Align Top",command:"Table",subCommand:"AlignTop"},{iconCss:"e-icons e-align-middle",text:"Align Middle",command:"Table",subCommand:"AlignMiddle"},{iconCss:"e-icons e-align-bottom",text:"Align Bottom",command:"Table",subCommand:"AlignBottom"}],T=[{locale:"tableStylesDropDownDashedBorder",value:"Dashed"},{locale:"tableStylesDropDownAlternateRows",value:"Alternate"}],O=[{text:"Dashed Borders",cssClass:"e-dashed-borders",command:"Table",subCommand:"Dashed"},{text:"Alternate Rows",cssClass:"e-alternate-rows",command:"Table",subCommand:"Alternate"}],w=["Bold","Italic","Underline","|","Formats","Alignments","OrderedList","UnorderedList","|","CreateLink","Image","|","SourceCode","Undo","Redo"],k=[{cssClass:"e-segoe-ui",text:"Segoe UI",command:"Font",subCommand:"FontName",value:"Segoe UI"},{cssClass:"e-arial",text:"Arial",command:"Font",subCommand:"FontName",value:"Arial,Helvetica,sans-serif"},{cssClass:"e-georgia",text:"Georgia",command:"Font",subCommand:"FontName",value:"Georgia,serif"},{cssClass:"e-impact",text:"Impact",command:"Font",subCommand:"FontName",value:"Impact,Charcoal,sans-serif"},{cssClass:"e-tahoma",text:"Tahoma",command:"Font",subCommand:"FontName",value:"Tahoma,Geneva,sans-serif"},{cssClass:"e-times-new-roman",text:"Times New Roman",command:"Font",subCommand:"FontName",value:"Times New Roman,Times,serif"},{cssClass:"e-verdana",text:"Verdana",command:"Font",subCommand:"FontName",value:"Verdana,Geneva,sans-serif"}],L=[{text:"8 pt",value:"8pt"},{text:"10 pt",value:"10pt"},{text:"12 pt",value:"12pt"},{text:"14 pt",value:"14pt"},{text:"18 pt",value:"18pt"},{text:"24 pt",value:"24pt"},{text:"36 pt",value:"36pt"}],_=[{cssClass:"e-paragraph",text:"Paragraph",command:"Formats",subCommand:"P",value:"P"},{cssClass:"e-code",text:"Code",command:"Formats",subCommand:"Pre",value:"Pre"},{cssClass:"e-quote",text:"Quotation",command:"Formats",subCommand:"BlockQuote",value:"BlockQuote"},{cssClass:"e-h1",text:"Heading 1",command:"Formats",subCommand:"H1",value:"H1"},{cssClass:"e-h2",text:"Heading 2",command:"Formats",subCommand:"H2",value:"H2"},{cssClass:"e-h3",text:"Heading 3",command:"Formats",subCommand:"H3",value:"H3"},{cssClass:"e-h4",text:"Heading 4",command:"Formats",subCommand:"H4",value:"H4"}],x={Custom:["","#000000","#e7e6e6","#44546a","#4472c4","#ed7d31","#a5a5a5","#ffc000","#70ad47","#ff0000","#f2f2f2","#808080","#cfcdcd","#d5dce4","#d9e2f3","#fbe4d5","#ededed","#fff2cc","#e2efd9","#ffcccc","#d9d9d9","#595959","#aeaaaa","#acb9ca","#b4c6e7","#f7caac","#dbdbdb","#ffe599","#c5e0b3","#ff8080","#bfbfbf","#404040","#747070","#8496b0","#8eaadb","#f4b083","#c9c9c9","#ffd966","#a8d08d","#ff3333","#a6a6a6","#262626","#3b3838","#323e4f","#2f5496","#c45911","#7b7b7b","#bf8f00","#538135","#b30000","#7f7f7f","#0d0d0d","#161616","#212934","#1f3763","#823b0b","#525252","#7f5f00","#375623","#660000"]},D={Custom:["","#000000","#ffff00","#00ff00","#00ffff","#0000ff","#ff0000","#000080","#800080","#996633","#f2f2f2","#808080","#ffffcc","#b3ffb3","#ccffff","#ccccff","#ffcccc","#ccccff","#ff80ff","#f2e6d9","#d9d9d9","#595959","#ffff80","#80ff80","#b3ffff","#8080ff","#ff8080","#8080ff","#ff00ff","#dfbf9f","#bfbfbf","#404040","#ffff33","#33ff33","#33ffff","#3333ff","#ff3333","#0000b3","#b300b3","#c68c53","#a6a6a6","#262626","#e6e600","#00b300","#009999","#000099","#b30000","#000066","#660066","#86592d","#7f7f7f","#0d0d0d","#999900","#006600","#006666","#000066","#660000","#00004d","#4d004d","#734d26"]},M=[{text:"None",command:"Lists",subCommand:"NumberFormatList",value:"none"},{text:"Number",command:"Lists",subCommand:"NumberFormatList",value:"decimal"},{text:"Lower Greek",command:"Lists",subCommand:"NumberFormatList",value:"lowerGreek"},{text:"Lower Roman",command:"Lists",subCommand:"NumberFormatList",value:"lowerRoman"},{text:"Upper Alpha",command:"Lists",subCommand:"NumberFormatList",value:"upperAlpha"},{text:"Lower Alpha",command:"Lists",subCommand:"NumberFormatList",value:"lowerAlpha"},{text:"Upper Roman",command:"Lists",subCommand:"NumberFormatList",value:"upperRoman"}],R=[{text:"None",command:"Lists",subCommand:"BulletFormatList",value:"none"},{text:"Disc",command:"Lists",subCommand:"BulletFormatList",value:"disc"},{text:"Circle",command:"Lists",subCommand:"BulletFormatList",value:"circle"},{text:"Square",command:"Lists",subCommand:"BulletFormatList",value:"square"}],B={"Insert Link":"Ctrl+K","Insert Image":"Ctrl+Shift+I","Create Table":"Ctrl+Shift+E",Undo:"Ctrl+Z",Redo:"Ctrl+Y",Copy:"Ctrl+C",Cut:"Ctrl+X",Paste:"Ctrl+V",Bold:"Ctrl+B",Italic:"Ctrl+I",Underline:"Ctrl+U",Strikethrough:"Ctrl+Shift+S","Upper Case":"Ctrl+Shift+U","Lower Case":"Ctrl+Shift+L",Superscript:"Ctrl+Shift+=",Subscript:"Ctrl+=","Code View":"Ctrl+Shift+H",Maximize:"Ctrl+Shift+F",Minimize:"Esc","Clear Format":"Ctrl+Shift+R","Numbered List":"Ctrl+Shift+O","Bulleted List":"Ctrl+Alt+O","Number Format List":"Ctrl+Shift+O","Bullet Format List":"Ctrl+Alt+O","Insert Audio":"Ctrl+Shift+A","Insert Video":"Ctrl+Alt+V","Increase Indent":"Ctrl+]","Decrease Indent":"Ctrl+[","Decrease Fontsize":"Ctrl+Shift+<","Increase Fontsize":"Ctrl+Shift+>","Justify Center":"Ctrl+E","Justify Full":"Ctrl+J","Justify Left":"Ctrl+L","Justify Right":"Ctrl+R","Format Painter":"Alt+Shift+C, Alt+Shift+V"},A=[{name:"Smilies & People",code:"1F600",iconCss:"e-emoji",icons:[{code:"1F600",desc:"Grinning face"},{code:"1F603",desc:"Grinning face with big eyes"},{code:"1F604",desc:"Grinning face with smiling eyes"},{code:"1F606",desc:"Grinning squinting face"},{code:"1F605",desc:"Grinning face with sweat"},{code:"1F602",desc:"Face with tears of joy"},{code:"1F923",desc:"Rolling on the floor laughing"},{code:"1F60A",desc:"Smiling face with smiling eyes"},{code:"1F607",desc:"Smiling face with halo"},{code:"1F642",desc:"Slightly smiling face"},{code:"1F643",desc:"Upside-down face"},{code:"1F60D",desc:"Smiling face with heart-eyes"},{code:"1F618",desc:"Face blowing a kiss"},{code:"1F61B",desc:"Face with tongue"},{code:"1F61C",desc:"Winking face with tongue"},{code:"1F604",desc:"Grinning face with smiling eyes"},{code:"1F469",desc:"Woman"},{code:"1F468",desc:"Man"},{code:"1F467",desc:"Girl"},{code:"1F466",desc:"Boy"},{code:"1F476",desc:"Baby"},{code:"1F475",desc:"Old woman"},{code:"1F474",desc:"Old man"},{code:"1F46E",desc:"Police officer"},{code:"1F477",desc:"Construction worker"},{code:"1F482",desc:"Guard"},{code:"1F575",desc:"Detective"},{code:"1F9D1",desc:"Cook"}]},{name:"Animals & Nature",code:"1F435",iconCss:"e-animals",icons:[{code:"1F436",desc:"Dog face"},{code:"1F431",desc:"Cat face"},{code:"1F42D",desc:"Mouse face"},{code:"1F439",desc:"Hamster face"},{code:"1F430",desc:"Rabbit face"},{code:"1F98A",desc:"Fox face"},{code:"1F43B",desc:"Bear face"},{code:"1F43C",desc:"Panda face"},{code:"1F428",desc:"Koala"},{code:"1F42F",desc:"Tiger face"},{code:"1F981",desc:"Lion face"},{code:"1F42E",desc:"Cow face"},{code:"1F437",desc:"Pig face"},{code:"1F43D",desc:"Pig nose"},{code:"1F438",desc:"Frog face"},{code:"1F435",desc:"Monkey face"},{code:"1F649",desc:"Hear-no-evil monkey"},{code:"1F64A",desc:"Speak-no-evil monkey"},{code:"1F412",desc:"Monkey"},{code:"1F414",desc:"Chicken"},{code:"1F427",desc:"Penguin"},{code:"1F426",desc:"Bird"},{code:"1F424",desc:"Baby chick"},{code:"1F986",desc:"Duck"},{code:"1F985",desc:"Eagle"}]},{name:"Food & Drink",code:"1F347",iconCss:"e-food-and-drinks",icons:[{code:"1F34E",desc:"Red apple"},{code:"1F34C",desc:"Banana"},{code:"1F347",desc:"Grapes"},{code:"1F353",desc:"Strawberry"},{code:"1F35E",desc:"Bread"},{code:"1F950",desc:"Croissant"},{code:"1F955",desc:"Carrot"},{code:"1F354",desc:"Hamburger"},{code:"1F355",desc:"Pizza"},{code:"1F32D",desc:"Hot dog"},{code:"1F35F",desc:"French fries"},{code:"1F37F",desc:"Popcorn"},{code:"1F366",desc:"Soft ice cream"},{code:"1F367",desc:"Shaved ice"},{code:"1F36A",desc:"Cookie"},{code:"1F382",desc:"Birthday cake"},{code:"1F370",desc:"Shortcake"},{code:"1F36B",desc:"Chocolate bar"},{code:"1F369",desc:"Donut"},{code:"1F36E",desc:"Custard"},{code:"1F36D",desc:"Lollipop"},{code:"1F36C",desc:"Candy"},{code:"1F377",desc:"Wine glass"},{code:"1F37A",desc:"Beer mug"},{code:"1F37E",desc:"Bottle with popping cork"}]},{name:"Activities",code:"1F383",iconCss:"e-activities",icons:[{code:"26BD",desc:"Soccer ball"},{code:"1F3C0",desc:"Basketball"},{code:"1F3C8",desc:"American football"},{code:"26BE",desc:"Baseball"},{code:"1F3BE",desc:"Tennis"},{code:"1F3D0",desc:"Volleyball"},{code:"1F3C9",desc:"Rugby football"},{code:"1F3B1",desc:"Pool 8 ball"},{code:"1F3D3",desc:"Ping pong"},{code:"1F3F8",desc:"Badminton"},{code:"1F94A",desc:"Boxing glove"},{code:"1F3CA",desc:"Swimmer"},{code:"1F3CB",desc:"Weightlifter"},{code:"1F6B4",desc:"Bicyclist"},{code:"1F6F9",desc:"Skateboard"},{code:"1F3AE",desc:"Video game"},{code:"1F579",desc:"Joystick"},{code:"1F3CF",desc:"Cricket"},{code:"1F3C7",desc:"Horse racing"},{code:"1F3AF",desc:"Direct hit"},{code:"1F3D1",desc:"Field hockey"},{code:"1F3B0",desc:"Slot machine"},{code:"1F3B3",desc:"Bowling"},{code:"1F3B2",desc:"Game die"},{code:"265F",desc:"Chess pawn"}]},{name:"Travel & Places",code:"1F30D",iconCss:"e-travel-and-places",icons:[{code:"2708",desc:"Airplane"},{code:"1F697",desc:"Automobile"},{code:"1F695",desc:"Taxi"},{code:"1F6B2",desc:"Bicycle"},{code:"1F68C",desc:"Bus"},{code:"1F682",desc:"Locomotive"},{code:"1F6F3",desc:"Passenger ship"},{code:"1F680",desc:"Rocket"},{code:"1F681",desc:"Helicopter"},{code:"1F6A2",desc:"Ship"},{code:"1F3DF",desc:"Stadium"},{code:"1F54C",desc:"Mosque"},{code:"26EA",desc:"Church"},{code:"1F6D5",desc:"Hindu Temple"},{code:"1F3D4",desc:"Snow-capped mountain"},{code:"1F3EB",desc:"School"},{code:"1F30B",desc:"Volcano"},{code:"1F3D6",desc:"Beach with umbrella"},{code:"1F3DD",desc:"Desert island"},{code:"1F3DE",desc:"National park"},{code:"1F3F0",desc:"Castle"},{code:"1F5FC",desc:"Tokyo tower"},{code:"1F5FD",desc:"Statue of liberty"},{code:"26E9",desc:"Shinto shrine"},{code:"1F3EF",desc:"Japanese castle"},{code:"1F3A2",desc:"Roller coaster"}]},{name:"Objects",code:"1F507",iconCss:"e-objects",icons:[{code:"1F4A1",desc:"Light bulb"},{code:"1F526",desc:"Flashlight"},{code:"1F4BB",desc:"Laptop computer"},{code:"1F5A5",desc:"Desktop computer"},{code:"1F5A8",desc:"Printer"},{code:"1F4F7",desc:"Camera"},{code:"1F4F8",desc:"Camera with flash"},{code:"1F4FD",desc:"Film projector"},{code:"1F3A5",desc:"Movie camera"},{code:"1F4FA",desc:"Television"},{code:"1F4FB",desc:"Radio"},{code:"1F50B",desc:"Battery"},{code:"231A",desc:"Watch"},{code:"1F4F1",desc:"Mobile phone"},{code:"260E",desc:"Telephone"},{code:"1F4BE",desc:"Floppy disk"},{code:"1F4BF",desc:"Optical disk"},{code:"1F4C0",desc:"Digital versatile disc"},{code:"1F4BD",desc:"Computer disk"},{code:"1F3A7",desc:"Headphone"},{code:"1F3A4",desc:"Microphone"},{code:"1F3B6",desc:"Multiple musical notes"},{code:"1F4DA",desc:"Books"}]},{name:"Symbols",code:"1F3E7",iconCss:"e-symbols",icons:[{code:"274C",desc:"Cross mark"},{code:"2714",desc:"Check mark"},{code:"26A0",desc:"Warning sign"},{code:"1F6AB",desc:"Prohibited"},{code:"2139",desc:"Information"},{code:"267B",desc:"Recycling symbol"},{code:"1F6AD",desc:"No smoking"},{code:"1F4F5",desc:"No mobile phones"},{code:"1F6AF",desc:"No littering"},{code:"1F6B3",desc:"No bicycles"},{code:"1F6B7",desc:"No pedestrians"},{code:"2795",desc:"Plus"},{code:"2796",desc:"Minus"},{code:"2797",desc:"Divide"},{code:"2716",desc:"Multiplication"},{code:"1F4B2",desc:"Dollar banknote"},{code:"1F4AC",desc:"Speech balloon"},{code:"2755",desc:"White exclamation mark"},{code:"2754",desc:"White question mark"},{code:"2764",desc:"Red heart"}]}]},function(e,t){e.exports=r},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(){}return e.WrapBefore=function(e,t,n){return t.innerText=e.textContent,n?this.AppendBefore(t,e,!0):this.AppendBefore(t,e),e.parentNode&&e.parentNode.removeChild(e),t.childNodes[0]},e.Wrap=function(e,t){return this.AppendBefore(t,e),t.appendChild(e),e},e.unwrap=function(e){for(var t=e.parentNode,n=[];e.firstChild;null)n.push(t.insertBefore(e.firstChild,e));return t.removeChild(e),n},e.AppendBefore=function(e,t,n){return t.parentNode?n?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.insertBefore(e,t):t},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(0),r=(n.n(i),function(){function e(){this.startNodeName=[],this.endNodeName=[]}return e.prototype.saveInstance=function(e,t){return this.range=e.cloneRange(),this.rootNode=this.documentFromRange(e),this.body=t,this.startContainer=this.getNodeArray(e.startContainer,!0),this.endContainer=this.getNodeArray(e.endContainer,!1),this.startOffset=e.startOffset,this.endOffset=e.endOffset,this.html=this.body.innerHTML,this},e.prototype.documentFromRange=function(e){return 9===e.startContainer.nodeType?e.startContainer:e.startContainer.ownerDocument},e.prototype.getRange=function(e){var t=this.get(e),n=t&&t.rangeCount>0?t.getRangeAt(t.rangeCount-1):e.createRange();return n.startContainer!==e||n.endContainer!==e||n.startOffset||n.endOffset||(n.setStart(e.body,0),n.collapse(!0)),n},e.prototype.get=function(e){return e.defaultView.getSelection()},e.prototype.save=function(e,t){return e=e?e.cloneRange():this.getRange(t),this.saveInstance(e,t.body)},e.prototype.getIndex=function(e){var t,n=0;if(e=e.previousSibling||"BR"!==e.tagName?e.previousSibling:e){for(e.nodeType;e;null)t=e.nodeType,n++,t,e=e.previousSibling}return n},e.prototype.isChildNode=function(e,t){for(var n=0;n<t.childNodes.length;n++)if(e.indexOf(t.childNodes[n])>-1)return!0;return!1},e.prototype.getNode=function(e,t,n){return t!==e||3!==e.nodeType&&e.firstChild&&-1===n.indexOf(e.firstChild)&&!this.isChildNode(n,e)?-1===n.indexOf(e.firstChild)&&e.firstChild&&!this.isChildNode(n,e)?e.firstChild:e.nextSibling?e.nextSibling:e.parentNode?e.parentNode:null:null},e.prototype.getNodeCollection=function(e){var t=e.startContainer.childNodes[e.startOffset]||e.startContainer,n=e.endContainer.childNodes[e.endOffset>0?e.endOffset-1:e.endOffset]||e.endContainer;if((t===n||"BR"===t.nodeName&&t===e.endContainer.childNodes[e.endOffset])&&0===t.childNodes.length)return[t];if(e.startOffset===e.endOffset&&0!==e.startOffset&&"PRE"===e.startContainer.nodeName)return["BR"===t.nodeName||"#text"===t.nodeName?t:t.childNodes[0]];var i=[];do{-1===i.indexOf(t)&&i.push(t),t=this.getNode(t,n,i)}while(t);return i},e.prototype.getParentNodeCollection=function(e){return this.getParentNodes(this.getNodeCollection(e),e)},e.prototype.getParentNodes=function(e,t){e=e.reverse();for(var n=0;n<e.length;n++)-1!==e.indexOf(e[n].parentNode)||3===e[n].nodeType&&t.startContainer!==t.endContainer&&t.startContainer.parentNode!==t.endContainer.parentNode?(e.splice(n,1),n--):3===e[n].nodeType&&(e[n]=e[n].parentNode);return e},e.prototype.getSelectionNodeCollection=function(e){return this.getSelectionNodes(this.getNodeCollection(e))},e.prototype.getSelectionNodeCollectionBr=function(e){return this.getSelectionNodesBr(this.getNodeCollection(e))},e.prototype.getSelectionNodes=function(e){e=e.reverse();for(var t=new RegExp(String.fromCharCode(8203),"g"),n=0;n<e.length;n++)(3!==e[n].nodeType||""===e[n].textContent.trim()||1===e[n].textContent.length&&e[n].textContent.match(t))&&(e.splice(n,1),n--);return e.reverse()},e.prototype.getSelectionNodesBr=function(e){e=e.reverse();for(var t=new RegExp(String.fromCharCode(8203),"g"),n=0;n<e.length;n++)"BR"!==e[n].nodeName&&(3!==e[n].nodeType||""===e[n].textContent.trim()||1===e[n].textContent.length&&e[n].textContent.match(t))&&(e.splice(n,1),n--);return e.reverse()},e.prototype.getInsertNodeCollection=function(e){return this.getInsertNodes(this.getNodeCollection(e))},e.prototype.getInsertNodes=function(e){e=e.reverse();for(var t=0;t<e.length;t++)(0!==e[t].childNodes.length&&3!==e[t].nodeType||3===e[t].nodeType&&""===e[t].textContent)&&(e.splice(t,1),t--);return e.reverse()},e.prototype.getNodeArray=function(e,t,r){var o=[];for(t?this.startNodeName=[]:this.endNodeName=[];e!==(r||this.rootNode)&&!n.i(i.isNullOrUndefined)(e);null)t?this.startNodeName.push(e.nodeName.toLowerCase()):this.endNodeName.push(e.nodeName.toLowerCase()),o.push(this.getIndex(e)),e=e.parentNode;return o},e.prototype.setRangePoint=function(e,t,n,i){for(var r=this.rootNode,o=n.length,s=i;o--;null)r=r&&r.childNodes[n[o]];return r&&s>=0&&"html"!==r.nodeName&&(3===r.nodeType&&" "===r.nodeValue.replace(/\u00a0/g," ")&&(s=r.textContent.length),e[t?"setStart":"setEnd"](r,s)),e},e.prototype.restore=function(){var e=this.range.cloneRange();return e=this.setRangePoint(e,!0,this.startContainer,this.startOffset),e=this.setRangePoint(e,!1,this.endContainer,this.endOffset),this.selectRange(this.rootNode,e),e},e.prototype.selectRange=function(e,t){this.setRange(e,t),this.save(t,e)},e.prototype.setRange=function(e,t){var n=this.get(e);n.removeAllRanges(),n.addRange(t)},e.prototype.setSelectionText=function(e,t,n,i,r){var o=e.createRange();o.setStart(t,i),o.setEnd(n,r),this.setRange(e,o)},e.prototype.setSelectionContents=function(e,t){var n=e.createRange();n.selectNode(t),this.setRange(e,n)},e.prototype.setSelectionNode=function(e,t){var n=e.createRange();n.selectNodeContents(t),this.setRange(e,n)},e.prototype.getSelectedNodes=function(e){return this.getNodeCollection(this.getRange(e))},e.prototype.Clear=function(e){this.get(e).removeAllRanges()},e.prototype.insertParentNode=function(e,t,n){n.surroundContents(t),this.selectRange(e,n)},e.prototype.setCursorPoint=function(e,t,n){var i=e.createRange(),r=e.defaultView.getSelection();i.setStart(t,n),i.collapse(!0),r.removeAllRanges(),r.addRange(i)},e}())},function(e,t,n){"use strict";n.d(t,"r",function(){return i}),n.d(t,"s",function(){return r}),n.d(t,"t",function(){return o}),n.d(t,"i",function(){return s}),n.d(t,"g",function(){return a}),n.d(t,"h",function(){return l}),n.d(t,"v",function(){return d}),n.d(t,"o",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"q",function(){return h}),n.d(t,"x",function(){return p}),n.d(t,"w",function(){return m}),n.d(t,"u",function(){return f}),n.d(t,"m",function(){return g}),n.d(t,"p",function(){return b}),n.d(t,"b",function(){return v}),n.d(t,"l",function(){return C}),n.d(t,"c",function(){return y}),n.d(t,"k",function(){return N}),n.d(t,"j",function(){return S}),n.d(t,"a",function(){return E}),n.d(t,"n",function(){return T}),n.d(t,"e",function(){return O}),n.d(t,"d",function(){return w});var i="e-imgright",r="e-imgleft",o="e-imgcenter",s="e-video-right",a="e-video-left",l="e-video-center",d="e-imgbreak",c="e-audio-break",u="e-video-break",h="e-img-caption",p="e-rte-img-caption",m="e-caption-inline",f="e-imginline",g="e-audio-inline",b="e-clickelem",v="e-video-clickelem",C="e-rte-audio",y="e-rte-video",N="e-audio-wrap",S="e-video-wrap",E="e-embed-video-wrap",T="e-audio-focus",O="e-video-focus",w="e-video-inline"},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(){}return e.prototype.getFormattedNode=function(e,t,n){var i=this.getFormatParent(e,t,n);return null!==i&&i!==n?i:null},e.prototype.getFormatParent=function(e,t,n){do{e=e.parentNode}while(e&&e!==n&&!this.isFormattedNode(e,t));return e},e.prototype.isFormattedNode=function(t,n){switch(n){case"bold":return e.isBold(t);case"italic":return e.isItalic(t);case"underline":return e.isUnderline(t);case"strikethrough":return e.isStrikethrough(t);case"superscript":return e.isSuperscript(t);case"subscript":return e.isSubscript(t);case"fontcolor":return this.isFontColor(t);case"fontname":return this.isFontName(t);case"fontsize":return this.isFontSize(t);case"backgroundcolor":return this.isBackgroundColor(t);default:return!1}},e.isBold=function(e){return-1!==["strong","b"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"bold"!==e.style.fontWeight)},e.isItalic=function(e){return-1!==["em","i"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"italic"!==e.style.fontStyle)},e.isUnderline=function(e){return-1!==["u"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"underline"!==e.style.textDecoration&&"underline"!==e.style.textDecorationLine)},e.isStrikethrough=function(e){return-1!==["del","strike"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"line-through"!==e.style.textDecoration&&"line-through"!==e.style.textDecorationLine)},e.isSuperscript=function(e){return-1!==["sup"].indexOf(e.nodeName.toLowerCase())},e.isSubscript=function(e){return-1!==["sub"].indexOf(e.nodeName.toLowerCase())},e.prototype.isFontColor=function(t){var n=t.style&&t.style.color;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.prototype.isBackgroundColor=function(t){var n=t.style&&t.style.backgroundColor;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.prototype.isFontSize=function(t){var n=t.style&&t.style.fontSize;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.prototype.isFontName=function(t){var n=t.style&&t.style.fontFamily;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.inlineTags=["a","abbr","acronym","b","bdo","big","cite","code","dfn","em","font","i","kbd","label","q","samp","small","span","strong","sub","sup","tt","u","var","del"],e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(){}return e.prototype.getLineNumber=function(e,t){return e.value.substr(0,t).split("\n").length},e.prototype.getSelectedText=function(e){var t=e.selectionStart,n=e.selectionEnd;return e.value.substring(t,n)},e.prototype.getAllParents=function(e){return e.split("\n")},e.prototype.getSelectedLine=function(e){return this.getAllParents(e.value)[this.getLineNumber(e,e.selectionStart)-1]},e.prototype.getLine=function(e,t){return this.getAllParents(e.value)[t]},e.prototype.getSelectedParentPoints=function(e){var t=this.getAllParents(e.value),n=this.getLineNumber(e,e.selectionStart),i=this.getLineNumber(e,e.selectionEnd),r=this.getSelectedText(e).split("\n"),o=[],s=t[n-1],a=t.slice(0,n-1).join("").length,l={};if(l.line=n-1,l.start=a+l.line,l.end=""!==s?l.start+s.length+1:l.start+s.length,l.text=s,o.push(l),r.length>1){for(var d=1;d<r.length-1;d++){var c={};c.line=o[d-1].line+1,c.start=(r[d],o[d-1].end),c.end=c.start+r[d].length+1,c.text=r[d],o.push(c)}var u={};u.line=o[o.length-1].line+1,u.start=o[o.length-1].end,u.end=u.start+t[i-1].length+1,u.text=t[i-1],o.push(u)}return o},e.prototype.setSelection=function(e,t,n){e.setSelectionRange(t,n),e.focus()},e.prototype.save=function(e,t){this.selectionStart=e,this.selectionEnd=t},e.prototype.restore=function(e){this.setSelection(e,this.selectionStart,this.selectionEnd)},e.prototype.isStartWith=function(e,t){var n=!1;if(e){n=(e.trim()===t.trim()?new RegExp("^("+this.replaceSpecialChar(t.trim())+")","gim"):new RegExp("^("+this.replaceSpecialChar(t)+")","gim")).test(e.trim())}return n},e.prototype.replaceSpecialChar=function(e){return e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/g,"\\$&")},e.prototype.isClear=function(e,t){for(var n=0;n<e.length;n++)if(new RegExp(t,"gim").test(e[n].text))return!0;return!1},e.prototype.getSelectedInlinePoints=function(e){return{start:e.selectionStart,end:e.selectionEnd,text:this.getSelectedText(e)}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(5),r=n(2),o=n(1),s=n(4),a=n(17),l=n(0),d=(n.n(l),function(){function e(e,t){this.tools={},this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?n.i(l.extend)(this.tools,a.v,n.i(s.o)(this.parent.toolbarSettings.itemConfigs),!0):this.tools=a.v}return e.prototype.addEventListener=function(){this.parent.on(o._38,this.setRtl,this),this.parent.on(o._89,this.setCssClass,this),this.parent.on(o.i,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off(o._38,this.setRtl),this.parent.off(o._89,this.setCssClass),this.parent.off(o.i,this.removeEventListener)},e.prototype.setCssClass=function(e){n.i(l.isNullOrUndefined)(this.toolbarObj)||(n.i(l.isNullOrUndefined)(e.oldCssClass)?this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass+" "+e.cssClass).trim()}):this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass.replace(e.oldCssClass,"").trim()+" "+e.cssClass).trim()}))},e.prototype.setRtl=function(e){n.i(l.isNullOrUndefined)(this.toolbarObj)||this.toolbarObj.setProperties({enableRtl:e.enableRtl})},e.prototype.getClass=function(e){var t;switch(e){case"fontsize":t="e-rte-inline-size-template";break;case"fontcolor":case"backgroundcolor":t="e-rte-inline-color-template";break;default:t="e-rte-inline-template"}return t},e.prototype.getTemplateObject=function(e,t){var i;switch(e){case"fontcolor":case"backgroundcolor":case"numberformatlist":case"bulletformatlist":i="span";break;default:i="button"}return{command:this.tools[e.toLocaleLowerCase()].command,subCommand:this.tools[e.toLocaleLowerCase()].subCommand,template:this.parent.createElement(i,{id:this.parent.getID()+"_"+t+"_"+this.tools[e.toLocaleLowerCase()].id}).outerHTML,cssClass:this.parent.inlineMode.enable?this.getClass(e):"",tooltipText:n.i(s.g)(e,this.locator)}},e.prototype.getObject=function(e,t){var i=e.toLowerCase();if(-1!==a.l.indexOf(i))return this.getTemplateObject(i,t);switch(i){case"|":return{type:"Separator"};case"-":return{type:"Separator",cssClass:r._14};default:return this.parent.showTooltip?{id:this.parent.getID()+"_"+t+"_"+this.tools[i.toLocaleLowerCase()].id,prefixIcon:this.tools[i.toLocaleLowerCase()].icon,tooltipText:n.i(s.g)(i,this.locator),command:this.tools[i.toLocaleLowerCase()].command,subCommand:this.tools[i.toLocaleLowerCase()].subCommand}:{id:this.parent.getID()+"_"+t+"_"+this.tools[i.toLocaleLowerCase()].id,prefixIcon:this.tools[i.toLocaleLowerCase()].icon,command:this.tools[i.toLocaleLowerCase()].command,subCommand:this.tools[i.toLocaleLowerCase()].subCommand}}},e.prototype.getItems=function(e,t){var i=this;if(this.parent.toolbarSettings.items.length<1)return[];for(var r=[],o=this,d=0,c=e;d<c.length;d++){var u=c[d];!function(e){switch(typeof e){case"string":r.push(o.getObject(e,t));break;default:if(!n.i(l.isNullOrUndefined)(e.click)){var s=e,a=s.click;s.click=function(){s.undo&&0===i.parent.formatter.getUndoRedoStack().length&&i.parent.formatter.saveData(),a.call(i);var e=i.parent.createElement("div");e.appendChild(i.parent.formatter.getUndoRedoStack()[i.parent.formatter.getUndoRedoStack().length-1].text),e.innerHTML.trim()!==i.parent.inputElement.innerHTML.trim()&&s.undo&&i.parent.formatter.saveData()}}r.push(e)}}(u)}for(var h=0;h<r.length;h++){var p=r[h].tooltipText,m=void 0;m=a.w[""+p]?l.Browser.isDevice&&n.i(s.d)()?a.w[""+p].replace("Ctrl","Cmd"):a.w[""+p]:p,m&&(r[h].tooltipText=p!==m?p+" ("+m+")":p)}return r},e.prototype.getToolbarOptions=function(e){return{target:e.target,rteToolbarObj:this,items:this.getItems(e.items,e.container),overflowMode:e.mode,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,cssClass:e.cssClass}},e.prototype.render=function(e){this.toolbarRenderer=this.renderFactory.getRenderer(i.a.Toolbar),this.toolbarRenderer.renderToolbar(this.getToolbarOptions(e))},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return d}),n.d(t,"f",function(){return c}),n.d(t,"g",function(){return u}),n.d(t,"h",function(){return h}),n.d(t,"j",function(){return p}),n.d(t,"i",function(){return m}),n.d(t,"b",function(){return f}),n.d(t,"d",function(){return g}),n.d(t,"e",function(){return b}),n.d(t,"c",function(){return v}),n.d(t,"n",function(){return C}),n.d(t,"o",function(){return y}),n.d(t,"k",function(){return N}),n.d(t,"p",function(){return S}),n.d(t,"q",function(){return E}),n.d(t,"l",function(){return T}),n.d(t,"m",function(){return O});var i=n(0),r=(n.n(i),n(13)),o=(n.n(r),n(5)),s=n(17),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(!0)],t.prototype,"enable",void 0),l([n.i(i.Property)(!0)],t.prototype,"enableFloating",void 0),l([n.i(i.Property)(o.b.Expand)],t.prototype,"type",void 0),l([n.i(i.Property)(s.f)],t.prototype,"items",void 0),l([n.i(i.Property)({})],t.prototype,"itemConfigs",void 0),t}(i.ChildProperty),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)([".jpeg",".jpg",".png"])],t.prototype,"allowedTypes",void 0),l([n.i(i.Property)("inline")],t.prototype,"display",void 0),l([n.i(i.Property)("Blob")],t.prototype,"saveFormat",void 0),l([n.i(i.Property)("auto")],t.prototype,"width",void 0),l([n.i(i.Property)("auto")],t.prototype,"height",void 0),l([n.i(i.Property)(null)],t.prototype,"saveUrl",void 0),l([n.i(i.Property)(null)],t.prototype,"path",void 0),l([n.i(i.Property)(!0)],t.prototype,"resize",void 0),l([n.i(i.Property)(null)],t.prototype,"removeUrl",void 0),l([n.i(i.Property)(0)],t.prototype,"minWidth",void 0),l([n.i(i.Property)(null)],t.prototype,"maxWidth",void 0),l([n.i(i.Property)(0)],t.prototype,"minHeight",void 0),l([n.i(i.Property)(null)],t.prototype,"maxHeight",void 0),l([n.i(i.Property)(!1)],t.prototype,"resizeByPercent",void 0),t}(i.ChildProperty),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)([".wav",".mp3",".m4a",".wma"])],t.prototype,"allowedTypes",void 0),l([n.i(i.Property)("Inline")],t.prototype,"layoutOption",void 0),l([n.i(i.Property)("Blob")],t.prototype,"saveFormat",void 0),l([n.i(i.Property)(null)],t.prototype,"saveUrl",void 0),l([n.i(i.Property)(null)],t.prototype,"removeUrl",void 0),l([n.i(i.Property)(null)],t.prototype,"path",void 0),t}(i.ChildProperty),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)([".mp4",".mov",".wmv",".avi"])],t.prototype,"allowedTypes",void 0),l([n.i(i.Property)("Inline")],t.prototype,"layoutOption",void 0),l([n.i(i.Property)("Blob")],t.prototype,"saveFormat",void 0),l([n.i(i.Property)("auto")],t.prototype,"width",void 0),l([n.i(i.Property)("auto")],t.prototype,"height",void 0),l([n.i(i.Property)(null)],t.prototype,"saveUrl",void 0),l([n.i(i.Property)(null)],t.prototype,"path",void 0),l([n.i(i.Property)(!0)],t.prototype,"resize",void 0),l([n.i(i.Property)(null)],t.prototype,"removeUrl",void 0),l([n.i(i.Property)(0)],t.prototype,"minWidth",void 0),l([n.i(i.Property)(null)],t.prototype,"maxWidth",void 0),l([n.i(i.Property)(0)],t.prototype,"minHeight",void 0),l([n.i(i.Property)(null)],t.prototype,"maxHeight",void 0),l([n.i(i.Property)(!1)],t.prototype,"resizeByPercent",void 0),t}(i.ChildProperty),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Event)()],t.prototype,"beforeSend",void 0),l([n.i(i.Complex)({getImageUrl:null,url:null,uploadUrl:null},r.AjaxSettings)],t.prototype,"ajaxSettings",void 0),l([n.i(i.Property)(!1)],t.prototype,"allowDragAndDrop",void 0),l([n.i(i.Complex)({visible:!0,file:["Open","|","Cut","Copy","|","Delete","Rename","|","Details"],folder:["Open","|","Cut","Copy","Paste","|","Delete","Rename","|","Details"],layout:["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"]},r.ContextMenuSettings)],t.prototype,"contextMenuSettings",void 0),l([n.i(i.Property)("")],t.prototype,"cssClass",void 0),l([n.i(i.Complex)({},r.DetailsViewSettings)],t.prototype,"detailsViewSettings",void 0),l([n.i(i.Property)(!1)],t.prototype,"enable",void 0),l([n.i(i.Complex)({maxWidth:"650px",minWidth:"240px",visible:!0},r.NavigationPaneSettings)],t.prototype,"navigationPaneSettings",void 0),l([n.i(i.Property)("/")],t.prototype,"path",void 0),l([n.i(i.Property)(null)],t.prototype,"rootAliasName",void 0),l([n.i(i.Complex)({},r.SearchSettings)],t.prototype,"searchSettings",void 0),l([n.i(i.Property)(!0)],t.prototype,"showFileExtension",void 0),l([n.i(i.Property)(!1)],t.prototype,"showHiddenItems",void 0),l([n.i(i.Property)(!0)],t.prototype,"showThumbnail",void 0),l([n.i(i.Property)("Ascending")],t.prototype,"sortOrder",void 0),l([n.i(i.Complex)({visible:!0,items:["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"]},r.ToolbarSettings)],t.prototype,"toolbarSettings",void 0),l([n.i(i.Complex)({autoUpload:!0,minFileSize:0,maxFileSize:3e7,allowedExtensions:"",autoClose:!1},r.UploadSettings)],t.prototype,"uploadSettings",void 0),l([n.i(i.Property)("LargeIcons")],t.prototype,"view",void 0),t}(i.ChildProperty),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)("100%")],t.prototype,"width",void 0),l([n.i(i.Property)(s.g)],t.prototype,"styles",void 0),l([n.i(i.Property)(!0)],t.prototype,"resize",void 0),l([n.i(i.Property)(0)],t.prototype,"minWidth",void 0),l([n.i(i.Property)(null)],t.prototype,"maxWidth",void 0),t}(i.ChildProperty),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(!0)],t.prototype,"enable",void 0),l([n.i(i.Property)(!1)],t.prototype,"showOnRightClick",void 0),l([n.i(i.Property)("hide")],t.prototype,"actionOnScroll",void 0),l([n.i(i.Property)(["Open","Edit","UnLink"])],t.prototype,"link",void 0),l([n.i(i.Property)(["Replace","Align","Caption","Remove","-","InsertLink","OpenImageLink","EditImageLink","RemoveImageLink","Display","AltText","Dimension"])],t.prototype,"image",void 0),l([n.i(i.Property)(["AudioReplace","AudioRemove","AudioLayoutOption"])],t.prototype,"audio",void 0),l([n.i(i.Property)(["VideoReplace","VideoAlign","VideoRemove","VideoLayoutOption","VideoDimension"])],t.prototype,"video",void 0),l([n.i(i.Property)(null)],t.prototype,"text",void 0),l([n.i(i.Property)(["TableHeader","TableRows","TableColumns","BackgroundColor","-","TableRemove","Alignments","TableCellVerticalAlign","Styles"])],t.prototype,"table",void 0),t}(i.ChildProperty),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)("b; em; font; sub; sup; kbd; i; s; u; code; strong; span; p; div; h1; h2; h3; h4; h5; h6; blockquote; ol; ul; li; pre;")],t.prototype,"allowedFormats",void 0),l([n.i(i.Property)(null)],t.prototype,"deniedFormats",void 0),t}(i.ChildProperty),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(s.h)],t.prototype,"iconsSet",void 0),l([n.i(i.Property)(!0)],t.prototype,"showSearchBox",void 0),t}(i.ChildProperty),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(!1)],t.prototype,"prompt",void 0),l([n.i(i.Property)(null)],t.prototype,"deniedAttrs",void 0),l([n.i(i.Property)(["background","background-color","border","border-bottom","border-left","border-radius","border-right","border-style","border-top","border-width","clear","color","cursor","direction","display","float","font","font-family","font-size","font-weight","font-style","height","left","line-height","list-style-type","margin","margin-top","margin-left","margin-right","margin-bottom","max-height","max-width","min-height","min-width","overflow","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","position","right","table-layout","text-align","text-decoration","text-indent","top","vertical-align","visibility","white-space","width"])],t.prototype,"allowedStyleProps",void 0),l([n.i(i.Property)(null)],t.prototype,"deniedTags",void 0),l([n.i(i.Property)(!0)],t.prototype,"keepFormat",void 0),l([n.i(i.Property)(!1)],t.prototype,"plainText",void 0),t}(i.ChildProperty),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(null)],t.prototype,"default",void 0),l([n.i(i.Property)("65px")],t.prototype,"width",void 0),l([n.i(i.Property)(s.b)],t.prototype,"items",void 0),t}(i.ChildProperty),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(null)],t.prototype,"default",void 0),l([n.i(i.Property)("35px")],t.prototype,"width",void 0),l([n.i(i.Property)(s.i)],t.prototype,"items",void 0),t}(i.ChildProperty),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(null)],t.prototype,"default",void 0),l([n.i(i.Property)("65px")],t.prototype,"width",void 0),l([n.i(i.Property)(s.c)],t.prototype,"types",void 0),t}(i.ChildProperty),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)("#ff0000")],t.prototype,"default",void 0),l([n.i(i.Property)("Palette")],t.prototype,"mode",void 0),l([n.i(i.Property)(10)],t.prototype,"columns",void 0),l([n.i(i.Property)(s.j)],t.prototype,"colorCode",void 0),l([n.i(i.Property)(!1)],t.prototype,"modeSwitcher",void 0),t}(i.ChildProperty),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)("#ffff00")],t.prototype,"default",void 0),l([n.i(i.Property)("Palette")],t.prototype,"mode",void 0),l([n.i(i.Property)(10)],t.prototype,"columns",void 0),l([n.i(i.Property)(s.k)],t.prototype,"colorCode",void 0),l([n.i(i.Property)(!1)],t.prototype,"modeSwitcher",void 0),t}(i.ChildProperty),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(s.d)],t.prototype,"types",void 0),t}(i.ChildProperty),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(s.e)],t.prototype,"types",void 0),t}(i.ChildProperty)},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(0),r=(n.n(i),n(5)),o=n(1),s=n(2),a=n(4),l=n(17),d=function(){function e(e,t){this.tools={},this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?n.i(i.extend)(this.tools,l.v,n.i(a.o)(this.parent.toolbarSettings.itemConfigs),!0):this.tools=l.v}return e.prototype.initializeInstance=function(){this.toolbarRenderer=this.renderFactory.getRenderer(r.a.Toolbar)},e.prototype.renderColorPickerInput=function(e){var t=this;this.initializeInstance();var r,o,d=e.containerType,c=e.container;l.l.forEach(function(l){if(-1!==n.i(a.a)(l,e.items))switch(l){case"fontcolor":r=t.parent.getID()+"_"+d+"_FontColor_Target";var u=t.parent.createElement("input");if(u.id=r,u.classList.add(s._23),!n.i(i.isNullOrUndefined)(t.parent.cssClass))for(var h=t.parent.cssClass.split(" "),p=0;p<h.length;p++)""!==h[p].trim()&&u.classList.add(h[p]);document.body.appendChild(u),o={cssClass:t.tools[l.toLocaleLowerCase()].icon+" "+s._12+" "+s._9+t.parent.getCssClass(!0),value:t.tools[l.toLocaleLowerCase()].value,command:t.tools[l.toLocaleLowerCase()].command,subCommand:t.tools[l.toLocaleLowerCase()].subCommand,element:n.i(i.select)("#"+t.parent.getID()+"_"+d+"_FontColor",c),target:r},t.fontColorPicker=t.toolbarRenderer.renderColorPicker(o,"fontcolor"),t.fontColorDropDown=t.toolbarRenderer.renderColorPickerDropDown(o,"fontcolor",t.fontColorPicker);break;case"backgroundcolor":r=t.parent.getID()+"_"+d+"_BackgroundColor_Target";var m=t.parent.createElement("input");if(m.id=r,m.classList.add(s._24),!n.i(i.isNullOrUndefined)(t.parent.cssClass))for(var h=t.parent.cssClass.split(" "),p=0;p<h.length;p++)""!==h[p].trim()&&m.classList.add(h[p]);document.body.appendChild(m),o={cssClass:t.tools[l.toLocaleLowerCase()].icon+" "+s._12+" "+s._9+t.parent.getCssClass(!0),value:t.tools[l.toLocaleLowerCase()].value,command:t.tools[l.toLocaleLowerCase()].command,subCommand:t.tools[l.toLocaleLowerCase()].subCommand,element:n.i(i.select)("#"+t.parent.getID()+"_"+d+"_BackgroundColor",c),target:r},t.backgroundColorPicker=t.toolbarRenderer.renderColorPicker(o,"backgroundcolor"),t.backgroundColorDropDown=t.toolbarRenderer.renderColorPickerDropDown(o,"backgroundcolor",t.backgroundColorPicker,t.defaultColorPicker)}}),this.parent.inlineMode.enable&&this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.destroy=function(){this.removeEventListener(),this.destroyColorPicker()},e.prototype.destroyColorPicker=function(){if(this.fontColorPicker&&!this.fontColorPicker.isDestroyed&&this.fontColorPicker.destroy(),this.backgroundColorPicker&&!this.backgroundColorPicker.isDestroyed&&this.backgroundColorPicker.destroy(),this.fontColorDropDown&&!this.fontColorDropDown.isDestroyed){var e=this.fontColorDropDown.element.querySelector(".e-rte-color-content");e&&n.i(i.detach)(e),this.fontColorDropDown.destroy()}if(this.backgroundColorDropDown&&!this.backgroundColorDropDown.isDestroyed){var e=this.backgroundColorDropDown.element.querySelector(".e-rte-color-content");e&&(this.defaultColorPicker=e.children[0].style.borderBottomColor,n.i(i.detach)(e)),this.backgroundColorDropDown.destroy()}},e.prototype.setRtl=function(e){this.fontColorPicker&&(this.fontColorPicker.setProperties({enableRtl:e.enableRtl}),this.fontColorDropDown.setProperties({enableRtl:e.enableRtl})),this.backgroundColorPicker&&(this.backgroundColorPicker.setProperties({enableRtl:e.enableRtl}),this.backgroundColorDropDown.setProperties({enableRtl:e.enableRtl}))},e.prototype.setCssClass=function(e){this.updateCss(this.fontColorPicker,this.fontColorDropDown,e),this.updateCss(this.backgroundColorPicker,this.backgroundColorDropDown,e)},e.prototype.updateCss=function(e,t,r){e&&r.cssClass&&(n.i(i.isNullOrUndefined)(r.oldCssClass)?(e.setProperties({cssClass:(e.cssClass+" "+r.cssClass).trim()}),t.setProperties({cssClass:(t.cssClass+" "+r.cssClass).trim()})):(e.setProperties({cssClass:(e.cssClass.replace(r.oldCssClass,"").replace(" "," ").trim()+" "+r.cssClass).trim()}),t.setProperties({cssClass:(t.cssClass.replace(r.oldCssClass,"").replace(" "," ").trim()+" "+r.cssClass).trim()})))},e.prototype.addEventListener=function(){this.parent.on(o.y,this.renderColorPickerInput,this),this.parent.on(o._38,this.setRtl,this),this.parent.on(o.i,this.destroy,this),this.parent.on(o.r,this.destroyColorPicker,this),this.parent.on(o.s,this.onPropertyChanged,this),this.parent.on(o._89,this.setCssClass,this)},e.prototype.onPropertyChanged=function(e){for(var t,n=e.newProp,i=0,r=Object.keys(n);i<r.length;i++){switch(r[i]){case"fontColor":if(this.fontColorPicker)for(var o=0,s=Object.keys(n.fontColor);o<s.length;o++){var a=s[o];switch(a){case"default":this.fontColorPicker.setProperties({value:n.fontColor.default}),t=this.fontColorDropDown.element;var l=t.querySelector("."+this.tools.fontcolor.icon);l.style.borderBottomColor=n.fontColor.default;break;case"mode":this.fontColorPicker.setProperties({mode:n.fontColor.mode});break;case"columns":this.fontColorPicker.setProperties({columns:n.fontColor.columns});break;case"colorCode":this.fontColorPicker.setProperties({presetColors:n.fontColor.colorCode});break;case"modeSwitcher":this.fontColorPicker.setProperties({modeSwitcher:n.fontColor.modeSwitcher})}}break;case"backgroundColor":if(this.backgroundColorPicker)for(var d=0,c=Object.keys(n.backgroundColor);d<c.length;d++){var u=c[d];switch(u){case"default":this.backgroundColorPicker.setProperties({value:n.backgroundColor.default}),t=this.backgroundColorDropDown.element;var h=t.querySelector("."+this.tools.backgroundcolor.icon);h.style.borderBottomColor=n.backgroundColor.default;break;case"mode":this.backgroundColorPicker.setProperties({mode:n.backgroundColor.mode});break;case"columns":this.backgroundColorPicker.setProperties({columns:n.backgroundColor.columns});break;case"colorCode":this.backgroundColorPicker.setProperties({presetColors:n.backgroundColor.colorCode});break;case"modeSwitcher":this.backgroundColorPicker.setProperties({modeSwitcher:n.backgroundColor.modeSwitcher})}}}}},e.prototype.removeEventListener=function(){this.parent.off(o.y,this.renderColorPickerInput),this.parent.off(o.i,this.destroy),this.parent.off(o._38,this.setRtl),this.parent.off(o.r,this.destroyColorPicker),this.parent.off(o.s,this.onPropertyChanged),this.parent.off(o._89,this.setCssClass)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(0),r=(n.n(i),n(5)),o=n(4),s=n(1),a=n(2),l=n(17),d=function(){function e(e,t){this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener()}return e.prototype.initializeInstance=function(){this.toolbarRenderer=this.renderFactory.getRenderer(r.a.Toolbar)},e.prototype.beforeRender=function(e){var t=e.item;t.cssClass&&n.i(i.addClass)([e.element],t.cssClass),"Alignments"!==t.command&&"JustifyLeft"!==t.subCommand&&"JustifyRight"!==t.subCommand&&"JustifyCenter"!==t.subCommand||e.element.setAttribute("title",n.i(o.g)(t.subCommand.toLocaleLowerCase(),this.locator))},e.prototype.dropdownContent=function(e,t,n){return'<span style="display: inline-flex;width:'+("quick"===t?"auto":e)+'" ><span class="e-rte-dropdown-btn-text">'+n+"</span></span>"},e.prototype.renderDropDowns=function(e){var t=this;this.initializeInstance();var r=e.containerType,s=e.container;l.l.forEach(function(d){var c=void 0;if(-1!==n.i(o.a)(d,e.items))switch(d){case"numberformatlist":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_NumberFormatList",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;var u=t.parent.numberFormatList.types.slice();u.forEach(function(e){Object.defineProperties(e,{command:{value:"Lists",enumerable:!0},subCommand:{value:"NumberFormatList",enumerable:!0}})}),t.numberFormatListDropDown=t.toolbarRenderer.renderListDropDown({cssClass:"e-order-list "+a._12+" "+a._9,itemName:"NumberFormatList",items:u,element:c});break;case"bulletformatlist":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_BulletFormatList",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;var h=t.parent.bulletFormatList.types.slice();h.forEach(function(e){Object.defineProperties(e,{command:{value:"Lists",enumerable:!0},subCommand:{value:"BulletFormatList",enumerable:!0}})}),t.bulletFormatListDropDown=t.toolbarRenderer.renderListDropDown({cssClass:"e-unorder-list "+a._12+" "+a._9,itemName:"BulletFormatList",items:h,element:c});break;case"formats":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_Formats",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;var p=t.parent.format.types.slice();p.forEach(function(e){Object.defineProperties(e,{command:{value:"Formats",enumerable:!0},subCommand:{value:e.value,enumerable:!0}})});var m=n.i(i.isNullOrUndefined)(t.parent.format.default)?p[0].text:t.parent.format.default;t.formatDropDown=t.toolbarRenderer.renderDropDownButton({iconCss:"quick"===r?"e-formats e-icons":"",content:t.dropdownContent(t.parent.format.width,r,"quick"===r?"":n.i(o.c)(p,m,"text","text")),cssClass:a.y+" "+a.A+" "+a._19,itemName:"Formats",items:p,element:c});break;case"fontname":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_FontName",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;var f=t.parent.fontFamily.items.slice();f.forEach(function(e){Object.defineProperties(e,{command:{value:"Font",enumerable:!0},subCommand:{value:"FontName",enumerable:!0}})});var g=n.i(i.isNullOrUndefined)(t.parent.fontFamily.default)?f[0].text:t.parent.fontFamily.default;t.fontNameDropDown=t.toolbarRenderer.renderDropDownButton({iconCss:"quick"===r?"e-font-name e-icons":"",content:t.dropdownContent(t.parent.fontFamily.width,r,"quick"===r?"":n.i(o.c)(f,g,"text","text")),cssClass:a.y+" "+a.A+" "+a._20,itemName:"FontName",items:f,element:c}),n.i(i.isNullOrUndefined)(t.parent.fontFamily.default)||(t.getEditNode().style.fontFamily=t.parent.fontFamily.default);break;case"fontsize":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_FontSize",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;var b=t.parent.fontSize.items.slice();b.forEach(function(e){Object.defineProperties(e,{command:{value:"Font",enumerable:!0},subCommand:{value:"FontSize",enumerable:!0}})});var v=n.i(i.isNullOrUndefined)(t.parent.fontSize.default)?b[1].text:t.parent.fontSize.default;t.fontSizeDropDown=t.toolbarRenderer.renderDropDownButton({content:t.dropdownContent(t.parent.fontSize.width,r,n.i(o.e)(n.i(o.c)(b,v.replace(/\s/g,""),"value","text"))),cssClass:a.y+" "+a.A+" "+a._21,itemName:"FontSize",items:b,element:c}),n.i(i.isNullOrUndefined)(t.parent.fontSize.default)||(t.getEditNode().style.fontSize=t.parent.fontSize.default);break;case"alignments":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_Alignments",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;t.alignDropDown=t.toolbarRenderer.renderDropDownButton({iconCss:"e-justify-left e-icons",cssClass:a.y+" "+a.A+" "+a._22,itemName:"Alignments",items:l.a,element:c});break;case"align":case"videoalign":t.renderAlignmentDropDown(r,s,c,d);break;case"display":case"audiolayoutoption":case"videolayoutoption":t.renderDisplayDropDown(r,s,c,d);break;case"tablerows":t.rowDropDown(r,s,c);break;case"tablecolumns":t.columnDropDown(r,s,c);break;case"tablecell":t.cellDropDown(r,s,c);break;case"tablecellverticalalign":t.verticalAlignDropDown(r,s,c);break;case"styles":t.tableStylesDropDown(r,s,c)}}),this.parent.inlineMode.enable&&this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.getUpdateItems=function(e,t){var n=e.slice();return n.forEach(function(e){Object.defineProperties(e,{command:{value:"Format"===t?"Formats":"Font",enumerable:!0},subCommand:{value:"Format"===t?e.value:t,enumerable:!0}})}),n},e.prototype.onPropertyChanged=function(e){for(var t,r,s=e.newProp,l=0,d=Object.keys(s);l<d.length;l++){switch(d[l]){case"fontFamily":if(this.fontNameDropDown)for(var c=0,u=Object.keys(s.fontFamily);c<u.length;c++){var h=u[c];switch(h){case"default":case"width":var p=this.fontNameDropDown.items;t=n.i(i.isNullOrUndefined)(n.i(i.closest)(this.fontNameDropDown.element,"."+a.o))?"toolbar":"quick";var m=n.i(i.isNullOrUndefined)(this.parent.fontFamily.default)?p[0].text:this.parent.fontFamily.default;r=this.dropdownContent(this.parent.fontFamily.width,t,"quick"===t?"":n.i(o.c)(p,m,"text","text")),this.fontNameDropDown.setProperties({content:r}),n.i(i.isNullOrUndefined)(this.parent.fontFamily.default)?this.getEditNode().style.removeProperty("font-family"):this.getEditNode().style.fontFamily=this.parent.fontFamily.default;break;case"items":this.fontNameDropDown.setProperties({items:this.getUpdateItems(s.fontFamily.items,"FontName")})}}break;case"fontSize":if(this.fontSizeDropDown)for(var f=0,g=Object.keys(s.fontSize);f<g.length;f++){var b=g[f];switch(b){case"default":case"width":var v=this.fontSizeDropDown.items;t=n.i(i.isNullOrUndefined)(n.i(i.closest)(this.fontSizeDropDown.element,"."+a.o))?"toolbar":"quick";var C=n.i(i.isNullOrUndefined)(this.parent.fontSize.default)?v[1].text:this.parent.fontSize.default;r=this.dropdownContent(this.parent.fontSize.width,t,n.i(o.e)(n.i(o.c)(v,C.replace(/\s/g,""),"value","text"))),this.fontSizeDropDown.setProperties({content:r}),n.i(i.isNullOrUndefined)(this.parent.fontSize.default)?this.getEditNode().style.removeProperty("font-size"):this.getEditNode().style.fontSize=this.parent.fontSize.default;break;case"items":this.fontSizeDropDown.setProperties({items:this.getUpdateItems(s.fontSize.items,"FontSize")})}}break;case"format":if(this.formatDropDown)for(var y=0,N=Object.keys(s.format);y<N.length;y++){var S=N[y];switch(S){case"default":case"width":var E=this.formatDropDown.items;t=n.i(i.isNullOrUndefined)(n.i(i.closest)(this.formatDropDown.element,"."+a.o))?"toolbar":"quick";var T=n.i(i.isNullOrUndefined)(this.parent.format.default)?E[0].text:this.parent.format.default;r=this.dropdownContent(this.parent.format.width,t,"quick"===t?"":n.i(o.c)(E,T,"text","text")),this.formatDropDown.setProperties({content:r});break;case"types":this.formatDropDown.setProperties({items:this.getUpdateItems(s.format.types,"Format")})}}}}},e.prototype.getEditNode=function(){return this.parent.contentModule.getEditPanel()},e.prototype.rowDropDown=function(e,t,r){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+"_TableRows",t),r.classList.contains(a.B)||(this.tableRowsDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-rows e-icons",cssClass:a.y+" "+a.A+" "+a.t,itemName:"TableRows",items:l.m,element:r}))},e.prototype.columnDropDown=function(e,t,r){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+"_TableColumns",t),r.classList.contains(a.B)||(this.tableColumnsDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-columns e-icons",cssClass:a.y+" "+a.A+" "+a.t,itemName:"TableColumns",items:l.n,element:r}))},e.prototype.cellDropDown=function(e,t,r){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+"_TableCell",t),r.classList.contains(a.B)||(this.tableRowsDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-cell e-icons",cssClass:a.y+" "+a.A+" "+a.t,itemName:"TableCell",items:l.o,element:r}))},e.prototype.verticalAlignDropDown=function(e,t,r){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+"_TableCellVerticalAlign",t),r.classList.contains(a.B)||(this.tableCellVerticalAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-cell-ver-align e-icons",cssClass:a.y+" "+a.A+" "+a.t,itemName:"TableCellVerticalAlign",items:l.p,element:r}))},e.prototype.renderDisplayDropDown=function(e,t,r,o){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+("display"===o?"_Display":"videolayoutoption"===o?"_VideoLayoutOption":"_AudioLayoutOption"),t),r.classList.contains(a.B)||(this.displayDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"display"===o?"e-display e-icons":"videolayoutoption"===o?"e-video-display e-icons":"e-audio-display e-icons",cssClass:a.y+" "+a.A+" "+a.t,itemName:"display"===o?"Display":"videolayoutoption"===o?"VideoLayoutOption":"AudioLayoutOption",items:"display"===o?l.q:"videolayoutoption"===o?l.r:l.s,element:r}))},e.prototype.renderAlignmentDropDown=function(e,t,r,o){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+("align"===o?"_Align":"_VideoAlign"),t),r.classList.contains(a.B)||(this.imageAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-justify-left e-icons",cssClass:a.y+" "+a.z+" "+a.t,itemName:"align"===o?"Align":"VideoAlign",items:"align"===o?l.t:l.u,element:r}))},e.prototype.tableStylesDropDown=function(e,t,r){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+"_Styles",t),r.classList.contains(a.B)||(this.imageAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-style e-icons",cssClass:a.y+" "+a.z+" "+a.t,itemName:"Styles",items:this.parent.tableSettings.styles,element:r}))},e.prototype.removeDropDownClasses=function(e){n.i(i.removeClass)([e],[a.B,a.y,a.z,a.A])},e.prototype.destroyDropDowns=function(){this.formatDropDown&&(this.removeDropDownClasses(this.formatDropDown.element),this.formatDropDown.destroy()),this.fontNameDropDown&&(this.removeDropDownClasses(this.fontNameDropDown.element),this.fontNameDropDown.destroy()),this.fontSizeDropDown&&(this.removeDropDownClasses(this.fontSizeDropDown.element),this.fontSizeDropDown.destroy()),this.alignDropDown&&(this.removeDropDownClasses(this.alignDropDown.element),this.alignDropDown.destroy()),this.imageAlignDropDown&&(this.removeDropDownClasses(this.imageAlignDropDown.element),this.imageAlignDropDown.destroy()),this.displayDropDown&&(this.removeDropDownClasses(this.displayDropDown.element),this.displayDropDown.destroy()),this.tableRowsDropDown&&(this.removeDropDownClasses(this.tableRowsDropDown.element),this.tableRowsDropDown.destroy()),this.tableColumnsDropDown&&(this.removeDropDownClasses(this.tableColumnsDropDown.element),this.tableColumnsDropDown.destroy()),this.tableCellVerticalAlignDropDown&&(this.removeDropDownClasses(this.tableCellVerticalAlignDropDown.element),this.tableCellVerticalAlignDropDown.destroy()),this.numberFormatListDropDown&&(this.removeDropDownClasses(this.numberFormatListDropDown.element),this.numberFormatListDropDown.destroy()),this.bulletFormatListDropDown&&(this.removeDropDownClasses(this.bulletFormatListDropDown.element),this.bulletFormatListDropDown.destroy())},e.prototype.setRtl=function(e){this.formatDropDown&&this.formatDropDown.setProperties({enableRtl:e.enableRtl}),this.fontNameDropDown&&this.fontNameDropDown.setProperties({enableRtl:e.enableRtl}),this.fontSizeDropDown&&this.fontSizeDropDown.setProperties({enableRtl:e.enableRtl}),this.alignDropDown&&this.alignDropDown.setProperties({enableRtl:e.enableRtl}),this.imageAlignDropDown&&this.imageAlignDropDown.setProperties({enableRtl:e.enableRtl}),this.displayDropDown&&this.displayDropDown.setProperties({enableRtl:e.enableRtl}),this.numberFormatListDropDown&&this.numberFormatListDropDown.setProperties({enableRtl:e.enableRtl}),this.bulletFormatListDropDown&&this.bulletFormatListDropDown.setProperties({enableRtl:e.enableRtl})},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(i.isNullOrUndefined)(t.oldCssClass)?e.setProperties({cssClass:(e.cssClass+" "+t.cssClass).trim()}):e.setProperties({cssClass:(e.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){for(var t=[this.formatDropDown,this.fontNameDropDown,this.fontSizeDropDown,this.alignDropDown,this.imageAlignDropDown,this.displayDropDown,this.numberFormatListDropDown,this.bulletFormatListDropDown,this.tableRowsDropDown,this.tableColumnsDropDown,this.tableCellVerticalAlignDropDown],n=0;n<t.length;n++)this.updateCss(t[n],e)},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(s.C,this.beforeRender,this),this.parent.on(s.h,this.onIframeMouseDown,this),this.parent.on(s._38,this.setRtl,this),this.parent.on(s.i,this.removeEventListener,this),this.parent.on(s.s,this.onPropertyChanged,this),this.parent.on(s._89,this.setCssClass,this))},e.prototype.onIframeMouseDown=function(){this.parent.getToolbarElement().querySelectorAll('.e-rte-dropdown-btn[aria-expanded="true"]').length>0&&n.i(o.l)(document,"mousedown")},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(s.h,this.onIframeMouseDown),this.parent.off(s._38,this.setRtl),this.parent.off(s.C,this.beforeRender),this.parent.off(s.i,this.removeEventListener),this.parent.off(s.s,this.onPropertyChanged),this.parent.off(s._89,this.setCssClass))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),o=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,space:32,escape:27,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,semicolon:186,plus:187,comma:188,minus:189,dot:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222,"]":221,"[":219,"=":187},a=function(e){function t(t,n){var i=e.call(this,n,t)||this;return i.keyPressHandler=function(e){for(var t=e.altKey,n=e.ctrlKey,r=e.shiftKey,o=e.metaKey,s=e.which,l=Object.keys(i.keyConfigs),d=0,c=l;d<c.length;d++)for(var u=c[d],h=i.keyConfigs[""+u].split(","),p=0,m=h;p<m.length;p++){var f=m[p],g=a.getKeyConfigData(f.trim());t!==g.altKey||n!==g.ctrlKey&&!o||r!==g.shiftKey||s!==g.keyCode||(e.action=u)}i.keyAction&&i.keyAction(e)},i.bind(),i}r(t,e),a=t,t.prototype.destroy=function(){this.unwireEvents(),e.prototype.destroy.call(this)},t.prototype.onPropertyChanged=function(e,t){},t.prototype.bind=function(){this.wireEvents()},t.prototype.getModuleName=function(){return"keyboard"},t.prototype.wireEvents=function(){this.element.addEventListener(this.eventName,this.keyPressHandler)},t.prototype.unwireEvents=function(){this.element.removeEventListener(this.eventName,this.keyPressHandler)},t.getKeyConfigData=function(e){if(e in this.configCache)return this.configCache[""+e];var t=e.toLowerCase().split("+"),n={altKey:-1!==t.indexOf("alt"),ctrlKey:-1!==t.indexOf("ctrl"),shiftKey:-1!==t.indexOf("shift"),keyCode:null};return t[t.length-1].length>1&&Number(t[t.length-1])?n.keyCode=Number(t[t.length-1]):n.keyCode=a.getKeyCode(t[t.length-1]),a.configCache[""+e]=n,n},t.getKeyCode=function(e){return s[""+e]||e.toUpperCase().charCodeAt(0)};var a;return t.configCache={},o([n.i(i.Property)({})],t.prototype,"keyConfigs",void 0),o([n.i(i.Property)("keyup")],t.prototype,"eventName",void 0),o([n.i(i.Event)()],t.prototype,"keyAction",void 0),t=a=o([i.NotifyPropertyChanges],t)}(i.Base)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(1)),o=n(4),s=n(3),a=function(){function e(){}return e.prototype.process=function(e,t,o,a){var l,d=this,c=e.contentModule.getDocument().getSelection(),u=c.rangeCount>0?c.getRangeAt(c.rangeCount-1):null,h=!n.i(i.isNullOrUndefined)(a)&&!n.i(i.isNullOrUndefined)(a.cssClass)&&"e-video-inline"!==a.cssClass;if("HTML"===e.editorMode&&(n.i(i.isNullOrUndefined)(t)||h||(n.i(i.isNullOrUndefined)(t.name)||!n.i(i.isNullOrUndefined)(t.name)&&"showDialog"!==t.name)&&(l=this.editorManager.nodeSelection.save(u,e.contentModule.getDocument()))),n.i(i.isNullOrUndefined)(t)||!t.item.command||"Table"===t.item.command||"Actions"===t.item.command||"Links"===t.item.command||"Images"===t.item.command||"Files"===t.item.command||"Audios"===t.item.command||"Videos"===t.item.command||"EmojiPicker"===t.item.command||!u||e.contentModule.getEditPanel().contains(this.getAncestorNode(u.commonAncestorContainer))||e.contentModule.getEditPanel()===u.commonAncestorContainer||e.contentModule.getPanel()===u.commonAncestorContainer){if(!n.i(i.isNullOrUndefined)(t)&&-1!==e.maxLength&&!n.i(i.isNullOrUndefined)(t.item.command)){var p=0;"Links"===t.item.command&&(p=0===a.text.length?a.url.length:a.text.length),"Images"!==t.item.command&&"Videos"!==t.item.command&&"Table"!==t.item.command&&"Files"!==t.item.command||(p=1);var m=e.getText().trim().replace(/(\r\n|\n|\r)/gm,"").replace(/\u200B/g,"").length,f=e.getSelection().length,g=m-f+p;if(!(-1===e.maxLength||g<=e.maxLength))return}if(n.i(i.isNullOrUndefined)(t)){var b=o.action;t={};var v={originalEvent:o,cancel:!1,requestType:b||o.key+"Key",itemCollection:a};if(n.i(i.extend)(t,t,v,!0),"tab"!==b&&"enter"!==b&&"space"!==b&&"escape"!==b&&("Markdown"===e.editorMode&&"insert-table"===b&&(a={headingText:e.localeObj.getConstant("TableHeadingText"),colText:e.localeObj.getConstant("TableColText")}),e.trigger(r.S,t,function(e){e.cancel&&("paste"!==b&&"cut"!==b&&"copy"!==b||o.preventDefault())})),!t.cancel){var C=!!n.i(i.isNullOrUndefined)(e.tableModule)||!!e.tableModule&&e.tableModule.ensureInsideTableList;(9===o.which&&C||9!==o.which)&&(13===o.which&&"HTML"===e.editorMode&&(a={enterAction:e.enterKey}),this.editorManager.observer.notify("keydown"===o.type?s.a:s.g,{event:o,callBack:this.onSuccess.bind(this,e),value:a,enterAction:e.enterKey}))}}else!n.i(i.isNullOrUndefined)(t)&&t.item.command&&t.item.subCommand&&(t.item.command!==t.item.subCommand&&"Font"!==t.item.command||("FontName"===t.item.subCommand||"FontSize"===t.item.subCommand)&&"dropDownSelect"===t.name||("BackgroundColor"===t.item.subCommand||"FontColor"===t.item.subCommand)&&"colorPickerChanged"===t.name||"FormatPainter"===t.item.subCommand||"EmojiPicker"===t.item.subCommand)&&(n.i(i.extend)(t,t,{requestType:t.item.subCommand,cancel:!1,itemCollection:a,selectType:t.name},!0),e.trigger(r.S,t,function(s){if(!s.cancel){var c=!n.i(i.isNullOrUndefined)(s.requestType)&&"FormatPainter"===s.requestType&&"format-copy"===s.name,u=!n.i(i.isNullOrUndefined)(s.requestType)&&"FormatPainter"===s.requestType&&"format-paste"===s.name;(0===d.getUndoRedoStack().length&&"Links"!==s.item.command&&"Images"!==s.item.command&&!c||u)&&d.saveData(),e.isBlur=!1,e.contentModule.getEditPanel().focus(),"HTML"!==e.editorMode||h||(n.i(i.isNullOrUndefined)(t.selectType)||!n.i(i.isNullOrUndefined)(t.selectType)&&"showDialog"!==t.selectType)&&l.restore();var p=s.item.subCommand.toLocaleLowerCase();"paste"===p||"cut"===p||"copy"===p?e.clipboardAction(p,o):(d.editorManager.observer.notify(r._42,{subCommand:s.item.subCommand}),d.editorManager.execCommand(s.item.command,s.item.subCommand,o,d.onSuccess.bind(d,e),s.item.value,"Pre"===s.item.subCommand&&"dropDownSelect"===s.selectType?{name:s.selectType}:a,"#"+e.getID()+" iframe",e.enterKey))}}));(n.i(i.isNullOrUndefined)(o)||o&&"copy"!==o.action)&&this.enableUndo(e)}},e.prototype.getAncestorNode=function(e){return e=3===e.nodeType?e.parentNode:e},e.prototype.onKeyHandler=function(e,t){var n=this;this.editorManager.observer.notify(s.g,{event:t,callBack:function(){e.notify(r.f,{}),n.enableUndo(e)}})},e.prototype.onSuccess=function(e,t){e.notify(r.f,{}),t&&(n.i(i.isNullOrUndefined)(t.event)||"copy"!==t.event.action)&&(this.enableUndo(e),e.notify(r.D,t)),e.trigger(r.T,t,function(t){if(e.setPlaceHolder(),("Images"===t.requestType||"Links"===t.requestType||"Audios"===t.requestType||"Videos"===t.requestType)&&"HTML"===e.editorMode){var n=t;if("Links"===t.requestType&&t.event&&"keydown"===t.event.type&&32===t.event.keyCode)return;e.notify(r._0,{args:n.event,type:t.requestType,isNotify:!0,elements:n.elements})}"VideosPlayPause"===t.requestType&&e.notify("editAreaClick",{args:event}),e.autoResize()})},e.prototype.saveData=function(e){this.editorManager.undoRedoManager.saveData(e)},e.prototype.getUndoStatus=function(){return this.editorManager.undoRedoManager.getUndoStatus()},e.prototype.getUndoRedoStack=function(){return this.editorManager.undoRedoManager.undoRedoStack},e.prototype.enableUndo=function(e){var t=this.getUndoStatus();!e.inlineMode.enable||i.Browser.isDevice&&!n.i(o.d)()?e.toolbarModule&&n.i(o.k)(e.toolbarModule.baseToolbar,t):n.i(o.k)(e.quickToolbarModule.inlineQTBar.quickTBarObj,t)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(4),r=function(){function e(e,t){this.parent=e,this.serviceLocator=t}return e.prototype.renderPanel=function(){var e=this.parent,t=this.parent.createElement("div",{className:"e-rte-content",id:this.parent.getID()+"rte-view"}),r=n.i(i.p)(e.value,e);this.editableElement=this.parent.createElement("div",{className:"e-content",id:this.parent.getID()+"_rte-edit-view",attrs:{contenteditable:"true"},innerHTML:r}),t.appendChild(this.editableElement),this.setPanel(t),e.element.appendChild(t)},e.prototype.getPanel=function(){return this.contentPanel},e.prototype.getEditPanel=function(){return this.editableElement},e.prototype.getText=function(){var e=this.getEditPanel().innerText;return"\n"===e?"":e},e.prototype.setPanel=function(e){this.contentPanel=e},e.prototype.getDocument=function(){return this.getEditPanel().ownerDocument},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(0),r=(n.n(i),n(5)),o=function(){function e(){this.rendererMap={}}return e.prototype.addRenderer=function(e,t){var o=n.i(i.getEnumValue)(r.a,e);n.i(i.isNullOrUndefined)(this.rendererMap[""+o])&&(this.rendererMap[""+o]=t)},e.prototype.getRenderer=function(e){var t=n.i(i.getEnumValue)(r.a,e);if(n.i(i.isNullOrUndefined)(this.rendererMap[""+t]))throw"The renderer "+t+" is not found";return this.rendererMap[""+t]},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(0),r=(n.n(i),function(){function e(){this.services={}}return e.prototype.register=function(e,t){n.i(i.isNullOrUndefined)(this.services[""+e])&&(this.services[""+e]=t)},e.prototype.getService=function(e){if(n.i(i.isNullOrUndefined)(this.services[""+e]))throw"The service "+e+" is not registered";return this.services[""+e]},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return w});var i=n(0),r=(n.n(i),n(7)),o=n(46),s=n(11),a=n(16),l=n(40),d=n(45),c=n(35),u=n(42),h=n(41),p=n(36),m=n(53),f=n(50),g=n(49),b=n(44),v=n(37),C=n(52),y=n(47),N=n(3),S=n(43),E=n(12),T=n(39),O=n(38),w=function(){function e(e){this.currentDocument=e.document,this.editableElement=e.editableElement,this.nodeSelection=new s.a,this.nodeCutter=new E.a,this.domNode=new a.b(this.editableElement,this.currentDocument),this.observer=new i.Observer(this),this.listObj=new o.a(this),this.formatObj=new l.a(this),this.alignmentObj=new c.a(this),this.indentsObj=new u.a(this),this.linkObj=new d.a(this),this.imgObj=new h.a(this),this.audioObj=new p.a(this),this.videoObj=new m.a(this),this.selectionObj=new g.a(this),this.inserthtmlObj=new b.a(this),this.insertTextObj=new S.a(this),this.clearObj=new v.a(this),this.tableObj=new f.a(this),this.undoRedoManager=new C.a(this,e.options),this.msWordPaste=new y.a(this),this.formatPainterEditor=new T.a(this,e.formatPainterSettings),this.emojiPickerObj=new O.a(this),this.wireEvents()}return e.prototype.wireEvents=function(){this.observer.on(N.a,this.editorKeyDown,this),this.observer.on(N.g,this.editorKeyUp,this),this.observer.on(N.g,this.editorKeyUp,this),this.observer.on(N.i,this.onPropertyChanged,this),this.observer.on(N.k,this.onWordPaste,this),this.observer.on(N.l,this.onBegin,this)},e.prototype.onWordPaste=function(e){this.observer.notify(N.j,e)},e.prototype.onPropertyChanged=function(e){this.observer.notify(N.h,e)},e.prototype.editorKeyDown=function(e){this.observer.notify(N.d,e)},e.prototype.editorKeyUp=function(e){this.observer.notify(N.f,e)},e.prototype.onBegin=function(e){this.observer.notify(N.m,e)},e.prototype.execCommand=function(e,t,n,i,o,s,a,l){switch(e.toLowerCase()){case"lists":this.observer.notify(N.e,{subCommand:t,event:n,callBack:i,selector:a,item:s,enterAction:l});break;case"formats":this.observer.notify(N.c,{subCommand:t,event:n,callBack:i,selector:a,exeValue:s,enterAction:l});break;case"alignments":this.observer.notify(r.z,{subCommand:t,event:n,callBack:i,selector:a,value:s});break;case"indents":this.observer.notify(r.y,{subCommand:t,event:n,callBack:i,selector:a});break;case"links":this.observer.notify(r.x,{command:e,value:t,item:s,event:n,callBack:i});break;case"files":this.observer.notify(r.r,{command:e,value:"Image",item:s,event:n,callBack:i,selector:a});break;case"images":this.observer.notify(r.r,{command:e,value:t,item:s,event:n,callBack:i,selector:a});break;case"audios":this.observer.notify(r.q,{command:e,value:t,item:s,event:n,callBack:i,selector:a});break;case"videos":this.observer.notify(r.p,{command:e,value:t,item:s,event:n,callBack:i,selector:a});break;case"table":switch(t.toString().toLocaleLowerCase()){case"createtable":this.observer.notify(r.b,{item:s,event:n,callBack:i,enterAction:l});break;case"insertrowbefore":case"insertrowafter":this.observer.notify(r.c,{item:s,event:n,callBack:i});break;case"insertcolumnleft":case"insertcolumnright":this.observer.notify(r.d,{item:s,event:n,callBack:i});break;case"deleterow":this.observer.notify(r.e,{item:s,event:n,callBack:i});break;case"deletecolumn":this.observer.notify(r.f,{item:s,event:n,callBack:i});break;case"tableremove":this.observer.notify(r.g,{item:s,event:n,callBack:i});break;case"tableheader":this.observer.notify(r.h,{item:s,event:n,callBack:i});break;case"aligntop":case"alignmiddle":case"alignbottom":this.observer.notify(r.i,{item:s,event:n,callBack:i});break;case"merge":this.observer.notify(r.j,{item:s,event:n,callBack:i});break;case"horizontalsplit":this.observer.notify(r.k,{item:s,event:n,callBack:i});break;case"verticalsplit":this.observer.notify(r.l,{item:s,event:n,callBack:i})}break;case"font":case"style":case"effects":case"casing":this.observer.notify(r.o,{subCommand:t,event:n,callBack:i,value:o,selector:a,enterAction:l});break;case"inserthtml":this.observer.notify(r.v,{subCommand:t,callBack:i,value:o,enterAction:l});break;case"inserttext":this.observer.notify(r.w,{subCommand:t,callBack:i,value:o});break;case"clear":this.observer.notify(r.n,{subCommand:t,event:n,callBack:i,selector:a,enterAction:l});break;case"actions":this.observer.notify(N.b,{subCommand:t,event:n,callBack:i,selector:a});break;case"formatpainter":this.observer.notify(N.n,{item:s,subCommand:t,event:n,callBack:i});break;case"emojipicker":this.observer.notify(N.o,{item:s,subCommand:t,value:o,event:n,callBack:i})}},e}()},function(e,t,n){"use strict";var i=n(46);n.d(t,"a",function(){return i.a});var r=n(16);n.d(t,"b",function(){return r.a}),n.d(t,"c",function(){return r.b});var o=n(35);n.d(t,"d",function(){return o.a});var s=n(42);n.d(t,"e",function(){return s.a});var a=n(40);n.d(t,"f",function(){return a.a});var l=n(45);n.d(t,"g",function(){return l.a});var d=n(19);n.d(t,"h",function(){return d.a});var c=n(43);n.d(t,"i",function(){return c.a});var u=n(44);n.d(t,"j",function(){return u.a});var h=n(8);n.d(t,"k",function(){return h.a});var p=n(22);n.d(t,"l",function(){return p.a});var m=n(47);n.d(t,"m",function(){return m.a});var f=n(12);n.d(t,"n",function(){return f.a});var g=n(41);n.d(t,"o",function(){return g.a});var b=n(36);n.d(t,"p",function(){return b.a});var v=n(53);n.d(t,"q",function(){return v.a});var C=n(48);n.d(t,"r",function(){return C.a});var y=n(49);n.d(t,"s",function(){return y.a});var N=n(37);n.d(t,"t",function(){return N.a});var S=n(52);n.d(t,"u",function(){return S.a});var E=n(50);n.d(t,"v",function(){return E.a});var T=n(51);n.d(t,"w",function(){return T.a}),n.d(t,"x",function(){return T.b});var O=n(39);n.d(t,"y",function(){return O.a});var w=n(38);n.d(t,"z",function(){return w.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(7),r=n(0),o=(n.n(r),n(3)),s=n(6),a=function(){function e(e){this.alignments={JustifyLeft:"left",JustifyCenter:"center",JustifyRight:"right",JustifyFull:"justify"},this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.z,this.applyAlignment,this),this.parent.observer.on(o.d,this.onKeyDown,this)},e.prototype.onKeyDown=function(e){switch(e.event.action){case"justify-center":this.applyAlignment({subCommand:"JustifyCenter",callBack:e.callBack}),e.event.preventDefault();break;case"justify-full":this.applyAlignment({subCommand:"JustifyFull",callBack:e.callBack}),e.event.preventDefault();break;case"justify-left":this.applyAlignment({subCommand:"JustifyLeft",callBack:e.callBack}),e.event.preventDefault();break;case"justify-right":this.applyAlignment({subCommand:"JustifyRight",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.getTableNode=function(e){var t=e.startContainer.nodeType===Node.ELEMENT_NODE?e.startContainer:e.startContainer.parentNode;return[n.i(r.closest)(t,"td,th")]},e.prototype.applyAlignment=function(e){var t="Table"===e.value,i=this.parent.nodeSelection.getRange(this.parent.currentDocument),o=this.parent.nodeSelection.save(i,this.parent.currentDocument);if(t)n.i(r.setStyleAttribute)(this.getTableNode(i)[0],{"text-align":this.alignments[e.subCommand]});else{this.parent.domNode.setMarker(o);for(var a=this.parent.domNode.blockNodes(),l=0;l<a.length;l++){var d=a[l];n.i(r.setStyleAttribute)(d,{"text-align":this.alignments[e.subCommand]})}for(var c=this.parent.domNode.getImageTagInSelection(),l=0;l<c.length;l++){var u=[];u.push(c[l]),this.parent.imgObj.imageCommand({item:{selectNode:u},subCommand:e.subCommand,value:e.subCommand,callBack:e.callBack,selector:e.selector})}this.parent.editableElement.focus(),o=this.parent.domNode.saveMarker(o),n.i(s.b)()&&n.i(s.c)(this.parent.editableElement,e.selector),o.restore()}e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:t?this.getTableNode(i):this.parent.domNode.blockNodes()})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(7)),o=n(21),s=n(8),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.q,this.audioCommand,this)},e.prototype.audioCommand=function(e){var t,r=e.value.toString().toLowerCase();switch("inline"!==r&&"break"!==r&&"audioremove"!==r||(t=e.item.selectNode[0]),r){case"audio":case"audioreplace":this.createAudio(e);break;case"inline":t.removeAttribute("class"),t.closest("."+o.k).style.display="inline-block",n.i(i.addClass)([t],[o.l,o.m,o.n]),this.callBack(e);break;case"break":t.removeAttribute("class"),t.closest("."+o.k).style.display="block",n.i(i.addClass)([t],[o.o,o.l,o.n]),this.callBack(e);break;case"audioremove":n.i(i.detach)(t),this.callBack(e)}},e.prototype.createAudio=function(e){var t,r=this,a=!1;if(!n.i(i.isNullOrUndefined)(e.item.selectParent)&&e.item.selectParent[0].classList&&(e.item.selectParent[0].classList.contains(o.p)||e.item.selectParent[0].classList.contains(o.k))){var l=e.item.selectParent[0].querySelector("source");this.setStyle(l,e),a=!0}else{t=n.i(i.createElement)("span",{className:o.k,attrs:{contentEditable:"false",title:e.item.fileName}});var d=n.i(i.createElement)("audio",{className:o.l+" "+o.m,attrs:{controls:""}}),c=n.i(i.createElement)("source"),u=n.i(i.createElement)("span",{className:o.p});if(this.setStyle(c,e),d.appendChild(c),u.appendChild(d),t.appendChild(u),n.i(i.isNullOrUndefined)(e.item.selection)||e.item.selection.restore(),s.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),null===t.nextElementSibling){var h=n.i(i.createElement)("br");t.parentNode.insertBefore(h,t.nextSibling)}}if(e.callBack&&(n.i(i.isNullOrUndefined)(e.selector)||!n.i(i.isNullOrUndefined)(e.selector)&&"pasteCleanupModule"!==e.selector)){var p=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0],m="AudioReplace"===e.value||a?e.item.selectParent[0].querySelector("audio"):i.Browser.isIE?p:p.querySelector("audio");m.addEventListener("loadeddata",function(){"AudioReplace"===e.value&&a||e.callBack({requestType:"Audios",editorMode:"HTML",event:e.event,range:r.parent.nodeSelection.getRange(r.parent.currentDocument),elements:[m]})}),a&&m.load()}},e.prototype.setStyle=function(e,t){n.i(i.isNullOrUndefined)(t.item.url)||e.setAttribute("src",t.item.url);var r=t.item.fileName?t.item.fileName.split(".").pop().toLowerCase():t.item.url?t.item.url.split(".").pop().toLowerCase():"";e.type="opus"===r?"audio/ogg":"m4a"===r?"audio/mp4":t.item.fileName&&t.item.fileName.split(".").length>0?"audio/"+t.item.fileName.split(".")[t.item.fileName.split(".").length-1]:t.item.url&&t.item.url.split(".").length>0?"audio/"+t.item.url.split(".")[t.item.url.split(".").length-1]:""},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(7),r=n(87),o=n(3),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.n,this.applyClear,this),this.parent.observer.on(o.d,this.onKeyDown,this)},e.prototype.onKeyDown=function(e){switch(e.event.action){case"clear-format":this.applyClear({subCommand:"ClearFormat",callBack:e.callBack,enterAction:e.enterAction}),e.event.preventDefault()}},e.prototype.applyClear=function(e){"ClearFormat"===e.subCommand&&(r.a.clear(this.parent.currentDocument,this.parent.editableElement,e.enterAction,e.selector,e.subCommand),e.callBack&&e.callBack({requestType:e.subCommand,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)}))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(3),r=n(8),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.o,this.emojiInsert,this)},e.prototype.emojiInsert=function(e){for(var t=document.createTextNode(e.value),n=this.parent.currentDocument.getSelection(),i=n.getRangeAt(0),o=i.startOffset,s=o-1;s>=o-15;s--){if(/:$/.test(n.focusNode.textContent.substring(s-1,s))){this.beforeApplyFormat(!0);break}}var a=/:$/.test(n.focusNode.textContent.charAt(o-1)),l=n.focusNode.textContent.charAt(o-2),d=/\s/.test(l);a&&(d||1===n.focusOffset)&&this.beforeApplyFormat(!0),r.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.beforeApplyFormat=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),n=this.parent.nodeSelection.getNodeCollection(t)[0],i=!(":"===n.parentElement.innerHTML.replace(/ |<br>/g,"").trim()||0===n.textContent.trim().indexOf("/")),r=n;if(i&&e)for(;r!==this.parent.editableElement;)r=r.parentElement;for(var o=t.startOffset;-1===this.parent.nodeSelection.getRange(document).toString().indexOf(":");)this.parent.nodeSelection.setSelectionText(document,n,n,o,t.endOffset),o--;var s=this.parent.nodeSelection.getRange(this.parent.currentDocument),a=this.parent.nodeCutter.GetSpliceNode(s,n);a.parentNode.removeChild(a)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),n(3)),o=n(34),s=function(){function e(e,t){this.INVALID_TAGS=["A","AUDIO","IMG","VIDEO","IFRAME"],this.parent=e,this.settings=t,this.addEventListener(),this.setDeniedFormats()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.n,this.actionHandler,this),this.parent.observer.on(r.h,this.onPropertyChanged,this)},e.prototype.onPropertyChanged=function(e){e&&"formatPainter"===e.module&&(n.i(i.isNullOrUndefined)(e.newProp.formatPainterSettings.allowedFormats)||(this.settings.allowedFormats=e.newProp.formatPainterSettings.allowedFormats),n.i(i.isNullOrUndefined)(e.newProp.formatPainterSettings.deniedFormats)||(this.settings.deniedFormats=e.newProp.formatPainterSettings.deniedFormats,this.setDeniedFormats()))},e.prototype.removeEventListener=function(){this.parent.observer.off(r.n,this.actionHandler),this.parent.observer.off(r.h,this.onPropertyChanged)},e.prototype.destroy=function(){this.removeEventListener(),this.INVALID_TAGS=null,this.copyCollection=null,this.deniedFormatsCollection=null,this.newElem=null,this.newElemLastChild=null,this.settings=null,this.parent=null},e.prototype.actionHandler=function(e){if(this.settings.allowedContext=["Text","List","Table"],!n.i(i.isNullOrUndefined)(e)&&!n.i(i.isNullOrUndefined)(e.item)&&!n.i(i.isNullOrUndefined)(e.item.formatPainterAction)){switch(e.item.formatPainterAction){case"format-copy":this.copyAction();break;case"format-paste":this.pasteAction();break;case"escape":this.escapeAction()}this.callBack(e)}},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:"FormatPainter",action:e.item.formatPainterAction,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.generateElement=function(){var e=this.copyCollection.slice();e.reverse();for(var t,r=e.length,o=n.i(i.createElement)("div",{className:"e-format-paste-wrapper"}),s=0;s<r;s++){var a=e[s],l=a.attrs,d=a.className,c=a.styles,u=a.tagName,h=n.i(i.createElement)(u);""!==d&&(h.className=d);for(var p=0;p<l.length;p++){var m=l[p].name,f=l[p].value;h.setAttribute(m,f)}for(var g=0;g<c.length;g++){var m=c[g].property,f=c[g].value,b=c[g].priority;h.style.setProperty(m,f,b)}0===o.childElementCount?(o.append(h),t=h):(t.append(h),t=h)}for(var v=this.removeDeniedFormats(o),C=v;C;)null===C.firstChild?(t=C,C=void 0):C=C.firstChild;this.newElem=v,this.newElemLastChild=t},e.prototype.pasteAction=function(){if(n.i(i.isNullOrUndefined)(this.copyCollection)||0===this.copyCollection.length)return void this.paintPlainTextFormat();this.insertFormatNode(this.newElem,this.newElemLastChild)},e.prototype.removeDeniedFormats=function(e){if(!n.i(i.isNullOrUndefined)(this.deniedFormatsCollection)&&this.deniedFormatsCollection.length>0)for(var t=this.deniedFormatsCollection,r=t.length,o=0;o<r;o++){var s=t[o].tag;if(t[o].tag)for(var a=e.querySelectorAll(s),l=0;l<a.length;l++){if(t[o].classes.length>0){for(var d=t[o].classes,c=d.length,u=0;u<c;u++)a[l].classList.contains(d[u])&&n.i(i.removeClass)([a[l]],d[u].trim());0===a[l].classList.length&&a[l].removeAttribute("class")}if(t[o].styles.length>0){for(var h=t[o].styles,p=h.length,u=0;u<p;u++)a[l].style.removeProperty(h[u].trim());0===a[l].style.length&&a[l].removeAttribute("style")}if(t[o].attributes.length>0)for(var m=t[o].attributes,f=m.length,u=0;u<f;u++)a[l].removeAttribute(m[u].trim())}}return e.firstElementChild},e.prototype.copyAction=function(){var e=[],t=this.parent.nodeSelection.getRange(document),r=this.parent.nodeSelection,o=t.collapsed?r.getSelectionNodeCollection(t):r.getSelectionNodeCollectionBr(t);if(0!==o.length||0!==r.getSelectionNodeCollectionBr(t).length){o=0===o.length?r.getSelectionNodeCollectionBr(t):o;for(var s=o[0].parentElement,a=this.findCurrentContext(s),l=this.settings.allowedFormats.indexOf(";")>-1?this.settings.allowedFormats.split(";"):[this.settings.allowedFormats],d=0;d<l.length;d++)l[d]=l[d].trim();var c=this.getRangeParentElem(a,s),u=c[0],h=c[1];if(null===a&&(a=h),!n.i(i.isNullOrUndefined)(a)&&this.settings.allowedContext.indexOf(a)>-1){"#text"===t.startContainer.nodeName&&(s=t.startContainer.parentElement);var p=s;do{if(l.indexOf(s.nodeName.toLowerCase())>-1){for(var m=s.attributes,f=[],d=0;d<m.length;d++)"class"!==m[d].name&&"style"!==m[d].name&&f.push(m[d]);for(var g=s.className,b=s.style,v=[],d=0;d<b.length;d++){var C=b[d],y=b.getPropertyValue(C),N=b.getPropertyPriority(C);v.push({property:C,value:y,priority:N})}e.push({attrs:f,className:g,styles:v,tagName:s.nodeName})}if(u===s?s=void 0:n.i(i.isNullOrUndefined)(s.parentElement)||(s=s.parentElement),p===s)break}while(!n.i(i.isNullOrUndefined)(s)||s===this.parent.editableElement);this.copyCollection=e}this.generateElement()}},e.prototype.getRangeParentElem=function(e,t){var r,o=t;switch(3===o.nodeType&&(o=o.parentElement),e){case"Table":r=n.i(i.closest)(o,"td"),n.i(i.isNullOrUndefined)(r)&&(r=n.i(i.closest)(o,"th"));break;case"List":r=n.i(i.closest)(o,"li");break;case"Text":r=n.i(i.closest)(o,"p")}if(n.i(i.isNullOrUndefined)(r)){var s=this.getNearestBlockParentElement(t);n.i(i.isNullOrUndefined)(s)||"UL"===s||"OL"===s||"LI"===s||(r=n.i(i.closest)(o,s),e="Text")}return"List"===e&&(r=r.parentElement),[r,e]},e.prototype.getNearestBlockParentElement=function(e){var t=e;for(3===t.nodeType&&(t=t.parentNode);t&&t!==this.parent.editableElement;){if(!n.i(i.isNullOrUndefined)(t)&&this.isBlockElement(t))return t.nodeName;t=t.parentNode}return null},e.prototype.isBlockElement=function(e){return["P","DIV","UL","OL","LI","H1","H2","H3","H4","H5","H6","ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","FIGCAPTION","FIGURE","FOOTER","HEADER","HR","MAIN","NAV","SECTION","SUMMARY","PRE"].indexOf(e.nodeName)>-1},e.prototype.escapeAction=function(){this.copyCollection=[]},e.prototype.paintPlainTextFormat=function(){var e,t=this.parent.nodeSelection.getRange(this.parent.currentDocument),n=this.parent.nodeSelection,i=t.collapsed?n.getSelectionNodeCollection(t):n.getSelectionNodeCollectionBr(t);if(i.length>1)for(var r=0;r<i.length;r++)e=this.validateELementTag(i[r]);else e=this.validateELementTag(t.startContainer)&&this.validateELementTag(t.endContainer);e||this.parent.execCommand("Clear","ClearFormat",null,null)},e.prototype.validateELementTag=function(e){return 3===e.nodeType&&(e=e.parentElement),this.INVALID_TAGS.indexOf(e.tagName)>-1},e.prototype.findCurrentContext=function(e){var t=n.i(i.closest)(e,"p"),r=n.i(i.closest)(e,"li");return t&&!r?"Text":n.i(i.closest)(e,"li")?n.i(i.isNullOrUndefined)(t)||n.i(i.isNullOrUndefined)(r)||t.textContent.trim()===r.textContent.trim()?"List":"Text":n.i(i.closest)(e,"td")||n.i(i.closest)(e,"tr")||n.i(i.closest)(e,"th")?"Table":null},e.prototype.insertFormatNode=function(e,t){var r=e.cloneNode(!0);if(!this.isBlockElement(e)){var s=n.i(i.createElement)("P");s.appendChild(e),r=s.cloneNode(!0)}for(var a,l=this.parent.editableElement,d=this.parent.currentDocument,c=r.firstChild;c;){if(!this.isBlockElement(c)){a=c.parentNode.removeChild(c);break}c=c.firstChild}var u={element:a,lastChild:t};o.r.applyFormat(d,null,l,"P","formatPainter",null,u);var h=this.parent.nodeSelection.getRange(d),p=h.collapsed,m=this.parent.domNode.blockNodes(),f=!1;1===m.length&&(f=m[0].textContent.trim()===h.toString().trim()),(this.isBlockElement(r)&&p||m.length>1||f)&&this.insertBlockNode(r,h,d,m)},e.prototype.insertBlockNode=function(e,t,r,o){var s=this.parent.nodeSelection,a=s.save(t,r);this.parent.domNode.setMarker(a);var l,d,c=!1;"UL"!==e.nodeName&&"OL"!==e.nodeName||(d=e.cloneNode(!0),l=d.firstChild);for(var u=n.i(i.isNullOrUndefined)(d)?e:e.firstChild,h=0;h<o.length;h++)if(!(this.INVALID_TAGS.indexOf(o[h].nodeName)>-1||o[h].querySelectorAll("img,audio,video,iframe").length>0)){for(var p=u.cloneNode(!1);o[h].firstChild;)0!==o[h].textContent.trim().length?p.appendChild(o[h].firstChild):o[h].removeChild(o[h].firstChild);if("TD"!==o[h].nodeName&&"TH"!==o[h].nodeName){if(n.i(i.isNullOrUndefined)(d)||(c=this.isSameListType(e,o[h])),"LI"!==p.nodeName||c?c?this.insertSameList(o,h,d,p):o[h].parentNode.replaceChild(p,o[h]):this.insertNewList(t,o,h,d,p),"LI"!==p.nodeName&&("OL"===p.parentElement.nodeName||"UL"===p.parentElement.nodeName)){var m=p.parentElement;if(this.parent.nodeCutter.SplitNode(t,m,!0),n.i(i.isNullOrUndefined)(m.previousElementSibling))m.parentElement.prepend(p);else if(m.previousElementSibling.after(p),p.childNodes.length>1)for(var f=0;f<p.childNodes.length;f++){var g=p.childNodes[f];"OL"!==g.nodeName&&"UL"!==g.nodeName||p.after(g)}}}else{if(n.i(i.isNullOrUndefined)(d)){o[h].appendChild(p);continue}if(0!==h||n.i(i.isNullOrUndefined)(d)){o[h].appendChild(p);continue}o[h].appendChild(d),d.appendChild(p)}}!n.i(i.isNullOrUndefined)(l)&&n.i(i.detach)(l),this.cleanEmptyLists(),this.parent.domNode.saveMarker(a,null).restore()},e.prototype.insertNewList=function(e,t,r,o,s){if(0===r){var a=t[r].nodeName;t[r]=t[r].parentNode.replaceChild(o,t[r]);var l="LI"===a?o.parentElement:o;if(this.parent.nodeCutter.SplitNode(e,l,!0),"LI"!==t[r].nodeName||n.i(i.isNullOrUndefined)(l))if(n.i(i.isNullOrUndefined)(l))o.append(s);else if(n.i(i.isNullOrUndefined)(l.previousElementSibling)||l.previousElementSibling.nodeName!==o.nodeName)if(n.i(i.isNullOrUndefined)(l.nextElementSibling)||l.nextElementSibling.nodeName!==o.nodeName)o.append(s);else{var d=l.nextElementSibling;for(d.prepend(s);d.firstChild;)o.append(d.firstChild)}else{var d=l.previousElementSibling;for(d.append(s);d.firstChild;)o.append(d.firstChild)}else o.append(s),n.i(i.isNullOrUndefined)(l.parentNode)||l.parentNode.insertBefore(o,l)}else o.append(s);this.detachEmptyBlockNodes(t[r])},e.prototype.insertSameList=function(e,t,r,o){if(0===t){if(!n.i(i.isNullOrUndefined)(e[t].parentNode)&&("UL"===e[t].parentNode.nodeName||"OL"===e[t].parentNode.nodeName)){if(1===e.length){for(;o.firstChild;)e[t].append(o.firstChild);for(var s=0;s<e[t].parentNode.childNodes.length;s++){var a=e[t].parentNode.childNodes[s];r.append(a.cloneNode(!0))}}else r.append(o);e[t].parentNode.parentNode.replaceChild(r,e[t].parentNode)}}else r.append(o);this.detachEmptyBlockNodes(e[t])},e.prototype.isSameListType=function(e,t){var r=!1,o=n.i(i.closest)(t,"ol, ul");return!n.i(i.isNullOrUndefined)(o)&&o.querySelectorAll("li").length>0&&(r=o.nodeName===e.nodeName),r},e.prototype.cleanEmptyLists=function(){for(var e=this.parent.editableElement.querySelectorAll("ol, ul"),t=0;t<e.length;t++)""===e[t].textContent.trim()&&n.i(i.detach)(e[t])},e.prototype.setDeniedFormats=function(){var e=[];if(!n.i(i.isNullOrUndefined)(this.settings)&&!n.i(i.isNullOrUndefined)(this.settings.deniedFormats)){for(var t=this.settings.deniedFormats.indexOf(";")>-1?this.settings.deniedFormats.split(";"):[this.settings.deniedFormats],r=t.length,o=0;o<r;o++){var s=t[o];if(""!==s){s.trim();var a=this.makeDeniedFormatsCollection(s);n.i(i.isNullOrUndefined)(a)||e.push(a)}}this.deniedFormatsCollection=e}},e.prototype.detachEmptyBlockNodes=function(e){n.i(i.isNullOrUndefined)(e)||""!==e.textContent.trim()||n.i(i.detach)(e)},e.prototype.makeDeniedFormatsCollection=function(e){var t=e.indexOf("("),n=e.indexOf(")"),i=e.indexOf("["),r=e.indexOf("]"),o=e.indexOf("{"),s=e.indexOf("}"),a=[],l="",d="",c="",u=[],h=[],p=[];t>-1&&n>-1&&(a=e.substring(t+1,n).split(" "),u=a[0].split(")")[0].split(",")),i>-1&&r>-1&&(l=e.substring(i+1,r),h=l.split(",")),o>-1&&s>-1&&(d=e.substring(o+1,s),p=d.split(","));var m=[t,i,o];m=m.filter(function(e){return e>-1});var f,g=m.length;return 1===g?f=m[0]:2===g?f=Math.min(m[0],m[1]):3===g&&(f=Math.min(m[0],m[1],m[2])),c=e.substring(0,f),c=c.trim(),{tag:c,styles:p,classes:u,attributes:h}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(3),r=n(0),o=(n.n(r),n(6)),s=n(16),a=n(12),l=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.c,this.applyFormats,this),this.parent.observer.on(i.f,this.onKeyUp,this),this.parent.observer.on(i.d,this.onKeyDown,this)},e.prototype.getParentNode=function(e){for(;e.parentNode&&e.parentNode!==this.parent.editableElement;null)e=e.parentNode;return e},e.prototype.onKeyUp=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=t.endContainer,o=i.lastChild;if(13===e.event.which&&t.startContainer===i&&3!==i.nodeType){var s=n.i(r.createElement)("p");if(s.innerHTML="<br>",!n.i(r.isNullOrUndefined)(o)&&o&&"BR"===o.nodeName&&o.previousSibling&&"TABLE"===o.previousSibling.nodeName)i.replaceChild(s,o),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,s,0);else{var a=this.parent.nodeSelection.getSelectionNodeCollectionBr(t)[0];!n.i(r.isNullOrUndefined)(a)&&"BR"===a.nodeName&&a.previousSibling&&"TABLE"===a.previousSibling.nodeName&&(i.replaceChild(s,a),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,s,0))}}},e.prototype.onKeyDown=function(e){if(13===e.event.which){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=0===t.startContainer.textContent.length||"PRE"===t.startContainer.nodeName?t.startContainer:t.startContainer.parentElement,o=0===t.endContainer.textContent.length||"PRE"===t.endContainer.nodeName?t.endContainer:t.endContainer.parentElement,s=n.i(r.closest)(i,"pre"),a=n.i(r.closest)(o,"pre");if(!n.i(r.isNullOrUndefined)(s)&&!n.i(r.isNullOrUndefined)(s.parentElement)&&"LI"===s.parentElement.tagName)return;if((n.i(r.isNullOrUndefined)(s)&&!n.i(r.isNullOrUndefined)(a)||!n.i(r.isNullOrUndefined)(s)&&n.i(r.isNullOrUndefined)(a))&&(e.event.preventDefault(),this.deleteContent(t),this.removeCodeContent(t),t=this.parent.nodeSelection.getRange(this.parent.currentDocument),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0)),13===e.event.which&&!n.i(r.isNullOrUndefined)(s)&&!n.i(r.isNullOrUndefined)(a)){e.event.preventDefault(),this.deleteContent(t),this.removeCodeContent(t),t=this.parent.nodeSelection.getRange(this.parent.currentDocument);var l=t.startContainer.childNodes[t.endOffset],d=t.startContainer.childNodes[t.endOffset-1],c=t.startContainer;if(n.i(r.isNullOrUndefined)(l)||n.i(r.isNullOrUndefined)(d)||!n.i(r.isNullOrUndefined)(l.nextSibling)||"BR"!==l.nodeName||"BR"!==d.nodeName)if(8203===c.textContent.charCodeAt(0)&&1===c.textContent.length||0===c.textContent.length){for(;"PRE"!==c.parentElement.nodeName&&(1===c.textContent.length||0===c.textContent.length);)c=c.parentElement;!n.i(r.isNullOrUndefined)(c.previousSibling)&&"BR"===c.previousSibling.nodeName&&n.i(r.isNullOrUndefined)(c.nextSibling)?this.paraFocus(c.parentElement):this.isNotEndCursor(s,t)}else this.isNotEndCursor(s,t);else this.paraFocus(t.startContainer,e.enterAction)}}},e.prototype.removeCodeContent=function(e){var t=new RegExp(String.fromCharCode(65279),"g");if(!n.i(r.isNullOrUndefined)(e.endContainer.textContent.match(t))){var i=65279===e.endContainer.textContent.charCodeAt(e.endOffset-1)?e.endOffset-2:e.endOffset;e.endContainer.textContent=e.endContainer.textContent.replace(t,""),""===e.endContainer.textContent?this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e.endContainer.parentElement,0):this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e.endContainer,i)}},e.prototype.deleteContent=function(e){e.startContainer===e.endContainer&&e.startOffset===e.endOffset||e.deleteContents()},e.prototype.paraFocus=function(e,t){var i;"DIV"===t?(i=n.i(r.createElement)("div"),i.innerHTML="<br>"):"BR"===t?i=n.i(r.createElement)("br"):(i=n.i(r.createElement)("p"),i.innerHTML="<br>"),this.parent.domNode.insertAfter(i,e),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,i,0),n.i(r.detach)(e.lastChild)},e.prototype.isNotEndCursor=function(e,t){var i=new a.a,o=t.startOffset===e.lastChild.textContent.length&&e.lastChild.textContent===t.startContainer.textContent;if(0===e.textContent.indexOf(t.startContainer.textContent)&&(0===t.startOffset&&0===t.endOffset||"PRE"===t.startContainer.nodeName)){this.insertMarker(e,t);var s=n.i(r.createElement)("br");e.childNodes[t.endOffset].parentElement.insertBefore(s,e.childNodes[t.endOffset])}else{var l=i.SplitNode(t,e,!0);this.insertMarker(e,t);var d=e.previousElementSibling;"PRE"===d.tagName&&(d.insertAdjacentHTML("beforeend","<br>"+l.innerHTML),n.i(r.detach)(e))}this.setCursorPosition(o,e)},e.prototype.setCursorPosition=function(e,t){var i=!1,o=this.parent.editableElement.querySelector(".tempSpan"),s=o.parentElement;if(""===o.parentNode.textContent?i=!0:this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0),e)if(i)s===t?(this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0),n.i(r.detach)(o)):this.focusSelectionParent(o,s);else{var a=n.i(r.createElement)("br");this.parent.domNode.insertAfter(a,o),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0),n.i(r.detach)(o)}else i?this.focusSelectionParent(o,s):n.i(r.detach)(o)},e.prototype.focusSelectionParent=function(e,t){n.i(r.detach)(e),t.innerHTML="",this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,t,0)},e.prototype.insertMarker=function(e,t){var i=n.i(r.createElement)("span",{className:"tempSpan"});"PRE"===t.startContainer.nodeName?e.childNodes[t.endOffset].parentElement.insertBefore(i,e.childNodes[t.endOffset]):t.startContainer.parentElement.insertBefore(i,t.startContainer)},e.prototype.applyFormats=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=!1;this.parent.editableElement!==t.endContainer||n.i(r.isNullOrUndefined)(this.parent.editableElement.children[t.endOffset-1])||"TABLE"!==this.parent.editableElement.children[t.endOffset-1].tagName||t.collapsed||(i=!0);var a=this.parent.nodeSelection.save(t,this.parent.currentDocument);this.parent.domNode.setMarker(a);var l=this.parent.domNode.blockNodes();if("BR"===e.enterAction){this.setSelectionBRConfig();var d=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),c=this.parent.nodeSelection.getSelectionNodes(d),u=[];0===c.length&&c.push(l[0]);for(var h=0;h<c.length;h++){for(var p=c[h],m=void 0;!this.parent.domNode.isBlockNode(p)&&p!==this.parent.editableElement;)m=p,p=p.parentElement;this.parent.domNode.isBlockNode(p)&&p===this.parent.editableElement&&u.push(m)}for(var h=0;h<u.length;h++)if(!this.parent.domNode.isBlockNode(u[h])){for(var p=u[h],f=p;p===this.parent.editableElement;)f=p,p=p.parentElement;var g=void 0;this.parent.domNode.isBlockNode(f.parentElement)&&f.parentElement===this.parent.editableElement?(g=n.i(r.createElement)("div"),f.parentElement.insertBefore(g,f),g.appendChild(f)):g=f;for(var b=g.previousSibling;!n.i(r.isNullOrUndefined)(b)&&"BR"!==b.nodeName&&!this.parent.domNode.isBlockNode(b);)g.firstChild.parentElement.insertBefore(b,g.firstChild),b=g.previousSibling;n.i(r.isNullOrUndefined)(b)||"BR"!==b.nodeName||n.i(r.detach)(b);for(var v=g.nextSibling;!n.i(r.isNullOrUndefined)(v)&&"BR"!==v.nodeName&&!this.parent.domNode.isBlockNode(v);)g.appendChild(v),v=g.nextSibling;n.i(r.isNullOrUndefined)(v)||"BR"!==v.nodeName||n.i(r.detach)(v)}this.setSelectionBRConfig(),l=this.parent.domNode.blockNodes()}for(var h=0;h<l.length;h++){var C=void 0,y=void 0;if("blockquote"===e.subCommand.toLowerCase()?(C=this.getParentNode(l[h]),y=this.parent.domNode.isList(C)||"TABLE"===C.tagName?C.outerHTML:C.innerHTML):(C=l[h],y=C.innerHTML),!(e.subCommand.toLowerCase()===C.tagName.toLowerCase()&&("pre"!==e.subCommand.toLowerCase()||!n.i(r.isNullOrUndefined)(e.exeValue)&&"dropDownSelect"===e.exeValue.name)||n.i(r.isNullOrUndefined)(C.parentNode)||"TABLE"===C.tagName&&"pre"===e.subCommand.toLowerCase())){this.cleanFormats(C,e.subCommand);var N="pre"===e.subCommand.toLowerCase()&&"pre"===C.tagName.toLowerCase()?"p":e.subCommand,S=this.parent.domNode.createTagString(N,C,y.replace(/>\s+</g,"><"));"LI"===C.tagName?(C.innerHTML="",C.insertAdjacentHTML("beforeend",S)):this.parent.domNode.replaceWith(C,S)}}this.preFormatMerge();var E=this.parent.editableElement.querySelector("."+s.a.startSelection),T=this.parent.editableElement.querySelector("."+s.a.endSelection);n.i(r.isNullOrUndefined)(E)||n.i(r.isNullOrUndefined)(T)||(E=E.lastChild,T=T.lastChild),a=this.parent.domNode.saveMarker(a,null),n.i(o.b)()&&n.i(o.c)(this.parent.editableElement,e.selector),i?this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,E,T,0,T.textContent.length):a.restore(),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e.prototype.setSelectionBRConfig=function(){var e=this.parent.editableElement.querySelector("."+s.a.startSelection),t=this.parent.editableElement.querySelector("."+s.a.endSelection);n.i(r.isNullOrUndefined)(t)?this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e,0):this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,e,t,0,0)},e.prototype.preFormatMerge=function(){var e=this.parent.editableElement.querySelectorAll("PRE");if(!n.i(r.isNullOrUndefined)(e))for(var t=0;t<e.length;t++){var i=e[t].previousElementSibling;n.i(r.isNullOrUndefined)(i)||"PRE"!==i.tagName||(i.insertAdjacentHTML("beforeend","<br>"+e[t].innerHTML),n.i(r.detach)(e[t]))}},e.prototype.cleanFormats=function(e,t){var n=["display","font-size","margin-top","margin-bottom","margin-left","margin-right","font-weight"];t=t.toLowerCase();for(var i=0;i<n.length&&"p"!==t&&"blockquote"!==t&&"pre"!==t;i++)e.style.removeProperty(n[i])},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(7)),o=n(21),s=n(8),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.r,this.imageCommand,this)},e.prototype.imageCommand=function(e){switch(e.value.toString().toLowerCase()){case"image":case"replace":this.createImage(e);break;case"insertlink":this.insertImageLink(e);break;case"openimagelink":this.openImageLink(e);break;case"editimagelink":this.editImageLink(e);break;case"removeimagelink":this.removeImageLink(e);break;case"remove":this.removeImage(e);break;case"alttext":this.insertAltTextImage(e);break;case"dimension":this.imageDimension(e);break;case"caption":this.imageCaption(e);break;case"justifyleft":this.imageJustifyLeft(e);break;case"justifycenter":this.imageJustifyCenter(e);break;case"justifyright":this.imageJustifyRight(e);break;case"inline":this.imageInline(e);break;case"break":this.imageBreak(e)}},e.prototype.createImage=function(e){var t=this,r=!1;if(e.item.url=n.i(i.isNullOrUndefined)(e.item.url)||"undefined"===e.item.url?e.item.src:e.item.url,n.i(i.isNullOrUndefined)(e.item.selectParent)||"IMG"!==e.item.selectParent[0].tagName){var o=n.i(i.createElement)("img");this.setStyle(o,e),n.i(i.isNullOrUndefined)(e.item.selection)||e.item.selection.restore(),n.i(i.isNullOrUndefined)(e.selector)||"pasteCleanupModule"!==e.selector?s.a.Insert(this.parent.currentDocument,o,this.parent.editableElement):e.callBack({requestType:"Images",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:[o]})}else{var a=e.item.selectParent[0];r=!0,this.setStyle(a,e,r)}if(e.callBack&&(n.i(i.isNullOrUndefined)(e.selector)||!n.i(i.isNullOrUndefined)(e.selector)&&"pasteCleanupModule"!==e.selector)){var l=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0],d="Replace"===e.value||r?e.item.selectParent[0]:i.Browser.isIE?l.previousSibling:l.previousElementSibling;d.addEventListener("load",function(){"Replace"===e.value&&r||e.callBack({requestType:"Images",editorMode:"HTML",event:e.event,range:t.parent.nodeSelection.getRange(t.parent.currentDocument),elements:[d]})})}"Replace"===e.value&&(e.item.subCommand="Replace",this.callBack(e))},e.prototype.setStyle=function(e,t,r){n.i(i.isNullOrUndefined)(t.item.url)||e.setAttribute("src",t.item.url);var o;if(r)for(var s={"e-imgcenter":"e-imgcenter","e-imgright":"e-imgright","e-imgleft":"e-imgleft"},a=e.classList,l=0;l<a.length;l++)n.i(i.isNullOrUndefined)(s[a[l]])||(o=s[a[l]]);e.setAttribute("class","e-rte-image"+(n.i(i.isNullOrUndefined)(t.item.cssClass)?"":" "+t.item.cssClass)+(n.i(i.isNullOrUndefined)(o)?"":" "+o)),n.i(i.isNullOrUndefined)(t.item.altText)||e.setAttribute("alt",t.item.altText),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.width)||e.setAttribute("width",this.calculateStyleValue(t.item.width.width)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.height)||e.setAttribute("height",this.calculateStyleValue(t.item.height.height)),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.minWidth)||(e.style.minWidth=this.calculateStyleValue(t.item.width.minWidth)),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.maxWidth)||(e.style.maxWidth=this.calculateStyleValue(t.item.width.maxWidth)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.minHeight)||(e.style.minHeight=this.calculateStyleValue(t.item.height.minHeight)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.maxHeight)||(e.style.maxHeight=this.calculateStyleValue(t.item.height.maxHeight))},e.prototype.calculateStyleValue=function(e){return"string"==typeof e&&(e.indexOf("px")||e.indexOf("%")||e.indexOf("auto"))?e:e+"px"},e.prototype.insertImageLink=function(e){var t=n.i(i.createElement)("a",{attrs:{href:e.item.url}});e.item.selectNode[0].parentElement.classList.contains("e-img-wrap")&&(e.item.selection.restore(),t.setAttribute("contenteditable","true")),t.appendChild(e.item.selectNode[0]),n.i(i.isNullOrUndefined)(e.item.target)||t.setAttribute("target",e.item.target),n.i(i.isNullOrUndefined)(e.item.ariaLabel)||t.setAttribute("aria-label",e.item.ariaLabel),s.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),this.callBack(e)},e.prototype.openImageLink=function(e){document.defaultView.open(e.item.url,e.item.target),this.callBack(e)},e.prototype.removeImageLink=function(e){var t=e.item.selectParent[0];if(t.classList.contains("e-img-caption")){var r=n.i(i.select)(".e-img-wrap",t),o=n.i(i.select)(".e-img-inner",t),a=o.cloneNode(!0);n.i(i.detach)(n.i(i.select)("a",t)),n.i(i.detach)(o),r.appendChild(e.item.insertElement),r.appendChild(a)}else n.i(i.detach)(t),i.Browser.isIE&&e.item.selection&&e.item.selection.restore(),s.a.Insert(this.parent.currentDocument,e.item.insertElement,this.parent.editableElement);this.callBack(e)},e.prototype.editImageLink=function(e){e.item.selectNode[0].parentElement.href=e.item.url,n.i(i.isNullOrUndefined)(e.item.target)?(e.item.selectNode[0].parentElement.removeAttribute("target"),e.item.selectNode[0].parentElement.removeAttribute("aria-label")):(e.item.selectNode[0].parentElement.target=e.item.target,e.item.selectNode[0].parentElement.ariaLabel=e.item.ariaLabel),this.callBack(e)},e.prototype.removeImage=function(e){n.i(i.closest)(e.item.selectNode[0],"a")&&("A"!==e.item.selectNode[0].parentElement.nodeName||n.i(i.isNullOrUndefined)(e.item.selectNode[0].parentElement.innerText))?n.i(i.detach)(n.i(i.closest)(e.item.selectNode[0],"a")):n.i(i.isNullOrUndefined)(n.i(i.closest)(e.item.selectNode[0],"."+o.q))?n.i(i.detach)(e.item.selectNode[0]):n.i(i.detach)(n.i(i.closest)(e.item.selectNode[0],"."+o.q)),this.callBack(e)},e.prototype.insertAltTextImage=function(e){e.item.selectNode[0].setAttribute("alt",e.item.altText),this.callBack(e)},e.prototype.imageDimension=function(e){var t=e.item.selectNode[0];t.style.height="",t.style.width="","auto"!==e.item.width?t.style.width=n.i(i.formatUnit)(e.item.width):t.removeAttribute("width"),"auto"!==e.item.height?t.style.height=n.i(i.formatUnit)(e.item.height):t.removeAttribute("height"),this.callBack(e)},e.prototype.imageCaption=function(e){s.a.Insert(this.parent.currentDocument,e.item.insertElement,this.parent.editableElement),this.callBack(e)},e.prototype.imageJustifyLeft=function(e){var t=e.item.selectNode[0];n.i(i.isNullOrUndefined)(t)||(t.removeAttribute("class"),n.i(i.addClass)([t],"e-rte-image"),n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o.q))||(n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.r),n.i(i.addClass)([n.i(i.closest)(t,"."+o.q)],o.s)),"A"===t.parentElement.nodeName?(n.i(i.removeClass)([t.parentElement],o.r),n.i(i.addClass)([t.parentElement],o.s),n.i(i.addClass)([t],o.s)):n.i(i.addClass)([t],o.s),this.callBack(e))},e.prototype.imageJustifyCenter=function(e){var t=e.item.selectNode[0];n.i(i.isNullOrUndefined)(t)||(t.removeAttribute("class"),n.i(i.addClass)([t],"e-rte-image"),n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o.q))||(n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.s),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.r),n.i(i.addClass)([n.i(i.closest)(t,"."+o.q)],o.t)),"A"===t.parentElement.nodeName?(n.i(i.removeClass)([t.parentElement],o.s),n.i(i.removeClass)([t.parentElement],o.r),n.i(i.addClass)([t.parentElement],o.t),n.i(i.addClass)([t],o.t)):n.i(i.addClass)([t],o.t),this.callBack(e))},e.prototype.imageJustifyRight=function(e){var t=e.item.selectNode[0];n.i(i.isNullOrUndefined)(t)||(t.removeAttribute("class"),n.i(i.addClass)([t],"e-rte-image"),n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o.q))||(n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.s),n.i(i.addClass)([n.i(i.closest)(t,"."+o.q)],o.r)),"A"===t.parentElement.nodeName?(n.i(i.removeClass)([t.parentElement],o.s),n.i(i.addClass)([t.parentElement],o.r),n.i(i.addClass)([t],o.r)):n.i(i.addClass)([t],o.r),this.callBack(e))},e.prototype.imageInline=function(e){var t=e.item.selectNode[0];t.removeAttribute("class"),n.i(i.addClass)([t],"e-rte-image"),n.i(i.addClass)([t],o.u),n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o.q))||(n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.v),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.t),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.s),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.r),n.i(i.addClass)([n.i(i.closest)(t,"."+o.q)],o.w)),this.callBack(e)},e.prototype.imageBreak=function(e){var t=e.item.selectNode[0];t.removeAttribute("class"),n.i(i.addClass)([t],o.v),n.i(i.addClass)([t],"e-rte-image"),n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o.q))||(n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.w),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.t),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.s),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.r),n.i(i.addClass)([n.i(i.closest)(t,"."+o.q)],o.v)),this.callBack(e)},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(7),r=n(3),o=n(6),s=function(){function e(e){this.indentValue=20,this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.y,this.applyIndents,this),this.parent.observer.on(r.d,this.onKeyDown,this)},e.prototype.onKeyDown=function(e){switch(e.event.action){case"indents":this.applyIndents({subCommand:"Indent",callBack:e.callBack}),e.event.preventDefault();break;case"outdents":this.applyIndents({subCommand:"Outdent",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.applyIndents=function(e){var t=this.parent.editableElement,i=t.classList.contains("e-rtl"),s=this.parent.nodeSelection.getRange(this.parent.currentDocument),a=this.parent.nodeSelection.save(s,this.parent.currentDocument);this.parent.domNode.setMarker(a);for(var l=this.parent.domNode.blockNodes(),d=l.slice(),c=[],u=0;u<d.length;u++)"LI"!==d[u].tagName&&"LI"===d[u].parentNode.tagName?(l.splice(l.indexOf(d[u]),1),c.push(d[u].parentNode)):"LI"===d[u].tagName&&(l.splice(l.indexOf(d[u]),1),c.push(d[u]));c.length>0&&this.parent.observer.notify(r.d,{event:{preventDefault:function(){},stopPropagation:function(){},shiftKey:"Indent"!==e.subCommand,which:9,action:"indent"},ignoreDefault:!0});for(var u=0;u<l.length;u++){var h=l[u],p=i?h.style.marginRight:h.style.marginLeft,m=void 0;"Indent"===e.subCommand?(m=""===p?this.indentValue+"px":parseInt(p,null)+this.indentValue+"px",i?h.style.marginRight=m:h.style.marginLeft=m):(m=""===p||"0px"===p?"":parseInt(p,null)-this.indentValue+"px",i?h.style.marginRight=m:h.style.marginLeft=m)}t.focus(),n.i(o.b)()&&n.i(o.c)(t,e.selector),a=this.parent.domNode.saveMarker(a),a.restore(),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(7),r=n(8),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.w,this.insertText,this)},e.prototype.insertText=function(e){var t=document.createTextNode(e.value);r.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(7),r=n(8),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.v,this.applyHtml,this)},e.prototype.applyHtml=function(e){if(r.a.Insert(this.parent.currentDocument,e.value,this.parent.editableElement,!0,e.enterAction),"pasteCleanup"===e.subCommand){var t=this.parent.editableElement.querySelectorAll(".pasteContent_RTE"),n=[].slice.call(t),i=this.parent.editableElement.querySelectorAll(".pasteContent_Img"),o=[].slice.call(i);e.callBack({requestType:e.subCommand,editorMode:"HTML",elements:n,imgElem:o})}else e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(7),r=n(20),o=n(12),s=n(8),a=n(0),l=(n.n(a),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.x,this.linkCommand,this)},e.prototype.linkCommand=function(e){switch(e.value.toString().toLocaleLowerCase()){case"createlink":case"editlink":this.createLink(e);break;case"openlink":this.openLink(e);break;case"removelink":this.removeLink(e)}},e.prototype.createLink=function(e){var t=!n.i(a.isNullOrUndefined)(e.item.selectParent)&&e.item.selectParent.length>0&&n.i(a.closest)(e.item.selectParent[0],"a");if(t=n.i(a.isNullOrUndefined)(t)?!n.i(a.isNullOrUndefined)(e.item.selectParent)&&e.item.selectParent.length>0?e.item.selectParent[0]:null:t,n.i(a.isNullOrUndefined)(t)||"A"!==t.tagName){var i=new r.a,o=i.getRange(this.parent.currentDocument);"#text"!==o.endContainer.nodeName||o.startContainer.textContent.length!==o.endOffset+1||" "!==o.endContainer.textContent.charAt(o.endOffset)||n.i(a.isNullOrUndefined)(o.endContainer.nextSibling)||"A"!==o.endContainer.nextSibling.nodeName||(i.setSelectionText(this.parent.currentDocument,o.startContainer,o.endContainer,o.startOffset,o.endOffset+1),o=i.getRange(this.parent.currentDocument));var l=!!n.i(a.isNullOrUndefined)(e.item.text)||e.item.text.replace(/ /g,"").localeCompare(o.toString().replace(/\n/g," ").replace(/ /g,""))<0;if(e.event&&"keydown"===e.event.type&&(32===e.event.keyCode||13===e.event.keyCode)||"Paste"===e.item.action||o.collapsed||l){var d=this.createAchorNode(e);d.innerText=""===e.item.text?e.item.url:e.item.text;var c=d.innerText,u=c.replace(/ +/g,function(e){return" ".repeat(e.length)});if(d.innerText=u,e.item.selection.restore(),s.a.Insert(this.parent.currentDocument,d,this.parent.editableElement),!e.event||"keydown"!==e.event.type||32!==e.event.keyCode&&13!==e.event.keyCode){var h="Paste"===e.item.action?d.childNodes[0].textContent.length:0;e.item.selection.setSelectionText(this.parent.currentDocument,d.childNodes[0],d.childNodes[0],h,d.childNodes[0].textContent.length)}else{var p=e.item.selection.range.startContainer;p.textContent=this.removeText(p.textContent,e.item.text)}}else this.createLinkNode(e)}else{var m=t,f="";if(n.i(a.isNullOrUndefined)(e.item.url)||m.setAttribute("href",e.item.url),n.i(a.isNullOrUndefined)(e.item.title)||m.setAttribute("title",e.item.title),n.i(a.isNullOrUndefined)(e.item.text)||""===e.item.text||(f=m.innerText,m.innerText=e.item.text),n.i(a.isNullOrUndefined)(e.item.target)?(m.removeAttribute("target"),m.removeAttribute("aria-label")):(m.setAttribute("target",e.item.target),m.setAttribute("aria-label",e.item.ariaLabel)),f===e.item.text)e.item.selection.setSelectionText(this.parent.currentDocument,m,m,1,1),e.item.selection.restore();else{var h="Paste"===e.item.action?m.childNodes[0].textContent.length:0;e.item.selection.setSelectionText(this.parent.currentDocument,m.childNodes[0],m.childNodes[0],h,m.childNodes[0].textContent.length)}}e.callBack&&e.callBack({requestType:"Links",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.createLinkNode=function(e){for(var t,n,i=new r.a,s=new o.a,a=i.getRange(this.parent.currentDocument),l=this.getSelectionNodes(i.getNodeCollection(a)),d=i.save(a,this.parent.currentDocument),c=[],u=[],h=[],p=[],m=[],f=0;f<l.length;f++)l[f]=s.GetSpliceNode(a,l[f]),c[f]=l[f];for(var g=0;g<c.length;g++){var b=!0;for(t=c[g];!0===b;){if("A"===t.parentNode.nodeName){var v=t.parentNode;t.parentNode.parentNode.insertBefore(v.firstChild,v),t.parentNode.removeChild(v)}this.isBlockNode(t.parentNode)||0===c.length||0===g||g===c.length-1||3===a.startContainer.nodeType?(u[g]=t,b=!1):t=t.parentNode}}for(var g=0,C=0;g<u.length;g++)if(0===g&&(m[C]=u[g]),u.length>1&&g<u.length-1){if(u[g].parentElement===u[g+1].parentElement&&u[g]===u[g+1])continue;m[C+1]=u[g+1],C++}var y=0;p[y]=this.createAchorNode(e);for(var g=0;g<m.length;g++)if(0===g&&(n=m[g].cloneNode(!0),p[g].appendChild(n)),g<m.length-1)if(m[g].parentNode===m[g+1].parentNode){var N=m[g+1].cloneNode(!0);p[y].appendChild(N)}else y+=1,p[y]=this.createAchorNode(e),n=m[g+1].cloneNode(!0),p[y].appendChild(n);this.parent.nodeSelection.setRange(document,d.range);for(var g=0,S=0,E=0;g<=m.length;g++)0===g&&(m[g].parentNode.insertBefore(p[S],m[g].nextSibling),1===this.parent.domNode.blockNodes().length&&this.parent.nodeSelection.setSelectionNode(this.parent.currentDocument,p[S]),h[E]=m[g],E++),g<m.length-1&&(m[g].parentNode===m[g+1].parentNode?(h[E]=m[g+1],E++):(S+=1,m[g+1].parentNode.insertBefore(p[S],m[g+1]),h[E]=m[g+1],E++));for(var g=0;g<h.length;g++)h[g].parentNode&&h[g].parentNode.removeChild(h[g])},e.prototype.createAchorNode=function(e){var t=n.i(a.createElement)("a",{className:"e-rte-anchor",attrs:{href:e.item.url,title:n.i(a.isNullOrUndefined)(e.item.title)||""===e.item.title?e.item.url:e.item.title}});return n.i(a.isNullOrUndefined)(e.item.target)||t.setAttribute("target",e.item.target),t},e.prototype.getSelectionNodes=function(e){e=e.reverse();for(var t=0;t<e.length;t++)3===e[t].nodeType&&""!==e[t].textContent.trim()||"IMG"!==e[t].nodeName&&(e.splice(t,1),t--);return e.reverse()},e.prototype.isBlockNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&i.a.indexOf(e.tagName.toLowerCase())>=0},e.prototype.removeText=function(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)n[i]===t&&(n.splice(i,1),i--);return n.join(" ")+" "},e.prototype.openLink=function(e){document.defaultView.open(e.item.url,e.item.target),this.callBack(e)},e.prototype.removeLink=function(e){var t=this.parent.domNode.blockNodes();if(t.length<2){this.parent.domNode.setMarker(e.item.selection);for(var i=n.i(a.closest)(e.item.selectParent[0],"a"),r=i||e.item.selectParent[0],o=r.parentNode,s=[];r.firstChild;null)s.push(o.insertBefore(r.firstChild,r));o.removeChild(r),s&&1===s.length&&(e.item.selection.startContainer=e.item.selection.getNodeArray(s[s.length-1],!0),e.item.selection.endContainer=e.item.selection.startContainer),e.item.selection=this.parent.domNode.saveMarker(e.item.selection)}else for(var l=0;l<t.length;l++)for(var d=t[l].querySelectorAll("a"),c=0;c<d.length;c++)this.parent.currentDocument.getSelection().containsNode(d[c],!0)&&(d[c].outerHTML=d[c].innerHTML);e.item.selection.restore(),this.callBack(e)},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(7),r=n(0),o=(n.n(r),n(16)),s=n(3),a=n(6),l=function(){function e(e){this.parent=e,this.domNode=this.parent.domNode,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(s.e,this.applyListsHandler,this),this.parent.observer.on(s.f,this.onKeyUp,this),this.parent.observer.on(s.d,this.keyDownHandler,this),this.parent.observer.on(s.m,this.spaceKeyAction,this)},e.prototype.testList=function(e){var t=[/^[\d]+[.]+$/,/^(?=[MDCLXVI])M*(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})[.]$/gi,/^[a-zA-Z][.]+$/],i=n.i(r.isNullOrUndefined)(e)?null:e.innerText.trim().split(".")[0]+".";if(!n.i(r.isNullOrUndefined)(i))for(var o=0;o<t.length;o++)if(t[o].test(i))return!0;return!1},e.prototype.testCurrentList=function(e){var t=[/^[1]+[.]+$/,/^[i]+[.]+$/,/^[a]+[.]+$/];if(!n.i(r.isNullOrUndefined)(e.startContainer.textContent.slice(0,e.startOffset)))for(var i=e.startContainer.textContent.replace(/\u200B/g,"").slice(0,e.startOffset).trim(),o=0;o<t.length;o++)if(t[o].test(i)&&2===i.length)return!0;return!1},e.prototype.spaceList=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument);this.saveSelection=this.parent.nodeSelection.save(t,this.parent.currentDocument);var i=this.parent.domNode.getSelectedNode(t.startContainer,t.startOffset),o=(this.parent.domNode.getSelectedNode(t.endContainer,t.endOffset),i.previousElementSibling),s=i.nextElementSibling,a=n.i(r.isNullOrUndefined)(o)?null:o.innerText.trim().substring(0,1),l=n.i(r.isNullOrUndefined)(s)?null:s.innerText.trim().substring(0,1),d=this.testCurrentList(t),c=this.testList(o),u=this.testList(s);c||u||"*"===a||"*"===l||(d?(t.startContainer.textContent=t.startContainer.textContent.slice(t.startOffset,t.startContainer.textContent.length),this.applyListsHandler({subCommand:"OL",callBack:e.callBack}),e.event.preventDefault()):"*"!==t.startContainer.textContent.replace(/\u200B/g,"").slice(0,t.startOffset).trim()&&"-"!==t.startContainer.textContent.replace(/\u200B/g,"").slice(0,t.startOffset).trim()||(t.startContainer.textContent=t.startContainer.textContent.slice(t.startOffset,t.startContainer.textContent.length),this.applyListsHandler({subCommand:"UL",callBack:e.callBack}),e.event.preventDefault()))},e.prototype.enterList=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i="LI"===t.startContainer.nodeName?t.startContainer:t.startContainer.parentElement.closest("LI"),o="LI"===t.endContainer.nodeName?t.endContainer:t.endContainer.parentElement.closest("LI"),s=!1;if(!n.i(r.isNullOrUndefined)(i)){var a=i.querySelectorAll(".e-video-clickelem"),l=a.length>0&&"IFRAME"===a[0].childNodes[0].nodeName;s=i.querySelectorAll("IMG").length>0||i.querySelectorAll("AUDIO").length>0||i.querySelectorAll("VIDEO").length>0||l}if(!n.i(r.isNullOrUndefined)(i)&&!n.i(r.isNullOrUndefined)(o)&&i===o&&"LI"===i.tagName&&""===i.textContent.trim()&&!s){if(i.innerHTML.indexOf(" ")>=0)return;65279===i.textContent.charCodeAt(0)&&(i.textContent="");var d=i.parentElement;if(n.i(r.isNullOrUndefined)(d.parentElement.closest("UL"))&&n.i(r.isNullOrUndefined)(d.parentElement.closest("OL"))){if(!n.i(r.isNullOrUndefined)(i.nextElementSibling)){var c=this.parent.domNode.blockParentNode(i);this.parent.nodeCutter.GetSpliceNode(t,c)}var u=void 0;"DIV"===e.enterAction?(u=n.i(r.createElement)("div"),u.innerHTML="<br>"):"P"===e.enterAction?(u=n.i(r.createElement)("p"),u.innerHTML="<br>"):u=n.i(r.createElement)("br"),this.parent.domNode.insertAfter(u,d),e.event.preventDefault(),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,u,0),""===d.textContent&&0===d.querySelectorAll("audio,video").length?n.i(r.detach)(d):n.i(r.detach)(i)}}},e.prototype.backspaceList=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=this.parent.domNode.getSelectedNode(t.startContainer,t.startOffset),o=this.parent.domNode.getSelectedNode(t.endContainer,t.endOffset);if(i="BR"===i.nodeName?i.parentElement:i,o="BR"===o.nodeName?o.parentElement:o,i===o&&!n.i(r.isNullOrUndefined)(n.i(r.closest)(i,"li"))&&(""===i.textContent.trim()&&65279===i.textContent.charCodeAt(0)||1===i.textContent.length&&8203===i.textContent.charCodeAt(0))&&(i.textContent=""),i===o&&"LI"===i.tagName&&0===i.textContent.length&&n.i(r.isNullOrUndefined)(i.previousElementSibling)&&i.removeAttribute("style"),i===o&&""===i.textContent){if("LI"===i.parentElement.tagName&&"LI"===o.parentElement.tagName)n.i(r.detach)(i);else if(i.closest("ul")||i.closest("ol")){var s=n.i(r.isNullOrUndefined)(i.closest("ul"))?i.closest("ol"):i.closest("ul");if(s.firstElementChild===i&&!n.i(r.isNullOrUndefined)(s.children[1])&&("OL"===s.children[1].tagName||"UL"===s.children[1].tagName))if(s.tagName===s.children[1].tagName){for(;s.children[1].lastChild;)this.parent.domNode.insertAfter(s.children[1].lastChild,s.children[1]);n.i(r.detach)(s.children[1])}else s.parentElement.insertBefore(s.children[1],s)}}else if(!(n.i(r.isNullOrUndefined)(i.firstChild)||"BR"!==i.firstChild.nodeName||n.i(r.isNullOrUndefined)(i.childNodes[1])||"UL"!==i.childNodes[1].nodeName&&"OL"!==i.childNodes[1].nodeName)){var s=n.i(r.isNullOrUndefined)(i.closest("ul"))?i.closest("ol"):i.closest("ul");if(s.tagName===i.childNodes[1].nodeName){for(;i.childNodes[1].lastChild;)this.parent.domNode.insertAfter(i.children[1].lastChild,i);n.i(r.detach)(i.childNodes[1])}else s.parentElement.insertBefore(i.children[1],s)}this.removeList(t,e),this.firstListBackSpace(t,e)},e.prototype.removeList=function(e,t){var i=this.parent.domNode.getSelectedNode(e.startContainer,e.startOffset),o=this.parent.domNode.getSelectedNode(e.endContainer,e.endOffset);i="BR"===i.nodeName?i.parentElement:i,o="BR"===o.nodeName?o.parentElement:o,i="LI"===i.nodeName||n.i(r.isNullOrUndefined)(i.closest("LI"))?i:i.closest("LI"),o="LI"===o.nodeName||n.i(r.isNullOrUndefined)(o.closest("LI"))?o:o.closest("LI"),(("OL"===e.commonAncestorContainer.nodeName||"UL"===e.commonAncestorContainer.nodeName||"LI"===e.commonAncestorContainer.nodeName)&&n.i(r.isNullOrUndefined)(o.nextElementSibling)&&o.textContent.length===e.endOffset&&n.i(r.isNullOrUndefined)(i.previousElementSibling)&&0===e.startOffset||-1!==r.Browser.userAgent.indexOf("Firefox")&&e.startContainer===e.endContainer&&e.startContainer===this.parent.editableElement&&0===e.startOffset&&1===e.endOffset)&&(-1!==r.Browser.userAgent.indexOf("Firefox")?n.i(r.detach)(e.commonAncestorContainer.childNodes[0]):"LI"===e.commonAncestorContainer.nodeName?n.i(r.detach)(e.commonAncestorContainer.parentElement):n.i(r.detach)(e.commonAncestorContainer),t.event.preventDefault())},e.prototype.onKeyUp=function(){if(!n.i(r.isNullOrUndefined)(this.commonLIParent)&&!n.i(r.isNullOrUndefined)(this.commonLIParent.querySelector(".removeList"))){for(var e=this.commonLIParent.querySelector(".removeList");!n.i(r.isNullOrUndefined)(e.firstChild);)this.parent.domNode.insertAfter(e.firstChild,e);n.i(r.detach)(e)}},e.prototype.firstListBackSpace=function(e,t){var i=this.parent.domNode.getSelectedNode(e.startContainer,e.startOffset);if(n.i(r.isNullOrUndefined)(i.closest("OL"))?n.i(r.isNullOrUndefined)(i.closest("UL"))||(this.commonLIParent=i.closest("UL")):this.commonLIParent=i.closest("OL"),"LI"===i.nodeName&&0===e.startOffset&&0===e.endOffset&&n.i(r.isNullOrUndefined)(i.previousSibling)&&!n.i(r.isNullOrUndefined)(this.commonLIParent)&&n.i(r.isNullOrUndefined)(this.commonLIParent.previousSibling)&&n.i(r.isNullOrUndefined)(this.commonLIParent.parentElement.closest("OL"))&&n.i(r.isNullOrUndefined)(this.commonLIParent.parentElement.closest("UL"))&&n.i(r.isNullOrUndefined)(this.commonLIParent.parentElement.closest("LI"))){var o=n.i(r.createElement)("P");o.innerHTML="​",i.classList.add("removeList"),this.commonLIParent.parentElement.insertBefore(o,this.commonLIParent)}},e.prototype.keyDownHandler=function(e){if(13===e.event.which&&this.enterList(e),32===e.event.which&&this.spaceList(e),8===e.event.which&&this.backspaceList(e),46===e.event.which&&"delete"===e.event.action){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),o=t.commonAncestorContainer,s=t.startContainer,a=t.endContainer,l=3===s.nodeType?s.parentElement:s,d=3===a.nodeType?a.parentElement:a;"UL"!==o.nodeName&&"OL"!==o.nodeName||l===d||n.i(r.isNullOrUndefined)(n.i(r.closest)(l,"ul"))&&n.i(r.isNullOrUndefined)(n.i(r.closest)(l,"ol"))||n.i(r.isNullOrUndefined)(n.i(r.closest)(d,"ul"))&&n.i(r.isNullOrUndefined)(n.i(r.closest)(d,"ol"))||o.lastElementChild!==n.i(r.closest)(d,"li")||t.collapsed||n.i(r.detach)(o),this.removeList(t,e)}if(9===e.event.which){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument);e.event.action&&"indent"===e.event.action||(this.saveSelection=this.parent.nodeSelection.save(t,this.parent.currentDocument));var c=void 0,u=t.startOffset,h=t.endOffset,l=this.parent.domNode.getSelectedNode(t.startContainer,t.startOffset),d=this.parent.domNode.getSelectedNode(t.endContainer,t.endOffset);if(l===d&&("BR"===l.nodeName||"#text"===l.nodeName)&&i.u.indexOf(l.parentNode.tagName.toLocaleLowerCase())>=0)return;e.event.action&&"indent"===e.event.action||this.domNode.setMarker(this.saveSelection),c=this.domNode.blockNodes();for(var p=[],m=!0,f=0;f<c.length;f++)"LI"===c[f].parentNode.tagName?p.push(c[f].parentNode):"LI"===c[f].tagName&&"P"!==c[f].childNodes[0].tagName&&"OL"!==c[f].childNodes[0].tagName&&"UL"!==c[f].childNodes[0].tagName&&p.push(c[f]);p.length>1||p.length&&(0===u&&0===h||e.ignoreDefault)?(e.event.preventDefault(),e.event.stopPropagation(),this.currentAction=this.getAction(p[0]),e.event.shiftKey?(this.revertList(p,e),this.revertClean()):m=this.nestedList(p),m&&(this.cleanNode(),this.parent.editableElement.focus()),e.event.action&&"indent"===e.event.action||(this.saveSelection=this.domNode.saveMarker(this.saveSelection),this.saveSelection.restore(),e.callBack&&e.callBack({requestType:this.currentAction,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes(),event:e.event}))):e.event.action&&"indent"===e.event.action||(e.event&&e.event.shiftKey&&"Tab"===e.event.key&&(e.event.action="tab"),this.saveSelection=this.domNode.saveMarker(this.saveSelection,e.event.action),this.saveSelection.restore())}else switch(e.event.action){case"ordered-list":this.applyListsHandler({subCommand:"OL",callBack:e.callBack}),e.event.preventDefault();break;case"unordered-list":this.applyListsHandler({subCommand:"UL",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.spaceKeyAction=function(e){32===e.event.which&&this.spaceList(e)},e.prototype.getAction=function(e){return"OL"===e.parentNode.nodeName?"OL":"UL"},e.prototype.revertClean=function(){for(var e=this.parent.editableElement.querySelectorAll("ul, ol"),t=0;t<e.length;t++){var n=e[t].querySelectorAll("ul, ol");if(n.length>0)for(var i=0;i<n.length;i++){var r=n[i].previousSibling;r&&"LI"===r.tagName&&r.appendChild(n[i])}}},e.prototype.noPreviousElement=function(e){var t,i,o=e.querySelectorAll("ol, ul"),s=e.querySelectorAll("li"),a=this.domNode.contents(s[0])[0];if(s.length>0&&("OL"===a.nodeName||"UL"===a.nodeName)?t=s[0]:i=o[0],t)for(var l=this.domNode.contents(e)[0];l&&!this.domNode.isList(l);null){var d=l.nextSibling;n.i(r.prepend)([l],t),n.i(r.setStyleAttribute)(e,{"list-style-type":"none"}),n.i(r.setStyleAttribute)(t,{"list-style-type":""}),l=d}else if(i){var c=n.i(r.createElement)("li");n.i(r.prepend)([c],i);for(var l=this.domNode.contents(e)[0];l&&!this.domNode.isList(l);null){var d=l.nextSibling;c.appendChild(l),l=d}n.i(r.prepend)([i],e.parentNode),n.i(r.detach)(e);var u=n.i(r.createElement)("li",{styles:"list-style-type: none;"});n.i(r.prepend)([u],i.parentNode),n.i(r.append)([i],u)}else{var u=n.i(r.createElement)("li",{styles:"list-style-type: none;"});n.i(r.prepend)([u],e.parentNode);var c=n.i(r.createElement)(e.parentNode.tagName);n.i(r.prepend)([c],u),n.i(r.append)([e],c)}},e.prototype.nestedList=function(e){for(var t=!1,i=0;i<e.length;i++){var o=this.domNode.getPreviousNode(e[i]);if(o){t=!0;var s=void 0,a=void 0,l=e[i].querySelectorAll("ol, ul"),d=e[i].querySelectorAll("li"),c=this.domNode.contents(d[0])[0];if(d.length>0&&("OL"===c.nodeName||"UL"===c.nodeName)?a=d[0]:s=l[0],s){var u=n.i(r.createElement)("li");n.i(r.prepend)([u],s);for(var h=this.domNode.contents(e[i])[0];h&&!this.domNode.isList(h);null){var p=h.nextSibling;u.appendChild(h),h=p}n.i(r.append)([s],o),n.i(r.detach)(e[i])}else if(a){if("LI"===o.tagName){for(var h=this.domNode.contents(e[i])[0];h&&!this.domNode.isList(h);null){var p=h.nextSibling;n.i(r.prepend)([h],a),n.i(r.setStyleAttribute)(e[i],{"list-style-type":"none"}),n.i(r.setStyleAttribute)(a,{"list-style-type":""}),h=p}n.i(r.append)([a.parentNode],o),n.i(r.detach)(e[i])}}else if("LI"===o.tagName){var u=n.i(r.createElement)(e[i].parentNode.tagName);n.i(r.append)([u],o),n.i(r.append)([e[i]],u)}else"OL"!==o.tagName&&"UL"!==o.tagName||n.i(r.append)([e[i]],o)}else{var m=e[i];t=!0,this.noPreviousElement(m)}}return t},e.prototype.applyListsHandler=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument);if(-1!==r.Browser.userAgent.indexOf("Firefox")&&t.startContainer===t.endContainer&&t.startContainer===this.parent.editableElement){for(var i=t.startContainer.childNodes,o=i[t.startOffset>0?t.startOffset-1:t.startOffset]||t.startContainer,s=t.endContainer.childNodes[t.endOffset>0?t.endOffset-1:t.endOffset]||t.endContainer,a="BR"===s.lastChild.nodeName?n.i(r.isNullOrUndefined)(s.lastChild.previousSibling)?s:s.lastChild.previousSibling:s.lastChild;!n.i(r.isNullOrUndefined)(a)&&"#text"!==a.nodeName&&"IMG"!==a.nodeName&&"BR"!==a.nodeName&&"HR"!==a.nodeName;)a=a.lastChild;this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,o,a,0,a.textContent.length),t=this.parent.nodeSelection.getRange(this.parent.currentDocument)}if(t.startContainer===t.endContainer&&t.startContainer===this.parent.editableElement&&t.startOffset===t.endOffset&&0===t.startOffset&&0===this.parent.editableElement.textContent.length&&"TABLE"!==this.parent.editableElement.childNodes[0].nodeName&&"IMG"!==this.parent.editableElement.childNodes[0].nodeName){var l=t.startContainer.childNodes[0];this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,l,l,0,0),t=this.parent.nodeSelection.getRange(this.parent.currentDocument)}this.saveSelection=this.parent.nodeSelection.save(t,this.parent.currentDocument),this.currentAction=e.subCommand,this.currentAction=e.subCommand="NumberFormatList"===this.currentAction?"OL":"BulletFormatList"===this.currentAction?"UL":this.currentAction,this.domNode.setMarker(this.saveSelection);var d=this.domNode.blockNodes();if("BR"===e.enterAction){this.setSelectionBRConfig();var c=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),u=this.parent.nodeSelection.getSelectionNodes(c),h=[];0===u.length&&u.push(d[0]);for(var p=0;p<u.length;p++){for(var m=u[p],f=void 0;!this.parent.domNode.isBlockNode(m)&&m!==this.parent.editableElement;)f=m,m=m.parentElement;this.parent.domNode.isBlockNode(m)&&m===this.parent.editableElement&&h.push(f)}for(var p=0;p<h.length;p++)if(!this.parent.domNode.isBlockNode(h[p])){for(var m=h[p],g=m;m===this.parent.editableElement;)g=m,m=m.parentElement;var b=void 0;this.parent.domNode.isBlockNode(g.parentElement)&&g.parentElement===this.parent.editableElement?(b=n.i(r.createElement)("p"),g.parentElement.insertBefore(b,g),b.appendChild(g)):b=g;for(var v=b.previousSibling;!n.i(r.isNullOrUndefined)(v)&&"BR"!==v.nodeName&&!this.parent.domNode.isBlockNode(v);)b.firstChild.parentElement.insertBefore(v,b.firstChild),v=b.previousSibling;n.i(r.isNullOrUndefined)(v)||"BR"!==v.nodeName||n.i(r.detach)(v);for(var C=b.nextSibling;!n.i(r.isNullOrUndefined)(C)&&"BR"!==C.nodeName&&!this.parent.domNode.isBlockNode(C);)b.appendChild(C),C=b.nextSibling;n.i(r.isNullOrUndefined)(C)||"BR"!==C.nodeName||n.i(r.detach)(C)}this.setSelectionBRConfig(),d=this.parent.domNode.blockNodes()}for(var p=0;p<d.length;p++)"TABLE"!==d[p].tagName||t.collapsed||d.splice(p,1),d.length>0&&"LI"!==d[p].tagName&&"LI"===d[p].parentNode.tagName&&(d[p]=d[p].parentNode);this.applyLists(d,this.currentAction,e.selector,e.item,e),e.callBack&&e.callBack({requestType:this.currentAction,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e.prototype.setSelectionBRConfig=function(){var e=this.parent.editableElement.querySelector("."+o.a.startSelection),t=this.parent.editableElement.querySelector("."+o.a.endSelection);n.i(r.isNullOrUndefined)(t)?this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e,0):this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,e,t,0,0)},e.prototype.applyLists=function(e,t,o,s,l){if(this.isRevert(e,t,s)&&n.i(r.isNullOrUndefined)(s))this.revertList(e,l),this.removeEmptyListElements();else{this.checkLists(e,t,s);for(var d=0;d<e.length;d++)if(n.i(r.isNullOrUndefined)(s)||n.i(r.isNullOrUndefined)(s.listStyle)||("listImage"===s.listStyle?n.i(r.setStyleAttribute)(e[d],{"list-style-image":s.listImage}):(n.i(r.setStyleAttribute)(e[d],{"list-style-image":"none"}),n.i(r.setStyleAttribute)(e[d],{"list-style-type":s.listStyle.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}))),"true"===e[d].getAttribute("contenteditable")&&1===e[d].childNodes.length&&"TABLE"===e[d].childNodes[0].nodeName){var c=document.createElement(t);c.innerHTML="<li><br/></li>",e[d].appendChild(c)}else if("LI"!==e[d].tagName&&n.i(r.isNullOrUndefined)(s)){!1;var u="IMG"===e[d].tagName?"":this.domNode.attributes(e[d]),h="<"+t+">",p="</"+t+">",m="li"+u,f=e[d].tagName.toLowerCase()===i.A?e[d].innerHTML:e[d].outerHTML,g=this.domNode.createTagString(m,null,f),b=h+g+p;this.domNode.replaceWith(e[d],b)}else if(!n.i(r.isNullOrUndefined)(s)&&"LI"!==e[d].tagName){!1;var u="IMG"===e[d].tagName?"":this.domNode.attributes(e[d]),h="<"+t+u+">",p="</"+t+">",m="li",f=e[d].tagName.toLowerCase()===i.A?e[d].innerHTML:e[d].outerHTML,g=this.domNode.createTagString(m,null,f),b=h+g+p;this.domNode.replaceWith(e[d],b)}}this.cleanNode(),this.parent.editableElement.focus(),n.i(a.b)()&&n.i(a.c)(this.parent.editableElement,o),this.saveSelection=this.domNode.saveMarker(this.saveSelection),this.saveSelection.restore()},e.prototype.removeEmptyListElements=function(){for(var e=this.parent.editableElement.querySelectorAll("ol, ul"),t=0;t<e.length;t++)""===e[t].textContent.trim()&&n.i(r.detach)(e[t])},e.prototype.isRevert=function(e,t,i){for(var o=!0,s=0;s<e.length;s++){if("LI"!==e[s].tagName)return!1;(e[s].parentNode.tagName!==t||n.i(r.isNullOrUndefined)(i)&&""!==e[s].parentNode.style.listStyleType)&&(o=!1)}return o},e.prototype.checkLists=function(e,t,i){for(var o=[],s=0;s<e.length;s++){var a=e[s].parentNode;n.i(r.isNullOrUndefined)(i)||"LI"!==e[s].tagName||n.i(r.isNullOrUndefined)(i.listStyle)||("listImage"===i.listStyle?n.i(r.setStyleAttribute)(a,{"list-style-image":i.listImage}):(n.i(r.setStyleAttribute)(a,{"list-style-image":"none"}),n.i(r.setStyleAttribute)(a,{"list-style-type":i.listStyle.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}))),("LI"===e[s].tagName&&a.tagName!==t&&o.indexOf(a)<0||"LI"===e[s].tagName&&a.tagName===t&&o.indexOf(a)<0&&null!==i)&&o.push(a),n.i(r.isNullOrUndefined)(i)&&(a.tagName===t||("UL"===a.tagName||"OL"===a.tagName)&&a.hasAttribute("style"))&&a.hasAttribute("style")&&a.removeAttribute("style")}for(var l=o.length-1;l>=0;l--){var d=o[l],c="<"+t.toLowerCase()+" "+this.domNode.attributes(d)+">"+d.innerHTML+"</"+t.toLowerCase()+">";this.domNode.replaceWith(o[l],c)}},e.prototype.cleanNode=function(){for(var e=this.parent.editableElement.querySelectorAll("ol + ol, ul + ul"),t=0;t<e.length;t++){var i=e[t];if(this.domNode.isList(i.previousElementSibling)&&this.domNode.openTagString(i)===this.domNode.openTagString(i.previousElementSibling)){for(var o=this.domNode.contents(i),s=0;s<o.length;s++)i.previousElementSibling.appendChild(o[s]);i.parentNode.removeChild(i)}else n.i(r.isNullOrUndefined)(i.getAttribute("level"))||i.tagName===i.previousElementSibling.tagName&&i.previousElementSibling.lastChild.append(i)}},e.prototype.findUnSelected=function(e,t){if(e=e.slice().reverse(),e.length>0){var n=[],i=[],r=t[t.length-1],o=[],s=[];o=r.childNodes;for(var a=0;a<o.length;a++)if("OL"===o[a].tagName||"UL"===o[a].tagName){var l=o[a].querySelectorAll("li");if(l.length>0)for(var d=0;d<l.length;d++)s.push(l[d])}for(var c=0;c<s.length;c++){for(var u=0,h=0;h<e.length;h++)s[c].contains(e[h])||(u+=1);u===e.length&&i.push(s[c])}if(i.length>0)for(var p=0;p<i.length;p++)"OL"!==this.domNode.contents(i[p])[0].nodeName&&"UL"!==this.domNode.contents(i[p])[0].nodeName&&n.push(i[p]);n.length>0&&this.nestedList(n)}},e.prototype.revertList=function(e,t){for(var s=[],a=e.length-1;a>=0;a--)for(var l=a-1;l>=0;l--)if(e[l].contains(e[a])||e[l]===e[a]){s.push(e[a]),e.splice(a,1);break}this.findUnSelected(s,e);for(var d=[],a=0;a<e.length;a++){var c=e[a];3===this.domNode.contents(c)[0].nodeType&&0===this.domNode.contents(c)[0].textContent.trim().length&&n.i(r.detach)(this.domNode.contents(c)[0]);var u=e[a].parentNode,h=c.getAttribute("class");if(0===s.length){var p=e[a].querySelectorAll("ul, ol"),m=p[0];if(m){if(m.querySelectorAll("li")){var f=n.i(r.createElement)(m.tagName);n.i(r.append)([f],m.parentNode);var g=n.i(r.createElement)("li",{styles:"list-style-type: none;"});n.i(r.append)([g],f),n.i(r.append)([m],g)}}}if(c.parentNode.insertBefore(this.closeTag(u.tagName),c),"LI"===u.parentNode.tagName||"OL"===u.parentNode.tagName||"UL"===u.parentNode.tagName)c.parentNode.insertBefore(this.closeTag("LI"),c);else{var b="";if(h&&(b+=' class="'+h+'"'),i.A&&0===c.querySelectorAll(i.a.join(", ")).length){var v=n.i(r.isNullOrUndefined)(h)?' class="e-rte-wrap-inner"':' class="'+h+' e-rte-wrap-inner"',C="<"+i.A+v+this.domNode.attributes(u)+"></"+i.A+">";"BR"!==t.enterAction&&this.domNode.wrapInner(c,this.domNode.parseHTMLFragment(C))}else if(3===this.domNode.contents(c)[0].nodeType){var y=this.domNode.createTagString(i.A,u,this.parent.domNode.encode(this.domNode.contents(c)[0].textContent));this.domNode.replaceWith(this.domNode.contents(c)[0],y)}else if(this.domNode.contents(c)[0].classList.contains(o.a.startSelection)||this.domNode.contents(c)[0].classList.contains(o.a.endSelection)){var y=this.domNode.createTagString(i.A,u,this.domNode.contents(c)[0].outerHTML);this.domNode.replaceWith(this.domNode.contents(c)[0],y)}else{var N=c.firstChild;h=N.getAttribute("class"),n.i(r.attributes)(N,this.domNode.rawAttributes(u)),h&&N.getAttribute("class")&&n.i(r.attributes)(N,{class:h+" "+N.getAttribute("class")})}n.i(r.append)([this.openTag("LI")],c),n.i(r.prepend)([this.closeTag("LI")],c)}this.domNode.insertAfter(this.openTag(u.tagName),c),"LI"===u.parentNode.tagName&&(u=u.parentNode.parentNode),d.indexOf(u)<0&&d.push(u)}for(var a=0;a<d.length;a++){var S=d[a],E=S.innerHTML,T=/<span class="e-rte-list-close-([a-z]*)"><\/span>/g,O=/<span class="e-rte-list-open-([a-z]*)"><\/span>/g;E=E.replace(T,"</$1>"),E=E.replace(O,"<$1 "+this.domNode.attributes(S)+">"),this.domNode.replaceWith(S,this.domNode.openTagString(S)+E.trim()+this.domNode.closeTagString(S))}for(var w=this.parent.editableElement.querySelectorAll("ul:empty, ol:empty"),a=0;a<w.length;a++)n.i(r.detach)(w[a]);for(var k=this.parent.editableElement.querySelectorAll("li:empty"),a=0;a<k.length;a++)n.i(r.detach)(k[a])},e.prototype.openTag=function(e){return this.domNode.parseHTMLFragment('<span class="e-rte-list-open-'+e.toLowerCase()+'"></span>')},e.prototype.closeTag=function(e){return this.domNode.parseHTMLFragment('<span class="e-rte-list-close-'+e.toLowerCase()+'"></span>')},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(3),r=n(0),o=(n.n(r),function(){function e(e){this.olData=["decimal","lower-alpha","lower-roman","upper-alpha","upper-roman","lower-greek"],this.ulData=["disc","square","circle","disc","square","circle"],this.ignorableNodes=["A","APPLET","B","BLOCKQUOTE","BR","BUTTON","CENTER","CODE","COL","COLGROUP","DD","DEL","DFN","DIR","DIV","DL","DT","EM","FIELDSET","FONT","FORM","FRAME","FRAMESET","H1","H2","H3","H4","H5","H6","HR","I","IMG","IFRAME","INPUT","INS","LABEL","LI","OL","OPTION","P","PARAM","PRE","Q","S","SELECT","SPAN","STRIKE","STRONG","SUB","SUP","TABLE","TBODY","TD","TEXTAREA","TFOOT","TH","THEAD","TITLE","TR","TT","U","UL"],this.blockNode=["div","p","h1","h2","h3","h4","h5","h6","address","blockquote","button","center","dd","dir","dl","dt","fieldset","frameset","hr","iframe","isindex","li","map","menu","noframes","noscript","object","ol","pre","table","tbody","td","tfoot","th","thead","tr","ul","header","article","nav","footer","section","aside","main","figure","figcaption"],this.borderStyle=["border-top","border-right","border-bottom","border-left"],this.upperRomanNumber=["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","XIII","XIV","XV","XVI","XVII","XVIII","XIX","XX"],this.lowerRomanNumber=["i","ii","iii","iv","v","vi","vii","viii","ix","x","xi","xii","xiii","xiv","xv","xvi","xvii","xviii","xix","xx"],this.lowerGreekNumber=["α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","σ","τ","υ","φ","χ","ψ","ω"],this.removableElements=["o:p","style"],this.listContents=[],this.cropImageDimensions=[],this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.j,this.wordCleanup,this)},e.prototype.wordCleanup=function(e){var t=n.i(r.isNullOrUndefined)(e.allowedStylePropertiesArray)?[]:e.allowedStylePropertiesArray,i=[],o=e.args.clipboardData.getData("text/HTML"),s=e.args.clipboardData.getData("text/rtf"),a=n.i(r.createElement)("p");a.setAttribute("id","MSWord-Content"),a.innerHTML=o;var l=/class='?Mso|style='[^ ]*\bmso-/i,d=/class="?Mso|style="[^ ]*\bmso-/i,c=/(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument)/gi,u=/style='mso-width-source:/i;if(l.test(o)||d.test(o)||c.test(o)||u.test(o)){this.imageConversion(a,s),o=o.replace(/<img[^>]+>/i,""),this.addListClass(a),i=this.cleanUp(a,i),n.i(r.isNullOrUndefined)(i[0])||"UL"===i[0].parentElement.tagName||"OL"===i[0].parentElement.tagName||this.listConverter(i),this.cleanList(a,"UL"),this.cleanList(a,"OL"),this.styleCorrection(a,t),this.removingComments(a),this.removeUnwantedElements(a),this.removeEmptyElements(a),this.removeEmptyAnchorTag(a),this.breakLineAddition(a),this.removeClassName(a),u.test(o)&&this.addTableBorderClass(a);var h=a.querySelectorAll("li");if(h.length>0)for(var p=0;p<h.length;p++)n.i(r.isNullOrUndefined)(h[p].style.marginLeft)||(h[p].style.marginLeft="");e.callBack(a.innerHTML,this.cropImageDimensions)}else e.callBack(a.innerHTML)},e.prototype.cleanList=function(e,t){for(var n=e.querySelectorAll(t+" div"),i=n.length-1;i>=0;i--){for(var r=n[i].parentNode;n[i].firstChild;)r.insertBefore(n[i].firstChild,n[i]);var o=this.findClosestListElem(n[i]);o&&this.insertAfter(n[i],o)}},e.prototype.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e.prototype.findClosestListElem=function(e){for(var t;!n.i(r.isNullOrUndefined)(e);)e=n.i(r.isNullOrUndefined)(e.closest("ul"))||"UL"===e.tagName?"OL"!==e.tagName?e.closest("ol"):null:e.closest("ul"),t=n.i(r.isNullOrUndefined)(e)?t:e;return t},e.prototype.addListClass=function(e){for(var t=e.querySelectorAll("*"),i=0;i<t.length;i++)!n.i(r.isNullOrUndefined)(t[i].getAttribute("style"))&&t[i].getAttribute("style").replace(/ /g,"").replace("\n","").indexOf("mso-list:l")>=0&&-1===t[i].className.toLowerCase().indexOf("msolistparagraph")&&"H"!==t[i].tagName.charAt(0)&&"LI"!==t[i].tagName&&"OL"!==t[i].tagName&&"UL"!==t[i].tagName&&t[i].classList.add("msolistparagraph")},e.prototype.addTableBorderClass=function(e){for(var t=e.querySelectorAll("table"),n=!1,i=0;i<t.length;i++){for(var r=0;r<this.borderStyle.length;r++)if(t[i].innerHTML.indexOf(this.borderStyle[r])>=0){n=!0;break}n&&(t[i].classList.add("e-rte-table-border"),n=!1)}},e.prototype.imageConversion=function(e,t){this.checkVShape(e);for(var i=e.querySelectorAll("img"),o=0;o<i.length;o++)!n.i(r.isNullOrUndefined)(i[o].getAttribute("v:shapes"))&&i[o].getAttribute("v:shapes").indexOf("Picture")<0&&i[o].getAttribute("v:shapes").indexOf("圖片")<0&&i[o].getAttribute("v:shapes").indexOf("Grafik")<0&&i[o].getAttribute("v:shapes").toLowerCase().indexOf("image")<0&&i[o].getAttribute("v:shapes").indexOf("Graphic")<0&&i[o].getAttribute("v:shapes").indexOf("_x0000_s")<0&&i[o].getAttribute("v:shapes").indexOf("_x0000_i")<0&&n.i(r.detach)(i[o]);i=e.querySelectorAll("img");var s=[],a=[],l=[],d=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);if(i.length>0){for(var o=0;o<i.length;o++)s.push(i[o].getAttribute("src")),l.push(i[o].getAttribute("src").split("/")[i[o].getAttribute("src").split("/").length-1].split(".")[0]);for(var c=this.hexConversion(t),o=0;o<c.length;o++)a.push({base64Data:n.i(r.isNullOrUndefined)(c[o].hex)?null:this.convertToBase64(c[o]),isCroppedImage:c[o].isCroppedImage}),c[o].isCroppedImage&&this.cropImageDimensions.push({goalWidth:c[o].goalWidth,goalHeight:c[o].goalHeight,cropLength:c[o].cropLength,cropTop:c[o].cropTop,cropR:c[o].cropR,cropB:c[o].cropB});for(var o=0;o<i.length;o++)s[o].match(d)?i[o].setAttribute("src",s[o]):(n.i(r.isNullOrUndefined)(a[o])||n.i(r.isNullOrUndefined)(a[o].base64Data)?(i[o].removeAttribute("src"),i[o].setAttribute("alt","Unsupported file format")):i[o].setAttribute("src",a[o].base64Data),!n.i(r.isNullOrUndefined)(a[o])&&a[o].isCroppedImage&&i[o].classList.add("e-img-cropped")),i[o].setAttribute("id","msWordImg-"+l[o])}},e.prototype.checkVShape=function(e){for(var t=e.querySelectorAll("*"),i=0;i<t.length;i++)switch(t[i].nodeName){case"V:SHAPETYPE":n.i(r.detach)(t[i]);break;case"V:SHAPE":if("V:IMAGEDATA"===t[i].firstElementChild.nodeName){var o=t[i].firstElementChild.getAttribute("src"),s=n.i(r.createElement)("img");s.setAttribute("src",o),t[i].parentElement.insertBefore(s,t[i]),n.i(r.detach)(t[i])}}},e.prototype.convertToBase64=function(e){var t=this.conHexStringToBytes(e.hex),n=this.conBytesToBase64(t);return e.type?"data:"+e.type+";base64,"+n:null},e.prototype.conBytesToBase64=function(e){for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=e.length,r=0;r<i;r+=3){var o=e.slice(r,r+3),s=o.length,a=[];if(s<3)for(var l=s;l<3;l++)o[l]=0;a[0]=(252&o[0])>>2,a[1]=(3&o[0])<<4|o[1]>>4,a[2]=(15&o[1])<<2|(192&o[2])>>6,a[3]=63&o[2];for(var l=0;l<4;l++)t+=l<=s?n.charAt(a[l]):"="}return t},e.prototype.conHexStringToBytes=function(e){for(var t=[],n=e.length/2,i=0;i<n;i++)t.push(parseInt(e.substr(2*i,2),16));return t},e.prototype.hexConversion=function(e){var t,i=/\{\\pict[\s\S]+?\\bliptag\-?\d+(\\blipupi\-?\d+)?(\{\\\*\\blipuid\s?[\da-fA-F]+)?[\s\}]*?/,o=new RegExp("(?:("+i.source+"))([\\da-fA-F\\s]+)\\}","g"),s=e.match(o),a=[];if(!n.i(r.isNullOrUndefined)(s))for(var l=0;l<s.length;l++){var d=!1,c=0,u=0,h=0,p=0,m=0,f=0;if(i.test(s[l])){if(-1!==s[l].indexOf("\\pngblip"))t="image/png";else if(-1!==s[l].indexOf("\\jpegblip"))t="image/jpeg";else{if(-1===s[l].indexOf("\\picprop"))continue;t=null}d=!!(this.extractCropValue("cropl",s[l])>0&&this.extractCropValue("cropt",s[l])>0||this.extractCropValue("cropr",s[l])>0||this.extractCropValue("cropb",s[l])),d&&(c=this.extractCropValue("wgoal",s[l]),u=this.extractCropValue("hgoal",s[l]),h=this.extractCropValue("cropl",s[l]),p=this.extractCropValue("cropt",s[l]),m=this.extractCropValue("cropr",s[l]),f=this.extractCropValue("cropb",s[l])),a.push({hex:t?s[l].replace(i,"").replace(/[^\da-fA-F]/g,""):null,type:t,isCroppedImage:d,goalWidth:c,goalHeight:u,cropLength:h,cropTop:p,cropR:m,cropB:f})}}return a},e.prototype.extractCropValue=function(e,t){var n=new RegExp("\\\\pic"+e+"(\\-?\\d+)\\\\").exec(t.replace(/\r\n\\/g,"\\").replace(/\n/g,"\\"))[1];return parseInt(n,10)},e.prototype.removeClassName=function(e){for(var t=e.querySelectorAll("*[class]:not(.e-img-cropped)"),n=0;n<t.length;n++)t[n].removeAttribute("class")},e.prototype.breakLineAddition=function(e){for(var t=e.querySelectorAll("*"),i=0;i<t.length;i++)if(0===t[i].children.length&&" "===t[i].innerHTML&&" "===t[i].innerHTML&&!t[i].closest("li")&&!t[i].closest("td")&&("SPAN"!==t[i].nodeName||"SPAN"===t[i].nodeName&&n.i(r.isNullOrUndefined)(t[i].previousElementSibling)&&n.i(r.isNullOrUndefined)(t[i].nextElementSibling))){var o=this.findDetachElem(t[i]),s=n.i(r.createElement)("br"),a=o.textContent.length>0&&o.textContent.match(/\u00a0/g)&&o.textContent.match(/\u00a0/g).length>0;a||n.i(r.isNullOrUndefined)(o.parentElement)||(o.parentElement.insertBefore(s,o),n.i(r.detach)(o))}},e.prototype.findDetachElem=function(e){return!n.i(r.isNullOrUndefined)(e.parentElement)&&""===e.parentElement.textContent.trim()&&"TD"!==e.parentElement.tagName&&n.i(r.isNullOrUndefined)(e.parentElement.querySelector("img"))?this.findDetachElem(e.parentElement):e},e.prototype.removeUnwantedElements=function(e){var t=e.querySelector("style");n.i(r.isNullOrUndefined)(t)||n.i(r.detach)(t);for(var i=e.innerHTML,o=0;o<this.removableElements.length;o++){var s=new RegExp("<"+this.removableElements[o]+">","g"),a=new RegExp("</"+this.removableElements[o]+">","g");i=i.replace(s,""),i=i.replace(a,"")}e.innerHTML=i,e.querySelectorAll(":empty")},e.prototype.findDetachEmptyElem=function(e){var t;if(n.i(r.isNullOrUndefined)(e.parentElement))t=null;else{t=e.parentElement.textContent.length>0&&e.parentElement.textContent.match(/\u00a0/g)&&e.parentElement.textContent.match(/\u00a0/g).length>0||""!==e.parentElement.textContent.trim()||"MSWord-Content"===e.parentElement.getAttribute("id")||this.hasParentWithClass(e,"MsoListParagraph")||!n.i(r.isNullOrUndefined)(e.parentElement.querySelector("img"))?e:this.findDetachEmptyElem(e.parentElement)}return t},e.prototype.hasParentWithClass=function(e,t){for(var i=e.parentElement;!n.i(r.isNullOrUndefined)(i);){if(i.classList.contains(t))return!0;i=i.parentElement}return!1},e.prototype.removeEmptyElements=function(e){for(var t=e.querySelectorAll(":empty"),i=0;i<t.length;i++){n.i(r.isNullOrUndefined)(t[i].closest("td"))||n.i(r.isNullOrUndefined)(t[i].closest("td").querySelector(".MsoNormal"))||(t[i].innerHTML="-");var o=!0;if("DIV"===t[i].tagName&&(o="none"===t[i].style.borderBottom||""===t[i].style.borderBottom),"IMG"!==t[i].tagName&&"BR"!==t[i].tagName&&"IFRAME"!==t[i].tagName&&"TD"!==t[i].tagName&&"HR"!==t[i].tagName&&o){var s=this.findDetachEmptyElem(t[i]);n.i(r.isNullOrUndefined)(s)||n.i(r.detach)(s)}}},e.prototype.styleCorrection=function(e,t){var i=e.querySelectorAll("style");if(i.length>0){var o=i[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi),s=n.i(r.isNullOrUndefined)(o)?null:this.findStyleObject(o),a=Object.keys(s),l=a.map(function(e){return s[""+e]});l=this.removeUnwantedStyle(l,t),this.filterStyles(e,t);for(var d=void 0,c=!1,u=0;u<a.length;u++){if(""===a[u].split(".")[0])d=e.getElementsByClassName(a[u].split(".")[1]),c=!0;else{if(1===a[u].split(".").length&&a[u].split(".")[0].indexOf("@")>=0)continue;d=1===a[u].split(".").length&&a[u].split(".")[0].indexOf("@")<0?e.getElementsByTagName(a[u]):e.querySelectorAll(a[u])}for(var h=0;h<d.length;h++)if(!d[h].closest("li")||"p"!==a[u]){var p=d[h].getAttribute("style");if(n.i(r.isNullOrUndefined)(p)||""===p.trim())l[u]=l[u].replace(/text-indent:-(.*?)(?=;|$)/gm,""),d[h].setAttribute("style",l[u]);else{var m=l[u].split(";");if(!c)for(var f=0;f<m.length;f++)p.indexOf(m[f].split(":")[0])>=0&&(m.splice(f,1),f--);var g=p+m.join(";")+";";d[h].setAttribute("style",g)}}c=!1}for(var b=["MsoListParagraphCxSpFirst","MsoListParagraphCxSpMiddle","MsoListParagraphCxSpLast"],u=0;u<b.length;u++)if(a.indexOf("li."+b[u])>-1)for(var v=e.querySelectorAll("ol."+b[u]+", ul."+b[u]),h=0;h<v.length;h++){var p=v[h].getAttribute("style");if(!n.i(r.isNullOrUndefined)(p)&&""!==p.trim()&&""!==v[h].style.marginLeft)for(var m=l[a.indexOf("li."+b[u])].split(";"),f=0;f<m.length;f++)if("margin-left".indexOf(m[f].split(":")[0])>=0&&!n.i(r.isNullOrUndefined)(m[f].split(":")[1])&&m[f].split(":")[1].indexOf("in")>=0&&v[h].style.marginLeft.indexOf("in")>=0){var C=parseFloat(m[f].split(":")[1].split("in")[0]),y=parseFloat(v[h].style.marginLeft.split("in")[0]);v[h].style.marginLeft=y-C+"in"}}}},e.prototype.filterStyles=function(e,t){for(var n=e.querySelectorAll("*[style]"),i=0;i<n.length;i++){for(var r=n[i].getAttribute("style").split(";"),o="",s=0;s<r.length;s++)t.indexOf(r[s].split(":")[0].trim())>=0&&(o+=r[s]+";");n[i].setAttribute("style",o)}},e.prototype.removeUnwantedStyle=function(e,t){for(var n=0;n<e.length;n++){var i=e[n].split(";");e[n]="";for(var r=0;r<i.length;r++)t.indexOf(i[r].split(":")[0])>=0&&(e[n]+=i[r]+";")}return e},e.prototype.findStyleObject=function(e){for(var t={},n=0;n<e.length;n++){var i=e[n],r=i.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),o=i.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");r=r.replace(/^[\s]|[\s]$/gm,""),o=o.replace(/^[\s]|[\s]$/gm,""),r=r.replace(/\n|\r|\n\r/g,""),o=o.replace(/\n|\r|\n\r/g,"");for(var s=r.split(", "),a=0;a<s.length;a++)t[s[a]]=o}return t},e.prototype.removingComments=function(e){var t=e.innerHTML;t=t.replace(/<!--[\s\S]*?-->/g,""),e.innerHTML=t},e.prototype.cleanUp=function(e,t){for(var i,o=[],s=e.querySelectorAll("*"),a=0;a<s.length;a++)-1===this.ignorableNodes.indexOf(s[a].nodeName)||3===s[a].nodeType&&""===s[a].textContent.trim()?o.push(s[a]):(s[a].className&&-1!==s[a].className.toLowerCase().indexOf("msolistparagraph")&&!n.i(r.isNullOrUndefined)(s[a].getAttribute("style"))&&s[a].getAttribute("style").indexOf("mso-list:")>=0&&(s[a].className.indexOf("MsoListParagraphCxSpFirst")>=0&&t.length>0&&null!==t[t.length-1]&&t.push(null),t.push(s[a])),!i||-1===this.blockNode.indexOf(s[a].nodeName.toLowerCase())||s[a].className&&-1!==s[a].className.toLowerCase().indexOf("msolistparagraph")&&!n.i(r.isNullOrUndefined)(s[a].getAttribute("style"))&&s[a].getAttribute("style").indexOf("mso-list:")>=0||t.push(null),-1!==this.blockNode.indexOf(s[a].nodeName.toLowerCase())&&(i=!!(s[a].className&&-1!==s[a].className.toLowerCase().indexOf("msolistparagraph")&&!n.i(r.isNullOrUndefined)(s[a].getAttribute("style"))&&s[a].getAttribute("style").indexOf("mso-list:")>=0)));return t.length&&null!==t[t.length-1]&&t.push(null),t},e.prototype.listConverter=function(e){for(var t,i,o=[],s=[],a="",l="",d=0;d<e.length;d++)if(null!==e[d]){e[d].getAttribute("style")&&-1!==e[d].getAttribute("style").indexOf("mso-outline-level")&&e[d].setAttribute("style",e[d].getAttribute("style").replace("mso-outline-level","mso-outline")),a=e[d].getAttribute("style"),t=a&&-1!==a.indexOf("level")?parseInt(a.charAt(a.indexOf("level")+5),null):1,this.listContents=[],this.getListContent(e[d]);var c=void 0,u=void 0,h=void 0,p=void 0;if(!n.i(r.isNullOrUndefined)(this.listContents[0])){if(c=this.listContents[0].trim().length>1?"ol":"ul",u=this.getlistStyleType(this.listContents[0],c),"ol"===c&&(0===d||null===e[d-1])){var m=this.listContents[0].split(".")[0],f=["A","a","I","i","α","1","1-"];-1===f.indexOf(m)&&("decimal"===u?isNaN(parseInt(m,10))||(h=parseInt(m,10)):"upper-alpha"===u?h=m.split(".")[0].charCodeAt(0)-64:"lower-alpha"===u?h=m.split(".")[0].charCodeAt(0)-96:"upper-roman"===u?h=this.upperRomanNumber.indexOf(this.listContents[0].split(".")[0])+1:"lower-roman"===u?h=this.lowerRomanNumber.indexOf(this.listContents[0].split(".")[0])+1:"lower-greek"===u&&(h=this.lowerGreekNumber.indexOf(this.listContents[0].split(".")[0])+1)),""!==e[d].style.marginLeft&&(p=e[d].style.marginLeft)}for(var g=[],b=1;b<this.listContents.length;b++)g.push(this.listContents[b]);var v=void 0;n.i(r.isNullOrUndefined)(e[d].className)||(v=e[d].className),n.i(r.isNullOrUndefined)(e[d].getAttribute("style"))||(e[d].setAttribute("style",e[d].getAttribute("style").replace("text-align:start;","")),e[d].style.textIndent="",l=e[d].getAttribute("style")),s.push({listType:c,content:g,nestedLevel:t,class:v,listStyle:l,listStyleTypeName:u,start:h,styleMarginLeft:p})}}else o.push({content:this.makeConversion(s),node:e[d-1]}),s=[];for(i=e.shift();i;){for(var C=[],y=0;y<o.length;y++)if(o[y].node===i){for(var N=0;N<o[y].content.childNodes.length;N++)C.push(o[y].content.childNodes[N]);for(var N=0;N<C.length;N++)i.parentElement.insertBefore(C[N],i);break}i.remove(),i=e.shift(),i||(i=e.shift())}},e.prototype.getlistStyleType=function(e,t){var n;if("ol"===t){var i=e.split(".")[0].charCodeAt(0);switch(!0){case this.upperRomanNumber.indexOf(e.split(".")[0])>-1:n="upper-roman";break;case this.lowerRomanNumber.indexOf(e.split(".")[0])>-1:n="lower-roman";break;case this.lowerGreekNumber.indexOf(e.split(".")[0])>-1:n="lower-greek";break;case i>64&&i<91:n="upper-alpha";break;case i>96&&i<123:n="lower-alpha";break;default:n="decimal"}}else switch(e.split(".")[0]){case"o":n="circle";break;case"§":n="square";break;default:n="disc"}return n},e.prototype.makeConversion=function(e){for(var t,i,o,s=n.i(r.createElement)("div"),a=1,l=0,d=0;d<e.length;d++){for(var c=["MsoListParagraphCxSpFirst","MsoListParagraphCxSpMiddle","MsoListParagraphCxSpLast"],u=!1,h=0;h<c.length;h++)if(c[h].indexOf(e[d].class)>=0){u=!0;break}n.i(r.isNullOrUndefined)(i)||0===d||e[d-1].listType===e[d].listType||u||(i=null);var p=n.i(r.createElement)("p",{className:"MsoNormal"});if(p.innerHTML=e[d].content.join(" "),1===e[d].nestedLevel&&0===l&&e[d].content)s.appendChild(t=n.i(r.createElement)(e[d].listType,{className:e[d].class})),i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString()),t.style.marginLeft=e[d].styleMarginLeft,t.style.listStyleType=e[d].listStyleTypeName;else if(e[d].nestedLevel===a)n.i(r.isNullOrUndefined)(i)||n.i(r.isNullOrUndefined)(i.parentElement)||i.parentElement.tagName.toLowerCase()!==e[d].listType?n.i(r.isNullOrUndefined)(i)?(t=n.i(r.createElement)(e[d].listType),t.style.listStyleType=e[d].listStyleTypeName,i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString()),s.appendChild(t)):(t=n.i(r.createElement)(e[d].listType),t.style.listStyleType=e[d].listStyleTypeName,i.parentElement.parentElement.appendChild(t),i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString())):(i.parentElement.appendChild(i=n.i(r.createElement)("li")),i.appendChild(p));else if(e[d].nestedLevel>a)if(n.i(r.isNullOrUndefined)(i))if(e[d].nestedLevel>a&&u){var m=n.i(r.createElement)(e[d].listType);i=n.i(r.createElement)("li"),m.appendChild(i),m.style.listStyleType="none";for(var f=0;f<e[d].nestedLevel-1;f++)i.appendChild(t=n.i(r.createElement)(e[d].listType)),i=n.i(r.createElement)("li"),t.appendChild(i),t.style.listStyleType="none";i.appendChild(p),s.appendChild(m),t.setAttribute("level",e[d].nestedLevel.toString()),t.style.listStyleType=e[d].listStyleTypeName}else s.appendChild(t=n.i(r.createElement)(e[d].listType)),i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString()),t.style.listStyleType=e[d].listStyleTypeName;else{for(var f=0;f<e[d].nestedLevel-a;f++)i.appendChild(t=n.i(r.createElement)(e[d].listType)),i=n.i(r.createElement)("li"),f!==e[d].nestedLevel-a-1&&e[d].nestedLevel-a>1&&(i.style.listStyleType="none"),t.appendChild(i);i.appendChild(p),t.setAttribute("level",e[d].nestedLevel.toString()),t.style.listStyleType=e[d].listStyleTypeName}else if(1===e[d].nestedLevel)s.lastChild.tagName.toLowerCase()===e[d].listType?t=s.lastChild:(s.appendChild(t=n.i(r.createElement)(e[d].listType)),t.style.listStyleType=e[d].listStyleTypeName),i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString());else for(o=i;o.parentElement;)if(o=o.parentElement,o.attributes.getNamedItem("level")){if(parseInt(o.attributes.getNamedItem("level").textContent,null)===e[d].nestedLevel){i=n.i(r.createElement)("li"),i.appendChild(p),o.appendChild(i);break}if(e[d].nestedLevel>parseInt(o.attributes.getNamedItem("level").textContent,null)){o.appendChild(t=n.i(r.createElement)(e[d].listType)),i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString()),t.style.listStyleType=e[d].listStyleTypeName;break}}i.setAttribute("class",e[d].class),i.setAttribute("style",n.i(r.isNullOrUndefined)(e[d].listStyle)?"":e[d].listStyle),a=e[d].nestedLevel,l++,n.i(r.isNullOrUndefined)(e[d].start)||t.setAttribute("start",e[d].start.toString())}return s},e.prototype.getListContent=function(e){var t="",i=e.firstElementChild;if(""!==i.textContent.trim()||n.i(r.isNullOrUndefined)(i.firstElementChild)||"IMG"!==i.firstElementChild.nodeName){if(i.childNodes.length>0){for(var o=i.querySelectorAll('[style*="mso-list"]'),s=0;s<o.length;s++)o[s].setAttribute("style",o[s].getAttribute("style").replace(/\n/g,""));var a=i.querySelector('span[style="mso-list:Ignore"]');n.i(r.isNullOrUndefined)(a)||(this.listContents.push(a.textContent.trim()),n.i(r.detach)(a),this.removingComments(e),this.removeUnwantedElements(e))}}else t=e.innerHTML.trim(),this.listContents.push(""),this.listContents.push(t);this.listContents.push(e.innerHTML)},e.prototype.removeEmptyAnchorTag=function(e){for(var t=e.querySelectorAll("a:not([href])"),n=t.length-1;n>=0;n--){for(var i=t[n].parentNode;t[n].firstChild;)i.insertBefore(t[n].firstChild,t[n]);i.removeChild(t[n])}},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(11),r=n(12),o=n(19),s=n(22),a=n(6),l=n(0),d=(n.n(l),n(16)),c=function(){function e(){}return e.applyFormat=function(e,t,o,c,u,h,p){if(this.enterAction=c,["bold","italic","underline","strikethrough","superscript","subscript","uppercase","lowercase","fontcolor","fontname","fontsize","backgroundcolor"].indexOf(t)>-1||"formatPainter"===u){"backgroundcolor"===t&&""===u&&(u="transparent");var m=new i.a,f=new d.b(o,e),g=new r.a,b=new s.a,v=m.getRange(e),C=m.save(v,e),y=v.collapsed?m.getSelectionNodeCollection(v):m.getSelectionNodeCollectionBr(v),N=!1,S=!1,E=!1,T=!1,O=["fontcolor","fontname","fontsize","backgroundcolor"].indexOf(t)>-1;if(v.collapsed){var w=b.getFormattedNode(v.startContainer,t,o),k=n.i(l.isNullOrUndefined)(w)?null:null===w.getAttribute("style")?w.nodeName:w.nodeName+"[style='"+w.getAttribute("style")+"']";if(y.length>0)N=!0,v=g.GetCursorRange(e,v,y[0]);else if(3===v.startContainer.nodeType&&(v.startContainer.parentElement.childElementCount>0&&v.startOffset>0&&"br"!==v.startContainer.parentElement.firstElementChild.tagName.toLowerCase()||!n.i(l.isNullOrUndefined)(w)&&w===v.startContainer.parentElement.closest(k)&&0!==v.startContainer.parentElement.closest(k).textContent.replace(new RegExp(String.fromCharCode(8203),"g"),"").trim().length))N=!0,v=g.GetCursorRange(e,v,v.startContainer),y.push(v.startContainer);else{var L=this.insertCursorNode(e,m,v,b,g,t,u,o);m.endContainer=m.startContainer=m.getNodeArray(L,!0);var _="BR"===L.nodeName&&L.parentNode.childNodes;n.i(l.isNullOrUndefined)(_)||1!==_.length||"BR"!==_[0].nodeName||0!==y.length?m.endOffset=m.startOffset=1:(m.setSelectionText(e,v.startContainer,v.endContainer,0,0),T=!0),"BR"===L.nodeName&&0===L.parentNode.textContent.length&&(T=!0)}}E=v.collapsed;for(var x=!1,D=0;D<y.length;D++){var M=b.getFormattedNode(y[D],t,o);null===M&&("subscript"===t?(M=b.getFormattedNode(y[D],"superscript",o),x=null!==M):"superscript"===t&&(M=b.getFormattedNode(y[D],"subscript",o),x=null!==M)),0===D&&null===M&&(S=!0),y[D]=null===M||S&&!O?this.insertFormat(e,y,D,M,E,S,O,v,g,t,u,p,f,o):this.removeFormat(y,D,M,E,S,O,v,g,t,u,m,o,f),m=this.applySelection(y,m,g,D,N)}n.i(a.b)()&&n.i(a.c)(o,h),T||C.restore(),x&&this.applyFormat(e,t,o,c)}},e.insertCursorNode=function(e,t,i,r,s,a,c,u){var h=t.getNodeCollection(i),p=new d.b(u,e),m=h.length>0?h.length>1&&i.startContainer===i.endContainer?this.getCursorFormat(r,h,a,u):r.getFormattedNode(h[0],a,u):null,f=null;if(m){if(f=h[0],8203===m.firstChild.textContent.charCodeAt(0)&&3===m.firstChild.nodeType){var g=new RegExp(String.fromCharCode(8203),"g"),b=void 0;m.firstChild===f?(f.textContent=m.parentElement&&(p.isBlockNode(m.parentElement)&&m.parentElement.textContent.length<=1?m.parentElement.childElementCount>1:0===m.childElementCount)&&(m.parentElement.textContent.length>1||m.parentElement.firstChild&&1===m.parentElement.firstChild.nodeType)?f.textContent:f.textContent.replace(g,""),b=f):(m.firstChild.textContent=m.firstChild.textContent.replace(g,""),b=m.firstChild);var v=void 0;if(0===b.textContent.length)if(n.i(l.isNullOrUndefined)(b.previousSibling)){if(!n.i(l.isNullOrUndefined)(b.parentElement)&&0===b.parentElement.textContent.length){var C=document.createElement("BR");b.parentElement.appendChild(C),n.i(l.detach)(b),f=C,t.setCursorPoint(e,f.parentElement,0)}}else f=b.previousSibling,v=b.textContent.length-1,t.setCursorPoint(e,b,v)}["fontcolor","fontname","fontsize","backgroundcolor"].indexOf(a)>-1?("fontcolor"===a?m.style.color=c:"fontname"===a?m.style.fontFamily=c:"fontsize"===a?m.style.fontSize=c:m.style.backgroundColor=c,f=m):o.a.unwrap(m)}else h.length>1&&i.startOffset>0&&h[0].firstElementChild&&"br"===h[0].firstElementChild.tagName.toLowerCase()&&(h[0].innerHTML=""),1!==h.length||0!==i.startOffset||"BR"!==h[0].nodeName&&"BR"!==h[0].nextSibling.nodeName||n.i(l.detach)("#text"===h[0].nodeName?h[0].nextSibling:h[0]),f=this.getInsertNode(e,i,a,c).firstChild;return f},e.getCursorFormat=function(e,t,n,i){for(var r,o=0;o<t.length;o++)r=t[o].lastElementChild?t[o].lastElementChild:t[o];return e.getFormattedNode(r,n,i)},e.removeFormat=function(e,t,i,r,s,a,d,c,u,h,p,m,f){var g=null,b="#text"===d.startContainer.nodeName?d.startContainer.textContent.substring(d.startOffset,d.startContainer.textContent.length):d.startContainer.textContent,v=e[t].textContent;if(d.startContainer!==d.endContainer||0!==d.startOffset||d.endOffset!==d.startContainer.length){var C=[],y=e[t];do{C.push(p.getIndex(y)),y=y.parentNode}while(y&&y!==i);if("BR"!==e[t].nodeName&&(y=g=r&&i.textContent.length-1===d.startOffset?c.SplitNode(d,i,!0):c.GetSpliceNode(d,i)),r){for(var N=g;null!==N.firstChild&&3!==N.firstChild.nodeType;null)N=N.firstChild;N.innerHTML="​",e[t]=N.firstChild}else{for(;y&&y.childNodes.length>0&&C.length-1>=0&&y.childNodes.length>C[C.length-1];)y=y.childNodes[C[C.length-1]],C.pop();if("BR"!==e[t].nodeName)if(3!==y.nodeType||r&&""===y.nodeValue){var S=document.createElement("div");S.innerHTML="​",3!==y.nodeType?(y.insertBefore(S.firstChild,y.firstChild),e[t]=y.firstChild):(y.parentNode.insertBefore(S.firstChild,y),e[t]=y.previousSibling,y.parentNode.removeChild(y))}else e[t]=y}}else if(a&&!e[t].contains(i)&&3===e[t].nodeType&&e[t].textContent!==i.textContent){for(var E=e[t].textContent===e[t].wholeText,T=e[t],O=this.GetFormatNode(u,h);T&&T.textContent===T.parentElement.textContent;)T=T.parentElement;if(E&&i.textContent!==T.textContent){var w=[],k=this.getPriorityFormatNode(T,m);return k&&k.textContent===T.textContent&&(T=k),w.push(T),this.applyStyles(w,0,O),e[t]}}var L;"backgroundcolor"===u&&(L=i.style.fontSize);var _;if("fontsize"===u){var x=n.i(l.closest)(e[t].parentElement,"span[style*=background-color]");n.i(l.isNullOrUndefined)(x)||(_=x.style.backgroundColor)}var D,M=i.getAttribute("style"),R=i.tagName;if("A"===R&&"underline"===u)i.style.textDecoration="none",D=[i];else{D=o.a.unwrap(i);var B=e[t].parentElement;n.i(l.isNullOrUndefined)(B)||"li"===B.tagName.toLowerCase()||(B=n.i(l.closest)(B,"li")),n.i(l.isNullOrUndefined)(B)||"li"!==B.tagName.toLowerCase()||B.textContent.trim()!==e[t].textContent.trim()||("bold"===u?B.style.fontWeight="normal":"italic"===u&&(B.style.fontStyle="normal"))}if(D[0]&&!a)for(var T=D[t]?D[t]:D[0],A=T;T&&T.parentElement&&T.parentElement!==m;T=T){var I=void 0;if(I="SPAN"===i.nodeName?T.parentElement.tagName.toLocaleLowerCase()===i.tagName.toLocaleLowerCase()&&T.parentElement.getAttribute("style")===M:T.parentElement.tagName.toLocaleLowerCase()===i.tagName.toLocaleLowerCase(),T.parentElement&&I&&(T.parentElement.childElementCount>1||d.startOffset>1)){if(A.parentElement&&A.parentElement.tagName.toLocaleLowerCase()===i.tagName.toLocaleLowerCase()&&d.startOffset===d.endOffset&&1!==A.nodeType&&!n.i(l.isNullOrUndefined)(A.textContent)&&A.parentElement.childElementCount>1&&(d.setStart(A,0),d.setEnd(A,A.textContent.length),c.SplitNode(d,A.parentElement,!1)),"span"===T.parentElement.tagName.toLocaleLowerCase()&&"underline"===i.style.textDecoration&&"underline"!==T.parentElement.style.textDecoration){T=T.parentElement;continue}o.a.unwrap(T.parentElement),T=n.i(l.isNullOrUndefined)(T.parentElement)||f.isBlockNode(T.parentElement)?T.parentElement:A}else T=T.parentElement}if(D.length>0&&a){for(var P=0;P<D.length;P++)if(3!==D[P].nodeType||D[P].textContent&&D[P].textContent.trim().length>0){D[P]=o.a.Wrap(D[P],this.GetFormatNode(u,h,R,M));var B=e[t].parentElement;n.i(l.isNullOrUndefined)(B)||"li"===B.tagName.toLowerCase()||(B=n.i(l.closest)(B,"li")),n.i(l.isNullOrUndefined)(B)||"li"!==B.tagName.toLowerCase()||B.textContent.trim()!==e[t].textContent.trim()||"fontname"===u&&(B.style.fontFamily=h),D[P].textContent===b&&(0===P?d.setStartBefore(D[P]):P===D.length-1&&d.setEndAfter(D[P]))}var U=e[t].parentElement;if(n.i(l.isNullOrUndefined)(L)||""===L||(U.style.fontSize=L),n.i(l.isNullOrUndefined)(_)||""===_||(U.style.backgroundColor=_),"backgroundcolor"===u&&!n.i(l.isNullOrUndefined)(L)&&""!==L&&U.parentElement.innerHTML===U.outerHTML){var H=U.parentElement;H.parentElement.insertBefore(U,H),n.i(l.detach)(H)}if("fontsize"===u||"fontcolor"===u){for(var B=e[t].parentElement,j=e[t].parentElement;!n.i(l.isNullOrUndefined)(j)&&"li"!==j.tagName.toLowerCase();)j=j.parentElement,B=j;for(var P=t,F="";P>=0&&!n.i(l.isNullOrUndefined)(B)&&"li"===B.tagName.toLowerCase()&&B.textContent.replace("//g","").trim().includes(e[P].textContent.trim());)F=" "+e[P].textContent.trim()+F,P--;var q=!1,z=0,V=!1;if(!n.i(l.isNullOrUndefined)(B)&&B.childNodes)for(var Q=0;Q<B.childNodes.length;Q++)"OL"===B.childNodes[Q].nodeName&&(z++,q=!0);if(n.i(l.isNullOrUndefined)(B)||"li"!==B.tagName.toLowerCase()||B.textContent.split("").join("").trim()!==F.split("").join("").trim()){if(!n.i(l.isNullOrUndefined)(B)&&"li"===B.tagName.toLowerCase()&&q){if(q&&z>0)for(var W=0;W<B.childNodes.length;W++)e[t].textContent===B.childNodes[W].textContent&&e[t].textContent===v&&B.textContent.replace("//g","").trim().includes(F.split("").join("").trim())&&(V=!0);if(V){for(var K=0;K<B.childNodes.length;K++)"OL"===B.childNodes[K].nodeName&&(B.childNodes[K].style.fontSize="initial");"fontsize"===u?B.style.fontSize=h:(B.style.color=h,B.style.textDecoration="inherit")}}}else"fontsize"===u?B.style.fontSize=h:(B.style.color=h,B.style.textDecoration="inherit")}}return e[t]},e.insertFormat=function(e,t,i,r,o,s,a,d,c,u,h,p,m,f){if(o)if("uppercase"!==u&&"lowercase"!==u){var g=this.getInsertNode(e,d,u,h);t[i]=g.firstChild,c.position=1}else c.position=d.startOffset;else if(null===r&&s||a){if("BR"!==t[i].nodeName&&(t[i]=c.GetSpliceNode(d,t[i]),t[i].textContent=c.TrimLineBreak(t[i].textContent)),"uppercase"===u||"lowercase"===u)t[i].textContent="uppercase"===u?t[i].textContent.toLocaleUpperCase():t[i].textContent.toLocaleLowerCase();else if(!0!==a||""!==h){var g=this.GetFormatNode(u,h);if("formatPainter"===h||a){for(var b=t[i].parentElement,v=t[i].parentElement;!n.i(l.isNullOrUndefined)(v)&&"li"!==v.tagName.toLowerCase();)v=v.parentElement,b=v;if(n.i(l.isNullOrUndefined)(b)||"li"!==b.tagName.toLowerCase()||b.textContent.trim()!==t[i].textContent.trim()||("fontsize"===u?b.style.fontSize=h:"fontcolor"===u?(b.style.color=h,b.style.textDecoration="inherit"):"fontname"===u&&(b.style.fontFamily=h)),"formatPainter"===h)return this.insertFormatPainterElem(t,i,d,c,p,m);var C=t[i],y=this.getPriorityFormatNode(C,f);if(!n.i(l.isNullOrUndefined)(y)||a){var N=n.i(l.isNullOrUndefined)(y)?C:y;if(N=n.i(l.isNullOrUndefined)(y)||""===y.style.fontSize?N:N.firstChild,n.i(l.isNullOrUndefined)(y)||"fontsize"===u)for(;N;){var S=N.parentElement.textContent.trim()===t[i].textContent.trim(),E=N.parentElement;if(m.isBlockNode(E)||!S||"SPAN"===E.nodeName&&E.classList.contains("e-img-inner"))break;N=E}var T=[];if("fontcolor"===u){var O=n.i(l.closest)(t[i].parentElement,"A");n.i(l.isNullOrUndefined)(O)||O.firstChild.textContent.trim()!==t[i].textContent.trim()||(N=t[i])}t[i].textContent.trim()!==N.textContent.trim()&&(N=t[i]),T[0]=N,this.applyStyles(T,0,g)}else t[i]=this.applyStyles(t,i,g)}else{t[i]=this.applyStyles(t,i,g);var b=t[i].parentElement;n.i(l.isNullOrUndefined)(b)||"li"===b.tagName.toLowerCase()||(b=n.i(l.closest)(b,"li")),n.i(l.isNullOrUndefined)(b)||"li"!==b.tagName.toLowerCase()||b.textContent.trim()!==t[i].textContent.trim()||("bold"===u?b.style.fontWeight="bold":"italic"===u&&(b.style.fontStyle="italic"))}}}else t[i]=c.GetSpliceNode(d,t[i]);return t[i]},e.applyStyles=function(e,t,n){return"BR"===e[t].nodeName&&"BR"===this.enterAction||(e[t]=t===e.length-1||"BR"===e[t].nodeName?o.a.Wrap(e[t],n):o.a.WrapBefore(e[t],n,!0),e[t]=this.getChildNode(e[t],n)),e[t]},e.getPriorityFormatNode=function(e,t){var i,r,o,a=new s.a,d=a.getFormattedNode(e,"fontsize",t);return n.i(l.isNullOrUndefined)(d)?(r=a.getFormattedNode(e,"backgroundcolor",t),n.i(l.isNullOrUndefined)(r)?(o=a.getFormattedNode(e,"fontname",t),n.i(l.isNullOrUndefined)(o)?(i=a.getFormattedNode(e,"fontcolor",t),n.i(l.isNullOrUndefined)(i)?null:i):o):r):d},e.getInsertNode=function(e,t,n,i){var r=this.GetFormatNode(n,i);if(r.innerHTML="​",l.Browser.isIE){var o=e.createDocumentFragment();o.appendChild(r),t.insertNode(o)}else t.insertNode(r);return r},e.getChildNode=function(e,t){return void 0!==e&&null!==e||(t.innerHTML="​",e=t.firstChild),e},e.applySelection=function(e,t,n,i,r){return 1!==e.length||r?1===e.length&&r?(t.startContainer=t.getNodeArray(e[i],!0),t.endContainer=t.startContainer,t.startOffset=n.position,t.endOffset=n.position):0===i?(t.startContainer=t.getNodeArray(e[i],!0),t.startOffset=0):i===e.length-1&&(t.endContainer=t.getNodeArray(e[i],!1),t.endOffset=e[i].textContent.length):(t.startContainer=t.getNodeArray(e[i],!0),t.endContainer=t.startContainer,t.startOffset=0,t.endOffset=e[i].textContent.length),t},e.GetFormatNode=function(e,t,n,i){var r;switch(e){case"bold":return document.createElement("strong");case"italic":return document.createElement("em");case"underline":return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.textDecoration="underline",r;case"strikethrough":return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.textDecoration="line-through",r;case"superscript":return document.createElement("sup");case"subscript":return document.createElement("sub");case"fontcolor":return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.color=t,r.style.textDecoration="inherit",r;case"fontname":return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.fontFamily=t,r;case"fontsize":return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.fontSize=t,r;default:return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.backgroundColor=t,r}},e.updateStyles=function(e,t,n){null!==n&&"SPAN"===t&&e.setAttribute("style",n)},e.insertFormatPainterElem=function(e,t,i,r,s,a){var d=a.isBlockNode(e[t].parentElement)?e[t]:e[t].parentElement;if(!a.isBlockNode(d))for(;d.textContent.trim()===d.parentElement.textContent.trim()&&!a.isBlockNode(d.parentElement);)d=d.parentElement;n.i(l.isNullOrUndefined)(d)||1!==d.nodeType||d.classList.contains("e-rte-img-caption")||d.classList.contains("e-img-inner")||this.formatPainterCleanup(t,e,d,i,r,a);var c=s.element;if(!n.i(l.isNullOrUndefined)(c)){var u=c.cloneNode(!0),h=u.querySelectorAll(s.lastChild.nodeName),p=void 0;h.length>0?p=h[h.length-1]:n.i(l.isNullOrUndefined)(u)||u.nodeName!==s.lastChild.nodeName||(p=u),p.textContent=e[t].textContent;var m=p.childNodes[0];e[t]=o.a.Wrap(e[t],u),e[t].textContent="",e[t]=m}return e[t]},e.formatPainterCleanup=function(e,t,i,r,s,a){var d=["A","AUDIO","IMG","VIDEO","IFRAME"];if(0===e&&i.textContent.trim()!==t[e].textContent.trim()){s.SplitNode(r,i,!0);for(var c=t[e].parentElement.childNodes,u=0;u<c.length;u++)if(c[u].textContent.trim()===t[u].textContent.trim()){i.parentNode.insertBefore(c[u],i);break}for(var h=i.parentElement.childNodes,p=0;p<h.length;p++)""!==h[p].textContent.trim()&&0!==h[p].textContent.length||n.i(l.detach)(h[p])}else if(i.textContent.trim()!==t[e].textContent.trim())i.parentElement.insertBefore(t[e],i);else for(;!n.i(l.isNullOrUndefined)(i)&&3!==i.nodeType&&!a.isBlockNode(i);){for(var m=void 0,u=0;u<i.childNodes.length;u++){var f=i.childNodes[u];0!==f.textContent.trim().length&&3!==f.nodeType&&(m=i.childNodes[u])}-1===d.indexOf(i.tagName)&&o.a.unwrap(i),i=m}},e.enterAction="P",e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(7),r=n(48),o=n(3),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.o,this.applySelection,this),this.parent.observer.on(o.d,this.keyDownHandler,this)},e.prototype.keyDownHandler=function(e){var t=["bold","italic","underline","strikethrough","superscript","subscript","uppercase","lowercase"];(e.event.ctrlKey||e.event.metaKey)&&t.indexOf(e.event.action)>-1&&(e.event.preventDefault(),r.a.applyFormat(this.parent.currentDocument,e.event.action,this.parent.editableElement,e.enterAction),this.callBack(e,e.event.action))},e.prototype.applySelection=function(e){r.a.applyFormat(this.parent.currentDocument,e.subCommand.toLocaleLowerCase(),this.parent.editableElement,e.enterAction,e.value,e.selector),this.callBack(e,e.subCommand)},e.prototype.callBack=function(e,t){e.callBack&&e.callBack({requestType:t,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),n(7)),o=n(8),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.b,this.createTable,this),this.parent.observer.on(r.c,this.insertRow,this),this.parent.observer.on(r.d,this.insertColumn,this),this.parent.observer.on(r.e,this.deleteRow,this),this.parent.observer.on(r.f,this.deleteColumn,this),this.parent.observer.on(r.g,this.removeTable,this),this.parent.observer.on(r.h,this.tableHeader,this),this.parent.observer.on(r.i,this.tableVerticalAlign,this),this.parent.observer.on(r.j,this.cellMerge,this),this.parent.observer.on(r.k,this.HorizontalSplit,this),this.parent.observer.on(r.l,this.VerticalSplit,this),this.parent.observer.on(r.m,this.tableMove,this)},e.prototype.createTable=function(e){var t=n.i(i.createElement)("table",{className:"e-rte-table"}),r=n.i(i.createElement)("tbody");n.i(i.isNullOrUndefined)(e.item.width.width)||(t.style.width=this.calculateStyleValue(e.item.width.width)),n.i(i.isNullOrUndefined)(e.item.width.minWidth)||(t.style.minWidth=this.calculateStyleValue(e.item.width.minWidth)),n.i(i.isNullOrUndefined)(e.item.width.maxWidth)||(t.style.maxWidth=this.calculateStyleValue(e.item.width.maxWidth));for(var s=parseInt(e.item.width.width,10)>100?100/e.item.columns:parseInt(e.item.width.width,10)/e.item.columns,a=0;a<e.item.rows;a++){for(var l=n.i(i.createElement)("tr"),d=0;d<e.item.columns;d++){var c=n.i(i.createElement)("td");c.appendChild(n.i(i.createElement)("br")),c.style.width=s+"%",l.appendChild(c)}r.appendChild(l)}if(t.appendChild(r),e.item.selection.restore(),o.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),this.removeEmptyNode(),e.item.selection.setSelectionText(this.parent.currentDocument,t.querySelector("td"),t.querySelector("td"),0,0),null===t.nextElementSibling){var u=void 0;"DIV"===e.enterAction?(u=n.i(i.createElement)("div"),u.appendChild(n.i(i.createElement)("br"))):"BR"===e.enterAction?u=n.i(i.createElement)("br"):(u=n.i(i.createElement)("p"),u.appendChild(n.i(i.createElement)("br"))),this.insertAfter(u,t)}return t.querySelector("td").classList.add("e-cell-select"),e.callBack&&e.callBack({requestType:"Table",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:[t]}),t},e.prototype.calculateStyleValue=function(e){return"string"==typeof e&&(e.indexOf("px")>=0||e.indexOf("%")>=0||e.indexOf("auto")>=0)?e:e+"px"},e.prototype.removeEmptyNode=function(){for(var e=this.parent.editableElement.querySelectorAll("ul:empty, ol:empty"),t=0;t<e.length;t++)n.i(i.detach)(e[t]);for(var r=this.parent.editableElement.querySelectorAll("li *:empty:not(img)"),t=0;t<r.length;t++)n.i(i.detach)(r[t]),r.length===t+1&&(r=this.parent.editableElement.querySelectorAll("li *:empty:not(img)"),t=-1);for(var o=this.parent.editableElement.querySelectorAll("li:empty"),t=0;t<o.length;t++)n.i(i.detach)(o[t])},e.prototype.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e.prototype.getSelectedCellMinMaxIndex=function(e){for(var t=this.curTable.querySelectorAll(".e-cell-select"),n=0,i=e.length,r=0,o=e[0].length,s=0;n<t.length;n++){var a=this.getCorrespondingIndex(t[n],e),l=this.FindIndex(a[0],a[1],e);i=Math.min(a[0],i),r=Math.max(l[0],r),o=Math.min(a[1],o),s=Math.max(l[1],s)}return{startRow:i,endRow:r,startColumn:o,endColumn:s}},e.prototype.insertRow=function(e){var t="InsertRowBefore"!==e.item.subCommand,r=e.item.selection.range.startContainer;if("TH"!==r.nodeName&&"TD"!==r.nodeName&&(r=n.i(i.closest)(r.parentElement,"td,th")),"th"!==r.nodeName.toLowerCase()||"InsertRowBefore"!==e.item.subCommand){if(this.curTable=n.i(i.closest)(this.parent.nodeSelection.range.startContainer.parentElement,"table"),0===this.curTable.querySelectorAll(".e-cell-select").length){var o=this.curTable.rows[this.curTable.rows.length-1],s=o.cloneNode(!0);s.removeAttribute("rowspan"),this.insertAfter(s,o)}else{for(var a=this.getCorrespondingColumns(),l=this.getSelectedCellMinMaxIndex(a),d=t?l.endRow:l.startRow,c=n.i(i.createElement)("tr"),u=this.curTable.querySelectorAll("th.e-cell-select").length>0,h=0;h<a[d].length;h++)if(t&&d<a.length-1&&a[d][h]===a[d+1][h]||!t&&0<d&&a[d][h]===a[d-1][h])(0===h||0<h&&a[d][h]!==a[d][h-1])&&a[d][h].setAttribute("rowspan",(parseInt(a[d][h].getAttribute("rowspan"),10)+1).toString());else{var p=n.i(i.createElement)("td");p.appendChild(n.i(i.createElement)("br")),c.appendChild(p),p.setAttribute("style",a[u&&t&&a[d+1]?d+1:d][h].getAttribute("style"))}var m=void 0;m=u&&t?this.curTable.querySelector("tbody").childNodes[0]:this.curTable.rows[d],"InsertRowBefore"===e.item.subCommand?m.parentElement.insertBefore(c,m):u?m.parentElement.insertBefore(c,m):this.insertAfter(c,m)}e.item.selection.setSelectionText(this.parent.currentDocument,e.item.selection.range.startContainer,e.item.selection.range.startContainer,0,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.insertColumn=function(e){var t=e.item.selection.range.startContainer;"TH"!==t.nodeName&&"TD"!==t.nodeName&&(t=n.i(i.closest)(t.parentElement,"td,th"));for(var r,o=n.i(i.closest)(t,"tr"),s=n.i(i.closest)(o,"table").rows,a=Array.prototype.slice.call(o.querySelectorAll(":scope > td, :scope > th")).indexOf(t),l=parseInt(e.item.width,10)/o.querySelectorAll(":scope > td, :scope > th").length,d=parseInt(e.item.width,10)/(o.querySelectorAll(":scope > td, :scope > th").length+1),c=n.i(i.closest)(o,"table"),u=n.i(i.closest)(o,"table").querySelectorAll("th,td"),h=0;h<u.length;h++)u[h].dataset.oldWidth=u[h].offsetWidth/c.offsetWidth*100+"%";for(var h=0;h<s.length;h++){r=s[h].querySelectorAll(":scope > td, :scope > th")[a];var p=r.cloneNode(!0);p.innerHTML="",p.appendChild(n.i(i.createElement)("br")),p.removeAttribute("class"),p.removeAttribute("colspan"),p.removeAttribute("rowspan"),"InsertColumnLeft"===e.item.subCommand?r.parentElement.insertBefore(p,r):this.insertAfter(p,r),p.style.width=d.toFixed(4)+"%",delete p.dataset.oldWidth}for(var h=0;h<u.length;h++)u[h].style.width=(Number(u[h].dataset.oldWidth.split("%")[0])*d/l).toFixed(4)+"%",delete u[h].dataset.oldWidth;e.item.selection.setSelectionText(this.parent.currentDocument,t,t,0,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.deleteColumn=function(e){var t=e.item.selection.range.startContainer;3===t.nodeType&&(t=n.i(i.closest)(t.parentElement,"td,th"));var r=n.i(i.closest)(t,"TH"===t.tagName?"thead":"tbody"),o=r&&Array.prototype.indexOf.call(r.childNodes,t.parentNode);if(this.curTable=n.i(i.closest)(t,"table"),1===n.i(i.closest)(t,"tr").querySelectorAll("th,td").length)e.item.selection.restore(),n.i(i.detach)(n.i(i.closest)(t.parentElement,"table"));else{for(var s=void 0,a=this.getCorrespondingColumns(),l=this.getSelectedCellMinMaxIndex(a),d=l.startColumn,c=l.endColumn,u=0;u<a.length;u++)for(var h=a[u],p=0;p<h.length;p++){var m=h[p],f=this.getCorrespondingIndex(m,a),g=parseInt(m.getAttribute("colspan"),10)||1;f[1]+(g-1)>=d&&f[1]<=c&&(g>1?m.setAttribute("colspan",(g-1).toString()):(n.i(i.detach)(m),s=p,i.Browser.isIE&&(e.item.selection.setSelectionText(this.parent.currentDocument,this.curTable.querySelector("td"),this.curTable.querySelector("td"),0,0),this.curTable.querySelector("td, th").classList.add("e-cell-select"))))}if(s>-1){var b=r.children[o],v=b&&b.children[s<=b.children.length-1?s:s-1];v&&(e.item.selection.setSelectionText(this.parent.currentDocument,v,v,0,0),v.classList.add("e-cell-select"))}}if(e.callBack){var C=this.parent.nodeSelection.getRange(this.parent.currentDocument).startContainer;if("TD"!==C.nodeName){var y=this.parent.nodeSelection.getRange(this.parent.currentDocument).startOffset,N=C.children[y];N&&this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,N,0)}e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.deleteRow=function(e){var t=e.item.selection.range.startContainer;3===t.nodeType&&(t=n.i(i.closest)(t.parentElement,"td,th"));var r=Array.prototype.indexOf.call(t.parentNode.childNodes,t);this.curTable=n.i(i.closest)(t,"table");var o,s,a,l=this.getCorrespondingColumns(),d=this.getSelectedCellMinMaxIndex(l);if(1===this.curTable.rows.length)e.item.selection.restore(),n.i(i.detach)(n.i(i.closest)(t.parentElement,"table"));else for(s=d.endRow;s>=d.startRow;s--){for(o=this.curTable.rows[s],a=0;a<l[s].length;a++){if((0===a||l[s][a]!==l[s][a-1])&&1<parseInt(l[s][a].getAttribute("rowspan"),10)){var c=parseInt(l[s][a].getAttribute("rowspan"),10)-1;if(1===c){l[s][a].removeAttribute("rowspan");var u=this.getMergedRow(this.getCorrespondingColumns())[a];if(u){var h=u.cloneNode(!0);h.innerHTML="<br>",u.parentElement&&u.parentElement.insertBefore(h,u)}}else l[s][a].setAttribute("rowspan",c.toString())}if(s<l.length-1&&l[s][a]===l[s+1][a]&&(0===s||l[s][a]!==l[s-1][a])){var p=l[s][a],m=void 0;for(m=a;0<m&&l[s][m]===l[s][m-1];m--)0===m?this.curTable.rows[s+1].prepend(p):l[s+1][m-1].insertAdjacentElement("afterend",p)}}var f=o.rowIndex;this.curTable.deleteRow(f);var g=n.i(i.isNullOrUndefined)(this.curTable.rows[f])?this.curTable.querySelectorAll("tbody tr")[f-1]:this.curTable.querySelectorAll("tbody tr")[f],b=g&&g.querySelectorAll("td")[r];b?(e.item.selection.setSelectionText(this.parent.currentDocument,b,b,0,0),b.classList.add("e-cell-select")):(e.item.selection.setSelectionText(this.parent.currentDocument,this.curTable.querySelector("td"),this.curTable.querySelector("td"),0,0),this.curTable.querySelector("td, th").classList.add("e-cell-select"))}e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.getMergedRow=function(e){for(var t,n=0;n<e.length;n++)e[n].length!==this.curTable.rows[0].childNodes.length&&(t=e[n]);return t},e.prototype.removeTable=function(e){var t=e.item.selection.range.startContainer;t=3===t.nodeType?t.parentNode:t;var r=n.i(i.closest)(t.parentElement,"table");r&&(e.item.selection.restore(),n.i(i.detach)(r)),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.tableHeader=function(e){var t=!1,r=e.item.selection.range.startContainer;r=3===r.nodeType?r.parentNode:r;var o=n.i(i.closest)(r.parentElement,"table");if([].slice.call(o.childNodes).forEach(function(e){"THEAD"===e.nodeName&&(t=!0)}),o&&!t){for(var s=o.querySelector("tr").childElementCount,a=0,l=0;l<s;l++)a+=parseInt(o.querySelector("tr").children[l].getAttribute("colspan"),10)||1;for(var d=o.createTHead(),c=d.insertRow(0),u=0;u<a;u++){var h=n.i(i.createElement)("th");h.appendChild(n.i(i.createElement)("br")),c.appendChild(h)}}else o.deleteTHead();e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.tableVerticalAlign=function(e){"AlignTop"===e.item.subCommand?e.item.tableCell.style.verticalAlign="top":"AlignMiddle"===e.item.subCommand?e.item.tableCell.style.verticalAlign="middle":e.item.tableCell.style.verticalAlign="bottom",e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.cellMerge=function(e){n.i(i.isNullOrUndefined)(this.curTable)&&(this.curTable=n.i(i.closest)(this.parent.nodeSelection.range.startContainer.parentElement,"table"));var t=this.curTable.querySelectorAll(".e-cell-select");if(!(t.length<2)){this.mergeCellContent();var r=this.getSelectedMinMaxIndexes(this.getCorrespondingColumns()),o=t[0],s=o.parentElement.querySelectorAll(".e-cell-select");r.startColumn<r.endColumn&&o.setAttribute("colspan",(r.endColumn-r.startColumn+1).toString()),r.startRow<r.endRow&&o.setAttribute("rowspan",(r.endRow-r.startRow+1).toString());for(var a=0,l=s.length-1;l>=0;l--)a+=parseFloat(s[l].style.width);o.style.width=a+"%";for(var d=1;d<=t.length-1;d++)n.i(i.detach)(t[d]);for(var d=0;d<this.curTable.rows.length;d++)""===this.curTable.rows[d].innerHTML&&n.i(i.detach)(this.curTable.rows[d]);this.updateRowSpanStyle(r.startRow,r.endRow,this.getCorrespondingColumns()),this.updateColSpanStyle(r.startColumn,r.endColumn,this.getCorrespondingColumns()),e.item.selection.setSelectionText(this.parent.currentDocument,e.item.selection.range.startContainer,e.item.selection.range.startContainer,0,0),this.parent.nodeSelection&&o&&this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.updateColSpanStyle=function(e,t,n){var i,r,o,s,a=0,l=0,d=n;if(e<(t=Math.min(t,d[0].length-1))){for(r===e;r<=t;r++)if(!(e<r&&d[0][r]===d[0][r-1])&&1<(a=Math.min(parseInt(d[0][r].getAttribute("colspan"),10)||1,t-e+1))&&d[0][r]===d[0][r+1])for(l=a-1,i=1;i<d.length;i++){if(d[i][r]!==d[i-1][r])for(o=r;o<r+a;o++)if(1<(s=parseInt(d[i][o].getAttribute("colspan"),10)||1)&&d[i][o]===d[i][o+1])o+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&this.updateCellAttribute(d,l,"colspan",0,d.length-1,e,t)}},e.prototype.updateRowSpanStyle=function(e,t,n){var i,r,o,s,a=0,l=0,d=n;if(e<(t=Math.min(t,d.length-1))){for(i=e;i<=t;i++)if(!(e<i&&d[i][0]===d[i-1][0])&&d[i][0]&&1<(a=Math.min(parseInt(d[i][0].getAttribute("rowspan"),10)||1,t-e+1))&&d[i][0]===d[i+1][0])for(l=a-1,r=1;r<d[0].length;r++)if(d[i][r]!==d[i][r-1]){for(o=i;o<i+a;o++)if(1<(s=parseInt(d[o][r].getAttribute("rowspan"),10)||1)&&d[o][r]===d[o+1][r])o+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&this.updateCellAttribute(d,l,"rowspan",e,t,0,d[0].length-1)}},e.prototype.updateCellAttribute=function(e,t,n,i,r,o,s){var a,l,d;for(a=i;a<=r;a++)for(l=o;l<=s;l++)i<a&&e[a][l]===e[a-1][l]||o<l&&e[a][l]===e[a][l-1]||1<(d=parseInt(e[a][l].getAttribute(n),10)||1)&&(1<d-t?e[a][l].setAttribute(n,(d-t).toString()):e[a][l].removeAttribute(n))},e.prototype.mergeCellContent=function(){for(var e=this.curTable.querySelectorAll(".e-cell-select"),t="<br>"===e[0].innerHTML?"":e[0].innerHTML,n=1;n<e.length;n++)"<br>"!==e[n].innerHTML&&(t=t?t+"<br>"+e[n].innerHTML:t+e[n].innerHTML);e[0].innerHTML=t},e.prototype.getSelectedMinMaxIndexes=function(e){var t=this.curTable.querySelectorAll(".e-cell-select");if(0<t.length){for(var n=e.length,i=0,r=e[0].length,o=0,s=0;s<t.length;s++){var a=this.getCorrespondingIndex(t[s],e),l=this.FindIndex(a[0],a[1],e);n=Math.min(a[0],n),i=Math.max(l[0],i),r=Math.min(a[1],r),o=Math.max(l[1],o)}return{startRow:n,endRow:i,startColumn:r,endColumn:o}}return null},e.prototype.HorizontalSplit=function(e){var t=e.item.selection.range.startContainer;if(this.curTable=n.i(i.closest)(t.parentElement,"table"),!(this.curTable.querySelectorAll(".e-cell-select").length>1)){this.activeCell=this.curTable.querySelector(".e-cell-select");var r=this.activeCell.cloneNode(!0);r.removeAttribute("class"),r.innerHTML="</br>";var o=this.getCorrespondingIndex(this.activeCell,this.getCorrespondingColumns()),s=this.getCorrespondingColumns(),a=this.activeCell.getAttribute("rowspan")?parseInt(this.activeCell.getAttribute("rowspan"),10):1;if(a>1){var l=Math.ceil(a/2);1<l?this.activeCell.setAttribute("rowspan",l.toString()):this.activeCell.removeAttribute("rowspan"),1<a-l?r.setAttribute("rowspan",(a-l).toString()):r.removeAttribute("rowspan");var d=void 0,c=void 0;for(d=o[0]+Math.ceil(a/2),c=0===o[1]?o[1]:o[1]-1;0<=c&&(s[d][c]===s[d][c-1]||0<d&&s[d][c]===s[d-1][c]);)c--;-1===c?this.curTable.rows[d].firstChild?this.curTable.rows[d].prepend(r):this.curTable.appendChild(r):s[d][c].insertAdjacentElement("afterend",r)}else{var u=n.i(i.createElement)("tr");u.appendChild(r);for(var h=s[o[0]],p=0;p<=h.length-1;p++)h[p]!==h[p-1]&&h[p]!==this.activeCell&&h[p].setAttribute("rowspan",((parseInt(h[p].getAttribute("rowspan"),10)?parseInt(h[p].getAttribute("rowspan"),10):1)+1).toString());this.activeCell.parentNode.insertAdjacentElement("afterend",u)}e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.VerticalSplit=function(e){var t=e.item.selection.range.startContainer;if(this.curTable=n.i(i.closest)(t.parentElement,"table"),!(this.curTable.querySelectorAll(".e-cell-select").length>1)){this.activeCell=this.curTable.querySelector(".e-cell-select");var r=this.curTable.rows,o=this.activeCell.cloneNode(!0);o.removeAttribute("class"),o.innerHTML="</br>";var s=parseFloat(this.activeCell.style.width)/2;if("TH"===this.activeCell.tagName&&isNaN(s)){for(var a=this.curTable.querySelector("tr").childElementCount,l=0,d=0;d<a;d++)l+=parseInt(this.curTable.querySelector("tr").children[d].getAttribute("colspan"),10)||1;s=parseFloat((this.activeCell.offsetWidth/2/this.curTable.offsetWidth*100).toFixed(1))}var c=this.getCorrespondingIndex(this.activeCell,this.getCorrespondingColumns()),u=this.getCorrespondingColumns(),h=parseInt(this.activeCell.getAttribute("colspan"),10);if(h>1)1<Math.ceil(h/2)?this.activeCell.setAttribute("colspan",(h/2).toString()):this.activeCell.removeAttribute("colspan"),1<h-h/2?o.setAttribute("colspan",(h-h/2).toString()):o.removeAttribute("colspan");else for(var d=0;d<=r.length-1;d++)if(0===d||u[d][c[1]]!==u[d-1][c[1]]){var p=u[d][c[1]];p!==this.activeCell&&p.setAttribute("colspan",((parseInt(p.getAttribute("colspan"),10)?parseInt(p.getAttribute("colspan"),10):1)+1).toString())}this.activeCell.style.width=s+"%",o.style.width=s+"%",this.activeCell.parentNode.insertBefore(o,this.activeCell.nextSibling),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.getCorrespondingColumns=function(){for(var e=[],t=this,n=t.curTable.rows,i=0;i<=n.length-1;i++)for(var r=n[i],o=0,s=0;s<=r.children.length-1;s++){for(var a=r.children[s],l=a,d=parseInt(l.getAttribute("colspan"),10)||1,c=parseInt(l.getAttribute("rowspan"),10)||1,u=i;u<i+c;u++)for(var h=o;h<o+d;h++)e[u]||(e[u]=[]),e[u][h]?o++:e[u][h]=a;o+=0}return e},e.prototype.FindIndex=function(e,t,n){var i,r;for(i=e+1,r=t+1;i<n.length;){if(n[i][t]!==n[e][t]){i--;break}i++}for(i===n.length&&i--;r<n[e].length;){if(n[e][r]!==n[e][t]){r--;break}r++}return r===n[e].length&&r--,[i,r]},e.prototype.getCorrespondingIndex=function(e,t){for(var n=0;n<t.length;n++)for(var i=0;i<t[n].length;i++)if(t[n][i]===e)return[n,i];return[]},e.prototype.highlightCells=function(e,t,n,i,r){var o,s,l,d,c=e,u=t,h=n,p=i,m=new a;for(o=c;o<=u;o++){for((1<(parseInt(r[o][h].getAttribute("rowspan"),10)||1)||1<(parseInt(r[o][h].getAttribute("colspan"),10)||1))&&(d=this.FindIndex((l=this.getCorrespondingIndex(r[o][h],r))[0],l[1],r))?(c=Math.min(l[0],c),u=Math.max(d[0],u),h=Math.min(l[1],h),p=Math.max(d[1],p)):(1<(parseInt(r[o][p].getAttribute("rowspan"),10)||1)||1<(parseInt(r[o][p].getAttribute("colspan"),10)||1))&&(d=this.FindIndex((l=this.getCorrespondingIndex(r[o][p],r))[0],l[1],r))&&(c=Math.min(l[0],c),u=Math.max(d[0],u),h=Math.min(l[1],h),p=Math.max(d[1],p)),s=h;s<=p;s++)(1<(parseInt(r[c][s].getAttribute("rowspan"),10)||1)||1<(parseInt(r[c][s].getAttribute("colspan"),10)||1))&&(d=this.FindIndex((l=this.getCorrespondingIndex(r[c][s],r))[0],l[1],r))?(c=Math.min(l[0],c),u=Math.max(d[0],u),h=Math.min(l[1],h),p=Math.max(d[1],p)):(1<(parseInt(r[u][s].getAttribute("rowspan"),10)||1)||1<(parseInt(r[u][s].getAttribute("colspan"),10)||1))&&(d=this.FindIndex((l=this.getCorrespondingIndex(r[u][s],r))[0],l[1],r))&&(c=Math.min(l[0],c),u=Math.max(d[0],u),h=Math.min(l[1],h),p=Math.max(d[1],p));m=c===e&&u===t&&h===n&&p===i?{startRow:e,endRow:t,startColumn:n,endColumn:i}:this.highlightCells(c,u,h,p,r)}return m},e.prototype.tableMove=function(e){this.activeCell=e.selectNode[0];var t=e.event.target,r=this.activeCell.tagName,o=t.tagName;if(this.curTable=n.i(i.closest)(t,"table"),this.curTable.querySelectorAll(".e-cell-select").length>1&&this.parent.nodeSelection.Clear(this.parent.currentDocument),"TD"===t.tagName||"TH"===t.tagName||r===o){for(var s=Array.prototype.slice.call(this.activeCell.parentElement.parentElement.children).indexOf(this.activeCell.parentElement),a=Array.prototype.slice.call(this.activeCell.parentElement.children).indexOf(this.activeCell),l=Array.prototype.slice.call(t.parentElement.parentElement.children).indexOf(t.parentElement),d=Array.prototype.slice.call(t.parentElement.children).indexOf(t),c=this.curTable.querySelectorAll(".e-cell-select"),u=c.length-1;u>=0;u--)this.activeCell!==c[u]&&c[u].classList.remove("e-cell-select");if(s!==l||a!==d){for(var h=this.getCorrespondingColumns(),p=this.getCorrespondingIndex(this.activeCell,h),m=this.getCorrespondingIndex(t,h),f=this.highlightCells(Math.min(p[0],m[0]),Math.max(p[0],m[0]),Math.min(p[1],m[1]),Math.max(p[1],m[1]),h),g=f.startRow;g<=f.endRow;g++)for(var b=f.startColumn;b<=f.endColumn;b++)h[g][b].classList.add("e-cell-select");this.parent.nodeSelection.range&&(this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,this.parent.nodeSelection.range.endContainer,this.parent.nodeSelection.range.endContainer,0,0),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,this.parent.nodeSelection.range.endContainer,0))}}},e}(),a=function(){function e(){}return e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return l});var i=n(22),r=n(7),o=n(11),s=n(6),a=n.i(s.a)(),l=function(){function e(){}return e.get=function(e,t,n,i,r,s){for(var l=JSON.parse(JSON.stringify(a)),d=JSON.parse(JSON.stringify(a)),c=new o.a,u=c.getRange(e),h=s?[s]:u.collapsed?c.getNodeCollection(u):c.getSelectionNodeCollectionBr(u),p=h.length,m=!1,f=0;f<h.length;f++){for(;3===h[f].nodeType&&3===u.startContainer.nodeType&&h[f].parentNode&&h[f].parentNode.lastElementChild&&"BR"!==h[f].parentNode.lastElementChild.nodeName&&0===this.getImmediateBlockNode(h[f].parentNode).textContent.replace(/\u200B/g,"").length&&0===u.startContainer.textContent.replace(/\u200B/g,"").length&&0===c.get(e).toString().replace(/\u200B/g,"").length;)h[f]=h[f].parentNode.lastElementChild.firstChild,m=!0;m&&h[f]&&(c.setCursorPoint(e,h[f],h[f].textContent.length),m=!1),("BR"!==h[f].nodeName&&3!==h[f].nodeType||p>1&&3===h[f].nodeType&&""===h[f].textContent.trim())&&(h.splice(f,1),f--)}for(var f=0;f<h.length;f++)l=this.getFormatParent(e,l,h[f],t,n,i,r),(0===f&&l.bold||!l.bold)&&(d.bold=l.bold),(0===f&&l.insertcode||!l.insertcode)&&(d.insertcode=l.insertcode),(0===f&&l.italic||!l.italic)&&(d.italic=l.italic),(0===f&&l.underline||!l.underline)&&(d.underline=l.underline),(0===f&&l.strikethrough||!l.strikethrough)&&(d.strikethrough=l.strikethrough),(0===f&&l.superscript||!l.superscript)&&(d.superscript=l.superscript),(0===f&&l.subscript||!l.subscript)&&(d.subscript=l.subscript),(0===f&&l.fontcolor||!l.fontcolor)&&(d.fontcolor=l.fontcolor),0===f&&l.fontname?d.fontname=l.fontname:d.fontname=l.fontname===d.fontname?l.fontname:"empty",0===f&&l.fontsize?d.fontsize=l.fontsize:d.fontsize=l.fontsize===d.fontsize?l.fontsize:"empty",(0===f&&l.backgroundcolor||!l.backgroundcolor)&&(d.backgroundcolor=l.backgroundcolor),(0===f&&l.orderedlist||!l.orderedlist)&&(d.orderedlist=l.orderedlist),(0===f&&l.unorderedlist||!l.unorderedlist)&&(d.unorderedlist=l.unorderedlist),(0===f&&l.alignments||!l.alignments)&&(d.alignments=l.alignments),0===f&&l.formats?d.formats=l.formats:d.formats=l.formats===d.formats?l.formats:"empty",(0===f&&l.createlink||!l.createlink)&&(d.createlink=l.createlink),(0===f&&l.numberFormatList||!l.numberFormatList)&&(d.numberFormatList=l.numberFormatList),(0===f&&l.bulletFormatList||!l.bulletFormatList)&&(d.bulletFormatList=l.bulletFormatList),l=JSON.parse(JSON.stringify(a));return d},e.getImmediateBlockNode=function(e){do{e=e.parentNode}while(e&&r.a.indexOf(e.nodeName.toLocaleLowerCase())<0);return e},e.getFormatParent=function(e,t,n,i,r,o,s){if(i.contains(n)||3===n.nodeType&&3!==i.nodeType&&i.contains(n.parentNode))do{t=this.isFormattedNode(e,t,n,r,o,s),n=n.parentNode}while(n&&n!==i);return t},e.isFormattedNode=function(e,t,n,r,o,s){return t.bold||(t.bold=i.a.isBold(n)),t.italic||(t.italic=i.a.isItalic(n)),t.underline||(t.underline=i.a.isUnderline(n)),t.strikethrough||(t.strikethrough=i.a.isStrikethrough(n)),t.superscript||(t.superscript=i.a.isSuperscript(n)),t.subscript||(t.subscript=i.a.isSubscript(n)),t.fontcolor||(t.fontcolor=this.isFontColor(e,n)),t.fontname||(t.fontname=this.isFontName(e,n,s)),t.fontsize||(t.fontsize=this.isFontSize(e,n,o)),t.backgroundcolor||(t.backgroundcolor=this.isBackgroundColor(n)),t.orderedlist||(t.orderedlist=this.isOrderedList(n)),t.unorderedlist||(t.unorderedlist=this.isUnorderedList(n)),t.alignments||(t.alignments=this.isAlignment(n)),t.formats||(t.formats=this.isFormats(n,r),"pre"===t.formats&&(t.insertcode=!0)),t.createlink||(t.createlink=this.isLink(n)),t.numberFormatList||(t.numberFormatList=this.isNumberFormatList(n)),t.bulletFormatList||(t.bulletFormatList=this.isBulletFormatList(n)),t},e.isFontColor=function(e,t){var n=t.style&&t.style.color;return null!==n&&void 0!==n&&""!==n||3===t.nodeType||(n=this.getComputedStyle(e,t,"color")),null!==n&&""!==n&&void 0!==n?n:null},e.isLink=function(e){return"a"===e.nodeName.toLocaleLowerCase()},e.isBackgroundColor=function(e){var t=e.style&&e.style.backgroundColor;return null!==t&&""!==t&&void 0!==t?t:null},e.isFontSize=function(e,t,n){var i=t.style&&t.style.fontSize;return null!==i&&void 0!==i&&""!==i||3===t.nodeType||!t.parentElement.classList.contains("e-content")||(i=this.getComputedStyle(e,t,"font-size")),null!==i&&""!==i&&void 0!==i&&(null===n||void 0===n||n.indexOf(i)>-1)?i:null},e.isFontName=function(e,t,n){var i=t.style&&t.style.fontFamily;null!==i&&void 0!==i&&""!==i||3===t.nodeType||(i=this.getComputedStyle(e,t,"font-family"));var r=null;return null!==i&&""!==i&&void 0!==i&&(null===n||void 0===n||n.filter(function(e,t){var n=new RegExp(i,"i");(e.replace(/"/g,"").replace(/ /g,"").toLowerCase()===i.replace(/"/g,"").replace(/ /g,"").toLowerCase()||e.split(",")[0]&&e.split(",")[0].search(n)>-1)&&(r=t)})&&null!==r)?null!==r?n[r]:i.replace(/"/g,""):null},e.isOrderedList=function(e){return"ol"===e.nodeName.toLocaleLowerCase()},e.isUnorderedList=function(e){return"ul"===e.nodeName.toLocaleLowerCase()},e.isAlignment=function(e){var t=e.style&&e.style.textAlign;return"left"===t?"justifyleft":"center"===t?"justifycenter":"right"===t?"justifyright":"justify"===t?"justifyfull":null},e.isFormats=function(e,t){return(void 0===t||null===t)&&r.a.indexOf(e.nodeName.toLocaleLowerCase())>-1||null!==t&&void 0!==t&&t.indexOf(e.nodeName.toLocaleLowerCase())>-1?e.nodeName.toLocaleLowerCase():null},e.getComputedStyle=function(e,t,n){return e.defaultView.getComputedStyle(t,null).getPropertyValue(n)},e.isNumberFormatList=function(e){var t=e.style&&e.style.listStyleType;return"lower-alpha"===t?"Lower Alpha":"number"===t?"Number":"upper-alpha"===t?"Upper Alpha":"lower-roman"===t?"Lower Roman":"upper-roman"===t?"Upper Roman":"lower-greek"===t?"Lower Greek":"none"===t?"None":!!this.isOrderedList(e)||null},e.isBulletFormatList=function(e){var t=e.style&&e.style.listStyleType;return"circle"===t?"Circle":"square"===t?"Square":"none"===t?"None":"disc"===t?"Disc":!!this.isUnorderedList(e)||null},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(20)),o=n(3),s=n(6),a=function(){function e(e,t){this.undoRedoStack=[],this.parent=e,this.undoRedoSteps=n.i(i.isNullOrUndefined)(t)?30:t.undoRedoSteps,this.undoRedoTimer=n.i(i.isNullOrUndefined)(t)?300:t.undoRedoTimer,this.addEventListener()}return e.prototype.addEventListener=function(){var e=n.i(i.debounce)(this.keyUp,this.undoRedoTimer);this.parent.observer.on(o.f,e,this),this.parent.observer.on(o.d,this.keyDown,this),this.parent.observer.on(o.b,this.onAction,this),this.parent.observer.on(o.h,this.onPropertyChanged,this)},e.prototype.onPropertyChanged=function(e){for(var t=0,n=Object.keys(e.newProp);t<n.length;t++){switch(n[t]){case"undoRedoSteps":this.undoRedoSteps=e.newProp.undoRedoSteps;break;case"undoRedoTimer":this.undoRedoTimer=e.newProp.undoRedoTimer}}},e.prototype.removeEventListener=function(){this.parent.observer.off(o.f,this.keyUp),this.parent.observer.off(o.d,this.keyDown),this.parent.observer.off(o.b,this.onAction)},e.prototype.onAction=function(e){"Undo"===e.subCommand?this.undo(e):this.redo(e)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.keyDown=function(e){var t=e.event,n=this;switch(t.action){case"undo":t.preventDefault(),n.undo(e);break;case"redo":t.preventDefault(),n.redo(e)}},e.prototype.keyUp=function(e){17===e.event.keyCode||e.event.ctrlKey||this.saveData(e)},e.prototype.getTextContentFromFragment=function(e){for(var t="",n=0;n<e.childNodes.length;n++){var i=e.childNodes[n];i.nodeType===Node.TEXT_NODE?t+=i.textContent:i.nodeType===Node.ELEMENT_NODE&&(t+=this.getTextContentFromFragment(i))}return t},e.prototype.saveData=function(e){for(var t=(new r.a).getRange(this.parent.currentDocument),o=this.parent.editableElement===t.startContainer.parentElement?t.startContainer.parentElement:t.startContainer,s=o.childNodes.length-1;s>=0;s--)!n.i(i.isNullOrUndefined)(o.childNodes[s])&&"#text"===o.childNodes[s].nodeName&&0===o.childNodes[s].textContent.length&&"IMG"!==o.childNodes[s].nodeName&&"BR"!==o.childNodes[s].nodeName&&o.childNodes[s].nodeName&&n.i(i.detach)(o.childNodes[s]);t=(new r.a).getRange(this.parent.currentDocument);for(var a=(new r.a).save(t,this.parent.currentDocument),l=this.parent.editableElement.cloneNode(!0),d=document.createDocumentFragment();l.firstChild;)d.appendChild(l.firstChild);var c={text:d,range:a};this.undoRedoStack.length>=this.steps&&(this.undoRedoStack=this.undoRedoStack.slice(0,this.steps+1)),this.undoRedoStack.length>1&&this.undoRedoStack[this.undoRedoStack.length-1].range.range.collapsed===t.collapsed&&this.undoRedoStack[this.undoRedoStack.length-1].range.startOffset===a.range.startOffset&&this.undoRedoStack[this.undoRedoStack.length-1].range.endOffset===a.range.endOffset&&this.undoRedoStack[this.undoRedoStack.length-1].range.range.startContainer===a.range.startContainer&&this.getTextContentFromFragment(this.undoRedoStack[this.undoRedoStack.length-1].text).trim()===this.getTextContentFromFragment(c.text).trim()||(this.undoRedoStack.push(c),this.steps=this.undoRedoStack.length-1,this.steps>this.undoRedoSteps&&(this.undoRedoStack.shift(),this.steps--),e&&e.callBack&&e.callBack())},e.prototype.undo=function(e){if(this.steps>0){var t=this.undoRedoStack[this.steps-1].range,i=this.undoRedoStack[this.steps-1].text;this.parent.editableElement.innerHTML="",this.parent.editableElement.appendChild(i.cloneNode(!0)),this.parent.editableElement.focus(),n.i(s.b)()&&n.i(s.c)(this.parent.editableElement,e.selector),t.restore(),this.steps--,e.callBack&&e.callBack({requestType:"Undo",editorMode:"HTML",range:t,elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),event:e.event})}},e.prototype.redo=function(e){if(null!=this.undoRedoStack[this.steps+1]){var t=this.undoRedoStack[this.steps+1].range,i=this.undoRedoStack[this.steps+1].text;this.parent.editableElement.innerHTML="",this.parent.editableElement.appendChild(i.cloneNode(!0)),this.parent.editableElement.focus(),n.i(s.b)()&&n.i(s.c)(this.parent.editableElement,e.selector),t.restore(),this.steps++,e.callBack&&e.callBack({requestType:"Redo",editorMode:"HTML",range:t,elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),event:e.event})}},e.prototype.getUndoStatus=function(){var e={undo:!1,redo:!1};return this.steps>0&&(e.undo=!0),null!=this.undoRedoStack[this.steps+1]&&(e.redo=!0),e},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(7)),o=n(21),s=n(8),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.p,this.videoCommand,this)},e.prototype.videoCommand=function(e){var t,r,s,a=e.value.toString().toLowerCase();switch("video"!==a&&"videoreplace"!==a&&(t=e.item.selectNode[0],r=t.closest("."+o.a),s=t.closest("."+o.b)),a){case"video":case"videoreplace":this.createVideo(e);break;case"videodimension":this.videoDimension(e);break;case"inline":t.removeAttribute("class"),r&&(r.style.display="inline-block"),s&&(t.parentElement.style.cssFloat=""),n.i(i.addClass)([t],[o.c,o.d,o.e]),this.callBack(e);break;case"break":t.removeAttribute("class"),r&&(r.style.display="block"),s&&(t.parentElement.style.cssFloat=""),n.i(i.addClass)([t],[o.f,o.c,o.e]),this.callBack(e);break;case"justifyleft":t.removeAttribute("class"),r&&(r.style.display="block"),s&&(t.parentElement.style.cssFloat="left"),n.i(i.addClass)([t],[o.c,o.g]),this.callBack(e);break;case"justifycenter":t.removeAttribute("class"),r&&(r.style.display="block"),s&&(t.parentElement.style.cssFloat=""),n.i(i.addClass)([t],[o.c,o.h]),this.callBack(e);break;case"justifyright":t.removeAttribute("class"),r&&(r.style.display="block"),s&&(t.parentElement.style.cssFloat="right"),n.i(i.addClass)([t],[o.c,o.i]),this.callBack(e);break;case"videoremove":n.i(i.detach)(t.parentElement),this.callBack(e)}},e.prototype.createVideo=function(e){var t,r,a,l=this,d=!1;if("VideoReplace"!==e.value||n.i(i.isNullOrUndefined)(e.item.selectParent)||"VIDEO"!==e.item.selectParent[0].tagName)if("VideoReplace"===e.value&&!n.i(i.isNullOrUndefined)(e.item.selectParent)&&e.item.selectParent[0].classList&&e.item.selectParent[0].classList.contains(o.b))e.item.selectParent[0].innerHTML=e.item.fileName,this.setStyle(e.item.selectParent[0].firstElementChild,e,e.item.selectParent[0].firstElementChild);else{if(e.item.isEmbedUrl){t=n.i(i.createElement)("span",{className:o.a,attrs:{contentEditable:"false"}});var c=n.i(i.createElement)("span",{className:o.b}),u=n.i(i.createElement)("template");u.innerHTML=e.item.fileName,c.appendChild(u.content),r=a=c.firstElementChild,this.setStyle(a,e,r),t.appendChild(c)}else t=n.i(i.createElement)("span",{className:o.j,attrs:{contentEditable:"false",title:e.item.fileName}}),r=n.i(i.createElement)("video",{className:o.c+" "+o.d,attrs:{controls:""}}),a=n.i(i.createElement)("source"),this.setStyle(a,e,r),r.appendChild(a),t.appendChild(r);if(n.i(i.isNullOrUndefined)(e.item.selection)||e.item.selection.restore(),s.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),null===t.nextElementSibling){var h=n.i(i.createElement)("br");t.parentNode.insertBefore(h,t.nextSibling)}}else{var p=e.item.selectParent[0].querySelector("source");this.setStyle(p,e,p),d=!0}if(e.callBack&&(n.i(i.isNullOrUndefined)(e.selector)||!n.i(i.isNullOrUndefined)(e.selector)&&"pasteCleanupModule"!==e.selector)){var m=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0],f="VideoReplace"===e.value||d?e.item.isEmbedUrl?e.item.selectParent[0].querySelector("iframe"):e.item.selectParent[0]:i.Browser.isIE?m:e.item.isEmbedUrl?m.querySelector("iframe"):m.lastElementChild;f.addEventListener("IFRAME"!==f.tagName?"loadeddata":"load",function(){"VideoReplace"===e.value&&d||(e.item.isEmbedUrl&&f&&f.classList.add("e-rte-embed-url"),e.callBack({requestType:"Videos",editorMode:"HTML",event:e.event,range:l.parent.nodeSelection.getRange(l.parent.currentDocument),elements:[f]}))}),d&&f.load(),-1!==i.Browser.userAgent.indexOf("Firefox")&&(r.addEventListener("play",function(){l.editAreaVideoClick(e)}),r.addEventListener("pause",function(){l.editAreaVideoClick(e)}))}},e.prototype.editAreaVideoClick=function(e){e.callBack({requestType:"VideosPlayPause",editorMode:"HTML",event:e.event})},e.prototype.setStyle=function(e,t,r){""===t.item.url||n.i(i.isNullOrUndefined)(t.item.url)||e.setAttribute("src",t.item.url),t.item.isEmbedUrl||(e.type=t.item.fileName&&t.item.fileName.split(".").length>0?"video/"+t.item.fileName.split(".")[t.item.fileName.split(".").length-1]:t.item.url&&t.item.url.split(".").length>0?"video/"+t.item.url.split(".")[t.item.url.split(".").length-1]:""),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.width)||r.setAttribute("width",n.i(i.formatUnit)(t.item.width.width)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.height)||r.setAttribute("height",n.i(i.formatUnit)(t.item.height.height)),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.minWidth)||(r.style.minWidth=n.i(i.formatUnit)(t.item.width.minWidth)),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.maxWidth)||(r.style.maxWidth=n.i(i.formatUnit)(t.item.width.maxWidth)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.minHeight)||(r.style.minHeight=n.i(i.formatUnit)(t.item.height.minHeight)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.maxHeight)||(r.style.maxHeight=n.i(i.formatUnit)(t.item.height.maxHeight))},e.prototype.videoDimension=function(e){var t=e.item.selectNode[0].classList.contains(o.b)?e.item.selectNode[0].querySelector("iframe"):e.item.selectNode[0];t.style.height="",t.style.width="","auto"!==e.item.width?t.style.width=n.i(i.formatUnit)(e.item.width):t.removeAttribute("width"),"auto"!==e.item.height?t.style.height=n.i(i.formatUnit)(e.item.height):t.removeAttribute("height"),this.callBack(e)},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return g});var i=n(0),r=(n.n(i),n(10)),o=n(58),s=n(56),a=n(59),l=n(23),d=n(15),c=n(61),u=n(57),h=n(60),p=n(3),m=n(55),f=n(91),g=function(){function e(e){this.initialize(),n.i(i.extend)(this,this,e,!0),this.observer=new i.Observer(this),this.markdownSelection=new l.a,this.listObj=new o.a({parent:this,syntax:this.listTags}),this.formatObj=new s.a({parent:this,syntax:this.formatTags}),this.undoRedoManager=new c.a(this,e.options),this.mdSelectionFormats=new a.a({parent:this,syntax:this.selectionTags}),this.linkObj=new u.a(this),this.tableObj=new h.a({parent:this,syntaxTag:{Formats:this.formatTags,List:this.listTags}}),this.clearObj=new m.a(this),this.insertTextObj=new f.a(this),this.wireEvents()}return e.prototype.initialize=function(){this.formatTags=d.a,this.listTags=d.c,this.selectionTags=d.b},e.prototype.wireEvents=function(){this.observer.on(p.a,this.editorKeyDown,this),this.observer.on(p.g,this.editorKeyUp,this),this.observer.on(p.i,this.onPropertyChanged,this)},e.prototype.onPropertyChanged=function(e){this.observer.notify(p.h,e)},e.prototype.editorKeyDown=function(e){this.observer.notify(p.d,e)},e.prototype.editorKeyUp=function(e){this.observer.notify(p.f,e)},e.prototype.execCommand=function(e,t,n,i,o,s){switch(e.toLocaleLowerCase()){case"lists":this.observer.notify(r.d,{subCommand:t,event:n,callBack:i});break;case"formats":this.observer.notify(p.c,{subCommand:t,event:n,callBack:i});break;case"actions":this.observer.notify(p.b,{subCommand:t,event:n,callBack:i});break;case"style":case"effects":case"casing":this.observer.notify(r.c,{subCommand:t,event:n,callBack:i});break;case"links":case"images":this.observer.notify(r.b,{subCommand:t,event:n,callBack:i,item:s});break;case"table":switch(t.toString().toLocaleLowerCase()){case"createtable":this.observer.notify(r.a,{subCommand:t,item:s,event:n,callBack:i})}break;case"clear":this.observer.notify(r.e,{subCommand:t,event:n,callBack:i});break;case"inserttext":this.observer.notify(r.f,{subCommand:t,event:n,callBack:i,value:{text:s}})}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(10),r=function(){function e(e){this.parent=e,this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.e,this.clear,this)},e.prototype.replaceRegex=function(e){return e.replace(/\*/gi,"\\*").replace(/\&/gi,"\\&").replace(/\-/gi,"\\-").replace(/\^/gi,"\\^").replace(/\$/gi,"\\$").replace(/\./gi,"\\.").replace(/\|/gi,"\\|").replace(/\?/gi,"\\?").replace(/\+/gi,"\\+").replace(/\-/gi,"\\-").replace(/\&/gi,"\\&")},e.prototype.clearSelectionTags=function(e){for(var t=this.parent.selectionTags,n=Object.keys(t),i=0;i<n.length;i++){var r=n[i];if(t.hasOwnProperty(r)&&""!==t[r]){var o=this.replaceRegex(t[""+r]),s=void 0,a=t[""+r].length,l="<sup>"===t[""+r]||"<sub>"===t[""+r]?t[""+r].length+1:t[""+r].length;s="<sup>"===t[""+r]?new RegExp("<sup>(.*?)</sup>","ig"):"<sub>"===t[""+r]?new RegExp("<sub>(.*?)</sub>","ig"):new RegExp(o+"(.*?)"+o,"ig");for(var d=e.match(s),c=0;d&&c<d.length&&""!==d[c];c++)e=e.replace(d[c],d[c].substr(a,d[c].length-l-a))}}return e},e.prototype.clearFormatTags=function(e){var t=e.split("\n");return this.clearFormatLines(t)},e.prototype.clearFormatLines=function(e){for(var t=[this.parent.formatTags,this.parent.listTags],n="",i=0;i<e.length;i++){for(var r=0;r<t.length;r++)for(var o=t[r],s=Object.keys(o),a=0;a<s.length;a++){var l=s[a];o.hasOwnProperty(l)&&""!==o[l]&&0===e[i].indexOf(o[""+l])&&(e[i]=e[i].replace(o[""+l],""),e[i]=this.clearFormatLines([e[i]]))}n=n+e[i]+(i!==e.length-1?"\n":"")}return n},e.prototype.clear=function(e){var t=this.parent.element;t.focus();var n=t.selectionStart,i=t.selectionEnd,r=this.selection.getSelectedText(t);r=this.clearSelectionTags(r),r=this.clearFormatTags(r),t.value=t.value.substr(0,n)+r+t.value.substr(i,t.value.length),this.parent.markdownSelection.setSelection(t,n,n+r.length),this.restore(t,n,n+r.length,e)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:i.subCommand,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),n(3)),o=n(10),s=function(){function e(e){n.i(i.extend)(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.c,this.applyFormats,this)},e.prototype.applyFormats=function(e){e.subCommand=e.subCommand.toLowerCase();var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var r=this.selection.getSelectedParentPoints(t);if(this.isAppliedFormat(r)===e.subCommand){if("pre"===e.subCommand){if(!(r.length>1))return;this.applyCodeBlock(t,e,r)}return this.cleanFormat(t),void this.restore(t,t.selectionStart,t.selectionEnd,e)}if("p"===e.subCommand)return this.cleanFormat(t),void this.restore(t,t.selectionStart,t.selectionEnd,e);("pre"===e.subCommand&&1!==r.length||"pre"!==e.subCommand)&&this.cleanFormat(t,e.subCommand);var s=t.selectionStart,a=t.selectionEnd,l=0;if(r=this.selection.getSelectedParentPoints(t),"pre"===e.subCommand)return void(r.length>1?this.applyCodeBlock(t,e,r):(n.i(i.extend)(e,e,{subCommand:"InlineCode"},!0),this.parent.observer.notify(o.c,e)));for(var d=0;d<r.length;d++)if(""===r[d].text||this.selection.isStartWith(r[d].text,"\\"+this.syntax[e.subCommand])){if(""===r[d].text&&0===d&&(this.selection.save(s,a),0===this.selection.getSelectedText(t).length&&(r[d].text=this.syntax[e.subCommand],t.value=t.value.substr(0,r[d].start)+this.syntax[e.subCommand]+t.value.substr(r[d].end,t.value.length),s=0===d?s+this.syntax[e.subCommand].length:s,l+=this.syntax[e.subCommand].length),1!==r.length))for(var c=d;c<r.length;c++)r[c].start=0!==c?1+r[c].start:r[c].start,r[c].end=1+r[c].end}else if(r[d].text=this.syntax[e.subCommand]+r[d].text,t.value=t.value.substr(0,r[d].start)+r[d].text+"\n"+t.value.substr(r[d].end,t.value.length),s=0===d?s+this.syntax[e.subCommand].length:s,l+=this.syntax[e.subCommand].length,1!==r.length)for(var c=d;c<r.length;c++)r[c].start=0!==c?this.syntax[e.subCommand].length+r[c].start:r[c].start,r[c].end=this.syntax[e.subCommand].length+r[c].end;this.restore(t,s,a+l,e)},e.prototype.clearRegex=function(){for(var e="",t=Object.keys(this.syntax),n=0;n<t.length&&"pre"!==t[n]&&"p"!==t[n];n++)e+=""===e?"^("+this.selection.replaceSpecialChar(this.syntax[t[n]].trim())+")":"|^("+this.selection.replaceSpecialChar(this.syntax[t[n]].trim())+")";return e},e.prototype.cleanFormat=function(e,t){var n=this.selection.getSelectedParentPoints(e),i=e.selectionStart,r=e.selectionEnd,o=0;if(this.selection.isClear(n,this.clearRegex())){for(var s=0;s<n.length;s++){for(var a=Object.keys(this.syntax),l=0;""!==n[s].text&&l<a.length;l++){var d=this.syntax[a[l]];if(a[l]!==t){var c=new RegExp("^("+this.selection.replaceSpecialChar(d)+")","gim");if(c.test(n[s].text)){if(n[s].text=n[s].text.replace(c,""),e.value=e.value.substr(0,n[s].start)+n[s].text+"\n"+e.value.substr(n[s].end,e.value.length),i=0===s?i-d.length>0?i-d.length:0:i,o+=d.length,1!==n.length)for(var u=0;u<n.length;u++)n[u].start=0!==u?n[u].start-d.length:n[u].start,n[u].end=n[u].end-d.length;break}}}if(""===n[s].text&&0===s&&(this.selection.save(i,r),1!==n.length))for(var l=s;l<n.length;l++)n[l].start=0!==l?1+n[l].start:n[l].start,n[l].end=1+n[l].end}this.restore(e,i,r-o)}},e.prototype.applyCodeBlock=function(e,t,n){var i=t.subCommand,r=n[0].start,o=n[n.length-1].end,s=this.selection.getAllParents(e.value),a=s[n[0].line-1],l=s[n.length+1+1];if(this.selection.isStartWith(a,this.syntax.pre.split("\n")[0])||this.selection.isStartWith(l,this.syntax.pre.split("\n")[0])){var d=this.syntax[""+i],c=this.parent.markdownSelection.getSelectedInlinePoints(e),u=e.value.substr(0,e.selectionStart).lastIndexOf(d),h=e.value.substr(e.selectionEnd,e.selectionEnd).indexOf(d);h+=c.end;var p=this.replaceAt(e.value.substr(0,c.start),d,"",u,c.start),m=this.replaceAt(e.value.substr(c.end,e.value.length),d,"",0,h);e.value=p+c.text+m,r=this.selection.selectionStart-d.length,o=this.selection.selectionEnd-d.length}else{var f=e.value.substring(r,o).split("\n"),g=""===f[f.length-1]?"":"\n";e.value=e.value.substr(0,r)+this.syntax[""+i]+e.value.substring(r,o)+g+this.syntax[""+i]+e.value.substr(o,e.value.length),r=this.selection.selectionStart+this.syntax[""+i].length,o=this.selection.selectionEnd+this.syntax[""+i].length-1}this.restore(e,r,o,t)},e.prototype.replaceAt=function(e,t,n,i,r){return e.slice(0,i)+e.slice(i,r).replace(t,n)+e.slice(r)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:i.subCommand,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e.prototype.isAppliedFormat=function(e,t){for(var n="p",i=(Object.keys(this.syntax),Object.keys(this.syntax)),r=this.parent.element.selectionDirection,o="backward"===r?e[0].text:e[e.length-1].text,s=0;!t&&s<i.length;s++){if("pre"!==i[s]&&this.selection.isStartWith(o,this.syntax[i[s]])){n=i[s];break}if("pre"===i[s]){var a=this.selection.getAllParents(this.parent.element.value),l=a[e[0].line-1],d=a[e.length+1];if(this.selection.isStartWith(l,this.syntax[i[s]].split("\n")[0])&&this.selection.isStartWith(d,this.syntax[i[s]].split("\n")[0])){n=i[s];break}}}return n},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(10),r=function(){function e(e){this.parent=e,this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.b,this.createLink,this)},e.prototype.createLink=function(e){var t=this.parent.element;t.focus();var n=t.selectionStart,i=t.selectionEnd,r="Image"===e.subCommand?this.selection.getSelectedText(t):e.item.text,o="Image"===e.subCommand?n+2:n+1,s="Image"===e.subCommand?i+2:i+1;r="Image"===e.subCommand?"":"["+r+"]("+e.item.url+")",t.value=t.value.substr(0,n)+r+t.value.substr(i,t.value.length),this.parent.markdownSelection.setSelection(t,o,s),this.restore(t,o,s,e)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:i.subCommand,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(10),r=n(0),o=(n.n(r),n(3)),s=function(){function e(e){n.i(r.extend)(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.d,this.applyListsHandler,this),this.parent.observer.on(o.d,this.keyDownHandler,this),this.parent.observer.on(o.f,this.keyUpHandler,this)},e.prototype.keyDownHandler=function(e){switch(e.event.which){case 9:this.tabKey(e)}switch(e.event.action){case"ordered-list":this.applyListsHandler({subCommand:"OL",callBack:e.callBack}),e.event.preventDefault();break;case"unordered-list":this.applyListsHandler({subCommand:"UL",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.keyUpHandler=function(e){switch(e.event.which){case 13:this.enterKey(e)}},e.prototype.tabKey=function(e){var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var n=t.selectionStart,i=t.selectionEnd,r=this.selection.getSelectedParentPoints(t),o=0,s=this.isNotFirstLine(t,r[0]);if(!s&&!e.event.shiftKey)return void this.restore(t,n,i+o,e);var a=this.olListType(),l=this.getListRegex();this.currentAction=this.getAction(r[0].text);for(var d=0;d<r.length;d++){var c=(e.event.shiftKey,r[d].line-1),u=this.selection.getLine(t,c);if(u&&(!e.event.shiftKey&&s||e.event.shiftKey)){var h=u.split(". "),p=e.event.shiftKey?-"\t".length:"\t".length,m=r[d].text.split("\t");if(e.event.shiftKey&&1===m.length)break;if("OL"===this.currentAction&&/^\d+$/.test(h[0].trim())&&a){e.event.preventDefault(),r[d].text=e.event.shiftKey?m.splice(1,m.length).join("\t"):"\t"+r[d].text;var f=this.getTabSpace(r[d].text),g=this.getTabSpace(u),b=r[d].text.split(". ");if(f===g)this.changeTextAreaValue(b,this.nextOrderedListValue(h[0].trim()),e,t,r,d,i);else if(g<f)this.changeTextAreaValue(b,"1. ",e,t,r,d,i);else for(;g.length>f.length;null){c-=1,u=this.selection.getLine(t,c);var v=u.trim().split(". ");if(/^\d+$/.test(v[0])&&(g=this.getTabSpace(u),g.length<=f.length)){this.changeTextAreaValue(b,this.nextOrderedListValue(v[0]),e,t,r,d,i);break}}}else("UL"===this.currentAction&&l.test(u.trim())||!a)&&(e.event.preventDefault(),r[d].text=e.event.shiftKey?m.splice(1,m.length).join("\t"):"\t"+r[d].text,t.value=t.value.substr(0,r[d].start)+r[d].text+"\n"+t.value.substr(r[d].end,t.value.length));if(n=0===d?n+p:n,o+=p,1!==r.length)for(var C=d;C<r.length;C++)r[C].start=0!==C?r[C].start+p:r[C].start,r[C].end=r[C].end+p}}this.restore(t,n,i+o,e)},e.prototype.changeTextAreaValue=function(e,t,i,o,s,a,l){var d=t;e.splice(0,1);var c,u=this.selection.getAllParents(o.value).length,h="",p=this.getTabSpace(s[a].text),m=parseInt(d.split(".")[0],null),f=this.getTabSpace(s[a].text),g=!0,b=!0,v=-1,C=!0,y=0,N="";h=""!==this.selection.getLine(o,s[0].line+1)?"":h+o.value.substr(s[0].end,o.value.length);for(var S=1;S<u&&!n.i(r.isNullOrUndefined)(this.selection.getLine(o,s[0].line+S))&&""!==this.selection.getLine(o,s[0].line+S);S++){var E=this.selection.getLine(o,s[0].line+S),T=this.getTabSpace(E),O=E.split(". ");if(1===O.length){h+=o.value.substr(s[0].end+y,o.value.length);break}y+=E.length;var w=!1;if(c=i.event.shiftKey?p.length+1:p.length-1,T.length>f.length&&(C=!1),p.length!==T.length&&T.length<f.length?(b=!0,g=!1,w=!(!i.event.shiftKey||p.length!==T.length)&&(b=!1,!0)):C&&i.event.shiftKey&&p.length===T.length&&T.length===f.length&&(b=!1,w=!0),N=""===h?"":"\n",c===T.length&&b){var k=i.event.shiftKey?(v++,this.nextOrderedListValue(v.toString())):this.previousOrderedListValue(O[0]);O.splice(0,1),h=h+N+T+k+O.join(". ")}else if(p.length===T.length&&g||w){var k=this.nextOrderedListValue(m.toString());m++,O.splice(0,1),h=h+N+T+k+O.join(". ")}else h=h+N+E,b=!1;f=this.getTabSpace(E)}s[a].text=this.getTabSpace(s[a].text)+d+e.join(". ")+"\n",o.value=o.value.substr(0,s[a].start)+s[a].text+h},e.prototype.getTabSpace=function(e){for(var t=e.split("\t"),n="",i=0;i<t.length&&""===t[i];i++)n+="\t";return n},e.prototype.isNotFirstLine=function(e,t){var n,i=t.text,r=t.line-1,o=this.selection.getLine(e,r),s=this.getListRegex(),a=!1;if(o){this.currentAction=this.getAction(o);var l=o.split(". ");n="OL"===this.currentAction?/^\d+$/.test(l[0].trim()):s.test(o.trim())}if(o&&n){var d=this.getTabSpace(i),c=this.getTabSpace(o);for(a=d===c||a;c.length>d.length;null){r-=1,o=this.selection.getLine(e,r);var l=o.trim().split(". ");if(("OL"===this.currentAction?/^\d+$/.test(l[0]):s.test(o.trim()))&&(c=this.getTabSpace(o),c.length<=d.length)){a=!0;break}}}return a},e.prototype.getAction=function(e){var t=e.split(". ")[0],n=/^\d+$/.test(t.trim()),i=e.trim().split(new RegExp("^("+this.selection.replaceSpecialChar(this.syntax.UL).trim()+")"))[1];return n?"OL":i?"UL":"NOTLIST"},e.prototype.nextOrderedListValue=function(e){return(parseInt(e,null)+1).toString()+". "},e.prototype.previousOrderedListValue=function(e){return(parseInt(e,null)-1).toString()+". "},e.prototype.enterKey=function(e){var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var i=t.selectionStart,o=t.selectionEnd,s=this.selection.getSelectedParentPoints(t),a=this.selection.getLine(t,s[0].line-1),l=this.olListType(),d=this.getListRegex(),c=[];n.i(r.isNullOrUndefined)(a)||(c=a.split(". "),this.currentAction=this.getAction(a));var u=0;if("OL"===this.currentAction&&c.length>1&&/^\d+$/.test(c[0].trim())&&l&&""!==c[1]){var h=this.getTabSpace(a);this.currentAction=this.getAction(a);var p=this.nextOrderedListValue(c[0]);s[0].text=h+p+s[0].text;for(var m=this.selection.getAllParents(t.value).length,f="\n",g=this.getTabSpace(a),b=this.getTabSpace(s[0].text),v=!0,C=1;C<m&&""!==t.value.substr(s[0].end,t.value.length);C++){var y=this.selection.getLine(t,s[0].line+C);if(n.i(r.isNullOrUndefined)(y))f+="";else{var N=y.split(". "),S=this.getTabSpace(y);if(S.length<b.length&&(v=!1),N.length>1&&/^\d+$/.test(N[0].trim())&&g.length===S.length&&v){var E=this.nextOrderedListValue(N[0]);N.splice(0,1),f=f+S+E+N.join(". ")+"\n"}else f=f+y+"\n",b=this.getTabSpace(y)}}t.value=t.value.substr(0,s[0].start)+g+p+this.selection.getLine(t,s[0].line)+f,i=i+p.length+h.length,u+=p.length+h.length}else if("UL"===this.currentAction&&a&&d.test(a.trim())&&""!==a.trim().replace(d,"")||"OL"===this.currentAction&&!l){var h=this.getTabSpace(a),p=this.syntax[this.currentAction];s[0].text=h+p+s[0].text+(s[0].text.trim().length>0?"\n":""),t.value=t.value.substr(0,s[0].start)+s[0].text+t.value.substr(s[0].end,t.value.length),i=i+p.length+h.length,u+=p.length+h.length}this.restore(t,i,o+u,e)},e.prototype.olListType=function(){var e=this.syntax.OL.split(".,");return(1===e.length?null:parseInt(e[2].trim(),null)-parseInt(e[0].trim(),null))?1:0},e.prototype.applyListsHandler=function(e){var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd),this.currentAction=e.subCommand;for(var i,o=t.selectionStart,s=t.selectionEnd,a=0,l=0,d=0,c=this.selection.getSelectedParentPoints(t),u="",h=this.olListType(),p={},m=0;m<c.length;m++)if(i=h?"OL"===this.currentAction?m+h+". ":this.syntax[this.currentAction]:"OL"===this.currentAction?this.syntax.OL:this.syntax[this.currentAction],this.selection.isStartWith(c[m].text,i))c[m].text=c[m].text.replace(i,""),t.value=t.value.substr(0,c[m].start+d)+c[m].text+"\n"+t.value.substr(c[m].end+d,t.value.length),d-=i.length,l=i.length,this.restore(t,o-l,s+d,null);else{if(""===c[m].text&&0===m&&(this.selection.save(o,s),1!==c.length))for(var f=m;f<c.length;f++)c[f].start=0!==f?1+c[f].start:c[f].start,c[f].end=1+c[f].end;var g=n.i(r.isNullOrUndefined)(c[m-1])?0:this.getTabSpace(c[m-1].text).length,b=this.appliedLine(c[m].text,i,p,g);if(u=b.line?u:i,c[m].text=b.line?b.line:u+c[m].text,b.space=b.space?b.space:0,t.value=t.value.substr(0,c[m].start+d)+c[m].text+"\n"+t.value.substr(c[m].end,t.value.length),o=0===m?o+u.length+b.space>0?o+u.length+b.space:0:o,a+=u.length+b.space,1!==c.length)for(var f=m;f<c.length;f++)c[f].start=0!==f?u.length+c[f].start+b.space:c[f].start,c[f].end=u.length+c[f].end+b.space;this.restore(t,o,s+a,null)}this.restore(t,null,null,e)},e.prototype.appliedLine=function(e,t,i,o){var s={},a=new RegExp("^["+this.syntax.UL.trim()+"]"),l=e.split(". "),d=l[0]+". ",c=a.test(e.trim())||e.trim()===this.syntax.OL.trim()||e.trim()===this.syntax.UL.trim()||/^\d+$/.test(l[0].trim()),u=this.olListType(),h=this.getTabSpace(e).length;if("OL"===this.currentAction&&u&&(i[h.toString()]=n.i(r.isNullOrUndefined)(i[h.toString()])?1:i[h.toString()].valueOf()+1,t=i[h.toString()].valueOf().toString()+". ",!n.i(r.isNullOrUndefined)(o)&&o>h&&(i[o.toString()]=0)),c){var p=void 0,m=void 0;a.test(e.trim())?(m=this.syntax.UL,p=t,s.space=t.trim().length-this.syntax.UL.trim().length):/^\d+$/.test(l[0].trim())&&u?(m=l[0].trim()+". ",p=t,s.space=this.syntax.UL.trim().length-d.trim().length):/^\d+$/.test(l[0].trim())&&(m=l[0].trim()+". ",p=this.syntax.UL,s.space=this.syntax.UL.trim().length-d.trim().length),s.line=e.replace(m,p)}return s},e.prototype.restore=function(e,t,i,o){n.i(r.isNullOrUndefined)(t)||n.i(r.isNullOrUndefined)(t)||this.selection.save(t,i),n.i(r.isNullOrUndefined)(o)||this.selection.restore(e),o&&o.callBack&&o.callBack({requestType:this.currentAction,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:o.event})},e.prototype.getListRegex=function(){for(var e="",t=Object.keys(this.syntax),n=0;n<t.length;n++){var i=this.selection.replaceSpecialChar(this.syntax[t[n]]);e+=""===e?"^("+i+")|^("+i.trim()+")":"|^("+i+")|^("+i.trim()+")"}return new RegExp(e)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),n(10)),o=n(3),s=function(){function e(e){n.i(i.extend)(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.c,this.applyCommands,this),this.parent.observer.on(o.d,this.keyDownHandler,this)},e.prototype.keyDownHandler=function(e){switch(e.event.action){case"bold":this.applyCommands({subCommand:"Bold",callBack:e.callBack}),e.event.preventDefault();break;case"italic":this.applyCommands({subCommand:"Italic",callBack:e.callBack}),e.event.preventDefault();break;case"strikethrough":this.applyCommands({subCommand:"StrikeThrough",callBack:e.callBack}),e.event.preventDefault();break;case"uppercase":this.applyCommands({subCommand:"UpperCase",callBack:e.callBack}),e.event.preventDefault();break;case"lowercase":this.applyCommands({subCommand:"LowerCase",callBack:e.callBack}),e.event.preventDefault();break;case"superscript":this.applyCommands({subCommand:"SuperScript",callBack:e.callBack}),e.event.preventDefault();break;case"subscript":this.applyCommands({subCommand:"SubScript",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.isBold=function(e,t){return-1!==e.search("\\"+t+"\\"+t)},e.prototype.isItalic=function(e,t){return-1!==e.search("\\"+t)},e.prototype.isMatch=function(e,t){var n=[""];switch(t){case this.syntax.Italic:case this.syntax.InlineCode:case this.syntax.StrikeThrough:n=e.match(this.singleCharRegx(t))}return n},e.prototype.multiCharRegx=function(e){return new RegExp("(\\"+e+"\\"+e+")","g")},e.prototype.singleCharRegx=function(e){return new RegExp("(\\"+e+")","g")},e.prototype.isAppliedCommand=function(e){var t=!1,r=this.parent.element,o=r.selectionStart,s=function(e){return function(t){return[t.slice(0,e),t.slice(e)]}}(o)(r.value),a=this.syntax.Bold.substr(0,1),l=this.syntax.Italic,d=this.parent.markdownSelection.getSelectedText(r);if(""!==d&&d===d.toLocaleUpperCase()&&"UpperCase"===e)return!0;if(""===d){var c=r.value.substr(s[0].length-1,1),u=s[1].substr(0,1);if(""!==c&&""!==u&&c.match(/[a-z]/i)&&c===c.toLocaleUpperCase()&&u===u.toLocaleUpperCase()&&"UpperCase"===e)return!0}return this.isBold(s[0],a)||this.isItalic(s[0],l)||this.isBold(s[1],a)||this.isItalic(s[1],l)||(n.i(i.isNullOrUndefined)(this.isMatch(s[0],this.syntax.StrikeThrough))||n.i(i.isNullOrUndefined)(this.isMatch(s[1],this.syntax.StrikeThrough))||this.isMatch(s[0],this.syntax.StrikeThrough).length%2!=1||this.isMatch(s[1],this.syntax.StrikeThrough).length%2!=1||"StrikeThrough"!==e||(t=!0),n.i(i.isNullOrUndefined)(this.isMatch(s[0],this.syntax.InlineCode))||n.i(i.isNullOrUndefined)(this.isMatch(s[1],this.syntax.InlineCode))||this.isMatch(s[0],this.syntax.InlineCode).length%2!=1||this.isMatch(s[1],this.syntax.InlineCode).length%2!=1||"InlineCode"!==e||(t=!0),n.i(i.isNullOrUndefined)(s[0].match(/\<sub>/g))||n.i(i.isNullOrUndefined)(s[1].match(/\<\/sub>/g))||s[0].match(/\<sub>/g).length%2!=1||s[1].match(/\<\/sub>/g).length%2!=1||"SubScript"!==e||(t=!0),n.i(i.isNullOrUndefined)(s[0].match(/\<sup>/g))||n.i(i.isNullOrUndefined)(s[1].match(/\<\/sup>/g))||s[0].match(/\<sup>/g).length%2!=1||s[1].match(/\<\/sup>/g).length%2!=1||"SuperScript"!==e||(t=!0)),this.isBold(s[0],a)&&this.isBold(s[1],a)&&s[0].match(this.multiCharRegx(a)).length%2==1&&s[1].match(this.multiCharRegx(a)).length%2==1&&"Bold"===e&&(t=!0),s[0]=this.isBold(s[0],a)?s[0].replace(this.multiCharRegx(a),"$%@"):s[0],s[1]=this.isBold(s[1],a)?s[1].replace(this.multiCharRegx(a),"$%@"):s[1],n.i(i.isNullOrUndefined)(this.isMatch(s[0],this.syntax.Italic))||n.i(i.isNullOrUndefined)(this.isMatch(s[1],this.syntax.Italic))||this.isMatch(s[0],this.syntax.Italic).length%2!=1||this.isMatch(s[1],this.syntax.Italic).length%2!=1||"Italic"!==e||(t=!0),n.i(i.isNullOrUndefined)(this.isMatch(s[0],this.syntax.StrikeThrough))||n.i(i.isNullOrUndefined)(this.isMatch(s[1],this.syntax.StrikeThrough))||this.isMatch(s[0],this.syntax.StrikeThrough).length%2!=1||this.isMatch(s[1],this.syntax.StrikeThrough).length%2!=1||"StrikeThrough"!==e||(t=!0),n.i(i.isNullOrUndefined)(this.isMatch(s[0],this.syntax.InlineCode))||n.i(i.isNullOrUndefined)(this.isMatch(s[1],this.syntax.InlineCode))||this.isMatch(s[0],this.syntax.InlineCode).length%2!=1||this.isMatch(s[1],this.syntax.InlineCode).length%2!=1||"InlineCode"!==e||(t=!0),n.i(i.isNullOrUndefined)(s[0].match(/\<sub>/g))||n.i(i.isNullOrUndefined)(s[1].match(/\<\/sub>/g))||s[0].match(/\<sub>/g).length%2!=1||s[1].match(/\<\/sub>/g).length%2!=1||"SubScript"!==e||(t=!0),n.i(i.isNullOrUndefined)(s[0].match(/\<sup>/g))||n.i(i.isNullOrUndefined)(s[1].match(/\<\/sup>/g))||s[0].match(/\<sup>/g).length%2!=1||s[1].match(/\<\/sup>/g).length%2!=1||"SuperScript"!==e||(t=!0),t},e.prototype.applyCommands=function(e){this.currentAction=e.subCommand;var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var n=t.selectionStart,i=t.selectionEnd,r=0,o=this.parent.markdownSelection.getSelectedInlinePoints(t);if(this.isAppliedCommand(e.subCommand)&&""!==o.text){var s=this.syntax[e.subCommand],a="SubScript"===e.subCommand?"</sub>":"SuperScript"===e.subCommand?"</sup>":this.syntax[e.subCommand],l="UpperCase"===e.subCommand||"LowerCase"===e.subCommand?0:s.length,d=t.value.substr(0,o.start).lastIndexOf(s),c=t.value.substr(o.end,t.value.length).indexOf(a);c+=o.end;var u=this.replaceAt(t.value.substr(0,o.start),s,"",d,o.start),h=this.replaceAt(t.value.substr(o.end,t.value.length),a,"",0,c);return t.value=u+o.text+h,void this.restore(t,n-l,i-l,e)}if(""===o.text||this.isApplied(o,e.subCommand))"UpperCase"!==e.subCommand&&"LowerCase"!==e.subCommand?("SubScript"===e.subCommand||"SuperScript"===e.subCommand?(o.text=this.textReplace(o.text,e.subCommand),o.text=this.syntax[e.subCommand]+o.text+"</"+this.syntax[e.subCommand].substring(1,5)):(o.text=this.textReplace(o.text,e.subCommand),o.text=this.syntax[e.subCommand]+o.text+this.syntax[e.subCommand]),t.value=t.value.substr(0,o.start)+o.text+t.value.substr(o.end,t.value.length),r=this.syntax[e.subCommand].length,o.start===o.end?this.restore(t,n+r,i+r,e):this.restore(t,n+r,i-r,e)):this.restore(t,n,i,e);else{r="UpperCase"===e.subCommand||"LowerCase"===e.subCommand?0:this.syntax[e.subCommand].length;var p=t.value.substr(o.start-this.syntax[e.subCommand].length,this.syntax[e.subCommand].length),m=void 0;if(p===e.subCommand||o.start-this.syntax[e.subCommand].length===t.value.indexOf(this.syntax[e.subCommand])&&(o.end===t.value.lastIndexOf(this.syntax[e.subCommand])||o.end===t.value.lastIndexOf("</"+this.syntax[e.subCommand].substring(1,5)))){m="SubScript"===e.subCommand||"SuperScript"===e.subCommand?t.value.substr(o.end,this.syntax[e.subCommand].length+1):t.value.substr(o.end,this.syntax[e.subCommand].length);var u=this.replaceAt(t.value.substr(0,o.start),p,"",o.start-this.syntax[e.subCommand].length,o.start),h=this.replaceAt(t.value.substr(o.end,t.value.length),m,"",0,m.length);t.value=u+o.text+h,this.restore(t,n-r,i-r,e)}else"SubScript"===e.subCommand||"SuperScript"===e.subCommand?o.text=this.syntax[e.subCommand]+o.text+"</"+this.syntax[e.subCommand].substring(1,5):"UpperCase"===e.subCommand||"LowerCase"===e.subCommand?o.text="UpperCase"===e.subCommand?o.text.toUpperCase():o.text.toLowerCase():o.text=this.syntax[e.subCommand]+o.text+this.syntax[e.subCommand],t.value=t.value.substr(0,o.start)+o.text+t.value.substr(o.end,t.value.length),this.restore(t,n+r,i+r,e)}this.parent.undoRedoManager.saveData()},e.prototype.replaceAt=function(e,t,n,i,r){return e.slice(0,i)+e.slice(i,r).replace(t,n)+e.slice(r)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:this.currentAction,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e.prototype.textReplace=function(e,t){var n=this.singleCharRegx(this.syntax[""+t]);switch(t){case"Bold":n=this.multiCharRegx(this.syntax[""+t].substr(0,1)),e=e.replace(n,"");break;case"Italic":if(this.isBold(e,this.syntax[""+t].substr(0,1))){var i=this.multiCharRegx(this.syntax[""+t].substr(0,1)),r=e;r=r.replace(i,"$%@").replace(n,"");var o=new RegExp("\\$%@","g");e=r.replace(o,this.syntax[""+t].substr(0,1)+this.syntax[""+t].substr(0,1))}else e=e.replace(n,"");break;case"StrikeThrough":case"InlineCode":e=e.replace(n,"");break;case"SubScript":e=e.replace(/<sub>/g,"").replace(/<\/sub>/g,"");break;case"SuperScript":e=e.replace(/<sup>/g,"").replace(/<\/sup>/g,"")}return e},e.prototype.isApplied=function(e,t){var n=this.singleCharRegx(this.syntax[""+t]);switch(t){case"SubScript":case"SuperScript":return n=this.singleCharRegx(this.syntax[""+t]),n.test(e.text);case"Bold":case"StrikeThrough":return n=this.multiCharRegx(this.syntax[""+t].substr(0,1)),n.test(e.text);case"UpperCase":case"LowerCase":return n=new RegExp("^["+this.syntax[""+t]+"]*$","g"),n.test(e.text);case"Italic":var i=void 0,r=this.multiCharRegx(this.syntax[""+t].substr(0,1));if(r.test(e.text)){var o=e.text;o=o.replace(r,"$%#"),i=n.test(o)}else i=n.test(e.text);return i;case"InlineCode":return n.test(e.text)}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(10),r=n(0),o=(n.n(r),n(3)),s=function(){function e(e){n.i(r.extend)(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.a,this.createTable,this),this.parent.observer.on(o.d,this.onKeyDown,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(i.a,this.createTable),this.parent.observer.off(o.d,this.onKeyDown)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.onKeyDown=function(e){"insert-table"===e.event.action&&(e.item=e.value,this.createTable(e))},e.prototype.createTable=function(e){this.element=this.parent.element;var t=this.element.selectionStart,n=this.element.selectionEnd,i=this.element.value;this.locale=e,this.selection.save(t,n),this.restore(this.element.selectionStart,this.element.selectionEnd,null),this.insertTable(t,n,i,e)},e.prototype.getTable=function(){var e="";return e+=this.textNonEmpty(),e+=this.tableHeader(this.locale),e+=this.tableCell(this.locale)},e.prototype.tableHeader=function(e){for(var t="",n=1;n<=2;n++){t+="|";for(var i=1;i<=2;i++)t+=1===n?e.item.headingText+" "+i+"|":"---------|";t+=this.insertLine()}return t},e.prototype.tableCell=function(e){for(var t="",n=1;n<=2;n++){t+="|";for(var i=1;i<=2;i++)t+=e.item.colText+" "+this.convertToLetters(n)+i+"|";t+=this.insertLine()}return t+=this.insertLine()},e.prototype.insertLine=function(){var e=document.createElement("div");return e.innerHTML="\n",e.textContent},e.prototype.insertTable=function(e,t,n,i){var r=this.selection.getSelectedParentPoints(this.element),o=r[r.length-1].text.split(" ",2),s=this.getFormatTag();o.length<2?(this.element.value=this.updateValue(this.getTable()),this.makeSelection(n,e,t)):this.ensureFormatApply(r[r.length-1].text)?this.checkValid(e,t,this.getTable(),n,i,o,r,s):(this.element.value=this.updateValue(this.getTable()),this.makeSelection(n,e,t)),this.restore(this.element.selectionStart,this.element.selectionEnd,i)},e.prototype.makeSelection=function(e,t,n){n=t+(e.length>0?12:10),t+=e.length>0?3:1,this.selection.setSelection(this.element,t,n)},e.prototype.getFormatTag=function(){for(var e=Object.keys(this.syntaxTag.Formats),t=Object.keys(this.syntaxTag.List),n=[],i=0;i<e.length;i++)n.push(this.syntaxTag.Formats[e[i]]);for(var r=0;r<t.length;r++)n.push(this.syntaxTag.List[t[r]]);return n},e.prototype.ensureFormatApply=function(e){for(var t=this.getFormatTag(),n=e.trim().split(" ",2)[0]+" ",i=0;i<t.length;i++)if(n===t[i]||/^[\d.]+[ ]+$/.test(n))return!0;return!1},e.prototype.ensureStartValid=function(e,t){for(var n=t[0].text.split(" ",2),i=e+1;i<=e+n[0].length+1;i++)if(this.element.selectionStart===i||this.element.selectionEnd===i)return!1;return!0},e.prototype.ensureEndValid=function(e,t){for(var n=e+1;n<=e+t+1;n++)if(this.element.selectionEnd===n)return!1;return!0},e.prototype.updateValueWithFormat=function(e,t){var n=this.element.value.substring(this.element.selectionEnd,this.element.value.length);return t+=n.replace(n,e[0]+" "+n),this.element.value.substr(0,this.element.selectionStart)+t},e.prototype.updateValue=function(e){return this.element.value.substr(0,this.element.selectionStart)+e+this.element.value.substr(this.element.selectionEnd,this.element.value.length)},e.prototype.checkValid=function(e,t,n,i,r,o,s,a){this.ensureStartValid(s[0].start,s)&&this.ensureEndValid(s[s.length-1].start,o[0].length)&&(e===s[0].start?e!==t&&t!==s[s.length-1].end-1?this.element.value=this.updateValueWithFormat(o,n):this.element.value=this.updateValue(n):t===s[s.length-1].end-1?this.element.value=this.updateValue(n):this.element.value=this.updateValueWithFormat(o,n),this.makeSelection(i,e,t))},e.prototype.convertToLetters=function(e){var t="A".charCodeAt(0),n="";do{e-=1,n=String.fromCharCode(t+e%26)+n,e=e/26>>0}while(e>0);return n},e.prototype.textNonEmpty=function(){var e="";return(this.isCursorBased()||this.isSelectionBased())&&this.element.value.length>0&&(e+=this.insertLine(),e+=this.insertLine()),e},e.prototype.isCursorBased=function(){return this.element.selectionStart===this.element.selectionEnd},e.prototype.isSelectionBased=function(){return this.element.selectionStart!==this.element.selectionEnd},e.prototype.restore=function(e,t,n){this.selection.save(e,t),this.selection.restore(this.element),n&&n.callBack&&n.callBack({requestType:n.subCommand,selectedText:this.selection.getSelectedText(this.element),editorMode:"Markdown",event:n.event})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(0),r=(n.n(i),n(3)),o=function(){function e(e,t){this.undoRedoStack=[],this.parent=e,this.undoRedoSteps=n.i(i.isNullOrUndefined)(t)?30:t.undoRedoSteps,this.undoRedoTimer=n.i(i.isNullOrUndefined)(t)?300:t.undoRedoTimer,this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){var e=n.i(i.debounce)(this.keyUp,this.undoRedoTimer);this.parent.observer.on(r.f,e,this),this.parent.observer.on(r.d,this.keyDown,this),this.parent.observer.on(r.b,this.onAction,this),this.parent.observer.on(r.h,this.onPropertyChanged,this)},e.prototype.onPropertyChanged=function(e){for(var t=0,n=Object.keys(e.newProp);t<n.length;t++){switch(n[t]){case"undoRedoSteps":this.undoRedoSteps=e.newProp.undoRedoSteps;break;case"undoRedoTimer":this.undoRedoTimer=e.newProp.undoRedoTimer}}},e.prototype.removeEventListener=function(){var e=n.i(i.debounce)(this.keyUp,300);this.parent.observer.off(r.f,e),this.parent.observer.off(r.d,this.keyDown),this.parent.observer.off(r.b,this.onAction),this.parent.observer.off(r.h,this.onPropertyChanged)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.onAction=function(e){"Undo"===e.subCommand?this.undo(e):this.redo(e)},e.prototype.keyDown=function(e){var t=e.event,n=this;switch(t.action){case"undo":t.preventDefault(),n.undo(e);break;case"redo":t.preventDefault(),n.redo(e)}},e.prototype.keyUp=function(e){17===e.event.keyCode||e.event.ctrlKey||this.saveData(e)},e.prototype.saveData=function(e){var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var n=t.selectionStart,i=t.selectionEnd,r=this.parent.element.value,o={text:r,start:n,end:i};this.undoRedoStack.length>=this.steps&&(this.undoRedoStack=this.undoRedoStack.slice(0,this.steps+1)),this.undoRedoStack.length>1&&this.undoRedoStack[this.undoRedoStack.length-1].start===n&&this.undoRedoStack[this.undoRedoStack.length-1].end===i||(this.undoRedoStack.push(o),this.steps=this.undoRedoStack.length-1,this.steps>this.undoRedoSteps&&(this.undoRedoStack.shift(),this.steps--),e&&e.callBack&&e.callBack())},e.prototype.undo=function(e){if(this.steps>0){this.currentAction="Undo";var t=this.undoRedoStack[this.steps-1].start,n=this.undoRedoStack[this.steps-1].end,i=this.undoRedoStack[this.steps-1].text;this.parent.element.value=i,this.parent.element.focus(),this.steps--,this.restore(this.parent.element,t,n,e)}},e.prototype.redo=function(e){if(null!=this.undoRedoStack[this.steps+1]){this.currentAction="Redo";var t=this.undoRedoStack[this.steps+1].start,n=this.undoRedoStack[this.steps+1].end;this.parent.element.value=this.undoRedoStack[this.steps+1].text,this.parent.element.focus(),this.steps++,this.restore(this.parent.element,t,n,e)}},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:this.currentAction,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e.prototype.getUndoStatus=function(){var e={undo:!1,redo:!1};return this.steps>0&&(e.undo=!0),null!=this.undoRedoStack[this.steps+1]&&(e.redo=!0),e},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var i=n(0),r=(n.n(i),n(9)),o=(n.n(r),n(1)),s=n(2),a=n(5),l=n(4),d=n(24),c=n(27),u=n(26),h=function(){function e(e,t){this.parent=e,this.locator=t,this.isDOMElement=!1,this.renderFactory=this.locator.getService("rendererFactory"),this.contentRenderer=this.renderFactory.getRenderer(a.a.Content),this.popupRenderer=this.renderFactory.getRenderer(a.a.Popup),this.dropDownButtons=new c.a(this.parent,this.locator),this.colorPickerObj=new u.a(this.parent,this.locator)}return e.prototype.appendPopupContent=function(){this.toolbarElement=this.parent.createElement("div",{className:s.o}),this.element.classList.contains(s.v)&&this.toolbarElement.classList.add(s.p),this.element.appendChild(this.toolbarElement)},e.prototype.render=function(e){var t;t="Image"===e.popupType?s.u:"Inline"===e.popupType?s.w:"Text"===e.popupType?s.v:"";var r=n.i(i.getUniqueID)(e.popupType+"_Quick_Popup");this.stringItems=e.toolbarItems,this.element=this.parent.createElement("div",{id:r,className:t+" "+s._12}),this.element.setAttribute("aria-owns",this.parent.getID()),this.appendPopupContent(),this.createToolbar(e.toolbarItems,e.mode,e.cssClass),this.popupRenderer.renderPopup(this),this.addEventListener()},e.prototype.createToolbar=function(e,t,n){this.quickTBarObj=new d.a(this.parent,this.locator),this.quickTBarObj.render({container:"quick",target:this.toolbarElement,items:e,mode:t,cssClass:n}),this.quickTBarObj.toolbarObj.refresh()},e.prototype.setPosition=function(e){var t,r,o=n.i(i.closest)(e.target,".e-img-caption"),a=!e.target.classList.contains("e-imginline")&&!e.target.classList.contains("e-imgbreak"),l=n.i(i.isNullOrUndefined)(o)?e.target:o;n.i(i.addClass)([this.toolbarElement],[s.P]);var d=l.offsetTop,c=window.pageYOffset+e.parentData.top;r=d-e.editTop>e.popHeight?c+e.tBarElementHeight+(d-e.editTop)-e.popHeight-5:e.editTop+e.editHeight-(d+l.offsetHeight)>e.popHeight?c+e.tBarElementHeight+(d-e.editTop)+l.offsetHeight+5:e.y,l=a?e.target:l,t=l.offsetWidth>e.popWidth?l.offsetWidth/2-e.popWidth/2+e.parentData.left+l.offsetLeft:e.parentData.left+l.offsetLeft,this.popupObj.position.X=t+e.popWidth>e.parentData.right?e.parentData.right-e.popWidth:t,this.popupObj.position.Y=r>=0?r:e.y+5,this.popupObj.dataBind(),n.i(i.removeClass)([this.toolbarElement],[s.P])},e.prototype.checkCollision=function(e,t,i){var o,s,a=e.parentData.top,l=e.windowY+a+e.tBarElementHeight,d=[];d="document"===t?n.i(r.isCollide)(e.popup):n.i(r.isCollide)(e.popup,e.parentElement);for(var c=0;c<d.length;c++)switch(d[c]){case"top":s="document"===t?e.windowY:window.pageYOffset+a+e.tBarElementHeight;break;case"bottom":var u=void 0;u="document"===t?"inline"===i||"text"===i?e.y-e.popHeight-10:e.windowHeight-(a+e.tBarElementHeight)>e.popHeight?l-e.windowHeight>e.popHeight?l+(e.windowHeight-a)-e.popHeight:l:e.windowY+(a+e.tBarElementHeight):"IMG"!==e.target.tagName?e.parentData.bottom+window.pageYOffset-e.popHeight-10:e.parentData.bottom+window.pageYOffset-e.popHeight-5,s=u;break;case"right":o="inline"===i||"text"===i?window.pageXOffset+(e.windowWidth-(e.popWidth+e.bodyRightSpace+10)):e.x-e.popWidth;break;case"left":o="inline"===i||"text"===i?0:e.parentData.left}this.popupObj.position.X=o||this.popupObj.position.X,this.popupObj.position.Y=s||this.popupObj.position.Y,this.popupObj.dataBind()},e.prototype.showPopup=function(e,t,a,d){var c=this,u={popup:this.popupObj,cancel:!1,targetElement:a,positionX:e,positionY:t};this.parent.trigger(o._52,u,function(o){if(!o.cancel){var u=void 0,h=void 0,p=window.getComputedStyle(document.body),m=parseFloat(p.marginRight.split("px")[0])+parseFloat(p.paddingRight.split("px")[0]),f=window.innerHeight,g=window.innerWidth,b=c.parent.element,v=!n.i(i.isNullOrUndefined)(c.parent.getToolbar()),C=v&&c.parent.toolbarModule.getToolbarHeight(),y=v&&c.parent.toolbarModule.getExpandTBarPopHeight(),N=v?C+y:0;if(n.i(i.addClass)([c.element],[s.M]),i.Browser.isDevice&&!n.i(l.d)()&&n.i(i.addClass)([c.parent.getToolbar()],[s.M]),c.parent.iframeSettings.enable){var S=c.contentRenderer.getPanel().contentWindow;u=S.pageYOffset,h=S.innerHeight}else{var S=n.i(i.closest)(a,"."+s.C);u=S?S.scrollTop:0,h=S?S.offsetHeight:0}(c.parent.inlineMode.enable||n.i(i.closest)(a,"table")||"text"===d||"link"===d)&&"IMG"!==a.tagName||(c.parent.disableToolbarItem(c.parent.toolbarSettings.items),c.parent.enableToolbarItem(["Undo","Redo"])),n.i(i.append)([c.element],document.body),c.parent.showTooltip&&(c.tooltip=new r.Tooltip({target:"#"+c.element.id+" [title]",openDelay:400,showTipPointer:!0,windowCollision:!0,position:"BottomCenter"}),c.tooltip.appendTo(c.element)),c.popupObj.position.X=o.positionX+20,c.popupObj.position.Y=o.positionY+20,c.popupObj.dataBind(),c.popupObj.element.classList.add("e-popup-open"),c.dropDownButtons.renderDropDowns({container:c.toolbarElement,containerType:"quick",items:c.stringItems}),c.colorPickerObj.renderColorPickerInput({container:c.toolbarElement,containerType:"quick",items:c.stringItems});var E={x:e,y:t,target:a,editTop:u,editHeight:h,popup:c.popupObj.element,popHeight:c.popupObj.element.offsetHeight,popWidth:c.popupObj.element.offsetWidth,parentElement:b,bodyRightSpace:m,windowY:window.pageYOffset,windowHeight:f,windowWidth:g,parentData:b.getBoundingClientRect(),tBarElementHeight:N};("IMG"===a.tagName||"AUDIO"===a.tagName||"VIDEO"===a.tagName||"IFRAME"===a.tagName||a.classList&&(a.classList.contains(s.X)||a.classList.contains(s.V)||a.classList.contains(s.W)))&&c.setPosition(E),c.parent.inlineMode.enable||c.checkCollision(E,"parent",""),c.checkCollision(E,"document",c.parent.inlineMode.enable?"inline":"text"===d?"text":""),c.popupObj.element.classList.remove("e-popup-open"),n.i(i.removeClass)([c.element],[s.M]),c.popupObj.show({name:"ZoomIn",duration:i.Browser.isIE?250:400}),c.popupObj&&c.parent.cssClass&&(n.i(i.removeClass)([c.popupObj.element],c.parent.cssClass),n.i(i.addClass)([c.popupObj.element],c.parent.cssClass)),n.i(i.setStyleAttribute)(c.element,{maxWidth:window.outerWidth+"px"}),n.i(i.addClass)([c.element],[s.q]),c.isDOMElement=!0}})},e.prototype.hidePopup=function(){var e=this.parent.sourceCodeModule.getViewPanel();if(i.Browser.isDevice&&!n.i(l.d)()&&n.i(i.removeClass)([this.parent.getToolbar()],[s.M]),n.i(i.isNullOrUndefined)(document.querySelector(".e-tooltip-wrap")))n.i(i.isNullOrUndefined)(this.tooltip)||this.tooltip.destroy();else{if(!n.i(i.isNullOrUndefined)(document.querySelector("#"+this.element.id+" [data-tooltip-id]"))){var t=document.querySelector("#"+this.element.id+" [data-tooltip-id]"),r=t.getAttribute("data-content");t.removeAttribute("data-content"),t.setAttribute("title",r),t.removeAttribute("data-tooltip-id")}this.tooltip.destroy()}n.i(i.isNullOrUndefined)(this.parent.getToolbar())||this.parent.inlineMode.enable||(n.i(i.isNullOrUndefined)(e)||"none"===e.style.display)&&this.parent.enableToolbarItem(this.parent.toolbarSettings.items),this.removeEleFromDOM(),this.isDOMElement=!1},e.prototype.addQTBarItem=function(e,t){this.quickTBarObj.toolbarObj.addItems(this.quickTBarObj.getItems(e,"toolbar"),t)},e.prototype.removeQTBarItem=function(e){this.quickTBarObj.toolbarObj.removeItems(e)},e.prototype.removeEleFromDOM=function(){var e=this.popupObj.element;if(this.isDOMElement){this.dropDownButtons.destroyDropDowns(),this.colorPickerObj.destroyColorPicker(),n.i(i.removeClass)([this.element],[s.q]),n.i(i.detach)(e);var t=this.popupObj;this.parent.trigger(o._54,t)}},e.prototype.updateStatus=function(e){var t={args:e,dropDownModule:this.dropDownButtons,parent:this.parent,tbElements:n.i(i.selectAll)("."+s.D,this.element),tbItems:this.quickTBarObj.toolbarObj.items};if(n.i(l.h)(t,!0,this.parent),this.parent.quickToolbarSettings.text&&this.parent.quickToolbarModule.textQTBar){var r={args:e,dropDownModule:this.parent.quickToolbarModule.textQTBar.dropDownButtons,parent:this.parent,tbElements:n.i(i.selectAll)("."+s.D,this.parent.quickToolbarModule.textQTBar.element),tbItems:this.parent.quickToolbarModule.textQTBar.quickTBarObj.toolbarObj.items};n.i(l.h)(r,!0,this.parent),n.i(l.k)(this.parent.quickToolbarModule.textQTBar.quickTBarObj,this.parent.formatter.editorManager.undoRedoManager.getUndoStatus())}n.i(i.select)("."+s._69,this.parent.element)||n.i(l.k)(this.parent.getBaseToolbarObject(),this.parent.formatter.editorManager.undoRedoManager.getUndoStatus())},e.prototype.destroy=function(){this.popupObj&&!this.popupObj.isDestroyed&&(this.popupObj.destroy(),this.removeEleFromDOM()),this.removeEventListener()},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(o.i,this.destroy,this),this.parent.on(o.s,this.onPropertyChanged,this),(this.parent.inlineMode.enable||this.parent.quickToolbarSettings.text)&&this.parent.on(o.m,this.updateStatus,this))},e.prototype.onPropertyChanged=function(e){if(!n.i(i.isNullOrUndefined)(e.newProp.inlineMode))for(var t=0,r=Object.keys(e.newProp.inlineMode);t<r.length;t++){var s=r[t];switch(s){case"enable":e.newProp.inlineMode.enable?this.parent.on(o.m,this.updateStatus,this):this.parent.off(o.m,this.updateStatus)}}},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(o.i,this.destroy),this.parent.off(o.s,this.onPropertyChanged),(this.parent.inlineMode.enable||this.parent.quickToolbarSettings.text)&&this.parent.off(o.m,this.updateStatus))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(1),r=n(0),o=(n.n(r),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(i.D,this.commandCallBack,this),this.parent.on(i.i,this.removeEventListener,this)},e.prototype.commandCallBack=function(e){var t=!n.i(r.isNullOrUndefined)(e.requestType)&&"FormatPainter"===e.requestType&&"format-copy"===e.action;n.i(r.isNullOrUndefined)(e)||n.i(r.isNullOrUndefined)(e.requestType)||"Undo"===e.requestType||"Redo"===e.requestType||t||this.parent.formatter.saveData(),this.parent.notify(i.k,{args:e}),this.parent.notify(i._21,{})},e.prototype.removeEventListener=function(){this.parent.off(i.D,this.commandCallBack),this.parent.off(i.i,this.removeEventListener)},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(9)),o=(n.n(r),n(1)),s=n(2),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.showFullScreen=function(e){var t=this;if(!0!==this.parent.toolbarSettings.enable||"Markdown"===this.parent.editorMode||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||this.parent.quickToolbarModule.hideQuickToolbars(),this.parent.showTooltip&&!n.i(i.isNullOrUndefined)(document.querySelector(".e-tooltip-wrap"))&&this.parent.notify(o._93,{args:e}),this.scrollableParent=n.i(r.getScrollableParent)(this.parent.element),!this.parent.element.classList.contains(s.n)){var a={cancel:!1,requestType:"Maximize",targetItem:"Maximize",args:e};this.parent.trigger(o.S,a,function(n){if(!n.cancel){t.parent.toolbarSettings.enableFloating&&!t.parent.inlineMode.enable&&t.parent.toolbarSettings.enable&&(t.parent.getToolbarElement().style.width="100%",t.parent.getToolbarElement().style.top="0px"),t.parent.element.classList.add(s.n),t.toggleParentOverflow(!0);var r=t.parent.element.querySelectorAll(".e-toolbar-extended.e-popup-open").length>0;t.parent.setContentHeight(null,r),t.parent.toolbarModule&&(t.parent.getBaseToolbarObject().toolbarObj.items[0].properties||t.parent.getBaseToolbarObject().toolbarObj.removeItems(0),i.Browser.isDevice&&t.parent.toolbarModule.removeFixedTBarClass(),t.parent.toolbarModule.updateItem({targetItem:"Maximize",updateItem:"Minimize",baseToolbar:t.parent.getBaseToolbarObject()})),t.parent.refreshUI(),t.parent.trigger(o.T,{requestType:"Maximize",targetItem:"Maximize",args:e})}})}},e.prototype.hideFullScreen=function(e){var t=this;if(!0!==this.parent.toolbarSettings.enable||"Markdown"===this.parent.editorMode||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||this.parent.quickToolbarModule.hideQuickToolbars(),this.parent.showTooltip&&!n.i(i.isNullOrUndefined)(document.querySelector(".e-tooltip-wrap"))&&this.parent.notify(o._93,{args:e}),this.parent.element.classList.contains(s.n)){var r={cancel:!1,requestType:"Minimize",targetItem:"Minimize",args:e};this.parent.trigger(o.S,r,function(r){if(!r.cancel){t.parent.element.classList.remove(s.n);for(var a=document.querySelectorAll(".e-rte-overflow"),l=0;l<a.length;l++)n.i(i.removeClass)([a[l]],["e-rte-overflow"]);var d=t.parent.element.querySelectorAll(".e-toolbar-extended.e-popup-open").length>0;t.parent.setContentHeight(null,d),t.parent.toolbarModule&&(t.parent.getBaseToolbarObject().toolbarObj.items[0].properties||t.parent.getBaseToolbarObject().toolbarObj.removeItems(0),t.parent.toolbarModule.updateItem({targetItem:"Minimize",updateItem:"Maximize",baseToolbar:t.parent.getBaseToolbarObject()}),i.Browser.isDevice&&t.parent.inlineMode.enable&&t.parent.toolbarModule.addFixedTBarClass()),t.parent.trigger(o.T,{requestType:"Minimize",targetItem:"Minimize",args:e})}})}},e.prototype.toggleParentOverflow=function(e){if(!n.i(i.isNullOrUndefined)(this.scrollableParent))for(var t=0;t<this.scrollableParent.length;t++)if("#document"===this.scrollableParent[t].nodeName){var r=document.querySelector("body");n.i(i.addClass)([r],["e-rte-overflow"])}else{var r=this.scrollableParent[t];n.i(i.addClass)([r],["e-rte-overflow"])}},e.prototype.onKeyDown=function(e){var t=e.args;switch(t.action){case"full-screen":this.showFullScreen(e.args),t.preventDefault();break;case"escape":this.hideFullScreen(e.args),t.preventDefault()}},e.prototype.addEventListener=function(){this.parent.on(o.v,this.onKeyDown,this),this.parent.on(o.i,this.destroy,this),this.parent.on(o._44,this.moduleDestroy,this)},e.prototype.removeEventListener=function(){this.parent.off(o.v,this.onKeyDown),this.parent.off(o.i,this.destroy),this.parent.off(o._44,this.moduleDestroy)},e.prototype.destroy=function(){if(!n.i(i.isNullOrUndefined)(this.parent)){this.parent.element.classList.contains(s.n)&&this.toggleParentOverflow(!1);for(var e=document.querySelectorAll(".e-rte-overflow"),t=0;t<e.length;t++)n.i(i.removeClass)([e[t]],["e-rte-overflow"]);this.removeEventListener()}},e.prototype.moduleDestroy=function(){this.parent=null},e}()},function(e,t,n){"use strict";function i(e,t,n,i){var r;if(n){r=t.contentModule.getDocument().querySelector("body")}else r=t.element;if(Object.keys(e).length)for(var o=0,s=Object.keys(e);o<s.length;o++){var a=s[o];if("class"===a)r.classList.add(e[""+a]);else if("disabled"===a&&"disabled"===e[""+a])t.enabled=!1,t.setEnable();else if("readonly"===a&&"readonly"===e[""+a])t.readonly=!0,t.setReadOnly(i);else if("style"===a)r.setAttribute("style",e[""+a]);else if("tabindex"===a)t.inputElement.setAttribute("tabindex",e[""+a]);else if("placeholder"===a)t.placeholder=e[""+a],t.setPlaceHolder();else{var l=["name","required"];l.indexOf(a)>-1?t.valueContainer.setAttribute(a,e[""+a]):r.setAttribute(a,e[""+a])}}}t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(1),r=n(51),o=n(6),s=function(){function e(e){this.parent=e,this.toolbarStatus=this.prevToolbarStatus=n.i(o.a)(),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(i.k,this.onRefreshHandler,this),this.parent.on(i.i,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off(i.k,this.onRefreshHandler),this.parent.off(i.i,this.removeEventListener)},e.prototype.onRefreshHandler=function(e){if(!this.parent.readonly){var t=[],n=[],o=[];this.parent.fontSize.items.forEach(function(e){t.push(e.value)}),this.parent.fontFamily.items.forEach(function(e){n.push(e.value)}),this.parent.format.types.forEach(function(e){o.push(e.value.toLocaleLowerCase())}),this.toolbarStatus=r.b.get(this.parent.contentModule.getDocument(),this.parent.contentModule.getEditPanel(),o,t,n,e.documentNode);var s=JSON.stringify(this.toolbarStatus);this.parent.notify(i.m,this.toolbarStatus),JSON.stringify(this.prevToolbarStatus)!==s&&(this.parent.notify(i._78,{html:JSON.parse(s),markdown:null}),this.prevToolbarStatus=JSON.parse(s))}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(23),r=n(1),o=n(6),s=function(){function e(e){this.toolbarStatus=this.prevToolbarStatus=n.i(o.f)(),this.selection=new i.a,this.parent=e,this.element=this.parent.contentModule.getEditPanel(),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(r.k,this.onRefreshHandler,this),this.parent.on(r.i,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off(r.k,this.onRefreshHandler),this.parent.off(r.i,this.removeEventListener)},e.prototype.onRefreshHandler=function(e){var t=this.selection.getSelectedParentPoints(this.element);this.toolbarStatus={orderedlist:!e.documentNode&&this.isListsApplied(t,"OL"),unorderedlist:!e.documentNode&&this.isListsApplied(t,"UL"),formats:this.currentFormat(t,e.documentNode),bold:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("Bold"),italic:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("Italic"),inlinecode:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("InlineCode"),strikethrough:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("StrikeThrough"),subscript:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("SubScript"),superscript:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("SuperScript"),uppercase:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("UpperCase")},this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("InlineCode")&&(this.toolbarStatus.formats="pre");var n=JSON.stringify(this.toolbarStatus);this.parent.notify(r.m,this.toolbarStatus),JSON.stringify(this.prevToolbarStatus)!==n&&(this.parent.notify(r._78,{html:null,markdown:JSON.parse(n)}),this.prevToolbarStatus=JSON.parse(n))},e.prototype.isListsApplied=function(e,t){var n=!0;if("OL"===t)for(var i=0;i<e.length;i++){var r=e[i].text.trim().split(" ",2)[0]+" ";if(!/^[\d.]+[ ]+$/.test(r)){n=!1;break}}else for(var i=0;i<e.length;i++)if(!this.selection.isStartWith(e[i].text,this.parent.formatter.listTags[""+t])){n=!1;break}return n},e.prototype.currentFormat=function(e,t){for(var n="p",i=Object.keys(this.parent.formatter.formatTags),r=this.element.selectionDirection,o="backward"===r?e[0].text:e[e.length-1].text,s=0;!t&&s<i.length;s++){if("pre"!==i[s]&&this.selection.isStartWith(o,this.parent.formatter.formatTags[i[s]])){n=i[s];break}if("pre"===i[s]&&this.codeFormat()){n=i[s];break}}return n},e.prototype.codeFormat=function(){var e=!1,t=this.parent.inputElement,n=t.selectionStart,i=function(e){return function(t){return[t.slice(0,e),t.slice(e)]}}(n)(t.value),r=this.parent.formatter.formatTags.pre,o=this.getSelectedText(t);if(""!==o&&o===o.toLocaleUpperCase())return!0;if(""===o){var s=t.value.substr(i[0].length-1,1),a=i[1].substr(0,1);if(""!==s&&""!==a&&s.match(/[a-z]/i)&&s===s.toLocaleUpperCase()&&a===a.toLocaleUpperCase())return!0}return this.isCode(i[0],r)&&this.isCode(i[1],r)&&i[0].match(this.multiCharRegx(r)).length%2==1&&i[1].match(this.multiCharRegx(r)).length%2==1&&(e=!0),e},e.prototype.getSelectedText=function(e){return e.value.substring(e.selectionStart,e.selectionEnd)},e.prototype.isCode=function(e,t){return-1!==e.search("\\"+t)},e.prototype.multiCharRegx=function(e){return new RegExp("(\\"+e+")","g")},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(1)),o=n(32),s=n(31),a=function(){function e(e){this.parent=e,this.addEventListener(),this.serviceLocator=new o.a,this.serviceLocator.register("rendererFactory",new s.a)}return e.prototype.addEventListener=function(){this.parent.on(r.j,this.toolbarClick,this),this.parent.on(r.B,this.dropDownSelect,this),this.parent.on(r._29,this.renderSelection,this),this.parent.on(r.i,this.removeEventListener,this)},e.prototype.toolbarClick=function(e){if(!n.i(i.isNullOrUndefined)(e.item)){if(!n.i(i.isNullOrUndefined)(e.item.controlParent)){var t=e.item.controlParent.activeEle;t&&(t.tabIndex=-1)}"NumberFormatList"!==e.item.command&&"BulletFormatList"!==e.item.command||(e.originalEvent.target.classList.contains("e-order-list")||e.originalEvent.target.classList.contains("e-unorder-list"))&&(e.item.command="Lists",e.item.subCommand="NumberFormatList"===e.item.subCommand?"OL":"UL"),"Lists"===e.item.command&&e.originalEvent.target.classList.contains("e-caret")&&(e.originalEvent.target.parentElement.classList.contains("e-rte-bulletformatlist-dropdown")||e.originalEvent.target.parentElement.classList.contains("e-rte-numberformatlist-dropdown"))&&(e.item.command=e.item.subCommand=null),this.parent.notify(r.p,e),this.parent.notify(r.q,e)}},e.prototype.dropDownSelect=function(e){if(this.parent.notify(r._19,{}),!document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))||!e.item||"Images"!==e.item.command&&"Audios"!==e.item.command&&"Videos"!==e.item.command&&"VideoLayoutOption"!==e.item.command&&"Display"!==e.item.command&&"Table"!==e.item.command){var t=e.item.controlParent&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.tableQTBar&&this.parent.quickToolbarModule.tableQTBar.element.contains(e.item.controlParent.element)?"Table":null;if("Lists"===e.item.command){var n={listStyle:e.item.value,listImage:e.item.listImage,type:e.item.subCommand};this.parent.formatter.process(this.parent,e,e.originalEvent,n)}else this.parent.formatter.process(this.parent,e,e.originalEvent,t)}this.parent.notify(r._18,{})},e.prototype.renderSelection=function(e){this.parent.notify(r._19,{}),this.parent.formatter.process(this.parent,e,e.originalEvent,null),this.parent.notify(r._18,{})},e.prototype.removeEventListener=function(){this.parent.off(r.j,this.toolbarClick),this.parent.off(r.B,this.dropDownSelect),this.parent.off(r._29,this.renderSelection),this.parent.off(r.i,this.removeEventListener)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(1),r=n(0),o=(n.n(r),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(i._69,this.enableXhtmlValidation,this),this.parent.on(i.i,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off(i._69,this.enableXhtmlValidation),this.parent.off(i.i,this.removeEventListener)},e.prototype.enableXhtmlValidation=function(){this.parent.enableXhtml&&(n.i(r.isNullOrUndefined)(this.parent.inputElement)?this.currentElement=this.parent.element:this.currentElement=this.parent.inputElement,this.clean(this.currentElement),this.ImageTags(),this.removeTags(),this.RemoveUnsupported(),this.currentElement.innerHTML=this.selfEncloseValidation(this.currentElement.innerHTML,"\n"===this.currentElement.innerText?this.currentElement.innerText.length:this.currentElement.innerText.trim().length),this.parent.setProperties({value:this.currentElement.innerHTML},!0))},e.prototype.selfEncloseValidation=function(e,t){if(0===t&&e.indexOf("table")<0&&e.indexOf("img")<0&&e.includes(" ")){var n=e.split(" ");n[n.length-1]="​"+n[n.length-1],e=n.join("")}e=e.replace(/<br>/g,"<br/>").replace(/<hr>/g,"<hr/>").replace(/ /g," ");for(var i,r=[],o=[],s=[/<img(.*?)>/gi,/<area(.*?)>/gi,/<base(.*?)>/gi,/<col (.*?)>/gi,/<embed(.*?)>/gi,/<input(.*?)>/gi,/<link(.*?)>/gi,/<meta(.*?)>/gi,/<param(.*?)>/gi,/<source(.*?)>/gi,/<track(.*?)>/gi,/<wbr(.*?)>/gi],a=0;a<s.length;a++){for(i=s[a].exec(e);null!==i;)r.push(i[0].toString()),i=s[a].exec(e);o=r.slice(0);for(var l=0;l<r.length;l++)-1!==r[l].indexOf("/")&&r[l].lastIndexOf("/")===r[l].length-2||(r[l]=r[l].substr(0,r[l].length-1)+" /"+r[l].substr(r[l].length-1,r[l].length));for(var d=0;d<=r.length-1;d++)e=e.replace(o[d],r[d])}return e},e.prototype.clean=function(e){for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];8===n.nodeType||"V:IMAGE"===n.nodeName?(e.removeChild(n),t--):1===n.nodeType&&this.clean(n)}return this.currentElement.innerHTML},e.prototype.ImageTags=function(){for(var e=this.currentElement.querySelectorAll("IMG"),t=e.length-1;t>=0;t--)if(!e[t].hasAttribute("alt")){var n=e[t];n.setAttribute("alt","")}},e.prototype.removeTags=function(){for(var e=[["br","ul"],["br","ol"],["table","span"],["div","span"],["p","span"]],t=0;t<e.length;t++)this.RemoveElementNode(e[t][0],e[t][1])},e.prototype.RemoveElementNode=function(e,t){for(var i=this.currentElement.querySelectorAll(t),o=0;o<i.length;o++)for(var s=i[o].querySelectorAll(e),a=s.length;a>0;a--)n.i(r.detach)(s[a-1])},e.prototype.RemoveUnsupported=function(){for(var e=this.currentElement.querySelectorAll("u"),t=e.length-1;t>=0;t--){var i=this.parent.createElement("span");i.style.textDecoration="underline",i.innerHTML=e[t].innerHTML,e[t].parentNode.insertBefore(i,e[t]),n.i(r.detach)(e[t])}for(var o=this.currentElement.querySelectorAll("strong"),t=o.length-1;t>=0;t--){var s=this.parent.createElement("b");s.innerHTML=o[t].innerHTML,o[t].parentNode.insertBefore(s,o[t]),n.i(r.detach)(o[t])}for(var a=["language","role","target","contenteditable","cellspacing","cellpadding","border","valign","colspan"],t=0;t<=a.length;t++)this.RemoveAttributeByName(a[t])},e.prototype.RemoveAttributeByName=function(e){if(null!==this.currentElement.firstChild&&3!==this.currentElement.firstChild.nodeType)for(var t=0;t<this.currentElement.childNodes.length;t++){var n=this.currentElement.childNodes[t];if(3!==n.nodeType&&"TABLE"!==n.nodeName&&"TBODY"!==n.nodeName&&"THEAD"!==n.nodeName&&"TH"!==n.nodeName&&"TR"!==n.nodeName&&"TD"!==n.nodeName&&(n.hasAttribute(e)&&n.removeAttribute(e),n.hasChildNodes()))for(var i=0;i<n.childNodes.length;i++){var r=n.childNodes[i];if(3!==r.nodeType&&"TABLE"!==r.nodeName&&"TBODY"!==r.nodeName&&"THEAD"!==r.nodeName&&"TH"!==r.nodeName&&"TR"!==r.nodeName&&"TD"!==r.nodeName&&r.hasAttribute(e)&&!r.classList.contains("e-mention-chip")&&r.removeAttribute(e),r.hasChildNodes())for(var o=0;o<r.childNodes.length;o++)3!==r.childNodes[o].nodeType&&"TABLE"!==r.childNodes[o].nodeName&&"TBODY"!==r.childNodes[o].nodeName&&"THEAD"!==r.childNodes[o].nodeName&&"TH"!==r.childNodes[o].nodeName&&"TR"!==r.childNodes[o].nodeName&&"TD"!==r.childNodes[o].nodeName&&r.childNodes[o].hasAttribute(e)&&r.childNodes[o].removeAttribute(e)}}},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i={bold:{command:"Style",subCommand:"Bold",value:"strong"},italic:{command:"Style",subCommand:"Italic",value:"em"},underline:{command:"Style",subCommand:"Underline",value:"span"},strikeThrough:{command:"Style",subCommand:"StrikeThrough",value:"span"},insertCode:{command:"Formats",subCommand:"Pre",value:"pre"},superscript:{command:"Effects",subCommand:"SuperScript",value:"sup"},subscript:{command:"Effects",subCommand:"SubScript",value:"sub"},uppercase:{command:"Casing",subCommand:"UpperCase"},lowercase:{command:"Casing",subCommand:"LowerCase"},fontColor:{command:"font",subCommand:"fontcolor",value:"#ff0000"},fontName:{command:"font",subCommand:"fontname",value:"Segoe UI"},fontSize:{command:"font",subCommand:"fontsize",value:"10pt"},backColor:{command:"font",subCommand:"backgroundcolor",value:"#ffff00"},justifyCenter:{command:"Alignments",subCommand:"JustifyCenter"},justifyFull:{command:"Alignments",subCommand:"JustifyFull"},justifyLeft:{command:"Alignments",subCommand:"JustifyLeft"},justifyRight:{command:"Alignments",subCommand:"JustifyRight"},undo:{command:"Actions",subCommand:"Undo"},redo:{command:"Actions",subCommand:"Redo"},createLink:{command:"Links",subCommand:"createLink"},editLink:{command:"Links",subCommand:"createLink"},createImage:{command:"Images",subCommand:"Images"},formatBlock:{command:"Formats",value:"P"},heading:{command:"Formats",value:"H1"},indent:{command:"Indents",subCommand:"Indent"},outdent:{command:"Indents",subCommand:"Outdent"},insertHTML:{command:"InsertHTML",subCommand:"InsertHTML",value:""},insertText:{command:"InsertText",subCommand:"InsertText",value:""},insertHorizontalRule:{command:"InsertHTML",subCommand:"InsertHTML",value:"<hr/>"},insertImage:{command:"Images",subCommand:"Image"},insertAudio:{command:"Audios",subCommand:"Audio"},insertVideo:{command:"Videos",subCommand:"Video"},editImage:{command:"Images",subCommand:"Image"},insertTable:{command:"Table",subCommand:"CreateTable"},insertBrOnReturn:{command:"InsertHTML",subCommand:"InsertHTML",value:"<br/>"},insertOrderedList:{command:"Lists",value:"OL"},insertUnorderedList:{command:"Lists",value:"UL"},insertParagraph:{command:"Formats",value:"P"},removeFormat:{command:"Clear",subCommand:"ClearFormat"},copyFormatPainter:{command:"FormatPainter",value:"format-copy"},applyFormatPainter:{command:"FormatPainter",value:"format-paste"},escapeFormatPainter:{command:"FormatPainter",value:"escape"}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(29),r=n(33),o=n(0),s=(n.n(o),n(15)),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=function(e){function t(t){var i=e.call(this)||this;return i.initialize(),n.i(o.extend)(i,i,t,!0),i.currentDocument&&i.element&&i.updateFormatter(i.element,i.currentDocument,t.options,t.formatPainterSettings),i}return a(t,e),t.prototype.initialize=function(){this.keyConfig=s.d},t.prototype.updateFormatter=function(e,t,n,i){e&&t&&(this.editorManager=new r.a({document:t,editableElement:e,options:n,formatPainterSettings:i}))},t}(i.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(29),r=n(54),o=n(0),s=(n.n(o),n(15)),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=function(e){function t(t){var i=e.call(this)||this;return i.initialize(),n.i(o.extend)(i,i,t,!0),t&&i.element&&i.updateFormatter(i.element,document,t.options),i}return a(t,e),t.prototype.initialize=function(){this.keyConfig=s.e,this.formatTags=s.a,this.listTags=s.c,this.selectionTags=s.b},t.prototype.updateFormatter=function(e,t,n){e&&(this.editorManager=new r.a({element:e,formatTags:this.formatTags,listTags:this.listTags,selectionTags:this.selectionTags,options:n}))},t}(i.a)},function(e,t,n){"use strict";n.d(t,"f",function(){return i}),n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return l});var i={alignments:"Alignments",justifyLeft:"Align Left",justifyCenter:"Align Center",justifyRight:"Align Right",justifyFull:"Align Justify",fontName:"Font Name",fontSize:"Font Size",fontColor:"Font Color",backgroundColor:"Background Color",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",clearFormat:"Clear Format",clearAll:"Clear All",cut:"Cut",copy:"Copy",paste:"Paste",unorderedList:"Bulleted List",orderedList:"Numbered List",indent:"Increase Indent",outdent:"Decrease Indent",undo:"Undo",redo:"Redo",superscript:"Superscript",subscript:"Subscript",createLink:"Insert Link",openLink:"Open Link",editLink:"Edit Link",removeLink:"Remove Link",image:"Insert Image",audio:"Insert Audio",video:"Insert Video",replace:"Replace",numberFormatList:"Number Format List",bulletFormatList:"Bullet Format List",audioReplace:"Replace",videoReplace:"Replace",videoAlign:"Align",videoDimension:"Dimension",audioRemove:"Remove",videoRemove:"Remove",audioLayoutOption:"Layout option",videoLayoutOption:"Layout option",align:"Align",caption:"Image Caption",remove:"Remove",insertLink:"Insert Link",display:"Display",altText:"Alternative Text",dimension:"Change Size",fullscreen:"Maximize",maximize:"Maximize",minimize:"Minimize",lowerCase:"Lower Case",upperCase:"Upper Case",print:"Print",formats:"Formats",sourcecode:"Code View",preview:"Preview",viewside:"ViewSide",insertCode:"Insert Code",linkText:"Display Text",linkTooltipLabel:"Title",linkWebUrl:"Web Address",linkTitle:"Enter a title",linkurl:"http://example.com",linkOpenInNewWindow:"Open Link in New Window",linkHeader:"Insert Link",dialogInsert:"Insert",dialogCancel:"Cancel",dialogUpdate:"Update",imageHeader:"Insert Image",audioHeader:"Insert Audio",videoHeader:"Insert Video",imageLinkHeader:"You can also provide a link from the web",audioLinkHeader:"You can also provide a link from the web",videoLinkHeader:"Web URL",embedVideoLinkHeader:"Media Embed URL",mdimageLink:"Please provide a URL for your image",imageUploadMessage:"Drop image here or browse to upload",audioUploadMessage:"Drop an audio file or browse to upload",videoUploadMessage:"Drop a video file or browse to upload",imageDeviceUploadMessage:"Click here to upload",audioDeviceUploadMessage:"Click here to upload",videoDeviceUploadMessage:"Click here to upload",imageAlternateText:"Alternate Text",alternateHeader:"Alternative Text",browse:"Browse",imageUrl:"http://example.com/image.png",audioUrl:"http://example.com/audio.mp3",videoUrl:"http://example.com/video.mp3",webUrl:"Web URL",embedUrl:"Embed Code",imageCaption:"Caption",imageSizeHeader:"Image Size",videoSizeHeader:"Video Size",imageHeight:"Height",imageWidth:"Width",videoHeight:"Height",videoWidth:"Width",textPlaceholder:"Enter Text",inserttablebtn:"Insert Table",tabledialogHeader:"Insert Table",tableWidth:"Width",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",columns:"Number of columns",rows:"Number of rows",tableRows:"Table Rows",tableColumns:"Table Columns",tableCellHorizontalAlign:"Table Cell Horizontal Align",tableCellVerticalAlign:"Table Cell Vertical Align",createTable:"Create Table",removeTable:"Remove Table",tableHeader:"Table Header",tableRemove:"Table Remove",tableCellBackground:"Table Cell Background",tableEditProperties:"Table Edit Properties",styles:"Styles",insertColumnLeft:"Insert Column Left",insertColumnRight:"Insert Column Right",deleteColumn:"Delete Column",insertRowBefore:"Insert Row Before",insertRowAfter:"Insert Row After",deleteRow:"Delete Row",tableEditHeader:"Edit Table",TableHeadingText:"Heading",TableColText:"Col",imageInsertLinkHeader:"Insert Link",editImageHeader:"Edit Image",editAudioHeader:"Edit Audio",editVideoHeader:"Edit Video",alignmentsDropDownLeft:"Align Left",alignmentsDropDownCenter:"Align Center",alignmentsDropDownRight:"Align Right",alignmentsDropDownJustify:"Align Justify",imageDisplayDropDownInline:"Inline",imageDisplayDropDownBreak:"Break",audioLayoutOptionDropDownInline:"Inline",audioLayoutOptionDropDownBreak:"Break",videoLayoutOptionDropDownInline:"Inline",videoLayoutOptionDropDownBreak:"Break",tableInsertRowDropDownBefore:"Insert row before",tableInsertRowDropDownAfter:"Insert row after",tableInsertRowDropDownDelete:"Delete row",tableInsertColumnDropDownLeft:"Insert column left",tableInsertColumnDropDownRight:"Insert column right",tableInsertColumnDropDownDelete:"Delete column",tableVerticalAlignDropDownTop:"Align Top",tableVerticalAlignDropDownMiddle:"Align Middle",tableVerticalAlignDropDownBottom:"Align Bottom",tableStylesDropDownDashedBorder:"Dashed Borders",tableStylesDropDownAlternateRows:"Alternate Rows",pasteFormat:"Paste Format",pasteFormatContent:"Choose the formatting action",plainText:"Plain Text",cleanFormat:"Clean",keepFormat:"Keep",pasteDialogOk:"OK",pasteDialogCancel:"Cancel",fileManager:"File Manager",fileDialogHeader:"File Browser",formatsDropDownParagraph:"Paragraph",formatsDropDownCode:"Code",formatsDropDownQuotation:"Quotation",formatsDropDownHeading1:"Heading 1",formatsDropDownHeading2:"Heading 2",formatsDropDownHeading3:"Heading 3",formatsDropDownHeading4:"Heading 4",fontNameSegoeUI:"Segoe UI",fontNameArial:"Arial",fontNameGeorgia:"Georgia",fontNameImpact:"Impact",fontNameTahoma:"Tahoma",fontNameTimesNewRoman:"Times New Roman",fontNameVerdana:"Verdana",numberFormatListNumber:"Number",numberFormatListLowerAlpha:"LowerAlpha",numberFormatListUpperAlpha:"UpperAlpha",numberFormatListLowerRoman:"LowerRoman",numberFormatListUpperRoman:"UpperRoman",numberFormatListLowerGreek:"LowerGreek",bulletFormatListDisc:"Disc",bulletFormatListCircle:"Circle",bulletFormatListSquare:"Square",numberFormatListNone:"None",bulletFormatListNone:"None",formatPainter:"Format Painter",emojiPicker:"Emoji Picker",embeddedCode:"Embedded Code",pasteEmbeddedCodeHere:"Paste Embedded Code here",emojiPickerTypeToFind:"Type to find",emojiPickerNoResultFound:"No results found",emojiPickerTrySomethingElse:"Try something else",linkAriaLabel:"Open in new window"},r={alignments:"alignments",justifyleft:"justifyLeft",justifycenter:"justifyCenter",justifyright:"justifyRight",justifyfull:"justifyFull",fontname:"fontName",fontsize:"fontSize",fontcolor:"fontColor",backgroundcolor:"backgroundColor",bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",clearformat:"clearFormat",clearall:"clearAll",cut:"cut",copy:"copy",paste:"paste",unorderedlist:"unorderedList",orderedlist:"orderedList",indent:"indent",outdent:"outdent",numberformatlist:"numberFormatList",bulletformatlist:"bulletFormatList",undo:"undo",redo:"redo",filemanager:"fileManager",superscript:"superscript",subscript:"subscript",createlink:"createLink",openlink:"openLink",editlink:"editLink",removelink:"removeLink",openimagelink:"openLink",editimagelink:"editLink",removeimagelink:"removeLink",image:"image",audio:"audio",video:"video",replace:"replace",audioreplace:"audioReplace",videoreplace:"videoReplace",videoalign:"videoAlign",videodimension:"videoDimension",audioremove:"audioRemove",videoremove:"videoRemove",audiolayoutoption:"audioLayoutOption",videolayoutoption:"videoLayoutOption",align:"align",caption:"caption",remove:"remove",insertlink:"insertLink",display:"display",alttext:"altText",dimension:"dimension",fullscreen:"fullscreen",maximize:"maximize",minimize:"minimize",lowercase:"lowerCase",uppercase:"upperCase",print:"print",formats:"formats",sourcecode:"sourcecode",preview:"preview",viewside:"viewside",insertcode:"insertCode",tablerows:"tableRows",tablecolumns:"tableColumns",tablecellhorizontalalign:"tableCellHorizontalAlign",tablecellverticalalign:"tableCellVerticalAlign",createtable:"createTable",removetable:"removeTable",tableheader:"tableHeader",tableremove:"tableRemove",tablecellbackground:"tableCellBackground",tableeditproperties:"tableEditProperties",styles:"styles",insertcolumnleft:"insertColumnLeft",insertcolumnright:"insertColumnRight",deletecolumn:"deleteColumn",aligntop:"AlignTop",alignmiddle:"AlignMiddle",alignbottom:"AlignBottom",insertrowbefore:"insertRowBefore",insertrowafter:"insertRowAfter",deleterow:"deleteRow",formatpainter:"formatPainter",emojipicker:"emojiPicker",embeddedCode:"Embedded Code",pasteEmbeddedCodeHere:"Paste Embedded Code here",emojiPickerTypeToFind:"Type to find",emojiPickerNoResultFound:"No results found",emojiPickerTrySomethingElse:"Try something else",ImageLinkAriaLabel:"Open in new window"},o=[{locale:"fontNameSegoeUI",value:"Segoe UI"},{locale:"fontNameArial",value:"Arial,Helvetica,sans-serif"},{locale:"fontNameGeorgia",value:"Georgia,serif"},{locale:"fontNameImpact",value:"Impact,Charcoal,sans-serif"},{locale:"fontNameTahoma",value:"Tahoma,Geneva,sans-serif"},{locale:"fontNameTimesNewRoman",value:"Times New Roman,Times,serif"},{locale:"fontNameVerdana",value:"Verdana,Geneva,sans-serif"}],s=[{locale:"formatsDropDownParagraph",value:"P"},{locale:"formatsDropDownCode",value:"Pre"},{locale:"formatsDropDownQuotation",value:"BlockQuote"},{locale:"formatsDropDownHeading1",value:"H1"},{locale:"formatsDropDownHeading2",value:"H2"},{locale:"formatsDropDownHeading3",value:"H3"},{locale:"formatsDropDownHeading4",value:"H4"}],a=[{locale:"numberFormatListNone",value:"none"},{locale:"numberFormatListNumber",value:"decimal"},{locale:"numberFormatListLowerAlpha",value:"lower-alpha"},{locale:"numberFormatListUpperAlpha",value:"upper-alpha"},{locale:"numberFormatListLowerRoman",value:"lower-roman"},{locale:"numberFormatListUpperRoman",value:"upper-roman"},{locale:"numberFormatListLowerGreek",value:"lower-greek"}],l=[{locale:"bulletFormatListNone",value:"none"},{locale:"bulletFormatListDisc",value:"disc"},{locale:"bulletFormatListCircle",value:"circle"},{locale:"bulletFormatListSquare",value:"square"}]},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(9),r=(n.n(i),n(0)),o=(n.n(r),n(1)),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(o._44,this.moduleDestroy,this),this.parent.on(o.i,this.removeEventListener,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(o.i,this.removeEventListener),this.parent.off(o._44,this.moduleDestroy))},e.prototype.render=function(e){var t;return e.beforeOpen=this.beforeOpen.bind(this),e.open=this.open.bind(this),e.position={X:"center",Y:this.getDialogPosition()},n.i(r.isNullOrUndefined)(e.close)&&(e.close=this.close.bind(this)),e.beforeClose=this.beforeClose.bind(this),t=new i.Dialog(e),t.isStringTemplate=!0,t},e.prototype.beforeOpen=function(e){if(e.element.classList.contains("e-dialog")){var t=n.i(r.closest)(e.target,"form");n.i(r.isNullOrUndefined)(t)||(this.dialogEle=e.element,this.dialogEle.addEventListener("keydown",this.handleEnterKeyDown))}this.parent.trigger(o._47,e,this.beforeOpenCallback.bind(this,e))},e.prototype.handleEnterKeyDown=function(e){"Enter"===e.code&&e.preventDefault()},e.prototype.beforeOpenCallback=function(e){e.cancel&&this.parent.notify(o._48,null)},e.prototype.open=function(e){this.parent.trigger(o._49,e)},e.prototype.beforeClose=function(e){this.dialogEle&&this.dialogEle.removeEventListener("keydown",this.handleEnterKeyDown),this.parent.trigger(o._50,e,function(e){e.cancel||e.container.classList.contains("e-popup-close")&&(e.cancel=!0)})},e.prototype.getDialogPosition=function(){var e=this.parent.element.getBoundingClientRect().top;if(e<0){for(var t=0,n=this.parent.element;"BODY"!==n.nodeName;){var i=n.getBoundingClientRect().top;i>0&&(t=i),n=n.parentElement}return e=Math.abs(e)+t,e.toString()}return"top"},e.prototype.close=function(e){this.parent.trigger(o._51,e)},e.prototype.moduleDestroy=function(){this.parent=null},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(30),r=n(0),o=(n.n(r),n(4)),s=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.renderPanel=function(){var e=this.parent,t=n.i(o.p)(e.value,e),i='<body spellcheck="false" autocorrect="off" contenteditable="true">'+t+"</body></html>",r="\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image, .e-rte-audio, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n .e-rte-placeholder::before { content: attr(placeholder); opacity: 0.54; overflow: hidden; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }\n </style>\n </head>"+i,s=this.parent.createElement("iframe",{id:this.parent.getID()+"_rte-view",className:"e-rte-content",styles:"display:block;",attrs:{srcdoc:r}});this.setPanel(s),e.element.appendChild(s),s.contentDocument.body.id=this.parent.getID()+"_rte-edit-view",s.contentDocument.body.setAttribute("aria-owns",this.parent.getID()),s.contentDocument.open(),r=this.setThemeColor(r,{color:"#333"}),s.contentDocument.write(r),s.contentDocument.close(),e.enableRtl&&this.contentPanel.contentDocument.body.setAttribute("class","e-rtl")},t.prototype.setThemeColor=function(e,t){var n=getComputedStyle(this.parent.element,".e-richtexteditor").getPropertyValue("color");return e.replace(t.color,n)},t.prototype.getEditPanel=function(){return n.i(r.isNullOrUndefined)(this.contentPanel.contentDocument)?this.parent.inputElement:this.contentPanel.contentDocument.body},t.prototype.getDocument=function(){return this.getEditPanel().ownerDocument},t}(i.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(e){this.parent=e}return e.prototype.renderPanel=function(){var e=this.parent,t=this.parent.createElement("div",{id:this.parent.getID()+"_view",className:"e-rte-content"});this.editableElement=this.parent.createElement("textarea",{className:"e-content",id:this.parent.getID()+"_editable-content",attrs:{"aria-labelledby":this.parent.getID()+"_view"}}),t.appendChild(this.editableElement),this.setPanel(t),e.element.appendChild(t)},e.prototype.getPanel=function(){return this.contentPanel},e.prototype.getEditPanel=function(){return this.editableElement},e.prototype.getText=function(){return this.getEditPanel().value},e.prototype.setPanel=function(e){this.contentPanel=e},e.prototype.getDocument=function(){return this.getEditPanel().ownerDocument},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(9),r=(n.n(i),n(2)),o=n(1),s=function(){function e(e){this.parent=e}return e.prototype.quickToolbarOpen=function(){var e=this.popupObj;this.parent.trigger(o._53,e)},e.prototype.renderPopup=function(e){this.setPanel(e.element),this.renderPanel(),e.popupObj=new i.Popup(e.element,{targetType:"relative",relateTo:this.parent.element,open:this.quickToolbarOpen.bind(this)}),this.popupObj=e.popupObj,e.popupObj.hide()},e.prototype.renderPanel=function(){this.getPanel().classList.add(r.s)},e.prototype.getPanel=function(){return this.popupPanel},e.prototype.setPanel=function(e){this.popupPanel=e},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(5),r=n(1),o=n(0),s=(n.n(o),function(){function e(e,t){this.parent=e,this.locator=t,this.renderer=this.locator.getService("rendererFactory"),this.addEventListener()}return e.prototype.render=function(){this.parent;this.contentRenderer=this.renderer.getRenderer(i.a.Content),this.contentRenderer.renderPanel()},e.prototype.refresh=function(e){void 0===e&&(e={requestType:"refresh"}),this.parent.notify(e.requestType+"-begin",e)},e.prototype.destroy=function(){n.i(o.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.s,this.refresh,this),this.parent.on(r.u,this.keyUp,this),this.parent.on(r._44,this.moduleDestroy,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.s,this.refresh),this.parent.off(r.u,this.keyUp),this.parent.off(r._44,this.moduleDestroy))},e.prototype.keyUp=function(e){if("HTML"===this.parent.editorMode)switch(e.args.which){case 46:case 8:var t=this.parent.contentModule.getEditPanel().childNodes;if(0===t.length||1===t.length&&0===t[0].childNodes.length&&("BR"===t[0].tagName||("P"===t[0].tagName||"DIV"===t[0].tagName)&&""===t[0].textContent)){var n=this.parent.contentModule.getEditPanel();"DIV"===this.parent.enterKey?n.innerHTML="<div><br/></div>":"BR"===this.parent.enterKey?n.innerHTML="<br/>":n.innerHTML="<p><br/></p>",this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),n.childNodes[0],0)}}},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(0),r=(n.n(i),n(81)),o=(n.n(r),n(116)),s=(n.n(o),n(9)),a=(n.n(s),n(2)),l=n(1),d=n(14),c=(n.n(d),n(4)),u=function(){function e(e,t){this.parent=e,t&&(this.l10n=t.getService("rteLocale")),this.wireEvent()}return e.prototype.wireEvent=function(){this.parent.on(l.i,this.unWireEvent,this),this.parent.on(l._93,this.destroyTooltip,this)},e.prototype.destroyTooltip=function(){var e=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().ownerDocument:this.parent.contentModule.getDocument();if(!n.i(i.isNullOrUndefined)(e.querySelector(".e-tooltip-wrap"))&&!n.i(i.isNullOrUndefined)(e.querySelector("[data-tooltip-id]"))){var t=e.querySelector("[data-tooltip-id]"),r=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});t.dispatchEvent(r)}},e.prototype.unWireEvent=function(){this.parent.off(l.i,this.unWireEvent)},e.prototype.toolbarBeforeCreate=function(e){"Extended"===this.mode&&(e.enableCollision=!1)},e.prototype.toolbarCreated=function(){this.parent.notify(l.x,this)},e.prototype.toolbarClicked=function(e){this.parent.enabled&&(this.parent.trigger("toolbarClick",e),this.parent.readonly&&!n.i(i.isNullOrUndefined)(e.item)||this.parent.notify(l.j,e))},e.prototype.dropDownSelected=function(e){this.parent.notify(l.B,e)},e.prototype.beforeDropDownItemRender=function(e){!this.parent.readonly&&this.parent.enabled&&this.parent.notify(l.C,e)},e.prototype.tooltipBeforeRender=function(e){if(!n.i(i.isNullOrUndefined)(e.target.getAttribute("title"))){var t=e.target.getAttribute("title"),r=void 0;switch(t){case"Minimize":r=this.l10n.getConstant("minimize"),e.target.setAttribute("title",r+" (Esc)");break;case"Maximize":r=this.l10n.getConstant("maximize"),e.target.setAttribute("title",r+" (Ctrl+Shift+F)")}}},e.prototype.dropDownOpen=function(e){if(e.element.parentElement.getAttribute("id").indexOf("TableCell")>-1&&!n.i(i.isNullOrUndefined)(e.element.parentElement.querySelector(".e-cell-merge"))&&(!n.i(i.isNullOrUndefined)(e.element.parentElement.querySelector(".e-cell-horizontal-split"))||!n.i(i.isNullOrUndefined)(e.element.parentElement.querySelector(".e-cell-vertical-split")))){var t=e.element.querySelectorAll("li");1===this.parent.inputElement.querySelectorAll(".e-cell-select").length?(n.i(i.addClass)([t[0]],"e-disabled"),n.i(i.removeClass)([t[1],t[2]],"e-disabled")):this.parent.inputElement.querySelectorAll(".e-cell-select").length>1&&(n.i(i.removeClass)([t[0]],"e-disabled"),n.i(i.addClass)([t[1],t[2]],"e-disabled"))}this.parent.notify(l._18,e)},e.prototype.dropDownClose=function(e){this.parent.notify(l._19,e)},e.prototype.renderToolbar=function(e){this.setPanel(e.target),this.renderPanel(),this.mode=e.overflowMode,e.rteToolbarObj.toolbarObj=new r.Toolbar({items:e.items,width:"100%",overflowMode:e.overflowMode,beforeCreate:this.toolbarBeforeCreate.bind(this),created:this.toolbarCreated.bind(this),clicked:this.toolbarClicked.bind(this),enablePersistence:e.enablePersistence,enableRtl:e.enableRtl,cssClass:e.cssClass}),e.rteToolbarObj.toolbarObj.isStringTemplate=!0,e.rteToolbarObj.toolbarObj.createElement=this.parent.createElement,e.rteToolbarObj.toolbarObj.appendTo(e.target),this.parent.showTooltip&&(this.tooltip=new s.Tooltip({target:"#"+this.parent.getID()+"_toolbar_wrapper [title]",showTipPointer:!0,openDelay:400,opensOn:"Hover",beforeRender:this.tooltipBeforeRender.bind(this),cssClass:this.parent.getCssClass(),windowCollision:!0,position:"BottomCenter"}),this.tooltip.appendTo(e.target))},e.prototype.renderDropDownButton=function(e){var t,r=this;e.element.classList.add(a.B),t=e.cssClass+" "+a._12+" "+a._13,this.parent.inlineMode.enable&&i.Browser.isDevice&&(t=t+" "+a.x);var s=this,d=new o.DropDownButton({items:e.items,iconCss:e.iconCss,cssClass:t,content:e.content,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,select:this.dropDownSelected.bind(this),beforeOpen:function(e){if(s.parent.readonly||!s.parent.enabled)return void(e.cancel=!0);if("Markdown"!==s.parent.editorMode){var t=s.parent.getRange().startContainer.parentElement,o=t.closest("table"),a=t.closest("tr");if(!n.i(i.isNullOrUndefined)(o)&&o.classList.contains("e-dashed-border"))for(var c=0;c<e.element.childNodes.length;c++)e.element.childNodes[c].classList.contains("e-dashed-borders")&&n.i(i.addClass)([e.element.childNodes[c]],"e-active");else if(!n.i(i.isNullOrUndefined)(o)&&!o.classList.contains("e-dashed-border")&&o.classList.contains("e-alternate-rows")&&""!==window.getComputedStyle(a).backgroundColor)for(var c=0;c<e.element.childNodes.length;c++)e.element.childNodes[c].classList.contains("e-alternate-rows")&&n.i(i.addClass)([e.element.childNodes[c]],"e-active");for(var u=s.parent.getRange().startContainer;u!==s.parent.inputElement&&!n.i(i.isNullOrUndefined)(u.parentElement);){"#text"===u.nodeName&&(u=u.parentElement);var h=window.getComputedStyle(u).textAlign;if("Alignments"===e.items[0].command){if("Align Left"===e.items[0].text&&"left"===h||"start"===h){n.i(i.addClass)([e.element.childNodes[0]],"e-active");break}if("Align Center"===e.items[1].text&&"center"===h){n.i(i.addClass)([e.element.childNodes[1]],"e-active");break}if("Align Right"===e.items[2].text&&"right"===h){n.i(i.addClass)([e.element.childNodes[2]],"e-active");break}if("Align Justify"===e.items[3].text&&"justify"===h){n.i(i.addClass)([e.element.childNodes[3]],"e-active");break}}u=u.parentElement}var p=t.closest("img"),m=p||t.querySelector("img");if("Images"===e.items[0].command&&!n.i(i.isNullOrUndefined)(m)){var c=void 0;m.classList.contains("e-imgleft")||m.classList.contains("e-imginline")?c=0:m.classList.contains("e-imgcenter")||m.classList.contains("e-imgbreak")?c=1:m.classList.contains("e-imgright")&&(c=2),n.i(i.isNullOrUndefined)(e.element.childNodes[c])||n.i(i.addClass)([e.element.childNodes[c]],"e-active")}if("Formats"===e.items[0].command)for(var c=0;c<e.element.childNodes.length;c++){var f=r.parent.createElement("div");f.innerHTML=d.content.trim(),""!==f.textContent.trim()&&e.element.childNodes[c].textContent.trim()===f.textContent.trim()?e.element.childNodes[c].classList.contains("e-active")||n.i(i.addClass)([e.element.childNodes[c]],"e-active"):n.i(i.removeClass)([e.element.childNodes[c]],"e-active")}}s.parent.notify(l._17,e)},close:this.dropDownClose.bind(this),open:this.dropDownOpen.bind(this),beforeItemRender:this.beforeDropDownItemRender.bind(this)});return d.isStringTemplate=!0,d.createElement=s.parent.createElement,d.appendTo(e.element),e.element.tabIndex=-1,document.getElementById(d.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),d},e.prototype.renderListDropDown=function(e){var t=this,n=a._12+" "+a._13+(this.parent.inlineMode?" "+a.x:"");n+=" "+("NumberFormatList"===e.itemName?a._17:a._18);var i=t.parent.createElement("span",{className:a._16}),r=t.parent.createElement("span",{className:e.cssClass});i.appendChild(r);var s=new o.DropDownButton({items:e.items,cssClass:n,content:e.content,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,select:this.dropDownSelected.bind(this),beforeOpen:function(e){if(t.parent.readonly||!t.parent.enabled)return void(e.cancel=!0);t.parent.notify(l._19,{});var n=e.event?e.event.target:null;if(t.currentElement=s.element,t.currentDropdown=s,e.event&&"click"===e.event.type&&(n.classList.contains(a._16)||n.parentElement.classList.contains(a._16)))return void(e.cancel=!0);t.parent.notify(l._17,e)},close:this.dropDownClose.bind(this),open:this.dropDownOpen.bind(this),beforeItemRender:this.beforeDropDownItemRender.bind(this)});return s.isStringTemplate=!0,s.createElement=t.parent.createElement,s.appendTo(e.element),e.element.tabIndex=-1,e.element.setAttribute("role","button"),document.getElementById(s.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),1===e.element.childElementCount&&s.element.insertBefore(i,s.element.querySelector(".e-caret")),e.element.tabIndex=-1,s.element.removeAttribute("type"),s.element.onmousedown=function(){t.parent.notify(l._18,{})},s.element.onkeydown=function(){t.parent.notify(l._18,{})},s},e.prototype.paletteSelection=function(e,t){var r=e.element.querySelector(".e-control.e-colorpicker"),o=[].slice.call(n.i(i.selectAll)(".e-tile",r.parentElement));n.i(i.removeClass)(o,"e-selected");var s=t.querySelector("."+a._12).style.borderBottomColor;o.filter(function(e){e.style.backgroundColor===s&&n.i(i.addClass)([e],"e-selected")})},e.prototype.renderColorPickerDropDown=function(e,t,r,s){var u=this,h=this,p=a._12+" "+a._13+(this.parent.inlineMode?" "+a.x:"");p+=" "+("backgroundcolor"===t?a._27:a._26),p+=this.parent.getCssClass(!0);var m,f=h.parent.createElement("span",{className:a._25}),g=h.parent.createElement("span",{className:e.cssClass}),b=n.i(i.isNullOrUndefined)(s)?h.parent.backgroundColor.default:s;g.style.borderBottomColor="backgroundcolor"===t?b:h.parent.fontColor.default,f.appendChild(g);var v=new o.DropDownButton({target:r.element.parentElement,cssClass:p,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,beforeOpen:function(t){if(r.inline=!0,r.dataBind(),h.parent.readonly||!h.parent.enabled)return void(t.cancel=!0);var o=t.event?t.event.target:null;if(h.currentElement=v.element,h.currentDropdown=v,h.paletteSelection(t,h.currentElement),t.event&&"click"===t.event.type&&(o.classList.contains(a._25)||o.parentElement.classList.contains(a._25))){t.cancel=!0;var s=o.classList.contains(a._12)?o.style.borderBottomColor:o.querySelector("."+a._12).style.borderBottomColor;h.parent.notify(l._19,{}),m=h.parent.formatter.editorManager.nodeSelection.getRange(h.parent.contentModule.getDocument());var u=m.startContainer.parentNode,p=n.i(i.closest)(m.startContainer.parentNode,"table");return void(("TD"===m.startContainer.nodeName||"TH"===m.startContainer.nodeName||n.i(i.closest)(m.startContainer.parentNode,"td,th")||h.parent.iframeSettings.enable&&!n.i(c.b)(u.ownerDocument.querySelector("body"),"e-lib"))&&m.collapsed&&"BackgroundColor"===e.subCommand&&n.i(i.closest)(p,"."+a.a)?h.parent.notify(l._30,{item:{command:e.command,subCommand:e.subCommand,value:s}}):h.parent.notify(l._29,{item:{command:e.command,subCommand:e.subCommand,value:s}}))}var f=t.element.querySelector(".e-control.e-colorpicker"),g=n.i(i.getInstance)(f,d.ColorPicker);g.showButtons=!t.element.querySelector(".e-color-palette"),g.dataBind(),t.element.onclick=function(e){e.target.classList.contains("e-cancel")&&v.toggle()}},open:function(e){u.setColorPickerContentWidth(r);var t,n=e.element.querySelector(".e-control.e-colorpicker");t=e.element.querySelector(".e-color-palette")?n.parentElement.querySelector(".e-palette"):n.parentElement.querySelector("e-handler"),t&&t.focus(),u.pickerRefresh(e)},beforeClose:function(t){var r=t.event?t.event.target:null;if(t.event&&"click"===t.event.type&&(r.classList.contains(a._25)||r.parentElement.classList.contains(a._25))){var o=r.classList.contains(a._12)?r.style.borderBottomColor:r.querySelector("."+a._12).style.borderBottomColor;return m=h.parent.formatter.editorManager.nodeSelection.getRange(h.parent.contentModule.getDocument()),void(("TD"===m.startContainer.nodeName||"TH"===m.startContainer.nodeName||n.i(i.closest)(m.startContainer.parentNode,"td,th"))&&m.collapsed?h.parent.notify(l._30,{item:{command:e.command,subCommand:e.subCommand,value:o}}):h.parent.notify(l._29,{item:{command:e.command,subCommand:e.subCommand,value:o}}))}},close:function(e){h.parent.notify(l._19,{})}});return v.isStringTemplate=!0,v.createElement=h.parent.createElement,e.element.setAttribute("role","button"),v.appendTo(e.element),document.getElementById(v.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),v.element.insertBefore(f,v.element.querySelector(".e-caret")),e.element.tabIndex=-1,v.element.removeAttribute("type"),v.element.onmousedown=function(){h.parent.notify(l._18,{})},v.element.onkeydown=function(){h.parent.notify(l._18,{})},v},e.prototype.pickerRefresh=function(e){if("Picker"===this.parent.backgroundColor.mode){var t=e.element.parentElement;t.style.width=(t.offsetWidth+5).toString()+"px",n.i(i.getInstance)(t,s.Popup).refreshPosition(t),t.style.width=(t.offsetWidth-5).toString()+"px"}},e.prototype.setColorPickerContentWidth=function(e){var t=e.element.nextSibling;if("0px"===t.style.width){t.style.width="";var r=parseInt(getComputedStyle(t).borderBottomWidth,10);t.style.width=n.i(i.formatUnit)(t.children[0].offsetWidth+r+r)}},e.prototype.renderColorPicker=function(e,t){var r,o=this,s=this,c=new d.ColorPicker({enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,inline:!1,value:"#fff",created:function(){var e="backgroundcolor"===t?s.parent.backgroundColor.default:s.parent.fontColor.default;c.setProperties({value:e})},mode:"backgroundcolor"===t?s.parent.backgroundColor.mode:s.parent.fontColor.mode,modeSwitcher:"backgroundcolor"===t?s.parent.backgroundColor.modeSwitcher:s.parent.fontColor.modeSwitcher,beforeTileRender:function(e){if(e.element.classList.add(a._28),e.element.classList.add(a._61),!n.i(i.isNullOrUndefined)(o.parent.cssClass))for(var t=o.parent.getCssClass().split(" "),r=0;r<t.length;r++)""!==t[r].trim()&&e.element.classList.add(t[r]);""===e.value&&e.element.classList.add(a._62)},change:function(t){var r=t.currentValue.rgba;t.item={command:e.command,subCommand:e.subCommand,value:r},s.parent.notify(l._19,{}),s.currentElement.querySelector("."+a._12).style.borderBottomColor=r;var o=s.parent.formatter.editorManager.nodeSelection.getRange(s.parent.contentModule.getDocument()),d=n.i(i.closest)(o.startContainer.parentNode,"table");("TD"===o.startContainer.nodeName||"TH"===o.startContainer.nodeName||"BODY"===o.startContainer.nodeName||n.i(i.closest)(o.startContainer.parentNode,"td,th"))&&o.collapsed&&"BackgroundColor"===e.subCommand&&n.i(i.closest)(d,"."+a.a)?s.parent.notify(l._30,t):s.parent.notify(l._29,t),s.currentDropdown.toggle()},beforeModeSwitch:function(e){r=c.value,""===r&&c.setProperties({value:"Picker"===e.mode?"#008000ff":""},!0),c.showButtons="Palette"!==e.mode}});return c.isStringTemplate=!0,c.columns="backgroundcolor"===t?this.parent.backgroundColor.columns:this.parent.fontColor.columns,c.presetColors="backgroundcolor"===t?this.parent.backgroundColor.colorCode:this.parent.fontColor.colorCode,c.cssClass=("backgroundcolor"===t?a._30:a._29)+" "+e.cssClass,c.createElement=this.parent.createElement,c.appendTo(document.getElementById(e.target)),c},e.prototype.renderPanel=function(){this.getPanel().classList.add(a.g)},e.prototype.getPanel=function(){return this.toolbarPanel},e.prototype.setPanel=function(e){this.toolbarPanel=e},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(3),a=n(5),l=n(28),d=function(){function e(e,t){this.parent=e;var n=t;this.rendererFactory=n.getService("rendererFactory"),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(r._14,this.sourceCode,this),this.parent.on(r.g,this.onInitialEnd,this),this.parent.on(r._15,this.updateSourceCode,this),this.parent.on(r.i,this.destroy,this),this.parent.on(r._44,this.moduleDestroy,this)},e.prototype.onInitialEnd=function(){this.parent.formatter.editorManager.observer.on(s.d,this.onKeyDown,this)},e.prototype.removeEventListener=function(){this.unWireEvent(),this.parent.off(r._14,this.sourceCode),this.parent.off(r._15,this.updateSourceCode),this.parent.off(r.g,this.onInitialEnd),this.parent.off(r.i,this.destroy),this.parent.off(r._44,this.moduleDestroy),this.parent.formatter.editorManager.observer.off(s.d,this.onKeyDown)},e.prototype.getSourceCode=function(){return this.parent.createElement("textarea",{className:o._69+this.parent.getCssClass(!0)})},e.prototype.wireEvent=function(e){this.keyboardModule=new l.a(e,{keyAction:this.previewKeyDown.bind(this),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"}),i.EventHandler.add(this.previewElement,"mousedown",this.mouseDownHandler,this)},e.prototype.unWireEvent=function(){this.keyboardModule&&this.keyboardModule.destroy(),this.previewElement&&i.EventHandler.remove(this.previewElement,"mousedown",this.mouseDownHandler)},e.prototype.wireBaseKeyDown=function(){this.parent.keyboardModule=new l.a(this.contentModule.getEditPanel(),{keyAction:this.parent.keyDown.bind(this.parent),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"})},e.prototype.unWireBaseKeyDown=function(){this.parent.keyboardModule.destroy()},e.prototype.mouseDownHandler=function(e){this.parent.notify(r._25,{args:e})},e.prototype.previewKeyDown=function(e){switch(e.action){case"html-source":this.updateSourceCode(e),e.preventDefault();break;case"toolbar-focus":if(this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()){var t=this.parent.getToolbarElement().querySelector(".e-toolbar-item:not(.e-overlay)[title]");t.firstElementChild.removeAttribute("tabindex"),t.firstElementChild.focus()}}},e.prototype.onKeyDown=function(e){switch(e.event.action){case"html-source":e.event.preventDefault(),this.sourceCode(e),e.callBack({requestType:"SourceCode",editorMode:"HTML",event:e.event})}},e.prototype.sourceCode=function(e){this.parent.notify(r._94,{}),this.parent.isBlur=!1,this.parent.trigger(r.S,{requestType:"SourceCode",targetItem:"SourceCode",args:e});var t=n.i(i.selectAll)("."+o.D,this.parent.element);if(this.contentModule=this.rendererFactory.getRenderer(a.a.Content),this.parent.notify(r.W,{targetItem:"SourceCode",updateItem:"Preview",baseToolbar:this.parent.getBaseToolbarObject()}),n.i(i.isNullOrUndefined)(this.previewElement)&&(this.previewElement=this.getSourceCode()),this.parent.updateValueData(),this.parent.iframeSettings.enable){var s=void 0;s=n.i(i.isNullOrUndefined)(this.parent.element.querySelector("#"+this.parent.getID()+"_source-view"))?this.parent.createElement("div",{className:"e-source-content",id:this.parent.getID()+"_source-view"}):this.parent.element.querySelector("#"+this.parent.getID()+"_source-view"),s.appendChild(this.previewElement),this.parent.element.appendChild(s),s.style.height=this.contentModule.getPanel().style.height,s.style.marginTop=this.contentModule.getPanel().style.marginTop,this.getPanel().value=this.getTextAreaValue(),this.contentModule.getPanel().style.display="none",s.style.display="block",this.getPanel().style.display="block"}else{var l=this.parent.inputElement.offsetHeight;this.contentModule.getPanel().appendChild(this.previewElement),this.getPanel().value=this.getTextAreaValue(),this.previewElement.style.height=l+"px",this.contentModule.getEditPanel().style.display="none",this.previewElement.style.display="block"}if(this.parent.isBlur=!1,this.parent.disableToolbarItem(this.parent.toolbarSettings.items),this.parent.enableToolbarItem("SourceCode"),this.parent.getToolbar()&&n.i(i.removeClass)([this.parent.getToolbar()],[o._11]),n.i(i.removeClass)(t,[o._10]),this.parent.setContentHeight("sourceCode",!0),this.wireEvent(this.previewElement),this.unWireBaseKeyDown(),this.previewElement.focus(),this.parent.updateValue(),!n.i(i.isNullOrUndefined)(this.parent.placeholder)&&!this.parent.iframeSettings.enable){this.parent.element.querySelector(".rte-placeholder.e-rte-placeholder").style.display="none"}this.parent.trigger(r.T,{requestType:"SourceCode",targetItem:"SourceCode",args:e}),this.parent.invokeChangeEvent()},e.prototype.updateSourceCode=function(e){this.parent.isBlur=!1,this.parent.trigger(r.S,{requestType:"Preview",targetItem:"Preview",args:e});var t=this.getPanel();this.parent.notify(r.W,{targetItem:"Preview",updateItem:"SourceCode",baseToolbar:this.parent.getBaseToolbarObject()});var s,a=this.parent.serializeValue(t.value);if(s=null===a||""===a?"DIV"===this.parent.enterKey?"<div><br/></div>":"BR"===this.parent.enterKey?"<br/>":"<p><br/></p>":a,this.parent.iframeSettings.enable?(t.parentElement.style.display="none",t.style.display="none",this.contentModule.getPanel().style.display="block",this.contentModule.getEditPanel().innerHTML=s):(t.style.display="none",this.contentModule.getEditPanel().style.display="block",this.contentModule.getEditPanel().innerHTML=s),this.parent.isBlur=!1,this.parent.enableToolbarItem(this.parent.toolbarSettings.items),this.parent.getToolbar()&&n.i(i.removeClass)([this.parent.getToolbar()],[o._11]),this.parent.setContentHeight("preview",!0),this.unWireEvent(),this.wireBaseKeyDown(),this.contentModule.getEditPanel().focus(),this.parent.updateValue(),!n.i(i.isNullOrUndefined)(this.parent.placeholder)&&0===this.contentModule.getEditPanel().innerText.length){this.parent.element.querySelector(".rte-placeholder.e-rte-placeholder").style.display="block"}this.parent.trigger(r.T,{requestType:"Preview",targetItem:"Preview",args:e}),this.parent.formatter.enableUndo(this.parent),this.parent.addAudioVideoWrapper(),this.parent.invokeChangeEvent(),this.parent.notify(r.c,{})},e.prototype.getTextAreaValue=function(){return"<p><br></p>"===this.contentModule.getEditPanel().innerHTML||"<div><br></div>"===this.contentModule.getEditPanel().innerHTML||"<br>"===this.contentModule.getEditPanel().innerHTML||1===this.contentModule.getEditPanel().childNodes.length&&"P"===this.contentModule.getEditPanel().childNodes[0].tagName&&7===this.contentModule.getEditPanel().innerHTML.length||"DIV"===this.contentModule.getEditPanel().childNodes[0].tagName&&11===this.contentModule.getEditPanel().innerHTML.length?"":this.parent.value},e.prototype.getPanel=function(){return this.parent.element&&this.parent.element.querySelector(".e-rte-srctextarea")},e.prototype.getViewPanel=function(){return this.parent.iframeSettings.enable&&this.getPanel()?this.getPanel().parentElement:this.getPanel()},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null},e}()},function(e,t){e.exports=o},function(e,t,n){"use strict";var i=n(15);n.d(t,"a",function(){return i.a}),n.d(t,"b",function(){return i.b}),n.d(t,"c",function(){return i.c}),n.d(t,"d",function(){return i.d}),n.d(t,"e",function(){return i.e}),n.d(t,"f",function(){return i.f}),n.d(t,"g",function(){return i.g}),n.d(t,"h",function(){return i.h});var r=n(3);n.d(t,"i",function(){return r.a}),n.d(t,"j",function(){return r.b}),n.d(t,"k",function(){return r.c}),n.d(t,"l",function(){return r.d}),n.d(t,"m",function(){return r.e}),n.d(t,"n",function(){return r.f}),n.d(t,"o",function(){return r.g}),n.d(t,"p",function(){return r.h}),n.d(t,"q",function(){return r.i}),n.d(t,"r",function(){return r.j}),n.d(t,"s",function(){return r.k}),n.d(t,"t",function(){return r.l}),n.d(t,"u",function(){return r.m}),n.d(t,"v",function(){return r.n}),n.d(t,"w",function(){return r.o})},function(e,t,n){"use strict";var i=n(86);n.d(t,"a",function(){return i.a}),n.d(t,"b",function(){return i.b}),n.d(t,"c",function(){return i.c}),n.d(t,"d",function(){return i.d}),n.d(t,"e",function(){return i.e}),n.d(t,"f",function(){return i.f}),n.d(t,"g",function(){return i.g}),n.d(t,"h",function(){return i.h}),n.d(t,"i",function(){return i.i}),n.d(t,"j",function(){return i.j}),n.d(t,"k",function(){return i.k}),n.d(t,"l",function(){return i.l}),n.d(t,"m",function(){return i.m}),n.d(t,"n",function(){return i.n}),n.d(t,"o",function(){return i.o}),n.d(t,"p",function(){return i.p}),n.d(t,"q",function(){return i.q}),n.d(t,"r",function(){return i.r}),n.d(t,"s",function(){return i.s}),n.d(t,"t",function(){return i.t}),n.d(t,"u",function(){return i.u}),n.d(t,"v",function(){return i.v}),n.d(t,"w",function(){return i.w}),n.d(t,"x",function(){return i.x}),n.d(t,"y",function(){return i.y}),n.d(t,"z",function(){return i.z}),n.d(t,"A",function(){return i.A}),n.d(t,"B",function(){return i.B}),n.d(t,"C",function(){return i.C}),n.d(t,"D",function(){return i.D}),n.d(t,"E",function(){return i.E}),n.d(t,"F",function(){return i.F}),n.d(t,"G",function(){return i.G}),n.d(t,"H",function(){return i.H}),n.d(t,"I",function(){return i.I}),n.d(t,"J",function(){return i.J}),n.d(t,"K",function(){return i.K}),n.d(t,"L",function(){return i.L}),n.d(t,"M",function(){return i.M}),n.d(t,"N",function(){return i.N}),n.d(t,"O",function(){return i.O}),n.d(t,"P",function(){return i.P}),n.d(t,"Q",function(){return i.Q}),n.d(t,"R",function(){return i.R}),n.d(t,"S",function(){return i.S}),n.d(t,"T",function(){return i.T}),n.d(t,"U",function(){return i.U}),n.d(t,"V",function(){return i.V}),n.d(t,"W",function(){return i.W}),n.d(t,"X",function(){return i.X}),n.d(t,"Y",function(){return i.Y}),n.d(t,"Z",function(){return i.Z});var r=n(34);n.d(t,"_0",function(){return r.a}),n.d(t,"_1",function(){return r.b}),n.d(t,"_2",function(){return r.c}),n.d(t,"_3",function(){return r.d}),n.d(t,"_4",function(){return r.e}),n.d(t,"_5",function(){return r.f}),n.d(t,"_6",function(){return r.g}),n.d(t,"_7",function(){return r.h}),n.d(t,"_8",function(){return r.i}),n.d(t,"_9",function(){return r.j}),n.d(t,"_10",function(){return r.k}),n.d(t,"_11",function(){return r.l}),n.d(t,"_12",function(){return r.m}),n.d(t,"_13",function(){return r.n}),n.d(t,"_14",function(){return r.o}),n.d(t,"_15",function(){return r.p}),n.d(t,"_16",function(){return r.q}),n.d(t,"_17",function(){return r.r}),n.d(t,"_18",function(){return r.s}),n.d(t,"_19",function(){return r.t}),n.d(t,"_20",function(){return r.u}),n.d(t,"_21",function(){return r.v}),n.d(t,"_22",function(){return r.w}),n.d(t,"_23",function(){return r.x}),n.d(t,"_24",function(){return r.y}),n.d(t,"_25",function(){return r.z})},function(e,t,n){"use strict";var i=n(89);n.d(t,"a",function(){return i.a}),n.d(t,"b",function(){return i.b}),n.d(t,"c",function(){return i.c}),n.d(t,"d",function(){return i.d}),n.d(t,"e",function(){return i.e}),n.d(t,"f",function(){return i.f}),n.d(t,"g",function(){return i.g});var r=n(90);n.d(t,"h",function(){return r.a}),n.d(t,"i",function(){return r.b}),n.d(t,"j",function(){return r.c}),n.d(t,"k",function(){return r.d}),n.d(t,"l",function(){return r.e}),n.d(t,"m",function(){return r.f}),n.d(t,"n",function(){return r.g}),n.d(t,"o",function(){return r.h})},function(e,t,n){"use strict";var i=n(92);n.d(t,"a",function(){return i.a}),n.d(t,"b",function(){return i.b}),n.d(t,"c",function(){return i.c}),n.d(t,"d",function(){return i.d}),n.d(t,"e",function(){return i.e}),n.d(t,"f",function(){return i.f}),n.d(t,"g",function(){return i.g}),n.d(t,"h",function(){return i.h}),n.d(t,"i",function(){return i.i}),n.d(t,"j",function(){return i.j}),n.d(t,"k",function(){return i.k}),n.d(t,"l",function(){return i.l}),n.d(t,"m",function(){return i.m}),n.d(t,"n",function(){return i.n}),n.d(t,"o",function(){return i.o}),n.d(t,"p",function(){return i.p}),n.d(t,"q",function(){return i.q}),n.d(t,"r",function(){return i.r}),n.d(t,"s",function(){return i.s}),n.d(t,"t",function(){return i.t}),n.d(t,"u",function(){return i.u}),n.d(t,"v",function(){return i.v});var r=n(106);n.d(t,"w",function(){return r.a}),n.d(t,"x",function(){return r.b}),n.d(t,"y",function(){return r.c});var o=n(109);n.d(t,"z",function(){return o.a}),n.d(t,"A",function(){return o.b}),n.d(t,"B",function(){return o.c}),n.d(t,"C",function(){return o.d}),n.d(t,"D",function(){return o.e}),n.d(t,"E",function(){return o.f}),n.d(t,"F",function(){return o.g}),n.d(t,"G",function(){return o.h}),n.d(t,"H",function(){return o.i}),n.d(t,"I",function(){return o.j}),n.d(t,"J",function(){return o.k}),n.d(t,"K",function(){return o.l}),n.d(t,"L",function(){return o.m});var s=n(104);n.d(t,"M",function(){return s.a}),n.d(t,"N",function(){return s.b}),n.d(t,"O",function(){return s.c}),n.d(t,"P",function(){return s.d}),n.d(t,"Q",function(){return s.e}),n.d(t,"R",function(){return s.f}),n.d(t,"S",function(){return s.g}),n.d(t,"T",function(){return s.h}),n.d(t,"U",function(){return s.i}),n.d(t,"V",function(){return s.j}),n.d(t,"W",function(){return s.k}),n.d(t,"X",function(){return s.l}),n.d(t,"Y",function(){return s.m}),n.d(t,"Z",function(){return s.n}),n.d(t,"_0",function(){return s.o}),n.d(t,"_1",function(){return s.p}),n.d(t,"_2",function(){return s.q}),n.d(t,"_3",function(){return s.r}),n.d(t,"_4",function(){return s.s}),n.d(t,"_5",function(){return s.t}),n.d(t,"_6",function(){return s.u}),n.d(t,"_7",function(){return s.v}),n.d(t,"_8",function(){return s.w}),n.d(t,"_9",function(){return s.x}),n.d(t,"_10",function(){return s.y}),n.d(t,"_11",function(){return s.z}),n.d(t,"_12",function(){return s.A}),n.d(t,"_13",function(){return s.B}),n.d(t,"_14",function(){return s.C}),n.d(t,"_15",function(){return s.D}),n.d(t,"_16",function(){return s.E}),n.d(t,"_17",function(){return s.F}),n.d(t,"_18",function(){return s.G}),n.d(t,"_19",function(){return s.H}),n.d(t,"_20",function(){return s.I}),n.d(t,"_21",function(){return s.J}),n.d(t,"_22",function(){return s.K}),n.d(t,"_23",function(){return s.L}),n.d(t,"_24",function(){return s.M}),n.d(t,"_25",function(){return s.N}),n.d(t,"_26",function(){return s.O}),n.d(t,"_27",function(){return s.P}),n.d(t,"_28",function(){return s.Q}),n.d(t,"_29",function(){return s.R}),n.d(t,"_30",function(){return s.S}),n.d(t,"_31",function(){return s.T}),n.d(t,"_32",function(){return s.U}),n.d(t,"_33",function(){return s.V}),n.d(t,"_34",function(){return s.W}),n.d(t,"_35",function(){return s.X}),n.d(t,"_36",function(){return s.Y}),n.d(t,"_37",function(){return s.Z}),n.d(t,"_38",function(){return s._0}),n.d(t,"_39",function(){return s._1}),n.d(t,"_40",function(){return s._2}),n.d(t,"_41",function(){return s._3}),n.d(t,"_42",function(){return s._4}),n.d(t,"_43",function(){return s._5}),n.d(t,"_44",function(){return s._6}),n.d(t,"_45",function(){return s._7}),n.d(t,"_46",function(){return s._8}),n.d(t,"_47",function(){return s._9}),n.d(t,"_48",function(){return s._10}),n.d(t,"_49",function(){return s._11}),n.d(t,"_50",function(){return s._12}),n.d(t,"_51",function(){return s._13}),n.d(t,"_52",function(){return s._14}),n.d(t,"_53",function(){return s._15}),n.d(t,"_54",function(){return s._16}),n.d(t,"_55",function(){return s._17}),n.d(t,"_56",function(){return s._18}),n.d(t,"_57",function(){return s._19}),n.d(t,"_58",function(){return s._20}),n.d(t,"_59",function(){return s._21}),n.d(t,"_60",function(){return s._22}),n.d(t,"_61",function(){return s._23}),n.d(t,"_62",function(){return s._24}),n.d(t,"_63",function(){return s._25}),n.d(t,"_64",function(){return s._26}),n.d(t,"_65",function(){return s._27}),n.d(t,"_66",function(){return s._28}),n.d(t,"_67",function(){return s._29}),n.d(t,"_68",function(){return s._30}),n.d(t,"_69",function(){return s._31}),n.d(t,"_70",function(){return s._32}),n.d(t,"_71",function(){return s._33}),n.d(t,"_72",function(){return s._34}),n.d(t,"_73",function(){return s._35}),n.d(t,"_74",function(){return s._36}),n.d(t,"_75",function(){return s._37}),n.d(t,"_76",function(){return s._38}),n.d(t,"_77",function(){return s._39}),n.d(t,"_78",function(){return s._40}),n.d(t,"_79",function(){return s._41}),n.d(t,"_80",function(){return s._42}),n.d(t,"_81",function(){return s._43}),n.d(t,"_82",function(){return s._44}),n.d(t,"_83",function(){return s._45}),n.d(t,"_84",function(){return s._46}),n.d(t,"_85",function(){return s._47}),n.d(t,"_86",function(){return s._48}),n.d(t,"_87",function(){return s._49}),n.d(t,"_88",function(){return s._50}),n.d(t,"_89",function(){return s._51}),n.d(t,"_90",function(){return s._52}),n.d(t,"_91",function(){return s._53}),n.d(t,"_92",function(){return s._54}),n.d(t,"_93",function(){return s._55}),n.d(t,"_94",function(){return s._56}),n.d(t,"_95",function(){return s._57}),n.d(t,"_96",function(){return s._58}),n.d(t,"_97",function(){return s._59}),n.d(t,"_98",function(){return s._60}),n.d(t,"_99",function(){return s._61}),n.d(t,"_100",function(){return s._62}),n.d(t,"_101",function(){return s._63}),n.d(t,"_102",function(){return s._64}),n.d(t,"_103",function(){return s._65}),n.d(t,"_104",function(){return s._66}),n.d(t,"_105",function(){return s._67}),n.d(t,"_106",function(){return s._68}),n.d(t,"_107",function(){return s._69}),n.d(t,"_108",function(){return s._70}),n.d(t,"_109",function(){return s._71}),n.d(t,"_110",function(){return s._72}),n.d(t,"_111",function(){return s._73}),n.d(t,"_112",function(){return s._74}),n.d(t,"_113",function(){return s._75}),n.d(t,"_114",function(){return s._76}),n.d(t,"_115",function(){return s._77}),n.d(t,"_116",function(){return s._78}),n.d(t,"_117",function(){return s._79}),n.d(t,"_118",function(){return s._80}),n.d(t,"_119",function(){return s._81}),n.d(t,"_120",function(){return s._82}),n.d(t,"_121",function(){return s._83}),n.d(t,"_122",function(){return s._84}),n.d(t,"_123",function(){return s._85}),n.d(t,"_124",function(){return s._86}),n.d(t,"_125",function(){return s._87}),n.d(t,"_126",function(){return s._88}),n.d(t,"_127",function(){return s._89}),n.d(t,"_128",function(){return s._90}),n.d(t,"_129",function(){return s._91}),n.d(t,"_130",function(){return s._92}),n.d(t,"_131",function(){return s._93}),n.d(t,"_132",function(){return s._94}),n.d(t,"_133",function(){return s._95}),n.d(t,"_134",function(){return s._96}),n.d(t,"_135",function(){return s._97}),n.d(t,"_136",function(){return s._98}),n.d(t,"_137",function(){return s._99}),n.d(t,"_138",function(){return s._100}),n.d(t,"_139",function(){return s._101}),n.d(t,"_140",function(){return s._102}),n.d(t,"_141",function(){return s._103}),n.d(t,"_142",function(){return s._104}),n.d(t,"_143",function(){return s._105}),n.d(t,"_144",function(){return s._106}),n.d(t,"_145",function(){return s._107}),n.d(t,"_146",function(){return s._108}),n.d(t,"_147",function(){return s._109}),n.d(t,"_148",function(){return s._110}),n.d(t,"_149",function(){return s._111}),n.d(t,"_150",function(){return s._112}),n.d(t,"_151",function(){return s._113}),n.d(t,"_152",function(){return s._114}),n.d(t,"_153",function(){return s._115}),n.d(t,"_154",function(){return s._116}),n.d(t,"_155",function(){return s._117}),n.d(t,"_156",function(){return s._118}),n.d(t,"_157",function(){return s._119}),n.d(t,"_158",function(){return s._120}),n.d(t,"_159",function(){return s._121}),n.d(t,"_160",function(){return s._122}),n.d(t,"_161",function(){return s._123}),n.d(t,"_162",function(){return s._124}),n.d(t,"_163",function(){return s._125}),n.d(t,"_164",function(){return s._126}),n.d(t,"_165",function(){return s._127}),n.d(t,"_166",function(){return s._128}),n.d(t,"_167",function(){return s._129}),n.d(t,"_168",function(){return s._130}),n.d(t,"_169",function(){return s._131}),n.d(t,"_170",function(){return s._132}),n.d(t,"_171",function(){return s._133}),n.d(t,"_172",function(){return s._134}),n.d(t,"_173",function(){return s._135}),n.d(t,"_174",function(){return s._136}),n.d(t,"_175",function(){return s._137}),n.d(t,"_176",function(){return s._138}),n.d(t,"_177",function(){return s._139}),n.d(t,"_178",function(){return s._140}),n.d(t,"_179",function(){return s._141}),n.d(t,"_180",function(){return s._142}),n.d(t,"_181",function(){return s._143}),n.d(t,"_182",function(){return s._144}),n.d(t,"_183",function(){return s._145}),n.d(t,"_184",function(){return s._146}),n.d(t,"_185",function(){return s._147});n.d(t,"_186",function(){return s._148}),n.d(t,"_187",function(){return s._149}),n.d(t,"_188",function(){return s._150}),n.d(t,"_189",function(){return s._151}),n.d(t,"_190",function(){return s._152}),n.d(t,"_191",function(){return s._153}),n.d(t,"_192",function(){return s._154}),n.d(t,"_193",function(){return s._155}),n.d(t,"_194",function(){return s._156}),n.d(t,"_195",function(){return s._157}),n.d(t,"_196",function(){return s._158}),n.d(t,"_197",function(){return s._159}),n.d(t,"_198",function(){return s._160}),n.d(t,"_199",function(){return s._161}),n.d(t,"_200",function(){return s._162}),n.d(t,"_201",function(){return s._163}),n.d(t,"_202",function(){return s._164}),n.d(t,"_203",function(){return s._165}),n.d(t,"_204",function(){return s._166}),n.d(t,"_205",function(){return s._167}),n.d(t,"_206",function(){return s._168}),n.d(t,"_207",function(){return s._169}),n.d(t,"_208",function(){return s._170}),n.d(t,"_209",function(){return s._171}),n.d(t,"_210",function(){return s._172}),n.d(t,"_211",function(){return s._173}),n.d(t,"_212",function(){return s._174}),n.d(t,"_213",function(){return s._175}),n.d(t,"_214",function(){return s._176}),n.d(t,"_215",function(){return s._177}),n.d(t,"_216",function(){return s._178}),n.d(t,"_217",function(){return s._179}),n.d(t,"_218",function(){return s._180}),n.d(t,"_219",function(){return s._181}),n.d(t,"_220",function(){return s._182}),n.d(t,"_221",function(){return s._183}),n.d(t,"_222",function(){return s._184}),n.d(t,"_223",function(){return s._185}),n.d(t,"_224",function(){return s._186}),n.d(t,"_225",function(){return s._187}),n.d(t,"_226",function(){return s._188}),n.d(t,"_227",function(){return s._189}),n.d(t,"_228",function(){return s._190}),n.d(t,"_229",function(){return s._191}),n.d(t,"_230",function(){return s._192}),n.d(t,"_231",function(){return s._193}),n.d(t,"_232",function(){return s._194}),n.d(t,"_233",function(){return s._195}),n.d(t,"_234",function(){return s._196}),n.d(t,"_235",function(){return s._197}),n.d(t,"_236",function(){return s._198}),n.d(t,"_237",function(){return s._199}),n.d(t,"_238",function(){return s._200}),n.d(t,"_239",function(){return s._201}),n.d(t,"_240",function(){return s._202}),n.d(t,"_241",function(){return s._203}),n.d(t,"_242",function(){return s._204}),n.d(t,"_243",function(){return s._205}),n.d(t,"_244",function(){return s._206}),n.d(t,"_245",function(){return s._207}),n.d(t,"_246",function(){return s._208}),n.d(t,"_247",function(){return s._209}),n.d(t,"_248",function(){return s._210}),n.d(t,"_249",function(){return s._211}),n.d(t,"_250",function(){return s._212}),n.d(t,"_251",function(){return s._213}),n.d(t,"_252",function(){return s._214}),n.d(t,"_253",function(){return s._215}),n.d(t,"_254",function(){return s._216}),n.d(t,"_255",function(){return s._217}),n.d(t,"_256",function(){return s._218}),n.d(t,"_257",function(){return s._219}),n.d(t,"_258",function(){return s._220}),n.d(t,"_259",function(){return s._221}),n.d(t,"_260",function(){return s._222}),n.d(t,"_261",function(){return s._223}),n.d(t,"_262",function(){return s._224}),n.d(t,"_263",function(){return s._225}),n.d(t,"_264",function(){return s._226}),n.d(t,"_265",function(){return s._227}),n.d(t,"_266",function(){return s._228}),n.d(t,"_267",function(){return s._229}),n.d(t,"_268",function(){return s._230}),n.d(t,"_269",function(){return s._231}),n.d(t,"_270",function(){return s._232}),n.d(t,"_271",function(){return s._233}),n.d(t,"_272",function(){return s._234}),n.d(t,"_273",function(){return s._235}),n.d(t,"_274",function(){return s._236}),n.d(t,"_275",function(){return s._237}),n.d(t,"_276",function(){return s._238}),n.d(t,"_277",function(){return s._239}),n.d(t,"_278",function(){return s._240}),n.d(t,"_279",function(){return s._241}),n.d(t,"_280",function(){return s._242}),n.d(t,"_281",function(){return s._243}),n.d(t,"_282",function(){return s._244}),n.d(t,"_283",function(){return s._245}),n.d(t,"_284",function(){return s._246}),n.d(t,"_285",function(){return s._247}),n.d(t,"_286",function(){return s._248});var a=n(115);n.d(t,"_287",function(){return a.a}),n.d(t,"_288",function(){return a.b})},function(e,t,n){"use strict";var i=n(33);n.d(t,"a",function(){return i.a});var r=n(7);n.d(t,"b",function(){return r.r}),n.d(t,"c",function(){return r.q}),n.d(t,"d",function(){return r.p}),n.d(t,"e",function(){return r.b}),n.d(t,"f",function(){return r.x}),n.d(t,"g",function(){return r.c}),n.d(t,"h",function(){return r.d}),n.d(t,"i",function(){return r.e}),n.d(t,"j",function(){return r.f}),n.d(t,"k",function(){return r.g}),n.d(t,"l",function(){return r.h}),n.d(t,"m",function(){return r.i}),n.d(t,"n",function(){return r.j}),n.d(t,"o",function(){return r.l}),n.d(t,"p",function(){return r.k}),n.d(t,"q",function(){return r.m}),n.d(t,"r",function(){return r.z}),n.d(t,"s",function(){return r.y}),n.d(t,"t",function(){return r.A}),n.d(t,"u",function(){return r.a}),n.d(t,"v",function(){return r.u}),n.d(t,"w",function(){return r.s}),n.d(t,"x",function(){return r.o}),n.d(t,"y",function(){return r.v}),n.d(t,"z",function(){return r.w}),n.d(t,"A",function(){return r.n}),n.d(t,"B",function(){return r.t});var o=n(21);n.d(t,"C",function(){return o.r}),n.d(t,"D",function(){return o.s}),n.d(t,"E",function(){return o.t}),n.d(t,"F",function(){return o.i}),n.d(t,"G",function(){return o.g}),n.d(t,"H",function(){return o.h}),n.d(t,"I",function(){return o.v}),n.d(t,"J",function(){return o.o}),n.d(t,"K",function(){return o.f}),n.d(t,"L",function(){return o.q}),n.d(t,"M",function(){return o.x}),n.d(t,"N",function(){return o.w}),n.d(t,"O",function(){return o.u}),n.d(t,"P",function(){return o.m}),n.d(t,"Q",function(){return o.p}),n.d(t,"R",function(){return o.b}),n.d(t,"S",function(){return o.l}),n.d(t,"T",function(){return o.c}),n.d(t,"U",function(){return o.k}),n.d(t,"V",function(){return o.j}),n.d(t,"W",function(){return o.a}),n.d(t,"X",function(){return o.n}),n.d(t,"Y",function(){return o.e}),n.d(t,"Z",function(){return o.d})},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(0),r=(n.n(i),n(11)),o=n(12),s=n(16),a=n(19),l=n(22),d=n(6),c=function(){function e(){}return e.clear=function(e,t,a,l,c){this.domNode=new s.b(t,e),this.defaultTag="P"===a?this.defaultTag:"div";var u=new r.a,h=new o.a,p=u.getRange(e),m=p.collapsed?u.getSelectionNodeCollection(p):u.getSelectionNodeCollectionBr(p),f=u.save(p,e),g=!1;if(p.collapsed&&"ClearFormat"!==c&&(g=!0,p=h.GetCursorRange(e,p,m[0])),!p.collapsed){var b=void 0;if(b=m.length>0&&"BR"===m[0].nodeName&&n.i(i.closest)(m[0],"table")?h.GetSpliceNode(p,n.i(i.closest)(m[0],"table")):h.GetSpliceNode(p,m[m.length>1&&"IMG"===m[0].nodeName?1:0]),1===m.length)u.setSelectionContents(e,b),p=u.getRange(e);else if(m.length>1){for(var v=1,C=m[m.length-v];m.length<=v&&"BR"===m[m.length-v].nodeName;)v++,C=m[m.length-v];var y=h.GetSpliceNode(p,C);u.setSelectionText(e,b,y,0,3===y.nodeType?y.textContent.length:y.childNodes.length),p=u.getRange(e)}var N=u.getNodeCollection(p),S=N.slice();this.clearInlines(u.getSelectionNodes(S),S,u.getRange(e),h,t),this.reSelection(e,f,N),p=u.getRange(e),N=u.getNodeCollection(p);var E=N.slice();this.clearBlocks(e,E,t,h,u),n.i(d.b)()&&n.i(d.c)(t,l),this.reSelection(e,f,N)}g&&u.setCursorPoint(e,p.endContainer,p.endOffset)},e.reSelection=function(e,t,n){var i=t.getInsertNodes(n);t.startContainer=t.getNodeArray(i[0],!0,e),t.startOffset=0,t.endContainer=t.getNodeArray(i[i.length-1],!1,e);var r=i[i.length-1];t.endOffset=3===r.nodeType?r.textContent.length:r.childNodes.length,t.restore()},e.clearBlocks=function(e,t,n,i,r){for(var o=[],s=0;s<t.length;s++)this.BLOCK_TAGS.indexOf(t[s].nodeName.toLocaleLowerCase())>-1&&-1===o.indexOf(t[s])?o.push(t[s]):this.BLOCK_TAGS.indexOf(t[s].parentNode.nodeName.toLocaleLowerCase())>-1&&-1===o.indexOf(t[s].parentNode)&&n!==t[s].parentNode&&o.push(t[s].parentNode);o=this.spliceParent(o,t)[0],o=this.removeParent(o),this.unWrap(e,o,i,r)},e.spliceParent=function(e,t){for(var n=0;n<e.length;n++)for(var i=e[n].childNodes.length,r=0;r<i;r++)if(t.indexOf(e[n].childNodes[r])>0&&e[n].childNodes[r].childNodes.length>0&&(t=this.spliceParent([e[n].childNodes[r]],t)[1]),t.indexOf(e[n].childNodes[r])<=-1&&""!==e[n].childNodes[r].textContent.trim()){for(var o=0;o<i;o++)t.indexOf(e[n].childNodes[o])>-1&&t.splice(t.indexOf(e[n].childNodes[o]),1);r=e[n].childNodes.length;var s=e.indexOf(e[n].parentNode),a=t.indexOf(e[n].parentNode);s>-1&&e.splice(s,1),a>-1&&t.splice(a,1);var l=t.indexOf(e[n]);l>-1&&t.splice(l,1),e.splice(n,1),n--}return[e,t]},e.removeChild=function(e,t){var n=t.childNodes.length;if(n>0)for(var i=0;i<n;i++)e.indexOf(t.childNodes[i])>-1&&(e=this.removeChild(e,t.childNodes[i]),e.splice(e.indexOf(t.childNodes[i]),1));return e},e.removeParent=function(e){for(var t=0;t<e.length;t++)e.indexOf(e[t].parentNode)>-1&&(e=this.removeChild(e,e[t]),e.splice(t,1),t--);return e},e.unWrap=function(e,t,n,i){for(var r=0;r<t.length;r++)if(this.NONVALID_TAGS.indexOf(t[r].nodeName.toLowerCase())>-1&&t[r].parentNode&&this.NONVALID_PARENT_TAGS.indexOf(t[r].parentNode.nodeName.toLowerCase())>-1&&(i.setSelectionText(e,t[r],t[r],0,t[r].childNodes.length),a.a.unwrap(n.GetSpliceNode(i.getRange(e),t[r].parentNode))),"p"!==t[r].nodeName.toLocaleLowerCase()){!(this.NONVALID_PARENT_TAGS.indexOf(t[r].nodeName.toLowerCase())<0&&"p"!==t[r].parentNode.nodeName.toLocaleLowerCase())||("blockquote"===t[r].nodeName.toLocaleLowerCase()||"li"===t[r].nodeName.toLocaleLowerCase())&&this.IGNORE_PARENT_TAGS.indexOf(t[r].childNodes[0].nodeName.toLocaleLowerCase())>-1||1===t[r].childNodes.length&&"p"===t[r].childNodes[0].nodeName.toLocaleLowerCase()||a.a.Wrap(t[r],e.createElement(this.defaultTag));var o=a.a.unwrap(t[r]);1===o.length&&"p"===o[0].parentNode.nodeName.toLocaleLowerCase()&&(a.a.Wrap(t[r],e.createElement(this.defaultTag)),a.a.unwrap(t[r]));for(var s=0;s<o.length;s++)if(this.NONVALID_TAGS.indexOf(o[s].nodeName.toLowerCase())>-1)this.unWrap(e,[o[s]],n,i);else if(this.BLOCK_TAGS.indexOf(o[s].nodeName.toLocaleLowerCase())>-1&&"p"!==o[s].nodeName.toLocaleLowerCase()){var l=this.removeParent([o[s]]);this.unWrap(e,l,n,i)}else this.BLOCK_TAGS.indexOf(o[s].nodeName.toLocaleLowerCase())>-1&&o[s].parentNode.nodeName.toLocaleLowerCase()===o[s].nodeName.toLocaleLowerCase()?a.a.unwrap(o[s]):this.BLOCK_TAGS.indexOf(o[s].nodeName.toLocaleLowerCase())>-1&&"p"===o[s].nodeName.toLocaleLowerCase()&&(a.a.Wrap(o[s],e.createElement(this.defaultTag)),a.a.unwrap(o[s]))}else a.a.Wrap(t[r],e.createElement(this.defaultTag)),a.a.unwrap(t[r])},e.clearInlines=function(e,t,n,i,r){for(var o=0;o<e.length;o++){for(var s=e[o],a=void 0;!this.domNode.isBlockNode(s)&&s.parentElement&&!s.parentElement.classList.contains("e-img-inner");)a=s,s=s.parentElement;a&&l.a.inlineTags.indexOf(a.nodeName.toLocaleLowerCase())>-1&&(i.GetSpliceNode(n,a),this.removeInlineParent(a))}},e.removeInlineParent=function(e){for(var t=a.a.unwrap(e),n=0;n<t.length;n++)1===t[n].parentNode.childNodes.length&&!t[n].parentNode.classList.contains("e-img-inner")&&l.a.inlineTags.indexOf(t[n].parentNode.nodeName.toLocaleLowerCase())>-1?this.removeInlineParent(t[n].parentNode):l.a.inlineTags.indexOf(t[n].nodeName.toLocaleLowerCase())>-1&&this.removeInlineParent(t[n])},e.BLOCK_TAGS=["address","article","aside","blockquote","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","li","main","nav","noscript","ol","p","pre","section","ul"],e.NONVALID_PARENT_TAGS=["thead","tbody","ul","ol","table","tfoot","tr"],e.IGNORE_PARENT_TAGS=["ul","ol","table"],e.NONVALID_TAGS=["thead","tbody","figcaption","td","tr","th","tfoot","figcaption","li"],e.defaultTag="p",e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(85);n.d(t,"Toolbar",function(){return i.a}),n.d(t,"KeyboardEvents",function(){return i.b}),n.d(t,"BaseToolbar",function(){return i.c}),n.d(t,"BaseQuickToolbar",function(){return i.d}),n.d(t,"QuickToolbar",function(){return i.e}),n.d(t,"Count",function(){return i.f}),n.d(t,"ColorPickerInput",function(){return i.g}),n.d(t,"MarkdownToolbarStatus",function(){return i.h}),n.d(t,"ExecCommandCallBack",function(){return i.i}),n.d(t,"ToolbarAction",function(){return i.j}),n.d(t,"MarkdownEditor",function(){return i.k}),n.d(t,"HtmlEditor",function(){return i.l}),n.d(t,"PasteCleanup",function(){return i.m}),n.d(t,"Resize",function(){return i.n}),n.d(t,"DropDownButtons",function(){return i.o}),n.d(t,"FileManager",function(){return i.p}),n.d(t,"FullScreen",function(){return i.q}),n.d(t,"setAttributes",function(){return i.r}),n.d(t,"HtmlToolbarStatus",function(){return i.s}),n.d(t,"XhtmlValidation",function(){return i.t}),n.d(t,"FormatPainter",function(){return i.u}),n.d(t,"EmojiPicker",function(){return i.v}),n.d(t,"HTMLFormatter",function(){return i.w}),n.d(t,"Formatter",function(){return i.x}),n.d(t,"MarkdownFormatter",function(){return i.y}),n.d(t,"ContentRender",function(){return i.z}),n.d(t,"Render",function(){return i.A}),n.d(t,"ToolbarRenderer",function(){return i.B}),n.d(t,"Link",function(){return i.C}),n.d(t,"Image",function(){return i.D}),n.d(t,"Audio",function(){return i.E}),n.d(t,"Video",function(){return i.F}),n.d(t,"ViewSource",function(){return i.G}),n.d(t,"Table",function(){return i.H}),n.d(t,"DialogRenderer",function(){return i.I}),n.d(t,"IframeContentRender",function(){return i.J}),n.d(t,"MarkdownRender",function(){return i.K}),n.d(t,"PopupRenderer",function(){return i.L}),n.d(t,"RichTextEditor",function(){return i.M}),n.d(t,"RenderType",function(){return i.N}),n.d(t,"ToolbarType",function(){return i.O}),n.d(t,"DialogType",function(){return i.P}),n.d(t,"executeGroup",function(){return i.Q}),n.d(t,"created",function(){return i.R}),n.d(t,"destroyed",function(){return i.S}),n.d(t,"tableclass",function(){return i.T}),n.d(t,"load",function(){return i.U}),n.d(t,"initialLoad",function(){return i.V}),n.d(t,"contentChanged",function(){return i.W}),n.d(t,"initialEnd",function(){return i.X}),n.d(t,"iframeMouseDown",function(){return i.Y}),n.d(t,"destroy",function(){return i.Z}),n.d(t,"toolbarClick",function(){return i._0}),n.d(t,"toolbarRefresh",function(){return i._1}),n.d(t,"refreshBegin",function(){return i._2}),n.d(t,"toolbarUpdated",function(){return i._3}),n.d(t,"bindOnEnd",function(){return i._4}),n.d(t,"renderColorPicker",function(){return i._5}),n.d(t,"htmlToolbarClick",function(){return i._6}),n.d(t,"markdownToolbarClick",function(){return i._7}),n.d(t,"destroyColorPicker",function(){return i._8}),n.d(t,"modelChanged",function(){return i._9}),n.d(t,"tableModulekeyUp",function(){return i._10}),n.d(t,"keyUp",function(){return i._11}),n.d(t,"keyDown",function(){return i._12}),n.d(t,"mouseUp",function(){return i._13}),n.d(t,"toolbarCreated",function(){return i._14}),n.d(t,"toolbarRenderComplete",function(){return i._15}),n.d(t,"enableFullScreen",function(){return i._16}),n.d(t,"disableFullScreen",function(){return i._17}),n.d(t,"dropDownSelect",function(){return i._18}),n.d(t,"beforeDropDownItemRender",function(){return i._19}),n.d(t,"execCommandCallBack",function(){return i._20}),n.d(t,"imageToolbarAction",function(){return i._21}),n.d(t,"audioToolbarAction",function(){return i._22}),n.d(t,"videoToolbarAction",function(){return i._23}),n.d(t,"linkToolbarAction",function(){return i._24}),n.d(t,"windowResize",function(){return i._25}),n.d(t,"resizeStart",function(){return i._26}),n.d(t,"onResize",function(){return i._27}),n.d(t,"resizeStop",function(){return i._28}),n.d(t,"undo",function(){return i._29}),n.d(t,"redo",function(){return i._30}),n.d(t,"insertLink",function(){return i._31}),n.d(t,"unLink",function(){return i._32}),n.d(t,"editLink",function(){return i._33}),n.d(t,"openLink",function(){return i._34}),n.d(t,"actionBegin",function(){return i._35}),n.d(t,"actionComplete",function(){return i._36}),n.d(t,"updatedToolbarStatus",function(){return i._37}),n.d(t,"actionSuccess",function(){return i._38}),n.d(t,"updateToolbarItem",function(){return i._39}),n.d(t,"insertImage",function(){return i._40}),n.d(t,"insertAudio",function(){return i._41}),n.d(t,"insertVideo",function(){return i._42}),n.d(t,"insertCompleted",function(){return i._43}),n.d(t,"imageLeft",function(){return i._44}),n.d(t,"imageRight",function(){return i._45}),n.d(t,"imageCenter",function(){return i._46}),n.d(t,"imageBreak",function(){return i._47}),n.d(t,"imageInline",function(){return i._48}),n.d(t,"imageLink",function(){return i._49}),n.d(t,"imageAlt",function(){return i._50}),n.d(t,"imageDelete",function(){return i._51}),n.d(t,"audioDelete",function(){return i._52}),n.d(t,"videoDelete",function(){return i._53}),n.d(t,"imageCaption",function(){return i._54}),n.d(t,"imageSize",function(){return i._55}),n.d(t,"videoSize",function(){return i._56}),n.d(t,"sourceCode",function(){return i._57}),n.d(t,"updateSource",function(){return i._58}),n.d(t,"toolbarOpen",function(){return i._59}),n.d(t,"beforeDropDownOpen",function(){return i._60}),n.d(t,"selectionSave",function(){return i._61}),n.d(t,"selectionRestore",function(){return i._62}),n.d(t,"expandPopupClick",function(){return i._63}),n.d(t,"count",function(){return i._64}),n.d(t,"contentFocus",function(){return i._65}),n.d(t,"contentBlur",function(){return i._66}),n.d(t,"mouseDown",function(){return i._67}),n.d(t,"sourceCodeMouseDown",function(){return i._68}),n.d(t,"editAreaClick",function(){return i._69}),n.d(t,"scroll",function(){return i._70}),n.d(t,"contentscroll",function(){return i._71}),n.d(t,"colorPickerChanged",function(){return i._72}),n.d(t,"tableColorPickerChanged",function(){return i._73}),n.d(t,"focusChange",function(){return i._74}),n.d(t,"selectAll",function(){return i._75}),n.d(t,"selectRange",function(){return i._76}),n.d(t,"getSelectedHtml",function(){return i._77}),n.d(t,"renderInlineToolbar",function(){return i._78}),n.d(t,"paste",function(){return i._79}),n.d(t,"imgModule",function(){return i._80}),n.d(t,"rtlMode",function(){return i._81}),n.d(t,"createTable",function(){return i._82}),n.d(t,"docClick",function(){return i._83}),n.d(t,"tableToolbarAction",function(){return i._84}),n.d(t,"checkUndo",function(){return i._85}),n.d(t,"readOnlyMode",function(){return i._86}),n.d(t,"moduleDestroy",function(){return i._87}),n.d(t,"pasteClean",function(){return i._88}),n.d(t,"enterHandler",function(){return i._89}),n.d(t,"beforeDialogOpen",function(){return i._90}),n.d(t,"clearDialogObj",function(){return i._91}),n.d(t,"dialogOpen",function(){return i._92}),n.d(t,"beforeDialogClose",function(){return i._93}),n.d(t,"dialogClose",function(){return i._94}),n.d(t,"beforeQuickToolbarOpen",function(){return i._95}),n.d(t,"quickToolbarOpen",function(){return i._96}),n.d(t,"quickToolbarClose",function(){return i._97}),n.d(t,"popupHide",function(){return i._98}),n.d(t,"imageSelected",function(){return i._99}),n.d(t,"imageUploading",function(){return i._100}),n.d(t,"imageUploadSuccess",function(){return i._101}),n.d(t,"imageUploadFailed",function(){return i._102}),n.d(t,"imageRemoving",function(){return i._103}),n.d(t,"fileSelected",function(){return i._104}),n.d(t,"fileUploading",function(){return i._105}),n.d(t,"fileUploadSuccess",function(){return i._106}),n.d(t,"fileUploadFailed",function(){return i._107}),n.d(t,"fileRemoving",function(){return i._108}),n.d(t,"afterImageDelete",function(){return i._109}),n.d(t,"afterMediaDelete",function(){return i._110}),n.d(t,"drop",function(){return i._111}),n.d(t,"xhtmlValidation",function(){return i._112}),n.d(t,"beforeImageUpload",function(){return i._113}),n.d(t,"beforeFileUpload",function(){return i._114}),n.d(t,"resizeInitialized",function(){return i._115}),n.d(t,"renderFileManager",function(){return i._116}),n.d(t,"beforeImageDrop",function(){return i._117}),n.d(t,"dynamicModule",function(){return i._118}),n.d(t,"beforePasteCleanup",function(){return i._119}),n.d(t,"afterPasteCleanup",function(){return i._120}),n.d(t,"updateTbItemsStatus",function(){return i._121}),n.d(t,"showLinkDialog",function(){return i._122}),n.d(t,"closeLinkDialog",function(){return i._123}),n.d(t,"showImageDialog",function(){return i._124}),n.d(t,"showAudioDialog",function(){return i._125}),n.d(t,"showVideoDialog",function(){return i._126}),n.d(t,"closeImageDialog",function(){return i._127}),n.d(t,"closeAudioDialog",function(){return i._128}),n.d(t,"closeVideoDialog",function(){return i._129}),n.d(t,"showTableDialog",function(){return i._130}),n.d(t,"closeTableDialog",function(){return i._131}),n.d(t,"bindCssClass",function(){return i._132}),n.d(t,"formatPainterClick",function(){return i._133}),n.d(t,"formatPainterDoubleClick",function(){return i._134}),n.d(t,"emojiPicker",function(){return i._135}),n.d(t,"destroyTooltip",function(){return i._136}),n.d(t,"hidePopup",function(){return i._137}),n.d(t,"cleanupResizeElements",function(){return i._138}),n.d(t,"blockEmptyNodes",function(){return i._139}),n.d(t,"inlineEmptyNodes",function(){return i._140}),n.d(t,"CLS_RTE",function(){return i._141}),n.d(t,"CLS_RTL",function(){return i._142}),n.d(t,"CLS_CONTENT",function(){return i._143}),n.d(t,"CLS_DISABLED",function(){return i._144}),n.d(t,"CLS_SCRIPT_SHEET",function(){return i._145}),n.d(t,"CLS_STYLE_SHEET",function(){return i._146}),n.d(t,"CLS_TOOLBAR",function(){return i._147});n.d(t,"CLS_TB_FIXED",function(){return i._148}),n.d(t,"CLS_TB_FLOAT",function(){return i._149}),n.d(t,"CLS_TB_ABS_FLOAT",function(){return i._150}),n.d(t,"CLS_INLINE",function(){return i._151}),n.d(t,"CLS_TB_INLINE",function(){return i._152}),n.d(t,"CLS_RTE_EXPAND_TB",function(){return i._153}),n.d(t,"CLS_FULL_SCREEN",function(){return i._154}),n.d(t,"CLS_QUICK_TB",function(){return i._155}),n.d(t,"CLS_TEXT_QUICK_TB",function(){return i._156}),n.d(t,"CLS_POP",function(){return i._157}),n.d(t,"CLS_TB_STATIC",function(){return i._158}),n.d(t,"CLS_QUICK_POP",function(){return i._159}),n.d(t,"CLS_QUICK_DROPDOWN",function(){return i._160}),n.d(t,"CLS_IMAGE_POP",function(){return i._161}),n.d(t,"CLS_TEXT_POP",function(){return i._162}),n.d(t,"CLS_INLINE_POP",function(){return i._163}),n.d(t,"CLS_INLINE_DROPDOWN",function(){return i._164}),n.d(t,"CLS_DROPDOWN_POPUP",function(){return i._165}),n.d(t,"CLS_DROPDOWN_ICONS",function(){return i._166}),n.d(t,"CLS_DROPDOWN_ITEMS",function(){return i._167}),n.d(t,"CLS_DROPDOWN_BTN",function(){return i._168}),n.d(t,"CLS_RTE_CONTENT",function(){return i._169}),n.d(t,"CLS_TB_ITEM",function(){return i._170}),n.d(t,"CLS_TB_EXTENDED",function(){return i._171}),n.d(t,"CLS_TB_WRAP",function(){return i._172}),n.d(t,"CLS_POPUP",function(){return i._173}),n.d(t,"CLS_SEPARATOR",function(){return i._174}),n.d(t,"CLS_MINIMIZE",function(){return i._175}),n.d(t,"CLS_MAXIMIZE",function(){return i._176}),n.d(t,"CLS_BACK",function(){return i._177}),n.d(t,"CLS_SHOW",function(){return i._178}),n.d(t,"CLS_HIDE",function(){return i._179}),n.d(t,"CLS_VISIBLE",function(){return i._180}),n.d(t,"CLS_FOCUS",function(){return i._181}),n.d(t,"CLS_RM_WHITE_SPACE",function(){return i._182}),n.d(t,"CLS_IMGRIGHT",function(){return i._183}),n.d(t,"CLS_IMGLEFT",function(){return i._184}),n.d(t,"CLS_IMGCENTER",function(){return i._185}),n.d(t,"CLS_IMGBREAK",function(){return i._186}),n.d(t,"CLS_AUDIOBREAK",function(){return i._187}),n.d(t,"CLS_CLICKELEM",function(){return i._188}),n.d(t,"CLS_VID_CLICK_ELEM",function(){return i._189}),n.d(t,"CLS_AUDIOWRAP",function(){return i._190}),n.d(t,"CLS_VIDEOWRAP",function(){return i._191}),n.d(t,"CLS_VIDEOBREAK",function(){return i._192}),n.d(t,"CLS_CAPTION",function(){return i._193}),n.d(t,"CLS_RTE_CAPTION",function(){return i._194}),n.d(t,"CLS_CAPINLINE",function(){return i._195}),n.d(t,"CLS_IMGINLINE",function(){return i._196}),n.d(t,"CLS_AUDIOINLINE",function(){return i._197}),n.d(t,"CLS_VIDEOINLINE",function(){return i._198}),n.d(t,"CLS_COUNT",function(){return i._199}),n.d(t,"CLS_WARNING",function(){return i._200}),n.d(t,"CLS_ERROR",function(){return i._201}),n.d(t,"CLS_ICONS",function(){return i._202}),n.d(t,"CLS_ACTIVE",function(){return i._203}),n.d(t,"CLS_EXPAND_OPEN",function(){return i._204}),n.d(t,"CLS_RTE_ELEMENTS",function(){return i._205}),n.d(t,"CLS_TB_BTN",function(){return i._206}),n.d(t,"CLS_HR_SEPARATOR",function(){return i._207}),n.d(t,"CLS_TB_IOS_FIX",function(){return i._208}),n.d(t,"CLS_LIST_PRIMARY_CONTENT",function(){return i._209}),n.d(t,"CLS_NUMBERFORMATLIST_TB_BTN",function(){return i._210}),n.d(t,"CLS_BULLETFORMATLIST_TB_BTN",function(){return i._211}),n.d(t,"CLS_FORMATS_TB_BTN",function(){return i._212}),n.d(t,"CLS_FONT_NAME_TB_BTN",function(){return i._213}),n.d(t,"CLS_FONT_SIZE_TB_BTN",function(){return i._214}),n.d(t,"CLS_ALIGN_TB_BTN",function(){return i._215}),n.d(t,"CLS_FONT_COLOR_TARGET",function(){return i._216}),n.d(t,"CLS_BACKGROUND_COLOR_TARGET",function(){return i._217}),n.d(t,"CLS_COLOR_CONTENT",function(){return i._218}),n.d(t,"CLS_FONT_COLOR_DROPDOWN",function(){return i._219}),n.d(t,"CLS_BACKGROUND_COLOR_DROPDOWN",function(){return i._220}),n.d(t,"CLS_COLOR_PALETTE",function(){return i._221}),n.d(t,"CLS_FONT_COLOR_PICKER",function(){return i._222}),n.d(t,"CLS_BACKGROUND_COLOR_PICKER",function(){return i._223}),n.d(t,"CLS_RTE_READONLY",function(){return i._224}),n.d(t,"CLS_TABLE_SEL",function(){return i._225}),n.d(t,"CLS_TB_DASH_BOR",function(){return i._226}),n.d(t,"CLS_TB_ALT_BOR",function(){return i._227}),n.d(t,"CLS_TB_COL_RES",function(){return i._228}),n.d(t,"CLS_TB_ROW_RES",function(){return i._229}),n.d(t,"CLS_TB_BOX_RES",function(){return i._230}),n.d(t,"CLS_RTE_HIDDEN",function(){return i._231}),n.d(t,"CLS_RTE_PASTE_KEEP_FORMAT",function(){return i._232}),n.d(t,"CLS_RTE_PASTE_REMOVE_FORMAT",function(){return i._233}),n.d(t,"CLS_RTE_PASTE_PLAIN_FORMAT",function(){return i._234}),n.d(t,"CLS_RTE_PASTE_OK",function(){return i._235}),n.d(t,"CLS_RTE_PASTE_CANCEL",function(){return i._236}),n.d(t,"CLS_RTE_DIALOG_MIN_HEIGHT",function(){return i._237}),n.d(t,"CLS_RTE_RES_HANDLE",function(){return i._238}),n.d(t,"CLS_RTE_RES_EAST",function(){return i._239}),n.d(t,"CLS_RTE_IMAGE",function(){return i._240}),n.d(t,"CLS_RESIZE",function(){return i._241}),n.d(t,"CLS_IMG_FOCUS",function(){return i._242}),n.d(t,"CLS_AUD_FOCUS",function(){return i._243}),n.d(t,"CLS_VID_FOCUS",function(){return i._244}),n.d(t,"CLS_RTE_DRAG_IMAGE",function(){return i._245}),n.d(t,"CLS_RTE_UPLOAD_POPUP",function(){return i._246}),n.d(t,"CLS_POPUP_OPEN",function(){return i._247}),n.d(t,"CLS_IMG_RESIZE",function(){return i._248}),n.d(t,"CLS_DROPAREA",function(){return i._249}),n.d(t,"CLS_IMG_INNER",function(){return i._250}),n.d(t,"CLS_UPLOAD_FILES",function(){return i._251}),n.d(t,"CLS_RTE_DIALOG_UPLOAD",function(){return i._252}),n.d(t,"CLS_RTE_RES_CNT",function(){return i._253}),n.d(t,"CLS_CUSTOM_TILE",function(){return i._254}),n.d(t,"CLS_NOCOLOR_ITEM",function(){return i._255}),n.d(t,"CLS_TABLE",function(){return i._256}),n.d(t,"CLS_TABLE_BORDER",function(){return i._257}),n.d(t,"CLS_RTE_TABLE_RESIZE",function(){return i._258}),n.d(t,"CLS_RTE_FIXED_TB_EXPAND",function(){return i._259}),n.d(t,"CLS_RTE_TB_ENABLED",function(){return i._260}),n.d(t,"CLS_RTE_RES_WEST",function(){return i._261}),n.d(t,"CLS_RTE_SOURCE_CODE_TXTAREA",function(){return i._262}),n.d(t,"getIndex",function(){return i._263}),n.d(t,"hasClass",function(){return i._264}),n.d(t,"getDropDownValue",function(){return i._265}),n.d(t,"isIDevice",function(){return i._266}),n.d(t,"getFormattedFontSize",function(){return i._267}),n.d(t,"pageYOffset",function(){return i._268}),n.d(t,"getTooltipText",function(){return i._269}),n.d(t,"setToolbarStatus",function(){return i._270}),n.d(t,"getCollection",function(){return i._271}),n.d(t,"getTBarItemsIndex",function(){return i._272}),n.d(t,"updateUndoRedoStatus",function(){return i._273}),n.d(t,"dispatchEvent",function(){return i._274}),n.d(t,"parseHtml",function(){return i._275}),n.d(t,"getTextNodesUnder",function(){return i._276}),n.d(t,"toObjectLowerCase",function(){return i._277}),n.d(t,"getEditValue",function(){return i._278}),n.d(t,"updateTextNode",function(){return i._279}),n.d(t,"getDefaultValue",function(){return i._280}),n.d(t,"isEditableValueEmpty",function(){return i._281}),n.d(t,"decode",function(){return i._282}),n.d(t,"sanitizeHelper",function(){return i._283}),n.d(t,"convertToBlob",function(){return i._284}),n.d(t,"getLocaleFontFormat",function(){return i._285}),n.d(t,"updateDropDownFontFormatLocale",function(){return i._286}),n.d(t,"ServiceLocator",function(){return i._287}),n.d(t,"RendererFactory",function(){return i._288});var r=n(83);n.d(t,"EditorManager",function(){return r.a}),n.d(t,"IMAGE",function(){return r.b}),n.d(t,"AUDIO",function(){return r.c}),n.d(t,"VIDEO",function(){return r.d}),n.d(t,"TABLE",function(){return r.e}),n.d(t,"LINK",function(){return r.f}),n.d(t,"INSERT_ROW",function(){return r.g}),n.d(t,"INSERT_COLUMN",function(){return r.h}),n.d(t,"DELETEROW",function(){return r.i}),n.d(t,"DELETECOLUMN",function(){return r.j}),n.d(t,"REMOVETABLE",function(){return r.k}),n.d(t,"TABLEHEADER",function(){return r.l}),n.d(t,"TABLE_VERTICAL_ALIGN",function(){return r.m}),n.d(t,"TABLE_MERGE",function(){return r.n}),n.d(t,"TABLE_VERTICAL_SPLIT",function(){return r.o}),n.d(t,"TABLE_HORIZONTAL_SPLIT",function(){return r.p}),n.d(t,"TABLE_MOVE",function(){return r.q}),n.d(t,"ALIGNMENT_TYPE",function(){return r.r}),n.d(t,"INDENT_TYPE",function(){return r.s}),n.d(t,"DEFAULT_TAG",function(){return r.t}),n.d(t,"BLOCK_TAGS",function(){return r.u}),n.d(t,"IGNORE_BLOCK_TAGS",function(){return r.v}),n.d(t,"TABLE_BLOCK_TAGS",function(){return r.w}),n.d(t,"SELECTION_TYPE",function(){return r.x}),n.d(t,"INSERTHTML_TYPE",function(){return r.y}),n.d(t,"INSERT_TEXT_TYPE",function(){return r.z}),n.d(t,"CLEAR_TYPE",function(){return r.A}),n.d(t,"SELF_CLOSING_TAGS",function(){return r.B}),n.d(t,"CLASS_IMAGE_RIGHT",function(){return r.C}),n.d(t,"CLASS_IMAGE_LEFT",function(){return r.D}),n.d(t,"CLASS_IMAGE_CENTER",function(){return r.E}),n.d(t,"CLASS_VIDEO_RIGHT",function(){return r.F}),n.d(t,"CLASS_VIDEO_LEFT",function(){return r.G}),n.d(t,"CLASS_VIDEO_CENTER",function(){return r.H}),n.d(t,"CLASS_IMAGE_BREAK",function(){return r.I}),n.d(t,"CLASS_AUDIO_BREAK",function(){return r.J}),n.d(t,"CLASS_VIDEO_BREAK",function(){return r.K}),n.d(t,"CLASS_CAPTION",function(){return r.L}),n.d(t,"CLASS_RTE_CAPTION",function(){return r.M}),n.d(t,"CLASS_CAPTION_INLINE",function(){return r.N}),n.d(t,"CLASS_IMAGE_INLINE",function(){return r.O}),n.d(t,"CLASS_AUDIO_INLINE",function(){return r.P}),n.d(t,"CLASS_CLICK_ELEM",function(){return r.Q}),n.d(t,"CLASS_VIDEO_CLICK_ELEM",function(){return r.R}),n.d(t,"CLASS_AUDIO",function(){return r.S}),n.d(t,"CLASS_VIDEO",function(){return r.T}),n.d(t,"CLASS_AUDIO_WRAP",function(){return r.U}),n.d(t,"CLASS_VIDEO_WRAP",function(){return r.V}),n.d(t,"CLASS_EMBED_VIDEO_WRAP",function(){return r.W}),n.d(t,"CLASS_AUDIO_FOCUS",function(){return r.X}),n.d(t,"CLASS_VIDEO_FOCUS",function(){return r.Y}),n.d(t,"CLASS_VIDEO_INLINE",function(){return r.Z}),n.d(t,"Lists",function(){return r._0}),n.d(t,"markerClassName",function(){return r._1}),n.d(t,"DOMNode",function(){return r._2}),n.d(t,"Alignments",function(){return r._3}),n.d(t,"Indents",function(){return r._4}),n.d(t,"Formats",function(){return r._5}),n.d(t,"LinkCommand",function(){return r._6}),n.d(t,"InsertMethods",function(){return r._7}),n.d(t,"InsertTextExec",function(){return r._8}),n.d(t,"InsertHtmlExec",function(){return r._9}),n.d(t,"InsertHtml",function(){return r._10}),n.d(t,"IsFormatted",function(){return r._11}),n.d(t,"MsWordPaste",function(){return r._12}),n.d(t,"NodeCutter",function(){return r._13}),n.d(t,"ImageCommand",function(){return r._14}),n.d(t,"AudioCommand",function(){return r._15}),n.d(t,"VideoCommand",function(){return r._16}),n.d(t,"SelectionCommands",function(){return r._17}),n.d(t,"SelectionBasedExec",function(){return r._18}),n.d(t,"ClearFormatExec",function(){return r._19}),n.d(t,"UndoRedoManager",function(){return r._20}),n.d(t,"TableCommand",function(){return r._21}),n.d(t,"statusCollection",function(){return r._22}),n.d(t,"ToolbarStatus",function(){return r._23}),n.d(t,"FormatPainterActions",function(){return r._24}),n.d(t,"EmojiPickerAction",function(){return r._25});var o=n(11);n.d(t,"NodeSelection",function(){return o.a});var s=n(84);n.d(t,"MarkdownParser",function(){return s.a}),n.d(t,"LISTS_COMMAND",function(){return s.b}),n.d(t,"selectionCommand",function(){return s.c}),n.d(t,"LINK_COMMAND",function(){return s.d}),n.d(t,"CLEAR_COMMAND",function(){return s.e}),n.d(t,"MD_TABLE",function(){return s.f}),n.d(t,"INSERT_TEXT_COMMAND",function(){return s.g}),n.d(t,"ClearFormat",function(){return s.h}),n.d(t,"MDLists",function(){return s.i}),n.d(t,"MDFormats",function(){return s.j}),n.d(t,"MarkdownSelection",function(){return s.k}),n.d(t,"UndoRedoCommands",function(){return s.l}),n.d(t,"MDSelectionFormats",function(){return s.m}),n.d(t,"MDLink",function(){return s.n}),n.d(t,"MDTable",function(){return s.o});var a=n(82);n.d(t,"markdownFormatTags",function(){return a.a}),n.d(t,"markdownSelectionTags",function(){return a.b}),n.d(t,"markdownListsTags",function(){return a.c}),n.d(t,"htmlKeyConfig",function(){return a.d}),n.d(t,"markdownKeyConfig",function(){return a.e}),n.d(t,"pasteCleanupGroupingTags",function(){return a.f}),n.d(t,"listConversionFilters",function(){return a.g}),n.d(t,"selfClosingTags",function(){return a.h}),n.d(t,"KEY_DOWN",function(){return a.i}),n.d(t,"ACTION",function(){return a.j}),n.d(t,"FORMAT_TYPE",function(){return a.k}),n.d(t,"KEY_DOWN_HANDLER",function(){return a.l}),n.d(t,"LIST_TYPE",function(){return a.m}),n.d(t,"KEY_UP_HANDLER",function(){return a.n}),n.d(t,"KEY_UP",function(){return a.o}),n.d(t,"MODEL_CHANGED_PLUGIN",function(){return a.p}),n.d(t,"MODEL_CHANGED",function(){return a.q}),n.d(t,"MS_WORD_CLEANUP_PLUGIN",function(){return a.r}),n.d(t,"MS_WORD_CLEANUP",function(){return a.s}),n.d(t,"ON_BEGIN",function(){return a.t}),n.d(t,"SPACE_ACTION",function(){return a.u}),n.d(t,"FORMAT_PAINTER_ACTIONS",function(){return a.v}),n.d(t,"EMOJI_PICKER_ACTIONS",function(){return a.w})},function(e,t,n){"use strict";var i=n(54);n.d(t,"a",function(){return i.a});var r=n(10);n.d(t,"b",function(){return r.d}),n.d(t,"c",function(){return r.c}),n.d(t,"d",function(){return r.b}),n.d(t,"e",function(){return r.e}),n.d(t,"f",function(){return r.a}),n.d(t,"g",function(){return r.f})},function(e,t,n){"use strict";var i=n(55);n.d(t,"a",function(){return i.a});var r=n(58);n.d(t,"b",function(){return r.a});var o=n(56);n.d(t,"c",function(){return o.a});var s=n(23);n.d(t,"d",function(){return s.a});var a=n(61);n.d(t,"e",function(){return a.a});var l=n(59);n.d(t,"f",function(){return l.a});var d=n(57);n.d(t,"g",function(){return d.a});var c=n(60);n.d(t,"h",function(){return c.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(10),r=function(){function e(e){this.parent=e,this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.f,this.InsertTextExec,this)},e.prototype.InsertTextExec=function(e){var t=this.parent.element;t.focus();var n=t.selectionStart,i=t.selectionEnd,r=e.value.text,o=n+r.length,s=i+r.length;t.value=t.value.substr(0,n)+r+t.value.substr(i,t.value.length),this.parent.markdownSelection.setSelection(t,o,s),this.restore(t,o,s,e)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:i.subCommand,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e}()},function(e,t,n){"use strict";var i=n(103);n.d(t,"a",function(){return i.a});var r=n(28);n.d(t,"b",function(){return r.a});var o=n(24);n.d(t,"c",function(){return o.a});var s=n(62);n.d(t,"d",function(){return s.a});var a=n(101);n.d(t,"e",function(){return a.a});var l=n(93);n.d(t,"f",function(){return l.a});var d=n(26);n.d(t,"g",function(){return d.a});var c=n(67);n.d(t,"h",function(){return c.a});var u=n(63);n.d(t,"i",function(){return u.a});var h=n(68);n.d(t,"j",function(){return h.a});var p=n(99);n.d(t,"k",function(){return p.a});var m=n(98);n.d(t,"l",function(){return m.a});var f=n(100);n.d(t,"m",function(){return f.a});var g=n(102);n.d(t,"n",function(){return g.a});var b=n(27);n.d(t,"o",function(){return b.a});var v=n(96);n.d(t,"p",function(){return v.a});var C=n(64);n.d(t,"q",function(){return C.a});var y=n(65);n.d(t,"r",function(){return y.a});var N=n(66);n.d(t,"s",function(){return N.a});var S=n(69);n.d(t,"t",function(){return S.a});var E=n(97);n.d(t,"u",function(){return E.a});var T=n(94);n.d(t,"v",function(){return T.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(1)),o=n(5),s=n(2),a=function(){function e(e,t){this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener()}return e.prototype.initializeInstance=function(){this.contentRenderer=this.renderFactory.getRenderer(o.a.Content),this.editPanel=this.contentRenderer.getEditPanel(),this.addEventListener()},e.prototype.renderCount=function(){this.initializeInstance(),this.element=this.parent.createElement("span",{className:s._6}),this.contentRenderer.getPanel().parentElement.appendChild(this.element),this.appendCount(),-1!==this.parent.maxLength&&this.charCountBackground(this.htmlLength)},e.prototype.appendCount=function(){var e="Markdown"===this.parent.editorMode?this.editPanel.value:this.editPanel.textContent;"Markdown"!==this.parent.editorMode&&-1!==e.indexOf("")?this.htmlLength=e.replace(/\u200B/g,"").length:this.htmlLength=e.length;var t=-1===this.parent.maxLength?this.htmlLength:this.htmlLength+" / "+this.parent.maxLength;this.element.innerHTML=t},e.prototype.charCountBackground=function(e){var t=e/this.parent.maxLength*100;t<85?(this.element.classList.remove(s._7),this.element.classList.remove(s._8)):t>85&&t<=90?(this.element.classList.remove(s._8),this.element.classList.add(s._7)):t>90&&(this.element.classList.remove(s._7),this.element.classList.add(s._8))},e.prototype.refresh=function(){n.i(i.isNullOrUndefined)(this.editPanel)||(this.appendCount(),-1!==this.parent.maxLength&&this.charCountBackground(this.htmlLength))},e.prototype.destroy=function(){this.element&&!n.i(i.isNullOrUndefined)(this.parent.element.querySelector("."+s._6))&&n.i(i.detach)(this.element),this.removeEventListener()},e.prototype.toggle=function(e){this.element.style.display="viewSource"===e.member?"none":"block"},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.g,this.renderCount,this),this.parent.on(r.u,this.refresh,this),this.parent.on(r._21,this.refresh,this),this.parent.on(r.l,this.refresh,this),this.parent.on(r._24,this.refresh,this),this.parent.on(r.i,this.destroy,this),this.parent.on(r._14,this.toggle,this),this.parent.on(r._15,this.toggle,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.g,this.renderCount),this.parent.off(r.u,this.refresh),this.parent.off(r.l,this.refresh),this.parent.off(r._21,this.refresh),this.parent.off(r._24,this.refresh),this.parent.off(r.i,this.destroy),this.parent.off(r._14,this.toggle),this.parent.off(r._15,this.toggle))},e.prototype.getModuleName=function(){return"count"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(1),r=n(0),o=(n.n(r),n(9)),s=(n.n(o),n(81)),a=(n.n(s),n(24)),l=n(14),d=(n.n(l),function(){function e(e,t){this.parent=e,this.locator=t,this.i10n=t.getService("rteLocale"),this.renderFactory=this.locator.getService("rendererFactory"),this.baseToolbar=new a.a(this.parent,this.locator),this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener()},e.prototype.addEventListener=function(){this.parent.on(i._92,this.toolbarClick,this),this.parent.on(i._40,this.docClick,this),this.parent.on(i.v,this.onkeyPress,this),this.parent.on(i.u,this.onkeyUp,this),this.parent.on(i._28,this.contentscroll,this),this.parent.on(i._27,this.contentscroll,this)},e.prototype.toolbarClick=function(e){var t,a,d,c=this;n.i(r.isNullOrUndefined)(this.parent.element.querySelector(".e-emoji"))?this.parent.inlineMode.enable&&(d=this.parent.element.ownerDocument.querySelector(".e-emoji")):d=this.parent.element.querySelector(".e-emoji"),this.divElement=d.closest("div"),this.parent.inputElement.contains(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).startContainer)||this.parent.contentModule.getEditPanel().focus();var u=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());this.save=this.parent.formatter.editorManager.nodeSelection.save(u,this.parent.contentModule.getDocument()),this.clickEvent=e.args;var h=this.parent.emojiPickerSettings.iconsSet;if(this.popupObj){if(n.i(r.removeClass)([this.divElement],"e-active"),this.popupObj.element.querySelector(".e-rte-emoji-search")||!this.parent.emojiPickerSettings.showSearchBox)return void this.popupObj.hide();this.popupObj.hide()}this.popDiv=this.parent.createElement("div",{className:"e-rte-emojipicker-popup",id:this.parent.getID()+"_emojiPicker"}),n.i(r.isNullOrUndefined)(this.parent.getToolbar())||this.parent.inlineMode.enable?this.parent.inlineMode.enable&&this.parent.inputElement.appendChild(this.popDiv):this.parent.getToolbar().appendChild(this.popDiv),r.EventHandler.add(this.popDiv,"keydown",this.onKeyDown,this),r.EventHandler.add(this.popDiv,"keyup",this.searchFilter,this);var p,m=this.parent.element.querySelector(".e-toolbar-extended");if(n.i(r.isNullOrUndefined)(m))p="10001";else{p=window.getComputedStyle(m).getPropertyValue("z-index")}var f,g,b;if(n.i(r.isNullOrUndefined)(e.args)||this.parent.inlineMode.enable||!n.i(r.isNullOrUndefined)(this.parent.quickToolbarSettings.text))if(n.i(r.isNullOrUndefined)(e.x)&&n.i(r.isNullOrUndefined)(e.y)&&!this.parent.inlineMode.enable&&n.i(r.isNullOrUndefined)(this.parent.quickToolbarSettings.text)){if(f=this.parent.inputElement,this.parent.contentModule.getDocument().getSelection().rangeCount>0){var v=this.getCoordinates();g=v.left,b=v.top}}else if(n.i(r.isNullOrUndefined)(e.x)&&n.i(r.isNullOrUndefined)(e.y)&&(this.parent.inlineMode.enable||!n.i(r.isNullOrUndefined)(this.parent.quickToolbarSettings.text))){if(this.parent.notify(i._94,{}),this.parent.contentModule.getDocument().getSelection().rangeCount>0){var v=this.getCoordinates();g=v.left,b=v.top}}else f=this.parent.inputElement,g=e.x,b=e.y;else f=e.args.originalEvent.target,f=f.classList.contains("e-toolbar-item")?f.firstChild:f.parentElement,g="left",b="bottom";if(this.popupObj=new o.Popup(this.popDiv,{targetType:"relative",relateTo:f,collision:{X:"fit",Y:"none"},offsetY:8,viewPortElement:this.parent.element,position:{X:g,Y:b},enableRtl:this.parent.enableRtl,zIndex:parseInt(p,10)+1,actionOnScroll:"hide",close:function(e){c.parent.isBlur=!1,c.popupObj.destroy(),n.i(r.detach)(c.popupObj.element),c.popupObj=null}}),n.i(r.addClass)([this.popupObj.element],"e-popup-open"),this.popupObj.refreshPosition(f),(!n.i(r.isNullOrUndefined)(e.args)||n.i(r.isNullOrUndefined)(e.x)&&n.i(r.isNullOrUndefined)(e.y))&&this.parent.emojiPickerSettings.showSearchBox){var C=n.i(r.createElement)("input",{id:"e-rte-emoji-search",className:"e-rte-emoji-search"});this.popDiv.append(C);new l.TextBox({placeholder:this.i10n.getConstant("emojiPickerTypeToFind"),showClearButton:!0}).appendTo(C),C.focus()}var y=this.popupObj.element.querySelector(".e-clear-icon");n.i(r.isNullOrUndefined)(y)||r.EventHandler.add(y,"mousedown",this.searchFilter,this);var N=this.parent.createElement("div",{className:"e-rte-emojipicker-toolbar"});this.popDiv.appendChild(N);for(var S=[],E=0;E<this.parent.emojiPickerSettings.iconsSet.length;E++)n.i(r.isNullOrUndefined)(this.parent.emojiPickerSettings.iconsSet[E].iconCss)?S.push({text:"&#x"+this.parent.emojiPickerSettings.iconsSet[E].code+";",htmlAttributes:(a={},a.title=this.parent.emojiPickerSettings.iconsSet[E].name,a)}):S.push({prefixIcon:this.parent.emojiPickerSettings.iconsSet[E].iconCss,htmlAttributes:(t={},t.title=this.parent.emojiPickerSettings.iconsSet[E].name,t)});new s.Toolbar({items:S,clicked:this.emojiToolbarClick.bind(this)}).appendTo(N);var T=this.parent.createElement("div",{className:"e-rte-emojipicker-btn"});this.popDiv.appendChild(T);var O,w=window.getComputedStyle(this.popDiv);if((!n.i(r.isNullOrUndefined)(e.args)||n.i(r.isNullOrUndefined)(e.x)&&n.i(r.isNullOrUndefined)(e.y))&&this.parent.emojiPickerSettings.showSearchBox){var k=this.parent.element.querySelector(".e-rte-emoji-search").parentElement,L=window.getComputedStyle(k);O=this.popDiv.getBoundingClientRect().height-N.getBoundingClientRect().height-k.getBoundingClientRect().height-parseFloat(L.marginTop)-parseFloat(L.marginBottom)-2*parseFloat(w.borderWidth)+"px",T.style.setProperty("height",O,"important")}else O=this.popDiv.getBoundingClientRect().height-N.getBoundingClientRect().height-2*parseFloat(w.borderWidth)+"px",T.style.setProperty("height",O,"important");for(var E=0;E<h.length;E++){var _=this.parent.createElement("div",{className:"e-rte-emojipicker-group"});T.appendChild(_);var x=this.parent.createElement("div",{className:"e-rte-emojipicker-name"});x.innerText=this.parent.emojiPickerSettings.iconsSet[E].name,x.setAttribute("aria-label",this.parent.emojiPickerSettings.iconsSet[E].name),_.appendChild(x);var D=this.parent.createElement("div",{className:"e-rte-emojipickerbtn-group"});_.appendChild(D);for(var M=0;M<h[E].icons.length;M++){var R=this.parent.createElement("button",{className:"e-btn e-control"});R.innerHTML=this.buttoncode(this.parent.emojiPickerSettings.iconsSet[E].icons[M].code),R.setAttribute("aria-label",this.parent.emojiPickerSettings.iconsSet[E].icons[M].desc),R.setAttribute("title",this.parent.emojiPickerSettings.iconsSet[E].icons[M].desc),D.appendChild(R),R.innerHTML.length>2&&(R.style.fontSize="17px")}}r.EventHandler.add(T,"scroll",this.scrollEvent,this),r.EventHandler.add(T,"click",this.emojiBtnClick,this);var B=this.parent.element.querySelectorAll(".e-rte-emojipicker-btn button");n.i(r.isNullOrUndefined)(this.parent.element.querySelector(".e-rte-emoji-search"))&&!n.i(r.isNullOrUndefined)(e.args)&&(B[0].focus(),n.i(r.addClass)([B[0]],"e-focus"));var A,I=this.parent.element.querySelector(".e-rte-emojipicker-btn"),P=this.parent.element.querySelectorAll(".e-rte-emojipicker-toolbar button");n.i(r.isNullOrUndefined)(I)||(A=Math.round(I.scrollTop)),A<P[0].offsetHeight&&n.i(r.addClass)([P[0]],"e-selected"),this.popupObj&&n.i(r.addClass)([this.divElement],"e-active")},e.prototype.buttoncode=function(e){return e.split("-").map(function(e){return String.fromCodePoint(parseInt(e,16))}).join("")},e.prototype.docClick=function(e){var t=e.args.target;t&&t.classList&&this.popupObj&&!n.i(r.closest)(t,"[id='"+this.popupObj.element.id+"']")&&!t.classList.contains("e-emoji")&&!t.classList.contains("e-toolbar-item")&&this.popupObj&&(n.i(r.removeClass)([this.divElement],"e-active"),this.popupObj.hide())},e.prototype.scrollEvent=function(){var e,t=this.parent.element.querySelector(".e-rte-emojipicker-btn"),i=this.parent.element.querySelectorAll(".e-rte-emojipicker-group"),o=this.parent.element.querySelectorAll(".e-rte-emojipicker-toolbar button");n.i(r.isNullOrUndefined)(t)||(e=Math.round(t.scrollTop));for(var s=0,a=0;a<o.length;a++)e<o[0].offsetHeight&&(n.i(r.isNullOrUndefined)(o[a+1])||n.i(r.removeClass)([o[a+1]],"e-selected"),n.i(r.addClass)([o[0]],"e-selected"));for(var l=0;l<i.length;l++)if(s+=Math.round(i[l].offsetHeight),e>=s){for(var d=0;d<o.length;d++)o[d].classList.contains("e-selected")&&n.i(r.removeClass)([o[d]],"e-selected");n.i(r.isNullOrUndefined)(o[l+1])||n.i(r.addClass)([o[l+1]],"e-selected")}},e.prototype.contentscroll=function(){if(n.i(r.isNullOrUndefined)(this.clickEvent)&&this.popupObj)return n.i(r.removeClass)([this.divElement],"e-active"),void this.popupObj.hide()},e.prototype.emojiToolbarClick=function(e){for(var t={text:e.item.htmlAttributes.title},i=t.text,o=this.parent.element.querySelectorAll(".e-rte-emojipicker-group"),s=this.parent.element.querySelectorAll(".e-rte-emojipicker-btn button"),a=this.parent.element.querySelectorAll(".e-rte-emojipicker-toolbar button"),l=0;l<a.length;l++)a[l].classList.contains("e-selected")&&n.i(r.removeClass)([a[l]],"e-selected");for(var l=0;l<s.length;l++)s[l].classList.contains("e-focus")&&n.i(r.removeClass)([s[l]],"e-focus");var d=this.parent.element.querySelector(".e-rte-emojipicker-btn"),c=0;o.forEach(function(e){var t=e.childNodes[0],o=e.childNodes[1].childNodes[0],s=t.getAttribute("aria-label");i===s?t&&(d.scrollTop=c+10,n.i(r.addClass)([o],"e-focus"),o.focus()):(c+=e.scrollHeight,n.i(r.removeClass)([o],"e-focus"))})},e.prototype.onKeyDown=function(e){var t=this.parent.element.querySelectorAll(".e-rte-emojipicker-btn button"),i=this.parent.element.querySelectorAll(".e-rte-emojipickerbtn-group"),o=this.parent.element.querySelector(".e-rte-emojisearch-btn button");if(27===e.keyCode&&this.popupObj&&(n.i(r.removeClass)([this.divElement],"e-active"),this.popupObj.hide()),13===e.keyCode){document.activeElement.classList.contains("e-btn")&&(this.emojiBtnClick(e),e.preventDefault())}var s=e.srcElement;if(!n.i(r.isNullOrUndefined)(s)&&s.classList.contains("e-rte-emoji-search")&&40===e.keyCode)for(var a=0;a<t.length;a++)t[a].classList.contains("e-focus")&&n.i(r.removeClass)([t[a]],"e-focus");if(n.i(r.isNullOrUndefined)(o))for(var a=0;a<t.length;a++){var l=a;if(t[a].classList.contains("e-focus"))if(40===e.keyCode){if(t.length-4>a){for(var d=0,c=0;c<i.length;c++)for(var u=0;u<i[c].childNodes.length;u++){var h=i[c].childNodes[u];if(h.classList.contains("e-focus")&&1!==d){var p=u,m=i[c].lastChild,f=Math.floor(u%6),g=i[c].childNodes.length-1,b=Math.floor(g%6);if(-1!==p){var v=p+6;if(n.i(r.isNullOrUndefined)(i[c].childNodes[v])){if(n.i(r.isNullOrUndefined)(i[c].childNodes[v])&&!m.classList.contains("e-focus")&&b<f){var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=i[c].lastChild;n.i(r.addClass)([y],"e-focus"),y.focus(),d=1;break}var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=i[c+1].childNodes[f];n.i(r.addClass)([y],"e-focus"),y.focus(),d=1;break}var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=t[l+=6];n.i(r.addClass)([y],"e-focus"),y.focus();break}}}break}}else{if(38===e.keyCode){if(a>=6)for(var d=0,c=0;c<i.length;c++)for(var u=0;u<i[c].childNodes.length;u++){var h=i[c].childNodes[u];if(h.classList.contains("e-focus")&&1!==d){var p=u,N=n.i(r.isNullOrUndefined)(i[c-1])?null:i[c-1].childNodes.length%6||6;if(-1!==p){var S=p-6;if(n.i(r.isNullOrUndefined)(i[c].childNodes[S])){if(n.i(r.isNullOrUndefined)(i[c-1].childNodes[i[c-1].childNodes.length-(N-u)])){var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=i[c-1].lastChild;n.i(r.addClass)([y],"e-focus"),y.focus(),d=1;break}var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=i[c-1].childNodes[i[c-1].childNodes.length-(N-u)];n.i(r.addClass)([y],"e-focus"),y.focus(),d=1;break}var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=t[l-=6];n.i(r.addClass)([y],"e-focus"),y.focus();break}}}else{var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=t[l-=1],E=this.popupObj.element.querySelector(".e-rte-emoji-search");if(n.i(r.isNullOrUndefined)(y)&&!n.i(r.isNullOrUndefined)(E)){E.focus();break}n.i(r.addClass)([y],"e-focus"),y.focus()}break}if(39===e.keyCode){if(t.length!==a+1){var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=t[l+=1];n.i(r.addClass)([y],"e-focus"),t[l].focus()}break}if(37===e.keyCode){if(a>0){var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=t[l-=1];n.i(r.addClass)([y],"e-focus"),t[l].focus()}break}}}else this.filterKeyHandler(e);if(40===e.keyCode){var C=this.parent.element.querySelector(".e-focus");if(n.i(r.isNullOrUndefined)(C)){var y=t[0];n.i(r.addClass)([y],"e-focus"),t[0].focus()}}},e.prototype.filterKeyHandler=function(e){var t=this.parent.element.querySelectorAll(".e-rte-emojisearch-btn button"),i=this.parent.element.querySelector(".e-focus");if(n.i(r.isNullOrUndefined)(i)&&40===e.keyCode){var o=t[0];n.i(r.addClass)([o],"e-focus"),t[0].focus()}else for(var s=0;s<t.length;s++){var a=s,l=t[s];if(l.classList.contains("e-focus"))if(38===e.keyCode){if(s>=6){var d=t[s];n.i(r.removeClass)([d],"e-focus");var o=t[a-=6];n.i(r.addClass)([o],"e-focus"),o.focus();break}var c=t[s];n.i(r.removeClass)([c],"e-focus");var o=t[a-=1],u=this.popupObj.element.querySelector(".e-rte-emoji-search");if(n.i(r.isNullOrUndefined)(o)&&!n.i(r.isNullOrUndefined)(u)){u.focus();break}n.i(r.addClass)([o],"e-focus"),o.focus()}else if(40===e.keyCode){if(t.length-6>s){var h=t[s];n.i(r.removeClass)([h],"e-focus");var o=t[a+=6];n.i(r.addClass)([o],"e-focus"),o.focus();break}}else{if(39===e.keyCode){if(t.length!==s+1){var p=t[s];n.i(r.removeClass)([p],"e-focus");var o=t[a+=1];n.i(r.addClass)([o],"e-focus"),t[a].focus()}break}if(37===e.keyCode&&s>0){var m=t[s];n.i(r.removeClass)([m],"e-focus");var o=t[a-=1];n.i(r.addClass)([o],"e-focus"),t[a].focus();break}}}},e.prototype.searchFilter=function(e,t){var i=this.parent.element.querySelector(".e-rte-emoji-search"),o=this.parent.element.querySelector(".e-content");if(document.activeElement===i||document.activeElement===o){var s=void 0;":"===t||n.i(r.isNullOrUndefined)(t)?n.i(r.isNullOrUndefined)(t)||(s=t):s=t.replace(/^:/,"");var a=n.i(r.isNullOrUndefined)(i)?s:i.value,l=this.parent.element.querySelectorAll(".e-rte-emojipicker-btn button"),d=this.parent.element.querySelector(".e-rte-emojipicker-btn"),c=this.parent.element.querySelectorAll(".e-rte-emojipicker-group"),u=this.parent.element.querySelector(".e-rte-emojipicker-toolbar"),h=this.parent.element.querySelector(".e-rte-emojisearch-btn"),p=this.popDiv.childNodes[0],m=window.getComputedStyle(p),f="SPAN"===p.nodeName?p.getBoundingClientRect().height+parseFloat(m.marginTop)+parseFloat(m.marginBottom):0,g=window.getComputedStyle(this.popDiv),b=n.i(r.isNullOrUndefined)(h)?l:Array.from(l).filter(function(e){return!h.contains(e)});""===a||":"===t?(u.style.display="",d.style.height=this.popDiv.getBoundingClientRect().height-u.getBoundingClientRect().height-f-2*parseFloat(g.borderWidth)+"px",c.forEach(function(e){e.style.display=""})):(c.forEach(function(e){e.style.display="none"}),u.style.display="none",d.style.height=this.popDiv.getBoundingClientRect().height-f-2*parseFloat(g.borderWidth)+"px");var v=this.parent.createElement("div",{className:"e-rte-emojisearch-btn"}),C=this.parent.element.querySelector(".e-rte-emojisearch-btn");C&&C.remove();for(var y=this.parent.createElement("div",{className:"e-rte-emojiSearch-noEmoji"}),N=!0,S=0;S<b.length;S++)if(!n.i(r.isNullOrUndefined)(b[S].getAttribute("title")))for(var E=b[S].getAttribute("title").toLowerCase(),T=E.split(" "),O=0;O<T.length;O++)if(T[O].startsWith(a.toLowerCase())&&""!==a){var w=b[S].cloneNode(!0);v.appendChild(w),N=!1;break}N&&!this.parent.element.querySelector(".e-rte-emojiSearch-noEmoji")&&""!==a&&":"!==t?(y.innerHTML='<span style="color: rgba(0, 0, 0, 0.75); font-weight: 500; font-size: 16px;">'+this.i10n.getConstant("emojiPickerNoResultFound")+' 😥 </span><br><span style="color: rgba(0, 0, 0, 0.75);"> '+this.i10n.getConstant("emojiPickerTrySomethingElse")+" ? </span>",y.style.margin="55px",d.appendChild(y)):(!N&&this.parent.element.querySelector(".e-rte-emojiSearch-noEmoji")||""===a&&":"===t)&&d.removeChild(this.parent.element.querySelector(".e-rte-emojiSearch-noEmoji")),d.appendChild(v)}},e.prototype.emojiBtnClick=function(e){for(var t=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0}),i=this.parent.element.querySelectorAll(".e-rte-emojipicker-popup [data-tooltip-id]"),o=0;o<i.length;o++)i[o].dispatchEvent(t);var s=e.target;if("BUTTON"===s.tagName){s.focus();var a=this.save.startOffset,l=this.save.range.startContainer.textContent,d=l.substring(a,a+1);n.i(r.isNullOrUndefined)(this.clickEvent)&&":"===d||this.save.restore(),this.popupObj&&(n.i(r.removeClass)([this.divElement],"e-active"),this.popupObj.hide());var c=e;this.parent.formatter.process(this.parent,{item:{command:"EmojiPicker",subCommand:"EmojiPicker",value:s.innerHTML}},e,c)}},e.prototype.onkeyPress=function(e){var t=e.args,o=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().contentWindow.getSelection():this.parent.contentModule.getDocument().getSelection();if(!(o.rangeCount<=0)){var s=o.getRangeAt(0),a=s.startOffset,l=o.focusNode.textContent.substring(a-1,a),d=/\s/.test(l),c=":"===o.focusNode.textContent.substring(a-1,a),u=":"===o.focusNode.textContent.charAt(a-1);if(186===t.keyCode&&t.shiftKey&&(d||0===o.focusOffset)){var h=this.getCoordinates();this.parent.showEmojiPicker(h.left,h.top)}if(8===t.keyCode&&u&&this.popupObj&&(n.i(r.removeClass)([this.divElement],"e-active"),this.popupObj.hide()),32===t.keyCode&&c&&this.popupObj){n.i(r.removeClass)([this.divElement],"e-active");var p=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().ownerDocument:this.parent.contentModule.getDocument();this.parent.showTooltip&&!n.i(r.isNullOrUndefined)(p.querySelector(".e-tooltip-wrap"))&&this.parent.notify(i._93,{args:event}),this.popupObj.hide()}!this.popupObj||37!==t.keyCode&&38!==t.keyCode&&39!==t.keyCode&&27!==t.keyCode&&40!==t.keyCode||(this.onKeyDown(t),t.preventDefault())}},e.prototype.onkeyUp=function(e){var t=e.args,i=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().contentWindow.getSelection():this.parent.contentModule.getDocument().getSelection();if(!(i.rangeCount<=0)){for(var o,s=i.getRangeAt(0),a=s.startOffset,l=0,d=a-1;d>=a-15;d--){/:$/.test(i.focusNode.textContent.substring(d-1,d))&&!n.i(r.isNullOrUndefined)(this.popDiv)&&0===l&&(o=s.startContainer.textContent.substring(d-1,a),this.searchFilter(t,o),l=1)}var c=i.focusNode.textContent.substring(a-1,a);":"!==c||n.i(r.isNullOrUndefined)(this.popupObj)||(o=c,this.searchFilter(t,o))}},e.prototype.getCoordinates=function(){var e,t,i=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().contentWindow.getSelection():window.getSelection(),o=i.getRangeAt(0);"P"!==o.startContainer.nodeName&&"DIV"!==o.startContainer.nodeName||"#text"!==o.startContainer.childNodes[0].nodeName&&(t=o.startContainer.childNodes[0]);var s=n.i(r.isNullOrUndefined)(t)?o.getBoundingClientRect():t.getBoundingClientRect(),a=this.parent.element.querySelector(".e-rte-content"),l=this.parent.element,d=l.offsetHeight-a.offsetHeight,c=s.top-this.parent.inputElement.getBoundingClientRect().top,u=s.left-this.parent.inputElement.getBoundingClientRect().left,h=window.innerHeight,p=c,m=u+s.width;return l.getBoundingClientRect().top<0&&(p=p+a.getBoundingClientRect().top-d),s.top<330?p=p:s.top+330>h&&(p-=350),this.parent.inputElement&&(e={top:p+60,left:m+8}),e},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i._92,this.toolbarClick),this.parent.off(i._40,this.docClick),this.parent.off(i.v,this.onkeyPress),this.parent.off(i.u,this.onkeyUp),this.parent.off(i._28,this.contentscroll),this.parent.off(i._27,this.contentscroll))},e.prototype.getModuleName=function(){return"emojiPicker"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(0),r=(n.n(i),n(1)),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(r._46,this.enterHandler,this),this.parent.on(r.i,this.destroy,this),this.parent.on(r._44,this.moduleDestroy,this)},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.removeEventListener=function(){this.parent.off(r._46,this.enterHandler),this.parent.off(r.i,this.destroy),this.parent.off(r._44,this.moduleDestroy)},e.prototype.getRangeNode=function(){this.range=this.parent.getRange(),this.startNode="#text"===this.range.startContainer.nodeName?this.range.startContainer.parentElement:this.range.startContainer,this.endNode="#text"===this.range.endContainer.nodeName?this.range.endContainer.parentElement:this.range.endContainer},e.prototype.enterHandler=function(e){var t=this;this.getRangeNode();var o=!0;if(this.formatTags=["h1","h2","h3","h4","h5","h6","blockquote"],!n.i(i.isNullOrUndefined)(this.startNode.closest("TABLE"))&&!n.i(i.isNullOrUndefined)(this.endNode.closest("TABLE"))){o=!1;for(var s=this.startNode,a=s;!this.parent.formatter.editorManager.domNode.isBlockNode(s);)s=s.parentElement,a=s;o="TD"!==a.tagName&&"TBODY"!==a.tagName}if(13===e.args.which&&!e.args.ctrlKey&&(i.Browser.isDevice?"Enter"===e.args.key:"Enter"===e.args.code)&&n.i(i.isNullOrUndefined)(this.startNode.closest("LI, UL, OL"))&&n.i(i.isNullOrUndefined)(this.endNode.closest("LI, UL, OL"))&&o&&n.i(i.isNullOrUndefined)(this.startNode.closest("PRE"))&&n.i(i.isNullOrUndefined)(this.endNode.closest("PRE"))){var l=e.args.shiftKey,d={cancel:!1,name:r.S,requestType:l?"ShiftEnterAction":"EnterAction",originalEvent:e.args};this.parent.trigger(r.S,d,function(s){if(!s.cancel){if(t.range.startOffset!==t.range.endOffset||t.range.startContainer!==t.range.endContainer)if("SPAN"===t.range.startContainer.nodeName&&(t.range.startContainer.classList.contains("e-video-wrap")||t.range.startContainer.classList.contains("e-audio-wrap"))||t.range.deleteContents(),"#text"===t.range.startContainer.nodeName&&0===t.range.startContainer.textContent.length&&t.range.startContainer.parentElement!==t.parent.inputElement)"BR"===t.parent.enterKey?t.range.startContainer.parentElement.innerHTML="​":t.range.startContainer.parentElement.innerHTML="<br>";else if(t.range.startContainer===t.parent.inputElement&&""===t.range.startContainer.innerHTML){t.range.startContainer.innerHTML="<br>";var a=t.range.startContainer.childNodes[t.range.startOffset];t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),a,0)}else if(t.parent.inputElement===t.range.startContainer){var a=t.range.startContainer.childNodes[t.range.startOffset];if("#text"===a.nodeName&&0===a.textContent.length)t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),a,0===a.textContent.length?0:a.previousSibling.textContent.length);else if(t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),a,a.textContent.length>=0?0:1),0===a.previousSibling.textContent.length){if(n.i(i.detach)(a.previousSibling),!l){for(var d=n.i(i.isNullOrUndefined)(a.lastChild)?a:a.lastChild;!n.i(i.isNullOrUndefined)(d)&&"#text"!==d.nodeName&&"BR"!==d.nodeName;)d=d.lastChild;"BR"!==d.nodeName&&0===d.parentElement.textContent.length&&0===d.parentElement.innerHTML.length&&"BR"!==d.parentElement.nodeName&&d.parentElement.appendChild(t.parent.createElement("BR")),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),"BR"===d.nodeName?d:d.parentElement,d.parentElement.textContent.length>=0||"BR"===d.nodeName?0:1)}}else if(0===a.textContent.length){for(var d="#text"===a.previousSibling.nodeName?a.previousSibling:a.previousSibling.lastChild;!n.i(i.isNullOrUndefined)(d)&&"#text"!==d.nodeName;)d=d.lastChild;t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),d,d.textContent.length),n.i(i.detach)(a)}else if("BR"!==t.parent.enterKey&&0!==a.previousSibling.textContent.length&&0!==a.textContent.length)return void e.args.preventDefault();t.getRangeNode()}if(t.range.startContainer===t.range.endContainer&&t.range.startOffset===t.range.endOffset&&t.range.startContainer===t.parent.inputElement){if(1!==t.parent.inputElement.childNodes.length||"TABLE"!==t.parent.inputElement.childNodes[0].nodeName)if(n.i(i.isNullOrUndefined)(t.range.startContainer.childNodes[t.range.startOffset])){for(var c=t.range.startContainer.childNodes[t.range.startOffset-1];null!==c.lastChild&&"#text"!==c.nodeName;)c=c.lastChild;t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),c,"BR"===c.nodeName?0:c.textContent.length)}else t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),t.range.startContainer.childNodes[t.range.startOffset],0);t.getRangeNode()}if("P"===t.parent.enterKey&&!l||"DIV"===t.parent.enterKey&&!l||"P"===t.parent.shiftEnterKey&&l||"DIV"===t.parent.shiftEnterKey&&l){if(1===t.range.startOffset&&1===t.parent.inputElement.childNodes.length&&"TABLE"===t.parent.inputElement.childNodes[0].nodeName){var u=t.createInsertElement(l);u.appendChild(t.parent.createElement("BR")),t.parent.inputElement.appendChild(u),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),u,0)}else{var h=void 0;h=o&&t.parent.formatter.editorManager.domNode.isBlockNode(t.startNode)?t.startNode:t.parent.formatter.editorManager.domNode.blockParentNode(t.startNode);var p=!1,m=!1;if(0===t.range.startOffset||0===t.range.endOffset||t.range.startContainer!==t.range.endContainer||!n.i(i.isNullOrUndefined)(h.childNodes[0])&&("IMG"===h.childNodes[0].nodeName||h.querySelectorAll("img, audio, video").length>0))0===t.range.startOffset&&0===t.range.endOffset&&(m=!0);else{var f=t.range.startContainer.textContent,g=f.substring(0,t.range.startOffset);160!==g.charCodeAt(t.range.startOffset-1)&&0===g.trim().length&&(m=!0)}t.removeBRElement(h);if(!(-1!==i.Browser.userAgent.indexOf("Firefox")&&0===t.range.startOffset&&t.range.startContainer===t.range.endContainer&&"#text"===t.range.startContainer.nodeName&&!t.parent.formatter.editorManager.domNode.isBlockNode(t.range.startContainer.previousSibling)&&t.range.startContainer.parentElement===t.range.startContainer.previousSibling.parentElement)&&(0===t.range.startOffset&&0===t.range.endOffset||m)&&(n.i(i.isNullOrUndefined)(t.range.startContainer.previousSibling)||"IMG"!==t.range.startContainer.previousSibling.nodeName&&"BR"!==t.range.startContainer.previousSibling.nodeName)){var b=void 0,u=void 0;n.i(i.isNullOrUndefined)(t.range.startContainer.childNodes)||0!==t.range.startContainer.textContent.length&&("#text"===t.range.startContainer.nodeName||n.i(i.isNullOrUndefined)(t.range.startContainer.querySelector(".e-video-clickelem"))||0!==t.range.startContainer.querySelector(".e-video-clickelem").textContent.length)||!(t.range.startContainer.querySelectorAll("img, audio, video").length>0)&&n.i(i.isNullOrUndefined)(t.range.startContainer.querySelector(".e-video-clickelem"))&&"IMG"!==t.range.startContainer.nodeName&&"TABLE"!==t.range.startContainer.nodeName?0!==h.textContent.trim().length||"IMG"===h.childNodes[0].nodeName||""===h.textContent.trim()&&h.querySelectorAll("img, audio, video").length>0?(t.range.startOffset===t.range.endOffset&&0!==t.range.startOffset?u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!1).cloneNode(!0):(u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!0).cloneNode(!0),p=!0),b=!1):(u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!0).cloneNode(!0),b=!0):(u=t.createInsertElement(l),p=!0,b=!1);var v=void 0;for(v=t.formatTags.indexOf(u.nodeName.toLocaleLowerCase())<0?t.createInsertElement(l):t.parent.createElement(u.nodeName);u.firstChild;)v.appendChild(u.firstChild);if(h.parentElement.insertBefore(v,h),!b){var d=v,C=void 0;if(t.range.startOffset===t.range.endOffset&&0!==t.range.startOffset)for(;!n.i(i.isNullOrUndefined)(d)&&"#text"!==d.nodeName&&"BR"!==d.nodeName;)C=d,d=d.lastChild;else C=d;C.innerHTML="<br>",p||n.i(i.detach)(h)}t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),v.nextElementSibling,0)}else if(0!==h.textContent.length||(!n.i(i.isNullOrUndefined)(h.childNodes[0])&&"IMG"===h.childNodes[0].nodeName||h.querySelectorAll("video").length>0||h.querySelectorAll("audio").length>0||h.querySelectorAll("img").length>0))if(t.range.startContainer===t.range.endContainer&&"SPAN"===t.range.startContainer.nodeName&&(t.range.startContainer.classList.contains("e-video-wrap")||t.range.startContainer.classList.contains("e-audio-wrap"))){if(h.textContent.trim().length>0){for(var u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!0),y=n.i(i.isNullOrUndefined)(u.previousSibling.querySelector(".e-video-wrap"))?u.previousSibling.querySelector(".e-audio-wrap"):u.previousSibling.querySelector(".e-video-wrap"),N=!1,S=y.previousSibling;!n.i(i.isNullOrUndefined)(S)&&"#text"!==S.nodeName;)S=S.lastChild;if(n.i(i.isNullOrUndefined)(S)){var E=t.parent.createElement("br");y.parentElement.appendChild(E),N=!0}N?t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),y.parentElement,0):t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),S,S.textContent.length),n.i(i.detach)(y)}else{for(var u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!0),a=u.previousSibling;!n.i(i.isNullOrUndefined)(a.firstChild);)n.i(i.detach)(a.firstChild);var E=t.parent.createElement("br");a.appendChild(E),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),a,0)}n.i(i.isNullOrUndefined)(t.parent.audioModule)||t.parent.audioModule.hideAudioQuickToolbar(),n.i(i.isNullOrUndefined)(t.parent.videoModule)||t.parent.videoModule.hideVideoQuickToolbar()}else{var u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!0);if(n.i(i.isNullOrUndefined)(u.childNodes[0])||"#text"!==u.childNodes[0].nodeName||0!==u.childNodes[0].textContent.length||n.i(i.detach)(u.childNodes[0]),0===u.textContent.trim().length){var E=t.parent.createElement("br");if("A"===t.startNode.nodeName){var T=t.startNode.parentElement;t.startNode.parentElement.insertBefore(E,t.startNode),n.i(i.detach)(t.startNode),t.startNode=T}else"BR"!==t.startNode.nodeName&&t.startNode.appendChild(E);"\n"===u.childNodes[0].textContent&&n.i(i.detach)(u.childNodes[0]),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),t.startNode,0)}if(("P"===t.parent.enterKey||"DIV"===t.parent.enterKey)&&!l||("DIV"===t.parent.shiftEnterKey||"P"===t.parent.shiftEnterKey)&&l){var O=t.formatTags.indexOf(u.nodeName.toLocaleLowerCase());if(O<0||O>=0&&0===u.textContent.trim().length){for(var w=t.createInsertElement(l);u.firstChild;)w.appendChild(u.firstChild);t.parent.formatter.editorManager.domNode.insertAfter(w,u),n.i(i.detach)(u),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),t.parent.formatter.editorManager.domNode.isBlockNode(t.startNode)?w:t.startNode,0)}}}else if(n.i(i.isNullOrUndefined)(h.children[0])||"BR"===h.children[0].tagName){var v=t.createInsertElement(l);v.innerHTML="<br>",t.parent.formatter.editorManager.domNode.insertAfter(v,h),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),v,0)}else{var u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!1).cloneNode(!0);t.parent.formatter.editorManager.domNode.insertAfter(u,h),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),u,u.textContent.length>=0?0:1)}}e.args.preventDefault()}if("BR"===t.parent.enterKey&&!l||"BR"===t.parent.shiftEnterKey&&l){var k=void 0;if(t.parent.formatter.editorManager.domNode.isBlockNode(t.startNode))k=t.startNode;else{for(var L=t.startNode,_=L;!t.parent.formatter.editorManager.domNode.isBlockNode(L);)_=L,L=L.parentElement;k=L===t.parent.inputElement?_:L}t.removeBRElement(k);for(var x=k.lastChild;!n.i(i.isNullOrUndefined)(x)&&"#text"!==x.nodeName&&"BR"!==x.nodeName&&"IMG"!==x.nodeName;)x=x.lastChild;var D=t.range.startContainer===x?t.range.startContainer.textContent.length:k.textContent.length,M="IMG"===t.range.startContainer.nodeName||t.range.startContainer.childNodes.length>0&&"IMG"===t.range.startContainer.childNodes[t.range.startOffset].nodeName;if(k!==t.parent.inputElement&&t.parent.formatter.editorManager.domNode.isBlockNode(k)&&t.range.startOffset===t.range.endOffset&&(t.range.startOffset===D||0===k.textContent.trim().length&&M)){var R=t.parent.createElement("br");if(0===t.range.startOffset&&"TABLE"===t.range.startContainer.nodeName)t.range.startContainer.parentElement.insertBefore(R,t.range.startContainer);else if("BR"===x.nodeName&&0===k.textContent.length)t.parent.formatter.editorManager.domNode.insertAfter(R,x);else if(0===t.range.startOffset&&0===t.range.endOffset&&M){var B="IMG"===t.range.startContainer.nodeName?t.range.startContainer:t.range.startContainer.childNodes[t.range.startOffset];k.insertBefore(R,B),R=B}else{var A=t.parent.createElement("br");t.parent.formatter.editorManager.domNode.insertAfter(R,t.range.startContainer),t.parent.formatter.editorManager.domNode.insertAfter(A,t.range.startContainer)}t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),R,0)}else if(n.i(i.isNullOrUndefined)(k)||k===t.parent.inputElement||"BR"===k.nodeName)t.insertBRElement();else if(0===k.textContent.trim().length||1===k.textContent.trim().length&&8203===k.textContent.charCodeAt(0)){var u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,k,!0).cloneNode(!0);t.parent.formatter.editorManager.domNode.insertAfter(u,k);var I=t.parent.createElement("br");u.parentElement.insertBefore(I,u),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),u,0)}else{var u=void 0,I=t.parent.createElement("br");if(0!==t.range.startOffset||0!==t.range.endOffset||n.i(i.isNullOrUndefined)(k.previousSibling)||"BR"!==k.previousSibling.nodeName||"P"===k.nodeName||"DIV"===k.nodeName)t.insertBRElement();else{u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,k,!1).cloneNode(!0),t.parent.formatter.editorManager.domNode.insertAfter(I,k),t.insertFocusContent();for(var d=I.nextSibling;!n.i(i.isNullOrUndefined)(d)&&"#text"!==d.nodeName;)d=d.lastChild;t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),d,0),!0}}e.args.preventDefault()}t.parent.trigger(r.T,{requestType:l?"ShiftEnterAction":"EnterAction",args:e.args})}})}},e.prototype.removeBRElement=function(e){-1!==i.Browser.userAgent.indexOf("Firefox")&&this.range.endOffset===e.textContent.length&&(0!==e.textContent.length||e.querySelectorAll("BR").length>1)&&!n.i(i.isNullOrUndefined)(e.lastChild)&&"BR"===e.lastChild.nodeName&&n.i(i.detach)(e.lastChild)},e.prototype.insertBRElement=function(){var e=!1,t=!0;0===this.range.endContainer.textContent.length&&"BR"===this.range.startContainer.nodeName&&(t=!1);var r=this.parent.createElement("br");if("BR"===this.startNode.nodeName&&"BR"===this.endNode.nodeName&&0===this.range.startOffset&&this.range.startOffset===this.range.endOffset?(this.parent.formatter.editorManager.domNode.insertAfter(r,this.startNode),e=!0):(this.startNode!==this.parent.inputElement||n.i(i.isNullOrUndefined)(this.range.startContainer.previousSibling)||"BR"!==this.range.startContainer.previousSibling.nodeName||0!==this.range.startContainer.textContent.length||(e=!0),this.range.insertNode(r)),e||!n.i(i.isNullOrUndefined)(r.nextElementSibling)&&"BR"===r.nextElementSibling.tagName||!n.i(i.isNullOrUndefined)(r.nextSibling)&&r.nextSibling.textContent.length>0)this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),!n.i(i.isNullOrUndefined)(r.nextSibling)&&t?r.nextSibling:r,0),e=!1;else{var o=this.parent.createElement("br");this.range.insertNode(o),this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),r,0)}},e.prototype.insertFocusContent=function(){0===this.range.startContainer.textContent.length&&("#text"===this.range.startContainer.nodeName?this.range.startContainer.parentElement.innerHTML="​":this.range.startContainer.innerHTML="​")},e.prototype.createInsertElement=function(e){var t;"DIV"===this.parent.enterKey&&!e||"DIV"===this.parent.shiftEnterKey&&e?t=this.parent.createElement("div"):("P"===this.parent.enterKey&&!e||"P"===this.parent.shiftEnterKey&&e)&&(t=this.parent.createElement("p"));var r=this.parent.formatter.editorManager.domNode.blockNodes()[0].previousSibling,o=this.parent.formatter.editorManager.domNode.blockNodes()[0].nextSibling;return!n.i(i.isNullOrUndefined)(r)&&r.hasAttribute("style")&&t.setAttribute("style",r.getAttribute("style")),n.i(i.isNullOrUndefined)(r)&&!n.i(i.isNullOrUndefined)(o)&&o.hasAttribute("style")&&t.setAttribute("style",o.getAttribute("style")),t},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(0),r=(n.n(i),n(13)),o=(n.n(r),n(5)),s=n(1),a=n(2),l=n(4),d=function(){function e(e,t){r.FileManager.Inject(r.ContextMenu,r.DetailsView,r.NavigationPane,r.Toolbar),this.parent=e,this.i10n=t.getService("rteLocale"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.rendererFactory=t.getService("rendererFactory"),this.addEventListener()}return e.prototype.initialize=function(){this.parent.fileManagerModule=this,this.contentModule=this.rendererFactory.getRenderer(o.a.Content)},e.prototype.render=function(e){var t,n=this;t=e.selectNode&&"IMG"===e.selectNode[0].nodeName?this.parent.localeObj.getConstant("dialogUpdate"):this.i10n.getConstant("dialogInsert");var r=this.parent.localeObj.getConstant("fileDialogHeader"),o=this.i10n.getConstant("dialogCancel");this.dlgButtons=[{click:this.insertImageUrl.bind(this),buttonModel:{content:t,cssClass:"e-flat e-insertImage",isPrimary:!0}},{click:function(e){n.cancelDialog()},buttonModel:{cssClass:"e-flat e-cancel",content:o}}],this.dlgButtons[0].buttonModel.disabled=!0,this.selectObj={selection:e.selection,args:e.args,selectParent:e.selectParent};var s=this.parent.createElement("div",{className:"e-rte-file-manager-dialog",id:this.parent.getID()+"_file-manager-dialog",attrs:{"aria-owns":this.parent.getID()}});document.body.appendChild(s),this.fileWrap=this.parent.createElement("div",{id:this.parent.getID()+"_rte-file-manager",className:"e-img-file-wrap"}),s.appendChild(this.fileWrap),s.appendChild(this.getInputUrlElement());var l={visible:!1,isModal:!0,header:r,target:document.body,locale:this.parent.locale,enableRtl:this.parent.enableRtl,cssClass:a._12,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,width:"720px",height:"auto",position:{X:"center",Y:"center"},buttons:this.dlgButtons,created:this.renderFileManager.bind(this),close:function(e){n.parent.isBlur=!1,e&&e.event.returnValue&&n.selectObj.selection.restore(),n.destroyComponents(),n.dialogRenderObj.close(e)}};this.dialogObj=this.dialogRenderObj.render(l),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(s),this.dialogObj.show(!!i.Browser.isDevice),this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.setCssClass=function(e){this.dialogObj&&e.cssClass&&(n.i(i.isNullOrUndefined)(e.oldCssClass)?this.dialogObj.setProperties({cssClass:(this.dialogObj.cssClass+" "+e.cssClass).trim()}):this.dialogObj.setProperties({cssClass:(this.dialogObj.cssClass.replace(e.oldCssClass,"").trim()+" "+e.cssClass).trim()}))},e.prototype.renderFileManager=function(){var e=this,t=this;this.fileObj=new r.FileManager({allowMultiSelection:!1,locale:this.parent.locale,enableRtl:this.parent.enableRtl,path:this.parent.fileManagerSettings.path,view:this.parent.fileManagerSettings.view,enablePersistence:this.parent.enablePersistence,cssClass:this.parent.fileManagerSettings.cssClass,sortOrder:this.parent.fileManagerSettings.sortOrder,ajaxSettings:this.parent.fileManagerSettings.ajaxSettings,showThumbnail:this.parent.fileManagerSettings.showThumbnail,rootAliasName:this.parent.fileManagerSettings.rootAliasName,uploadSettings:this.parent.fileManagerSettings.uploadSettings,searchSettings:this.parent.fileManagerSettings.searchSettings,toolbarSettings:this.parent.fileManagerSettings.toolbarSettings,showHiddenItems:this.parent.fileManagerSettings.showHiddenItems,allowDragAndDrop:this.parent.fileManagerSettings.allowDragAndDrop,showFileExtension:this.parent.fileManagerSettings.showFileExtension,detailsViewSettings:this.parent.fileManagerSettings.detailsViewSettings,contextMenuSettings:this.parent.fileManagerSettings.contextMenuSettings,navigationPaneSettings:this.parent.fileManagerSettings.navigationPaneSettings,beforeSend:this.parent.fileManagerSettings.beforeSend,fileSelect:function(n){var i=n.fileDetails;i.isFile&&t.parent.insertImageSettings.allowedTypes.indexOf(i.type)>-1?(t.inputUrl.value=t.parent.fileManagerSettings.ajaxSettings.getImageUrl+"?path="+(i.filterPath&&i.filterPath.replace(/\\/g,"/"))+i.name,e.dlgButtons[0].buttonModel.disabled=!1):(t.inputUrl.value="",e.dlgButtons[0].buttonModel.disabled=!0),e.dialogObj.buttons=e.dlgButtons},created:function(){e.inputUrl.removeAttribute("disabled")},success:function(){e.fileObj.refreshLayout()}}),i.Browser.isDevice&&(this.fileObj.height="85%"),this.fileObj.appendTo(this.fileWrap),i.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this)},e.prototype.getInputUrlElement=function(){var e=this.parent.createElement("div",{className:"imgUrl"}),t=this.parent.createElement("div",{className:"e-rte-label"});t.innerHTML='<label for="rteSample_img_url">'+this.i10n.getConstant("linkWebUrl")+"</label>",e.appendChild(t);var n=this.i10n.getConstant("imageUrl");return this.inputUrl=this.parent.createElement("input",{className:"e-input e-img-url",attrs:{placeholder:n,spellcheck:"false",disabled:"true"}}),e.appendChild(this.inputUrl),e},e.prototype.insertImageUrl=function(e){var t=this.inputUrl.value;if(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),""!==t){if("HTML"===this.parent.editorMode&&n.i(i.isNullOrUndefined)(n.i(i.closest)(this.selectObj.selection.range.startContainer.parentNode,"#"+this.contentModule.getPanel().id))){this.contentModule.getEditPanel().focus();var r=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());this.selectObj.selection=this.parent.formatter.editorManager.nodeSelection.save(r,this.contentModule.getDocument()),this.selectObj.selectParent=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(r)}var o=/[\w-]+.(jpg|png|jpeg|gif)/g,s=n.i(i.isNullOrUndefined)(t.match(o))||"HTML"!==this.parent.editorMode?"":t.match(o)[0],l={cssClass:"inline"===this.parent.insertImageSettings.display?a._3:a.T,url:t,selection:this.selectObj.selection,altText:s,selectParent:this.selectObj.selectParent,width:{width:this.parent.insertImageSettings.width,minWidth:this.parent.insertImageSettings.minWidth,maxWidth:this.parent.getInsertImgMaxWidth()},height:{height:this.parent.insertImageSettings.height,minHeight:this.parent.insertImageSettings.minHeight,maxHeight:this.parent.insertImageSettings.maxHeight}};this.parent.formatter.process(this.parent,this.selectObj.args,this.selectObj.args.originalEvent,l),this.dialogObj.hide({returnValue:!1})}},e.prototype.cancelDialog=function(){this.parent.isBlur=!1,this.dialogObj.hide({returnValue:!0})},e.prototype.onDocumentClick=function(e){var t=e.target,r="#document"!==t.nodeName&&!n.i(i.isNullOrUndefined)(t.previousElementSibling)&&t.previousElementSibling;n.i(i.isNullOrUndefined)(this.dialogObj)||n.i(i.closest)(t,"#"+this.parent.getID()+"_file-manager-dialog")||n.i(i.closest)(t,"#"+this.parent.getID()+"_rte-file-manager_tb_sortby-popup")||n.i(i.closest)(t,"#"+this.parent.getID()+"_rte-file-manager_tb_view-popup")||n.i(i.closest)(t,"#"+this.parent.getID()+"_rte-file-manager_contextmenu")||!n.i(i.isNullOrUndefined)(n.i(i.closest)(t,".e-contextmenu-wrapper"))&&n.i(i.closest)(t,".e-contextmenu-wrapper").querySelector("#"+this.parent.getID()+"_rte-file-manager_contextmenu")||n.i(i.isNullOrUndefined)(r)||r.classList.contains("e-rte-file-manager-dialog")||n.i(i.isNullOrUndefined)(r)||r.id===this.parent.getID()+"_rte-file-manager_contextmenu"?this.parent.isRTE=!0:(this.dialogObj.hide({returnValue:!0}),this.parent.isBlur=!0,n.i(l.l)(this.parent.element,"focusout"))},e.prototype.addEventListener=function(){this.parent.on(s.g,this.initialize,this),this.parent.on(s._73,this.render,this),this.parent.on(s._89,this.setCssClass,this),this.parent.on(s.i,this.destroy,this)},e.prototype.removeEventListener=function(){i.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick),this.parent.off(s.g,this.initialize),this.parent.off(s._73,this.render),this.parent.off(s._89,this.setCssClass),this.parent.off(s.i,this.destroy)},e.prototype.destroyComponents=function(){this.fileObj&&(this.fileObj.destroy(),this.fileObj=null),this.dialogObj&&(this.dialogObj.destroy(),n.i(i.detach)(this.dialogObj.element),this.dialogObj=null)},e.prototype.destroy=function(){this.parent.isDestroyed||(this.destroyComponents(),this.removeEventListener())},e.prototype.getModuleName=function(){return"fileManager"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(0),r=(n.n(i),n(1)),o=function(){function e(e){this.isSticky=!1,this.isActive=!1,this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(r._90,this.toolbarClick,this),this.parent.on(r._91,this.toolbarDoubleClick,this),this.parent.on(r._26,this.editAreaClick,this),this.parent.on(r.v,this.onKeyDown,this),this.parent.on(r.i,this.destroy,this)},e.prototype.toolbarClick=function(e){this.parent.focusIn(),this.isSticky?(e.args.action="escape",this.actionHandler(e,"keyBoard")):(this.isActive=!0,this.actionHandler(e,"click")),this.parent.quickToolbarModule&&!n.i(i.isNullOrUndefined)(this.parent.quickToolbarSettings.text)&&this.parent.element.ownerDocument.contains(this.parent.quickToolbarModule.textQTBar.element)&&this.parent.quickToolbarModule.textQTBar.hidePopup()},e.prototype.toolbarDoubleClick=function(e){this.isActive=!0,this.isSticky=!0,this.parent.focusIn(),this.actionHandler(e,"dbClick")},e.prototype.onKeyDown=function(e){var t=e.args;(n.i(i.isNullOrUndefined)(t)||n.i(i.isNullOrUndefined)(t.action)||"format-copy"!==t.action&&"format-paste"!==t.action)&&("escape"!==t.action||"format-copy"!==this.previousAction&&"format-paste"!==this.previousAction)||("format-copy"!==t.action&&"format-paste"!==t.action||t.stopPropagation(),this.actionHandler(e,"keyBoard"))},e.prototype.actionHandler=function(e,t){var r,o,s,a,l=!1;switch(t){case"dbClick":s=e.args,a=s.item,o=e.args.originalEvent,r="format-copy";break;case"keyBoard":s=null,o=e.args,l=!0,r=e.args.action,"escape"===r&&(this.isSticky=!1,this.isActive=!1);break;case"click":s=e.args,a=s.item,o=e.args.originalEvent,r="format-copy";break;case"docClick":o=e,r="format-paste"}this.updateCursor(l);var d="docClick"!==t&&"escape"!==r;this.updateToolbarBtn(d),n.i(i.isNullOrUndefined)(a)&&(a={command:"FormatPainter",subCommand:"FormatPainter"});var c={requestType:"FormatPainter",originalEvent:o,name:r,item:a},u={formatPainterAction:r};this.parent.formatter.process(this.parent,c,o,u),this.previousAction=r},e.prototype.updateCursor=function(e){this.parent.inputElement.classList.contains("e-rte-cursor-brush")||e?this.isSticky||n.i(i.removeClass)([this.parent.inputElement],"e-rte-cursor-brush"):n.i(i.addClass)([this.parent.inputElement],"e-rte-cursor-brush")},e.prototype.updateToolbarBtn=function(e){if(!n.i(i.isNullOrUndefined)(this.parent.element.querySelector(".e-rte-format-painter"))){var t=this.parent.element.querySelector(".e-rte-format-painter").parentElement.parentElement;e?n.i(i.addClass)([t],"e-active"):this.isSticky||n.i(i.removeClass)([t],"e-active")}},e.prototype.editAreaClick=function(e){this.isActive&&(this.isSticky||(this.isActive=!1),this.actionHandler(e,"docClick"),this.updateToolbarBtn(!1))},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.parent.isDestroyed||(this.parent.off(r._90,this.toolbarClick),this.parent.off(r._26,this.editAreaClick),this.parent.off(r._91,this.toolbarDoubleClick),this.parent.off(r.v,this.onKeyDown),this.parent.off(r.i,this.destroy),n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.formatPainterEditor)||this.parent.formatter.editorManager.formatPainterEditor.destroy(),this.parent=void 0,this.isSticky=void 0,this.isActive=void 0,this.previousAction=void 0)},e.prototype.getModuleName=function(){return"formatPainter"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return v});var i=n(1),r=n(0),o=(n.n(r),n(71)),s=n(5),a=n(2),l=n(66),d=n(75),c=n(30),u=n(26),h=n(20),p=n(8),m=n(4),f=n(6),g=n(69),b=n(3),v=function(){function e(e,t){this.rangeCollection=[],this.isImageDelete=!1,this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.xhtmlValidation=new g.a(e),this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener()},e.prototype.sanitizeHelper=function(e){return e=n.i(m.u)(e,this.parent)},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.nodeSelectionObj=new h.a,this.colorPickerModule=new u.a(this.parent,this.locator),this.parent.on(i.e,this.instantiateRenderer,this),this.parent.on(i.p,this.onToolbarClick,this),this.parent.on(i.v,this.onKeyDown,this),this.parent.on(i.u,this.onKeyUp,this),this.parent.on(i.o,this.renderColorPicker,this),this.parent.on(i.g,this.render,this),this.parent.on(i.s,this.onPropertyChanged,this),this.parent.on(i.i,this.destroy,this),this.parent.on(i._32,this.selectAll,this),this.parent.on(i._33,this.selectRange,this),this.parent.on(i._34,this.getSelectedHtml,this),this.parent.on(i._18,this.onSelectionSave,this),this.parent.on(i._19,this.onSelectionRestore,this),this.parent.on(i._43,this.updateReadOnly,this),this.parent.on(i._36,this.onPaste,this),this.parent.on(i.c,this.isTableClassAdded,this))},e.prototype.updateReadOnly=function(){this.parent.readonly?(n.i(r.attributes)(this.parent.contentModule.getEditPanel(),{contenteditable:"false"}),n.i(r.addClass)([this.parent.element],a._31)):(n.i(r.attributes)(this.parent.contentModule.getEditPanel(),{contenteditable:"true"}),n.i(r.removeClass)([this.parent.element],a._31))},e.prototype.onSelectionSave=function(){var e=this.contentRenderer.getDocument(),t=this.nodeSelectionObj.getRange(e);this.saveSelection=this.nodeSelectionObj.save(t,e)},e.prototype.onSelectionRestore=function(e){this.parent.isBlur=!1,this.contentRenderer.getEditPanel().focus(),(n.i(r.isNullOrUndefined)(e.items)||e.items)&&this.saveSelection.restore()},e.prototype.isTableClassAdded=function(){for(var e=this.parent.inputElement.querySelectorAll("table"),t=0;t<e.length;t++)e[t].classList.contains("e-rte-table")||e[t].classList.add("e-rte-table")},e.prototype.onKeyUp=function(e){var t,i=e.args,o=[8,9,13,16,17,18,20,27,37,38,39,40,44,45,46,91,112,113,114,115,116,117,118,119,120,121,122,123],s=this.parent.getRange(),a=new RegExp(String.fromCharCode(8203),"g"),l=!1;if(o.indexOf(i.keyCode)<0&&!i.shiftKey&&!i.ctrlKey&&!i.altKey){if(t=s.startOffset,"#text"===s.startContainer.nodeName?s.startContainer.parentElement!==this.parent.inputElement?s.startContainer.parentElement.classList.add("currentStartMark"):l=!0:s.startContainer.classList.add("currentStartMark"),8203===s.startContainer.textContent.charCodeAt(0)){var d=s.startContainer.textContent.length,c=s.startOffset;s.startContainer.textContent=s.startContainer.textContent.replace(a,""),t=0===c?c:c-(d-s.startContainer.textContent.length),this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),s.startContainer,t)}var u=this.parent.inputElement.innerHTML.length,h=this.parent.inputElement.innerHTML.replace(a,"").length,p=s.startContainer;if(u>h&&!l){if(0!==p.textContent.trim().length&&p.previousSibling){var m=document.createElement("span");m.className="tempSpan",s.insertNode(m)}for(var f=this.parent.inputElement.firstChild;!n.i(r.isNullOrUndefined)(f)&&f.textContent.replace(a,"").trim().length>0;)f.innerHTML=f.innerHTML.replace(a,""),f=f.nextElementSibling;var g=this.parent.inputElement.querySelector(".tempSpan");if(g&&g.previousSibling&&0!==p.textContent.trim().length){p=g.previousSibling,t=g.previousSibling.textContent.length;g.parentNode.removeChild(g),g=null}var b=this.parent.inputElement.querySelector(".currentStartMark").childNodes;if(b.length>1)for(var v=0;v<b.length;v++)"#text"===b[v].nodeName&&0===b[v].textContent.length&&(n.i(r.detach)(b[v]),v--),n.i(r.isNullOrUndefined)(b[v])||p.textContent.replace(a,"")!==b[v].textContent||(t=p.textContent.length>1?p.textContent===b[v].textContent?t:t-(p.textContent.length-p.textContent.replace(a,"").length):p.textContent.length,p=b[v]);else 1===b.length&&p.textContent.replace(a,"")===b[0].textContent&&(p=b[0]);this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),p,t)}var C=this.parent.inputElement.querySelector(".currentStartMark");n.i(r.isNullOrUndefined)(C)||(C.classList.remove("currentStartMark"),""===C.getAttribute("class").trim()&&C.removeAttribute("class")),!n.i(r.isNullOrUndefined)(s.startContainer.previousSibling)&&!n.i(r.isNullOrUndefined)(s.startContainer.previousSibling.parentElement)&&s.startContainer.parentElement===s.startContainer.previousSibling.parentElement&&8203===s.startContainer.previousSibling.textContent.charCodeAt(0)&&s.startContainer.previousSibling.textContent.length<=1&&(s.startContainer.previousSibling.textContent=s.startContainer.previousSibling.textContent.replace(a,"")),8203===s.endContainer.textContent.charCodeAt(s.endOffset)&&(t=s.startOffset,s.endContainer.textContent=s.endContainer.textContent.replace(a,""),this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),s.startContainer,t))}},e.prototype.onKeyDown=function(e){var t,o=this,s=e.args;if("chrome"===r.Browser.info.name&&(t=this.parent.getRange(),this.backSpaceCleanup(e,t),this.deleteCleanup(e,t)),9===s.keyCode&&this.parent.enableTabKey&&!n.i(r.isNullOrUndefined)(s.target)&&n.i(r.isNullOrUndefined)(n.i(r.closest)(s.target,".e-rte-toolbar"))){var a=this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()),l=this.nodeSelectionObj.getParentNodeCollection(a);if("LI"!==l[0].nodeName&&!n.i(r.closest)(l[0],"li")&&!n.i(r.closest)(l[0],"table")||0!==a.startOffset)if(s.preventDefault(),s.shiftKey){if(this.rangeCollection.length>0&&4===this.rangeCollection[this.rangeCollection.length-1].startContainer.textContent.length){var d=this.rangeCollection[this.rangeCollection.length-1].startContainer;this.nodeSelectionObj.setSelectionText(this.contentRenderer.getDocument(),d,d,0,d.textContent.length),p.a.Insert(this.contentRenderer.getDocument(),document.createTextNode("")),this.rangeCollection.pop()}}else p.a.Insert(this.contentRenderer.getDocument()," "),this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()))}if(("space"===e.args.action||"enter"===e.args.action||13===e.args.keyCode)&&(this.spaceLink(e.args),"HTML"===this.parent.editorMode&&!this.parent.readonly)){var c=this.parent.getText().trim().replace(/(\r\n|\n|\r)/gm,"").replace(/\u200B/g,"").length,u=this.parent.getSelection().length,h=c-u+1;if(!(-1===this.parent.maxLength||h<=this.parent.maxLength||13!==e.args.keyCode))return void e.args.preventDefault();this.parent.notify(i._46,{args:e.args});var m=this.parent.getRange();n.i(r.isNullOrUndefined)(m.startContainer)||m.startContainer!==this.parent.inputElement.lastChild||"#text"===m.startContainer.nodeName||m.startContainer.scrollIntoView({block:"end",inline:"nearest"})}if("space"===e.args.action){var f=this.parent.getRange(),g=f.startContainer.textContent.slice(0,f.startOffset),v=this.isOrderedList(g),C=this.isUnOrderedList(g);if(v&&!C||C&&!v){var y={callBack:null,event:e.args,name:"keydown-handler"},N={cancel:!1,item:{command:"Lists",subCommand:v?"OL":"UL"},name:"actionBegin",originalEvent:e.args,requestType:v?"OL":"UL"};this.parent.trigger(i.S,N,function(t){t.cancel||(o.parent.formatter.editorManager.observer.notify(b.l,y),o.parent.trigger(i.T,{editorMode:o.parent.editorMode,elements:o.parent.formatter.editorManager.domNode.blockNodes(),event:e.args,name:i.T,range:o.parent.getRange(),requestType:v?"OL":"UL"}))})}}"chrome"!==r.Browser.info.name||(n.i(r.isNullOrUndefined)(this.rangeElement)||n.i(r.isNullOrUndefined)(this.oldRangeElement))&&(n.i(r.isNullOrUndefined)(this.deleteRangeElement)||n.i(r.isNullOrUndefined)(this.deleteOldRangeElement))||"TD"===t.startContainer.parentElement.tagName||"TH"===t.startContainer.parentElement.tagName||(this.rangeElement=null,this.oldRangeElement=null,this.deleteRangeElement=null,this.deleteOldRangeElement=null,this.isImageDelete||s.preventDefault(),s.preventDefault())},e.prototype.isOrderedList=function(e){e=e.replace(/\u200B/g,"");var t=[/^[1]+[.]+$/,/^[i]+[.]+$/,/^[a]+[.]+$/];if(!n.i(r.isNullOrUndefined)(e))for(var i=0;i<t.length;i++)if(t[i].test(e))return!0;return!1},e.prototype.isUnOrderedList=function(e){e=e.replace(/\u200B/g,"");var t=[/^[*]$/,/^[-]$/];if(!n.i(r.isNullOrUndefined)(e))for(var i=0;i<t.length;i++)if(t[i].test(e))return!0;return!1},e.prototype.backSpaceCleanup=function(e,t){var i=!1,o=!0;if(n.i(r.isNullOrUndefined)(t.startContainer.previousSibling)||"SPAN"!==t.startContainer.previousSibling.nodeName||(o="false"!==t.startContainer.previousSibling.contentEditable),"Backspace"===e.args.code&&8===e.args.keyCode&&0===t.startOffset&&0===t.endOffset&&0===this.parent.getSelection().length&&t.startContainer.textContent.length>0&&"TD"!==t.startContainer.parentElement.tagName&&"TH"!==t.startContainer.parentElement.tagName&&o){var s="#text"===t.startContainer.nodeName?t.startContainer.parentElement:t.startContainer;if(!this.parent.formatter.editorManager.domNode.isBlockNode(s)&&!n.i(r.isNullOrUndefined)(s.previousSibling)&&"BR"===s.previousSibling.nodeName||!n.i(r.isNullOrUndefined)(t.startContainer.previousSibling)&&"BR"===t.startContainer.previousSibling.nodeName)return;if(this.rangeElement=this.getRootBlockNode(t.startContainer),"OL"===this.rangeElement.tagName||"UL"===this.rangeElement.tagName){var a=this.getRangeLiNode(t.startContainer);a.previousElementSibling&&a.previousElementSibling.childElementCount>0&&(this.oldRangeElement="BR"===a.previousElementSibling.lastElementChild.nodeName?a.previousElementSibling:a.previousElementSibling.lastElementChild,n.i(r.isNullOrUndefined)(a.lastElementChild)||"BR"===a.lastElementChild.nodeName?this.rangeElement=a:(this.rangeElement=a.lastElementChild,i=!0))}else{if(this.rangeElement===this.parent.inputElement||"TABLE"===this.rangeElement.tagName||!n.i(r.isNullOrUndefined)(this.rangeElement.previousElementSibling)&&"TABLE"===this.rangeElement.previousElementSibling.tagName)return;this.oldRangeElement=this.rangeElement.previousElementSibling}if(n.i(r.isNullOrUndefined)(this.oldRangeElement))return;"OL"!==this.oldRangeElement.tagName&&"UL"!==this.oldRangeElement.tagName||(this.oldRangeElement=this.oldRangeElement.lastElementChild.lastElementChild?this.oldRangeElement.lastElementChild.lastElementChild:this.oldRangeElement.lastElementChild);for(var l=this.oldRangeElement.lastChild;3!==l.nodeType&&"#text"!==l.nodeName&&"BR"!==l.nodeName;)l=l.lastChild;if(this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),l,l.textContent.length),1===this.oldRangeElement.querySelectorAll("BR").length&&n.i(r.detach)(this.oldRangeElement.querySelector("BR")),!n.i(r.isNullOrUndefined)(this.rangeElement)&&this.oldRangeElement!==this.rangeElement){for(;this.rangeElement.firstChild;)this.oldRangeElement.appendChild(this.rangeElement.childNodes[0]);i?n.i(r.detach)(this.rangeElement.parentElement):n.i(r.detach)(this.rangeElement),this.oldRangeElement.normalize()}}},e.prototype.deleteCleanup=function(e,t){var i,o,s=!1;if("Delete"===e.args.code&&46===e.args.keyCode&&0!==this.parent.contentModule.getText().trim().replace(/(\r\n|\n|\r)/gm,"").replace(/\u200B/g,"").length&&0===this.parent.getSelection().length&&"TD"!==t.startContainer.parentElement.tagName&&"TH"!==t.startContainer.parentElement.tagName){if(this.deleteRangeElement=o=this.getRootBlockNode(t.startContainer),"OL"===this.deleteRangeElement.tagName||"UL"===this.deleteRangeElement.tagName)i=this.getRangeLiNode(t.startContainer),i.nextElementSibling&&i.nextElementSibling.childElementCount>0&&!i.nextElementSibling.querySelector("BR")?n.i(r.isNullOrUndefined)(i.lastElementChild)?this.deleteRangeElement=i:(this.deleteRangeElement=i.lastElementChild,s=!0):this.deleteRangeElement=this.getRangeElement(i);else if(3===this.deleteRangeElement.nodeType||"TABLE"===this.deleteRangeElement.tagName||!n.i(r.isNullOrUndefined)(this.deleteRangeElement.nextElementSibling)&&"TABLE"===this.deleteRangeElement.nextElementSibling.tagName)return;if(this.getCaretIndex(t,this.deleteRangeElement)===this.deleteRangeElement.textContent.length){if(n.i(r.isNullOrUndefined)(i)?this.deleteOldRangeElement=this.deleteRangeElement.nextElementSibling:s||!n.i(r.isNullOrUndefined)(i.nextElementSibling)?this.deleteOldRangeElement=this.getRangeElement(i.nextElementSibling):this.deleteOldRangeElement=o.nextElementSibling,n.i(r.isNullOrUndefined)(this.deleteOldRangeElement))return;0===t.startOffset&&1===t.endOffset&&"IMG"===this.deleteRangeElement.childNodes[0].nodeName?(this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.parent.contentModule.getDocument(),this.deleteRangeElement,this.deleteRangeElement,0,1),this.isImageDelete=!0):(this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),this.deleteRangeElement,this.deleteRangeElement.childNodes.length),this.isImageDelete=!1);var a=this.deleteRangeElement.querySelector("BR");if(a&&a.classList.contains("e-rte-image-remove-focus"))return void n.i(r.removeClass)([a],["e-rte-image-focus"]);if(a&&n.i(r.detach)(a),n.i(r.isNullOrUndefined)(this.deleteRangeElement)||"OL"===this.deleteOldRangeElement.tagName||"UL"===this.deleteOldRangeElement.tagName||this.deleteOldRangeElement===this.deleteRangeElement)this.deleteRangeElement=null,this.deleteOldRangeElement=null;else{for(;this.deleteOldRangeElement.firstChild;)this.deleteRangeElement.appendChild(this.deleteOldRangeElement.childNodes[0]);s?n.i(r.detach)(this.deleteOldRangeElement.parentElement):n.i(r.detach)(this.deleteOldRangeElement),this.deleteRangeElement.normalize()}}else this.deleteRangeElement=null}},e.prototype.getCaretIndex=function(e,t){var n=0;if(0!==this.parent.contentModule.getDocument().getSelection().rangeCount){var i=e.cloneRange();i.selectNodeContents(t),i.setEnd(e.endContainer,e.endOffset),n=i.toString().length}return n},e.prototype.getRangeElement=function(e){return e.lastElementChild?"BR"===e.lastElementChild.tagName?e.lastElementChild.previousElementSibling?e.lastElementChild.previousElementSibling:e:e.lastElementChild:e},e.prototype.getRootBlockNode=function(e){for(;e&&this.parent&&this.parent.inputElement!==e&&e.parentElement!==this.parent.inputElement;e=e)e=e.parentElement;return e},e.prototype.getRangeLiNode=function(e){for(var t=e.parentElement;t!==this.parent.inputElement&&(1!==t.nodeType||"LI"!==t.tagName);)t=t.parentElement;return t},e.prototype.onPaste=function(e){var t=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);if(e.text.match(t)){if(e.isWordPaste)return;e.args.preventDefault();for(var i=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),o=(this.parent.formatter.editorManager.nodeSelection.save(i,this.parent.contentModule.getDocument()),new RegExp(/([^\S]|^)(((https?\:\/\/)))/gi)),s=new RegExp(/([^\S]|^)(((www\.))(\S+))/gi),a=e.text.split("\n"),l="",d=0;d<a.length;d++)if(""===a[d].trim())l+=n.i(m.r)(this.parent);else{for(var c="",u=!0,h=a[d].split(" "),p=0;p<h.length;p++)""===h[p].trim()?c+=u?" ":" ":(u=!1,c+=h[p]+" ");l+=0===d?"<span>"+c.trim()+"</span>":"<p>"+c.trim()+"</p>"}var f=this.parent.createElement("div");f.setAttribute("class","pasteContent"),f.style.display="inline",f.innerHTML=l.replace("¶","&para");for(var g=f.querySelectorAll("span, p"),d=0;d<g.length;d++){for(var b=g[d].innerHTML.split(" "),v="",p=0;p<b.length;p++)b[p].match(o)||b[p].match(s)?v+='<a class="e-rte-anchor" href="'+b[p]+'" title="'+b[p]+'"target="_blank">'+b[p]+" </a>":v+=b[p]+" ";g[d].innerHTML=v.trim()}n.i(r.isNullOrUndefined)(this.parent.pasteCleanupModule)?this.parent.formatter.editorManager.execCommand("insertHTML",null,null,null,f):e.callBack(f.innerHTML)}},e.prototype.spaceLink=function(e){var t=this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()),n=this.nodeSelectionObj.getParentNodeCollection(t),i=t.startContainer.textContent.substr(0,t.endOffset),r=i.split(" "),o=r[r.length-1],s=t.startOffset-(i.length-r[r.length-1].length);o=o.slice(0,s);var a=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);if("A"!==n[0].nodeName&&o.match(a)){var l=this.nodeSelectionObj.save(t,this.parent.contentModule.getDocument()),d=o.indexOf("http")>-1?o:"http://"+o,c=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t),u={url:d,selection:l,selectParent:c,text:o,title:"",target:"_blank"};this.parent.formatter.process(this.parent,{item:{command:"Links",subCommand:"CreateLink"}},e,u)}},e.prototype.mouseOutHandler=function(){if(n.i(r.isNullOrUndefined)(this.tooltipTargetEle)){var e=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().ownerDocument:this.parent.contentModule.getDocument();this.tooltipTargetEle=e.querySelector("[data-title]"),this.tooltipTargetEle.setAttribute("title",this.tooltipTargetEle.getAttribute("data-title"))}else this.tooltipTargetEle.setAttribute("title",this.tooltipTargetEle.getAttribute("data-title"));this.tooltipTargetEle.removeAttribute("data-title"),r.EventHandler.remove(this.tooltipTargetEle,"mouseout",this.mouseOutHandler)},e.prototype.onToolbarClick=function(e){var t,o,s,a=this,l=e.item,d=n.i(r.closest)(e.originalEvent.target,".e-rte-quick-popup"),c=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().ownerDocument:this.parent.contentModule.getDocument();if(this.tooltipTargetEle=n.i(r.closest)(e.originalEvent.target,"[data-tooltip-id]"),n.i(r.isNullOrUndefined)(this.tooltipTargetEle)||!this.parent.showTooltip||n.i(r.isNullOrUndefined)(c.querySelector(".e-tooltip-wrap"))||(this.parent.notify(i._93,{args:event}),this.tooltipTargetEle.setAttribute("data-title",this.tooltipTargetEle.getAttribute("title")),this.tooltipTargetEle.removeAttribute("title"),r.EventHandler.add(this.tooltipTargetEle,"mouseout",this.mouseOutHandler,this)),"FormatPainter"!==l.command)if(!d||d.classList.contains("e-rte-inline-popup")||d.classList.contains("e-rte-text-popup")){var u=document.getElementById(this.parent.getID()+"_rtelink"),h=document.getElementById(this.parent.getID()+"_image");if("SourceCode"!==l.subCommand&&"Preview"!==l.subCommand&&"FontColor"!==l.subCommand&&"BackgroundColor"!==l.subCommand){var p=this.nodeSelectionObj.getRange(this.parent.contentModule.getDocument());n.i(r.isNullOrUndefined)(u)&&n.i(r.isNullOrUndefined)(h)&&(t=this.nodeSelectionObj.save(p,this.parent.contentModule.getDocument())),o=this.nodeSelectionObj.getNodeCollection(p),s=this.nodeSelectionObj.getParentNodeCollection(p)}switch(l.subCommand){case"Maximize":this.parent.notify(i.z,{args:e});break;case"Minimize":this.parent.notify(i.A,{args:e});break;case"CreateLink":this.parent.notify(i.O,{member:"link",args:e,selectNode:o,selection:t,selectParent:s});break;case"RemoveLink":this.parent.notify(i.P,{member:"link",args:e,selectNode:o,selection:t,selectParent:s});break;case"Print":this.parent.print();break;case"Image":this.parent.notify(i.X,{member:"image",args:e,selectNode:o,selection:t,selectParent:s});break;case"Audio":this.parent.notify(i.Y,{member:"audio",args:e,selectNode:o,selection:t,selectParent:s});break;case"Video":this.parent.notify(i.Z,{member:"video",args:e,selectNode:o,selection:t,selectParent:s});break;case"CreateTable":this.parent.notify(i._39,{member:"table",args:e,selection:t});break;case"SourceCode":this.parent.notify(i._14,{member:"viewSource",args:e});break;case"Preview":this.parent.notify(i._15,{member:"updateSource",args:e});break;case"FontColor":case"BackgroundColor":break;case"File":this.parent.notify(i._73,{member:"fileManager",args:e,selectNode:o,selection:t,selectParent:s});break;case"EmojiPicker":this.parent.notify(i._92,{member:"emojiPicker",args:e});break;default:this.parent.formatter.process(this.parent,e,e.originalEvent,null)}}else{if("SourceCode"!==l.subCommand&&"Preview"!==l.subCommand&&"FontColor"!==l.subCommand&&"BackgroundColor"!==l.subCommand){n.i(f.b)()&&"Images"===l.command&&this.nodeSelectionObj.restore();var p=this.nodeSelectionObj.getRange(this.parent.contentModule.getDocument());t=this.nodeSelectionObj.save(p,this.parent.contentModule.getDocument()),o=this.nodeSelectionObj.getNodeCollection(p),s=this.nodeSelectionObj.getParentNodeCollection(p)}"Images"===l.command&&this.parent.notify(i.E,{member:"image",args:e,selectNode:o,selection:t,selectParent:s}),"Audios"===l.command&&this.parent.notify(i.F,{member:"audio",args:e,selectNode:o,selection:t,selectParent:s}),"Videos"===l.command&&this.parent.notify(i.G,{member:"video",args:e,selectNode:o,selection:t,selectParent:s}),"Links"===l.command&&this.parent.notify(i.H,{member:"link",args:e,selectNode:o,selection:t,selectParent:s}),"Table"===l.command&&this.parent.notify(i._41,{member:"table",args:e,selectNode:o,selection:t,selectParent:s})}else 1===e.originalEvent.detail?(clearTimeout(this.clickTimeout),this.clickTimeout=setTimeout(function(){a.parent.notify(i._90,{member:"formatPainter",args:e})},200)):(clearTimeout(this.clickTimeout),this.parent.notify(i._91,{member:"formatPainter",args:e}))},e.prototype.renderColorPicker=function(e){this.colorPickerModule.renderColorPickerInput(e)},e.prototype.instantiateRenderer=function(){this.parent.iframeSettings.enable?this.renderFactory.addRenderer(s.a.Content,new d.a(this.parent,this.locator)):this.renderFactory.addRenderer(s.a.Content,new c.a(this.parent,this.locator))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i.g,this.render),this.parent.off(i.s,this.onPropertyChanged),this.parent.off(i.p,this.onToolbarClick),this.parent.off(i.o,this.renderColorPicker),this.parent.off(i.i,this.destroy),this.parent.off(i.v,this.onKeyDown),this.parent.off(i.e,this.instantiateRenderer),this.parent.off(i._32,this.selectAll),this.parent.off(i._33,this.selectRange),this.parent.off(i._34,this.getSelectedHtml),this.parent.off(i._18,this.onSelectionSave),this.parent.off(i._19,this.onSelectionRestore),this.parent.off(i._43,this.updateReadOnly),this.parent.off(i._36,this.onPaste),this.parent.off(i.c,this.isTableClassAdded))},e.prototype.render=function(){this.contentRenderer=this.renderFactory.getRenderer(s.a.Content);var e=this.contentRenderer.getEditPanel(),t={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};if(n.i(r.isNullOrUndefined)(this.parent.formatter)){var a=new o.a({currentDocument:this.contentRenderer.getDocument(),element:e,options:t,formatPainterSettings:this.parent.formatPainterSettings});this.parent.setProperties({formatter:a},!0)}else this.parent.formatter.updateFormatter(e,this.contentRenderer.getDocument(),t);this.parent.enableXhtml&&this.parent.notify(i._69,{}),this.parent.toolbarSettings.enable&&(this.toolbarUpdate=new l.a(this.parent)),this.parent.inlineMode.enable&&(n.i(r.isNullOrUndefined)(this.parent.fontFamily.default)||(e.style.fontFamily=this.parent.fontFamily.default),n.i(r.isNullOrUndefined)(this.parent.fontSize.default)||(e.style.fontSize=this.parent.fontSize.default)),this.parent.notify(i.n,{})},e.prototype.onPropertyChanged=function(e){if(n.i(r.isNullOrUndefined)(e)||n.i(r.isNullOrUndefined)(e.newProp.toolbarSettings)||n.i(r.isNullOrUndefined)(e.newProp.toolbarSettings.enable)||(this.toolbarUpdate=new l.a(this.parent)),!n.i(r.isNullOrUndefined)(e.newProp.formatter)){var t=this.contentRenderer.getEditPanel(),i={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};this.parent.formatter.updateFormatter(t,this.contentRenderer.getDocument(),i)}},e.prototype.getModuleName=function(){return"htmlEditor"},e.prototype.selectAll=function(){var e=n.i(m.n)(this.parent.contentModule.getDocument(),this.parent.contentModule.getEditPanel());e.length>0&&this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.parent.contentModule.getDocument(),e[0],e[e.length-1],0,e[e.length-1].textContent.length)},e.prototype.selectRange=function(e){this.parent.formatter.editorManager.nodeSelection.setRange(this.parent.contentModule.getDocument(),e.range)},e.prototype.getSelectedHtml=function(e){e.callBack(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).toString())},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(1),r=n(0),o=(n.n(r),n(72)),s=n(5),a=n(2),l=n(67),d=n(76),c=n(23),u=function(){function e(e,t){this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener()}return e.prototype.destroy=function(){n.i(r.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null,this.toolbarUpdate.parent=null},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.saveSelection=new c.a,this.parent.on(i.e,this.instantiateRenderer,this),this.parent.on(i.g,this.render,this),this.parent.on(i.s,this.onPropertyChanged,this),this.parent.on(i.q,this.onToolbarClick,this),this.parent.on(i.i,this.destroy,this),this.parent.on(i._32,this.selectAll,this),this.parent.on(i._34,this.getSelectedHtml,this),this.parent.on(i._18,this.onSelectionSave,this),this.parent.on(i._19,this.onSelectionRestore,this),this.parent.on(i._43,this.updateReadOnly,this),this.parent.on(i._44,this.moduleDestroy,this))},e.prototype.updateReadOnly=function(){this.parent.readonly?(this.parent.contentModule.getEditPanel().setAttribute("readonly","readonly"),n.i(r.addClass)([this.parent.element],a._31)):(this.parent.contentModule.getEditPanel().removeAttribute("readonly"),n.i(r.removeClass)([this.parent.element],a._31))},e.prototype.onSelectionSave=function(){var e=this.parent.contentModule.getEditPanel();this.saveSelection.save(e.selectionStart,e.selectionEnd)},e.prototype.onSelectionRestore=function(e){this.contentRenderer.getEditPanel().focus();var t=this.parent.contentModule.getEditPanel();this.saveSelection.restore(t)},e.prototype.onToolbarClick=function(e){var t=e.item,n=this.parent.contentModule.getEditPanel();n.focus();var r=n.selectionStart,o=n.selectionEnd,s=n.value.substring(r,o);switch(t.subCommand){case"Maximize":this.parent.notify(i.z,{args:e});break;case"Minimize":this.parent.notify(i.A,{args:e});break;case"CreateLink":this.parent.notify(i.O,{member:"link",args:e,text:s,module:"Markdown"});break;case"Image":this.parent.notify(i.X,{member:"image",args:e,text:s,module:"Markdown"});break;case"CreateTable":var a={headingText:this.parent.localeObj.getConstant("TableHeadingText"),colText:this.parent.localeObj.getConstant("TableColText")};this.parent.formatter.process(this.parent,e,e.originalEvent,a);break;default:this.parent.formatter.process(this.parent,e,e.originalEvent,null)}},e.prototype.instantiateRenderer=function(){this.renderFactory.addRenderer(s.a.Content,new d.a(this.parent))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i.g,this.render),this.parent.off(i.s,this.onPropertyChanged),this.parent.off(i.i,this.destroy),this.parent.off(i.q,this.onToolbarClick),this.parent.off(i.e,this.instantiateRenderer),this.parent.off(i._32,this.selectAll),this.parent.off(i._34,this.getSelectedHtml),this.parent.off(i._18,this.onSelectionSave),this.parent.off(i._19,this.onSelectionRestore),this.parent.off(i._43,this.updateReadOnly),this.parent.off(i._44,this.moduleDestroy))},e.prototype.render=function(){this.contentRenderer=this.renderFactory.getRenderer(s.a.Content);var e=this.contentRenderer.getEditPanel(),t={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};n.i(r.isNullOrUndefined)(this.parent.formatter)?this.parent.formatter=new o.a({element:e,options:t}):this.parent.formatter.updateFormatter(e,this.contentRenderer.getDocument(),t),this.parent.toolbarSettings.enable&&(this.toolbarUpdate=new l.a(this.parent)),this.parent.notify(i.n,{})},e.prototype.onPropertyChanged=function(e){if(!n.i(r.isNullOrUndefined)(e.newProp.formatter)){var t=this.contentRenderer.getEditPanel(),i={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};this.parent.formatter.updateFormatter(t,this.contentRenderer.getDocument(),i)}},e.prototype.getModuleName=function(){return"markdownEditor"},e.prototype.selectAll=function(){this.parent.formatter.editorManager.markdownSelection.setSelection(this.parent.contentModule.getEditPanel(),0,this.parent.contentModule.getEditPanel().value.length)},e.prototype.getSelectedHtml=function(e){e.callBack(this.parent.formatter.editorManager.markdownSelection.getSelectedText(this.parent.contentModule.getEditPanel()))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var i=n(1),r=n(9),o=(n.n(r),n(18)),s=(n.n(o),n(0)),a=(n.n(s),n(2)),l=n(15),d=n(20),c=n(3),u=n(5),h=n(14),p=(n.n(h),n(4)),m=function(){function e(e,t){this.inlineNode=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],this.blockNode=["div","h1","h2","h3","h4","h5","h6","address","blockquote","button","center","dd","dir","dl","dt","fieldset","frameset","hr","iframe","isindex","li","map","menu","noframes","noscript","object","ol","pre","td","tr","th","tbody","tfoot","thead","table","ul","header","article","nav","footer","section","aside","main","figure","figcaption"],this.isNotFromHtml=!1,this.containsHtml=!1,this.cropImageData=[],this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.i10n=t.getService("rteLocale"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return e.prototype.addEventListener=function(){this.nodeSelectionObj=new d.a,this.parent.isDestroyed||(this.parent.on(i._45,this.pasteClean,this),this.parent.on(i._89,this.setCssClass,this),this.parent.on(i.i,this.destroy,this))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i._45,this.pasteClean),this.parent.off(i._89,this.setCssClass),this.parent.off(i.i,this.destroy))},e.prototype.pasteClean=function(e){var t,r=this,o={requestType:"Paste",editorMode:this.parent.editorMode,event:e},a=null,l=!1;if(e.args&&!n.i(s.isNullOrUndefined)(e.args.clipboardData)&&(a=e.args.clipboardData.getData("text/html")),this.parent.trigger(i._76,{value:a}),e.args&&null!==a&&"HTML"===this.parent.editorMode){var d=void 0;if(0===a.length){var h=new RegExp(/<\/[a-z][\s\S]*>/i);if(a=e.args.clipboardData.getData("text/plain"),this.isNotFromHtml=""!==a,a=a.replace(/</g,"<"),a=a.replace(/>/g,">"),this.containsHtml=h.test(a),d=e&&e.args.clipboardData&&e.args.clipboardData.items.length>0?null===e.args.clipboardData.items[0].getAsFile()?n.i(s.isNullOrUndefined)(e.args.clipboardData.items[1])?null:e.args.clipboardData.items[1].getAsFile():e.args.clipboardData.items[0].getAsFile():null,this.parent.notify(i._36,{file:d,args:e.args,text:a,callBack:function(n){t=n,"object"==typeof t?r.parent.formatter.editorManager.execCommand("Images","Image",e.args,r.imageFormatting.bind(r,o),"pasteCleanup",t,"pasteCleanupModule"):a=t}}),!h.test(a)){var p=this.parent.createElement("div");p.innerHTML=this.splitBreakLine(a),a=p.innerHTML,l=!0}}else a.length>0&&this.parent.formatter.editorManager.observer.notify(c.k,{args:e.args,text:e.text,allowedStylePropertiesArray:this.parent.pasteCleanupSettings.allowedStyleProps,callBack:function(e,t){a=e.trim(),r.cropImageData=t}});this.contentRenderer=this.renderFactory.getRenderer(u.a.Content);var m=this.contentRenderer.getDocument(),f=this.nodeSelectionObj.getRange(m);this.saveSelection=this.nodeSelectionObj.save(f,m);var g=this.parent.createElement("div");g.innerHTML=a;var b=""!==g.textContent||!n.i(s.isNullOrUndefined)(g.querySelector("img"))||!n.i(s.isNullOrUndefined)(g.querySelector("table"));this.parent.trigger(i._95,{value:a},function(e){a=e.value}),this.parent.pasteCleanupSettings.prompt?b?(e.args.preventDefault(),this.pasteDialog(a,o,l)):-1!==s.Browser.userAgent.indexOf("Firefox")&&n.i(s.isNullOrUndefined)(d)&&this.fireFoxImageUpload():b||this.parent.pasteCleanupSettings.plainText||-1===s.Browser.userAgent.indexOf("Firefox")?this.parent.pasteCleanupSettings.plainText?(e.args.preventDefault(),this.plainFormatting(a,o,l)):this.parent.pasteCleanupSettings.keepFormat?(e.args.preventDefault(),this.formatting(a,!1,o)):(e.args.preventDefault(),this.formatting(a,!0,o)):this.fireFoxImageUpload()}},e.prototype.fireFoxImageUpload=function(){var e=this;setTimeout(function(){if(-1!==s.Browser.userAgent.indexOf("Firefox")){var t=e.nodeSelectionObj.getRange(e.contentRenderer.getDocument()).startContainer;"#text"!==t.nodeName&&(t=t.childNodes[e.nodeSelectionObj.getRange(e.contentRenderer.getDocument()).startOffset]),"IMG"===t.previousSibling.nodeName&&(n.i(s.isNullOrUndefined)(t.previousSibling.getAttribute("src"))||t.previousSibling.classList.add("pasteContent_Img"),t.previousSibling.classList.add(a._47),"inline"===e.parent.insertImageSettings.display?t.previousSibling.classList.add(a._3):t.previousSibling.classList.add(a.T),t.previousSibling.classList.add(),e.setImageProperties(t.previousSibling))}e.imgUploading(e.parent.inputElement)},500)},e.prototype.splitBreakLine=function(e){for(var t=e.split("\n"),i="",r="P"===this.parent.enterKey?"<p>":"DIV"===this.parent.enterKey?"<div>":"",o="P"===this.parent.enterKey?"</p>":"DIV"===this.parent.enterKey?"</div>":"<br>",s=0;s<t.length;s++)if(""===t[s].trim())i+=n.i(p.r)(this.parent);else{var a=this.makeSpace(t[s]);i+=(0===s&&"BR"!==this.parent.enterKey?"<span>":r)+(""===a.trim()?"<br>":a.trim())+(t.length-1===s&&"BR"===this.parent.enterKey?"":0===s&&"BR"!==this.parent.enterKey?"</span>":o)}return i},e.prototype.makeSpace=function(e){var t="",n=!0;e=e.replace(/\t/g," ");for(var i=e.split(" "),r=0;r<i.length;r++)""===i[r].trim()?t+=n?" ":" ":(n=!1,t+=i[r]+" ");return t},e.prototype.imgUploading=function(e){var t=e.querySelectorAll(".pasteContent_Img");if(this.parent.insertImageSettings.saveUrl&&t.length>0){for(var i=[],r=[],o=[],a=0;a<t.length;a++)!n.i(s.isNullOrUndefined)(t[a].getAttribute("src"))&&t[a].getAttribute("src").split(",")[0].indexOf("base64")>=0&&(i.push(t[a].getAttribute("src")),r.push(n.i(s.getUniqueID)("rte_image")),o.push(t[a]));for(var l=[],a=0;a<i.length;a++)l.push(this.base64ToFile(i[a],r[a]));for(var a=0;a<l.length;a++)this.uploadMethod(l[a],o[a]);n.i(s.isNullOrUndefined)(this.parent.insertImageSettings.path)&&"Blob"===this.parent.insertImageSettings.saveFormat&&this.getBlob(t)}else"Blob"===this.parent.insertImageSettings.saveFormat&&this.getBlob(t);for(var d=e.querySelectorAll(".pasteContent_Img"),a=0;a<d.length;a++)d[a].classList.remove("pasteContent_Img"),""===d[a].getAttribute("class").trim()&&t[a].removeAttribute("class")},e.prototype.getBlob=function(e){for(var t=0;t<e.length;t++)if(!n.i(s.isNullOrUndefined)(e[t].getAttribute("src"))&&e[t].getAttribute("src").split(",")[0].indexOf("base64")>=0){var i=URL.createObjectURL(n.i(p.v)(e[t].getAttribute("src")));e[t].setAttribute("src",i)}},e.prototype.toolbarEnableDisable=function(e){this.parent.inlineMode.enable||this.parent.toolbarModule.baseToolbar.toolbarObj.disable(e)},e.prototype.uploadMethod=function(e,t){var o=this,l=document.createElement("div");document.body.appendChild(l),l.setAttribute("display","none"),t.style.opacity="0.5";var d=this.parent.createElement("div");this.parent.element.appendChild(d);var c=this.parent.createElement("input",{id:this.parent.getID()+"_upload",attrs:{type:"File",name:"UploadFiles"}}),u=this.parent.iframeSettings.enable?-50:-90;this.popupObj=new r.Popup(d,{relateTo:t,height:"85px",width:"300px",offsetY:u,content:c,viewPortElement:this.parent.element,position:{X:"center",Y:"top"},enableRtl:this.parent.enableRtl,zIndex:10001,close:function(e){o.parent.isBlur=!1,o.popupObj.destroy(),n.i(s.detach)(o.popupObj.element)}}),this.popupObj.element.style.display="none",n.i(s.addClass)([this.popupObj.element],[a._54,a._53]),n.i(s.isNullOrUndefined)(this.parent.cssClass)||n.i(s.addClass)([this.popupObj.element],this.parent.cssClass);var p=e.size>1e6?300:100;setTimeout(function(){o.refreshPopup(t,o.popupObj)},p);this.uploadObj=new h.Uploader({asyncSettings:{saveUrl:this.parent.insertImageSettings.saveUrl,removeUrl:this.parent.insertImageSettings.removeUrl},cssClass:a._59,dropArea:this.parent.inputElement,allowedExtensions:this.parent.insertImageSettings.allowedTypes.toString(),success:function(e){setTimeout(function(){o.popupClose(o.popupObj,o.uploadObj,t,e)},900)},uploading:function(e){o.parent.isServerRendered||o.parent.trigger(i._57,e,function(e){e.cancel?(n.i(s.isNullOrUndefined)(t)||n.i(s.detach)(t),n.i(s.isNullOrUndefined)(o.popupObj.element)||n.i(s.detach)(o.popupObj.element)):o.parent.inputElement.contentEditable="false"})},beforeUpload:function(e){o.parent.trigger(i._70,e),o.toolbarEnableDisable(!0)},failure:function(e){setTimeout(function(){o.uploadFailure(t,o.uploadObj,o.popupObj,e)},900)},canceling:function(){o.parent.inputElement.contentEditable="true"," "===t.nextSibling.textContent&&n.i(s.detach)(t.nextSibling),n.i(s.detach)(t),o.popupObj.close()},selected:function(e){e.cancel=!0},removing:function(){o.parent.inputElement.contentEditable="true"," "===t.nextSibling.textContent&&n.i(s.detach)(t.nextSibling),n.i(s.detach)(t),o.popupObj.close()}}),this.uploadObj.appendTo(this.popupObj.element.childNodes[0]);var m=[{name:e.name,rawFile:e,size:e.size,type:e.type,validationMessages:{minSize:"",maxSize:""},statusCode:"1"}];this.uploadObj.createFileList(m),this.uploadObj.upload(m),this.popupObj.element.getElementsByClassName("e-file-select-wrap")[0].style.display="none",n.i(s.detach)(this.popupObj.element.querySelector(".e-rte-dialog-upload .e-file-select-wrap"))},e.prototype.uploadFailure=function(e,t,r,o){this.parent.inputElement.contentEditable="true",n.i(s.detach)(e),r&&r.close(),this.parent.trigger(i._59,o),t.destroy()},e.prototype.popupClose=function(e,t,r,o){var a=this;this.parent.inputElement.contentEditable="true",o.element=r,this.parent.trigger(i._58,o,function(e){if(!n.i(s.isNullOrUndefined)(a.parent.insertImageSettings.path)){var t=a.parent.insertImageSettings.path+e.file.name;r.src=t,r.setAttribute("alt",e.file.name)}}),e.close(),r.style.opacity="1",t.destroy(),this.toolbarEnableDisable(!1)},e.prototype.refreshPopup=function(e,t){(this.parent.iframeSettings.enable?this.parent.element.offsetTop+e.offsetTop:e.offsetTop)>this.parent.element.offsetTop+this.parent.element.offsetHeight?(t.relateTo=this.parent.inputElement,t.offsetY=this.parent.iframeSettings.enable?-30:-65,t.element.style.display="block"):t&&(t.refreshPosition(e),t.element.style.display="block")},e.prototype.base64ToFile=function(e,t){for(var i=e.split(","),r=i[0].match(/:(.*?);/)[1],o=r.split("/")[1],a=atob(i[1]),l=a.length,d=new Uint8Array(l);l--;)d[l]=a.charCodeAt(l);if(s.Browser.isIE||navigator.appVersion.indexOf("Edge")>-1){var c=new Blob([d],{type:o});return n.i(s.extend)(c,{name:t+"."+(n.i(s.isNullOrUndefined)(o)?"":o)}),c}return new File([d],t+"."+(n.i(s.isNullOrUndefined)(o)?"":o),{type:o})},e.prototype.imageFormatting=function(e,t){n.i(s.isNullOrUndefined)(t.elements[0].getAttribute("src"))||t.elements[0].classList.add("pasteContent_Img");var i=this.parent.createElement("span");i.appendChild(t.elements[0]);var r=i.innerHTML;this.contentRenderer=this.renderFactory.getRenderer(u.a.Content);var o=this.contentRenderer.getDocument(),a=this.nodeSelectionObj.getRange(o);this.saveSelection=this.nodeSelectionObj.save(a,o),this.parent.pasteCleanupSettings.prompt?this.pasteDialog(r,e,!1):this.parent.pasteCleanupSettings.plainText?this.plainFormatting(r,e,!1):this.parent.pasteCleanupSettings.keepFormat?this.formatting(r,!1,e):this.formatting(r,!0,e)},e.prototype.radioRender=function(){this.keepRadioButton=new o.RadioButton({label:this.i10n.getConstant("keepFormat"),name:"pasteOption",checked:!0}),this.keepRadioButton.isStringTemplate=!0;var e=this.parent.element.querySelector("#keepFormating");this.keepRadioButton.appendTo(e),this.cleanRadioButton=new o.RadioButton({label:this.i10n.getConstant("cleanFormat"),name:"pasteOption"}),this.cleanRadioButton.isStringTemplate=!0;var t=this.parent.element.querySelector("#cleanFormat");this.cleanRadioButton.appendTo(t),this.plainTextRadioButton=new o.RadioButton({label:this.i10n.getConstant("plainText"),name:"pasteOption"}),this.plainTextRadioButton.isStringTemplate=!0;var n=this.parent.element.querySelector("#plainTextFormat");this.plainTextRadioButton.appendTo(n)},e.prototype.selectFormatting=function(e,t,n,i,r){n?this.formatting(e,!1,t):i?this.formatting(e,!0,t):this.plainFormatting(e,t,r)},e.prototype.pasteDialog=function(e,t,n){var i=this,r=!1,o=this.parent.height,s={buttons:[{click:function(){if(!i.dialogObj.isDestroyed){var s=i.parent.element.querySelector("#keepFormating").checked,a=i.parent.element.querySelector("#cleanFormat").checked;i.dialogObj.hide(),i.parent.height=r?o:i.parent.height,r=!1;var l=i.dialogObj;i.dialogRenderObj.close(l),i.dialogObj.destroy(),i.selectFormatting(e,t,s,a,n)}},buttonModel:{isPrimary:!0,cssClass:"e-flat "+a._42,content:this.i10n.getConstant("pasteDialogOk")}},{click:function(){if(!i.dialogObj.isDestroyed){i.dialogObj.hide(),i.parent.height=r?o:i.parent.height,r=!1;var e=i.dialogObj;i.dialogRenderObj.close(e),i.dialogObj.destroy()}},buttonModel:{cssClass:"e-flat "+a._43,content:this.i10n.getConstant("pasteDialogCancel")}}],header:this.i10n.getConstant("pasteFormat"),content:this.i10n.getConstant("pasteFormatContent")+'<br/><div><div style="padding-top:24px;"><input type="radio" class="'+a._39+'" id="keepFormating"/></div><div style="padding-top:20px;"><input type="radio" class="'+a._40+'" id="cleanFormat"/></div><div style="padding-top:20px;"><input type="radio" class="'+a._41+'" id="plainTextFormat"/></div></div>',target:this.parent.element,width:"300px",height:"265px",cssClass:a._44,isModal:!0,visible:!1};this.dialogObj=this.dialogRenderObj.render(s);var l=this.parent.element.querySelector("#"+this.parent.getID()+"_pasteCleanupDialog");null!==l&&""!==l.innerHTML&&this.destroyDialog(l),null===l&&(l=this.parent.createElement("div",{id:this.parent.getID()+"_pasteCleanupDialog"}),this.parent.element.appendChild(l)),this.dialogObj.appendTo(l),this.radioRender(),this.parent.element.offsetHeight<parseInt(this.dialogObj.height.split("px")[0],null)&&(this.parent.setProperties({height:parseInt(this.dialogObj.height.split("px")[0],null)+40}),r=!0),this.dialogObj.show(),this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(s.isNullOrUndefined)(t.oldCssClass)?e.setProperties({cssClass:(e.cssClass+" "+t.cssClass).trim()}):e.setProperties({cssClass:(e.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){this.popupObj&&e.cssClass&&(n.i(s.isNullOrUndefined)(e.oldCssClass)?n.i(s.addClass)([this.popupObj.element],e.cssClass):(n.i(s.removeClass)([this.popupObj.element],e.oldCssClass),n.i(s.addClass)([this.popupObj.element],e.cssClass))),this.updateCss(this.dialogObj,e),this.updateCss(this.uploadObj,e),this.updateCss(this.plainTextRadioButton,e),this.updateCss(this.cleanRadioButton,e),this.updateCss(this.keepRadioButton,e)},e.prototype.destroyDialog=function(e){var t=this.parent.element.querySelector(".e-dlg-container");n.i(s.detach)(t);for(var i=e.children.length,r=0;r<i;r++)n.i(s.detach)(e.children[0])},e.prototype.cleanAppleClass=function(e){for(var t=e.querySelectorAll("br.Apple-interchange-newline"),i=0;i<t.length;i++)n.i(s.detach)(t[i]);return e},e.prototype.formatting=function(e,t,r){var o=this,a=this.parent.createElement("div",{className:"pasteContent",styles:"display:inline;"});this.isNotFromHtml&&this.containsHtml&&(e=this.splitBreakLine(e)),a.innerHTML=e,a=this.cleanAppleClass(a),null!==this.parent.pasteCleanupSettings.deniedTags&&(a=this.deniedTags(a)),t?a=this.deniedAttributes(a,t):null!==this.parent.pasteCleanupSettings.deniedAttrs&&(a=this.deniedAttributes(a,t)),null!==this.parent.pasteCleanupSettings.allowedStyleProps&&(a=this.allowedStyle(a)),this.saveSelection.restore(),a.innerHTML=this.sanitizeHelper(a.innerHTML);for(var l=a.querySelectorAll("img"),d=0;d<l.length;d++)n.i(s.isNullOrUndefined)(l[d].getAttribute("src"))||l[d].classList.add("pasteContent_Img"),this.setImageProperties(l[d]);if(this.addTempClass(a),""!==a.textContent||!n.i(s.isNullOrUndefined)(a.querySelector("img"))||!n.i(s.isNullOrUndefined)(a.querySelector("table"))){var c=this.parent.createElement("div");c.innerHTML=e;var u=[];if(!n.i(s.isNullOrUndefined)(c.querySelector("img"))){for(var h=c.querySelectorAll("img"),p=[],m=[],f=[],d=0;d<h.length;d++)h[d].getAttribute("src")&&h[d].getAttribute("src").split(",")[0].indexOf("base64")>=0&&(p.push(h[d].getAttribute("src")),m.push(n.i(s.getUniqueID)("rte_image")),f.push(h[d]));for(var g=[],b=void 0,d=0;d<p.length;d++)g.push(this.base64ToFile(p[d],m[d])),b={name:g[d].name,rawFile:g[d],size:g[d].size,type:g[d].type,status:"",validationMessages:{minSize:"",maxSize:""},statusCode:"1"},u.push(b)}this.parent.trigger(i._77,{value:a.innerHTML,filesData:u},function(t){e=t.value}),a.innerHTML=e,a=this.addTableClass(a),this.parent.formatter.editorManager.execCommand("inserthtml","pasteCleanup",r,function(e){n.i(s.extend)(r,{elements:e.elements,imageElements:e.imgElem},!0),o.parent.formatter.onSuccess(o.parent,r)},a,null,null,this.parent.enterKey),this.removeTempClass(),this.parent.notify(i.k,{}),this.cropImageHandler(this.parent.inputElement)}},e.prototype.cropImageHandler=function(e){var t=this,n=e.querySelectorAll(".e-img-cropped");if(n.length>0)for(var i=0;i<n.length;i++)!function(e){if(n[e].getAttribute("src").split(",")[0].indexOf("base64")>=0){var i=new Image;i.src=n[e].getAttribute("src");var r=document.createElement("canvas"),o=r.getContext("2d");i.onload=function(){var s=t.cropImageData[e].goalWidth/i.naturalWidth,a=t.cropImageData[e].goalHeight/i.naturalHeight,l=t.cropImageData[e].cropLength/s,d=t.cropImageData[e].cropTop/a,c=(t.cropImageData[e].goalWidth-t.cropImageData[e].cropLength-t.cropImageData[e].cropR)/s,u=(t.cropImageData[e].goalHeight-t.cropImageData[e].cropTop-t.cropImageData[e].cropB)/a;r.width=c,r.height=u,o.drawImage(i,l,d,c,u,0,0,c,u);var h=r.toDataURL("image/png");n[e].setAttribute("src",h),n[e].classList.remove("e-img-cropped"),t.imgUploading(t.parent.inputElement),t.parent.iframeSettings.enable&&t.parent.updateValue()}}}(i);else this.imgUploading(this.parent.inputElement),this.parent.iframeSettings.enable&&this.parent.updateValue()},e.prototype.addTableClass=function(e){for(var t=e.querySelectorAll("table"),n=0;n<t.length;n++)t[n].classList.contains("e-rte-table")||t[n].classList.add("e-rte-table");return e},e.prototype.setImageProperties=function(e){"auto"!==this.parent.insertImageSettings.width&&e.setAttribute("width",this.parent.insertImageSettings.width),"0"!==this.parent.insertImageSettings.minWidth&&0!==this.parent.insertImageSettings.minWidth&&(e.style.minWidth=this.parent.insertImageSettings.minWidth.toString()),null!==this.parent.insertImageSettings.maxWidth&&(e.style.maxWidth=this.parent.getInsertImgMaxWidth().toString()),"auto"!==this.parent.insertImageSettings.height&&e.setAttribute("height",this.parent.insertImageSettings.height),"0"!==this.parent.insertImageSettings.minHeight&&0!==this.parent.insertImageSettings.minHeight&&(e.style.minHeight=this.parent.insertImageSettings.minHeight.toString()),null!==this.parent.insertImageSettings.maxHeight&&(e.style.maxHeight=this.parent.insertImageSettings.maxHeight.toString())},e.prototype.addTempClass=function(e){for(var t=e.children,n=0;n<t.length;n++)t[n].classList.add("pasteContent_RTE")},e.prototype.removeTempClass=function(){for(var e=this.parent.inputElement.querySelectorAll(".pasteContent_RTE"),t=0;t<e.length;t++)e[t].classList.remove("pasteContent_RTE"),""===e[t].getAttribute("class")&&e[t].removeAttribute("class")},e.prototype.sanitizeHelper=function(e){return e=n.i(p.u)(e,this.parent)},e.prototype.plainFormatting=function(e,t,r){var o=this,a=this.parent.createElement("div",{className:"pasteContent",styles:"display:inline;"});if(a.innerHTML=e,this.detachInlineElements(a),this.getTextContent(a),""!==a.textContent.trim()){if(!n.i(s.isNullOrUndefined)(a.firstElementChild)&&"BR"!==a.firstElementChild.tagName){var l=a.firstElementChild;if(!n.i(s.isNullOrUndefined)(a.firstElementChild)){for(var d=this.parent.createElement("span"),c=0,u=0;c<l.childNodes.length;c++,u++)if("#text"===l.childNodes[c].nodeName)d.appendChild(l.childNodes[c]),a.insertBefore(d,a.firstElementChild),c--;else{if("#text"===l.childNodes[c].nodeName||0!==u)break;for(var h=0;h<l.childNodes[c].childNodes.length;h++)d.appendChild(l.childNodes[c].childNodes[h]),a.insertBefore(d,a.firstElementChild),h--;c--}l.hasChildNodes()||n.i(s.detach)(l)}}this.removeEmptyElements(a),this.saveSelection.restore(),a.innerHTML=this.sanitizeHelper(a.innerHTML),this.addTempClass(a),this.removingComments(a),"BR"!==this.parent.enterKey||r?"DIV"===this.parent.enterKey&&(a.innerHTML=a.innerHTML.replace(/<p class="pasteContent_RTE">/g,"<div>").replace(/<\/p>/g,"</div>")):a=this.reframeToBrContent(a),this.parent.trigger(i._77,{value:a.innerHTML,filesData:null},function(t){e=t.value}),a.innerHTML=e,this.parent.formatter.editorManager.execCommand("inserthtml","pasteCleanup",t,function(e){n.i(s.extend)(t,{elements:e.elements,imageElements:e.imgElem},!0),o.parent.formatter.onSuccess(o.parent,t)},a,null,null,this.parent.enterKey),this.removeTempClass()}else this.saveSelection.restore(),n.i(s.extend)(t,{elements:[]},!0),this.parent.formatter.onSuccess(this.parent,t)},e.prototype.removingComments=function(e){var t=e.innerHTML;t=t.replace(/<!--[\s\S]*?-->/g,""),e.innerHTML=t},e.prototype.reframeToBrContent=function(e){for(var t=this.parent.createElement("div",{className:"pasteContent",styles:"display:inline;"});!n.i(s.isNullOrUndefined)(e.firstChild);){var i=this.parent.createElement("br"),r=e.firstChild;if("#text"===r.nodeName){var o=!n.i(s.isNullOrUndefined)(r.nextSibling);t.appendChild(r),o&&t.appendChild(i)}else{var a="BR"===r.nodeName;a?t.appendChild(r):t.appendChild(r.childNodes[0]),n.i(s.isNullOrUndefined)(r)||n.i(s.isNullOrUndefined)(r.nextSibling)||t.appendChild(i),a||n.i(s.isNullOrUndefined)(r)||n.i(s.detach)(r)}}return t},e.prototype.getTextContent=function(e){for(var t=0;t<this.blockNode.length;t++)for(var i=e.querySelectorAll(this.blockNode[t]),r=0;r<i.length;r++){for(var o=void 0,a=0,l=0,d=void 0;a<i[r].childNodes.length;a++,l++)if("DIV"===i[r].childNodes[a].nodeName||"P"===i[r].childNodes[a].nodeName||"#text"===i[r].childNodes[a].nodeName&&" "!==i[r].childNodes[a].nodeValue.replace(/\u00a0/g," ")&&""===i[r].childNodes[a].textContent.trim())o=i[r].childNodes[a].parentElement,i[r].childNodes[a].parentElement.parentElement.insertBefore(i[r].childNodes[a],i[r].childNodes[a].parentElement),a--;else{if(o=i[r].childNodes[a].parentElement,"text"===d){var c=o.previousElementSibling;c.appendChild(i[r].childNodes[a])}else{var u=this.parent.createElement("div",{id:"newDiv"});u.appendChild(i[r].childNodes[a]),o.parentElement.insertBefore(u,o)}a--,d="text"}n.i(s.isNullOrUndefined)(o)||n.i(s.detach)(o)}for(var h=e.querySelectorAll("*"),t=0;t<h.length;t++)for(var p=h[t].attributes,r=0;r<p.length;r++)h[t].removeAttribute(p[r].name),r--},e.prototype.detachInlineElements=function(e){for(var t=0;t<this.inlineNode.length;t++)for(var i=e.querySelectorAll(this.inlineNode[t]),r=0;r<i.length;r++)if(i[r]!==e.firstChild||"SPAN"!==i[r].nodeName){for(var o=void 0,a=0;a<i[r].childNodes.length;a++)o=i[r].childNodes[a].parentElement,i[r].childNodes[a].parentElement.parentElement.insertBefore(i[r].childNodes[a],i[r].childNodes[a].parentElement),a--;n.i(s.isNullOrUndefined)(o)||n.i(s.detach)(o)}},e.prototype.findDetachEmptyElem=function(e){var t;if(n.i(s.isNullOrUndefined)(e.parentElement))t=null;else{t=e.parentElement.textContent.length>0&&e.parentElement.textContent.match(/\u00a0/g)&&e.parentElement.textContent.match(/\u00a0/g).length>0||""!==e.parentElement.textContent.trim()||"pasteContent"===e.parentElement.getAttribute("class")?e:this.findDetachEmptyElem(e.parentElement)}return t},e.prototype.removeEmptyElements=function(e){for(var t=e.querySelectorAll(":empty"),i=0;i<t.length;i++)if("BR"!==t[i].tagName){var r=this.findDetachEmptyElem(t[i]);n.i(s.isNullOrUndefined)(r)||n.i(s.detach)(r)}},e.prototype.tagGrouping=function(e){for(var t=e.slice(),n=Object.keys(l.f),i=n.map(function(e){return l.f[""+e]}),r=[],o=0;o<t.length;o++)if(t[o].split("[").length>1&&(t[o]=t[o].split("[")[0].trim()),n.indexOf(t[o])>-1)for(var s=0;s<i[n.indexOf(t[o])].length;s++)t.indexOf(i[n.indexOf(t[o])][s])<0&&r.indexOf(i[n.indexOf(t[o])][s])<0&&r.push(i[n.indexOf(t[o])][s]);return e=e.concat(r)},e.prototype.attributesfilter=function(e){for(var t=0;t<e.length;t++)if(e[t].split("[").length>1){for(var n=e[t].split("[")[1].split("]")[0].split(","),i=[],r=[],o=0;o<n.length;o++)n[o].indexOf("!")<0?i.push(n[o].trim()):r.push(n[o].split("!")[1].trim());var s=i.length>1?i.join("]["):i.join(),a=r.length>1?r.join("]["):r.join();if(a.length>0){var l=""!==s?e[t].split("[")[0]+"["+s+"]":e[t].split("[")[0];e[t]=l+":not(["+a+"])"}else e[t]=e[t].split("[")[0]+"["+s+"]"}return e},e.prototype.deniedTags=function(e){var t=n.i(s.isNullOrUndefined)(this.parent.pasteCleanupSettings.deniedTags)?[]:this.parent.pasteCleanupSettings.deniedTags.slice();t=this.attributesfilter(t),t=this.tagGrouping(t);for(var i=0;i<t.length;i++)for(var r=e.querySelectorAll(t[i]),o=r.length-1;o>=0;o--){for(var a=r[o].parentNode;r[o].firstChild;)a.insertBefore(r[o].firstChild,r[o]);a.removeChild(r[o])}return e},e.prototype.deniedAttributes=function(e,t){var i=n.i(s.isNullOrUndefined)(this.parent.pasteCleanupSettings.deniedAttrs)?[]:this.parent.pasteCleanupSettings.deniedAttrs.slice();t&&i.push("style");for(var r=0;r<i.length;r++)for(var o=e.querySelectorAll("["+i[r]+"]"),a=0;a<o.length;a++)o[a].removeAttribute(i[r]);return e},e.prototype.allowedStyle=function(e){var t=n.i(s.isNullOrUndefined)(this.parent.pasteCleanupSettings.allowedStyleProps)?[]:this.parent.pasteCleanupSettings.allowedStyleProps.slice();t.push("list-style-type","list-style");for(var i=e.querySelectorAll("[style]"),r=0;r<i.length;r++){for(var o="",a=[],l=i[r].getAttribute("style").split(";"),d=0;d<l.length;d++)t.indexOf(l[d].split(":")[0].trim())>=0&&a.push(l[d]);i[r].removeAttribute("style"),o=""===a.join(";").trim()?a.join(";"):a.join(";")+";",o&&i[r].setAttribute("style",o)}return e},e.prototype.getModuleName=function(){return"pasteCleanup"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(0),r=(n.n(i),n(5)),o=n(1),s=n(4),a=n(62),l=n(77),d=n(2),c=function(){function e(e,t){this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.renderFactory.addRenderer(r.a.Popup,new l.a(this.parent)),this.addEventListener()}return e.prototype.formatItems=function(e){var t=[];return e.forEach(function(e){if("string"==typeof e)switch(e.toLocaleLowerCase()){case"open":t.push("openLink");break;case"edit":t.push("editLink");break;case"unlink":t.push("removeLink");break;default:t.push(e)}else t.push(e)}),t},e.prototype.getQTBarOptions=function(e,t,n,i){return{popupType:e,toolbarItems:n,mode:t,renderType:i,cssClass:this.parent.getCssClass()}},e.prototype.createQTBar=function(e,t,n,i){if(n.length<1)return null;var r=new a.a(this.parent,this.locator);return r.render(this.getQTBarOptions(e,t,this.formatItems(n),i)),r},e.prototype.initializeQuickToolbars=function(){this.parent.quickToolbarModule=this,this.contentRenderer=this.renderFactory.getRenderer(r.a.Content),this.parent.inlineMode.enable&&this.parent.inlineMode.onSelection&&n.i(s.d)()&&i.EventHandler.add(this.contentRenderer.getDocument(),"selectionchange",this.selectionChangeHandler,this)},e.prototype.onMouseDown=function(e){this.parent.isBlur=!1,this.parent.isRTE=!0},e.prototype.keyUpQT=function(e){27===e.which&&this.hideQuickToolbars()},e.prototype.renderQuickToolbars=function(){this.linkQTBar||this.imageQTBar||this.audioQTBar||this.videoQTBar||this.textQTBar||this.tableQTBar||(this.linkQTBar=this.createQTBar("Link","Scrollable",this.parent.quickToolbarSettings.link,r.a.LinkToolbar),this.renderFactory.addRenderer(r.a.LinkToolbar,this.linkQTBar),n.i(i.isNullOrUndefined)(this.parent.quickToolbarSettings.text)||this.parent.inlineMode.enable||(this.textQTBar=this.createQTBar("Text","MultiRow",this.parent.quickToolbarSettings.text,r.a.TextToolbar),this.renderFactory.addRenderer(r.a.TextToolbar,this.textQTBar)),this.imageQTBar=this.createQTBar("Image","MultiRow",this.parent.quickToolbarSettings.image,r.a.ImageToolbar),this.renderFactory.addRenderer(r.a.ImageToolbar,this.imageQTBar),this.audioQTBar=this.createQTBar("Audio","MultiRow",this.parent.quickToolbarSettings.audio,r.a.AudioToolbar),this.renderFactory.addRenderer(r.a.AudioToolbar,this.audioQTBar),this.videoQTBar=this.createQTBar("Video","MultiRow",this.parent.quickToolbarSettings.video,r.a.VideoToolbar),this.renderFactory.addRenderer(r.a.VideoToolbar,this.videoQTBar),this.tableQTBar=this.createQTBar("Table","MultiRow",this.parent.quickToolbarSettings.table,r.a.TableToolbar),this.renderFactory.addRenderer(r.a.TableToolbar,this.tableQTBar),this.linkQTBar&&(i.EventHandler.add(this.linkQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.linkQTBar.element,"keyup",this.keyUpQT,this)),this.imageQTBar&&(i.EventHandler.add(this.imageQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.imageQTBar.element,"keyup",this.keyUpQT,this)),this.audioQTBar&&(i.EventHandler.add(this.audioQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.audioQTBar.element,"keyup",this.keyUpQT,this)),this.videoQTBar&&(i.EventHandler.add(this.videoQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.videoQTBar.element,"keyup",this.keyUpQT,this)),this.textQTBar&&(i.EventHandler.add(this.textQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.textQTBar.element,"keyup",this.keyUpQT,this)),this.tableQTBar&&(i.EventHandler.add(this.tableQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.tableQTBar.element,"keyup",this.keyUpQT,this)))},e.prototype.renderInlineQuickToolbar=function(){!this.parent.inlineMode.enable||i.Browser.isDevice&&!n.i(s.d)()||(n.i(i.addClass)([this.parent.element],[d.k]),this.inlineQTBar=this.createQTBar("Inline","MultiRow",this.parent.toolbarSettings.items,r.a.InlineToolbar),this.renderFactory.addRenderer(r.a.InlineToolbar,this.inlineQTBar),i.EventHandler.add(this.inlineQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.inlineQTBar.element,"keyup",this.keyUpQT,this))},e.prototype.showInlineQTBar=function(e,t,r){n.i(i.isNullOrUndefined)(this.parent)||this.parent.readonly||"img"===r.tagName.toLowerCase()||this.inlineQTBar.showPopup(e,t,r)},e.prototype.hideInlineQTBar=function(){this.inlineQTBar&&!n.i(s.b)(this.inlineQTBar.element,"e-popup-close")&&this.inlineQTBar.hidePopup()},e.prototype.hideQuickToolbars=function(){this.linkQTBar&&!n.i(s.b)(this.linkQTBar.element,"e-popup-close")&&document.body.contains(this.linkQTBar.element)&&this.linkQTBar.hidePopup(),this.textQTBar&&!n.i(s.b)(this.textQTBar.element,"e-popup-close")&&document.body.contains(this.textQTBar.element)&&this.textQTBar.hidePopup(),this.imageQTBar&&!n.i(s.b)(this.imageQTBar.element,"e-popup-close")&&document.body.contains(this.imageQTBar.element)&&this.imageQTBar.hidePopup(),this.audioQTBar&&!n.i(s.b)(this.audioQTBar.element,"e-popup-close")&&document.body.contains(this.audioQTBar.element)&&this.audioQTBar.hidePopup(),this.videoQTBar&&!n.i(s.b)(this.videoQTBar.element,"e-popup-close")&&document.body.contains(this.videoQTBar.element)&&this.videoQTBar.hidePopup(),this.tableQTBar&&!n.i(s.b)(this.tableQTBar.element,"e-popup-close")&&document.body.contains(this.tableQTBar.element)&&this.tableQTBar.hidePopup(),n.i(i.isNullOrUndefined)(this.parent)||!this.parent.inlineMode.enable||i.Browser.isDevice&&!n.i(s.d)()||this.hideInlineQTBar()},e.prototype.deBounce=function(e,t,n){var i=this;clearTimeout(this.deBouncer),this.deBouncer=window.setTimeout(function(){i.showInlineQTBar(e,t,n)},1e3)},e.prototype.mouseUpHandler=function(e){if(this.parent.inlineMode.enable&&(!i.Browser.isDevice||n.i(s.d)())){var t=e.args.touches?e.args.changedTouches[0]:e.args,r=this.parent.getRange(),o=e.args.target;if(n.i(i.isNullOrUndefined)(n.i(i.select)("."+d.w,document.body))){if(n.i(s.d)()&&e.touchData&&e.touchData.prevClientX!==e.touchData.clientX&&e.touchData.prevClientY!==e.touchData.clientY)return;this.hideInlineQTBar();var a=this.parent.element.getBoundingClientRect().left;if(this.offsetX=this.parent.iframeSettings.enable?window.pageXOffset+a+t.clientX:t.pageX,this.offsetY=n.i(s.f)(t,this.parent.element,this.parent.iframeSettings.enable),"TEXTAREA"===o.nodeName)this.showInlineQTBar(this.offsetX,this.offsetY,o);else{var l=n.i(i.closest)(o,"a");o=l||o;var c=this.parent.getRange().startContainer.parentElement,u=this.parent.getRange().endContainer.parentElement;if((n.i(i.isNullOrUndefined)(n.i(i.closest)(c,"A"))||n.i(i.isNullOrUndefined)(n.i(i.closest)(u,"A")))&&(!n.i(i.closest)(o,"td,th")||!r.collapsed)&&("IMG"!==o.tagName||this.parent.getRange().startOffset!==this.parent.getRange().endOffset)){if(this.parent.inlineMode.onSelection&&r.collapsed)return;this.target=o,this.showInlineQTBar(this.offsetX,this.offsetY,o)}}}}if(!n.i(i.isNullOrUndefined)(this.textQTBar)&&!n.i(i.isNullOrUndefined)(this.parent.quickToolbarSettings.text)&&!this.parent.inlineMode.enable){var t=e.args.touches?e.args.changedTouches[0]:e.args,o=e.args.target;this.hideQuickToolbars();var a=this.parent.element.getBoundingClientRect().left;this.offsetX=this.parent.iframeSettings.enable?this.parent.element.ownerDocument.documentElement.scrollLeft+a+t.clientX:t.pageX,this.offsetY=n.i(s.f)(t,this.parent.element,this.parent.iframeSettings.enable);var r=this.parent.getRange();if(r.endContainer.parentElement.tagName===r.startContainer.parentElement.tagName&&"A"===r.startContainer.parentElement.tagName&&"A"===r.endContainer.parentElement.tagName||"IMG"===o.tagName||"VIDEO"===o.tagName||"AUDIO"===o.tagName||1===o.childNodes[0].nodeType&&o.childNodes[0].classList.contains("e-rte-audio")||this.parent.getRange().startOffset===this.parent.getRange().endOffset)return;this.target=o,this.textQTBar.showPopup(this.offsetX,this.offsetY,o,"text")}},e.prototype.keyDownHandler=function(){!this.parent.inlineMode.enable||i.Browser.isDevice&&!n.i(s.d)()||n.i(i.isNullOrUndefined)(n.i(i.select)("."+d.w,document))||this.hideInlineQTBar(),this.textQTBar&&!n.i(s.b)(this.textQTBar.element,"e-popup-close")&&this.textQTBar.hidePopup()},e.prototype.inlineQTBarMouseDownHandler=function(){!this.parent.inlineMode.enable||i.Browser.isDevice&&!n.i(s.d)()||n.i(i.isNullOrUndefined)(n.i(i.select)("."+d.w,document))||this.hideInlineQTBar(),n.i(i.isNullOrUndefined)(this.parent.quickToolbarSettings.text)||this.textQTBar&&!n.i(s.b)(this.textQTBar.element,"e-popup-close")&&document.body.contains(this.textQTBar.element)&&this.textQTBar.hidePopup()},e.prototype.keyUpHandler=function(e){var t=e.args;if(this.parent.inlineMode.enable&&!i.Browser.isDevice){if(this.parent.inlineMode.onSelection)return void(this.parent.getSelection().length>0&&(t.ctrlKey&&65===t.keyCode||t.shiftKey&&(33===t.keyCode||34===t.keyCode||35===t.keyCode||36===t.keyCode||37===t.keyCode||38===t.keyCode||39===t.keyCode||40===t.keyCode))&&this.showInlineQTBar(this.offsetX,this.offsetY,t.target));this.deBounce(this.offsetX,this.offsetY,t.target)}this.parent.quickToolbarSettings.text&&!i.Browser.isDevice&&(t.ctrlKey&&65===t.keyCode||t.shiftKey&&(33===t.keyCode||34===t.keyCode||35===t.keyCode||36===t.keyCode||37===t.keyCode||38===t.keyCode||39===t.keyCode||40===t.keyCode))&&this.textQTBar.showPopup(this.offsetX,this.offsetY,t.target,"text")},e.prototype.selectionChangeHandler=function(e){var t=this;clearTimeout(this.deBouncer),this.deBouncer=window.setTimeout(function(){t.onSelectionChange(e)},1e3)},e.prototype.onSelectionChange=function(e){if(n.i(i.isNullOrUndefined)(n.i(i.select)("."+d.w,document.body))){this.contentRenderer.getDocument().getSelection().isCollapsed||this.mouseUpHandler({args:e})}},e.prototype.getInlineBaseToolbar=function(){return this.inlineQTBar&&this.inlineQTBar.quickTBarObj},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||(this.linkQTBar&&(i.EventHandler.remove(this.linkQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.linkQTBar.element,"keyup",this.keyUpQT),this.linkQTBar.destroy()),this.textQTBar&&(i.EventHandler.remove(this.textQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.textQTBar.element,"keyup",this.keyUpQT),this.textQTBar.destroy()),this.imageQTBar&&(i.EventHandler.remove(this.imageQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.imageQTBar.element,"keyup",this.keyUpQT),this.imageQTBar.destroy()),this.audioQTBar&&(i.EventHandler.remove(this.audioQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.audioQTBar.element,"keyup",this.keyUpQT),this.audioQTBar.destroy()),this.videoQTBar&&(i.EventHandler.remove(this.videoQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.videoQTBar.element,"keyup",this.keyUpQT),this.videoQTBar.destroy()),this.tableQTBar&&(i.EventHandler.remove(this.tableQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.tableQTBar.element,"keyup",this.keyUpQT),this.tableQTBar.destroy()),this.inlineQTBar&&(i.EventHandler.remove(this.inlineQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.inlineQTBar.element,"keyup",this.keyUpQT),n.i(s.d)()&&i.EventHandler.remove(document,"selectionchange",this.selectionChangeHandler),this.inlineQTBar.destroy()),this.removeEventListener())},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.wireInlineQTBarEvents=function(){this.parent.on(o.w,this.mouseUpHandler,this),this.parent.on(o._24,this.inlineQTBarMouseDownHandler,this),this.parent.on(o.v,this.keyDownHandler,this),this.parent.on(o.u,this.keyUpHandler,this),this.parent.on(o._25,this.mouseUpHandler,this),this.parent.on(o._35,this.renderInlineQuickToolbar,this),this.parent.on(o._44,this.moduleDestroy,this)},e.prototype.unWireInlineQTBarEvents=function(){this.parent.off(o.w,this.mouseUpHandler),this.parent.off(o._24,this.inlineQTBarMouseDownHandler),this.parent.off(o.v,this.keyDownHandler),this.parent.off(o.u,this.keyUpHandler),this.parent.off(o._25,this.mouseUpHandler),this.parent.off(o._35,this.renderInlineQuickToolbar),this.parent.off(o._44,this.moduleDestroy)},e.prototype.toolbarUpdated=function(e){this.linkQTBar&&!n.i(s.b)(this.linkQTBar.element,"e-popup-close")&&this.linkQTBar.hidePopup(),this.imageQTBar&&!n.i(s.b)(this.imageQTBar.element,"e-popup-close")&&this.imageQTBar.hidePopup(),this.audioQTBar&&!n.i(s.b)(this.audioQTBar.element,"e-popup-close")&&this.audioQTBar.hidePopup(),this.videoQTBar&&!n.i(s.b)(this.videoQTBar.element,"e-popup-close")&&this.videoQTBar.hidePopup(),this.tableQTBar&&!n.i(s.b)(this.tableQTBar.element,"e-popup-close")&&this.tableQTBar.hidePopup()},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(o.g,this.initializeQuickToolbars,this),this.parent.on(o._24,this.renderQuickToolbars,this),this.parent.on(o.m,this.toolbarUpdated,this),this.parent.on(o._68,this.renderQuickToolbars,this),this.wireInlineQTBarEvents(),this.parent.on(o.s,this.onPropertyChanged,this),"hide"===this.parent.quickToolbarSettings.actionOnScroll&&(this.parent.on(o._27,this.hideQuickToolbars,this),this.parent.on(o._28,this.hideQuickToolbars,this)),this.parent.on(o._31,this.hideQuickToolbars,this),this.parent.on(o.h,this.onIframeMouseDown,this),this.parent.on(o.i,this.destroy,this),this.parent.on(o.v,this.onKeyDown,this),this.parent.on(o._38,this.setRtl,this),this.parent.on(o._89,this.setCssClass,this),this.parent.on(o._94,this.hideQuickToolbars,this))},e.prototype.onKeyDown=function(e){var t=e.args;8!==t.which&&46!==t.which||(this.imageQTBar&&!n.i(s.b)(this.imageQTBar.element,"e-popup-close")&&this.imageQTBar.hidePopup(),this.audioQTBar&&!n.i(s.b)(this.audioQTBar.element,"e-popup-close")&&this.audioQTBar.hidePopup(),this.videoQTBar&&!n.i(s.b)(this.videoQTBar.element,"e-popup-close")&&this.videoQTBar.hidePopup(),this.tableQTBar&&!n.i(s.b)(this.tableQTBar.element,"e-popup-close")&&this.tableQTBar.hidePopup(),this.linkQTBar&&!n.i(s.b)(this.linkQTBar.element,"e-popup-close")&&this.linkQTBar.hidePopup(),this.textQTBar&&!n.i(s.b)(this.textQTBar.element,"e-popup-close")&&this.textQTBar.hidePopup())},e.prototype.onIframeMouseDown=function(){this.hideQuickToolbars(),this.hideInlineQTBar()},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(i.isNullOrUndefined)(t.oldCssClass&&e.quickTBarObj.toolbarObj.cssClass!==t.cssClass)?e.quickTBarObj.toolbarObj.setProperties({cssClass:(e.quickTBarObj.toolbarObj.cssClass+" "+t.cssClass).trim()}):e.quickTBarObj.toolbarObj.setProperties({cssClass:(e.quickTBarObj.toolbarObj.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){for(var t=[this.inlineQTBar,this.imageQTBar,this.linkQTBar,this.textQTBar,this.tableQTBar],n=0;n<t.length;n++)this.updateCss(t[n],e)},e.prototype.setRtl=function(e){this.inlineQTBar&&this.inlineQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.imageQTBar&&this.imageQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.audioQTBar&&this.audioQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.videoQTBar&&this.videoQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.linkQTBar&&this.linkQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.textQTBar&&this.textQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl})},e.prototype.removeEventListener=function(){this.deBouncer&&clearTimeout(this.deBouncer),this.parent.isDestroyed||(this.parent.off(o.g,this.initializeQuickToolbars),this.parent.off(o._24,this.renderQuickToolbars),this.parent.off(o.m,this.toolbarUpdated),this.parent.off(o._68,this.renderQuickToolbars),this.unWireInlineQTBarEvents(),this.parent.off(o.s,this.onPropertyChanged),"hide"===this.parent.quickToolbarSettings.actionOnScroll&&(this.parent.off(o._27,this.hideQuickToolbars),this.parent.off(o._28,this.hideQuickToolbars)),this.parent.off(o._31,this.hideQuickToolbars),this.parent.off(o.i,this.destroy),this.parent.off(o.h,this.onIframeMouseDown),this.parent.off(o.v,this.onKeyDown),this.parent.off(o._38,this.setRtl),this.parent.off(o._89,this.setCssClass),this.parent.off(o._94,this.hideQuickToolbars))},e.prototype.onPropertyChanged=function(e){if(!n.i(i.isNullOrUndefined)(e.newProp.quickToolbarSettings))for(var t=0,r=Object.keys(e.newProp.quickToolbarSettings);t<r.length;t++){var a=r[t];switch(a){case"actionOnScroll":"none"===e.newProp.quickToolbarSettings.actionOnScroll?(this.parent.off(o._27,this.hideQuickToolbars),this.parent.off(o._28,this.hideQuickToolbars)):(this.parent.on(o._27,this.hideQuickToolbars,this),this.parent.on(o._28,this.hideQuickToolbars,this))}}e.module===this.getModuleName()&&(this.inlineQTBar&&(n.i(i.removeClass)([this.parent.element],[d.k]),this.unWireInlineQTBarEvents(),this.hideInlineQTBar()),!this.parent.inlineMode.enable||i.Browser.isDevice&&!n.i(s.d)()||(n.i(i.addClass)([this.parent.element],[d.k]),this.wireInlineQTBarEvents()))},e.prototype.getModuleName=function(){return"quickToolbar"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.g,this.renderResizable,this),this.parent.on(r.i,this.destroy,this))},e.prototype.renderResizable=function(){var e=this.parent.enableRtl?o._68:o._46;this.resizer=this.parent.createElement("div",{id:this.parent.getID()+"-resizable",className:"e-icons "+o._45+" "+e}),this.parent.element.classList.add(o._60),this.parent.element.appendChild(this.resizer),this.touchStartEvent="msie"===i.Browser.info.name?"pointerdown":"touchstart",i.EventHandler.add(this.resizer,"mousedown",this.resizeStart,this),i.EventHandler.add(this.resizer,this.touchStartEvent,this.resizeStart,this)},e.prototype.resizeStart=function(e){var t=this;e.cancelable&&e.preventDefault(),this.wireResizeEvents(),this.parent.notify(r._72,{});var n={event:e,requestType:"editor"};this.parent.trigger(r.J,n,function(e){e.cancel&&t.unwireResizeEvents()})},e.prototype.performResize=function(e){var t=this,n={event:e,requestType:"editor"};this.parent.trigger(r.K,n,function(e){e.cancel&&t.unwireResizeEvents()});var s=this.parent.element.getBoundingClientRect();if(this.isMouseEvent(e)){this.parent.element.style.height=e.clientY-s.top+"px",this.parent.element.style.width=this.parent.enableRtl?s.right-e.clientX+"px":e.clientX-s.left+"px";var a=this.parent.toolbarModule.getToolbarElement();if(null!==a&&a.classList.contains(o.i)&&this.parent.toolbarSettings.enableFloating&&this.parent.getToolbar()&&!this.parent.inlineMode.enable){var l=this.parent.contentModule.getPanel(),d=l.getBoundingClientRect().width;a.style.width=d+"px"}}else{var c="msie"!==i.Browser.info.name?e.touches[0]:e;this.parent.element.style.height=c.clientY-s.top+"px",this.parent.element.style.width=this.parent.enableRtl?s.right-c.clientX+"px":c.clientX-s.left+"px"}this.parent.toolbarSettings.enable||this.parent.setContentHeight("",!1),this.parent.refreshUI()},e.prototype.stopResize=function(e){this.parent.refreshUI(),this.unwireResizeEvents();var t={event:e,requestType:"editor"};this.parent.trigger(r.L,t)},e.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},e.prototype.isMouseEvent=function(e){var t=!1;return("mouse"===this.getEventType(e.type)||!n.i(i.isNullOrUndefined)(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(t=!0),t},e.prototype.wireResizeEvents=function(){i.EventHandler.add(document,"mousemove",this.performResize,this),i.EventHandler.add(document,"mouseup",this.stopResize,this),this.touchMoveEvent="msie"===i.Browser.info.name?"pointermove":"touchmove",this.touchEndEvent="msie"===i.Browser.info.name?"pointerup":"touchend",i.EventHandler.add(document,this.touchMoveEvent,this.performResize,this),i.EventHandler.add(document,this.touchEndEvent,this.stopResize,this)},e.prototype.unwireResizeEvents=function(){i.EventHandler.remove(document,"mousemove",this.performResize),i.EventHandler.remove(document,"mouseup",this.stopResize),i.EventHandler.remove(document,this.touchMoveEvent,this.performResize),i.EventHandler.remove(document,this.touchEndEvent,this.stopResize)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.g,this.renderResizable),this.parent.element.classList.remove(o._60),i.EventHandler.remove(this.resizer,"mousedown",this.resizeStart),i.EventHandler.remove(this.resizer,this.touchStartEvent,this.resizeStart),this.resizer&&n.i(i.detach)(this.resizer),this.parent.off(r.i,this.destroy))},e.prototype.getModuleName=function(){return"resize"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(5),a=n(4),l=n(17),d=n(79),c=n(24),u=n(27),h=n(68),p=function(){function e(e,t){this.tools={},this.parent=e,this.isToolbar=!1,this.locator=t,this.isTransformChild=!1,this.renderFactory=this.locator.getService("rendererFactory"),l.x(this.parent),n.i(a.x)(this.parent),this.renderFactory.addRenderer(s.a.Toolbar,new d.a(this.parent,this.locator)),this.toolbarRenderer=this.renderFactory.getRenderer(s.a.Toolbar),this.baseToolbar=new c.a(this.parent,this.locator),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?n.i(i.extend)(this.tools,l.v,n.i(a.o)(this.parent.toolbarSettings.itemConfigs),!0):this.tools=l.v}return e.prototype.initializeInstance=function(){this.contentRenderer=this.renderFactory.getRenderer(s.a.Content),this.editableElement=this.contentRenderer.getEditPanel(),this.editPanel=this.contentRenderer.getPanel()},e.prototype.toolbarBindEvent=function(){this.parent.inlineMode.enable||(this.keyBoardModule=new i.KeyboardEvents(this.getToolbarElement(),{keyAction:this.toolBarKeyDown.bind(this),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"}))},e.prototype.toolBarKeyDown=function(e){switch(e.action){case"escape":this.parent.contentModule.getEditPanel().focus();break;case"enter":e.target.classList.contains("e-hor-nav")&&this.adjustContentHeight(e.target,!0)}},e.prototype.createToolbarElement=function(){this.tbElement=this.parent.createElement("div",{id:this.parent.getID()+"_toolbar"}),!i.Browser.isDevice&&this.parent.inlineMode.enable&&n.i(a.d)()||(this.parent.toolbarSettings.enableFloating&&!this.parent.inlineMode.enable?(this.tbWrapper=this.parent.createElement("div",{id:this.parent.getID()+"_toolbar_wrapper",innerHTML:this.tbElement.outerHTML,className:o.F}),this.tbElement=this.tbWrapper.firstElementChild,this.parent.element.insertBefore(this.tbWrapper,this.editPanel)):this.parent.element.insertBefore(this.tbElement,this.editPanel))},e.prototype.getToolbarMode=function(){var e;switch(this.parent.toolbarSettings.type){case s.b.Expand:e="Extended";break;case s.b.Scrollable:e="Scrollable";break;default:e="MultiRow"}return n.i(a.d)()&&this.parent.toolbarSettings.type===s.b.Expand&&(e=s.b.Scrollable),e},e.prototype.checkToolbarResponsive=function(e){if(!i.Browser.isDevice||n.i(a.d)())return!1;var t;return t=this.parent.toolbarSettings.type===s.b.Expand?s.b.MultiRow:this.parent.toolbarSettings.type,this.baseToolbar.render({container:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items,mode:t,target:e,cssClass:this.parent.getCssClass()}),this.parent.toolbarSettings.type===s.b.Expand&&(n.i(i.addClass)([e],["e-rte-tb-mobile"]),this.parent.inlineMode.enable?this.addFixedTBarClass():n.i(i.addClass)([e],[o.r])),this.wireEvents(),this.dropDownModule.renderDropDowns({container:e,containerType:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items}),this.parent.notify(r.o,{container:this.tbElement,containerType:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items}),!0},e.prototype.checkIsTransformChild=function(){this.isTransformChild=!1;for(var e=n.i(i.selectAll)('[style*="transform"]',document),t=0;t<e.length;t++)if(!n.i(i.isNullOrUndefined)(e[t].contains)&&e[t].contains(this.parent.element)){this.isTransformChild=!0;break}},e.prototype.toggleFloatClass=function(e){var t,r,s=!1,a=!1,l=this.parent.floatingToolbarOffset;e&&this.parent.iframeSettings.enable&&this.parent.inputElement.ownerDocument===e.target?r=e.target.body:e&&e.target!==document?r=e.target:(s=!0,r=document.body);var d=this.getToolbarHeight()+this.getExpandTBarPopHeight();if(this.isTransformChild){t=0;var c=0,u=this.parent.element.offsetHeight;if(s){var h=window.getComputedStyle(r);c=parseFloat(h.marginTop.split("px")[0])+parseFloat(h.paddingTop.split("px")[0])}var p=this.parent.element.getBoundingClientRect().top,m=i.Browser.isMSPointer&&s?window.pageYOffset:r.parentElement.scrollTop,f=r.getBoundingClientRect(),g=s?f.top+m:f.top,b=!(p-(s?0:g)+u>d+l);p>g+l||p<-u||p<0&&b?(a=!1,n.i(i.removeClass)([this.tbElement],[o.j])):p<g+l&&(t=p<0?-p+g:g-p,t=s?t-c:t,n.i(i.addClass)([this.tbElement],[o.j]),a=!0)}else{var v=this.parent.element.getBoundingClientRect();if(window.innerHeight<v.top)return;t=e&&e.target!==document?r.getBoundingClientRect().top:0,v.bottom<l+d+t||v.bottom<0||v.top>l+t?a=!1:(v.top<l||v.top<l+t)&&(a=!0)}a?(n.i(i.addClass)([this.tbElement],[o.i]),n.i(i.setStyleAttribute)(this.tbElement,{width:this.parent.element.offsetWidth+"px",top:l+t+"px"})):(n.i(i.removeClass)([this.tbElement],[o.i]),n.i(i.setStyleAttribute)(this.tbElement,{top:"0px",width:"100%"}))},e.prototype.renderToolbar=function(){if(this.initializeInstance(),this.createToolbarElement(),!this.checkToolbarResponsive(this.tbElement)){this.parent.inlineMode.enable?this.parent.notify(r._35,{}):(this.baseToolbar.render({container:"toolbar",items:this.parent.toolbarSettings.items,mode:this.getToolbarMode(),target:this.tbElement,cssClass:this.parent.getCssClass()}),this.parent.inlineMode.enable||(this.parent.toolbarSettings.enableFloating&&(this.checkIsTransformChild(),this.toggleFloatClass()),n.i(i.addClass)([this.parent.element],[o._67]),this.parent.toolbarSettings.type===s.b.Expand&&n.i(i.addClass)([this.parent.element],[o.m]))),this.wireEvents(),this.parent.inlineMode.enable&&!n.i(a.d)()&&this.addFixedTBarClass(),this.parent.inlineMode.enable||(this.dropDownModule.renderDropDowns({container:this.tbElement,containerType:"toolbar",items:this.parent.toolbarSettings.items}),this.parent.notify(r.o,{container:this.tbElement,containerType:"toolbar",items:this.parent.toolbarSettings.items}),this.refreshToolbarOverflow());var e=this.parent.element.querySelector("."+o._69),t=this.parent.element.querySelector(".e-source-content");(!this.parent.iframeSettings.enable&&!n.i(i.isNullOrUndefined)(e)&&"block"===e.style.display||this.parent.iframeSettings.enable&&!n.i(i.isNullOrUndefined)(t)&&"block"===t.style.display)&&(this.parent.notify(r.W,{targetItem:"SourceCode",updateItem:"Preview",baseToolbar:this.parent.getBaseToolbarObject()}),this.parent.disableToolbarItem(this.parent.toolbarSettings.items))}},e.prototype.addFixedTBarClass=function(){n.i(i.addClass)([this.tbElement],[o.h])},e.prototype.removeFixedTBarClass=function(){n.i(i.removeClass)([this.tbElement],[o.h])},e.prototype.showFixedTBar=function(){n.i(i.addClass)([this.tbElement],[o.L]),i.Browser.isIos&&n.i(i.addClass)([this.tbElement],[o._15])},e.prototype.hideFixedTBar=function(){this.isToolbar?this.isToolbar=!1:n.i(i.removeClass)([this.tbElement],[o.L,o._15])},e.prototype.updateItem=function(e){var t=this.tools[e.updateItem.toLocaleLowerCase()];"en-US"!==this.parent.locale&&(t.tooltip=n.i(a.g)(e.updateItem.toLocaleLowerCase(),this.locator));var r=this.tools[e.targetItem.toLocaleLowerCase()],o=n.i(a.j)(n.i(a.i)(r.subCommand),e.baseToolbar.toolbarObj.items)[0];if(n.i(i.isNullOrUndefined)(o))this.addTBarItem(e,0);else{var s=this.parent.inlineMode.enable?"_quick_":"_toolbar_";e.baseToolbar.toolbarObj.items[o].id=this.parent.getID()+s+t.id,e.baseToolbar.toolbarObj.items[o].prefixIcon=t.icon,e.baseToolbar.toolbarObj.items[o].tooltipText=t.tooltip,e.baseToolbar.toolbarObj.items[o].subCommand=t.subCommand,e.baseToolbar.toolbarObj.dataBind(),e.baseToolbar.toolbarObj.refreshOverflow()}},e.prototype.updateToolbarStatus=function(e){if(this.tbElement&&(!this.parent.inlineMode.enable||!n.i(a.d)()&&i.Browser.isDevice)){var t={args:e,dropDownModule:this.dropDownModule,parent:this.parent,tbElements:n.i(i.selectAll)("."+o.D,this.tbElement),tbItems:this.baseToolbar.toolbarObj.items};n.i(a.h)(t,!!this.parent.inlineMode.enable,this.parent)}},e.prototype.fullScreen=function(e){this.parent.fullScreenModule.showFullScreen(e)},e.prototype.hideScreen=function(e){this.parent.fullScreenModule.hideFullScreen(e)},e.prototype.getBaseToolbar=function(){return this.baseToolbar},e.prototype.addTBarItem=function(e,t){e.baseToolbar.toolbarObj.addItems([e.baseToolbar.getObject(e.updateItem,"toolbar")],t)},e.prototype.enableTBarItems=function(e,t,r,s){var l=n.i(a.j)(n.i(a.i)(t),e.toolbarObj.items);this.tbItems=n.i(i.selectAll)("."+o.D,e.toolbarObj.element);for(var d=0;d<l.length;d++){var c=this.tbItems[l[d]];c&&e.toolbarObj.enableItems(c,r)}n.i(i.select)("."+o._69,this.parent.element)||s||n.i(a.k)(e,this.parent.formatter.editorManager.undoRedoManager.getUndoStatus())},e.prototype.removeTBarItems=function(e){n.i(i.isNullOrUndefined)(this.baseToolbar.toolbarObj)&&(this.baseToolbar=this.parent.getBaseToolbarObject());var t=n.i(a.j)(n.i(a.i)(e),this.baseToolbar.toolbarObj.items);this.tbItems=this.parent.inlineMode.enable?n.i(i.selectAll)("."+o.D,this.baseToolbar.toolbarObj.element):n.i(i.selectAll)("."+o.D,this.parent.element);for(var r=0;r<t.length;r++)this.baseToolbar.toolbarObj.removeItems(this.tbItems[t[r]])},e.prototype.getExpandTBarPopHeight=function(){var e=0;if(this.parent.toolbarSettings.type===s.b.Expand&&this.tbElement.classList.contains("e-extended-toolbar")){var t=n.i(i.select)(".e-toolbar-extended",this.tbElement);t&&this.tbElement.classList.contains("e-expand-open")||t&&t.classList.contains("e-popup-open")?(n.i(i.addClass)([t],[o.N]),e+=t.offsetHeight,n.i(i.removeClass)([t],[o.N])):n.i(i.removeClass)([this.tbElement],[o._11])}return e},e.prototype.getToolbarHeight=function(){return this.tbElement.offsetHeight},e.prototype.getToolbarElement=function(){return n.i(i.select)("."+o.g,this.parent.element)},e.prototype.refreshToolbarOverflow=function(){this.parent.element.classList.remove(o.b),this.baseToolbar.toolbarObj.refreshOverflow(),this.parent.enableRtl&&this.parent.element.classList.add(o.b)},e.prototype.isToolbarDestroyed=function(){return this.baseToolbar.toolbarObj&&!this.baseToolbar.toolbarObj.isDestroyed},e.prototype.destroyToolbar=function(){if(this.isToolbarDestroyed()){this.parent.unWireScrollElementsEvents(),this.unWireEvents(),this.parent.notify(r.r,{}),this.dropDownModule.destroyDropDowns(),this.baseToolbar.toolbarObj.destroy(),this.removeEventListener(),n.i(i.removeClass)([this.parent.element],[o._67]),n.i(i.removeClass)([this.parent.element],[o.m]);var e=n.i(i.select)("."+o.F,this.parent.element),t=n.i(i.select)("."+o.g,this.parent.element);n.i(i.isNullOrUndefined)(e)?n.i(i.isNullOrUndefined)(t)||n.i(i.detach)(t):n.i(i.detach)(e)}},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.isToolbarDestroyed()&&(this.destroyToolbar(),this.keyBoardModule&&this.keyBoardModule.destroy())},e.prototype.moduleDestroy=function(){this.parent=null,this.baseToolbar.parent=null,this.toolbarActionModule.parent=null,this.dropDownModule.parent=null},e.prototype.scrollHandler=function(e){this.parent.inlineMode.enable||this.parent.toolbarSettings.enableFloating&&this.getDOMVisibility(this.tbElement)&&this.toggleFloatClass(e.args)},e.prototype.getDOMVisibility=function(e){return!(!e.offsetParent&&0===e.offsetWidth&&0===e.offsetHeight)},e.prototype.mouseDownHandler=function(){i.Browser.isDevice&&this.parent.inlineMode.enable&&!n.i(a.d)()&&this.showFixedTBar()},e.prototype.focusChangeHandler=function(){i.Browser.isDevice&&this.parent.inlineMode.enable&&!n.i(a.d)()&&(this.isToolbar=!1,this.hideFixedTBar())},e.prototype.dropDownBeforeOpenHandler=function(){this.isToolbar=!0},e.prototype.tbFocusHandler=function(e){var t=document.activeElement,r=n.i(i.closest)(t,".e-rte-toolbar");if(t===this.parent.getToolbarElement()||r===this.parent.getToolbarElement())for(var o=this.parent.getToolbarElement().querySelectorAll(".e-expended-nav"),s=0;s<o.length;s++)n.i(i.isNullOrUndefined)(this.parent.getToolbarElement().querySelector(".e-insert-table-btn"))?o[s].setAttribute("tabindex","0"):o[s].setAttribute("tabindex","1")},e.prototype.toolbarClickHandler=function(e){var t=n.i(i.closest)(e.originalEvent.target,".e-hor-nav");this.adjustContentHeight(t,!1)},e.prototype.adjustContentHeight=function(e,t){if(e&&this.parent.toolbarSettings.type===s.b.Expand&&!n.i(i.isNullOrUndefined)(e)){var r=this.tbElement.querySelector(".e-toolbar-extended");n.i(i.isNullOrUndefined)(r)||(n.i(i.setStyleAttribute)(r,{maxHeight:"",display:"block"}),n.i(i.setStyleAttribute)(r,{maxHeight:r.offsetHeight+"px",display:""}));var a=e.classList.contains("e-nav-active"),l=t?!a:!!a;l?n.i(i.addClass)([this.tbElement],[o._11]):n.i(i.removeClass)([this.tbElement],[o._11]),this.parent.setContentHeight("toolbar",l)}else(i.Browser.isDevice||this.parent.inlineMode.enable)&&(this.isToolbar=!0);n.i(i.isNullOrUndefined)(e)&&this.parent.toolbarSettings.type===s.b.Expand&&n.i(i.removeClass)([this.tbElement],[o._11])},e.prototype.wireEvents=function(){this.parent.inlineMode.enable&&n.i(a.d)()||i.EventHandler.add(this.tbElement,"focusin",this.tbFocusHandler,this)},e.prototype.unWireEvents=function(){i.EventHandler.remove(this.tbElement,"focusin",this.tbFocusHandler)},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.dropDownModule=new u.a(this.parent,this.locator),this.toolbarActionModule=new h.a(this.parent),this.parent.on(r.g,this.renderToolbar,this),this.parent.on(r._27,this.scrollHandler,this),this.parent.on(r.n,this.toolbarBindEvent,this),this.parent.on(r.m,this.updateToolbarStatus,this),this.parent.on(r.s,this.onPropertyChanged,this),this.parent.on(r.l,this.onRefresh,this),this.parent.on(r.i,this.destroy,this),this.parent.on(r.z,this.fullScreen,this),this.parent.on(r.A,this.hideScreen,this),this.parent.on(r.W,this.updateItem,this),this.parent.on(r._17,this.dropDownBeforeOpenHandler,this),this.parent.on(r._20,this.parent.setContentHeight,this.parent),this.parent.on(r._31,this.focusChangeHandler,this),this.parent.on(r._24,this.mouseDownHandler,this),this.parent.on(r._25,this.mouseDownHandler,this),this.parent.on(r._89,this.setCssClass,this),this.parent.on(r._44,this.moduleDestroy,this),this.parent.inlineMode.enable||n.i(a.d)()||this.parent.on(r.j,this.toolbarClickHandler,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.g,this.renderToolbar),this.parent.off(r._27,this.scrollHandler),this.parent.off(r.n,this.toolbarBindEvent),this.parent.off(r.m,this.updateToolbarStatus),this.parent.off(r.s,this.onPropertyChanged),this.parent.off(r.l,this.onRefresh),this.parent.off(r.i,this.destroy),this.parent.off(r.z,this.parent.fullScreenModule.showFullScreen),this.parent.off(r.A,this.parent.fullScreenModule.hideFullScreen),this.parent.off(r.W,this.updateItem),this.parent.off(r._17,this.dropDownBeforeOpenHandler),this.parent.off(r._20,this.parent.setContentHeight),this.parent.off(r._31,this.focusChangeHandler),this.parent.off(r._24,this.mouseDownHandler),this.parent.off(r._25,this.mouseDownHandler),this.parent.off(r._89,this.setCssClass),this.parent.off(r._44,this.moduleDestroy),this.parent.inlineMode.enable||n.i(a.d)()||this.parent.off(r.j,this.toolbarClickHandler))},e.prototype.setCssClass=function(e){this.toolbarObj&&e.cssClass&&(n.i(i.isNullOrUndefined)(e.oldCssClass)?this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass+" "+e.cssClass).trim()}):this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass.replace(e.oldCssClass,"").trim()+" "+e.cssClass).trim()}))},e.prototype.onRefresh=function(){this.parent.inlineMode.enable||this.refreshToolbarOverflow(),this.parent.setContentHeight("",!0)},e.prototype.onPropertyChanged=function(e){if(!n.i(i.isNullOrUndefined)(e.newProp.inlineMode))for(var t=0,r=Object.keys(e.newProp.inlineMode);t<r.length;t++){var o=r[t];switch(o){case"enable":this.refreshToolbar()}}e.module===this.getModuleName()&&this.refreshToolbar()},e.prototype.refreshToolbar=function(){n.i(i.isNullOrUndefined)(this.baseToolbar.toolbarObj)&&(this.baseToolbar=this.parent.getBaseToolbarObject());var e=n.i(i.select)("."+o.F,this.parent.element);(n.i(i.select)("."+o.g,this.parent.element)||e)&&this.destroyToolbar(),this.parent.toolbarSettings.enable&&(this.addEventListener(),this.renderToolbar(),this.parent.wireScrollElementsEvents(),n.i(i.select)("."+o._69,this.parent.element)||n.i(a.k)(this.baseToolbar,this.parent.formatter.editorManager.undoRedoManager.getUndoStatus()),this.parent.notify(r._75,{}))},e.prototype.getModuleName=function(){return"toolbar"},e}()},function(e,t,n){"use strict";var i=n(105);n.d(t,"a",function(){return i.a});var r=n(5);n.d(t,"b",function(){return r.a}),n.d(t,"c",function(){return r.b}),n.d(t,"d",function(){return r.c});var o=n(70);n.d(t,"e",function(){return o.a});var s=n(1);n.d(t,"f",function(){return s.a}),n.d(t,"g",function(){return s.b}),n.d(t,"h",function(){return s.c}),n.d(t,"i",function(){return s.d}),n.d(t,"j",function(){return s.e}),n.d(t,"k",function(){return s.f}),n.d(t,"l",function(){return s.g}),n.d(t,"m",function(){return s.h}),n.d(t,"n",function(){return s.i}),n.d(t,"o",function(){return s.j}),n.d(t,"p",function(){return s.k}),n.d(t,"q",function(){return s.l}),n.d(t,"r",function(){return s.m}),n.d(t,"s",function(){return s.n}),n.d(t,"t",function(){return s.o}),n.d(t,"u",function(){return s.p}),n.d(t,"v",function(){return s.q}),n.d(t,"w",function(){return s.r}),n.d(t,"x",function(){return s.s}),n.d(t,"y",function(){return s.t}),n.d(t,"z",function(){return s.u}),n.d(t,"A",function(){return s.v}),n.d(t,"B",function(){return s.w}),n.d(t,"C",function(){return s.x}),n.d(t,"D",function(){return s.y}),n.d(t,"E",function(){return s.z}),n.d(t,"F",function(){return s.A}),n.d(t,"G",function(){return s.B}),n.d(t,"H",function(){return s.C}),n.d(t,"I",function(){return s.D}),n.d(t,"J",function(){return s.E}),n.d(t,"K",function(){return s.F}),n.d(t,"L",function(){return s.G}),n.d(t,"M",function(){return s.H}),n.d(t,"N",function(){return s.I}),n.d(t,"O",function(){return s.J}),n.d(t,"P",function(){return s.K}),n.d(t,"Q",function(){return s.L}),n.d(t,"R",function(){return s.M}),n.d(t,"S",function(){return s.N}),n.d(t,"T",function(){return s.O}),n.d(t,"U",function(){return s.P}),n.d(t,"V",function(){return s.Q}),n.d(t,"W",function(){return s.R}),n.d(t,"X",function(){return s.S}),n.d(t,"Y",function(){return s.T}),n.d(t,"Z",function(){return s.U}),n.d(t,"_0",function(){return s.V}),n.d(t,"_1",function(){return s.W}),n.d(t,"_2",function(){return s.X}),n.d(t,"_3",function(){return s.Y}),n.d(t,"_4",function(){return s.Z}),n.d(t,"_5",function(){return s._0}),n.d(t,"_6",function(){return s._1}),n.d(t,"_7",function(){return s._2}),n.d(t,"_8",function(){return s._3}),n.d(t,"_9",function(){return s._4}),n.d(t,"_10",function(){return s._5}),n.d(t,"_11",function(){return s._6}),n.d(t,"_12",function(){return s._7}),n.d(t,"_13",function(){return s._8}),n.d(t,"_14",function(){return s._9}),n.d(t,"_15",function(){return s._10}),n.d(t,"_16",function(){return s._11}),n.d(t,"_17",function(){return s._12}),n.d(t,"_18",function(){return s._13}),n.d(t,"_19",function(){return s._14}),n.d(t,"_20",function(){return s._15}),n.d(t,"_21",function(){return s._16}),n.d(t,"_22",function(){return s._17}),n.d(t,"_23",function(){return s._18}),n.d(t,"_24",function(){return s._19}),n.d(t,"_25",function(){return s._20}),n.d(t,"_26",function(){return s._21}),n.d(t,"_27",function(){return s._22}),n.d(t,"_28",function(){return s._23}),n.d(t,"_29",function(){return s._24}),n.d(t,"_30",function(){return s._25}),n.d(t,"_31",function(){return s._26}),n.d(t,"_32",function(){return s._27}),n.d(t,"_33",function(){return s._28}),n.d(t,"_34",function(){return s._29}),n.d(t,"_35",function(){return s._30}),n.d(t,"_36",function(){return s._31}),n.d(t,"_37",function(){return s._32}),n.d(t,"_38",function(){return s._33}),n.d(t,"_39",function(){return s._34}),n.d(t,"_40",function(){return s._35}),n.d(t,"_41",function(){return s._36}),n.d(t,"_42",function(){return s._37}),n.d(t,"_43",function(){return s._38}),n.d(t,"_44",function(){return s._39}),n.d(t,"_45",function(){return s._40}),n.d(t,"_46",function(){return s._41}),n.d(t,"_47",function(){return s._42}),n.d(t,"_48",function(){return s._43}),n.d(t,"_49",function(){return s._44}),n.d(t,"_50",function(){return s._45}),n.d(t,"_51",function(){return s._46}),n.d(t,"_52",function(){return s._47}),n.d(t,"_53",function(){return s._48}),n.d(t,"_54",function(){return s._49}),n.d(t,"_55",function(){return s._50}),n.d(t,"_56",function(){return s._51}),n.d(t,"_57",function(){return s._52}),n.d(t,"_58",function(){return s._53}),n.d(t,"_59",function(){return s._54}),n.d(t,"_60",function(){return s._55}),n.d(t,"_61",function(){return s._56}),n.d(t,"_62",function(){return s._57}),n.d(t,"_63",function(){return s._58}),n.d(t,"_64",function(){return s._59}),n.d(t,"_65",function(){return s._60}),n.d(t,"_66",function(){return s._61}),n.d(t,"_67",function(){return s._62}),n.d(t,"_68",function(){return s._63}),n.d(t,"_69",function(){return s._64}),n.d(t,"_70",function(){return s._65}),n.d(t,"_71",function(){return s._66}),n.d(t,"_72",function(){return s._67}),n.d(t,"_73",function(){return s._68}),n.d(t,"_74",function(){return s._69}),n.d(t,"_75",function(){return s._70}),n.d(t,"_76",function(){return s._71}),n.d(t,"_77",function(){return s._72}),n.d(t,"_78",function(){return s._73}),n.d(t,"_79",function(){return s._74}),n.d(t,"_80",function(){return s._75}),n.d(t,"_81",function(){return s._76}),n.d(t,"_82",function(){return s._77}),n.d(t,"_83",function(){return s._78}),n.d(t,"_84",function(){return s._79}),n.d(t,"_85",function(){return s._80}),n.d(t,"_86",function(){return s._81}),n.d(t,"_87",function(){return s._82}),n.d(t,"_88",function(){return s._83}),n.d(t,"_89",function(){return s._84}),n.d(t,"_90",function(){return s._85}),n.d(t,"_91",function(){return s._86}),n.d(t,"_92",function(){return s._87}),n.d(t,"_93",function(){return s._88}),n.d(t,"_94",function(){return s._89}),n.d(t,"_95",function(){return s._90}),n.d(t,"_96",function(){return s._91}),n.d(t,"_97",function(){return s._92}),n.d(t,"_98",function(){return s._93}),n.d(t,"_99",function(){return s._94}),n.d(t,"_100",function(){return s._95}),n.d(t,"_101",function(){return s._96}),n.d(t,"_102",function(){return s._97});var a=n(2);n.d(t,"_103",function(){return a.a}),n.d(t,"_104",function(){return a.b}),n.d(t,"_105",function(){return a.c}),n.d(t,"_106",function(){return a.d}),n.d(t,"_107",function(){return a.e}),n.d(t,"_108",function(){return a.f}),n.d(t,"_109",function(){return a.g}),n.d(t,"_110",function(){return a.h}),n.d(t,"_111",function(){return a.i}),n.d(t,"_112",function(){return a.j}),n.d(t,"_113",function(){return a.k}),n.d(t,"_114",function(){return a.l}),n.d(t,"_115",function(){return a.m}),n.d(t,"_116",function(){return a.n}),n.d(t,"_117",function(){return a.o}),n.d(t,"_118",function(){return a.p}),n.d(t,"_119",function(){return a.q}),n.d(t,"_120",function(){return a.r}),n.d(t,"_121",function(){return a.s}),n.d(t,"_122",function(){return a.t}),n.d(t,"_123",function(){return a.u}),n.d(t,"_124",function(){return a.v}),n.d(t,"_125",function(){return a.w}),n.d(t,"_126",function(){return a.x}),n.d(t,"_127",function(){return a.y}),n.d(t,"_128",function(){return a.z}),n.d(t,"_129",function(){return a.A}),n.d(t,"_130",function(){return a.B}),n.d(t,"_131",function(){return a.C}),n.d(t,"_132",function(){return a.D}),n.d(t,"_133",function(){return a.E}),n.d(t,"_134",function(){return a.F}),n.d(t,"_135",function(){return a.G}),n.d(t,"_136",function(){return a.H}),n.d(t,"_137",function(){return a.I}),n.d(t,"_138",function(){return a.J}),n.d(t,"_139",function(){return a.K}),n.d(t,"_140",function(){return a.L}),n.d(t,"_141",function(){return a.M}),n.d(t,"_142",function(){return a.N}),n.d(t,"_143",function(){return a.O}),n.d(t,"_144",function(){return a.P}),n.d(t,"_145",function(){return a.Q}),n.d(t,"_146",function(){return a.R}),n.d(t,"_147",function(){return a.S}),n.d(t,"_148",function(){return a.T}),n.d(t,"_149",function(){return a.U}),n.d(t,"_150",function(){return a.V}),n.d(t,"_151",function(){return a.W}),n.d(t,"_152",function(){return a.X}),n.d(t,"_153",function(){return a.Y}),n.d(t,"_154",function(){return a.Z}),n.d(t,"_155",function(){return a._0}),n.d(t,"_156",function(){return a._1}),n.d(t,"_157",function(){return a._2}),n.d(t,"_158",function(){return a._3}),n.d(t,"_159",function(){return a._4}),n.d(t,"_160",function(){return a._5}),n.d(t,"_161",function(){return a._6}),n.d(t,"_162",function(){return a._7}),n.d(t,"_163",function(){return a._8}),n.d(t,"_164",function(){return a._9}),n.d(t,"_165",function(){return a._10}),n.d(t,"_166",function(){return a._11}),n.d(t,"_167",function(){return a._12}),n.d(t,"_168",function(){return a._13}),n.d(t,"_169",function(){return a._14}),n.d(t,"_170",function(){return a._15}),n.d(t,"_171",function(){return a._16}),n.d(t,"_172",function(){return a._17}),n.d(t,"_173",function(){return a._18}),n.d(t,"_174",function(){return a._19}),n.d(t,"_175",function(){return a._20}),n.d(t,"_176",function(){return a._21}),n.d(t,"_177",function(){return a._22}),n.d(t,"_178",function(){return a._23}),n.d(t,"_179",function(){return a._24}),n.d(t,"_180",function(){return a._25}),n.d(t,"_181",function(){return a._26}),n.d(t,"_182",function(){return a._27}),n.d(t,"_183",function(){return a._28}),n.d(t,"_184",function(){return a._29}),n.d(t,"_185",function(){return a._30}),n.d(t,"_186",function(){return a._31}),n.d(t,"_187",function(){return a._32}),n.d(t,"_188",function(){return a._33}),n.d(t,"_189",function(){return a._34}),n.d(t,"_190",function(){return a._35}),n.d(t,"_191",function(){return a._36}),n.d(t,"_192",function(){return a._37}),n.d(t,"_193",function(){return a._38}),n.d(t,"_194",function(){return a._39}),n.d(t,"_195",function(){return a._40}),n.d(t,"_196",function(){return a._41}),n.d(t,"_197",function(){return a._42}),n.d(t,"_198",function(){return a._43}),n.d(t,"_199",function(){return a._44}),n.d(t,"_200",function(){return a._45}),n.d(t,"_201",function(){return a._46}),n.d(t,"_202",function(){return a._47}),n.d(t,"_203",function(){return a._48}),n.d(t,"_204",function(){return a._49}),n.d(t,"_205",function(){return a._50}),n.d(t,"_206",function(){return a._51}),n.d(t,"_207",function(){return a._52}),n.d(t,"_208",function(){return a._53}),n.d(t,"_209",function(){return a._54}),n.d(t,"_210",function(){return a._55}),n.d(t,"_211",function(){return a._56}),n.d(t,"_212",function(){return a._57}),n.d(t,"_213",function(){return a._58}),n.d(t,"_214",function(){return a._59}),n.d(t,"_215",function(){return a._60}),n.d(t,"_216",function(){return a._61}),n.d(t,"_217",function(){return a._62}),n.d(t,"_218",function(){return a._63}),n.d(t,"_219",function(){return a._64}),n.d(t,"_220",function(){return a._65}),n.d(t,"_221",function(){return a._66}),n.d(t,"_222",function(){return a._67}),n.d(t,"_223",function(){return a._68}),n.d(t,"_224",function(){return a._69});var l=n(4);n.d(t,"_225",function(){return l.a}),n.d(t,"_226",function(){return l.b}),n.d(t,"_227",function(){return l.c}),n.d(t,"_228",function(){return l.d}),n.d(t,"_229",function(){return l.e}),n.d(t,"_230",function(){return l.f}),n.d(t,"_231",function(){return l.g}),n.d(t,"_232",function(){return l.h}),n.d(t,"_233",function(){return l.i}),n.d(t,"_234",function(){return l.j}),n.d(t,"_235",function(){return l.k}),n.d(t,"_236",function(){return l.l}),n.d(t,"_237",function(){return l.m}),n.d(t,"_238",function(){return l.n}),n.d(t,"_239",function(){return l.o}),n.d(t,"_240",function(){return l.p}),n.d(t,"_241",function(){return l.q}),n.d(t,"_242",function(){return l.r}),n.d(t,"_243",function(){return l.s}),n.d(t,"_244",function(){return l.t}),n.d(t,"_245",function(){return l.u}),n.d(t,"_246",function(){return l.v}),n.d(t,"_247",function(){return l.w}),n.d(t,"_248",function(){return l.x})},function(e,t,n){"use strict";n.d(t,"a",function(){return L});var i=n(0),r=(n.n(i),n(9)),o=(n.n(r),n(1)),s=n(2),a=n(78),l=n(80),d=n(70),c=n(32),u=n(31),h=n(5),p=n(63),m=n(28),f=n(25),g=n(107),b=n(108),v=n(73),C=n(65),y=n(64),N=n(95),S=n(3),E=n(4),T=n(74),O=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),w=this&&this.__assign||function(){return w=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},w.apply(this,arguments)},k=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},L=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.needsID=!0,i}return O(t,e),t.prototype.requiredModules=function(){var e=[];return this.toolbarSettings.enable&&(e.push({member:"toolbar",args:[this,this.serviceLocator]}),e.push({member:"link",args:[this,this.serviceLocator]}),e.push({member:"table",args:[this,this.serviceLocator]}),e.push({member:"image",args:[this,this.serviceLocator]}),this.quickToolbarSettings.enable&&e.push({member:"quickToolbar",args:[this,this.serviceLocator]})),this.showCharCount&&e.push({member:"count",args:[this,this.serviceLocator]}),"Markdown"===this.editorMode&&e.push({member:"markdownEditor",args:[this,this.serviceLocator]}),"HTML"===this.editorMode&&(e.push({member:"htmlEditor",args:[this,this.serviceLocator]}),e.push({member:"pasteCleanup",args:[this,this.serviceLocator]}),e.push({member:"audio",args:[this,this.serviceLocator]}),e.push({member:"video",args:[this,this.serviceLocator]}),e.push({member:"formatPainter",args:[this]}),e.push({member:"emojiPicker",args:[this,this.serviceLocator]})),this.fileManagerSettings.enable&&e.push({member:"fileManager",args:[this,this.serviceLocator]}),this.enableResize&&e.push({member:"resize",args:[this]}),e},t.prototype.updateEnable=function(){this.enabled?(n.i(i.removeClass)([this.element],s.d),this.element.setAttribute("aria-disabled","false"),n.i(i.isNullOrUndefined)(this.htmlAttributes.tabindex)?this.inputElement.setAttribute("tabindex","0"):this.inputElement.setAttribute("tabindex",this.htmlAttributes.tabindex)):(this.getToolbar()&&(n.i(i.removeClass)(this.getToolbar().querySelectorAll("."+s._10),s._10),n.i(i.removeClass)([this.getToolbar()],[s.i,s.j])),n.i(i.addClass)([this.element],s.d),this.element.tabIndex=-1,this.element.setAttribute("aria-disabled","true"),this.inputElement.setAttribute("tabindex","-1"))},t.prototype.setEnable=function(){this.updateEnable(),this.enabled?this.eventInitializer():this.unWireEvents()},t.prototype.initializeValue=function(){this.isFocusOut=!1,this.isRTE=!1,this.isBlur=!0,this.defaultResetValue=null,this.isResizeInitialized=!1},t.prototype.preRender=function(){this.initializeValue(),this.onBlurHandler=this.blurHandler.bind(this),this.onFocusHandler=this.focusHandler.bind(this),this.onResizeHandler=this.resizeHandler.bind(this),this.clickPoints={clientX:0,clientY:0},this.initialValue=this.value,this.serviceLocator=new c.a,this.initializeServices(),this.setContainer(),this.persistData(),n.i(i.setStyleAttribute)(this.element,{width:n.i(i.formatUnit)(this.width)}),n.i(i.attributes)(this.element,{role:"application","aria-label":"Rich Text Editor"})},t.prototype.persistData=function(){if(this.enablePersistence&&"TEXTAREA"===this.originalElement.tagName){this.element.id=this.originalElement.id+"_wrapper";var e=window.localStorage.getItem(this.getModuleName()+this.element.id);n.i(i.isNullOrUndefined)(e)||""===e||this.setProperties(JSON.parse(e),!0)}},t.prototype.setContainer=function(){this.originalElement=this.element.cloneNode(!0),null!==this.value&&null===this.valueTemplate||this.setValue(),this.element.hasAttribute("tabindex")&&(this.htmlAttributes={tabindex:this.element.getAttribute("tabindex")},this.element.removeAttribute("tabindex")),this.element.innerHTML="";for(var e=["class","style","id","ejs-for"],t={},r=0;r<this.element.attributes.length;r++)-1!==e.indexOf(this.element.attributes[r].name)||/^data-val/.test(this.element.attributes[r].name)||(t[this.element.attributes[r].name]=this.element.getAttribute(this.element.attributes[r].name));if(n.i(i.extend)(t,this.htmlAttributes,t),this.setProperties({htmlAttributes:t},!0),n.i(i.isNullOrUndefined)(this.htmlAttributes.id)||(this.element.id=this.htmlAttributes.id),"TEXTAREA"===this.element.tagName){var o=this.createElement("div",{className:this.element.getAttribute("class")});this.element.innerHTML="",this.element.parentElement.insertBefore(o,this.element),this.valueContainer=this.element,n.i(i.removeClass)([this.valueContainer],this.element.getAttribute("class").split(" ")),this.element=o}else this.valueContainer=this.createElement("textarea",{id:this.getID()+"-value",attrs:{"aria-labelledby":this.getID()}});if(this.valueContainer.name=this.getID(),n.i(i.addClass)([this.valueContainer],s._38),!n.i(i.isNullOrUndefined)(this.cssClass))for(var a=this.cssClass.split(" "),l=0;l<a.length;l++)n.i(i.addClass)([this.valueContainer],a[l]);this.element.appendChild(this.valueContainer)},t.prototype.getPersistData=function(){return this.addOnPersist(["value"])},t.prototype.focusIn=function(){this.enabled&&(this.inputElement.focus(),this.focusHandler({}))},t.prototype.focusOut=function(){this.enabled&&(this.inputElement.blur(),this.blurHandler({}))},t.prototype.selectAll=function(){this.notify(o._32,{})},t.prototype.selectRange=function(e){this.notify(o._33,{range:e})},t.prototype.getSelection=function(){var e="";return this.notify(o._34,{callBack:function(t){e=t}}),e},t.prototype.showEmojiPicker=function(e,t){this.readonly||this.notify(o._92,{x:e,y:t})},t.prototype.executeCommand=function(e,t,r){t=this.htmlPurifier(e,t);var s;if("HTML"===this.editorMode){var a=this.getRange();this.iframeSettings.enable&&this.formatter.editorManager.nodeSelection.Clear(this.element.ownerDocument);(!(!this.iframeSettings.enable||a.startContainer!==this.inputElement)||!this.inputElement.contains(a.startContainer))&&this.focusIn()}var l=d.a[""+e];if(r&&r.undo&&r.undo&&0===this.formatter.getUndoRedoStack().length&&this.formatter.saveData(),-1!==this.maxLength&&!n.i(i.isNullOrUndefined)(l.command)){var c=0;if("Links"===l.command&&(c=0===t.text.length?t.url.length:t.text.length),"Images"!==l.command&&"Table"!==l.command&&"Files"!==l.command||(c=1),"InsertHTML"===l.command)if(n.i(i.isNullOrUndefined)(t))n.i(i.isNullOrUndefined)(l.value)||"<hr/>"!==l.value&&"<br/>"!==l.value||(c=1);else{var u=this.createElement("div");u.innerHTML=t,c=u.textContent.length}"InsertText"===l.command&&(c=t.length);var h=this.getText().trim().replace(/(\r\n|\n|\r)/gm,"").replace(/\u200B/g,"").length,p=this.getSelection().length,m=h-p+c;if(!(-1===this.maxLength||m<=this.maxLength))return}s=t,"FormatPainter"===l.command&&(n.i(i.isNullOrUndefined)(t)||(this.formatPainterSettings=t),s={formatPainterAction:l.value}),this.formatter.editorManager.execCommand(l.command,l.subCommand?l.subCommand:s||l.value,null,null,s||l.value,s||l.value),r&&r.undo&&(this.formatter.saveData(),this.formatter.enableUndo(this)),this.setPlaceHolder(),this.notify(o.f,{})},t.prototype.htmlPurifier=function(e,t){if("HTML"===this.editorMode)switch(e){case"insertHTML":this.enableHtmlSanitizer&&(t="string"==typeof t?this.htmlEditorModule.sanitizeHelper(t):this.htmlEditorModule.sanitizeHelper(t.outerHTML));break;case"insertTable":n.i(i.isNullOrUndefined)(t.width)&&(t.width={minWidth:this.tableSettings.minWidth,maxWidth:this.tableSettings.maxWidth,width:this.tableSettings.width});break;case"insertImage":var r=this.createElement("img",{attrs:{src:t.url}}),o=r.outerHTML;this.enableHtmlSanitizer&&(o=this.htmlEditorModule.sanitizeHelper(r.outerHTML));var s=""!==o&&this.createElement("div",{innerHTML:o}).firstElementChild.getAttribute("src")||null;s=n.i(i.isNullOrUndefined)(s)?"":s,t.url=s,n.i(i.isNullOrUndefined)(t.width)&&(t.width={minWidth:this.insertImageSettings.minWidth,maxWidth:this.insertImageSettings.maxWidth,width:this.insertImageSettings.width}),n.i(i.isNullOrUndefined)(t.height)&&(t.height={minHeight:this.insertImageSettings.minHeight,maxHeight:this.insertImageSettings.maxHeight,height:this.insertImageSettings.height});break;case"insertAudio":var a=this.createElement("audio",{attrs:{controls:""}}),r=this.createElement("source",{attrs:{src:t.url,type:t.url&&t.url.split(".").length>0?"audio/"+t.url.split(".")[t.url.split(".").length-1]:""}});a.appendChild(r);var l=a.outerHTML;this.enableHtmlSanitizer&&(l=this.htmlEditorModule.sanitizeHelper(a.outerHTML));var s=""!==l&&this.createElement("div",{innerHTML:l}).firstElementChild.firstElementChild.getAttribute("src")||null;s=n.i(i.isNullOrUndefined)(s)?"":s,t.url=s;break;case"insertVideo":var a=this.createElement("video",{attrs:{controls:""}}),r=this.createElement("source",{attrs:{src:t.url,type:t.url&&t.url.split(".").length>0?"video/"+t.url.split(".")[t.url.split(".").length-1]:""}});a.appendChild(r);var l=a.outerHTML;this.enableHtmlSanitizer&&(l=this.htmlEditorModule.sanitizeHelper(r.outerHTML));var s=""!==l&&this.createElement("div",{innerHTML:l}).firstElementChild.getAttribute("src")||null;s=n.i(i.isNullOrUndefined)(s)?"":s,t.url=s,n.i(i.isNullOrUndefined)(t.width)&&(t.width={minWidth:this.insertVideoSettings.minWidth,maxWidth:this.insertVideoSettings.maxWidth,width:this.insertVideoSettings.width}),n.i(i.isNullOrUndefined)(t.height)&&(t.height={minHeight:this.insertVideoSettings.minHeight,maxHeight:this.insertVideoSettings.maxHeight,height:this.insertVideoSettings.height});break;case"createLink":var d=this.createElement("a",{attrs:{href:t.url}}),c=d.outerHTML;this.enableHtmlSanitizer&&(c=this.htmlEditorModule.sanitizeHelper(d.outerHTML));var u=""!==c&&this.createElement("div",{innerHTML:c}).firstElementChild.getAttribute("href")||null;u=n.i(i.isNullOrUndefined)(u)?"":u,t.url=u}return t},t.prototype.encode=function(e){var t=this.createElement("div");return t.innerText=e.trim(),t.innerHTML.replace(/<br\s*[\/]?>/gi,"\n")},t.prototype.render=function(){this.value&&!this.valueTemplate&&this.setProperties({value:this.serializeValue(this.value)},!0),this.renderModule=new a.a(this,this.serviceLocator),this.sourceCodeModule=new l.a(this,this.serviceLocator),this.notify(o.e,{}),this.trigger(o.d),this.RTERender();new p.a(this);this.notify(o.g,{}),this.enableXhtml&&this.setProperties({value:this.getXhtml()},!0),this.toolbarSettings.enable&&("Expand"===this.toolbarSettings.type||"MultiRow"===this.toolbarSettings.type||"Scrollable"===this.toolbarSettings.type)&&!n.i(i.isNullOrUndefined)(this.getToolbar())&&this.toolbarSettings.items.indexOf("Undo")>-1&&this.toolbarSettings.items.indexOf("Redo")>-1&&this.disableToolbarItem(["Undo","Redo"]),this.setContentHeight(),null!==this.value&&(this.valueContainer.defaultValue=this.value),this.enabled&&!this.readonly?this.eventInitializer():this.unWireEvents(),this.notify(o._89,{cssClass:this.getCssClass()}),this.addAudioVideoWrapper(),this.notify(o.c,{}),this.renderComplete()},t.prototype.addAudioVideoWrapper=function(){for(var e,t=this,n=this.element.querySelectorAll("audio"),r=0;r<n.length;r++)if(n[r].classList.contains("e-rte-audio")||(n[r].classList.add("e-rte-audio"),n[r].classList.add(s._4)),!n[r].parentElement.classList.contains(s.V)&&!n[r].parentElement.classList.contains(s.X)){var a=this.createElement("span",{className:s.X});a.setAttribute("style","width:300px; margin:0 auto;"),a.contentEditable="false";var l=this.createElement("span",{className:s.V});a.appendChild(l),n[r].parentNode.insertBefore(a,n[r].nextSibling),l.appendChild(n[r]),null===a.nextElementSibling&&(e=this.createElement("br"),a.parentNode.insertBefore(e,a.nextSibling))}for(var d=this.element.querySelectorAll("video"),r=0;r<d.length;r++){if(d[r].classList.contains("e-rte-video")||(d[r].classList.add("e-rte-video"),d[r].classList.add(s._5)),!d[r].parentElement.classList.contains(s.V)&&!d[r].parentElement.classList.contains(s.Y)){var c=this.createElement("span",{className:s.Y});c.contentEditable="false",d[r].parentNode.insertBefore(c,d[r].nextSibling),c.appendChild(d[r]),null===c.nextElementSibling&&(e=this.createElement("br"),c.parentNode.insertBefore(e,c.nextSibling))}-1!==i.Browser.userAgent.indexOf("Firefox")&&(d[r].addEventListener("play",function(e){t.notify(o._24,{args:e}),t.notify("editAreaClick",{args:e})}),d[r].addEventListener("pause",function(e){t.notify(o._24,{args:e}),t.notify("editAreaClick",{args:e})}))}},t.prototype.eventInitializer=function(){this.wireEvents()},t.prototype.cleanList=function(e){var t=this.getRange(),r=t.startContainer,o=t.endContainer,s=t.startOffset,a=r===o,l=(o.textContent.length,"#text"===t.endContainer.nodeName?t.endContainer.parentElement:t.endContainer),d=n.i(i.closest)(l,"LI"),c=!1,u=t.endOffset;if(o.nodeType===Node.TEXT_NODE&&"\ufeff"===o.textContent.charAt(u-1)&&u--,!n.i(i.isNullOrUndefined)(d)&&l.textContent.trim().length===u&&!t.collapsed&&n.i(i.isNullOrUndefined)(l.nextElementSibling)){for(var h=0;h<d.childNodes.length;h++)"#text"===d.childNodes[h].nodeName&&0===d.childNodes[h].textContent.trim().length&&(n.i(i.detach)(d.childNodes[h]),c=!0,h--);for(var p=d;null!==p.lastChild&&"#text"!==p.nodeName;)p=p.lastChild;if(c){var m="BR"!==p.nodeName||n.i(i.isNullOrUndefined)(p.previousSibling)?p:p.previousSibling;this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),a?m:r,m,s,"BR"===m.nodeName?0:m.textContent.length)}}},t.prototype.keyDown=function(e){if(this.notify(o.v,{member:"keydown",args:e}),this.restrict(e),"HTML"===this.editorMode&&this.cleanList(e),"HTML"===this.editorMode&&(8===e.which&&"Backspace"===e.code||46===e.which&&"Delete"===e.code)){var t=this.getRange(),r="#text"===t.startContainer.nodeName?t.startContainer.parentElement:t.startContainer;if(n.i(i.closest)(r,"pre")&&8===e.which&&8203===t.startContainer.textContent.charCodeAt(t.startOffset-1)||46===e.which&&8203===t.startContainer.textContent.charCodeAt(t.startOffset)){var s=new RegExp(String.fromCharCode(8203),"g"),a=8===e.which?t.startOffset-1:t.startOffset;t.startContainer.textContent=t.startContainer.textContent.replace(s,""),this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),t.startContainer,a)}else if("Backspace"===e.code&&8===e.which&&8203===t.startContainer.textContent.charCodeAt(0)&&t.collapsed){var l=t.startContainer.parentElement,d=void 0,c=void 0;for(c=0;c<l.childNodes.length;c++)l.childNodes[c]===t.startContainer&&(d=c);var u=!0,h=[];for(c=d;c>=0;c--)3===l.childNodes[c].nodeType&&8203===l.childNodes[c].textContent.charCodeAt(0)&&u?h.push(c):u=!1;if(h.length>0)for(c=h.length-1;c>0;c--)l.childNodes[h[c]].textContent="";this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),t.startContainer,t.startOffset)}}var p=!!n.i(i.isNullOrUndefined)(e.action)||"format-copy"!==e.action;if(0===this.formatter.getUndoRedoStack().length&&p&&!(e.altKey||e.shiftKey||e.altKey&&e.shiftKey&&67==e.which)&&this.formatter.saveData(),"insert-link"!==e.action&&"format-copy"!==e.action&&"format-paste"!==e.action&&(!e.target||!e.target.classList.contains("e-mention")||"Tab"!==e.code)&&(e.action&&"paste"!==e.action&&"space"!==e.action||9===e.which||"Backspace"===e.code&&8===e.which)){var m=!1;switch(n.i(i.isNullOrUndefined)(this.formatPainterModule)||(m="escape"===this.formatPainterModule.previousAction),m||this.formatter.process(this,null,e),e.action){case"toolbar-focus":if(this.toolbarSettings.enable&&this.getToolbarElement()){var f=this.getToolbarElement().querySelector(".e-toolbar-item:not(.e-overlay)[title]");f.firstElementChild.removeAttribute("tabindex"),f.firstElementChild.focus()}break;case"escape":this.contentModule.getEditPanel().focus()}}n.i(i.isNullOrUndefined)(this.placeholder)||(n.i(i.isNullOrUndefined)(this.placeHolderWrapper)||1===this.inputElement.textContent.length?this.iframeSettings.enable&&this.inputElement.classList.contains("e-rte-placeholder")?n.i(i.removeClass)([this.inputElement],"e-rte-placeholder"):this.setPlaceHolder():this.placeHolderWrapper.style.display="none"),this.autoResize()},t.prototype.keyUp=function(e){if("HTML"===this.editorMode){var t=this.getRange();if(-1!==i.Browser.userAgent.indexOf("Firefox")&&"#text"===t.startContainer.nodeName&&t.startContainer.parentElement===this.inputElement&&"BR"!==this.enterKey){var r=this.getRange(),s=this.createElement(this.enterKey);r.startContainer.parentElement.insertBefore(s,r.startContainer),s.appendChild(r.startContainer),this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),s.childNodes[0],s.childNodes[0],s.childNodes[0].textContent.length,s.childNodes[0].textContent.length)}}this.notify(o.u,{member:"keyup",args:e}),39!==e.keyCode&&37!==e.keyCode||this.notify(o.t,{member:"tableModulekeyUp",args:e}),"KeyX"!==e.code||88!==e.which||88!==e.keyCode||!e.ctrlKey||""!==this.inputElement.innerHTML&&"<br>"!==this.inputElement.innerHTML||(this.inputElement.innerHTML=n.i(E.p)(n.i(E.r)(this),this));var a=32===e.which||13===e.which||8===e.which||46===e.which,l="C"===e.key&&e.altKey&&e.shiftKey,d="V"===e.key&&e.altKey&&e.shiftKey;(!l&&!d&&("shift"!==e.key&&!e.ctrlKey&&e.key&&1===e.key.length||a)||"Markdown"===this.editorMode&&("shift"!==e.key&&!e.ctrlKey&&e.key&&1===e.key.length||a)&&!this.inlineMode.enable)&&this.formatter.onKeyHandler(this,e),(this.inputElement&&0!==this.inputElement.textContent.length||this.element.querySelectorAll(".e-toolbar-item.e-active").length>0||this.formatter.getUndoRedoStack().length>0)&&this.notify(o.k,{args:e}),n.i(i.isNullOrUndefined)(this.placeholder)||"Enter"===e.key&&13===e.keyCode||"<p><br></p>"!==this.inputElement.innerHTML&&"<div><br></div>"!==this.inputElement.innerHTML&&"<br>"!==this.inputElement.innerHTML||this.setPlaceHolder()},t.prototype.serializeValue=function(e){return"HTML"!==this.editorMode||n.i(i.isNullOrUndefined)(e)||(this.enableHtmlEncode?(e=this.htmlEditorModule.sanitizeHelper(n.i(E.t)(e)),e=this.encode(e)):(e=this.htmlEditorModule.sanitizeHelper(e),e=this.enableXhtml?this.htmlEditorModule.xhtmlValidation.selfEncloseValidation(e):e)),e},t.prototype.sanitizeHtml=function(e){return this.serializeValue(e)},t.prototype.updateValue=function(e){if(n.i(i.isNullOrUndefined)(e)){var t=this.inputElement.innerHTML;this.setProperties({value:n.i(E.s)(t)?null:t})}else this.setProperties({value:e})},t.prototype.triggerEditArea=function(e){if(n.i(E.d)()){var t=e.touches?e.changedTouches[0]:e;this.clickPoints.clientX===t.clientX&&this.clickPoints.clientY===t.clientY&&this.notify(o._26,{member:"editAreaClick",args:e})}else this.notify(o._26,{member:"editAreaClick",args:e})},t.prototype.notifyMouseUp=function(e){var t=e.touches?e.changedTouches[0]:e;this.notify(o.w,{member:"mouseUp",args:e,touchData:{prevClientX:this.clickPoints.clientX,prevClientY:this.clickPoints.clientY,clientX:t.clientX,clientY:t.clientY}}),(this.inputElement&&("HTML"===this.editorMode&&0!==this.inputElement.textContent.length||"Markdown"===this.editorMode&&0!==this.inputElement.value.length)||e.target&&("VIDEO"===e.target.nodeName||e.target.querySelectorAll("."+s.Y).length>0)||e.target&&"BR"!==e.target.nodeName&&(e.target.classList.contains(s.X)||e.target.classList.contains(s.V)||e.target.classList.contains(s.W)))&&this.notify(o.k,{args:e}),this.triggerEditArea(e)},t.prototype.mouseUp=function(e){if(this.quickToolbarSettings.showOnRightClick&&i.Browser.isDevice){var t=e.target,r=n.i(i.closest)(t,"table");if(t&&"A"===t.nodeName||"IMG"===t.nodeName||"TD"===t.nodeName||"TH"===t.nodeName||"TABLE"===t.nodeName||r&&this.contentModule.getEditPanel().contains(r))return}if(3===e.detail){var o=this.getRange();if(this.formatter.editorManager.domNode.getSelection().rangeCount>0&&!n.i(i.isNullOrUndefined)(o.startContainer.parentElement)&&(!n.i(i.isNullOrUndefined)(o.startContainer.parentElement.nextSibling)&&(3!==o.startContainer.parentElement.nextSibling.nodeType||/\s+$/.test(o.startContainer.parentElement.nextSibling.textContent))||o.startOffset===o.endOffset)||"li"===o.startContainer.parentElement.tagName.toLocaleLowerCase()){var s=new Range,a=o.startContainer,l=o.endContainer,d=!1,c="OL"===o.commonAncestorContainer.nodeName||"UL"===o.commonAncestorContainer.nodeName||"LI"===o.commonAncestorContainer.nodeName;for(c||1!==l.nodeType||"LI"!==l.nodeName?c&&1===l.nodeType&&0===o.endOffset?l.previousElementSibling&&l.previousElementSibling.lastElementChild?l=l.previousElementSibling.lastElementChild:(l=n.i(i.closest)(l.parentElement,"li"))&&"LI"===l.nodeName&&(l=l.previousElementSibling):!n.i(i.closest)(l,"li")&&l.previousElementSibling&&l.previousElementSibling.lastChild&&l.previousElementSibling.textContent.trim().length>0?l=l.previousElementSibling.lastChild:n.i(i.closest)(l,"li")&&l.previousElementSibling&&l.previousElementSibling.lastChild&&(l=n.i(i.closest)(l,"li").parentElement.previousElementSibling.lastChild):l=n.i(i.closest)(l,"ol, ul").previousElementSibling.lastElementChild,l&&l!==this.inputElement||(l=a,d=!0);"#text"!==l.nodeName&&!d;)l=l.lastElementChild?l.lastElementChild:l.lastChild;s.setStart(a,0),s.setEnd(l,l.textContent.length),this.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(),s)}}this.notifyMouseUp(e)},t.prototype.ensureModuleInjected=function(e){return this.getInjectedModules().indexOf(e)>=0},t.prototype.onCopy=function(){this.contentModule.getDocument().execCommand("copy",!1,null)},t.prototype.onCut=function(){this.contentModule.getDocument().execCommand("cut",!1,null)},t.prototype.onPaste=function(e){var t=this,r={originalEvent:e,cancel:!1,requestType:"Paste"};this.trigger(o.S,r,function(r){var s=t.inputElement.textContent.length,a=t.getSelection().length,l=n.i(i.isNullOrUndefined)(e)||n.i(i.isNullOrUndefined)(e.clipboardData)?0:e.clipboardData.getData("text/plain").replace(/(\r\n|\n|\r)/gm,"").replace(/\u200B/g,"").length,d=s-a+l;if("Markdown"===t.editorMode){var c={requestType:"Paste",editorMode:t.editorMode,event:e};return setTimeout(function(){t.formatter.onSuccess(t,c)},0),void(-1===t.maxLength||d<=t.maxLength||e.preventDefault())}if(!r.cancel&&"true"===t.inputElement.contentEditable&&(-1===t.maxLength||d<=t.maxLength))if(n.i(i.isNullOrUndefined)(t.pasteCleanupModule)){var u={requestType:"Paste",editorMode:t.editorMode,event:e},h=null,p=!1;e&&!n.i(i.isNullOrUndefined)(e.clipboardData)&&(h=e.clipboardData.getData("text/plain"),p=e.clipboardData.getData("text/html").indexOf("MsoNormal")>0);var m=e&&e.clipboardData&&e.clipboardData.items.length>0?e.clipboardData.items[0].getAsFile():null;null!==h&&t.notify(o._36,{file:m,args:e,text:h,isWordPaste:p}),setTimeout(function(){t.formatter.onSuccess(t,u)},0)}else t.notify(o._45,{args:e});else e.preventDefault()})},t.prototype.clipboardAction=function(e,t){switch(e.toLowerCase()){case"cut":this.onCut(),this.formatter.onSuccess(this,{requestType:"Cut",editorMode:this.editorMode,event:t});break;case"copy":this.onCopy(),this.formatter.onSuccess(this,{requestType:"Copy",editorMode:this.editorMode,event:t});break;case"paste":this.onPaste(t)}},t.prototype.destroy=function(){if(!this.isDestroyed&&this.isRendered){if(n.i(i.isNullOrUndefined)(this.timeInterval)||(clearInterval(this.timeInterval),this.timeInterval=null),null===this.element.offsetParent)return n.i(i.isNullOrUndefined)(this.toolbarModule)||this.toolbarModule.destroy(),this.notify(o._44,{}),e.prototype.destroy.call(this),void(this.isRendered=!1);if(this.notify(o.i,{}),this.destroyDependentModules(),this.unWireEvents(),"TEXTAREA"===this.originalElement.tagName){this.element.parentElement.insertBefore(this.valueContainer,this.element),this.valueContainer.id=this.getID(),this.valueContainer.removeAttribute("name"),n.i(i.detach)(this.element),""!==this.originalElement.innerHTML.trim()?(this.valueContainer.value=this.originalElement.innerHTML.trim(),this.setProperties({value:n.i(i.isNullOrUndefined)(this.initialValue)?null:this.initialValue},!0)):this.valueContainer.value=this.valueContainer.defaultValue,this.element=this.valueContainer;for(var t=0;t<this.originalElement.classList.length;t++)n.i(i.addClass)([this.element],this.originalElement.classList[t]);if(!n.i(i.isNullOrUndefined)(this.cssClass))for(var r=this.cssClass.split(" "),t=0;t<r.length;t++)n.i(i.addClass)([this.element],r[t]);n.i(i.removeClass)([this.element],s._38)}else""!==this.originalElement.innerHTML.trim()?(this.element.innerHTML=this.originalElement.innerHTML.trim(),this.setProperties({value:n.i(i.isNullOrUndefined)(this.initialValue)?null:this.initialValue},!0)):this.element.innerHTML="";if(this.placeholder&&this.placeHolderWrapper&&(this.placeHolderWrapper=null),!n.i(i.isNullOrUndefined)(this.cssClass))for(var a=this.cssClass.split(" "),t=0;t<a.length;t++)""!==a[t].trim()&&n.i(i.removeClass)([this.element],a[t]);this.removeHtmlAttributes(),this.removeAttributes(),e.prototype.destroy.call(this),this.isRendered=!1}},t.prototype.removeHtmlAttributes=function(){if(this.htmlAttributes)for(var e=Object.keys(this.htmlAttributes),t=0;t<e.length&&this.element.hasAttribute(e[t]);t++)this.element.removeAttribute(e[t])},t.prototype.removeAttributes=function(){this.enabled||n.i(i.removeClass)([this.element],s.d),this.enableRtl&&n.i(i.removeClass)([this.element],s.b),this.readonly&&n.i(i.removeClass)([this.element],s._31),""!==this.element.style.width&&""===this.originalElement.style.width&&this.element.style.removeProperty("width"),""!==this.element.style.height&&""===this.originalElement.style.height&&this.element.style.removeProperty("height"),this.element.removeAttribute("aria-disabled"),this.element.removeAttribute("role"),this.element.removeAttribute("tabindex")},t.prototype.destroyDependentModules=function(){this.renderModule.destroy(),this.formatter.editorManager.undoRedoManager.destroy(),this.sourceCodeModule.destroy()},t.prototype.getContent=function(){return this.contentModule.getPanel()},t.prototype.getText=function(){return this.contentModule.getText()},t.prototype.getSelectedHtml=function(){var e,t=this.createElement("div"),n=this.contentModule.getDocument().getSelection();if(n.rangeCount>0){e=n.getRangeAt(0);var i=e.cloneContents();t.appendChild(i)}return t.innerHTML},t.prototype.showInlineToolbar=function(){if(this.inlineMode.enable){var e=this.getRange(),t="#text"===e.endContainer.nodeName?e.endContainer.parentElement:e.endContainer,n=e.getClientRects()[0].left,i=e.getClientRects()[0].top;this.quickToolbarModule.showInlineQTBar(n,i,t)}},t.prototype.hideInlineToolbar=function(){this.quickToolbarModule.hideInlineQTBar()},t.prototype.getModuleName=function(){return"richtexteditor"},t.prototype.onPropertyChanged=function(t,r){for(var a=0,l=Object.keys(t);a<l.length;a++){var d=l[a];switch(d){case"enterKey":case"value":var c=void 0;c="enterKey"===d?null===this.value||"<div><br></div>"===this.value||"<p><br></p>"===this.value||"<br>"===this.value?null:this.value:t[d],c=this.serializeValue(c);var u="HTML"===this.editorMode?n.i(E.p)(c,this):c;(!n.i(i.isNullOrUndefined)(c)&&""!==c||"enterKey"===d)&&this.setProperties({value:this.enableHtmlEncode?this.encode(n.i(E.t)(u)):u},!0),this.updatePanelValue(),this.inputElement&&this.notify(o.c,{}),this.setPlaceHolder(),this.notify(o._69,{module:"XhtmlValidation",newProp:t,oldProp:r}),this.enableXhtml&&this.setProperties({value:this.getXhtml()},!0),this.showCharCount&&this.countModule.refresh(),this.addAudioVideoWrapper();break;case"valueTemplate":this.setValue(!0),this.showCharCount&&this.countModule.refresh();break;case"width":this.setWidth(t[d]),this.toolbarSettings.enable&&!this.inlineMode.enable&&(this.toolbarModule.refreshToolbarOverflow(),this.resizeHandler());break;case"height":this.setHeight(t[d]),this.setContentHeight(),this.autoResize();break;case"readonly":this.setReadOnly(!1);break;case"cssClass":this.element.classList.remove(r[d]),this.setCssClass(t[d]),this.notify(o._89,{cssClass:t[d],oldCssClass:r[d]});break;case"enabled":this.setEnable();break;case"enableRtl":this.updateRTL();break;case"placeholder":this.placeholder=t[d],this.setPlaceHolder();break;case"htmlAttributes":n.i(C.a)(this.htmlAttributes,this,!1,!1);break;case"iframeSettings":var h=r[d];if(h.resources){var p=this.contentModule.getDocument(),m=p.querySelector("head"),f=void 0;h.resources.scripts&&(f=m.querySelectorAll("."+s.e),this.removeSheets(f)),h.resources.styles&&(f=m.querySelectorAll("."+s.f),this.removeSheets(f))}this.setIframeSettings();break;case"locale":e.prototype.refresh.call(this);break;case"inlineMode":this.notify(o.s,{module:"quickToolbar",newProp:t,oldProp:r}),this.setContentHeight();break;case"toolbarSettings":this.notify(o.s,{module:"toolbar",newProp:t,oldProp:r}),this.setContentHeight();break;case"maxLength":this.showCharCount&&this.countModule.refresh();break;case"showCharCount":t[d]&&this.countModule?this.countModule.renderCount():!1===t[d]&&this.countModule&&this.countModule.destroy();break;case"enableHtmlEncode":this.updateValueData(),this.updatePanelValue(),this.setPlaceHolder(),this.showCharCount&&this.countModule.refresh();break;case"undoRedoSteps":case"undoRedoTimer":this.formatter.editorManager.observer.notify(S.i,{newProp:t,oldProp:r});break;case"enableXhtml":this.notify(o._69,{module:"XhtmlValidation",newProp:t,oldProp:r});break;case"quickToolbarSettings":t.quickToolbarSettings.showOnRightClick?this.wireContextEvent():this.unWireContextEvent(),this.notify(o.s,{newProp:t,oldProp:r});break;case"formatPainterSettings":this.formatter.editorManager.observer.notify(S.i,{module:"formatPainter",newProp:t});break;default:this.notify(o.s,{newProp:t,oldProp:r})}}},t.prototype.updateValueData=function(){this.enableHtmlEncode?this.setProperties({value:this.encode(n.i(E.t)(this.inputElement.innerHTML))},!0):this.setProperties({value:/<[a-z][\s\S]*>/i.test(this.inputElement.innerHTML)?this.inputElement.innerHTML:n.i(E.t)(this.inputElement.innerHTML)})},t.prototype.removeSheets=function(e){var t;for(t=0;t<e.length;t++)n.i(i.detach)(e[t])},t.prototype.updatePanelValue=function(){var e=this.value;e=this.enableHtmlEncode&&this.value?n.i(E.t)(e):e;var t=this.element.querySelector("."+s._69);e?(t&&"block"===t.style.display&&(t.value=this.value),this.valueContainer&&(this.valueContainer.value=this.enableHtmlEncode?this.value:e),"HTML"===this.editorMode&&this.inputElement&&this.inputElement.innerHTML.replace("&","&").trim()!==e.trim()?this.inputElement.innerHTML=e:"Markdown"===this.editorMode&&this.inputElement&&this.inputElement.value.trim()!==e.trim()&&(this.inputElement.value=e)):(t&&"block"===t.style.display&&(t.value=""),"HTML"===this.editorMode?"DIV"===this.enterKey?this.inputElement.innerHTML="<div><br/></div>":"BR"===this.enterKey?this.inputElement.innerHTML="<br/>":(this.inputElement.innerHTML="<p><br/></p>",""===e&&this.formatter&&this.inputElement&&this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),this.inputElement.firstElementChild,this.inputElement.firstElementChild.childElementCount)):this.inputElement.value="",this.valueContainer&&(this.valueContainer.value="")),this.showCharCount&&this.countModule.refresh()},t.prototype.setHeight=function(e){this.element.style.height="auto"!==e?n.i(i.formatUnit)(e):"auto","Expand"===this.toolbarSettings.type&&("string"==typeof this.height&&this.height.indexOf("px")>-1||"number"==typeof this.height)?this.element.classList.add(s._66):this.element.classList.remove(s._66)},t.prototype.setPlaceHolder=function(){this.inputElement&&this.placeholder&&!0!==this.iframeSettings.enable&&("Markdown"!==this.editorMode?(this.placeHolderWrapper||(this.placeHolderWrapper=this.createElement("span",{className:"rte-placeholder e-rte-placeholder "+this.cssClass}),this.inputElement&&this.inputElement.parentElement.insertBefore(this.placeHolderWrapper,this.inputElement),n.i(i.attributes)(this.placeHolderWrapper,{style:"font-size: 14px; margin-left: 0px; margin-right: 0px;"})),this.placeHolderWrapper.innerHTML=this.placeholder,!(0===this.inputElement.textContent.length&&this.inputElement.childNodes.length<2)||n.i(i.isNullOrUndefined)(this.inputElement.firstChild)||"BR"!==this.inputElement.firstChild.nodeName&&("P"!==this.inputElement.firstChild.nodeName&&"DIV"!==this.inputElement.firstChild.nodeName||n.i(i.isNullOrUndefined)(this.inputElement.firstChild.firstChild)||"BR"!==this.inputElement.firstChild.firstChild.nodeName)?this.placeHolderWrapper.style.display="none":this.placeHolderWrapper.style.display="block"):this.inputElement.setAttribute("placeholder",this.placeholder)),this.placeholder&&this.iframeSettings.enable&&(!(0===this.inputElement.textContent.length&&this.inputElement.childNodes.length<2)||n.i(i.isNullOrUndefined)(this.inputElement.firstChild)||"BR"!==this.inputElement.firstChild.nodeName&&("P"!==this.inputElement.firstChild.nodeName&&"DIV"!==this.inputElement.firstChild.nodeName||n.i(i.isNullOrUndefined)(this.inputElement.firstChild.firstChild)||"BR"!==this.inputElement.firstChild.firstChild.nodeName)?n.i(i.removeClass)([this.inputElement],"e-rte-placeholder"):(n.i(i.addClass)([this.inputElement],"e-rte-placeholder"),this.inputElement.setAttribute("placeholder",this.placeholder)))},t.prototype.setWidth=function(e){"auto"!==e?n.i(i.setStyleAttribute)(this.element,{width:n.i(i.formatUnit)(this.width)}):this.element.style.width="auto"},t.prototype.setCssClass=function(e){if(!n.i(i.isNullOrUndefined)(e))for(var t=e.split(" "),r=0;r<t.length;r++)""!==t[r].trim()&&this.element.classList.add(t[r])},t.prototype.updateRTL=function(){this.notify(o._38,{enableRtl:this.enableRtl}),this.enableRtl?(this.element.classList.add(s.b),this.inputElement.classList.add(s.b)):(this.element.classList.remove(s.b),this.inputElement.classList.remove(s.b))},t.prototype.updateReadOnly=function(){this.notify(o._43,{editPanel:this.inputElement,mode:this.readonly})},t.prototype.setReadOnly=function(e){this.updateReadOnly(),e||(this.readonly&&this.enabled?(this.unbindEvents(),this.unWireEvents()):this.enabled&&this.wireEvents())},t.prototype.print=function(){var e,t=this,r={element:this.inputElement,requestType:"print",cancel:!1};this.trigger(o.S,r,function(r){if(e=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth),"msie"===i.Browser.info.name&&e.resizeTo(screen.availWidth,screen.availHeight),e=n.i(i.print)(t.inputElement,e),!r.cancel){var s={requestType:"print"};t.trigger(o.T,s)}})},t.prototype.refreshUI=function(){this.renderModule.refresh()},t.prototype.showFullScreen=function(){this.fullScreenModule.showFullScreen()},t.prototype.enableToolbarItem=function(e,t){this.toolbarModule.enableTBarItems(this.getBaseToolbarObject(),e,!0,t)},t.prototype.disableToolbarItem=function(e,t){this.toolbarModule.enableTBarItems(this.getBaseToolbarObject(),e,!1,t)},t.prototype.removeToolbarItem=function(e){this.toolbarModule.removeTBarItems(e)},t.prototype.getRange=function(){return this.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument())},t.prototype.initializeServices=function(){this.serviceLocator.register("rendererFactory",new u.a),this.serviceLocator.register("rteLocale",this.localeObj=new i.L10n(this.getModuleName(),v.f,this.locale)),this.serviceLocator.register("dialogRenderObject",new T.a(this))},t.prototype.RTERender=function(){var e=this.serviceLocator.getService("rendererFactory");this.contentModule=e.getRenderer(h.a.Content),this.fullScreenModule=new y.a(this),this.enterKeyModule=new N.a(this),this.renderModule.render(),this.inputElement=this.contentModule.getEditPanel(),this.setHeight(this.height),n.i(C.a)(this.htmlAttributes,this,!1,!0),this.iframeSettings&&this.setIframeSettings(),this.setCssClass(this.cssClass),this.updateEnable(),this.setPlaceHolder(),this.updateRTL(),this.updateReadOnly(),this.updatePanelValue(),this.enableHtmlEncode&&!n.i(i.isNullOrUndefined)(this.value)&&this.setProperties({value:this.encode(n.i(E.t)(this.value))})},t.prototype.setIframeSettings=function(){if(this.iframeSettings.resources){var e=this.iframeSettings.resources.styles,t=this.iframeSettings.resources.scripts;this.iframeSettings.resources.scripts.length>0&&this.InjectSheet(!0,t),this.iframeSettings.resources.styles.length>0&&this.InjectSheet(!1,e)}this.iframeSettings.attributes&&n.i(C.a)(this.iframeSettings.attributes,this,!0,!1)},t.prototype.InjectSheet=function(e,t){try{if(t&&t.length>0)for(var n=this.contentModule.getDocument(),i=n.querySelector("head"),r=0;r<t.length;r++)if(e){var o=this.createScriptElement();o.src=t[r],i.appendChild(o)}else{var s=this.createStyleElement();s.href=t[r],i.appendChild(s)}}catch(e){return}},t.prototype.createScriptElement=function(){var e=this.createElement("script",{className:s.e});return e.type="text/javascript",e},t.prototype.createStyleElement=function(){var e=this.createElement("link",{className:s.f});return e.rel="stylesheet",e},t.prototype.setValue=function(e){var t=this;if(this.valueTemplate){var r=new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);if("string"==typeof this.valueTemplate&&r.test(this.valueTemplate))this.setProperties({value:this.valueTemplate});else{var o=n.i(i.compile)(this.valueTemplate)("",this,"valueTemplate");if("string"!=typeof this.valueTemplate&&this.isReact){this.displayTempElem=this.createElement("div");for(var s=0;s<o.length;s++){var a=o[s];n.i(i.append)([a],this.displayTempElem)}this.renderTemplates(function(){t.inputElement.innerHTML=t.displayTempElem.childNodes[0].innerHTML,t.setProperties({value:t.inputElement.innerHTML.trim()})})}else{var l=this.element;e&&(this.inputElement.innerHTML="",l=this.inputElement);for(var s=0;s<o.length;s++){var a=o[s];n.i(i.append)([a],l)}this.setProperties({value:l.innerHTML.trim()}),this.renderReactTemplates()}}}else{var d=!n.i(i.isNullOrUndefined)(this.element.innerHTML)&&this.element.innerHTML.replace(/<(\/?|\!?)(!--!--)>/g,"").trim();""!==d&&("TEXTAREA"===this.element.tagName?this.setProperties({value:n.i(E.t)(d)}):this.setProperties({value:d}))}},t.prototype.renderTemplates=function(e){this.renderReactTemplates(e)},t.prototype.updateResizeFlag=function(){this.isResizeInitialized=!0},t.prototype.getInsertImgMaxWidth=function(){var e=this.insertImageSettings.maxWidth,t=this.contentModule.getEditPanel(),r=window.getComputedStyle(t),o=t.offsetWidth-(14+parseFloat(r.paddingLeft.split("px")[0])+parseFloat(r.paddingRight.split("px")[0])+parseFloat(r.marginLeft.split("px")[0])+parseFloat(r.marginRight.split("px")[0]));return n.i(i.isNullOrUndefined)(e)?o:e},t.prototype.getInsertVidMaxWidth=function(){var e=this.insertVideoSettings.maxWidth,t=this.contentModule.getEditPanel(),r=window.getComputedStyle(t),o=t.offsetWidth-(14+parseFloat(r.paddingLeft.split("px")[0])+parseFloat(r.paddingRight.split("px")[0])+parseFloat(r.marginLeft.split("px")[0])+parseFloat(r.marginRight.split("px")[0]));return n.i(i.isNullOrUndefined)(e)?o:e},t.prototype.setContentHeight=function(e,t){var r,o,a=0,l="string"==typeof this.height&&this.height.indexOf("%")>-1,d=this.sourceCodeModule.getPanel()&&"block"===this.sourceCodeModule.getPanel().parentElement.style.display?this.sourceCodeModule.getPanel().parentElement:this.contentModule.getPanel(),c=this.element.offsetHeight;0!==c||"auto"===this.height||this.getToolbar()||(c=parseInt(this.height,10),l&&(o=this.height));var u=this.getToolbar()?this.toolbarModule.getToolbarHeight():0,p=this.element.querySelector("."+s._45),m=this.enableResize?n.i(i.isNullOrUndefined)(p)?0:p.offsetHeight+8:0,f=this.getToolbar()?this.toolbarModule.getExpandTBarPopHeight():0;if(this.toolbarSettings.type===h.b.Expand&&t?(r="auto"===this.height&&0===m?"auto":c-(u+f+m)+"px",a=this.toolbarSettings.enableFloating?0:f):r="auto"!==this.height||this.element.classList.contains("e-rte-full-screen")||this.isResizeInitialized?l&&o?o:c-(u+m)+"px":"auto",("windowResize"!==e||l)&&(this.iframeSettings.enable?"auto"!==r&&n.i(i.setStyleAttribute)(d,{height:r,marginTop:a+"px"}):("windowResize"===e&&l&&(r=parseInt(r,10)-2+"px"),n.i(i.setStyleAttribute)(d,{height:r,marginTop:a+"px"}))),this.iframeSettings.enable&&"sourceCode"===e){var g=n.i(i.select)("."+s.C,this.element);n.i(i.setStyleAttribute)(g,{height:r,marginTop:a+"px"})}if(this.toolbarSettings.enableFloating&&this.getToolbar()&&!this.inlineMode.enable){var b=(t?u+f:u)+"px";n.i(i.setStyleAttribute)(this.getToolbar().parentElement,{height:b})}0===m&&this.autoResize()},t.prototype.getHtml=function(){var e=this.removeResizeElement(this.contentModule.getEditPanel().innerHTML);return!this.enableXhtml||"<p><br></p>"!==e&&"<div><br></div>"!==e&&"<br>"!==e?this.serializeValue(e):null},t.prototype.getXhtml=function(){var e=this.removeResizeElement(this.value);return!n.i(i.isNullOrUndefined)(e)&&this.enableXhtml&&(e=this.htmlEditorModule.xhtmlValidation.selfEncloseValidation(e)),e},t.prototype.showSourceCode=function(){this.readonly||this.notify(o._14,{})},t.prototype.getCharCount=function(){var e="Markdown"===this.editorMode?this.inputElement.value.trim():this.inputElement.textContent.trim();return"Markdown"!==this.editorMode&&-1!==e.indexOf("")?e.replace(/\u200B/g,"").length:e.length},t.prototype.showDialog=function(e){e===h.c.InsertLink?this.notify(o._79,{}):e===h.c.InsertImage?this.notify(o._81,{}):e===h.c.InsertAudio?this.notify(o._82,{}):e===h.c.InsertVideo?this.notify(o._83,{}):e===h.c.InsertTable&&this.notify(o._87,{})},t.prototype.closeDialog=function(e){e===h.c.InsertLink?this.notify(o._80,{}):e===h.c.InsertImage?this.notify(o._84,{}):e===h.c.InsertAudio?this.notify(o._85,{}):e===h.c.InsertVideo?this.notify(o._86,{}):e===h.c.InsertTable&&this.notify(o._88,{})},t.prototype.getBaseToolbarObject=function(){return!this.inlineMode.enable||i.Browser.isDevice&&!n.i(E.d)()?this.toolbarModule&&this.toolbarModule.getBaseToolbar():this.quickToolbarModule&&this.quickToolbarModule.getInlineBaseToolbar()},t.prototype.getToolbar=function(){return this.toolbarModule?this.toolbarModule.getToolbarElement():null},t.prototype.getToolbarElement=function(){return this.toolbarModule&&this.toolbarModule.getToolbarElement()},t.prototype.getID=function(){return"TEXTAREA"===this.originalElement.tagName?this.valueContainer.id:this.element.id},t.prototype.getCssClass=function(e){return n.i(i.isNullOrUndefined)(this.cssClass)?"":e?" "+this.cssClass:this.cssClass},t.prototype.mouseDownHandler=function(e){var t=e.touches?e.changedTouches[0]:e;n.i(i.addClass)([this.element],[s.O]),this.preventDefaultResize(e),this.notify(o._24,{args:e}),this.clickPoints={clientX:t.clientX,clientY:t.clientY}},t.prototype.preventImgResize=function(e){"img"===e.target.nodeName.toLocaleLowerCase()&&e.preventDefault()},t.prototype.preventDefaultResize=function(e){"msie"===i.Browser.info.name?this.contentModule.getEditPanel().addEventListener("mscontrolselect",this.preventImgResize):"mozilla"===i.Browser.info.name&&(this.contentModule.getDocument().execCommand("enableObjectResizing",!1,"false"),this.contentModule.getDocument().execCommand("enableInlineTableEditing",!1,"false"))},t.prototype.defaultResize=function(e){"msie"===i.Browser.info.name?this.contentModule.getEditPanel().removeEventListener("mscontrolselect",this.preventImgResize):"mozilla"===i.Browser.info.name&&(this.contentModule.getDocument().execCommand("enableObjectResizing",!0,"true"),this.contentModule.getDocument().execCommand("enableInlineTableEditing",!0,"true"))},t.prototype.resizeHandler=function(){var e=!1;if(!document.body.contains(this.element))return void document.defaultView.removeEventListener("resize",this.onResizeHandler,!0);this.toolbarSettings.enable&&!this.inlineMode.enable&&(this.toolbarModule.refreshToolbarOverflow(),e=this.toolbarModule.baseToolbar.toolbarObj.element.classList.contains(s._11)),!0!==this.iframeSettings.enable&&(this.contentModule.getPanel().style.borderBottom="none"),this.setContentHeight("windowResize",e),this.notify(o.I,null)},t.prototype.scrollHandler=function(e){this.element&&this.notify(o._27,{args:e})},t.prototype.contentScrollHandler=function(e){this.notify(o._28,{args:e})},t.prototype.focusHandler=function(e){if(!this.isRTE||this.isFocusOut){this.isRTE=!this.isFocusOut,this.isFocusOut=!1,n.i(i.addClass)([this.element],[s.O]),"HTML"===this.editorMode?this.cloneValue="<p><br></p>"===this.inputElement.innerHTML||"<div><br></div>"===this.inputElement.innerHTML||"<br>"===this.inputElement.innerHTML?null:this.enableHtmlEncode?this.encode(n.i(E.t)(this.inputElement.innerHTML)):this.inputElement.innerHTML:this.cloneValue=""===this.inputElement.value?null:this.inputElement.value;var t=document.activeElement;if((t===this.element||t===this.getToolbarElement()||t===this.contentModule.getEditPanel()||this.iframeSettings.enable&&t===this.contentModule.getPanel()&&e.target&&!e.target.classList.contains("e-img-inner")&&e.target&&e.target.parentElement&&!e.target.parentElement.classList.contains("e-img-wrap")||n.i(i.closest)(t,".e-rte-toolbar")===this.getToolbarElement())&&(this.contentModule.getEditPanel().focus(),!n.i(i.isNullOrUndefined)(this.getToolbarElement()))){this.getToolbarElement().setAttribute("tabindex","-1");for(var r=this.getToolbarElement().querySelectorAll('[tabindex="0"]'),o=0;o<r.length;o++)r[o].setAttribute("tabindex","-1")}this.preventDefaultResize(e),this.trigger("focus",{event:e,isInteracted:0!==Object.keys(e).length}),!n.i(i.isNullOrUndefined)(this.saveInterval)&&this.saveInterval>0&&!this.autoSaveOnIdle&&(this.timeInterval=setInterval(this.updateValueOnIdle.bind(this),this.saveInterval)),i.EventHandler.add(document,"mousedown",this.onDocumentClick,this)}if(!this.readonly){var a=this.getCurrentFocus(e);"editArea"!==a&&"textArea"!==a&&"sourceCode"!==a||this.resetToolbarTabIndex()}},t.prototype.getUpdatedValue=function(){var e,t=this.element.querySelector("."+s._69);return"HTML"===this.editorMode?(e="<p><br></p>"===this.inputElement.innerHTML||"<div><br></div>"===this.inputElement.innerHTML||"<br>"===this.inputElement.innerHTML?null:this.enableHtmlEncode?this.encode(n.i(E.t)(this.removeResizeElement(this.inputElement.innerHTML))):this.inputElement.innerHTML,t&&"block"===t.style.display&&(e=t.value)):e=""===this.inputElement.value?null:this.inputElement.value,null==e||this.enableHtmlEncode||(e=this.removeResizeElement(e)),e},t.prototype.updateValueOnIdle=function(){(n.i(i.isNullOrUndefined)(this.tableModule)||n.i(i.isNullOrUndefined)(this.inputElement.querySelector(".e-table-box.e-rbox-select")))&&(this.setProperties({value:this.getUpdatedValue()},!0),this.valueContainer.value=this.value,this.isValueChangeBlurhandler=!1,this.invokeChangeEvent())},t.prototype.updateIntervalValue=function(){clearTimeout(this.idleInterval),this.idleInterval=setTimeout(this.updateValueOnIdle.bind(this),0)},t.prototype.cleanupResizeElements=function(e){return this.removeResizeElement(e.value)},t.prototype.removeResizeElement=function(e){var t=document.createElement("div");t.innerHTML=e;var r=t.querySelectorAll(".e-column-resize, .e-row-resize, .e-table-box, .e-table-rhelper, .e-img-resize");if(r.length>0)for(var o=0;o<r.length;o++)n.i(i.detach)(r[o]);return t.innerHTML},t.prototype.updateStatus=function(e){if(!n.i(i.isNullOrUndefined)(e.html)||!n.i(i.isNullOrUndefined)(e.markdown)){var t=this.formatter.editorManager.undoRedoManager.getUndoStatus(),r={undo:t.undo,redo:t.redo,html:e.html,markdown:e.markdown};this.trigger(o.U,r)}},t.prototype.onDocumentClick=function(e){var t=e.target,r=n.i(i.closest)(t,"."+s.a);this.element.contains(e.target)||document===e.target||r===this.element||n.i(i.closest)(t,'[aria-owns="'+this.getID()+'"]')||(this.isBlur=!0,this.isRTE=!1),this.notify(o._40,{args:e}),"msie"!==i.Browser.info.name&&e.detail>3&&e.preventDefault()},t.prototype.blurHandler=function(e){var t=e.relatedTarget;if(t){var r=n.i(i.closest)(t,"."+s.a);r&&r===this.element?(this.isBlur=!1,t===this.getToolbarElement()&&t.setAttribute("tabindex","-1")):n.i(i.closest)(t,'[aria-owns="'+this.getID()+'"]')||n.i(i.closest)(t,"."+s._12)?this.isBlur=!1:(this.isBlur=!0,t=null)}if(this.isBlur&&n.i(i.isNullOrUndefined)(t)){n.i(i.removeClass)([this.element],[s.O]),this.notify(o._31,{});var a=this.getUpdatedValue();this.setProperties({value:a}),this.valueContainer.value=this.value,this.notify(o.k,{args:e,documentNode:document}),this.isValueChangeBlurhandler=!0,this.invokeChangeEvent(),this.isFocusOut=!0,this.isBlur=!1,n.i(E.l)(this.valueContainer,"focusout"),this.defaultResize(e),this.trigger("blur",{event:e,isInteracted:0!==Object.keys(e).length}),n.i(i.isNullOrUndefined)(this.timeInterval)||(clearInterval(this.timeInterval),this.timeInterval=null),!n.i(i.isNullOrUndefined)(this.placeHolderWrapper)&&this.element.querySelector("[title = Preview]")&&(this.placeHolderWrapper.style.display="none"),i.EventHandler.remove(document,"mousedown",this.onDocumentClick)}else this.isRTE=!0;this.readonly||"outside"!==this.getCurrentFocus(e)||this.resetToolbarTabIndex()},t.prototype.contentChanged=function(){this.autoSaveOnIdle&&(n.i(i.isNullOrUndefined)(this.saveInterval)||(clearTimeout(this.timeInterval),this.timeInterval=setTimeout(this.updateIntervalValue.bind(this),this.saveInterval)))},t.prototype.invokeChangeEvent=function(){var e;e=this.enableXhtml?this.getXhtml():this.value;var t={value:e,isInteracted:this.isValueChangeBlurhandler};this.value!==this.cloneValue&&(this.trigger("change",t),this.cloneValue=this.value)},t.prototype.wireScrollElementsEvents=function(){this.scrollParentElements=n.i(r.getScrollableParent)(this.element);for(var e=0,t=this.scrollParentElements;e<t.length;e++){var o=t[e];i.EventHandler.add(o,"scroll",this.scrollHandler,this)}this.iframeSettings.enable||i.EventHandler.add(this.inputElement,"scroll",this.contentScrollHandler,this)},t.prototype.wireContextEvent=function(){this.quickToolbarSettings.showOnRightClick&&(i.EventHandler.add(this.inputElement,"contextmenu",this.contextHandler,this),i.Browser.isDevice&&(this.touchModule=new i.Touch(this.inputElement,{tapHold:this.touchHandler.bind(this),tapHoldThreshold:500})))},t.prototype.unWireContextEvent=function(){i.EventHandler.remove(this.inputElement,"contextmenu",this.contextHandler),i.Browser.isDevice&&this.touchModule&&this.touchModule.destroy()},t.prototype.unWireScrollElementsEvents=function(){this.scrollParentElements=n.i(r.getScrollableParent)(this.element);for(var e=0,t=this.scrollParentElements;e<t.length;e++){var o=t[e];i.EventHandler.remove(o,"scroll",this.scrollHandler)}this.iframeSettings.enable||i.EventHandler.remove(this.inputElement,"scroll",this.contentScrollHandler)},t.prototype.touchHandler=function(e){this.notifyMouseUp(e.originalEvent),this.triggerEditArea(e.originalEvent)},t.prototype.contextHandler=function(e){var t=n.i(i.closest)(e.target,"a, table, img");!1!==this.inlineMode.onSelection&&(n.i(i.isNullOrUndefined)(t)||!this.inputElement.contains(t)||"IMG"!==t.tagName&&"TABLE"!==t.tagName&&"A"!==t.tagName)||e.preventDefault()},t.prototype.resetHandler=function(){var e=this.valueContainer.defaultValue.trim();this.setProperties({value:""===e?null:e})},t.prototype.autoResize=function(){var e=this;if("auto"===this.height){if("Markdown"===this.editorMode)setTimeout(function(){e.setAutoHeight(e.inputElement)},0);else if(this.iframeSettings.enable){var t=this.element.querySelector("#"+this.getID()+"_rte-view");setTimeout(function(){e.setAutoHeight(t)},100),this.inputElement.style.overflow="hidden"}}else this.inputElement.style.overflow=null},t.prototype.setAutoHeight=function(e){n.i(i.isNullOrUndefined)(e)||(e.style.height=this.inputElement.scrollHeight+"px",e.style.overflow="hidden")},t.prototype.wireEvents=function(){this.element.addEventListener("focusin",this.onFocusHandler,!0),this.element.addEventListener("focusout",this.onBlurHandler,!0),this.on(o.f,this.contentChanged,this),this.on(o._72,this.updateResizeFlag,this),this.on(o._78,this.updateStatus,this),this.on(o._95,this.cleanupResizeElements,this),this.readonly&&this.enabled||this.bindEvents()},t.prototype.restrict=function(e){if(this.maxLength>=0){var t="Markdown"===this.editorMode?this.contentModule.getText():e&&e.currentTarget.textContent;if(!t)return;for(var n=[8,16,17,37,38,39,40,46,65],i=void 0,r=0;r<=n.length-1;r++)if(e.which===n[r]){if(e.ctrlKey&&65===e.which)return;if(65!==e.which)return void(i=n[r])}t.length>=this.maxLength&&-1!==this.maxLength&&e.which!==i&&e.preventDefault()}},t.prototype.bindEvents=function(){this.keyboardModule=new m.a(this.inputElement,{keyAction:this.keyDown.bind(this),keyConfigs:w({},this.formatter.keyConfig,this.keyConfig),eventName:"keydown"});var e=n.i(i.closest)(this.valueContainer,"form");e&&i.EventHandler.add(e,"reset",this.resetHandler,this),i.EventHandler.add(this.inputElement,"keyup",this.keyUp,this),i.EventHandler.add(this.inputElement,"paste",this.onPaste,this),i.EventHandler.add(this.inputElement,i.Browser.touchEndEvent,n.i(i.debounce)(this.mouseUp,30),this),i.EventHandler.add(this.inputElement,i.Browser.touchStartEvent,this.mouseDownHandler,this),this.wireContextEvent(),this.formatter.editorManager.observer.on(S.d,this.editorKeyDown,this),this.element.ownerDocument.defaultView.addEventListener("resize",this.onResizeHandler,!0),this.iframeSettings.enable&&(i.EventHandler.add(this.inputElement,"focusin",this.focusHandler,this),i.EventHandler.add(this.inputElement,"focusout",this.blurHandler,this),i.EventHandler.add(this.inputElement.ownerDocument,"scroll",this.contentScrollHandler,this),i.EventHandler.add(this.inputElement.ownerDocument,i.Browser.touchStartEvent,this.onIframeMouseDown,this)),this.wireScrollElementsEvents()},t.prototype.onIframeMouseDown=function(e){this.isBlur=!1,this.currentTarget=e.target,this.notify(o.h,e)},t.prototype.editorKeyDown=function(e){switch(e.event.action){case"copy":this.onCopy();break;case"cut":this.onCut();break;case"tab":this.iframeSettings.enable&&(this.isBlur=!0)}!e.callBack||"copy"!==e.event.action&&"cut"!==e.event.action&&"delete"!==e.event.action||e.callBack({requestType:e.event.action,editorMode:"HTML",event:e.event})},t.prototype.unWireEvents=function(){this.element.removeEventListener("focusin",this.onFocusHandler,!0),this.element.removeEventListener("focusout",this.onBlurHandler,!0),this.off(o.f,this.contentChanged),this.off(o._72,this.updateResizeFlag),this.off(o._78,this.updateStatus),this.off(o._95,this.cleanupResizeElements),this.readonly&&this.enabled||this.unbindEvents()},t.prototype.unbindEvents=function(){this.keyboardModule&&this.keyboardModule.destroy();var e=n.i(i.closest)(this.valueContainer,"form");e&&i.EventHandler.remove(e,"reset",this.resetHandler),i.EventHandler.remove(this.inputElement,"keyup",this.keyUp),i.EventHandler.remove(this.inputElement,"paste",this.onPaste),i.EventHandler.remove(this.inputElement,i.Browser.touchEndEvent,n.i(i.debounce)(this.mouseUp,30)),i.EventHandler.remove(this.inputElement,i.Browser.touchStartEvent,this.mouseDownHandler),this.unWireContextEvent(),this.formatter&&this.formatter.editorManager.observer.off(S.d,this.editorKeyDown),this.element.ownerDocument.defaultView.removeEventListener("resize",this.onResizeHandler,!0),this.iframeSettings.enable&&(i.EventHandler.remove(this.inputElement,"focusin",this.focusHandler),i.EventHandler.remove(this.inputElement,"focusout",this.blurHandler),i.EventHandler.remove(this.inputElement.ownerDocument,"scroll",this.contentScrollHandler),i.EventHandler.remove(this.inputElement.ownerDocument,i.Browser.touchStartEvent,this.onIframeMouseDown)),this.unWireScrollElementsEvents()},t.prototype.getCurrentFocus=function(e){return e.target===this.inputElement&&document.activeElement===this.inputElement?"editArea":e.target===this.getToolbarElement()||!n.i(i.isNullOrUndefined)(e.relatedTarget)&&n.i(i.closest)(e.relatedTarget,".e-rte-toolbar")===this.getToolbarElement()?"toolbar":e.target===this.valueContainer&&document.activeElement===this.valueContainer?"textArea":!n.i(i.isNullOrUndefined)(e.target)&&e.target.classList.contains(s._69)&&document.activeElement===e.target?"sourceCode":"outside"},t.prototype.resetToolbarTabIndex=function(){if(this.getToolbarElement())for(var e=this.getToolbarElement().querySelectorAll("input,select,button,a,[tabindex]"),t=0;t<e.length;t++)e[t].classList.contains("e-rte-dropdown-btn")||e[t].classList.contains("e-insert-table-btn")||e[t].hasAttribute("tabindex")&&"-1"===e[t].getAttribute("tabindex")||e[t].setAttribute("tabindex","-1")},k([n.i(i.Complex)({},f.a)],t.prototype,"toolbarSettings",void 0),k([n.i(i.Complex)({},f.b)],t.prototype,"quickToolbarSettings",void 0),k([n.i(i.Complex)({},f.c)],t.prototype,"pasteCleanupSettings",void 0),k([n.i(i.Complex)({},f.d)],t.prototype,"formatPainterSettings",void 0),k([n.i(i.Complex)({},f.e)],t.prototype,"emojiPickerSettings",void 0),k([n.i(i.Complex)({},g.a)],t.prototype,"iframeSettings",void 0),k([n.i(i.Complex)({},f.f)],t.prototype,"insertImageSettings",void 0),k([n.i(i.Complex)({},f.g)],t.prototype,"insertAudioSettings",void 0),k([n.i(i.Complex)({},f.h)],t.prototype,"insertVideoSettings",void 0),k([n.i(i.Complex)({},f.i)],t.prototype,"tableSettings",void 0),k([n.i(i.Property)(0)],t.prototype,"floatingToolbarOffset",void 0),k([n.i(i.Complex)({},b.a)],t.prototype,"inlineMode",void 0),k([n.i(i.Complex)({},f.j)],t.prototype,"fileManagerSettings",void 0),k([n.i(i.Property)("100%")],t.prototype,"width",void 0),k([n.i(i.Property)(!1)],t.prototype,"enablePersistence",void 0),k([n.i(i.Property)(!0)],t.prototype,"showTooltip",void 0),k([n.i(i.Property)(!1)],t.prototype,"enableResize",void 0),k([n.i(i.Property)({})],t.prototype,"htmlAttributes",void 0),k([n.i(i.Property)(null)],t.prototype,"placeholder",void 0),k([n.i(i.Property)(!1)],t.prototype,"autoSaveOnIdle",void 0),k([n.i(i.Property)(!1)],t.prototype,"readonly",void 0),k([n.i(i.Property)(!0)],t.prototype,"enabled",void 0),k([n.i(i.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),k([n.i(i.Property)(!1)],t.prototype,"enableHtmlEncode",void 0),k([n.i(i.Property)(!1)],t.prototype,"enableXhtml",void 0),k([n.i(i.Property)("auto")],t.prototype,"height",void 0),k([n.i(i.Property)(null)],t.prototype,"cssClass",void 0),k([n.i(i.Property)(null)],t.prototype,"value",void 0),k([n.i(i.Property)("P")],t.prototype,"enterKey",void 0),k([n.i(i.Property)("BR")],t.prototype,"shiftEnterKey",void 0),k([n.i(i.Property)(30)],t.prototype,"undoRedoSteps",void 0),k([n.i(i.Property)(300)],t.prototype,"undoRedoTimer",void 0),k([n.i(i.Property)("HTML")],t.prototype,"editorMode",void 0),k([n.i(i.Property)(null)],t.prototype,"keyConfig",void 0),k([n.i(i.Property)(!1)],t.prototype,"showCharCount",void 0),k([n.i(i.Property)(!1)],t.prototype,"enableTabKey",void 0),k([n.i(i.Property)(!1)],t.prototype,"enableAutoUrl",void 0),k([n.i(i.Property)(-1)],t.prototype,"maxLength",void 0),k([n.i(i.Complex)({},f.k)],t.prototype,"format",void 0),k([n.i(i.Complex)({},f.l)],t.prototype,"numberFormatList",void 0),k([n.i(i.Complex)({},f.m)],t.prototype,"bulletFormatList",void 0),k([n.i(i.Complex)({},f.n)],t.prototype,"fontFamily",void 0),k([n.i(i.Complex)({},f.o)],t.prototype,"fontSize",void 0),k([n.i(i.Complex)({},f.p)],t.prototype,"fontColor",void 0),k([n.i(i.Complex)({},f.q)],t.prototype,"backgroundColor",void 0),k([n.i(i.Property)(null)],t.prototype,"valueTemplate",void 0),k([n.i(i.Property)(1e4)],t.prototype,"saveInterval",void 0),k([n.i(i.Event)()],t.prototype,"actionBegin",void 0),k([n.i(i.Event)()],t.prototype,"actionComplete",void 0),k([n.i(i.Event)()],t.prototype,"beforeDialogOpen",void 0),k([n.i(i.Event)()],t.prototype,"dialogOpen",void 0),k([n.i(i.Event)()],t.prototype,"beforeDialogClose",void 0),k([n.i(i.Event)()],t.prototype,"dialogClose",void 0),k([n.i(i.Event)()],t.prototype,"beforeQuickToolbarOpen",void 0),k([n.i(i.Event)()],t.prototype,"quickToolbarOpen",void 0),k([n.i(i.Event)()],t.prototype,"quickToolbarClose",void 0),k([n.i(i.Event)()],t.prototype,"toolbarStatusUpdate",void 0),k([n.i(i.Event)()],t.prototype,"updatedToolbarStatus",void 0),k([n.i(i.Event)()],t.prototype,"imageSelected",void 0),k([n.i(i.Event)()],t.prototype,"beforeImageUpload",void 0),k([n.i(i.Event)()],t.prototype,"imageUploading",void 0),k([n.i(i.Event)()],t.prototype,"imageUploadSuccess",void 0),k([n.i(i.Event)()],t.prototype,"imageUploadFailed",void 0),k([n.i(i.Event)()],t.prototype,"imageRemoving",void 0),k([n.i(i.Event)()],t.prototype,"afterImageDelete",void 0),k([n.i(i.Event)()],t.prototype,"fileSelected",void 0),k([n.i(i.Event)()],t.prototype,"beforeFileUpload",void 0),k([n.i(i.Event)()],t.prototype,"fileUploading",void 0),k([n.i(i.Event)()],t.prototype,"fileUploadSuccess",void 0),k([n.i(i.Event)()],t.prototype,"fileUploadFailed",void 0),k([n.i(i.Event)()],t.prototype,"fileRemoving",void 0),k([n.i(i.Event)()],t.prototype,"afterMediaDelete",void 0),k([n.i(i.Event)()],t.prototype,"created",void 0),k([n.i(i.Event)()],t.prototype,"destroyed",void 0),k([n.i(i.Event)()],t.prototype,"beforeSanitizeHtml",void 0),k([n.i(i.Event)()],t.prototype,"blur",void 0),k([n.i(i.Event)()],t.prototype,"toolbarClick",void 0),k([n.i(i.Event)()],t.prototype,"focus",void 0),k([n.i(i.Event)()],t.prototype,"change",void 0),k([n.i(i.Event)()],t.prototype,"resizing",void 0),k([n.i(i.Event)()],t.prototype,"resizeStart",void 0),k([n.i(i.Event)()],t.prototype,"resizeStop",void 0),k([n.i(i.Event)()],t.prototype,"beforePasteCleanup",void 0),k([n.i(i.Event)()],t.prototype,"afterPasteCleanup",void 0),k([n.i(i.Event)()],t.prototype,"beforeImageDrop",void 0),k([n.i(i.Property)(null)],t.prototype,"formatter",void 0),t=k([i.NotifyPropertyChanges],t)}(i.Component)},function(e,t,n){"use strict";var i=n(71);n.d(t,"a",function(){return i.a});var r=n(29);n.d(t,"b",function(){return r.a});var o=n(72);n.d(t,"c",function(){return o.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),o=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([n.i(i.Property)([])],t.prototype,"styles",void 0),o([n.i(i.Property)([])],t.prototype,"scripts",void 0),t}(i.ChildProperty),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([n.i(i.Property)(!1)],t.prototype,"enable",void 0),o([n.i(i.Property)(null)],t.prototype,"attributes",void 0),o([n.i(i.Complex)({},s)],t.prototype,"resources",void 0),t}(i.ChildProperty)},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),o=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([n.i(i.Property)(!1)],t.prototype,"enable",void 0),o([n.i(i.Property)(!0)],t.prototype,"onSelection",void 0),t}(i.ChildProperty)},function(e,t,n){"use strict";var i=n(30);n.d(t,"a",function(){return i.a});var r=n(78);n.d(t,"b",function(){return r.a});var o=n(79);n.d(t,"c",function(){return o.a});var s=n(112);n.d(t,"d",function(){return s.a});var a=n(111);n.d(t,"e",function(){return a.a});var l=n(110);n.d(t,"f",function(){return l.a});var d=n(114);n.d(t,"g",function(){return d.a});var c=n(80);n.d(t,"h",function(){return c.a});var u=n(113);n.d(t,"i",function(){return u.a});var h=n(74);n.d(t,"j",function(){return h.a});var p=n(75);n.d(t,"k",function(){return p.a});var m=n(76);n.d(t,"l",function(){return m.a});var f=n(77);n.d(t,"m",function(){return f.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(14),a=(n.n(s),n(18)),l=(n.n(a),n(5)),d=n(4),c=n(6),u=function(){function e(e,t){this.isAudioUploaded=!1,this.isAllowedTypes=!0,this.deletedAudio=[],this.parent=e,this.rteID=e.element.id,this.i10n=t.getService("rteLocale"),this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.v,this.onKeyDown,this),this.parent.on(r.u,this.onKeyUp,this),this.parent.on(r.Y,this.insertingAudio,this),this.parent.on(r.g,this.afterRender,this),this.parent.on(r._75,this.afterRender,this),this.parent.on(r._82,this.showDialog,this),this.parent.on(r._85,this.closeDialog,this),this.parent.on(r.F,this.onToolbarAction,this),this.parent.on(r.B,this.alignmentSelect,this),this.parent.on(r._9,this.deleteAudio,this),this.parent.on(r._26,this.editAreaClickHandler,this),this.parent.on(r._0,this.showAudioQuickToolbar,this),this.parent.on(r.i,this.removeEventListener,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.v,this.onKeyDown),this.parent.off(r.u,this.onKeyUp),this.parent.off(r.Y,this.insertingAudio),this.parent.off(r.g,this.afterRender),this.parent.off(r._75,this.afterRender),this.parent.off(r._82,this.showDialog),this.parent.off(r._85,this.closeDialog),this.parent.off(r.F,this.onToolbarAction),this.parent.off(r.B,this.alignmentSelect),this.parent.off(r._9,this.deleteAudio),this.parent.off(r._26,this.editAreaClickHandler),this.parent.off(r._0,this.showAudioQuickToolbar),this.parent.off(r.i,this.removeEventListener),n.i(i.isNullOrUndefined)(this.contentModule)||(i.EventHandler.remove(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.touchStart),i.EventHandler.remove(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.audioClick),i.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick)))},e.prototype.afterRender=function(){this.contentModule=this.rendererFactory.getRenderer(l.a.Content),i.EventHandler.add(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.touchStart,this),i.EventHandler.add(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.audioClick,this),i.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this)},e.prototype.checkAudioBack=function(e){"#text"===e.startContainer.nodeName&&0===e.startOffset&&!n.i(i.isNullOrUndefined)(e.startContainer.previousSibling)&&this.isAudioElem(e.startContainer.previousSibling)?this.deletedAudio.push(e.startContainer.previousSibling):"#text"!==e.startContainer.nodeName&&!n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset-1])&&this.isAudioElem(e.startContainer.childNodes[e.startOffset-1])&&this.deletedAudio.push(e.startContainer.childNodes[e.startOffset-1])},e.prototype.checkAudioDel=function(e){"#text"!==e.startContainer.nodeName||e.startOffset!==e.startContainer.textContent.length||n.i(i.isNullOrUndefined)(e.startContainer.nextSibling)||"IMG"!==e.startContainer.nextSibling.nodeName?"#text"!==e.startContainer.nodeName&&!n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset])&&this.isAudioElem(e.startContainer.childNodes[e.startOffset])&&this.deletedAudio.push(e.startContainer.childNodes[e.startOffset]):this.deletedAudio.push(e.startContainer.nextSibling)},e.prototype.undoStack=function(e){if("undo"===e.subCommand.toLowerCase()||"redo"===e.subCommand.toLowerCase())for(var t=0;t<this.parent.formatter.getUndoRedoStack().length;t++){var n=this.parent.createElement("div"),i=this.parent.formatter.getUndoRedoStack()[t].text;n.appendChild(i.cloneNode(!0))}},e.prototype.touchStart=function(e,t){this.parent.readonly||(this.prevSelectedAudEle=this.audEle)},e.prototype.onToolbarAction=function(e){switch(n.i(c.b)()&&this.parent.notify(r._19,{}),e.args.item.subCommand){case"AudioReplace":this.parent.notify(r.Y,e);break;case"AudioRemove":this.parent.notify(r._9,e)}},e.prototype.onKeyUp=function(e){if(!n.i(i.isNullOrUndefined)(this.deletedAudio)&&this.deletedAudio.length>0)for(var t=0;t<this.deletedAudio.length-1;t++){var o={element:this.deletedAudio[t].querySelector("audio"),src:this.deletedAudio[t].querySelector("source").getAttribute("src")};this.parent.trigger(r._67,o)}},e.prototype.onKeyDown=function(e){var t,r,s,a,l=e.args;this.deletedAudio=[];var d,c=[27,112,113,114,115,116,117,118,119,120,121,122,123,44,45,9,16,17,18,19,20,33,34,35,36,37,38,39,40,91,92,93,144,145,182,183];if("HTML"===this.parent.editorMode&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),d=t.startContainer===t.endContainer&&t.startOffset===t.endOffset),!d&&"HTML"===this.parent.editorMode&&c.indexOf(l.which)<0)for(var u=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),h=0;h<u.length;h++)this.isAudioElem(u[h])&&this.deletedAudio.push(u[h]);if("HTML"===this.parent.editorMode&&(8===l.which&&"Backspace"===l.code||46===l.which&&"Delete"===l.code)){var p=t.startContainer===t.endContainer&&t.startOffset===t.endOffset;8===l.which&&"Backspace"===l.code&&p?this.checkAudioBack(t):46===l.which&&"Delete"===l.code&&p&&this.checkAudioDel(t)}if(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&"KeyK"!==l.code&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),s=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),a=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t),!l.ctrlKey&&l.key&&(1===l.key.length||"enter"===l.action)&&this.isAudioElem(a[0])&&a[0].parentElement)){var m=a[0].parentElement.childNodes[0];this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),m,m,m.textContent.length,m.textContent.length),n.i(i.removeClass)([a[0]],o._50),this.quickToolObj.audioQTBar.hidePopup()}if(!l.ctrlKey||89!==l.keyCode&&90!==l.keyCode||this.undoStack({subCommand:90===l.keyCode?"undo":"redo"}),(8===l.keyCode||46===l.keyCode)&&s&&this.isAudioElem(s[0])&&s.length<1){n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),l.preventDefault();var f={selectNode:s,selection:r,selectParent:a,args:{item:{command:"Audios",subCommand:"AudioRemove"},originalEvent:l}};this.deleteAudio(f,l.keyCode)}switch(l.action){case"escape":n.i(i.isNullOrUndefined)(this.dialogObj)||this.dialogObj.close();break;case"backspace":case"delete":for(var h=0;h<this.deletedAudio.length;h++){var g=this.deletedAudio[h].src;this.audioRemovePost(g)}"Markdown"!==this.parent.editorMode&&(3===t.startContainer.nodeType?"Backspace"===l.code?t.startContainer.previousElementSibling&&0===t.startOffset&&t.startContainer.previousElementSibling.classList.contains(o.X)&&n.i(i.detach)(t.startContainer.previousElementSibling):t.startContainer.nextElementSibling&&t.endContainer.textContent.length===t.endOffset&&t.startContainer.nextElementSibling.classList.contains(o.X)&&n.i(i.detach)(t.startContainer.nextElementSibling):1===t.startContainer.nodeType&&t.startContainer.classList&&(t.startContainer.classList.contains(o.X)||t.startContainer.classList.contains(o.V)||t.startContainer.classList.contains(o.W))&&n.i(i.detach)(t.startContainer));break;case"insert-audio":n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),this.openDialog(!0,l,r,s,a),l.preventDefault()}},e.prototype.openDialog=function(e,t,r,o,s){var a,l,d,c;e||n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)?(l=r,d=o,c=s):(a=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),l=this.parent.formatter.editorManager.nodeSelection.save(a,this.parent.contentModule.getDocument()),d=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(a),c=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(a)),"HTML"===this.parent.editorMode&&this.insertAudio({args:{item:{command:"Audios",subCommand:"Audio"},originalEvent:t,name:e?null:"showDialog"},selectNode:d,selection:l,selectParent:c})},e.prototype.showDialog=function(){this.openDialog(!1)},e.prototype.closeDialog=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.deleteAudio=function(e,t){if(this.isAudioElem(e.selectNode[0])){this.audEle&&(3===e.selectNode[0].nodeType?e.selectNode[0]=this.audEle:this.isAudioElem(e.selectNode[0])&&(e.selectNode[0]=e.selectNode[0].classList.contains(o.X)?e.selectNode[0]:e.selectNode[0].parentElement));var s={element:e.selectNode[0].querySelector("audio"),src:e.selectNode[0].querySelector("source").getAttribute("src")};0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),e.selection.restore(),this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.audioRemovePost(s.src),this.quickToolObj&&document.body.contains(this.quickToolObj.audioQTBar.element)&&this.quickToolObj.audioQTBar.hidePopup(),n.i(i.isNullOrUndefined)(t)&&this.parent.trigger(r._67,s)}},e.prototype.audioRemovePost=function(e){var t=this,r="";if(!n.i(i.isNullOrUndefined)(this.parent.insertAudioSettings.removeUrl)&&""!==this.parent.insertAudioSettings.removeUrl){r=e.indexOf("http://")>-1||e.indexOf("https://")>-1?e:new URL(e,document.baseURI).href,this.removingAudioName=r.replace(/^.*[\\\/]/,"");var o=new XMLHttpRequest;o.addEventListener("readystatechange",function(){4===this.readyState&&200===this.status&&t.triggerPost(this.response)}),o.open("GET",r),o.responseType="blob",o.send()}},e.prototype.triggerPost=function(e){var t=this.parent.insertAudioSettings.removeUrl;if(!n.i(i.isNullOrUndefined)(t)&&""!==t){var r=new File([e],this.removingAudioName),o=new i.Ajax(t,"POST",!0,null),s=new FormData;s.append("UploadFiles",r),o.send(s)}},e.prototype.audioClick=function(e){i.Browser.isDevice&&(this.isAudioElem(e.target)?(this.contentModule.getEditPanel().setAttribute("contenteditable","false"),e.target.focus()):this.parent.readonly||this.contentModule.getEditPanel().setAttribute("contenteditable","true")),this.isAudioElem(e.target)&&(this.audEle=e.target.querySelector("audio"),e.preventDefault())},e.prototype.onDocumentClick=function(e){var t=e.target;this.isAudioElem(t)&&(this.audEle=t.querySelector("audio")),!n.i(i.isNullOrUndefined)(this.dialogObj)&&(!n.i(i.closest)(t,"[id='"+this.dialogObj.element.id+"']")&&this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()&&!this.parent.getToolbarElement().contains(e.target)||this.parent.getToolbarElement()&&this.parent.getToolbarElement().contains(e.target)&&!n.i(i.closest)(t,"#"+this.parent.getID()+"_toolbar_Audio")&&!t.querySelector("#"+this.parent.getID()+"_toolbar_Audio"))&&(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight||(this.dialogObj.hide({returnValue:!0}),this.parent.isBlur=!0,n.i(d.l)(this.parent.element,"focusout"))),this.contentModule.getEditPanel().querySelector("."+o._50)&&(this.isAudioElem(e.target)||n.i(i.isNullOrUndefined)(this.audEle)?n.i(i.isNullOrUndefined)(this.prevSelectedAudEle)||this.prevSelectedAudEle===t||(this.prevSelectedAudEle.style.outline=""):this.audEle.style.outline="")},e.prototype.alignmentSelect=function(e){var t=e.item;if(document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))&&"Audios"===t.command){var r=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),s=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(r);s=[this.audEle];var a={args:e,selectNode:s};switch(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),t.subCommand){case"Inline":this.inline(a);break;case"Break":this.break(a)}this.quickToolObj&&document.body.contains(this.quickToolObj.audioQTBar.element)&&(this.quickToolObj.audioQTBar.hidePopup(),n.i(i.removeClass)([s[0]],o._50))}},e.prototype.break=function(e){if("AUDIO"===e.selectNode[0].nodeName){var t=e.args.item?e.args.item.subCommand:"Break";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.inline=function(e){if("AUDIO"===e.selectNode[0].nodeName){var t=e.args.item?e.args.item.subCommand:"Inline";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.editAreaClickHandler=function(e){if(this.parent.readonly)return void this.hideAudioQuickToolbar();var t=e.args,o=this.parent.quickToolbarSettings.showOnRightClick;if(2===t.which||o&&1===t.which||!o&&3===t.which)return void(o&&1===t.which&&!n.i(i.isNullOrUndefined)(t.target)&&this.isAudioElem(t.target)&&(this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),t.target)));if("HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.audioQTBar){this.quickToolObj=this.parent.quickToolbarModule;var s=t.target;this.contentModule=this.rendererFactory.getRenderer(l.a.Content);var a=this.quickToolObj.audioQTBar.element.classList.contains("e-rte-pop");if(this.isAudioElem(s)&&this.parent.quickToolbarModule){if(a)return;this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),s),n.i(c.b)()&&this.parent.notify(r._18,e),s.querySelector("audio").style.outline="2px solid #4a90e2",this.showAudioQuickToolbar({args:t,type:"Audios",elements:[t.target]})}else this.hideAudioQuickToolbar()}},e.prototype.isAudioElem=function(e){return!(!e||3===e.nodeType||"BR"===e.nodeName||!e.classList||!e.classList.contains(o.X)&&!e.classList.contains(o.V))},e.prototype.showAudioQuickToolbar=function(e){var t=this;if(!("Audios"!==e.type||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule.audioQTBar)||n.i(i.isNullOrUndefined)(e.args))){this.quickToolObj=this.parent.quickToolbarModule;var r=e.args,s=e.elements;[].forEach.call(e.elements,function(e,t){0===t&&(s=e)}),this.isAudioElem(s)&&(n.i(i.addClass)([s.querySelector("audio")],[o._50]),s.querySelector("audio").style.outline="2px solid #4a90e2"),this.parent.quickToolbarModule.audioQTBar&&(e.isNotify?setTimeout(function(){t.parent.formatter.editorManager.nodeSelection.Clear(t.contentModule.getDocument()),t.parent.formatter.editorManager.nodeSelection.setSelectionContents(t.contentModule.getDocument(),s),t.quickToolObj.audioQTBar.showPopup(r.pageX-50,s.getBoundingClientRect().top+34,s)},400):this.quickToolObj.audioQTBar.showPopup(r.pageX-50,s.getBoundingClientRect().top+34,s))}},e.prototype.hideAudioQuickToolbar=function(){n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector("."+o._50))||(n.i(i.removeClass)([this.contentModule.getEditPanel().querySelector("."+o._50)],o._50),n.i(i.isNullOrUndefined)(this.audEle)||(this.audEle.style.outline=""),this.quickToolObj&&this.quickToolObj.audioQTBar&&document.body.contains(this.quickToolObj.audioQTBar.element)&&this.quickToolObj.audioQTBar.hidePopup())},e.prototype.insertingAudio=function(e){if(this.insertAudio(e),!n.i(i.isNullOrUndefined)(this.dialogObj)){this.dialogObj.element.style.maxHeight="inherit";var t=this.dialogObj.element.querySelector(".e-audio-content");n.i(i.isNullOrUndefined)(this.parent.insertAudioSettings.path)&&"HTML"!==this.parent.editorMode?t.querySelector(".e-audio-url").focus():document.getElementById(this.rteID+"_insertAudio").focus()}},e.prototype.insertAudio=function(e){var t=this;if(this.dialogObj)return void this.dialogObj.hide({returnValue:!0});var r=this.parent.createElement("div",{className:"e-rte-audio-dialog",id:this.rteID+"_audio"});this.parent.element.appendChild(r);var s=this.i10n.getConstant("dialogInsert"),a=this.i10n.getConstant("dialogCancel"),l=this.i10n.getConstant("audioHeader"),d=e.selection,c={selfAudio:this,selection:e.selection,args:e.args,selectParent:e.selectParent},u={header:l,cssClass:o._12,enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:i.Browser.isDevice?"290px":"340px",isModal:i.Browser.isDevice,buttons:[{click:this.insertAudioUrl.bind(c),buttonModel:{content:s,cssClass:"e-flat e-insertAudio",isPrimary:!0,disabled:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel",content:a}}],target:i.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){t.isAudioUploaded&&t.uploadObj.removing(),t.parent.isBlur=!1,e&&e.event.returnValue&&"HTML"===t.parent.editorMode&&d.restore(),t.dialogObj.destroy(),n.i(i.detach)(t.dialogObj.element),t.dialogRenderObj.close(e),t.dialogObj=null}},h=this.parent.createElement("div",{className:"e-audio-content"});n.i(i.isNullOrUndefined)(this.parent.insertAudioSettings.path)&&"HTML"!==this.parent.editorMode||h.appendChild(this.audioUpload(e));var p=this.parent.createElement("div",{className:"e-audioheader"}),m=this.i10n.getConstant("audioLinkHeader");"HTML"===this.parent.editorMode&&(p.innerHTML=m),h.appendChild(p),h.appendChild(this.audioUrlPopup(e)),e.selectNode&&1===e.selectNode[0].nodeType&&this.isAudioElem(e.selectNode[0])?(u.header=this.parent.localeObj.getConstant("editAudioHeader"),u.content=h):u.content=h,this.dialogObj=this.dialogRenderObj.render(u),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(r),e.selectNode&&1===e.selectNode[0].nodeType&&this.isAudioElem(e.selectNode[0])&&"insertAudio"===e.name&&(this.dialogObj.element.querySelector(".e-insertAudio").textContent=this.parent.localeObj.getConstant("dialogUpdate")),r.style.maxHeight="inherit",this.quickToolObj&&(this.quickToolObj.audioQTBar&&document.body.contains(this.quickToolObj.audioQTBar.element)&&this.quickToolObj.audioQTBar.hidePopup(),this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup(),this.quickToolObj.textQTBar&&this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)&&this.quickToolObj.textQTBar.hidePopup())},e.prototype.audioUrlPopup=function(e){var t=this,r=this.parent.createElement("div",{className:"audioUrl"}),o=this.i10n.getConstant("audioUrl");return this.inputUrl=this.parent.createElement("input",{className:"e-input e-audio-url",attrs:{placeholder:o,spellcheck:"false","aria-label":this.i10n.getConstant("audioLinkHeader")}}),this.inputUrl.addEventListener("input",function(){n.i(i.isNullOrUndefined)(t.inputUrl)||(0===t.inputUrl.value.length?t.dialogObj.getButtons(0).element.disabled=!0:t.dialogObj.getButtons(0).element.removeAttribute("disabled"))}),r.appendChild(this.inputUrl),r},e.prototype.audioUpload=function(e){var t,o,l=this,c=this,u=c.parent.iframeSettings.enable;if("HTML"===c.parent.editorMode&&(!u&&n.i(i.isNullOrUndefined)(n.i(i.closest)(e.selection.range.startContainer.parentNode,"[id='"+this.parent.contentModule.getPanel().id+"']"))||u&&!n.i(d.b)(e.selection.range.startContainer.parentNode.ownerDocument.querySelector("body"),"e-lib"))){this.contentModule.getEditPanel().focus();var h=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());t=this.parent.formatter.editorManager.nodeSelection.save(h,this.parent.contentModule.getDocument()),o=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(h)}else t=e.selection,o=e.selectParent;var p=this.parent.createElement("div",{className:"e-aud-uploadwrap e-droparea"}),m=this.i10n.getConstant("audioDeviceUploadMessage"),f=this.i10n.getConstant("audioUploadMessage"),g=this.parent.createElement("span",{className:"e-droptext"}),b=this.parent.createElement("span",{className:"e-rte-upload-text",innerHTML:i.Browser.isDevice?m:f});g.appendChild(b);var v=this.parent.createElement("button",{className:"e-browsebtn",id:this.rteID+"_insertAudio",attrs:{autofocus:"true",type:"button"}});g.appendChild(v),p.appendChild(g);var C=this.i10n.getConstant("browse"),y=new a.Button({content:C,enableRtl:this.parent.enableRtl});y.isStringTemplate=!0,y.createElement=this.parent.createElement,y.appendTo(v);var N=i.Browser.isDevice?g:v;i.EventHandler.add(N,"click",this.fileSelect,this);var S=this.parent.createElement("input",{id:this.rteID+"_upload",attrs:{type:"File",name:"UploadFiles"}});p.appendChild(S);var E,T,O;return this.uploadObj=new s.Uploader({asyncSettings:{saveUrl:this.parent.insertAudioSettings.saveUrl,removeUrl:this.parent.insertAudioSettings.removeUrl},dropArea:g,multiple:!1,enableRtl:this.parent.enableRtl,allowedExtensions:this.parent.insertAudioSettings.allowedTypes.toString(),selected:function(e){c.isAudioUploaded=!0,T=e,O=e.filesData,l.parent.trigger(r._61,T,function(e){if(!e.cancel&&(l.checkExtension(e.filesData[0]),E=e.filesData[0].name,"HTML"===l.parent.editorMode&&n.i(i.isNullOrUndefined)(l.parent.insertAudioSettings.path))){var r=new FileReader;r.addEventListener("load",function(e){var s="Base64"===l.parent.insertAudioSettings.saveFormat?r.result:URL.createObjectURL(n.i(d.v)(r.result));c.uploadUrl={url:s,selection:t,fileName:E,selectParent:o},c.inputUrl.setAttribute("disabled","true"),n.i(i.isNullOrUndefined)(c.parent.insertAudioSettings.saveUrl)&&l.isAllowedTypes&&!n.i(i.isNullOrUndefined)(l.dialogObj)&&l.dialogObj.getButtons(0).element.removeAttribute("disabled")}),r.readAsDataURL(e.filesData[0].rawFile)}})},beforeUpload:function(e){l.parent.trigger(r._71,e)},uploading:function(e){l.parent.isServerRendered||l.parent.trigger(r._62,e)},success:function(e){l.parent.trigger(r._63,e,function(e){if(!n.i(i.isNullOrUndefined)(l.parent.insertAudioSettings.path)){var r=l.parent.insertAudioSettings.path+e.file.name;c.uploadUrl={url:r,selection:t,fileName:E,selectParent:o},c.inputUrl.setAttribute("disabled","true")}"upload"!==e.operation||n.i(i.isNullOrUndefined)(l.dialogObj)||l.dialogObj.getButtons(0).element.removeAttribute("disabled")})},failure:function(e){l.parent.trigger(r._64,e)},removing:function(){l.parent.trigger(r._65,e,function(e){c.isAudioUploaded=!1,l.dialogObj.getButtons(0).element.disabled=!0,c.inputUrl.removeAttribute("disabled"),c.uploadUrl&&(c.uploadUrl.url="")})}}),this.uploadObj.isStringTemplate=!0,this.uploadObj.createElement=this.parent.createElement,this.uploadObj.appendTo(S),p},e.prototype.checkExtension=function(e){this.uploadObj.allowedExtensions&&(-1===this.uploadObj.allowedExtensions.toLocaleLowerCase().indexOf(("."+e.type).toLocaleLowerCase())?(this.dialogObj.getButtons(0).element.setAttribute("disabled","disabled"),this.isAllowedTypes=!1):this.isAllowedTypes=!0)},e.prototype.fileSelect=function(){return this.dialogObj.element.getElementsByClassName("e-file-select-wrap")[0].querySelector("button").click(),!1},e.prototype.cancelDialog=function(e){this.parent.isBlur=!1,this.dialogObj.hide({returnValue:!0}),this.isAudioUploaded&&this.uploadObj.removing()},e.prototype.insertAudioUrl=function(e){var t=this.selfAudio;t.isAudioUploaded=!1;var r=t.inputUrl.value;if(0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData(),n.i(i.isNullOrUndefined)(t.uploadUrl)||""===t.uploadUrl.url){if(""!==r){if("HTML"===t.parent.editorMode&&n.i(i.isNullOrUndefined)(n.i(i.closest)(this.selection.range.startContainer.parentNode,"[id='"+t.contentModule.getPanel().id+"']"))){t.contentModule.getEditPanel().focus();var s=t.parent.formatter.editorManager.nodeSelection.getRange(t.contentModule.getDocument());this.selection=t.parent.formatter.editorManager.nodeSelection.save(s,t.contentModule.getDocument()),this.selectParent=t.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(s)}var a="HTML"===t.parent.editorMode?r.split("/")[r.split("/").length-1]:"",l={cssClass:"Inline"===t.parent.insertAudioSettings.layoutOption?o._4:o.U,url:r,selection:this.selection,fileName:a,selectParent:this.selectParent};t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,l),t.dialogObj.hide({returnValue:!1})}}else t.uploadUrl.cssClass="Inline"===t.parent.insertAudioSettings.layoutOption?o._4:o.U,t.dialogObj.hide({returnValue:!1}),t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,t.uploadUrl),t.uploadUrl.url=""},e.prototype.destroy=function(){this.prevSelectedAudEle=void 0,this.removeEventListener()},e.prototype.getModuleName=function(){return"audio"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(14),a=(n.n(s),n(9)),l=(n.n(a),n(18)),d=(n.n(l),n(5)),c=n(4),u=n(6),h=function(){function e(e,t){this.isImgUploaded=!1,this.isAllowedTypes=!0,this.pageX=null,this.pageY=null,this.mouseX=null,this.deletedImg=[],this.parent=e,this.rteID=e.element.id,this.i10n=t.getService("rteLocale"),this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.v,this.onKeyDown,this),this.parent.on(r.u,this.onKeyUp,this),this.parent.on(r.X,this.insertImage,this),this.parent.on(r._81,this.showDialog,this),this.parent.on(r._84,this.closeDialog,this),this.parent.on(r.I,this.onWindowResize,this),this.parent.on(r._0,this.showImageQuickToolbar,this),this.parent.on(r._48,this.clearDialogObj,this),this.parent.on(r.E,this.onToolbarAction,this),this.parent.on(r._11,this.caption,this),this.parent.on(r._8,this.deleteImg,this),this.parent.on(r._6,this.insertImgLink,this),this.parent.on(r._7,this.insertAltText,this),this.parent.on(r._26,this.editAreaClickHandler,this),this.parent.on(r.h,this.onIframeMouseDown,this),this.parent.on(r._12,this.imageSize,this),this.parent.on(r.B,this.alignmentSelect,this),this.parent.on(r.g,this.afterRender,this),this.parent.on(r._75,this.afterRender,this),this.parent.on(r._36,this.imagePaste,this),this.parent.on(r._89,this.setCssClass,this),this.parent.on(r.i,this.removeEventListener,this),this.parent.on(r._44,this.moduleDestroy,this))},e.prototype.removeEventListener=function(){if(!this.parent.isDestroyed){this.parent.off(r.v,this.onKeyDown),this.parent.off(r.u,this.onKeyUp),this.parent.off(r.I,this.onWindowResize),this.parent.off(r.X,this.insertImage),this.parent.off(r._81,this.showDialog),this.parent.off(r._84,this.closeDialog),this.parent.off(r._0,this.showImageQuickToolbar),this.parent.off(r._48,this.clearDialogObj),this.parent.off(r._11,this.caption),this.parent.off(r.E,this.onToolbarAction),this.parent.off(r._8,this.deleteImg),this.parent.off(r._6,this.insertImgLink),this.parent.off(r._7,this.insertAltText),this.parent.off(r._26,this.editAreaClickHandler),this.parent.off(r.h,this.onIframeMouseDown),this.parent.off(r._12,this.imageSize),this.parent.off(r.B,this.alignmentSelect),this.parent.off(r.g,this.afterRender),this.parent.off(r._75,this.afterRender),this.parent.off(r._36,this.imagePaste),this.parent.off(r._89,this.setCssClass),this.parent.off(r.i,this.removeEventListener),this.parent.off(r._44,this.moduleDestroy);var e=this.parent.iframeSettings.enable?this.parent.inputElement.ownerDocument:this.parent.inputElement;e.removeEventListener("drop",this.dragDrop.bind(this),!0),e.removeEventListener("dragstart",this.dragStart.bind(this),!0),e.removeEventListener("dragenter",this.dragEnter.bind(this),!0),e.removeEventListener("dragover",this.dragOver.bind(this),!0),n.i(i.isNullOrUndefined)(this.contentModule)||(i.EventHandler.remove(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.imageClick),this.parent.formatter.editorManager.observer.off(r._42,this.undoStack),this.parent.insertImageSettings.resize&&(i.EventHandler.remove(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.resizeStart),i.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick),i.EventHandler.remove(this.contentModule.getEditPanel(),"cut",this.onCutHandler),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing)))}},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(i.isNullOrUndefined)(t.oldCssClass)?e.setProperties({cssClass:(e.cssClass+" "+t.cssClass).trim()}):e.setProperties({cssClass:(e.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){this.popupObj&&e.cssClass&&(n.i(i.isNullOrUndefined)(e.oldCssClass)?n.i(i.addClass)([this.popupObj.element],e.cssClass):(n.i(i.removeClass)([this.popupObj.element],e.oldCssClass),n.i(i.addClass)([this.popupObj.element],e.cssClass))),this.updateCss(this.checkBoxObj,e),this.updateCss(this.widthNum,e),this.updateCss(this.heightNum,e),this.updateCss(this.uploadObj,e),this.updateCss(this.dialogObj,e)},e.prototype.onIframeMouseDown=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.afterRender=function(){this.contentModule=this.rendererFactory.getRenderer(d.a.Content),i.EventHandler.add(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.imageClick,this),this.parent.insertImageSettings.resize&&(i.EventHandler.add(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.resizeStart,this),i.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this),i.EventHandler.add(this.contentModule.getEditPanel(),"cut",this.onCutHandler,this));var e=this.parent.iframeSettings.enable?this.parent.inputElement.ownerDocument:this.parent.inputElement;e.addEventListener("drop",this.dragDrop.bind(this),!0),e.addEventListener("dragstart",this.dragStart.bind(this),!0),e.addEventListener("dragenter",this.dragOver.bind(this),!0),e.addEventListener("dragover",this.dragOver.bind(this),!0)},e.prototype.undoStack=function(e){if("undo"===e.subCommand.toLowerCase()||"redo"===e.subCommand.toLowerCase())for(var t=0;t<this.parent.formatter.getUndoRedoStack().length;t++){var r=this.parent.createElement("div"),o=this.parent.formatter.getUndoRedoStack()[t].text;r.appendChild(o.cloneNode(!0));var s=r.querySelectorAll("img");if(r.querySelector(".e-img-resize")&&s.length>0){for(var a=0;a<s.length;a++)s[a].style.outline="";n.i(i.detach)(r.querySelector(".e-img-resize"));for(var l=r.cloneNode(!0),d=document.createDocumentFragment();l.firstChild;)d.appendChild(l.firstChild);this.parent.formatter.getUndoRedoStack()[t].text=d}}},e.prototype.resizeEnd=function(e){this.resizeBtnInit(),this.imgEle.parentElement.style.cursor="auto",i.Browser.isDevice&&n.i(i.removeClass)([e.target.parentElement],"e-mob-span");var t={event:e,requestType:"images"};this.parent.trigger(r.L,t);this.getPointX(e),this.parent.iframeSettings.enable?(window.pageYOffset,this.parent.element.getBoundingClientRect().top,e.clientY):e.pageY;this.parent.formatter.editorManager.observer.on(r._42,this.undoStack,this),this.parent.formatter.saveData()},e.prototype.resizeStart=function(e,t){var o=this;if(!this.parent.readonly){var s=t||e.target;if(this.prevSelectedImgEle=this.imgEle,"IMG"===s.tagName){this.parent.preventDefaultResize(e);var a=s;this.imgResizeDiv&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&n.i(i.detach)(this.imgResizeDiv),this.imageResize(a)}if(s.classList.contains("e-rte-imageboxmark")){if(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),this.pageX=this.getPointX(e),this.pageY=this.getPointY(e),e.preventDefault(),e.stopImmediatePropagation(),this.resizeBtnInit(),this.quickToolObj&&this.quickToolObj.imageQTBar.hidePopup(),s.classList.contains("e-rte-topLeft")&&(this.resizeBtnStat.topLeft=!0),s.classList.contains("e-rte-topRight")&&(this.resizeBtnStat.topRight=!0),s.classList.contains("e-rte-botLeft")&&(this.resizeBtnStat.botLeft=!0),s.classList.contains("e-rte-botRight")&&(this.resizeBtnStat.botRight=!0),i.Browser.isDevice&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&!this.imgResizeDiv.classList.contains("e-mob-span"))n.i(i.addClass)([this.imgResizeDiv],"e-mob-span");else{var l={event:e,requestType:"images"};this.parent.trigger(r.J,l,function(e){e.cancel&&o.cancelResizeAction()})}i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd,this)}}},e.prototype.imageClick=function(e){i.Browser.isDevice&&("IMG"===e.target.tagName&&"A"===e.target.parentElement.tagName||"IMG"===e.target.tagName?(this.contentModule.getEditPanel().setAttribute("contenteditable","false"),e.target.focus()):this.parent.readonly||this.contentModule.getEditPanel().setAttribute("contenteditable","true")),"IMG"===e.target.tagName&&"A"===e.target.parentElement.tagName&&e.preventDefault()},e.prototype.onCutHandler=function(){this.imgResizeDiv&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&this.cancelResizeAction()},e.prototype.imageResize=function(e){this.resizeBtnInit(),this.imgEle=e,n.i(i.addClass)([this.imgEle],"e-resize"),this.imgResizeDiv=this.parent.createElement("span",{className:"e-img-resize"+this.parent.getCssClass(!0),id:this.rteID+"_imgResize"}),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-topLeft"+this.parent.getCssClass(!0),styles:"cursor: nwse-resize"})),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-topRight"+this.parent.getCssClass(!0),styles:"cursor: nesw-resize"})),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-botLeft"+this.parent.getCssClass(!0),styles:"cursor: nesw-resize"})),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-botRight"+this.parent.getCssClass(!0),styles:"cursor: nwse-resize"})),i.Browser.isDevice&&n.i(i.addClass)([this.imgResizeDiv],"e-mob-rte"),e.style.outline="2px solid #4a90e2",this.imgResizePos(e,this.imgResizeDiv),this.resizeImgDupPos(e),this.contentModule.getEditPanel().appendChild(this.imgResizeDiv),i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing,this)},e.prototype.getPointX=function(e){return e.touches&&e.touches.length?e.touches[0].pageX:e.pageX},e.prototype.getPointY=function(e){return e.touches&&e.touches.length?e.touches[0].pageY:e.pageY},e.prototype.imgResizePos=function(e,t){var n=this.calcPos(e),r=n.top,o=n.left,s=e.getBoundingClientRect().width,a=e.getBoundingClientRect().height,l=i.Browser.isDevice?4*parseInt(e.style.outline.slice(-3),10)+2:2*parseInt(e.style.outline.slice(-3),10)+2,d=i.Browser.isDevice?0:2;t.querySelector(".e-rte-botLeft").style.left=o-l+"px",t.querySelector(".e-rte-botLeft").style.top=a-l+r+"px",t.querySelector(".e-rte-botRight").style.left=s-(l-d)+o+"px",t.querySelector(".e-rte-botRight").style.top=a-l+r+"px",t.querySelector(".e-rte-topRight").style.left=s-(l-d)+o+"px",t.querySelector(".e-rte-topRight").style.top=r-l+"px",t.querySelector(".e-rte-topLeft").style.left=o-l+"px",t.querySelector(".e-rte-topLeft").style.top=r-l+"px"},e.prototype.calcPos=function(e){for(var t,r=["TD","TH","TABLE","A"],o={top:0,left:0},s=e.ownerDocument,a=(e.offsetParent&&(e.offsetParent.classList.contains("e-img-caption")||r.indexOf(e.offsetParent.tagName)>-1)?n.i(i.closest)(e,"#"+this.parent.getID()+"_rte-edit-view"):e.offsetParent)||s.documentElement;a&&(a===s.body||a===s.documentElement)&&"static"===a.style.position;)a=a.parentNode;return a&&a!==e&&1===a.nodeType&&(o=a.getBoundingClientRect()),e.offsetParent&&e.offsetParent.classList.contains("e-img-caption")?(t=e.getBoundingClientRect(),{top:t.top-o.top,left:t.left-o.left}):{top:e.offsetTop,left:e.offsetLeft}},e.prototype.setAspectRatio=function(e,t,r,o){if(!n.i(i.isNullOrUndefined)(e.width)){var s=""!==e.style.width?e.style.width.match(/^\d+(\.\d*)?%$/g)?parseFloat(e.style.width):parseInt(e.style.width,10):e.width,a=""!==e.style.height?parseInt(e.style.height,10):e.height;if(s>a)if(e.style.minWidth=0===this.parent.insertImageSettings.minWidth?"20px":n.i(i.formatUnit)(this.parent.insertImageSettings.minWidth),this.parent.insertImageSettings.resizeByPercent){if(0!==parseInt(""+e.getBoundingClientRect().width,10)&&0!==parseInt(""+s,10)){var l=e.offsetWidth+this.mouseX,d=l/e.offsetWidth*("NaN"===parseFloat(e.style.width).toString()?e.offsetWidth/parseFloat(getComputedStyle(this.parent.element).width)*100:parseFloat(e.style.width));e.style.width=(d>3?d:3)+"%"}else e.style.width=this.pixToPerc(s/a*r,e.previousElementSibling||e.parentElement)+"%";e.style.height=null,e.removeAttribute("height")}else if(""===e.style.width&&""!==e.style.height)e.style.height=r+"px";else if(""!==e.style.width&&""===e.style.height){var c=s/a*r+s/a<this.parent.inputElement.getBoundingClientRect().right-32?s/a*r+s/a:this.parent.inputElement.getBoundingClientRect().right-32;e.style.width=c.toString()+"px",e.style.height=r+"px"}else if(""!==e.style.width){var c=s/a*r<this.parent.inputElement.getBoundingClientRect().right-32?s/a*r:this.parent.inputElement.getBoundingClientRect().right-32;e.style.width=c+"px",e.style.height=r+"px"}else if(this.parent.iframeSettings.enable)e.setAttribute("width",(e.width+this.mouseX).toString());else{var c=0===e.offsetWidth?e.width+this.mouseX+parseInt(e.style.outlineWidth.split("p")[0],10):e.offsetWidth+this.mouseX;e.setAttribute("width",c.toString())}else if(a>s)if(this.parent.insertImageSettings.resizeByPercent){if(0!==parseInt(""+e.getBoundingClientRect().width,10)&&0!==parseInt(""+s,10)){var l=e.offsetWidth+this.mouseX,d=l/e.offsetWidth*("NaN"===parseFloat(e.style.width).toString()?e.offsetWidth/parseFloat(getComputedStyle(this.parent.element).width)*100:parseFloat(e.style.width));e.style.width=(d>3?d:3)+"%"}else e.style.width=this.pixToPerc(t/a*r,e.previousElementSibling||e.parentElement)+"%";e.style.height=null,e.removeAttribute("height")}else""!==e.style.width?(e.style.width=t+"px",e.style.height=a/s*t+"px"):e.setAttribute("width",this.resizeBtnStat.botRight?(this.getPointX(o.event)-e.getBoundingClientRect().left).toString():t.toString());else this.parent.insertImageSettings.resizeByPercent?(e.style.width=this.pixToPerc(t,e.previousElementSibling||e.parentElement)+"%",e.style.height=null,e.removeAttribute("height")):(e.style.width=(t>=15?t:15)+"px",e.style.height=(t>=15?t:15)+"px")}},e.prototype.pixToPerc=function(e,t){return e/parseFloat(getComputedStyle(t).width)*100},e.prototype.imgDupMouseMove=function(e,t,o){var s=this,a={event:o,requestType:"images"};this.parent.trigger(r.K,a,function(r){if(r.cancel)s.cancelResizeAction();else{if(parseInt(s.parent.insertImageSettings.minWidth,10)>=parseInt(e,10)||parseInt(s.parent.getInsertImgMaxWidth(),10)<=parseInt(e,10)&&n.i(i.isNullOrUndefined)(s.imgEle.style.width))return;if(!s.parent.insertImageSettings.resizeByPercent&&(parseInt(s.parent.insertImageSettings.minHeight,10)>=parseInt(t,10)||parseInt(s.parent.insertImageSettings.maxHeight,10)<=parseInt(t,10)))return;s.imgEle.parentElement.style.cursor="pointer",s.setAspectRatio(s.imgEle,parseInt(e,10),parseInt(t,10),a),s.resizeImgDupPos(s.imgEle),s.imgResizePos(s.imgEle,s.imgResizeDiv)}})},e.prototype.resizing=function(e){if(!this.parent)return void this.cancelResizeAction();this.imgEle.offsetWidth>=this.parent.getInsertImgMaxWidth()?this.imgEle.style.maxHeight=this.imgEle.offsetHeight+"px":n.i(i.isNullOrUndefined)(this.parent.insertImageSettings.maxHeight)&&(this.imgEle.style.maxHeight=""),this.imgEle.style.maxWidth=(null!=n.i(i.closest)(this.imgEle,"ol,ul")?this.parent.getInsertImgMaxWidth()-parseInt(getComputedStyle(n.i(i.closest)(this.imgEle,"ol,ul")).paddingLeft,0):this.parent.getInsertImgMaxWidth())+"px";var t=this.getPointX(e),r=this.getPointY(e),o=this.resizeBtnStat.botLeft||this.resizeBtnStat.topLeft?-(t-this.pageX):t-this.pageX,s=this.resizeBtnStat.botLeft||this.resizeBtnStat.topLeft?-(r-this.pageY):r-this.pageY,a=parseInt(this.imgDupPos.width,10)+o,l=parseInt(this.imgDupPos.height,10)+s;this.mouseX=o,this.pageX=t,this.pageY=r,this.resizeBtnStat.botRight?this.imgDupMouseMove(a+"px",l+"px",e):this.resizeBtnStat.botLeft?this.imgDupMouseMove(a+"px",l+"px",e):this.resizeBtnStat.topRight?this.imgDupMouseMove(a+"px",l+"px",e):this.resizeBtnStat.topLeft&&this.imgDupMouseMove(a+"px",l+"px",e)},e.prototype.cancelResizeAction=function(){i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),this.imgEle&&this.imgResizeDiv&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&(n.i(i.detach)(this.imgResizeDiv),this.imgEle.style.outline="",this.imgResizeDiv=null,this.pageX=null,this.pageY=null)},e.prototype.resizeImgDupPos=function(e){this.imgDupPos={width:""!==e.style.width&&this.parent.insertImageSettings&&!this.parent.insertImageSettings.resizeByPercent?this.imgEle.style.width:e.width+"px",height:""!==e.style.height?this.imgEle.style.height:e.height+"px"}},e.prototype.resizeBtnInit=function(){return this.resizeBtnStat={botLeft:!1,botRight:!1,topRight:!1,topLeft:!1}},e.prototype.onToolbarAction=function(e){switch(n.i(u.b)()&&this.parent.notify(r._19,{}),e.args.item.subCommand){case"Replace":this.parent.fileManagerSettings.enable?this.parent.notify(r._73,e):this.parent.notify(r.X,e);break;case"Caption":this.parent.notify(r._11,e);break;case"InsertLink":this.parent.notify(r._6,e);break;case"AltText":this.parent.notify(r._7,e);break;case"Remove":this.parent.notify(r._8,e);break;case"Dimension":this.parent.notify(r._12,e);break;case"OpenImageLink":this.openImgLink(e);break;case"EditImageLink":this.editImgLink(e);break;case"RemoveImageLink":this.removeImgLink(e)}},e.prototype.openImgLink=function(e){var t=""===e.selectParent[0].parentNode.target?"_self":"_blank";this.parent.formatter.process(this.parent,e.args,e.args,{url:e.selectParent[0].parentNode.href,target:t,selectNode:e.selectNode,subCommand:e.args.item.subCommand})},e.prototype.editImgLink=function(e){var t=e.selectParent[0].parentNode,n=this.i10n.getConstant("dialogUpdate"),i={url:t.href,target:t.target,header:"Edit Link",btnText:n};this.insertImgLink(e,i)},e.prototype.removeImgLink=function(e){i.Browser.isIE&&this.contentModule.getEditPanel().focus(),e.selection.restore();var t=!(!this.contentModule.getEditPanel().contains(this.captionEle)||!n.i(i.select)("a",this.captionEle)),r=t?[this.captionEle]:[e.selectNode[0].parentElement];this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:e.selectNode[0],selectParent:r,selection:e.selection,subCommand:e.args.item.subCommand}),this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),n.i(i.isNullOrUndefined)(e.selectParent)||n.i(i.removeClass)([e.selectParent[0]],"e-img-focus")),t&&n.i(i.select)(".e-img-inner",this.captionEle).focus()},e.prototype.onKeyDown=function(e){var t,r,s,a,l=e.args;this.deletedImg=[];var d,c=[27,112,113,114,115,116,117,118,119,120,121,122,123,44,45,9,16,17,18,19,20,33,34,35,36,37,38,39,40,91,92,93,144,145,182,183];if("HTML"===this.parent.editorMode&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),d=t.startContainer===t.endContainer&&t.startOffset===t.endOffset),!d&&"HTML"===this.parent.editorMode&&c.indexOf(l.which)<0)for(var u=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),h=0;h<u.length;h++)"IMG"===u[h].nodeName&&this.deletedImg.push(u[h]);if("HTML"===this.parent.editorMode&&(8===l.which&&"Backspace"===l.code||46===l.which&&"Delete"===l.code)){var p=t.startContainer===t.endContainer&&t.startOffset===t.endOffset;8===l.which&&"Backspace"===l.code&&p?this.checkImageBack(t):46===l.which&&"Delete"===l.code&&p&&this.checkImageDel(t)}if(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&"KeyK"!==l.code&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),s=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),a=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t),!l.ctrlKey&&l.key&&(1===l.key.length||"enter"===l.action)&&!n.i(i.isNullOrUndefined)(a[0])&&"IMG"===a[0].tagName&&a[0].parentElement)){var m=a[0].parentElement.childNodes[0];this.contentModule.getEditPanel().querySelector(".e-img-resize")&&this.removeResizeEle(),this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),m,m,m.textContent.length,m.textContent.length),n.i(i.removeClass)([a[0]],"e-img-focus"),this.quickToolObj.imageQTBar.hidePopup()}if(!l.ctrlKey||89!==l.keyCode&&90!==l.keyCode||this.undoStack({subCommand:90===l.keyCode?"undo":"redo"}),8===l.keyCode||46===l.keyCode){if(s&&"IMG"===s[0].nodeName&&s.length<1){n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),l.preventDefault();var f={selectNode:s,selection:r,selectParent:a,args:{item:{command:"Images",subCommand:"Remove"},originalEvent:l}};this.deleteImg(f,l.keyCode)}this.parent.contentModule.getEditPanel().querySelector(".e-img-resize")&&this.removeResizeEle()}switch("Backspace"===l.code&&(l.action="backspace"),l.action){case"escape":n.i(i.isNullOrUndefined)(this.dialogObj)||this.dialogObj.close();break;case"backspace":case"delete":for(var h=0;h<this.deletedImg.length;h++){var g=this.deletedImg[h].src;this.imageRemovePost(g)}if("Markdown"!==this.parent.editorMode)if(3===t.startContainer.nodeType)"Backspace"===l.code?t.startContainer.previousElementSibling&&0===t.startOffset&&t.startContainer.previousElementSibling.classList.contains(o._0)&&t.startContainer.previousElementSibling.classList.contains(o._2)&&n.i(i.detach)(t.startContainer.previousElementSibling):t.startContainer.nextElementSibling&&t.endContainer.textContent.length===t.endOffset&&t.startContainer.nextElementSibling.classList.contains(o._0)&&t.startContainer.nextElementSibling.classList.contains(o._2)&&n.i(i.detach)(t.startContainer.nextElementSibling);else if(1===t.startContainer.nodeType)if(t.startContainer.querySelector("."+o._0+"."+o._2))n.i(i.detach)(t.startContainer.querySelector("."+o._0+"."+o._2));else if(t.startContainer.querySelector("."+o._0+"."+o.T))n.i(i.detach)(t.startContainer.querySelector("."+o._0+"."+o.T));else if(t.startContainer.classList.contains("e-img-wrap")&&n.i(i.closest)(t.startContainer,"."+o._0)){var b=t.startContainer.parentElement.parentElement;if(n.i(i.detach)(n.i(i.closest)(t.startContainer,"."+o._0)),b&&""===b.textContent.trim()){var v=this.parent.createElement("br");v.classList.add("e-rte-image-remove-focus"),b.appendChild(v)}}break;case"insert-image":n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),this.openDialog(!0,l,r,s,a),l.preventDefault()}},e.prototype.openDialog=function(e,t,r,o,s){var a,l,d,c;e||n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)?(l=r,d=o,c=s):(a=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),l=this.parent.formatter.editorManager.nodeSelection.save(a,this.parent.contentModule.getDocument()),d=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(a),c=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(a)),"HTML"===this.parent.editorMode?this.insertImage({args:{item:{command:"Images",subCommand:"Image"},originalEvent:t,name:e?null:"showDialog"},selectNode:d,selection:l,selectParent:c}):this.insertImage({args:{item:{command:"Images",subCommand:"Image"},originalEvent:t,name:e?null:"showDialog"},member:"image",text:this.parent.formatter.editorManager.markdownSelection.getSelectedText(this.parent.contentModule.getEditPanel()),module:"Markdown",name:"insertImage"})},e.prototype.showDialog=function(){this.openDialog(!1),this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.closeDialog=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.onKeyUp=function(e){if(!n.i(i.isNullOrUndefined)(this.deletedImg)&&this.deletedImg.length>0)for(var t=0;t<this.deletedImg.length;t++){var o={element:this.deletedImg[t],src:this.deletedImg[t].getAttribute("src")};this.parent.trigger(r._66,o)}},e.prototype.checkImageBack=function(e){"#text"!==e.startContainer.nodeName||0!==e.startOffset||n.i(i.isNullOrUndefined)(e.startContainer.previousSibling)||"IMG"!==e.startContainer.previousSibling.nodeName?"#text"===e.startContainer.nodeName||n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset-1])||"IMG"!==e.startContainer.childNodes[e.startOffset-1].nodeName||this.deletedImg.push(e.startContainer.childNodes[e.startOffset-1]):this.deletedImg.push(e.startContainer.previousSibling)},e.prototype.checkImageDel=function(e){"#text"!==e.startContainer.nodeName||e.startOffset!==e.startContainer.textContent.length||n.i(i.isNullOrUndefined)(e.startContainer.nextSibling)||"IMG"!==e.startContainer.nextSibling.nodeName?"#text"===e.startContainer.nodeName||n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset])||"IMG"!==e.startContainer.childNodes[e.startOffset].nodeName||this.deletedImg.push(e.startContainer.childNodes[e.startOffset]):this.deletedImg.push(e.startContainer.nextSibling)},e.prototype.alignmentSelect=function(e){var t=e.item;if(document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))&&"Images"===t.command){var r=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),o=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(r);o="IMG"===o[0].nodeName?o:[this.imgEle];var s={args:e,selectNode:o};switch(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),t.subCommand){case"JustifyLeft":this.alignImage(s,"JustifyLeft");break;case"JustifyCenter":this.alignImage(s,"JustifyCenter");break;case"JustifyRight":this.alignImage(s,"JustifyRight");break;case"Inline":this.inline(s);break;case"Break":this.break(s)}this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),n.i(i.removeClass)([o[0]],"e-img-focus")),this.cancelResizeAction()}},e.prototype.imageWithLinkQTBarItemUpdate=function(){for(var e=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item"),t=0;t<e.length;t++)e[t].getAttribute("title")===this.i10n.getConstant("openLink")||e[t].getAttribute("title")===this.i10n.getConstant("editLink")||e[t].getAttribute("title")===this.i10n.getConstant("removeLink")?(n.i(i.addClass)([e[t]],"e-link-groups"),e[t].style.display="none"):"Insert Link"===e[t].getAttribute("title")?e[t].style.display="":e[t].classList.contains("e-rte-horizontal-separator")&&(e[t],n.i(i.detach)(e[t]));var r=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item:not(.e-link-groups)");this.quickToolObj.imageQTBar.addQTBarItem(["-"],Math.round(r.length/2))},e.prototype.showImageQuickToolbar=function(e){var t=this;if(!("Images"!==e.type||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule.imageQTBar)||n.i(i.isNullOrUndefined)(e.args))){this.quickToolObj=this.parent.quickToolbarModule;var r=e.args,o=e.elements;[].forEach.call(e.elements,function(e,t){0===t&&(o=e)}),o&&!n.i(i.closest)(o,"a")&&this.imageWithLinkQTBarItemUpdate(),"IMG"===o.nodeName&&n.i(i.addClass)([o],["e-img-focus"]);var s=this.parent.iframeSettings.enable?window.pageYOffset+this.parent.element.getBoundingClientRect().top+r.clientY:r.pageY;this.parent.quickToolbarModule.imageQTBar&&(e.isNotify?setTimeout(function(){t.parent.formatter.editorManager.nodeSelection.Clear(t.contentModule.getDocument()),t.parent.formatter.editorManager.nodeSelection.setSelectionContents(t.contentModule.getDocument(),o),t.quickToolObj.imageQTBar.showPopup(r.pageX,s,o)},400):this.quickToolObj.imageQTBar.showPopup(r.pageX,s,o))}},e.prototype.hideImageQuickToolbar=function(){n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector(".e-img-focus"))||(n.i(i.removeClass)([this.contentModule.getEditPanel().querySelector(".e-img-focus")],"e-img-focus"),this.quickToolObj&&this.quickToolObj.imageQTBar&&document.body.contains(this.quickToolObj.imageQTBar.element)&&this.quickToolObj.imageQTBar.hidePopup())},e.prototype.editAreaClickHandler=function(e){if(this.parent.readonly)return void this.hideImageQuickToolbar();var t=e.args,o=this.parent.quickToolbarSettings.showOnRightClick;if(2===t.which||o&&1===t.which||!o&&3===t.which)return void(o&&1===t.which&&!n.i(i.isNullOrUndefined)(t.target)&&"IMG"===t.target.tagName&&(this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),t.target)));if("HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.imageQTBar){this.quickToolObj=this.parent.quickToolbarModule;var s=t.target;this.contentModule=this.rendererFactory.getRenderer(d.a.Content);var a=this.quickToolObj.imageQTBar.element.classList.contains("e-rte-pop");if("IMG"===s.nodeName&&this.parent.quickToolbarModule){if(a)return;this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),s),n.i(u.b)()&&this.parent.notify(r._18,e),n.i(i.addClass)([s],"e-img-focus");var l=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item");if(n.i(i.closest)(s,"a")){for(var c=0;c<l.length;c++)l[c].getAttribute("title")===this.i10n.getConstant("openLink")||l[c].getAttribute("title")===this.i10n.getConstant("editLink")||l[c].getAttribute("title")===this.i10n.getConstant("removeLink")?(l[c].style.display="",n.i(i.removeClass)([l[c]],"e-link-groups")):"Insert Link"===l[c].getAttribute("title")?l[c].style.display="none":l[c].classList.contains("e-rte-horizontal-separator")&&(l[c],n.i(i.detach)(l[c]));var h=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item:not(.e-link-groups)");this.quickToolObj.imageQTBar.addQTBarItem(["-"],Math.round(h.length/2))}else n.i(i.closest)(s,"a")||this.imageWithLinkQTBarItemUpdate();this.showImageQuickToolbar({args:t,type:"Images",elements:[t.target]})}else this.hideImageQuickToolbar()}},e.prototype.insertImgLink=function(e,t){var r=this;if("IMG"===e.selectNode[0].nodeName&&(this.imagDialog(e),!n.i(i.isNullOrUndefined)(this.dialogObj))){var o=this.parent.createElement("div",{className:"e-img-linkwrap"+this.parent.getCssClass(!0)}),s=this.i10n.getConstant("linkurl"),a='<div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" class="e-input e-img-link'+this.parent.getCssClass(!0)+'" spellcheck="false" placeholder="'+s+'"/></div><div class="e-rte-label"></div><div class="e-rte-field"><input type="checkbox" class="e-rte-linkTarget'+this.parent.getCssClass(!0)+'" data-role ="none"></div>',d=n.i(c.m)(a);o.appendChild(d);var u=o.querySelector(".e-rte-linkTarget"),h=o.querySelector(".e-img-link"),p=this.i10n.getConstant("linkOpenInNewWindow");this.checkBoxObj=new l.CheckBox({label:p,checked:!0,enableRtl:this.parent.enableRtl,cssClass:this.parent.getCssClass(),change:function(e){m=e.checked?"_blank":null}}),this.checkBoxObj.isStringTemplate=!0,this.checkBoxObj.createElement=this.parent.createElement,this.checkBoxObj.appendTo(u);var m=this.checkBoxObj.checked?"_blank":null,f=this.checkBoxObj.checked?this.i10n.getConstant("ImageLinkAriaLabel"):null,g=this.i10n.getConstant("dialogUpdate"),b={args:e.args,selfImage:this,selection:e.selection,selectNode:e.selectNode,selectParent:e.selectParent,link:h,target:m,ariaLabel:f};this.dialogObj.setProperties({height:"inherit",width:"290px",header:this.parent.localeObj.getConstant("imageInsertLinkHeader"),content:o,buttons:[{click:function(e){r.insertlink(b)},buttonModel:{content:g,cssClass:"e-flat e-update-link"+this.parent.getCssClass(!0),isPrimary:!0}}],cssClass:this.dialogObj.cssClass+" e-rte-img-link-dialog"}),n.i(i.isNullOrUndefined)(this.parent.cssClass)||this.dialogObj.setProperties({cssClass:this.parent.cssClass}),n.i(i.isNullOrUndefined)(t)||(h.value=t.url,t.target?this.checkBoxObj.checked=!0:this.checkBoxObj.checked=!1,this.dialogObj.header=t.header),this.dialogObj.element.style.maxHeight="inherit",this.dialogObj.content.querySelector("input").focus()}},e.prototype.insertAltText=function(e){var t=this;if("IMG"===e.selectNode[0].nodeName){this.imagDialog(e);var r=this.i10n.getConstant("altText");if(!n.i(i.isNullOrUndefined)(this.dialogObj)){var o=this.parent.createElement("div",{className:"e-img-altwrap"+this.parent.getCssClass(!0)}),s=this.i10n.getConstant("alternateHeader"),a=this.i10n.getConstant("dialogUpdate"),l=null===e.selectNode[0].getAttribute("alt")?"":e.selectNode[0].getAttribute("alt"),d='<div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" spellcheck="false" class="e-input e-img-alt'+this.parent.getCssClass(!0)+'" placeholder="'+r+'"/></div>',u=n.i(c.m)(d);u.querySelector("input").setAttribute("value",l),o.appendChild(u);var h=o.querySelector(".e-img-alt"),p={args:e.args,selfImage:this,selection:e.selection,selectNode:e.selectNode,alt:h};this.dialogObj.setProperties({height:"inherit",width:"290px",header:s,content:o,buttons:[{click:function(e){t.insertAlt(p)},buttonModel:{content:a,cssClass:"e-flat e-update-alt"+this.parent.getCssClass(!0),isPrimary:!0}}],cssClass:this.dialogObj.cssClass+" e-rte-img-alt-dialog"}),n.i(i.isNullOrUndefined)(this.parent.cssClass)||this.dialogObj.setProperties({cssClass:this.parent.cssClass}),this.dialogObj.element.style.maxHeight="inherit",this.dialogObj.content.querySelector("input").focus()}}},e.prototype.insertAlt=function(e){if(!n.i(i.isNullOrUndefined)(e.alt)){e.selection.restore(),0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData();var t=e.alt.value;this.parent.formatter.process(this.parent,e.args,e.args,{altText:t,selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.dialogObj.hide({returnValue:!1})}},e.prototype.insertlink=function(e){if("IMG"===e.selectNode[0].nodeName){var t=e.link.value;if(""===t)return n.i(i.addClass)([e.link],"e-error"),e.link.setSelectionRange(0,t.length),void e.link.focus();this.isUrl(t)?n.i(i.removeClass)([e.link],"e-error"):t="http://"+t;var r=e.selfImage;if("HTML"===r.parent.editorMode&&e.selection.restore(),0===r.parent.formatter.getUndoRedoStack().length&&r.parent.formatter.saveData(),"A"===e.selectNode[0].parentElement.nodeName)return r.parent.formatter.process(r.parent,e.args,e.args,{url:t,target:r.checkBoxObj.checked?"_blank":null,ariaLabel:r.checkBoxObj.checked?this.i10n.getConstant("ImageLinkAriaLabel"):null,selectNode:e.selectNode,subCommand:e.args.item.subCommand}),void r.dialogObj.hide({returnValue:!0});r.parent.formatter.process(r.parent,e.args,e.args,{url:t,target:r.checkBoxObj.checked?"_blank":null,ariaLabel:r.checkBoxObj.checked?this.i10n.getConstant("ImageLinkAriaLabel"):null,selectNode:e.selectNode,subCommand:e.args.item.subCommand,selection:e.selection});var o=n.i(i.closest)(e.selectNode[0],".e-img-caption");o&&n.i(i.select)(".e-img-inner",o).focus(),o&&n.i(i.select)(".e-img-inner",o).focus(),r.dialogObj.hide({returnValue:!1})}},e.prototype.isUrl=function(e){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi.test(e)},e.prototype.deleteImg=function(e,t){if("IMG"===e.selectNode[0].nodeName){var s={element:e.selectNode[0],src:e.selectNode[0].getAttribute("src")};0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),e.selection.restore(),this.contentModule.getEditPanel().querySelector(".e-img-resize")&&this.removeResizeEle(),this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,captionClass:o._0,subCommand:e.args.item.subCommand}),this.imageRemovePost(s.src),this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&this.quickToolObj.imageQTBar.hidePopup(),this.cancelResizeAction(),n.i(i.isNullOrUndefined)(t)&&this.parent.trigger(r._66,s)}},e.prototype.imageRemovePost=function(e){var t=this,r="";if(!n.i(i.isNullOrUndefined)(this.parent.insertImageSettings.removeUrl)&&""!==this.parent.insertImageSettings.removeUrl){r=e.indexOf("http://")>-1||e.indexOf("https://")>-1?e:new URL(e,document.baseURI).href,this.removingImgName=r.replace(/^.*[\\\/]/,"");var o=new XMLHttpRequest;o.addEventListener("readystatechange",function(){4===this.readyState&&200===this.status&&t.triggerPost(this.response)}),o.open("GET",r),o.responseType="blob",o.send()}},e.prototype.triggerPost=function(e){var t=this.parent.insertImageSettings.removeUrl;if(!n.i(i.isNullOrUndefined)(t)&&""!==t){var r=new File([e],this.removingImgName),o=new i.Ajax(t,"POST",!0,null),s=new FormData;s.append("UploadFiles",r),o.send(s)}},e.prototype.caption=function(e){var t=e.selectNode[0];if("IMG"===t.nodeName){e.selection.restore(),0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),this.cancelResizeAction(),n.i(i.addClass)([t],"e-rte-image");var r=e.args.item?e.args.item.subCommand:"Caption";if(n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o._0))){this.captionEle=this.parent.createElement("span",{className:o._0+" "+o._1+this.parent.getCssClass(!0),attrs:{contenteditable:"false",draggable:"false",style:"width:"+this.parent.insertImageSettings.width}});var s=this.parent.createElement("span",{className:"e-img-wrap"+this.parent.getCssClass(!0)}),a=this.parent.createElement("span",{className:"e-img-inner"+this.parent.getCssClass(!0),attrs:{contenteditable:"true"}}),l=e.selectNode[0].parentElement;"A"===l.tagName&&l.setAttribute("contenteditable","true"),s.appendChild("A"===l.tagName?l:e.selectNode[0]),s.appendChild(a);var d=this.i10n.getConstant("imageCaption");a.innerHTML=d,this.captionEle.appendChild(s),t.classList.contains(o._3)&&n.i(i.addClass)([this.captionEle],o._2),t.classList.contains(o.T)&&n.i(i.addClass)([this.captionEle],o.T),t.classList.contains(o.R)&&n.i(i.addClass)([this.captionEle],o.R),t.classList.contains(o.Q)&&n.i(i.addClass)([this.captionEle],o.Q),t.classList.contains(o.S)&&n.i(i.addClass)([this.captionEle],o.S),this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:this.captionEle,selectNode:e.selectNode,subCommand:r}),this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),a.childNodes[0],a.childNodes[0],0,a.childNodes[0].textContent.length)}else n.i(i.detach)(n.i(i.closest)(t,"."+o._0)),i.Browser.isIE&&(this.contentModule.getEditPanel().focus(),e.selection.restore()),"A"===t.parentElement.tagName?this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:t.parentElement,selectNode:e.selectNode,subCommand:r}):this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:t,selectNode:e.selectNode,subCommand:r});this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),n.i(i.removeClass)([t],"e-img-focus"))}},e.prototype.imageSize=function(e){var t=this;if("IMG"===e.selectNode[0].nodeName&&(this.imagDialog(e),!n.i(i.isNullOrUndefined)(this.dialogObj))){var r=this.i10n.getConstant("imageSizeHeader"),o=this.i10n.getConstant("dialogUpdate"),s=this.imgsizeInput(e),a={args:e.args,selfImage:this,selection:e.selection,selectNode:e.selectNode};this.dialogObj.setProperties({height:i.Browser.isDevice?"300px":"inherit",width:"290px",header:r,content:s,buttons:[{click:function(e){t.insertSize(a)},buttonModel:{content:o,cssClass:"e-flat e-update-size"+this.parent.getCssClass(!0),isPrimary:!0}}],cssClass:this.dialogObj.cssClass+" e-rte-img-size-dialog"}),n.i(i.isNullOrUndefined)(this.parent.cssClass)||this.dialogObj.setProperties({cssClass:this.parent.cssClass}),this.dialogObj.element.style.maxHeight="inherit",this.dialogObj.content.querySelector("input").focus()}},e.prototype.break=function(e){if("IMG"===e.selectNode[0].nodeName){var t=e.args.item?e.args.item.subCommand:"Break";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.inline=function(e){if("IMG"===e.selectNode[0].nodeName){var t=e.args.item?e.args.item.subCommand:"Inline";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.alignImage=function(e,t){var n=e.args.item?e.args.item.subCommand:t;this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:n})},e.prototype.clearDialogObj=function(){this.dialogObj&&(this.dialogObj.destroy(),n.i(i.detach)(this.dialogObj.element),this.dialogObj=null)},e.prototype.imagDialog=function(e){var t=this;if(this.dialogObj)return void this.dialogObj.hide({returnValue:!0});var r=this.parent.createElement("div",{className:"e-rte-img-dialog"+this.parent.getCssClass(!0),id:this.rteID+"_image"});this.parent.element.appendChild(r);var s=this.i10n.getConstant("dialogInsert"),a=this.i10n.getConstant("dialogCancel"),l=this.i10n.getConstant("imageHeader"),d=e.selection,c={selfImage:this,selection:e.selection,args:e.args,selectParent:e.selectParent},u={header:l,cssClass:o._12+this.parent.getCssClass(!0),enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:i.Browser.isDevice?"290px":"340px",isModal:i.Browser.isDevice,buttons:[{click:this.insertImageUrl.bind(c),buttonModel:{content:s,cssClass:"e-flat e-insertImage"+this.parent.getCssClass(!0),isPrimary:!0,disabled:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel"+this.parent.getCssClass(!0),content:a}}],target:i.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){t.isImgUploaded&&t.uploadObj.removing(),t.parent.isBlur=!1,e&&e.event.returnValue&&("HTML"===t.parent.editorMode?d.restore():t.parent.formatter.editorManager.markdownSelection.restore(t.parent.contentModule.getEditPanel())),t.dialogObj.destroy(),n.i(i.detach)(t.dialogObj.element),t.dialogRenderObj.close(e),t.dialogObj=null}},h=this.parent.createElement("div",{className:"e-img-content"+this.parent.getCssClass(!0)});(!n.i(i.isNullOrUndefined)(this.parent.insertImageSettings.path)&&"Markdown"===this.parent.editorMode||"HTML"===this.parent.editorMode)&&h.appendChild(this.imgUpload(e));var p=this.parent.createElement("div",{className:"e-linkheader"+this.parent.getCssClass(!0)}),m=this.i10n.getConstant("imageLinkHeader");"HTML"===this.parent.editorMode?p.innerHTML=m:p.innerHTML=this.i10n.getConstant("mdimageLink"),h.appendChild(p),h.appendChild(this.imageUrlPopup(e)),e.selectNode&&"IMG"===e.selectNode[0].nodeName?(u.header=this.parent.localeObj.getConstant("editImageHeader"),u.content=h):u.content=h,this.dialogObj=this.dialogRenderObj.render(u),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(r),n.i(i.isNullOrUndefined)(this.dialogObj)||(e.selectNode&&"IMG"===e.selectNode[0].nodeName&&"insertImage"===e.name&&(this.dialogObj.element.querySelector(".e-insertImage").textContent=this.parent.localeObj.getConstant("dialogUpdate")),r.style.maxHeight="inherit",this.quickToolObj&&(this.quickToolObj.imageQTBar&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),n.i(i.isNullOrUndefined)(e.selectParent)||n.i(i.removeClass)([e.selectParent[0]],"e-img-focus")),this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup(),this.quickToolObj.textQTBar&&this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)&&this.quickToolObj.textQTBar.hidePopup()))},e.prototype.cancelDialog=function(e){this.parent.isBlur=!1,this.dialogObj.hide({returnValue:!0}),this.isImgUploaded&&this.uploadObj.removing()},e.prototype.onDocumentClick=function(e){var t=e.target;if("IMG"===t.nodeName&&(this.imgEle=t),this.parent&&("#document"!==t.nodeName&&(this.parent.currentTarget=e.target),!n.i(i.isNullOrUndefined)(this.dialogObj)&&(!n.i(i.closest)(t,"[id='"+this.dialogObj.element.id+"']")&&this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()&&!this.parent.getToolbarElement().contains(e.target)||this.parent.getToolbarElement()&&this.parent.getToolbarElement().contains(e.target)&&!n.i(i.closest)(t,"#"+this.parent.getID()+"_toolbar_Image")&&!t.querySelector("#"+this.parent.getID()+"_toolbar_Image"))&&(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight||(this.dialogObj.hide({returnValue:!0}),this.parent.isBlur=!0,n.i(c.l)(this.parent.element,"focusout"))),this.parent.iframeSettings.enable&&!n.i(i.isNullOrUndefined)(this.parent.currentTarget)&&"IMG"===this.parent.currentTarget.nodeName||"IMG"===e.target.tagName||!this.imgResizeDiv||this.quickToolObj&&this.quickToolObj.imageQTBar&&this.quickToolObj.imageQTBar.element.contains(e.target)||!this.contentModule.getEditPanel().contains(this.imgResizeDiv)||this.cancelResizeAction(),!this.contentModule.getEditPanel().querySelector(".e-img-resize")||this.parent.iframeSettings.enable&&"IMG"===this.parent.currentTarget.nodeName||("IMG"!==t.tagName&&this.removeResizeEle(),"IMG"===t.tagName||n.i(i.isNullOrUndefined)(this.imgEle)?n.i(i.isNullOrUndefined)(this.prevSelectedImgEle)||this.prevSelectedImgEle===t||(this.prevSelectedImgEle.style.outline=""):this.imgEle.style.outline=""),"IMG"!==t.tagName))for(var r=this.contentModule.getEditPanel().querySelectorAll("img"),o=0;o<r.length;o++)n.i(i.removeClass)([r[o]],"e-img-focus"),n.i(i.removeClass)([r[o]],"e-resize"),r[o].style.maxWidth=""},e.prototype.removeResizeEle=function(){i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),n.i(i.detach)(this.contentModule.getEditPanel().querySelector(".e-img-resize"))},e.prototype.onWindowResize=function(){n.i(i.isNullOrUndefined)(this.contentModule)||n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector(".e-img-resize"))||this.cancelResizeAction()},e.prototype.imageUrlPopup=function(e){var t=this,r=this.parent.createElement("div",{className:"imgUrl"+this.parent.getCssClass(!0)}),o=this.i10n.getConstant("imageUrl");return this.inputUrl=this.parent.createElement("input",{className:"e-input e-img-url"+this.parent.getCssClass(!0),attrs:{placeholder:o,spellcheck:"false","aria-label":this.i10n.getConstant("imageLinkHeader")}}),this.inputUrl.addEventListener("input",function(){n.i(i.isNullOrUndefined)(t.inputUrl)||(0===t.inputUrl.value.length?t.dialogObj.getButtons(0).element.disabled=!0:t.dialogObj.getButtons(0).element.removeAttribute("disabled"))}),r.appendChild(this.inputUrl),r},e.prototype.insertImageUrl=function(e){var t=this.selfImage;t.isImgUploaded=!1;var r=t.inputUrl.value;if(0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData(),n.i(i.isNullOrUndefined)(t.uploadUrl)||""===t.uploadUrl.url){if(""!==r){if("HTML"===t.parent.editorMode&&n.i(i.isNullOrUndefined)(n.i(i.closest)(this.selection.range.startContainer.parentNode,"[id='"+t.contentModule.getPanel().id+"']"))){t.contentModule.getEditPanel().focus();var s=t.parent.formatter.editorManager.nodeSelection.getRange(t.contentModule.getDocument());this.selection=t.parent.formatter.editorManager.nodeSelection.save(s,t.contentModule.getDocument()),this.selectParent=t.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(s)}var a=/[\w-]+.(jpg|png|jpeg|gif)/g,l=n.i(i.isNullOrUndefined)(r.match(a))||"HTML"!==t.parent.editorMode?"":r.match(a)[0],d={cssClass:"inline"===t.parent.insertImageSettings.display?o._3:o.T,url:r,selection:this.selection,altText:l,selectParent:this.selectParent,width:{width:t.parent.insertImageSettings.width,minWidth:t.parent.insertImageSettings.minWidth,maxWidth:t.parent.getInsertImgMaxWidth()},height:{height:t.parent.insertImageSettings.height,minHeight:t.parent.insertImageSettings.minHeight,maxHeight:t.parent.insertImageSettings.maxHeight}};t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,d),t.dialogObj.hide({returnValue:!1})}}else t.uploadUrl.cssClass="inline"===t.parent.insertImageSettings.display?o._3:o.T,t.dialogObj.hide({returnValue:!1}),t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,t.uploadUrl),t.uploadUrl.url="",t.contentModule.getEditPanel().querySelector(".e-img-resize")&&(t.imgEle.style.outline="",t.removeResizeEle())},e.prototype.imgsizeInput=function(e){var t=this,r=e.selectNode[0],o=this.i10n.getConstant("imageHeight"),a=this.i10n.getConstant("imageWidth"),l=this.parent.createElement("div",{className:"e-img-sizewrap"+this.parent.getCssClass(!0)}),d=!n.i(i.isNullOrUndefined)(this.changedWidthValue)||"auto"!==r.style.width.toString()&&""===r.style.width?n.i(i.isNullOrUndefined)(this.changedWidthValue)?parseInt(r.getClientRects()[0].width.toString(),10).toString():this.changedWidthValue:r.style.width,u=!n.i(i.isNullOrUndefined)(this.changedHeightValue)||"auto"!==r.style.height.toString()&&""===r.style.height?n.i(i.isNullOrUndefined)(this.changedHeightValue)?parseInt(r.getClientRects()[0].height.toString(),10).toString():this.changedHeightValue:r.style.height;this.changedWidthValue=null,this.changedHeightValue=null;var h='<div class="e-rte-label'+this.parent.getCssClass(!0)+'"><label>'+a+'</label></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" id="imgwidth" class="e-img-width'+this.parent.getCssClass(!0)+'"/></div><div class="e-rte-label'+this.parent.getCssClass(!0)+'"><label>'+o+'</label></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"> <input type="text" id="imgheight" class="e-img-height'+this.parent.getCssClass(!0)+'"/></div>',p=n.i(c.m)(h);return p.getElementById("imgwidth").setAttribute("value",d),p.getElementById("imgheight").setAttribute("value",u),l.appendChild(p),this.widthNum=new s.TextBox({value:n.i(i.formatUnit)(d),enableRtl:this.parent.enableRtl,cssClass:this.parent.getCssClass(),input:function(e){t.inputWidthValue=n.i(i.formatUnit)(t.inputValue(e.value))}}),this.widthNum.createElement=this.parent.createElement,this.widthNum.appendTo(l.querySelector("#imgwidth")),this.heightNum=new s.TextBox({value:n.i(i.formatUnit)(u),enableRtl:this.parent.enableRtl,cssClass:this.parent.getCssClass(),input:function(e){t.inputHeightValue=n.i(i.formatUnit)(t.inputValue(e.value))}}),this.heightNum.createElement=this.parent.createElement,this.heightNum.appendTo(l.querySelector("#imgheight")),l},e.prototype.inputValue=function(e){return"auto"===e||-1!==e.indexOf("%")||-1!==e.indexOf("px")||e.match(/(\d+)/)?e:"auto"},e.prototype.insertSize=function(e){e.selection.restore();var t=e.selfImage;0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData();var n=t.dialogObj.element;this.changedWidthValue=this.inputWidthValue,this.changedHeightValue=this.inputHeightValue;var i=n.querySelector(".e-img-width").value,r=n.parentElement.querySelector(".e-img-height").value;t.parent.formatter.process(this.parent,e.args,e.args,{width:i,height:r,selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.imgResizeDiv&&t.imgResizePos(e.selectNode[0],this.imgResizeDiv),t.dialogObj.hide({returnValue:!0})},e.prototype.insertImage=function(e){if(this.imagDialog(e),!n.i(i.isNullOrUndefined)(this.dialogObj)){this.dialogObj.element.style.maxHeight="inherit";var t=this.dialogObj.element.querySelector(".e-img-content");!n.i(i.isNullOrUndefined)(this.parent.insertImageSettings.path)&&"Markdown"===this.parent.editorMode||"HTML"===this.parent.editorMode?document.getElementById(this.rteID+"_insertImage").focus():t.querySelector(".e-img-url").focus()}},e.prototype.imgUpload=function(e){var t,o,a=this,d=this,u=d.parent.iframeSettings.enable;if("HTML"===d.parent.editorMode&&(!u&&n.i(i.isNullOrUndefined)(n.i(i.closest)(e.selection.range.startContainer.parentNode,"[id='"+this.parent.contentModule.getPanel().id+"']"))||u&&!n.i(c.b)(e.selection.range.startContainer.parentNode.ownerDocument.querySelector("body"),"e-lib"))){this.contentModule.getEditPanel().focus();var h=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());t=this.parent.formatter.editorManager.nodeSelection.save(h,this.parent.contentModule.getDocument()),o=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(h)}else t=e.selection,o=e.selectParent;var p=this.parent.createElement("div",{className:"e-img-uploadwrap e-droparea"+this.parent.getCssClass(!0)}),m=this.i10n.getConstant("imageDeviceUploadMessage"),f=this.i10n.getConstant("imageUploadMessage"),g=this.parent.createElement("span",{className:"e-droptext"+this.parent.getCssClass(!0)}),b=this.parent.createElement("span",{className:"e-rte-upload-text"+this.parent.getCssClass(!0),innerHTML:i.Browser.isDevice?m:f});g.appendChild(b);var v=this.parent.createElement("button",{className:"e-browsebtn"+this.parent.getCssClass(!0),id:this.rteID+"_insertImage",attrs:{autofocus:"true",type:"button"}});g.appendChild(v),p.appendChild(g);var C=this.i10n.getConstant("browse");this.browseButton=new l.Button({content:C,enableRtl:this.parent.enableRtl}),this.browseButton.isStringTemplate=!0,this.browseButton.createElement=this.parent.createElement,this.browseButton.appendTo(v);var y=i.Browser.isDevice?g:v;i.EventHandler.add(y,"click",this.fileSelect,this);var N=this.parent.createElement("input",{id:this.rteID+"_upload",attrs:{type:"File",name:"UploadFiles"},className:this.parent.getCssClass()});p.appendChild(N);var S,E,T;return this.uploadObj=new s.Uploader({asyncSettings:{saveUrl:this.parent.insertImageSettings.saveUrl,removeUrl:this.parent.insertImageSettings.removeUrl},dropArea:g,multiple:!1,enableRtl:this.parent.enableRtl,cssClass:this.parent.getCssClass(),allowedExtensions:this.parent.insertImageSettings.allowedTypes.toString(),selected:function(e){d.isImgUploaded=!0,E=e,T=e.filesData,a.parent.trigger(r._56,E,function(e){if(!e.cancel&&(a.checkExtension(e.filesData[0]),S=e.filesData[0].name,"HTML"===a.parent.editorMode&&n.i(i.isNullOrUndefined)(a.parent.insertImageSettings.path))){var r=new FileReader;r.addEventListener("load",function(e){var s="Base64"===a.parent.insertImageSettings.saveFormat?r.result:URL.createObjectURL(n.i(c.v)(r.result));d.uploadUrl={url:s,selection:t,altText:S,selectParent:o,width:{width:d.parent.insertImageSettings.width,minWidth:d.parent.insertImageSettings.minWidth,maxWidth:d.parent.getInsertImgMaxWidth()},height:{height:d.parent.insertImageSettings.height,minHeight:d.parent.insertImageSettings.minHeight,maxHeight:d.parent.insertImageSettings.maxHeight}},d.inputUrl.setAttribute("disabled","true"),n.i(i.isNullOrUndefined)(d.parent.insertImageSettings.saveUrl)&&a.isAllowedTypes&&!n.i(i.isNullOrUndefined)(a.dialogObj)&&a.dialogObj.getButtons(0).element.removeAttribute("disabled")}),r.readAsDataURL(e.filesData[0].rawFile)}})},beforeUpload:function(e){a.parent.trigger(r._70,e)},uploading:function(e){a.parent.isServerRendered||a.parent.trigger(r._57,e)},success:function(e){a.parent.trigger(r._58,e,function(e){if(!n.i(i.isNullOrUndefined)(a.parent.insertImageSettings.path)){var r=a.parent.insertImageSettings.path+e.file.name;d.uploadUrl={url:r,selection:t,altText:S,selectParent:o,width:{width:d.parent.insertImageSettings.width,minWidth:d.parent.insertImageSettings.minWidth,maxWidth:d.parent.getInsertImgMaxWidth()},height:{height:d.parent.insertImageSettings.height,minHeight:d.parent.insertImageSettings.minHeight,maxHeight:d.parent.insertImageSettings.maxHeight}},d.inputUrl.setAttribute("disabled","true")}"upload"!==e.operation||n.i(i.isNullOrUndefined)(a.dialogObj)||a.dialogObj.getButtons(0).element.removeAttribute("disabled")})},failure:function(e){a.parent.trigger(r._59,e)},removing:function(e){a.parent.trigger(r._60,e,function(e){d.isImgUploaded=!1,a.dialogObj.getButtons(0).element.disabled=!0,d.inputUrl.removeAttribute("disabled"),d.uploadUrl&&(d.uploadUrl.url="")})}}),this.uploadObj.isStringTemplate=!0,this.uploadObj.createElement=this.parent.createElement,this.uploadObj.appendTo(N),p},e.prototype.checkExtension=function(e){this.uploadObj.allowedExtensions&&(-1===this.uploadObj.allowedExtensions.toLocaleLowerCase().indexOf(("."+e.type).toLocaleLowerCase())?(this.dialogObj.getButtons(0).element.setAttribute("disabled","disabled"),this.isAllowedTypes=!1):this.isAllowedTypes=!0)},e.prototype.fileSelect=function(){return this.dialogObj.element.getElementsByClassName("e-file-select-wrap")[0].querySelector("button").click(),!1},e.prototype.dragStart=function(e){if("IMG"!==e.target.nodeName)return!0;this.parent.trigger(r.S,e,function(t){t.cancel?e.preventDefault():(e.dataTransfer.effectAllowed="copyMove",e.target.classList.add(o._52))})},e.prototype.dragEnter=function(e){e.dataTransfer.dropEffect="copy",e.preventDefault()},e.prototype.dragOver=function(e){if(!("edge"===i.Browser.info.name&&e.dataTransfer.items[0].type.split("/")[0].indexOf("image")>-1||i.Browser.isIE&&"Files"===e.dataTransfer.types[0]))return!0;e.preventDefault()},e.prototype.dragDrop=function(e){var t=this;this.parent.trigger(r._74,e,function(e){var s=t.parent.inputElement.ownerDocument.querySelector("."+o._52),a=s&&"IMG"===s.tagName||e.dataTransfer.files.length>0;!e.cancel&&a?t.parent.trigger(r.S,e,function(s){if(s.cancel)e.preventDefault();else{if(n.i(i.closest)(e.target,"#"+t.parent.getID()+"_toolbar")||"false"===t.parent.inputElement.contentEditable)return void e.preventDefault();t.parent.element.querySelector("."+o._55)&&n.i(i.detach)(t.imgResizeDiv),e.preventDefault();var a=void 0;t.contentModule.getDocument().caretRangeFromPoint?a=t.contentModule.getDocument().caretRangeFromPoint(e.clientX,e.clientY):e.rangeParent?(a=t.contentModule.getDocument().createRange(),a.setStart(e.rangeParent,e.rangeOffset)):a=t.getDropRange(e.clientX,e.clientY),t.parent.notify(r._33,{range:a});if(t.parent.element.querySelector("."+o._56))return;t.insertDragImage(e)}}):a&&e.preventDefault()})},e.prototype.getDropRange=function(e,t){var n=this.contentModule.getDocument().createRange();this.parent.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(),n);var i=this.contentModule.getDocument().elementFromPoint(e,t),r=i.childNodes.length>0?i.childNodes[0]:i,o=0;if("<br>"===this.parent.inputElement.firstChild.innerHTML)n.setStart(r,o),n.setEnd(r,o);else{var s=void 0;do{o++,n.setStart(r,o),n.setEnd(r,o+1),s=n.getBoundingClientRect()}while(s.left<e&&o<r.length-1)}return n},e.prototype.insertDragImage=function(e){var t=this;e.preventDefault();var n=this.parent.element.querySelector(""+o._54);this.parent.notify(r._68,{args:e}),n&&n.classList.add(o.M);var i=this.parent.inputElement.ownerDocument.querySelector("."+o._52);if(e.dataTransfer.files.length>0&&null===i){if(e.dataTransfer.files.length>1)return;for(var s=e.dataTransfer.files,a=s[0].name,l=a.substring(a.lastIndexOf(".")),d=this.parent.insertImageSettings.allowedTypes,c=0;c<d.length;c++)if(l.toLocaleLowerCase()===d[c].toLowerCase())if(this.parent.insertImageSettings.saveUrl)this.onSelect(e);else{var u={args:e,text:"",file:s[0]};e.preventDefault(),this.imagePaste(u)}}else{var h=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());if(i&&"IMG"===i.tagName){i.nextElementSibling&&i.nextElementSibling.classList.contains(o._57)?h.insertNode(i.parentElement.parentElement):h.insertNode(i),i.classList.remove(o._52);var p={elements:[i]};i.addEventListener("load",function(){t.parent.trigger(r.T,p)}),this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument());var u=e;this.resizeStart(u,i),this.hideImageQuickToolbar()}}},e.prototype.onSelect=function(e){var t=this,s=this,a=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),l=this.parent.createElement("ul",{className:o._58});this.parent.element.appendChild(l);var d={name:"",size:0,status:"",statusCode:"",type:"",rawFile:e.dataTransfer.files[0],validationMessages:{}},u=this.parent.createElement("IMG");u.style.opacity="0.5",u.classList.add(o._47),u.classList.add(o._3),u.classList.add(o._48);var h=d.rawFile,p=new FileReader;p.addEventListener("load",function(){var e=URL.createObjectURL(n.i(c.v)(p.result));u.src="Blob"===s.parent.insertImageSettings.saveFormat?e:p.result}),h&&p.readAsDataURL(h),a.insertNode(u),this.uploadMethod(e,u);var m={elements:[u]};u.addEventListener("load",function(){t.parent.trigger(r.T,m)}),n.i(i.detach)(l)},e.prototype.uploadMethod=function(e,t){var l=this,d=!1,c=this,u=this.parent.createElement("div");this.parent.element.appendChild(u);var h=this.parent.createElement("input",{id:this.rteID+"_upload",attrs:{type:"File",name:"UploadFiles"}}),p=this.parent.iframeSettings.enable?-50:-90;this.popupObj=new a.Popup(u,{relateTo:t,height:"85px",width:"300px",offsetY:p,content:h,viewPortElement:this.parent.element,position:{X:"center",Y:"top"},enableRtl:this.parent.enableRtl,zIndex:10001,close:function(e){l.parent.isBlur=!1,l.popupObj.destroy(),n.i(i.detach)(l.popupObj.element),l.popupObj=null,l.parent.inlineMode.enable||l.parent.toolbarModule.baseToolbar.toolbarObj.disable(!1)}}),this.popupObj.element.style.display="none",n.i(i.addClass)([this.popupObj.element],o._54),n.i(i.addClass)([this.popupObj.element],o._53),n.i(i.isNullOrUndefined)(this.parent.cssClass)||n.i(i.addClass)([this.popupObj.element],this.parent.cssClass);var m=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),f=e.dataTransfer.files[0].size>1e6?300:100;setTimeout(function(){c.refreshPopup(t)},f),this.uploadObj=new s.Uploader({asyncSettings:{saveUrl:this.parent.insertImageSettings.saveUrl,removeUrl:this.parent.insertImageSettings.removeUrl},cssClass:o._59+this.parent.getCssClass(!0),dropArea:this.parent.element,allowedExtensions:this.parent.insertImageSettings.allowedTypes.toString(),removing:function(){l.parent.inputElement.contentEditable="true",d=!1,n.i(i.detach)(t),l.popupObj.close()},canceling:function(){l.parent.inputElement.contentEditable="true",d=!1,n.i(i.detach)(t),l.popupObj.close(),l.quickToolObj.imageQTBar.hidePopup(),setTimeout(function(){l.uploadObj.destroy()},900)},beforeUpload:function(e){l.parent.trigger(r._70,e),l.parent.inlineMode.enable||l.parent.toolbarModule.baseToolbar.toolbarObj.disable(!0)},uploading:function(e){l.parent.isServerRendered||(d=!0,l.parent.trigger(r._57,e,function(e){e.cancel?(n.i(i.isNullOrUndefined)(t)||n.i(i.detach)(t),n.i(i.isNullOrUndefined)(l.popupObj.element)||n.i(i.detach)(l.popupObj.element)):l.parent.inputElement.contentEditable="false"}))},selected:function(e){d&&(e.cancel=!0)},failure:function(n){d=!1,l.parent.inputElement.contentEditable="true";var i={args:e,type:"Images",isNotify:void 0,elements:t};setTimeout(function(){l.uploadFailure(t,i,n)},900)},success:function(n){if("cancel"!==n.operation){d=!1,l.parent.inputElement.contentEditable="true";var i={args:e,type:"Images",isNotify:void 0,elements:t};setTimeout(function(){l.uploadSuccess(t,e,i,n)},900)}}}),this.uploadObj.appendTo(this.popupObj.element.childNodes[0]),this.popupObj.element.querySelector(".e-rte-dialog-upload .e-file-select-wrap").style.display="none",m.selectNodeContents(t),this.parent.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(),m)},e.prototype.refreshPopup=function(e){(this.parent.iframeSettings.enable?this.parent.element.offsetTop+e.offsetTop:e.offsetTop)>this.parent.element.offsetTop+this.parent.element.offsetHeight?(this.popupObj.relateTo=this.parent.inputElement,this.popupObj.offsetY=this.parent.iframeSettings.enable?-30:-65,this.popupObj.element.style.display="block"):this.popupObj&&(this.popupObj.refreshPosition(e),this.popupObj.element.style.display="block")},e.prototype.uploadFailure=function(e,t,o){n.i(i.detach)(e),this.popupObj&&this.popupObj.close(),this.parent.trigger(r._59,o),this.uploadObj.destroy()},e.prototype.uploadSuccess=function(e,t,s,a){var l=this;e.style.opacity="1",e.classList.add(o._49),a.element=e,this.parent.trigger(r._58,a,function(t){if(!n.i(i.isNullOrUndefined)(l.parent.insertImageSettings.path)){var r=l.parent.insertImageSettings.path+t.file.name;e.src=r,e.setAttribute("alt",t.file.name)}}),this.popupObj&&(this.popupObj.close(),this.uploadObj.destroy()),this.showImageQuickToolbar(s),this.resizeStart(t,e)},e.prototype.imagePaste=function(e){var t=this;if(0===e.text.length&&!n.i(i.isNullOrUndefined)(e.file)){var r=this,s=new FileReader;e.args.preventDefault(),s.addEventListener("load",function(a){var l={cssClass:"inline"===r.parent.insertImageSettings.display?o._3:o.T,url:"Base64"!==t.parent.insertImageSettings.saveFormat&&n.i(i.isNullOrUndefined)(e.callBack)?URL.createObjectURL(n.i(c.v)(s.result)):s.result,width:{width:r.parent.insertImageSettings.width,minWidth:r.parent.insertImageSettings.minWidth,maxWidth:r.parent.getInsertImgMaxWidth()},height:{height:r.parent.insertImageSettings.height,minHeight:r.parent.insertImageSettings.minHeight,maxHeight:r.parent.insertImageSettings.maxHeight}};if(!n.i(i.isNullOrUndefined)(e.callBack))return void e.callBack(l);r.parent.formatter.process(r.parent,{item:{command:"Images",subCommand:"Image"}},e.args,l),t.showPopupToolBar(e,l)}),s.readAsDataURL(e.file)}},e.prototype.showPopupToolBar=function(e,t){var n=this,i='img[src="'+t.url+'"]',r=this.parent.inputElement.querySelector(i);this.parent.quickToolbarModule.createQTBar("Image","MultiRow",this.parent.quickToolbarSettings.image,d.a.ImageToolbar);var o={args:e.args,type:"Images",isNotify:void 0,elements:r};r&&setTimeout(function(){n.showImageQuickToolbar(o),n.resizeStart(e.args,r)},0)},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||(this.prevSelectedImgEle=void 0,this.removeEventListener())},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.getModuleName=function(){return"image"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(18),a=(n.n(s),n(5)),l=n(4),d=n(6),c=function(){function e(e,t){this.parent=e,this.rteID=e.element.id,this.i10n=t.getService("rteLocale"),this.addEventListener(),this.serviceLocator=t,this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject")}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.O,this.linkDialog,this),this.parent.on(r._79,this.showDialog,this),this.parent.on(r._80,this.closeDialog,this),this.parent.on(r.v,this.onKeyDown,this),this.parent.on(r._0,this.showLinkQuickToolbar,this),this.parent.on(r._48,this.clearDialogObj,this),this.parent.on(r.H,this.onToolbarAction,this),this.parent.on(r.h,this.onIframeMouseDown,this),this.parent.on(r.P,this.removeLink,this),this.parent.on(r.Q,this.editLink,this),this.parent.on(r.R,this.openLink,this),this.parent.on(r._26,this.editAreaClickHandler,this),this.parent.on(r._89,this.setCssClass,this),this.parent.on(r.i,this.destroy,this),this.parent.on(r._44,this.moduleDestroy,this))},e.prototype.onToolbarAction=function(e){switch(e.args.item.subCommand){case"OpenLink":this.parent.notify(r.R,e);break;case"EditLink":this.parent.notify(r.Q,e);break;case"RemoveLink":this.parent.notify(r.P,e)}},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.O,this.linkDialog),this.parent.off(r._79,this.showDialog),this.parent.off(r._80,this.closeDialog),this.parent.off(r.v,this.onKeyDown),this.parent.off(r._0,this.showLinkQuickToolbar),this.parent.off(r._48,this.clearDialogObj),this.parent.off(r.H,this.onToolbarAction),this.parent.off(r.P,this.removeLink),this.parent.off(r.h,this.onIframeMouseDown),this.parent.off(r.Q,this.editLink),this.parent.off(r.R,this.openLink),this.parent.off(r._26,this.editAreaClickHandler),this.parent.off(r._89,this.setCssClass),this.parent.off(r.i,this.destroy),this.parent.off(r._44,this.moduleDestroy))},e.prototype.onIframeMouseDown=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(i.isNullOrUndefined)(t.oldCssClass)?e.setProperties({cssClass:(e.cssClass+" "+t.cssClass).trim()}):e.setProperties({cssClass:(e.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){this.updateCss(this.checkBoxObj,e),this.updateCss(this.dialogObj,e)},e.prototype.showLinkQuickToolbar=function(e){if(!n.i(i.isNullOrUndefined)(e.args)&&"enter"!==e.args.action&&"space"!==e.args.action){var t=void 0,r=void 0;if("Links"!==e.type||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule.linkQTBar))return;this.quickToolObj=this.parent.quickToolbarModule;var o,s=this.parent.element.getBoundingClientRect().top,a=this.parent.element.getBoundingClientRect().left,l=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());if([].forEach.call(e.elements,function(e,t){0===t&&(o="#text"===e.nodeName?e.parentNode:e)}),e.isNotify){var d=this.parent.toolbarModule.getToolbarElement(),c=o.getBoundingClientRect().top,u=o.getBoundingClientRect().left,h=c-s,p=d?d.offsetHeight+this.parent.toolbarModule.getExpandTBarPopHeight():0;t=this.parent.iframeSettings.enable?a+u:o.getBoundingClientRect().left,r=window.pageYOffset+(this.parent.iframeSettings.enable?s+p+c:s+h)}else{var m=void 0;m=e.args.touches?e.args.changedTouches[0]:m=e.args,t=this.parent.iframeSettings.enable?window.pageXOffset+a+m.clientX:m.pageX,r=this.parent.iframeSettings.enable?window.pageYOffset+s+m.clientY:m.pageY}this.quickToolObj.linkQTBar&&this.quickToolObj.linkQTBar.showPopup(t,r,l.endContainer,"link")}},e.prototype.hideLinkQuickToolbar=function(){this.quickToolObj&&this.quickToolObj.linkQTBar&&document.body.contains(this.quickToolObj.linkQTBar.element)&&this.quickToolObj.linkQTBar.hidePopup()},e.prototype.editAreaClickHandler=function(e){if(this.parent.readonly)return void this.hideLinkQuickToolbar();var t=e.args,o=this.parent.quickToolbarSettings.showOnRightClick;if(!(2===t.which||o&&1===t.which||!o&&3===t.which)&&"HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.linkQTBar){this.quickToolObj=this.parent.quickToolbarModule;var s=t.target;s=this.getAnchorNode(s),this.contentModule=this.rendererFactory.getRenderer(a.a.Content);var l=this.quickToolObj.linkQTBar.element.classList.contains("e-rte-pop");if("A"===s.nodeName&&s.childNodes.length>0&&"IMG"!==s.childNodes[0].nodeName&&"IMG"!==e.args.target.nodeName&&!n.i(i.isNullOrUndefined)(n.i(i.closest)(this.parent.getRange().startContainer.parentElement,"A"))&&!n.i(i.isNullOrUndefined)(n.i(i.closest)(this.parent.getRange().endContainer.parentElement,"A"))){if(l)return;if(!1===e.args.ctrlKey)this.showLinkQuickToolbar({args:t,isNotify:!1,type:"Links",elements:[t.target]});else{var d=this.parent.formatter.editorManager.nodeSelection,c=d.getRange(this.parent.contentModule.getDocument()),u={args:{item:{subCommand:"OpenLink",command:"Links",name:""},originalEvent:e.args},selectNode:d.getNodeCollection(c),selectParent:d.getParentNodeCollection(c),selection:d.save(c,this.parent.contentModule.getDocument())};this.parent.notify(r.R,u)}}else this.hideLinkQuickToolbar()}},e.prototype.onKeyDown=function(e){var t=e.args;switch(t.action){case"escape":n.i(i.isNullOrUndefined)(this.dialogObj)||this.dialogObj.close();break;case"insert-link":this.openDialog(!0,e),t.preventDefault()}},e.prototype.openDialog=function(e,t){if(e||this.parent.contentModule.getEditPanel().focus(),"HTML"===this.parent.editorMode){var n=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),i=this.parent.formatter.editorManager.nodeSelection.save(n,this.parent.contentModule.getDocument()),r=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(n),o=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(n),s={args:t?t.args:{item:{command:"Links",subCommand:"CreateLink"},originalEvent:void 0,name:e?null:"showDialog"},selectNode:r,selection:i,selectParent:o};this.linkDialog(s)}else{var a=this.parent.contentModule.getEditPanel();this.parent.formatter.editorManager.markdownSelection.save(a.selectionStart,a.selectionEnd),this.linkDialog({args:{item:{command:"Links",subCommand:"Link"},originalEvent:t&&t.args},member:"link",text:this.parent.formatter.editorManager.markdownSelection.getSelectedText(this.parent.contentModule.getEditPanel()),module:"Markdown",name:"insertLink"})}},e.prototype.showDialog=function(){this.openDialog(!1),this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.closeDialog=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.clearDialogObj=function(){this.dialogObj&&(this.dialogObj.destroy(),n.i(i.detach)(this.dialogObj.element),this.dialogObj=null)},e.prototype.linkDialog=function(e,t){var r=this;if(this.dialogObj)return void this.dialogObj.hide({returnValue:!0});if("HTML"===this.parent.editorMode&&e.selectParent.length>0&&!n.i(i.isNullOrUndefined)(e.selectParent[0].classList)&&e.selectParent[0].classList.contains("e-rte-anchor")&&n.i(i.isNullOrUndefined)(t))return void this.editLink(e);var a=this.i10n.getConstant("linkWebUrl"),d=this.i10n.getConstant("linkText"),c=this.i10n.getConstant("linkTooltipLabel"),u=this.i10n.getConstant("linkurl"),h=this.i10n.getConstant("textPlaceholder"),p=this.i10n.getConstant("linkTitle"),m=this.parent.createElement("div",{className:"e-rte-link-dialog"+this.parent.getCssClass(!0),id:this.rteID+"_rtelink"});this.parent.element.appendChild(m);var f=this.parent.createElement("div",{className:"e-rte-linkcontent"+this.parent.getCssClass(!0),id:this.rteID+"_linkContent"}),g="HTML"===this.parent.editorMode?"<label>"+c+'</label></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" spellcheck="false" placeholder = "'+p+'"aria-label="'+this.i10n.getConstant("linkTitle")+'" class="e-input e-rte-linkTitle'+this.parent.getCssClass(!0)+'"></div><div class="e-rte-label'+this.parent.getCssClass(!0)+'"></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="checkbox" class="e-rte-linkTarget'+this.parent.getCssClass(!0)+'" data-role ="none"></div>':"",b='<div class="e-rte-label'+this.parent.getCssClass(!0)+'"><label>'+a+'</label></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" spellcheck="false" placeholder="'+u+'"aria-label="'+this.i10n.getConstant("linkWebUrl")+'" class="e-input e-rte-linkurl'+this.parent.getCssClass(!0)+'"/></div><div class="e-rte-label'+this.parent.getCssClass(!0)+'"><label>'+d+'</label></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"> <input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText'+this.parent.getCssClass(!0)+'"aria-label="'+this.i10n.getConstant("linkText")+'" placeholder="'+h+'"></div><div class="e-rte-label'+this.parent.getCssClass(!0)+'">'+g,v=n.i(l.m)(b);f.appendChild(v);var C=f.querySelector(".e-rte-linkTarget"),y=f.querySelector(".e-rte-linkurl"),N=f.querySelector(".e-rte-linkText"),S=f.querySelector(".e-rte-linkTitle"),E=this.i10n.getConstant("linkOpenInNewWindow");this.checkBoxObj=new s.CheckBox({label:E,checked:!0,enableRtl:this.parent.enableRtl,cssClass:this.parent.getCssClass()}),this.checkBoxObj.isStringTemplate=!0,this.checkBoxObj.createElement=this.parent.createElement,this.checkBoxObj.appendTo(C);var T="HTML"===this.parent.editorMode?e.selection.getRange(this.parent.contentModule.getDocument()).toString():e.text,O=this.i10n.getConstant("dialogInsert"),w=this.i10n.getConstant("dialogCancel"),k=e.selection,L={selfLink:this,selection:e.selection,selectParent:e.selectParent,args:e.args},_={header:this.i10n.getConstant("linkHeader"),content:f,cssClass:o._12+this.parent.getCssClass(!0),enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:i.Browser.isDevice?"290px":"310px",isModal:i.Browser.isDevice,buttons:[{click:this.insertlink.bind(L),buttonModel:{content:O,cssClass:"e-flat e-insertLink"+this.parent.getCssClass(!0),isPrimary:!0}},{click:this.cancelDialog.bind(L),buttonModel:{cssClass:"e-flat"+this.parent.getCssClass(!0),content:w}}],target:i.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){r.parent.isBlur=!1,e&&e.event.returnValue&&("HTML"===r.parent.editorMode?k.restore():r.parent.formatter.editorManager.markdownSelection.restore(r.parent.contentModule.getEditPanel())),r.dialogObj.destroy(),n.i(i.detach)(r.dialogObj.element);var t=r.dialogObj;r.dialogRenderObj.close(t),r.dialogObj=null}};this.dialogObj=this.dialogRenderObj.render(_),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(m),m.style.maxHeight="inherit",n.i(i.isNullOrUndefined)(this.dialogObj)||(n.i(i.isNullOrUndefined)(t)||(y.value=t.url,N.value=t.text,S.value=t.title,t.target?this.checkBoxObj.checked=!0:this.checkBoxObj.checked=!1,this.dialogObj.header=t.header,this.dialogObj.element.querySelector(".e-insertLink").textContent=t.btnText),this.checkUrl(!1),("HTML"===this.parent.editorMode&&n.i(i.isNullOrUndefined)(t)&&(!n.i(i.isNullOrUndefined)(T)&&""!==T&&0===e.selection.range.startOffset||e.selection.range.startOffset!==e.selection.range.endOffset)||"Markdown"===e.module)&&(N.value=T),i.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this),this.quickToolObj&&(this.hideLinkQuickToolbar(),this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup(),this.quickToolObj.textQTBar&&this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)&&this.quickToolObj.textQTBar.hidePopup()))},e.prototype.insertlink=function(e){var t,r=this.selfLink.dialogObj.element,o=r.querySelector(".e-rte-linkurl").value,s=r.querySelector(".e-rte-linkText").value;"HTML"===this.selfLink.parent.editorMode&&(t=r.querySelector(".e-rte-linkTitle").value);var a=this.selfLink.checkBoxObj.checked?"_blank":null,l=this.selfLink.checkBoxObj.checked?this.selfLink.i10n.getConstant("linkAriaLabel"):null;if(""===o)return void this.selfLink.checkUrl(!0);this.selfLink.isUrl(o)?this.selfLink.checkUrl(!1):(s=""===s?o:s,o=this.selfLink.parent.enableAutoUrl?o:o.indexOf("http")>-1?o:"http://"+o);var c=this.selfLink;if("HTML"===c.parent.editorMode&&n.i(i.isNullOrUndefined)(n.i(i.closest)(this.selection.range.startContainer.parentNode,"[id='"+c.parent.contentModule.getPanel().id+"']"))){c.parent.contentModule.getEditPanel().focus(),i.Browser.isIE&&c.parent.iframeSettings.enable&&this.selection.restore();var u=c.parent.formatter.editorManager.nodeSelection.getRange(c.parent.contentModule.getDocument());this.selection=c.parent.formatter.editorManager.nodeSelection.save(u,c.parent.contentModule.getDocument()),this.selectParent=c.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(u)}var h={url:o,text:s,title:t,target:a,ariaLabel:l,selection:this.selection,selectParent:this.selectParent};document.body.contains(c.dialogObj.element)&&this.selfLink.dialogObj.hide({returnValue:!1}),n.i(d.b)()&&c.parent.iframeSettings.enable&&n.i(i.select)("iframe",c.parent.element).contentWindow.focus(),"HTML"===c.parent.editorMode&&this.selection.restore(),0===c.parent.formatter.getUndoRedoStack().length&&c.parent.formatter.saveData();var p;if(n.i(i.isNullOrUndefined)(this.args)||"KeyK"!==this.args.code)p=this.args;else{var m=this.args;n.i(i.extend)(this.args,{item:{command:"Links",subCommand:"CreateLink"},originalEvent:m},!0);p={item:{command:"Links",subCommand:"CreateLink"},originalEvent:m}}this.selfLink.parent.formatter.process(this.selfLink.parent,p,!n.i(i.isNullOrUndefined)(this.args)&&this.args.originalEvent,h),this.selfLink.parent.contentModule.getEditPanel().focus()},e.prototype.isUrl=function(e){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi.test(e)},e.prototype.checkUrl=function(e){var t=this.dialogObj.element,r=t.querySelector(".e-rte-linkurl");e?(n.i(i.addClass)([r],"e-error"),r.setSelectionRange(0,r.value.length),r.focus()):n.i(i.removeClass)([r],"e-error")},e.prototype.removeLink=function(e){0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData();var t=this.getAnchorNode(e.selectParent[0]);this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,selectParent:e.selectParent,selection:e.selection,text:t.innerText,subCommand:e.args.item.subCommand}),n.i(d.b)()&&this.parent.iframeSettings.enable?n.i(i.select)("iframe",this.parent.element).contentWindow.focus():this.parent.contentModule.getEditPanel().focus(),this.hideLinkQuickToolbar()},e.prototype.openLink=function(e){var t=this.getAnchorNode(e.selectParent[0]);(t.classList.contains("e-rte-anchor")||"A"===t.tagName)&&this.parent.formatter.process(this.parent,e.args,e.args,{url:t.href,text:t.innerText,target:""===t.target?"_self":"_blank",selectNode:e.selectNode,subCommand:e.args.item.subCommand})},e.prototype.getAnchorNode=function(e){var t=n.i(i.closest)(e,"a");return t||e},e.prototype.editLink=function(e){var t=this.getAnchorNode(e.selectNode[0]),n=this.getAnchorNode(e.selectParent[0]);if(n="A"===t.nodeName?t:n,n.classList.contains("e-rte-anchor")||"A"===n.tagName){var i=this.i10n.getConstant("dialogUpdate"),r={url:n.getAttribute("href"),text:n.innerText,title:n.title,target:n.target,header:this.i10n.getConstant("editLink"),btnText:i};this.linkDialog(e,r)}},e.prototype.cancelDialog=function(e){this.selfLink.parent.isBlur=!1,this.selfLink.dialogObj.hide({returnValue:!0}),n.i(d.b)()?this.selection.restore():this.selfLink.parent.contentModule.getEditPanel().focus()},e.prototype.onDocumentClick=function(e){var t=e.target;!n.i(i.isNullOrUndefined)(this.dialogObj)&&(!n.i(i.closest)(t,"[id='"+this.dialogObj.element.id+"']")&&this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()&&!this.parent.getToolbarElement().contains(e.target)||(this.parent.getToolbarElement()&&this.parent.getToolbarElement().contains(e.target)||this.parent.inlineMode.enable&&!n.i(i.closest)(t,"#"+this.dialogObj.element.id))&&!n.i(i.closest)(t,"#"+this.parent.getID()+"_toolbar_CreateLink")&&!t.querySelector("#"+this.parent.getID()+"_toolbar_CreateLink"))&&(this.dialogObj.hide({returnValue:!0}),i.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick),this.parent.isBlur=!0,n.i(l.l)(this.parent.element,"focusout"))},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.getModuleName=function(){return"link"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(0),r=(n.n(i),n(9)),o=(n.n(r),n(18)),s=(n.n(o),n(1)),a=n(5),l=n(14),d=(n.n(l),n(2)),c=n(4),u=function(){function e(e,t){this.ensureInsideTableList=!0,this.pageX=null,this.pageY=null,this.moveEle=null,this.currentColumnResize="",this.currentMarginLeft=0,this.parent=e,this.rteID=e.element.id,this.l10n=t.getService("rteLocale"),this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(s._39,this.renderDlgContent,this),this.parent.on(s.g,this.afterRender,this),this.parent.on(s._75,this.afterRender,this),this.parent.on(s._87,this.showDialog,this),this.parent.on(s._88,this.closeDialog,this),this.parent.on(s._40,this.docClick,this),this.parent.on(s.h,this.onIframeMouseDown,this),this.parent.on(s._26,this.editAreaClickHandler,this),this.parent.on(s._48,this.clearDialogObj,this),this.parent.on(s._41,this.onToolbarAction,this),this.parent.on(s.B,this.dropdownSelect,this),this.parent.on(s.v,this.keyDown,this),this.parent.on(s.u,this.keyUp,this),this.parent.on(s.w,this.selectionTable,this),this.parent.on(s.t,this.tableModulekeyUp,this),this.parent.on(s._89,this.setCssClass,this),this.parent.on(s.i,this.destroy,this),this.parent.on(s._44,this.moduleDestroy,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(s._39,this.renderDlgContent),this.parent.off(s.g,this.afterRender),this.parent.off(s._75,this.afterRender),this.parent.off(s._40,this.docClick),this.parent.off(s.h,this.onIframeMouseDown),this.parent.off(s._87,this.showDialog),this.parent.off(s._88,this.closeDialog),this.parent.off(s._26,this.editAreaClickHandler),this.parent.off(s._48,this.clearDialogObj),this.parent.off(s._41,this.onToolbarAction),this.parent.off(s.B,this.dropdownSelect),this.parent.off(s._24,this.cellSelect),this.parent.off(s._30,this.setBGColor),this.parent.off(s.v,this.keyDown),this.parent.off(s.u,this.keyUp),this.parent.off(s.w,this.selectionTable),this.parent.off(s.t,this.tableModulekeyUp),this.parent.off(s._89,this.setCssClass),this.parent.off(s.i,this.destroy),this.parent.off(s._44,this.moduleDestroy),!i.Browser.isDevice&&this.parent.tableSettings.resize&&i.EventHandler.remove(this.contentModule.getEditPanel(),"mouseover",this.resizeHelper))},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(i.isNullOrUndefined)(t.oldCssClass)?e.setProperties({cssClass:(e.cssClass+" "+t.cssClass).trim()}):e.setProperties({cssClass:(e.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){this.popupObj&&e.cssClass&&(n.i(i.isNullOrUndefined)(e.oldCssClass)?n.i(i.addClass)([this.popupObj.element],e.cssClass):(n.i(i.removeClass)([this.popupObj.element],e.oldCssClass),n.i(i.addClass)([this.popupObj.element],e.cssClass))),this.updateCss(this.createTableButton,e),this.updateCss(this.editdlgObj,e);for(var t=[this.columnTextBox,this.rowTextBox,this.tableWidthNum,this.tableCellPadding,this.tableCellSpacing],r=0;r<t.length;r++)this.updateCss(t[r],e)},e.prototype.selectionTable=function(e){var t=e.args.target;"mozilla"!==i.Browser.info.name||n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"table"))||"TABLE"!==n.i(i.closest)(t,"table").tagName||this.parent.contentModule.getEditPanel().setAttribute("contenteditable","true")},e.prototype.afterRender=function(){n.i(i.isNullOrUndefined)(this.contentModule)&&(this.contentModule=this.rendererFactory.getRenderer(a.a.Content),this.parent.on(s._30,this.setBGColor,this),this.parent.on(s._24,this.cellSelect,this),this.parent.tableSettings.resize&&i.EventHandler.add(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.resizeStart,this),!i.Browser.isDevice&&this.parent.tableSettings.resize&&i.EventHandler.add(this.contentModule.getEditPanel(),"mouseover",this.resizeHelper,this))},e.prototype.dropdownSelect=function(e){var t=e.item;if(document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))&&"Table"===t.command){var n=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),i={args:e,selection:this.parent.formatter.editorManager.nodeSelection.save(n,this.contentModule.getDocument()),selectParent:this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(n)};switch(t.subCommand){case"InsertRowBefore":case"InsertRowAfter":this.addRow(i.selection,e);break;case"InsertColumnLeft":case"InsertColumnRight":this.addColumn(i.selection,e);break;case"DeleteColumn":case"DeleteRow":this.removeRowColumn(i.selection,e);break;case"AlignTop":case"AlignMiddle":case"AlignBottom":this.verticalAlign(i,e);break;case"Dashed":case"Alternate":case"Custom":this.tableStyles(i,t.subCommand);break;case"Merge":case"VerticalSplit":case"HorizontalSplit":this.UpdateCells(i.selection,e)}}},e.prototype.UpdateCells=function(e,t){this.parent.formatter.process(this.parent,t,t,{selection:e,subCommand:t.item.subCommand}),this.hideTableQuickToolbar()},e.prototype.keyUp=function(e){var t=e.args.target;"escape"===e.args.key.toLocaleLowerCase()&&t&&t.classList&&this.popupObj&&!n.i(i.closest)(t,"[id='"+this.popupObj.element.id+"']")&&this.popupObj&&this.popupObj.hide()},e.prototype.keyDown=function(e){var t=e.args,r=this;switch(t.action){case"escape":break;case"insert-table":this.openDialog(!0,e),t.preventDefault()}if(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&this.contentModule&&"KeyK"!==t.code){var o=void 0,s=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),a=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(s)[0];if(a=a&&"TD"!==a.tagName&&"TH"!==a.tagName?a.parentElement:a,(8===t.keyCode||46===t.keyCode||t.ctrlKey&&88===t.keyCode)&&(a&&"TBODY"===a.tagName?(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&this.contentModule&&(o=this.parent.formatter.editorManager.nodeSelection.save(s,this.contentModule.getDocument())),t.preventDefault(),r.removeTable(o,t,!0)):a&&a.querySelectorAll("table").length>0&&(this.removeResizeElement(),this.hideTableQuickToolbar())),a&&"TD"!==a.tagName&&"TH"!==a.tagName){var l=n.i(i.closest)(a,"td");a=!n.i(i.isNullOrUndefined)(l)&&this.parent.inputElement.contains(l)?l:a}if(a&&("TD"===a.tagName||"TH"===a.tagName))switch(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&this.contentModule&&(o=this.parent.formatter.editorManager.nodeSelection.save(s,this.contentModule.getDocument())),t.keyCode){case 9:case 37:case 39:r.tabSelection(t,o,a);break;case 40:case 38:r.tableArrowNavigation(t,o,a)}}},e.prototype.tableModulekeyUp=function(e){if(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&this.contentModule){var t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),r=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t)[0];if((r=r&&"TD"!==r.tagName&&"TH"!==r.tagName?r.parentElement:r)&&"TD"!==r.tagName&&"TH"!==r.tagName){var o=n.i(i.closest)(r,"td");r=!n.i(i.isNullOrUndefined)(o)&&this.parent.inputElement.contains(o)?o:r}this.previousTableElement===r||n.i(i.isNullOrUndefined)(this.previousTableElement)||this.previousTableElement.classList.remove(d._32)}},e.prototype.openDialog=function(e,t){if(e||this.parent.contentModule.getEditPanel().focus(),"HTML"===this.parent.editorMode){var n=this.parent.contentModule.getDocument(),i=this.parent.formatter.editorManager.nodeSelection.getRange(n),r=this.parent.formatter.editorManager.nodeSelection.save(i,n),o={originalEvent:t?t.args:{action:"insert-table"},item:{command:"Table",subCommand:"CreateTable"},name:e?null:"showDialog"};this.insertTableDialog({self:this,args:o,selection:r}),this.parent.formatter.editorManager.nodeSelection.restore()}},e.prototype.showDialog=function(){this.openDialog(!1),this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.closeDialog=function(){this.editdlgObj&&this.editdlgObj.hide({returnValue:!0})},e.prototype.onToolbarAction=function(e){switch(e.args.item.subCommand){case"TableHeader":this.tableHeader(e.selection,e.args);break;case"TableRemove":this.removeTable(e.selection,e.args);break;case"TableEditProperties":this.editTable(e)}},e.prototype.verticalAlign=function(e,t){var r=n.i(i.closest)(e.selectParent[0],"td")||n.i(i.closest)(e.selectParent[0],"th");r&&this.parent.formatter.process(this.parent,t,t,{tableCell:r,subCommand:t.item.subCommand})},e.prototype.tableStyles=function(e,t){var r=n.i(i.closest)(e.selectParent[0],"table");if("Dashed"===t&&(this.parent.element.classList.contains(d._33)?this.parent.element.classList.remove(d._33):this.parent.element.classList.add(d._33),r.classList.contains(d._33)?r.classList.remove(d._33):r.classList.add(d._33)),"Alternate"===t&&(this.parent.element.classList.contains(d._34)?this.parent.element.classList.remove(d._34):this.parent.element.classList.add(d._34),r.classList.contains(d._34)?r.classList.remove(d._34):r.classList.add(d._34)),e.args&&e.args.item.cssClass)for(var o=e.args.item.cssClass.split(" "),s=0;s<o.length;s++)r.classList.contains(o[s])?r.classList.remove(o[s]):r.classList.add(o[s]);this.parent.formatter.saveData(),this.parent.formatter.editorManager.nodeSelection.restore()},e.prototype.insideList=function(e){for(var t=this.parent.formatter.editorManager.domNode.blockNodes(),n=[],i=0;i<t.length;i++)"LI"===t[i].parentNode.tagName?n.push(t[i].parentNode):"LI"===t[i].tagName&&"P"!==t[i].childNodes[0].tagName&&"OL"!==t[i].childNodes[0].tagName&&"UL"!==t[i].childNodes[0].tagName&&n.push(t[i]);return n.length>1||n.length&&0===e.startOffset&&0===e.endOffset?(this.ensureInsideTableList=!0,!0):(this.ensureInsideTableList=!1,!1)},e.prototype.tabSelection=function(e,t,r){this.previousTableElement=r;var o=this.insideList(t.range);if((37!==e.keyCode&&39!==e.keyCode||3!==t.range.startContainer.nodeType)&&!o)if(e.preventDefault(),r.classList.remove(d._32),e.shiftKey||37===e.keyCode){var s=n.i(i.isNullOrUndefined)(r.previousSibling)?n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"tr").previousSibling)?n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"table").previousSibling)?r:"td"===n.i(i.closest)(r,"table").previousSibling.nodeName.toLowerCase()?n.i(i.closest)(r,"table").previousSibling:r:n.i(i.closest)(r,"tr").previousSibling.childNodes[n.i(i.closest)(r,"tr").previousSibling.childNodes.length-1]:r.previousSibling;if(r===s&&0===r.cellIndex&&n.i(i.closest)(r,"table").tHead){var a=n.i(i.closest)(r,"table");s=a.rows[0].cells[a.rows[0].cells.length-1]}37===e.keyCode&&r===s&&(s=n.i(i.closest)(r,"table").previousSibling),s&&(""!==s.textContent.trim()&&n.i(i.closest)(s,"td")?t.setSelectionNode(this.contentModule.getDocument(),s):t.setSelectionText(this.contentModule.getDocument(),s,s,0,0))}else{var l=n.i(i.isNullOrUndefined)(r.nextSibling)?n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"tr").nextSibling)?n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"table").nextSibling)?r:"td"===n.i(i.closest)(r,"table").nextSibling.nodeName.toLowerCase()?n.i(i.closest)(r,"table").nextSibling:r:n.i(i.closest)(r,"tr").nextSibling.childNodes[0]:r.nextSibling;r===l&&"TH"===r.nodeName&&(l=n.i(i.closest)(r,"table").rows[1].cells[0]),39===e.keyCode&&r===l&&(l=n.i(i.closest)(r,"table").nextSibling),l&&(""!==l.textContent.trim()&&n.i(i.closest)(l,"td")?t.setSelectionNode(this.contentModule.getDocument(),l):t.setSelectionText(this.contentModule.getDocument(),l,l,0,0)),r===l&&39!==e.keyCode&&l&&(r.classList.add(d._32),this.addRow(t,e,!0),r.classList.remove(d._32),l=l.parentElement.nextSibling?l.parentElement.nextSibling.firstChild:l.parentElement.firstChild,""!==l.textContent.trim()&&n.i(i.closest)(l,"td")?t.setSelectionNode(this.contentModule.getDocument(),l):t.setSelectionText(this.contentModule.getDocument(),l,l,0,0))}},e.prototype.tableArrowNavigation=function(e,t,r){var o=t.range.startContainer;40===e.keyCode&&3===o.nodeType&&(o.nextSibling&&"BR"===o.nextSibling.nodeName||o.parentNode&&"TD"!==o.parentNode.nodeName)||38===e.keyCode&&3===o.nodeType&&(o.previousSibling&&"BR"===o.previousSibling.nodeName||o.parentNode&&"TD"!==o.parentNode.nodeName)||(e.preventDefault(),r.classList.remove(d._32),(r=40===e.keyCode?n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"tr").nextElementSibling)?n.i(i.closest)(r,"table").tHead&&"TH"===r.nodeName?n.i(i.closest)(r,"table").rows[1].cells[r.cellIndex]:n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"table").nextSibling)?r:n.i(i.closest)(r,"table").nextSibling:n.i(i.closest)(r,"tr").nextElementSibling.children[r.cellIndex]:n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"tr").previousElementSibling)?n.i(i.closest)(r,"table").tHead&&"TH"!==r.nodeName?n.i(i.closest)(r,"table").tHead.rows[0].cells[r.cellIndex]:n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"table").previousSibling)?r:n.i(i.closest)(r,"table").previousSibling:n.i(i.closest)(r,"tr").previousElementSibling.children[r.cellIndex])&&t.setSelectionText(this.contentModule.getDocument(),r,r,0,0))},e.prototype.setBGColor=function(e){for(var t=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument()),n=(this.parent.formatter.editorManager.nodeSelection.save(t,this.contentModule.getDocument()),this.curTable.querySelectorAll(".e-cell-select")),i=0;i<n.length;i++)n[i].style.backgroundColor=e.item.value;this.parent.formatter.saveData()},e.prototype.hideTableQuickToolbar=function(){this.quickToolObj&&this.quickToolObj.tableQTBar&&document.body.contains(this.quickToolObj.tableQTBar.element)&&this.quickToolObj.tableQTBar.hidePopup()},e.prototype.tableHeader=function(e,t){this.parent.formatter.process(this.parent,t,t.originalEvent,{selection:e,subCommand:t.item.subCommand})},e.prototype.getAnchorNode=function(e){var t=n.i(i.closest)(e,"a");return t||e},e.prototype.editAreaClickHandler=function(e){if(!this.parent.readonly&&n.i(i.isNullOrUndefined)(n.i(i.closest)(e.args.target,".e-img-caption"))){var t=e.args,r=this.parent.quickToolbarSettings.showOnRightClick;if(!(2===t.which||r&&1===t.which||!r&&3===t.which)&&"HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.tableQTBar){this.quickToolObj=this.parent.quickToolbarModule;var o=t.target;this.contentModule=this.rendererFactory.getRenderer(a.a.Content);if(this.quickToolObj.tableQTBar.element.classList.contains("e-rte-pop"))return;var s=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument()),l=n.i(i.closest)(o,"table"),c=this.parent.getRange().startContainer.parentElement,u=this.parent.getRange().endContainer.parentElement,h=this.getAnchorNode(o);if(o&&"A"!==o.nodeName&&"A"!==h.nodeName&&"IMG"!==o.nodeName&&"VIDEO"!==o.nodeName&&!o.classList.contains(d.V)&&"AUDIO"!==o.nodeName&&c===u&&("TD"===o.nodeName||"TH"===o.nodeName||"TABLE"===o.nodeName||l&&this.parent.contentModule.getEditPanel().contains(l))&&(3!==s.startContainer.nodeType||s.collapsed)){var p=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());this.parent.formatter.editorManager.nodeSelection.save(p,this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument());var m=void 0,f=void 0;i.Browser.isDevice&&e.args.touches?(m=this.parent.iframeSettings.enable?window.pageXOffset+this.parent.element.getBoundingClientRect().left+e.args.changedTouches[0].clientX:e.args.changedTouches[0].pageX,f=this.parent.iframeSettings.enable?window.pageYOffset+this.parent.element.getBoundingClientRect().top+(this.parent.inlineMode.enable?0:this.parent.toolbarModule.getToolbarHeight())+e.args.changedTouches[0].clientY:e.args.changedTouches[0].pageY):(m=this.parent.iframeSettings.enable?window.pageXOffset+this.parent.element.getBoundingClientRect().left+t.clientX:t.pageX,f=this.parent.iframeSettings.enable?window.pageYOffset+this.parent.element.getBoundingClientRect().top+this.parent.toolbarModule.getToolbarHeight()+t.clientY:t.pageY),this.quickToolObj.tableQTBar.showPopup(m,f,o),this.parent.formatter.editorManager.nodeSelection.restore()}else this.hideTableQuickToolbar()}}},e.prototype.tableCellSelect=function(e){var t=e.target,r=Array.prototype.slice.call(t.parentElement.parentElement.children).indexOf(t.parentElement),o=Array.prototype.slice.call(t.parentElement.children).indexOf(t),s=this.dlgDiv.querySelectorAll(".e-rte-tablecell");Array.prototype.forEach.call(s,function(e){var t=Array.prototype.slice.call(e.parentElement.parentElement.children).indexOf(e.parentElement),s=Array.prototype.slice.call(e.parentElement.children).indexOf(e);n.i(i.removeClass)([e],"e-active"),t<=r&&s<=o&&n.i(i.addClass)([e],"e-active")}),this.tblHeader.innerHTML=o+1+"x"+(r+1)},e.prototype.tableMouseUp=function(e){i.EventHandler.remove(this.curTable,"mousemove",this.tableMove)},e.prototype.tableCellLeave=function(e){n.i(i.removeClass)(this.dlgDiv.querySelectorAll(".e-rte-tablecell"),"e-active"),n.i(i.addClass)([this.dlgDiv.querySelector(".e-rte-tablecell")],"e-active"),this.tblHeader.innerHTML="1x1"},e.prototype.tableCellClick=function(e){var t=e.target,n=Array.prototype.slice.call(t.parentElement.parentElement.children).indexOf(t.parentElement)+1,i=Array.prototype.slice.call(t.parentElement.children).indexOf(t)+1;this.self.tableInsert(n,i,e,this)},e.prototype.tableInsert=function(e,t,r,o){var a=o.self?o.self:this,l=o.selection.range.startContainer;"P"!==l.nodeName||""!==l.textContent.trim()||l.childNodes.length>0||(l.innerHTML="<br />");var d=l.parentNode;if("HTML"===a.parent.editorMode&&(a.parent.iframeSettings.enable&&!n.i(c.b)(d.ownerDocument.querySelector("body"),"e-lib")||!a.parent.iframeSettings.enable&&n.i(i.isNullOrUndefined)(n.i(i.closest)(d,"[id='"+a.contentModule.getPanel().id+"']")))){a.contentModule.getEditPanel().focus();var u=a.parent.formatter.editorManager.nodeSelection.getRange(a.contentModule.getDocument());o.selection=a.parent.formatter.editorManager.nodeSelection.save(u,a.contentModule.getDocument())}var h={rows:e,columns:t,width:{minWidth:a.parent.tableSettings.minWidth,maxWidth:a.parent.tableSettings.maxWidth,width:a.parent.tableSettings.width},selection:o.selection};a.popupObj&&a.popupObj.hide(),a.editdlgObj&&a.editdlgObj.hide(),a.parent.formatter.process(a.parent,o.args,o.args.originalEvent,h),a.contentModule.getEditPanel().focus(),a.parent.on(s._24,a.cellSelect,a)},e.prototype.cellSelect=function(e){var t=e.args.target,r=n.i(i.closest)(t,"td,th");t="TD"!==t.nodeName&&r&&this.parent.contentModule.getEditPanel().contains(r)?r:t,n.i(i.removeClass)(this.contentModule.getEditPanel().querySelectorAll("table td, table th"),d._32),!t||"TD"!==t.tagName&&"TH"!==t.tagName||(n.i(i.addClass)([t],d._32),this.activeCell=t,this.curTable=this.curTable?this.curTable:n.i(i.closest)(t,"table"),i.EventHandler.add(this.curTable,"mousemove",this.tableMove,this),i.EventHandler.add(this.curTable,"mouseup",this.tableMouseUp,this),this.removeResizeElement(),this.helper&&this.contentModule.getEditPanel().contains(this.helper)&&n.i(i.detach)(this.helper)),"mozilla"!==i.Browser.info.name||n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"table"))||"TABLE"!==n.i(i.closest)(t,"table").tagName||this.parent.contentModule.getEditPanel().setAttribute("contenteditable","false")},e.prototype.tableMove=function(e){this.parent.formatter.editorManager.observer.notify("TABLE_MOVE",{event:e,selectNode:[this.activeCell]})},e.prototype.resizeHelper=function(e){if(!this.parent.readonly){var t=e.target||e.targetTouches[0].target,r=n.i(i.closest)(t,"table.e-rte-table");n.i(i.isNullOrUndefined)(this.curTable)||n.i(i.isNullOrUndefined)(r)||r===this.curTable||!this.parent.contentModule.getEditPanel().contains(r)||(this.removeResizeElement(),this.removeHelper(e),this.cancelResizeAction()),"TABLE"!==t.nodeName&&"TD"!==t.nodeName&&"TH"!==t.nodeName||(this.curTable=r&&this.parent.contentModule.getEditPanel().contains(r)&&("TD"===t.nodeName||"TH"===t.nodeName)?r:t,this.removeResizeElement(),this.tableResizeEleCreation(this.curTable,e))}},e.prototype.tableResizeEleCreation=function(e,t){this.parent.preventDefaultResize(t);for(var r=e.rows[this.calMaxCol(e)].cells,o=[],s=0;s<e.rows.length;s++)for(var a=0;a<e.rows[s].cells.length;a++)if(!e.rows[s].cells[a].hasAttribute("rowspan")){o.push(Array.prototype.slice.call(e.rows[s].cells,0,e.rows[s].cells.length)[a]);break}for(var l=parseInt(getComputedStyle(e).height,10),c=parseInt(getComputedStyle(e).width,10),u=this.calcPos(e),s=0;r.length>=s;s++){var h=this.parent.createElement("span",{attrs:{"data-col":s.toString(),unselectable:"on",contenteditable:"false"}});h.classList.add(d._65,d._35),r.length===s?h.style.cssText="height: "+l+"px; width: 4px; top: "+u.top+"px; left:"+(u.left+this.calcPos(r[s-1]).left+r[s-1].offsetWidth)+"px;":h.style.cssText="height: "+l+"px; width: 4px; top: "+u.top+"px; left:"+(u.left+this.calcPos(r[s]).left)+"px;",this.contentModule.getEditPanel().appendChild(h)}for(var s=0;o.length>s;s++){var p=this.parent.createElement("span",{attrs:{"data-row":s.toString(),unselectable:"on",contenteditable:"false"}});p.classList.add(d._65,d._36);var m=n.i(i.isNullOrUndefined)(e.getAttribute("cellspacing"))&&""===e.getAttribute("cellspacing")?this.calcPos(o[s]).left:0;p.style.cssText="width: "+c+"px; height: 4px; top: "+(this.calcPos(o[s]).top+u.top+o[s].offsetHeight-2)+"px; left:"+(m+u.left)+"px;",this.contentModule.getEditPanel().appendChild(p)}var f=this.parent.createElement("span",{className:d._37+this.parent.getCssClass(!0),attrs:{"data-col":r.length.toString(),unselectable:"on",contenteditable:"false"}});f.style.cssText="top: "+(u.top+l-4)+"px; left:"+(u.left+c-4)+"px;",i.Browser.isDevice&&f.classList.add("e-rmob"),this.contentModule.getEditPanel().appendChild(f)},e.prototype.removeResizeElement=function(){var e=this.parent.contentModule.getEditPanel().querySelectorAll(".e-column-resize, .e-row-resize, .e-table-box, .e-table-rhelper");if(e.length>0)for(var t=0;t<e.length;t++)n.i(i.detach)(e[t])},e.prototype.calcPos=function(e){for(var t={top:0,left:0},r=e.getBoundingClientRect(),o=e.ownerDocument,s=e.offsetParent||o.documentElement,a=!1;s&&(s===o.body||s===o.documentElement)&&"static"===s.style.position;)s=s.parentNode;if("TD"===s.nodeName&&"TABLE"===e.nodeName&&(s=n.i(i.closest)(s,".e-rte-content"),a=!0),s&&s!==e&&1===s.nodeType&&(t=s.getBoundingClientRect()),a){a=!1;return{top:this.parent.inputElement&&this.parent.inputElement.scrollTop>0?this.parent.inputElement.scrollTop+r.top-t.top:r.top-t.top,left:this.parent.inputElement&&this.parent.inputElement.scrollLeft>0?this.parent.inputElement.scrollLeft+r.left-t.left:r.left-t.left}}return{top:e.offsetTop,left:e.offsetLeft}},e.prototype.getPointX=function(e){return e.touches&&e.touches.length?e.touches[0].pageX:e.pageX},e.prototype.getPointY=function(e){return e.touches&&e.touches.length?e.touches[0].pageY:e.pageY},e.prototype.resizeStart=function(e){var t=this;if(!this.parent.readonly){i.Browser.isDevice&&this.resizeHelper(e);var r=e.target;if(r.classList.contains(d._35)||r.classList.contains(d._36)||r.classList.contains(d._37)){if(e.preventDefault(),this.parent.preventDefaultResize(e),n.i(i.removeClass)(this.curTable.querySelectorAll("td,th"),d._32),this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.pageX=this.getPointX(e),this.pageY=this.getPointY(e),this.resizeBtnInit(),this.hideTableQuickToolbar(),r.classList.contains(d._35)&&(this.resizeBtnStat.column=!0,parseInt(r.getAttribute("data-col"),10)===this.curTable.rows[this.calMaxCol(this.curTable)].cells.length?(this.currentColumnResize="last",this.columnEle=this.curTable.rows[this.calMaxCol(this.curTable)].cells[parseInt(r.getAttribute("data-col"),10)-1]):(0===parseInt(r.getAttribute("data-col"),10)?this.currentColumnResize="first":this.currentColumnResize="middle",this.columnEle=this.curTable.rows[this.calMaxCol(this.curTable)].cells[parseInt(r.getAttribute("data-col"),10)]),this.colIndex=this.columnEle.cellIndex,this.moveEle=e.target,this.appendHelper()),r.classList.contains(d._36)&&(this.rowEle=this.curTable.rows[parseInt(r.getAttribute("data-row"),10)],this.resizeBtnStat.row=!0,this.appendHelper()),r.classList.contains(d._37)&&(this.resizeBtnStat.tableBox=!0),i.Browser.isDevice&&this.helper&&!this.helper.classList.contains("e-reicon"))this.helper.classList.add("e-reicon"),i.EventHandler.add(document,i.Browser.touchStartEvent,this.removeHelper,this),i.EventHandler.add(this.helper,i.Browser.touchStartEvent,this.resizeStart,this);else{var o={event:e,requestType:"Table"};this.parent.trigger(s.J,o,function(e){e.cancel&&t.cancelResizeAction()})}i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing,this),i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd,this)}}},e.prototype.removeHelper=function(e){!e.target.classList.contains("e-reicon")&&this.helper&&(i.EventHandler.remove(document,i.Browser.touchStartEvent,this.removeHelper),i.EventHandler.remove(this.helper,i.Browser.touchStartEvent,this.resizeStart),this.helper&&this.contentModule.getEditPanel().contains(this.helper)&&n.i(i.detach)(this.helper),this.pageX=null,this.helper=null)},e.prototype.appendHelper=function(){this.helper=this.parent.createElement("div",{className:"e-table-rhelper"+this.parent.getCssClass(!0)}),i.Browser.isDevice&&this.helper.classList.add("e-reicon"),this.contentModule.getEditPanel().appendChild(this.helper),this.setHelperHeight()},e.prototype.setHelperHeight=function(){var e=this.calcPos(this.curTable);this.resizeBtnStat.column?(this.helper.classList.add("e-column-helper"),this.helper.style.cssText="height: "+getComputedStyle(this.curTable).height+"; top: "+e.top+"px; left:"+(e.left+this.calcPos(this.columnEle).left+("last"===this.currentColumnResize?this.columnEle.offsetWidth+2:0)-1)+"px;"):(this.helper.classList.add("e-row-helper"),this.helper.style.cssText="width: "+getComputedStyle(this.curTable).width+"; top: "+(this.calcPos(this.rowEle).top+e.top+this.rowEle.offsetHeight)+"px; left:"+(this.calcPos(this.rowEle).left+e.left)+"px;")},e.prototype.updateHelper=function(){var e=this.calcPos(this.curTable);if(this.resizeBtnStat.column){var t=e.left+this.calcPos(this.columnEle).left+("last"===this.currentColumnResize?this.columnEle.offsetWidth+2:0)-1;this.helper.style.left=t+"px"}else{var n=this.calcPos(this.rowEle).top+e.top+this.rowEle.offsetHeight;this.helper.style.top=n+"px"}},e.prototype.calMaxCol=function(e){for(var t,n=0,i=0;i<e.rows.length;i++)n<e.rows[i].cells.length&&(t=i,n=e.rows[i].cells.length);return t},e.prototype.resizing=function(e){var t=this,r=this.getPointX(e),o=this.getPointY(e),a=this.parent.enableRtl?-(r-this.pageX):r-this.pageX,l=this.parent.enableRtl?-(o-this.pageY):o-this.pageY;this.pageX=r,this.pageY=o;var d,c,u,h=this.curTable.closest("td"),p={event:e,requestType:"table"},m=!1,f=!1;this.parent.trigger(s.K,p,function(r){if(r.cancel)t.cancelResizeAction();else{var o=t.contentModule.getEditPanel().querySelector(".e-table-box"),s=parseInt(getComputedStyle(t.curTable).width,10),p=parseInt(getComputedStyle(t.curTable).height,10),g=+getComputedStyle(t.contentModule.getEditPanel()).paddingRight.match(/\d/g).join(""),b=t.contentModule.getEditPanel().offsetWidth-(t.contentModule.getEditPanel().offsetWidth-t.contentModule.getEditPanel().clientWidth)-2*g,v=void 0;if(n.i(i.isNullOrUndefined)(t.curTable.parentElement.closest("table"))||n.i(i.isNullOrUndefined)(t.curTable.closest("td"))||!t.contentModule.getEditPanel().contains(t.curTable.closest("td")))v=b;else{var C=t.curTable.closest("td"),y=+getComputedStyle(C).paddingRight.match(/\d/g).join("");v=C.offsetWidth-(C.offsetWidth-C.clientWidth)-2*y}if(t.resizeBtnStat.column){var N=parseFloat(t.columnEle.offsetWidth.toString()),S="TH"===t.curTable.rows[0].cells[0].nodeName?1:0,E=void 0;E=""!==t.curTable.style.width&&t.curTable.style.width.includes("%")?parseFloat(t.curTable.style.width.split("%")[0]):t.getCurrentTableWidth(t.curTable.offsetWidth,t.parent.inputElement.offsetWidth);var T=parseFloat(t.curTable.rows[S].cells[t.colIndex>=t.curTable.rows[S].cells.length?t.curTable.rows[S].cells.length-1:t.colIndex].style.width.split("%")[0]);if("first"===t.currentColumnResize){if(a-=.75,t.removeResizeElement(),h&&(d=t.curTable.getBoundingClientRect().right-t.calcPos(h).left,t.curTable.style.maxWidth=d+"px"),(0!==a&&5<T||a<0)&&E<=100&&t.convertPixelToPercentage(s-a,v)<=100){var O=t.findFirstLastColCells(t.curTable,!0);t.curTable.style.width=t.convertPixelToPercentage(s-a,v)>100?"100%":t.convertPixelToPercentage(s-a,v)+"%";var w=E-t.convertPixelToPercentage(s-a,v);t.currentMarginLeft=t.currentMarginLeft+w,t.curTable.style.marginLeft="calc("+("100%"===t.curTable.style.width?0:t.currentMarginLeft)+"%)";for(var k=0;k<O.length;k++)t.curTable.rows[k].cells[t.colIndex].style.width=T-w+"%"}}else if("last"===t.currentColumnResize){if(a+=.75,t.removeResizeElement(),h&&(d=h.getBoundingClientRect().right-t.curTable.getBoundingClientRect().left,t.curTable.style.maxWidth=d+"px"),(0!==a&&5<T||a>0)&&E<=100&&t.convertPixelToPercentage(s+a,v)<=100){var L=t.findFirstLastColCells(t.curTable,!1);t.curTable.style.width=t.convertPixelToPercentage(s+a,v)>100?"100%":t.convertPixelToPercentage(s+a,v)+"%";for(var w=E-t.convertPixelToPercentage(s+a,v),k=0;k<L.length;k++)t.curTable.rows[k].cells[t.colIndex]&&(t.curTable.rows[k].cells[t.curTable.rows[k].cells.length===t.colIndex?t.colIndex-1:t.colIndex].style.width=T-w+"%")}}else for(var _=t.curTable.rows[t.calMaxCol(t.curTable)].cells,x=N-a,D=parseFloat(t.columnEle.offsetWidth.toString())+parseFloat(_[t.colIndex-1].offsetWidth.toString()),k=0;k<t.curTable.rows.length;k++){var M=t.curTable.rows[k];if(D-x>20&&x>20){var R=D-x,B=x,A=void 0,I=!1,P=void 0,U=void 0;f=!1,m=!1;for(var H=0;H<M.cells.length;H++)M.cells[H].hasAttribute("rowspan")&&H<=t.colIndex?(m=!0,c=k,u=M.cells[H]):M.cells[H].hasAttribute("colspan")&&H<=M.cells.length&&(f=!0,c=k,u=M.cells[H]);if(A=!n.i(i.isNullOrUndefined)(M.cells[k])&&M.cells[k].hasAttribute("colspan")?parseInt(M.cells[k].getAttribute("colspan"),10)-1:t.colIndex,m||f){var j=void 0;M.cells.length<_.length?(A=M.cells.length===t.colIndex||M===t.curTable.rows[t.curTable.rows.length-1]?t.colIndex-1:t.colIndex,j=t.curTable.rows[n.i(i.isNullOrUndefined)(c)?t.colIndex-1:c],I=!(!j||j===M||j.cells[t.colIndex-1]!==u&&j.cells[j.cells.length-1]!==u)):A=t.colIndex,P=I?j&&j.cells[j.cells.length-1]!==u?j.cells[t.colIndex-1]:M.cells[M.cells.length-1]:M.cells[A-1],U=I?U&&U.hasAttribute("rowspan")?j.cells[t.colIndex]:j&&j.cells[j.cells.length-1]!==u?M.cells[A-1]:j.cells[j.cells.length-1]:M.cells[A]}n.i(i.isNullOrUndefined)(M.cells[A-1])||m||f?P&&(P.style.width=t.convertPixelToPercentage(R,s)+"%"):M.cells[A-1].style.width=t.convertPixelToPercentage(R,s)+"%",n.i(i.isNullOrUndefined)(M.cells[A])||m||f?U&&(U.style.width=t.convertPixelToPercentage(B,s)+"%"):M.cells[A].style.width=t.convertPixelToPercentage(B,s)+"%"}}t.updateHelper()}else if(t.resizeBtnStat.row){t.parent.preventDefaultResize(e);var F=parseFloat(t.rowEle.clientHeight.toString())+l;F>20&&(t.rowEle.style.height=F+"px"),t.curTable.style.height="",n.i(i.isNullOrUndefined)(o)||(o.style.cssText="top: "+(t.calcPos(t.curTable).top+p-4)+"px; left:"+(t.calcPos(t.curTable).left+s-4)+"px;"),t.updateHelper()}else if(t.resizeBtnStat.tableBox){if(h){var q=t.curTable.getBoundingClientRect().left-h.getBoundingClientRect().left;d=Math.abs(q-h.getBoundingClientRect().width)-5,t.curTable.style.maxWidth=d+"px"}var z=t.curTable.style.width.indexOf("%")>-1;t.curTable.style.width=z?t.convertPixelToPercentage(s+a,v)+"%":s+a+"px",t.curTable.style.height=p+l+"px",n.i(i.isNullOrUndefined)(o)||(o.classList.add("e-rbox-select"),o.style.cssText="top: "+(t.calcPos(t.curTable).top+p-4)+"px; left:"+(t.calcPos(t.curTable).left+s-4)+"px;")}}})},e.prototype.getCurrentTableWidth=function(e,t){return e/t*100},e.prototype.findFirstLastColCells=function(e,t){for(var n=[],i=e.querySelectorAll("tr"),r=0;r<i.length;r++)if(i[r].closest("table")===e){var o=i[r].querySelectorAll("th, td");n.push(t?o[0]:o[o.length-1])}return n},e.prototype.convertPixelToPercentage=function(e,t){return e/t*100},e.prototype.cancelResizeAction=function(){i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),this.removeResizeElement()},e.prototype.resizeEnd=function(e){this.resizeBtnInit(),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),this.contentModule.getEditPanel().querySelector(".e-table-box")&&this.contentModule.getEditPanel().contains(this.contentModule.getEditPanel().querySelector(".e-table-box"))&&this.removeResizeElement(),this.helper&&this.contentModule.getEditPanel().contains(this.helper)&&(n.i(i.detach)(this.helper),this.helper=null),this.pageX=null,this.pageY=null,this.moveEle=null;var t={event:e,requestType:"table"};this.parent.trigger(s.L,t),this.parent.formatter.saveData()},e.prototype.resizeBtnInit=function(){return this.resizeBtnStat={column:!1,row:!1,tableBox:!1}},e.prototype.addRow=function(e,t,n){var i;n&&(i={item:{command:"Table",subCommand:"InsertRowAfter"}});var r={selection:e,subCommand:n?i.item.subCommand:t.item.subCommand};this.parent.formatter.process(this.parent,n?i:t,t,r)},e.prototype.addColumn=function(e,t){this.parent.formatter.process(this.parent,t,t,{selection:e,width:this.parent.tableSettings.width,subCommand:t.item.subCommand})},e.prototype.removeRowColumn=function(e,t){this.parent.formatter.process(this.parent,t,t,{selection:e,subCommand:t.item.subCommand}),this.hideTableQuickToolbar()},e.prototype.removeTable=function(e,t,n){var i;n&&(i={item:{command:"Table",subCommand:"TableRemove"}});var r={selection:e,subCommand:n?i.item.subCommand:t.item.subCommand};this.parent.formatter.process(this.parent,n?i:t,t.originalEvent,r),this.contentModule.getEditPanel().focus(),null!==this.parent.inputElement.innerHTML&&""!==this.parent.inputElement.innerHTML||("DIV"===this.parent.enterKey?this.contentModule.getEditPanel().innerHTML="<div><br/></div>":"BR"===this.parent.enterKey?this.contentModule.getEditPanel().innerHTML="<br/>":this.contentModule.getEditPanel().innerHTML="<p><br/></p>"),this.removeResizeElement(),this.hideTableQuickToolbar()},e.prototype.renderDlgContent=function(e){var t=this,s=e.args.originalEvent.target;if(i.Browser.isDevice||this.parent.inlineMode.enable||!n.i(i.isNullOrUndefined)(n.i(i.closest)(s,".e-rte-text-popup")))return void this.insertTableDialog(e);if(this.popupObj)return void this.popupObj.hide();this.hideTableQuickToolbar();var a=this.l10n.getConstant("inserttablebtn");this.dlgDiv=this.parent.createElement("div",{className:"e-rte-table-popup"+this.parent.getCssClass(!0),id:this.rteID+"_table"}),this.tblHeader=this.parent.createElement("div",{className:"e-rte-popup-header"+this.parent.getCssClass(!0)}),this.tblHeader.innerHTML="1X1",this.dlgDiv.appendChild(this.tblHeader);var l=this.parent.createElement("div",{className:"e-rte-table-span"+this.parent.getCssClass(!0)});this.drawTable(l,e),this.dlgDiv.appendChild(l),this.dlgDiv.appendChild(this.parent.createElement("span",{className:"e-span-border"+this.parent.getCssClass(!0)}));var d=this.parent.createElement("button",{className:"e-insert-table-btn"+this.parent.getCssClass(!0),id:this.rteID+"_insertTable",attrs:{type:"button",tabindex:"0"}});n.i(i.isNullOrUndefined)(this.parent.getToolbarElement().querySelector(".e-expended-nav"))||this.parent.getToolbarElement().querySelector(".e-expended-nav").setAttribute("tabindex","1"),this.dlgDiv.appendChild(d),this.createTableButton=new o.Button({iconCss:"e-icons e-create-table",content:a,cssClass:"e-flat"+this.parent.getCssClass(!0),enableRtl:this.parent.enableRtl,locale:this.parent.locale}),this.createTableButton.isStringTemplate=!0,this.createTableButton.appendTo(d),i.EventHandler.add(d,"click",this.insertTableDialog,{self:this,args:e.args,selection:e.selection}),this.parent.getToolbar().appendChild(this.dlgDiv);var c=e.args.originalEvent.target;c=c.classList.contains("e-toolbar-item")?c.firstChild:c.parentElement,this.popupObj=new r.Popup(this.dlgDiv,{targetType:"relative",relateTo:c,collision:{X:"fit",Y:"none"},offsetY:8,viewPortElement:this.parent.element,position:{X:"left",Y:"bottom"},enableRtl:this.parent.enableRtl,zIndex:10001,close:function(e){t.parent.isBlur=!1,t.popupObj.destroy(),n.i(i.detach)(t.popupObj.element),t.popupObj=null}}),n.i(i.addClass)([this.popupObj.element],"e-popup-open"),n.i(i.isNullOrUndefined)(this.parent.cssClass)||n.i(i.addClass)([this.popupObj.element],this.parent.getCssClass()),this.popupObj.refreshPosition(c)},e.prototype.onIframeMouseDown=function(){this.popupObj&&this.popupObj.hide()},e.prototype.docClick=function(e){var t=e.args.target;t&&t.classList&&(this.popupObj&&!n.i(i.closest)(t,"[id='"+this.popupObj.element.id+"']")||this.editdlgObj&&!n.i(i.closest)(t,"#"+this.editdlgObj.element.id))&&!t.classList.contains("e-create-table")&&t.offsetParent&&!t.offsetParent.classList.contains("e-rte-backgroundcolor-dropdown")&&(this.popupObj&&this.popupObj.hide(),this.editdlgObj&&this.editdlgObj.hide(),this.parent.isBlur=!0,n.i(c.l)(this.parent.element,"focusout"));var r=n.i(i.closest)(t,"td"),o=!(!r||!this.parent.contentModule.getEditPanel().contains(r));!t||"TD"===t.tagName||"TH"===t.tagName||o||null!==n.i(i.closest)(t,".e-rte-quick-popup")||!t.offsetParent||t.offsetParent.classList.contains("e-quick-dropdown")||t.offsetParent.classList.contains("e-rte-backgroundcolor-dropdown")||n.i(i.closest)(t,".e-rte-dropdown-popup")||n.i(i.closest)(t,".e-rte-elements")||(n.i(i.removeClass)(this.parent.inputElement.querySelectorAll("table td"),d._32),i.Browser.isIE||this.hideTableQuickToolbar()),!t||!t.classList||t.classList.contains(d._35)||t.classList.contains(d._36)||t.classList.contains(d._37)||this.removeResizeElement()},e.prototype.drawTable=function(e,t){for(var r,o,s=0;s<3;s++){r=this.parent.createElement("div",{className:"e-rte-table-row"+this.parent.getCssClass(!0),attrs:{"data-column":""+s}});for(var a=0;a<10;a++){var l=s>2?"none":"inline-block";o=this.parent.createElement("div",{className:"e-rte-tablecell e-default"+this.parent.getCssClass(!0),attrs:{"data-cell":""+a}}),r.appendChild(o),o.style.display=l,0===a&&0===s&&n.i(i.addClass)([o],"e-active"),i.EventHandler.add(o,"mousemove",this.tableCellSelect,this),i.EventHandler.add(r,"mouseleave",this.tableCellLeave,this),i.EventHandler.add(o,"mouseup",this.tableCellClick,{self:this,args:t.args,selection:t.selection})}e.appendChild(r)}},e.prototype.editTable=function(e){var t=this;this.createDialog(e);var n=this.tableDlgContent(e),i=this.l10n.getConstant("dialogUpdate"),r=this.l10n.getConstant("dialogCancel"),o=this.l10n.getConstant("tableEditHeader");this.editdlgObj.setProperties({height:"initial",width:"290px",content:n,header:o,buttons:[{click:this.applyProperties.bind(this,e),buttonModel:{content:i,cssClass:"e-flat e-size-update"+this.parent.getCssClass(!0),isPrimary:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel"+this.parent.getCssClass(!0),content:r}}],cssClass:this.editdlgObj.cssClass+" e-rte-edit-table-prop-dialog"}),this.editdlgObj.element.style.maxHeight="none",this.editdlgObj.content.querySelector("input").focus(),this.hideTableQuickToolbar()},e.prototype.insertTableDialog=function(e){var t=this.self?this.self:this;t.popupObj&&t.popupObj.hide(),t.createDialog(e);var r=t.tableCellDlgContent(),o=t.l10n.getConstant("dialogInsert"),s=t.l10n.getConstant("dialogCancel");n.i(i.isNullOrUndefined)(t.editdlgObj)||(t.editdlgObj.setProperties({height:"initial",width:"290px",content:r,buttons:[{click:t.customTable.bind(this,e),buttonModel:{content:o,cssClass:"e-flat e-insert-table "+t.parent.cssClass,isPrimary:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel "+t.parent.cssClass,content:s}}]}),n.i(i.isNullOrUndefined)(t.parent.cssClass)||t.editdlgObj.setProperties({cssClass:t.parent.cssClass}),t.editdlgObj.element.style.maxHeight="none",t.editdlgObj.content.querySelector("input").focus())},e.prototype.tableCellDlgContent=function(){var e=this.l10n.getConstant("columns"),t=this.l10n.getConstant("rows"),i=this.parent.createElement("div",{className:"e-cell-wrap"+this.parent.getCssClass(!0)}),r='<div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" id="tableColumn" class="e-table-column'+this.parent.getCssClass(!0)+'"/></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" id="tableRow" class="e-table-row'+this.parent.getCssClass(!0)+'" /></div>',o=n.i(c.m)(r);return i.appendChild(o),this.columnTextBox=new l.NumericTextBox({format:"n0",min:1,value:3,placeholder:e,floatLabelType:"Auto",max:50,enableRtl:this.parent.enableRtl,locale:this.parent.locale,cssClass:this.parent.getCssClass()}),this.columnTextBox.isStringTemplate=!0,this.columnTextBox.appendTo(i.querySelector("#tableColumn")),this.rowTextBox=new l.NumericTextBox({format:"n0",min:1,value:3,placeholder:t,floatLabelType:"Auto",max:1e3,enableRtl:this.parent.enableRtl,locale:this.parent.locale,cssClass:this.parent.getCssClass()}),this.rowTextBox.isStringTemplate=!0,this.rowTextBox.appendTo(i.querySelector("#tableRow")),i},e.prototype.clearDialogObj=function(){this.editdlgObj&&(this.editdlgObj.destroy(),n.i(i.detach)(this.editdlgObj.element),this.editdlgObj=null)},e.prototype.createDialog=function(e){var t=this;if(this.editdlgObj)return void this.editdlgObj.hide({returnValue:!0});var r=this.parent.createElement("div",{className:"e-rte-edit-table"+this.parent.getCssClass(!0),id:this.rteID+"_tabledialog"});this.parent.element.appendChild(r);var o=this.l10n.getConstant("dialogInsert"),s=this.l10n.getConstant("dialogCancel"),a=this.l10n.getConstant("tabledialogHeader"),l={header:a,cssClass:d._12+this.parent.getCssClass(!0),enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:i.Browser.isDevice?"290px":"340px",height:"initial",position:{X:"center",Y:i.Browser.isDevice?"center":"top"},isModal:i.Browser.isDevice,buttons:[{buttonModel:{content:o,cssClass:"e-flat e-insert-table"+this.parent.getCssClass(!0),isPrimary:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel"+this.parent.getCssClass(!0),content:s}}],target:i.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){t.parent.isBlur=!1,t.editdlgObj.destroy(),n.i(i.detach)(t.editdlgObj.element),t.dialogRenderObj.close(e),t.editdlgObj=null}};this.editdlgObj=this.dialogRenderObj.render(l),this.editdlgObj.appendTo(r),this.quickToolObj&&this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup(),this.quickToolObj&&this.quickToolObj.textQTBar&&this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)&&this.quickToolObj.textQTBar.hidePopup()},e.prototype.customTable=function(e,t){var r=this.self?this.self:this;if(r.rowTextBox.value&&r.columnTextBox.value){var o=i.Browser.isDevice||!n.i(i.isNullOrUndefined)(e.args)&&!n.i(i.isNullOrUndefined)(e.args.originalEvent)&&"insert-table"===e.args.originalEvent.action||r.parent.inlineMode.enable||!n.i(i.isNullOrUndefined)(r.parent.quickToolbarSettings.text)?e:this;r.tableInsert(r.rowTextBox.value,r.columnTextBox.value,t,o)}},e.prototype.cancelDialog=function(e){this.parent.isBlur=!1,this.editdlgObj.hide({returnValue:!0})},e.prototype.applyProperties=function(e,t){var r=this.editdlgObj.element,o=n.i(i.closest)(e.selectNode[0],"table");if(o.style.width=r.querySelector(".e-table-width").value+"px",""!==r.querySelector(".e-cell-padding").value)for(var s=o.querySelectorAll("td"),a=0;a<s.length;a++){var l="";""===s[a].style.padding?l=s[a].getAttribute("style")+" padding:"+r.querySelector(".e-cell-padding").value+"px;":(s[a].style.padding=r.querySelector(".e-cell-padding").value+"px",l=s[a].getAttribute("style")),s[a].setAttribute("style",l)}o.cellSpacing=r.querySelector(".e-cell-spacing").value,n.i(i.isNullOrUndefined)(o.cellSpacing)&&"0"===o.cellSpacing?n.i(i.removeClass)([o],d._64):n.i(i.addClass)([o],d._64),this.parent.formatter.saveData(),this.editdlgObj.hide({returnValue:!0})},e.prototype.tableDlgContent=function(e){var t=e.selectParent[0],r=this.l10n.getConstant("tableWidth"),o=this.l10n.getConstant("cellpadding"),s=this.l10n.getConstant("cellspacing"),a=this.parent.createElement("div",{className:"e-table-sizewrap"+this.parent.getCssClass(!0)}),d=n.i(i.closest)(t,"table").getClientRects()[0].width,u=n.i(i.closest)(t,"td").style.padding,h=n.i(i.closest)(t,"table").getAttribute("cellspacing"),p='<div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" id="tableWidth" class="e-table-width'+this.parent.getCssClass(!0)+'" /></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" id="cellPadding" class="e-cell-padding'+this.parent.getCssClass(!0)+'" /> </div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" id="cellSpacing" class="e-cell-spacing'+this.parent.getCssClass(!0)+'" /></div>',m=n.i(c.m)(p);return a.appendChild(m),this.tableWidthNum=new l.NumericTextBox({format:"n0",min:0,value:d,placeholder:r,floatLabelType:"Auto",enableRtl:this.parent.enableRtl,locale:this.parent.locale}),this.tableWidthNum.isStringTemplate=!0,this.tableWidthNum.appendTo(a.querySelector("#tableWidth")),this.tableCellPadding=new l.NumericTextBox({format:"n0",min:0,value:""!==u?parseInt(u,null):0,placeholder:o,floatLabelType:"Auto",enableRtl:this.parent.enableRtl,locale:this.parent.locale}),this.tableCellPadding.isStringTemplate=!0,this.tableCellPadding.appendTo(a.querySelector("#cellPadding")),this.tableCellSpacing=new l.NumericTextBox({format:"n0",min:0,value:""===h||n.i(i.isNullOrUndefined)(h)?0:parseInt(h,null),placeholder:s,floatLabelType:"Auto",enableRtl:this.parent.enableRtl,locale:this.parent.locale}),this.tableCellSpacing.isStringTemplate=!0,this.tableCellSpacing.appendTo(a.querySelector("#cellSpacing")),a},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.getModuleName=function(){return"table"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(14),a=(n.n(s),n(18)),l=(n.n(a),n(5)),d=n(4),c=n(6),u=function(){function e(e,t){this.isVideoUploaded=!1,this.isAllowedTypes=!0,this.pageX=null,this.pageY=null,this.deletedVid=[],this.parent=e,this.rteID=e.element.id,this.i10n=t.getService("rteLocale"),this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.v,this.onKeyDown,this),this.parent.on(r.u,this.onKeyUp,this),this.parent.on(r.Z,this.insertingVideo,this),this.parent.on(r.g,this.afterRender,this),this.parent.on(r._75,this.afterRender,this),this.parent.on(r.I,this.onWindowResize,this),this.parent.on(r._83,this.showDialog,this),this.parent.on(r._86,this.closeDialog,this),this.parent.on(r.B,this.alignmentSelect,this),this.parent.on(r._10,this.deleteVideo,this),this.parent.on(r.G,this.onToolbarAction,this),this.parent.on(r._26,this.editAreaClickHandler,this),this.parent.on(r.h,this.onIframeMouseDown,this),this.parent.on(r._13,this.videoSize,this),this.parent.on(r._0,this.showVideoQuickToolbar,this),this.parent.on(r._48,this.clearDialogObj,this),this.parent.on(r.i,this.removeEventListener,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.v,this.onKeyDown),this.parent.off(r.u,this.onKeyUp),this.parent.off(r.Z,this.insertingVideo),this.parent.off(r.I,this.onWindowResize),this.parent.off(r.g,this.afterRender),this.parent.off(r._75,this.afterRender),this.parent.off(r._83,this.showDialog),this.parent.off(r._86,this.closeDialog),this.parent.off(r.B,this.alignmentSelect),this.parent.off(r._10,this.deleteVideo),this.parent.off(r.G,this.onToolbarAction),this.parent.off(r._26,this.editAreaClickHandler),this.parent.off(r.h,this.onIframeMouseDown),this.parent.off(r._13,this.videoSize),this.parent.off(r._0,this.showVideoQuickToolbar),this.parent.off(r._48,this.clearDialogObj),this.parent.off(r.i,this.removeEventListener),n.i(i.isNullOrUndefined)(this.contentModule)||(i.EventHandler.remove(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.videoClick),this.parent.formatter.editorManager.observer.off(r._42,this.undoStack),this.parent.insertVideoSettings.resize&&(i.EventHandler.remove(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.resizeStart),i.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick),i.EventHandler.remove(this.contentModule.getEditPanel(),"cut",this.onCutHandler),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing))))},e.prototype.afterRender=function(){this.contentModule=this.rendererFactory.getRenderer(l.a.Content),i.EventHandler.add(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.videoClick,this),this.parent.insertVideoSettings.resize&&(i.EventHandler.add(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.resizeStart,this),i.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this),i.EventHandler.add(this.contentModule.getEditPanel(),"cut",this.onCutHandler,this))},e.prototype.clearDialogObj=function(){this.dialogObj&&(this.dialogObj.destroy(),n.i(i.detach)(this.dialogObj.element),this.dialogObj=null)},e.prototype.onKeyUp=function(e){if(!n.i(i.isNullOrUndefined)(this.deletedVid)&&this.deletedVid.length>0)for(var t=0;t<this.deletedVid.length;t++){var o={element:this.deletedVid[t],src:"IFRAME"!==this.deletedVid[t].tagName?this.deletedVid[t].querySelector("source").getAttribute("src"):this.deletedVid[t].src};this.parent.trigger(r._67,o)}},e.prototype.undoStack=function(e){if("undo"===e.subCommand.toLowerCase()||"redo"===e.subCommand.toLowerCase())for(var t=0;t<this.parent.formatter.getUndoRedoStack().length;t++){var r=this.parent.createElement("div"),o=this.parent.formatter.getUndoRedoStack()[t].text;r.appendChild(o.cloneNode(!0));var s=r.querySelectorAll("video");if(r.querySelector(".e-vid-resize")&&s.length>0){for(var a=0;a<s.length;a++)s[a].style.outline="";n.i(i.detach)(r.querySelector(".e-vid-resize"));for(var l=r.cloneNode(!0),d=document.createDocumentFragment();l.firstChild;)d.appendChild(l.firstChild);this.parent.formatter.getUndoRedoStack()[t].text=d}}},e.prototype.onIframeMouseDown=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.videoSize=function(e){var t=this;if(("VIDEO"===e.selectNode[0].nodeName||this.isEmbedVidElem(e.selectNode[0]))&&(this.insertVideo(e),!n.i(i.isNullOrUndefined)(this.dialogObj))){var r=this.i10n.getConstant("videoSizeHeader"),o=this.i10n.getConstant("dialogUpdate"),s=this.vidsizeInput(e),a={args:e.args,selfVideo:this,selection:e.selection,selectNode:e.selectNode};this.dialogObj.setProperties({height:"inherit",width:"290px",header:r,content:s,buttons:[{click:function(e){t.insertSize(a)},buttonModel:{content:o,cssClass:"e-flat e-update-size",isPrimary:!0}}]}),this.dialogObj.element.style.maxHeight="inherit",this.dialogObj.content.querySelector("input").focus()}},e.prototype.vidsizeInput=function(e){var t=this,r=e.selectNode[0],o=this.i10n.getConstant("videoHeight"),a=this.i10n.getConstant("videoWidth"),l=this.parent.createElement("div",{className:"e-video-sizewrap"}),c=!n.i(i.isNullOrUndefined)(this.changedWidthValue)||"auto"!==r.style.width.toString()&&""===r.style.width?n.i(i.isNullOrUndefined)(this.changedWidthValue)?parseInt(r.getClientRects()[0].width.toString(),10).toString():this.changedWidthValue:r.style.width,u=!n.i(i.isNullOrUndefined)(this.changedHeightValue)||"auto"!==r.style.height.toString()&&""===r.style.height?n.i(i.isNullOrUndefined)(this.changedHeightValue)?parseInt(r.getClientRects()[0].height.toString(),10).toString():this.changedHeightValue:r.style.height;this.changedWidthValue=null,this.changedHeightValue=null;var h='<div class="e-rte-label"><label>'+a+'</label></div><div class="e-rte-field"><input type="text" id="vidwidth" class="e-vid-width" value='+c+' /></div><div class="e-rte-label"><label>'+o+'</label></div><div class="e-rte-field"> <input type="text" id="vidheight" class="e-vid-height" value='+u+" /></div>",p=n.i(d.m)(h);l.appendChild(p);var m=new s.TextBox({value:n.i(i.formatUnit)(c),enableRtl:this.parent.enableRtl,input:function(e){t.inputWidthValue=n.i(i.formatUnit)(e.value)}});m.createElement=this.parent.createElement,m.appendTo(l.querySelector("#vidwidth"));var f=new s.TextBox({value:n.i(i.formatUnit)(u),enableRtl:this.parent.enableRtl,input:function(e){t.inputHeightValue=n.i(i.formatUnit)(e.value)}});return f.createElement=this.parent.createElement,f.appendTo(l.querySelector("#vidheight")),l},e.prototype.insertSize=function(e){e.selection.restore();var t=e.selfVideo;0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData();var n=t.dialogObj.element;this.changedWidthValue=this.inputWidthValue,this.changedHeightValue=this.inputHeightValue;var i=n.querySelector(".e-vid-width").value,r=n.parentElement.querySelector(".e-vid-height").value;t.parent.formatter.process(this.parent,e.args,e.args,{width:i,height:r,selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.vidResizeDiv&&(e.selectNode[0]="VIDEO"===e.selectNode[0].tagName||"IFRAME"===e.selectNode[0].tagName?e.selectNode[0]:e.selectNode[0].querySelector("iframe"),t.vidResizePos(e.selectNode[0],this.vidResizeDiv)),t.dialogObj.hide({returnValue:!0})},e.prototype.resizeEnd=function(e){this.resizeBtnInit(),this.videoEle.parentElement.style.cursor="auto",i.Browser.isDevice&&n.i(i.removeClass)([e.target.parentElement],"e-mob-span");var t={event:e,requestType:"videos"};this.parent.trigger(r.L,t);this.getPointX(e),this.parent.iframeSettings.enable?(window.pageYOffset,this.parent.element.getBoundingClientRect().top,e.clientY):e.pageY;this.parent.formatter.editorManager.observer.on(r._42,this.undoStack,this),this.parent.formatter.saveData()},e.prototype.resizeStart=function(e,t){var o=this;if(!this.parent.readonly){var s=t||(this.isEmbedVidElem(e.target)?e.target.querySelector("iframe"):e.target);if(this.prevSelectedVidEle=this.videoEle,"VIDEO"===s.tagName||"IFRAME"===s.tagName){this.parent.preventDefaultResize(e);var a=s;this.vidResizeDiv&&this.contentModule.getEditPanel().contains(this.vidResizeDiv)&&n.i(i.detach)(this.vidResizeDiv),this.videoResize(a)}if(s.classList.contains("e-rte-videoboxmark")){if(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),this.pageX=this.getPointX(e),this.pageY=this.getPointY(e),e.preventDefault(),e.stopImmediatePropagation(),this.resizeBtnInit(),this.quickToolObj&&this.quickToolObj.videoQTBar.hidePopup(),s.classList.contains("e-rte-topLeft")&&(this.resizeBtnStat.topLeft=!0),s.classList.contains("e-rte-topRight")&&(this.resizeBtnStat.topRight=!0),s.classList.contains("e-rte-botLeft")&&(this.resizeBtnStat.botLeft=!0),s.classList.contains("e-rte-botRight")&&(this.resizeBtnStat.botRight=!0),i.Browser.isDevice&&this.contentModule.getEditPanel().contains(this.vidResizeDiv)&&!this.vidResizeDiv.classList.contains("e-mob-span"))n.i(i.addClass)([this.vidResizeDiv],"e-mob-span");else{var l={event:e,requestType:"videos"};this.parent.trigger(r.J,l,function(e){e.cancel&&o.cancelResizeAction()})}i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd,this)}}},e.prototype.videoClick=function(e){i.Browser.isDevice&&("VIDEO"===e.target.tagName||this.isEmbedVidElem(e.target)?(this.contentModule.getEditPanel().setAttribute("contenteditable","false"),e.target.focus()):this.parent.readonly||this.contentModule.getEditPanel().setAttribute("contenteditable","true")),("VIDEO"===e.target.tagName||this.isEmbedVidElem(e.target))&&e.preventDefault()},e.prototype.onCutHandler=function(){this.vidResizeDiv&&this.contentModule.getEditPanel().contains(this.vidResizeDiv)&&this.cancelResizeAction()},e.prototype.videoResize=function(e){this.resizeBtnInit(),this.videoEle=e,n.i(i.addClass)([this.videoEle],"e-resize"),this.vidResizeDiv=this.parent.createElement("span",{className:"e-vid-resize",id:this.rteID+"_vidResize"}),this.vidResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-videoboxmark e-rte-topLeft",styles:"cursor: nwse-resize"})),this.vidResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-videoboxmark e-rte-topRight",styles:"cursor: nesw-resize"})),this.vidResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-videoboxmark e-rte-botLeft",styles:"cursor: nesw-resize"})),this.vidResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-videoboxmark e-rte-botRight",styles:"cursor: nwse-resize"})),i.Browser.isDevice&&n.i(i.addClass)([this.vidResizeDiv],"e-mob-rte"),e.style.outline="2px solid #4a90e2",this.vidResizePos(e,this.vidResizeDiv),this.resizeVidDupPos(e),this.contentModule.getEditPanel().appendChild(this.vidResizeDiv),i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing,this)},e.prototype.getPointX=function(e){return e.touches&&e.touches.length?e.touches[0].pageX:e.pageX},e.prototype.getPointY=function(e){return e.touches&&e.touches.length?e.touches[0].pageY:e.pageY},e.prototype.vidResizePos=function(e,t){if(!n.i(i.isNullOrUndefined)(t)){var r=this.calcPos(e),o=r.top,s=r.left,a=0!==e.width&&"auto"!==e.width&&"NaN"!==e.width?e.width:e.getBoundingClientRect().width,l=0!==e.height&&"auto"!==e.height&&"NaN"!==e.height?e.height:e.getBoundingClientRect().height,d=i.Browser.isDevice?4*parseInt(e.style.outline.slice(-3),10)+2:2*parseInt(e.style.outline.slice(-3),10)+2,c=i.Browser.isDevice?0:2;t.querySelector(".e-rte-botLeft").style.left=s-d+"px",t.querySelector(".e-rte-botLeft").style.top=parseInt(l.toString(),10)-d+o+"px",t.querySelector(".e-rte-botRight").style.left=parseInt(a.toString(),10)-(d-c)+s+"px",t.querySelector(".e-rte-botRight").style.top=parseInt(l.toString(),10)-d+o+"px",t.querySelector(".e-rte-topRight").style.left=parseInt(a.toString(),10)-(d-c)+s+"px",t.querySelector(".e-rte-topRight").style.top=o-d+"px",t.querySelector(".e-rte-topLeft").style.left=s-d+"px",t.querySelector(".e-rte-topLeft").style.top=o-d+"px"}},e.prototype.calcPos=function(e){for(var t,r=["TD","TH","TABLE","A"],o={top:0,left:0},s=e.ownerDocument,a=(e.offsetParent&&(e.offsetParent.classList.contains("e-video-clickelem")||r.indexOf(e.offsetParent.tagName)>-1)?n.i(i.closest)(e,"#"+this.parent.getID()+"_rte-edit-view"):e.offsetParent)||s.documentElement;a&&(a===s.body||a===s.documentElement)&&"static"===a.style.position;)a=a.parentNode;return a&&a!==e&&1===a.nodeType&&(o=a.getBoundingClientRect()),e&&1===e.nodeType&&"IFRAME"===e.tagName?(t=e.getBoundingClientRect(),{top:t.top-o.top,left:t.left-o.left}):{top:e.offsetTop,left:e.offsetLeft}},e.prototype.setAspectRatio=function(e,t,r,o){var s=getComputedStyle(e);if(!n.i(i.isNullOrUndefined)(s)){var a=""!==s.width?s.width.match(/^\d+(\.\d*)?%$/g)?parseFloat(s.width):parseInt(s.width,10):""!==e.style.width?e.style.width:e.width,l=""!==s.height?parseInt(s.height,10):""!==e.style.height?e.style.height:e.height;if(a>l)if(e.style.minWidth=0===this.parent.insertVideoSettings.minWidth?"200px":n.i(i.formatUnit)(this.parent.insertVideoSettings.minWidth),e.style.minHeight=0===this.parent.insertVideoSettings.minHeight?"90px":n.i(i.formatUnit)(this.parent.insertVideoSettings.minHeight),this.parent.insertVideoSettings.resizeByPercent){if(0!==parseInt(""+e.getBoundingClientRect().width,10)&&0!==parseInt(""+a,10)){var d=this.pixToPerc(parseInt(a.toString(),10)/parseInt(l.toString(),10)*r,e.previousElementSibling||e.parentElement);e.style.width=Math.min(Math.round(d/e.getBoundingClientRect().width*t*100)/100,100)+"%"}else e.style.width=this.pixToPerc(parseInt(a.toString(),10)/parseInt(l.toString(),10)*r,e.previousElementSibling||e.parentElement)+"%";e.style.height=null,e.removeAttribute("height")}else if(""===e.style.width&&""!==e.style.height||""===s.width&&""!==s.height)e.style.height=r+"px";else if(""!==e.style.width&&""===e.style.height||""!==s.width&&""===s.height){var c=parseInt(a.toString(),10)/parseInt(l.toString(),10)*r+parseInt(a.toString(),10)/parseInt(l.toString(),10)<this.parent.inputElement.getBoundingClientRect().right-32?parseInt(a.toString(),10)/parseInt(l.toString(),10)*r+parseInt(a.toString(),10)/parseInt(l.toString(),10):this.parent.inputElement.getBoundingClientRect().right-32;e.style.width=c.toString()+"px"}else if(""!==e.style.width||""!==s.width){var c=parseInt(a.toString(),10)/parseInt(l.toString(),10)*r<this.parent.inputElement.getBoundingClientRect().right-32?parseInt(a.toString(),10)/parseInt(l.toString(),10)*r:this.parent.inputElement.getBoundingClientRect().right-32;e.style.width=c+"px",e.style.height=r+"px"}else e.setAttribute("width",parseInt((parseInt(a.toString(),10)/parseInt(l.toString(),10)*r+parseInt(a.toString(),10)/parseInt(l.toString(),10)).toString(),10).toString());else l>a?this.parent.insertVideoSettings.resizeByPercent?(0!==parseInt(""+e.getBoundingClientRect().width,10)&&0!==parseInt(""+a,10)?e.style.width=Math.min(Math.round(parseInt(a.toString(),10)/e.getBoundingClientRect().width*t*100)/100,100)+"%":e.style.width=this.pixToPerc(t/parseInt(l.toString(),10)*r,e.previousElementSibling||e.parentElement)+"%",e.style.height=null,e.removeAttribute("height")):""!==e.style.width||""!==s.width?(e.style.width=t+"px",e.style.height=parseInt(l.toString(),10)/parseInt(a.toString(),10)*t+"px"):e.setAttribute("width",this.resizeBtnStat.botRight?(this.getPointX(o.event)-e.getBoundingClientRect().left).toString():t.toString()):this.parent.insertVideoSettings.resizeByPercent?(e.style.width=this.pixToPerc(t,e.previousElementSibling||e.parentElement)+"%",e.style.height=null,e.removeAttribute("height")):(e.style.width=t+"px",e.style.height=t+"px")}},e.prototype.pixToPerc=function(e,t){return e/parseFloat(getComputedStyle(t).width)*100},e.prototype.vidDupMouseMove=function(e,t,o){var s=this,a={event:o,requestType:"videos"};this.parent.trigger(r.K,a,function(r){if(r.cancel)s.cancelResizeAction();else{if(parseInt(s.parent.insertVideoSettings.minWidth,10)>=parseInt(e,10)||parseInt(s.parent.getInsertVidMaxWidth(),10)<=parseInt(e,10)&&n.i(i.isNullOrUndefined)(s.videoEle.style.width))return;if(!s.parent.insertVideoSettings.resizeByPercent&&(parseInt(s.parent.insertVideoSettings.minHeight,10)>=parseInt(t,10)||parseInt(s.parent.insertVideoSettings.maxHeight,10)<=parseInt(t,10)))return;s.videoEle.parentElement.style.cursor="pointer",s.setAspectRatio(s.videoEle,parseInt(e,10),parseInt(t,10),a),s.resizeVidDupPos(s.videoEle),s.vidResizePos(s.videoEle,s.vidResizeDiv),s.parent.setContentHeight("",!1)}})},e.prototype.resizing=function(e){this.videoEle.offsetWidth>=this.parent.getInsertVidMaxWidth()&&(this.videoEle.style.maxHeight=this.videoEle.offsetHeight+"px");var t=this.getPointX(e),n=this.getPointY(e),i=this.resizeBtnStat.botLeft||this.resizeBtnStat.topLeft?-(t-this.pageX):t-this.pageX,r=this.resizeBtnStat.topLeft||this.resizeBtnStat.topRight?-(n-this.pageY):n-this.pageY,o=parseInt(this.vidDupPos.width,10)+i,s=parseInt(this.vidDupPos.height,10)+r;this.pageX=t,this.pageY=n,this.resizeBtnStat.botRight?this.vidDupMouseMove(o+"px",s+"px",e):this.resizeBtnStat.botLeft?this.vidDupMouseMove(o+"px",s+"px",e):this.resizeBtnStat.topRight?this.vidDupMouseMove(o+"px",s+"px",e):this.resizeBtnStat.topLeft&&this.vidDupMouseMove(o+"px",s+"px",e)},e.prototype.cancelResizeAction=function(){i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),this.videoEle&&this.vidResizeDiv&&this.contentModule.getEditPanel().contains(this.vidResizeDiv)&&(n.i(i.detach)(this.vidResizeDiv),this.videoEle.style.outline="",this.vidResizeDiv=null,this.pageX=null,this.pageY=null)},e.prototype.resizeVidDupPos=function(e){this.vidDupPos={width:""!==e.style.width&&this.parent.insertVideoSettings&&!this.parent.insertVideoSettings.resizeByPercent?this.videoEle.style.width:"auto"!==e.width&&0!==e.width&&"NaN"!==e.width?e.width+"px":parseInt(getComputedStyle(e).width,10)+"px",height:""!==e.style.height?this.videoEle.style.height:"auto"!==e.height&&0!==e.height&&"NaN"!==e.height?e.height+"px":parseInt(getComputedStyle(e).height,10)+"px"}},e.prototype.resizeBtnInit=function(){return this.resizeBtnStat={botLeft:!1,botRight:!1,topRight:!1,topLeft:!1}},e.prototype.onToolbarAction=function(e){switch(n.i(c.b)()&&this.parent.notify(r._19,{}),e.args.item.subCommand){case"VideoReplace":this.parent.notify(r.Z,e);break;case"VideoRemove":this.parent.notify(r._10,e);break;case"VideoDimension":this.parent.notify(r._13,e)}},e.prototype.onKeyDown=function(e){var t,r,s,a,l=e.args;this.deletedVid=[];var d,c=[27,112,113,114,115,116,117,118,119,120,121,122,123,44,45,9,16,17,18,19,20,33,34,35,36,37,38,39,40,91,92,93,144,145,182,183];if("HTML"===this.parent.editorMode&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),d=t.startContainer===t.endContainer&&t.startOffset===t.endOffset),!d&&"HTML"===this.parent.editorMode&&c.indexOf(l.which)<0)for(var u=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),h=0;h<u.length;h++)"VIDEO"!==u[h].nodeName&&"IFRAME"!==u[h].nodeName||this.deletedVid.push(u[h]);if("HTML"===this.parent.editorMode&&(8===l.which&&"Backspace"===l.code||46===l.which&&"Delete"===l.code)){var p=t.startContainer===t.endContainer&&t.startOffset===t.endOffset;8===l.which&&"Backspace"===l.code&&p?this.checkVideoBack(t):46===l.which&&"Delete"===l.code&&p&&this.checkVideoDel(t)}if(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&"KeyK"!==l.code&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),s=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),a=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t),!l.ctrlKey&&l.key&&(1===l.key.length||"enter"===l.action)&&(!n.i(i.isNullOrUndefined)(a[0])&&"VIDEO"===a[0].tagName||this.isEmbedVidElem(a[0]))&&a[0].parentElement)){var m=a[0].parentElement.childNodes[0];this.contentModule.getEditPanel().querySelector(".e-vid-resize")&&this.removeResizeEle(),this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),m,m,m.textContent.length,m.textContent.length),n.i(i.removeClass)([a[0]],o._51),this.quickToolObj.videoQTBar.hidePopup()}if(!l.ctrlKey||89!==l.keyCode&&90!==l.keyCode||this.undoStack({subCommand:90===l.keyCode?"undo":"redo"}),8===l.keyCode||46===l.keyCode){if(s&&("VIDEO"===s[0].nodeName||this.isEmbedVidElem(s[0]))&&s.length<1){n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),l.preventDefault();var f={selectNode:s,selection:r,selectParent:a,args:{item:{command:"Videos",subCommand:"VideoRemove"},originalEvent:l}};this.deleteVideo(f,l.keyCode)}this.parent.contentModule.getEditPanel().querySelector(".e-vid-resize")&&this.removeResizeEle()}switch("Backspace"===l.code&&(l.action="backspace"),l.action){case"escape":n.i(i.isNullOrUndefined)(this.dialogObj)||this.dialogObj.close();break;case"backspace":case"delete":for(var h=0;h<this.deletedVid.length;h++){var g=this.deletedVid[h].src;this.videoRemovePost(g)}"Markdown"!==this.parent.editorMode&&(3===t.startContainer.nodeType?"Backspace"===l.code?t.startContainer.previousElementSibling&&0===t.startOffset&&t.startContainer.previousElementSibling.classList.contains(o.Y)&&n.i(i.detach)(t.startContainer.previousElementSibling):t.startContainer.nextElementSibling&&t.endContainer.textContent.length===t.endOffset&&t.startContainer.nextElementSibling.classList.contains(o.Y)&&n.i(i.detach)(t.startContainer.nextElementSibling):1===t.startContainer.nodeType&&t.startContainer.classList&&t.startContainer.classList.contains(o.Y)&&n.i(i.detach)(t.startContainer));break;case"insert-video":n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),this.openDialog(!0,l,r,s,a),l.preventDefault()}},e.prototype.openDialog=function(e,t,r,o,s){var a,l,d,c;e||n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)?(l=r,d=o,c=s):(a=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),l=this.parent.formatter.editorManager.nodeSelection.save(a,this.parent.contentModule.getDocument()),d=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(a),c=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(a)),"HTML"===this.parent.editorMode&&this.insertVideo({args:{item:{command:"Videos",subCommand:"Video"},originalEvent:t,name:e?null:"showDialog"},selectNode:d,selection:l,selectParent:c})},e.prototype.showDialog=function(){this.openDialog(!1)},e.prototype.closeDialog=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.checkVideoBack=function(e){"#text"!==e.startContainer.nodeName||0!==e.startOffset||n.i(i.isNullOrUndefined)(e.startContainer.previousSibling)||"VIDEO"!==e.startContainer.previousSibling.nodeName&&!this.isEmbedVidElem(e.startContainer.previousSibling)?"#text"===e.startContainer.nodeName||n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset-1])||"VIDEO"!==e.startContainer.childNodes[e.startOffset-1].nodeName&&!this.isEmbedVidElem(e.startContainer.childNodes[e.startOffset-1])||this.deletedVid.push(e.startContainer.childNodes[e.startOffset-1]):this.deletedVid.push(e.startContainer.previousSibling)},e.prototype.checkVideoDel=function(e){"#text"!==e.startContainer.nodeName||e.startOffset!==e.startContainer.textContent.length||n.i(i.isNullOrUndefined)(e.startContainer.nextSibling)||"VIDEO"!==e.startContainer.nextSibling.nodeName&&!this.isEmbedVidElem(e.startContainer.nextSibling)?"#text"===e.startContainer.nodeName||n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset])||"VIDEO"!==e.startContainer.childNodes[e.startOffset].nodeName&&!this.isEmbedVidElem(e.startContainer.childNodes[e.startOffset])||this.deletedVid.push(e.startContainer.childNodes[e.startOffset]):this.deletedVid.push(e.startContainer.nextSibling)},e.prototype.alignmentSelect=function(e){var t=e.item;if(document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))&&"Videos"===t.command){var r=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),s=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(r);s="VIDEO"===s[0].nodeName?s:[this.videoEle];var a={args:e,selectNode:s};switch(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),t.subCommand){case"JustifyLeft":case"JustifyCenter":case"JustifyRight":this.alignVideo(a,t.subCommand);break;case"Inline":this.inline(a);break;case"Break":this.break(a)}this.quickToolObj&&document.body.contains(this.quickToolObj.videoQTBar.element)&&(this.quickToolObj.videoQTBar.hidePopup(),n.i(i.removeClass)([s[0]],o._51)),this.cancelResizeAction()}},e.prototype.deleteVideo=function(e,t){if("VIDEO"===e.selectNode[0].nodeName||this.isEmbedVidElem(e.selectNode[0])){this.isEmbedVidElem(e.selectNode[0])&&(e.selectNode[0]=e.selectNode[0].classList.contains(o.W)?e.selectNode[0]:e.selectNode[0].parentElement);var s={element:this.isEmbedVidElem(e.selectNode[0])?e.selectNode[0]:e.selectNode[0].querySelector("iframe"),src:this.isEmbedVidElem(e.selectNode[0])?e.selectNode[0].querySelector("iframe").getAttribute("src"):e.selectNode[0].querySelector("source").getAttribute("src")};0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),e.selection.restore(),this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.videoRemovePost(s.src),this.quickToolObj&&document.body.contains(this.quickToolObj.videoQTBar.element)&&this.quickToolObj.videoQTBar.hidePopup(),this.cancelResizeAction(),n.i(i.isNullOrUndefined)(t)&&this.parent.trigger(r._67,s)}},e.prototype.videoRemovePost=function(e){var t=this,r="";if(!n.i(i.isNullOrUndefined)(this.parent.insertVideoSettings.removeUrl)&&""!==this.parent.insertVideoSettings.removeUrl){r=e.indexOf("http://")>-1||e.indexOf("https://")>-1?e:new URL(e,document.baseURI).href,this.removingVideoName=r.replace(/^.*[\\\/]/,"");var o=new XMLHttpRequest;o.addEventListener("readystatechange",function(){4===this.readyState&&200===this.status&&t.triggerPost(this.response)}),o.open("GET",r),o.responseType="blob",o.send()}},e.prototype.triggerPost=function(e){var t=this.parent.insertVideoSettings.removeUrl;if(!n.i(i.isNullOrUndefined)(t)&&""!==t){var r=new File([e],this.removingVideoName),o=new i.Ajax(t,"POST",!0,null),s=new FormData;s.append("UploadFiles",r),o.send(s)}},e.prototype.onDocumentClick=function(e){var t=e.target;("VIDEO"===t.nodeName||this.isEmbedVidElem(t))&&(this.videoEle=this.isEmbedVidElem(t)?t.querySelector("iframe"):t),!n.i(i.isNullOrUndefined)(this.dialogObj)&&(!n.i(i.closest)(t,"[id='"+this.dialogObj.element.id+"']")&&this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()&&!this.parent.getToolbarElement().contains(e.target)||this.parent.getToolbarElement()&&this.parent.getToolbarElement().contains(e.target)&&!n.i(i.closest)(t,"#"+this.parent.getID()+"_toolbar_Video")&&!t.querySelector("#"+this.parent.getID()+"_toolbar_Video"))&&(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight||(this.dialogObj.hide({returnValue:!0}),this.parent.isBlur=!0,n.i(d.l)(this.parent.element,"focusout"))),this.contentModule.getEditPanel().querySelector(".e-vid-resize")&&("VIDEO"===t.tagName||this.isEmbedVidElem(t)||this.removeResizeEle(),"VIDEO"===t.tagName||this.isEmbedVidElem(t)||n.i(i.isNullOrUndefined)(this.videoEle)?n.i(i.isNullOrUndefined)(this.prevSelectedVidEle)||this.prevSelectedVidEle===("IFRAME"===t.tagName||"VIDEO"===t.tagName?t:t.querySelector("iframe"))||(this.prevSelectedVidEle.style.outline=""):this.videoEle.style.outline="")},e.prototype.removeResizeEle=function(){i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),n.i(i.detach)(this.contentModule.getEditPanel().querySelector(".e-vid-resize"))},e.prototype.onWindowResize=function(){n.i(i.isNullOrUndefined)(this.contentModule)||n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector(".e-vid-resize"))||this.cancelResizeAction()},e.prototype.break=function(e){if("VIDEO"===e.selectNode[0].nodeName||this.isEmbedVidElem(e.selectNode[0])){var t=e.args.item?e.args.item.subCommand:"Break";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.inline=function(e){if("VIDEO"===e.selectNode[0].nodeName||this.isEmbedVidElem(e.selectNode[0])){var t=e.args.item?e.args.item.subCommand:"Inline";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.alignVideo=function(e,t){var n=e.args.item?e.args.item.subCommand:t;this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:n})},e.prototype.editAreaClickHandler=function(e){if(this.parent.readonly)return void this.hideVideoQuickToolbar();var t=e.args,s=this.parent.quickToolbarSettings.showOnRightClick;if(2===t.which||s&&1===t.which||!s&&3===t.which)return void(!s||1!==t.which||n.i(i.isNullOrUndefined)(t.target)||"VIDEO"!==t.target.tagName&&!this.isEmbedVidElem(t.target)||(this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),t.target)));if("HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.videoQTBar){this.quickToolObj=this.parent.quickToolbarModule;var a=t.target;this.contentModule=this.rendererFactory.getRenderer(l.a.Content);var d=this.quickToolObj.videoQTBar.element.classList.contains("e-rte-pop");if(("VIDEO"===a.nodeName||this.isEmbedVidElem(a))&&this.parent.quickToolbarModule){if(d)return;this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),a),n.i(c.b)()&&this.parent.notify(r._18,e),n.i(i.addClass)([this.isEmbedVidElem(a)?a.querySelector("iframe"):a],o._51),this.showVideoQuickToolbar({args:t,type:"Videos",elements:[t.target]})}else this.hideVideoQuickToolbar()}},e.prototype.showVideoQuickToolbar=function(e){var t=this;if(!("Videos"!==e.type||!n.i(i.isNullOrUndefined)(e.args)&&2===e.args.detail||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule.videoQTBar)||n.i(i.isNullOrUndefined)(e.args))){this.quickToolObj=this.parent.quickToolbarModule;var r=e.args,s=e.elements;[].forEach.call(e.elements,function(e,t){0===t&&(s=e)}),("VIDEO"===s.tagName||this.isEmbedVidElem(s))&&n.i(i.addClass)([this.isEmbedVidElem(s)&&"IFRAME"!==s.tagName?s.querySelector("iframe"):s],[o._51]);var a=this.parent.iframeSettings.enable?window.pageYOffset+this.parent.element.getBoundingClientRect().top+r.clientY:r.pageY;this.parent.quickToolbarModule.videoQTBar&&(e.isNotify?setTimeout(function(){t.parent.formatter.editorManager.nodeSelection.Clear(t.contentModule.getDocument()),t.parent.formatter.editorManager.nodeSelection.setSelectionContents(t.contentModule.getDocument(),s),t.quickToolObj.videoQTBar.showPopup(r.pageX-50,a+s.getBoundingClientRect().height/2-s.offsetTop,s)},400):this.quickToolObj.videoQTBar.showPopup(r.pageX-50,a+s.getBoundingClientRect().height/2-s.offsetTop,s))}},e.prototype.hideVideoQuickToolbar=function(){n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector("."+o._51))||(n.i(i.removeClass)([this.contentModule.getEditPanel().querySelector("."+o._51)],o._51),n.i(i.isNullOrUndefined)(this.videoEle)||(this.videoEle.style.outline=""),n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector(".e-vid-resize"))||n.i(i.detach)(this.contentModule.getEditPanel().querySelector(".e-vid-resize")),this.quickToolObj&&this.quickToolObj.videoQTBar&&document.body.contains(this.quickToolObj.videoQTBar.element)&&this.quickToolObj.videoQTBar.hidePopup())},e.prototype.isEmbedVidElem=function(e){return!!(e&&3!==e.nodeType&&"BR"!==e.nodeName&&e.classList&&e.classList.contains(o.W)||e&&"IFRAME"===e.nodeName)},e.prototype.insertingVideo=function(e){if(this.insertVideo(e),!n.i(i.isNullOrUndefined)(this.dialogObj)){this.dialogObj.element.style.maxHeight="inherit";var t=this.dialogObj.element.querySelector(".e-video-content");n.i(i.isNullOrUndefined)(this.parent.insertVideoSettings.path)&&"HTML"!==this.parent.editorMode?t.querySelector(".e-video-url").focus():document.getElementById(this.rteID+"_insertVideo").focus()}},e.prototype.insertVideo=function(e){var t=this;if(this.dialogObj)return void this.dialogObj.hide({returnValue:!0});var r=this.parent.createElement("div",{className:"e-rte-video-dialog",id:this.rteID+"_video"});this.parent.element.appendChild(r);var s=this.i10n.getConstant("dialogInsert"),a=this.i10n.getConstant("dialogCancel"),l=this.i10n.getConstant("videoHeader"),d=e.selection,c={selfVideo:this,selection:e.selection,args:e.args,selectParent:e.selectParent},u={header:l,cssClass:o._12,enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:i.Browser.isDevice?"290px":"340px",isModal:i.Browser.isDevice,buttons:[{click:this.insertVideoUrl.bind(c),buttonModel:{content:s,cssClass:"e-flat e-insertVideo",isPrimary:!0,disabled:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel",content:a}}],target:i.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){t.isVideoUploaded&&t.uploadObj.removing(),t.parent.isBlur=!1,e&&e.event.returnValue&&"HTML"===t.parent.editorMode&&d.restore(),t.dialogObj.destroy(),n.i(i.detach)(t.dialogObj.element),t.dialogRenderObj.close(e),t.dialogObj=null}},h=this.parent.createElement("div",{className:"e-video-content"});n.i(i.isNullOrUndefined)(this.parent.insertVideoSettings.path)&&"HTML"!==this.parent.editorMode||h.appendChild(this.videoUpload(e));var p=this.parent.createElement("div",{className:"e-videoheader"}),m=this.parent.createElement("div",{className:"e-embed-videoheader"}),f=this.i10n.getConstant("videoLinkHeader"),g=this.i10n.getConstant("embedVideoLinkHeader");"HTML"===this.parent.editorMode&&(p.innerHTML=f,m.innerHTML=g),h.appendChild(this.urlPopup(e)),e.selectNode&&1===e.selectNode[0].nodeType&&("VIDEO"===e.selectNode[0].tagName||this.isEmbedVidElem(e.selectNode[0]))?(u.header=this.parent.localeObj.getConstant("editVideoHeader"),u.content=h):u.content=h,this.dialogObj=this.dialogRenderObj.render(u),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(r),e.selectNode&&1===e.selectNode[0].nodeType&&("VIDEO"===e.selectNode[0].tagName||this.isEmbedVidElem(e.selectNode[0]))&&"insertVideo"===e.name&&(this.dialogObj.element.querySelector(".e-insertVideo").textContent=this.parent.localeObj.getConstant("dialogUpdate")),r.style.maxHeight="inherit",this.quickToolObj&&(this.quickToolObj.videoQTBar&&document.body.contains(this.quickToolObj.videoQTBar.element)&&(this.quickToolObj.videoQTBar.hidePopup(),n.i(i.isNullOrUndefined)(e.selectParent)||n.i(i.removeClass)([e.selectParent[0]],o._51)),this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup(),this.quickToolObj.textQTBar&&this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)&&this.quickToolObj.textQTBar.hidePopup())},e.prototype.urlPopup=function(e){var t=this,r=this.parent.createElement("div",{className:"e-video-url-wrap"}),o=this.parent.createElement("div",{id:"urlcontent"}),s=this.i10n.getConstant("videoUrl"),l=n.i(d.m)('<input id="embedURL" type="radio"><input id="webURL" type="radio" >');return r.appendChild(l),r.appendChild(o),this.embedInputUrl=this.parent.createElement("textarea",{className:"e-input e-embed-video-url",attrs:{placeholder:this.i10n.getConstant("pasteEmbeddedCodeHere"),type:"text",tabindex:"-1","aria-label":this.i10n.getConstant("embedVideoLinkHeader")}}),this.embedInputUrl.addEventListener("keyup",function(){n.i(i.isNullOrUndefined)(t.embedInputUrl)||(0===t.embedInputUrl.value.length?t.dialogObj.getButtons(0).element.disabled=!0:t.dialogObj.getButtons(0).element.removeAttribute("disabled"))}),this.inputUrl=this.parent.createElement("input",{className:"e-input e-video-url",attrs:{placeholder:s,spellcheck:"false"}}),this.inputUrl.addEventListener("input",function(){n.i(i.isNullOrUndefined)(t.inputUrl)||(0===t.inputUrl.value.length?t.dialogObj.getButtons(0).element.disabled=!0:t.dialogObj.getButtons(0).element.removeAttribute("disabled"))}),new a.RadioButton({label:this.i10n.getConstant("embeddedCode"),checked:!0,name:"URL",created:function(){o.appendChild(t.embedInputUrl)},change:function(){o.innerHTML="",t.inputUrl.value="",o.appendChild(t.embedInputUrl)}}).appendTo(r.querySelector("#embedURL")),new a.RadioButton({label:this.i10n.getConstant("webUrl"),name:"URL",change:function(){o.innerHTML="",t.embedInputUrl.value="",o.appendChild(t.inputUrl)}}).appendTo(r.querySelector("#webURL")),r},e.prototype.videoUpload=function(e){var t,o,l=this,c=this,u=c.parent.iframeSettings.enable;if("HTML"===c.parent.editorMode&&(!u&&n.i(i.isNullOrUndefined)(n.i(i.closest)(e.selection.range.startContainer.parentNode,"[id='"+this.parent.contentModule.getPanel().id+"']"))||u&&!n.i(d.b)(e.selection.range.startContainer.parentNode.ownerDocument.querySelector("body"),"e-lib"))){this.contentModule.getEditPanel().focus();var h=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());t=this.parent.formatter.editorManager.nodeSelection.save(h,this.parent.contentModule.getDocument()),o=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(h)}else t=e.selection,o=e.selectParent;var p=this.parent.createElement("div",{className:"e-vid-uploadwrap e-droparea"}),m=this.i10n.getConstant("videoDeviceUploadMessage"),f=this.i10n.getConstant("videoUploadMessage"),g=this.parent.createElement("span",{className:"e-droptext"}),b=this.parent.createElement("span",{className:"e-rte-upload-text",innerHTML:i.Browser.isDevice?m:f});g.appendChild(b);var v=this.parent.createElement("button",{className:"e-browsebtn",id:this.rteID+"_insertVideo",attrs:{autofocus:"true",type:"button"}});g.appendChild(v),p.appendChild(g);var C=this.i10n.getConstant("browse"),y=new a.Button({content:C,enableRtl:this.parent.enableRtl});y.isStringTemplate=!0,y.createElement=this.parent.createElement,y.appendTo(v);var N=i.Browser.isDevice?g:v;i.EventHandler.add(N,"click",this.fileSelect,this);var S=this.parent.createElement("input",{id:this.rteID+"_upload",attrs:{type:"File",name:"UploadFiles"}});p.appendChild(S);var E,T,O;return this.uploadObj=new s.Uploader({asyncSettings:{saveUrl:this.parent.insertVideoSettings.saveUrl,removeUrl:this.parent.insertVideoSettings.removeUrl},dropArea:g,multiple:!1,enableRtl:this.parent.enableRtl,allowedExtensions:this.parent.insertVideoSettings.allowedTypes.toString(),selected:function(e){c.isVideoUploaded=!0,T=e,O=e.filesData,l.parent.trigger(r._61,T,function(e){if(!e.cancel&&(l.checkExtension(e.filesData[0]),E=e.filesData[0].name,"HTML"===l.parent.editorMode&&n.i(i.isNullOrUndefined)(l.parent.insertVideoSettings.path))){var r=new FileReader;r.addEventListener("load",function(e){var s="Base64"===l.parent.insertVideoSettings.saveFormat?r.result:URL.createObjectURL(n.i(d.v)(r.result));c.uploadUrl={url:s,selection:t,fileName:E,selectParent:o},c.inputUrl.setAttribute("disabled","true"),c.embedInputUrl.setAttribute("disabled","true"),n.i(i.isNullOrUndefined)(c.parent.insertVideoSettings.saveUrl)&&l.isAllowedTypes&&!n.i(i.isNullOrUndefined)(l.dialogObj)&&l.dialogObj.getButtons(0).element.removeAttribute("disabled")}),r.readAsDataURL(e.filesData[0].rawFile)}})},beforeUpload:function(e){l.parent.trigger(r._71,e)},uploading:function(e){l.parent.isServerRendered||l.parent.trigger(r._62,e)},success:function(e){l.parent.trigger(r._63,e,function(e){if(!n.i(i.isNullOrUndefined)(l.parent.insertVideoSettings.path)){var r=l.parent.insertVideoSettings.path+e.file.name;c.uploadUrl={url:r,selection:t,fileName:E,selectParent:o,width:{width:c.parent.insertVideoSettings.width,minWidth:c.parent.insertVideoSettings.minWidth,maxWidth:c.parent.getInsertImgMaxWidth()},height:{height:c.parent.insertVideoSettings.height,minHeight:c.parent.insertVideoSettings.minHeight,maxHeight:c.parent.insertVideoSettings.maxHeight}},c.embedInputUrl.setAttribute("disabled","true")}"upload"!==e.operation||n.i(i.isNullOrUndefined)(l.dialogObj)||l.dialogObj.getButtons(0).element.removeAttribute("disabled")})},failure:function(e){l.parent.trigger(r._64,e)},removing:function(){l.parent.trigger(r._65,e,function(e){c.isVideoUploaded=!1,l.dialogObj.getButtons(0).element.disabled=!0,c.embedInputUrl.removeAttribute("disabled"),c.uploadUrl&&(c.uploadUrl.url="")})}}),this.uploadObj.isStringTemplate=!0,this.uploadObj.createElement=this.parent.createElement,this.uploadObj.appendTo(S),p},e.prototype.checkExtension=function(e){this.uploadObj.allowedExtensions&&(-1===this.uploadObj.allowedExtensions.toLocaleLowerCase().indexOf(("."+e.type).toLocaleLowerCase())?(this.dialogObj.getButtons(0).element.setAttribute("disabled","disabled"),this.isAllowedTypes=!1):this.isAllowedTypes=!0)},e.prototype.fileSelect=function(){return this.dialogObj.element.getElementsByClassName("e-file-select-wrap")[0].querySelector("button").click(),!1},e.prototype.cancelDialog=function(e){this.parent.isBlur=!1,this.dialogObj.hide({returnValue:!0}),this.isVideoUploaded&&this.uploadObj.removing()},e.prototype.insertVideoUrl=function(e){var t=this.selfVideo;t.isVideoUploaded=!1;var r=t.inputUrl.value,s=t.embedInputUrl.value;if(0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData(),n.i(i.isNullOrUndefined)(t.uploadUrl)||""===t.uploadUrl.url){if("HTML"===t.parent.editorMode&&(""!==r||""!==s)){if("HTML"===t.parent.editorMode&&n.i(i.isNullOrUndefined)(n.i(i.closest)(this.selection.range.startContainer.parentNode,"[id='"+t.contentModule.getPanel().id+"']"))){t.contentModule.getEditPanel().focus();var a=t.parent.formatter.editorManager.nodeSelection.getRange(t.contentModule.getDocument());this.selection=t.parent.formatter.editorManager.nodeSelection.save(a,t.contentModule.getDocument()),this.selectParent=t.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(a)}var l=""!==r?r.split("/")[r.split("/").length-1]:s,d={cssClass:"Inline"===t.parent.insertVideoSettings.layoutOption?o._5:o.Z,url:r,selection:this.selection,fileName:l,isEmbedUrl:""!==s,selectParent:this.selectParent,width:{width:t.parent.insertVideoSettings.width,minWidth:t.parent.insertVideoSettings.minWidth,maxWidth:t.parent.getInsertImgMaxWidth()},height:{height:t.parent.insertVideoSettings.height,minHeight:t.parent.insertVideoSettings.minHeight,maxHeight:t.parent.insertVideoSettings.maxHeight}};t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,d),t.dialogObj.hide({returnValue:!1})}}else t.uploadUrl.cssClass="Inline"===t.parent.insertVideoSettings.layoutOption?o._5:o.Z,t.dialogObj.hide({returnValue:!1}),t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,t.uploadUrl),t.uploadUrl.url=""},e.prototype.destroy=function(){this.prevSelectedVidEle=void 0,this.removeEventListener()},e.prototype.getModuleName=function(){return"video"},e}()},function(e,t,n){"use strict";var i=n(32);n.d(t,"a",function(){return i.a});var r=n(31);n.d(t,"b",function(){return r.a})},function(e,t){e.exports=s}])});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionFilemanager"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionNavigations"),require("SyncfusionSplitbuttons")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionPopups","SyncfusionFilemanager","SyncfusionInputs","SyncfusionButtons","SyncfusionNavigations","SyncfusionSplitbuttons"],t):"object"==typeof exports?exports.SyncfusionRichtexteditor=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionFilemanager"),require("SyncfusionInputs"),require("SyncfusionButtons"),require("SyncfusionNavigations"),require("SyncfusionSplitbuttons")):e.SyncfusionRichtexteditor=t(e.SyncfusionBase,e.SyncfusionPopups,e.SyncfusionFilemanager,e.SyncfusionInputs,e.SyncfusionButtons,e.SyncfusionNavigations,e.SyncfusionSplitbuttons)}(this,function(e,t,n,i,r,o,s){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=88)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return a}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"j",function(){return h}),n.d(t,"k",function(){return p}),n.d(t,"l",function(){return m}),n.d(t,"m",function(){return f}),n.d(t,"n",function(){return g}),n.d(t,"o",function(){return b}),n.d(t,"p",function(){return v}),n.d(t,"q",function(){return C}),n.d(t,"r",function(){return y}),n.d(t,"s",function(){return N}),n.d(t,"t",function(){return E}),n.d(t,"u",function(){return S}),n.d(t,"v",function(){return T}),n.d(t,"w",function(){return O}),n.d(t,"x",function(){return k}),n.d(t,"y",function(){return w}),n.d(t,"z",function(){return L}),n.d(t,"A",function(){return _}),n.d(t,"B",function(){return x}),n.d(t,"C",function(){return D}),n.d(t,"D",function(){return M}),n.d(t,"E",function(){return R}),n.d(t,"F",function(){return B}),n.d(t,"G",function(){return A}),n.d(t,"H",function(){return I}),n.d(t,"I",function(){return P}),n.d(t,"J",function(){return U}),n.d(t,"K",function(){return H}),n.d(t,"L",function(){return j}),n.d(t,"M",function(){return F}),n.d(t,"N",function(){return q}),n.d(t,"O",function(){return z}),n.d(t,"P",function(){return V}),n.d(t,"Q",function(){return Q}),n.d(t,"R",function(){return W}),n.d(t,"S",function(){return K}),n.d(t,"T",function(){return G}),n.d(t,"U",function(){return X}),n.d(t,"V",function(){return Y}),n.d(t,"W",function(){return J}),n.d(t,"X",function(){return $}),n.d(t,"Y",function(){return Z}),n.d(t,"Z",function(){return ee}),n.d(t,"_0",function(){return te}),n.d(t,"_1",function(){return ne}),n.d(t,"_2",function(){return ie}),n.d(t,"_3",function(){return re}),n.d(t,"_4",function(){return oe}),n.d(t,"_5",function(){return se}),n.d(t,"_6",function(){return ae}),n.d(t,"_7",function(){return le}),n.d(t,"_8",function(){return de}),n.d(t,"_9",function(){return ce}),n.d(t,"_10",function(){return ue}),n.d(t,"_11",function(){return he}),n.d(t,"_12",function(){return pe}),n.d(t,"_13",function(){return me}),n.d(t,"_14",function(){return fe}),n.d(t,"_15",function(){return ge}),n.d(t,"_16",function(){return be}),n.d(t,"_17",function(){return ve}),n.d(t,"_18",function(){return Ce}),n.d(t,"_19",function(){return ye}),n.d(t,"_20",function(){return Ne}),n.d(t,"_21",function(){return Ee}),n.d(t,"_22",function(){return Se}),n.d(t,"_23",function(){return Te}),n.d(t,"_24",function(){return Oe}),n.d(t,"_25",function(){return ke}),n.d(t,"_26",function(){return we}),n.d(t,"_27",function(){return Le}),n.d(t,"_28",function(){return _e}),n.d(t,"_29",function(){return xe}),n.d(t,"_30",function(){return De}),n.d(t,"_31",function(){return Me}),n.d(t,"_32",function(){return Re}),n.d(t,"_33",function(){return Be}),n.d(t,"_34",function(){return Ae}),n.d(t,"_35",function(){return Ie}),n.d(t,"_36",function(){return Pe}),n.d(t,"_37",function(){return Ue}),n.d(t,"_38",function(){return He}),n.d(t,"_39",function(){return je}),n.d(t,"_40",function(){return Fe}),n.d(t,"_41",function(){return qe}),n.d(t,"_42",function(){return ze}),n.d(t,"_43",function(){return Ve}),n.d(t,"_44",function(){return Qe}),n.d(t,"_45",function(){return We}),n.d(t,"_46",function(){return Ke}),n.d(t,"_47",function(){return Ge}),n.d(t,"_48",function(){return Xe}),n.d(t,"_49",function(){return Ye}),n.d(t,"_50",function(){return Je}),n.d(t,"_51",function(){return $e}),n.d(t,"_52",function(){return Ze}),n.d(t,"_53",function(){return et}),n.d(t,"_54",function(){return tt}),n.d(t,"_55",function(){return nt}),n.d(t,"_56",function(){return it}),n.d(t,"_57",function(){return rt}),n.d(t,"_58",function(){return ot}),n.d(t,"_59",function(){return st}),n.d(t,"_60",function(){return at}),n.d(t,"_61",function(){return lt}),n.d(t,"_62",function(){return dt}),n.d(t,"_63",function(){return ct}),n.d(t,"_64",function(){return ut}),n.d(t,"_65",function(){return ht}),n.d(t,"_66",function(){return pt}),n.d(t,"_67",function(){return mt}),n.d(t,"_68",function(){return ft}),n.d(t,"_69",function(){return gt}),n.d(t,"_70",function(){return bt}),n.d(t,"_71",function(){return vt}),n.d(t,"_72",function(){return Ct}),n.d(t,"_73",function(){return yt}),n.d(t,"_74",function(){return Nt}),n.d(t,"_75",function(){return Et}),n.d(t,"_76",function(){return St}),n.d(t,"_77",function(){return Tt}),n.d(t,"_78",function(){return Ot}),n.d(t,"_79",function(){return kt}),n.d(t,"_80",function(){return wt}),n.d(t,"_81",function(){return Lt}),n.d(t,"_82",function(){return _t}),n.d(t,"_83",function(){return xt}),n.d(t,"_84",function(){return Dt}),n.d(t,"_85",function(){return Mt}),n.d(t,"_86",function(){return Rt}),n.d(t,"_87",function(){return Bt}),n.d(t,"_88",function(){return At}),n.d(t,"_89",function(){return It}),n.d(t,"_90",function(){return Pt}),n.d(t,"_91",function(){return Ut}),n.d(t,"_92",function(){return Ht}),n.d(t,"_93",function(){return jt}),n.d(t,"_94",function(){return Ft}),n.d(t,"_95",function(){return qt}),n.d(t,"_96",function(){return zt}),n.d(t,"_97",function(){return Vt});var i="create",r="destroy",o="tableclass",s="load",a="initial-load",l="content-changed",d="initial-end",c="iframe-click",u="destroy",h="toolbarClick",p="toolbar-refresh",m="refresh-begin",f="toolbar-updated",g="bind-on-end",b="render-color-picker",v="html-toolbar-click",C="markdown-toolbar-click",y="destroy-color-picker",N="model-changed",E="tableModulekeyUp",S="keyUp",T="keyDown",O="mouseUp",k="toolbarCreated",w="toolbarRenderComplete",L="enableFullScreen",_="disableFullScreen",x="dropDownSelect",D="beforeDropDownItemRender",M="execCommandCallBack",R="image-toolbar-action",B="audio-toolbar-action",A="video-toolbar-action",I="link-toolbar-action",P="resize",U="resizeStart",H="resizing",j="resizeStop",F="undo",q="redo",z="insertLink",V="unLink",Q="editLink",W="openLink",K="actionBegin",G="actionComplete",X="updatedToolbarStatus",Y="actionSuccess",J="updateToolbarItem",$="insertImage",Z="insertAudio",ee="insertVideo",te="insertCompleted",ne="justifyLeft",ie="justifyRight",re="justifyCenter",oe="break",se="inline",ae="insertImgLink",le="imgAltText",de="delete",ce="delete",ue="delete",he="caption",pe="imageSize",me="videoSize",fe="sourceCode",ge="updateSource",be="toolbarOpen",ve="beforeDropDownOpen",Ce="selection-save",ye="selection-restore",Ne="expandPopupClick",Ee="count",Se="contentFocus",Te="contentBlur",Oe="mouseDown",ke="sourceCodeMouseDown",we="editAreaClick",Le="scroll",_e="contentscroll",xe="colorPickerChanged",De="tableColorPickerChanged",Me="focusChange",Re="selectAll",Be="selectRange",Ae="getSelectedHtml",Ie="renderInlineToolbar",Pe="paste-content",Ue="imageModule",He="rtl-mode",je="createTable",Fe="docClick",qe="table-toolbar-action",ze="checkUndoStack",Ve="readOnlyMode",Qe="moduleDestroy",We="pasteClean",Ke="enterHandler",Ge="beforeDialogOpen",Xe="clearDialogObj",Ye="dialogOpen",Je="beforeDialogClose",$e="dialogClose",Ze="beforeQuickToolbarOpen",et="quickToolbarOpen",tt="quickToolbarClose",nt="popupHide",it="imageSelected",rt="imageUploading",ot="imageUploadSuccess",st="imageUploadFailed",at="imageRemoving",lt="fileSelected",dt="fileUploading",ct="fileUploadSuccess",ut="fileUploadFailed",ht="fileRemoving",pt="afterImageDelete",mt="afterMediaDelete",ft="drop",gt="xhtmlValidation",bt="beforeImageUpload",vt="beforeFileUpload",Ct="resizeInitialized",yt="renderFileManager",Nt="beforeImageDrop",Et="dynamicModule",St="beforePasteCleanup",Tt="afterPasteCleanup",Ot="updateTbItemsStatus",kt="showLinkDialog",wt="closeLinkDialog",Lt="showImageDialog",_t="showAudioDialog",xt="showVideoDialog",Dt="closeImageDialog",Mt="closeAudioDialog",Rt="closeVideoDialog",Bt="showTableDialog",At="closeTableDialog",It="closeTableDialog",Pt="formatPainterClick",Ut="formatPainterDoubleClick",Ht="emojiPicker",jt="destroyTooltip",Ft="hidePopup",qt="cleanupResizeElements",zt="address:empty, article:empty, aside:empty, blockquote:empty,\n details:empty, dd:empty, div:empty, dl:empty, dt:empty, fieldset:empty, footer:empty,form:empty, h1:empty,\n h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty, li:empty, main:empty, nav:empty,\n noscript:empty, output:empty, p:empty, pre:empty, section:empty, td:empty, th:empty",Vt="a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,\ncanvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,\nins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,\nq:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,\ntemplate:empty, textarea:empty, time:empty, u:empty, tt:empty, var:empty, wbr:empty"},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return a}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"j",function(){return h}),n.d(t,"k",function(){return p}),n.d(t,"l",function(){return m}),n.d(t,"m",function(){return f}),n.d(t,"n",function(){return g}),n.d(t,"o",function(){return b}),n.d(t,"p",function(){return v}),n.d(t,"q",function(){return C}),n.d(t,"r",function(){return y}),n.d(t,"s",function(){return N}),n.d(t,"t",function(){return E}),n.d(t,"u",function(){return S}),n.d(t,"v",function(){return T}),n.d(t,"w",function(){return O}),n.d(t,"x",function(){return k}),n.d(t,"y",function(){return w}),n.d(t,"z",function(){return L}),n.d(t,"A",function(){return _}),n.d(t,"B",function(){return x}),n.d(t,"C",function(){return D}),n.d(t,"D",function(){return M}),n.d(t,"E",function(){return R}),n.d(t,"F",function(){return B}),n.d(t,"G",function(){return A}),n.d(t,"H",function(){return I}),n.d(t,"I",function(){return P}),n.d(t,"J",function(){return U}),n.d(t,"K",function(){return H}),n.d(t,"L",function(){return j}),n.d(t,"M",function(){return F}),n.d(t,"N",function(){return q}),n.d(t,"O",function(){return z}),n.d(t,"P",function(){return V}),n.d(t,"Q",function(){return Q}),n.d(t,"R",function(){return W}),n.d(t,"S",function(){return K}),n.d(t,"T",function(){return G}),n.d(t,"U",function(){return X}),n.d(t,"V",function(){return Y}),n.d(t,"W",function(){return J}),n.d(t,"X",function(){return $}),n.d(t,"Y",function(){return Z}),n.d(t,"Z",function(){return ee}),n.d(t,"_0",function(){return te}),n.d(t,"_1",function(){return ne}),n.d(t,"_2",function(){return ie}),n.d(t,"_3",function(){return re}),n.d(t,"_4",function(){return oe}),n.d(t,"_5",function(){return se}),n.d(t,"_6",function(){return ae}),n.d(t,"_7",function(){return le}),n.d(t,"_8",function(){return de}),n.d(t,"_9",function(){return ce}),n.d(t,"_10",function(){return ue}),n.d(t,"_11",function(){return he}),n.d(t,"_12",function(){return pe}),n.d(t,"_13",function(){return me}),n.d(t,"_14",function(){return fe}),n.d(t,"_15",function(){return ge}),n.d(t,"_16",function(){return be}),n.d(t,"_17",function(){return ve}),n.d(t,"_18",function(){return Ce}),n.d(t,"_19",function(){return ye}),n.d(t,"_20",function(){return Ne}),n.d(t,"_21",function(){return Ee}),n.d(t,"_22",function(){return Se}),n.d(t,"_23",function(){return Te}),n.d(t,"_24",function(){return Oe}),n.d(t,"_25",function(){return ke}),n.d(t,"_26",function(){return we}),n.d(t,"_27",function(){return Le}),n.d(t,"_28",function(){return _e}),n.d(t,"_29",function(){return xe}),n.d(t,"_30",function(){return De}),n.d(t,"_31",function(){return Me}),n.d(t,"_32",function(){return Re}),n.d(t,"_33",function(){return Be}),n.d(t,"_34",function(){return Ae}),n.d(t,"_35",function(){return Ie}),n.d(t,"_36",function(){return Pe}),n.d(t,"_37",function(){return Ue}),n.d(t,"_38",function(){return He}),n.d(t,"_39",function(){return je}),n.d(t,"_40",function(){return Fe}),n.d(t,"_41",function(){return qe}),n.d(t,"_42",function(){return ze}),n.d(t,"_43",function(){return Ve}),n.d(t,"_44",function(){return Qe}),n.d(t,"_45",function(){return We}),n.d(t,"_46",function(){return Ke}),n.d(t,"_47",function(){return Ge}),n.d(t,"_48",function(){return Xe}),n.d(t,"_49",function(){return Ye}),n.d(t,"_50",function(){return Je}),n.d(t,"_51",function(){return $e}),n.d(t,"_52",function(){return Ze}),n.d(t,"_53",function(){return et}),n.d(t,"_54",function(){return tt}),n.d(t,"_55",function(){return nt}),n.d(t,"_56",function(){return it}),n.d(t,"_57",function(){return rt}),n.d(t,"_58",function(){return ot}),n.d(t,"_59",function(){return st}),n.d(t,"_60",function(){return at}),n.d(t,"_61",function(){return lt}),n.d(t,"_62",function(){return dt}),n.d(t,"_63",function(){return ct}),n.d(t,"_64",function(){return ut}),n.d(t,"_65",function(){return ht}),n.d(t,"_66",function(){return pt}),n.d(t,"_67",function(){return mt}),n.d(t,"_68",function(){return ft}),n.d(t,"_69",function(){return gt});var i="e-richtexteditor",r="e-rtl",o="e-content",s="e-disabled",a="rte-iframe-script-sheet",l="rte-iframe-style-sheet",d="e-rte-toolbar",c="e-rte-tb-fixed",u="e-rte-tb-float",h="e-rte-tb-abs-float",p="e-rte-inline",m="e-rte-tb-inline",f="e-rte-tb-expand",g="e-rte-full-screen",b="e-rte-quick-toolbar",v="e-rte-text-quicktoolbar",C="e-rte-pop",y="e-tb-static",N="e-rte-quick-popup",E="e-quick-dropdown",S="e-rte-image-popup",T="e-rte-text-popup",O="e-rte-inline-popup",k="e-rte-inline-dropdown",w="e-rte-dropdown-popup",L="e-rte-dropdown-icons",_="e-rte-dropdown-items",x="e-rte-dropdown-btn",D="e-rte-content",M="e-toolbar-item",R="e-toolbar-extended",B="e-toolbar-wrapper",A="e-popup",I="e-separator",P="e-minimize",U="e-maximize",H="e-back",j="e-show",F="e-hide",q="e-visible",z="e-focused",V="e-remove-white-space",Q="e-imgright",W="e-imgleft",K="e-imgcenter",G="e-imgbreak",X="e-audio-break",Y="e-clickelem",J="e-video-clickelem",$="e-audio-wrap",Z="e-video-wrap",ee="e-video-break",te="e-img-caption",ne="e-rte-img-caption",ie="e-caption-inline",re="e-imginline",oe="e-audio-inline",se="e-video-inline",ae="e-rte-character-count",le="e-warning",de="e-error",ce="e-icons",ue="e-active",he="e-expand-open",pe="e-rte-elements",me="e-tbar-btn",fe="e-rte-horizontal-separator",ge="e-tbar-ios-fixed",be="e-rte-list-primary-content",ve="e-rte-numberformatlist-dropdown",Ce="e-rte-bulletformatlist-dropdown",ye="e-formats-tbar-btn",Ne="e-font-name-tbar-btn",Ee="e-font-size-tbar-btn",Se="e-alignment-tbar-btn",Te="e-rte-fontcolor-element",Oe="e-rte-backgroundcolor-element",ke="e-rte-color-content",we="e-rte-fontcolor-dropdown",Le="e-rte-backgroundcolor-dropdown",_e="e-rte-square-palette",xe="e-rte-fontcolor-colorpicker",De="e-rte-backgroundcolor-colorpicker",Me="e-rte-readonly",Re="e-cell-select",Be="e-dashed-border",Ae="e-alternate-border",Ie="e-column-resize",Pe="e-row-resize",Ue="e-table-box",He="e-rte-hidden",je="e-rte-keepformat",Fe="e-rte-removeformat",qe="e-rte-plainformat",ze="e-rte-pasteok",Ve="e-rte-pastecancel",Qe="e-rte-dialog-minheight",We="e-resize-handle",Ke="e-south-east",Ge="e-rte-image",Xe="e-resize",Ye="e-img-focus",Je="e-audio-focus",$e="e-video-focus",Ze="e-rte-drag-image",et="e-rte-upload-popup",tt="e-popup-open",nt="e-img-resize",it="e-droparea",rt="e-img-inner",ot="e-upload-files",st="e-rte-dialog-upload",at="e-rte-resize",lt="e-custom-tile",dt="e-nocolor-item",ct="e-rte-table",ut="e-rte-table-border",ht="e-rte-table-resize",pt="e-rte-fixed-tb-expand",mt="e-rte-toolbar-enabled",ft="e-south-west",gt="e-rte-srctextarea"},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return a}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"j",function(){return h}),n.d(t,"k",function(){return p}),n.d(t,"l",function(){return m}),n.d(t,"m",function(){return f}),n.d(t,"n",function(){return g}),n.d(t,"o",function(){return b});var i="keydown",r="action",o="format-type",s="keydown-handler",a="list-type",l="keyup-handler",d="keyup",c="model_changed_plugin",u="model_changed",h="ms_word_cleanup_plugin",p="ms_word_cleanup",m="onBegin",f="actionBegin",g="format_painter_actions",b="emoji_picker_actions"},function(e,t,n){"use strict";function i(e,t){var n=-1;return t.some(function(t,i){return"string"==typeof t&&e===t.toLocaleLowerCase()&&(n=i,!0)}),n}function r(e,t){var n=!1;return e.classList.contains(t)&&(n=!0),n}function o(e,t,i,r){for(var o,s,a=0;a<e.length;a++){if("value"===i&&e[a].value.toLocaleLowerCase()===t.toLocaleLowerCase()){o=e[a];break}if("text"===i&&e[a].text.toLocaleLowerCase()===t.toLocaleLowerCase()){o=e[a];break}if("subCommand"===i&&e[a].subCommand.toLocaleLowerCase()===t.toLocaleLowerCase()){o=e[a];break}}if(!n.i(w.isNullOrUndefined)(o))switch(r){case"text":s=o.text;break;case"value":s=o.value;break;case"iconCss":s=o.iconCss}return s}function s(){var e=!1;return w.Browser.isDevice&&w.Browser.isIos&&(e=!0),e}function a(e){return n.i(w.isNullOrUndefined)(e)?"":e}function l(e,t,n){return n?window.pageYOffset+t.getBoundingClientRect().top+e.clientY:e.pageY}function d(e,t){var n=t.getService("rteLocale"),i=D.a[""+e];return n.getConstant(i)}function c(e,t,r){k(r);for(var s=e.dropDownModule,l=e.args,d=Object.keys(e.args),c=0,u=d;c<u.length;c++)for(var h=u[c],p=0;p<e.tbItems.length;p++){var m=e.tbItems[p].subCommand,f=m&&m.toLocaleLowerCase();if(m&&f===h||"UL"===m&&"unorderedlist"===h||"OL"===m&&"orderedlist"===h||"pre"===f&&"insertcode"===h||"NumberFormatList"===m&&"numberFormatList"===h||"BulletFormatList"===m&&"bulletFormatList"===h)if("boolean"==typeof l[""+h])!0===l[""+h]?n.i(w.addClass)([e.tbElements[p]],[L._10]):n.i(w.removeClass)([e.tbElements[p]],[L._10]);else if(("string"==typeof l[""+h]||null===l[""+h])&&i(h,e.parent.toolbarSettings.items)>=-1){var g=l[""+h]?l[""+h]:"",b="";switch(h){case"formats":if(n.i(w.isNullOrUndefined)(s.formatDropDown)||t||!n.i(w.isNullOrUndefined)(s.formatDropDown)&&s.formatDropDown.isDestroyed)break;var v=e.parent.format.types,C=n.i(w.isNullOrUndefined)(e.parent.format.default)?v[0].text:e.parent.format.default;b="empty"===g?"":o(v,g,"subCommand","text"),s.formatDropDown.content='<span style="display: inline-flex;width:'+e.parent.format.width+'" ><span class="e-rte-dropdown-btn-text'+(n.i(w.isNullOrUndefined)(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+(n.i(w.isNullOrUndefined)(b)?C:b)+"</span></span>",s.formatDropDown.dataBind();break;case"alignments":if(n.i(w.isNullOrUndefined)(s.alignDropDown)||!n.i(w.isNullOrUndefined)(s.alignDropDown)&&s.alignDropDown.isDestroyed)break;var y=x.a;b=o(y,g,"subCommand","iconCss"),s.alignDropDown.iconCss=n.i(w.isNullOrUndefined)(b)?"e-icons e-justify-left":b,s.alignDropDown.dataBind();break;case"fontname":if(n.i(w.isNullOrUndefined)(s.fontNameDropDown)||t||!n.i(w.isNullOrUndefined)(s.fontNameDropDown)&&s.fontNameDropDown.isDestroyed)break;var N=e.parent.fontFamily.items;b="empty"===g?"":o(N,g,"value","text");var E=n.i(w.isNullOrUndefined)(e.parent.fontFamily.default)?N[0].text:e.parent.fontFamily.default,S=n.i(w.isNullOrUndefined)(b)?E:b;s.fontNameDropDown.content='<span style="display: inline-flex;width:'+e.parent.fontFamily.width+'" ><span class="e-rte-dropdown-btn-text'+(n.i(w.isNullOrUndefined)(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+S+"</span></span>",s.fontNameDropDown.dataBind();break;case"fontsize":if(n.i(w.isNullOrUndefined)(s.fontSizeDropDown)||!n.i(w.isNullOrUndefined)(s.fontSizeDropDown)&&s.fontSizeDropDown.isDestroyed)break;var T=e.parent.fontSize.items,O=n.i(w.isNullOrUndefined)(e.parent.fontSize.default)?T[1].text:e.parent.fontSize.default;b="empty"===g?"":o(T,""===g?O.replace(/\s/g,""):g,"value","text"),s.fontSizeDropDown.content='<span style="display: inline-flex;width:'+e.parent.fontSize.width+'" ><span class="e-rte-dropdown-btn-text'+(n.i(w.isNullOrUndefined)(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+a(b)+"</span></span>",s.fontSizeDropDown.dataBind();break;case"bulletFormatList":case"numberFormatList":n.i(w.removeClass)([e.tbElements[p]],[L._10])}}}}function u(e){return"object"==typeof e?e:[e]}function h(e,t){for(var n=[],i=0;i<e.length;i++)for(var r=0;r<t.length;r++)if("Separator"!==t[r].type){if(("OrderedList"===e[i]||"NumberFormatList"===e[i])&&"OL"===t[r].subCommand){n.push(r);break}if(("UnorderedList"===e[i]||"BulletFormatList"===e[i])&&"UL"===t[r].subCommand){n.push(r);break}if("InsertCode"===e[i]&&"Pre"===t[r].subCommand){n.push(r);break}if("FileManager"===e[i]&&"File"===t[r].subCommand){n.push(r);break}if("object"==typeof e[i]&&"Custom"===e[i].command){n.push(i);break}if(e[i]===t[r].subCommand){n.push(r);break}}return n}function p(e,t){for(var i=0,r=h(u(M),e.toolbarObj.items),o=n.i(w.selectAll)("."+L.D,e.toolbarObj.element),s=Object.keys(t),a=0,l=s;a<l.length;a++){var d=l[a],c=o[r[i]];c&&e.toolbarObj.enableItems(c,t[""+d]),i++}}function m(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!1,!0),e.dispatchEvent(n)}function f(e){var t=n.i(w.createElement)("template");return t.innerHTML=e,t.content instanceof DocumentFragment?t.content:document.createRange().createContextualFragment(e)}function g(e,t){var n=[];for(t=t.firstChild;t;t=t.nextSibling)3===t.nodeType?n.push(t):n=n.concat(g(e,t));return n}function b(e){for(var t={},n=Object.keys(e),i=0;i<Object.keys(e).length;i++)t[n[i].toLocaleLowerCase()]=e[n[i]];return t}function v(e,t){var n;return null!==e&&""!==e?(n=t.enableHtmlEncode?C(E(e),t):C(e,t),t.setProperties({value:n},!0)):n="DIV"===t.enterKey?t.enableHtmlEncode?"<div><br/></div>":"<div><br/></div>":"BR"===t.enterKey?t.enableHtmlEncode?"<br/>":"<br/>":t.enableHtmlEncode?"<p><br/></p>":"<p><br/></p>",n}function C(e,t){var i=document.createElement("div"),r=document.createElement("div"),o=i.childNodes;if(i.innerHTML=e,i.setAttribute("class","tempDiv"),o.length>0){for(var s=void 0,a=void 0,l=void 0;i.firstChild;){for(var d=i.querySelectorAll(_._96),c=0;c<d.length;c++)d[c].innerHTML="<br>";for(var u=i.querySelectorAll("p"),c=0;c<u.length;c++)0===u[c].textContent.trim().length&&1===u[c].childNodes.length&&"#text"===u[c].childNodes[0].nodeName&&n.i(w.isNullOrUndefined)(u[c].childNodes[0].textContent.match(/\u00a0/g))&&(u[c].innerHTML="<br>");for(var h=i.querySelectorAll(_._97),c=0;c<h.length;c++)h[c].innerHTML="​";"BR"!==t.enterKey&&("#text"===i.firstChild.nodeName&&(i.firstChild.textContent.indexOf("\n")<0||""!==i.firstChild.textContent.trim())||R.indexOf(i.firstChild.nodeName.toLocaleLowerCase())>=0)?(s?a.appendChild(i.firstChild):(l="DIV"===t.enterKey?n.i(w.createElement)("div"):n.i(w.createElement)("p"),r.appendChild(l),l.appendChild(i.firstChild)),a=l,s=!0):"#text"===i.firstChild.nodeName&&("\n"===i.firstChild.textContent||i.firstChild.textContent.indexOf("\n")>=0&&""===i.firstChild.textContent.trim())?n.i(w.detach)(i.firstChild):(r.appendChild(i.firstChild),s=!1)}for(var p=r.querySelectorAll("img"),c=0;c<p.length;c++)p[c].classList.contains(L._47)||p[c].classList.add(L._47),p[c].classList.contains(L._3)||p[c].classList.contains(L.T)||p[c].classList.add(L._3)}return r.innerHTML}function y(e){return"DIV"===e.enterKey?e.enableHtmlEncode?"<div><br/></div>":"<div><br/></div>":"BR"===e.enterKey?e.enableHtmlEncode?"<br/>":"<br/>":e.enableHtmlEncode?"<p><br/></p>":"<p><br/></p>"}function N(e){return"<p><br></p>"===e||"<p><br></p>"===e||"<div><br></div>"===e||"<div><br></div>"===e||"<br>"===e||"<br>"===e||""===e}function E(e){return e.replace(/&/g,"&").replace(/&lt;/g,"<").replace(/</g,"<").replace(/&gt;/g,">").replace(/>/g,">").replace(/ /g," ").replace(/&nbsp;/g," ").replace(/"/g,"")}function S(e,t){if(t.enableHtmlSanitizer){var i=w.SanitizeHtmlHelper.beforeSanitize();i.selectors.tags[2]&&i.selectors.tags[2].indexOf("iframe")>-1&&(i.selectors.tags[2]="iframe:not(.e-rte-embed-url)");var r={cancel:!1,helper:null};n.i(w.extend)(i,i,r),t.trigger("beforeSanitizeHtml",i),i.cancel&&!n.i(w.isNullOrUndefined)(i.helper)?e=i.helper(e):i.cancel||(e=w.SanitizeHtmlHelper.serializeValue(i,e))}return e}function T(e){for(var t=e.split(","),n=t[0].match(/:(.*?);/)[1],i=atob(t[1]),r=i.length,o=new Uint8Array(r);r--;)o[r]=i.charCodeAt(r);return new Blob([o],{type:n})}function O(e,t,n){for(var i=0;t.length>i;i++)if(t[i].value===n.value||t[i].value===n.subCommand)return e.localeObj.getConstant(t[i].locale);return n.text}function k(e){x.b.forEach(function(t,n){x.b[n].text=O(e,D.b,x.b[n])}),x.c.forEach(function(t,n){x.c[n].text=O(e,D.c,x.c[n])}),x.d.forEach(function(t,n){x.d[n].text=O(e,D.d,x.d[n])}),x.e.forEach(function(t,n){x.e[n].text=O(e,D.e,x.e[n])})}t.a=i,t.b=r,t.c=o,t.d=s,t.e=a,t.f=l,t.g=d,t.h=c,t.i=u,t.j=h,t.k=p,t.l=m,t.m=f,t.n=g,t.o=b,t.p=v,t.q=C,t.r=y,t.s=N,t.t=E,t.u=S,t.v=T,t.w=O,t.x=k;var w=n(0),L=(n.n(w),n(2)),_=n(1),x=n(17),D=n(73),M=["Undo","Redo"],R=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","strike","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o});var i;!function(e){e[e.Toolbar=0]="Toolbar",e[e.Content=1]="Content",e[e.Popup=2]="Popup",e[e.LinkToolbar=3]="LinkToolbar",e[e.TextToolbar=4]="TextToolbar",e[e.ImageToolbar=5]="ImageToolbar",e[e.AudioToolbar=6]="AudioToolbar",e[e.VideoToolbar=7]="VideoToolbar",e[e.InlineToolbar=8]="InlineToolbar",e[e.TableToolbar=9]="TableToolbar"}(i||(i={}));var r;!function(e){e.Expand="Expand",e.MultiRow="MultiRow",e.Scrollable="Scrollable"}(r||(r={}));var o;!function(e){e.InsertLink="InsertLink",e.InsertImage="InsertImage",e.InsertAudio="InsertAudio",e.InsertVideo="InsertVideo",e.InsertTable="InsertTable"}(o||(o={}))},function(e,t,n){"use strict";function i(){var e=!1;return d.Browser.isDevice&&d.Browser.isIos&&(e=!0),e}function r(e,t){if("BODY"===e.nodeName&&!n.i(d.isNullOrUndefined)(t)){var i=top.window.document.querySelector(t);n.i(d.isNullOrUndefined)(i)||i.contentWindow.focus()}}function o(e,t){var i=document.createElement("div");i.innerHTML=e,i.setAttribute("class","tempDiv");var r=document.createElement("div");if(i.childNodes.length>0){for(var o=void 0,s=void 0,a=void 0;i.firstChild;)"#text"===i.firstChild.nodeName&&(i.firstChild.textContent.indexOf("\n")<0||""!==i.firstChild.textContent.trim())||c.indexOf(i.firstChild.nodeName.toLocaleLowerCase())>=0?o?(s.appendChild(i.firstChild),s=a,o=!0):"BR"===t?(r.appendChild(i.firstChild),s=r):(a=n.i(d.createElement)("p"),r.appendChild(a),a.appendChild(i.firstChild),s=a,o=!0):"#text"===i.firstChild.nodeName&&("\n"===i.firstChild.textContent||i.firstChild.textContent.indexOf("\n")>=0&&""===i.firstChild.textContent.trim())?n.i(d.detach)(i.firstChild):(r.appendChild(i.firstChild),o=!1);for(var l=r.querySelectorAll("table"),u=0;u<l.length;u++){"0"===l[u].getAttribute("border")&&l[u].removeAttribute("border");for(var h=l[u].querySelectorAll("td"),p=0;p<h.length;p++)"none"===h[p].style.borderLeft&&h[p].style.removeProperty("border-left"),"none"===h[p].style.borderRight&&h[p].style.removeProperty("border-right"),"none"===h[p].style.borderBottom&&h[p].style.removeProperty("border-bottom"),"none"===h[p].style.borderTop&&h[p].style.removeProperty("border-top"),"none"===h[p].style.border&&h[p].style.removeProperty("border");l[u].classList.contains("e-rte-table")||l[u].classList.add("e-rte-table")}for(var m=r.querySelectorAll("img"),u=0;u<m.length;u++)m[u].classList.contains("e-rte-image")||m[u].classList.add("e-rte-image"),m[u].classList.contains("e-imginline")||m[u].classList.contains("e-imgbreak")||m[u].classList.add("e-imginline")}return r.innerHTML}function s(e){var t=e;do{t.childNodes.length>0&&(t=t.childNodes[0])}while(t.childNodes.length>0);return t}function a(){return{bold:!1,italic:!1,subscript:!1,superscript:!1,strikethrough:!1,orderedlist:!1,unorderedlist:!1,numberFormatList:!1,bulletFormatList:!1,underline:!1,alignments:null,backgroundcolor:null,fontcolor:null,fontname:null,fontsize:null,formats:null,createlink:!1,insertcode:!1}}function l(){return{bold:!1,italic:!1,subscript:!1,superscript:!1,strikethrough:!1,orderedlist:!1,uppercase:!1,lowercase:!1,inlinecode:!1,unorderedlist:!1,formats:null}}t.b=i,t.c=r,t.d=o,t.e=s,t.a=a,t.f=l;var d=n(0),c=(n.n(d),["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","strike","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"])},function(e,t,n){"use strict";n.d(t,"r",function(){return i}),n.d(t,"q",function(){return r}),n.d(t,"p",function(){return o}),n.d(t,"b",function(){return s}),n.d(t,"x",function(){return a}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return d}),n.d(t,"e",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return h}),n.d(t,"h",function(){return p}),n.d(t,"i",function(){return m}),n.d(t,"j",function(){return f}),n.d(t,"l",function(){return g}),n.d(t,"k",function(){return b}),n.d(t,"m",function(){return v}),n.d(t,"z",function(){return C}),n.d(t,"y",function(){return y}),n.d(t,"A",function(){return N}),n.d(t,"a",function(){return E}),n.d(t,"u",function(){return S}),n.d(t,"s",function(){return T}),n.d(t,"o",function(){return O}),n.d(t,"v",function(){return k}),n.d(t,"w",function(){return w}),n.d(t,"n",function(){return L}),n.d(t,"t",function(){return _});var i="INSERT-IMAGE",r="INSERT-AUDIO",o="INSERT-VIDEO",s="INSERT-TABLE",a="INSERT-LINK",l="INSERT-ROW",d="INSERT-COLUMN",c="DELETE-ROW",u="DELETE-COLUMN",h="REMOVE-TABLE",p="TABLE-HEADER",m="TABLE_VERTICAL_ALIGN",f="TABLE_MERGE",g="TABLE_VERTICAL_SPLIT",b="TABLE_HORIZONTAL_SPLIT",v="TABLE_MOVE",C="alignment-type",y="indent-type",N="p",E=["address","article","aside","audio","blockquote","canvas","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tbody","td","tfoot","th","thead","tr","ul","video","body"],S=["td","th"],T=["table","tbody","td","tfoot","th","thead","tr"],O="selection-type",k="inserthtml-type",w="insert-text-type",L="clear-type",_=["area","base","br","embed","hr","img","input","param","source","track","wbr","iframe","td","table"]},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(11),r=n(12),o=n(7),s=n(0),a=(n.n(s),n(19)),l=n(6),d=function(){function e(){}return e.Insert=function(e,t,l,d,c){var u;if("string"==typeof t){var h=document.createElement("div");h.innerHTML=t,u=d?h:h.firstChild}else if(d&&(n.i(s.isNullOrUndefined)(t)||n.i(s.isNullOrUndefined)(t.classList)||!t.classList.contains("pasteContent"))){var h=document.createElement("div");h.appendChild(t),u=h}else u=t;var p=new i.a,m=new r.a,f=p.getRange(e);if(f.startContainer!==l||f.startContainer!==f.endContainer||0!==f.startOffset||f.startOffset!==f.endOffset||0!==l.textContent.length||"P"!==l.children[0].tagName&&"DIV"!==l.children[0].tagName&&"BR"!==l.children[0].tagName||(p.setSelectionText(e,f.startContainer.children[0],f.startContainer.children[0],0,0),f=p.getRange(e)),f.startContainer===l&&f.startContainer===f.endContainer&&0===f.startOffset&&f.startOffset===f.endOffset&&l.textContent.trim().length>0){var g=this.findFirstTextNode(f.startContainer);n.i(s.isNullOrUndefined)(g)||(p.setSelectionText(e,g,g,0,0),f=p.getRange(e))}if("BR"===f.startContainer.nodeName&&0===f.startOffset&&f.startOffset===f.endOffset&&f.startContainer===f.endContainer){var b=Array.prototype.slice.call(f.startContainer.parentElement.childNodes).indexOf(f.startContainer);p.setSelectionText(e,f.startContainer.parentElement,f.startContainer.parentElement,b,b),f=p.getRange(e)}var v=f.startOffset===f.endOffset&&0===f.startOffset&&f.startContainer===f.endContainer,C=f.collapsed,y=this.getNodeCollection(f,p,u),N="table"===u.nodeName.toLowerCase()?this.closestEle(y[0].parentNode,l):y[0];if(d||!n.i(s.isNullOrUndefined)(u)&&!n.i(s.isNullOrUndefined)(u.classList)&&u.classList.contains("pasteContent"))return void this.pasteInsertHTML(y,u,f,p,m,e,C,N,l,c);if(l!==f.startContainer&&(!C&&(N.nodeType!==Node.ELEMENT_NODE||-1===o.s.indexOf(N.tagName.toLocaleLowerCase()))||"table"===u.nodeName.toLowerCase()&&N&&-1===o.s.indexOf(N.tagName.toLocaleLowerCase()))){var E=m.GetSpliceNode(f,N),S=E.previousSibling,T=E.parentNode;if(1===y.length||"table"===u.nodeName.toLowerCase()&&0===E.childElementCount)p.setSelectionContents(e,E),f=p.getRange(e);else{var O=m.GetSpliceNode(f,y[y.length-1].parentElement);O=n.i(s.isNullOrUndefined)(O)?E:O,p.setSelectionText(e,E,O,0,3===O.nodeType?O.textContent.length:O.childNodes.length),f=p.getRange(e)}f.extractContents(),"TABLE"===t.tagName&&this.removeEmptyElements(l);for(var k=0;k<y.length;k++)if(3!==y[k].nodeType&&null!=y[k].parentNode){if("IMG"===y[k].nodeName)continue;y[k].parentNode.removeChild(y[k])}if(S)a.a.AppendBefore(u,S,!0);else{for(var w=null;T!==l&&T.firstChild&&""===T.textContent.trim();){var L=T.parentNode;w=T,T=L}null!==w&&(T=w),T.firstChild&&(T!==l||"TABLE"===u.nodeName&&v&&T===f.startContainer&&T===f.endContainer)?""===T.textContent.trim()&&T!==l?(a.a.AppendBefore(u,T,!1),n.i(s.detach)(T)):a.a.AppendBefore(u,T.firstChild,!1):n.i(s.isNullOrUndefined)(E.previousSibling)&&"TABLE"===t.tagName?T.prepend(u):T.appendChild(u)}"IMG"===u.nodeName?this.imageFocus(u,p,e):3!==u.nodeType?p.setSelectionText(e,u,u,0,u.childNodes.length):p.setSelectionText(e,u,u,0,u.textContent.length)}else{if(f.deleteContents(),v&&""===f.startContainer.textContent&&"BR"!==f.startContainer.nodeName&&(f.startContainer.innerHTML=""),s.Browser.isIE){var _=e.createDocumentFragment();_.appendChild(u),f.insertNode(_)}else if(1===f.startContainer.nodeType&&"hr"===f.startContainer.nodeName.toLowerCase()&&"hr"===f.endContainer.nodeName.toLowerCase()){var x=f.startContainer.nextElementSibling;x&&(x.querySelector("br")&&n.i(s.detach)(x.querySelector("br")),x.appendChild(u))}else"BR"===f.startContainer.nodeName?f.startContainer.parentElement.insertBefore(u,f.startContainer):f.insertNode(u);3!==u.nodeType&&u.childNodes.length>0?p.setSelectionText(e,u,u,1,1):"IMG"===u.nodeName?this.imageFocus(u,p,e):3!==u.nodeType?p.setSelectionContents(e,u):p.setSelectionText(e,u,u,u.textContent.length,u.textContent.length)}},e.findFirstTextNode=function(e){if(e.nodeType===Node.TEXT_NODE)return e;for(var t=0;t<e.childNodes.length;t++){var i=this.findFirstTextNode(e.childNodes[t]);if(!n.i(s.isNullOrUndefined)(i))return i}return null},e.pasteInsertHTML=function(e,t,i,r,a,l,d,c,u,h){var p=i.startOffset===i.endOffset&&i.startContainer===i.endContainer;if(p&&i.startContainer===u&&""===u.textContent){var m=this.getImmediateBlockNode(e[e.length-1],u);r.setSelectionText(l,m,m,0,0),i=r.getRange(l)}var f,g,b,v;u!==i.startContainer&&(!d&&(c.nodeType!==Node.ELEMENT_NODE||-1===o.s.indexOf(c.tagName.toLocaleLowerCase()))||"table"===t.nodeName.toLowerCase()&&c&&-1===o.s.indexOf(c.tagName.toLocaleLowerCase()))&&(v=a.GetSpliceNode(i,c),g=n.i(s.isNullOrUndefined)(v.previousSibling)?v.parentNode.previousSibling:v.previousSibling,1===e.length?(r.setSelectionContents(l,v),i=r.getRange(l),b=!0):(f=a.GetSpliceNode(i,e[e.length-1].parentElement),f=n.i(s.isNullOrUndefined)(f)?v:f,r.setSelectionText(l,v,f,0,3===f.nodeType?f.textContent.length:f.childNodes.length),i=r.getRange(l),b=!1));var C=!1;this.removingComments(t);for(var y=t.childNodes,N=0;N<y.length;N++)if(o.a.indexOf(y[N].nodeName.toLocaleLowerCase())>=0){C=!0;break}var E,S=document.createDocumentFragment();if(C){for(var T=i.startContainer;!n.i(s.isNullOrUndefined)(T)&&"PRE"!==T.nodeName&&T!==u;)T=T.parentElement;if(n.i(s.isNullOrUndefined)(t)||n.i(s.isNullOrUndefined)(T)||"PRE"!==T.nodeName){this.insertTempNode(i,t,e,a,u);var O=!0,k=void 0,w=void 0,L=void 0;for(this.contentsDeleted||i.deleteContents();t.firstChild;)if("#text"!==t.firstChild.nodeName||""!==t.firstChild.textContent.trim())if("#text"===t.firstChild.nodeName&&O||this.inlineNode.indexOf(t.firstChild.nodeName.toLocaleLowerCase())>=0&&O){if(E=t.firstChild,n.i(s.isNullOrUndefined)(t.previousElementSibling)){var _="DIV"===h?n.i(s.createElement)("div"):n.i(s.createElement)("p");t.parentElement.insertBefore(_,t)}"BR"===t.previousElementSibling.nodeName?t.parentElement.insertBefore(t.firstChild,t):t.previousElementSibling.appendChild(t.firstChild)}else E=t.firstChild,"#text"===t.firstChild.nodeName||this.inlineNode.indexOf(t.firstChild.nodeName.toLocaleLowerCase())>=0?(k?(L.appendChild(t.firstChild),S.appendChild(L)):(w="DIV"===h?n.i(s.createElement)("div"):n.i(s.createElement)("p"),w.appendChild(t.firstChild),S.appendChild(w)),L=w,k=!0):(S.appendChild(t.firstChild),k=!1),O=!1;else n.i(s.detach)(t.firstChild);t.parentNode.replaceChild(S,t)}else i.insertNode(t),E=t.lastChild}else if(p){var x=n.i(s.createElement)("span",{className:"tempSpan"}),D=n.i(s.closest)(i.startContainer.parentElement,"a");if(3===i.startContainer.nodeType&&D&&n.i(s.closest)(D,"span")){var M=this.getImmediateBlockNode(i.startContainer,u);M.querySelectorAll("br").length>0&&n.i(s.detach)(M.querySelector("br"));var R=n.i(s.closest)(D,"span");R.appendChild(x)}else i.insertNode(x);for(;t.firstChild;)E=t.firstChild,S.appendChild(t.firstChild);x.parentNode.replaceChild(S,x)}else{for(;t.firstChild;)E=t.firstChild,S.appendChild(t.firstChild);b?v.parentNode.replaceChild(S,v):(i.deleteContents(),n.i(s.isNullOrUndefined)(f)||n.i(s.detach)(f),n.i(s.isNullOrUndefined)(g)?u.appendChild(S):g.parentNode.appendChild(S))}"#text"===E.nodeName?this.placeCursorEnd(E,t,r,l,u):this.cursorPos(E,t,r,l,u,h)},e.placeCursorEnd=function(e,t,i,r,o){for(e="BR"===e.nodeName?n.i(s.isNullOrUndefined)(e.previousSibling)?e.parentNode:e.previousSibling:e;!n.i(s.isNullOrUndefined)(e)&&"#text"!==e.nodeName&&"IMG"!==e.nodeName&&"BR"!==e.nodeName&&"HR"!==e.nodeName;){if(!n.i(s.isNullOrUndefined)(e.lastChild)&&"P"===e.lastChild.nodeName&&""===e.lastChild.innerHTML){var a=n.i(s.createElement)("br");e.lastChild.appendChild(a)}e=e.lastChild}e=n.i(s.isNullOrUndefined)(e)?t:e,"IMG"===e.nodeName?this.imageFocus(e,i,r):i.setSelectionText(r,e,e,e.textContent.length,e.textContent.length),this.removeEmptyElements(o)},e.getNodeCollection=function(e,t,n){var i=[];return e.startOffset===e.endOffset&&e.startContainer===e.endContainer&&"BR"!==e.startContainer.nodeName&&e.startContainer.childNodes.length>0&&("TD"===e.startContainer.nodeName||3!==e.startContainer.nodeType&&n.classList&&n.classList.contains("pasteContent"))?i.push(e.startContainer.childNodes[e.endOffset]):i=t.getInsertNodeCollection(e),i},e.insertTempNode=function(e,t,r,o,a){if(e.startContainer!==a||n.i(s.isNullOrUndefined)(e.startContainer.childNodes[e.endOffset-1])||"TABLE"!==e.startContainer.childNodes[e.endOffset-1].nodeName)if(e.startContainer!==a||n.i(s.isNullOrUndefined)(e.startContainer.childNodes[e.endOffset])||"TABLE"!==e.startContainer.childNodes[e.endOffset].nodeName)if(e.startContainer===e.endContainer&&3!==e.startContainer.nodeType&&"HR"===t.firstChild.nodeName)e.startContainer.classList.contains("e-content")||"BODY"===e.startContainer.nodeName?e.startContainer.appendChild(t):e.startContainer.parentNode.insertBefore(t,e.startContainer);else{var l=this.getImmediateBlockNode(r[r.length-1],a);if((n.i(s.isNullOrUndefined)(l)||n.i(s.isNullOrUndefined)(l.parentElement))&&3!==e.endContainer.nodeType&&(l=e.endContainer,e.setEnd(l,e.endContainer.textContent.length)),"BODY"===l.nodeName&&e.startContainer===e.endContainer&&1===e.startContainer.nodeType&&(l=e.startContainer),l.closest("LI")&&t&&t.firstElementChild&&("OL"===t.firstElementChild.tagName||"UL"===t.firstElementChild.tagName))for(var d=void 0;t.firstElementChild.lastElementChild&&"LI"===t.firstElementChild.lastElementChild.tagName;)d=t.firstElementChild.lastElementChild,d.style.removeProperty("margin-left"),d.style.removeProperty("margin-top"),d.style.removeProperty("margin-bottom"),t.firstElementChild.insertAdjacentElement("afterend",d);if("TD"===l.nodeName||"TH"===l.nodeName||"TR"===l.nodeName){var c=n.i(s.createElement)("span",{className:"tempSpan"});e.insertNode(c),c.parentNode.replaceChild(t,c)}else{var u=new i.a,h=this.getNodeCollection(e,u,t)[this.getNodeCollection(e,u,t).length-1],p=void 0;if("BR"!==h.nodeName&&"HR"!==h.nodeName&&("#text"!==h.nodeName||n.i(s.isNullOrUndefined)(h.parentElement)||"LI"!==h.parentElement.nodeName)||n.i(s.isNullOrUndefined)(h.parentElement)||0!==h.parentElement.textContent.trim().length){if(("#text"===h.nodeName||"BR"===h.nodeName)&&!n.i(s.isNullOrUndefined)(h.parentElement)&&("LI"===h.parentElement.nodeName||l===a&&h.parentElement===l)&&h.parentElement.textContent.trim().length>0)return p=h,"LI"!==h.parentElement.nodeName||n.i(s.isNullOrUndefined)(h.nextSibling)||"BR"!==h.nextSibling.nodeName||n.i(s.detach)(h.nextSibling),e.collapsed||e.deleteContents(),e.insertNode(t),void(this.contentsDeleted=!0);p=o.GetSpliceNode(e,l)}else p=h,"LI"!==h.parentElement.nodeName||n.i(s.isNullOrUndefined)(h.nextSibling)||"BR"!==h.nextSibling.nodeName||n.i(s.detach)(h.nextSibling);p.parentNode.replaceChild(t,p)}}else e.startContainer.insertBefore(t,e.startContainer.childNodes[e.endOffset]);else n.i(s.isNullOrUndefined)(e.startContainer.childNodes[e.endOffset-1].nextSibling)?e.startContainer.appendChild(t):e.startContainer.insertBefore(t,e.startContainer.childNodes[e.endOffset-1].nextSibling)},e.cursorPos=function(e,t,i,r,o,a){e.classList.add("lastNode"),o.innerHTML=n.i(l.d)(o.innerHTML,a),e=o.querySelector(".lastNode"),n.i(s.isNullOrUndefined)(e)||(this.placeCursorEnd(e,t,i,r,o),e.classList.remove("lastNode"),0===e.classList.length&&e.removeAttribute("class"))},e.imageFocus=function(e,t,n){var i=document.createTextNode(" ");e.parentNode.insertBefore(i,e.nextSibling),t.setSelectionText(n,e.nextSibling,e.nextSibling,0,0)},e.getImmediateBlockNode=function(e,t){do{e=e.parentNode}while(e&&o.a.indexOf(e.nodeName.toLocaleLowerCase())<0);return e},e.removingComments=function(e){var t=e.innerHTML;t=t.replace(/<!--[\s\S]*?-->/g,""),e.innerHTML=t},e.findDetachEmptyElem=function(e){var t;if(n.i(s.isNullOrUndefined)(e.parentElement))t=null;else{t=!(e.parentElement.textContent.length>0&&e.parentElement.textContent.match(/\u00a0/g)&&e.parentElement.textContent.match(/\u00a0/g).length>0)&&""===e.parentElement.textContent.trim()&&"true"!==e.parentElement.contentEditable&&n.i(s.isNullOrUndefined)(e.parentElement.querySelector("img"))?this.findDetachEmptyElem(e.parentElement):e}return t},e.removeEmptyElements=function(e){for(var t=e.querySelectorAll(":empty"),i=Array.from(t).filter(function(e){return!e.closest("svg")&&!e.closest("canvas")}),r=0;r<i.length;r++){var a=!0;if("DIV"===i[r].tagName&&(a="none"===i[r].style.borderBottom||""===i[r].style.borderBottom),o.t.indexOf(i[r].tagName.toLowerCase())<0&&a){var l=this.findDetachEmptyElem(i[r]);n.i(s.isNullOrUndefined)(l)||n.i(s.detach)(l)}}},e.closestEle=function(e,t){for(var i=e;i&&1===i.nodeType;){if(i.parentNode===t||!n.i(s.isNullOrUndefined)(i.parentNode.tagName)&&-1!==o.u.indexOf(i.parentNode.tagName.toLocaleLowerCase()))return i;i=i.parentNode}return null},e.inlineNode=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],e.contentsDeleted=!1,e}()},function(e,n){e.exports=t},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"c",function(){return r}),n.d(t,"b",function(){return o}),n.d(t,"e",function(){return s}),n.d(t,"a",function(){return a}),n.d(t,"f",function(){return l});var i="lists-commands",r="command-type",o="link-commands",s="clear-commands",a="insert-table",l="insert-text"},function(e,t,n){"use strict";var i=n(20);n.d(t,"a",function(){return i.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(11),r=n(0),o=(n.n(r),n(19)),s=function(){function e(){this.enterAction="P",this.position=-1,this.nodeSelection=new i.a}return e.prototype.GetSpliceNode=function(e,t){return t=this.SplitNode(e,t,!0),t=this.SplitNode(e,t,!1)},e.prototype.SplitNode=function(e,t,n){if(t){var i=e.cloneRange(),r=t.parentNode,s=this.nodeSelection.getIndex(t);i.collapse(n),n?i.setStartBefore(t):i.setEndAfter(t);var a=i.extractContents();if(n){if(t=r.childNodes[s],(a=this.spliceEmptyNode(a,!1))&&a.childNodes.length>0){var l=!(1!==a.childNodes.length||"IMG"===a.childNodes[0].nodeName||a.querySelectorAll("img").length>0||!this.isRteElm(a)||""!==a.textContent);if(!l)if(t)o.a.AppendBefore(a,t);else{r.appendChild(a);var d=document.createElement("div");d.innerHTML="",t=d.firstChild,r.appendChild(t)}}}else if(t=r.childNodes.length>1?r.childNodes[s]:r.childNodes[0],(a=this.spliceEmptyNode(a,!0))&&a.childNodes.length>0){var l=!(1!==a.childNodes.length||"IMG"===a.childNodes[0].nodeName||!this.isRteElm(a)||""!==a.textContent);if(!l)if(t)o.a.AppendBefore(a,t,!0);else{r.appendChild(a);var d=document.createElement("div");d.innerHTML="",r.insertBefore(d.firstChild,r.firstChild),t=r.firstChild}}return t}return null},e.prototype.isRteElm=function(e){var t=!0;if(1===e.childNodes.length&&"IMG"!==e.childNodes[0].nodeName)for(var i=e.childNodes[0],o=0;!n.i(r.isNullOrUndefined)(i.childNodes)&&o<i.childNodes.length;o++)("IMG"===i.childNodes[o].nodeName||"SPAN"===i.childNodes[o].nodeName&&(i.childNodes[o].classList.contains("e-video-wrap")||i.childNodes[o].classList.contains("e-embed-video-wrap")||i.childNodes[o].classList.contains("e-audio-wrap")))&&(t=!1);else t=!0;return t},e.prototype.spliceEmptyNode=function(e,t){var n;return n=1===e.childNodes.length&&"#text"===e.childNodes[0].nodeName&&""===e.childNodes[0].textContent||""===e.textContent?-1:e.childNodes.length-1,n>-1&&!t?this.spliceEmptyNode(e.childNodes[n],t):n>-1?this.spliceEmptyNode(e.childNodes[0],t):3===e.nodeType||11===e.nodeType||"IMG"===e.nodeName||e.classList.contains("e-video-wrap")||e.classList.contains("e-audio-wrap")||e.parentNode.removeChild(e),e},e.prototype.GetCursorStart=function(e,t,n){e=n?e:e.reverse();for(var i=e[0],r=0;r<e.length&&(n?e[r]<t:e[r]>=t);r++)i=e[r];return i},e.prototype.GetCursorRange=function(e,t,n){var i=e.createRange(),r=[];r.push(0);for(var o=this.TrimLineBreak(n.data),s=o.indexOf(" ",0);-1!==s;)r.indexOf(s)<0&&r.push(s),new RegExp("\\s").test(o[s-1])&&r.indexOf(s-1)<0&&r.push(s-1),new RegExp("\\s").test(o[s+1])&&r.push(s+1),s=o.indexOf(" ",s+1);if(r.push(o.length),r.indexOf(t.startOffset)>=0||r.indexOf(t.startOffset-1)>=0&&(1!==t.startOffset||1===t.startOffset&&new RegExp("\\s").test(o[0]))||r[r.length-1]-1===t.startOffset&&!new RegExp("\\s").test(o[0]))i=t,this.position=1;else{var a=this.GetCursorStart(r,t.startOffset,!0);this.position=t.startOffset-a,i.setStart(t.startContainer,a),i.setEnd(t.startContainer,this.GetCursorStart(r,t.startOffset,!1))}return i},e.prototype.GetCursorNode=function(e,t,n){return this.GetSpliceNode(this.GetCursorRange(e,t,n),n)},e.prototype.TrimLineBreak=function(e){return e.replace(/(\r\n\t|\n|\r\t)/gm," ")},e}()},function(e,t){e.exports=n},function(e,t){e.exports=i},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return a}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return c});var i={h6:"###### ",h5:"##### ",h4:"#### ",h3:"### ",h2:"## ",h1:"# ",blockquote:"> ",pre:"```\n",p:""},r={Bold:"**",Italic:"*",StrikeThrough:"~~",InlineCode:"`",SubScript:"<sub>",SuperScript:"<sup>",UpperCase:"A-Z",LowerCase:"a-z"},o={OL:"1. ",UL:"- "},s={"toolbar-focus":"alt+f10",escape:"27","insert-link":"ctrl+k","insert-image":"ctrl+shift+i","insert-audio":"ctrl+shift+a","insert-video":"ctrl+alt+v","insert-table":"ctrl+shift+e",undo:"ctrl+z",redo:"ctrl+y",copy:"ctrl+c",cut:"ctrl+x",paste:"ctrl+v",bold:"ctrl+b",italic:"ctrl+i",underline:"ctrl+u",strikethrough:"ctrl+shift+s",uppercase:"ctrl+shift+u",lowercase:"ctrl+shift+l",superscript:"ctrl+shift+=",subscript:"ctrl+=",indents:"ctrl+]",outdents:"ctrl+[","html-source":"ctrl+shift+h","full-screen":"ctrl+shift+f","decrease-fontsize":"ctrl+shift+<","increase-fontsize":"ctrl+shift+>","justify-center":"ctrl+e","justify-full":"ctrl+j","justify-left":"ctrl+l","justify-right":"ctrl+r","clear-format":"ctrl+shift+r","ordered-list":"ctrl+shift+o","unordered-list":"ctrl+alt+o",space:"32",enter:"13",tab:"tab",delete:"46","format-copy":"alt+shift+c","format-paste":"alt+shift+v"},a={"toolbar-focus":"alt+f10",escape:"27","insert-link":"ctrl+k","insert-image":"ctrl+shift+i","insert-table":"ctrl+shift+e",undo:"ctrl+z",redo:"ctrl+y",copy:"ctrl+c",cut:"ctrl+x",paste:"ctrl+v",bold:"ctrl+b",italic:"ctrl+i",strikethrough:"ctrl+shift+s",uppercase:"ctrl+shift+u",lowercase:"ctrl+shift+l",superscript:"ctrl+shift+=",subscript:"ctrl+=","full-screen":"ctrl+shift+f","ordered-list":"ctrl+shift+o","unordered-list":"ctrl+alt+o"},l={b:["strong"],strong:["b"],i:["emp","cite"],emp:["i","cite"],cite:["i","emp"]},d={first:"MsoListParagraphCxSpFirst",middle:"MsoListParagraphCxSpMiddle",last:"MsoListParagraphCxSpLast"},c=["BR","IMG"]},function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return d});var i=n(7),r=n(0),o=(n.n(r),n(11)),s=n(15),a=n(6),l={startSelection:"e-editor-select-start",endSelection:"e-editor-select-end"},d=function(){function e(e,t){this.parent=e,this.nodeSelection=new o.a,this.currentDocument=t}return e.prototype.contents=function(e){return e&&"IFRAME"!==e.tagName?Array.prototype.slice.call(e.childNodes||[]):[]},e.prototype.isBlockNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&i.a.indexOf(e.tagName.toLowerCase())>=0},e.prototype.isLink=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&"a"===e.tagName.toLowerCase()},e.prototype.blockParentNode=function(e){for(;e&&e.parentNode!==this.parent&&(!e.parentNode||!this.hasClass(e.parentNode,"e-node-inner"));null)if(e=e.parentNode,this.isBlockNode(e))return e;return e},e.prototype.rawAttributes=function(e){var t={},n=e.attributes;if(n.length>0)for(var i=0;i<n.length;i++){var r=n[i];t[r.nodeName]=r.value}return t},e.prototype.attributes=function(e){if(!e)return"";for(var t="",n=this.rawAttributes(e),i=Object.keys(n).sort(),r=0;r<i.length;r++){var o=i[r],s=n[""+o];s.indexOf("'")<0&&s.indexOf('"')>=0?t+=" "+o+"='"+s+"'":s.indexOf('"')>=0&&s.indexOf("'")>=0?(s=s.replace(/"/g,"""),t+=" "+o+'="'+s+'"'):t+=" "+o+'="'+s+'"'}return t},e.prototype.clearAttributes=function(e){for(var t=e.attributes,n=t.length-1;n>=0;n--){var i=t[n];e.removeAttribute(i.nodeName)}},e.prototype.openTagString=function(e){return"<"+e.tagName.toLowerCase()+this.attributes(e)+">"},e.prototype.closeTagString=function(e){return"</"+e.tagName.toLowerCase()+">"},e.prototype.createTagString=function(e,t,n){return"<"+e.toLowerCase()+this.attributes(t)+">"+n+"</"+e.toLowerCase()+">"},e.prototype.isList=function(e){return!!e&&["UL","OL"].indexOf(e.tagName)>=0},e.prototype.isElement=function(e){return e===this.parent},e.prototype.isEditable=function(e){return(!e.getAttribute||"true"===e.getAttribute("contenteditable"))&&["STYLE","SCRIPT"].indexOf(e.tagName)<0},e.prototype.hasClass=function(e,t){return e&&e.classList&&e.classList.contains(t)},e.prototype.replaceWith=function(e,t){e.parentNode.insertBefore(this.parseHTMLFragment(t),e),n.i(r.detach)(e)},e.prototype.parseHTMLFragment=function(e){var t=n.i(r.createElement)("template");return t.innerHTML=e,t.content instanceof DocumentFragment?t.content:document.createRange().createContextualFragment(e)},e.prototype.wrap=function(e,t){return e.parentNode.insertBefore(t,e),t=e.previousSibling,t.appendChild(e),t},e.prototype.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e.prototype.wrapInner=function(e,t){for(e.appendChild(t),t=e.querySelector(".e-rte-wrap-inner"),t.classList.remove("e-rte-wrap-inner"),0===t.classList.length&&t.removeAttribute("class");e.firstChild!==t;)t.appendChild(e.firstChild);return t},e.prototype.unWrap=function(e){for(var t=e.parentNode,n=[];e.firstChild;)n.push(e.firstChild),t.insertBefore(e.firstChild,e);return n=n.length>0?n:[e.parentNode],t.removeChild(e),n},e.prototype.getSelectedNode=function(e,t){return e.nodeType===Node.ELEMENT_NODE&&e.childNodes.length>0&&e.childNodes[t-1]&&e.childNodes[t-1].nodeType===Node.ELEMENT_NODE&&(e.childNodes[t-1].classList.contains(l.startSelection)||e.childNodes[t-1].classList.contains(l.endSelection))?e=e.childNodes[t-1]:e.nodeType===Node.ELEMENT_NODE&&e.childNodes.length>0&&e.childNodes[t]&&(e=e.childNodes[t]),e.nodeType===Node.TEXT_NODE&&(e=e.parentNode),e},e.prototype.nodeFinds=function(e,t){for(var n=[],i=0;i<t.length;i++)e.contains(t[i])&&e!==t[i]&&n.push(t[i]);return n},e.prototype.isEditorArea=function(){var e,t=this.getRangePoint(0);for(e=t.commonAncestorContainer;e&&!this.isElement(e);null)e=e.parentNode;return!!this.isElement(e)},e.prototype.getRangePoint=function(e){var t=this.getSelection(),n=[];if(t&&t.getRangeAt&&t.rangeCount){n=[];for(var i=0;i<t.rangeCount;i++)n.push(t.getRangeAt(i))}else n=[this.currentDocument.createRange()];return void 0!==e?n[e]:n},e.prototype.getSelection=function(){return this.nodeSelection.get(this.currentDocument)},e.prototype.getPreviousNode=function(e){for(e=e.previousElementSibling;e&&"\n"===e.textContent;null)e=e.previousElementSibling;return e},e.prototype.encode=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML.replace(/<br\s*[\/]?>/gi,"\n")},e.prototype.saveMarker=function(e,t){var n,r,o=this.parent.querySelector("."+l.startSelection),s=this.parent.querySelector("."+l.endSelection);if(this.hasClass(o,l.startSelection)&&o.classList.length>1){var a=this.createTagString(i.A,o,this.encode(o.textContent));this.replaceWith(o,a),o=this.parent.querySelector("."+l.startSelection),o.classList.remove(l.startSelection),n=o.childNodes[0]}else n=this.unWrap(o)[0];if(this.hasClass(s,l.endSelection)&&s.classList.length>1){var a=this.createTagString(i.A,s,this.encode(s.textContent));this.replaceWith(s,a),s=this.parent.querySelector("."+l.endSelection),s.classList.remove(l.endSelection),r=s.childNodes[0]}else r=s?this.unWrap(s)[0]:n;return e.startContainer=e.getNodeArray(n,!0),e.endContainer=e.getNodeArray(r,!1),e},e.prototype.marker=function(e,t){return'<span class="'+e+'">'+t+"</span>"},e.prototype.setMarker=function(e){var t=e.range,o=t.startContainer.childNodes,s=o.length>1&&"TABLE"===o[0].nodeName,d=(s?n.i(a.e)(o[t.startOffset+1]):o[t.startOffset>0?t.startOffset-1:t.startOffset])||t.startContainer,c=t.endContainer.childNodes[t.endOffset>0?t.endOffset-1:t.endOffset]||t.endContainer;if(d.nodeType===Node.ELEMENT_NODE&&c.nodeType===Node.ELEMENT_NODE&&(d.contains(c)||c.contains(d))){var u=d.contains(c)?d:c;if(u.nodeType!==Node.TEXT_NODE){for(var h=[],p=[],m=u;u.contains(m);null)h.indexOf(m)<0&&m.childNodes&&m.childNodes.length?(h.push(m),m=m.childNodes[0]):m.nextSibling?m=m.nextSibling:m.parentNode&&(m=m.parentNode,h.push(m)),p.indexOf(m)<0&&(m.nodeType===Node.TEXT_NODE||i.u.indexOf(m.parentNode.tagName.toLocaleLowerCase())>=0&&("BR"===m.tagName||"IMG"===m.tagName))&&p.push(m);p.length&&(d=d.contains(c)?p[0]:d,c=p[p.length-1])}}if(d!==c){if(d.nodeType!==Node.TEXT_NODE&&("BR"===d.tagName&&i.u.indexOf(d.parentNode.tagName.toLocaleLowerCase())>=0||"IMG"===d.tagName)){this.replaceWith(d,this.marker(l.startSelection,this.encode(d.textContent)));t.startContainer.querySelector("."+l.startSelection).appendChild(d)}else if(3!==d.nodeType&&"#text"!==d.nodeName&&"BR"!==d.nodeName){var f=this.marker(l.startSelection,"");n.i(r.append)([this.parseHTMLFragment(f)],d)}else this.replaceWith(d,this.marker(l.startSelection,this.encode(d.textContent)));if(c.nodeType!==Node.TEXT_NODE&&"BR"===c.tagName&&i.u.indexOf(c.parentNode.tagName.toLocaleLowerCase())>=0){this.replaceWith(c,this.marker(l.endSelection,this.encode(c.textContent)));t.endContainer.querySelector("."+l.endSelection).appendChild(c)}else this.ensureSelfClosingTag(c,l.endSelection,t)}else this.ensureSelfClosingTag(d,l.startSelection,t)},e.prototype.ensureSelfClosingTag=function(e,t,i){var o=!1;if(3===e.nodeType)this.replaceWith(e,this.marker(t,this.encode(e.textContent)));else if("BR"===e.tagName){this.replaceWith(e,this.marker(t,this.encode(e.textContent)));var a=i.startContainer.querySelector("."+t);a.parentElement.appendChild(e)}else{if("IMG"===e.tagName){var d=document.createElement("p");e.parentElement.insertBefore(d,e),d.appendChild(e),e=d.children[0]}if("TABLE"===e.tagName)if(o=!0,""===e.textContent){var c=e.querySelectorAll("td");e=c[c.length-1],e=n.i(r.isNullOrUndefined)(e.childNodes[0])?e:e.childNodes[0]}else{for(var u=e.lastChild;3!==u.nodeType&&"#text"!==u.nodeName&&"BR"!==u.nodeName;)u=u.lastChild;e=u}for(var h=0;h<s.h.length;h++)e=e.tagName!==s.h[h]||o?e:e.parentNode;if(3===e.nodeType&&"#text"===e.nodeName)this.replaceWith(e,this.marker(t,this.encode(e.textContent)));else if("BR"===e.nodeName){this.replaceWith(e,this.marker(l.endSelection,this.encode(e.textContent)));var p=i.endContainer.querySelector("."+l.endSelection);p.appendChild(e)}else{var m=this.marker(t,"");n.i(r.append)([this.parseHTMLFragment(m)],e)}}},e.prototype.createTempNode=function(e){var t=e.textContent;if("BR"===e.tagName){var n="<"+i.A+"></"+i.A+">",r=e.parentNode;i.u.indexOf(r.tagName.toLocaleLowerCase())>=0&&(e=this.wrap(e,this.parseHTMLFragment(n)))}else if(e.nodeType!==Node.TEXT_NODE&&(e.classList.contains(l.startSelection)||e.classList.contains(l.endSelection))||t.replace(/\n/g,"").replace(/(^ *)|( *$)/g,"").length>0||t.length&&t.indexOf("\n")<0){var n="<"+i.A+"></"+i.A+">",o=e;e=this.wrap(e,this.parseHTMLFragment(n));var s=o.nodeType===Node.ELEMENT_NODE&&o.firstChild&&"BR"===o.firstChild.nodeName&&(o.classList.contains(l.startSelection)||o.classList.contains(l.endSelection));!s&&e.nextElementSibling&&"BR"===e.nextElementSibling.tagName&&e.appendChild(e.nextElementSibling)}return e},e.prototype.getImageTagInSelection=function(){var e=this.getSelection();return this.isEditorArea()&&e.rangeCount?e.focusNode.querySelectorAll("img"):null},e.prototype.blockNodes=function(){var e=[],t=this.getSelection();if(this.isEditorArea()&&t.rangeCount)for(var o=this.getRangePoint(),s=0;s<o.length;s++){var a=void 0,d=o[s],c=this.getSelectedNode(d.startContainer,d.startOffset),u=this.getSelectedNode(d.endContainer,d.endOffset);if(this.isBlockNode(c)&&e.indexOf(c)<0&&e.push(c),(a=this.blockParentNode(c))&&e.indexOf(a)<0)if(i.u.indexOf(a.tagName.toLocaleLowerCase())>=0&&("BR"===c.tagName||c.nodeType===Node.TEXT_NODE||c.classList.contains(l.startSelection)||c.classList.contains(l.endSelection))){var h=c.previousSibling&&c.previousSibling.nodeType===Node.TEXT_NODE?c.previousSibling:c;c.nextSibling||c.previousSibling||"BR"!==c.tagName?e.push(this.createTempNode(h)):e.push(h)}else e.push(a);for(var p=[],m=c;m!==u&&m!==this.parent;null)p.indexOf(m)<0&&m.childNodes&&m.childNodes.length?(p.push(m),m=m.childNodes[0]):m&&8!==m.nodeType&&("BR"===m.tagName||m.nodeType===Node.TEXT_NODE&&""!==m.textContent.trim()||m.nodeType!==Node.TEXT_NODE&&(m.classList.contains(l.startSelection)||m.classList.contains(l.endSelection)))&&i.u.indexOf(m.parentNode.tagName.toLocaleLowerCase())>=0?m=this.createTempNode(m):m.nextSibling&&8!==m.nextSibling.nodeType&&("BR"===m.nextSibling.tagName||m.nextSibling.nodeType===Node.TEXT_NODE||m.nextSibling.classList.contains(l.startSelection)||m.nextSibling.classList.contains(l.endSelection))&&i.u.indexOf(m.nextSibling.parentNode.tagName.toLocaleLowerCase())>=0?m=this.createTempNode(m.nextSibling):m.nextSibling?m=m.nextSibling:m.parentNode&&(m=m.parentNode,p.push(m)),e.indexOf(m)<0&&m.nodeType===Node.ELEMENT_NODE&&i.u.indexOf(m.parentNode.tagName.toLocaleLowerCase())>=0&&(m.classList.contains(l.startSelection)||m.classList.contains(l.endSelection))&&e.push(this.createTempNode(m)),this.isBlockNode(m)&&this.ignoreTableTag(m)&&p.indexOf(m)<0&&e.indexOf(m)<0&&(m!==u||d.endOffset>0)&&e.push(m),"IMG"===m.nodeName&&"true"===m.parentElement.contentEditable&&e.push(m);a=this.blockParentNode(u),a&&this.ignoreTableTag(a)&&e.indexOf(a)<0&&!n.i(r.isNullOrUndefined)(a.previousElementSibling)&&"IMG"!==a.previousElementSibling.tagName&&e.push(a)}for(var f=e.length-1;f>0;f--){var p=this.nodeFinds(e[f],e);if(p.length){var g=e[f].querySelectorAll("ul, ol");if("LI"===e[f].tagName&&g.length>0)continue;e.splice(f,1)}}return e},e.prototype.ignoreTableTag=function(e){return!(i.s.indexOf(e.tagName.toLocaleLowerCase())>=0)},e}()},function(e,t,n){"use strict";function i(e,t,n){for(var i=0;t.length>i;i++)if(t[i].value===n.subCommand)return e.localeObj.getConstant(t[i].locale);return n.text}function r(e){l.forEach(function(t,n){l[n].text=i(e,a,l[n])}),m.forEach(function(t,n){m[n].text=i(e,u,m[n])}),f.forEach(function(t,n){f[n].text=i(e,h,f[n])}),g.forEach(function(t,n){g[n].text=i(e,p,g[n])}),C.forEach(function(t,n){C[n].text=i(e,v,C[n])}),N.forEach(function(t,n){N[n].text=i(e,y,N[n])}),S.forEach(function(t,n){S[n].text=i(e,E,S[n])}),O.forEach(function(t,n){O[n].text=i(e,T,O[n])})}n.d(t,"l",function(){return o}),n.d(t,"v",function(){return s}),n.d(t,"a",function(){return l}),n.d(t,"t",function(){return d}),n.d(t,"u",function(){return c}),n.d(t,"q",function(){return m}),n.d(t,"s",function(){return f}),n.d(t,"r",function(){return g}),n.d(t,"o",function(){return b}),n.d(t,"m",function(){return C}),n.d(t,"n",function(){return N}),n.d(t,"p",function(){return S}),n.d(t,"g",function(){return O}),n.d(t,"f",function(){return k}),n.d(t,"b",function(){return w}),n.d(t,"i",function(){return L}),n.d(t,"c",function(){return _}),n.d(t,"j",function(){return x}),n.d(t,"k",function(){return D}),n.d(t,"d",function(){return M}),n.d(t,"e",function(){return R}),t.x=r,n.d(t,"w",function(){return B}),n.d(t,"h",function(){return A});var o=["alignments","formats","fontname","fontsize","fontcolor","backgroundcolor","align","display","audiolayoutoption","videolayoutoption","videoalign","tablerows","tablecolumns","tablecell","tablecellhorizontalalign","tablecellverticalalign","styles","numberformatlist","bulletformatlist"],s={alignments:{id:"Alignments",icon:"e-alignments",tooltip:"Alignments",command:"Alignments",subCommand:"Alignments"},justifyleft:{id:"JustifyLeft",icon:"e-justify-left",tooltip:"JustifyLeft",command:"Alignments",subCommand:"JustifyLeft"},justifycenter:{id:"JustifyCenter",icon:"e-justify-center",tooltip:"JustifyCenter",command:"Alignments",subCommand:"JustifyCenter"},justifyright:{id:"JustifyRight",icon:"e-justify-right",tooltip:"JustifyRight",command:"Alignments",subCommand:"JustifyRight"},justifyfull:{id:"JustifyFull",icon:"e-justify-full",tooltip:"JustifyFull",command:"Alignments",subCommand:"JustifyFull"},fontname:{id:"FontName",icon:"e-font-name",tooltip:"Font Name",command:"Font",subCommand:"FontName"},fontsize:{id:"FontSize",icon:"e-font-size",tooltip:"Font Size",command:"Font",subCommand:"FontSize"},fontcolor:{id:"FontColor",icon:"e-rte-font-color",tooltip:"Font Color",command:"Font",subCommand:"FontColor",value:"#ff0000ff"},backgroundcolor:{id:"BackgroundColor",icon:"e-background-color",tooltip:"Background Color",command:"Font",subCommand:"BackgroundColor",value:"#ffff00ff"},bold:{id:"Bold",icon:"e-bold",tooltip:"Bold",command:"Style",subCommand:"Bold"},italic:{id:"Italic",icon:"e-italic",tooltip:"Italic",command:"Style",subCommand:"Italic"},underline:{id:"Underline",icon:"e-underline",tooltip:"Underline",command:"Style",subCommand:"Underline"},strikethrough:{id:"StrikeThrough",icon:"e-strike-through",tooltip:"StrikeThrough",command:"Style",subCommand:"StrikeThrough"},clearformat:{id:"ClearFormat",icon:"e-clear-format",tooltip:"Clear Format",command:"Clear",subCommand:"ClearFormat"},clearall:{id:"ClearAll",icon:"e-clear-all",tooltip:"Clear All",command:"Clear",subCommand:"ClearAll"},cut:{id:"Cut",icon:"e-cut",tooltip:"Cut",command:"ClipBoard",subCommand:"Cut"},copy:{id:"Copy",icon:"e-copy",tooltip:"Copy",command:"ClipBoard",subCommand:"Copy"},paste:{id:"Paste",icon:"e-paste",tooltip:"Paste",command:"ClipBoard",subCommand:"Paste"},unorderedlist:{id:"UnorderedList",icon:"e-unorder-list",tooltip:"Bulleted List",command:"Lists",subCommand:"UL"},orderedlist:{id:"OrderedList",icon:"e-order-list",tooltip:"Numbered List",command:"Lists",subCommand:"OL"},numberformatlist:{id:"NumberFormatList",icon:"e-order-list",tooltip:"Number Format List",command:"NumberFormatList",subCommand:"NumberFormatList"},bulletformatlist:{id:"BulletFormatList",icon:"e-unorder-list",tooltip:"Bullet Format List",command:"BulletFormatList",subCommand:"BulletFormatList"},indent:{id:"Indent",icon:"e-indent",tooltip:"Increase Indent",command:"Indents",subCommand:"Indent"},outdent:{id:"Outdent",icon:"e-outdent",tooltip:"Decrease Indent",command:"Indents",subCommand:"Outdent"},undo:{id:"Undo",icon:"e-undo",tooltip:"Undo",command:"Actions",subCommand:"Undo"},redo:{id:"Redo",icon:"e-redo",tooltip:"Redo",command:"Actions",subCommand:"Redo"},superscript:{id:"SuperScript",icon:"e-super-script",tooltip:"Superscript",command:"Effects",subCommand:"SuperScript"},subscript:{id:"SubScript",icon:"e-sub-script",tooltip:"Subscript",command:"Effects",subCommand:"SubScript"},createlink:{id:"CreateLink",icon:"e-create-link",tooltip:"Insert Hyperlink",command:"Links",subCommand:"CreateLink"},openlink:{id:"OpenLink",icon:"e-open-link",tooltip:"Open Link",command:"Links",subCommand:"OpenLink"},editlink:{id:"EditLink",icon:"e-edit-link",tooltip:"Edit Link",command:"Links",subCommand:"EditLink"},removelink:{id:"RemoveLink",icon:"e-remove-link",tooltip:"Remove Link",command:"Links",subCommand:"RemoveLink"},image:{id:"Image",icon:"e-image",tooltip:"Insert Image",command:"Images",subCommand:"Image"},audio:{id:"Audio",icon:"e-audio",tooltip:"Insert Audio",command:"Audios",subCommand:"Audio"},video:{id:"Video",icon:"e-video",tooltip:"Insert Video",command:"Videos",subCommand:"Video"},filemanager:{id:"FileManager",icon:"e-rte-file-manager",tooltip:"File Manager",command:"Files",subCommand:"File"},createtable:{id:"CreateTable",icon:"e-create-table",tooltip:"Create Table",command:"Table",subCommand:"CreateTable"},removetable:{id:"removeTable",icon:"e-remove-table",tooltip:"Remove Table",command:"removeTable",subCommand:"removeTable"},replace:{id:"Replace",icon:"e-replace",tooltip:"Replace",command:"Images",subCommand:"Replace"},audioreplace:{id:"AudioReplace",icon:"e-audio-replace",tooltip:"Audio Replace",command:"Audios",subCommand:"AudioReplace"},audioremove:{id:"AudioRemove",icon:"e-audio-remove",tooltip:"Audio Remove",command:"Audios",subCommand:"AudioRemove"},audiolayoutoption:{id:"AudioLayoutOption",icon:"e-audio-display",tooltip:"Audio LayoutOption",command:"Audios",subCommand:"AudioLayoutOption"},videoreplace:{id:"VideoReplace",icon:"e-video-replace",tooltip:"Video Replace",command:"Videos",subCommand:"VideoReplace"},videoalign:{id:"VideoAlign",icon:"e-video-align",tooltip:"Video Align",command:"Videos",subCommand:"VideoAlign"},videoremove:{id:"VideoRemove",icon:"e-video-remove",tooltip:"Video Remove",command:"Videos",subCommand:"VideoRemove"},videolayoutoption:{id:"VideoLayoutOption",icon:"e-video-display",tooltip:"Video LayoutOption",command:"Videos",subCommand:"VideoLayoutOption"},videodimension:{id:"VideoDimension",icon:"e-video-dimension",tooltip:"Video Dimension",command:"Videos",subCommand:"VideoDimension"},align:{id:"Align",icon:"e-align",tooltip:"Align",command:"Images",subCommand:"Align"},caption:{id:"Caption",icon:"e-caption",tooltip:"Image Caption",command:"Images",subCommand:"Caption"},remove:{id:"Remove",icon:"e-remove",tooltip:"Remove",command:"Images",subCommand:"Remove"},openimagelink:{id:"OpenImageLink",icon:"e-open-link",tooltip:"Open Link",command:"Images",subCommand:"OpenImageLink"},editimagelink:{id:"EditImageLink",icon:"e-edit-link",tooltip:"Edit Link",command:"Images",subCommand:"EditImageLink"},removeimagelink:{id:"RemoveImageLink",icon:"e-remove-link",tooltip:"Remove Link",command:"Images",subCommand:"RemoveImageLink"},insertlink:{id:"InsertLink",icon:"e-insert-link",tooltip:"Insert Link",command:"Images",subCommand:"InsertLink"},display:{id:"Display",icon:"e-display",tooltip:"Display",command:"Images",subCommand:"Display"},alttext:{id:"AltText",icon:"e-alt-text",tooltip:"Alternative Text",command:"Images",subCommand:"AltText"},dimension:{id:"Dimension",icon:"e-img-dimension",tooltip:"Change Size",command:"Images",subCommand:"Dimension"},fullscreen:{id:"Maximize",icon:"e-maximize",tooltip:"Maximize",command:"View",subCommand:"Maximize"},maximize:{id:"Maximize",icon:"e-maximize",tooltip:"Maximize",command:"FullScreen",subCommand:"Maximize"},minimize:{id:"Minimize",icon:"e-minimize",tooltip:"Minimize",command:"FullScreen",subCommand:"Minimize"},lowercase:{id:"LowerCase",icon:"e-lower-case",tooltip:"Lower Case",command:"Casing",subCommand:"LowerCase"},uppercase:{id:"UpperCase",icon:"e-upper-case",tooltip:"Upper Case",command:"Casing",subCommand:"UpperCase"},print:{id:"Print",icon:"e-print",tooltip:"Print",command:"Print",subCommand:"Print"},formats:{id:"Formats",icon:"e-formats",tooltip:"Formats",command:"Formats",subCommand:"Formats"},sourcecode:{id:"SourceCode",icon:"e-source-code",tooltip:"Source Code",command:"SourceCode",subCommand:"SourceCode"},preview:{id:"Preview",icon:"e-preview",tooltip:"Preview",command:"Preview",subCommand:"Preview"},viewside:{id:"ViewSide",icon:"e-view-side",tooltip:"ViewSide",command:"ViewSide",subCommand:"ViewSide"},insertcode:{id:"InsertCode",icon:"e-insert-code",tooltip:"Insert Code",command:"Formats",subCommand:"Pre"},tableheader:{id:"TableHeader",icon:"e-table-header",tooltip:"Table Header",command:"Table",subCommand:"TableHeader"},tableremove:{id:"TableRemove",icon:"e-table-remove",tooltip:"Table Remove",command:"Table",subCommand:"TableRemove"},tablerows:{id:"TableRows",icon:"e-table-rows",tooltip:"Table Rows",command:"Table",subCommand:"TableRows"},tablecolumns:{id:"TableColumns",icon:"e-table-columns",tooltip:"Table Columns",command:"Table",subCommand:"TableColumns"},tablecell:{id:"TableCell",icon:"e-table-cell",tooltip:"Table Cell",command:"Table",subCommand:"TableCell"},tablecellbackground:{id:"TableCellBackground",icon:"e-table-cell-background",tooltip:"Table Cell Background",command:"Table",subCommand:"TableCellBackground"},tablecellhorizontalalign:{id:"TableCellHorizontalAlign",icon:"e-table-cell-horizontalAlign",tooltip:"Table Cell HorizontalAlign",command:"Table",subCommand:"TableCellHorizontalAlign"},tablecellverticalalign:{id:"TableCellVerticalAlign",icon:"e-table-cell-verticalAlign",tooltip:"Table Cell VerticalAlign",command:"Table",subCommand:"TableCellVerticalAlign"},tableeditproperties:{id:"TableEditProperties",icon:"e-table-edit-properties",tooltip:"Table Edit Properties",command:"Table",subCommand:"TableEditProperties"},styles:{id:"Styles",icon:"e-table-styles",tooltip:"Styles",command:"Table",subCommand:"Styles"},formatpainter:{id:"FormatPainter",icon:"e-rte-format-painter",tooltip:"Format Painter",command:"FormatPainter",subCommand:"FormatPainter"},emojipicker:{id:"EmojiPicker",icon:"e-emoji",tooltip:"Emoji Icon",command:"EmojiPicker",subCommand:"EmojiPicker"}},a=[{locale:"alignmentsDropDownLeft",value:"JustifyLeft"},{locale:"alignmentsDropDownCenter",value:"JustifyCenter"},{locale:"alignmentsDropDownRight",value:"JustifyRight"},{locale:"alignmentsDropDownJustify",value:"JustifyFull"}],l=[{iconCss:"e-icons e-justify-left",text:"Align Left",command:"Alignments",subCommand:"JustifyLeft"},{iconCss:"e-icons e-justify-center",text:"Align Center",command:"Alignments",subCommand:"JustifyCenter"},{iconCss:"e-icons e-justify-right",text:"Align Right",command:"Alignments",subCommand:"JustifyRight"},{iconCss:"e-icons e-justify-full",text:"Align Justify",command:"Alignments",subCommand:"JustifyFull"}],d=[{iconCss:"e-icons e-justify-left",command:"Images",subCommand:"JustifyLeft"},{iconCss:"e-icons e-justify-center",command:"Images",subCommand:"JustifyCenter"},{iconCss:"e-icons e-justify-right",command:"Images",subCommand:"JustifyRight"}],c=[{iconCss:"e-icons e-justify-left",command:"Videos",subCommand:"JustifyLeft"},{iconCss:"e-icons e-justify-center",command:"Videos",subCommand:"JustifyCenter"},{iconCss:"e-icons e-justify-right",command:"Videos",subCommand:"JustifyRight"}],u=[{locale:"imageDisplayDropDownInline",value:"Inline"},{locale:"imageDisplayDropDownBreak",value:"Break"}],h=[{locale:"audioLayoutOptionDropDownInline",value:"Inline"},{locale:"audioLayoutOptionDropDownBreak",value:"Break"}],p=[{locale:"videoLayoutOptionDropDownInline",value:"Inline"},{locale:"videoLayoutOptionDropDownBreak",value:"Break"}],m=[{text:"Inline",cssClass:"e-inline",command:"Images",subCommand:"Inline"},{text:"Break",cssClass:"e-break",command:"Images",subCommand:"Break"}],f=[{text:"Inline",cssClass:"e-audio-inline",command:"Audios",subCommand:"Inline"},{text:"Break",cssClass:"e-audio-break",command:"Audios",subCommand:"Break"}],g=[{text:"Inline",cssClass:"e-video-inline",command:"Videos",subCommand:"Inline"},{text:"Break",cssClass:"e-video-break",command:"Videos",subCommand:"Break"}],b=[{iconCss:"e-icons e-cell-merge",text:"Merge cells",command:"Table",subCommand:"Merge"},{iconCss:"e-icons e-cell-horizontal-split",text:"Horizontal split",command:"Table",subCommand:"HorizontalSplit"},{iconCss:"e-icons e-cell-vertical-split",text:"Vertical split",command:"Table",subCommand:"VerticalSplit"}],v=[{locale:"tableInsertRowDropDownBefore",value:"InsertRowBefore"},{locale:"tableInsertRowDropDownAfter",value:"InsertRowAfter"},{locale:"tableInsertRowDropDownDelete",value:"DeleteRow"}],C=[{iconCss:"e-icons e-insert-row-before",text:"Insert row before",command:"Table",subCommand:"InsertRowBefore"},{iconCss:"e-icons e-insert-row-after",text:"Insert row after",command:"Table",subCommand:"InsertRowAfter"},{iconCss:"e-icons e-delete-row",text:"Delete row",command:"Table",subCommand:"DeleteRow"}],y=[{locale:"tableInsertColumnDropDownLeft",value:"InsertColumnLeft"},{locale:"tableInsertColumnDropDownRight",value:"InsertColumnRight"},{locale:"tableInsertColumnDropDownDelete",value:"DeleteColumn"}],N=[{iconCss:"e-icons e-insert-column-left",text:"Insert column left",command:"Table",subCommand:"InsertColumnLeft"},{iconCss:"e-icons e-insert-column-right",text:"Insert column right",command:"Table",subCommand:"InsertColumnRight"},{iconCss:"e-icons e-delete-column",text:"Delete column",command:"Table",subCommand:"DeleteColumn"}],E=[{locale:"tableVerticalAlignDropDownTop",value:"AlignTop"},{locale:"tableVerticalAlignDropDownMiddle",value:"AlignMiddle"},{locale:"tableVerticalAlignDropDownBottom",value:"AlignBottom"}],S=[{iconCss:"e-icons e-align-top",text:"Align Top",command:"Table",subCommand:"AlignTop"},{iconCss:"e-icons e-align-middle",text:"Align Middle",command:"Table",subCommand:"AlignMiddle"},{iconCss:"e-icons e-align-bottom",text:"Align Bottom",command:"Table",subCommand:"AlignBottom"}],T=[{locale:"tableStylesDropDownDashedBorder",value:"Dashed"},{locale:"tableStylesDropDownAlternateRows",value:"Alternate"}],O=[{text:"Dashed Borders",cssClass:"e-dashed-borders",command:"Table",subCommand:"Dashed"},{text:"Alternate Rows",cssClass:"e-alternate-rows",command:"Table",subCommand:"Alternate"}],k=["Bold","Italic","Underline","|","Formats","Alignments","OrderedList","UnorderedList","|","CreateLink","Image","|","SourceCode","Undo","Redo"],w=[{cssClass:"e-segoe-ui",text:"Segoe UI",command:"Font",subCommand:"FontName",value:"Segoe UI"},{cssClass:"e-arial",text:"Arial",command:"Font",subCommand:"FontName",value:"Arial,Helvetica,sans-serif"},{cssClass:"e-georgia",text:"Georgia",command:"Font",subCommand:"FontName",value:"Georgia,serif"},{cssClass:"e-impact",text:"Impact",command:"Font",subCommand:"FontName",value:"Impact,Charcoal,sans-serif"},{cssClass:"e-tahoma",text:"Tahoma",command:"Font",subCommand:"FontName",value:"Tahoma,Geneva,sans-serif"},{cssClass:"e-times-new-roman",text:"Times New Roman",command:"Font",subCommand:"FontName",value:"Times New Roman,Times,serif"},{cssClass:"e-verdana",text:"Verdana",command:"Font",subCommand:"FontName",value:"Verdana,Geneva,sans-serif"}],L=[{text:"8 pt",value:"8pt"},{text:"10 pt",value:"10pt"},{text:"12 pt",value:"12pt"},{text:"14 pt",value:"14pt"},{text:"18 pt",value:"18pt"},{text:"24 pt",value:"24pt"},{text:"36 pt",value:"36pt"}],_=[{cssClass:"e-paragraph",text:"Paragraph",command:"Formats",subCommand:"P",value:"P"},{cssClass:"e-code",text:"Code",command:"Formats",subCommand:"Pre",value:"Pre"},{cssClass:"e-quote",text:"Quotation",command:"Formats",subCommand:"BlockQuote",value:"BlockQuote"},{cssClass:"e-h1",text:"Heading 1",command:"Formats",subCommand:"H1",value:"H1"},{cssClass:"e-h2",text:"Heading 2",command:"Formats",subCommand:"H2",value:"H2"},{cssClass:"e-h3",text:"Heading 3",command:"Formats",subCommand:"H3",value:"H3"},{cssClass:"e-h4",text:"Heading 4",command:"Formats",subCommand:"H4",value:"H4"}],x={Custom:["","#000000","#e7e6e6","#44546a","#4472c4","#ed7d31","#a5a5a5","#ffc000","#70ad47","#ff0000","#f2f2f2","#808080","#cfcdcd","#d5dce4","#d9e2f3","#fbe4d5","#ededed","#fff2cc","#e2efd9","#ffcccc","#d9d9d9","#595959","#aeaaaa","#acb9ca","#b4c6e7","#f7caac","#dbdbdb","#ffe599","#c5e0b3","#ff8080","#bfbfbf","#404040","#747070","#8496b0","#8eaadb","#f4b083","#c9c9c9","#ffd966","#a8d08d","#ff3333","#a6a6a6","#262626","#3b3838","#323e4f","#2f5496","#c45911","#7b7b7b","#bf8f00","#538135","#b30000","#7f7f7f","#0d0d0d","#161616","#212934","#1f3763","#823b0b","#525252","#7f5f00","#375623","#660000"]},D={Custom:["","#000000","#ffff00","#00ff00","#00ffff","#0000ff","#ff0000","#000080","#800080","#996633","#f2f2f2","#808080","#ffffcc","#b3ffb3","#ccffff","#ccccff","#ffcccc","#ccccff","#ff80ff","#f2e6d9","#d9d9d9","#595959","#ffff80","#80ff80","#b3ffff","#8080ff","#ff8080","#8080ff","#ff00ff","#dfbf9f","#bfbfbf","#404040","#ffff33","#33ff33","#33ffff","#3333ff","#ff3333","#0000b3","#b300b3","#c68c53","#a6a6a6","#262626","#e6e600","#00b300","#009999","#000099","#b30000","#000066","#660066","#86592d","#7f7f7f","#0d0d0d","#999900","#006600","#006666","#000066","#660000","#00004d","#4d004d","#734d26"]},M=[{text:"None",command:"Lists",subCommand:"NumberFormatList",value:"none"},{text:"Number",command:"Lists",subCommand:"NumberFormatList",value:"decimal"},{text:"Lower Greek",command:"Lists",subCommand:"NumberFormatList",value:"lowerGreek"},{text:"Lower Roman",command:"Lists",subCommand:"NumberFormatList",value:"lowerRoman"},{text:"Upper Alpha",command:"Lists",subCommand:"NumberFormatList",value:"upperAlpha"},{text:"Lower Alpha",command:"Lists",subCommand:"NumberFormatList",value:"lowerAlpha"},{text:"Upper Roman",command:"Lists",subCommand:"NumberFormatList",value:"upperRoman"}],R=[{text:"None",command:"Lists",subCommand:"BulletFormatList",value:"none"},{text:"Disc",command:"Lists",subCommand:"BulletFormatList",value:"disc"},{text:"Circle",command:"Lists",subCommand:"BulletFormatList",value:"circle"},{text:"Square",command:"Lists",subCommand:"BulletFormatList",value:"square"}],B={"Insert Link":"Ctrl+K","Insert Image":"Ctrl+Shift+I","Create Table":"Ctrl+Shift+E",Undo:"Ctrl+Z",Redo:"Ctrl+Y",Copy:"Ctrl+C",Cut:"Ctrl+X",Paste:"Ctrl+V",Bold:"Ctrl+B",Italic:"Ctrl+I",Underline:"Ctrl+U",Strikethrough:"Ctrl+Shift+S","Upper Case":"Ctrl+Shift+U","Lower Case":"Ctrl+Shift+L",Superscript:"Ctrl+Shift+=",Subscript:"Ctrl+=","Code View":"Ctrl+Shift+H",Maximize:"Ctrl+Shift+F",Minimize:"Esc","Clear Format":"Ctrl+Shift+R","Numbered List":"Ctrl+Shift+O","Bulleted List":"Ctrl+Alt+O","Number Format List":"Ctrl+Shift+O","Bullet Format List":"Ctrl+Alt+O","Insert Audio":"Ctrl+Shift+A","Insert Video":"Ctrl+Alt+V","Increase Indent":"Ctrl+]","Decrease Indent":"Ctrl+[","Decrease Fontsize":"Ctrl+Shift+<","Increase Fontsize":"Ctrl+Shift+>","Justify Center":"Ctrl+E","Justify Full":"Ctrl+J","Justify Left":"Ctrl+L","Justify Right":"Ctrl+R","Format Painter":"Alt+Shift+C, Alt+Shift+V"},A=[{name:"Smilies & People",code:"1F600",iconCss:"e-emoji",icons:[{code:"1F600",desc:"Grinning face"},{code:"1F603",desc:"Grinning face with big eyes"},{code:"1F604",desc:"Grinning face with smiling eyes"},{code:"1F606",desc:"Grinning squinting face"},{code:"1F605",desc:"Grinning face with sweat"},{code:"1F602",desc:"Face with tears of joy"},{code:"1F923",desc:"Rolling on the floor laughing"},{code:"1F60A",desc:"Smiling face with smiling eyes"},{code:"1F607",desc:"Smiling face with halo"},{code:"1F642",desc:"Slightly smiling face"},{code:"1F643",desc:"Upside-down face"},{code:"1F60D",desc:"Smiling face with heart-eyes"},{code:"1F618",desc:"Face blowing a kiss"},{code:"1F61B",desc:"Face with tongue"},{code:"1F61C",desc:"Winking face with tongue"},{code:"1F604",desc:"Grinning face with smiling eyes"},{code:"1F469",desc:"Woman"},{code:"1F468",desc:"Man"},{code:"1F467",desc:"Girl"},{code:"1F466",desc:"Boy"},{code:"1F476",desc:"Baby"},{code:"1F475",desc:"Old woman"},{code:"1F474",desc:"Old man"},{code:"1F46E",desc:"Police officer"},{code:"1F477",desc:"Construction worker"},{code:"1F482",desc:"Guard"},{code:"1F575",desc:"Detective"},{code:"1F9D1",desc:"Cook"}]},{name:"Animals & Nature",code:"1F435",iconCss:"e-animals",icons:[{code:"1F436",desc:"Dog face"},{code:"1F431",desc:"Cat face"},{code:"1F42D",desc:"Mouse face"},{code:"1F439",desc:"Hamster face"},{code:"1F430",desc:"Rabbit face"},{code:"1F98A",desc:"Fox face"},{code:"1F43B",desc:"Bear face"},{code:"1F43C",desc:"Panda face"},{code:"1F428",desc:"Koala"},{code:"1F42F",desc:"Tiger face"},{code:"1F981",desc:"Lion face"},{code:"1F42E",desc:"Cow face"},{code:"1F437",desc:"Pig face"},{code:"1F43D",desc:"Pig nose"},{code:"1F438",desc:"Frog face"},{code:"1F435",desc:"Monkey face"},{code:"1F649",desc:"Hear-no-evil monkey"},{code:"1F64A",desc:"Speak-no-evil monkey"},{code:"1F412",desc:"Monkey"},{code:"1F414",desc:"Chicken"},{code:"1F427",desc:"Penguin"},{code:"1F426",desc:"Bird"},{code:"1F424",desc:"Baby chick"},{code:"1F986",desc:"Duck"},{code:"1F985",desc:"Eagle"}]},{name:"Food & Drink",code:"1F347",iconCss:"e-food-and-drinks",icons:[{code:"1F34E",desc:"Red apple"},{code:"1F34C",desc:"Banana"},{code:"1F347",desc:"Grapes"},{code:"1F353",desc:"Strawberry"},{code:"1F35E",desc:"Bread"},{code:"1F950",desc:"Croissant"},{code:"1F955",desc:"Carrot"},{code:"1F354",desc:"Hamburger"},{code:"1F355",desc:"Pizza"},{code:"1F32D",desc:"Hot dog"},{code:"1F35F",desc:"French fries"},{code:"1F37F",desc:"Popcorn"},{code:"1F366",desc:"Soft ice cream"},{code:"1F367",desc:"Shaved ice"},{code:"1F36A",desc:"Cookie"},{code:"1F382",desc:"Birthday cake"},{code:"1F370",desc:"Shortcake"},{code:"1F36B",desc:"Chocolate bar"},{code:"1F369",desc:"Donut"},{code:"1F36E",desc:"Custard"},{code:"1F36D",desc:"Lollipop"},{code:"1F36C",desc:"Candy"},{code:"1F377",desc:"Wine glass"},{code:"1F37A",desc:"Beer mug"},{code:"1F37E",desc:"Bottle with popping cork"}]},{name:"Activities",code:"1F383",iconCss:"e-activities",icons:[{code:"26BD",desc:"Soccer ball"},{code:"1F3C0",desc:"Basketball"},{code:"1F3C8",desc:"American football"},{code:"26BE",desc:"Baseball"},{code:"1F3BE",desc:"Tennis"},{code:"1F3D0",desc:"Volleyball"},{code:"1F3C9",desc:"Rugby football"},{code:"1F3B1",desc:"Pool 8 ball"},{code:"1F3D3",desc:"Ping pong"},{code:"1F3F8",desc:"Badminton"},{code:"1F94A",desc:"Boxing glove"},{code:"1F3CA",desc:"Swimmer"},{code:"1F3CB",desc:"Weightlifter"},{code:"1F6B4",desc:"Bicyclist"},{code:"1F6F9",desc:"Skateboard"},{code:"1F3AE",desc:"Video game"},{code:"1F579",desc:"Joystick"},{code:"1F3CF",desc:"Cricket"},{code:"1F3C7",desc:"Horse racing"},{code:"1F3AF",desc:"Direct hit"},{code:"1F3D1",desc:"Field hockey"},{code:"1F3B0",desc:"Slot machine"},{code:"1F3B3",desc:"Bowling"},{code:"1F3B2",desc:"Game die"},{code:"265F",desc:"Chess pawn"}]},{name:"Travel & Places",code:"1F30D",iconCss:"e-travel-and-places",icons:[{code:"2708",desc:"Airplane"},{code:"1F697",desc:"Automobile"},{code:"1F695",desc:"Taxi"},{code:"1F6B2",desc:"Bicycle"},{code:"1F68C",desc:"Bus"},{code:"1F682",desc:"Locomotive"},{code:"1F6F3",desc:"Passenger ship"},{code:"1F680",desc:"Rocket"},{code:"1F681",desc:"Helicopter"},{code:"1F6A2",desc:"Ship"},{code:"1F3DF",desc:"Stadium"},{code:"1F54C",desc:"Mosque"},{code:"26EA",desc:"Church"},{code:"1F6D5",desc:"Hindu Temple"},{code:"1F3D4",desc:"Snow-capped mountain"},{code:"1F3EB",desc:"School"},{code:"1F30B",desc:"Volcano"},{code:"1F3D6",desc:"Beach with umbrella"},{code:"1F3DD",desc:"Desert island"},{code:"1F3DE",desc:"National park"},{code:"1F3F0",desc:"Castle"},{code:"1F5FC",desc:"Tokyo tower"},{code:"1F5FD",desc:"Statue of liberty"},{code:"26E9",desc:"Shinto shrine"},{code:"1F3EF",desc:"Japanese castle"},{code:"1F3A2",desc:"Roller coaster"}]},{name:"Objects",code:"1F507",iconCss:"e-objects",icons:[{code:"1F4A1",desc:"Light bulb"},{code:"1F526",desc:"Flashlight"},{code:"1F4BB",desc:"Laptop computer"},{code:"1F5A5",desc:"Desktop computer"},{code:"1F5A8",desc:"Printer"},{code:"1F4F7",desc:"Camera"},{code:"1F4F8",desc:"Camera with flash"},{code:"1F4FD",desc:"Film projector"},{code:"1F3A5",desc:"Movie camera"},{code:"1F4FA",desc:"Television"},{code:"1F4FB",desc:"Radio"},{code:"1F50B",desc:"Battery"},{code:"231A",desc:"Watch"},{code:"1F4F1",desc:"Mobile phone"},{code:"260E",desc:"Telephone"},{code:"1F4BE",desc:"Floppy disk"},{code:"1F4BF",desc:"Optical disk"},{code:"1F4C0",desc:"Digital versatile disc"},{code:"1F4BD",desc:"Computer disk"},{code:"1F3A7",desc:"Headphone"},{code:"1F3A4",desc:"Microphone"},{code:"1F3B6",desc:"Multiple musical notes"},{code:"1F4DA",desc:"Books"}]},{name:"Symbols",code:"1F3E7",iconCss:"e-symbols",icons:[{code:"274C",desc:"Cross mark"},{code:"2714",desc:"Check mark"},{code:"26A0",desc:"Warning sign"},{code:"1F6AB",desc:"Prohibited"},{code:"2139",desc:"Information"},{code:"267B",desc:"Recycling symbol"},{code:"1F6AD",desc:"No smoking"},{code:"1F4F5",desc:"No mobile phones"},{code:"1F6AF",desc:"No littering"},{code:"1F6B3",desc:"No bicycles"},{code:"1F6B7",desc:"No pedestrians"},{code:"2795",desc:"Plus"},{code:"2796",desc:"Minus"},{code:"2797",desc:"Divide"},{code:"2716",desc:"Multiplication"},{code:"1F4B2",desc:"Dollar banknote"},{code:"1F4AC",desc:"Speech balloon"},{code:"2755",desc:"White exclamation mark"},{code:"2754",desc:"White question mark"},{code:"2764",desc:"Red heart"}]}]},function(e,t){e.exports=r},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(){}return e.WrapBefore=function(e,t,n){return t.innerText=e.textContent,n?this.AppendBefore(t,e,!0):this.AppendBefore(t,e),e.parentNode&&e.parentNode.removeChild(e),t.childNodes[0]},e.Wrap=function(e,t){return this.AppendBefore(t,e),t.appendChild(e),e},e.unwrap=function(e){for(var t=e.parentNode,n=[];e.firstChild;null)n.push(t.insertBefore(e.firstChild,e));return t.removeChild(e),n},e.AppendBefore=function(e,t,n){return t.parentNode?n?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.insertBefore(e,t):t},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(0),r=(n.n(i),function(){function e(){this.startNodeName=[],this.endNodeName=[]}return e.prototype.saveInstance=function(e,t){return this.range=e.cloneRange(),this.rootNode=this.documentFromRange(e),this.body=t,this.startContainer=this.getNodeArray(e.startContainer,!0),this.endContainer=this.getNodeArray(e.endContainer,!1),this.startOffset=e.startOffset,this.endOffset=e.endOffset,this.html=this.body.innerHTML,this},e.prototype.documentFromRange=function(e){return 9===e.startContainer.nodeType?e.startContainer:e.startContainer.ownerDocument},e.prototype.getRange=function(e){var t=this.get(e),n=t&&t.rangeCount>0?t.getRangeAt(t.rangeCount-1):e.createRange();return n.startContainer!==e||n.endContainer!==e||n.startOffset||n.endOffset||(n.setStart(e.body,0),n.collapse(!0)),n},e.prototype.get=function(e){return e.defaultView.getSelection()},e.prototype.save=function(e,t){return e=e?e.cloneRange():this.getRange(t),this.saveInstance(e,t.body)},e.prototype.getIndex=function(e){var t,n=0;if(e=e.previousSibling||"BR"!==e.tagName?e.previousSibling:e){for(e.nodeType;e;null)t=e.nodeType,n++,t,e=e.previousSibling}return n},e.prototype.isChildNode=function(e,t){for(var n=0;n<t.childNodes.length;n++)if(e.indexOf(t.childNodes[n])>-1)return!0;return!1},e.prototype.getNode=function(e,t,n){return t!==e||3!==e.nodeType&&e.firstChild&&-1===n.indexOf(e.firstChild)&&!this.isChildNode(n,e)?-1===n.indexOf(e.firstChild)&&e.firstChild&&!this.isChildNode(n,e)?e.firstChild:e.nextSibling?e.nextSibling:e.parentNode?e.parentNode:null:null},e.prototype.getNodeCollection=function(e){var t=e.startContainer.childNodes[e.startOffset]||e.startContainer,n=e.endContainer.childNodes[e.endOffset>0?e.endOffset-1:e.endOffset]||e.endContainer;if((t===n||"BR"===t.nodeName&&t===e.endContainer.childNodes[e.endOffset])&&0===t.childNodes.length)return[t];if(e.startOffset===e.endOffset&&0!==e.startOffset&&"PRE"===e.startContainer.nodeName)return["BR"===t.nodeName||"#text"===t.nodeName?t:t.childNodes[0]];var i=[];do{-1===i.indexOf(t)&&i.push(t),t=this.getNode(t,n,i)}while(t);return i},e.prototype.getParentNodeCollection=function(e){return this.getParentNodes(this.getNodeCollection(e),e)},e.prototype.getParentNodes=function(e,t){e=e.reverse();for(var n=0;n<e.length;n++)-1!==e.indexOf(e[n].parentNode)||3===e[n].nodeType&&t.startContainer!==t.endContainer&&t.startContainer.parentNode!==t.endContainer.parentNode?(e.splice(n,1),n--):3===e[n].nodeType&&(e[n]=e[n].parentNode);return e},e.prototype.getSelectionNodeCollection=function(e){return this.getSelectionNodes(this.getNodeCollection(e))},e.prototype.getSelectionNodeCollectionBr=function(e){return this.getSelectionNodesBr(this.getNodeCollection(e))},e.prototype.getSelectionNodes=function(e){e=e.reverse();for(var t=new RegExp(String.fromCharCode(8203),"g"),n=0;n<e.length;n++)(3!==e[n].nodeType||""===e[n].textContent.trim()||1===e[n].textContent.length&&e[n].textContent.match(t))&&(e.splice(n,1),n--);return e.reverse()},e.prototype.getSelectionNodesBr=function(e){e=e.reverse();for(var t=new RegExp(String.fromCharCode(8203),"g"),n=0;n<e.length;n++)"BR"!==e[n].nodeName&&(3!==e[n].nodeType||""===e[n].textContent.trim()||1===e[n].textContent.length&&e[n].textContent.match(t))&&(e.splice(n,1),n--);return e.reverse()},e.prototype.getInsertNodeCollection=function(e){return this.getInsertNodes(this.getNodeCollection(e))},e.prototype.getInsertNodes=function(e){e=e.reverse();for(var t=0;t<e.length;t++)(0!==e[t].childNodes.length&&3!==e[t].nodeType||3===e[t].nodeType&&""===e[t].textContent)&&(e.splice(t,1),t--);return e.reverse()},e.prototype.getNodeArray=function(e,t,r){var o=[];for(t?this.startNodeName=[]:this.endNodeName=[];e!==(r||this.rootNode)&&!n.i(i.isNullOrUndefined)(e);null)t?this.startNodeName.push(e.nodeName.toLowerCase()):this.endNodeName.push(e.nodeName.toLowerCase()),o.push(this.getIndex(e)),e=e.parentNode;return o},e.prototype.setRangePoint=function(e,t,n,i){for(var r=this.rootNode,o=n.length,s=i;o--;null)r=r&&r.childNodes[n[o]];return r&&s>=0&&"html"!==r.nodeName&&(3===r.nodeType&&" "===r.nodeValue.replace(/\u00a0/g," ")&&(s=r.textContent.length),e[t?"setStart":"setEnd"](r,s)),e},e.prototype.restore=function(){var e=this.range.cloneRange();return e=this.setRangePoint(e,!0,this.startContainer,this.startOffset),e=this.setRangePoint(e,!1,this.endContainer,this.endOffset),this.selectRange(this.rootNode,e),e},e.prototype.selectRange=function(e,t){this.setRange(e,t),this.save(t,e)},e.prototype.setRange=function(e,t){var n=this.get(e);n.removeAllRanges(),n.addRange(t)},e.prototype.setSelectionText=function(e,t,n,i,r){var o=e.createRange();o.setStart(t,i),o.setEnd(n,r),this.setRange(e,o)},e.prototype.setSelectionContents=function(e,t){var n=e.createRange();n.selectNode(t),this.setRange(e,n)},e.prototype.setSelectionNode=function(e,t){var n=e.createRange();n.selectNodeContents(t),this.setRange(e,n)},e.prototype.getSelectedNodes=function(e){return this.getNodeCollection(this.getRange(e))},e.prototype.Clear=function(e){this.get(e).removeAllRanges()},e.prototype.insertParentNode=function(e,t,n){n.surroundContents(t),this.selectRange(e,n)},e.prototype.setCursorPoint=function(e,t,n){var i=e.createRange(),r=e.defaultView.getSelection();i.setStart(t,n),i.collapse(!0),r.removeAllRanges(),r.addRange(i)},e}())},function(e,t,n){"use strict";n.d(t,"r",function(){return i}),n.d(t,"s",function(){return r}),n.d(t,"t",function(){return o}),n.d(t,"i",function(){return s}),n.d(t,"g",function(){return a}),n.d(t,"h",function(){return l}),n.d(t,"v",function(){return d}),n.d(t,"o",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"q",function(){return h}),n.d(t,"x",function(){return p}),n.d(t,"w",function(){return m}),n.d(t,"u",function(){return f}),n.d(t,"m",function(){return g}),n.d(t,"p",function(){return b}),n.d(t,"b",function(){return v}),n.d(t,"l",function(){return C}),n.d(t,"c",function(){return y}),n.d(t,"k",function(){return N}),n.d(t,"j",function(){return E}),n.d(t,"a",function(){return S}),n.d(t,"n",function(){return T}),n.d(t,"e",function(){return O}),n.d(t,"d",function(){return k});var i="e-imgright",r="e-imgleft",o="e-imgcenter",s="e-video-right",a="e-video-left",l="e-video-center",d="e-imgbreak",c="e-audio-break",u="e-video-break",h="e-img-caption",p="e-rte-img-caption",m="e-caption-inline",f="e-imginline",g="e-audio-inline",b="e-clickelem",v="e-video-clickelem",C="e-rte-audio",y="e-rte-video",N="e-audio-wrap",E="e-video-wrap",S="e-embed-video-wrap",T="e-audio-focus",O="e-video-focus",k="e-video-inline"},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(){}return e.prototype.getFormattedNode=function(e,t,n){var i=this.getFormatParent(e,t,n);return null!==i&&i!==n?i:null},e.prototype.getFormatParent=function(e,t,n){do{e=e.parentNode}while(e&&e!==n&&!this.isFormattedNode(e,t));return e},e.prototype.isFormattedNode=function(t,n){switch(n){case"bold":return e.isBold(t);case"italic":return e.isItalic(t);case"underline":return e.isUnderline(t);case"strikethrough":return e.isStrikethrough(t);case"superscript":return e.isSuperscript(t);case"subscript":return e.isSubscript(t);case"fontcolor":return this.isFontColor(t);case"fontname":return this.isFontName(t);case"fontsize":return this.isFontSize(t);case"backgroundcolor":return this.isBackgroundColor(t);default:return!1}},e.isBold=function(e){return-1!==["strong","b"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"bold"!==e.style.fontWeight)},e.isItalic=function(e){return-1!==["em","i"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"italic"!==e.style.fontStyle)},e.isUnderline=function(e){return-1!==["u"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"underline"!==e.style.textDecoration&&"underline"!==e.style.textDecorationLine)},e.isStrikethrough=function(e){return-1!==["del","strike"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"line-through"!==e.style.textDecoration&&"line-through"!==e.style.textDecorationLine)},e.isSuperscript=function(e){return-1!==["sup"].indexOf(e.nodeName.toLowerCase())},e.isSubscript=function(e){return-1!==["sub"].indexOf(e.nodeName.toLowerCase())},e.prototype.isFontColor=function(t){var n=t.style&&t.style.color;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.prototype.isBackgroundColor=function(t){var n=t.style&&t.style.backgroundColor;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.prototype.isFontSize=function(t){var n=t.style&&t.style.fontSize;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.prototype.isFontName=function(t){var n=t.style&&t.style.fontFamily;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.inlineTags=["a","abbr","acronym","b","bdo","big","cite","code","dfn","em","font","i","kbd","label","q","samp","small","span","strong","sub","sup","tt","u","var","del"],e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(){}return e.prototype.getLineNumber=function(e,t){return e.value.substr(0,t).split("\n").length},e.prototype.getSelectedText=function(e){var t=e.selectionStart,n=e.selectionEnd;return e.value.substring(t,n)},e.prototype.getAllParents=function(e){return e.split("\n")},e.prototype.getSelectedLine=function(e){return this.getAllParents(e.value)[this.getLineNumber(e,e.selectionStart)-1]},e.prototype.getLine=function(e,t){return this.getAllParents(e.value)[t]},e.prototype.getSelectedParentPoints=function(e){var t=this.getAllParents(e.value),n=this.getLineNumber(e,e.selectionStart),i=this.getLineNumber(e,e.selectionEnd),r=this.getSelectedText(e).split("\n"),o=[],s=t[n-1],a=t.slice(0,n-1).join("").length,l={};if(l.line=n-1,l.start=a+l.line,l.end=""!==s?l.start+s.length+1:l.start+s.length,l.text=s,o.push(l),r.length>1){for(var d=1;d<r.length-1;d++){var c={};c.line=o[d-1].line+1,c.start=(r[d],o[d-1].end),c.end=c.start+r[d].length+1,c.text=r[d],o.push(c)}var u={};u.line=o[o.length-1].line+1,u.start=o[o.length-1].end,u.end=u.start+t[i-1].length+1,u.text=t[i-1],o.push(u)}return o},e.prototype.setSelection=function(e,t,n){e.setSelectionRange(t,n),e.focus()},e.prototype.save=function(e,t){this.selectionStart=e,this.selectionEnd=t},e.prototype.restore=function(e){this.setSelection(e,this.selectionStart,this.selectionEnd)},e.prototype.isStartWith=function(e,t){var n=!1;if(e){n=(e.trim()===t.trim()?new RegExp("^("+this.replaceSpecialChar(t.trim())+")","gim"):new RegExp("^("+this.replaceSpecialChar(t)+")","gim")).test(e.trim())}return n},e.prototype.replaceSpecialChar=function(e){return e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/g,"\\$&")},e.prototype.isClear=function(e,t){for(var n=0;n<e.length;n++)if(new RegExp(t,"gim").test(e[n].text))return!0;return!1},e.prototype.getSelectedInlinePoints=function(e){return{start:e.selectionStart,end:e.selectionEnd,text:this.getSelectedText(e)}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(5),r=n(2),o=n(1),s=n(4),a=n(17),l=n(0),d=(n.n(l),function(){function e(e,t){this.tools={},this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?n.i(l.extend)(this.tools,a.v,n.i(s.o)(this.parent.toolbarSettings.itemConfigs),!0):this.tools=a.v}return e.prototype.addEventListener=function(){this.parent.on(o._38,this.setRtl,this),this.parent.on(o._89,this.setCssClass,this),this.parent.on(o.i,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off(o._38,this.setRtl),this.parent.off(o._89,this.setCssClass),this.parent.off(o.i,this.removeEventListener)},e.prototype.setCssClass=function(e){n.i(l.isNullOrUndefined)(this.toolbarObj)||(n.i(l.isNullOrUndefined)(e.oldCssClass)?this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass+" "+e.cssClass).trim()}):this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass.replace(e.oldCssClass,"").trim()+" "+e.cssClass).trim()}))},e.prototype.setRtl=function(e){n.i(l.isNullOrUndefined)(this.toolbarObj)||this.toolbarObj.setProperties({enableRtl:e.enableRtl})},e.prototype.getClass=function(e){var t;switch(e){case"fontsize":t="e-rte-inline-size-template";break;case"fontcolor":case"backgroundcolor":t="e-rte-inline-color-template";break;default:t="e-rte-inline-template"}return t},e.prototype.getTemplateObject=function(e,t){var i;switch(e){case"fontcolor":case"backgroundcolor":case"numberformatlist":case"bulletformatlist":i="span";break;default:i="button"}return{command:this.tools[e.toLocaleLowerCase()].command,subCommand:this.tools[e.toLocaleLowerCase()].subCommand,template:this.parent.createElement(i,{id:this.parent.getID()+"_"+t+"_"+this.tools[e.toLocaleLowerCase()].id}).outerHTML,cssClass:this.parent.inlineMode.enable?this.getClass(e):"",tooltipText:n.i(s.g)(e,this.locator)}},e.prototype.getObject=function(e,t){var i=e.toLowerCase();if(-1!==a.l.indexOf(i))return this.getTemplateObject(i,t);switch(i){case"|":return{type:"Separator"};case"-":return{type:"Separator",cssClass:r._14};default:return this.parent.showTooltip?{id:this.parent.getID()+"_"+t+"_"+this.tools[i.toLocaleLowerCase()].id,prefixIcon:this.tools[i.toLocaleLowerCase()].icon,tooltipText:n.i(s.g)(i,this.locator),command:this.tools[i.toLocaleLowerCase()].command,subCommand:this.tools[i.toLocaleLowerCase()].subCommand}:{id:this.parent.getID()+"_"+t+"_"+this.tools[i.toLocaleLowerCase()].id,prefixIcon:this.tools[i.toLocaleLowerCase()].icon,command:this.tools[i.toLocaleLowerCase()].command,subCommand:this.tools[i.toLocaleLowerCase()].subCommand}}},e.prototype.getItems=function(e,t){var i=this;if(this.parent.toolbarSettings.items.length<1)return[];for(var r=[],o=this,d=0,c=e;d<c.length;d++){var u=c[d];!function(e){switch(typeof e){case"string":r.push(o.getObject(e,t));break;default:if(!n.i(l.isNullOrUndefined)(e.click)){var s=e,a=s.click;s.click=function(){s.undo&&0===i.parent.formatter.getUndoRedoStack().length&&i.parent.formatter.saveData(),a.call(i);var e=i.parent.createElement("div");e.appendChild(i.parent.formatter.getUndoRedoStack()[i.parent.formatter.getUndoRedoStack().length-1].text),e.innerHTML.trim()!==i.parent.inputElement.innerHTML.trim()&&s.undo&&i.parent.formatter.saveData()}}r.push(e)}}(u)}for(var h=0;h<r.length;h++){var p=r[h].tooltipText,m=void 0;m=a.w[""+p]?l.Browser.isDevice&&n.i(s.d)()?a.w[""+p].replace("Ctrl","Cmd"):a.w[""+p]:p,m&&(r[h].tooltipText=p!==m?p+" ("+m+")":p)}return r},e.prototype.getToolbarOptions=function(e){return{target:e.target,rteToolbarObj:this,items:this.getItems(e.items,e.container),overflowMode:e.mode,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,cssClass:e.cssClass}},e.prototype.render=function(e){this.toolbarRenderer=this.renderFactory.getRenderer(i.a.Toolbar),this.toolbarRenderer.renderToolbar(this.getToolbarOptions(e))},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return d}),n.d(t,"f",function(){return c}),n.d(t,"g",function(){return u}),n.d(t,"h",function(){return h}),n.d(t,"j",function(){return p}),n.d(t,"i",function(){return m}),n.d(t,"b",function(){return f}),n.d(t,"d",function(){return g}),n.d(t,"e",function(){return b}),n.d(t,"c",function(){return v}),n.d(t,"n",function(){return C}),n.d(t,"o",function(){return y}),n.d(t,"k",function(){return N}),n.d(t,"p",function(){return E}),n.d(t,"q",function(){return S}),n.d(t,"l",function(){return T}),n.d(t,"m",function(){return O});var i=n(0),r=(n.n(i),n(13)),o=(n.n(r),n(5)),s=n(17),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(!0)],t.prototype,"enable",void 0),l([n.i(i.Property)(!0)],t.prototype,"enableFloating",void 0),l([n.i(i.Property)(o.b.Expand)],t.prototype,"type",void 0),l([n.i(i.Property)(s.f)],t.prototype,"items",void 0),l([n.i(i.Property)({})],t.prototype,"itemConfigs",void 0),t}(i.ChildProperty),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)([".jpeg",".jpg",".png"])],t.prototype,"allowedTypes",void 0),l([n.i(i.Property)("inline")],t.prototype,"display",void 0),l([n.i(i.Property)("Blob")],t.prototype,"saveFormat",void 0),l([n.i(i.Property)("auto")],t.prototype,"width",void 0),l([n.i(i.Property)("auto")],t.prototype,"height",void 0),l([n.i(i.Property)(null)],t.prototype,"saveUrl",void 0),l([n.i(i.Property)(null)],t.prototype,"path",void 0),l([n.i(i.Property)(!0)],t.prototype,"resize",void 0),l([n.i(i.Property)(null)],t.prototype,"removeUrl",void 0),l([n.i(i.Property)(0)],t.prototype,"minWidth",void 0),l([n.i(i.Property)(null)],t.prototype,"maxWidth",void 0),l([n.i(i.Property)(0)],t.prototype,"minHeight",void 0),l([n.i(i.Property)(null)],t.prototype,"maxHeight",void 0),l([n.i(i.Property)(!1)],t.prototype,"resizeByPercent",void 0),t}(i.ChildProperty),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)([".wav",".mp3",".m4a",".wma"])],t.prototype,"allowedTypes",void 0),l([n.i(i.Property)("Inline")],t.prototype,"layoutOption",void 0),l([n.i(i.Property)("Blob")],t.prototype,"saveFormat",void 0),l([n.i(i.Property)(null)],t.prototype,"saveUrl",void 0),l([n.i(i.Property)(null)],t.prototype,"removeUrl",void 0),l([n.i(i.Property)(null)],t.prototype,"path",void 0),t}(i.ChildProperty),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)([".mp4",".mov",".wmv",".avi"])],t.prototype,"allowedTypes",void 0),l([n.i(i.Property)("Inline")],t.prototype,"layoutOption",void 0),l([n.i(i.Property)("Blob")],t.prototype,"saveFormat",void 0),l([n.i(i.Property)("auto")],t.prototype,"width",void 0),l([n.i(i.Property)("auto")],t.prototype,"height",void 0),l([n.i(i.Property)(null)],t.prototype,"saveUrl",void 0),l([n.i(i.Property)(null)],t.prototype,"path",void 0),l([n.i(i.Property)(!0)],t.prototype,"resize",void 0),l([n.i(i.Property)(null)],t.prototype,"removeUrl",void 0),l([n.i(i.Property)(0)],t.prototype,"minWidth",void 0),l([n.i(i.Property)(null)],t.prototype,"maxWidth",void 0),l([n.i(i.Property)(0)],t.prototype,"minHeight",void 0),l([n.i(i.Property)(null)],t.prototype,"maxHeight",void 0),l([n.i(i.Property)(!1)],t.prototype,"resizeByPercent",void 0),t}(i.ChildProperty),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Event)()],t.prototype,"beforeSend",void 0),l([n.i(i.Complex)({getImageUrl:null,url:null,uploadUrl:null},r.AjaxSettings)],t.prototype,"ajaxSettings",void 0),l([n.i(i.Property)(!1)],t.prototype,"allowDragAndDrop",void 0),l([n.i(i.Complex)({visible:!0,file:["Open","|","Cut","Copy","|","Delete","Rename","|","Details"],folder:["Open","|","Cut","Copy","Paste","|","Delete","Rename","|","Details"],layout:["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"]},r.ContextMenuSettings)],t.prototype,"contextMenuSettings",void 0),l([n.i(i.Property)("")],t.prototype,"cssClass",void 0),l([n.i(i.Complex)({},r.DetailsViewSettings)],t.prototype,"detailsViewSettings",void 0),l([n.i(i.Property)(!1)],t.prototype,"enable",void 0),l([n.i(i.Complex)({maxWidth:"650px",minWidth:"240px",visible:!0},r.NavigationPaneSettings)],t.prototype,"navigationPaneSettings",void 0),l([n.i(i.Property)("/")],t.prototype,"path",void 0),l([n.i(i.Property)(null)],t.prototype,"rootAliasName",void 0),l([n.i(i.Complex)({},r.SearchSettings)],t.prototype,"searchSettings",void 0),l([n.i(i.Property)(!0)],t.prototype,"showFileExtension",void 0),l([n.i(i.Property)(!1)],t.prototype,"showHiddenItems",void 0),l([n.i(i.Property)(!0)],t.prototype,"showThumbnail",void 0),l([n.i(i.Property)("Ascending")],t.prototype,"sortOrder",void 0),l([n.i(i.Complex)({visible:!0,items:["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"]},r.ToolbarSettings)],t.prototype,"toolbarSettings",void 0),l([n.i(i.Complex)({autoUpload:!0,minFileSize:0,maxFileSize:3e7,allowedExtensions:"",autoClose:!1},r.UploadSettings)],t.prototype,"uploadSettings",void 0),l([n.i(i.Property)("LargeIcons")],t.prototype,"view",void 0),t}(i.ChildProperty),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)("100%")],t.prototype,"width",void 0),l([n.i(i.Property)(s.g)],t.prototype,"styles",void 0),l([n.i(i.Property)(!0)],t.prototype,"resize",void 0),l([n.i(i.Property)(0)],t.prototype,"minWidth",void 0),l([n.i(i.Property)(null)],t.prototype,"maxWidth",void 0),t}(i.ChildProperty),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(!0)],t.prototype,"enable",void 0),l([n.i(i.Property)(!1)],t.prototype,"showOnRightClick",void 0),l([n.i(i.Property)("hide")],t.prototype,"actionOnScroll",void 0),l([n.i(i.Property)(["Open","Edit","UnLink"])],t.prototype,"link",void 0),l([n.i(i.Property)(["Replace","Align","Caption","Remove","-","InsertLink","OpenImageLink","EditImageLink","RemoveImageLink","Display","AltText","Dimension"])],t.prototype,"image",void 0),l([n.i(i.Property)(["AudioReplace","AudioRemove","AudioLayoutOption"])],t.prototype,"audio",void 0),l([n.i(i.Property)(["VideoReplace","VideoAlign","VideoRemove","VideoLayoutOption","VideoDimension"])],t.prototype,"video",void 0),l([n.i(i.Property)(null)],t.prototype,"text",void 0),l([n.i(i.Property)(["TableHeader","TableRows","TableColumns","BackgroundColor","-","TableRemove","Alignments","TableCellVerticalAlign","Styles"])],t.prototype,"table",void 0),t}(i.ChildProperty),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)("b; em; font; sub; sup; kbd; i; s; u; code; strong; span; p; div; h1; h2; h3; h4; h5; h6; blockquote; ol; ul; li; pre;")],t.prototype,"allowedFormats",void 0),l([n.i(i.Property)(null)],t.prototype,"deniedFormats",void 0),t}(i.ChildProperty),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(s.h)],t.prototype,"iconsSet",void 0),l([n.i(i.Property)(!0)],t.prototype,"showSearchBox",void 0),t}(i.ChildProperty),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(!1)],t.prototype,"prompt",void 0),l([n.i(i.Property)(null)],t.prototype,"deniedAttrs",void 0),l([n.i(i.Property)(["background","background-color","border","border-bottom","border-left","border-radius","border-right","border-style","border-top","border-width","clear","color","cursor","direction","display","float","font","font-family","font-size","font-weight","font-style","height","left","line-height","list-style-type","margin","margin-top","margin-left","margin-right","margin-bottom","max-height","max-width","min-height","min-width","overflow","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","position","right","table-layout","text-align","text-decoration","text-indent","top","vertical-align","visibility","white-space","width"])],t.prototype,"allowedStyleProps",void 0),l([n.i(i.Property)(null)],t.prototype,"deniedTags",void 0),l([n.i(i.Property)(!0)],t.prototype,"keepFormat",void 0),l([n.i(i.Property)(!1)],t.prototype,"plainText",void 0),t}(i.ChildProperty),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(null)],t.prototype,"default",void 0),l([n.i(i.Property)("65px")],t.prototype,"width",void 0),l([n.i(i.Property)(s.b)],t.prototype,"items",void 0),t}(i.ChildProperty),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(null)],t.prototype,"default",void 0),l([n.i(i.Property)("35px")],t.prototype,"width",void 0),l([n.i(i.Property)(s.i)],t.prototype,"items",void 0),t}(i.ChildProperty),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(null)],t.prototype,"default",void 0),l([n.i(i.Property)("65px")],t.prototype,"width",void 0),l([n.i(i.Property)(s.c)],t.prototype,"types",void 0),t}(i.ChildProperty),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)("#ff0000")],t.prototype,"default",void 0),l([n.i(i.Property)("Palette")],t.prototype,"mode",void 0),l([n.i(i.Property)(10)],t.prototype,"columns",void 0),l([n.i(i.Property)(s.j)],t.prototype,"colorCode",void 0),l([n.i(i.Property)(!1)],t.prototype,"modeSwitcher",void 0),t}(i.ChildProperty),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)("#ffff00")],t.prototype,"default",void 0),l([n.i(i.Property)("Palette")],t.prototype,"mode",void 0),l([n.i(i.Property)(10)],t.prototype,"columns",void 0),l([n.i(i.Property)(s.k)],t.prototype,"colorCode",void 0),l([n.i(i.Property)(!1)],t.prototype,"modeSwitcher",void 0),t}(i.ChildProperty),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(s.d)],t.prototype,"types",void 0),t}(i.ChildProperty),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([n.i(i.Property)(s.e)],t.prototype,"types",void 0),t}(i.ChildProperty)},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(0),r=(n.n(i),n(5)),o=n(1),s=n(2),a=n(4),l=n(17),d=function(){function e(e,t){this.tools={},this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?n.i(i.extend)(this.tools,l.v,n.i(a.o)(this.parent.toolbarSettings.itemConfigs),!0):this.tools=l.v}return e.prototype.initializeInstance=function(){this.toolbarRenderer=this.renderFactory.getRenderer(r.a.Toolbar)},e.prototype.renderColorPickerInput=function(e){var t=this;this.initializeInstance();var r,o,d=e.containerType,c=e.container;l.l.forEach(function(l){if(-1!==n.i(a.a)(l,e.items))switch(l){case"fontcolor":r=t.parent.getID()+"_"+d+"_FontColor_Target";var u=t.parent.createElement("input");if(u.id=r,u.classList.add(s._23),!n.i(i.isNullOrUndefined)(t.parent.cssClass))for(var h=t.parent.cssClass.split(" "),p=0;p<h.length;p++)""!==h[p].trim()&&u.classList.add(h[p]);document.body.appendChild(u),o={cssClass:t.tools[l.toLocaleLowerCase()].icon+" "+s._12+" "+s._9+t.parent.getCssClass(!0),value:t.tools[l.toLocaleLowerCase()].value,command:t.tools[l.toLocaleLowerCase()].command,subCommand:t.tools[l.toLocaleLowerCase()].subCommand,element:n.i(i.select)("#"+t.parent.getID()+"_"+d+"_FontColor",c),target:r},t.fontColorPicker=t.toolbarRenderer.renderColorPicker(o,"fontcolor"),t.fontColorDropDown=t.toolbarRenderer.renderColorPickerDropDown(o,"fontcolor",t.fontColorPicker);break;case"backgroundcolor":r=t.parent.getID()+"_"+d+"_BackgroundColor_Target";var m=t.parent.createElement("input");if(m.id=r,m.classList.add(s._24),!n.i(i.isNullOrUndefined)(t.parent.cssClass))for(var h=t.parent.cssClass.split(" "),p=0;p<h.length;p++)""!==h[p].trim()&&m.classList.add(h[p]);document.body.appendChild(m),o={cssClass:t.tools[l.toLocaleLowerCase()].icon+" "+s._12+" "+s._9+t.parent.getCssClass(!0),value:t.tools[l.toLocaleLowerCase()].value,command:t.tools[l.toLocaleLowerCase()].command,subCommand:t.tools[l.toLocaleLowerCase()].subCommand,element:n.i(i.select)("#"+t.parent.getID()+"_"+d+"_BackgroundColor",c),target:r},t.backgroundColorPicker=t.toolbarRenderer.renderColorPicker(o,"backgroundcolor"),t.backgroundColorDropDown=t.toolbarRenderer.renderColorPickerDropDown(o,"backgroundcolor",t.backgroundColorPicker,t.defaultColorPicker)}}),this.parent.inlineMode.enable&&this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.destroy=function(){this.removeEventListener(),this.destroyColorPicker()},e.prototype.destroyColorPicker=function(){if(this.fontColorPicker&&!this.fontColorPicker.isDestroyed&&this.fontColorPicker.destroy(),this.backgroundColorPicker&&!this.backgroundColorPicker.isDestroyed&&this.backgroundColorPicker.destroy(),this.fontColorDropDown&&!this.fontColorDropDown.isDestroyed){var e=this.fontColorDropDown.element.querySelector(".e-rte-color-content");e&&n.i(i.detach)(e),this.fontColorDropDown.destroy()}if(this.backgroundColorDropDown&&!this.backgroundColorDropDown.isDestroyed){var e=this.backgroundColorDropDown.element.querySelector(".e-rte-color-content");e&&(this.defaultColorPicker=e.children[0].style.borderBottomColor,n.i(i.detach)(e)),this.backgroundColorDropDown.destroy()}},e.prototype.setRtl=function(e){this.fontColorPicker&&(this.fontColorPicker.setProperties({enableRtl:e.enableRtl}),this.fontColorDropDown.setProperties({enableRtl:e.enableRtl})),this.backgroundColorPicker&&(this.backgroundColorPicker.setProperties({enableRtl:e.enableRtl}),this.backgroundColorDropDown.setProperties({enableRtl:e.enableRtl}))},e.prototype.setCssClass=function(e){this.updateCss(this.fontColorPicker,this.fontColorDropDown,e),this.updateCss(this.backgroundColorPicker,this.backgroundColorDropDown,e)},e.prototype.updateCss=function(e,t,r){e&&r.cssClass&&(n.i(i.isNullOrUndefined)(r.oldCssClass)?(e.setProperties({cssClass:(e.cssClass+" "+r.cssClass).trim()}),t.setProperties({cssClass:(t.cssClass+" "+r.cssClass).trim()})):(e.setProperties({cssClass:(e.cssClass.replace(r.oldCssClass,"").replace(" "," ").trim()+" "+r.cssClass).trim()}),t.setProperties({cssClass:(t.cssClass.replace(r.oldCssClass,"").replace(" "," ").trim()+" "+r.cssClass).trim()})))},e.prototype.addEventListener=function(){this.parent.on(o.y,this.renderColorPickerInput,this),this.parent.on(o._38,this.setRtl,this),this.parent.on(o.i,this.destroy,this),this.parent.on(o.r,this.destroyColorPicker,this),this.parent.on(o.s,this.onPropertyChanged,this),this.parent.on(o._89,this.setCssClass,this)},e.prototype.onPropertyChanged=function(e){for(var t,n=e.newProp,i=0,r=Object.keys(n);i<r.length;i++){switch(r[i]){case"fontColor":if(this.fontColorPicker)for(var o=0,s=Object.keys(n.fontColor);o<s.length;o++){var a=s[o];switch(a){case"default":this.fontColorPicker.setProperties({value:n.fontColor.default}),t=this.fontColorDropDown.element;var l=t.querySelector("."+this.tools.fontcolor.icon);l.style.borderBottomColor=n.fontColor.default;break;case"mode":this.fontColorPicker.setProperties({mode:n.fontColor.mode});break;case"columns":this.fontColorPicker.setProperties({columns:n.fontColor.columns});break;case"colorCode":this.fontColorPicker.setProperties({presetColors:n.fontColor.colorCode});break;case"modeSwitcher":this.fontColorPicker.setProperties({modeSwitcher:n.fontColor.modeSwitcher})}}break;case"backgroundColor":if(this.backgroundColorPicker)for(var d=0,c=Object.keys(n.backgroundColor);d<c.length;d++){var u=c[d];switch(u){case"default":this.backgroundColorPicker.setProperties({value:n.backgroundColor.default}),t=this.backgroundColorDropDown.element;var h=t.querySelector("."+this.tools.backgroundcolor.icon);h.style.borderBottomColor=n.backgroundColor.default;break;case"mode":this.backgroundColorPicker.setProperties({mode:n.backgroundColor.mode});break;case"columns":this.backgroundColorPicker.setProperties({columns:n.backgroundColor.columns});break;case"colorCode":this.backgroundColorPicker.setProperties({presetColors:n.backgroundColor.colorCode});break;case"modeSwitcher":this.backgroundColorPicker.setProperties({modeSwitcher:n.backgroundColor.modeSwitcher})}}}}},e.prototype.removeEventListener=function(){this.parent.off(o.y,this.renderColorPickerInput),this.parent.off(o.i,this.destroy),this.parent.off(o._38,this.setRtl),this.parent.off(o.r,this.destroyColorPicker),this.parent.off(o.s,this.onPropertyChanged),this.parent.off(o._89,this.setCssClass)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(0),r=(n.n(i),n(5)),o=n(4),s=n(1),a=n(2),l=n(17),d=function(){function e(e,t){this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener()}return e.prototype.initializeInstance=function(){this.toolbarRenderer=this.renderFactory.getRenderer(r.a.Toolbar)},e.prototype.beforeRender=function(e){var t=e.item;t.cssClass&&n.i(i.addClass)([e.element],t.cssClass),"Alignments"!==t.command&&"JustifyLeft"!==t.subCommand&&"JustifyRight"!==t.subCommand&&"JustifyCenter"!==t.subCommand||e.element.setAttribute("title",n.i(o.g)(t.subCommand.toLocaleLowerCase(),this.locator))},e.prototype.dropdownContent=function(e,t,n){return'<span style="display: inline-flex;width:'+("quick"===t?"auto":e)+'" ><span class="e-rte-dropdown-btn-text">'+n+"</span></span>"},e.prototype.renderDropDowns=function(e){var t=this;this.initializeInstance();var r=e.containerType,s=e.container;l.l.forEach(function(d){var c=void 0;if(-1!==n.i(o.a)(d,e.items))switch(d){case"numberformatlist":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_NumberFormatList",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;var u=t.parent.numberFormatList.types.slice();u.forEach(function(e){Object.defineProperties(e,{command:{value:"Lists",enumerable:!0},subCommand:{value:"NumberFormatList",enumerable:!0}})}),t.numberFormatListDropDown=t.toolbarRenderer.renderListDropDown({cssClass:"e-order-list "+a._12+" "+a._9,itemName:"NumberFormatList",items:u,element:c});break;case"bulletformatlist":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_BulletFormatList",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;var h=t.parent.bulletFormatList.types.slice();h.forEach(function(e){Object.defineProperties(e,{command:{value:"Lists",enumerable:!0},subCommand:{value:"BulletFormatList",enumerable:!0}})}),t.bulletFormatListDropDown=t.toolbarRenderer.renderListDropDown({cssClass:"e-unorder-list "+a._12+" "+a._9,itemName:"BulletFormatList",items:h,element:c});break;case"formats":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_Formats",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;var p=t.parent.format.types.slice();p.forEach(function(e){Object.defineProperties(e,{command:{value:"Formats",enumerable:!0},subCommand:{value:e.value,enumerable:!0}})});var m=n.i(i.isNullOrUndefined)(t.parent.format.default)?p[0].text:t.parent.format.default;t.formatDropDown=t.toolbarRenderer.renderDropDownButton({iconCss:"quick"===r?"e-formats e-icons":"",content:t.dropdownContent(t.parent.format.width,r,"quick"===r?"":n.i(o.c)(p,m,"text","text")),cssClass:a.y+" "+a.A+" "+a._19,itemName:"Formats",items:p,element:c});break;case"fontname":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_FontName",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;var f=t.parent.fontFamily.items.slice();f.forEach(function(e){Object.defineProperties(e,{command:{value:"Font",enumerable:!0},subCommand:{value:"FontName",enumerable:!0}})});var g=n.i(i.isNullOrUndefined)(t.parent.fontFamily.default)?f[0].text:t.parent.fontFamily.default;t.fontNameDropDown=t.toolbarRenderer.renderDropDownButton({iconCss:"quick"===r?"e-font-name e-icons":"",content:t.dropdownContent(t.parent.fontFamily.width,r,"quick"===r?"":n.i(o.c)(f,g,"text","text")),cssClass:a.y+" "+a.A+" "+a._20,itemName:"FontName",items:f,element:c}),n.i(i.isNullOrUndefined)(t.parent.fontFamily.default)||(t.getEditNode().style.fontFamily=t.parent.fontFamily.default);break;case"fontsize":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_FontSize",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;var b=t.parent.fontSize.items.slice();b.forEach(function(e){Object.defineProperties(e,{command:{value:"Font",enumerable:!0},subCommand:{value:"FontSize",enumerable:!0}})});var v=n.i(i.isNullOrUndefined)(t.parent.fontSize.default)?b[1].text:t.parent.fontSize.default;t.fontSizeDropDown=t.toolbarRenderer.renderDropDownButton({content:t.dropdownContent(t.parent.fontSize.width,r,n.i(o.e)(n.i(o.c)(b,v.replace(/\s/g,""),"value","text"))),cssClass:a.y+" "+a.A+" "+a._21,itemName:"FontSize",items:b,element:c}),n.i(i.isNullOrUndefined)(t.parent.fontSize.default)||(t.getEditNode().style.fontSize=t.parent.fontSize.default);break;case"alignments":if(c=n.i(i.select)("#"+t.parent.getID()+"_"+r+"_Alignments",s),n.i(i.isNullOrUndefined)(c)||c.classList.contains(a.B))return;t.alignDropDown=t.toolbarRenderer.renderDropDownButton({iconCss:"e-justify-left e-icons",cssClass:a.y+" "+a.A+" "+a._22,itemName:"Alignments",items:l.a,element:c});break;case"align":case"videoalign":t.renderAlignmentDropDown(r,s,c,d);break;case"display":case"audiolayoutoption":case"videolayoutoption":t.renderDisplayDropDown(r,s,c,d);break;case"tablerows":t.rowDropDown(r,s,c);break;case"tablecolumns":t.columnDropDown(r,s,c);break;case"tablecell":t.cellDropDown(r,s,c);break;case"tablecellverticalalign":t.verticalAlignDropDown(r,s,c);break;case"styles":t.tableStylesDropDown(r,s,c)}}),this.parent.inlineMode.enable&&this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.getUpdateItems=function(e,t){var n=e.slice();return n.forEach(function(e){Object.defineProperties(e,{command:{value:"Format"===t?"Formats":"Font",enumerable:!0},subCommand:{value:"Format"===t?e.value:t,enumerable:!0}})}),n},e.prototype.onPropertyChanged=function(e){for(var t,r,s=e.newProp,l=0,d=Object.keys(s);l<d.length;l++){switch(d[l]){case"fontFamily":if(this.fontNameDropDown)for(var c=0,u=Object.keys(s.fontFamily);c<u.length;c++){var h=u[c];switch(h){case"default":case"width":var p=this.fontNameDropDown.items;t=n.i(i.isNullOrUndefined)(n.i(i.closest)(this.fontNameDropDown.element,"."+a.o))?"toolbar":"quick";var m=n.i(i.isNullOrUndefined)(this.parent.fontFamily.default)?p[0].text:this.parent.fontFamily.default;r=this.dropdownContent(this.parent.fontFamily.width,t,"quick"===t?"":n.i(o.c)(p,m,"text","text")),this.fontNameDropDown.setProperties({content:r}),n.i(i.isNullOrUndefined)(this.parent.fontFamily.default)?this.getEditNode().style.removeProperty("font-family"):this.getEditNode().style.fontFamily=this.parent.fontFamily.default;break;case"items":this.fontNameDropDown.setProperties({items:this.getUpdateItems(s.fontFamily.items,"FontName")})}}break;case"fontSize":if(this.fontSizeDropDown)for(var f=0,g=Object.keys(s.fontSize);f<g.length;f++){var b=g[f];switch(b){case"default":case"width":var v=this.fontSizeDropDown.items;t=n.i(i.isNullOrUndefined)(n.i(i.closest)(this.fontSizeDropDown.element,"."+a.o))?"toolbar":"quick";var C=n.i(i.isNullOrUndefined)(this.parent.fontSize.default)?v[1].text:this.parent.fontSize.default;r=this.dropdownContent(this.parent.fontSize.width,t,n.i(o.e)(n.i(o.c)(v,C.replace(/\s/g,""),"value","text"))),this.fontSizeDropDown.setProperties({content:r}),n.i(i.isNullOrUndefined)(this.parent.fontSize.default)?this.getEditNode().style.removeProperty("font-size"):this.getEditNode().style.fontSize=this.parent.fontSize.default;break;case"items":this.fontSizeDropDown.setProperties({items:this.getUpdateItems(s.fontSize.items,"FontSize")})}}break;case"format":if(this.formatDropDown)for(var y=0,N=Object.keys(s.format);y<N.length;y++){var E=N[y];switch(E){case"default":case"width":var S=this.formatDropDown.items;t=n.i(i.isNullOrUndefined)(n.i(i.closest)(this.formatDropDown.element,"."+a.o))?"toolbar":"quick";var T=n.i(i.isNullOrUndefined)(this.parent.format.default)?S[0].text:this.parent.format.default;r=this.dropdownContent(this.parent.format.width,t,"quick"===t?"":n.i(o.c)(S,T,"text","text")),this.formatDropDown.setProperties({content:r});break;case"types":this.formatDropDown.setProperties({items:this.getUpdateItems(s.format.types,"Format")})}}}}},e.prototype.getEditNode=function(){return this.parent.contentModule.getEditPanel()},e.prototype.rowDropDown=function(e,t,r){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+"_TableRows",t),r.classList.contains(a.B)||(this.tableRowsDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-rows e-icons",cssClass:a.y+" "+a.A+" "+a.t,itemName:"TableRows",items:l.m,element:r}))},e.prototype.columnDropDown=function(e,t,r){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+"_TableColumns",t),r.classList.contains(a.B)||(this.tableColumnsDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-columns e-icons",cssClass:a.y+" "+a.A+" "+a.t,itemName:"TableColumns",items:l.n,element:r}))},e.prototype.cellDropDown=function(e,t,r){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+"_TableCell",t),r.classList.contains(a.B)||(this.tableRowsDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-cell e-icons",cssClass:a.y+" "+a.A+" "+a.t,itemName:"TableCell",items:l.o,element:r}))},e.prototype.verticalAlignDropDown=function(e,t,r){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+"_TableCellVerticalAlign",t),r.classList.contains(a.B)||(this.tableCellVerticalAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-cell-ver-align e-icons",cssClass:a.y+" "+a.A+" "+a.t,itemName:"TableCellVerticalAlign",items:l.p,element:r}))},e.prototype.renderDisplayDropDown=function(e,t,r,o){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+("display"===o?"_Display":"videolayoutoption"===o?"_VideoLayoutOption":"_AudioLayoutOption"),t),r.classList.contains(a.B)||(this.displayDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"display"===o?"e-display e-icons":"videolayoutoption"===o?"e-video-display e-icons":"e-audio-display e-icons",cssClass:a.y+" "+a.A+" "+a.t,itemName:"display"===o?"Display":"videolayoutoption"===o?"VideoLayoutOption":"AudioLayoutOption",items:"display"===o?l.q:"videolayoutoption"===o?l.r:l.s,element:r}))},e.prototype.renderAlignmentDropDown=function(e,t,r,o){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+("align"===o?"_Align":"_VideoAlign"),t),r.classList.contains(a.B)||(this.imageAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-justify-left e-icons",cssClass:a.y+" "+a.z+" "+a.t,itemName:"align"===o?"Align":"VideoAlign",items:"align"===o?l.t:l.u,element:r}))},e.prototype.tableStylesDropDown=function(e,t,r){r=n.i(i.select)("#"+this.parent.getID()+"_"+e+"_Styles",t),r.classList.contains(a.B)||(this.imageAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-style e-icons",cssClass:a.y+" "+a.z+" "+a.t,itemName:"Styles",items:this.parent.tableSettings.styles,element:r}))},e.prototype.removeDropDownClasses=function(e){n.i(i.removeClass)([e],[a.B,a.y,a.z,a.A])},e.prototype.destroyDropDowns=function(){this.formatDropDown&&(this.removeDropDownClasses(this.formatDropDown.element),this.formatDropDown.destroy()),this.fontNameDropDown&&(this.removeDropDownClasses(this.fontNameDropDown.element),this.fontNameDropDown.destroy()),this.fontSizeDropDown&&(this.removeDropDownClasses(this.fontSizeDropDown.element),this.fontSizeDropDown.destroy()),this.alignDropDown&&(this.removeDropDownClasses(this.alignDropDown.element),this.alignDropDown.destroy()),this.imageAlignDropDown&&(this.removeDropDownClasses(this.imageAlignDropDown.element),this.imageAlignDropDown.destroy()),this.displayDropDown&&(this.removeDropDownClasses(this.displayDropDown.element),this.displayDropDown.destroy()),this.tableRowsDropDown&&(this.removeDropDownClasses(this.tableRowsDropDown.element),this.tableRowsDropDown.destroy()),this.tableColumnsDropDown&&(this.removeDropDownClasses(this.tableColumnsDropDown.element),this.tableColumnsDropDown.destroy()),this.tableCellVerticalAlignDropDown&&(this.removeDropDownClasses(this.tableCellVerticalAlignDropDown.element),this.tableCellVerticalAlignDropDown.destroy()),this.numberFormatListDropDown&&(this.removeDropDownClasses(this.numberFormatListDropDown.element),this.numberFormatListDropDown.destroy()),this.bulletFormatListDropDown&&(this.removeDropDownClasses(this.bulletFormatListDropDown.element),this.bulletFormatListDropDown.destroy())},e.prototype.setRtl=function(e){this.formatDropDown&&this.formatDropDown.setProperties({enableRtl:e.enableRtl}),this.fontNameDropDown&&this.fontNameDropDown.setProperties({enableRtl:e.enableRtl}),this.fontSizeDropDown&&this.fontSizeDropDown.setProperties({enableRtl:e.enableRtl}),this.alignDropDown&&this.alignDropDown.setProperties({enableRtl:e.enableRtl}),this.imageAlignDropDown&&this.imageAlignDropDown.setProperties({enableRtl:e.enableRtl}),this.displayDropDown&&this.displayDropDown.setProperties({enableRtl:e.enableRtl}),this.numberFormatListDropDown&&this.numberFormatListDropDown.setProperties({enableRtl:e.enableRtl}),this.bulletFormatListDropDown&&this.bulletFormatListDropDown.setProperties({enableRtl:e.enableRtl})},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(i.isNullOrUndefined)(t.oldCssClass)?e.setProperties({cssClass:(e.cssClass+" "+t.cssClass).trim()}):e.setProperties({cssClass:(e.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){for(var t=[this.formatDropDown,this.fontNameDropDown,this.fontSizeDropDown,this.alignDropDown,this.imageAlignDropDown,this.displayDropDown,this.numberFormatListDropDown,this.bulletFormatListDropDown,this.tableRowsDropDown,this.tableColumnsDropDown,this.tableCellVerticalAlignDropDown],n=0;n<t.length;n++)this.updateCss(t[n],e)},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(s.C,this.beforeRender,this),this.parent.on(s.h,this.onIframeMouseDown,this),this.parent.on(s._38,this.setRtl,this),this.parent.on(s.i,this.removeEventListener,this),this.parent.on(s.s,this.onPropertyChanged,this),this.parent.on(s._89,this.setCssClass,this))},e.prototype.onIframeMouseDown=function(){this.parent.getToolbarElement().querySelectorAll('.e-rte-dropdown-btn[aria-expanded="true"]').length>0&&n.i(o.l)(document,"mousedown")},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(s.h,this.onIframeMouseDown),this.parent.off(s._38,this.setRtl),this.parent.off(s.C,this.beforeRender),this.parent.off(s.i,this.removeEventListener),this.parent.off(s.s,this.onPropertyChanged),this.parent.off(s._89,this.setCssClass))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),o=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,space:32,escape:27,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,semicolon:186,plus:187,comma:188,minus:189,dot:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222,"]":221,"[":219,"=":187},a=function(e){function t(t,n){var i=e.call(this,n,t)||this;return i.keyPressHandler=function(e){for(var t=e.altKey,n=e.ctrlKey,r=e.shiftKey,o=e.metaKey,s=e.which,l=Object.keys(i.keyConfigs),d=0,c=l;d<c.length;d++)for(var u=c[d],h=i.keyConfigs[""+u].split(","),p=0,m=h;p<m.length;p++){var f=m[p],g=a.getKeyConfigData(f.trim());t!==g.altKey||n!==g.ctrlKey&&!o||r!==g.shiftKey||s!==g.keyCode||(e.action=u)}i.keyAction&&i.keyAction(e)},i.bind(),i}r(t,e),a=t,t.prototype.destroy=function(){this.unwireEvents(),e.prototype.destroy.call(this)},t.prototype.onPropertyChanged=function(e,t){},t.prototype.bind=function(){this.wireEvents()},t.prototype.getModuleName=function(){return"keyboard"},t.prototype.wireEvents=function(){this.element.addEventListener(this.eventName,this.keyPressHandler)},t.prototype.unwireEvents=function(){this.element.removeEventListener(this.eventName,this.keyPressHandler)},t.getKeyConfigData=function(e){if(e in this.configCache)return this.configCache[""+e];var t=e.toLowerCase().split("+"),n={altKey:-1!==t.indexOf("alt"),ctrlKey:-1!==t.indexOf("ctrl"),shiftKey:-1!==t.indexOf("shift"),keyCode:null};return t[t.length-1].length>1&&Number(t[t.length-1])?n.keyCode=Number(t[t.length-1]):n.keyCode=a.getKeyCode(t[t.length-1]),a.configCache[""+e]=n,n},t.getKeyCode=function(e){return s[""+e]||e.toUpperCase().charCodeAt(0)};var a;return t.configCache={},o([n.i(i.Property)({})],t.prototype,"keyConfigs",void 0),o([n.i(i.Property)("keyup")],t.prototype,"eventName",void 0),o([n.i(i.Event)()],t.prototype,"keyAction",void 0),t=a=o([i.NotifyPropertyChanges],t)}(i.Base)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(1)),o=n(4),s=n(3),a=function(){function e(){}return e.prototype.process=function(e,t,o,a){var l,d=this,c=e.contentModule.getDocument().getSelection(),u=c.rangeCount>0?c.getRangeAt(c.rangeCount-1):null,h=!n.i(i.isNullOrUndefined)(a)&&!n.i(i.isNullOrUndefined)(a.cssClass)&&"e-video-inline"!==a.cssClass;if("HTML"===e.editorMode&&(n.i(i.isNullOrUndefined)(t)||h||(n.i(i.isNullOrUndefined)(t.name)||!n.i(i.isNullOrUndefined)(t.name)&&"showDialog"!==t.name)&&(l=this.editorManager.nodeSelection.save(u,e.contentModule.getDocument()))),n.i(i.isNullOrUndefined)(t)||!t.item.command||"Table"===t.item.command||"Actions"===t.item.command||"Links"===t.item.command||"Images"===t.item.command||"Files"===t.item.command||"Audios"===t.item.command||"Videos"===t.item.command||"EmojiPicker"===t.item.command||!u||e.contentModule.getEditPanel().contains(this.getAncestorNode(u.commonAncestorContainer))||e.contentModule.getEditPanel()===u.commonAncestorContainer||e.contentModule.getPanel()===u.commonAncestorContainer){if(!n.i(i.isNullOrUndefined)(t)&&-1!==e.maxLength&&!n.i(i.isNullOrUndefined)(t.item.command)){var p=0;"Links"===t.item.command&&(p=0===a.text.length?a.url.length:a.text.length),"Images"!==t.item.command&&"Videos"!==t.item.command&&"Table"!==t.item.command&&"Files"!==t.item.command||(p=1);var m=e.getText().trim().replace(/(\r\n|\n|\r)/gm,"").replace(/\u200B/g,"").length,f=e.getSelection().length,g=m-f+p;if(!(-1===e.maxLength||g<=e.maxLength))return}if(n.i(i.isNullOrUndefined)(t)){var b=o.action;t={};var v={originalEvent:o,cancel:!1,requestType:b||o.key+"Key",itemCollection:a};if(n.i(i.extend)(t,t,v,!0),"tab"!==b&&"enter"!==b&&"space"!==b&&"escape"!==b&&("Markdown"===e.editorMode&&"insert-table"===b&&(a={headingText:e.localeObj.getConstant("TableHeadingText"),colText:e.localeObj.getConstant("TableColText")}),e.trigger(r.S,t,function(e){e.cancel&&("paste"!==b&&"cut"!==b&&"copy"!==b||o.preventDefault())})),!t.cancel){var C=!!n.i(i.isNullOrUndefined)(e.tableModule)||!!e.tableModule&&e.tableModule.ensureInsideTableList;(9===o.which&&C||9!==o.which)&&(13===o.which&&"HTML"===e.editorMode&&(a={enterAction:e.enterKey}),this.editorManager.observer.notify("keydown"===o.type?s.a:s.g,{event:o,callBack:this.onSuccess.bind(this,e),value:a,enterAction:e.enterKey}))}}else!n.i(i.isNullOrUndefined)(t)&&t.item.command&&t.item.subCommand&&(t.item.command!==t.item.subCommand&&"Font"!==t.item.command||("FontName"===t.item.subCommand||"FontSize"===t.item.subCommand)&&"dropDownSelect"===t.name||("BackgroundColor"===t.item.subCommand||"FontColor"===t.item.subCommand)&&"colorPickerChanged"===t.name||"FormatPainter"===t.item.subCommand||"EmojiPicker"===t.item.subCommand)&&(n.i(i.extend)(t,t,{requestType:t.item.subCommand,cancel:!1,itemCollection:a,selectType:t.name},!0),e.trigger(r.S,t,function(s){if(!s.cancel){var c=!n.i(i.isNullOrUndefined)(s.requestType)&&"FormatPainter"===s.requestType&&"format-copy"===s.name,u=!n.i(i.isNullOrUndefined)(s.requestType)&&"FormatPainter"===s.requestType&&"format-paste"===s.name;(0===d.getUndoRedoStack().length&&"Links"!==s.item.command&&"Images"!==s.item.command&&!c||u)&&d.saveData(),e.isBlur=!1,e.contentModule.getEditPanel().focus(),"HTML"!==e.editorMode||h||(n.i(i.isNullOrUndefined)(t.selectType)||!n.i(i.isNullOrUndefined)(t.selectType)&&"showDialog"!==t.selectType)&&l.restore();var p=s.item.subCommand.toLocaleLowerCase();"paste"===p||"cut"===p||"copy"===p?e.clipboardAction(p,o):(d.editorManager.observer.notify(r._42,{subCommand:s.item.subCommand}),d.editorManager.execCommand(s.item.command,s.item.subCommand,o,d.onSuccess.bind(d,e),s.item.value,"Pre"===s.item.subCommand&&"dropDownSelect"===s.selectType?{name:s.selectType}:a,"#"+e.getID()+" iframe",e.enterKey))}}));(n.i(i.isNullOrUndefined)(o)||o&&"copy"!==o.action)&&this.enableUndo(e)}},e.prototype.getAncestorNode=function(e){return e=3===e.nodeType?e.parentNode:e},e.prototype.onKeyHandler=function(e,t){var n=this;this.editorManager.observer.notify(s.g,{event:t,callBack:function(){e.notify(r.f,{}),n.enableUndo(e)}})},e.prototype.onSuccess=function(e,t){e.notify(r.f,{}),t&&(n.i(i.isNullOrUndefined)(t.event)||"copy"!==t.event.action)&&(this.enableUndo(e),e.notify(r.D,t)),e.trigger(r.T,t,function(t){if(e.setPlaceHolder(),("Images"===t.requestType||"Links"===t.requestType||"Audios"===t.requestType||"Videos"===t.requestType)&&"HTML"===e.editorMode){var n=t;if("Links"===t.requestType&&t.event&&"keydown"===t.event.type&&32===t.event.keyCode)return;e.notify(r._0,{args:n.event,type:t.requestType,isNotify:!0,elements:n.elements})}"VideosPlayPause"===t.requestType&&e.notify("editAreaClick",{args:event}),e.autoResize()})},e.prototype.saveData=function(e){this.editorManager.undoRedoManager.saveData(e)},e.prototype.getUndoStatus=function(){return this.editorManager.undoRedoManager.getUndoStatus()},e.prototype.getUndoRedoStack=function(){return this.editorManager.undoRedoManager.undoRedoStack},e.prototype.enableUndo=function(e){var t=this.getUndoStatus();!e.inlineMode.enable||i.Browser.isDevice&&!n.i(o.d)()?e.toolbarModule&&n.i(o.k)(e.toolbarModule.baseToolbar,t):n.i(o.k)(e.quickToolbarModule.inlineQTBar.quickTBarObj,t)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(4),r=function(){function e(e,t){this.parent=e,this.serviceLocator=t}return e.prototype.renderPanel=function(){var e=this.parent,t=this.parent.createElement("div",{className:"e-rte-content",id:this.parent.getID()+"rte-view"}),r=n.i(i.p)(e.value,e);this.editableElement=this.parent.createElement("div",{className:"e-content",id:this.parent.getID()+"_rte-edit-view",attrs:{contenteditable:"true"},innerHTML:r}),t.appendChild(this.editableElement),this.setPanel(t),e.element.appendChild(t)},e.prototype.getPanel=function(){return this.contentPanel},e.prototype.getEditPanel=function(){return this.editableElement},e.prototype.getText=function(){var e=this.getEditPanel().innerText;return"\n"===e?"":e},e.prototype.setPanel=function(e){this.contentPanel=e},e.prototype.getDocument=function(){return this.getEditPanel().ownerDocument},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(0),r=(n.n(i),n(5)),o=function(){function e(){this.rendererMap={}}return e.prototype.addRenderer=function(e,t){var o=n.i(i.getEnumValue)(r.a,e);n.i(i.isNullOrUndefined)(this.rendererMap[""+o])&&(this.rendererMap[""+o]=t)},e.prototype.getRenderer=function(e){var t=n.i(i.getEnumValue)(r.a,e);if(n.i(i.isNullOrUndefined)(this.rendererMap[""+t]))throw"The renderer "+t+" is not found";return this.rendererMap[""+t]},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(0),r=(n.n(i),function(){function e(){this.services={}}return e.prototype.register=function(e,t){n.i(i.isNullOrUndefined)(this.services[""+e])&&(this.services[""+e]=t)},e.prototype.getService=function(e){if(n.i(i.isNullOrUndefined)(this.services[""+e]))throw"The service "+e+" is not registered";return this.services[""+e]},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return k});var i=n(0),r=(n.n(i),n(7)),o=n(46),s=n(11),a=n(16),l=n(40),d=n(45),c=n(35),u=n(42),h=n(41),p=n(36),m=n(53),f=n(50),g=n(49),b=n(44),v=n(37),C=n(52),y=n(47),N=n(3),E=n(43),S=n(12),T=n(39),O=n(38),k=function(){function e(e){this.currentDocument=e.document,this.editableElement=e.editableElement,this.nodeSelection=new s.a,this.nodeCutter=new S.a,this.domNode=new a.b(this.editableElement,this.currentDocument),this.observer=new i.Observer(this),this.listObj=new o.a(this),this.formatObj=new l.a(this),this.alignmentObj=new c.a(this),this.indentsObj=new u.a(this),this.linkObj=new d.a(this),this.imgObj=new h.a(this),this.audioObj=new p.a(this),this.videoObj=new m.a(this),this.selectionObj=new g.a(this),this.inserthtmlObj=new b.a(this),this.insertTextObj=new E.a(this),this.clearObj=new v.a(this),this.tableObj=new f.a(this),this.undoRedoManager=new C.a(this,e.options),this.msWordPaste=new y.a(this),this.formatPainterEditor=new T.a(this,e.formatPainterSettings),this.emojiPickerObj=new O.a(this),this.wireEvents()}return e.prototype.wireEvents=function(){this.observer.on(N.a,this.editorKeyDown,this),this.observer.on(N.g,this.editorKeyUp,this),this.observer.on(N.g,this.editorKeyUp,this),this.observer.on(N.i,this.onPropertyChanged,this),this.observer.on(N.k,this.onWordPaste,this),this.observer.on(N.l,this.onBegin,this)},e.prototype.onWordPaste=function(e){this.observer.notify(N.j,e)},e.prototype.onPropertyChanged=function(e){this.observer.notify(N.h,e)},e.prototype.editorKeyDown=function(e){this.observer.notify(N.d,e)},e.prototype.editorKeyUp=function(e){this.observer.notify(N.f,e)},e.prototype.onBegin=function(e){this.observer.notify(N.m,e)},e.prototype.execCommand=function(e,t,n,i,o,s,a,l){switch(e.toLowerCase()){case"lists":this.observer.notify(N.e,{subCommand:t,event:n,callBack:i,selector:a,item:s,enterAction:l});break;case"formats":this.observer.notify(N.c,{subCommand:t,event:n,callBack:i,selector:a,exeValue:s,enterAction:l});break;case"alignments":this.observer.notify(r.z,{subCommand:t,event:n,callBack:i,selector:a,value:s});break;case"indents":this.observer.notify(r.y,{subCommand:t,event:n,callBack:i,selector:a});break;case"links":this.observer.notify(r.x,{command:e,value:t,item:s,event:n,callBack:i});break;case"files":this.observer.notify(r.r,{command:e,value:"Image",item:s,event:n,callBack:i,selector:a});break;case"images":this.observer.notify(r.r,{command:e,value:t,item:s,event:n,callBack:i,selector:a});break;case"audios":this.observer.notify(r.q,{command:e,value:t,item:s,event:n,callBack:i,selector:a});break;case"videos":this.observer.notify(r.p,{command:e,value:t,item:s,event:n,callBack:i,selector:a});break;case"table":switch(t.toString().toLocaleLowerCase()){case"createtable":this.observer.notify(r.b,{item:s,event:n,callBack:i,enterAction:l});break;case"insertrowbefore":case"insertrowafter":this.observer.notify(r.c,{item:s,event:n,callBack:i});break;case"insertcolumnleft":case"insertcolumnright":this.observer.notify(r.d,{item:s,event:n,callBack:i});break;case"deleterow":this.observer.notify(r.e,{item:s,event:n,callBack:i});break;case"deletecolumn":this.observer.notify(r.f,{item:s,event:n,callBack:i});break;case"tableremove":this.observer.notify(r.g,{item:s,event:n,callBack:i});break;case"tableheader":this.observer.notify(r.h,{item:s,event:n,callBack:i});break;case"aligntop":case"alignmiddle":case"alignbottom":this.observer.notify(r.i,{item:s,event:n,callBack:i});break;case"merge":this.observer.notify(r.j,{item:s,event:n,callBack:i});break;case"horizontalsplit":this.observer.notify(r.k,{item:s,event:n,callBack:i});break;case"verticalsplit":this.observer.notify(r.l,{item:s,event:n,callBack:i})}break;case"font":case"style":case"effects":case"casing":this.observer.notify(r.o,{subCommand:t,event:n,callBack:i,value:o,selector:a,enterAction:l});break;case"inserthtml":this.observer.notify(r.v,{subCommand:t,callBack:i,value:o,enterAction:l});break;case"inserttext":this.observer.notify(r.w,{subCommand:t,callBack:i,value:o});break;case"clear":this.observer.notify(r.n,{subCommand:t,event:n,callBack:i,selector:a,enterAction:l});break;case"actions":this.observer.notify(N.b,{subCommand:t,event:n,callBack:i,selector:a});break;case"formatpainter":this.observer.notify(N.n,{item:s,subCommand:t,event:n,callBack:i});break;case"emojipicker":this.observer.notify(N.o,{item:s,subCommand:t,value:o,event:n,callBack:i})}},e}()},function(e,t,n){"use strict";var i=n(46);n.d(t,"a",function(){return i.a});var r=n(16);n.d(t,"b",function(){return r.a}),n.d(t,"c",function(){return r.b});var o=n(35);n.d(t,"d",function(){return o.a});var s=n(42);n.d(t,"e",function(){return s.a});var a=n(40);n.d(t,"f",function(){return a.a});var l=n(45);n.d(t,"g",function(){return l.a});var d=n(19);n.d(t,"h",function(){return d.a});var c=n(43);n.d(t,"i",function(){return c.a});var u=n(44);n.d(t,"j",function(){return u.a});var h=n(8);n.d(t,"k",function(){return h.a});var p=n(22);n.d(t,"l",function(){return p.a});var m=n(47);n.d(t,"m",function(){return m.a});var f=n(12);n.d(t,"n",function(){return f.a});var g=n(41);n.d(t,"o",function(){return g.a});var b=n(36);n.d(t,"p",function(){return b.a});var v=n(53);n.d(t,"q",function(){return v.a});var C=n(48);n.d(t,"r",function(){return C.a});var y=n(49);n.d(t,"s",function(){return y.a});var N=n(37);n.d(t,"t",function(){return N.a});var E=n(52);n.d(t,"u",function(){return E.a});var S=n(50);n.d(t,"v",function(){return S.a});var T=n(51);n.d(t,"w",function(){return T.a}),n.d(t,"x",function(){return T.b});var O=n(39);n.d(t,"y",function(){return O.a});var k=n(38);n.d(t,"z",function(){return k.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(7),r=n(0),o=(n.n(r),n(3)),s=n(6),a=function(){function e(e){this.alignments={JustifyLeft:"left",JustifyCenter:"center",JustifyRight:"right",JustifyFull:"justify"},this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.z,this.applyAlignment,this),this.parent.observer.on(o.d,this.onKeyDown,this)},e.prototype.onKeyDown=function(e){switch(e.event.action){case"justify-center":this.applyAlignment({subCommand:"JustifyCenter",callBack:e.callBack}),e.event.preventDefault();break;case"justify-full":this.applyAlignment({subCommand:"JustifyFull",callBack:e.callBack}),e.event.preventDefault();break;case"justify-left":this.applyAlignment({subCommand:"JustifyLeft",callBack:e.callBack}),e.event.preventDefault();break;case"justify-right":this.applyAlignment({subCommand:"JustifyRight",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.getTableNode=function(e){var t=e.startContainer.nodeType===Node.ELEMENT_NODE?e.startContainer:e.startContainer.parentNode;return[n.i(r.closest)(t,"td,th")]},e.prototype.applyAlignment=function(e){var t="Table"===e.value,i=this.parent.nodeSelection.getRange(this.parent.currentDocument),o=this.parent.nodeSelection.save(i,this.parent.currentDocument);if(t)n.i(r.setStyleAttribute)(this.getTableNode(i)[0],{"text-align":this.alignments[e.subCommand]});else{this.parent.domNode.setMarker(o);for(var a=this.parent.domNode.blockNodes(),l=0;l<a.length;l++){var d=a[l];n.i(r.setStyleAttribute)(d,{"text-align":this.alignments[e.subCommand]})}for(var c=this.parent.domNode.getImageTagInSelection(),l=0;l<c.length;l++){var u=[];u.push(c[l]),this.parent.imgObj.imageCommand({item:{selectNode:u},subCommand:e.subCommand,value:e.subCommand,callBack:e.callBack,selector:e.selector})}this.parent.editableElement.focus(),o=this.parent.domNode.saveMarker(o),n.i(s.b)()&&n.i(s.c)(this.parent.editableElement,e.selector),o.restore()}e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:t?this.getTableNode(i):this.parent.domNode.blockNodes()})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(7)),o=n(21),s=n(8),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.q,this.audioCommand,this)},e.prototype.audioCommand=function(e){var t,r=e.value.toString().toLowerCase();switch("inline"!==r&&"break"!==r&&"audioremove"!==r||(t=e.item.selectNode[0]),r){case"audio":case"audioreplace":this.createAudio(e);break;case"inline":t.removeAttribute("class"),t.closest("."+o.k).style.display="inline-block",n.i(i.addClass)([t],[o.l,o.m,o.n]),this.callBack(e);break;case"break":t.removeAttribute("class"),t.closest("."+o.k).style.display="block",n.i(i.addClass)([t],[o.o,o.l,o.n]),this.callBack(e);break;case"audioremove":n.i(i.detach)(t),this.callBack(e)}},e.prototype.createAudio=function(e){var t,r=this,a=!1;if(!n.i(i.isNullOrUndefined)(e.item.selectParent)&&e.item.selectParent[0].classList&&(e.item.selectParent[0].classList.contains(o.p)||e.item.selectParent[0].classList.contains(o.k))){var l=e.item.selectParent[0].querySelector("source");this.setStyle(l,e),a=!0}else{t=n.i(i.createElement)("span",{className:o.k,attrs:{contentEditable:"false",title:e.item.fileName}});var d=n.i(i.createElement)("audio",{className:o.l+" "+o.m,attrs:{controls:""}}),c=n.i(i.createElement)("source"),u=n.i(i.createElement)("span",{className:o.p});if(this.setStyle(c,e),d.appendChild(c),u.appendChild(d),t.appendChild(u),n.i(i.isNullOrUndefined)(e.item.selection)||e.item.selection.restore(),s.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),null===t.nextElementSibling){var h=n.i(i.createElement)("br");t.parentNode.insertBefore(h,t.nextSibling)}}if(e.callBack&&(n.i(i.isNullOrUndefined)(e.selector)||!n.i(i.isNullOrUndefined)(e.selector)&&"pasteCleanupModule"!==e.selector)){var p=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0],m="AudioReplace"===e.value||a?e.item.selectParent[0].querySelector("audio"):i.Browser.isIE?p:p.querySelector("audio");m.addEventListener("loadeddata",function(){"AudioReplace"===e.value&&a||e.callBack({requestType:"Audios",editorMode:"HTML",event:e.event,range:r.parent.nodeSelection.getRange(r.parent.currentDocument),elements:[m]})}),a&&m.load()}},e.prototype.setStyle=function(e,t){n.i(i.isNullOrUndefined)(t.item.url)||e.setAttribute("src",t.item.url);var r=t.item.fileName?t.item.fileName.split(".").pop().toLowerCase():t.item.url?t.item.url.split(".").pop().toLowerCase():"";e.type="opus"===r?"audio/ogg":"m4a"===r?"audio/mp4":t.item.fileName&&t.item.fileName.split(".").length>0?"audio/"+t.item.fileName.split(".")[t.item.fileName.split(".").length-1]:t.item.url&&t.item.url.split(".").length>0?"audio/"+t.item.url.split(".")[t.item.url.split(".").length-1]:""},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(7),r=n(87),o=n(3),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.n,this.applyClear,this),this.parent.observer.on(o.d,this.onKeyDown,this)},e.prototype.onKeyDown=function(e){switch(e.event.action){case"clear-format":this.applyClear({subCommand:"ClearFormat",callBack:e.callBack,enterAction:e.enterAction}),e.event.preventDefault()}},e.prototype.applyClear=function(e){"ClearFormat"===e.subCommand&&(r.a.clear(this.parent.currentDocument,this.parent.editableElement,e.enterAction,e.selector,e.subCommand),e.callBack&&e.callBack({requestType:e.subCommand,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)}))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(3),r=n(8),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.o,this.emojiInsert,this)},e.prototype.emojiInsert=function(e){for(var t=document.createTextNode(e.value),n=this.parent.currentDocument.getSelection(),i=n.getRangeAt(0),o=i.startOffset,s=o-1;s>=o-15;s--){if(/:$/.test(n.focusNode.textContent.substring(s-1,s))){this.beforeApplyFormat(!0);break}}var a=/:$/.test(n.focusNode.textContent.charAt(o-1)),l=n.focusNode.textContent.charAt(o-2),d=/\s/.test(l);a&&(d||1===n.focusOffset)&&this.beforeApplyFormat(!0),r.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.beforeApplyFormat=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),n=this.parent.nodeSelection.getNodeCollection(t)[0],i=!(":"===n.parentElement.innerHTML.replace(/ |<br>/g,"").trim()||0===n.textContent.trim().indexOf("/")),r=n;if(i&&e)for(;r!==this.parent.editableElement;)r=r.parentElement;for(var o=t.startOffset;-1===this.parent.nodeSelection.getRange(document).toString().indexOf(":");)this.parent.nodeSelection.setSelectionText(document,n,n,o,t.endOffset),o--;var s=this.parent.nodeSelection.getRange(this.parent.currentDocument),a=this.parent.nodeCutter.GetSpliceNode(s,n);a.parentNode.removeChild(a)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),n(3)),o=n(34),s=function(){function e(e,t){this.INVALID_TAGS=["A","AUDIO","IMG","VIDEO","IFRAME"],this.parent=e,this.settings=t,this.addEventListener(),this.setDeniedFormats()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.n,this.actionHandler,this),this.parent.observer.on(r.h,this.onPropertyChanged,this)},e.prototype.onPropertyChanged=function(e){e&&"formatPainter"===e.module&&(n.i(i.isNullOrUndefined)(e.newProp.formatPainterSettings.allowedFormats)||(this.settings.allowedFormats=e.newProp.formatPainterSettings.allowedFormats),n.i(i.isNullOrUndefined)(e.newProp.formatPainterSettings.deniedFormats)||(this.settings.deniedFormats=e.newProp.formatPainterSettings.deniedFormats,this.setDeniedFormats()))},e.prototype.removeEventListener=function(){this.parent.observer.off(r.n,this.actionHandler),this.parent.observer.off(r.h,this.onPropertyChanged)},e.prototype.destroy=function(){this.removeEventListener(),this.INVALID_TAGS=null,this.copyCollection=null,this.deniedFormatsCollection=null,this.newElem=null,this.newElemLastChild=null,this.settings=null,this.parent=null},e.prototype.actionHandler=function(e){if(this.settings.allowedContext=["Text","List","Table"],!n.i(i.isNullOrUndefined)(e)&&!n.i(i.isNullOrUndefined)(e.item)&&!n.i(i.isNullOrUndefined)(e.item.formatPainterAction)){switch(e.item.formatPainterAction){case"format-copy":this.copyAction();break;case"format-paste":this.pasteAction();break;case"escape":this.escapeAction()}this.callBack(e)}},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:"FormatPainter",action:e.item.formatPainterAction,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.generateElement=function(){var e=this.copyCollection.slice();e.reverse();for(var t,r=e.length,o=n.i(i.createElement)("div",{className:"e-format-paste-wrapper"}),s=0;s<r;s++){var a=e[s],l=a.attrs,d=a.className,c=a.styles,u=a.tagName,h=n.i(i.createElement)(u);""!==d&&(h.className=d);for(var p=0;p<l.length;p++){var m=l[p].name,f=l[p].value;h.setAttribute(m,f)}for(var g=0;g<c.length;g++){var m=c[g].property,f=c[g].value,b=c[g].priority;h.style.setProperty(m,f,b)}0===o.childElementCount?(o.append(h),t=h):(t.append(h),t=h)}for(var v=this.removeDeniedFormats(o),C=v;C;)null===C.firstChild?(t=C,C=void 0):C=C.firstChild;this.newElem=v,this.newElemLastChild=t},e.prototype.pasteAction=function(){if(n.i(i.isNullOrUndefined)(this.copyCollection)||0===this.copyCollection.length)return void this.paintPlainTextFormat();this.insertFormatNode(this.newElem,this.newElemLastChild)},e.prototype.removeDeniedFormats=function(e){if(!n.i(i.isNullOrUndefined)(this.deniedFormatsCollection)&&this.deniedFormatsCollection.length>0)for(var t=this.deniedFormatsCollection,r=t.length,o=0;o<r;o++){var s=t[o].tag;if(t[o].tag)for(var a=e.querySelectorAll(s),l=0;l<a.length;l++){if(t[o].classes.length>0){for(var d=t[o].classes,c=d.length,u=0;u<c;u++)a[l].classList.contains(d[u])&&n.i(i.removeClass)([a[l]],d[u].trim());0===a[l].classList.length&&a[l].removeAttribute("class")}if(t[o].styles.length>0){for(var h=t[o].styles,p=h.length,u=0;u<p;u++)a[l].style.removeProperty(h[u].trim());0===a[l].style.length&&a[l].removeAttribute("style")}if(t[o].attributes.length>0)for(var m=t[o].attributes,f=m.length,u=0;u<f;u++)a[l].removeAttribute(m[u].trim())}}return e.firstElementChild},e.prototype.copyAction=function(){var e=[],t=this.parent.nodeSelection.getRange(document),r=this.parent.nodeSelection,o=t.collapsed?r.getSelectionNodeCollection(t):r.getSelectionNodeCollectionBr(t);if(0!==o.length||0!==r.getSelectionNodeCollectionBr(t).length){o=0===o.length?r.getSelectionNodeCollectionBr(t):o;for(var s=o[0].parentElement,a=this.findCurrentContext(s),l=this.settings.allowedFormats.indexOf(";")>-1?this.settings.allowedFormats.split(";"):[this.settings.allowedFormats],d=0;d<l.length;d++)l[d]=l[d].trim();var c=this.getRangeParentElem(a,s),u=c[0],h=c[1];if(null===a&&(a=h),!n.i(i.isNullOrUndefined)(a)&&this.settings.allowedContext.indexOf(a)>-1){"#text"===t.startContainer.nodeName&&(s=t.startContainer.parentElement);var p=s;do{if(l.indexOf(s.nodeName.toLowerCase())>-1){for(var m=s.attributes,f=[],d=0;d<m.length;d++)"class"!==m[d].name&&"style"!==m[d].name&&f.push(m[d]);for(var g=s.className,b=s.style,v=[],d=0;d<b.length;d++){var C=b[d],y=b.getPropertyValue(C),N=b.getPropertyPriority(C);v.push({property:C,value:y,priority:N})}e.push({attrs:f,className:g,styles:v,tagName:s.nodeName})}if(u===s?s=void 0:n.i(i.isNullOrUndefined)(s.parentElement)||(s=s.parentElement),p===s)break}while(!n.i(i.isNullOrUndefined)(s)||s===this.parent.editableElement);this.copyCollection=e}this.generateElement()}},e.prototype.getRangeParentElem=function(e,t){var r,o=t;switch(3===o.nodeType&&(o=o.parentElement),e){case"Table":r=n.i(i.closest)(o,"td"),n.i(i.isNullOrUndefined)(r)&&(r=n.i(i.closest)(o,"th"));break;case"List":r=n.i(i.closest)(o,"li");break;case"Text":r=n.i(i.closest)(o,"p")}if(n.i(i.isNullOrUndefined)(r)){var s=this.getNearestBlockParentElement(t);n.i(i.isNullOrUndefined)(s)||"UL"===s||"OL"===s||"LI"===s||(r=n.i(i.closest)(o,s),e="Text")}return"List"===e&&(r=r.parentElement),[r,e]},e.prototype.getNearestBlockParentElement=function(e){var t=e;for(3===t.nodeType&&(t=t.parentNode);t&&t!==this.parent.editableElement;){if(!n.i(i.isNullOrUndefined)(t)&&this.isBlockElement(t))return t.nodeName;t=t.parentNode}return null},e.prototype.isBlockElement=function(e){return["P","DIV","UL","OL","LI","H1","H2","H3","H4","H5","H6","ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","FIGCAPTION","FIGURE","FOOTER","HEADER","HR","MAIN","NAV","SECTION","SUMMARY","PRE"].indexOf(e.nodeName)>-1},e.prototype.escapeAction=function(){this.copyCollection=[]},e.prototype.paintPlainTextFormat=function(){var e,t=this.parent.nodeSelection.getRange(this.parent.currentDocument),n=this.parent.nodeSelection,i=t.collapsed?n.getSelectionNodeCollection(t):n.getSelectionNodeCollectionBr(t);if(i.length>1)for(var r=0;r<i.length;r++)e=this.validateELementTag(i[r]);else e=this.validateELementTag(t.startContainer)&&this.validateELementTag(t.endContainer);e||this.parent.execCommand("Clear","ClearFormat",null,null)},e.prototype.validateELementTag=function(e){return 3===e.nodeType&&(e=e.parentElement),this.INVALID_TAGS.indexOf(e.tagName)>-1},e.prototype.findCurrentContext=function(e){var t=n.i(i.closest)(e,"p"),r=n.i(i.closest)(e,"li");return t&&!r?"Text":n.i(i.closest)(e,"li")?n.i(i.isNullOrUndefined)(t)||n.i(i.isNullOrUndefined)(r)||t.textContent.trim()===r.textContent.trim()?"List":"Text":n.i(i.closest)(e,"td")||n.i(i.closest)(e,"tr")||n.i(i.closest)(e,"th")?"Table":null},e.prototype.insertFormatNode=function(e,t){var r=e.cloneNode(!0);if(!this.isBlockElement(e)){var s=n.i(i.createElement)("P");s.appendChild(e),r=s.cloneNode(!0)}for(var a,l=this.parent.editableElement,d=this.parent.currentDocument,c=r.firstChild;c;){if(!this.isBlockElement(c)){a=c.parentNode.removeChild(c);break}c=c.firstChild}var u={element:a,lastChild:t};o.r.applyFormat(d,null,l,"P","formatPainter",null,u);var h=this.parent.nodeSelection.getRange(d),p=h.collapsed,m=this.parent.domNode.blockNodes(),f=!1;1===m.length&&(f=m[0].textContent.trim()===h.toString().trim()),(this.isBlockElement(r)&&p||m.length>1||f)&&this.insertBlockNode(r,h,d,m)},e.prototype.insertBlockNode=function(e,t,r,o){var s=this.parent.nodeSelection,a=s.save(t,r);this.parent.domNode.setMarker(a);var l,d,c=!1;"UL"!==e.nodeName&&"OL"!==e.nodeName||(d=e.cloneNode(!0),l=d.firstChild);for(var u=n.i(i.isNullOrUndefined)(d)?e:e.firstChild,h=0;h<o.length;h++)if(!(this.INVALID_TAGS.indexOf(o[h].nodeName)>-1||o[h].querySelectorAll("img,audio,video,iframe").length>0)){for(var p=u.cloneNode(!1);o[h].firstChild;)0!==o[h].textContent.trim().length?p.appendChild(o[h].firstChild):o[h].removeChild(o[h].firstChild);if("TD"!==o[h].nodeName&&"TH"!==o[h].nodeName){if(n.i(i.isNullOrUndefined)(d)||(c=this.isSameListType(e,o[h])),"LI"!==p.nodeName||c?c?this.insertSameList(o,h,d,p):o[h].parentNode.replaceChild(p,o[h]):this.insertNewList(t,o,h,d,p),"LI"!==p.nodeName&&("OL"===p.parentElement.nodeName||"UL"===p.parentElement.nodeName)){var m=p.parentElement;if(this.parent.nodeCutter.SplitNode(t,m,!0),n.i(i.isNullOrUndefined)(m.previousElementSibling))m.parentElement.prepend(p);else if(m.previousElementSibling.after(p),p.childNodes.length>1)for(var f=0;f<p.childNodes.length;f++){var g=p.childNodes[f];"OL"!==g.nodeName&&"UL"!==g.nodeName||p.after(g)}}}else{if(n.i(i.isNullOrUndefined)(d)){o[h].appendChild(p);continue}if(0!==h||n.i(i.isNullOrUndefined)(d)){o[h].appendChild(p);continue}o[h].appendChild(d),d.appendChild(p)}}!n.i(i.isNullOrUndefined)(l)&&n.i(i.detach)(l),this.cleanEmptyLists(),this.parent.domNode.saveMarker(a,null).restore()},e.prototype.insertNewList=function(e,t,r,o,s){if(0===r){var a=t[r].nodeName;t[r]=t[r].parentNode.replaceChild(o,t[r]);var l="LI"===a?o.parentElement:o;if(this.parent.nodeCutter.SplitNode(e,l,!0),"LI"!==t[r].nodeName||n.i(i.isNullOrUndefined)(l))if(n.i(i.isNullOrUndefined)(l))o.append(s);else if(n.i(i.isNullOrUndefined)(l.previousElementSibling)||l.previousElementSibling.nodeName!==o.nodeName)if(n.i(i.isNullOrUndefined)(l.nextElementSibling)||l.nextElementSibling.nodeName!==o.nodeName)o.append(s);else{var d=l.nextElementSibling;for(d.prepend(s);d.firstChild;)o.append(d.firstChild)}else{var d=l.previousElementSibling;for(d.append(s);d.firstChild;)o.append(d.firstChild)}else o.append(s),n.i(i.isNullOrUndefined)(l.parentNode)||l.parentNode.insertBefore(o,l)}else o.append(s);this.detachEmptyBlockNodes(t[r])},e.prototype.insertSameList=function(e,t,r,o){if(0===t){if(!n.i(i.isNullOrUndefined)(e[t].parentNode)&&("UL"===e[t].parentNode.nodeName||"OL"===e[t].parentNode.nodeName)){if(1===e.length){for(;o.firstChild;)e[t].append(o.firstChild);for(var s=0;s<e[t].parentNode.childNodes.length;s++){var a=e[t].parentNode.childNodes[s];r.append(a.cloneNode(!0))}}else r.append(o);e[t].parentNode.parentNode.replaceChild(r,e[t].parentNode)}}else r.append(o);this.detachEmptyBlockNodes(e[t])},e.prototype.isSameListType=function(e,t){var r=!1,o=n.i(i.closest)(t,"ol, ul");return!n.i(i.isNullOrUndefined)(o)&&o.querySelectorAll("li").length>0&&(r=o.nodeName===e.nodeName),r},e.prototype.cleanEmptyLists=function(){for(var e=this.parent.editableElement.querySelectorAll("ol, ul"),t=0;t<e.length;t++)""===e[t].textContent.trim()&&n.i(i.detach)(e[t])},e.prototype.setDeniedFormats=function(){var e=[];if(!n.i(i.isNullOrUndefined)(this.settings)&&!n.i(i.isNullOrUndefined)(this.settings.deniedFormats)){for(var t=this.settings.deniedFormats.indexOf(";")>-1?this.settings.deniedFormats.split(";"):[this.settings.deniedFormats],r=t.length,o=0;o<r;o++){var s=t[o];if(""!==s){s.trim();var a=this.makeDeniedFormatsCollection(s);n.i(i.isNullOrUndefined)(a)||e.push(a)}}this.deniedFormatsCollection=e}},e.prototype.detachEmptyBlockNodes=function(e){n.i(i.isNullOrUndefined)(e)||""!==e.textContent.trim()||n.i(i.detach)(e)},e.prototype.makeDeniedFormatsCollection=function(e){var t=e.indexOf("("),n=e.indexOf(")"),i=e.indexOf("["),r=e.indexOf("]"),o=e.indexOf("{"),s=e.indexOf("}"),a=[],l="",d="",c="",u=[],h=[],p=[];t>-1&&n>-1&&(a=e.substring(t+1,n).split(" "),u=a[0].split(")")[0].split(",")),i>-1&&r>-1&&(l=e.substring(i+1,r),h=l.split(",")),o>-1&&s>-1&&(d=e.substring(o+1,s),p=d.split(","));var m=[t,i,o];m=m.filter(function(e){return e>-1});var f,g=m.length;return 1===g?f=m[0]:2===g?f=Math.min(m[0],m[1]):3===g&&(f=Math.min(m[0],m[1],m[2])),c=e.substring(0,f),c=c.trim(),{tag:c,styles:p,classes:u,attributes:h}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(3),r=n(0),o=(n.n(r),n(6)),s=n(16),a=n(12),l=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.c,this.applyFormats,this),this.parent.observer.on(i.f,this.onKeyUp,this),this.parent.observer.on(i.d,this.onKeyDown,this)},e.prototype.getParentNode=function(e){for(;e.parentNode&&e.parentNode!==this.parent.editableElement;null)e=e.parentNode;return e},e.prototype.onKeyUp=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=t.endContainer,o=i.lastChild;if(13===e.event.which&&t.startContainer===i&&3!==i.nodeType){var s=n.i(r.createElement)("p");if(s.innerHTML="<br>",!n.i(r.isNullOrUndefined)(o)&&o&&"BR"===o.nodeName&&o.previousSibling&&"TABLE"===o.previousSibling.nodeName)i.replaceChild(s,o),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,s,0);else{var a=this.parent.nodeSelection.getSelectionNodeCollectionBr(t)[0];!n.i(r.isNullOrUndefined)(a)&&"BR"===a.nodeName&&a.previousSibling&&"TABLE"===a.previousSibling.nodeName&&(i.replaceChild(s,a),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,s,0))}}},e.prototype.onKeyDown=function(e){if(13===e.event.which){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=0===t.startContainer.textContent.length||"PRE"===t.startContainer.nodeName?t.startContainer:t.startContainer.parentElement,o=0===t.endContainer.textContent.length||"PRE"===t.endContainer.nodeName?t.endContainer:t.endContainer.parentElement,s=n.i(r.closest)(i,"pre"),a=n.i(r.closest)(o,"pre");if(!n.i(r.isNullOrUndefined)(s)&&!n.i(r.isNullOrUndefined)(s.parentElement)&&"LI"===s.parentElement.tagName)return;if((n.i(r.isNullOrUndefined)(s)&&!n.i(r.isNullOrUndefined)(a)||!n.i(r.isNullOrUndefined)(s)&&n.i(r.isNullOrUndefined)(a))&&(e.event.preventDefault(),this.deleteContent(t),this.removeCodeContent(t),t=this.parent.nodeSelection.getRange(this.parent.currentDocument),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0)),13===e.event.which&&!n.i(r.isNullOrUndefined)(s)&&!n.i(r.isNullOrUndefined)(a)){e.event.preventDefault(),this.deleteContent(t),this.removeCodeContent(t),t=this.parent.nodeSelection.getRange(this.parent.currentDocument);var l=t.startContainer.childNodes[t.endOffset],d=t.startContainer.childNodes[t.endOffset-1],c=t.startContainer;if(n.i(r.isNullOrUndefined)(l)||n.i(r.isNullOrUndefined)(d)||!n.i(r.isNullOrUndefined)(l.nextSibling)||"BR"!==l.nodeName||"BR"!==d.nodeName)if(8203===c.textContent.charCodeAt(0)&&1===c.textContent.length||0===c.textContent.length){for(;"PRE"!==c.parentElement.nodeName&&(1===c.textContent.length||0===c.textContent.length);)c=c.parentElement;!n.i(r.isNullOrUndefined)(c.previousSibling)&&"BR"===c.previousSibling.nodeName&&n.i(r.isNullOrUndefined)(c.nextSibling)?this.paraFocus(c.parentElement):this.isNotEndCursor(s,t)}else this.isNotEndCursor(s,t);else this.paraFocus(t.startContainer,e.enterAction)}}},e.prototype.removeCodeContent=function(e){var t=new RegExp(String.fromCharCode(65279),"g");if(!n.i(r.isNullOrUndefined)(e.endContainer.textContent.match(t))){var i=65279===e.endContainer.textContent.charCodeAt(e.endOffset-1)?e.endOffset-2:e.endOffset;e.endContainer.textContent=e.endContainer.textContent.replace(t,""),""===e.endContainer.textContent?this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e.endContainer.parentElement,0):this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e.endContainer,i)}},e.prototype.deleteContent=function(e){e.startContainer===e.endContainer&&e.startOffset===e.endOffset||e.deleteContents()},e.prototype.paraFocus=function(e,t){var i;"DIV"===t?(i=n.i(r.createElement)("div"),i.innerHTML="<br>"):"BR"===t?i=n.i(r.createElement)("br"):(i=n.i(r.createElement)("p"),i.innerHTML="<br>"),this.parent.domNode.insertAfter(i,e),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,i,0),n.i(r.detach)(e.lastChild)},e.prototype.isNotEndCursor=function(e,t){var i=new a.a,o=t.startOffset===e.lastChild.textContent.length&&e.lastChild.textContent===t.startContainer.textContent;if(0===e.textContent.indexOf(t.startContainer.textContent)&&(0===t.startOffset&&0===t.endOffset||"PRE"===t.startContainer.nodeName)){this.insertMarker(e,t);var s=n.i(r.createElement)("br");e.childNodes[t.endOffset].parentElement.insertBefore(s,e.childNodes[t.endOffset])}else{var l=i.SplitNode(t,e,!0);this.insertMarker(e,t);var d=e.previousElementSibling;"PRE"===d.tagName&&(d.insertAdjacentHTML("beforeend","<br>"+l.innerHTML),n.i(r.detach)(e))}this.setCursorPosition(o,e)},e.prototype.setCursorPosition=function(e,t){var i=!1,o=this.parent.editableElement.querySelector(".tempSpan"),s=o.parentElement;if(""===o.parentNode.textContent?i=!0:this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0),e)if(i)s===t?(this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0),n.i(r.detach)(o)):this.focusSelectionParent(o,s);else{var a=n.i(r.createElement)("br");this.parent.domNode.insertAfter(a,o),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0),n.i(r.detach)(o)}else i?this.focusSelectionParent(o,s):n.i(r.detach)(o)},e.prototype.focusSelectionParent=function(e,t){n.i(r.detach)(e),t.innerHTML="",this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,t,0)},e.prototype.insertMarker=function(e,t){var i=n.i(r.createElement)("span",{className:"tempSpan"});"PRE"===t.startContainer.nodeName?e.childNodes[t.endOffset].parentElement.insertBefore(i,e.childNodes[t.endOffset]):t.startContainer.parentElement.insertBefore(i,t.startContainer)},e.prototype.applyFormats=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=!1;this.parent.editableElement!==t.endContainer||n.i(r.isNullOrUndefined)(this.parent.editableElement.children[t.endOffset-1])||"TABLE"!==this.parent.editableElement.children[t.endOffset-1].tagName||t.collapsed||(i=!0);var a=this.parent.nodeSelection.save(t,this.parent.currentDocument);this.parent.domNode.setMarker(a);var l=this.parent.domNode.blockNodes();if("BR"===e.enterAction){this.setSelectionBRConfig();var d=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),c=this.parent.nodeSelection.getSelectionNodes(d),u=[];0===c.length&&c.push(l[0]);for(var h=0;h<c.length;h++){for(var p=c[h],m=void 0;!this.parent.domNode.isBlockNode(p)&&p!==this.parent.editableElement;)m=p,p=p.parentElement;this.parent.domNode.isBlockNode(p)&&p===this.parent.editableElement&&u.push(m)}for(var h=0;h<u.length;h++)if(!this.parent.domNode.isBlockNode(u[h])){for(var p=u[h],f=p;p===this.parent.editableElement;)f=p,p=p.parentElement;var g=void 0;this.parent.domNode.isBlockNode(f.parentElement)&&f.parentElement===this.parent.editableElement?(g=n.i(r.createElement)("div"),f.parentElement.insertBefore(g,f),g.appendChild(f)):g=f;for(var b=g.previousSibling;!n.i(r.isNullOrUndefined)(b)&&"BR"!==b.nodeName&&!this.parent.domNode.isBlockNode(b);)g.firstChild.parentElement.insertBefore(b,g.firstChild),b=g.previousSibling;n.i(r.isNullOrUndefined)(b)||"BR"!==b.nodeName||n.i(r.detach)(b);for(var v=g.nextSibling;!n.i(r.isNullOrUndefined)(v)&&"BR"!==v.nodeName&&!this.parent.domNode.isBlockNode(v);)g.appendChild(v),v=g.nextSibling;n.i(r.isNullOrUndefined)(v)||"BR"!==v.nodeName||n.i(r.detach)(v)}this.setSelectionBRConfig(),l=this.parent.domNode.blockNodes()}for(var h=0;h<l.length;h++){var C=void 0,y=void 0;if("blockquote"===e.subCommand.toLowerCase()?(C=this.getParentNode(l[h]),y=this.parent.domNode.isList(C)||"TABLE"===C.tagName?C.outerHTML:C.innerHTML):(C=l[h],y=C.innerHTML),!(e.subCommand.toLowerCase()===C.tagName.toLowerCase()&&("pre"!==e.subCommand.toLowerCase()||!n.i(r.isNullOrUndefined)(e.exeValue)&&"dropDownSelect"===e.exeValue.name)||n.i(r.isNullOrUndefined)(C.parentNode)||"TABLE"===C.tagName&&"pre"===e.subCommand.toLowerCase())){this.cleanFormats(C,e.subCommand);var N="pre"===e.subCommand.toLowerCase()&&"pre"===C.tagName.toLowerCase()?"p":e.subCommand,E=this.parent.domNode.createTagString(N,C,y.replace(/>\s+</g,"><"));"LI"===C.tagName?(C.innerHTML="",C.insertAdjacentHTML("beforeend",E)):this.parent.domNode.replaceWith(C,E)}}this.preFormatMerge();var S=this.parent.editableElement.querySelector("."+s.a.startSelection),T=this.parent.editableElement.querySelector("."+s.a.endSelection);n.i(r.isNullOrUndefined)(S)||n.i(r.isNullOrUndefined)(T)||(S=S.lastChild,T=T.lastChild),a=this.parent.domNode.saveMarker(a,null),n.i(o.b)()&&n.i(o.c)(this.parent.editableElement,e.selector),i?this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,S,T,0,T.textContent.length):a.restore(),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e.prototype.setSelectionBRConfig=function(){var e=this.parent.editableElement.querySelector("."+s.a.startSelection),t=this.parent.editableElement.querySelector("."+s.a.endSelection);n.i(r.isNullOrUndefined)(t)?this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e,0):this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,e,t,0,0)},e.prototype.preFormatMerge=function(){var e=this.parent.editableElement.querySelectorAll("PRE");if(!n.i(r.isNullOrUndefined)(e))for(var t=0;t<e.length;t++){var i=e[t].previousElementSibling;n.i(r.isNullOrUndefined)(i)||"PRE"!==i.tagName||(i.insertAdjacentHTML("beforeend","<br>"+e[t].innerHTML),n.i(r.detach)(e[t]))}},e.prototype.cleanFormats=function(e,t){var n=["display","font-size","margin-top","margin-bottom","margin-left","margin-right","font-weight"];t=t.toLowerCase();for(var i=0;i<n.length&&"p"!==t&&"blockquote"!==t&&"pre"!==t;i++)e.style.removeProperty(n[i])},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(7)),o=n(21),s=n(8),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.r,this.imageCommand,this)},e.prototype.imageCommand=function(e){switch(e.value.toString().toLowerCase()){case"image":case"replace":this.createImage(e);break;case"insertlink":this.insertImageLink(e);break;case"openimagelink":this.openImageLink(e);break;case"editimagelink":this.editImageLink(e);break;case"removeimagelink":this.removeImageLink(e);break;case"remove":this.removeImage(e);break;case"alttext":this.insertAltTextImage(e);break;case"dimension":this.imageDimension(e);break;case"caption":this.imageCaption(e);break;case"justifyleft":this.imageJustifyLeft(e);break;case"justifycenter":this.imageJustifyCenter(e);break;case"justifyright":this.imageJustifyRight(e);break;case"inline":this.imageInline(e);break;case"break":this.imageBreak(e)}},e.prototype.createImage=function(e){var t=this,r=!1;if(e.item.url=n.i(i.isNullOrUndefined)(e.item.url)||"undefined"===e.item.url?e.item.src:e.item.url,n.i(i.isNullOrUndefined)(e.item.selectParent)||"IMG"!==e.item.selectParent[0].tagName){var o=n.i(i.createElement)("img");this.setStyle(o,e),n.i(i.isNullOrUndefined)(e.item.selection)||e.item.selection.restore(),n.i(i.isNullOrUndefined)(e.selector)||"pasteCleanupModule"!==e.selector?s.a.Insert(this.parent.currentDocument,o,this.parent.editableElement):e.callBack({requestType:"Images",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:[o]})}else{var a=e.item.selectParent[0];r=!0,this.setStyle(a,e,r)}if(e.callBack&&(n.i(i.isNullOrUndefined)(e.selector)||!n.i(i.isNullOrUndefined)(e.selector)&&"pasteCleanupModule"!==e.selector)){var l=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0],d="Replace"===e.value||r?e.item.selectParent[0]:i.Browser.isIE?l.previousSibling:l.previousElementSibling;d.addEventListener("load",function(){"Replace"===e.value&&r||e.callBack({requestType:"Images",editorMode:"HTML",event:e.event,range:t.parent.nodeSelection.getRange(t.parent.currentDocument),elements:[d]})})}"Replace"===e.value&&(e.item.subCommand="Replace",this.callBack(e))},e.prototype.setStyle=function(e,t,r){n.i(i.isNullOrUndefined)(t.item.url)||e.setAttribute("src",t.item.url);var o;if(r)for(var s={"e-imgcenter":"e-imgcenter","e-imgright":"e-imgright","e-imgleft":"e-imgleft"},a=e.classList,l=0;l<a.length;l++)n.i(i.isNullOrUndefined)(s[a[l]])||(o=s[a[l]]);e.setAttribute("class","e-rte-image"+(n.i(i.isNullOrUndefined)(t.item.cssClass)?"":" "+t.item.cssClass)+(n.i(i.isNullOrUndefined)(o)?"":" "+o)),n.i(i.isNullOrUndefined)(t.item.altText)||e.setAttribute("alt",t.item.altText),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.width)||e.setAttribute("width",this.calculateStyleValue(t.item.width.width)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.height)||e.setAttribute("height",this.calculateStyleValue(t.item.height.height)),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.minWidth)||(e.style.minWidth=this.calculateStyleValue(t.item.width.minWidth)),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.maxWidth)||(e.style.maxWidth=this.calculateStyleValue(t.item.width.maxWidth)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.minHeight)||(e.style.minHeight=this.calculateStyleValue(t.item.height.minHeight)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.maxHeight)||(e.style.maxHeight=this.calculateStyleValue(t.item.height.maxHeight))},e.prototype.calculateStyleValue=function(e){return"string"==typeof e&&(e.indexOf("px")||e.indexOf("%")||e.indexOf("auto"))?e:e+"px"},e.prototype.insertImageLink=function(e){var t=n.i(i.createElement)("a",{attrs:{href:e.item.url}});e.item.selectNode[0].parentElement.classList.contains("e-img-wrap")&&(e.item.selection.restore(),t.setAttribute("contenteditable","true")),t.appendChild(e.item.selectNode[0]),n.i(i.isNullOrUndefined)(e.item.target)||t.setAttribute("target",e.item.target),n.i(i.isNullOrUndefined)(e.item.ariaLabel)||t.setAttribute("aria-label",e.item.ariaLabel),s.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),this.callBack(e)},e.prototype.openImageLink=function(e){document.defaultView.open(e.item.url,e.item.target),this.callBack(e)},e.prototype.removeImageLink=function(e){var t=e.item.selectParent[0];if(t.classList.contains("e-img-caption")){var r=n.i(i.select)(".e-img-wrap",t),o=n.i(i.select)(".e-img-inner",t),a=o.cloneNode(!0);n.i(i.detach)(n.i(i.select)("a",t)),n.i(i.detach)(o),r.appendChild(e.item.insertElement),r.appendChild(a)}else n.i(i.detach)(t),i.Browser.isIE&&e.item.selection&&e.item.selection.restore(),s.a.Insert(this.parent.currentDocument,e.item.insertElement,this.parent.editableElement);this.callBack(e)},e.prototype.editImageLink=function(e){e.item.selectNode[0].parentElement.href=e.item.url,n.i(i.isNullOrUndefined)(e.item.target)?(e.item.selectNode[0].parentElement.removeAttribute("target"),e.item.selectNode[0].parentElement.removeAttribute("aria-label")):(e.item.selectNode[0].parentElement.target=e.item.target,e.item.selectNode[0].parentElement.ariaLabel=e.item.ariaLabel),this.callBack(e)},e.prototype.removeImage=function(e){n.i(i.closest)(e.item.selectNode[0],"a")&&("A"!==e.item.selectNode[0].parentElement.nodeName||n.i(i.isNullOrUndefined)(e.item.selectNode[0].parentElement.innerText))?n.i(i.detach)(n.i(i.closest)(e.item.selectNode[0],"a")):n.i(i.isNullOrUndefined)(n.i(i.closest)(e.item.selectNode[0],"."+o.q))?n.i(i.detach)(e.item.selectNode[0]):n.i(i.detach)(n.i(i.closest)(e.item.selectNode[0],"."+o.q)),this.callBack(e)},e.prototype.insertAltTextImage=function(e){e.item.selectNode[0].setAttribute("alt",e.item.altText),this.callBack(e)},e.prototype.imageDimension=function(e){var t=e.item.selectNode[0];t.style.height="",t.style.width="","auto"!==e.item.width?t.style.width=n.i(i.formatUnit)(e.item.width):t.removeAttribute("width"),"auto"!==e.item.height?t.style.height=n.i(i.formatUnit)(e.item.height):t.removeAttribute("height"),this.callBack(e)},e.prototype.imageCaption=function(e){s.a.Insert(this.parent.currentDocument,e.item.insertElement,this.parent.editableElement),this.callBack(e)},e.prototype.imageJustifyLeft=function(e){var t=e.item.selectNode[0];n.i(i.isNullOrUndefined)(t)||(t.removeAttribute("class"),n.i(i.addClass)([t],"e-rte-image"),n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o.q))||(n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.r),n.i(i.addClass)([n.i(i.closest)(t,"."+o.q)],o.s)),"A"===t.parentElement.nodeName?(n.i(i.removeClass)([t.parentElement],o.r),n.i(i.addClass)([t.parentElement],o.s),n.i(i.addClass)([t],o.s)):n.i(i.addClass)([t],o.s),this.callBack(e))},e.prototype.imageJustifyCenter=function(e){var t=e.item.selectNode[0];n.i(i.isNullOrUndefined)(t)||(t.removeAttribute("class"),n.i(i.addClass)([t],"e-rte-image"),n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o.q))||(n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.s),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.r),n.i(i.addClass)([n.i(i.closest)(t,"."+o.q)],o.t)),"A"===t.parentElement.nodeName?(n.i(i.removeClass)([t.parentElement],o.s),n.i(i.removeClass)([t.parentElement],o.r),n.i(i.addClass)([t.parentElement],o.t),n.i(i.addClass)([t],o.t)):n.i(i.addClass)([t],o.t),this.callBack(e))},e.prototype.imageJustifyRight=function(e){var t=e.item.selectNode[0];n.i(i.isNullOrUndefined)(t)||(t.removeAttribute("class"),n.i(i.addClass)([t],"e-rte-image"),n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o.q))||(n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.s),n.i(i.addClass)([n.i(i.closest)(t,"."+o.q)],o.r)),"A"===t.parentElement.nodeName?(n.i(i.removeClass)([t.parentElement],o.s),n.i(i.addClass)([t.parentElement],o.r),n.i(i.addClass)([t],o.r)):n.i(i.addClass)([t],o.r),this.callBack(e))},e.prototype.imageInline=function(e){var t=e.item.selectNode[0];t.removeAttribute("class"),n.i(i.addClass)([t],"e-rte-image"),n.i(i.addClass)([t],o.u),n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o.q))||(n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.v),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.t),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.s),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.r),n.i(i.addClass)([n.i(i.closest)(t,"."+o.q)],o.w)),this.callBack(e)},e.prototype.imageBreak=function(e){var t=e.item.selectNode[0];t.removeAttribute("class"),n.i(i.addClass)([t],o.v),n.i(i.addClass)([t],"e-rte-image"),n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o.q))||(n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.w),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.t),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.s),n.i(i.removeClass)([n.i(i.closest)(t,"."+o.q)],o.r),n.i(i.addClass)([n.i(i.closest)(t,"."+o.q)],o.v)),this.callBack(e)},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(7),r=n(3),o=n(6),s=function(){function e(e){this.indentValue=20,this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.y,this.applyIndents,this),this.parent.observer.on(r.d,this.onKeyDown,this)},e.prototype.onKeyDown=function(e){switch(e.event.action){case"indents":this.applyIndents({subCommand:"Indent",callBack:e.callBack}),e.event.preventDefault();break;case"outdents":this.applyIndents({subCommand:"Outdent",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.applyIndents=function(e){var t=this.parent.editableElement,i=t.classList.contains("e-rtl"),s=this.parent.nodeSelection.getRange(this.parent.currentDocument),a=this.parent.nodeSelection.save(s,this.parent.currentDocument);this.parent.domNode.setMarker(a);for(var l=this.parent.domNode.blockNodes(),d=l.slice(),c=[],u=0;u<d.length;u++)"LI"!==d[u].tagName&&"LI"===d[u].parentNode.tagName?(l.splice(l.indexOf(d[u]),1),c.push(d[u].parentNode)):"LI"===d[u].tagName&&(l.splice(l.indexOf(d[u]),1),c.push(d[u]));c.length>0&&this.parent.observer.notify(r.d,{event:{preventDefault:function(){},stopPropagation:function(){},shiftKey:"Indent"!==e.subCommand,which:9,action:"indent"},ignoreDefault:!0});for(var u=0;u<l.length;u++){var h=l[u],p=i?h.style.marginRight:h.style.marginLeft,m=void 0;"Indent"===e.subCommand?(m=""===p?this.indentValue+"px":parseInt(p,null)+this.indentValue+"px",i?h.style.marginRight=m:h.style.marginLeft=m):(m=""===p||"0px"===p?"":parseInt(p,null)-this.indentValue+"px",i?h.style.marginRight=m:h.style.marginLeft=m)}t.focus(),n.i(o.b)()&&n.i(o.c)(t,e.selector),a=this.parent.domNode.saveMarker(a),a.restore(),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(7),r=n(8),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.w,this.insertText,this)},e.prototype.insertText=function(e){var t=document.createTextNode(e.value);r.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(7),r=n(8),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.v,this.applyHtml,this)},e.prototype.applyHtml=function(e){if(r.a.Insert(this.parent.currentDocument,e.value,this.parent.editableElement,!0,e.enterAction),"pasteCleanup"===e.subCommand){var t=this.parent.editableElement.querySelectorAll(".pasteContent_RTE"),n=[].slice.call(t),i=this.parent.editableElement.querySelectorAll(".pasteContent_Img"),o=[].slice.call(i);e.callBack({requestType:e.subCommand,editorMode:"HTML",elements:n,imgElem:o})}else e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(7),r=n(20),o=n(12),s=n(8),a=n(0),l=(n.n(a),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.x,this.linkCommand,this)},e.prototype.linkCommand=function(e){switch(e.value.toString().toLocaleLowerCase()){case"createlink":case"editlink":this.createLink(e);break;case"openlink":this.openLink(e);break;case"removelink":this.removeLink(e)}},e.prototype.createLink=function(e){var t=!n.i(a.isNullOrUndefined)(e.item.selectParent)&&e.item.selectParent.length>0&&n.i(a.closest)(e.item.selectParent[0],"a");if(t=n.i(a.isNullOrUndefined)(t)?!n.i(a.isNullOrUndefined)(e.item.selectParent)&&e.item.selectParent.length>0?e.item.selectParent[0]:null:t,n.i(a.isNullOrUndefined)(t)||"A"!==t.tagName){var i=new r.a,o=i.getRange(this.parent.currentDocument);"#text"!==o.endContainer.nodeName||o.startContainer.textContent.length!==o.endOffset+1||" "!==o.endContainer.textContent.charAt(o.endOffset)||n.i(a.isNullOrUndefined)(o.endContainer.nextSibling)||"A"!==o.endContainer.nextSibling.nodeName||(i.setSelectionText(this.parent.currentDocument,o.startContainer,o.endContainer,o.startOffset,o.endOffset+1),o=i.getRange(this.parent.currentDocument));var l=!!n.i(a.isNullOrUndefined)(e.item.text)||e.item.text.replace(/ /g,"").localeCompare(o.toString().replace(/\n/g," ").replace(/ /g,""))<0;if(e.event&&"keydown"===e.event.type&&(32===e.event.keyCode||13===e.event.keyCode)||"Paste"===e.item.action||o.collapsed||l){var d=this.createAchorNode(e);d.innerText=""===e.item.text?e.item.url:e.item.text;var c=d.innerText,u=c.replace(/ +/g,function(e){return" ".repeat(e.length)});if(d.innerText=u,e.item.selection.restore(),s.a.Insert(this.parent.currentDocument,d,this.parent.editableElement),!e.event||"keydown"!==e.event.type||32!==e.event.keyCode&&13!==e.event.keyCode){var h="Paste"===e.item.action?d.childNodes[0].textContent.length:0;e.item.selection.setSelectionText(this.parent.currentDocument,d.childNodes[0],d.childNodes[0],h,d.childNodes[0].textContent.length)}else{var p=e.item.selection.range.startContainer;p.textContent=this.removeText(p.textContent,e.item.text)}}else this.createLinkNode(e)}else{var m=t,f="";if(n.i(a.isNullOrUndefined)(e.item.url)||m.setAttribute("href",e.item.url),n.i(a.isNullOrUndefined)(e.item.title)||m.setAttribute("title",e.item.title),n.i(a.isNullOrUndefined)(e.item.text)||""===e.item.text||(f=m.innerText,m.innerText=e.item.text),n.i(a.isNullOrUndefined)(e.item.target)?(m.removeAttribute("target"),m.removeAttribute("aria-label")):(m.setAttribute("target",e.item.target),m.setAttribute("aria-label",e.item.ariaLabel)),f===e.item.text)e.item.selection.setSelectionText(this.parent.currentDocument,m,m,1,1),e.item.selection.restore();else{var h="Paste"===e.item.action?m.childNodes[0].textContent.length:0;e.item.selection.setSelectionText(this.parent.currentDocument,m.childNodes[0],m.childNodes[0],h,m.childNodes[0].textContent.length)}}e.callBack&&e.callBack({requestType:"Links",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.createLinkNode=function(e){for(var t,n,i=new r.a,s=new o.a,a=i.getRange(this.parent.currentDocument),l=this.getSelectionNodes(i.getNodeCollection(a)),d=i.save(a,this.parent.currentDocument),c=[],u=[],h=[],p=[],m=[],f=0;f<l.length;f++)l[f]=s.GetSpliceNode(a,l[f]),c[f]=l[f];for(var g=0;g<c.length;g++){var b=!0;for(t=c[g];!0===b;){if("A"===t.parentNode.nodeName){var v=t.parentNode;t.parentNode.parentNode.insertBefore(v.firstChild,v),t.parentNode.removeChild(v)}this.isBlockNode(t.parentNode)||0===c.length||0===g||g===c.length-1||3===a.startContainer.nodeType?(u[g]=t,b=!1):t=t.parentNode}}for(var g=0,C=0;g<u.length;g++)if(0===g&&(m[C]=u[g]),u.length>1&&g<u.length-1){if(u[g].parentElement===u[g+1].parentElement&&u[g]===u[g+1])continue;m[C+1]=u[g+1],C++}var y=0;p[y]=this.createAchorNode(e);for(var g=0;g<m.length;g++)if(0===g&&(n=m[g].cloneNode(!0),p[g].appendChild(n)),g<m.length-1)if(m[g].parentNode===m[g+1].parentNode){var N=m[g+1].cloneNode(!0);p[y].appendChild(N)}else y+=1,p[y]=this.createAchorNode(e),n=m[g+1].cloneNode(!0),p[y].appendChild(n);this.parent.nodeSelection.setRange(document,d.range);for(var g=0,E=0,S=0;g<=m.length;g++)0===g&&(m[g].parentNode.insertBefore(p[E],m[g].nextSibling),1===this.parent.domNode.blockNodes().length&&this.parent.nodeSelection.setSelectionNode(this.parent.currentDocument,p[E]),h[S]=m[g],S++),g<m.length-1&&(m[g].parentNode===m[g+1].parentNode?(h[S]=m[g+1],S++):(E+=1,m[g+1].parentNode.insertBefore(p[E],m[g+1]),h[S]=m[g+1],S++));for(var g=0;g<h.length;g++)h[g].parentNode&&h[g].parentNode.removeChild(h[g])},e.prototype.createAchorNode=function(e){var t=n.i(a.createElement)("a",{className:"e-rte-anchor",attrs:{href:e.item.url,title:n.i(a.isNullOrUndefined)(e.item.title)||""===e.item.title?e.item.url:e.item.title}});return n.i(a.isNullOrUndefined)(e.item.target)||t.setAttribute("target",e.item.target),t},e.prototype.getSelectionNodes=function(e){e=e.reverse();for(var t=0;t<e.length;t++)3===e[t].nodeType&&""!==e[t].textContent.trim()||"IMG"!==e[t].nodeName&&(e.splice(t,1),t--);return e.reverse()},e.prototype.isBlockNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&i.a.indexOf(e.tagName.toLowerCase())>=0},e.prototype.removeText=function(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)n[i]===t&&(n.splice(i,1),i--);return n.join(" ")+" "},e.prototype.openLink=function(e){document.defaultView.open(e.item.url,e.item.target),this.callBack(e)},e.prototype.removeLink=function(e){var t=this.parent.domNode.blockNodes();if(t.length<2){this.parent.domNode.setMarker(e.item.selection);for(var i=n.i(a.closest)(e.item.selectParent[0],"a"),r=i||e.item.selectParent[0],o=r.parentNode,s=[];r.firstChild;null)s.push(o.insertBefore(r.firstChild,r));o.removeChild(r),s&&1===s.length&&(e.item.selection.startContainer=e.item.selection.getNodeArray(s[s.length-1],!0),e.item.selection.endContainer=e.item.selection.startContainer),e.item.selection=this.parent.domNode.saveMarker(e.item.selection)}else for(var l=0;l<t.length;l++)for(var d=t[l].querySelectorAll("a"),c=0;c<d.length;c++)this.parent.currentDocument.getSelection().containsNode(d[c],!0)&&(d[c].outerHTML=d[c].innerHTML);e.item.selection.restore(),this.callBack(e)},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(7),r=n(0),o=(n.n(r),n(16)),s=n(3),a=n(6),l=function(){function e(e){this.parent=e,this.domNode=this.parent.domNode,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(s.e,this.applyListsHandler,this),this.parent.observer.on(s.f,this.onKeyUp,this),this.parent.observer.on(s.d,this.keyDownHandler,this),this.parent.observer.on(s.m,this.spaceKeyAction,this)},e.prototype.testList=function(e){var t=[/^[\d]+[.]+$/,/^(?=[MDCLXVI])M*(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})[.]$/gi,/^[a-zA-Z][.]+$/],i=n.i(r.isNullOrUndefined)(e)?null:e.innerText.trim().split(".")[0]+".";if(!n.i(r.isNullOrUndefined)(i))for(var o=0;o<t.length;o++)if(t[o].test(i))return!0;return!1},e.prototype.testCurrentList=function(e){var t=[/^[1]+[.]+$/,/^[i]+[.]+$/,/^[a]+[.]+$/];if(!n.i(r.isNullOrUndefined)(e.startContainer.textContent.slice(0,e.startOffset)))for(var i=e.startContainer.textContent.replace(/\u200B/g,"").slice(0,e.startOffset).trim(),o=0;o<t.length;o++)if(t[o].test(i)&&2===i.length)return!0;return!1},e.prototype.spaceList=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument);this.saveSelection=this.parent.nodeSelection.save(t,this.parent.currentDocument);var i=this.parent.domNode.getSelectedNode(t.startContainer,t.startOffset),o=(this.parent.domNode.getSelectedNode(t.endContainer,t.endOffset),i.previousElementSibling),s=i.nextElementSibling,a=n.i(r.isNullOrUndefined)(o)?null:o.innerText.trim().substring(0,1),l=n.i(r.isNullOrUndefined)(s)?null:s.innerText.trim().substring(0,1),d=this.testCurrentList(t),c=this.testList(o),u=this.testList(s);c||u||"*"===a||"*"===l||(d?(t.startContainer.textContent=t.startContainer.textContent.slice(t.startOffset,t.startContainer.textContent.length),this.applyListsHandler({subCommand:"OL",callBack:e.callBack}),e.event.preventDefault()):"*"!==t.startContainer.textContent.replace(/\u200B/g,"").slice(0,t.startOffset).trim()&&"-"!==t.startContainer.textContent.replace(/\u200B/g,"").slice(0,t.startOffset).trim()||(t.startContainer.textContent=t.startContainer.textContent.slice(t.startOffset,t.startContainer.textContent.length),this.applyListsHandler({subCommand:"UL",callBack:e.callBack}),e.event.preventDefault()))},e.prototype.enterList=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i="LI"===t.startContainer.nodeName?t.startContainer:t.startContainer.parentElement.closest("LI"),o="LI"===t.endContainer.nodeName?t.endContainer:t.endContainer.parentElement.closest("LI"),s=!1;if(!n.i(r.isNullOrUndefined)(i)){var a=i.querySelectorAll(".e-video-clickelem"),l=a.length>0&&"IFRAME"===a[0].childNodes[0].nodeName;s=i.querySelectorAll("IMG").length>0||i.querySelectorAll("AUDIO").length>0||i.querySelectorAll("VIDEO").length>0||l}if(!n.i(r.isNullOrUndefined)(i)&&!n.i(r.isNullOrUndefined)(o)&&i===o&&"LI"===i.tagName&&""===i.textContent.trim()&&!s){if(i.innerHTML.indexOf(" ")>=0)return;65279===i.textContent.charCodeAt(0)&&(i.textContent="");var d=i.parentElement;if(n.i(r.isNullOrUndefined)(d.parentElement.closest("UL"))&&n.i(r.isNullOrUndefined)(d.parentElement.closest("OL"))){if(!n.i(r.isNullOrUndefined)(i.nextElementSibling)){var c=this.parent.domNode.blockParentNode(i);this.parent.nodeCutter.GetSpliceNode(t,c)}var u=void 0;"DIV"===e.enterAction?(u=n.i(r.createElement)("div"),u.innerHTML="<br>"):"P"===e.enterAction?(u=n.i(r.createElement)("p"),u.innerHTML="<br>"):u=n.i(r.createElement)("br"),this.parent.domNode.insertAfter(u,d),e.event.preventDefault(),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,u,0),""===d.textContent&&0===d.querySelectorAll("audio,video").length?n.i(r.detach)(d):n.i(r.detach)(i)}}},e.prototype.backspaceList=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=this.parent.domNode.getSelectedNode(t.startContainer,t.startOffset),o=this.parent.domNode.getSelectedNode(t.endContainer,t.endOffset);if(i="BR"===i.nodeName?i.parentElement:i,o="BR"===o.nodeName?o.parentElement:o,i===o&&!n.i(r.isNullOrUndefined)(n.i(r.closest)(i,"li"))&&(""===i.textContent.trim()&&65279===i.textContent.charCodeAt(0)||1===i.textContent.length&&8203===i.textContent.charCodeAt(0))&&(i.textContent=""),i===o&&"LI"===i.tagName&&0===i.textContent.length&&n.i(r.isNullOrUndefined)(i.previousElementSibling)&&i.removeAttribute("style"),i===o&&""===i.textContent){if("LI"===i.parentElement.tagName&&"LI"===o.parentElement.tagName)n.i(r.detach)(i);else if(i.closest("ul")||i.closest("ol")){var s=n.i(r.isNullOrUndefined)(i.closest("ul"))?i.closest("ol"):i.closest("ul");if(s.firstElementChild===i&&!n.i(r.isNullOrUndefined)(s.children[1])&&("OL"===s.children[1].tagName||"UL"===s.children[1].tagName))if(s.tagName===s.children[1].tagName){for(;s.children[1].lastChild;)this.parent.domNode.insertAfter(s.children[1].lastChild,s.children[1]);n.i(r.detach)(s.children[1])}else s.parentElement.insertBefore(s.children[1],s)}}else if(!(n.i(r.isNullOrUndefined)(i.firstChild)||"BR"!==i.firstChild.nodeName||n.i(r.isNullOrUndefined)(i.childNodes[1])||"UL"!==i.childNodes[1].nodeName&&"OL"!==i.childNodes[1].nodeName)){var s=n.i(r.isNullOrUndefined)(i.closest("ul"))?i.closest("ol"):i.closest("ul");if(s.tagName===i.childNodes[1].nodeName){for(;i.childNodes[1].lastChild;)this.parent.domNode.insertAfter(i.children[1].lastChild,i);n.i(r.detach)(i.childNodes[1])}else s.parentElement.insertBefore(i.children[1],s)}this.removeList(t,e),this.firstListBackSpace(t,e)},e.prototype.removeList=function(e,t){var i=this.parent.domNode.getSelectedNode(e.startContainer,e.startOffset),o=this.parent.domNode.getSelectedNode(e.endContainer,e.endOffset);i="BR"===i.nodeName?i.parentElement:i,o="BR"===o.nodeName?o.parentElement:o,i="LI"===i.nodeName||n.i(r.isNullOrUndefined)(i.closest("LI"))?i:i.closest("LI"),o="LI"===o.nodeName||n.i(r.isNullOrUndefined)(o.closest("LI"))?o:o.closest("LI"),(("OL"===e.commonAncestorContainer.nodeName||"UL"===e.commonAncestorContainer.nodeName||"LI"===e.commonAncestorContainer.nodeName)&&n.i(r.isNullOrUndefined)(o.nextElementSibling)&&o.textContent.length===e.endOffset&&n.i(r.isNullOrUndefined)(i.previousElementSibling)&&0===e.startOffset||-1!==r.Browser.userAgent.indexOf("Firefox")&&e.startContainer===e.endContainer&&e.startContainer===this.parent.editableElement&&0===e.startOffset&&1===e.endOffset)&&(-1!==r.Browser.userAgent.indexOf("Firefox")?n.i(r.detach)(e.commonAncestorContainer.childNodes[0]):"LI"===e.commonAncestorContainer.nodeName?n.i(r.detach)(e.commonAncestorContainer.parentElement):n.i(r.detach)(e.commonAncestorContainer),t.event.preventDefault())},e.prototype.onKeyUp=function(){if(!n.i(r.isNullOrUndefined)(this.commonLIParent)&&!n.i(r.isNullOrUndefined)(this.commonLIParent.querySelector(".removeList"))){for(var e=this.commonLIParent.querySelector(".removeList");!n.i(r.isNullOrUndefined)(e.firstChild);)this.parent.domNode.insertAfter(e.firstChild,e);n.i(r.detach)(e)}},e.prototype.firstListBackSpace=function(e,t){var i=this.parent.domNode.getSelectedNode(e.startContainer,e.startOffset);if(n.i(r.isNullOrUndefined)(i.closest("OL"))?n.i(r.isNullOrUndefined)(i.closest("UL"))||(this.commonLIParent=i.closest("UL")):this.commonLIParent=i.closest("OL"),"LI"===i.nodeName&&0===e.startOffset&&0===e.endOffset&&n.i(r.isNullOrUndefined)(i.previousSibling)&&!n.i(r.isNullOrUndefined)(this.commonLIParent)&&n.i(r.isNullOrUndefined)(this.commonLIParent.previousSibling)&&n.i(r.isNullOrUndefined)(this.commonLIParent.parentElement.closest("OL"))&&n.i(r.isNullOrUndefined)(this.commonLIParent.parentElement.closest("UL"))&&n.i(r.isNullOrUndefined)(this.commonLIParent.parentElement.closest("LI"))){var o=n.i(r.createElement)("P");o.innerHTML="​",i.classList.add("removeList"),this.commonLIParent.parentElement.insertBefore(o,this.commonLIParent)}},e.prototype.keyDownHandler=function(e){if(13===e.event.which&&this.enterList(e),32===e.event.which&&this.spaceList(e),8===e.event.which&&this.backspaceList(e),46===e.event.which&&"delete"===e.event.action){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),o=t.commonAncestorContainer,s=t.startContainer,a=t.endContainer,l=3===s.nodeType?s.parentElement:s,d=3===a.nodeType?a.parentElement:a;"UL"!==o.nodeName&&"OL"!==o.nodeName||l===d||n.i(r.isNullOrUndefined)(n.i(r.closest)(l,"ul"))&&n.i(r.isNullOrUndefined)(n.i(r.closest)(l,"ol"))||n.i(r.isNullOrUndefined)(n.i(r.closest)(d,"ul"))&&n.i(r.isNullOrUndefined)(n.i(r.closest)(d,"ol"))||o.lastElementChild!==n.i(r.closest)(d,"li")||t.collapsed||n.i(r.detach)(o),this.removeList(t,e)}if(9===e.event.which){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument);e.event.action&&"indent"===e.event.action||(this.saveSelection=this.parent.nodeSelection.save(t,this.parent.currentDocument));var c=void 0,u=t.startOffset,h=t.endOffset,l=this.parent.domNode.getSelectedNode(t.startContainer,t.startOffset),d=this.parent.domNode.getSelectedNode(t.endContainer,t.endOffset);if(l===d&&("BR"===l.nodeName||"#text"===l.nodeName)&&i.u.indexOf(l.parentNode.tagName.toLocaleLowerCase())>=0)return;e.event.action&&"indent"===e.event.action||this.domNode.setMarker(this.saveSelection),c=this.domNode.blockNodes();for(var p=[],m=!0,f=0;f<c.length;f++)"LI"===c[f].parentNode.tagName?p.push(c[f].parentNode):"LI"===c[f].tagName&&"P"!==c[f].childNodes[0].tagName&&"OL"!==c[f].childNodes[0].tagName&&"UL"!==c[f].childNodes[0].tagName&&p.push(c[f]);p.length>1||p.length&&(0===u&&0===h||e.ignoreDefault)?(e.event.preventDefault(),e.event.stopPropagation(),this.currentAction=this.getAction(p[0]),e.event.shiftKey?(this.revertList(p,e),this.revertClean()):m=this.nestedList(p),m&&(this.cleanNode(),this.parent.editableElement.focus()),e.event.action&&"indent"===e.event.action||(this.saveSelection=this.domNode.saveMarker(this.saveSelection),this.saveSelection.restore(),e.callBack&&e.callBack({requestType:this.currentAction,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes(),event:e.event}))):e.event.action&&"indent"===e.event.action||(e.event&&e.event.shiftKey&&"Tab"===e.event.key&&(e.event.action="tab"),this.saveSelection=this.domNode.saveMarker(this.saveSelection,e.event.action),this.saveSelection.restore())}else switch(e.event.action){case"ordered-list":this.applyListsHandler({subCommand:"OL",callBack:e.callBack}),e.event.preventDefault();break;case"unordered-list":this.applyListsHandler({subCommand:"UL",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.spaceKeyAction=function(e){32===e.event.which&&this.spaceList(e)},e.prototype.getAction=function(e){return"OL"===e.parentNode.nodeName?"OL":"UL"},e.prototype.revertClean=function(){for(var e=this.parent.editableElement.querySelectorAll("ul, ol"),t=0;t<e.length;t++){var n=e[t].querySelectorAll("ul, ol");if(n.length>0)for(var i=0;i<n.length;i++){var r=n[i].previousSibling;r&&"LI"===r.tagName&&r.appendChild(n[i])}}},e.prototype.noPreviousElement=function(e){var t,i,o=e.querySelectorAll("ol, ul"),s=e.querySelectorAll("li"),a=this.domNode.contents(s[0])[0];if(s.length>0&&("OL"===a.nodeName||"UL"===a.nodeName)?t=s[0]:i=o[0],t)for(var l=this.domNode.contents(e)[0];l&&!this.domNode.isList(l);null){var d=l.nextSibling;n.i(r.prepend)([l],t),n.i(r.setStyleAttribute)(e,{"list-style-type":"none"}),n.i(r.setStyleAttribute)(t,{"list-style-type":""}),l=d}else if(i){var c=n.i(r.createElement)("li");n.i(r.prepend)([c],i);for(var l=this.domNode.contents(e)[0];l&&!this.domNode.isList(l);null){var d=l.nextSibling;c.appendChild(l),l=d}n.i(r.prepend)([i],e.parentNode),n.i(r.detach)(e);var u=n.i(r.createElement)("li",{styles:"list-style-type: none;"});n.i(r.prepend)([u],i.parentNode),n.i(r.append)([i],u)}else{var u=n.i(r.createElement)("li",{styles:"list-style-type: none;"});n.i(r.prepend)([u],e.parentNode);var c=n.i(r.createElement)(e.parentNode.tagName);n.i(r.prepend)([c],u),n.i(r.append)([e],c)}},e.prototype.nestedList=function(e){for(var t=!1,i=0;i<e.length;i++){var o=this.domNode.getPreviousNode(e[i]);if(o){t=!0;var s=void 0,a=void 0,l=e[i].querySelectorAll("ol, ul"),d=e[i].querySelectorAll("li"),c=this.domNode.contents(d[0])[0];if(d.length>0&&("OL"===c.nodeName||"UL"===c.nodeName)?a=d[0]:s=l[0],s){var u=n.i(r.createElement)("li");n.i(r.prepend)([u],s);for(var h=this.domNode.contents(e[i])[0];h&&!this.domNode.isList(h);null){var p=h.nextSibling;u.appendChild(h),h=p}n.i(r.append)([s],o),n.i(r.detach)(e[i])}else if(a){if("LI"===o.tagName){for(var h=this.domNode.contents(e[i])[0];h&&!this.domNode.isList(h);null){var p=h.nextSibling;n.i(r.prepend)([h],a),n.i(r.setStyleAttribute)(e[i],{"list-style-type":"none"}),n.i(r.setStyleAttribute)(a,{"list-style-type":""}),h=p}n.i(r.append)([a.parentNode],o),n.i(r.detach)(e[i])}}else if("LI"===o.tagName){var u=n.i(r.createElement)(e[i].parentNode.tagName);n.i(r.append)([u],o),n.i(r.append)([e[i]],u)}else"OL"!==o.tagName&&"UL"!==o.tagName||n.i(r.append)([e[i]],o)}else{var m=e[i];t=!0,this.noPreviousElement(m)}}return t},e.prototype.applyListsHandler=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument);if(-1!==r.Browser.userAgent.indexOf("Firefox")&&t.startContainer===t.endContainer&&t.startContainer===this.parent.editableElement){for(var i=t.startContainer.childNodes,o=i[t.startOffset>0?t.startOffset-1:t.startOffset]||t.startContainer,s=t.endContainer.childNodes[t.endOffset>0?t.endOffset-1:t.endOffset]||t.endContainer,a="BR"===s.lastChild.nodeName?n.i(r.isNullOrUndefined)(s.lastChild.previousSibling)?s:s.lastChild.previousSibling:s.lastChild;!n.i(r.isNullOrUndefined)(a)&&"#text"!==a.nodeName&&"IMG"!==a.nodeName&&"BR"!==a.nodeName&&"HR"!==a.nodeName;)a=a.lastChild;this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,o,a,0,a.textContent.length),t=this.parent.nodeSelection.getRange(this.parent.currentDocument)}if(t.startContainer===t.endContainer&&t.startContainer===this.parent.editableElement&&t.startOffset===t.endOffset&&0===t.startOffset&&0===this.parent.editableElement.textContent.length&&"TABLE"!==this.parent.editableElement.childNodes[0].nodeName&&"IMG"!==this.parent.editableElement.childNodes[0].nodeName){var l=t.startContainer.childNodes[0];this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,l,l,0,0),t=this.parent.nodeSelection.getRange(this.parent.currentDocument)}this.saveSelection=this.parent.nodeSelection.save(t,this.parent.currentDocument),this.currentAction=e.subCommand,this.currentAction=e.subCommand="NumberFormatList"===this.currentAction?"OL":"BulletFormatList"===this.currentAction?"UL":this.currentAction,this.domNode.setMarker(this.saveSelection);var d=this.domNode.blockNodes();if("BR"===e.enterAction){this.setSelectionBRConfig();var c=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),u=this.parent.nodeSelection.getSelectionNodes(c),h=[];0===u.length&&u.push(d[0]);for(var p=0;p<u.length;p++){for(var m=u[p],f=void 0;!this.parent.domNode.isBlockNode(m)&&m!==this.parent.editableElement;)f=m,m=m.parentElement;this.parent.domNode.isBlockNode(m)&&m===this.parent.editableElement&&h.push(f)}for(var p=0;p<h.length;p++)if(!this.parent.domNode.isBlockNode(h[p])){for(var m=h[p],g=m;m===this.parent.editableElement;)g=m,m=m.parentElement;var b=void 0;this.parent.domNode.isBlockNode(g.parentElement)&&g.parentElement===this.parent.editableElement?(b=n.i(r.createElement)("p"),g.parentElement.insertBefore(b,g),b.appendChild(g)):b=g;for(var v=b.previousSibling;!n.i(r.isNullOrUndefined)(v)&&"BR"!==v.nodeName&&!this.parent.domNode.isBlockNode(v);)b.firstChild.parentElement.insertBefore(v,b.firstChild),v=b.previousSibling;n.i(r.isNullOrUndefined)(v)||"BR"!==v.nodeName||n.i(r.detach)(v);for(var C=b.nextSibling;!n.i(r.isNullOrUndefined)(C)&&"BR"!==C.nodeName&&!this.parent.domNode.isBlockNode(C);)b.appendChild(C),C=b.nextSibling;n.i(r.isNullOrUndefined)(C)||"BR"!==C.nodeName||n.i(r.detach)(C)}this.setSelectionBRConfig(),d=this.parent.domNode.blockNodes()}for(var p=0;p<d.length;p++)"TABLE"!==d[p].tagName||t.collapsed||d.splice(p,1),d.length>0&&"LI"!==d[p].tagName&&"LI"===d[p].parentNode.tagName&&(d[p]=d[p].parentNode);this.applyLists(d,this.currentAction,e.selector,e.item,e),e.callBack&&e.callBack({requestType:this.currentAction,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e.prototype.setSelectionBRConfig=function(){var e=this.parent.editableElement.querySelector("."+o.a.startSelection),t=this.parent.editableElement.querySelector("."+o.a.endSelection);n.i(r.isNullOrUndefined)(t)?this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e,0):this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,e,t,0,0)},e.prototype.applyLists=function(e,t,o,s,l){if(this.isRevert(e,t,s)&&n.i(r.isNullOrUndefined)(s))this.revertList(e,l),this.removeEmptyListElements();else{this.checkLists(e,t,s);for(var d=0;d<e.length;d++)if(n.i(r.isNullOrUndefined)(s)||n.i(r.isNullOrUndefined)(s.listStyle)||("listImage"===s.listStyle?n.i(r.setStyleAttribute)(e[d],{"list-style-image":s.listImage}):(n.i(r.setStyleAttribute)(e[d],{"list-style-image":"none"}),n.i(r.setStyleAttribute)(e[d],{"list-style-type":s.listStyle.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}))),"true"===e[d].getAttribute("contenteditable")&&1===e[d].childNodes.length&&"TABLE"===e[d].childNodes[0].nodeName){var c=document.createElement(t);c.innerHTML="<li><br/></li>",e[d].appendChild(c)}else if("LI"!==e[d].tagName&&n.i(r.isNullOrUndefined)(s)){!1;var u="IMG"===e[d].tagName?"":this.domNode.attributes(e[d]),h="<"+t+">",p="</"+t+">",m="li"+u,f=e[d].tagName.toLowerCase()===i.A?e[d].innerHTML:e[d].outerHTML,g=this.domNode.createTagString(m,null,f),b=h+g+p;this.domNode.replaceWith(e[d],b)}else if(!n.i(r.isNullOrUndefined)(s)&&"LI"!==e[d].tagName){!1;var u="IMG"===e[d].tagName?"":this.domNode.attributes(e[d]),h="<"+t+u+">",p="</"+t+">",m="li",f=e[d].tagName.toLowerCase()===i.A?e[d].innerHTML:e[d].outerHTML,g=this.domNode.createTagString(m,null,f),b=h+g+p;this.domNode.replaceWith(e[d],b)}}this.cleanNode(),this.parent.editableElement.focus(),n.i(a.b)()&&n.i(a.c)(this.parent.editableElement,o),this.saveSelection=this.domNode.saveMarker(this.saveSelection),this.saveSelection.restore()},e.prototype.removeEmptyListElements=function(){for(var e=this.parent.editableElement.querySelectorAll("ol, ul"),t=0;t<e.length;t++)""===e[t].textContent.trim()&&n.i(r.detach)(e[t])},e.prototype.isRevert=function(e,t,i){for(var o=!0,s=0;s<e.length;s++){if("LI"!==e[s].tagName)return!1;(e[s].parentNode.tagName!==t||n.i(r.isNullOrUndefined)(i)&&""!==e[s].parentNode.style.listStyleType)&&(o=!1)}return o},e.prototype.checkLists=function(e,t,i){for(var o=[],s=0;s<e.length;s++){var a=e[s].parentNode;n.i(r.isNullOrUndefined)(i)||"LI"!==e[s].tagName||n.i(r.isNullOrUndefined)(i.listStyle)||("listImage"===i.listStyle?n.i(r.setStyleAttribute)(a,{"list-style-image":i.listImage}):(n.i(r.setStyleAttribute)(a,{"list-style-image":"none"}),n.i(r.setStyleAttribute)(a,{"list-style-type":i.listStyle.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}))),("LI"===e[s].tagName&&a.tagName!==t&&o.indexOf(a)<0||"LI"===e[s].tagName&&a.tagName===t&&o.indexOf(a)<0&&null!==i)&&o.push(a),n.i(r.isNullOrUndefined)(i)&&(a.tagName===t||("UL"===a.tagName||"OL"===a.tagName)&&a.hasAttribute("style"))&&a.hasAttribute("style")&&a.removeAttribute("style")}for(var l=o.length-1;l>=0;l--){var d=o[l],c="<"+t.toLowerCase()+" "+this.domNode.attributes(d)+">"+d.innerHTML+"</"+t.toLowerCase()+">";this.domNode.replaceWith(o[l],c)}},e.prototype.cleanNode=function(){for(var e=this.parent.editableElement.querySelectorAll("ol + ol, ul + ul"),t=0;t<e.length;t++){var i=e[t];if(this.domNode.isList(i.previousElementSibling)&&this.domNode.openTagString(i)===this.domNode.openTagString(i.previousElementSibling)){for(var o=this.domNode.contents(i),s=0;s<o.length;s++)i.previousElementSibling.appendChild(o[s]);i.parentNode.removeChild(i)}else n.i(r.isNullOrUndefined)(i.getAttribute("level"))||i.tagName===i.previousElementSibling.tagName&&i.previousElementSibling.lastChild.append(i)}},e.prototype.findUnSelected=function(e,t){if(e=e.slice().reverse(),e.length>0){var n=[],i=[],r=t[t.length-1],o=[],s=[];o=r.childNodes;for(var a=0;a<o.length;a++)if("OL"===o[a].tagName||"UL"===o[a].tagName){var l=o[a].querySelectorAll("li");if(l.length>0)for(var d=0;d<l.length;d++)s.push(l[d])}for(var c=0;c<s.length;c++){for(var u=0,h=0;h<e.length;h++)s[c].contains(e[h])||(u+=1);u===e.length&&i.push(s[c])}if(i.length>0)for(var p=0;p<i.length;p++)"OL"!==this.domNode.contents(i[p])[0].nodeName&&"UL"!==this.domNode.contents(i[p])[0].nodeName&&n.push(i[p]);n.length>0&&this.nestedList(n)}},e.prototype.revertList=function(e,t){for(var s=[],a=e.length-1;a>=0;a--)for(var l=a-1;l>=0;l--)if(e[l].contains(e[a])||e[l]===e[a]){s.push(e[a]),e.splice(a,1);break}this.findUnSelected(s,e);for(var d=[],a=0;a<e.length;a++){var c=e[a];3===this.domNode.contents(c)[0].nodeType&&0===this.domNode.contents(c)[0].textContent.trim().length&&n.i(r.detach)(this.domNode.contents(c)[0]);var u=e[a].parentNode,h=c.getAttribute("class");if(0===s.length){var p=e[a].querySelectorAll("ul, ol"),m=p[0];if(m){if(m.querySelectorAll("li")){var f=n.i(r.createElement)(m.tagName);n.i(r.append)([f],m.parentNode);var g=n.i(r.createElement)("li",{styles:"list-style-type: none;"});n.i(r.append)([g],f),n.i(r.append)([m],g)}}}if(c.parentNode.insertBefore(this.closeTag(u.tagName),c),"LI"===u.parentNode.tagName||"OL"===u.parentNode.tagName||"UL"===u.parentNode.tagName)c.parentNode.insertBefore(this.closeTag("LI"),c);else{var b="";if(h&&(b+=' class="'+h+'"'),i.A&&0===c.querySelectorAll(i.a.join(", ")).length){var v=n.i(r.isNullOrUndefined)(h)?' class="e-rte-wrap-inner"':' class="'+h+' e-rte-wrap-inner"',C="<"+i.A+v+this.domNode.attributes(u)+"></"+i.A+">";"BR"!==t.enterAction&&this.domNode.wrapInner(c,this.domNode.parseHTMLFragment(C))}else if(3===this.domNode.contents(c)[0].nodeType){var y=this.domNode.createTagString(i.A,u,this.parent.domNode.encode(this.domNode.contents(c)[0].textContent));this.domNode.replaceWith(this.domNode.contents(c)[0],y)}else if(this.domNode.contents(c)[0].classList.contains(o.a.startSelection)||this.domNode.contents(c)[0].classList.contains(o.a.endSelection)){var y=this.domNode.createTagString(i.A,u,this.domNode.contents(c)[0].outerHTML);this.domNode.replaceWith(this.domNode.contents(c)[0],y)}else{var N=c.firstChild;h=N.getAttribute("class"),n.i(r.attributes)(N,this.domNode.rawAttributes(u)),h&&N.getAttribute("class")&&n.i(r.attributes)(N,{class:h+" "+N.getAttribute("class")})}n.i(r.append)([this.openTag("LI")],c),n.i(r.prepend)([this.closeTag("LI")],c)}this.domNode.insertAfter(this.openTag(u.tagName),c),"LI"===u.parentNode.tagName&&(u=u.parentNode.parentNode),d.indexOf(u)<0&&d.push(u)}for(var a=0;a<d.length;a++){var E=d[a],S=E.innerHTML,T=/<span class="e-rte-list-close-([a-z]*)"><\/span>/g,O=/<span class="e-rte-list-open-([a-z]*)"><\/span>/g;S=S.replace(T,"</$1>"),S=S.replace(O,"<$1 "+this.domNode.attributes(E)+">"),this.domNode.replaceWith(E,this.domNode.openTagString(E)+S.trim()+this.domNode.closeTagString(E))}for(var k=this.parent.editableElement.querySelectorAll("ul:empty, ol:empty"),a=0;a<k.length;a++)n.i(r.detach)(k[a]);for(var w=this.parent.editableElement.querySelectorAll("li:empty"),a=0;a<w.length;a++)n.i(r.detach)(w[a])},e.prototype.openTag=function(e){return this.domNode.parseHTMLFragment('<span class="e-rte-list-open-'+e.toLowerCase()+'"></span>')},e.prototype.closeTag=function(e){return this.domNode.parseHTMLFragment('<span class="e-rte-list-close-'+e.toLowerCase()+'"></span>')},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(3),r=n(0),o=(n.n(r),function(){function e(e){this.olData=["decimal","lower-alpha","lower-roman","upper-alpha","upper-roman","lower-greek"],this.ulData=["disc","square","circle","disc","square","circle"],this.ignorableNodes=["A","APPLET","B","BLOCKQUOTE","BR","BUTTON","CENTER","CODE","COL","COLGROUP","DD","DEL","DFN","DIR","DIV","DL","DT","EM","FIELDSET","FONT","FORM","FRAME","FRAMESET","H1","H2","H3","H4","H5","H6","HR","I","IMG","IFRAME","INPUT","INS","LABEL","LI","OL","OPTION","P","PARAM","PRE","Q","S","SELECT","SPAN","STRIKE","STRONG","SUB","SUP","TABLE","TBODY","TD","TEXTAREA","TFOOT","TH","THEAD","TITLE","TR","TT","U","UL"],this.blockNode=["div","p","h1","h2","h3","h4","h5","h6","address","blockquote","button","center","dd","dir","dl","dt","fieldset","frameset","hr","iframe","isindex","li","map","menu","noframes","noscript","object","ol","pre","table","tbody","td","tfoot","th","thead","tr","ul","header","article","nav","footer","section","aside","main","figure","figcaption"],this.borderStyle=["border-top","border-right","border-bottom","border-left"],this.upperRomanNumber=["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","XIII","XIV","XV","XVI","XVII","XVIII","XIX","XX"],this.lowerRomanNumber=["i","ii","iii","iv","v","vi","vii","viii","ix","x","xi","xii","xiii","xiv","xv","xvi","xvii","xviii","xix","xx"],this.lowerGreekNumber=["α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","σ","τ","υ","φ","χ","ψ","ω"],this.removableElements=["o:p","style"],this.listContents=[],this.cropImageDimensions=[],this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.j,this.wordCleanup,this)},e.prototype.wordCleanup=function(e){var t=n.i(r.isNullOrUndefined)(e.allowedStylePropertiesArray)?[]:e.allowedStylePropertiesArray,i=[],o=e.args.clipboardData.getData("text/HTML"),s=e.args.clipboardData.getData("text/rtf"),a=n.i(r.createElement)("p");a.setAttribute("id","MSWord-Content"),a.innerHTML=o;var l=/class='?Mso|style='[^ ]*\bmso-/i,d=/class="?Mso|style="[^ ]*\bmso-/i,c=/(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument)/gi,u=/style='mso-width-source:/i;if(l.test(o)||d.test(o)||c.test(o)||u.test(o)){this.imageConversion(a,s),o=o.replace(/<img[^>]+>/i,""),this.addListClass(a),i=this.cleanUp(a,i),n.i(r.isNullOrUndefined)(i[0])||"UL"===i[0].parentElement.tagName||"OL"===i[0].parentElement.tagName||this.listConverter(i),this.cleanList(a,"UL"),this.cleanList(a,"OL"),this.styleCorrection(a,t),this.removingComments(a),this.removeUnwantedElements(a),this.removeEmptyElements(a),this.removeEmptyAnchorTag(a),this.breakLineAddition(a),this.removeClassName(a),u.test(o)&&this.addTableBorderClass(a);var h=a.querySelectorAll("li");if(h.length>0)for(var p=0;p<h.length;p++)n.i(r.isNullOrUndefined)(h[p].style.marginLeft)||(h[p].style.marginLeft="");e.callBack(a.innerHTML,this.cropImageDimensions)}else e.callBack(a.innerHTML)},e.prototype.cleanList=function(e,t){for(var n=e.querySelectorAll(t+" div"),i=n.length-1;i>=0;i--){for(var r=n[i].parentNode;n[i].firstChild;)r.insertBefore(n[i].firstChild,n[i]);var o=this.findClosestListElem(n[i]);o&&this.insertAfter(n[i],o)}},e.prototype.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e.prototype.findClosestListElem=function(e){for(var t;!n.i(r.isNullOrUndefined)(e);)e=n.i(r.isNullOrUndefined)(e.closest("ul"))||"UL"===e.tagName?"OL"!==e.tagName?e.closest("ol"):null:e.closest("ul"),t=n.i(r.isNullOrUndefined)(e)?t:e;return t},e.prototype.addListClass=function(e){for(var t=e.querySelectorAll("*"),i=0;i<t.length;i++)!n.i(r.isNullOrUndefined)(t[i].getAttribute("style"))&&t[i].getAttribute("style").replace(/ /g,"").replace("\n","").indexOf("mso-list:l")>=0&&-1===t[i].className.toLowerCase().indexOf("msolistparagraph")&&"H"!==t[i].tagName.charAt(0)&&"LI"!==t[i].tagName&&"OL"!==t[i].tagName&&"UL"!==t[i].tagName&&t[i].classList.add("msolistparagraph")},e.prototype.addTableBorderClass=function(e){for(var t=e.querySelectorAll("table"),n=!1,i=0;i<t.length;i++){for(var r=0;r<this.borderStyle.length;r++)if(t[i].innerHTML.indexOf(this.borderStyle[r])>=0){n=!0;break}n&&(t[i].classList.add("e-rte-table-border"),n=!1)}},e.prototype.imageConversion=function(e,t){this.checkVShape(e);for(var i=e.querySelectorAll("img"),o=0;o<i.length;o++)!n.i(r.isNullOrUndefined)(i[o].getAttribute("v:shapes"))&&i[o].getAttribute("v:shapes").indexOf("Picture")<0&&i[o].getAttribute("v:shapes").indexOf("圖片")<0&&i[o].getAttribute("v:shapes").indexOf("Grafik")<0&&i[o].getAttribute("v:shapes").toLowerCase().indexOf("image")<0&&i[o].getAttribute("v:shapes").indexOf("Graphic")<0&&i[o].getAttribute("v:shapes").indexOf("_x0000_s")<0&&i[o].getAttribute("v:shapes").indexOf("_x0000_i")<0&&n.i(r.detach)(i[o]);i=e.querySelectorAll("img");var s=[],a=[],l=[],d=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);if(i.length>0){for(var o=0;o<i.length;o++)s.push(i[o].getAttribute("src")),l.push(i[o].getAttribute("src").split("/")[i[o].getAttribute("src").split("/").length-1].split(".")[0]);for(var c=this.hexConversion(t),o=0;o<c.length;o++)a.push({base64Data:n.i(r.isNullOrUndefined)(c[o].hex)?null:this.convertToBase64(c[o]),isCroppedImage:c[o].isCroppedImage}),c[o].isCroppedImage&&this.cropImageDimensions.push({goalWidth:c[o].goalWidth,goalHeight:c[o].goalHeight,cropLength:c[o].cropLength,cropTop:c[o].cropTop,cropR:c[o].cropR,cropB:c[o].cropB});for(var o=0;o<i.length;o++)s[o].match(d)?i[o].setAttribute("src",s[o]):(n.i(r.isNullOrUndefined)(a[o])||n.i(r.isNullOrUndefined)(a[o].base64Data)?(i[o].removeAttribute("src"),i[o].setAttribute("alt","Unsupported file format")):i[o].setAttribute("src",a[o].base64Data),!n.i(r.isNullOrUndefined)(a[o])&&a[o].isCroppedImage&&i[o].classList.add("e-img-cropped")),i[o].setAttribute("id","msWordImg-"+l[o])}},e.prototype.checkVShape=function(e){for(var t=e.querySelectorAll("*"),i=0;i<t.length;i++)switch(t[i].nodeName){case"V:SHAPETYPE":n.i(r.detach)(t[i]);break;case"V:SHAPE":if("V:IMAGEDATA"===t[i].firstElementChild.nodeName){var o=t[i].firstElementChild.getAttribute("src"),s=n.i(r.createElement)("img");s.setAttribute("src",o),t[i].parentElement.insertBefore(s,t[i]),n.i(r.detach)(t[i])}}},e.prototype.convertToBase64=function(e){var t=this.conHexStringToBytes(e.hex),n=this.conBytesToBase64(t);return e.type?"data:"+e.type+";base64,"+n:null},e.prototype.conBytesToBase64=function(e){for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=e.length,r=0;r<i;r+=3){var o=e.slice(r,r+3),s=o.length,a=[];if(s<3)for(var l=s;l<3;l++)o[l]=0;a[0]=(252&o[0])>>2,a[1]=(3&o[0])<<4|o[1]>>4,a[2]=(15&o[1])<<2|(192&o[2])>>6,a[3]=63&o[2];for(var l=0;l<4;l++)t+=l<=s?n.charAt(a[l]):"="}return t},e.prototype.conHexStringToBytes=function(e){for(var t=[],n=e.length/2,i=0;i<n;i++)t.push(parseInt(e.substr(2*i,2),16));return t},e.prototype.hexConversion=function(e){var t,i=/\{\\pict[\s\S]+?\\bliptag\-?\d+(\\blipupi\-?\d+)?(\{\\\*\\blipuid\s?[\da-fA-F]+)?[\s\}]*?/,o=new RegExp("(?:("+i.source+"))([\\da-fA-F\\s]+)\\}","g"),s=e.match(o),a=[];if(!n.i(r.isNullOrUndefined)(s))for(var l=0;l<s.length;l++){var d=!1,c=0,u=0,h=0,p=0,m=0,f=0;if(i.test(s[l])){if(-1!==s[l].indexOf("\\pngblip"))t="image/png";else if(-1!==s[l].indexOf("\\jpegblip"))t="image/jpeg";else{if(-1===s[l].indexOf("\\picprop"))continue;t=null}d=!!(this.extractCropValue("cropl",s[l])>0&&this.extractCropValue("cropt",s[l])>0||this.extractCropValue("cropr",s[l])>0||this.extractCropValue("cropb",s[l])),d&&(c=this.extractCropValue("wgoal",s[l]),u=this.extractCropValue("hgoal",s[l]),h=this.extractCropValue("cropl",s[l]),p=this.extractCropValue("cropt",s[l]),m=this.extractCropValue("cropr",s[l]),f=this.extractCropValue("cropb",s[l])),a.push({hex:t?s[l].replace(i,"").replace(/[^\da-fA-F]/g,""):null,type:t,isCroppedImage:d,goalWidth:c,goalHeight:u,cropLength:h,cropTop:p,cropR:m,cropB:f})}}return a},e.prototype.extractCropValue=function(e,t){var n=new RegExp("\\\\pic"+e+"(\\-?\\d+)\\\\").exec(t.replace(/\r\n\\/g,"\\").replace(/\n/g,"\\"))[1];return parseInt(n,10)},e.prototype.removeClassName=function(e){for(var t=e.querySelectorAll("*[class]:not(.e-img-cropped)"),n=0;n<t.length;n++)t[n].removeAttribute("class")},e.prototype.breakLineAddition=function(e){for(var t=e.querySelectorAll("*"),i=0;i<t.length;i++)if(0===t[i].children.length&&" "===t[i].innerHTML&&" "===t[i].innerHTML&&!t[i].closest("li")&&!t[i].closest("td")&&("SPAN"!==t[i].nodeName||"SPAN"===t[i].nodeName&&n.i(r.isNullOrUndefined)(t[i].previousElementSibling)&&n.i(r.isNullOrUndefined)(t[i].nextElementSibling))){var o=this.findDetachElem(t[i]),s=n.i(r.createElement)("br"),a=o.textContent.length>0&&o.textContent.match(/\u00a0/g)&&o.textContent.match(/\u00a0/g).length>0;a||n.i(r.isNullOrUndefined)(o.parentElement)||(o.parentElement.insertBefore(s,o),n.i(r.detach)(o))}},e.prototype.findDetachElem=function(e){return!n.i(r.isNullOrUndefined)(e.parentElement)&&""===e.parentElement.textContent.trim()&&"TD"!==e.parentElement.tagName&&n.i(r.isNullOrUndefined)(e.parentElement.querySelector("img"))?this.findDetachElem(e.parentElement):e},e.prototype.removeUnwantedElements=function(e){var t=e.querySelector("style");n.i(r.isNullOrUndefined)(t)||n.i(r.detach)(t);for(var i=e.innerHTML,o=0;o<this.removableElements.length;o++){var s=new RegExp("<"+this.removableElements[o]+">","g"),a=new RegExp("</"+this.removableElements[o]+">","g");i=i.replace(s,""),i=i.replace(a,"")}e.innerHTML=i,e.querySelectorAll(":empty")},e.prototype.findDetachEmptyElem=function(e){var t;if(n.i(r.isNullOrUndefined)(e.parentElement))t=null;else{t=e.parentElement.textContent.length>0&&e.parentElement.textContent.match(/\u00a0/g)&&e.parentElement.textContent.match(/\u00a0/g).length>0||""!==e.parentElement.textContent.trim()||"MSWord-Content"===e.parentElement.getAttribute("id")||this.hasParentWithClass(e,"MsoListParagraph")||!n.i(r.isNullOrUndefined)(e.parentElement.querySelector("img"))?e:this.findDetachEmptyElem(e.parentElement)}return t},e.prototype.hasParentWithClass=function(e,t){for(var i=e.parentElement;!n.i(r.isNullOrUndefined)(i);){if(i.classList.contains(t))return!0;i=i.parentElement}return!1},e.prototype.removeEmptyElements=function(e){for(var t=e.querySelectorAll(":empty"),i=0;i<t.length;i++){n.i(r.isNullOrUndefined)(t[i].closest("td"))||n.i(r.isNullOrUndefined)(t[i].closest("td").querySelector(".MsoNormal"))||(t[i].innerHTML="-");var o=!0;if("DIV"===t[i].tagName&&(o="none"===t[i].style.borderBottom||""===t[i].style.borderBottom),"IMG"!==t[i].tagName&&"BR"!==t[i].tagName&&"IFRAME"!==t[i].tagName&&"TD"!==t[i].tagName&&"HR"!==t[i].tagName&&o){var s=this.findDetachEmptyElem(t[i]);n.i(r.isNullOrUndefined)(s)||n.i(r.detach)(s)}}},e.prototype.styleCorrection=function(e,t){var i=e.querySelectorAll("style");if(i.length>0){var o=i[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi),s=n.i(r.isNullOrUndefined)(o)?null:this.findStyleObject(o),a=Object.keys(s),l=a.map(function(e){return s[""+e]});l=this.removeUnwantedStyle(l,t),this.filterStyles(e,t);for(var d=void 0,c=!1,u=0;u<a.length;u++){if(""===a[u].split(".")[0])d=e.getElementsByClassName(a[u].split(".")[1]),c=!0;else{if(1===a[u].split(".").length&&a[u].split(".")[0].indexOf("@")>=0)continue;d=1===a[u].split(".").length&&a[u].split(".")[0].indexOf("@")<0?e.getElementsByTagName(a[u]):e.querySelectorAll(a[u])}for(var h=0;h<d.length;h++)if(!d[h].closest("li")||"p"!==a[u]){var p=d[h].getAttribute("style");if(n.i(r.isNullOrUndefined)(p)||""===p.trim())l[u]=l[u].replace(/text-indent:-(.*?)(?=;|$)/gm,""),d[h].setAttribute("style",l[u]);else{var m=l[u].split(";");if(!c)for(var f=0;f<m.length;f++)p.indexOf(m[f].split(":")[0])>=0&&(m.splice(f,1),f--);var g=p+m.join(";")+";";d[h].setAttribute("style",g)}}c=!1}for(var b=["MsoListParagraphCxSpFirst","MsoListParagraphCxSpMiddle","MsoListParagraphCxSpLast"],u=0;u<b.length;u++)if(a.indexOf("li."+b[u])>-1)for(var v=e.querySelectorAll("ol."+b[u]+", ul."+b[u]),h=0;h<v.length;h++){var p=v[h].getAttribute("style");if(!n.i(r.isNullOrUndefined)(p)&&""!==p.trim()&&""!==v[h].style.marginLeft)for(var m=l[a.indexOf("li."+b[u])].split(";"),f=0;f<m.length;f++)if("margin-left".indexOf(m[f].split(":")[0])>=0&&!n.i(r.isNullOrUndefined)(m[f].split(":")[1])&&m[f].split(":")[1].indexOf("in")>=0&&v[h].style.marginLeft.indexOf("in")>=0){var C=parseFloat(m[f].split(":")[1].split("in")[0]),y=parseFloat(v[h].style.marginLeft.split("in")[0]);v[h].style.marginLeft=y-C+"in"}}}},e.prototype.filterStyles=function(e,t){for(var n=e.querySelectorAll("*[style]"),i=0;i<n.length;i++){for(var r=n[i].getAttribute("style").split(";"),o="",s=0;s<r.length;s++)t.indexOf(r[s].split(":")[0].trim())>=0&&(o+=r[s]+";");n[i].setAttribute("style",o)}},e.prototype.removeUnwantedStyle=function(e,t){for(var n=0;n<e.length;n++){var i=e[n].split(";");e[n]="";for(var r=0;r<i.length;r++)t.indexOf(i[r].split(":")[0])>=0&&(e[n]+=i[r]+";")}return e},e.prototype.findStyleObject=function(e){for(var t={},n=0;n<e.length;n++){var i=e[n],r=i.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),o=i.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");r=r.replace(/^[\s]|[\s]$/gm,""),o=o.replace(/^[\s]|[\s]$/gm,""),r=r.replace(/\n|\r|\n\r/g,""),o=o.replace(/\n|\r|\n\r/g,"");for(var s=r.split(", "),a=0;a<s.length;a++)t[s[a]]=o}return t},e.prototype.removingComments=function(e){var t=e.innerHTML;t=t.replace(/<!--[\s\S]*?-->/g,""),e.innerHTML=t},e.prototype.cleanUp=function(e,t){for(var i,o=[],s=e.querySelectorAll("*"),a=0;a<s.length;a++)-1===this.ignorableNodes.indexOf(s[a].nodeName)||3===s[a].nodeType&&""===s[a].textContent.trim()?o.push(s[a]):(s[a].className&&-1!==s[a].className.toLowerCase().indexOf("msolistparagraph")&&!n.i(r.isNullOrUndefined)(s[a].getAttribute("style"))&&s[a].getAttribute("style").indexOf("mso-list:")>=0&&(s[a].className.indexOf("MsoListParagraphCxSpFirst")>=0&&t.length>0&&null!==t[t.length-1]&&t.push(null),t.push(s[a])),!i||-1===this.blockNode.indexOf(s[a].nodeName.toLowerCase())||s[a].className&&-1!==s[a].className.toLowerCase().indexOf("msolistparagraph")&&!n.i(r.isNullOrUndefined)(s[a].getAttribute("style"))&&s[a].getAttribute("style").indexOf("mso-list:")>=0||t.push(null),-1!==this.blockNode.indexOf(s[a].nodeName.toLowerCase())&&(i=!!(s[a].className&&-1!==s[a].className.toLowerCase().indexOf("msolistparagraph")&&!n.i(r.isNullOrUndefined)(s[a].getAttribute("style"))&&s[a].getAttribute("style").indexOf("mso-list:")>=0)));return t.length&&null!==t[t.length-1]&&t.push(null),t},e.prototype.listConverter=function(e){for(var t,i,o=[],s=[],a="",l="",d=0;d<e.length;d++)if(null!==e[d]){e[d].getAttribute("style")&&-1!==e[d].getAttribute("style").indexOf("mso-outline-level")&&e[d].setAttribute("style",e[d].getAttribute("style").replace("mso-outline-level","mso-outline")),a=e[d].getAttribute("style"),t=a&&-1!==a.indexOf("level")?parseInt(a.charAt(a.indexOf("level")+5),null):1,this.listContents=[],this.getListContent(e[d]);var c=void 0,u=void 0,h=void 0,p=void 0;if(!n.i(r.isNullOrUndefined)(this.listContents[0])){if(c=this.listContents[0].trim().length>1?"ol":"ul",u=this.getlistStyleType(this.listContents[0],c),"ol"===c&&(0===d||null===e[d-1])){var m=this.listContents[0].split(".")[0],f=["A","a","I","i","α","1","1-"];-1===f.indexOf(m)&&("decimal"===u?isNaN(parseInt(m,10))||(h=parseInt(m,10)):"upper-alpha"===u?h=m.split(".")[0].charCodeAt(0)-64:"lower-alpha"===u?h=m.split(".")[0].charCodeAt(0)-96:"upper-roman"===u?h=this.upperRomanNumber.indexOf(this.listContents[0].split(".")[0])+1:"lower-roman"===u?h=this.lowerRomanNumber.indexOf(this.listContents[0].split(".")[0])+1:"lower-greek"===u&&(h=this.lowerGreekNumber.indexOf(this.listContents[0].split(".")[0])+1)),""!==e[d].style.marginLeft&&(p=e[d].style.marginLeft)}for(var g=[],b=1;b<this.listContents.length;b++)g.push(this.listContents[b]);var v=void 0;n.i(r.isNullOrUndefined)(e[d].className)||(v=e[d].className),n.i(r.isNullOrUndefined)(e[d].getAttribute("style"))||(e[d].setAttribute("style",e[d].getAttribute("style").replace("text-align:start;","")),e[d].style.textIndent="",l=e[d].getAttribute("style")),s.push({listType:c,content:g,nestedLevel:t,class:v,listStyle:l,listStyleTypeName:u,start:h,styleMarginLeft:p})}}else o.push({content:this.makeConversion(s),node:e[d-1]}),s=[];for(i=e.shift();i;){for(var C=[],y=0;y<o.length;y++)if(o[y].node===i){for(var N=0;N<o[y].content.childNodes.length;N++)C.push(o[y].content.childNodes[N]);for(var N=0;N<C.length;N++)i.parentElement.insertBefore(C[N],i);break}i.remove(),i=e.shift(),i||(i=e.shift())}},e.prototype.getlistStyleType=function(e,t){var n;if("ol"===t){var i=e.split(".")[0].charCodeAt(0);switch(!0){case this.upperRomanNumber.indexOf(e.split(".")[0])>-1:n="upper-roman";break;case this.lowerRomanNumber.indexOf(e.split(".")[0])>-1:n="lower-roman";break;case this.lowerGreekNumber.indexOf(e.split(".")[0])>-1:n="lower-greek";break;case i>64&&i<91:n="upper-alpha";break;case i>96&&i<123:n="lower-alpha";break;default:n="decimal"}}else switch(e.split(".")[0]){case"o":n="circle";break;case"§":n="square";break;default:n="disc"}return n},e.prototype.makeConversion=function(e){for(var t,i,o,s=n.i(r.createElement)("div"),a=1,l=0,d=0;d<e.length;d++){for(var c=["MsoListParagraphCxSpFirst","MsoListParagraphCxSpMiddle","MsoListParagraphCxSpLast"],u=!1,h=0;h<c.length;h++)if(c[h].indexOf(e[d].class)>=0){u=!0;break}n.i(r.isNullOrUndefined)(i)||0===d||e[d-1].listType===e[d].listType||u||(i=null);var p=n.i(r.createElement)("p",{className:"MsoNormal"});if(p.innerHTML=e[d].content.join(" "),1===e[d].nestedLevel&&0===l&&e[d].content)s.appendChild(t=n.i(r.createElement)(e[d].listType,{className:e[d].class})),i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString()),t.style.marginLeft=e[d].styleMarginLeft,t.style.listStyleType=e[d].listStyleTypeName;else if(e[d].nestedLevel===a)n.i(r.isNullOrUndefined)(i)||n.i(r.isNullOrUndefined)(i.parentElement)||i.parentElement.tagName.toLowerCase()!==e[d].listType?n.i(r.isNullOrUndefined)(i)?(t=n.i(r.createElement)(e[d].listType),t.style.listStyleType=e[d].listStyleTypeName,i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString()),s.appendChild(t)):(t=n.i(r.createElement)(e[d].listType),t.style.listStyleType=e[d].listStyleTypeName,i.parentElement.parentElement.appendChild(t),i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString())):(i.parentElement.appendChild(i=n.i(r.createElement)("li")),i.appendChild(p));else if(e[d].nestedLevel>a)if(n.i(r.isNullOrUndefined)(i))if(e[d].nestedLevel>a&&u){var m=n.i(r.createElement)(e[d].listType);i=n.i(r.createElement)("li"),m.appendChild(i),m.style.listStyleType="none";for(var f=0;f<e[d].nestedLevel-1;f++)i.appendChild(t=n.i(r.createElement)(e[d].listType)),i=n.i(r.createElement)("li"),t.appendChild(i),t.style.listStyleType="none";i.appendChild(p),s.appendChild(m),t.setAttribute("level",e[d].nestedLevel.toString()),t.style.listStyleType=e[d].listStyleTypeName}else s.appendChild(t=n.i(r.createElement)(e[d].listType)),i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString()),t.style.listStyleType=e[d].listStyleTypeName;else{for(var f=0;f<e[d].nestedLevel-a;f++)i.appendChild(t=n.i(r.createElement)(e[d].listType)),i=n.i(r.createElement)("li"),f!==e[d].nestedLevel-a-1&&e[d].nestedLevel-a>1&&(i.style.listStyleType="none"),t.appendChild(i);i.appendChild(p),t.setAttribute("level",e[d].nestedLevel.toString()),t.style.listStyleType=e[d].listStyleTypeName}else if(1===e[d].nestedLevel)s.lastChild.tagName.toLowerCase()===e[d].listType?t=s.lastChild:(s.appendChild(t=n.i(r.createElement)(e[d].listType)),t.style.listStyleType=e[d].listStyleTypeName),i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString());else for(o=i;o.parentElement;)if(o=o.parentElement,o.attributes.getNamedItem("level")){if(parseInt(o.attributes.getNamedItem("level").textContent,null)===e[d].nestedLevel){i=n.i(r.createElement)("li"),i.appendChild(p),o.appendChild(i);break}if(e[d].nestedLevel>parseInt(o.attributes.getNamedItem("level").textContent,null)){o.appendChild(t=n.i(r.createElement)(e[d].listType)),i=n.i(r.createElement)("li"),i.appendChild(p),t.appendChild(i),t.setAttribute("level",e[d].nestedLevel.toString()),t.style.listStyleType=e[d].listStyleTypeName;break}}i.setAttribute("class",e[d].class),i.setAttribute("style",n.i(r.isNullOrUndefined)(e[d].listStyle)?"":e[d].listStyle),a=e[d].nestedLevel,l++,n.i(r.isNullOrUndefined)(e[d].start)||t.setAttribute("start",e[d].start.toString())}return s},e.prototype.getListContent=function(e){var t="",i=e.firstElementChild;if(""!==i.textContent.trim()||n.i(r.isNullOrUndefined)(i.firstElementChild)||"IMG"!==i.firstElementChild.nodeName){if(i.childNodes.length>0){for(var o=i.querySelectorAll('[style*="mso-list"]'),s=0;s<o.length;s++)o[s].setAttribute("style",o[s].getAttribute("style").replace(/\n/g,""));var a=i.querySelector('span[style="mso-list:Ignore"]');n.i(r.isNullOrUndefined)(a)||(this.listContents.push(a.textContent.trim()),n.i(r.detach)(a),this.removingComments(e),this.removeUnwantedElements(e))}}else t=e.innerHTML.trim(),this.listContents.push(""),this.listContents.push(t);this.listContents.push(e.innerHTML)},e.prototype.removeEmptyAnchorTag=function(e){for(var t=e.querySelectorAll("a:not([href])"),n=t.length-1;n>=0;n--){for(var i=t[n].parentNode;t[n].firstChild;)i.insertBefore(t[n].firstChild,t[n]);i.removeChild(t[n])}},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(11),r=n(12),o=n(19),s=n(22),a=n(6),l=n(0),d=(n.n(l),n(16)),c=function(){function e(){}return e.applyFormat=function(e,t,o,c,u,h,p){if(this.enterAction=c,["bold","italic","underline","strikethrough","superscript","subscript","uppercase","lowercase","fontcolor","fontname","fontsize","backgroundcolor"].indexOf(t)>-1||"formatPainter"===u){"backgroundcolor"===t&&""===u&&(u="transparent");var m=new i.a,f=new d.b(o,e),g=new r.a,b=new s.a,v=m.getRange(e),C=m.save(v,e),y=v.collapsed?m.getSelectionNodeCollection(v):m.getSelectionNodeCollectionBr(v),N=!1,E=!1,S=!1,T=!1,O=["fontcolor","fontname","fontsize","backgroundcolor"].indexOf(t)>-1;if(v.collapsed){var k=b.getFormattedNode(v.startContainer,t,o),w=n.i(l.isNullOrUndefined)(k)?null:null===k.getAttribute("style")?k.nodeName:k.nodeName+"[style='"+k.getAttribute("style")+"']";if(y.length>0)N=!0,v=g.GetCursorRange(e,v,y[0]);else if(3===v.startContainer.nodeType&&(v.startContainer.parentElement.childElementCount>0&&v.startOffset>0&&"br"!==v.startContainer.parentElement.firstElementChild.tagName.toLowerCase()||!n.i(l.isNullOrUndefined)(k)&&k===v.startContainer.parentElement.closest(w)&&0!==v.startContainer.parentElement.closest(w).textContent.replace(new RegExp(String.fromCharCode(8203),"g"),"").trim().length))N=!0,v=g.GetCursorRange(e,v,v.startContainer),y.push(v.startContainer);else{var L=this.insertCursorNode(e,m,v,b,g,t,u,o);m.endContainer=m.startContainer=m.getNodeArray(L,!0);var _="BR"===L.nodeName&&L.parentNode.childNodes;n.i(l.isNullOrUndefined)(_)||1!==_.length||"BR"!==_[0].nodeName||0!==y.length?m.endOffset=m.startOffset=1:(m.setSelectionText(e,v.startContainer,v.endContainer,0,0),T=!0),"BR"===L.nodeName&&0===L.parentNode.textContent.length&&(T=!0)}}S=v.collapsed;for(var x=!1,D=0;D<y.length;D++){var M=b.getFormattedNode(y[D],t,o);null===M&&("subscript"===t?(M=b.getFormattedNode(y[D],"superscript",o),x=null!==M):"superscript"===t&&(M=b.getFormattedNode(y[D],"subscript",o),x=null!==M)),0===D&&null===M&&(E=!0),y[D]=null===M||E&&!O?this.insertFormat(e,y,D,M,S,E,O,v,g,t,u,p,f,o):this.removeFormat(y,D,M,S,E,O,v,g,t,u,m,o,f),m=this.applySelection(y,m,g,D,N)}n.i(a.b)()&&n.i(a.c)(o,h),T||C.restore(),x&&this.applyFormat(e,t,o,c)}},e.insertCursorNode=function(e,t,i,r,s,a,c,u){var h=t.getNodeCollection(i),p=new d.b(u,e),m=h.length>0?h.length>1&&i.startContainer===i.endContainer?this.getCursorFormat(r,h,a,u):r.getFormattedNode(h[0],a,u):null,f=null;if(m){if(f=h[0],8203===m.firstChild.textContent.charCodeAt(0)&&3===m.firstChild.nodeType){var g=new RegExp(String.fromCharCode(8203),"g"),b=void 0;m.firstChild===f?(f.textContent=m.parentElement&&(p.isBlockNode(m.parentElement)&&m.parentElement.textContent.length<=1?m.parentElement.childElementCount>1:0===m.childElementCount)&&(m.parentElement.textContent.length>1||m.parentElement.firstChild&&1===m.parentElement.firstChild.nodeType)?f.textContent:f.textContent.replace(g,""),b=f):(m.firstChild.textContent=m.firstChild.textContent.replace(g,""),b=m.firstChild);var v=void 0;if(0===b.textContent.length)if(n.i(l.isNullOrUndefined)(b.previousSibling)){if(!n.i(l.isNullOrUndefined)(b.parentElement)&&0===b.parentElement.textContent.length){var C=document.createElement("BR");b.parentElement.appendChild(C),n.i(l.detach)(b),f=C,t.setCursorPoint(e,f.parentElement,0)}}else f=b.previousSibling,v=b.textContent.length-1,t.setCursorPoint(e,b,v)}["fontcolor","fontname","fontsize","backgroundcolor"].indexOf(a)>-1?("fontcolor"===a?m.style.color=c:"fontname"===a?m.style.fontFamily=c:"fontsize"===a?m.style.fontSize=c:m.style.backgroundColor=c,f=m):o.a.unwrap(m)}else h.length>1&&i.startOffset>0&&h[0].firstElementChild&&"br"===h[0].firstElementChild.tagName.toLowerCase()&&(h[0].innerHTML=""),1!==h.length||0!==i.startOffset||"BR"!==h[0].nodeName&&(n.i(l.isNullOrUndefined)(h[0].nextSibling)||"BR"!==h[0].nextSibling.nodeName)||n.i(l.detach)("#text"===h[0].nodeName?h[0].nextSibling:h[0]),f=this.getInsertNode(e,i,a,c).firstChild;return f},e.getCursorFormat=function(e,t,n,i){for(var r,o=0;o<t.length;o++)r=t[o].lastElementChild?t[o].lastElementChild:t[o];return e.getFormattedNode(r,n,i)},e.removeFormat=function(e,t,i,r,s,a,d,c,u,h,p,m,f){var g=null,b="#text"===d.startContainer.nodeName?d.startContainer.textContent.substring(d.startOffset,d.startContainer.textContent.length):d.startContainer.textContent,v=e[t].textContent;if(d.startContainer!==d.endContainer||0!==d.startOffset||d.endOffset!==d.startContainer.length){var C=[],y=e[t];do{C.push(p.getIndex(y)),y=y.parentNode}while(y&&y!==i);if("BR"!==e[t].nodeName&&(y=g=r&&i.textContent.length-1===d.startOffset?c.SplitNode(d,i,!0):c.GetSpliceNode(d,i)),r){for(var N=g;null!==N.firstChild&&3!==N.firstChild.nodeType;null)N=N.firstChild;N.innerHTML="​",e[t]=N.firstChild}else{for(;y&&y.childNodes.length>0&&C.length-1>=0&&y.childNodes.length>C[C.length-1];)y=y.childNodes[C[C.length-1]],C.pop();if("BR"!==e[t].nodeName)if(3!==y.nodeType||r&&""===y.nodeValue){var E=document.createElement("div");E.innerHTML="​",3!==y.nodeType?(y.insertBefore(E.firstChild,y.firstChild),e[t]=y.firstChild):(y.parentNode.insertBefore(E.firstChild,y),e[t]=y.previousSibling,y.parentNode.removeChild(y))}else e[t]=y}}else if(a&&!e[t].contains(i)&&3===e[t].nodeType&&e[t].textContent!==i.textContent){for(var S=e[t].textContent===e[t].wholeText,T=e[t],O=this.GetFormatNode(u,h);T&&T.textContent===T.parentElement.textContent;)T=T.parentElement;if(S&&i.textContent!==T.textContent){var k=[],w=this.getPriorityFormatNode(T,m);return w&&w.textContent===T.textContent&&(T=w),k.push(T),this.applyStyles(k,0,O),e[t]}}var L;"backgroundcolor"===u&&(L=i.style.fontSize);var _;if("fontsize"===u){var x=n.i(l.closest)(e[t].parentElement,"span[style*=background-color]");n.i(l.isNullOrUndefined)(x)||(_=x.style.backgroundColor)}var D,M=i.getAttribute("style"),R=i.tagName;if("A"===R&&"underline"===u)i.style.textDecoration="none",D=[i];else{D=o.a.unwrap(i);var B=e[t].parentElement;n.i(l.isNullOrUndefined)(B)||"li"===B.tagName.toLowerCase()||(B=n.i(l.closest)(B,"li")),n.i(l.isNullOrUndefined)(B)||"li"!==B.tagName.toLowerCase()||B.textContent.trim()!==e[t].textContent.trim()||("bold"===u?B.style.fontWeight="normal":"italic"===u&&(B.style.fontStyle="normal"))}if(D[0]&&!a)for(var T=D[t]?D[t]:D[0],A=T;T&&T.parentElement&&T.parentElement!==m;T=T){var I=void 0;if(I="SPAN"===i.nodeName?T.parentElement.tagName.toLocaleLowerCase()===i.tagName.toLocaleLowerCase()&&T.parentElement.getAttribute("style")===M:T.parentElement.tagName.toLocaleLowerCase()===i.tagName.toLocaleLowerCase(),T.parentElement&&I&&(T.parentElement.childElementCount>1||d.startOffset>1)){if(A.parentElement&&A.parentElement.tagName.toLocaleLowerCase()===i.tagName.toLocaleLowerCase()&&d.startOffset===d.endOffset&&1!==A.nodeType&&!n.i(l.isNullOrUndefined)(A.textContent)&&A.parentElement.childElementCount>1&&(d.setStart(A,0),d.setEnd(A,A.textContent.length),c.SplitNode(d,A.parentElement,!1)),"span"===T.parentElement.tagName.toLocaleLowerCase()&&"underline"===i.style.textDecoration&&"underline"!==T.parentElement.style.textDecoration){T=T.parentElement;continue}o.a.unwrap(T.parentElement),T=n.i(l.isNullOrUndefined)(T.parentElement)||f.isBlockNode(T.parentElement)?T.parentElement:A}else T=T.parentElement}if(D.length>0&&a){for(var P=0;P<D.length;P++)if(3!==D[P].nodeType||D[P].textContent&&D[P].textContent.trim().length>0){D[P]=o.a.Wrap(D[P],this.GetFormatNode(u,h,R,M));var B=e[t].parentElement;n.i(l.isNullOrUndefined)(B)||"li"===B.tagName.toLowerCase()||(B=n.i(l.closest)(B,"li")),n.i(l.isNullOrUndefined)(B)||"li"!==B.tagName.toLowerCase()||B.textContent.trim()!==e[t].textContent.trim()||"fontname"===u&&(B.style.fontFamily=h),D[P].textContent===b&&(0===P?d.setStartBefore(D[P]):P===D.length-1&&d.setEndAfter(D[P]))}var U=e[t].parentElement;if(n.i(l.isNullOrUndefined)(L)||""===L||(U.style.fontSize=L),n.i(l.isNullOrUndefined)(_)||""===_||(U.style.backgroundColor=_),"backgroundcolor"===u&&!n.i(l.isNullOrUndefined)(L)&&""!==L&&U.parentElement.innerHTML===U.outerHTML){var H=U.parentElement;H.parentElement.insertBefore(U,H),n.i(l.detach)(H)}if("fontsize"===u||"fontcolor"===u){for(var B=e[t].parentElement,j=e[t].parentElement;!n.i(l.isNullOrUndefined)(j)&&"li"!==j.tagName.toLowerCase();)j=j.parentElement,B=j;for(var P=t,F="";P>=0&&!n.i(l.isNullOrUndefined)(B)&&"li"===B.tagName.toLowerCase()&&B.textContent.replace("//g","").trim().includes(e[P].textContent.trim());)F=" "+e[P].textContent.trim()+F,P--;var q=!1,z=0,V=!1;if(!n.i(l.isNullOrUndefined)(B)&&B.childNodes)for(var Q=0;Q<B.childNodes.length;Q++)"OL"===B.childNodes[Q].nodeName&&(z++,q=!0);if(n.i(l.isNullOrUndefined)(B)||"li"!==B.tagName.toLowerCase()||B.textContent.split("").join("").trim()!==F.split("").join("").trim()){if(!n.i(l.isNullOrUndefined)(B)&&"li"===B.tagName.toLowerCase()&&q){if(q&&z>0)for(var W=0;W<B.childNodes.length;W++)e[t].textContent===B.childNodes[W].textContent&&e[t].textContent===v&&B.textContent.replace("//g","").trim().includes(F.split("").join("").trim())&&(V=!0);if(V){for(var K=0;K<B.childNodes.length;K++)"OL"===B.childNodes[K].nodeName&&(B.childNodes[K].style.fontSize="initial");"fontsize"===u?B.style.fontSize=h:(B.style.color=h,B.style.textDecoration="inherit")}}}else"fontsize"===u?B.style.fontSize=h:(B.style.color=h,B.style.textDecoration="inherit")}}return e[t]},e.insertFormat=function(e,t,i,r,o,s,a,d,c,u,h,p,m,f){if(o)if("uppercase"!==u&&"lowercase"!==u){var g=this.getInsertNode(e,d,u,h);t[i]=g.firstChild,c.position=1}else c.position=d.startOffset;else if(null===r&&s||a){if("BR"!==t[i].nodeName&&(t[i]=c.GetSpliceNode(d,t[i]),t[i].textContent=c.TrimLineBreak(t[i].textContent)),"uppercase"===u||"lowercase"===u)t[i].textContent="uppercase"===u?t[i].textContent.toLocaleUpperCase():t[i].textContent.toLocaleLowerCase();else if(!0!==a||""!==h){var g=this.GetFormatNode(u,h);if("formatPainter"===h||a){for(var b=t[i].parentElement,v=t[i].parentElement;!n.i(l.isNullOrUndefined)(v)&&"li"!==v.tagName.toLowerCase();)v=v.parentElement,b=v;if(n.i(l.isNullOrUndefined)(b)||"li"!==b.tagName.toLowerCase()||b.textContent.trim()!==t[i].textContent.trim()||("fontsize"===u?b.style.fontSize=h:"fontcolor"===u?(b.style.color=h,b.style.textDecoration="inherit"):"fontname"===u&&(b.style.fontFamily=h)),"formatPainter"===h)return this.insertFormatPainterElem(t,i,d,c,p,m);var C=t[i],y=this.getPriorityFormatNode(C,f);if(!n.i(l.isNullOrUndefined)(y)||a){var N=n.i(l.isNullOrUndefined)(y)?C:y;if(N=n.i(l.isNullOrUndefined)(y)||""===y.style.fontSize?N:N.firstChild,n.i(l.isNullOrUndefined)(y)||"fontsize"===u)for(;N;){var E=N.parentElement.textContent.trim()===t[i].textContent.trim(),S=N.parentElement;if(m.isBlockNode(S)||!E||"SPAN"===S.nodeName&&S.classList.contains("e-img-inner"))break;N=S}var T=[];if("fontcolor"===u){var O=n.i(l.closest)(t[i].parentElement,"A");n.i(l.isNullOrUndefined)(O)||O.firstChild.textContent.trim()!==t[i].textContent.trim()||(N=t[i])}t[i].textContent.trim()!==N.textContent.trim()&&(N=t[i]),T[0]=N,this.applyStyles(T,0,g)}else t[i]=this.applyStyles(t,i,g)}else{t[i]=this.applyStyles(t,i,g);var b=t[i].parentElement;n.i(l.isNullOrUndefined)(b)||"li"===b.tagName.toLowerCase()||(b=n.i(l.closest)(b,"li")),n.i(l.isNullOrUndefined)(b)||"li"!==b.tagName.toLowerCase()||b.textContent.trim()!==t[i].textContent.trim()||("bold"===u?b.style.fontWeight="bold":"italic"===u&&(b.style.fontStyle="italic"))}}}else t[i]=c.GetSpliceNode(d,t[i]);return t[i]},e.applyStyles=function(e,t,n){return"BR"===e[t].nodeName&&"BR"===this.enterAction||(e[t]=t===e.length-1||"BR"===e[t].nodeName?o.a.Wrap(e[t],n):o.a.WrapBefore(e[t],n,!0),e[t]=this.getChildNode(e[t],n)),e[t]},e.getPriorityFormatNode=function(e,t){var i,r,o,a=new s.a,d=a.getFormattedNode(e,"fontsize",t);return n.i(l.isNullOrUndefined)(d)?(r=a.getFormattedNode(e,"backgroundcolor",t),n.i(l.isNullOrUndefined)(r)?(o=a.getFormattedNode(e,"fontname",t),n.i(l.isNullOrUndefined)(o)?(i=a.getFormattedNode(e,"fontcolor",t),n.i(l.isNullOrUndefined)(i)?null:i):o):r):d},e.getInsertNode=function(e,t,n,i){var r=this.GetFormatNode(n,i);if(r.innerHTML="​",l.Browser.isIE){var o=e.createDocumentFragment();o.appendChild(r),t.insertNode(o)}else t.insertNode(r);return r},e.getChildNode=function(e,t){return void 0!==e&&null!==e||(t.innerHTML="​",e=t.firstChild),e},e.applySelection=function(e,t,n,i,r){return 1!==e.length||r?1===e.length&&r?(t.startContainer=t.getNodeArray(e[i],!0),t.endContainer=t.startContainer,t.startOffset=n.position,t.endOffset=n.position):0===i?(t.startContainer=t.getNodeArray(e[i],!0),t.startOffset=0):i===e.length-1&&(t.endContainer=t.getNodeArray(e[i],!1),t.endOffset=e[i].textContent.length):(t.startContainer=t.getNodeArray(e[i],!0),t.endContainer=t.startContainer,t.startOffset=0,t.endOffset=e[i].textContent.length),t},e.GetFormatNode=function(e,t,n,i){var r;switch(e){case"bold":return document.createElement("strong");case"italic":return document.createElement("em");case"underline":return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.textDecoration="underline",r;case"strikethrough":return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.textDecoration="line-through",r;case"superscript":return document.createElement("sup");case"subscript":return document.createElement("sub");case"fontcolor":return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.color=t,r.style.textDecoration="inherit",r;case"fontname":return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.fontFamily=t,r;case"fontsize":return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.fontSize=t,r;default:return r=document.createElement("span"),this.updateStyles(r,n,i),r.style.backgroundColor=t,r}},e.updateStyles=function(e,t,n){null!==n&&"SPAN"===t&&e.setAttribute("style",n)},e.insertFormatPainterElem=function(e,t,i,r,s,a){var d=a.isBlockNode(e[t].parentElement)?e[t]:e[t].parentElement;if(!a.isBlockNode(d))for(;d.textContent.trim()===d.parentElement.textContent.trim()&&!a.isBlockNode(d.parentElement);)d=d.parentElement;n.i(l.isNullOrUndefined)(d)||1!==d.nodeType||d.classList.contains("e-rte-img-caption")||d.classList.contains("e-img-inner")||this.formatPainterCleanup(t,e,d,i,r,a);var c=s.element;if(!n.i(l.isNullOrUndefined)(c)){var u=c.cloneNode(!0),h=u.querySelectorAll(s.lastChild.nodeName),p=void 0;h.length>0?p=h[h.length-1]:n.i(l.isNullOrUndefined)(u)||u.nodeName!==s.lastChild.nodeName||(p=u),p.textContent=e[t].textContent;var m=p.childNodes[0];e[t]=o.a.Wrap(e[t],u),e[t].textContent="",e[t]=m}return e[t]},e.formatPainterCleanup=function(e,t,i,r,s,a){var d=["A","AUDIO","IMG","VIDEO","IFRAME"];if(0===e&&i.textContent.trim()!==t[e].textContent.trim()){s.SplitNode(r,i,!0);for(var c=t[e].parentElement.childNodes,u=0;u<c.length;u++)if(c[u].textContent.trim()===t[u].textContent.trim()){i.parentNode.insertBefore(c[u],i);break}for(var h=i.parentElement.childNodes,p=0;p<h.length;p++)""!==h[p].textContent.trim()&&0!==h[p].textContent.length||n.i(l.detach)(h[p])}else if(i.textContent.trim()!==t[e].textContent.trim())i.parentElement.insertBefore(t[e],i);else for(;!n.i(l.isNullOrUndefined)(i)&&3!==i.nodeType&&!a.isBlockNode(i);){for(var m=void 0,u=0;u<i.childNodes.length;u++){var f=i.childNodes[u];0!==f.textContent.trim().length&&3!==f.nodeType&&(m=i.childNodes[u])}-1===d.indexOf(i.tagName)&&o.a.unwrap(i),i=m}},e.enterAction="P",e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(7),r=n(48),o=n(3),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.o,this.applySelection,this),this.parent.observer.on(o.d,this.keyDownHandler,this)},e.prototype.keyDownHandler=function(e){var t=["bold","italic","underline","strikethrough","superscript","subscript","uppercase","lowercase"];(e.event.ctrlKey||e.event.metaKey)&&t.indexOf(e.event.action)>-1&&(e.event.preventDefault(),r.a.applyFormat(this.parent.currentDocument,e.event.action,this.parent.editableElement,e.enterAction),this.callBack(e,e.event.action))},e.prototype.applySelection=function(e){r.a.applyFormat(this.parent.currentDocument,e.subCommand.toLocaleLowerCase(),this.parent.editableElement,e.enterAction,e.value,e.selector),this.callBack(e,e.subCommand)},e.prototype.callBack=function(e,t){e.callBack&&e.callBack({requestType:t,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),n(7)),o=n(8),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.b,this.createTable,this),this.parent.observer.on(r.c,this.insertRow,this),this.parent.observer.on(r.d,this.insertColumn,this),this.parent.observer.on(r.e,this.deleteRow,this),this.parent.observer.on(r.f,this.deleteColumn,this),this.parent.observer.on(r.g,this.removeTable,this),this.parent.observer.on(r.h,this.tableHeader,this),this.parent.observer.on(r.i,this.tableVerticalAlign,this),this.parent.observer.on(r.j,this.cellMerge,this),this.parent.observer.on(r.k,this.HorizontalSplit,this),this.parent.observer.on(r.l,this.VerticalSplit,this),this.parent.observer.on(r.m,this.tableMove,this)},e.prototype.createTable=function(e){var t=n.i(i.createElement)("table",{className:"e-rte-table"}),r=n.i(i.createElement)("tbody");n.i(i.isNullOrUndefined)(e.item.width.width)||(t.style.width=this.calculateStyleValue(e.item.width.width)),n.i(i.isNullOrUndefined)(e.item.width.minWidth)||(t.style.minWidth=this.calculateStyleValue(e.item.width.minWidth)),n.i(i.isNullOrUndefined)(e.item.width.maxWidth)||(t.style.maxWidth=this.calculateStyleValue(e.item.width.maxWidth));for(var s=parseInt(e.item.width.width,10)>100?100/e.item.columns:parseInt(e.item.width.width,10)/e.item.columns,a=0;a<e.item.rows;a++){for(var l=n.i(i.createElement)("tr"),d=0;d<e.item.columns;d++){var c=n.i(i.createElement)("td");c.appendChild(n.i(i.createElement)("br")),c.style.width=s+"%",l.appendChild(c)}r.appendChild(l)}if(t.appendChild(r),e.item.selection.restore(),o.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),this.removeEmptyNode(),e.item.selection.setSelectionText(this.parent.currentDocument,t.querySelector("td"),t.querySelector("td"),0,0),null===t.nextElementSibling){var u=void 0;"DIV"===e.enterAction?(u=n.i(i.createElement)("div"),u.appendChild(n.i(i.createElement)("br"))):"BR"===e.enterAction?u=n.i(i.createElement)("br"):(u=n.i(i.createElement)("p"),u.appendChild(n.i(i.createElement)("br"))),this.insertAfter(u,t)}return t.querySelector("td").classList.add("e-cell-select"),e.callBack&&e.callBack({requestType:"Table",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:[t]}),t},e.prototype.calculateStyleValue=function(e){return"string"==typeof e&&(e.indexOf("px")>=0||e.indexOf("%")>=0||e.indexOf("auto")>=0)?e:e+"px"},e.prototype.removeEmptyNode=function(){for(var e=this.parent.editableElement.querySelectorAll("ul:empty, ol:empty"),t=0;t<e.length;t++)n.i(i.detach)(e[t]);for(var r=this.parent.editableElement.querySelectorAll("li *:empty:not(img)"),t=0;t<r.length;t++)n.i(i.detach)(r[t]),r.length===t+1&&(r=this.parent.editableElement.querySelectorAll("li *:empty:not(img)"),t=-1);for(var o=this.parent.editableElement.querySelectorAll("li:empty"),t=0;t<o.length;t++)n.i(i.detach)(o[t])},e.prototype.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e.prototype.getSelectedCellMinMaxIndex=function(e){for(var t=this.curTable.querySelectorAll(".e-cell-select"),n=0,i=e.length,r=0,o=e[0].length,s=0;n<t.length;n++){var a=this.getCorrespondingIndex(t[n],e),l=this.FindIndex(a[0],a[1],e);i=Math.min(a[0],i),r=Math.max(l[0],r),o=Math.min(a[1],o),s=Math.max(l[1],s)}return{startRow:i,endRow:r,startColumn:o,endColumn:s}},e.prototype.insertRow=function(e){var t="InsertRowBefore"!==e.item.subCommand,r=e.item.selection.range.startContainer;if("TH"!==r.nodeName&&"TD"!==r.nodeName&&(r=n.i(i.closest)(r.parentElement,"td,th")),"th"!==r.nodeName.toLowerCase()||"InsertRowBefore"!==e.item.subCommand){if(this.curTable=n.i(i.closest)(this.parent.nodeSelection.range.startContainer.parentElement,"table"),0===this.curTable.querySelectorAll(".e-cell-select").length){var o=this.curTable.rows[this.curTable.rows.length-1],s=o.cloneNode(!0);s.removeAttribute("rowspan"),this.insertAfter(s,o)}else{for(var a=this.getCorrespondingColumns(),l=this.getSelectedCellMinMaxIndex(a),d=t?l.endRow:l.startRow,c=n.i(i.createElement)("tr"),u=this.curTable.querySelectorAll("th.e-cell-select").length>0,h=0;h<a[d].length;h++)if(t&&d<a.length-1&&a[d][h]===a[d+1][h]||!t&&0<d&&a[d][h]===a[d-1][h])(0===h||0<h&&a[d][h]!==a[d][h-1])&&a[d][h].setAttribute("rowspan",(parseInt(a[d][h].getAttribute("rowspan"),10)+1).toString());else{var p=n.i(i.createElement)("td");p.appendChild(n.i(i.createElement)("br")),c.appendChild(p),p.setAttribute("style",a[u&&t&&a[d+1]?d+1:d][h].getAttribute("style"))}var m=void 0;m=u&&t?this.curTable.querySelector("tbody").childNodes[0]:this.curTable.rows[d],"InsertRowBefore"===e.item.subCommand?m.parentElement.insertBefore(c,m):u?m.parentElement.insertBefore(c,m):this.insertAfter(c,m)}e.item.selection.setSelectionText(this.parent.currentDocument,e.item.selection.range.startContainer,e.item.selection.range.startContainer,0,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.insertColumn=function(e){var t=e.item.selection.range.startContainer;"TH"!==t.nodeName&&"TD"!==t.nodeName&&(t=n.i(i.closest)(t.parentElement,"td,th"));for(var r,o=n.i(i.closest)(t,"tr"),s=n.i(i.closest)(o,"table").rows,a=Array.prototype.slice.call(o.querySelectorAll(":scope > td, :scope > th")).indexOf(t),l=parseInt(e.item.width,10)/o.querySelectorAll(":scope > td, :scope > th").length,d=parseInt(e.item.width,10)/(o.querySelectorAll(":scope > td, :scope > th").length+1),c=n.i(i.closest)(o,"table"),u=n.i(i.closest)(o,"table").querySelectorAll("th,td"),h=0;h<u.length;h++)u[h].dataset.oldWidth=u[h].offsetWidth/c.offsetWidth*100+"%";for(var h=0;h<s.length;h++){r=s[h].querySelectorAll(":scope > td, :scope > th")[a];var p=r.cloneNode(!0);p.innerHTML="",p.appendChild(n.i(i.createElement)("br")),p.removeAttribute("class"),p.removeAttribute("colspan"),p.removeAttribute("rowspan"),"InsertColumnLeft"===e.item.subCommand?r.parentElement.insertBefore(p,r):this.insertAfter(p,r),p.style.width=d.toFixed(4)+"%",delete p.dataset.oldWidth}for(var h=0;h<u.length;h++)u[h].style.width=(Number(u[h].dataset.oldWidth.split("%")[0])*d/l).toFixed(4)+"%",delete u[h].dataset.oldWidth;e.item.selection.setSelectionText(this.parent.currentDocument,t,t,0,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.deleteColumn=function(e){var t=e.item.selection.range.startContainer;3===t.nodeType&&(t=n.i(i.closest)(t.parentElement,"td,th"));var r=n.i(i.closest)(t,"TH"===t.tagName?"thead":"tbody"),o=r&&Array.prototype.indexOf.call(r.childNodes,t.parentNode);if(this.curTable=n.i(i.closest)(t,"table"),1===n.i(i.closest)(t,"tr").querySelectorAll("th,td").length)e.item.selection.restore(),n.i(i.detach)(n.i(i.closest)(t.parentElement,"table"));else{for(var s=void 0,a=this.getCorrespondingColumns(),l=this.getSelectedCellMinMaxIndex(a),d=l.startColumn,c=l.endColumn,u=0;u<a.length;u++)for(var h=a[u],p=0;p<h.length;p++){var m=h[p],f=this.getCorrespondingIndex(m,a),g=parseInt(m.getAttribute("colspan"),10)||1;f[1]+(g-1)>=d&&f[1]<=c&&(g>1?m.setAttribute("colspan",(g-1).toString()):(n.i(i.detach)(m),s=p,i.Browser.isIE&&(e.item.selection.setSelectionText(this.parent.currentDocument,this.curTable.querySelector("td"),this.curTable.querySelector("td"),0,0),this.curTable.querySelector("td, th").classList.add("e-cell-select"))))}if(s>-1){var b=r.children[o],v=b&&b.children[s<=b.children.length-1?s:s-1];v&&(e.item.selection.setSelectionText(this.parent.currentDocument,v,v,0,0),v.classList.add("e-cell-select"))}}if(e.callBack){var C=this.parent.nodeSelection.getRange(this.parent.currentDocument).startContainer;if("TD"!==C.nodeName){var y=this.parent.nodeSelection.getRange(this.parent.currentDocument).startOffset,N=C.children[y];N&&this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,N,0)}e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.deleteRow=function(e){var t=e.item.selection.range.startContainer;3===t.nodeType&&(t=n.i(i.closest)(t.parentElement,"td,th"));var r=Array.prototype.indexOf.call(t.parentNode.childNodes,t);this.curTable=n.i(i.closest)(t,"table");var o,s,a,l=this.getCorrespondingColumns(),d=this.getSelectedCellMinMaxIndex(l);if(1===this.curTable.rows.length)e.item.selection.restore(),n.i(i.detach)(n.i(i.closest)(t.parentElement,"table"));else for(s=d.endRow;s>=d.startRow;s--){for(o=this.curTable.rows[s],a=0;a<l[s].length;a++){if((0===a||l[s][a]!==l[s][a-1])&&1<parseInt(l[s][a].getAttribute("rowspan"),10)){var c=parseInt(l[s][a].getAttribute("rowspan"),10)-1;if(1===c){l[s][a].removeAttribute("rowspan");var u=this.getMergedRow(this.getCorrespondingColumns())[a];if(u){var h=u.cloneNode(!0);h.innerHTML="<br>",u.parentElement&&u.parentElement.insertBefore(h,u)}}else l[s][a].setAttribute("rowspan",c.toString())}if(s<l.length-1&&l[s][a]===l[s+1][a]&&(0===s||l[s][a]!==l[s-1][a])){var p=l[s][a],m=void 0;for(m=a;0<m&&l[s][m]===l[s][m-1];m--)0===m?this.curTable.rows[s+1].prepend(p):l[s+1][m-1].insertAdjacentElement("afterend",p)}}var f=o.rowIndex;this.curTable.deleteRow(f);var g=n.i(i.isNullOrUndefined)(this.curTable.rows[f])?this.curTable.querySelectorAll("tbody tr")[f-1]:this.curTable.querySelectorAll("tbody tr")[f],b=g&&g.querySelectorAll("td")[r];b?(e.item.selection.setSelectionText(this.parent.currentDocument,b,b,0,0),b.classList.add("e-cell-select")):(e.item.selection.setSelectionText(this.parent.currentDocument,this.curTable.querySelector("td"),this.curTable.querySelector("td"),0,0),this.curTable.querySelector("td, th").classList.add("e-cell-select"))}e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.getMergedRow=function(e){for(var t,n=0;n<e.length;n++)e[n].length!==this.curTable.rows[0].childNodes.length&&(t=e[n]);return t},e.prototype.removeTable=function(e){var t=e.item.selection.range.startContainer;t=3===t.nodeType?t.parentNode:t;var r=n.i(i.closest)(t.parentElement,"table");r&&(e.item.selection.restore(),n.i(i.detach)(r)),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.tableHeader=function(e){var t=!1,r=e.item.selection.range.startContainer;r=3===r.nodeType?r.parentNode:r;var o=n.i(i.closest)(r.parentElement,"table");if([].slice.call(o.childNodes).forEach(function(e){"THEAD"===e.nodeName&&(t=!0)}),o&&!t){for(var s=o.querySelector("tr").childElementCount,a=0,l=0;l<s;l++)a+=parseInt(o.querySelector("tr").children[l].getAttribute("colspan"),10)||1;for(var d=o.createTHead(),c=d.insertRow(0),u=0;u<a;u++){var h=n.i(i.createElement)("th");h.appendChild(n.i(i.createElement)("br")),c.appendChild(h)}}else o.deleteTHead();e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.tableVerticalAlign=function(e){"AlignTop"===e.item.subCommand?e.item.tableCell.style.verticalAlign="top":"AlignMiddle"===e.item.subCommand?e.item.tableCell.style.verticalAlign="middle":e.item.tableCell.style.verticalAlign="bottom",e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.cellMerge=function(e){n.i(i.isNullOrUndefined)(this.curTable)&&(this.curTable=n.i(i.closest)(this.parent.nodeSelection.range.startContainer.parentElement,"table"));var t=this.curTable.querySelectorAll(".e-cell-select");if(!(t.length<2)){this.mergeCellContent();var r=this.getSelectedMinMaxIndexes(this.getCorrespondingColumns()),o=t[0],s=o.parentElement.querySelectorAll(".e-cell-select");r.startColumn<r.endColumn&&o.setAttribute("colspan",(r.endColumn-r.startColumn+1).toString()),r.startRow<r.endRow&&o.setAttribute("rowspan",(r.endRow-r.startRow+1).toString());for(var a=0,l=s.length-1;l>=0;l--)a+=parseFloat(s[l].style.width);o.style.width=a+"%";for(var d=1;d<=t.length-1;d++)n.i(i.detach)(t[d]);for(var d=0;d<this.curTable.rows.length;d++)""===this.curTable.rows[d].innerHTML&&n.i(i.detach)(this.curTable.rows[d]);this.updateRowSpanStyle(r.startRow,r.endRow,this.getCorrespondingColumns()),this.updateColSpanStyle(r.startColumn,r.endColumn,this.getCorrespondingColumns()),e.item.selection.setSelectionText(this.parent.currentDocument,e.item.selection.range.startContainer,e.item.selection.range.startContainer,0,0),this.parent.nodeSelection&&o&&this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.updateColSpanStyle=function(e,t,n){var i,r,o,s,a=0,l=0,d=n;if(e<(t=Math.min(t,d[0].length-1))){for(r===e;r<=t;r++)if(!(e<r&&d[0][r]===d[0][r-1])&&1<(a=Math.min(parseInt(d[0][r].getAttribute("colspan"),10)||1,t-e+1))&&d[0][r]===d[0][r+1])for(l=a-1,i=1;i<d.length;i++){if(d[i][r]!==d[i-1][r])for(o=r;o<r+a;o++)if(1<(s=parseInt(d[i][o].getAttribute("colspan"),10)||1)&&d[i][o]===d[i][o+1])o+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&this.updateCellAttribute(d,l,"colspan",0,d.length-1,e,t)}},e.prototype.updateRowSpanStyle=function(e,t,n){var i,r,o,s,a=0,l=0,d=n;if(e<(t=Math.min(t,d.length-1))){for(i=e;i<=t;i++)if(!(e<i&&d[i][0]===d[i-1][0])&&d[i][0]&&1<(a=Math.min(parseInt(d[i][0].getAttribute("rowspan"),10)||1,t-e+1))&&d[i][0]===d[i+1][0])for(l=a-1,r=1;r<d[0].length;r++)if(d[i][r]!==d[i][r-1]){for(o=i;o<i+a;o++)if(1<(s=parseInt(d[o][r].getAttribute("rowspan"),10)||1)&&d[o][r]===d[o+1][r])o+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&this.updateCellAttribute(d,l,"rowspan",e,t,0,d[0].length-1)}},e.prototype.updateCellAttribute=function(e,t,n,i,r,o,s){var a,l,d;for(a=i;a<=r;a++)for(l=o;l<=s;l++)i<a&&e[a][l]===e[a-1][l]||o<l&&e[a][l]===e[a][l-1]||1<(d=parseInt(e[a][l].getAttribute(n),10)||1)&&(1<d-t?e[a][l].setAttribute(n,(d-t).toString()):e[a][l].removeAttribute(n))},e.prototype.mergeCellContent=function(){for(var e=this.curTable.querySelectorAll(".e-cell-select"),t="<br>"===e[0].innerHTML?"":e[0].innerHTML,n=1;n<e.length;n++)"<br>"!==e[n].innerHTML&&(t=t?t+"<br>"+e[n].innerHTML:t+e[n].innerHTML);e[0].innerHTML=t},e.prototype.getSelectedMinMaxIndexes=function(e){var t=this.curTable.querySelectorAll(".e-cell-select");if(0<t.length){for(var n=e.length,i=0,r=e[0].length,o=0,s=0;s<t.length;s++){var a=this.getCorrespondingIndex(t[s],e),l=this.FindIndex(a[0],a[1],e);n=Math.min(a[0],n),i=Math.max(l[0],i),r=Math.min(a[1],r),o=Math.max(l[1],o)}return{startRow:n,endRow:i,startColumn:r,endColumn:o}}return null},e.prototype.HorizontalSplit=function(e){var t=e.item.selection.range.startContainer;if(this.curTable=n.i(i.closest)(t.parentElement,"table"),!(this.curTable.querySelectorAll(".e-cell-select").length>1)){this.activeCell=this.curTable.querySelector(".e-cell-select");var r=this.activeCell.cloneNode(!0);r.removeAttribute("class"),r.innerHTML="</br>";var o=this.getCorrespondingIndex(this.activeCell,this.getCorrespondingColumns()),s=this.getCorrespondingColumns(),a=this.activeCell.getAttribute("rowspan")?parseInt(this.activeCell.getAttribute("rowspan"),10):1;if(a>1){var l=Math.ceil(a/2);1<l?this.activeCell.setAttribute("rowspan",l.toString()):this.activeCell.removeAttribute("rowspan"),1<a-l?r.setAttribute("rowspan",(a-l).toString()):r.removeAttribute("rowspan");var d=void 0,c=void 0;for(d=o[0]+Math.ceil(a/2),c=0===o[1]?o[1]:o[1]-1;0<=c&&(s[d][c]===s[d][c-1]||0<d&&s[d][c]===s[d-1][c]);)c--;-1===c?this.curTable.rows[d].firstChild?this.curTable.rows[d].prepend(r):this.curTable.appendChild(r):s[d][c].insertAdjacentElement("afterend",r)}else{var u=n.i(i.createElement)("tr");u.appendChild(r);for(var h=s[o[0]],p=0;p<=h.length-1;p++)h[p]!==h[p-1]&&h[p]!==this.activeCell&&h[p].setAttribute("rowspan",((parseInt(h[p].getAttribute("rowspan"),10)?parseInt(h[p].getAttribute("rowspan"),10):1)+1).toString());this.activeCell.parentNode.insertAdjacentElement("afterend",u)}e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.VerticalSplit=function(e){var t=e.item.selection.range.startContainer;if(this.curTable=n.i(i.closest)(t.parentElement,"table"),!(this.curTable.querySelectorAll(".e-cell-select").length>1)){this.activeCell=this.curTable.querySelector(".e-cell-select");var r=this.curTable.rows,o=this.activeCell.cloneNode(!0);o.removeAttribute("class"),o.innerHTML="</br>";var s=parseFloat(this.activeCell.style.width)/2;if("TH"===this.activeCell.tagName&&isNaN(s)){for(var a=this.curTable.querySelector("tr").childElementCount,l=0,d=0;d<a;d++)l+=parseInt(this.curTable.querySelector("tr").children[d].getAttribute("colspan"),10)||1;s=parseFloat((this.activeCell.offsetWidth/2/this.curTable.offsetWidth*100).toFixed(1))}var c=this.getCorrespondingIndex(this.activeCell,this.getCorrespondingColumns()),u=this.getCorrespondingColumns(),h=parseInt(this.activeCell.getAttribute("colspan"),10);if(h>1)1<Math.ceil(h/2)?this.activeCell.setAttribute("colspan",(h/2).toString()):this.activeCell.removeAttribute("colspan"),1<h-h/2?o.setAttribute("colspan",(h-h/2).toString()):o.removeAttribute("colspan");else for(var d=0;d<=r.length-1;d++)if(0===d||u[d][c[1]]!==u[d-1][c[1]]){var p=u[d][c[1]];p!==this.activeCell&&p.setAttribute("colspan",((parseInt(p.getAttribute("colspan"),10)?parseInt(p.getAttribute("colspan"),10):1)+1).toString())}this.activeCell.style.width=s+"%",o.style.width=s+"%",this.activeCell.parentNode.insertBefore(o,this.activeCell.nextSibling),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.getCorrespondingColumns=function(){for(var e=[],t=this,n=t.curTable.rows,i=0;i<=n.length-1;i++)for(var r=n[i],o=0,s=0;s<=r.children.length-1;s++){for(var a=r.children[s],l=a,d=parseInt(l.getAttribute("colspan"),10)||1,c=parseInt(l.getAttribute("rowspan"),10)||1,u=i;u<i+c;u++)for(var h=o;h<o+d;h++)e[u]||(e[u]=[]),e[u][h]?o++:e[u][h]=a;o+=0}return e},e.prototype.FindIndex=function(e,t,n){var i,r;for(i=e+1,r=t+1;i<n.length;){if(n[i][t]!==n[e][t]){i--;break}i++}for(i===n.length&&i--;r<n[e].length;){if(n[e][r]!==n[e][t]){r--;break}r++}return r===n[e].length&&r--,[i,r]},e.prototype.getCorrespondingIndex=function(e,t){for(var n=0;n<t.length;n++)for(var i=0;i<t[n].length;i++)if(t[n][i]===e)return[n,i];return[]},e.prototype.highlightCells=function(e,t,n,i,r){var o,s,l,d,c=e,u=t,h=n,p=i,m=new a;for(o=c;o<=u;o++){for((1<(parseInt(r[o][h].getAttribute("rowspan"),10)||1)||1<(parseInt(r[o][h].getAttribute("colspan"),10)||1))&&(d=this.FindIndex((l=this.getCorrespondingIndex(r[o][h],r))[0],l[1],r))?(c=Math.min(l[0],c),u=Math.max(d[0],u),h=Math.min(l[1],h),p=Math.max(d[1],p)):(1<(parseInt(r[o][p].getAttribute("rowspan"),10)||1)||1<(parseInt(r[o][p].getAttribute("colspan"),10)||1))&&(d=this.FindIndex((l=this.getCorrespondingIndex(r[o][p],r))[0],l[1],r))&&(c=Math.min(l[0],c),u=Math.max(d[0],u),h=Math.min(l[1],h),p=Math.max(d[1],p)),s=h;s<=p;s++)(1<(parseInt(r[c][s].getAttribute("rowspan"),10)||1)||1<(parseInt(r[c][s].getAttribute("colspan"),10)||1))&&(d=this.FindIndex((l=this.getCorrespondingIndex(r[c][s],r))[0],l[1],r))?(c=Math.min(l[0],c),u=Math.max(d[0],u),h=Math.min(l[1],h),p=Math.max(d[1],p)):(1<(parseInt(r[u][s].getAttribute("rowspan"),10)||1)||1<(parseInt(r[u][s].getAttribute("colspan"),10)||1))&&(d=this.FindIndex((l=this.getCorrespondingIndex(r[u][s],r))[0],l[1],r))&&(c=Math.min(l[0],c),u=Math.max(d[0],u),h=Math.min(l[1],h),p=Math.max(d[1],p));m=c===e&&u===t&&h===n&&p===i?{startRow:e,endRow:t,startColumn:n,endColumn:i}:this.highlightCells(c,u,h,p,r)}return m},e.prototype.tableMove=function(e){this.activeCell=e.selectNode[0];var t=e.event.target,r=this.activeCell.tagName,o=t.tagName;if(this.curTable=n.i(i.closest)(t,"table"),this.curTable.querySelectorAll(".e-cell-select").length>1&&this.parent.nodeSelection.Clear(this.parent.currentDocument),"TD"===t.tagName||"TH"===t.tagName||r===o){for(var s=Array.prototype.slice.call(this.activeCell.parentElement.parentElement.children).indexOf(this.activeCell.parentElement),a=Array.prototype.slice.call(this.activeCell.parentElement.children).indexOf(this.activeCell),l=Array.prototype.slice.call(t.parentElement.parentElement.children).indexOf(t.parentElement),d=Array.prototype.slice.call(t.parentElement.children).indexOf(t),c=this.curTable.querySelectorAll(".e-cell-select"),u=c.length-1;u>=0;u--)this.activeCell!==c[u]&&c[u].classList.remove("e-cell-select");if(s!==l||a!==d){for(var h=this.getCorrespondingColumns(),p=this.getCorrespondingIndex(this.activeCell,h),m=this.getCorrespondingIndex(t,h),f=this.highlightCells(Math.min(p[0],m[0]),Math.max(p[0],m[0]),Math.min(p[1],m[1]),Math.max(p[1],m[1]),h),g=f.startRow;g<=f.endRow;g++)for(var b=f.startColumn;b<=f.endColumn;b++)h[g][b].classList.add("e-cell-select");this.parent.nodeSelection.range&&(this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,this.parent.nodeSelection.range.endContainer,this.parent.nodeSelection.range.endContainer,0,0),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,this.parent.nodeSelection.range.endContainer,0))}}},e}(),a=function(){function e(){}return e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return d});var i=n(22),r=n(7),o=n(11),s=n(6),a=n(0),l=(n.n(a),n.i(s.a)()),d=function(){function e(){}return e.get=function(e,t,n,i,r,s){for(var a=JSON.parse(JSON.stringify(l)),d=JSON.parse(JSON.stringify(l)),c=new o.a,u=c.getRange(e),h=s?[s]:u.collapsed?c.getNodeCollection(u):c.getSelectionNodeCollectionBr(u),p=h.length,m=!1,f=0;f<h.length;f++){for(;3===h[f].nodeType&&3===u.startContainer.nodeType&&h[f].parentNode&&h[f].parentNode.lastElementChild&&"BR"!==h[f].parentNode.lastElementChild.nodeName&&0===this.getImmediateBlockNode(h[f].parentNode).textContent.replace(/\u200B/g,"").length&&0===u.startContainer.textContent.replace(/\u200B/g,"").length&&0===c.get(e).toString().replace(/\u200B/g,"").length;)h[f]=h[f].parentNode.lastElementChild.firstChild,m=!0;m&&h[f]&&(c.setCursorPoint(e,h[f],h[f].textContent.length),m=!1),("BR"!==h[f].nodeName&&3!==h[f].nodeType||p>1&&3===h[f].nodeType&&""===h[f].textContent.trim())&&(h.splice(f,1),f--)}for(var f=0;f<h.length;f++)a=this.getFormatParent(e,a,h[f],t,n,i,r),(0===f&&a.bold||!a.bold)&&(d.bold=a.bold),(0===f&&a.insertcode||!a.insertcode)&&(d.insertcode=a.insertcode),(0===f&&a.italic||!a.italic)&&(d.italic=a.italic),(0===f&&a.underline||!a.underline)&&(d.underline=a.underline),(0===f&&a.strikethrough||!a.strikethrough)&&(d.strikethrough=a.strikethrough),(0===f&&a.superscript||!a.superscript)&&(d.superscript=a.superscript),(0===f&&a.subscript||!a.subscript)&&(d.subscript=a.subscript),(0===f&&a.fontcolor||!a.fontcolor)&&(d.fontcolor=a.fontcolor),0===f&&a.fontname?d.fontname=a.fontname:d.fontname=a.fontname===d.fontname?a.fontname:"empty",0===f&&a.fontsize?d.fontsize=a.fontsize:d.fontsize=a.fontsize===d.fontsize?a.fontsize:"empty",(0===f&&a.backgroundcolor||!a.backgroundcolor)&&(d.backgroundcolor=a.backgroundcolor),(0===f&&a.orderedlist||!a.orderedlist)&&(d.orderedlist=a.orderedlist),(0===f&&a.unorderedlist||!a.unorderedlist)&&(d.unorderedlist=a.unorderedlist),(0===f&&a.alignments||!a.alignments)&&(d.alignments=a.alignments),0===f&&a.formats?d.formats=a.formats:d.formats=a.formats===d.formats?a.formats:"empty",(0===f&&a.createlink||!a.createlink)&&(d.createlink=a.createlink),(0===f&&a.numberFormatList||!a.numberFormatList)&&(d.numberFormatList=a.numberFormatList),(0===f&&a.bulletFormatList||!a.bulletFormatList)&&(d.bulletFormatList=a.bulletFormatList),a=JSON.parse(JSON.stringify(l));return d},e.getImmediateBlockNode=function(e){do{e=e.parentNode}while(e&&r.a.indexOf(e.nodeName.toLocaleLowerCase())<0);return e},e.getFormatParent=function(e,t,n,i,r,o,s){if(i.contains(n)||3===n.nodeType&&3!==i.nodeType&&i.contains(n.parentNode))do{t=this.isFormattedNode(e,t,n,r,o,s),n=n.parentNode}while(n&&n!==i);return t},e.isFormattedNode=function(e,t,n,r,o,s){return t.bold||(t.bold=i.a.isBold(n)),t.italic||(t.italic=i.a.isItalic(n)),t.underline||(t.underline=i.a.isUnderline(n)),t.strikethrough||(t.strikethrough=i.a.isStrikethrough(n)),t.superscript||(t.superscript=i.a.isSuperscript(n)),t.subscript||(t.subscript=i.a.isSubscript(n)),t.fontcolor||(t.fontcolor=this.isFontColor(e,n)),t.fontname||(t.fontname=this.isFontName(e,n,s)),t.fontsize||(t.fontsize=this.isFontSize(e,n,o)),t.backgroundcolor||(t.backgroundcolor=this.isBackgroundColor(n)),t.orderedlist||(t.orderedlist=this.isOrderedList(n)),t.unorderedlist||(t.unorderedlist=this.isUnorderedList(n)),t.alignments||(t.alignments=this.isAlignment(n)),t.formats||(t.formats=this.isFormats(n,r),"pre"===t.formats&&(t.insertcode=!0)),t.createlink||(t.createlink=this.isLink(n)),t.numberFormatList||(t.numberFormatList=this.isNumberFormatList(n)),t.bulletFormatList||(t.bulletFormatList=this.isBulletFormatList(n)),t},e.isFontColor=function(e,t){var n=t.style&&t.style.color;return null!==n&&void 0!==n&&""!==n||3===t.nodeType||(n=this.getComputedStyle(e,t,"color")),null!==n&&""!==n&&void 0!==n?n:null},e.isLink=function(e){return"a"===e.nodeName.toLocaleLowerCase()},e.isBackgroundColor=function(e){var t=e.style&&e.style.backgroundColor;return null!==t&&""!==t&&void 0!==t?t:null},e.isFontSize=function(e,t,n){var i=t.style&&t.style.fontSize;return null!==i&&void 0!==i&&""!==i||3===t.nodeType||!t.parentElement.classList.contains("e-content")||(i=this.getComputedStyle(e,t,"font-size")),null!==i&&""!==i&&void 0!==i&&(null===n||void 0===n||n.indexOf(i)>-1)?i:null},e.isFontName=function(e,t,i){var r=t.style&&t.style.fontFamily;null!==r&&void 0!==r&&""!==r||3===t.nodeType||(r=this.getComputedStyle(e,t,"font-family"));var o=null;return null!==r&&""!==r&&void 0!==r&&(null===i||void 0===i||i.filter(function(e,t){var i=new RegExp(r,"i");(e.replace(/"/g,"").replace(/ /g,"").toLowerCase()===r.replace(/"/g,"").replace(/ /g,"").toLowerCase()||e.split(",")[0]&&!n.i(a.isNullOrUndefined)(e.split(",")[0].trim().match(i))&&e.split(",")[0].trim()===e.split(",")[0].trim().match(i)[0])&&(o=t)})&&null!==o)?null!==o?i[o]:r.replace(/"/g,""):null},e.isOrderedList=function(e){return"ol"===e.nodeName.toLocaleLowerCase()},e.isUnorderedList=function(e){return"ul"===e.nodeName.toLocaleLowerCase()},e.isAlignment=function(e){var t=e.style&&e.style.textAlign;return"left"===t?"justifyleft":"center"===t?"justifycenter":"right"===t?"justifyright":"justify"===t?"justifyfull":null},e.isFormats=function(e,t){return(void 0===t||null===t)&&r.a.indexOf(e.nodeName.toLocaleLowerCase())>-1||null!==t&&void 0!==t&&t.indexOf(e.nodeName.toLocaleLowerCase())>-1?e.nodeName.toLocaleLowerCase():null},e.getComputedStyle=function(e,t,n){return e.defaultView.getComputedStyle(t,null).getPropertyValue(n)},e.isNumberFormatList=function(e){var t=e.style&&e.style.listStyleType;return"lower-alpha"===t?"Lower Alpha":"number"===t?"Number":"upper-alpha"===t?"Upper Alpha":"lower-roman"===t?"Lower Roman":"upper-roman"===t?"Upper Roman":"lower-greek"===t?"Lower Greek":"none"===t?"None":!!this.isOrderedList(e)||null},e.isBulletFormatList=function(e){var t=e.style&&e.style.listStyleType;return"circle"===t?"Circle":"square"===t?"Square":"none"===t?"None":"disc"===t?"Disc":!!this.isUnorderedList(e)||null},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(20)),o=n(3),s=n(6),a=function(){function e(e,t){this.undoRedoStack=[],this.parent=e,this.undoRedoSteps=n.i(i.isNullOrUndefined)(t)?30:t.undoRedoSteps,this.undoRedoTimer=n.i(i.isNullOrUndefined)(t)?300:t.undoRedoTimer,this.addEventListener()}return e.prototype.addEventListener=function(){var e=n.i(i.debounce)(this.keyUp,this.undoRedoTimer);this.parent.observer.on(o.f,e,this),this.parent.observer.on(o.d,this.keyDown,this),this.parent.observer.on(o.b,this.onAction,this),this.parent.observer.on(o.h,this.onPropertyChanged,this)},e.prototype.onPropertyChanged=function(e){for(var t=0,n=Object.keys(e.newProp);t<n.length;t++){switch(n[t]){case"undoRedoSteps":this.undoRedoSteps=e.newProp.undoRedoSteps;break;case"undoRedoTimer":this.undoRedoTimer=e.newProp.undoRedoTimer}}},e.prototype.removeEventListener=function(){this.parent.observer.off(o.f,this.keyUp),this.parent.observer.off(o.d,this.keyDown),this.parent.observer.off(o.b,this.onAction)},e.prototype.onAction=function(e){"Undo"===e.subCommand?this.undo(e):this.redo(e)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.keyDown=function(e){var t=e.event,n=this;switch(t.action){case"undo":t.preventDefault(),n.undo(e);break;case"redo":t.preventDefault(),n.redo(e)}},e.prototype.keyUp=function(e){17===e.event.keyCode||e.event.ctrlKey||this.saveData(e)},e.prototype.getTextContentFromFragment=function(e){for(var t="",n=0;n<e.childNodes.length;n++){var i=e.childNodes[n];i.nodeType===Node.TEXT_NODE?t+=i.textContent:i.nodeType===Node.ELEMENT_NODE&&(t+=this.getTextContentFromFragment(i))}return t},e.prototype.saveData=function(e){for(var t=(new r.a).getRange(this.parent.currentDocument),o=this.parent.editableElement===t.startContainer.parentElement?t.startContainer.parentElement:t.startContainer,s=o.childNodes.length-1;s>=0;s--)!n.i(i.isNullOrUndefined)(o.childNodes[s])&&"#text"===o.childNodes[s].nodeName&&0===o.childNodes[s].textContent.length&&"IMG"!==o.childNodes[s].nodeName&&"BR"!==o.childNodes[s].nodeName&&o.childNodes[s].nodeName&&n.i(i.detach)(o.childNodes[s]);t=(new r.a).getRange(this.parent.currentDocument);for(var a=(new r.a).save(t,this.parent.currentDocument),l=this.parent.editableElement.cloneNode(!0),d=document.createDocumentFragment();l.firstChild;)d.appendChild(l.firstChild);var c={text:d,range:a};this.undoRedoStack.length>=this.steps&&(this.undoRedoStack=this.undoRedoStack.slice(0,this.steps+1)),this.undoRedoStack.length>1&&this.undoRedoStack[this.undoRedoStack.length-1].range.range.collapsed===t.collapsed&&this.undoRedoStack[this.undoRedoStack.length-1].range.startOffset===a.range.startOffset&&this.undoRedoStack[this.undoRedoStack.length-1].range.endOffset===a.range.endOffset&&this.undoRedoStack[this.undoRedoStack.length-1].range.range.startContainer===a.range.startContainer&&this.getTextContentFromFragment(this.undoRedoStack[this.undoRedoStack.length-1].text).trim()===this.getTextContentFromFragment(c.text).trim()||(this.undoRedoStack.push(c),this.steps=this.undoRedoStack.length-1,this.steps>this.undoRedoSteps&&(this.undoRedoStack.shift(),this.steps--),e&&e.callBack&&e.callBack())},e.prototype.undo=function(e){if(this.steps>0){var t=this.undoRedoStack[this.steps-1].range,i=this.undoRedoStack[this.steps-1].text;this.parent.editableElement.innerHTML="",this.parent.editableElement.appendChild(i.cloneNode(!0)),this.parent.editableElement.focus(),n.i(s.b)()&&n.i(s.c)(this.parent.editableElement,e.selector),t.restore(),this.steps--,e.callBack&&e.callBack({requestType:"Undo",editorMode:"HTML",range:t,elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),event:e.event})}},e.prototype.redo=function(e){if(null!=this.undoRedoStack[this.steps+1]){var t=this.undoRedoStack[this.steps+1].range,i=this.undoRedoStack[this.steps+1].text;this.parent.editableElement.innerHTML="",this.parent.editableElement.appendChild(i.cloneNode(!0)),this.parent.editableElement.focus(),n.i(s.b)()&&n.i(s.c)(this.parent.editableElement,e.selector),t.restore(),this.steps++,e.callBack&&e.callBack({requestType:"Redo",editorMode:"HTML",range:t,elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),event:e.event})}},e.prototype.getUndoStatus=function(){var e={undo:!1,redo:!1};return this.steps>0&&(e.undo=!0),null!=this.undoRedoStack[this.steps+1]&&(e.redo=!0),e},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(7)),o=n(21),s=n(8),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.p,this.videoCommand,this)},e.prototype.videoCommand=function(e){var t,r,s,a=e.value.toString().toLowerCase();switch("video"!==a&&"videoreplace"!==a&&(t=e.item.selectNode[0],r=t.closest("."+o.a),s=t.closest("."+o.b)),a){case"video":case"videoreplace":this.createVideo(e);break;case"videodimension":this.videoDimension(e);break;case"inline":t.removeAttribute("class"),r&&(r.style.display="inline-block"),s&&(t.parentElement.style.cssFloat=""),n.i(i.addClass)([t],[o.c,o.d,o.e]),this.callBack(e);break;case"break":t.removeAttribute("class"),r&&(r.style.display="block"),s&&(t.parentElement.style.cssFloat=""),n.i(i.addClass)([t],[o.f,o.c,o.e]),this.callBack(e);break;case"justifyleft":t.removeAttribute("class"),r&&(r.style.display="block"),s&&(t.parentElement.style.cssFloat="left"),n.i(i.addClass)([t],[o.c,o.g]),this.callBack(e);break;case"justifycenter":t.removeAttribute("class"),r&&(r.style.display="block"),s&&(t.parentElement.style.cssFloat=""),n.i(i.addClass)([t],[o.c,o.h]),this.callBack(e);break;case"justifyright":t.removeAttribute("class"),r&&(r.style.display="block"),s&&(t.parentElement.style.cssFloat="right"),n.i(i.addClass)([t],[o.c,o.i]),this.callBack(e);break;case"videoremove":n.i(i.detach)(t.parentElement),this.callBack(e)}},e.prototype.createVideo=function(e){var t,r,a,l=this,d=!1;if("VideoReplace"!==e.value||n.i(i.isNullOrUndefined)(e.item.selectParent)||"VIDEO"!==e.item.selectParent[0].tagName)if("VideoReplace"===e.value&&!n.i(i.isNullOrUndefined)(e.item.selectParent)&&e.item.selectParent[0].classList&&e.item.selectParent[0].classList.contains(o.b))e.item.selectParent[0].innerHTML=e.item.fileName,this.setStyle(e.item.selectParent[0].firstElementChild,e,e.item.selectParent[0].firstElementChild);else{if(e.item.isEmbedUrl){t=n.i(i.createElement)("span",{className:o.a,attrs:{contentEditable:"false"}});var c=n.i(i.createElement)("span",{className:o.b}),u=n.i(i.createElement)("template");u.innerHTML=e.item.fileName,c.appendChild(u.content),r=a=c.firstElementChild,this.setStyle(a,e,r),t.appendChild(c)}else t=n.i(i.createElement)("span",{className:o.j,attrs:{contentEditable:"false",title:e.item.fileName}}),r=n.i(i.createElement)("video",{className:o.c+" "+o.d,attrs:{controls:""}}),a=n.i(i.createElement)("source"),this.setStyle(a,e,r),r.appendChild(a),t.appendChild(r);if(n.i(i.isNullOrUndefined)(e.item.selection)||e.item.selection.restore(),s.a.Insert(this.parent.currentDocument,t,this.parent.editableElement),null===t.nextElementSibling){var h=n.i(i.createElement)("br");t.parentNode.insertBefore(h,t.nextSibling)}}else{var p=e.item.selectParent[0].querySelector("source");this.setStyle(p,e,p),d=!0}if(e.callBack&&(n.i(i.isNullOrUndefined)(e.selector)||!n.i(i.isNullOrUndefined)(e.selector)&&"pasteCleanupModule"!==e.selector)){var m=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0],f="VideoReplace"===e.value||d?e.item.isEmbedUrl?e.item.selectParent[0].querySelector("iframe"):e.item.selectParent[0]:i.Browser.isIE?m:e.item.isEmbedUrl?m.querySelector("iframe"):m.lastElementChild;f.addEventListener("IFRAME"!==f.tagName?"loadeddata":"load",function(){"VideoReplace"===e.value&&d||(e.item.isEmbedUrl&&f&&f.classList.add("e-rte-embed-url"),e.callBack({requestType:"Videos",editorMode:"HTML",event:e.event,range:l.parent.nodeSelection.getRange(l.parent.currentDocument),elements:[f]}))}),d&&f.load(),-1!==i.Browser.userAgent.indexOf("Firefox")&&(r.addEventListener("play",function(){l.editAreaVideoClick(e)}),r.addEventListener("pause",function(){l.editAreaVideoClick(e)}))}},e.prototype.editAreaVideoClick=function(e){e.callBack({requestType:"VideosPlayPause",editorMode:"HTML",event:e.event})},e.prototype.setStyle=function(e,t,r){""===t.item.url||n.i(i.isNullOrUndefined)(t.item.url)||e.setAttribute("src",t.item.url),t.item.isEmbedUrl||(e.type=t.item.fileName&&t.item.fileName.split(".").length>0?"video/"+t.item.fileName.split(".")[t.item.fileName.split(".").length-1]:t.item.url&&t.item.url.split(".").length>0?"video/"+t.item.url.split(".")[t.item.url.split(".").length-1]:""),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.width)||r.setAttribute("width",n.i(i.formatUnit)(t.item.width.width)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.height)||r.setAttribute("height",n.i(i.formatUnit)(t.item.height.height)),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.minWidth)||(r.style.minWidth=n.i(i.formatUnit)(t.item.width.minWidth)),n.i(i.isNullOrUndefined)(t.item.width)||n.i(i.isNullOrUndefined)(t.item.width.maxWidth)||(r.style.maxWidth=n.i(i.formatUnit)(t.item.width.maxWidth)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.minHeight)||(r.style.minHeight=n.i(i.formatUnit)(t.item.height.minHeight)),n.i(i.isNullOrUndefined)(t.item.height)||n.i(i.isNullOrUndefined)(t.item.height.maxHeight)||(r.style.maxHeight=n.i(i.formatUnit)(t.item.height.maxHeight))},e.prototype.videoDimension=function(e){var t=e.item.selectNode[0].classList.contains(o.b)?e.item.selectNode[0].querySelector("iframe"):e.item.selectNode[0];t.style.height="",t.style.width="","auto"!==e.item.width?t.style.width=n.i(i.formatUnit)(e.item.width):t.removeAttribute("width"),"auto"!==e.item.height?t.style.height=n.i(i.formatUnit)(e.item.height):t.removeAttribute("height"),this.callBack(e)},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return g});var i=n(0),r=(n.n(i),n(10)),o=n(58),s=n(56),a=n(59),l=n(23),d=n(15),c=n(61),u=n(57),h=n(60),p=n(3),m=n(55),f=n(91),g=function(){function e(e){this.initialize(),n.i(i.extend)(this,this,e,!0),this.observer=new i.Observer(this),this.markdownSelection=new l.a,this.listObj=new o.a({parent:this,syntax:this.listTags}),this.formatObj=new s.a({parent:this,syntax:this.formatTags}),this.undoRedoManager=new c.a(this,e.options),this.mdSelectionFormats=new a.a({parent:this,syntax:this.selectionTags}),this.linkObj=new u.a(this),this.tableObj=new h.a({parent:this,syntaxTag:{Formats:this.formatTags,List:this.listTags}}),this.clearObj=new m.a(this),this.insertTextObj=new f.a(this),this.wireEvents()}return e.prototype.initialize=function(){this.formatTags=d.a,this.listTags=d.c,this.selectionTags=d.b},e.prototype.wireEvents=function(){this.observer.on(p.a,this.editorKeyDown,this),this.observer.on(p.g,this.editorKeyUp,this),this.observer.on(p.i,this.onPropertyChanged,this)},e.prototype.onPropertyChanged=function(e){this.observer.notify(p.h,e)},e.prototype.editorKeyDown=function(e){this.observer.notify(p.d,e)},e.prototype.editorKeyUp=function(e){this.observer.notify(p.f,e)},e.prototype.execCommand=function(e,t,n,i,o,s){switch(e.toLocaleLowerCase()){case"lists":this.observer.notify(r.d,{subCommand:t,event:n,callBack:i});break;case"formats":this.observer.notify(p.c,{subCommand:t,event:n,callBack:i});break;case"actions":this.observer.notify(p.b,{subCommand:t,event:n,callBack:i});break;case"style":case"effects":case"casing":this.observer.notify(r.c,{subCommand:t,event:n,callBack:i});break;case"links":case"images":this.observer.notify(r.b,{subCommand:t,event:n,callBack:i,item:s});break;case"table":switch(t.toString().toLocaleLowerCase()){case"createtable":this.observer.notify(r.a,{subCommand:t,item:s,event:n,callBack:i})}break;case"clear":this.observer.notify(r.e,{subCommand:t,event:n,callBack:i});break;case"inserttext":this.observer.notify(r.f,{subCommand:t,event:n,callBack:i,value:{text:s}})}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(10),r=function(){function e(e){this.parent=e,this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.e,this.clear,this)},e.prototype.replaceRegex=function(e){return e.replace(/\*/gi,"\\*").replace(/\&/gi,"\\&").replace(/\-/gi,"\\-").replace(/\^/gi,"\\^").replace(/\$/gi,"\\$").replace(/\./gi,"\\.").replace(/\|/gi,"\\|").replace(/\?/gi,"\\?").replace(/\+/gi,"\\+").replace(/\-/gi,"\\-").replace(/\&/gi,"\\&")},e.prototype.clearSelectionTags=function(e){for(var t=this.parent.selectionTags,n=Object.keys(t),i=0;i<n.length;i++){var r=n[i];if(t.hasOwnProperty(r)&&""!==t[r]){var o=this.replaceRegex(t[""+r]),s=void 0,a=t[""+r].length,l="<sup>"===t[""+r]||"<sub>"===t[""+r]?t[""+r].length+1:t[""+r].length;s="<sup>"===t[""+r]?new RegExp("<sup>(.*?)</sup>","ig"):"<sub>"===t[""+r]?new RegExp("<sub>(.*?)</sub>","ig"):new RegExp(o+"(.*?)"+o,"ig");for(var d=e.match(s),c=0;d&&c<d.length&&""!==d[c];c++)e=e.replace(d[c],d[c].substr(a,d[c].length-l-a))}}return e},e.prototype.clearFormatTags=function(e){var t=e.split("\n");return this.clearFormatLines(t)},e.prototype.clearFormatLines=function(e){for(var t=[this.parent.formatTags,this.parent.listTags],n="",i=0;i<e.length;i++){for(var r=0;r<t.length;r++)for(var o=t[r],s=Object.keys(o),a=0;a<s.length;a++){var l=s[a];o.hasOwnProperty(l)&&""!==o[l]&&0===e[i].indexOf(o[""+l])&&(e[i]=e[i].replace(o[""+l],""),e[i]=this.clearFormatLines([e[i]]))}n=n+e[i]+(i!==e.length-1?"\n":"")}return n},e.prototype.clear=function(e){var t=this.parent.element;t.focus();var n=t.selectionStart,i=t.selectionEnd,r=this.selection.getSelectedText(t);r=this.clearSelectionTags(r),r=this.clearFormatTags(r),t.value=t.value.substr(0,n)+r+t.value.substr(i,t.value.length),this.parent.markdownSelection.setSelection(t,n,n+r.length),this.restore(t,n,n+r.length,e)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:i.subCommand,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),n(3)),o=n(10),s=function(){function e(e){n.i(i.extend)(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.c,this.applyFormats,this)},e.prototype.applyFormats=function(e){e.subCommand=e.subCommand.toLowerCase();var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var r=this.selection.getSelectedParentPoints(t);if(this.isAppliedFormat(r)===e.subCommand){if("pre"===e.subCommand){if(!(r.length>1))return;this.applyCodeBlock(t,e,r)}return this.cleanFormat(t),void this.restore(t,t.selectionStart,t.selectionEnd,e)}if("p"===e.subCommand)return this.cleanFormat(t),void this.restore(t,t.selectionStart,t.selectionEnd,e);("pre"===e.subCommand&&1!==r.length||"pre"!==e.subCommand)&&this.cleanFormat(t,e.subCommand);var s=t.selectionStart,a=t.selectionEnd,l=0;if(r=this.selection.getSelectedParentPoints(t),"pre"===e.subCommand)return void(r.length>1?this.applyCodeBlock(t,e,r):(n.i(i.extend)(e,e,{subCommand:"InlineCode"},!0),this.parent.observer.notify(o.c,e)));for(var d=0;d<r.length;d++)if(""===r[d].text||this.selection.isStartWith(r[d].text,"\\"+this.syntax[e.subCommand])){if(""===r[d].text&&0===d&&(this.selection.save(s,a),0===this.selection.getSelectedText(t).length&&(r[d].text=this.syntax[e.subCommand],t.value=t.value.substr(0,r[d].start)+this.syntax[e.subCommand]+t.value.substr(r[d].end,t.value.length),s=0===d?s+this.syntax[e.subCommand].length:s,l+=this.syntax[e.subCommand].length),1!==r.length))for(var c=d;c<r.length;c++)r[c].start=0!==c?1+r[c].start:r[c].start,r[c].end=1+r[c].end}else if(r[d].text=this.syntax[e.subCommand]+r[d].text,t.value=t.value.substr(0,r[d].start)+r[d].text+"\n"+t.value.substr(r[d].end,t.value.length),s=0===d?s+this.syntax[e.subCommand].length:s,l+=this.syntax[e.subCommand].length,1!==r.length)for(var c=d;c<r.length;c++)r[c].start=0!==c?this.syntax[e.subCommand].length+r[c].start:r[c].start,r[c].end=this.syntax[e.subCommand].length+r[c].end;this.restore(t,s,a+l,e)},e.prototype.clearRegex=function(){for(var e="",t=Object.keys(this.syntax),n=0;n<t.length&&"pre"!==t[n]&&"p"!==t[n];n++)e+=""===e?"^("+this.selection.replaceSpecialChar(this.syntax[t[n]].trim())+")":"|^("+this.selection.replaceSpecialChar(this.syntax[t[n]].trim())+")";return e},e.prototype.cleanFormat=function(e,t){var n=this.selection.getSelectedParentPoints(e),i=e.selectionStart,r=e.selectionEnd,o=0;if(this.selection.isClear(n,this.clearRegex())){for(var s=0;s<n.length;s++){for(var a=Object.keys(this.syntax),l=0;""!==n[s].text&&l<a.length;l++){var d=this.syntax[a[l]];if(a[l]!==t){var c=new RegExp("^("+this.selection.replaceSpecialChar(d)+")","gim");if(c.test(n[s].text)){if(n[s].text=n[s].text.replace(c,""),e.value=e.value.substr(0,n[s].start)+n[s].text+"\n"+e.value.substr(n[s].end,e.value.length),i=0===s?i-d.length>0?i-d.length:0:i,o+=d.length,1!==n.length)for(var u=0;u<n.length;u++)n[u].start=0!==u?n[u].start-d.length:n[u].start,n[u].end=n[u].end-d.length;break}}}if(""===n[s].text&&0===s&&(this.selection.save(i,r),1!==n.length))for(var l=s;l<n.length;l++)n[l].start=0!==l?1+n[l].start:n[l].start,n[l].end=1+n[l].end}this.restore(e,i,r-o)}},e.prototype.applyCodeBlock=function(e,t,n){var i=t.subCommand,r=n[0].start,o=n[n.length-1].end,s=this.selection.getAllParents(e.value),a=s[n[0].line-1],l=s[n.length+1+1];if(this.selection.isStartWith(a,this.syntax.pre.split("\n")[0])||this.selection.isStartWith(l,this.syntax.pre.split("\n")[0])){var d=this.syntax[""+i],c=this.parent.markdownSelection.getSelectedInlinePoints(e),u=e.value.substr(0,e.selectionStart).lastIndexOf(d),h=e.value.substr(e.selectionEnd,e.selectionEnd).indexOf(d);h+=c.end;var p=this.replaceAt(e.value.substr(0,c.start),d,"",u,c.start),m=this.replaceAt(e.value.substr(c.end,e.value.length),d,"",0,h);e.value=p+c.text+m,r=this.selection.selectionStart-d.length,o=this.selection.selectionEnd-d.length}else{var f=e.value.substring(r,o).split("\n"),g=""===f[f.length-1]?"":"\n";e.value=e.value.substr(0,r)+this.syntax[""+i]+e.value.substring(r,o)+g+this.syntax[""+i]+e.value.substr(o,e.value.length),r=this.selection.selectionStart+this.syntax[""+i].length,o=this.selection.selectionEnd+this.syntax[""+i].length-1}this.restore(e,r,o,t)},e.prototype.replaceAt=function(e,t,n,i,r){return e.slice(0,i)+e.slice(i,r).replace(t,n)+e.slice(r)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:i.subCommand,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e.prototype.isAppliedFormat=function(e,t){for(var n="p",i=(Object.keys(this.syntax),Object.keys(this.syntax)),r=this.parent.element.selectionDirection,o="backward"===r?e[0].text:e[e.length-1].text,s=0;!t&&s<i.length;s++){if("pre"!==i[s]&&this.selection.isStartWith(o,this.syntax[i[s]])){n=i[s];break}if("pre"===i[s]){var a=this.selection.getAllParents(this.parent.element.value),l=a[e[0].line-1],d=a[e.length+1];if(this.selection.isStartWith(l,this.syntax[i[s]].split("\n")[0])&&this.selection.isStartWith(d,this.syntax[i[s]].split("\n")[0])){n=i[s];break}}}return n},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(10),r=function(){function e(e){this.parent=e,this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.b,this.createLink,this)},e.prototype.createLink=function(e){var t=this.parent.element;t.focus();var n=t.selectionStart,i=t.selectionEnd,r="Image"===e.subCommand?this.selection.getSelectedText(t):e.item.text,o="Image"===e.subCommand?n+2:n+1,s="Image"===e.subCommand?i+2:i+1;r="Image"===e.subCommand?"":"["+r+"]("+e.item.url+")",t.value=t.value.substr(0,n)+r+t.value.substr(i,t.value.length),this.parent.markdownSelection.setSelection(t,o,s),this.restore(t,o,s,e)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:i.subCommand,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(10),r=n(0),o=(n.n(r),n(3)),s=function(){function e(e){n.i(r.extend)(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.d,this.applyListsHandler,this),this.parent.observer.on(o.d,this.keyDownHandler,this),this.parent.observer.on(o.f,this.keyUpHandler,this)},e.prototype.keyDownHandler=function(e){switch(e.event.which){case 9:this.tabKey(e)}switch(e.event.action){case"ordered-list":this.applyListsHandler({subCommand:"OL",callBack:e.callBack}),e.event.preventDefault();break;case"unordered-list":this.applyListsHandler({subCommand:"UL",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.keyUpHandler=function(e){switch(e.event.which){case 13:this.enterKey(e)}},e.prototype.tabKey=function(e){var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var n=t.selectionStart,i=t.selectionEnd,r=this.selection.getSelectedParentPoints(t),o=0,s=this.isNotFirstLine(t,r[0]);if(!s&&!e.event.shiftKey)return void this.restore(t,n,i+o,e);var a=this.olListType(),l=this.getListRegex();this.currentAction=this.getAction(r[0].text);for(var d=0;d<r.length;d++){var c=(e.event.shiftKey,r[d].line-1),u=this.selection.getLine(t,c);if(u&&(!e.event.shiftKey&&s||e.event.shiftKey)){var h=u.split(". "),p=e.event.shiftKey?-"\t".length:"\t".length,m=r[d].text.split("\t");if(e.event.shiftKey&&1===m.length)break;if("OL"===this.currentAction&&/^\d+$/.test(h[0].trim())&&a){e.event.preventDefault(),r[d].text=e.event.shiftKey?m.splice(1,m.length).join("\t"):"\t"+r[d].text;var f=this.getTabSpace(r[d].text),g=this.getTabSpace(u),b=r[d].text.split(". ");if(f===g)this.changeTextAreaValue(b,this.nextOrderedListValue(h[0].trim()),e,t,r,d,i);else if(g<f)this.changeTextAreaValue(b,"1. ",e,t,r,d,i);else for(;g.length>f.length;null){c-=1,u=this.selection.getLine(t,c);var v=u.trim().split(". ");if(/^\d+$/.test(v[0])&&(g=this.getTabSpace(u),g.length<=f.length)){this.changeTextAreaValue(b,this.nextOrderedListValue(v[0]),e,t,r,d,i);break}}}else("UL"===this.currentAction&&l.test(u.trim())||!a)&&(e.event.preventDefault(),r[d].text=e.event.shiftKey?m.splice(1,m.length).join("\t"):"\t"+r[d].text,t.value=t.value.substr(0,r[d].start)+r[d].text+"\n"+t.value.substr(r[d].end,t.value.length));if(n=0===d?n+p:n,o+=p,1!==r.length)for(var C=d;C<r.length;C++)r[C].start=0!==C?r[C].start+p:r[C].start,r[C].end=r[C].end+p}}this.restore(t,n,i+o,e)},e.prototype.changeTextAreaValue=function(e,t,i,o,s,a,l){var d=t;e.splice(0,1);var c,u=this.selection.getAllParents(o.value).length,h="",p=this.getTabSpace(s[a].text),m=parseInt(d.split(".")[0],null),f=this.getTabSpace(s[a].text),g=!0,b=!0,v=-1,C=!0,y=0,N="";h=""!==this.selection.getLine(o,s[0].line+1)?"":h+o.value.substr(s[0].end,o.value.length);for(var E=1;E<u&&!n.i(r.isNullOrUndefined)(this.selection.getLine(o,s[0].line+E))&&""!==this.selection.getLine(o,s[0].line+E);E++){var S=this.selection.getLine(o,s[0].line+E),T=this.getTabSpace(S),O=S.split(". ");if(1===O.length){h+=o.value.substr(s[0].end+y,o.value.length);break}y+=S.length;var k=!1;if(c=i.event.shiftKey?p.length+1:p.length-1,T.length>f.length&&(C=!1),p.length!==T.length&&T.length<f.length?(b=!0,g=!1,k=!(!i.event.shiftKey||p.length!==T.length)&&(b=!1,!0)):C&&i.event.shiftKey&&p.length===T.length&&T.length===f.length&&(b=!1,k=!0),N=""===h?"":"\n",c===T.length&&b){var w=i.event.shiftKey?(v++,this.nextOrderedListValue(v.toString())):this.previousOrderedListValue(O[0]);O.splice(0,1),h=h+N+T+w+O.join(". ")}else if(p.length===T.length&&g||k){var w=this.nextOrderedListValue(m.toString());m++,O.splice(0,1),h=h+N+T+w+O.join(". ")}else h=h+N+S,b=!1;f=this.getTabSpace(S)}s[a].text=this.getTabSpace(s[a].text)+d+e.join(". ")+"\n",o.value=o.value.substr(0,s[a].start)+s[a].text+h},e.prototype.getTabSpace=function(e){for(var t=e.split("\t"),n="",i=0;i<t.length&&""===t[i];i++)n+="\t";return n},e.prototype.isNotFirstLine=function(e,t){var n,i=t.text,r=t.line-1,o=this.selection.getLine(e,r),s=this.getListRegex(),a=!1;if(o){this.currentAction=this.getAction(o);var l=o.split(". ");n="OL"===this.currentAction?/^\d+$/.test(l[0].trim()):s.test(o.trim())}if(o&&n){var d=this.getTabSpace(i),c=this.getTabSpace(o);for(a=d===c||a;c.length>d.length;null){r-=1,o=this.selection.getLine(e,r);var l=o.trim().split(". ");if(("OL"===this.currentAction?/^\d+$/.test(l[0]):s.test(o.trim()))&&(c=this.getTabSpace(o),c.length<=d.length)){a=!0;break}}}return a},e.prototype.getAction=function(e){var t=e.split(". ")[0],n=/^\d+$/.test(t.trim()),i=e.trim().split(new RegExp("^("+this.selection.replaceSpecialChar(this.syntax.UL).trim()+")"))[1];return n?"OL":i?"UL":"NOTLIST"},e.prototype.nextOrderedListValue=function(e){return(parseInt(e,null)+1).toString()+". "},e.prototype.previousOrderedListValue=function(e){return(parseInt(e,null)-1).toString()+". "},e.prototype.enterKey=function(e){var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var i=t.selectionStart,o=t.selectionEnd,s=this.selection.getSelectedParentPoints(t),a=this.selection.getLine(t,s[0].line-1),l=this.olListType(),d=this.getListRegex(),c=[];n.i(r.isNullOrUndefined)(a)||(c=a.split(". "),this.currentAction=this.getAction(a));var u=0;if("OL"===this.currentAction&&c.length>1&&/^\d+$/.test(c[0].trim())&&l&&""!==c[1]){var h=this.getTabSpace(a);this.currentAction=this.getAction(a);var p=this.nextOrderedListValue(c[0]);s[0].text=h+p+s[0].text;for(var m=this.selection.getAllParents(t.value).length,f="\n",g=this.getTabSpace(a),b=this.getTabSpace(s[0].text),v=!0,C=1;C<m&&""!==t.value.substr(s[0].end,t.value.length);C++){var y=this.selection.getLine(t,s[0].line+C);if(n.i(r.isNullOrUndefined)(y))f+="";else{var N=y.split(". "),E=this.getTabSpace(y);if(E.length<b.length&&(v=!1),N.length>1&&/^\d+$/.test(N[0].trim())&&g.length===E.length&&v){var S=this.nextOrderedListValue(N[0]);N.splice(0,1),f=f+E+S+N.join(". ")+"\n"}else f=f+y+"\n",b=this.getTabSpace(y)}}t.value=t.value.substr(0,s[0].start)+g+p+this.selection.getLine(t,s[0].line)+f,i=i+p.length+h.length,u+=p.length+h.length}else if("UL"===this.currentAction&&a&&d.test(a.trim())&&""!==a.trim().replace(d,"")||"OL"===this.currentAction&&!l){var h=this.getTabSpace(a),p=this.syntax[this.currentAction];s[0].text=h+p+s[0].text+(s[0].text.trim().length>0?"\n":""),t.value=t.value.substr(0,s[0].start)+s[0].text+t.value.substr(s[0].end,t.value.length),i=i+p.length+h.length,u+=p.length+h.length}this.restore(t,i,o+u,e)},e.prototype.olListType=function(){var e=this.syntax.OL.split(".,");return(1===e.length?null:parseInt(e[2].trim(),null)-parseInt(e[0].trim(),null))?1:0},e.prototype.applyListsHandler=function(e){var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd),this.currentAction=e.subCommand;for(var i,o=t.selectionStart,s=t.selectionEnd,a=0,l=0,d=0,c=this.selection.getSelectedParentPoints(t),u="",h=this.olListType(),p={},m=0;m<c.length;m++)if(i=h?"OL"===this.currentAction?m+h+". ":this.syntax[this.currentAction]:"OL"===this.currentAction?this.syntax.OL:this.syntax[this.currentAction],this.selection.isStartWith(c[m].text,i))c[m].text=c[m].text.replace(i,""),t.value=t.value.substr(0,c[m].start+d)+c[m].text+"\n"+t.value.substr(c[m].end+d,t.value.length),d-=i.length,l=i.length,this.restore(t,o-l,s+d,null);else{if(""===c[m].text&&0===m&&(this.selection.save(o,s),1!==c.length))for(var f=m;f<c.length;f++)c[f].start=0!==f?1+c[f].start:c[f].start,c[f].end=1+c[f].end;var g=n.i(r.isNullOrUndefined)(c[m-1])?0:this.getTabSpace(c[m-1].text).length,b=this.appliedLine(c[m].text,i,p,g);if(u=b.line?u:i,c[m].text=b.line?b.line:u+c[m].text,b.space=b.space?b.space:0,t.value=t.value.substr(0,c[m].start+d)+c[m].text+"\n"+t.value.substr(c[m].end,t.value.length),o=0===m?o+u.length+b.space>0?o+u.length+b.space:0:o,a+=u.length+b.space,1!==c.length)for(var f=m;f<c.length;f++)c[f].start=0!==f?u.length+c[f].start+b.space:c[f].start,c[f].end=u.length+c[f].end+b.space;this.restore(t,o,s+a,null)}this.restore(t,null,null,e)},e.prototype.appliedLine=function(e,t,i,o){var s={},a=new RegExp("^["+this.syntax.UL.trim()+"]"),l=e.split(". "),d=l[0]+". ",c=a.test(e.trim())||e.trim()===this.syntax.OL.trim()||e.trim()===this.syntax.UL.trim()||/^\d+$/.test(l[0].trim()),u=this.olListType(),h=this.getTabSpace(e).length;if("OL"===this.currentAction&&u&&(i[h.toString()]=n.i(r.isNullOrUndefined)(i[h.toString()])?1:i[h.toString()].valueOf()+1,t=i[h.toString()].valueOf().toString()+". ",!n.i(r.isNullOrUndefined)(o)&&o>h&&(i[o.toString()]=0)),c){var p=void 0,m=void 0;a.test(e.trim())?(m=this.syntax.UL,p=t,s.space=t.trim().length-this.syntax.UL.trim().length):/^\d+$/.test(l[0].trim())&&u?(m=l[0].trim()+". ",p=t,s.space=this.syntax.UL.trim().length-d.trim().length):/^\d+$/.test(l[0].trim())&&(m=l[0].trim()+". ",p=this.syntax.UL,s.space=this.syntax.UL.trim().length-d.trim().length),s.line=e.replace(m,p)}return s},e.prototype.restore=function(e,t,i,o){n.i(r.isNullOrUndefined)(t)||n.i(r.isNullOrUndefined)(t)||this.selection.save(t,i),n.i(r.isNullOrUndefined)(o)||this.selection.restore(e),o&&o.callBack&&o.callBack({requestType:this.currentAction,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:o.event})},e.prototype.getListRegex=function(){for(var e="",t=Object.keys(this.syntax),n=0;n<t.length;n++){var i=this.selection.replaceSpecialChar(this.syntax[t[n]]);e+=""===e?"^("+i+")|^("+i.trim()+")":"|^("+i+")|^("+i.trim()+")"}return new RegExp(e)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),n(10)),o=n(3),s=function(){function e(e){n.i(i.extend)(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(r.c,this.applyCommands,this),this.parent.observer.on(o.d,this.keyDownHandler,this)},e.prototype.keyDownHandler=function(e){switch(e.event.action){case"bold":this.applyCommands({subCommand:"Bold",callBack:e.callBack}),e.event.preventDefault();break;case"italic":this.applyCommands({subCommand:"Italic",callBack:e.callBack}),e.event.preventDefault();break;case"strikethrough":this.applyCommands({subCommand:"StrikeThrough",callBack:e.callBack}),e.event.preventDefault();break;case"uppercase":this.applyCommands({subCommand:"UpperCase",callBack:e.callBack}),e.event.preventDefault();break;case"lowercase":this.applyCommands({subCommand:"LowerCase",callBack:e.callBack}),e.event.preventDefault();break;case"superscript":this.applyCommands({subCommand:"SuperScript",callBack:e.callBack}),e.event.preventDefault();break;case"subscript":this.applyCommands({subCommand:"SubScript",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.isBold=function(e,t){return-1!==e.search("\\"+t+"\\"+t)},e.prototype.isItalic=function(e,t){return-1!==e.search("\\"+t)},e.prototype.isMatch=function(e,t){var n=[""];switch(t){case this.syntax.Italic:case this.syntax.InlineCode:case this.syntax.StrikeThrough:n=e.match(this.singleCharRegx(t))}return n},e.prototype.multiCharRegx=function(e){return new RegExp("(\\"+e+"\\"+e+")","g")},e.prototype.singleCharRegx=function(e){return new RegExp("(\\"+e+")","g")},e.prototype.isAppliedCommand=function(e){var t=!1,r=this.parent.element,o=r.selectionStart,s=function(e){return function(t){return[t.slice(0,e),t.slice(e)]}}(o)(r.value),a=this.syntax.Bold.substr(0,1),l=this.syntax.Italic,d=this.parent.markdownSelection.getSelectedText(r);if(""!==d&&d===d.toLocaleUpperCase()&&"UpperCase"===e)return!0;if(""===d){var c=r.value.substr(s[0].length-1,1),u=s[1].substr(0,1);if(""!==c&&""!==u&&c.match(/[a-z]/i)&&c===c.toLocaleUpperCase()&&u===u.toLocaleUpperCase()&&"UpperCase"===e)return!0}return this.isBold(s[0],a)||this.isItalic(s[0],l)||this.isBold(s[1],a)||this.isItalic(s[1],l)||(n.i(i.isNullOrUndefined)(this.isMatch(s[0],this.syntax.StrikeThrough))||n.i(i.isNullOrUndefined)(this.isMatch(s[1],this.syntax.StrikeThrough))||this.isMatch(s[0],this.syntax.StrikeThrough).length%2!=1||this.isMatch(s[1],this.syntax.StrikeThrough).length%2!=1||"StrikeThrough"!==e||(t=!0),n.i(i.isNullOrUndefined)(this.isMatch(s[0],this.syntax.InlineCode))||n.i(i.isNullOrUndefined)(this.isMatch(s[1],this.syntax.InlineCode))||this.isMatch(s[0],this.syntax.InlineCode).length%2!=1||this.isMatch(s[1],this.syntax.InlineCode).length%2!=1||"InlineCode"!==e||(t=!0),n.i(i.isNullOrUndefined)(s[0].match(/\<sub>/g))||n.i(i.isNullOrUndefined)(s[1].match(/\<\/sub>/g))||s[0].match(/\<sub>/g).length%2!=1||s[1].match(/\<\/sub>/g).length%2!=1||"SubScript"!==e||(t=!0),n.i(i.isNullOrUndefined)(s[0].match(/\<sup>/g))||n.i(i.isNullOrUndefined)(s[1].match(/\<\/sup>/g))||s[0].match(/\<sup>/g).length%2!=1||s[1].match(/\<\/sup>/g).length%2!=1||"SuperScript"!==e||(t=!0)),this.isBold(s[0],a)&&this.isBold(s[1],a)&&s[0].match(this.multiCharRegx(a)).length%2==1&&s[1].match(this.multiCharRegx(a)).length%2==1&&"Bold"===e&&(t=!0),s[0]=this.isBold(s[0],a)?s[0].replace(this.multiCharRegx(a),"$%@"):s[0],s[1]=this.isBold(s[1],a)?s[1].replace(this.multiCharRegx(a),"$%@"):s[1],n.i(i.isNullOrUndefined)(this.isMatch(s[0],this.syntax.Italic))||n.i(i.isNullOrUndefined)(this.isMatch(s[1],this.syntax.Italic))||this.isMatch(s[0],this.syntax.Italic).length%2!=1||this.isMatch(s[1],this.syntax.Italic).length%2!=1||"Italic"!==e||(t=!0),n.i(i.isNullOrUndefined)(this.isMatch(s[0],this.syntax.StrikeThrough))||n.i(i.isNullOrUndefined)(this.isMatch(s[1],this.syntax.StrikeThrough))||this.isMatch(s[0],this.syntax.StrikeThrough).length%2!=1||this.isMatch(s[1],this.syntax.StrikeThrough).length%2!=1||"StrikeThrough"!==e||(t=!0),n.i(i.isNullOrUndefined)(this.isMatch(s[0],this.syntax.InlineCode))||n.i(i.isNullOrUndefined)(this.isMatch(s[1],this.syntax.InlineCode))||this.isMatch(s[0],this.syntax.InlineCode).length%2!=1||this.isMatch(s[1],this.syntax.InlineCode).length%2!=1||"InlineCode"!==e||(t=!0),n.i(i.isNullOrUndefined)(s[0].match(/\<sub>/g))||n.i(i.isNullOrUndefined)(s[1].match(/\<\/sub>/g))||s[0].match(/\<sub>/g).length%2!=1||s[1].match(/\<\/sub>/g).length%2!=1||"SubScript"!==e||(t=!0),n.i(i.isNullOrUndefined)(s[0].match(/\<sup>/g))||n.i(i.isNullOrUndefined)(s[1].match(/\<\/sup>/g))||s[0].match(/\<sup>/g).length%2!=1||s[1].match(/\<\/sup>/g).length%2!=1||"SuperScript"!==e||(t=!0),t},e.prototype.applyCommands=function(e){this.currentAction=e.subCommand;var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var n=t.selectionStart,i=t.selectionEnd,r=0,o=this.parent.markdownSelection.getSelectedInlinePoints(t);if(this.isAppliedCommand(e.subCommand)&&""!==o.text){var s=this.syntax[e.subCommand],a="SubScript"===e.subCommand?"</sub>":"SuperScript"===e.subCommand?"</sup>":this.syntax[e.subCommand],l="UpperCase"===e.subCommand||"LowerCase"===e.subCommand?0:s.length,d=t.value.substr(0,o.start).lastIndexOf(s),c=t.value.substr(o.end,t.value.length).indexOf(a);c+=o.end;var u=this.replaceAt(t.value.substr(0,o.start),s,"",d,o.start),h=this.replaceAt(t.value.substr(o.end,t.value.length),a,"",0,c);return t.value=u+o.text+h,void this.restore(t,n-l,i-l,e)}if(""===o.text||this.isApplied(o,e.subCommand))"UpperCase"!==e.subCommand&&"LowerCase"!==e.subCommand?("SubScript"===e.subCommand||"SuperScript"===e.subCommand?(o.text=this.textReplace(o.text,e.subCommand),o.text=this.syntax[e.subCommand]+o.text+"</"+this.syntax[e.subCommand].substring(1,5)):(o.text=this.textReplace(o.text,e.subCommand),o.text=this.syntax[e.subCommand]+o.text+this.syntax[e.subCommand]),t.value=t.value.substr(0,o.start)+o.text+t.value.substr(o.end,t.value.length),r=this.syntax[e.subCommand].length,o.start===o.end?this.restore(t,n+r,i+r,e):this.restore(t,n+r,i-r,e)):this.restore(t,n,i,e);else{r="UpperCase"===e.subCommand||"LowerCase"===e.subCommand?0:this.syntax[e.subCommand].length;var p=t.value.substr(o.start-this.syntax[e.subCommand].length,this.syntax[e.subCommand].length),m=void 0;if(p===e.subCommand||o.start-this.syntax[e.subCommand].length===t.value.indexOf(this.syntax[e.subCommand])&&(o.end===t.value.lastIndexOf(this.syntax[e.subCommand])||o.end===t.value.lastIndexOf("</"+this.syntax[e.subCommand].substring(1,5)))){m="SubScript"===e.subCommand||"SuperScript"===e.subCommand?t.value.substr(o.end,this.syntax[e.subCommand].length+1):t.value.substr(o.end,this.syntax[e.subCommand].length);var u=this.replaceAt(t.value.substr(0,o.start),p,"",o.start-this.syntax[e.subCommand].length,o.start),h=this.replaceAt(t.value.substr(o.end,t.value.length),m,"",0,m.length);t.value=u+o.text+h,this.restore(t,n-r,i-r,e)}else"SubScript"===e.subCommand||"SuperScript"===e.subCommand?o.text=this.syntax[e.subCommand]+o.text+"</"+this.syntax[e.subCommand].substring(1,5):"UpperCase"===e.subCommand||"LowerCase"===e.subCommand?o.text="UpperCase"===e.subCommand?o.text.toUpperCase():o.text.toLowerCase():o.text=this.syntax[e.subCommand]+o.text+this.syntax[e.subCommand],t.value=t.value.substr(0,o.start)+o.text+t.value.substr(o.end,t.value.length),this.restore(t,n+r,i+r,e)}this.parent.undoRedoManager.saveData()},e.prototype.replaceAt=function(e,t,n,i,r){return e.slice(0,i)+e.slice(i,r).replace(t,n)+e.slice(r)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:this.currentAction,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e.prototype.textReplace=function(e,t){var n=this.singleCharRegx(this.syntax[""+t]);switch(t){case"Bold":n=this.multiCharRegx(this.syntax[""+t].substr(0,1)),e=e.replace(n,"");break;case"Italic":if(this.isBold(e,this.syntax[""+t].substr(0,1))){var i=this.multiCharRegx(this.syntax[""+t].substr(0,1)),r=e;r=r.replace(i,"$%@").replace(n,"");var o=new RegExp("\\$%@","g");e=r.replace(o,this.syntax[""+t].substr(0,1)+this.syntax[""+t].substr(0,1))}else e=e.replace(n,"");break;case"StrikeThrough":case"InlineCode":e=e.replace(n,"");break;case"SubScript":e=e.replace(/<sub>/g,"").replace(/<\/sub>/g,"");break;case"SuperScript":e=e.replace(/<sup>/g,"").replace(/<\/sup>/g,"")}return e},e.prototype.isApplied=function(e,t){var n=this.singleCharRegx(this.syntax[""+t]);switch(t){case"SubScript":case"SuperScript":return n=this.singleCharRegx(this.syntax[""+t]),n.test(e.text);case"Bold":case"StrikeThrough":return n=this.multiCharRegx(this.syntax[""+t].substr(0,1)),n.test(e.text);case"UpperCase":case"LowerCase":return n=new RegExp("^["+this.syntax[""+t]+"]*$","g"),n.test(e.text);case"Italic":var i=void 0,r=this.multiCharRegx(this.syntax[""+t].substr(0,1));if(r.test(e.text)){var o=e.text;o=o.replace(r,"$%#"),i=n.test(o)}else i=n.test(e.text);return i;case"InlineCode":return n.test(e.text)}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(10),r=n(0),o=(n.n(r),n(3)),s=function(){function e(e){n.i(r.extend)(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.a,this.createTable,this),this.parent.observer.on(o.d,this.onKeyDown,this)},e.prototype.removeEventListener=function(){this.parent.observer.off(i.a,this.createTable),this.parent.observer.off(o.d,this.onKeyDown)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.onKeyDown=function(e){"insert-table"===e.event.action&&(e.item=e.value,this.createTable(e))},e.prototype.createTable=function(e){this.element=this.parent.element;var t=this.element.selectionStart,n=this.element.selectionEnd,i=this.element.value;this.locale=e,this.selection.save(t,n),this.restore(this.element.selectionStart,this.element.selectionEnd,null),this.insertTable(t,n,i,e)},e.prototype.getTable=function(){var e="";return e+=this.textNonEmpty(),e+=this.tableHeader(this.locale),e+=this.tableCell(this.locale)},e.prototype.tableHeader=function(e){for(var t="",n=1;n<=2;n++){t+="|";for(var i=1;i<=2;i++)t+=1===n?e.item.headingText+" "+i+"|":"---------|";t+=this.insertLine()}return t},e.prototype.tableCell=function(e){for(var t="",n=1;n<=2;n++){t+="|";for(var i=1;i<=2;i++)t+=e.item.colText+" "+this.convertToLetters(n)+i+"|";t+=this.insertLine()}return t+=this.insertLine()},e.prototype.insertLine=function(){var e=document.createElement("div");return e.innerHTML="\n",e.textContent},e.prototype.insertTable=function(e,t,n,i){var r=this.selection.getSelectedParentPoints(this.element),o=r[r.length-1].text.split(" ",2),s=this.getFormatTag();o.length<2?(this.element.value=this.updateValue(this.getTable()),this.makeSelection(n,e,t)):this.ensureFormatApply(r[r.length-1].text)?this.checkValid(e,t,this.getTable(),n,i,o,r,s):(this.element.value=this.updateValue(this.getTable()),this.makeSelection(n,e,t)),this.restore(this.element.selectionStart,this.element.selectionEnd,i)},e.prototype.makeSelection=function(e,t,n){n=t+(e.length>0?12:10),t+=e.length>0?3:1,this.selection.setSelection(this.element,t,n)},e.prototype.getFormatTag=function(){for(var e=Object.keys(this.syntaxTag.Formats),t=Object.keys(this.syntaxTag.List),n=[],i=0;i<e.length;i++)n.push(this.syntaxTag.Formats[e[i]]);for(var r=0;r<t.length;r++)n.push(this.syntaxTag.List[t[r]]);return n},e.prototype.ensureFormatApply=function(e){for(var t=this.getFormatTag(),n=e.trim().split(" ",2)[0]+" ",i=0;i<t.length;i++)if(n===t[i]||/^[\d.]+[ ]+$/.test(n))return!0;return!1},e.prototype.ensureStartValid=function(e,t){for(var n=t[0].text.split(" ",2),i=e+1;i<=e+n[0].length+1;i++)if(this.element.selectionStart===i||this.element.selectionEnd===i)return!1;return!0},e.prototype.ensureEndValid=function(e,t){for(var n=e+1;n<=e+t+1;n++)if(this.element.selectionEnd===n)return!1;return!0},e.prototype.updateValueWithFormat=function(e,t){var n=this.element.value.substring(this.element.selectionEnd,this.element.value.length);return t+=n.replace(n,e[0]+" "+n),this.element.value.substr(0,this.element.selectionStart)+t},e.prototype.updateValue=function(e){return this.element.value.substr(0,this.element.selectionStart)+e+this.element.value.substr(this.element.selectionEnd,this.element.value.length)},e.prototype.checkValid=function(e,t,n,i,r,o,s,a){this.ensureStartValid(s[0].start,s)&&this.ensureEndValid(s[s.length-1].start,o[0].length)&&(e===s[0].start?e!==t&&t!==s[s.length-1].end-1?this.element.value=this.updateValueWithFormat(o,n):this.element.value=this.updateValue(n):t===s[s.length-1].end-1?this.element.value=this.updateValue(n):this.element.value=this.updateValueWithFormat(o,n),this.makeSelection(i,e,t))},e.prototype.convertToLetters=function(e){var t="A".charCodeAt(0),n="";do{e-=1,n=String.fromCharCode(t+e%26)+n,e=e/26>>0}while(e>0);return n},e.prototype.textNonEmpty=function(){var e="";return(this.isCursorBased()||this.isSelectionBased())&&this.element.value.length>0&&(e+=this.insertLine(),e+=this.insertLine()),e},e.prototype.isCursorBased=function(){return this.element.selectionStart===this.element.selectionEnd},e.prototype.isSelectionBased=function(){return this.element.selectionStart!==this.element.selectionEnd},e.prototype.restore=function(e,t,n){this.selection.save(e,t),this.selection.restore(this.element),n&&n.callBack&&n.callBack({requestType:n.subCommand,selectedText:this.selection.getSelectedText(this.element),editorMode:"Markdown",event:n.event})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(0),r=(n.n(i),n(3)),o=function(){function e(e,t){this.undoRedoStack=[],this.parent=e,this.undoRedoSteps=n.i(i.isNullOrUndefined)(t)?30:t.undoRedoSteps,this.undoRedoTimer=n.i(i.isNullOrUndefined)(t)?300:t.undoRedoTimer,this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){var e=n.i(i.debounce)(this.keyUp,this.undoRedoTimer);this.parent.observer.on(r.f,e,this),this.parent.observer.on(r.d,this.keyDown,this),this.parent.observer.on(r.b,this.onAction,this),this.parent.observer.on(r.h,this.onPropertyChanged,this)},e.prototype.onPropertyChanged=function(e){for(var t=0,n=Object.keys(e.newProp);t<n.length;t++){switch(n[t]){case"undoRedoSteps":this.undoRedoSteps=e.newProp.undoRedoSteps;break;case"undoRedoTimer":this.undoRedoTimer=e.newProp.undoRedoTimer}}},e.prototype.removeEventListener=function(){var e=n.i(i.debounce)(this.keyUp,300);this.parent.observer.off(r.f,e),this.parent.observer.off(r.d,this.keyDown),this.parent.observer.off(r.b,this.onAction),this.parent.observer.off(r.h,this.onPropertyChanged)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.onAction=function(e){"Undo"===e.subCommand?this.undo(e):this.redo(e)},e.prototype.keyDown=function(e){var t=e.event,n=this;switch(t.action){case"undo":t.preventDefault(),n.undo(e);break;case"redo":t.preventDefault(),n.redo(e)}},e.prototype.keyUp=function(e){17===e.event.keyCode||e.event.ctrlKey||this.saveData(e)},e.prototype.saveData=function(e){var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var n=t.selectionStart,i=t.selectionEnd,r=this.parent.element.value,o={text:r,start:n,end:i};this.undoRedoStack.length>=this.steps&&(this.undoRedoStack=this.undoRedoStack.slice(0,this.steps+1)),this.undoRedoStack.length>1&&this.undoRedoStack[this.undoRedoStack.length-1].start===n&&this.undoRedoStack[this.undoRedoStack.length-1].end===i||(this.undoRedoStack.push(o),this.steps=this.undoRedoStack.length-1,this.steps>this.undoRedoSteps&&(this.undoRedoStack.shift(),this.steps--),e&&e.callBack&&e.callBack())},e.prototype.undo=function(e){if(this.steps>0){this.currentAction="Undo";var t=this.undoRedoStack[this.steps-1].start,n=this.undoRedoStack[this.steps-1].end,i=this.undoRedoStack[this.steps-1].text;this.parent.element.value=i,this.parent.element.focus(),this.steps--,this.restore(this.parent.element,t,n,e)}},e.prototype.redo=function(e){if(null!=this.undoRedoStack[this.steps+1]){this.currentAction="Redo";var t=this.undoRedoStack[this.steps+1].start,n=this.undoRedoStack[this.steps+1].end;this.parent.element.value=this.undoRedoStack[this.steps+1].text,this.parent.element.focus(),this.steps++,this.restore(this.parent.element,t,n,e)}},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:this.currentAction,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e.prototype.getUndoStatus=function(){var e={undo:!1,redo:!1};return this.steps>0&&(e.undo=!0),null!=this.undoRedoStack[this.steps+1]&&(e.redo=!0),e},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var i=n(0),r=(n.n(i),n(9)),o=(n.n(r),n(1)),s=n(2),a=n(5),l=n(4),d=n(24),c=n(27),u=n(26),h=function(){function e(e,t){this.parent=e,this.locator=t,this.isDOMElement=!1,this.renderFactory=this.locator.getService("rendererFactory"),this.contentRenderer=this.renderFactory.getRenderer(a.a.Content),this.popupRenderer=this.renderFactory.getRenderer(a.a.Popup),this.dropDownButtons=new c.a(this.parent,this.locator),this.colorPickerObj=new u.a(this.parent,this.locator)}return e.prototype.appendPopupContent=function(){this.toolbarElement=this.parent.createElement("div",{className:s.o}),this.element.classList.contains(s.v)&&this.toolbarElement.classList.add(s.p),this.element.appendChild(this.toolbarElement)},e.prototype.render=function(e){var t;t="Image"===e.popupType?s.u:"Inline"===e.popupType?s.w:"Text"===e.popupType?s.v:"";var r=n.i(i.getUniqueID)(e.popupType+"_Quick_Popup");this.stringItems=e.toolbarItems,this.element=this.parent.createElement("div",{id:r,className:t+" "+s._12}),this.element.setAttribute("aria-owns",this.parent.getID()),this.appendPopupContent(),this.createToolbar(e.toolbarItems,e.mode,e.cssClass),this.popupRenderer.renderPopup(this),this.addEventListener()},e.prototype.createToolbar=function(e,t,n){this.quickTBarObj=new d.a(this.parent,this.locator),this.quickTBarObj.render({container:"quick",target:this.toolbarElement,items:e,mode:t,cssClass:n}),this.quickTBarObj.toolbarObj.refresh()},e.prototype.setPosition=function(e){var t,r,o=n.i(i.closest)(e.target,".e-img-caption"),a=!e.target.classList.contains("e-imginline")&&!e.target.classList.contains("e-imgbreak"),l=n.i(i.isNullOrUndefined)(o)?e.target:o;n.i(i.addClass)([this.toolbarElement],[s.P]);var d=l.offsetTop,c=window.pageYOffset+e.parentData.top;r=d-e.editTop>e.popHeight?c+e.tBarElementHeight+(d-e.editTop)-e.popHeight-5:e.editTop+e.editHeight-(d+l.offsetHeight)>e.popHeight?c+e.tBarElementHeight+(d-e.editTop)+l.offsetHeight+5:e.y,l=a?e.target:l,t=l.offsetWidth>e.popWidth?l.offsetWidth/2-e.popWidth/2+e.parentData.left+l.offsetLeft:e.parentData.left+l.offsetLeft,this.popupObj.position.X=t+e.popWidth>e.parentData.right?e.parentData.right-e.popWidth:t,this.popupObj.position.Y=r>=0?r:e.y+5,this.popupObj.dataBind(),n.i(i.removeClass)([this.toolbarElement],[s.P])},e.prototype.checkCollision=function(e,t,i){var o,s,a=e.parentData.top,l=e.windowY+a+e.tBarElementHeight,d=[];d="document"===t?n.i(r.isCollide)(e.popup):n.i(r.isCollide)(e.popup,e.parentElement);for(var c=0;c<d.length;c++)switch(d[c]){case"top":s="document"===t?e.windowY:window.pageYOffset+a+e.tBarElementHeight;break;case"bottom":var u=void 0;u="document"===t?"inline"===i||"text"===i?e.y-e.popHeight-10:e.windowHeight-(a+e.tBarElementHeight)>e.popHeight?l-e.windowHeight>e.popHeight?l+(e.windowHeight-a)-e.popHeight:l:e.windowY+(a+e.tBarElementHeight):"IMG"!==e.target.tagName?e.parentData.bottom+window.pageYOffset-e.popHeight-10:e.parentData.bottom+window.pageYOffset-e.popHeight-5,s=u;break;case"right":o="inline"===i||"text"===i?window.pageXOffset+(e.windowWidth-(e.popWidth+e.bodyRightSpace+10)):e.x-e.popWidth;break;case"left":o="inline"===i||"text"===i?0:e.parentData.left}this.popupObj.position.X=o||this.popupObj.position.X,this.popupObj.position.Y=s||this.popupObj.position.Y,this.popupObj.dataBind()},e.prototype.showPopup=function(e,t,a,d){var c=this,u={popup:this.popupObj,cancel:!1,targetElement:a,positionX:e,positionY:t};this.parent.trigger(o._52,u,function(o){if(!o.cancel){var u=void 0,h=void 0,p=window.getComputedStyle(document.body),m=parseFloat(p.marginRight.split("px")[0])+parseFloat(p.paddingRight.split("px")[0]),f=window.innerHeight,g=window.innerWidth,b=c.parent.element,v=!n.i(i.isNullOrUndefined)(c.parent.getToolbar()),C=v&&c.parent.toolbarModule.getToolbarHeight(),y=v&&c.parent.toolbarModule.getExpandTBarPopHeight(),N=v?C+y:0;if(n.i(i.addClass)([c.element],[s.M]),i.Browser.isDevice&&!n.i(l.d)()&&n.i(i.addClass)([c.parent.getToolbar()],[s.M]),c.parent.iframeSettings.enable){var E=c.contentRenderer.getPanel().contentWindow;u=E.pageYOffset,h=E.innerHeight}else{var E=n.i(i.closest)(a,"."+s.C);u=E?E.scrollTop:0,h=E?E.offsetHeight:0}(c.parent.inlineMode.enable||n.i(i.closest)(a,"table")||"text"===d||"link"===d)&&"IMG"!==a.tagName||(c.parent.disableToolbarItem(c.parent.toolbarSettings.items),c.parent.enableToolbarItem(["Undo","Redo"])),n.i(i.append)([c.element],document.body),c.parent.showTooltip&&(c.tooltip=new r.Tooltip({target:"#"+c.element.id+" [title]",openDelay:400,showTipPointer:!0,windowCollision:!0,position:"BottomCenter"}),c.tooltip.appendTo(c.element)),c.popupObj.position.X=o.positionX+20,c.popupObj.position.Y=o.positionY+20,c.popupObj.dataBind(),c.popupObj.element.classList.add("e-popup-open"),c.dropDownButtons.renderDropDowns({container:c.toolbarElement,containerType:"quick",items:c.stringItems}),c.colorPickerObj.renderColorPickerInput({container:c.toolbarElement,containerType:"quick",items:c.stringItems});var S={x:e,y:t,target:a,editTop:u,editHeight:h,popup:c.popupObj.element,popHeight:c.popupObj.element.offsetHeight,popWidth:c.popupObj.element.offsetWidth,parentElement:b,bodyRightSpace:m,windowY:window.pageYOffset,windowHeight:f,windowWidth:g,parentData:b.getBoundingClientRect(),tBarElementHeight:N};("IMG"===a.tagName||"AUDIO"===a.tagName||"VIDEO"===a.tagName||"IFRAME"===a.tagName||a.classList&&(a.classList.contains(s.X)||a.classList.contains(s.V)||a.classList.contains(s.W)))&&c.setPosition(S),c.parent.inlineMode.enable||c.checkCollision(S,"parent",""),c.checkCollision(S,"document",c.parent.inlineMode.enable?"inline":"text"===d?"text":""),c.popupObj.element.classList.remove("e-popup-open"),n.i(i.removeClass)([c.element],[s.M]),c.popupObj.show({name:"ZoomIn",duration:i.Browser.isIE?250:400}),c.popupObj&&c.parent.cssClass&&(n.i(i.removeClass)([c.popupObj.element],c.parent.cssClass),n.i(i.addClass)([c.popupObj.element],c.parent.cssClass)),n.i(i.setStyleAttribute)(c.element,{maxWidth:window.outerWidth+"px"}),n.i(i.addClass)([c.element],[s.q]),c.isDOMElement=!0}})},e.prototype.hidePopup=function(){var e=this.parent.sourceCodeModule.getViewPanel();if(i.Browser.isDevice&&!n.i(l.d)()&&n.i(i.removeClass)([this.parent.getToolbar()],[s.M]),n.i(i.isNullOrUndefined)(document.querySelector(".e-tooltip-wrap")))n.i(i.isNullOrUndefined)(this.tooltip)||this.tooltip.destroy();else{if(!n.i(i.isNullOrUndefined)(document.querySelector("#"+this.element.id+" [data-tooltip-id]"))){var t=document.querySelector("#"+this.element.id+" [data-tooltip-id]"),r=t.getAttribute("data-content");t.removeAttribute("data-content"),t.setAttribute("title",r),t.removeAttribute("data-tooltip-id")}this.tooltip.destroy()}n.i(i.isNullOrUndefined)(this.parent.getToolbar())||this.parent.inlineMode.enable||(n.i(i.isNullOrUndefined)(e)||"none"===e.style.display)&&this.parent.enableToolbarItem(this.parent.toolbarSettings.items),this.removeEleFromDOM(),this.isDOMElement=!1},e.prototype.addQTBarItem=function(e,t){this.quickTBarObj.toolbarObj.addItems(this.quickTBarObj.getItems(e,"toolbar"),t)},e.prototype.removeQTBarItem=function(e){this.quickTBarObj.toolbarObj.removeItems(e)},e.prototype.removeEleFromDOM=function(){var e=this.popupObj.element;if(this.isDOMElement){this.dropDownButtons.destroyDropDowns(),this.colorPickerObj.destroyColorPicker(),n.i(i.removeClass)([this.element],[s.q]),n.i(i.detach)(e);var t=this.popupObj;this.parent.trigger(o._54,t)}},e.prototype.updateStatus=function(e){var t={args:e,dropDownModule:this.dropDownButtons,parent:this.parent,tbElements:n.i(i.selectAll)("."+s.D,this.element),tbItems:this.quickTBarObj.toolbarObj.items};if(n.i(l.h)(t,!0,this.parent),this.parent.quickToolbarSettings.text&&this.parent.quickToolbarModule.textQTBar){var r={args:e,dropDownModule:this.parent.quickToolbarModule.textQTBar.dropDownButtons,parent:this.parent,tbElements:n.i(i.selectAll)("."+s.D,this.parent.quickToolbarModule.textQTBar.element),tbItems:this.parent.quickToolbarModule.textQTBar.quickTBarObj.toolbarObj.items};n.i(l.h)(r,!0,this.parent),n.i(l.k)(this.parent.quickToolbarModule.textQTBar.quickTBarObj,this.parent.formatter.editorManager.undoRedoManager.getUndoStatus())}n.i(i.select)("."+s._69,this.parent.element)||n.i(l.k)(this.parent.getBaseToolbarObject(),this.parent.formatter.editorManager.undoRedoManager.getUndoStatus())},e.prototype.destroy=function(){this.popupObj&&!this.popupObj.isDestroyed&&(this.popupObj.destroy(),this.removeEleFromDOM()),this.removeEventListener()},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(o.i,this.destroy,this),this.parent.on(o.s,this.onPropertyChanged,this),(this.parent.inlineMode.enable||this.parent.quickToolbarSettings.text)&&this.parent.on(o.m,this.updateStatus,this))},e.prototype.onPropertyChanged=function(e){if(!n.i(i.isNullOrUndefined)(e.newProp.inlineMode))for(var t=0,r=Object.keys(e.newProp.inlineMode);t<r.length;t++){var s=r[t];switch(s){case"enable":e.newProp.inlineMode.enable?this.parent.on(o.m,this.updateStatus,this):this.parent.off(o.m,this.updateStatus)}}},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(o.i,this.destroy),this.parent.off(o.s,this.onPropertyChanged),(this.parent.inlineMode.enable||this.parent.quickToolbarSettings.text)&&this.parent.off(o.m,this.updateStatus))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(1),r=n(0),o=(n.n(r),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(i.D,this.commandCallBack,this),this.parent.on(i.i,this.removeEventListener,this)},e.prototype.commandCallBack=function(e){var t=!n.i(r.isNullOrUndefined)(e.requestType)&&"FormatPainter"===e.requestType&&"format-copy"===e.action;n.i(r.isNullOrUndefined)(e)||n.i(r.isNullOrUndefined)(e.requestType)||"Undo"===e.requestType||"Redo"===e.requestType||t||this.parent.formatter.saveData(),this.parent.notify(i.k,{args:e}),this.parent.notify(i._21,{})},e.prototype.removeEventListener=function(){this.parent.off(i.D,this.commandCallBack),this.parent.off(i.i,this.removeEventListener)},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(9)),o=(n.n(r),n(1)),s=n(2),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.showFullScreen=function(e){var t=this;if(!0!==this.parent.toolbarSettings.enable||"Markdown"===this.parent.editorMode||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||this.parent.quickToolbarModule.hideQuickToolbars(),this.parent.showTooltip&&!n.i(i.isNullOrUndefined)(document.querySelector(".e-tooltip-wrap"))&&this.parent.notify(o._93,{args:e}),this.scrollableParent=n.i(r.getScrollableParent)(this.parent.element),!this.parent.element.classList.contains(s.n)){var a={cancel:!1,requestType:"Maximize",targetItem:"Maximize",args:e};this.parent.trigger(o.S,a,function(n){if(!n.cancel){t.parent.toolbarSettings.enableFloating&&!t.parent.inlineMode.enable&&t.parent.toolbarSettings.enable&&(t.parent.getToolbarElement().style.width="100%",t.parent.getToolbarElement().style.top="0px"),t.parent.element.classList.add(s.n),t.toggleParentOverflow(!0);var r=t.parent.element.querySelectorAll(".e-toolbar-extended.e-popup-open").length>0;t.parent.setContentHeight(null,r),t.parent.toolbarModule&&(t.parent.getBaseToolbarObject().toolbarObj.items[0].properties||t.parent.getBaseToolbarObject().toolbarObj.removeItems(0),i.Browser.isDevice&&t.parent.toolbarModule.removeFixedTBarClass(),t.parent.toolbarModule.updateItem({targetItem:"Maximize",updateItem:"Minimize",baseToolbar:t.parent.getBaseToolbarObject()})),t.parent.refreshUI(),t.parent.trigger(o.T,{requestType:"Maximize",targetItem:"Maximize",args:e})}})}},e.prototype.hideFullScreen=function(e){var t=this;if(!0!==this.parent.toolbarSettings.enable||"Markdown"===this.parent.editorMode||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||this.parent.quickToolbarModule.hideQuickToolbars(),this.parent.showTooltip&&!n.i(i.isNullOrUndefined)(document.querySelector(".e-tooltip-wrap"))&&this.parent.notify(o._93,{args:e}),this.parent.element.classList.contains(s.n)){var r={cancel:!1,requestType:"Minimize",targetItem:"Minimize",args:e};this.parent.trigger(o.S,r,function(r){if(!r.cancel){t.parent.element.classList.remove(s.n);for(var a=document.querySelectorAll(".e-rte-overflow"),l=0;l<a.length;l++)n.i(i.removeClass)([a[l]],["e-rte-overflow"]);var d=t.parent.element.querySelectorAll(".e-toolbar-extended.e-popup-open").length>0;t.parent.setContentHeight(null,d),t.parent.toolbarModule&&(t.parent.getBaseToolbarObject().toolbarObj.items[0].properties||t.parent.getBaseToolbarObject().toolbarObj.removeItems(0),t.parent.toolbarModule.updateItem({targetItem:"Minimize",updateItem:"Maximize",baseToolbar:t.parent.getBaseToolbarObject()}),i.Browser.isDevice&&t.parent.inlineMode.enable&&t.parent.toolbarModule.addFixedTBarClass()),t.parent.trigger(o.T,{requestType:"Minimize",targetItem:"Minimize",args:e})}})}},e.prototype.toggleParentOverflow=function(e){if(!n.i(i.isNullOrUndefined)(this.scrollableParent))for(var t=0;t<this.scrollableParent.length;t++)if("#document"===this.scrollableParent[t].nodeName){var r=document.querySelector("body");n.i(i.addClass)([r],["e-rte-overflow"])}else{var r=this.scrollableParent[t];n.i(i.addClass)([r],["e-rte-overflow"])}},e.prototype.onKeyDown=function(e){var t=e.args;switch(t.action){case"full-screen":this.showFullScreen(e.args),t.preventDefault();break;case"escape":this.hideFullScreen(e.args),t.preventDefault()}},e.prototype.addEventListener=function(){this.parent.on(o.v,this.onKeyDown,this),this.parent.on(o.i,this.destroy,this),this.parent.on(o._44,this.moduleDestroy,this)},e.prototype.removeEventListener=function(){this.parent.off(o.v,this.onKeyDown),this.parent.off(o.i,this.destroy),this.parent.off(o._44,this.moduleDestroy)},e.prototype.destroy=function(){if(!n.i(i.isNullOrUndefined)(this.parent)){this.parent.element.classList.contains(s.n)&&this.toggleParentOverflow(!1);for(var e=document.querySelectorAll(".e-rte-overflow"),t=0;t<e.length;t++)n.i(i.removeClass)([e[t]],["e-rte-overflow"]);this.removeEventListener()}},e.prototype.moduleDestroy=function(){this.parent=null},e}()},function(e,t,n){"use strict";function i(e,t,n,i){var r;if(n){r=t.contentModule.getDocument().querySelector("body")}else r=t.element;if(Object.keys(e).length)for(var o=0,s=Object.keys(e);o<s.length;o++){var a=s[o];if("class"===a)r.classList.add(e[""+a]);else if("disabled"===a&&"disabled"===e[""+a])t.enabled=!1,t.setEnable();else if("readonly"===a&&"readonly"===e[""+a])t.readonly=!0,t.setReadOnly(i);else if("style"===a)r.setAttribute("style",e[""+a]);else if("tabindex"===a)t.inputElement.setAttribute("tabindex",e[""+a]);else if("placeholder"===a)t.placeholder=e[""+a],t.setPlaceHolder();else{var l=["name","required"];l.indexOf(a)>-1?t.valueContainer.setAttribute(a,e[""+a]):r.setAttribute(a,e[""+a])}}}t.a=i},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(1),r=n(51),o=n(6),s=function(){function e(e){this.parent=e,this.toolbarStatus=this.prevToolbarStatus=n.i(o.a)(),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(i.k,this.onRefreshHandler,this),this.parent.on(i.i,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off(i.k,this.onRefreshHandler),this.parent.off(i.i,this.removeEventListener)},e.prototype.onRefreshHandler=function(e){if(!this.parent.readonly){var t=[],n=[],o=[];this.parent.fontSize.items.forEach(function(e){t.push(e.value)}),this.parent.fontFamily.items.forEach(function(e){n.push(e.value)}),this.parent.format.types.forEach(function(e){o.push(e.value.toLocaleLowerCase())}),this.toolbarStatus=r.b.get(this.parent.contentModule.getDocument(),this.parent.contentModule.getEditPanel(),o,t,n,e.documentNode);var s=JSON.stringify(this.toolbarStatus);this.parent.notify(i.m,this.toolbarStatus),JSON.stringify(this.prevToolbarStatus)!==s&&(this.parent.notify(i._78,{html:JSON.parse(s),markdown:null}),this.prevToolbarStatus=JSON.parse(s))}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(23),r=n(1),o=n(6),s=function(){function e(e){this.toolbarStatus=this.prevToolbarStatus=n.i(o.f)(),this.selection=new i.a,this.parent=e,this.element=this.parent.contentModule.getEditPanel(),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(r.k,this.onRefreshHandler,this),this.parent.on(r.i,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off(r.k,this.onRefreshHandler),this.parent.off(r.i,this.removeEventListener)},e.prototype.onRefreshHandler=function(e){var t=this.selection.getSelectedParentPoints(this.element);this.toolbarStatus={orderedlist:!e.documentNode&&this.isListsApplied(t,"OL"),unorderedlist:!e.documentNode&&this.isListsApplied(t,"UL"),formats:this.currentFormat(t,e.documentNode),bold:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("Bold"),italic:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("Italic"),inlinecode:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("InlineCode"),strikethrough:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("StrikeThrough"),subscript:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("SubScript"),superscript:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("SuperScript"),uppercase:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("UpperCase")},this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("InlineCode")&&(this.toolbarStatus.formats="pre");var n=JSON.stringify(this.toolbarStatus);this.parent.notify(r.m,this.toolbarStatus),JSON.stringify(this.prevToolbarStatus)!==n&&(this.parent.notify(r._78,{html:null,markdown:JSON.parse(n)}),this.prevToolbarStatus=JSON.parse(n))},e.prototype.isListsApplied=function(e,t){var n=!0;if("OL"===t)for(var i=0;i<e.length;i++){var r=e[i].text.trim().split(" ",2)[0]+" ";if(!/^[\d.]+[ ]+$/.test(r)){n=!1;break}}else for(var i=0;i<e.length;i++)if(!this.selection.isStartWith(e[i].text,this.parent.formatter.listTags[""+t])){n=!1;break}return n},e.prototype.currentFormat=function(e,t){for(var n="p",i=Object.keys(this.parent.formatter.formatTags),r=this.element.selectionDirection,o="backward"===r?e[0].text:e[e.length-1].text,s=0;!t&&s<i.length;s++){if("pre"!==i[s]&&this.selection.isStartWith(o,this.parent.formatter.formatTags[i[s]])){n=i[s];break}if("pre"===i[s]&&this.codeFormat()){n=i[s];break}}return n},e.prototype.codeFormat=function(){var e=!1,t=this.parent.inputElement,n=t.selectionStart,i=function(e){return function(t){return[t.slice(0,e),t.slice(e)]}}(n)(t.value),r=this.parent.formatter.formatTags.pre,o=this.getSelectedText(t);if(""!==o&&o===o.toLocaleUpperCase())return!0;if(""===o){var s=t.value.substr(i[0].length-1,1),a=i[1].substr(0,1);if(""!==s&&""!==a&&s.match(/[a-z]/i)&&s===s.toLocaleUpperCase()&&a===a.toLocaleUpperCase())return!0}return this.isCode(i[0],r)&&this.isCode(i[1],r)&&i[0].match(this.multiCharRegx(r)).length%2==1&&i[1].match(this.multiCharRegx(r)).length%2==1&&(e=!0),e},e.prototype.getSelectedText=function(e){return e.value.substring(e.selectionStart,e.selectionEnd)},e.prototype.isCode=function(e,t){return-1!==e.search("\\"+t)},e.prototype.multiCharRegx=function(e){return new RegExp("(\\"+e+")","g")},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(1)),o=n(32),s=n(31),a=function(){function e(e){this.parent=e,this.addEventListener(),this.serviceLocator=new o.a,this.serviceLocator.register("rendererFactory",new s.a)}return e.prototype.addEventListener=function(){this.parent.on(r.j,this.toolbarClick,this),this.parent.on(r.B,this.dropDownSelect,this),this.parent.on(r._29,this.renderSelection,this),this.parent.on(r.i,this.removeEventListener,this)},e.prototype.toolbarClick=function(e){if(!n.i(i.isNullOrUndefined)(e.item)){if(!n.i(i.isNullOrUndefined)(e.item.controlParent)){var t=e.item.controlParent.activeEle;t&&(t.tabIndex=-1)}"NumberFormatList"!==e.item.command&&"BulletFormatList"!==e.item.command||(e.originalEvent.target.classList.contains("e-order-list")||e.originalEvent.target.classList.contains("e-unorder-list"))&&(e.item.command="Lists",e.item.subCommand="NumberFormatList"===e.item.subCommand?"OL":"UL"),"Lists"===e.item.command&&e.originalEvent.target.classList.contains("e-caret")&&(e.originalEvent.target.parentElement.classList.contains("e-rte-bulletformatlist-dropdown")||e.originalEvent.target.parentElement.classList.contains("e-rte-numberformatlist-dropdown"))&&(e.item.command=e.item.subCommand=null),this.parent.notify(r.p,e),this.parent.notify(r.q,e)}},e.prototype.dropDownSelect=function(e){if(this.parent.notify(r._19,{}),!document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))||!e.item||"Images"!==e.item.command&&"Audios"!==e.item.command&&"Videos"!==e.item.command&&"VideoLayoutOption"!==e.item.command&&"Display"!==e.item.command&&"Table"!==e.item.command){var t=e.item.controlParent&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.tableQTBar&&this.parent.quickToolbarModule.tableQTBar.element.contains(e.item.controlParent.element)?"Table":null;if("Lists"===e.item.command){var n={listStyle:e.item.value,listImage:e.item.listImage,type:e.item.subCommand};this.parent.formatter.process(this.parent,e,e.originalEvent,n)}else this.parent.formatter.process(this.parent,e,e.originalEvent,t)}this.parent.notify(r._18,{})},e.prototype.renderSelection=function(e){this.parent.notify(r._19,{}),this.parent.formatter.process(this.parent,e,e.originalEvent,null),this.parent.notify(r._18,{})},e.prototype.removeEventListener=function(){this.parent.off(r.j,this.toolbarClick),this.parent.off(r.B,this.dropDownSelect),this.parent.off(r._29,this.renderSelection),this.parent.off(r.i,this.removeEventListener)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(1),r=n(0),o=(n.n(r),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(i._69,this.enableXhtmlValidation,this),this.parent.on(i.i,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off(i._69,this.enableXhtmlValidation),this.parent.off(i.i,this.removeEventListener)},e.prototype.enableXhtmlValidation=function(){this.parent.enableXhtml&&(n.i(r.isNullOrUndefined)(this.parent.inputElement)?this.currentElement=this.parent.element:this.currentElement=this.parent.inputElement,this.clean(this.currentElement),this.ImageTags(),this.removeTags(),this.RemoveUnsupported(),this.currentElement.innerHTML=this.selfEncloseValidation(this.currentElement.innerHTML,"\n"===this.currentElement.innerText?this.currentElement.innerText.length:this.currentElement.innerText.trim().length),this.parent.setProperties({value:this.currentElement.innerHTML},!0))},e.prototype.selfEncloseValidation=function(e,t){if(0===t&&e.indexOf("table")<0&&e.indexOf("img")<0&&e.includes(" ")){var n=e.split(" ");n[n.length-1]="​"+n[n.length-1],e=n.join("")}e=e.replace(/<br>/g,"<br/>").replace(/<hr>/g,"<hr/>").replace(/ /g," ");for(var i,r=[],o=[],s=[/<img(.*?)>/gi,/<area(.*?)>/gi,/<base(.*?)>/gi,/<col (.*?)>/gi,/<embed(.*?)>/gi,/<input(.*?)>/gi,/<link(.*?)>/gi,/<meta(.*?)>/gi,/<param(.*?)>/gi,/<source(.*?)>/gi,/<track(.*?)>/gi,/<wbr(.*?)>/gi],a=0;a<s.length;a++){for(i=s[a].exec(e);null!==i;)r.push(i[0].toString()),i=s[a].exec(e);o=r.slice(0);for(var l=0;l<r.length;l++)-1!==r[l].indexOf("/")&&r[l].lastIndexOf("/")===r[l].length-2||(r[l]=r[l].substr(0,r[l].length-1)+" /"+r[l].substr(r[l].length-1,r[l].length));for(var d=0;d<=r.length-1;d++)e=e.replace(o[d],r[d])}return e},e.prototype.clean=function(e){for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];8===n.nodeType||"V:IMAGE"===n.nodeName?(e.removeChild(n),t--):1===n.nodeType&&this.clean(n)}return this.currentElement.innerHTML},e.prototype.ImageTags=function(){for(var e=this.currentElement.querySelectorAll("IMG"),t=e.length-1;t>=0;t--)if(!e[t].hasAttribute("alt")){var n=e[t];n.setAttribute("alt","")}},e.prototype.removeTags=function(){for(var e=[["br","ul"],["br","ol"],["table","span"],["div","span"],["p","span"]],t=0;t<e.length;t++)this.RemoveElementNode(e[t][0],e[t][1])},e.prototype.RemoveElementNode=function(e,t){for(var i=this.currentElement.querySelectorAll(t),o=0;o<i.length;o++)for(var s=i[o].querySelectorAll(e),a=s.length;a>0;a--)n.i(r.detach)(s[a-1])},e.prototype.RemoveUnsupported=function(){for(var e=this.currentElement.querySelectorAll("u"),t=e.length-1;t>=0;t--){var i=this.parent.createElement("span");i.style.textDecoration="underline",i.innerHTML=e[t].innerHTML,e[t].parentNode.insertBefore(i,e[t]),n.i(r.detach)(e[t])}for(var o=this.currentElement.querySelectorAll("strong"),t=o.length-1;t>=0;t--){var s=this.parent.createElement("b");s.innerHTML=o[t].innerHTML,o[t].parentNode.insertBefore(s,o[t]),n.i(r.detach)(o[t])}for(var a=["language","role","target","contenteditable","cellspacing","cellpadding","border","valign","colspan"],t=0;t<=a.length;t++)this.RemoveAttributeByName(a[t])},e.prototype.RemoveAttributeByName=function(e){if(null!==this.currentElement.firstChild&&3!==this.currentElement.firstChild.nodeType)for(var t=0;t<this.currentElement.childNodes.length;t++){var n=this.currentElement.childNodes[t];if(3!==n.nodeType&&"TABLE"!==n.nodeName&&"TBODY"!==n.nodeName&&"THEAD"!==n.nodeName&&"TH"!==n.nodeName&&"TR"!==n.nodeName&&"TD"!==n.nodeName&&(n.hasAttribute(e)&&n.removeAttribute(e),n.hasChildNodes()))for(var i=0;i<n.childNodes.length;i++){var r=n.childNodes[i];if(3!==r.nodeType&&"TABLE"!==r.nodeName&&"TBODY"!==r.nodeName&&"THEAD"!==r.nodeName&&"TH"!==r.nodeName&&"TR"!==r.nodeName&&"TD"!==r.nodeName&&r.hasAttribute(e)&&!r.classList.contains("e-mention-chip")&&r.removeAttribute(e),r.hasChildNodes())for(var o=0;o<r.childNodes.length;o++)3!==r.childNodes[o].nodeType&&"TABLE"!==r.childNodes[o].nodeName&&"TBODY"!==r.childNodes[o].nodeName&&"THEAD"!==r.childNodes[o].nodeName&&"TH"!==r.childNodes[o].nodeName&&"TR"!==r.childNodes[o].nodeName&&"TD"!==r.childNodes[o].nodeName&&r.childNodes[o].hasAttribute(e)&&r.childNodes[o].removeAttribute(e)}}},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i={bold:{command:"Style",subCommand:"Bold",value:"strong"},italic:{command:"Style",subCommand:"Italic",value:"em"},underline:{command:"Style",subCommand:"Underline",value:"span"},strikeThrough:{command:"Style",subCommand:"StrikeThrough",value:"span"},insertCode:{command:"Formats",subCommand:"Pre",value:"pre"},superscript:{command:"Effects",subCommand:"SuperScript",value:"sup"},subscript:{command:"Effects",subCommand:"SubScript",value:"sub"},uppercase:{command:"Casing",subCommand:"UpperCase"},lowercase:{command:"Casing",subCommand:"LowerCase"},fontColor:{command:"font",subCommand:"fontcolor",value:"#ff0000"},fontName:{command:"font",subCommand:"fontname",value:"Segoe UI"},fontSize:{command:"font",subCommand:"fontsize",value:"10pt"},backColor:{command:"font",subCommand:"backgroundcolor",value:"#ffff00"},justifyCenter:{command:"Alignments",subCommand:"JustifyCenter"},justifyFull:{command:"Alignments",subCommand:"JustifyFull"},justifyLeft:{command:"Alignments",subCommand:"JustifyLeft"},justifyRight:{command:"Alignments",subCommand:"JustifyRight"},undo:{command:"Actions",subCommand:"Undo"},redo:{command:"Actions",subCommand:"Redo"},createLink:{command:"Links",subCommand:"createLink"},editLink:{command:"Links",subCommand:"createLink"},createImage:{command:"Images",subCommand:"Images"},formatBlock:{command:"Formats",value:"P"},heading:{command:"Formats",value:"H1"},indent:{command:"Indents",subCommand:"Indent"},outdent:{command:"Indents",subCommand:"Outdent"},insertHTML:{command:"InsertHTML",subCommand:"InsertHTML",value:""},insertText:{command:"InsertText",subCommand:"InsertText",value:""},insertHorizontalRule:{command:"InsertHTML",subCommand:"InsertHTML",value:"<hr/>"},insertImage:{command:"Images",subCommand:"Image"},insertAudio:{command:"Audios",subCommand:"Audio"},insertVideo:{command:"Videos",subCommand:"Video"},editImage:{command:"Images",subCommand:"Image"},insertTable:{command:"Table",subCommand:"CreateTable"},insertBrOnReturn:{command:"InsertHTML",subCommand:"InsertHTML",value:"<br/>"},insertOrderedList:{command:"Lists",value:"OL"},insertUnorderedList:{command:"Lists",value:"UL"},insertParagraph:{command:"Formats",value:"P"},removeFormat:{command:"Clear",subCommand:"ClearFormat"},copyFormatPainter:{command:"FormatPainter",value:"format-copy"},applyFormatPainter:{command:"FormatPainter",value:"format-paste"},escapeFormatPainter:{command:"FormatPainter",value:"escape"}}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(29),r=n(33),o=n(0),s=(n.n(o),n(15)),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=function(e){function t(t){var i=e.call(this)||this;return i.initialize(),n.i(o.extend)(i,i,t,!0),i.currentDocument&&i.element&&i.updateFormatter(i.element,i.currentDocument,t.options,t.formatPainterSettings),i}return a(t,e),t.prototype.initialize=function(){this.keyConfig=s.d},t.prototype.updateFormatter=function(e,t,n,i){e&&t&&(this.editorManager=new r.a({document:t,editableElement:e,options:n,formatPainterSettings:i}))},t}(i.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(29),r=n(54),o=n(0),s=(n.n(o),n(15)),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=function(e){function t(t){var i=e.call(this)||this;return i.initialize(),n.i(o.extend)(i,i,t,!0),t&&i.element&&i.updateFormatter(i.element,document,t.options),i}return a(t,e),t.prototype.initialize=function(){this.keyConfig=s.e,this.formatTags=s.a,this.listTags=s.c,this.selectionTags=s.b},t.prototype.updateFormatter=function(e,t,n){e&&(this.editorManager=new r.a({element:e,formatTags:this.formatTags,listTags:this.listTags,selectionTags:this.selectionTags,options:n}))},t}(i.a)},function(e,t,n){"use strict";n.d(t,"f",function(){return i}),n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return l});var i={alignments:"Alignments",justifyLeft:"Align Left",justifyCenter:"Align Center",justifyRight:"Align Right",justifyFull:"Align Justify",fontName:"Font Name",fontSize:"Font Size",fontColor:"Font Color",backgroundColor:"Background Color",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",clearFormat:"Clear Format",clearAll:"Clear All",cut:"Cut",copy:"Copy",paste:"Paste",unorderedList:"Bulleted List",orderedList:"Numbered List",indent:"Increase Indent",outdent:"Decrease Indent",undo:"Undo",redo:"Redo",superscript:"Superscript",subscript:"Subscript",createLink:"Insert Link",openLink:"Open Link",editLink:"Edit Link",removeLink:"Remove Link",image:"Insert Image",audio:"Insert Audio",video:"Insert Video",replace:"Replace",numberFormatList:"Number Format List",bulletFormatList:"Bullet Format List",audioReplace:"Replace",videoReplace:"Replace",videoAlign:"Align",videoDimension:"Dimension",audioRemove:"Remove",videoRemove:"Remove",audioLayoutOption:"Layout option",videoLayoutOption:"Layout option",align:"Align",caption:"Image Caption",remove:"Remove",insertLink:"Insert Link",display:"Display",altText:"Alternative Text",dimension:"Change Size",fullscreen:"Maximize",maximize:"Maximize",minimize:"Minimize",lowerCase:"Lower Case",upperCase:"Upper Case",print:"Print",formats:"Formats",sourcecode:"Code View",preview:"Preview",viewside:"ViewSide",insertCode:"Insert Code",linkText:"Display Text",linkTooltipLabel:"Title",linkWebUrl:"Web Address",linkTitle:"Enter a title",linkurl:"http://example.com",linkOpenInNewWindow:"Open Link in New Window",linkHeader:"Insert Link",dialogInsert:"Insert",dialogCancel:"Cancel",dialogUpdate:"Update",imageHeader:"Insert Image",audioHeader:"Insert Audio",videoHeader:"Insert Video",imageLinkHeader:"You can also provide a link from the web",audioLinkHeader:"You can also provide a link from the web",videoLinkHeader:"Web URL",embedVideoLinkHeader:"Media Embed URL",mdimageLink:"Please provide a URL for your image",imageUploadMessage:"Drop image here or browse to upload",audioUploadMessage:"Drop an audio file or browse to upload",videoUploadMessage:"Drop a video file or browse to upload",imageDeviceUploadMessage:"Click here to upload",audioDeviceUploadMessage:"Click here to upload",videoDeviceUploadMessage:"Click here to upload",imageAlternateText:"Alternate Text",alternateHeader:"Alternative Text",browse:"Browse",imageUrl:"http://example.com/image.png",audioUrl:"http://example.com/audio.mp3",videoUrl:"http://example.com/video.mp3",webUrl:"Web URL",embedUrl:"Embed Code",imageCaption:"Caption",imageSizeHeader:"Image Size",videoSizeHeader:"Video Size",imageHeight:"Height",imageWidth:"Width",videoHeight:"Height",videoWidth:"Width",textPlaceholder:"Enter Text",inserttablebtn:"Insert Table",tabledialogHeader:"Insert Table",tableWidth:"Width",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",columns:"Number of columns",rows:"Number of rows",tableRows:"Table Rows",tableColumns:"Table Columns",tableCellHorizontalAlign:"Table Cell Horizontal Align",tableCellVerticalAlign:"Table Cell Vertical Align",createTable:"Create Table",removeTable:"Remove Table",tableHeader:"Table Header",tableRemove:"Table Remove",tableCellBackground:"Table Cell Background",tableEditProperties:"Table Edit Properties",styles:"Styles",insertColumnLeft:"Insert Column Left",insertColumnRight:"Insert Column Right",deleteColumn:"Delete Column",insertRowBefore:"Insert Row Before",insertRowAfter:"Insert Row After",deleteRow:"Delete Row",tableEditHeader:"Edit Table",TableHeadingText:"Heading",TableColText:"Col",imageInsertLinkHeader:"Insert Link",editImageHeader:"Edit Image",editAudioHeader:"Edit Audio",editVideoHeader:"Edit Video",alignmentsDropDownLeft:"Align Left",alignmentsDropDownCenter:"Align Center",alignmentsDropDownRight:"Align Right",alignmentsDropDownJustify:"Align Justify",imageDisplayDropDownInline:"Inline",imageDisplayDropDownBreak:"Break",audioLayoutOptionDropDownInline:"Inline",audioLayoutOptionDropDownBreak:"Break",videoLayoutOptionDropDownInline:"Inline",videoLayoutOptionDropDownBreak:"Break",tableInsertRowDropDownBefore:"Insert row before",tableInsertRowDropDownAfter:"Insert row after",tableInsertRowDropDownDelete:"Delete row",tableInsertColumnDropDownLeft:"Insert column left",tableInsertColumnDropDownRight:"Insert column right",tableInsertColumnDropDownDelete:"Delete column",tableVerticalAlignDropDownTop:"Align Top",tableVerticalAlignDropDownMiddle:"Align Middle",tableVerticalAlignDropDownBottom:"Align Bottom",tableStylesDropDownDashedBorder:"Dashed Borders",tableStylesDropDownAlternateRows:"Alternate Rows",pasteFormat:"Paste Format",pasteFormatContent:"Choose the formatting action",plainText:"Plain Text",cleanFormat:"Clean",keepFormat:"Keep",pasteDialogOk:"OK",pasteDialogCancel:"Cancel",fileManager:"File Manager",fileDialogHeader:"File Browser",formatsDropDownParagraph:"Paragraph",formatsDropDownCode:"Code",formatsDropDownQuotation:"Quotation",formatsDropDownHeading1:"Heading 1",formatsDropDownHeading2:"Heading 2",formatsDropDownHeading3:"Heading 3",formatsDropDownHeading4:"Heading 4",fontNameSegoeUI:"Segoe UI",fontNameArial:"Arial",fontNameGeorgia:"Georgia",fontNameImpact:"Impact",fontNameTahoma:"Tahoma",fontNameTimesNewRoman:"Times New Roman",fontNameVerdana:"Verdana",numberFormatListNumber:"Number",numberFormatListLowerAlpha:"LowerAlpha",numberFormatListUpperAlpha:"UpperAlpha",numberFormatListLowerRoman:"LowerRoman",numberFormatListUpperRoman:"UpperRoman",numberFormatListLowerGreek:"LowerGreek",bulletFormatListDisc:"Disc",bulletFormatListCircle:"Circle",bulletFormatListSquare:"Square",numberFormatListNone:"None",bulletFormatListNone:"None",formatPainter:"Format Painter",emojiPicker:"Emoji Picker",embeddedCode:"Embedded Code",pasteEmbeddedCodeHere:"Paste Embedded Code here",emojiPickerTypeToFind:"Type to find",emojiPickerNoResultFound:"No results found",emojiPickerTrySomethingElse:"Try something else",linkAriaLabel:"Open in new window"},r={alignments:"alignments",justifyleft:"justifyLeft",justifycenter:"justifyCenter",justifyright:"justifyRight",justifyfull:"justifyFull",fontname:"fontName",fontsize:"fontSize",fontcolor:"fontColor",backgroundcolor:"backgroundColor",bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",clearformat:"clearFormat",clearall:"clearAll",cut:"cut",copy:"copy",paste:"paste",unorderedlist:"unorderedList",orderedlist:"orderedList",indent:"indent",outdent:"outdent",numberformatlist:"numberFormatList",bulletformatlist:"bulletFormatList",undo:"undo",redo:"redo",filemanager:"fileManager",superscript:"superscript",subscript:"subscript",createlink:"createLink",openlink:"openLink",editlink:"editLink",removelink:"removeLink",openimagelink:"openLink",editimagelink:"editLink",removeimagelink:"removeLink",image:"image",audio:"audio",video:"video",replace:"replace",audioreplace:"audioReplace",videoreplace:"videoReplace",videoalign:"videoAlign",videodimension:"videoDimension",audioremove:"audioRemove",videoremove:"videoRemove",audiolayoutoption:"audioLayoutOption",videolayoutoption:"videoLayoutOption",align:"align",caption:"caption",remove:"remove",insertlink:"insertLink",display:"display",alttext:"altText",dimension:"dimension",fullscreen:"fullscreen",maximize:"maximize",minimize:"minimize",lowercase:"lowerCase",uppercase:"upperCase",print:"print",formats:"formats",sourcecode:"sourcecode",preview:"preview",viewside:"viewside",insertcode:"insertCode",tablerows:"tableRows",tablecolumns:"tableColumns",tablecellhorizontalalign:"tableCellHorizontalAlign",tablecellverticalalign:"tableCellVerticalAlign",createtable:"createTable",removetable:"removeTable",tableheader:"tableHeader",tableremove:"tableRemove",tablecellbackground:"tableCellBackground",tableeditproperties:"tableEditProperties",styles:"styles",insertcolumnleft:"insertColumnLeft",insertcolumnright:"insertColumnRight",deletecolumn:"deleteColumn",aligntop:"AlignTop",alignmiddle:"AlignMiddle",alignbottom:"AlignBottom",insertrowbefore:"insertRowBefore",insertrowafter:"insertRowAfter",deleterow:"deleteRow",formatpainter:"formatPainter",emojipicker:"emojiPicker",embeddedCode:"Embedded Code",pasteEmbeddedCodeHere:"Paste Embedded Code here",emojiPickerTypeToFind:"Type to find",emojiPickerNoResultFound:"No results found",emojiPickerTrySomethingElse:"Try something else",ImageLinkAriaLabel:"Open in new window"},o=[{locale:"fontNameSegoeUI",value:"Segoe UI"},{locale:"fontNameArial",value:"Arial,Helvetica,sans-serif"},{locale:"fontNameGeorgia",value:"Georgia,serif"},{locale:"fontNameImpact",value:"Impact,Charcoal,sans-serif"},{locale:"fontNameTahoma",value:"Tahoma,Geneva,sans-serif"},{locale:"fontNameTimesNewRoman",value:"Times New Roman,Times,serif"},{locale:"fontNameVerdana",value:"Verdana,Geneva,sans-serif"}],s=[{locale:"formatsDropDownParagraph",value:"P"},{locale:"formatsDropDownCode",value:"Pre"},{locale:"formatsDropDownQuotation",value:"BlockQuote"},{locale:"formatsDropDownHeading1",value:"H1"},{locale:"formatsDropDownHeading2",value:"H2"},{locale:"formatsDropDownHeading3",value:"H3"},{locale:"formatsDropDownHeading4",value:"H4"}],a=[{locale:"numberFormatListNone",value:"none"},{locale:"numberFormatListNumber",value:"decimal"},{locale:"numberFormatListLowerAlpha",value:"lower-alpha"},{locale:"numberFormatListUpperAlpha",value:"upper-alpha"},{locale:"numberFormatListLowerRoman",value:"lower-roman"},{locale:"numberFormatListUpperRoman",value:"upper-roman"},{locale:"numberFormatListLowerGreek",value:"lower-greek"}],l=[{locale:"bulletFormatListNone",value:"none"},{locale:"bulletFormatListDisc",value:"disc"},{locale:"bulletFormatListCircle",value:"circle"},{locale:"bulletFormatListSquare",value:"square"}]},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(9),r=(n.n(i),n(0)),o=(n.n(r),n(1)),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(o._44,this.moduleDestroy,this),this.parent.on(o.i,this.removeEventListener,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(o.i,this.removeEventListener),this.parent.off(o._44,this.moduleDestroy))},e.prototype.render=function(e){var t;return e.beforeOpen=this.beforeOpen.bind(this),e.open=this.open.bind(this),e.position={X:"center",Y:this.getDialogPosition()},n.i(r.isNullOrUndefined)(e.close)&&(e.close=this.close.bind(this)),e.beforeClose=this.beforeClose.bind(this),t=new i.Dialog(e),t.isStringTemplate=!0,t},e.prototype.beforeOpen=function(e){if(e.element.classList.contains("e-dialog")){var t=n.i(r.closest)(e.target,"form");n.i(r.isNullOrUndefined)(t)||(this.dialogEle=e.element,this.dialogEle.addEventListener("keydown",this.handleEnterKeyDown))}this.parent.trigger(o._47,e,this.beforeOpenCallback.bind(this,e))},e.prototype.handleEnterKeyDown=function(e){"Enter"===e.code&&e.preventDefault()},e.prototype.beforeOpenCallback=function(e){e.cancel&&this.parent.notify(o._48,null)},e.prototype.open=function(e){this.parent.trigger(o._49,e)},e.prototype.beforeClose=function(e){this.dialogEle&&this.dialogEle.removeEventListener("keydown",this.handleEnterKeyDown),this.parent.trigger(o._50,e,function(e){e.cancel||e.container.classList.contains("e-popup-close")&&(e.cancel=!0)})},e.prototype.getDialogPosition=function(){var e=this.parent.element.getBoundingClientRect().top;if(e<0){for(var t=0,n=this.parent.element;"BODY"!==n.nodeName;){var i=n.getBoundingClientRect().top;i>0&&(t=i),n=n.parentElement}return e=Math.abs(e)+t,e.toString()}return"top"},e.prototype.close=function(e){this.parent.trigger(o._51,e)},e.prototype.moduleDestroy=function(){this.parent=null},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(30),r=n(0),o=(n.n(r),n(4)),s=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.renderPanel=function(){var e=this.parent,t=n.i(o.p)(e.value,e),i='<body spellcheck="false" autocorrect="off" contenteditable="true">'+t+"</body></html>",r="\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image, .e-rte-audio, .e-rte-video {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imginline, .e-rte-audio.e-audio-inline, .e-rte-video.e-video-inline {display: inline-block;float: none;max-width: calc(100% - (2 * 5px));padding: 1px;vertical-align: bottom;}\n .e-rte-image.e-imgcenter, .e-rte-video.e-video-center {cursor: pointer;display: block;float: none;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-imgright, .e-rte-video.e-video-right { float: right; margin: 0 auto;margin-left: 5px;text-align: right;}\n .e-rte-image.e-imgleft, .e-rte-video.e-video-left {float: left;margin: 0 auto;margin-right: 5px;text-align: left;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft, .e-video-left {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright, .e-video-right {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter, .e-video-center {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline , .e-audio-inline, .e-video-inline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak, .e-audio-break, .e-video-break {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize), .e-audio-focus:not(.e-resize), .e-video-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection, audio.e-audio-focus::selection, .e-video-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize, .e-rte-content .e-content video.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; padding: 2px 5px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n .e-rte-placeholder::before { content: attr(placeholder); opacity: 0.54; overflow: hidden; padding-top: 16px; position: absolute; text-align: start; top: 0; z-index: 1; }\n </style>\n </head>"+i,s=this.parent.createElement("iframe",{id:this.parent.getID()+"_rte-view",className:"e-rte-content",styles:"display:block;",attrs:{srcdoc:r}});this.setPanel(s),e.element.appendChild(s),s.contentDocument.body.id=this.parent.getID()+"_rte-edit-view",s.contentDocument.body.setAttribute("aria-owns",this.parent.getID()),s.contentDocument.open(),r=this.setThemeColor(r,{color:"#333"}),s.contentDocument.write(r),s.contentDocument.close(),e.enableRtl&&this.contentPanel.contentDocument.body.setAttribute("class","e-rtl")},t.prototype.setThemeColor=function(e,t){var n=getComputedStyle(this.parent.element,".e-richtexteditor").getPropertyValue("color");return e.replace(t.color,n)},t.prototype.getEditPanel=function(){return n.i(r.isNullOrUndefined)(this.contentPanel.contentDocument)?this.parent.inputElement:this.contentPanel.contentDocument.body},t.prototype.getDocument=function(){return this.getEditPanel().ownerDocument},t}(i.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(e){this.parent=e}return e.prototype.renderPanel=function(){var e=this.parent,t=this.parent.createElement("div",{id:this.parent.getID()+"_view",className:"e-rte-content"});this.editableElement=this.parent.createElement("textarea",{className:"e-content",id:this.parent.getID()+"_editable-content",attrs:{"aria-labelledby":this.parent.getID()+"_view"}}),t.appendChild(this.editableElement),this.setPanel(t),e.element.appendChild(t)},e.prototype.getPanel=function(){return this.contentPanel},e.prototype.getEditPanel=function(){return this.editableElement},e.prototype.getText=function(){return this.getEditPanel().value},e.prototype.setPanel=function(e){this.contentPanel=e},e.prototype.getDocument=function(){return this.getEditPanel().ownerDocument},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(9),r=(n.n(i),n(2)),o=n(1),s=function(){function e(e){this.parent=e}return e.prototype.quickToolbarOpen=function(){var e=this.popupObj;this.parent.trigger(o._53,e)},e.prototype.renderPopup=function(e){this.setPanel(e.element),this.renderPanel(),e.popupObj=new i.Popup(e.element,{targetType:"relative",relateTo:this.parent.element,open:this.quickToolbarOpen.bind(this)}),this.popupObj=e.popupObj,e.popupObj.hide()},e.prototype.renderPanel=function(){this.getPanel().classList.add(r.s)},e.prototype.getPanel=function(){return this.popupPanel},e.prototype.setPanel=function(e){this.popupPanel=e},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(5),r=n(1),o=n(0),s=(n.n(o),function(){function e(e,t){this.parent=e,this.locator=t,this.renderer=this.locator.getService("rendererFactory"),this.addEventListener()}return e.prototype.render=function(){this.parent;this.contentRenderer=this.renderer.getRenderer(i.a.Content),this.contentRenderer.renderPanel()},e.prototype.refresh=function(e){void 0===e&&(e={requestType:"refresh"}),this.parent.notify(e.requestType+"-begin",e)},e.prototype.destroy=function(){n.i(o.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.s,this.refresh,this),this.parent.on(r.u,this.keyUp,this),this.parent.on(r._44,this.moduleDestroy,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.s,this.refresh),this.parent.off(r.u,this.keyUp),this.parent.off(r._44,this.moduleDestroy))},e.prototype.keyUp=function(e){if("HTML"===this.parent.editorMode)switch(e.args.which){case 46:case 8:var t=this.parent.contentModule.getEditPanel().childNodes;if(0===t.length||1===t.length&&0===t[0].childNodes.length&&("BR"===t[0].tagName||("P"===t[0].tagName||"DIV"===t[0].tagName)&&""===t[0].textContent)){var n=this.parent.contentModule.getEditPanel();"DIV"===this.parent.enterKey?n.innerHTML="<div><br/></div>":"BR"===this.parent.enterKey?n.innerHTML="<br/>":n.innerHTML="<p><br/></p>",this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),n.childNodes[0],0)}}},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(0),r=(n.n(i),n(81)),o=(n.n(r),n(116)),s=(n.n(o),n(9)),a=(n.n(s),n(2)),l=n(1),d=n(14),c=(n.n(d),n(4)),u=function(){function e(e,t){this.parent=e,t&&(this.l10n=t.getService("rteLocale")),this.wireEvent()}return e.prototype.wireEvent=function(){this.parent.on(l.i,this.unWireEvent,this),this.parent.on(l._93,this.destroyTooltip,this)},e.prototype.destroyTooltip=function(){var e=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().ownerDocument:this.parent.contentModule.getDocument();if(!n.i(i.isNullOrUndefined)(e.querySelector(".e-tooltip-wrap"))&&!n.i(i.isNullOrUndefined)(e.querySelector("[data-tooltip-id]"))){var t=e.querySelector("[data-tooltip-id]"),r=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});t.dispatchEvent(r)}},e.prototype.unWireEvent=function(){this.parent.off(l.i,this.unWireEvent)},e.prototype.toolbarBeforeCreate=function(e){"Extended"===this.mode&&(e.enableCollision=!1)},e.prototype.toolbarCreated=function(){this.parent.notify(l.x,this)},e.prototype.toolbarClicked=function(e){this.parent.enabled&&(this.parent.trigger("toolbarClick",e),this.parent.readonly&&!n.i(i.isNullOrUndefined)(e.item)||this.parent.notify(l.j,e))},e.prototype.dropDownSelected=function(e){this.parent.notify(l.B,e)},e.prototype.beforeDropDownItemRender=function(e){!this.parent.readonly&&this.parent.enabled&&this.parent.notify(l.C,e)},e.prototype.tooltipBeforeRender=function(e){if(!n.i(i.isNullOrUndefined)(e.target.getAttribute("title"))){var t=e.target.getAttribute("title"),r=void 0;switch(t){case"Minimize":r=this.l10n.getConstant("minimize"),e.target.setAttribute("title",r+" (Esc)");break;case"Maximize":r=this.l10n.getConstant("maximize"),e.target.setAttribute("title",r+" (Ctrl+Shift+F)")}}},e.prototype.dropDownOpen=function(e){if(e.element.parentElement.getAttribute("id").indexOf("TableCell")>-1&&!n.i(i.isNullOrUndefined)(e.element.parentElement.querySelector(".e-cell-merge"))&&(!n.i(i.isNullOrUndefined)(e.element.parentElement.querySelector(".e-cell-horizontal-split"))||!n.i(i.isNullOrUndefined)(e.element.parentElement.querySelector(".e-cell-vertical-split")))){var t=e.element.querySelectorAll("li");1===this.parent.inputElement.querySelectorAll(".e-cell-select").length?(n.i(i.addClass)([t[0]],"e-disabled"),n.i(i.removeClass)([t[1],t[2]],"e-disabled")):this.parent.inputElement.querySelectorAll(".e-cell-select").length>1&&(n.i(i.removeClass)([t[0]],"e-disabled"),n.i(i.addClass)([t[1],t[2]],"e-disabled"))}this.parent.notify(l._18,e)},e.prototype.dropDownClose=function(e){this.parent.notify(l._19,e)},e.prototype.renderToolbar=function(e){this.setPanel(e.target),this.renderPanel(),this.mode=e.overflowMode,e.rteToolbarObj.toolbarObj=new r.Toolbar({items:e.items,width:"100%",overflowMode:e.overflowMode,beforeCreate:this.toolbarBeforeCreate.bind(this),created:this.toolbarCreated.bind(this),clicked:this.toolbarClicked.bind(this),enablePersistence:e.enablePersistence,enableRtl:e.enableRtl,cssClass:e.cssClass}),e.rteToolbarObj.toolbarObj.isStringTemplate=!0,e.rteToolbarObj.toolbarObj.createElement=this.parent.createElement,e.rteToolbarObj.toolbarObj.appendTo(e.target),this.parent.showTooltip&&(this.tooltip=new s.Tooltip({target:"#"+this.parent.getID()+"_toolbar_wrapper [title]",showTipPointer:!0,openDelay:400,opensOn:"Hover",beforeRender:this.tooltipBeforeRender.bind(this),cssClass:this.parent.getCssClass(),windowCollision:!0,position:"BottomCenter"}),this.tooltip.appendTo(e.target))},e.prototype.renderDropDownButton=function(e){var t,r=this;e.element.classList.add(a.B),t=e.cssClass+" "+a._12+" "+a._13,this.parent.inlineMode.enable&&i.Browser.isDevice&&(t=t+" "+a.x);var s=this,d=new o.DropDownButton({items:e.items,iconCss:e.iconCss,cssClass:t,content:e.content,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,select:this.dropDownSelected.bind(this),beforeOpen:function(e){if(s.parent.readonly||!s.parent.enabled)return void(e.cancel=!0);if("Markdown"!==s.parent.editorMode){var t=s.parent.getRange().startContainer.parentElement,o=t.closest("table"),a=t.closest("tr");if(!n.i(i.isNullOrUndefined)(o)&&o.classList.contains("e-dashed-border"))for(var c=0;c<e.element.childNodes.length;c++)e.element.childNodes[c].classList.contains("e-dashed-borders")&&n.i(i.addClass)([e.element.childNodes[c]],"e-active");else if(!n.i(i.isNullOrUndefined)(o)&&!o.classList.contains("e-dashed-border")&&o.classList.contains("e-alternate-rows")&&""!==window.getComputedStyle(a).backgroundColor)for(var c=0;c<e.element.childNodes.length;c++)e.element.childNodes[c].classList.contains("e-alternate-rows")&&n.i(i.addClass)([e.element.childNodes[c]],"e-active");for(var u=s.parent.getRange().startContainer;u!==s.parent.inputElement&&!n.i(i.isNullOrUndefined)(u.parentElement);){"#text"===u.nodeName&&(u=u.parentElement);var h=window.getComputedStyle(u).textAlign;if("Alignments"===e.items[0].command){if("Align Left"===e.items[0].text&&"left"===h||"start"===h){n.i(i.addClass)([e.element.childNodes[0]],"e-active");break}if("Align Center"===e.items[1].text&&"center"===h){n.i(i.addClass)([e.element.childNodes[1]],"e-active");break}if("Align Right"===e.items[2].text&&"right"===h){n.i(i.addClass)([e.element.childNodes[2]],"e-active");break}if("Align Justify"===e.items[3].text&&"justify"===h){n.i(i.addClass)([e.element.childNodes[3]],"e-active");break}}u=u.parentElement}var p=t.closest("img"),m=p||t.querySelector("img");if("Images"===e.items[0].command&&!n.i(i.isNullOrUndefined)(m)){var c=void 0;m.classList.contains("e-imgleft")||m.classList.contains("e-imginline")?c=0:m.classList.contains("e-imgcenter")||m.classList.contains("e-imgbreak")?c=1:m.classList.contains("e-imgright")&&(c=2),n.i(i.isNullOrUndefined)(e.element.childNodes[c])||n.i(i.addClass)([e.element.childNodes[c]],"e-active")}if("Formats"===e.items[0].command)for(var c=0;c<e.element.childNodes.length;c++){var f=r.parent.createElement("div");f.innerHTML=d.content.trim(),""!==f.textContent.trim()&&e.element.childNodes[c].textContent.trim()===f.textContent.trim()?e.element.childNodes[c].classList.contains("e-active")||n.i(i.addClass)([e.element.childNodes[c]],"e-active"):n.i(i.removeClass)([e.element.childNodes[c]],"e-active")}}s.parent.notify(l._17,e)},close:this.dropDownClose.bind(this),open:this.dropDownOpen.bind(this),beforeItemRender:this.beforeDropDownItemRender.bind(this)});return d.isStringTemplate=!0,d.createElement=s.parent.createElement,d.appendTo(e.element),e.element.tabIndex=-1,document.getElementById(d.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),d},e.prototype.renderListDropDown=function(e){var t=this,n=a._12+" "+a._13+(this.parent.inlineMode?" "+a.x:"");n+=" "+("NumberFormatList"===e.itemName?a._17:a._18);var i=t.parent.createElement("span",{className:a._16}),r=t.parent.createElement("span",{className:e.cssClass});i.appendChild(r);var s=new o.DropDownButton({items:e.items,cssClass:n,content:e.content,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,select:this.dropDownSelected.bind(this),beforeOpen:function(e){if(t.parent.readonly||!t.parent.enabled)return void(e.cancel=!0);t.parent.notify(l._19,{});var n=e.event?e.event.target:null;if(t.currentElement=s.element,t.currentDropdown=s,e.event&&"click"===e.event.type&&(n.classList.contains(a._16)||n.parentElement.classList.contains(a._16)))return void(e.cancel=!0);t.parent.notify(l._17,e)},close:this.dropDownClose.bind(this),open:this.dropDownOpen.bind(this),beforeItemRender:this.beforeDropDownItemRender.bind(this)});return s.isStringTemplate=!0,s.createElement=t.parent.createElement,s.appendTo(e.element),e.element.tabIndex=-1,e.element.setAttribute("role","button"),document.getElementById(s.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),1===e.element.childElementCount&&s.element.insertBefore(i,s.element.querySelector(".e-caret")),e.element.tabIndex=-1,s.element.removeAttribute("type"),s.element.onmousedown=function(){t.parent.notify(l._18,{})},s.element.onkeydown=function(){t.parent.notify(l._18,{})},s},e.prototype.paletteSelection=function(e,t){var r=e.element.querySelector(".e-control.e-colorpicker"),o=[].slice.call(n.i(i.selectAll)(".e-tile",r.parentElement));n.i(i.removeClass)(o,"e-selected");var s=t.querySelector("."+a._12).style.borderBottomColor;o.filter(function(e){e.style.backgroundColor===s&&n.i(i.addClass)([e],"e-selected")})},e.prototype.renderColorPickerDropDown=function(e,t,r,s){var u=this,h=this,p=a._12+" "+a._13+(this.parent.inlineMode?" "+a.x:"");p+=" "+("backgroundcolor"===t?a._27:a._26),p+=this.parent.getCssClass(!0);var m,f=h.parent.createElement("span",{className:a._25}),g=h.parent.createElement("span",{className:e.cssClass}),b=n.i(i.isNullOrUndefined)(s)?h.parent.backgroundColor.default:s;g.style.borderBottomColor="backgroundcolor"===t?b:h.parent.fontColor.default,f.appendChild(g);var v=new o.DropDownButton({target:r.element.parentElement,cssClass:p,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,beforeOpen:function(t){if(r.inline=!0,r.dataBind(),h.parent.readonly||!h.parent.enabled)return void(t.cancel=!0);var o=t.event?t.event.target:null;if(h.currentElement=v.element,h.currentDropdown=v,h.paletteSelection(t,h.currentElement),t.event&&"click"===t.event.type&&(o.classList.contains(a._25)||o.parentElement.classList.contains(a._25))){t.cancel=!0;var s=o.classList.contains(a._12)?o.style.borderBottomColor:o.querySelector("."+a._12).style.borderBottomColor;h.parent.notify(l._19,{}),m=h.parent.formatter.editorManager.nodeSelection.getRange(h.parent.contentModule.getDocument());var u=m.startContainer.parentNode,p=n.i(i.closest)(m.startContainer.parentNode,"table");return void(("TD"===m.startContainer.nodeName||"TH"===m.startContainer.nodeName||n.i(i.closest)(m.startContainer.parentNode,"td,th")||h.parent.iframeSettings.enable&&!n.i(c.b)(u.ownerDocument.querySelector("body"),"e-lib"))&&m.collapsed&&"BackgroundColor"===e.subCommand&&n.i(i.closest)(p,"."+a.a)?h.parent.notify(l._30,{item:{command:e.command,subCommand:e.subCommand,value:s}}):h.parent.notify(l._29,{item:{command:e.command,subCommand:e.subCommand,value:s}}))}var f=t.element.querySelector(".e-control.e-colorpicker"),g=n.i(i.getInstance)(f,d.ColorPicker);g.showButtons=!t.element.querySelector(".e-color-palette"),g.dataBind(),t.element.onclick=function(e){e.target.classList.contains("e-cancel")&&v.toggle()}},open:function(e){u.setColorPickerContentWidth(r);var t,n=e.element.querySelector(".e-control.e-colorpicker");t=e.element.querySelector(".e-color-palette")?n.parentElement.querySelector(".e-palette"):n.parentElement.querySelector("e-handler"),t&&t.focus(),u.pickerRefresh(e)},beforeClose:function(t){var r=t.event?t.event.target:null;if(t.event&&"click"===t.event.type&&(r.classList.contains(a._25)||r.parentElement.classList.contains(a._25))){var o=r.classList.contains(a._12)?r.style.borderBottomColor:r.querySelector("."+a._12).style.borderBottomColor;return m=h.parent.formatter.editorManager.nodeSelection.getRange(h.parent.contentModule.getDocument()),void(("TD"===m.startContainer.nodeName||"TH"===m.startContainer.nodeName||n.i(i.closest)(m.startContainer.parentNode,"td,th"))&&m.collapsed?h.parent.notify(l._30,{item:{command:e.command,subCommand:e.subCommand,value:o}}):h.parent.notify(l._29,{item:{command:e.command,subCommand:e.subCommand,value:o}}))}},close:function(e){h.parent.notify(l._19,{})}});return v.isStringTemplate=!0,v.createElement=h.parent.createElement,e.element.setAttribute("role","button"),v.appendTo(e.element),document.getElementById(v.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),v.element.insertBefore(f,v.element.querySelector(".e-caret")),e.element.tabIndex=-1,v.element.removeAttribute("type"),v.element.onmousedown=function(){h.parent.notify(l._18,{})},v.element.onkeydown=function(){h.parent.notify(l._18,{})},v},e.prototype.pickerRefresh=function(e){if("Picker"===this.parent.backgroundColor.mode){var t=e.element.parentElement;t.style.width=(t.offsetWidth+5).toString()+"px",n.i(i.getInstance)(t,s.Popup).refreshPosition(t),t.style.width=(t.offsetWidth-5).toString()+"px"}},e.prototype.setColorPickerContentWidth=function(e){var t=e.element.nextSibling;if("0px"===t.style.width){t.style.width="";var r=parseInt(getComputedStyle(t).borderBottomWidth,10);t.style.width=n.i(i.formatUnit)(t.children[0].offsetWidth+r+r)}},e.prototype.renderColorPicker=function(e,t){var r,o=this,s=this,c=new d.ColorPicker({enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,inline:!1,value:"#fff",created:function(){var e="backgroundcolor"===t?s.parent.backgroundColor.default:s.parent.fontColor.default;c.setProperties({value:e})},mode:"backgroundcolor"===t?s.parent.backgroundColor.mode:s.parent.fontColor.mode,modeSwitcher:"backgroundcolor"===t?s.parent.backgroundColor.modeSwitcher:s.parent.fontColor.modeSwitcher,beforeTileRender:function(e){if(e.element.classList.add(a._28),e.element.classList.add(a._61),!n.i(i.isNullOrUndefined)(o.parent.cssClass))for(var t=o.parent.getCssClass().split(" "),r=0;r<t.length;r++)""!==t[r].trim()&&e.element.classList.add(t[r]);""===e.value&&e.element.classList.add(a._62)},change:function(t){var r=t.currentValue.rgba;t.item={command:e.command,subCommand:e.subCommand,value:r},s.parent.notify(l._19,{}),s.currentElement.querySelector("."+a._12).style.borderBottomColor=r;var o=s.parent.formatter.editorManager.nodeSelection.getRange(s.parent.contentModule.getDocument()),d=n.i(i.closest)(o.startContainer.parentNode,"table");("TD"===o.startContainer.nodeName||"TH"===o.startContainer.nodeName||"BODY"===o.startContainer.nodeName||n.i(i.closest)(o.startContainer.parentNode,"td,th"))&&o.collapsed&&"BackgroundColor"===e.subCommand&&n.i(i.closest)(d,"."+a.a)?s.parent.notify(l._30,t):s.parent.notify(l._29,t),s.currentDropdown.toggle()},beforeModeSwitch:function(e){r=c.value,""===r&&c.setProperties({value:"Picker"===e.mode?"#008000ff":""},!0),c.showButtons="Palette"!==e.mode}});return c.isStringTemplate=!0,c.columns="backgroundcolor"===t?this.parent.backgroundColor.columns:this.parent.fontColor.columns,c.presetColors="backgroundcolor"===t?this.parent.backgroundColor.colorCode:this.parent.fontColor.colorCode,c.cssClass=("backgroundcolor"===t?a._30:a._29)+" "+e.cssClass,c.createElement=this.parent.createElement,c.appendTo(document.getElementById(e.target)),c},e.prototype.renderPanel=function(){this.getPanel().classList.add(a.g)},e.prototype.getPanel=function(){return this.toolbarPanel},e.prototype.setPanel=function(e){this.toolbarPanel=e},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(3),a=n(5),l=n(28),d=function(){function e(e,t){this.parent=e;var n=t;this.rendererFactory=n.getService("rendererFactory"),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(r._14,this.sourceCode,this),this.parent.on(r.g,this.onInitialEnd,this),this.parent.on(r._15,this.updateSourceCode,this),this.parent.on(r.i,this.destroy,this),this.parent.on(r._44,this.moduleDestroy,this)},e.prototype.onInitialEnd=function(){this.parent.formatter.editorManager.observer.on(s.d,this.onKeyDown,this)},e.prototype.removeEventListener=function(){this.unWireEvent(),this.parent.off(r._14,this.sourceCode),this.parent.off(r._15,this.updateSourceCode),this.parent.off(r.g,this.onInitialEnd),this.parent.off(r.i,this.destroy),this.parent.off(r._44,this.moduleDestroy),this.parent.formatter.editorManager.observer.off(s.d,this.onKeyDown)},e.prototype.getSourceCode=function(){return this.parent.createElement("textarea",{className:o._69+this.parent.getCssClass(!0)})},e.prototype.wireEvent=function(e){this.keyboardModule=new l.a(e,{keyAction:this.previewKeyDown.bind(this),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"}),i.EventHandler.add(this.previewElement,"mousedown",this.mouseDownHandler,this)},e.prototype.unWireEvent=function(){this.keyboardModule&&this.keyboardModule.destroy(),this.previewElement&&i.EventHandler.remove(this.previewElement,"mousedown",this.mouseDownHandler)},e.prototype.wireBaseKeyDown=function(){this.parent.keyboardModule=new l.a(this.contentModule.getEditPanel(),{keyAction:this.parent.keyDown.bind(this.parent),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"})},e.prototype.unWireBaseKeyDown=function(){this.parent.keyboardModule.destroy()},e.prototype.mouseDownHandler=function(e){this.parent.notify(r._25,{args:e})},e.prototype.previewKeyDown=function(e){switch(e.action){case"html-source":this.updateSourceCode(e),e.preventDefault();break;case"toolbar-focus":if(this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()){var t=this.parent.getToolbarElement().querySelector(".e-toolbar-item:not(.e-overlay)[title]");t.firstElementChild.removeAttribute("tabindex"),t.firstElementChild.focus()}}},e.prototype.onKeyDown=function(e){switch(e.event.action){case"html-source":e.event.preventDefault(),this.sourceCode(e),e.callBack({requestType:"SourceCode",editorMode:"HTML",event:e.event})}},e.prototype.sourceCode=function(e){this.parent.notify(r._94,{}),this.parent.isBlur=!1,this.parent.trigger(r.S,{requestType:"SourceCode",targetItem:"SourceCode",args:e});var t=n.i(i.selectAll)("."+o.D,this.parent.element);if(this.contentModule=this.rendererFactory.getRenderer(a.a.Content),this.parent.notify(r.W,{targetItem:"SourceCode",updateItem:"Preview",baseToolbar:this.parent.getBaseToolbarObject()}),n.i(i.isNullOrUndefined)(this.previewElement)&&(this.previewElement=this.getSourceCode()),this.parent.updateValueData(),this.parent.iframeSettings.enable){var s=void 0;s=n.i(i.isNullOrUndefined)(this.parent.element.querySelector("#"+this.parent.getID()+"_source-view"))?this.parent.createElement("div",{className:"e-source-content",id:this.parent.getID()+"_source-view"}):this.parent.element.querySelector("#"+this.parent.getID()+"_source-view"),s.appendChild(this.previewElement),this.parent.element.appendChild(s),s.style.height=this.contentModule.getPanel().style.height,s.style.marginTop=this.contentModule.getPanel().style.marginTop,this.getPanel().value=this.getTextAreaValue(),this.contentModule.getPanel().style.display="none",s.style.display="block",this.getPanel().style.display="block"}else{var l=this.parent.inputElement.offsetHeight;this.contentModule.getPanel().appendChild(this.previewElement),this.getPanel().value=this.getTextAreaValue(),this.previewElement.style.height=l+"px",this.contentModule.getEditPanel().style.display="none",this.previewElement.style.display="block"}if(this.parent.isBlur=!1,this.parent.disableToolbarItem(this.parent.toolbarSettings.items),this.parent.enableToolbarItem("SourceCode"),this.parent.getToolbar()&&n.i(i.removeClass)([this.parent.getToolbar()],[o._11]),n.i(i.removeClass)(t,[o._10]),this.parent.setContentHeight("sourceCode",!0),this.wireEvent(this.previewElement),this.unWireBaseKeyDown(),this.previewElement.focus(),this.parent.updateValue(),!n.i(i.isNullOrUndefined)(this.parent.placeholder)&&!this.parent.iframeSettings.enable){this.parent.element.querySelector(".rte-placeholder.e-rte-placeholder").style.display="none"}this.parent.trigger(r.T,{requestType:"SourceCode",targetItem:"SourceCode",args:e}),this.parent.invokeChangeEvent()},e.prototype.updateSourceCode=function(e){this.parent.isBlur=!1,this.parent.trigger(r.S,{requestType:"Preview",targetItem:"Preview",args:e});var t=this.getPanel();this.parent.notify(r.W,{targetItem:"Preview",updateItem:"SourceCode",baseToolbar:this.parent.getBaseToolbarObject()});var s,a=this.parent.serializeValue(t.value);if(s=null===a||""===a?"DIV"===this.parent.enterKey?"<div><br/></div>":"BR"===this.parent.enterKey?"<br/>":"<p><br/></p>":a,this.parent.iframeSettings.enable?(t.parentElement.style.display="none",t.style.display="none",this.contentModule.getPanel().style.display="block",this.contentModule.getEditPanel().innerHTML=s):(t.style.display="none",this.contentModule.getEditPanel().style.display="block",this.contentModule.getEditPanel().innerHTML=s),this.parent.isBlur=!1,this.parent.enableToolbarItem(this.parent.toolbarSettings.items),this.parent.getToolbar()&&n.i(i.removeClass)([this.parent.getToolbar()],[o._11]),this.parent.setContentHeight("preview",!0),this.unWireEvent(),this.wireBaseKeyDown(),this.contentModule.getEditPanel().focus(),this.parent.updateValue(),!n.i(i.isNullOrUndefined)(this.parent.placeholder)&&0===this.contentModule.getEditPanel().innerText.length){this.parent.element.querySelector(".rte-placeholder.e-rte-placeholder").style.display="block"}this.parent.trigger(r.T,{requestType:"Preview",targetItem:"Preview",args:e}),this.parent.formatter.enableUndo(this.parent),this.parent.addAudioVideoWrapper(),this.parent.invokeChangeEvent(),this.parent.notify(r.c,{})},e.prototype.getTextAreaValue=function(){return"<p><br></p>"===this.contentModule.getEditPanel().innerHTML||"<div><br></div>"===this.contentModule.getEditPanel().innerHTML||"<br>"===this.contentModule.getEditPanel().innerHTML||1===this.contentModule.getEditPanel().childNodes.length&&"P"===this.contentModule.getEditPanel().childNodes[0].tagName&&7===this.contentModule.getEditPanel().innerHTML.length||"DIV"===this.contentModule.getEditPanel().childNodes[0].tagName&&11===this.contentModule.getEditPanel().innerHTML.length?"":this.parent.value},e.prototype.getPanel=function(){return this.parent.element&&this.parent.element.querySelector(".e-rte-srctextarea")},e.prototype.getViewPanel=function(){return this.parent.iframeSettings.enable&&this.getPanel()?this.getPanel().parentElement:this.getPanel()},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null},e}()},function(e,t){e.exports=o},function(e,t,n){"use strict";var i=n(15);n.d(t,"a",function(){return i.a}),n.d(t,"b",function(){return i.b}),n.d(t,"c",function(){return i.c}),n.d(t,"d",function(){return i.d}),n.d(t,"e",function(){return i.e}),n.d(t,"f",function(){return i.f}),n.d(t,"g",function(){return i.g}),n.d(t,"h",function(){return i.h});var r=n(3);n.d(t,"i",function(){return r.a}),n.d(t,"j",function(){return r.b}),n.d(t,"k",function(){return r.c}),n.d(t,"l",function(){return r.d}),n.d(t,"m",function(){return r.e}),n.d(t,"n",function(){return r.f}),n.d(t,"o",function(){return r.g}),n.d(t,"p",function(){return r.h}),n.d(t,"q",function(){return r.i}),n.d(t,"r",function(){return r.j}),n.d(t,"s",function(){return r.k}),n.d(t,"t",function(){return r.l}),n.d(t,"u",function(){return r.m}),n.d(t,"v",function(){return r.n}),n.d(t,"w",function(){return r.o})},function(e,t,n){"use strict";var i=n(86);n.d(t,"a",function(){return i.a}),n.d(t,"b",function(){return i.b}),n.d(t,"c",function(){return i.c}),n.d(t,"d",function(){return i.d}),n.d(t,"e",function(){return i.e}),n.d(t,"f",function(){return i.f}),n.d(t,"g",function(){return i.g}),n.d(t,"h",function(){return i.h}),n.d(t,"i",function(){return i.i}),n.d(t,"j",function(){return i.j}),n.d(t,"k",function(){return i.k}),n.d(t,"l",function(){return i.l}),n.d(t,"m",function(){return i.m}),n.d(t,"n",function(){return i.n}),n.d(t,"o",function(){return i.o}),n.d(t,"p",function(){return i.p}),n.d(t,"q",function(){return i.q}),n.d(t,"r",function(){return i.r}),n.d(t,"s",function(){return i.s}),n.d(t,"t",function(){return i.t}),n.d(t,"u",function(){return i.u}),n.d(t,"v",function(){return i.v}),n.d(t,"w",function(){return i.w}),n.d(t,"x",function(){return i.x}),n.d(t,"y",function(){return i.y}),n.d(t,"z",function(){return i.z}),n.d(t,"A",function(){return i.A}),n.d(t,"B",function(){return i.B}),n.d(t,"C",function(){return i.C}),n.d(t,"D",function(){return i.D}),n.d(t,"E",function(){return i.E}),n.d(t,"F",function(){return i.F}),n.d(t,"G",function(){return i.G}),n.d(t,"H",function(){return i.H}),n.d(t,"I",function(){return i.I}),n.d(t,"J",function(){return i.J}),n.d(t,"K",function(){return i.K}),n.d(t,"L",function(){return i.L}),n.d(t,"M",function(){return i.M}),n.d(t,"N",function(){return i.N}),n.d(t,"O",function(){return i.O}),n.d(t,"P",function(){return i.P}),n.d(t,"Q",function(){return i.Q}),n.d(t,"R",function(){return i.R}),n.d(t,"S",function(){return i.S}),n.d(t,"T",function(){return i.T}),n.d(t,"U",function(){return i.U}),n.d(t,"V",function(){return i.V}),n.d(t,"W",function(){return i.W}),n.d(t,"X",function(){return i.X}),n.d(t,"Y",function(){return i.Y}),n.d(t,"Z",function(){return i.Z});var r=n(34);n.d(t,"_0",function(){return r.a}),n.d(t,"_1",function(){return r.b}),n.d(t,"_2",function(){return r.c}),n.d(t,"_3",function(){return r.d}),n.d(t,"_4",function(){return r.e}),n.d(t,"_5",function(){return r.f}),n.d(t,"_6",function(){return r.g}),n.d(t,"_7",function(){return r.h}),n.d(t,"_8",function(){return r.i}),n.d(t,"_9",function(){return r.j}),n.d(t,"_10",function(){return r.k}),n.d(t,"_11",function(){return r.l}),n.d(t,"_12",function(){return r.m}),n.d(t,"_13",function(){return r.n}),n.d(t,"_14",function(){return r.o}),n.d(t,"_15",function(){return r.p}),n.d(t,"_16",function(){return r.q}),n.d(t,"_17",function(){return r.r}),n.d(t,"_18",function(){return r.s}),n.d(t,"_19",function(){return r.t}),n.d(t,"_20",function(){return r.u}),n.d(t,"_21",function(){return r.v}),n.d(t,"_22",function(){return r.w}),n.d(t,"_23",function(){return r.x}),n.d(t,"_24",function(){return r.y}),n.d(t,"_25",function(){return r.z})},function(e,t,n){"use strict";var i=n(89);n.d(t,"a",function(){return i.a}),n.d(t,"b",function(){return i.b}),n.d(t,"c",function(){return i.c}),n.d(t,"d",function(){return i.d}),n.d(t,"e",function(){return i.e}),n.d(t,"f",function(){return i.f}),n.d(t,"g",function(){return i.g});var r=n(90);n.d(t,"h",function(){return r.a}),n.d(t,"i",function(){return r.b}),n.d(t,"j",function(){return r.c}),n.d(t,"k",function(){return r.d}),n.d(t,"l",function(){return r.e}),n.d(t,"m",function(){return r.f}),n.d(t,"n",function(){return r.g}),n.d(t,"o",function(){return r.h})},function(e,t,n){"use strict";var i=n(92);n.d(t,"a",function(){return i.a}),n.d(t,"b",function(){return i.b}),n.d(t,"c",function(){return i.c}),n.d(t,"d",function(){return i.d}),n.d(t,"e",function(){return i.e}),n.d(t,"f",function(){return i.f}),n.d(t,"g",function(){return i.g}),n.d(t,"h",function(){return i.h}),n.d(t,"i",function(){return i.i}),n.d(t,"j",function(){return i.j}),n.d(t,"k",function(){return i.k}),n.d(t,"l",function(){return i.l}),n.d(t,"m",function(){return i.m}),n.d(t,"n",function(){return i.n}),n.d(t,"o",function(){return i.o}),n.d(t,"p",function(){return i.p}),n.d(t,"q",function(){return i.q}),n.d(t,"r",function(){return i.r}),n.d(t,"s",function(){return i.s}),n.d(t,"t",function(){return i.t}),n.d(t,"u",function(){return i.u}),n.d(t,"v",function(){return i.v});var r=n(106);n.d(t,"w",function(){return r.a}),n.d(t,"x",function(){return r.b}),n.d(t,"y",function(){return r.c});var o=n(109);n.d(t,"z",function(){return o.a}),n.d(t,"A",function(){return o.b}),n.d(t,"B",function(){return o.c}),n.d(t,"C",function(){return o.d}),n.d(t,"D",function(){return o.e}),n.d(t,"E",function(){return o.f}),n.d(t,"F",function(){return o.g}),n.d(t,"G",function(){return o.h}),n.d(t,"H",function(){return o.i}),n.d(t,"I",function(){return o.j}),n.d(t,"J",function(){return o.k}),n.d(t,"K",function(){return o.l}),n.d(t,"L",function(){return o.m});var s=n(104);n.d(t,"M",function(){return s.a}),n.d(t,"N",function(){return s.b}),n.d(t,"O",function(){return s.c}),n.d(t,"P",function(){return s.d}),n.d(t,"Q",function(){return s.e}),n.d(t,"R",function(){return s.f}),n.d(t,"S",function(){return s.g}),n.d(t,"T",function(){return s.h}),n.d(t,"U",function(){return s.i}),n.d(t,"V",function(){return s.j}),n.d(t,"W",function(){return s.k}),n.d(t,"X",function(){return s.l}),n.d(t,"Y",function(){return s.m}),n.d(t,"Z",function(){return s.n}),n.d(t,"_0",function(){return s.o}),n.d(t,"_1",function(){return s.p}),n.d(t,"_2",function(){return s.q}),n.d(t,"_3",function(){return s.r}),n.d(t,"_4",function(){return s.s}),n.d(t,"_5",function(){return s.t}),n.d(t,"_6",function(){return s.u}),n.d(t,"_7",function(){return s.v}),n.d(t,"_8",function(){return s.w}),n.d(t,"_9",function(){return s.x}),n.d(t,"_10",function(){return s.y}),n.d(t,"_11",function(){return s.z}),n.d(t,"_12",function(){return s.A}),n.d(t,"_13",function(){return s.B}),n.d(t,"_14",function(){return s.C}),n.d(t,"_15",function(){return s.D}),n.d(t,"_16",function(){return s.E}),n.d(t,"_17",function(){return s.F}),n.d(t,"_18",function(){return s.G}),n.d(t,"_19",function(){return s.H}),n.d(t,"_20",function(){return s.I}),n.d(t,"_21",function(){return s.J}),n.d(t,"_22",function(){return s.K}),n.d(t,"_23",function(){return s.L}),n.d(t,"_24",function(){return s.M}),n.d(t,"_25",function(){return s.N}),n.d(t,"_26",function(){return s.O}),n.d(t,"_27",function(){return s.P}),n.d(t,"_28",function(){return s.Q}),n.d(t,"_29",function(){return s.R}),n.d(t,"_30",function(){return s.S}),n.d(t,"_31",function(){return s.T}),n.d(t,"_32",function(){return s.U}),n.d(t,"_33",function(){return s.V}),n.d(t,"_34",function(){return s.W}),n.d(t,"_35",function(){return s.X}),n.d(t,"_36",function(){return s.Y}),n.d(t,"_37",function(){return s.Z}),n.d(t,"_38",function(){return s._0}),n.d(t,"_39",function(){return s._1}),n.d(t,"_40",function(){return s._2}),n.d(t,"_41",function(){return s._3}),n.d(t,"_42",function(){return s._4}),n.d(t,"_43",function(){return s._5}),n.d(t,"_44",function(){return s._6}),n.d(t,"_45",function(){return s._7}),n.d(t,"_46",function(){return s._8}),n.d(t,"_47",function(){return s._9}),n.d(t,"_48",function(){return s._10}),n.d(t,"_49",function(){return s._11}),n.d(t,"_50",function(){return s._12}),n.d(t,"_51",function(){return s._13}),n.d(t,"_52",function(){return s._14}),n.d(t,"_53",function(){return s._15}),n.d(t,"_54",function(){return s._16}),n.d(t,"_55",function(){return s._17}),n.d(t,"_56",function(){return s._18}),n.d(t,"_57",function(){return s._19}),n.d(t,"_58",function(){return s._20}),n.d(t,"_59",function(){return s._21}),n.d(t,"_60",function(){return s._22}),n.d(t,"_61",function(){return s._23}),n.d(t,"_62",function(){return s._24}),n.d(t,"_63",function(){return s._25}),n.d(t,"_64",function(){return s._26}),n.d(t,"_65",function(){return s._27}),n.d(t,"_66",function(){return s._28}),n.d(t,"_67",function(){return s._29}),n.d(t,"_68",function(){return s._30}),n.d(t,"_69",function(){return s._31}),n.d(t,"_70",function(){return s._32}),n.d(t,"_71",function(){return s._33}),n.d(t,"_72",function(){return s._34}),n.d(t,"_73",function(){return s._35}),n.d(t,"_74",function(){return s._36}),n.d(t,"_75",function(){return s._37}),n.d(t,"_76",function(){return s._38}),n.d(t,"_77",function(){return s._39}),n.d(t,"_78",function(){return s._40}),n.d(t,"_79",function(){return s._41}),n.d(t,"_80",function(){return s._42}),n.d(t,"_81",function(){return s._43}),n.d(t,"_82",function(){return s._44}),n.d(t,"_83",function(){return s._45}),n.d(t,"_84",function(){return s._46}),n.d(t,"_85",function(){return s._47}),n.d(t,"_86",function(){return s._48}),n.d(t,"_87",function(){return s._49}),n.d(t,"_88",function(){return s._50}),n.d(t,"_89",function(){return s._51}),n.d(t,"_90",function(){return s._52}),n.d(t,"_91",function(){return s._53}),n.d(t,"_92",function(){return s._54}),n.d(t,"_93",function(){return s._55}),n.d(t,"_94",function(){return s._56}),n.d(t,"_95",function(){return s._57}),n.d(t,"_96",function(){return s._58}),n.d(t,"_97",function(){return s._59}),n.d(t,"_98",function(){return s._60}),n.d(t,"_99",function(){return s._61}),n.d(t,"_100",function(){return s._62}),n.d(t,"_101",function(){return s._63}),n.d(t,"_102",function(){return s._64}),n.d(t,"_103",function(){return s._65}),n.d(t,"_104",function(){return s._66}),n.d(t,"_105",function(){return s._67}),n.d(t,"_106",function(){return s._68}),n.d(t,"_107",function(){return s._69}),n.d(t,"_108",function(){return s._70}),n.d(t,"_109",function(){return s._71}),n.d(t,"_110",function(){return s._72}),n.d(t,"_111",function(){return s._73}),n.d(t,"_112",function(){return s._74}),n.d(t,"_113",function(){return s._75}),n.d(t,"_114",function(){return s._76}),n.d(t,"_115",function(){return s._77}),n.d(t,"_116",function(){return s._78}),n.d(t,"_117",function(){return s._79}),n.d(t,"_118",function(){return s._80}),n.d(t,"_119",function(){return s._81}),n.d(t,"_120",function(){return s._82}),n.d(t,"_121",function(){return s._83}),n.d(t,"_122",function(){return s._84}),n.d(t,"_123",function(){return s._85}),n.d(t,"_124",function(){return s._86}),n.d(t,"_125",function(){return s._87}),n.d(t,"_126",function(){return s._88}),n.d(t,"_127",function(){return s._89}),n.d(t,"_128",function(){return s._90}),n.d(t,"_129",function(){return s._91}),n.d(t,"_130",function(){return s._92}),n.d(t,"_131",function(){return s._93}),n.d(t,"_132",function(){return s._94}),n.d(t,"_133",function(){return s._95}),n.d(t,"_134",function(){return s._96}),n.d(t,"_135",function(){return s._97}),n.d(t,"_136",function(){return s._98}),n.d(t,"_137",function(){return s._99}),n.d(t,"_138",function(){return s._100}),n.d(t,"_139",function(){return s._101}),n.d(t,"_140",function(){return s._102}),n.d(t,"_141",function(){return s._103}),n.d(t,"_142",function(){return s._104}),n.d(t,"_143",function(){return s._105}),n.d(t,"_144",function(){return s._106}),n.d(t,"_145",function(){return s._107}),n.d(t,"_146",function(){return s._108}),n.d(t,"_147",function(){return s._109}),n.d(t,"_148",function(){return s._110}),n.d(t,"_149",function(){return s._111}),n.d(t,"_150",function(){return s._112}),n.d(t,"_151",function(){return s._113}),n.d(t,"_152",function(){return s._114}),n.d(t,"_153",function(){return s._115}),n.d(t,"_154",function(){return s._116}),n.d(t,"_155",function(){return s._117}),n.d(t,"_156",function(){return s._118}),n.d(t,"_157",function(){return s._119}),n.d(t,"_158",function(){return s._120}),n.d(t,"_159",function(){return s._121}),n.d(t,"_160",function(){return s._122}),n.d(t,"_161",function(){return s._123}),n.d(t,"_162",function(){return s._124}),n.d(t,"_163",function(){return s._125}),n.d(t,"_164",function(){return s._126}),n.d(t,"_165",function(){return s._127}),n.d(t,"_166",function(){return s._128}),n.d(t,"_167",function(){return s._129}),n.d(t,"_168",function(){return s._130}),n.d(t,"_169",function(){return s._131}),n.d(t,"_170",function(){return s._132}),n.d(t,"_171",function(){return s._133}),n.d(t,"_172",function(){return s._134}),n.d(t,"_173",function(){return s._135}),n.d(t,"_174",function(){return s._136}),n.d(t,"_175",function(){return s._137}),n.d(t,"_176",function(){return s._138}),n.d(t,"_177",function(){return s._139}),n.d(t,"_178",function(){return s._140}),n.d(t,"_179",function(){return s._141}),n.d(t,"_180",function(){return s._142}),n.d(t,"_181",function(){return s._143}),n.d(t,"_182",function(){return s._144}),n.d(t,"_183",function(){return s._145}),n.d(t,"_184",function(){return s._146}),n.d(t,"_185",function(){return s._147});n.d(t,"_186",function(){return s._148}),n.d(t,"_187",function(){return s._149}),n.d(t,"_188",function(){return s._150}),n.d(t,"_189",function(){return s._151}),n.d(t,"_190",function(){return s._152}),n.d(t,"_191",function(){return s._153}),n.d(t,"_192",function(){return s._154}),n.d(t,"_193",function(){return s._155}),n.d(t,"_194",function(){return s._156}),n.d(t,"_195",function(){return s._157}),n.d(t,"_196",function(){return s._158}),n.d(t,"_197",function(){return s._159}),n.d(t,"_198",function(){return s._160}),n.d(t,"_199",function(){return s._161}),n.d(t,"_200",function(){return s._162}),n.d(t,"_201",function(){return s._163}),n.d(t,"_202",function(){return s._164}),n.d(t,"_203",function(){return s._165}),n.d(t,"_204",function(){return s._166}),n.d(t,"_205",function(){return s._167}),n.d(t,"_206",function(){return s._168}),n.d(t,"_207",function(){return s._169}),n.d(t,"_208",function(){return s._170}),n.d(t,"_209",function(){return s._171}),n.d(t,"_210",function(){return s._172}),n.d(t,"_211",function(){return s._173}),n.d(t,"_212",function(){return s._174}),n.d(t,"_213",function(){return s._175}),n.d(t,"_214",function(){return s._176}),n.d(t,"_215",function(){return s._177}),n.d(t,"_216",function(){return s._178}),n.d(t,"_217",function(){return s._179}),n.d(t,"_218",function(){return s._180}),n.d(t,"_219",function(){return s._181}),n.d(t,"_220",function(){return s._182}),n.d(t,"_221",function(){return s._183}),n.d(t,"_222",function(){return s._184}),n.d(t,"_223",function(){return s._185}),n.d(t,"_224",function(){return s._186}),n.d(t,"_225",function(){return s._187}),n.d(t,"_226",function(){return s._188}),n.d(t,"_227",function(){return s._189}),n.d(t,"_228",function(){return s._190}),n.d(t,"_229",function(){return s._191}),n.d(t,"_230",function(){return s._192}),n.d(t,"_231",function(){return s._193}),n.d(t,"_232",function(){return s._194}),n.d(t,"_233",function(){return s._195}),n.d(t,"_234",function(){return s._196}),n.d(t,"_235",function(){return s._197}),n.d(t,"_236",function(){return s._198}),n.d(t,"_237",function(){return s._199}),n.d(t,"_238",function(){return s._200}),n.d(t,"_239",function(){return s._201}),n.d(t,"_240",function(){return s._202}),n.d(t,"_241",function(){return s._203}),n.d(t,"_242",function(){return s._204}),n.d(t,"_243",function(){return s._205}),n.d(t,"_244",function(){return s._206}),n.d(t,"_245",function(){return s._207}),n.d(t,"_246",function(){return s._208}),n.d(t,"_247",function(){return s._209}),n.d(t,"_248",function(){return s._210}),n.d(t,"_249",function(){return s._211}),n.d(t,"_250",function(){return s._212}),n.d(t,"_251",function(){return s._213}),n.d(t,"_252",function(){return s._214}),n.d(t,"_253",function(){return s._215}),n.d(t,"_254",function(){return s._216}),n.d(t,"_255",function(){return s._217}),n.d(t,"_256",function(){return s._218}),n.d(t,"_257",function(){return s._219}),n.d(t,"_258",function(){return s._220}),n.d(t,"_259",function(){return s._221}),n.d(t,"_260",function(){return s._222}),n.d(t,"_261",function(){return s._223}),n.d(t,"_262",function(){return s._224}),n.d(t,"_263",function(){return s._225}),n.d(t,"_264",function(){return s._226}),n.d(t,"_265",function(){return s._227}),n.d(t,"_266",function(){return s._228}),n.d(t,"_267",function(){return s._229}),n.d(t,"_268",function(){return s._230}),n.d(t,"_269",function(){return s._231}),n.d(t,"_270",function(){return s._232}),n.d(t,"_271",function(){return s._233}),n.d(t,"_272",function(){return s._234}),n.d(t,"_273",function(){return s._235}),n.d(t,"_274",function(){return s._236}),n.d(t,"_275",function(){return s._237}),n.d(t,"_276",function(){return s._238}),n.d(t,"_277",function(){return s._239}),n.d(t,"_278",function(){return s._240}),n.d(t,"_279",function(){return s._241}),n.d(t,"_280",function(){return s._242}),n.d(t,"_281",function(){return s._243}),n.d(t,"_282",function(){return s._244}),n.d(t,"_283",function(){return s._245}),n.d(t,"_284",function(){return s._246}),n.d(t,"_285",function(){return s._247}),n.d(t,"_286",function(){return s._248});var a=n(115);n.d(t,"_287",function(){return a.a}),n.d(t,"_288",function(){return a.b})},function(e,t,n){"use strict";var i=n(33);n.d(t,"a",function(){return i.a});var r=n(7);n.d(t,"b",function(){return r.r}),n.d(t,"c",function(){return r.q}),n.d(t,"d",function(){return r.p}),n.d(t,"e",function(){return r.b}),n.d(t,"f",function(){return r.x}),n.d(t,"g",function(){return r.c}),n.d(t,"h",function(){return r.d}),n.d(t,"i",function(){return r.e}),n.d(t,"j",function(){return r.f}),n.d(t,"k",function(){return r.g}),n.d(t,"l",function(){return r.h}),n.d(t,"m",function(){return r.i}),n.d(t,"n",function(){return r.j}),n.d(t,"o",function(){return r.l}),n.d(t,"p",function(){return r.k}),n.d(t,"q",function(){return r.m}),n.d(t,"r",function(){return r.z}),n.d(t,"s",function(){return r.y}),n.d(t,"t",function(){return r.A}),n.d(t,"u",function(){return r.a}),n.d(t,"v",function(){return r.u}),n.d(t,"w",function(){return r.s}),n.d(t,"x",function(){return r.o}),n.d(t,"y",function(){return r.v}),n.d(t,"z",function(){return r.w}),n.d(t,"A",function(){return r.n}),n.d(t,"B",function(){return r.t});var o=n(21);n.d(t,"C",function(){return o.r}),n.d(t,"D",function(){return o.s}),n.d(t,"E",function(){return o.t}),n.d(t,"F",function(){return o.i}),n.d(t,"G",function(){return o.g}),n.d(t,"H",function(){return o.h}),n.d(t,"I",function(){return o.v}),n.d(t,"J",function(){return o.o}),n.d(t,"K",function(){return o.f}),n.d(t,"L",function(){return o.q}),n.d(t,"M",function(){return o.x}),n.d(t,"N",function(){return o.w}),n.d(t,"O",function(){return o.u}),n.d(t,"P",function(){return o.m}),n.d(t,"Q",function(){return o.p}),n.d(t,"R",function(){return o.b}),n.d(t,"S",function(){return o.l}),n.d(t,"T",function(){return o.c}),n.d(t,"U",function(){return o.k}),n.d(t,"V",function(){return o.j}),n.d(t,"W",function(){return o.a}),n.d(t,"X",function(){return o.n}),n.d(t,"Y",function(){return o.e}),n.d(t,"Z",function(){return o.d})},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(0),r=(n.n(i),n(11)),o=n(12),s=n(16),a=n(19),l=n(22),d=n(6),c=function(){function e(){}return e.clear=function(e,t,a,l,c){this.domNode=new s.b(t,e),this.defaultTag="P"===a?this.defaultTag:"div";var u=new r.a,h=new o.a,p=u.getRange(e),m=p.collapsed?u.getSelectionNodeCollection(p):u.getSelectionNodeCollectionBr(p),f=u.save(p,e),g=!1;if(p.collapsed&&"ClearFormat"!==c&&(g=!0,p=h.GetCursorRange(e,p,m[0])),!p.collapsed){var b=void 0;if(b=m.length>0&&"BR"===m[0].nodeName&&n.i(i.closest)(m[0],"table")?h.GetSpliceNode(p,n.i(i.closest)(m[0],"table")):h.GetSpliceNode(p,m[m.length>1&&"IMG"===m[0].nodeName?1:0]),1===m.length)u.setSelectionContents(e,b),p=u.getRange(e);else if(m.length>1){for(var v=1,C=m[m.length-v];m.length<=v&&"BR"===m[m.length-v].nodeName;)v++,C=m[m.length-v];var y=h.GetSpliceNode(p,C);u.setSelectionText(e,b,y,0,3===y.nodeType?y.textContent.length:y.childNodes.length),p=u.getRange(e)}var N=u.getNodeCollection(p),E=N.slice();this.clearInlines(u.getSelectionNodes(E),E,u.getRange(e),h,t),this.reSelection(e,f,N),p=u.getRange(e),N=u.getNodeCollection(p);var S=N.slice();this.clearBlocks(e,S,t,h,u),n.i(d.b)()&&n.i(d.c)(t,l),this.reSelection(e,f,N)}g&&u.setCursorPoint(e,p.endContainer,p.endOffset)},e.reSelection=function(e,t,n){var i=t.getInsertNodes(n);t.startContainer=t.getNodeArray(i[0],!0,e),t.startOffset=0,t.endContainer=t.getNodeArray(i[i.length-1],!1,e);var r=i[i.length-1];t.endOffset=3===r.nodeType?r.textContent.length:r.childNodes.length,t.restore()},e.clearBlocks=function(e,t,n,i,r){for(var o=[],s=0;s<t.length;s++)this.BLOCK_TAGS.indexOf(t[s].nodeName.toLocaleLowerCase())>-1&&-1===o.indexOf(t[s])?o.push(t[s]):this.BLOCK_TAGS.indexOf(t[s].parentNode.nodeName.toLocaleLowerCase())>-1&&-1===o.indexOf(t[s].parentNode)&&n!==t[s].parentNode&&o.push(t[s].parentNode);o=this.spliceParent(o,t)[0],o=this.removeParent(o),this.unWrap(e,o,i,r)},e.spliceParent=function(e,t){for(var n=0;n<e.length;n++)for(var i=e[n].childNodes.length,r=0;r<i;r++)if(t.indexOf(e[n].childNodes[r])>0&&e[n].childNodes[r].childNodes.length>0&&(t=this.spliceParent([e[n].childNodes[r]],t)[1]),t.indexOf(e[n].childNodes[r])<=-1&&""!==e[n].childNodes[r].textContent.trim()){for(var o=0;o<i;o++)t.indexOf(e[n].childNodes[o])>-1&&t.splice(t.indexOf(e[n].childNodes[o]),1);r=e[n].childNodes.length;var s=e.indexOf(e[n].parentNode),a=t.indexOf(e[n].parentNode);s>-1&&e.splice(s,1),a>-1&&t.splice(a,1);var l=t.indexOf(e[n]);l>-1&&t.splice(l,1),e.splice(n,1),n--}return[e,t]},e.removeChild=function(e,t){var n=t.childNodes.length;if(n>0)for(var i=0;i<n;i++)e.indexOf(t.childNodes[i])>-1&&(e=this.removeChild(e,t.childNodes[i]),e.splice(e.indexOf(t.childNodes[i]),1));return e},e.removeParent=function(e){for(var t=0;t<e.length;t++)e.indexOf(e[t].parentNode)>-1&&(e=this.removeChild(e,e[t]),e.splice(t,1),t--);return e},e.unWrap=function(e,t,n,i){for(var r=0;r<t.length;r++)if(this.NONVALID_TAGS.indexOf(t[r].nodeName.toLowerCase())>-1&&t[r].parentNode&&this.NONVALID_PARENT_TAGS.indexOf(t[r].parentNode.nodeName.toLowerCase())>-1&&(i.setSelectionText(e,t[r],t[r],0,t[r].childNodes.length),a.a.unwrap(n.GetSpliceNode(i.getRange(e),t[r].parentNode))),"p"!==t[r].nodeName.toLocaleLowerCase()){!(this.NONVALID_PARENT_TAGS.indexOf(t[r].nodeName.toLowerCase())<0&&"p"!==t[r].parentNode.nodeName.toLocaleLowerCase())||("blockquote"===t[r].nodeName.toLocaleLowerCase()||"li"===t[r].nodeName.toLocaleLowerCase())&&this.IGNORE_PARENT_TAGS.indexOf(t[r].childNodes[0].nodeName.toLocaleLowerCase())>-1||1===t[r].childNodes.length&&"p"===t[r].childNodes[0].nodeName.toLocaleLowerCase()||a.a.Wrap(t[r],e.createElement(this.defaultTag));var o=a.a.unwrap(t[r]);1===o.length&&"p"===o[0].parentNode.nodeName.toLocaleLowerCase()&&(a.a.Wrap(t[r],e.createElement(this.defaultTag)),a.a.unwrap(t[r]));for(var s=0;s<o.length;s++)if(this.NONVALID_TAGS.indexOf(o[s].nodeName.toLowerCase())>-1)this.unWrap(e,[o[s]],n,i);else if(this.BLOCK_TAGS.indexOf(o[s].nodeName.toLocaleLowerCase())>-1&&"p"!==o[s].nodeName.toLocaleLowerCase()){var l=this.removeParent([o[s]]);this.unWrap(e,l,n,i)}else this.BLOCK_TAGS.indexOf(o[s].nodeName.toLocaleLowerCase())>-1&&o[s].parentNode.nodeName.toLocaleLowerCase()===o[s].nodeName.toLocaleLowerCase()?a.a.unwrap(o[s]):this.BLOCK_TAGS.indexOf(o[s].nodeName.toLocaleLowerCase())>-1&&"p"===o[s].nodeName.toLocaleLowerCase()&&(a.a.Wrap(o[s],e.createElement(this.defaultTag)),a.a.unwrap(o[s]))}else a.a.Wrap(t[r],e.createElement(this.defaultTag)),a.a.unwrap(t[r])},e.clearInlines=function(e,t,n,i,r){for(var o=0;o<e.length;o++){for(var s=e[o],a=void 0;!this.domNode.isBlockNode(s)&&s.parentElement&&!s.parentElement.classList.contains("e-img-inner");)a=s,s=s.parentElement;a&&l.a.inlineTags.indexOf(a.nodeName.toLocaleLowerCase())>-1&&(i.GetSpliceNode(n,a),this.removeInlineParent(a))}},e.removeInlineParent=function(e){for(var t=a.a.unwrap(e),n=0;n<t.length;n++)1===t[n].parentNode.childNodes.length&&!t[n].parentNode.classList.contains("e-img-inner")&&l.a.inlineTags.indexOf(t[n].parentNode.nodeName.toLocaleLowerCase())>-1?this.removeInlineParent(t[n].parentNode):l.a.inlineTags.indexOf(t[n].nodeName.toLocaleLowerCase())>-1&&this.removeInlineParent(t[n])},e.BLOCK_TAGS=["address","article","aside","blockquote","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","li","main","nav","noscript","ol","p","pre","section","ul"],e.NONVALID_PARENT_TAGS=["thead","tbody","ul","ol","table","tfoot","tr"],e.IGNORE_PARENT_TAGS=["ul","ol","table"],e.NONVALID_TAGS=["thead","tbody","figcaption","td","tr","th","tfoot","figcaption","li"],e.defaultTag="p",e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(85);n.d(t,"Toolbar",function(){return i.a}),n.d(t,"KeyboardEvents",function(){return i.b}),n.d(t,"BaseToolbar",function(){return i.c}),n.d(t,"BaseQuickToolbar",function(){return i.d}),n.d(t,"QuickToolbar",function(){return i.e}),n.d(t,"Count",function(){return i.f}),n.d(t,"ColorPickerInput",function(){return i.g}),n.d(t,"MarkdownToolbarStatus",function(){return i.h}),n.d(t,"ExecCommandCallBack",function(){return i.i}),n.d(t,"ToolbarAction",function(){return i.j}),n.d(t,"MarkdownEditor",function(){return i.k}),n.d(t,"HtmlEditor",function(){return i.l}),n.d(t,"PasteCleanup",function(){return i.m}),n.d(t,"Resize",function(){return i.n}),n.d(t,"DropDownButtons",function(){return i.o}),n.d(t,"FileManager",function(){return i.p}),n.d(t,"FullScreen",function(){return i.q}),n.d(t,"setAttributes",function(){return i.r}),n.d(t,"HtmlToolbarStatus",function(){return i.s}),n.d(t,"XhtmlValidation",function(){return i.t}),n.d(t,"FormatPainter",function(){return i.u}),n.d(t,"EmojiPicker",function(){return i.v}),n.d(t,"HTMLFormatter",function(){return i.w}),n.d(t,"Formatter",function(){return i.x}),n.d(t,"MarkdownFormatter",function(){return i.y}),n.d(t,"ContentRender",function(){return i.z}),n.d(t,"Render",function(){return i.A}),n.d(t,"ToolbarRenderer",function(){return i.B}),n.d(t,"Link",function(){return i.C}),n.d(t,"Image",function(){return i.D}),n.d(t,"Audio",function(){return i.E}),n.d(t,"Video",function(){return i.F}),n.d(t,"ViewSource",function(){return i.G}),n.d(t,"Table",function(){return i.H}),n.d(t,"DialogRenderer",function(){return i.I}),n.d(t,"IframeContentRender",function(){return i.J}),n.d(t,"MarkdownRender",function(){return i.K}),n.d(t,"PopupRenderer",function(){return i.L}),n.d(t,"RichTextEditor",function(){return i.M}),n.d(t,"RenderType",function(){return i.N}),n.d(t,"ToolbarType",function(){return i.O}),n.d(t,"DialogType",function(){return i.P}),n.d(t,"executeGroup",function(){return i.Q}),n.d(t,"created",function(){return i.R}),n.d(t,"destroyed",function(){return i.S}),n.d(t,"tableclass",function(){return i.T}),n.d(t,"load",function(){return i.U}),n.d(t,"initialLoad",function(){return i.V}),n.d(t,"contentChanged",function(){return i.W}),n.d(t,"initialEnd",function(){return i.X}),n.d(t,"iframeMouseDown",function(){return i.Y}),n.d(t,"destroy",function(){return i.Z}),n.d(t,"toolbarClick",function(){return i._0}),n.d(t,"toolbarRefresh",function(){return i._1}),n.d(t,"refreshBegin",function(){return i._2}),n.d(t,"toolbarUpdated",function(){return i._3}),n.d(t,"bindOnEnd",function(){return i._4}),n.d(t,"renderColorPicker",function(){return i._5}),n.d(t,"htmlToolbarClick",function(){return i._6}),n.d(t,"markdownToolbarClick",function(){return i._7}),n.d(t,"destroyColorPicker",function(){return i._8}),n.d(t,"modelChanged",function(){return i._9}),n.d(t,"tableModulekeyUp",function(){return i._10}),n.d(t,"keyUp",function(){return i._11}),n.d(t,"keyDown",function(){return i._12}),n.d(t,"mouseUp",function(){return i._13}),n.d(t,"toolbarCreated",function(){return i._14}),n.d(t,"toolbarRenderComplete",function(){return i._15}),n.d(t,"enableFullScreen",function(){return i._16}),n.d(t,"disableFullScreen",function(){return i._17}),n.d(t,"dropDownSelect",function(){return i._18}),n.d(t,"beforeDropDownItemRender",function(){return i._19}),n.d(t,"execCommandCallBack",function(){return i._20}),n.d(t,"imageToolbarAction",function(){return i._21}),n.d(t,"audioToolbarAction",function(){return i._22}),n.d(t,"videoToolbarAction",function(){return i._23}),n.d(t,"linkToolbarAction",function(){return i._24}),n.d(t,"windowResize",function(){return i._25}),n.d(t,"resizeStart",function(){return i._26}),n.d(t,"onResize",function(){return i._27}),n.d(t,"resizeStop",function(){return i._28}),n.d(t,"undo",function(){return i._29}),n.d(t,"redo",function(){return i._30}),n.d(t,"insertLink",function(){return i._31}),n.d(t,"unLink",function(){return i._32}),n.d(t,"editLink",function(){return i._33}),n.d(t,"openLink",function(){return i._34}),n.d(t,"actionBegin",function(){return i._35}),n.d(t,"actionComplete",function(){return i._36}),n.d(t,"updatedToolbarStatus",function(){return i._37}),n.d(t,"actionSuccess",function(){return i._38}),n.d(t,"updateToolbarItem",function(){return i._39}),n.d(t,"insertImage",function(){return i._40}),n.d(t,"insertAudio",function(){return i._41}),n.d(t,"insertVideo",function(){return i._42}),n.d(t,"insertCompleted",function(){return i._43}),n.d(t,"imageLeft",function(){return i._44}),n.d(t,"imageRight",function(){return i._45}),n.d(t,"imageCenter",function(){return i._46}),n.d(t,"imageBreak",function(){return i._47}),n.d(t,"imageInline",function(){return i._48}),n.d(t,"imageLink",function(){return i._49}),n.d(t,"imageAlt",function(){return i._50}),n.d(t,"imageDelete",function(){return i._51}),n.d(t,"audioDelete",function(){return i._52}),n.d(t,"videoDelete",function(){return i._53}),n.d(t,"imageCaption",function(){return i._54}),n.d(t,"imageSize",function(){return i._55}),n.d(t,"videoSize",function(){return i._56}),n.d(t,"sourceCode",function(){return i._57}),n.d(t,"updateSource",function(){return i._58}),n.d(t,"toolbarOpen",function(){return i._59}),n.d(t,"beforeDropDownOpen",function(){return i._60}),n.d(t,"selectionSave",function(){return i._61}),n.d(t,"selectionRestore",function(){return i._62}),n.d(t,"expandPopupClick",function(){return i._63}),n.d(t,"count",function(){return i._64}),n.d(t,"contentFocus",function(){return i._65}),n.d(t,"contentBlur",function(){return i._66}),n.d(t,"mouseDown",function(){return i._67}),n.d(t,"sourceCodeMouseDown",function(){return i._68}),n.d(t,"editAreaClick",function(){return i._69}),n.d(t,"scroll",function(){return i._70}),n.d(t,"contentscroll",function(){return i._71}),n.d(t,"colorPickerChanged",function(){return i._72}),n.d(t,"tableColorPickerChanged",function(){return i._73}),n.d(t,"focusChange",function(){return i._74}),n.d(t,"selectAll",function(){return i._75}),n.d(t,"selectRange",function(){return i._76}),n.d(t,"getSelectedHtml",function(){return i._77}),n.d(t,"renderInlineToolbar",function(){return i._78}),n.d(t,"paste",function(){return i._79}),n.d(t,"imgModule",function(){return i._80}),n.d(t,"rtlMode",function(){return i._81}),n.d(t,"createTable",function(){return i._82}),n.d(t,"docClick",function(){return i._83}),n.d(t,"tableToolbarAction",function(){return i._84}),n.d(t,"checkUndo",function(){return i._85}),n.d(t,"readOnlyMode",function(){return i._86}),n.d(t,"moduleDestroy",function(){return i._87}),n.d(t,"pasteClean",function(){return i._88}),n.d(t,"enterHandler",function(){return i._89}),n.d(t,"beforeDialogOpen",function(){return i._90}),n.d(t,"clearDialogObj",function(){return i._91}),n.d(t,"dialogOpen",function(){return i._92}),n.d(t,"beforeDialogClose",function(){return i._93}),n.d(t,"dialogClose",function(){return i._94}),n.d(t,"beforeQuickToolbarOpen",function(){return i._95}),n.d(t,"quickToolbarOpen",function(){return i._96}),n.d(t,"quickToolbarClose",function(){return i._97}),n.d(t,"popupHide",function(){return i._98}),n.d(t,"imageSelected",function(){return i._99}),n.d(t,"imageUploading",function(){return i._100}),n.d(t,"imageUploadSuccess",function(){return i._101}),n.d(t,"imageUploadFailed",function(){return i._102}),n.d(t,"imageRemoving",function(){return i._103}),n.d(t,"fileSelected",function(){return i._104}),n.d(t,"fileUploading",function(){return i._105}),n.d(t,"fileUploadSuccess",function(){return i._106}),n.d(t,"fileUploadFailed",function(){return i._107}),n.d(t,"fileRemoving",function(){return i._108}),n.d(t,"afterImageDelete",function(){return i._109}),n.d(t,"afterMediaDelete",function(){return i._110}),n.d(t,"drop",function(){return i._111}),n.d(t,"xhtmlValidation",function(){return i._112}),n.d(t,"beforeImageUpload",function(){return i._113}),n.d(t,"beforeFileUpload",function(){return i._114}),n.d(t,"resizeInitialized",function(){return i._115}),n.d(t,"renderFileManager",function(){return i._116}),n.d(t,"beforeImageDrop",function(){return i._117}),n.d(t,"dynamicModule",function(){return i._118}),n.d(t,"beforePasteCleanup",function(){return i._119}),n.d(t,"afterPasteCleanup",function(){return i._120}),n.d(t,"updateTbItemsStatus",function(){return i._121}),n.d(t,"showLinkDialog",function(){return i._122}),n.d(t,"closeLinkDialog",function(){return i._123}),n.d(t,"showImageDialog",function(){return i._124}),n.d(t,"showAudioDialog",function(){return i._125}),n.d(t,"showVideoDialog",function(){return i._126}),n.d(t,"closeImageDialog",function(){return i._127}),n.d(t,"closeAudioDialog",function(){return i._128}),n.d(t,"closeVideoDialog",function(){return i._129}),n.d(t,"showTableDialog",function(){return i._130}),n.d(t,"closeTableDialog",function(){return i._131}),n.d(t,"bindCssClass",function(){return i._132}),n.d(t,"formatPainterClick",function(){return i._133}),n.d(t,"formatPainterDoubleClick",function(){return i._134}),n.d(t,"emojiPicker",function(){return i._135}),n.d(t,"destroyTooltip",function(){return i._136}),n.d(t,"hidePopup",function(){return i._137}),n.d(t,"cleanupResizeElements",function(){return i._138}),n.d(t,"blockEmptyNodes",function(){return i._139}),n.d(t,"inlineEmptyNodes",function(){return i._140}),n.d(t,"CLS_RTE",function(){return i._141}),n.d(t,"CLS_RTL",function(){return i._142}),n.d(t,"CLS_CONTENT",function(){return i._143}),n.d(t,"CLS_DISABLED",function(){return i._144}),n.d(t,"CLS_SCRIPT_SHEET",function(){return i._145}),n.d(t,"CLS_STYLE_SHEET",function(){return i._146}),n.d(t,"CLS_TOOLBAR",function(){return i._147});n.d(t,"CLS_TB_FIXED",function(){return i._148}),n.d(t,"CLS_TB_FLOAT",function(){return i._149}),n.d(t,"CLS_TB_ABS_FLOAT",function(){return i._150}),n.d(t,"CLS_INLINE",function(){return i._151}),n.d(t,"CLS_TB_INLINE",function(){return i._152}),n.d(t,"CLS_RTE_EXPAND_TB",function(){return i._153}),n.d(t,"CLS_FULL_SCREEN",function(){return i._154}),n.d(t,"CLS_QUICK_TB",function(){return i._155}),n.d(t,"CLS_TEXT_QUICK_TB",function(){return i._156}),n.d(t,"CLS_POP",function(){return i._157}),n.d(t,"CLS_TB_STATIC",function(){return i._158}),n.d(t,"CLS_QUICK_POP",function(){return i._159}),n.d(t,"CLS_QUICK_DROPDOWN",function(){return i._160}),n.d(t,"CLS_IMAGE_POP",function(){return i._161}),n.d(t,"CLS_TEXT_POP",function(){return i._162}),n.d(t,"CLS_INLINE_POP",function(){return i._163}),n.d(t,"CLS_INLINE_DROPDOWN",function(){return i._164}),n.d(t,"CLS_DROPDOWN_POPUP",function(){return i._165}),n.d(t,"CLS_DROPDOWN_ICONS",function(){return i._166}),n.d(t,"CLS_DROPDOWN_ITEMS",function(){return i._167}),n.d(t,"CLS_DROPDOWN_BTN",function(){return i._168}),n.d(t,"CLS_RTE_CONTENT",function(){return i._169}),n.d(t,"CLS_TB_ITEM",function(){return i._170}),n.d(t,"CLS_TB_EXTENDED",function(){return i._171}),n.d(t,"CLS_TB_WRAP",function(){return i._172}),n.d(t,"CLS_POPUP",function(){return i._173}),n.d(t,"CLS_SEPARATOR",function(){return i._174}),n.d(t,"CLS_MINIMIZE",function(){return i._175}),n.d(t,"CLS_MAXIMIZE",function(){return i._176}),n.d(t,"CLS_BACK",function(){return i._177}),n.d(t,"CLS_SHOW",function(){return i._178}),n.d(t,"CLS_HIDE",function(){return i._179}),n.d(t,"CLS_VISIBLE",function(){return i._180}),n.d(t,"CLS_FOCUS",function(){return i._181}),n.d(t,"CLS_RM_WHITE_SPACE",function(){return i._182}),n.d(t,"CLS_IMGRIGHT",function(){return i._183}),n.d(t,"CLS_IMGLEFT",function(){return i._184}),n.d(t,"CLS_IMGCENTER",function(){return i._185}),n.d(t,"CLS_IMGBREAK",function(){return i._186}),n.d(t,"CLS_AUDIOBREAK",function(){return i._187}),n.d(t,"CLS_CLICKELEM",function(){return i._188}),n.d(t,"CLS_VID_CLICK_ELEM",function(){return i._189}),n.d(t,"CLS_AUDIOWRAP",function(){return i._190}),n.d(t,"CLS_VIDEOWRAP",function(){return i._191}),n.d(t,"CLS_VIDEOBREAK",function(){return i._192}),n.d(t,"CLS_CAPTION",function(){return i._193}),n.d(t,"CLS_RTE_CAPTION",function(){return i._194}),n.d(t,"CLS_CAPINLINE",function(){return i._195}),n.d(t,"CLS_IMGINLINE",function(){return i._196}),n.d(t,"CLS_AUDIOINLINE",function(){return i._197}),n.d(t,"CLS_VIDEOINLINE",function(){return i._198}),n.d(t,"CLS_COUNT",function(){return i._199}),n.d(t,"CLS_WARNING",function(){return i._200}),n.d(t,"CLS_ERROR",function(){return i._201}),n.d(t,"CLS_ICONS",function(){return i._202}),n.d(t,"CLS_ACTIVE",function(){return i._203}),n.d(t,"CLS_EXPAND_OPEN",function(){return i._204}),n.d(t,"CLS_RTE_ELEMENTS",function(){return i._205}),n.d(t,"CLS_TB_BTN",function(){return i._206}),n.d(t,"CLS_HR_SEPARATOR",function(){return i._207}),n.d(t,"CLS_TB_IOS_FIX",function(){return i._208}),n.d(t,"CLS_LIST_PRIMARY_CONTENT",function(){return i._209}),n.d(t,"CLS_NUMBERFORMATLIST_TB_BTN",function(){return i._210}),n.d(t,"CLS_BULLETFORMATLIST_TB_BTN",function(){return i._211}),n.d(t,"CLS_FORMATS_TB_BTN",function(){return i._212}),n.d(t,"CLS_FONT_NAME_TB_BTN",function(){return i._213}),n.d(t,"CLS_FONT_SIZE_TB_BTN",function(){return i._214}),n.d(t,"CLS_ALIGN_TB_BTN",function(){return i._215}),n.d(t,"CLS_FONT_COLOR_TARGET",function(){return i._216}),n.d(t,"CLS_BACKGROUND_COLOR_TARGET",function(){return i._217}),n.d(t,"CLS_COLOR_CONTENT",function(){return i._218}),n.d(t,"CLS_FONT_COLOR_DROPDOWN",function(){return i._219}),n.d(t,"CLS_BACKGROUND_COLOR_DROPDOWN",function(){return i._220}),n.d(t,"CLS_COLOR_PALETTE",function(){return i._221}),n.d(t,"CLS_FONT_COLOR_PICKER",function(){return i._222}),n.d(t,"CLS_BACKGROUND_COLOR_PICKER",function(){return i._223}),n.d(t,"CLS_RTE_READONLY",function(){return i._224}),n.d(t,"CLS_TABLE_SEL",function(){return i._225}),n.d(t,"CLS_TB_DASH_BOR",function(){return i._226}),n.d(t,"CLS_TB_ALT_BOR",function(){return i._227}),n.d(t,"CLS_TB_COL_RES",function(){return i._228}),n.d(t,"CLS_TB_ROW_RES",function(){return i._229}),n.d(t,"CLS_TB_BOX_RES",function(){return i._230}),n.d(t,"CLS_RTE_HIDDEN",function(){return i._231}),n.d(t,"CLS_RTE_PASTE_KEEP_FORMAT",function(){return i._232}),n.d(t,"CLS_RTE_PASTE_REMOVE_FORMAT",function(){return i._233}),n.d(t,"CLS_RTE_PASTE_PLAIN_FORMAT",function(){return i._234}),n.d(t,"CLS_RTE_PASTE_OK",function(){return i._235}),n.d(t,"CLS_RTE_PASTE_CANCEL",function(){return i._236}),n.d(t,"CLS_RTE_DIALOG_MIN_HEIGHT",function(){return i._237}),n.d(t,"CLS_RTE_RES_HANDLE",function(){return i._238}),n.d(t,"CLS_RTE_RES_EAST",function(){return i._239}),n.d(t,"CLS_RTE_IMAGE",function(){return i._240}),n.d(t,"CLS_RESIZE",function(){return i._241}),n.d(t,"CLS_IMG_FOCUS",function(){return i._242}),n.d(t,"CLS_AUD_FOCUS",function(){return i._243}),n.d(t,"CLS_VID_FOCUS",function(){return i._244}),n.d(t,"CLS_RTE_DRAG_IMAGE",function(){return i._245}),n.d(t,"CLS_RTE_UPLOAD_POPUP",function(){return i._246}),n.d(t,"CLS_POPUP_OPEN",function(){return i._247}),n.d(t,"CLS_IMG_RESIZE",function(){return i._248}),n.d(t,"CLS_DROPAREA",function(){return i._249}),n.d(t,"CLS_IMG_INNER",function(){return i._250}),n.d(t,"CLS_UPLOAD_FILES",function(){return i._251}),n.d(t,"CLS_RTE_DIALOG_UPLOAD",function(){return i._252}),n.d(t,"CLS_RTE_RES_CNT",function(){return i._253}),n.d(t,"CLS_CUSTOM_TILE",function(){return i._254}),n.d(t,"CLS_NOCOLOR_ITEM",function(){return i._255}),n.d(t,"CLS_TABLE",function(){return i._256}),n.d(t,"CLS_TABLE_BORDER",function(){return i._257}),n.d(t,"CLS_RTE_TABLE_RESIZE",function(){return i._258}),n.d(t,"CLS_RTE_FIXED_TB_EXPAND",function(){return i._259}),n.d(t,"CLS_RTE_TB_ENABLED",function(){return i._260}),n.d(t,"CLS_RTE_RES_WEST",function(){return i._261}),n.d(t,"CLS_RTE_SOURCE_CODE_TXTAREA",function(){return i._262}),n.d(t,"getIndex",function(){return i._263}),n.d(t,"hasClass",function(){return i._264}),n.d(t,"getDropDownValue",function(){return i._265}),n.d(t,"isIDevice",function(){return i._266}),n.d(t,"getFormattedFontSize",function(){return i._267}),n.d(t,"pageYOffset",function(){return i._268}),n.d(t,"getTooltipText",function(){return i._269}),n.d(t,"setToolbarStatus",function(){return i._270}),n.d(t,"getCollection",function(){return i._271}),n.d(t,"getTBarItemsIndex",function(){return i._272}),n.d(t,"updateUndoRedoStatus",function(){return i._273}),n.d(t,"dispatchEvent",function(){return i._274}),n.d(t,"parseHtml",function(){return i._275}),n.d(t,"getTextNodesUnder",function(){return i._276}),n.d(t,"toObjectLowerCase",function(){return i._277}),n.d(t,"getEditValue",function(){return i._278}),n.d(t,"updateTextNode",function(){return i._279}),n.d(t,"getDefaultValue",function(){return i._280}),n.d(t,"isEditableValueEmpty",function(){return i._281}),n.d(t,"decode",function(){return i._282}),n.d(t,"sanitizeHelper",function(){return i._283}),n.d(t,"convertToBlob",function(){return i._284}),n.d(t,"getLocaleFontFormat",function(){return i._285}),n.d(t,"updateDropDownFontFormatLocale",function(){return i._286}),n.d(t,"ServiceLocator",function(){return i._287}),n.d(t,"RendererFactory",function(){return i._288});var r=n(83);n.d(t,"EditorManager",function(){return r.a}),n.d(t,"IMAGE",function(){return r.b}),n.d(t,"AUDIO",function(){return r.c}),n.d(t,"VIDEO",function(){return r.d}),n.d(t,"TABLE",function(){return r.e}),n.d(t,"LINK",function(){return r.f}),n.d(t,"INSERT_ROW",function(){return r.g}),n.d(t,"INSERT_COLUMN",function(){return r.h}),n.d(t,"DELETEROW",function(){return r.i}),n.d(t,"DELETECOLUMN",function(){return r.j}),n.d(t,"REMOVETABLE",function(){return r.k}),n.d(t,"TABLEHEADER",function(){return r.l}),n.d(t,"TABLE_VERTICAL_ALIGN",function(){return r.m}),n.d(t,"TABLE_MERGE",function(){return r.n}),n.d(t,"TABLE_VERTICAL_SPLIT",function(){return r.o}),n.d(t,"TABLE_HORIZONTAL_SPLIT",function(){return r.p}),n.d(t,"TABLE_MOVE",function(){return r.q}),n.d(t,"ALIGNMENT_TYPE",function(){return r.r}),n.d(t,"INDENT_TYPE",function(){return r.s}),n.d(t,"DEFAULT_TAG",function(){return r.t}),n.d(t,"BLOCK_TAGS",function(){return r.u}),n.d(t,"IGNORE_BLOCK_TAGS",function(){return r.v}),n.d(t,"TABLE_BLOCK_TAGS",function(){return r.w}),n.d(t,"SELECTION_TYPE",function(){return r.x}),n.d(t,"INSERTHTML_TYPE",function(){return r.y}),n.d(t,"INSERT_TEXT_TYPE",function(){return r.z}),n.d(t,"CLEAR_TYPE",function(){return r.A}),n.d(t,"SELF_CLOSING_TAGS",function(){return r.B}),n.d(t,"CLASS_IMAGE_RIGHT",function(){return r.C}),n.d(t,"CLASS_IMAGE_LEFT",function(){return r.D}),n.d(t,"CLASS_IMAGE_CENTER",function(){return r.E}),n.d(t,"CLASS_VIDEO_RIGHT",function(){return r.F}),n.d(t,"CLASS_VIDEO_LEFT",function(){return r.G}),n.d(t,"CLASS_VIDEO_CENTER",function(){return r.H}),n.d(t,"CLASS_IMAGE_BREAK",function(){return r.I}),n.d(t,"CLASS_AUDIO_BREAK",function(){return r.J}),n.d(t,"CLASS_VIDEO_BREAK",function(){return r.K}),n.d(t,"CLASS_CAPTION",function(){return r.L}),n.d(t,"CLASS_RTE_CAPTION",function(){return r.M}),n.d(t,"CLASS_CAPTION_INLINE",function(){return r.N}),n.d(t,"CLASS_IMAGE_INLINE",function(){return r.O}),n.d(t,"CLASS_AUDIO_INLINE",function(){return r.P}),n.d(t,"CLASS_CLICK_ELEM",function(){return r.Q}),n.d(t,"CLASS_VIDEO_CLICK_ELEM",function(){return r.R}),n.d(t,"CLASS_AUDIO",function(){return r.S}),n.d(t,"CLASS_VIDEO",function(){return r.T}),n.d(t,"CLASS_AUDIO_WRAP",function(){return r.U}),n.d(t,"CLASS_VIDEO_WRAP",function(){return r.V}),n.d(t,"CLASS_EMBED_VIDEO_WRAP",function(){return r.W}),n.d(t,"CLASS_AUDIO_FOCUS",function(){return r.X}),n.d(t,"CLASS_VIDEO_FOCUS",function(){return r.Y}),n.d(t,"CLASS_VIDEO_INLINE",function(){return r.Z}),n.d(t,"Lists",function(){return r._0}),n.d(t,"markerClassName",function(){return r._1}),n.d(t,"DOMNode",function(){return r._2}),n.d(t,"Alignments",function(){return r._3}),n.d(t,"Indents",function(){return r._4}),n.d(t,"Formats",function(){return r._5}),n.d(t,"LinkCommand",function(){return r._6}),n.d(t,"InsertMethods",function(){return r._7}),n.d(t,"InsertTextExec",function(){return r._8}),n.d(t,"InsertHtmlExec",function(){return r._9}),n.d(t,"InsertHtml",function(){return r._10}),n.d(t,"IsFormatted",function(){return r._11}),n.d(t,"MsWordPaste",function(){return r._12}),n.d(t,"NodeCutter",function(){return r._13}),n.d(t,"ImageCommand",function(){return r._14}),n.d(t,"AudioCommand",function(){return r._15}),n.d(t,"VideoCommand",function(){return r._16}),n.d(t,"SelectionCommands",function(){return r._17}),n.d(t,"SelectionBasedExec",function(){return r._18}),n.d(t,"ClearFormatExec",function(){return r._19}),n.d(t,"UndoRedoManager",function(){return r._20}),n.d(t,"TableCommand",function(){return r._21}),n.d(t,"statusCollection",function(){return r._22}),n.d(t,"ToolbarStatus",function(){return r._23}),n.d(t,"FormatPainterActions",function(){return r._24}),n.d(t,"EmojiPickerAction",function(){return r._25});var o=n(11);n.d(t,"NodeSelection",function(){return o.a});var s=n(84);n.d(t,"MarkdownParser",function(){return s.a}),n.d(t,"LISTS_COMMAND",function(){return s.b}),n.d(t,"selectionCommand",function(){return s.c}),n.d(t,"LINK_COMMAND",function(){return s.d}),n.d(t,"CLEAR_COMMAND",function(){return s.e}),n.d(t,"MD_TABLE",function(){return s.f}),n.d(t,"INSERT_TEXT_COMMAND",function(){return s.g}),n.d(t,"ClearFormat",function(){return s.h}),n.d(t,"MDLists",function(){return s.i}),n.d(t,"MDFormats",function(){return s.j}),n.d(t,"MarkdownSelection",function(){return s.k}),n.d(t,"UndoRedoCommands",function(){return s.l}),n.d(t,"MDSelectionFormats",function(){return s.m}),n.d(t,"MDLink",function(){return s.n}),n.d(t,"MDTable",function(){return s.o});var a=n(82);n.d(t,"markdownFormatTags",function(){return a.a}),n.d(t,"markdownSelectionTags",function(){return a.b}),n.d(t,"markdownListsTags",function(){return a.c}),n.d(t,"htmlKeyConfig",function(){return a.d}),n.d(t,"markdownKeyConfig",function(){return a.e}),n.d(t,"pasteCleanupGroupingTags",function(){return a.f}),n.d(t,"listConversionFilters",function(){return a.g}),n.d(t,"selfClosingTags",function(){return a.h}),n.d(t,"KEY_DOWN",function(){return a.i}),n.d(t,"ACTION",function(){return a.j}),n.d(t,"FORMAT_TYPE",function(){return a.k}),n.d(t,"KEY_DOWN_HANDLER",function(){return a.l}),n.d(t,"LIST_TYPE",function(){return a.m}),n.d(t,"KEY_UP_HANDLER",function(){return a.n}),n.d(t,"KEY_UP",function(){return a.o}),n.d(t,"MODEL_CHANGED_PLUGIN",function(){return a.p}),n.d(t,"MODEL_CHANGED",function(){return a.q}),n.d(t,"MS_WORD_CLEANUP_PLUGIN",function(){return a.r}),n.d(t,"MS_WORD_CLEANUP",function(){return a.s}),n.d(t,"ON_BEGIN",function(){return a.t}),n.d(t,"SPACE_ACTION",function(){return a.u}),n.d(t,"FORMAT_PAINTER_ACTIONS",function(){return a.v}),n.d(t,"EMOJI_PICKER_ACTIONS",function(){return a.w})},function(e,t,n){"use strict";var i=n(54);n.d(t,"a",function(){return i.a});var r=n(10);n.d(t,"b",function(){return r.d}),n.d(t,"c",function(){return r.c}),n.d(t,"d",function(){return r.b}),n.d(t,"e",function(){return r.e}),n.d(t,"f",function(){return r.a}),n.d(t,"g",function(){return r.f})},function(e,t,n){"use strict";var i=n(55);n.d(t,"a",function(){return i.a});var r=n(58);n.d(t,"b",function(){return r.a});var o=n(56);n.d(t,"c",function(){return o.a});var s=n(23);n.d(t,"d",function(){return s.a});var a=n(61);n.d(t,"e",function(){return a.a});var l=n(59);n.d(t,"f",function(){return l.a});var d=n(57);n.d(t,"g",function(){return d.a});var c=n(60);n.d(t,"h",function(){return c.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(10),r=function(){function e(e){this.parent=e,this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(i.f,this.InsertTextExec,this)},e.prototype.InsertTextExec=function(e){var t=this.parent.element;t.focus();var n=t.selectionStart,i=t.selectionEnd,r=e.value.text,o=n+r.length,s=i+r.length;t.value=t.value.substr(0,n)+r+t.value.substr(i,t.value.length),this.parent.markdownSelection.setSelection(t,o,s),this.restore(t,o,s,e)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:i.subCommand,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e}()},function(e,t,n){"use strict";var i=n(103);n.d(t,"a",function(){return i.a});var r=n(28);n.d(t,"b",function(){return r.a});var o=n(24);n.d(t,"c",function(){return o.a});var s=n(62);n.d(t,"d",function(){return s.a});var a=n(101);n.d(t,"e",function(){return a.a});var l=n(93);n.d(t,"f",function(){return l.a});var d=n(26);n.d(t,"g",function(){return d.a});var c=n(67);n.d(t,"h",function(){return c.a});var u=n(63);n.d(t,"i",function(){return u.a});var h=n(68);n.d(t,"j",function(){return h.a});var p=n(99);n.d(t,"k",function(){return p.a});var m=n(98);n.d(t,"l",function(){return m.a});var f=n(100);n.d(t,"m",function(){return f.a});var g=n(102);n.d(t,"n",function(){return g.a});var b=n(27);n.d(t,"o",function(){return b.a});var v=n(96);n.d(t,"p",function(){return v.a});var C=n(64);n.d(t,"q",function(){return C.a});var y=n(65);n.d(t,"r",function(){return y.a});var N=n(66);n.d(t,"s",function(){return N.a});var E=n(69);n.d(t,"t",function(){return E.a});var S=n(97);n.d(t,"u",function(){return S.a});var T=n(94);n.d(t,"v",function(){return T.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),n(1)),o=n(5),s=n(2),a=function(){function e(e,t){this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener()}return e.prototype.initializeInstance=function(){this.contentRenderer=this.renderFactory.getRenderer(o.a.Content),this.editPanel=this.contentRenderer.getEditPanel(),this.addEventListener()},e.prototype.renderCount=function(){this.initializeInstance(),this.element=this.parent.createElement("span",{className:s._6}),this.contentRenderer.getPanel().parentElement.appendChild(this.element),this.appendCount(),-1!==this.parent.maxLength&&this.charCountBackground(this.htmlLength)},e.prototype.appendCount=function(){var e="Markdown"===this.parent.editorMode?this.editPanel.value:this.editPanel.textContent;"Markdown"!==this.parent.editorMode&&-1!==e.indexOf("")?this.htmlLength=e.replace(/\u200B/g,"").length:this.htmlLength=e.length;var t=-1===this.parent.maxLength?this.htmlLength:this.htmlLength+" / "+this.parent.maxLength;this.element.innerHTML=t},e.prototype.charCountBackground=function(e){var t=e/this.parent.maxLength*100;t<85?(this.element.classList.remove(s._7),this.element.classList.remove(s._8)):t>85&&t<=90?(this.element.classList.remove(s._8),this.element.classList.add(s._7)):t>90&&(this.element.classList.remove(s._7),this.element.classList.add(s._8))},e.prototype.refresh=function(){n.i(i.isNullOrUndefined)(this.editPanel)||(this.appendCount(),-1!==this.parent.maxLength&&this.charCountBackground(this.htmlLength))},e.prototype.destroy=function(){this.element&&!n.i(i.isNullOrUndefined)(this.parent.element.querySelector("."+s._6))&&n.i(i.detach)(this.element),this.removeEventListener()},e.prototype.toggle=function(e){this.element.style.display="viewSource"===e.member?"none":"block"},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.g,this.renderCount,this),this.parent.on(r.u,this.refresh,this),this.parent.on(r._21,this.refresh,this),this.parent.on(r.l,this.refresh,this),this.parent.on(r._24,this.refresh,this),this.parent.on(r.i,this.destroy,this),this.parent.on(r._14,this.toggle,this),this.parent.on(r._15,this.toggle,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.g,this.renderCount),this.parent.off(r.u,this.refresh),this.parent.off(r.l,this.refresh),this.parent.off(r._21,this.refresh),this.parent.off(r._24,this.refresh),this.parent.off(r.i,this.destroy),this.parent.off(r._14,this.toggle),this.parent.off(r._15,this.toggle))},e.prototype.getModuleName=function(){return"count"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(1),r=n(0),o=(n.n(r),n(9)),s=(n.n(o),n(81)),a=(n.n(s),n(24)),l=n(14),d=(n.n(l),function(){function e(e,t){this.parent=e,this.locator=t,this.i10n=t.getService("rteLocale"),this.renderFactory=this.locator.getService("rendererFactory"),this.baseToolbar=new a.a(this.parent,this.locator),this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener()},e.prototype.addEventListener=function(){this.parent.on(i._92,this.toolbarClick,this),this.parent.on(i._40,this.docClick,this),this.parent.on(i.v,this.onkeyPress,this),this.parent.on(i.u,this.onkeyUp,this),this.parent.on(i._28,this.contentscroll,this),this.parent.on(i._27,this.contentscroll,this)},e.prototype.toolbarClick=function(e){var t,a,d,c=this;n.i(r.isNullOrUndefined)(this.parent.element.querySelector(".e-emoji"))?this.parent.inlineMode.enable&&(d=this.parent.element.ownerDocument.querySelector(".e-emoji")):d=this.parent.element.querySelector(".e-emoji"),this.divElement=d.closest("div"),this.parent.inputElement.contains(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).startContainer)||this.parent.contentModule.getEditPanel().focus();var u=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());this.save=this.parent.formatter.editorManager.nodeSelection.save(u,this.parent.contentModule.getDocument()),this.clickEvent=e.args;var h=this.parent.emojiPickerSettings.iconsSet;if(this.popupObj){if(n.i(r.removeClass)([this.divElement],"e-active"),this.popupObj.element.querySelector(".e-rte-emoji-search")||!this.parent.emojiPickerSettings.showSearchBox)return void this.popupObj.hide();this.popupObj.hide()}this.popDiv=this.parent.createElement("div",{className:"e-rte-emojipicker-popup",id:this.parent.getID()+"_emojiPicker"}),n.i(r.isNullOrUndefined)(this.parent.getToolbar())||this.parent.inlineMode.enable?this.parent.inlineMode.enable&&this.parent.inputElement.appendChild(this.popDiv):this.parent.getToolbar().appendChild(this.popDiv),r.EventHandler.add(this.popDiv,"keydown",this.onKeyDown,this),r.EventHandler.add(this.popDiv,"keyup",this.searchFilter,this);var p,m=this.parent.element.querySelector(".e-toolbar-extended");if(n.i(r.isNullOrUndefined)(m))p="10001";else{p=window.getComputedStyle(m).getPropertyValue("z-index")}var f,g,b;if(n.i(r.isNullOrUndefined)(e.args)||this.parent.inlineMode.enable||!n.i(r.isNullOrUndefined)(this.parent.quickToolbarSettings.text))if(n.i(r.isNullOrUndefined)(e.x)&&n.i(r.isNullOrUndefined)(e.y)&&!this.parent.inlineMode.enable&&n.i(r.isNullOrUndefined)(this.parent.quickToolbarSettings.text)){if(f=this.parent.inputElement,this.parent.contentModule.getDocument().getSelection().rangeCount>0){var v=this.getCoordinates();g=v.left,b=v.top}}else if(n.i(r.isNullOrUndefined)(e.x)&&n.i(r.isNullOrUndefined)(e.y)&&(this.parent.inlineMode.enable||!n.i(r.isNullOrUndefined)(this.parent.quickToolbarSettings.text))){if(this.parent.notify(i._94,{}),this.parent.contentModule.getDocument().getSelection().rangeCount>0){var v=this.getCoordinates();g=v.left,b=v.top}}else f=this.parent.inputElement,g=e.x,b=e.y;else f=e.args.originalEvent.target,f=f.classList.contains("e-toolbar-item")?f.firstChild:f.parentElement,g="left",b="bottom";if(this.popupObj=new o.Popup(this.popDiv,{targetType:"relative",relateTo:f,collision:{X:"fit",Y:"none"},offsetY:8,viewPortElement:this.parent.element,position:{X:g,Y:b},enableRtl:this.parent.enableRtl,zIndex:parseInt(p,10)+1,actionOnScroll:"hide",close:function(e){c.parent.isBlur=!1,c.popupObj.destroy(),n.i(r.detach)(c.popupObj.element),c.popupObj=null}}),n.i(r.addClass)([this.popupObj.element],"e-popup-open"),this.popupObj.refreshPosition(f),(!n.i(r.isNullOrUndefined)(e.args)||n.i(r.isNullOrUndefined)(e.x)&&n.i(r.isNullOrUndefined)(e.y))&&this.parent.emojiPickerSettings.showSearchBox){var C=n.i(r.createElement)("input",{id:"e-rte-emoji-search",className:"e-rte-emoji-search"});this.popDiv.append(C);new l.TextBox({placeholder:this.i10n.getConstant("emojiPickerTypeToFind"),showClearButton:!0}).appendTo(C),C.focus()}var y=this.popupObj.element.querySelector(".e-clear-icon");n.i(r.isNullOrUndefined)(y)||r.EventHandler.add(y,"mousedown",this.searchFilter,this);var N=this.parent.createElement("div",{className:"e-rte-emojipicker-toolbar"});this.popDiv.appendChild(N);for(var E=[],S=0;S<this.parent.emojiPickerSettings.iconsSet.length;S++)n.i(r.isNullOrUndefined)(this.parent.emojiPickerSettings.iconsSet[S].iconCss)?E.push({text:"&#x"+this.parent.emojiPickerSettings.iconsSet[S].code+";",htmlAttributes:(a={},a.title=this.parent.emojiPickerSettings.iconsSet[S].name,a)}):E.push({prefixIcon:this.parent.emojiPickerSettings.iconsSet[S].iconCss,htmlAttributes:(t={},t.title=this.parent.emojiPickerSettings.iconsSet[S].name,t)});new s.Toolbar({items:E,clicked:this.emojiToolbarClick.bind(this)}).appendTo(N);var T=this.parent.createElement("div",{className:"e-rte-emojipicker-btn"});this.popDiv.appendChild(T);var O,k=window.getComputedStyle(this.popDiv);if((!n.i(r.isNullOrUndefined)(e.args)||n.i(r.isNullOrUndefined)(e.x)&&n.i(r.isNullOrUndefined)(e.y))&&this.parent.emojiPickerSettings.showSearchBox){var w=this.parent.element.querySelector(".e-rte-emoji-search").parentElement,L=window.getComputedStyle(w);O=this.popDiv.getBoundingClientRect().height-N.getBoundingClientRect().height-w.getBoundingClientRect().height-parseFloat(L.marginTop)-parseFloat(L.marginBottom)-2*parseFloat(k.borderWidth)+"px",T.style.setProperty("height",O,"important")}else O=this.popDiv.getBoundingClientRect().height-N.getBoundingClientRect().height-2*parseFloat(k.borderWidth)+"px",T.style.setProperty("height",O,"important");for(var S=0;S<h.length;S++){var _=this.parent.createElement("div",{className:"e-rte-emojipicker-group"});T.appendChild(_);var x=this.parent.createElement("div",{className:"e-rte-emojipicker-name"});x.innerText=this.parent.emojiPickerSettings.iconsSet[S].name,x.setAttribute("aria-label",this.parent.emojiPickerSettings.iconsSet[S].name),_.appendChild(x);var D=this.parent.createElement("div",{className:"e-rte-emojipickerbtn-group"});_.appendChild(D);for(var M=0;M<h[S].icons.length;M++){var R=this.parent.createElement("button",{className:"e-btn e-control"});R.innerHTML=this.buttoncode(this.parent.emojiPickerSettings.iconsSet[S].icons[M].code),R.setAttribute("aria-label",this.parent.emojiPickerSettings.iconsSet[S].icons[M].desc),R.setAttribute("title",this.parent.emojiPickerSettings.iconsSet[S].icons[M].desc),D.appendChild(R),R.innerHTML.length>2&&(R.style.fontSize="17px")}}r.EventHandler.add(T,"scroll",this.scrollEvent,this),r.EventHandler.add(T,"click",this.emojiBtnClick,this);var B=this.parent.element.querySelectorAll(".e-rte-emojipicker-btn button");n.i(r.isNullOrUndefined)(this.parent.element.querySelector(".e-rte-emoji-search"))&&!n.i(r.isNullOrUndefined)(e.args)&&(B[0].focus(),n.i(r.addClass)([B[0]],"e-focus"));var A,I=this.parent.element.querySelector(".e-rte-emojipicker-btn"),P=this.parent.element.querySelectorAll(".e-rte-emojipicker-toolbar button");n.i(r.isNullOrUndefined)(I)||(A=Math.round(I.scrollTop)),A<P[0].offsetHeight&&n.i(r.addClass)([P[0]],"e-selected"),this.popupObj&&n.i(r.addClass)([this.divElement],"e-active")},e.prototype.buttoncode=function(e){return e.split("-").map(function(e){return String.fromCodePoint(parseInt(e,16))}).join("")},e.prototype.docClick=function(e){var t=e.args.target;t&&t.classList&&this.popupObj&&!n.i(r.closest)(t,"[id='"+this.popupObj.element.id+"']")&&!t.classList.contains("e-emoji")&&!t.classList.contains("e-toolbar-item")&&this.popupObj&&(n.i(r.removeClass)([this.divElement],"e-active"),this.popupObj.hide())},e.prototype.scrollEvent=function(){var e,t=this.parent.element.querySelector(".e-rte-emojipicker-btn"),i=this.parent.element.querySelectorAll(".e-rte-emojipicker-group"),o=this.parent.element.querySelectorAll(".e-rte-emojipicker-toolbar button");n.i(r.isNullOrUndefined)(t)||(e=Math.round(t.scrollTop));for(var s=0,a=0;a<o.length;a++)e<o[0].offsetHeight&&(n.i(r.isNullOrUndefined)(o[a+1])||n.i(r.removeClass)([o[a+1]],"e-selected"),n.i(r.addClass)([o[0]],"e-selected"));for(var l=0;l<i.length;l++)if(s+=Math.round(i[l].offsetHeight),e>=s){for(var d=0;d<o.length;d++)o[d].classList.contains("e-selected")&&n.i(r.removeClass)([o[d]],"e-selected");n.i(r.isNullOrUndefined)(o[l+1])||n.i(r.addClass)([o[l+1]],"e-selected")}},e.prototype.contentscroll=function(){if(n.i(r.isNullOrUndefined)(this.clickEvent)&&this.popupObj)return n.i(r.removeClass)([this.divElement],"e-active"),void this.popupObj.hide()},e.prototype.emojiToolbarClick=function(e){for(var t={text:e.item.htmlAttributes.title},i=t.text,o=this.parent.element.querySelectorAll(".e-rte-emojipicker-group"),s=this.parent.element.querySelectorAll(".e-rte-emojipicker-btn button"),a=this.parent.element.querySelectorAll(".e-rte-emojipicker-toolbar button"),l=0;l<a.length;l++)a[l].classList.contains("e-selected")&&n.i(r.removeClass)([a[l]],"e-selected");for(var l=0;l<s.length;l++)s[l].classList.contains("e-focus")&&n.i(r.removeClass)([s[l]],"e-focus");var d=this.parent.element.querySelector(".e-rte-emojipicker-btn"),c=0;o.forEach(function(e){var t=e.childNodes[0],o=e.childNodes[1].childNodes[0],s=t.getAttribute("aria-label");i===s?t&&(d.scrollTop=c+10,n.i(r.addClass)([o],"e-focus"),o.focus()):(c+=e.scrollHeight,n.i(r.removeClass)([o],"e-focus"))})},e.prototype.onKeyDown=function(e){var t=this.parent.element.querySelectorAll(".e-rte-emojipicker-btn button"),i=this.parent.element.querySelectorAll(".e-rte-emojipickerbtn-group"),o=this.parent.element.querySelector(".e-rte-emojisearch-btn button");if(27===e.keyCode&&this.popupObj&&(n.i(r.removeClass)([this.divElement],"e-active"),this.popupObj.hide()),13===e.keyCode){document.activeElement.classList.contains("e-btn")&&(this.emojiBtnClick(e),e.preventDefault())}var s=e.srcElement;if(!n.i(r.isNullOrUndefined)(s)&&s.classList.contains("e-rte-emoji-search")&&40===e.keyCode)for(var a=0;a<t.length;a++)t[a].classList.contains("e-focus")&&n.i(r.removeClass)([t[a]],"e-focus");if(n.i(r.isNullOrUndefined)(o))for(var a=0;a<t.length;a++){var l=a;if(t[a].classList.contains("e-focus"))if(40===e.keyCode){if(t.length-4>a){for(var d=0,c=0;c<i.length;c++)for(var u=0;u<i[c].childNodes.length;u++){var h=i[c].childNodes[u];if(h.classList.contains("e-focus")&&1!==d){var p=u,m=i[c].lastChild,f=Math.floor(u%6),g=i[c].childNodes.length-1,b=Math.floor(g%6);if(-1!==p){var v=p+6;if(n.i(r.isNullOrUndefined)(i[c].childNodes[v])){if(n.i(r.isNullOrUndefined)(i[c].childNodes[v])&&!m.classList.contains("e-focus")&&b<f){var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=i[c].lastChild;n.i(r.addClass)([y],"e-focus"),y.focus(),d=1;break}var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=i[c+1].childNodes[f];n.i(r.addClass)([y],"e-focus"),y.focus(),d=1;break}var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=t[l+=6];n.i(r.addClass)([y],"e-focus"),y.focus();break}}}break}}else{if(38===e.keyCode){if(a>=6)for(var d=0,c=0;c<i.length;c++)for(var u=0;u<i[c].childNodes.length;u++){var h=i[c].childNodes[u];if(h.classList.contains("e-focus")&&1!==d){var p=u,N=n.i(r.isNullOrUndefined)(i[c-1])?null:i[c-1].childNodes.length%6||6;if(-1!==p){var E=p-6;if(n.i(r.isNullOrUndefined)(i[c].childNodes[E])){if(n.i(r.isNullOrUndefined)(i[c-1].childNodes[i[c-1].childNodes.length-(N-u)])){var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=i[c-1].lastChild;n.i(r.addClass)([y],"e-focus"),y.focus(),d=1;break}var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=i[c-1].childNodes[i[c-1].childNodes.length-(N-u)];n.i(r.addClass)([y],"e-focus"),y.focus(),d=1;break}var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=t[l-=6];n.i(r.addClass)([y],"e-focus"),y.focus();break}}}else{var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=t[l-=1],S=this.popupObj.element.querySelector(".e-rte-emoji-search");if(n.i(r.isNullOrUndefined)(y)&&!n.i(r.isNullOrUndefined)(S)){S.focus();break}n.i(r.addClass)([y],"e-focus"),y.focus()}break}if(39===e.keyCode){if(t.length!==a+1){var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=t[l+=1];n.i(r.addClass)([y],"e-focus"),t[l].focus()}break}if(37===e.keyCode){if(a>0){var C=t[a];n.i(r.removeClass)([C],"e-focus");var y=t[l-=1];n.i(r.addClass)([y],"e-focus"),t[l].focus()}break}}}else this.filterKeyHandler(e);if(40===e.keyCode){var C=this.parent.element.querySelector(".e-focus");if(n.i(r.isNullOrUndefined)(C)){var y=t[0];n.i(r.addClass)([y],"e-focus"),t[0].focus()}}},e.prototype.filterKeyHandler=function(e){var t=this.parent.element.querySelectorAll(".e-rte-emojisearch-btn button"),i=this.parent.element.querySelector(".e-focus");if(n.i(r.isNullOrUndefined)(i)&&40===e.keyCode){var o=t[0];n.i(r.addClass)([o],"e-focus"),t[0].focus()}else for(var s=0;s<t.length;s++){var a=s,l=t[s];if(l.classList.contains("e-focus"))if(38===e.keyCode){if(s>=6){var d=t[s];n.i(r.removeClass)([d],"e-focus");var o=t[a-=6];n.i(r.addClass)([o],"e-focus"),o.focus();break}var c=t[s];n.i(r.removeClass)([c],"e-focus");var o=t[a-=1],u=this.popupObj.element.querySelector(".e-rte-emoji-search");if(n.i(r.isNullOrUndefined)(o)&&!n.i(r.isNullOrUndefined)(u)){u.focus();break}n.i(r.addClass)([o],"e-focus"),o.focus()}else if(40===e.keyCode){if(t.length-6>s){var h=t[s];n.i(r.removeClass)([h],"e-focus");var o=t[a+=6];n.i(r.addClass)([o],"e-focus"),o.focus();break}}else{if(39===e.keyCode){if(t.length!==s+1){var p=t[s];n.i(r.removeClass)([p],"e-focus");var o=t[a+=1];n.i(r.addClass)([o],"e-focus"),t[a].focus()}break}if(37===e.keyCode&&s>0){var m=t[s];n.i(r.removeClass)([m],"e-focus");var o=t[a-=1];n.i(r.addClass)([o],"e-focus"),t[a].focus();break}}}},e.prototype.searchFilter=function(e,t){var i=this.parent.element.querySelector(".e-rte-emoji-search"),o=this.parent.element.querySelector(".e-content");if(document.activeElement===i||document.activeElement===o){var s=void 0;":"===t||n.i(r.isNullOrUndefined)(t)?n.i(r.isNullOrUndefined)(t)||(s=t):s=t.replace(/^:/,"");var a=n.i(r.isNullOrUndefined)(i)?s:i.value,l=this.parent.element.querySelectorAll(".e-rte-emojipicker-btn button"),d=this.parent.element.querySelector(".e-rte-emojipicker-btn"),c=this.parent.element.querySelectorAll(".e-rte-emojipicker-group"),u=this.parent.element.querySelector(".e-rte-emojipicker-toolbar"),h=this.parent.element.querySelector(".e-rte-emojisearch-btn"),p=this.popDiv.childNodes[0],m=window.getComputedStyle(p),f="SPAN"===p.nodeName?p.getBoundingClientRect().height+parseFloat(m.marginTop)+parseFloat(m.marginBottom):0,g=window.getComputedStyle(this.popDiv),b=n.i(r.isNullOrUndefined)(h)?l:Array.from(l).filter(function(e){return!h.contains(e)});""===a||":"===t?(u.style.display="",d.style.height=this.popDiv.getBoundingClientRect().height-u.getBoundingClientRect().height-f-2*parseFloat(g.borderWidth)+"px",c.forEach(function(e){e.style.display=""})):(c.forEach(function(e){e.style.display="none"}),u.style.display="none",d.style.height=this.popDiv.getBoundingClientRect().height-f-2*parseFloat(g.borderWidth)+"px");var v=this.parent.createElement("div",{className:"e-rte-emojisearch-btn"}),C=this.parent.element.querySelector(".e-rte-emojisearch-btn");C&&C.remove();for(var y=this.parent.createElement("div",{className:"e-rte-emojiSearch-noEmoji"}),N=!0,E=0;E<b.length;E++)if(!n.i(r.isNullOrUndefined)(b[E].getAttribute("title")))for(var S=b[E].getAttribute("title").toLowerCase(),T=S.split(" "),O=0;O<T.length;O++)if(T[O].startsWith(a.toLowerCase())&&""!==a){var k=b[E].cloneNode(!0);v.appendChild(k),N=!1;break}N&&!this.parent.element.querySelector(".e-rte-emojiSearch-noEmoji")&&""!==a&&":"!==t?(y.innerHTML='<span style="color: rgba(0, 0, 0, 0.75); font-weight: 500; font-size: 16px;">'+this.i10n.getConstant("emojiPickerNoResultFound")+' 😥 </span><br><span style="color: rgba(0, 0, 0, 0.75);"> '+this.i10n.getConstant("emojiPickerTrySomethingElse")+" ? </span>",y.style.margin="55px",d.appendChild(y)):(!N&&this.parent.element.querySelector(".e-rte-emojiSearch-noEmoji")||""===a&&":"===t)&&d.removeChild(this.parent.element.querySelector(".e-rte-emojiSearch-noEmoji")),d.appendChild(v)}},e.prototype.emojiBtnClick=function(e){for(var t=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0}),i=this.parent.element.querySelectorAll(".e-rte-emojipicker-popup [data-tooltip-id]"),o=0;o<i.length;o++)i[o].dispatchEvent(t);var s=e.target;if("BUTTON"===s.tagName){s.focus();var a=this.save.startOffset,l=this.save.range.startContainer.textContent,d=l.substring(a,a+1);n.i(r.isNullOrUndefined)(this.clickEvent)&&":"===d||this.save.restore(),this.popupObj&&(n.i(r.removeClass)([this.divElement],"e-active"),this.popupObj.hide());var c=e;this.parent.formatter.process(this.parent,{item:{command:"EmojiPicker",subCommand:"EmojiPicker",value:s.innerHTML}},e,c)}},e.prototype.onkeyPress=function(e){var t=e.args,o=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().contentWindow.getSelection():this.parent.contentModule.getDocument().getSelection();if(!(o.rangeCount<=0)){var s=o.getRangeAt(0),a=s.startOffset,l=o.focusNode.textContent.substring(a-1,a),d=/\s/.test(l),c=":"===o.focusNode.textContent.substring(a-1,a),u=":"===o.focusNode.textContent.charAt(a-1);if(186===t.keyCode&&t.shiftKey&&(d||0===o.focusOffset)){var h=this.getCoordinates();this.parent.showEmojiPicker(h.left,h.top)}if(8===t.keyCode&&u&&this.popupObj&&(n.i(r.removeClass)([this.divElement],"e-active"),this.popupObj.hide()),32===t.keyCode&&c&&this.popupObj){n.i(r.removeClass)([this.divElement],"e-active");var p=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().ownerDocument:this.parent.contentModule.getDocument();this.parent.showTooltip&&!n.i(r.isNullOrUndefined)(p.querySelector(".e-tooltip-wrap"))&&this.parent.notify(i._93,{args:event}),this.popupObj.hide()}!this.popupObj||37!==t.keyCode&&38!==t.keyCode&&39!==t.keyCode&&27!==t.keyCode&&40!==t.keyCode||(this.onKeyDown(t),t.preventDefault())}},e.prototype.onkeyUp=function(e){var t=e.args,i=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().contentWindow.getSelection():this.parent.contentModule.getDocument().getSelection();if(!(i.rangeCount<=0)){for(var o,s=i.getRangeAt(0),a=s.startOffset,l=0,d=a-1;d>=a-15;d--){/:$/.test(i.focusNode.textContent.substring(d-1,d))&&!n.i(r.isNullOrUndefined)(this.popDiv)&&0===l&&(o=s.startContainer.textContent.substring(d-1,a),this.searchFilter(t,o),l=1)}var c=i.focusNode.textContent.substring(a-1,a);":"!==c||n.i(r.isNullOrUndefined)(this.popupObj)||(o=c,this.searchFilter(t,o))}},e.prototype.getCoordinates=function(){var e,t,i=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().contentWindow.getSelection():window.getSelection(),o=i.getRangeAt(0);"P"!==o.startContainer.nodeName&&"DIV"!==o.startContainer.nodeName||"#text"!==o.startContainer.childNodes[0].nodeName&&(t=o.startContainer.childNodes[0]);var s=n.i(r.isNullOrUndefined)(t)?o.getBoundingClientRect():t.getBoundingClientRect(),a=this.parent.element.querySelector(".e-rte-content"),l=this.parent.element,d=l.offsetHeight-a.offsetHeight,c=s.top-this.parent.inputElement.getBoundingClientRect().top,u=s.left-this.parent.inputElement.getBoundingClientRect().left,h=window.innerHeight,p=c,m=u+s.width;return l.getBoundingClientRect().top<0&&(p=p+a.getBoundingClientRect().top-d),s.top<330?p=p:s.top+330>h&&(p-=350),this.parent.inputElement&&(e={top:p+60,left:m+8}),e},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i._92,this.toolbarClick),this.parent.off(i._40,this.docClick),this.parent.off(i.v,this.onkeyPress),this.parent.off(i.u,this.onkeyUp),this.parent.off(i._28,this.contentscroll),this.parent.off(i._27,this.contentscroll))},e.prototype.getModuleName=function(){return"emojiPicker"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(0),r=(n.n(i),n(1)),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(r._46,this.enterHandler,this),this.parent.on(r.i,this.destroy,this),this.parent.on(r._44,this.moduleDestroy,this)},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.removeEventListener=function(){this.parent.off(r._46,this.enterHandler),this.parent.off(r.i,this.destroy),this.parent.off(r._44,this.moduleDestroy)},e.prototype.getRangeNode=function(){this.range=this.parent.getRange(),this.startNode="#text"===this.range.startContainer.nodeName?this.range.startContainer.parentElement:this.range.startContainer,this.endNode="#text"===this.range.endContainer.nodeName?this.range.endContainer.parentElement:this.range.endContainer},e.prototype.enterHandler=function(e){var t=this;this.getRangeNode();var o=!0;if(this.formatTags=["h1","h2","h3","h4","h5","h6","blockquote"],!n.i(i.isNullOrUndefined)(this.startNode.closest("TABLE"))&&!n.i(i.isNullOrUndefined)(this.endNode.closest("TABLE"))){o=!1;for(var s=this.startNode,a=s;!this.parent.formatter.editorManager.domNode.isBlockNode(s);)s=s.parentElement,a=s;o="TD"!==a.tagName&&"TBODY"!==a.tagName}if(13===e.args.which&&!e.args.ctrlKey&&(i.Browser.isDevice?"Enter"===e.args.key:"Enter"===e.args.code)&&n.i(i.isNullOrUndefined)(this.startNode.closest("LI, UL, OL"))&&n.i(i.isNullOrUndefined)(this.endNode.closest("LI, UL, OL"))&&o&&n.i(i.isNullOrUndefined)(this.startNode.closest("PRE"))&&n.i(i.isNullOrUndefined)(this.endNode.closest("PRE"))){var l=e.args.shiftKey,d={cancel:!1,name:r.S,requestType:l?"ShiftEnterAction":"EnterAction",originalEvent:e.args};this.parent.trigger(r.S,d,function(s){if(!s.cancel){if(t.range.startOffset!==t.range.endOffset||t.range.startContainer!==t.range.endContainer)if("SPAN"===t.range.startContainer.nodeName&&(t.range.startContainer.classList.contains("e-video-wrap")||t.range.startContainer.classList.contains("e-audio-wrap"))||t.range.deleteContents(),"#text"===t.range.startContainer.nodeName&&0===t.range.startContainer.textContent.length&&t.range.startContainer.parentElement!==t.parent.inputElement)"BR"===t.parent.enterKey?t.range.startContainer.parentElement.innerHTML="​":t.range.startContainer.parentElement.innerHTML="<br>";else if(t.range.startContainer===t.parent.inputElement&&""===t.range.startContainer.innerHTML){t.range.startContainer.innerHTML="<br>";var a=t.range.startContainer.childNodes[t.range.startOffset];t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),a,0)}else if(t.parent.inputElement===t.range.startContainer){var a=t.range.startContainer.childNodes[t.range.startOffset];if("#text"===a.nodeName&&0===a.textContent.length)t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),a,0===a.textContent.length?0:a.previousSibling.textContent.length);else if(t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),a,a.textContent.length>=0?0:1),0===a.previousSibling.textContent.length){if(n.i(i.detach)(a.previousSibling),!l){for(var d=n.i(i.isNullOrUndefined)(a.lastChild)?a:a.lastChild;!n.i(i.isNullOrUndefined)(d)&&"#text"!==d.nodeName&&"BR"!==d.nodeName;)d=d.lastChild;"BR"!==d.nodeName&&0===d.parentElement.textContent.length&&0===d.parentElement.innerHTML.length&&"BR"!==d.parentElement.nodeName&&d.parentElement.appendChild(t.parent.createElement("BR")),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),"BR"===d.nodeName?d:d.parentElement,d.parentElement.textContent.length>=0||"BR"===d.nodeName?0:1)}}else if(0===a.textContent.length){for(var d="#text"===a.previousSibling.nodeName?a.previousSibling:a.previousSibling.lastChild;!n.i(i.isNullOrUndefined)(d)&&"#text"!==d.nodeName;)d=d.lastChild;t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),d,d.textContent.length),n.i(i.detach)(a)}else if("BR"!==t.parent.enterKey&&0!==a.previousSibling.textContent.length&&0!==a.textContent.length)return void e.args.preventDefault();t.getRangeNode()}if(t.range.startContainer===t.range.endContainer&&t.range.startOffset===t.range.endOffset&&t.range.startContainer===t.parent.inputElement){if(1!==t.parent.inputElement.childNodes.length||"TABLE"!==t.parent.inputElement.childNodes[0].nodeName)if(n.i(i.isNullOrUndefined)(t.range.startContainer.childNodes[t.range.startOffset])){for(var c=t.range.startContainer.childNodes[t.range.startOffset-1];null!==c.lastChild&&"#text"!==c.nodeName;)c=c.lastChild;t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),c,"BR"===c.nodeName?0:c.textContent.length)}else t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),t.range.startContainer.childNodes[t.range.startOffset],0);t.getRangeNode()}if("P"===t.parent.enterKey&&!l||"DIV"===t.parent.enterKey&&!l||"P"===t.parent.shiftEnterKey&&l||"DIV"===t.parent.shiftEnterKey&&l){if(1===t.range.startOffset&&1===t.parent.inputElement.childNodes.length&&"TABLE"===t.parent.inputElement.childNodes[0].nodeName){var u=t.createInsertElement(l);u.appendChild(t.parent.createElement("BR")),t.parent.inputElement.appendChild(u),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),u,0)}else{var h=void 0;h=o&&t.parent.formatter.editorManager.domNode.isBlockNode(t.startNode)?t.startNode:t.parent.formatter.editorManager.domNode.blockParentNode(t.startNode);var p=!1,m=!1;if(0===t.range.startOffset||0===t.range.endOffset||t.range.startContainer!==t.range.endContainer||!n.i(i.isNullOrUndefined)(h.childNodes[0])&&("IMG"===h.childNodes[0].nodeName||h.querySelectorAll("img, audio, video").length>0))0===t.range.startOffset&&0===t.range.endOffset&&(m=!0);else{var f=t.range.startContainer.textContent,g=f.substring(0,t.range.startOffset);160!==g.charCodeAt(t.range.startOffset-1)&&0===g.trim().length&&(m=!0)}t.removeBRElement(h);if(!(-1!==i.Browser.userAgent.indexOf("Firefox")&&0===t.range.startOffset&&t.range.startContainer===t.range.endContainer&&"#text"===t.range.startContainer.nodeName&&!t.parent.formatter.editorManager.domNode.isBlockNode(t.range.startContainer.previousSibling)&&t.range.startContainer.parentElement===t.range.startContainer.previousSibling.parentElement)&&(0===t.range.startOffset&&0===t.range.endOffset||m)&&(n.i(i.isNullOrUndefined)(t.range.startContainer.previousSibling)||"IMG"!==t.range.startContainer.previousSibling.nodeName&&"BR"!==t.range.startContainer.previousSibling.nodeName)){var b=void 0,u=void 0;n.i(i.isNullOrUndefined)(t.range.startContainer.childNodes)||0!==t.range.startContainer.textContent.length&&("#text"===t.range.startContainer.nodeName||n.i(i.isNullOrUndefined)(t.range.startContainer.querySelector(".e-video-clickelem"))||0!==t.range.startContainer.querySelector(".e-video-clickelem").textContent.length)||!(t.range.startContainer.querySelectorAll("img, audio, video").length>0)&&n.i(i.isNullOrUndefined)(t.range.startContainer.querySelector(".e-video-clickelem"))&&"IMG"!==t.range.startContainer.nodeName&&"TABLE"!==t.range.startContainer.nodeName?0!==h.textContent.trim().length||"IMG"===h.childNodes[0].nodeName||""===h.textContent.trim()&&h.querySelectorAll("img, audio, video").length>0?(t.range.startOffset===t.range.endOffset&&0!==t.range.startOffset?u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!1).cloneNode(!0):(u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!0).cloneNode(!0),p=!0),b=!1):(u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!0).cloneNode(!0),b=!0):(u=t.createInsertElement(l),p=!0,b=!1);var v=void 0;for(v=t.formatTags.indexOf(u.nodeName.toLocaleLowerCase())<0?t.createInsertElement(l):t.parent.createElement(u.nodeName);u.firstChild;)v.appendChild(u.firstChild);if(h.parentElement.insertBefore(v,h),!b){var d=v,C=void 0;if(t.range.startOffset===t.range.endOffset&&0!==t.range.startOffset)for(;!n.i(i.isNullOrUndefined)(d)&&"#text"!==d.nodeName&&"BR"!==d.nodeName;)C=d,d=d.lastChild;else C=d;C.innerHTML="<br>",p||n.i(i.detach)(h)}t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),v.nextElementSibling,0)}else if(0!==h.textContent.length||(!n.i(i.isNullOrUndefined)(h.childNodes[0])&&"IMG"===h.childNodes[0].nodeName||h.querySelectorAll("video").length>0||h.querySelectorAll("audio").length>0||h.querySelectorAll("img").length>0))if(t.range.startContainer===t.range.endContainer&&"SPAN"===t.range.startContainer.nodeName&&(t.range.startContainer.classList.contains("e-video-wrap")||t.range.startContainer.classList.contains("e-audio-wrap"))){if(h.textContent.trim().length>0){for(var u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!0),y=n.i(i.isNullOrUndefined)(u.previousSibling.querySelector(".e-video-wrap"))?u.previousSibling.querySelector(".e-audio-wrap"):u.previousSibling.querySelector(".e-video-wrap"),N=!1,E=y.previousSibling;!n.i(i.isNullOrUndefined)(E)&&"#text"!==E.nodeName;)E=E.lastChild;if(n.i(i.isNullOrUndefined)(E)){var S=t.parent.createElement("br");y.parentElement.appendChild(S),N=!0}N?t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),y.parentElement,0):t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),E,E.textContent.length),n.i(i.detach)(y)}else{for(var u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!0),a=u.previousSibling;!n.i(i.isNullOrUndefined)(a.firstChild);)n.i(i.detach)(a.firstChild);var S=t.parent.createElement("br");a.appendChild(S),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),a,0)}n.i(i.isNullOrUndefined)(t.parent.audioModule)||t.parent.audioModule.hideAudioQuickToolbar(),n.i(i.isNullOrUndefined)(t.parent.videoModule)||t.parent.videoModule.hideVideoQuickToolbar()}else{var u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!0);if(n.i(i.isNullOrUndefined)(u.childNodes[0])||"#text"!==u.childNodes[0].nodeName||0!==u.childNodes[0].textContent.length||n.i(i.detach)(u.childNodes[0]),0===u.textContent.trim().length){var S=t.parent.createElement("br");if("A"===t.startNode.nodeName){var T=t.startNode.parentElement;t.startNode.parentElement.insertBefore(S,t.startNode),n.i(i.detach)(t.startNode),t.startNode=T}else"BR"!==t.startNode.nodeName&&t.startNode.appendChild(S);"\n"===u.childNodes[0].textContent&&n.i(i.detach)(u.childNodes[0]),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),t.startNode,0)}if(("P"===t.parent.enterKey||"DIV"===t.parent.enterKey)&&!l||("DIV"===t.parent.shiftEnterKey||"P"===t.parent.shiftEnterKey)&&l){var O=t.formatTags.indexOf(u.nodeName.toLocaleLowerCase());if(O<0||O>=0&&0===u.textContent.trim().length){for(var k=t.createInsertElement(l);u.firstChild;)k.appendChild(u.firstChild);t.parent.formatter.editorManager.domNode.insertAfter(k,u),n.i(i.detach)(u),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),t.parent.formatter.editorManager.domNode.isBlockNode(t.startNode)?k:t.startNode,0)}}}else if(n.i(i.isNullOrUndefined)(h.children[0])||"BR"===h.children[0].tagName){var v=t.createInsertElement(l);v.innerHTML="<br>",t.parent.formatter.editorManager.domNode.insertAfter(v,h),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),v,0)}else{var u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,h,!1).cloneNode(!0);t.parent.formatter.editorManager.domNode.insertAfter(u,h),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),u,u.textContent.length>=0?0:1)}}e.args.preventDefault()}if("BR"===t.parent.enterKey&&!l||"BR"===t.parent.shiftEnterKey&&l){var w=void 0;if(t.parent.formatter.editorManager.domNode.isBlockNode(t.startNode))w=t.startNode;else{for(var L=t.startNode,_=L;!t.parent.formatter.editorManager.domNode.isBlockNode(L);)_=L,L=L.parentElement;w=L===t.parent.inputElement?_:L}t.removeBRElement(w);for(var x=w.lastChild;!n.i(i.isNullOrUndefined)(x)&&"#text"!==x.nodeName&&"BR"!==x.nodeName&&"IMG"!==x.nodeName;)x=x.lastChild;var D=t.range.startContainer===x?t.range.startContainer.textContent.length:w.textContent.length,M="IMG"===t.range.startContainer.nodeName||t.range.startContainer.childNodes.length>0&&"IMG"===t.range.startContainer.childNodes[t.range.startOffset].nodeName;if(w!==t.parent.inputElement&&t.parent.formatter.editorManager.domNode.isBlockNode(w)&&t.range.startOffset===t.range.endOffset&&(t.range.startOffset===D||0===w.textContent.trim().length&&M)){var R=t.parent.createElement("br");if(0===t.range.startOffset&&"TABLE"===t.range.startContainer.nodeName)t.range.startContainer.parentElement.insertBefore(R,t.range.startContainer);else if("BR"===x.nodeName&&0===w.textContent.length)t.parent.formatter.editorManager.domNode.insertAfter(R,x);else if(0===t.range.startOffset&&0===t.range.endOffset&&M){var B="IMG"===t.range.startContainer.nodeName?t.range.startContainer:t.range.startContainer.childNodes[t.range.startOffset];w.insertBefore(R,B),R=B}else{var A=t.parent.createElement("br");t.parent.formatter.editorManager.domNode.insertAfter(R,t.range.startContainer),t.parent.formatter.editorManager.domNode.insertAfter(A,t.range.startContainer)}t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),R,0)}else if(n.i(i.isNullOrUndefined)(w)||w===t.parent.inputElement||"BR"===w.nodeName)t.insertBRElement();else if(0===w.textContent.trim().length||1===w.textContent.trim().length&&8203===w.textContent.charCodeAt(0)){var u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,w,!0).cloneNode(!0);t.parent.formatter.editorManager.domNode.insertAfter(u,w);var I=t.parent.createElement("br");u.parentElement.insertBefore(I,u),t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),u,0)}else{var u=void 0,I=t.parent.createElement("br");if(0!==t.range.startOffset||0!==t.range.endOffset||n.i(i.isNullOrUndefined)(w.previousSibling)||"BR"!==w.previousSibling.nodeName||"P"===w.nodeName||"DIV"===w.nodeName)t.insertBRElement();else{u=t.parent.formatter.editorManager.nodeCutter.SplitNode(t.range,w,!1).cloneNode(!0),t.parent.formatter.editorManager.domNode.insertAfter(I,w),t.insertFocusContent();for(var d=I.nextSibling;!n.i(i.isNullOrUndefined)(d)&&"#text"!==d.nodeName;)d=d.lastChild;t.parent.formatter.editorManager.nodeSelection.setCursorPoint(t.parent.contentModule.getDocument(),d,0),!0}}e.args.preventDefault()}t.parent.trigger(r.T,{requestType:l?"ShiftEnterAction":"EnterAction",args:e.args})}})}},e.prototype.removeBRElement=function(e){-1!==i.Browser.userAgent.indexOf("Firefox")&&this.range.endOffset===e.textContent.length&&(0!==e.textContent.length||e.querySelectorAll("BR").length>1)&&!n.i(i.isNullOrUndefined)(e.lastChild)&&"BR"===e.lastChild.nodeName&&n.i(i.detach)(e.lastChild)},e.prototype.insertBRElement=function(){var e=!1,t=!0;0===this.range.endContainer.textContent.length&&"BR"===this.range.startContainer.nodeName&&(t=!1);var r=this.parent.createElement("br");if("BR"===this.startNode.nodeName&&"BR"===this.endNode.nodeName&&0===this.range.startOffset&&this.range.startOffset===this.range.endOffset?(this.parent.formatter.editorManager.domNode.insertAfter(r,this.startNode),e=!0):(this.startNode!==this.parent.inputElement||n.i(i.isNullOrUndefined)(this.range.startContainer.previousSibling)||"BR"!==this.range.startContainer.previousSibling.nodeName||0!==this.range.startContainer.textContent.length||(e=!0),this.range.insertNode(r)),e||!n.i(i.isNullOrUndefined)(r.nextElementSibling)&&"BR"===r.nextElementSibling.tagName||!n.i(i.isNullOrUndefined)(r.nextSibling)&&r.nextSibling.textContent.length>0)this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),!n.i(i.isNullOrUndefined)(r.nextSibling)&&t?r.nextSibling:r,0),e=!1;else{var o=this.parent.createElement("br");this.range.insertNode(o),this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),r,0)}},e.prototype.insertFocusContent=function(){0===this.range.startContainer.textContent.length&&("#text"===this.range.startContainer.nodeName?this.range.startContainer.parentElement.innerHTML="​":this.range.startContainer.innerHTML="​")},e.prototype.createInsertElement=function(e){var t;"DIV"===this.parent.enterKey&&!e||"DIV"===this.parent.shiftEnterKey&&e?t=this.parent.createElement("div"):("P"===this.parent.enterKey&&!e||"P"===this.parent.shiftEnterKey&&e)&&(t=this.parent.createElement("p"));var r=this.parent.formatter.editorManager.domNode.blockNodes()[0].previousSibling,o=this.parent.formatter.editorManager.domNode.blockNodes()[0].nextSibling;return!n.i(i.isNullOrUndefined)(r)&&r.hasAttribute("style")&&t.setAttribute("style",r.getAttribute("style")),n.i(i.isNullOrUndefined)(r)&&!n.i(i.isNullOrUndefined)(o)&&o.hasAttribute("style")&&t.setAttribute("style",o.getAttribute("style")),t},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(0),r=(n.n(i),n(13)),o=(n.n(r),n(5)),s=n(1),a=n(2),l=n(4),d=function(){function e(e,t){r.FileManager.Inject(r.ContextMenu,r.DetailsView,r.NavigationPane,r.Toolbar),this.parent=e,this.i10n=t.getService("rteLocale"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.rendererFactory=t.getService("rendererFactory"),this.addEventListener()}return e.prototype.initialize=function(){this.parent.fileManagerModule=this,this.contentModule=this.rendererFactory.getRenderer(o.a.Content)},e.prototype.render=function(e){var t,n=this;t=e.selectNode&&"IMG"===e.selectNode[0].nodeName?this.parent.localeObj.getConstant("dialogUpdate"):this.i10n.getConstant("dialogInsert");var r=this.parent.localeObj.getConstant("fileDialogHeader"),o=this.i10n.getConstant("dialogCancel");this.dlgButtons=[{click:this.insertImageUrl.bind(this),buttonModel:{content:t,cssClass:"e-flat e-insertImage",isPrimary:!0}},{click:function(e){n.cancelDialog()},buttonModel:{cssClass:"e-flat e-cancel",content:o}}],this.dlgButtons[0].buttonModel.disabled=!0,this.selectObj={selection:e.selection,args:e.args,selectParent:e.selectParent};var s=this.parent.createElement("div",{className:"e-rte-file-manager-dialog",id:this.parent.getID()+"_file-manager-dialog",attrs:{"aria-owns":this.parent.getID()}});document.body.appendChild(s),this.fileWrap=this.parent.createElement("div",{id:this.parent.getID()+"_rte-file-manager",className:"e-img-file-wrap"}),s.appendChild(this.fileWrap),s.appendChild(this.getInputUrlElement());var l={visible:!1,isModal:!0,header:r,target:document.body,locale:this.parent.locale,enableRtl:this.parent.enableRtl,cssClass:a._12,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,width:"720px",height:"auto",position:{X:"center",Y:"center"},buttons:this.dlgButtons,created:this.renderFileManager.bind(this),close:function(e){n.parent.isBlur=!1,e&&e.event.returnValue&&n.selectObj.selection.restore(),n.destroyComponents(),n.dialogRenderObj.close(e)}};this.dialogObj=this.dialogRenderObj.render(l),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(s),this.dialogObj.show(!!i.Browser.isDevice),this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.setCssClass=function(e){this.dialogObj&&e.cssClass&&(n.i(i.isNullOrUndefined)(e.oldCssClass)?this.dialogObj.setProperties({cssClass:(this.dialogObj.cssClass+" "+e.cssClass).trim()}):this.dialogObj.setProperties({cssClass:(this.dialogObj.cssClass.replace(e.oldCssClass,"").trim()+" "+e.cssClass).trim()}))},e.prototype.renderFileManager=function(){var e=this,t=this;this.fileObj=new r.FileManager({allowMultiSelection:!1,locale:this.parent.locale,enableRtl:this.parent.enableRtl,path:this.parent.fileManagerSettings.path,view:this.parent.fileManagerSettings.view,enablePersistence:this.parent.enablePersistence,cssClass:this.parent.fileManagerSettings.cssClass,sortOrder:this.parent.fileManagerSettings.sortOrder,ajaxSettings:this.parent.fileManagerSettings.ajaxSettings,showThumbnail:this.parent.fileManagerSettings.showThumbnail,rootAliasName:this.parent.fileManagerSettings.rootAliasName,uploadSettings:this.parent.fileManagerSettings.uploadSettings,searchSettings:this.parent.fileManagerSettings.searchSettings,toolbarSettings:this.parent.fileManagerSettings.toolbarSettings,showHiddenItems:this.parent.fileManagerSettings.showHiddenItems,allowDragAndDrop:this.parent.fileManagerSettings.allowDragAndDrop,showFileExtension:this.parent.fileManagerSettings.showFileExtension,detailsViewSettings:this.parent.fileManagerSettings.detailsViewSettings,contextMenuSettings:this.parent.fileManagerSettings.contextMenuSettings,navigationPaneSettings:this.parent.fileManagerSettings.navigationPaneSettings,beforeSend:this.parent.fileManagerSettings.beforeSend,fileSelect:function(n){var i=n.fileDetails;i.isFile&&t.parent.insertImageSettings.allowedTypes.indexOf(i.type)>-1?(t.inputUrl.value=t.parent.fileManagerSettings.ajaxSettings.getImageUrl+"?path="+(i.filterPath&&i.filterPath.replace(/\\/g,"/"))+i.name,e.dlgButtons[0].buttonModel.disabled=!1):(t.inputUrl.value="",e.dlgButtons[0].buttonModel.disabled=!0),e.dialogObj.buttons=e.dlgButtons},created:function(){e.inputUrl.removeAttribute("disabled")},success:function(){e.fileObj.refreshLayout()}}),i.Browser.isDevice&&(this.fileObj.height="85%"),this.fileObj.appendTo(this.fileWrap),i.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this)},e.prototype.getInputUrlElement=function(){var e=this.parent.createElement("div",{className:"imgUrl"}),t=this.parent.createElement("div",{className:"e-rte-label"});t.innerHTML='<label for="rteSample_img_url">'+this.i10n.getConstant("linkWebUrl")+"</label>",e.appendChild(t);var n=this.i10n.getConstant("imageUrl");return this.inputUrl=this.parent.createElement("input",{className:"e-input e-img-url",attrs:{placeholder:n,spellcheck:"false",disabled:"true"}}),e.appendChild(this.inputUrl),e},e.prototype.insertImageUrl=function(e){var t=this.inputUrl.value;if(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),""!==t){if("HTML"===this.parent.editorMode&&n.i(i.isNullOrUndefined)(n.i(i.closest)(this.selectObj.selection.range.startContainer.parentNode,"#"+this.contentModule.getPanel().id))){this.contentModule.getEditPanel().focus();var r=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());this.selectObj.selection=this.parent.formatter.editorManager.nodeSelection.save(r,this.contentModule.getDocument()),this.selectObj.selectParent=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(r)}var o=/[\w-]+.(jpg|png|jpeg|gif)/g,s=n.i(i.isNullOrUndefined)(t.match(o))||"HTML"!==this.parent.editorMode?"":t.match(o)[0],l={cssClass:"inline"===this.parent.insertImageSettings.display?a._3:a.T,url:t,selection:this.selectObj.selection,altText:s,selectParent:this.selectObj.selectParent,width:{width:this.parent.insertImageSettings.width,minWidth:this.parent.insertImageSettings.minWidth,maxWidth:this.parent.getInsertImgMaxWidth()},height:{height:this.parent.insertImageSettings.height,minHeight:this.parent.insertImageSettings.minHeight,maxHeight:this.parent.insertImageSettings.maxHeight}};this.parent.formatter.process(this.parent,this.selectObj.args,this.selectObj.args.originalEvent,l),this.dialogObj.hide({returnValue:!1})}},e.prototype.cancelDialog=function(){this.parent.isBlur=!1,this.dialogObj.hide({returnValue:!0})},e.prototype.onDocumentClick=function(e){var t=e.target,r="#document"!==t.nodeName&&!n.i(i.isNullOrUndefined)(t.previousElementSibling)&&t.previousElementSibling;n.i(i.isNullOrUndefined)(this.dialogObj)||n.i(i.closest)(t,"#"+this.parent.getID()+"_file-manager-dialog")||n.i(i.closest)(t,"#"+this.parent.getID()+"_rte-file-manager_tb_sortby-popup")||n.i(i.closest)(t,"#"+this.parent.getID()+"_rte-file-manager_tb_view-popup")||n.i(i.closest)(t,"#"+this.parent.getID()+"_rte-file-manager_contextmenu")||!n.i(i.isNullOrUndefined)(n.i(i.closest)(t,".e-contextmenu-wrapper"))&&n.i(i.closest)(t,".e-contextmenu-wrapper").querySelector("#"+this.parent.getID()+"_rte-file-manager_contextmenu")||n.i(i.isNullOrUndefined)(r)||r.classList.contains("e-rte-file-manager-dialog")||n.i(i.isNullOrUndefined)(r)||r.id===this.parent.getID()+"_rte-file-manager_contextmenu"?this.parent.isRTE=!0:(this.dialogObj.hide({returnValue:!0}),this.parent.isBlur=!0,n.i(l.l)(this.parent.element,"focusout"))},e.prototype.addEventListener=function(){this.parent.on(s.g,this.initialize,this),this.parent.on(s._73,this.render,this),this.parent.on(s._89,this.setCssClass,this),this.parent.on(s.i,this.destroy,this)},e.prototype.removeEventListener=function(){i.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick),this.parent.off(s.g,this.initialize),this.parent.off(s._73,this.render),this.parent.off(s._89,this.setCssClass),this.parent.off(s.i,this.destroy)},e.prototype.destroyComponents=function(){this.fileObj&&(this.fileObj.destroy(),this.fileObj=null),this.dialogObj&&(this.dialogObj.destroy(),n.i(i.detach)(this.dialogObj.element),this.dialogObj=null)},e.prototype.destroy=function(){this.parent.isDestroyed||(this.destroyComponents(),this.removeEventListener())},e.prototype.getModuleName=function(){return"fileManager"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(0),r=(n.n(i),n(1)),o=function(){function e(e){this.isSticky=!1,this.isActive=!1,this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(r._90,this.toolbarClick,this),this.parent.on(r._91,this.toolbarDoubleClick,this),this.parent.on(r._26,this.editAreaClick,this),this.parent.on(r.v,this.onKeyDown,this),this.parent.on(r.i,this.destroy,this)},e.prototype.toolbarClick=function(e){this.parent.focusIn(),this.isSticky?(e.args.action="escape",this.actionHandler(e,"keyBoard")):(this.isActive=!0,this.actionHandler(e,"click")),this.parent.quickToolbarModule&&!n.i(i.isNullOrUndefined)(this.parent.quickToolbarSettings.text)&&this.parent.element.ownerDocument.contains(this.parent.quickToolbarModule.textQTBar.element)&&this.parent.quickToolbarModule.textQTBar.hidePopup()},e.prototype.toolbarDoubleClick=function(e){this.isActive=!0,this.isSticky=!0,this.parent.focusIn(),this.actionHandler(e,"dbClick")},e.prototype.onKeyDown=function(e){var t=e.args;(n.i(i.isNullOrUndefined)(t)||n.i(i.isNullOrUndefined)(t.action)||"format-copy"!==t.action&&"format-paste"!==t.action)&&("escape"!==t.action||"format-copy"!==this.previousAction&&"format-paste"!==this.previousAction)||("format-copy"!==t.action&&"format-paste"!==t.action||t.stopPropagation(),this.actionHandler(e,"keyBoard"))},e.prototype.actionHandler=function(e,t){var r,o,s,a,l=!1;switch(t){case"dbClick":s=e.args,a=s.item,o=e.args.originalEvent,r="format-copy";break;case"keyBoard":s=null,o=e.args,l=!0,r=e.args.action,"escape"===r&&(this.isSticky=!1,this.isActive=!1);break;case"click":s=e.args,a=s.item,o=e.args.originalEvent,r="format-copy";break;case"docClick":o=e,r="format-paste"}this.updateCursor(l);var d="docClick"!==t&&"escape"!==r;this.updateToolbarBtn(d),n.i(i.isNullOrUndefined)(a)&&(a={command:"FormatPainter",subCommand:"FormatPainter"});var c={requestType:"FormatPainter",originalEvent:o,name:r,item:a},u={formatPainterAction:r};this.parent.formatter.process(this.parent,c,o,u),this.previousAction=r},e.prototype.updateCursor=function(e){this.parent.inputElement.classList.contains("e-rte-cursor-brush")||e?this.isSticky||n.i(i.removeClass)([this.parent.inputElement],"e-rte-cursor-brush"):n.i(i.addClass)([this.parent.inputElement],"e-rte-cursor-brush")},e.prototype.updateToolbarBtn=function(e){if(!n.i(i.isNullOrUndefined)(this.parent.element.querySelector(".e-rte-format-painter"))){var t=this.parent.element.querySelector(".e-rte-format-painter").parentElement.parentElement;e?n.i(i.addClass)([t],"e-active"):this.isSticky||n.i(i.removeClass)([t],"e-active")}},e.prototype.editAreaClick=function(e){this.isActive&&(this.isSticky||(this.isActive=!1),this.actionHandler(e,"docClick"),this.updateToolbarBtn(!1))},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.parent.isDestroyed||(this.parent.off(r._90,this.toolbarClick),this.parent.off(r._26,this.editAreaClick),this.parent.off(r._91,this.toolbarDoubleClick),this.parent.off(r.v,this.onKeyDown),this.parent.off(r.i,this.destroy),n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.formatPainterEditor)||this.parent.formatter.editorManager.formatPainterEditor.destroy(),this.parent=void 0,this.isSticky=void 0,this.isActive=void 0,this.previousAction=void 0)},e.prototype.getModuleName=function(){return"formatPainter"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return v});var i=n(1),r=n(0),o=(n.n(r),n(71)),s=n(5),a=n(2),l=n(66),d=n(75),c=n(30),u=n(26),h=n(20),p=n(8),m=n(4),f=n(6),g=n(69),b=n(3),v=function(){function e(e,t){this.rangeCollection=[],this.isImageDelete=!1,this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.xhtmlValidation=new g.a(e),this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener()},e.prototype.sanitizeHelper=function(e){return e=n.i(m.u)(e,this.parent)},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.nodeSelectionObj=new h.a,this.colorPickerModule=new u.a(this.parent,this.locator),this.parent.on(i.e,this.instantiateRenderer,this),this.parent.on(i.p,this.onToolbarClick,this),this.parent.on(i.v,this.onKeyDown,this),this.parent.on(i.u,this.onKeyUp,this),this.parent.on(i.o,this.renderColorPicker,this),this.parent.on(i.g,this.render,this),this.parent.on(i.s,this.onPropertyChanged,this),this.parent.on(i.i,this.destroy,this),this.parent.on(i._32,this.selectAll,this),this.parent.on(i._33,this.selectRange,this),this.parent.on(i._34,this.getSelectedHtml,this),this.parent.on(i._18,this.onSelectionSave,this),this.parent.on(i._19,this.onSelectionRestore,this),this.parent.on(i._43,this.updateReadOnly,this),this.parent.on(i._36,this.onPaste,this),this.parent.on(i.c,this.isTableClassAdded,this))},e.prototype.updateReadOnly=function(){this.parent.readonly?(n.i(r.attributes)(this.parent.contentModule.getEditPanel(),{contenteditable:"false"}),n.i(r.addClass)([this.parent.element],a._31)):(n.i(r.attributes)(this.parent.contentModule.getEditPanel(),{contenteditable:"true"}),n.i(r.removeClass)([this.parent.element],a._31))},e.prototype.onSelectionSave=function(){var e=this.contentRenderer.getDocument(),t=this.nodeSelectionObj.getRange(e);this.saveSelection=this.nodeSelectionObj.save(t,e)},e.prototype.onSelectionRestore=function(e){this.parent.isBlur=!1,this.contentRenderer.getEditPanel().focus(),(n.i(r.isNullOrUndefined)(e.items)||e.items)&&this.saveSelection.restore()},e.prototype.isTableClassAdded=function(){for(var e=this.parent.inputElement.querySelectorAll("table"),t=0;t<e.length;t++)e[t].classList.contains("e-rte-table")||e[t].classList.add("e-rte-table")},e.prototype.onKeyUp=function(e){var t,i=e.args,o=[8,9,13,16,17,18,20,27,37,38,39,40,44,45,46,91,112,113,114,115,116,117,118,119,120,121,122,123],s=this.parent.getRange(),a=new RegExp(String.fromCharCode(8203),"g"),l=!1;if(o.indexOf(i.keyCode)<0&&!i.shiftKey&&!i.ctrlKey&&!i.altKey){if(t=s.startOffset,"#text"===s.startContainer.nodeName?s.startContainer.parentElement!==this.parent.inputElement?s.startContainer.parentElement.classList.add("currentStartMark"):l=!0:s.startContainer.classList.add("currentStartMark"),8203===s.startContainer.textContent.charCodeAt(0)){var d=s.startContainer.textContent.length,c=s.startOffset;s.startContainer.textContent=s.startContainer.textContent.replace(a,""),t=0===c?c:c-(d-s.startContainer.textContent.length),this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),s.startContainer,t)}var u=this.parent.inputElement.innerHTML.length,h=this.parent.inputElement.innerHTML.replace(a,"").length,p=s.startContainer;if(u>h&&!l){if(0!==p.textContent.trim().length&&p.previousSibling){var m=document.createElement("span");m.className="tempSpan",s.insertNode(m)}for(var f=this.parent.inputElement.firstChild;!n.i(r.isNullOrUndefined)(f)&&f.textContent.replace(a,"").trim().length>0;)f.innerHTML=f.innerHTML.replace(a,""),f=f.nextElementSibling;var g=this.parent.inputElement.querySelector(".tempSpan");if(g&&g.previousSibling&&0!==p.textContent.trim().length){p=g.previousSibling,t=g.previousSibling.textContent.length;g.parentNode.removeChild(g),g=null}var b=this.parent.inputElement.querySelector(".currentStartMark").childNodes;if(b.length>1)for(var v=0;v<b.length;v++)"#text"===b[v].nodeName&&0===b[v].textContent.length&&(n.i(r.detach)(b[v]),v--),n.i(r.isNullOrUndefined)(b[v])||p.textContent.replace(a,"")!==b[v].textContent||(t=p.textContent.length>1?p.textContent===b[v].textContent?t:t-(p.textContent.length-p.textContent.replace(a,"").length):p.textContent.length,p=b[v]);else 1===b.length&&p.textContent.replace(a,"")===b[0].textContent&&(p=b[0]);this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),p,t)}var C=this.parent.inputElement.querySelector(".currentStartMark");n.i(r.isNullOrUndefined)(C)||(C.classList.remove("currentStartMark"),""===C.getAttribute("class").trim()&&C.removeAttribute("class")),!n.i(r.isNullOrUndefined)(s.startContainer.previousSibling)&&!n.i(r.isNullOrUndefined)(s.startContainer.previousSibling.parentElement)&&s.startContainer.parentElement===s.startContainer.previousSibling.parentElement&&8203===s.startContainer.previousSibling.textContent.charCodeAt(0)&&s.startContainer.previousSibling.textContent.length<=1&&(s.startContainer.previousSibling.textContent=s.startContainer.previousSibling.textContent.replace(a,"")),8203===s.endContainer.textContent.charCodeAt(s.endOffset)&&(t=s.startOffset,s.endContainer.textContent=s.endContainer.textContent.replace(a,""),this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),s.startContainer,t))}},e.prototype.onKeyDown=function(e){var t,o=this,s=e.args;if("chrome"===r.Browser.info.name&&(t=this.parent.getRange(),this.backSpaceCleanup(e,t),this.deleteCleanup(e,t)),9===s.keyCode&&this.parent.enableTabKey&&!n.i(r.isNullOrUndefined)(s.target)&&n.i(r.isNullOrUndefined)(n.i(r.closest)(s.target,".e-rte-toolbar"))){var a=this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()),l=this.nodeSelectionObj.getParentNodeCollection(a);if("LI"!==l[0].nodeName&&!n.i(r.closest)(l[0],"li")&&!n.i(r.closest)(l[0],"table")||0!==a.startOffset)if(s.preventDefault(),s.shiftKey){if(this.rangeCollection.length>0&&4===this.rangeCollection[this.rangeCollection.length-1].startContainer.textContent.length){var d=this.rangeCollection[this.rangeCollection.length-1].startContainer;this.nodeSelectionObj.setSelectionText(this.contentRenderer.getDocument(),d,d,0,d.textContent.length),p.a.Insert(this.contentRenderer.getDocument(),document.createTextNode("")),this.rangeCollection.pop()}}else p.a.Insert(this.contentRenderer.getDocument()," "),this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()))}if(("space"===e.args.action||"enter"===e.args.action||13===e.args.keyCode)&&(this.spaceLink(e.args),"HTML"===this.parent.editorMode&&!this.parent.readonly)){var c=this.parent.getText().trim().replace(/(\r\n|\n|\r)/gm,"").replace(/\u200B/g,"").length,u=this.parent.getSelection().length,h=c-u+1;if(!(-1===this.parent.maxLength||h<=this.parent.maxLength||13!==e.args.keyCode))return void e.args.preventDefault();this.parent.notify(i._46,{args:e.args});var m=this.parent.getRange();n.i(r.isNullOrUndefined)(m.startContainer)||m.startContainer!==this.parent.inputElement.lastChild||"#text"===m.startContainer.nodeName||m.startContainer.scrollIntoView({block:"end",inline:"nearest"})}if("space"===e.args.action){var f=this.parent.getRange(),g=f.startContainer.textContent.slice(0,f.startOffset),v=this.isOrderedList(g),C=this.isUnOrderedList(g);if(v&&!C||C&&!v){var y={callBack:null,event:e.args,name:"keydown-handler"},N={cancel:!1,item:{command:"Lists",subCommand:v?"OL":"UL"},name:"actionBegin",originalEvent:e.args,requestType:v?"OL":"UL"};this.parent.trigger(i.S,N,function(t){t.cancel||(o.parent.formatter.editorManager.observer.notify(b.l,y),o.parent.trigger(i.T,{editorMode:o.parent.editorMode,elements:o.parent.formatter.editorManager.domNode.blockNodes(),event:e.args,name:i.T,range:o.parent.getRange(),requestType:v?"OL":"UL"}))})}}"chrome"!==r.Browser.info.name||(n.i(r.isNullOrUndefined)(this.rangeElement)||n.i(r.isNullOrUndefined)(this.oldRangeElement))&&(n.i(r.isNullOrUndefined)(this.deleteRangeElement)||n.i(r.isNullOrUndefined)(this.deleteOldRangeElement))||"TD"===t.startContainer.parentElement.tagName||"TH"===t.startContainer.parentElement.tagName||(this.rangeElement=null,this.oldRangeElement=null,this.deleteRangeElement=null,this.deleteOldRangeElement=null,this.isImageDelete||s.preventDefault(),s.preventDefault())},e.prototype.isOrderedList=function(e){e=e.replace(/\u200B/g,"");var t=[/^[1]+[.]+$/,/^[i]+[.]+$/,/^[a]+[.]+$/];if(!n.i(r.isNullOrUndefined)(e))for(var i=0;i<t.length;i++)if(t[i].test(e))return!0;return!1},e.prototype.isUnOrderedList=function(e){e=e.replace(/\u200B/g,"");var t=[/^[*]$/,/^[-]$/];if(!n.i(r.isNullOrUndefined)(e))for(var i=0;i<t.length;i++)if(t[i].test(e))return!0;return!1},e.prototype.backSpaceCleanup=function(e,t){var i=!1,o=!0;if(n.i(r.isNullOrUndefined)(t.startContainer.previousSibling)||"SPAN"!==t.startContainer.previousSibling.nodeName||(o="false"!==t.startContainer.previousSibling.contentEditable),"Backspace"===e.args.code&&8===e.args.keyCode&&0===t.startOffset&&0===t.endOffset&&0===this.parent.getSelection().length&&t.startContainer.textContent.length>0&&"TD"!==t.startContainer.parentElement.tagName&&"TH"!==t.startContainer.parentElement.tagName&&o){var s="#text"===t.startContainer.nodeName?t.startContainer.parentElement:t.startContainer;if(!this.parent.formatter.editorManager.domNode.isBlockNode(s)&&!n.i(r.isNullOrUndefined)(s.previousSibling)&&"BR"===s.previousSibling.nodeName||!n.i(r.isNullOrUndefined)(t.startContainer.previousSibling)&&"BR"===t.startContainer.previousSibling.nodeName)return;if(this.rangeElement=this.getRootBlockNode(t.startContainer),"OL"===this.rangeElement.tagName||"UL"===this.rangeElement.tagName){var a=this.getRangeLiNode(t.startContainer);a.previousElementSibling&&a.previousElementSibling.childElementCount>0&&(this.oldRangeElement="BR"===a.previousElementSibling.lastElementChild.nodeName?a.previousElementSibling:a.previousElementSibling.lastElementChild,n.i(r.isNullOrUndefined)(a.lastElementChild)||"BR"===a.lastElementChild.nodeName?this.rangeElement=a:(this.rangeElement=a.lastElementChild,i=!0))}else{if(this.rangeElement===this.parent.inputElement||"TABLE"===this.rangeElement.tagName||!n.i(r.isNullOrUndefined)(this.rangeElement.previousElementSibling)&&"TABLE"===this.rangeElement.previousElementSibling.tagName)return;this.oldRangeElement=this.rangeElement.previousElementSibling}if(n.i(r.isNullOrUndefined)(this.oldRangeElement))return;"OL"!==this.oldRangeElement.tagName&&"UL"!==this.oldRangeElement.tagName||(this.oldRangeElement=this.oldRangeElement.lastElementChild.lastElementChild?this.oldRangeElement.lastElementChild.lastElementChild:this.oldRangeElement.lastElementChild);for(var l=this.oldRangeElement.lastChild;3!==l.nodeType&&"#text"!==l.nodeName&&"BR"!==l.nodeName;)l=l.lastChild;if(this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),l,l.textContent.length),1===this.oldRangeElement.querySelectorAll("BR").length&&n.i(r.detach)(this.oldRangeElement.querySelector("BR")),!n.i(r.isNullOrUndefined)(this.rangeElement)&&this.oldRangeElement!==this.rangeElement){for(;this.rangeElement.firstChild;)this.oldRangeElement.appendChild(this.rangeElement.childNodes[0]);i?n.i(r.detach)(this.rangeElement.parentElement):n.i(r.detach)(this.rangeElement),this.oldRangeElement.normalize()}}},e.prototype.deleteCleanup=function(e,t){var i,o,s=!1;if("Delete"===e.args.code&&46===e.args.keyCode&&0!==this.parent.contentModule.getText().trim().replace(/(\r\n|\n|\r)/gm,"").replace(/\u200B/g,"").length&&0===this.parent.getSelection().length&&"TD"!==t.startContainer.parentElement.tagName&&"TH"!==t.startContainer.parentElement.tagName){if(this.deleteRangeElement=o=this.getRootBlockNode(t.startContainer),"OL"===this.deleteRangeElement.tagName||"UL"===this.deleteRangeElement.tagName)i=this.getRangeLiNode(t.startContainer),i.nextElementSibling&&i.nextElementSibling.childElementCount>0&&!i.nextElementSibling.querySelector("BR")?n.i(r.isNullOrUndefined)(i.lastElementChild)?this.deleteRangeElement=i:(this.deleteRangeElement=i.lastElementChild,s=!0):this.deleteRangeElement=this.getRangeElement(i);else if(3===this.deleteRangeElement.nodeType||"TABLE"===this.deleteRangeElement.tagName||!n.i(r.isNullOrUndefined)(this.deleteRangeElement.nextElementSibling)&&"TABLE"===this.deleteRangeElement.nextElementSibling.tagName)return;if(this.getCaretIndex(t,this.deleteRangeElement)===this.deleteRangeElement.textContent.length){if(n.i(r.isNullOrUndefined)(i)?this.deleteOldRangeElement=this.deleteRangeElement.nextElementSibling:s||!n.i(r.isNullOrUndefined)(i.nextElementSibling)?this.deleteOldRangeElement=this.getRangeElement(i.nextElementSibling):this.deleteOldRangeElement=o.nextElementSibling,n.i(r.isNullOrUndefined)(this.deleteOldRangeElement))return;0===t.startOffset&&1===t.endOffset&&"IMG"===this.deleteRangeElement.childNodes[0].nodeName?(this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.parent.contentModule.getDocument(),this.deleteRangeElement,this.deleteRangeElement,0,1),this.isImageDelete=!0):(this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),this.deleteRangeElement,this.deleteRangeElement.childNodes.length),this.isImageDelete=!1);var a=this.deleteRangeElement.querySelector("BR");if(a&&a.classList.contains("e-rte-image-remove-focus"))return void n.i(r.removeClass)([a],["e-rte-image-focus"]);if(a&&n.i(r.detach)(a),n.i(r.isNullOrUndefined)(this.deleteRangeElement)||"OL"===this.deleteOldRangeElement.tagName||"UL"===this.deleteOldRangeElement.tagName||this.deleteOldRangeElement===this.deleteRangeElement)this.deleteRangeElement=null,this.deleteOldRangeElement=null;else{for(;this.deleteOldRangeElement.firstChild;)this.deleteRangeElement.appendChild(this.deleteOldRangeElement.childNodes[0]);s?n.i(r.detach)(this.deleteOldRangeElement.parentElement):n.i(r.detach)(this.deleteOldRangeElement),this.deleteRangeElement.normalize()}}else this.deleteRangeElement=null}},e.prototype.getCaretIndex=function(e,t){var n=0;if(0!==this.parent.contentModule.getDocument().getSelection().rangeCount){var i=e.cloneRange();i.selectNodeContents(t),i.setEnd(e.endContainer,e.endOffset),n=i.toString().length}return n},e.prototype.getRangeElement=function(e){return e.lastElementChild?"BR"===e.lastElementChild.tagName?e.lastElementChild.previousElementSibling?e.lastElementChild.previousElementSibling:e:e.lastElementChild:e},e.prototype.getRootBlockNode=function(e){for(;e&&this.parent&&this.parent.inputElement!==e&&e.parentElement!==this.parent.inputElement;e=e)e=e.parentElement;return e},e.prototype.getRangeLiNode=function(e){for(var t=e.parentElement;t!==this.parent.inputElement&&(1!==t.nodeType||"LI"!==t.tagName);)t=t.parentElement;return t},e.prototype.onPaste=function(e){var t=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);if(e.text.match(t)){if(e.isWordPaste)return;e.args.preventDefault();for(var i=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),o=(this.parent.formatter.editorManager.nodeSelection.save(i,this.parent.contentModule.getDocument()),new RegExp(/([^\S]|^)(((https?\:\/\/)))/gi)),s=new RegExp(/([^\S]|^)(((www\.))(\S+))/gi),a=e.text.split("\n"),l="",d=0;d<a.length;d++)if(""===a[d].trim())l+=n.i(m.r)(this.parent);else{for(var c="",u=!0,h=a[d].split(" "),p=0;p<h.length;p++)""===h[p].trim()?c+=u?" ":" ":(u=!1,c+=h[p]+" ");l+=0===d?"<span>"+c.trim()+"</span>":"<p>"+c.trim()+"</p>"}var f=this.parent.createElement("div");f.setAttribute("class","pasteContent"),f.style.display="inline",f.innerHTML=l.replace("¶","&para");for(var g=f.querySelectorAll("span, p"),d=0;d<g.length;d++){for(var b=g[d].innerHTML.split(" "),v="",p=0;p<b.length;p++)b[p].match(o)||b[p].match(s)?v+='<a class="e-rte-anchor" href="'+b[p]+'" title="'+b[p]+'"target="_blank">'+b[p]+" </a>":v+=b[p]+" ";g[d].innerHTML=v.trim()}n.i(r.isNullOrUndefined)(this.parent.pasteCleanupModule)?this.parent.formatter.editorManager.execCommand("insertHTML",null,null,null,f):e.callBack(f.innerHTML)}},e.prototype.spaceLink=function(e){var t=this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()),n=this.nodeSelectionObj.getParentNodeCollection(t),i=t.startContainer.textContent.substr(0,t.endOffset),r=i.split(" "),o=r[r.length-1],s=t.startOffset-(i.length-r[r.length-1].length);o=o.slice(0,s);var a=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);if("A"!==n[0].nodeName&&o.match(a)){var l=this.nodeSelectionObj.save(t,this.parent.contentModule.getDocument()),d=o.indexOf("http")>-1?o:"http://"+o,c=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t),u={url:d,selection:l,selectParent:c,text:o,title:"",target:"_blank"};this.parent.formatter.process(this.parent,{item:{command:"Links",subCommand:"CreateLink"}},e,u)}},e.prototype.mouseOutHandler=function(){if(n.i(r.isNullOrUndefined)(this.tooltipTargetEle)){var e=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().ownerDocument:this.parent.contentModule.getDocument();this.tooltipTargetEle=e.querySelector("[data-title]"),this.tooltipTargetEle.setAttribute("title",this.tooltipTargetEle.getAttribute("data-title"))}else this.tooltipTargetEle.setAttribute("title",this.tooltipTargetEle.getAttribute("data-title"));this.tooltipTargetEle.removeAttribute("data-title"),r.EventHandler.remove(this.tooltipTargetEle,"mouseout",this.mouseOutHandler)},e.prototype.onToolbarClick=function(e){var t,o,s,a=this,l=e.item,d=n.i(r.closest)(e.originalEvent.target,".e-rte-quick-popup"),c=this.parent.iframeSettings.enable?this.parent.contentModule.getPanel().ownerDocument:this.parent.contentModule.getDocument();if(this.tooltipTargetEle=n.i(r.closest)(e.originalEvent.target,"[data-tooltip-id]"),n.i(r.isNullOrUndefined)(this.tooltipTargetEle)||!this.parent.showTooltip||n.i(r.isNullOrUndefined)(c.querySelector(".e-tooltip-wrap"))||(this.parent.notify(i._93,{args:event}),this.tooltipTargetEle.setAttribute("data-title",this.tooltipTargetEle.getAttribute("title")),this.tooltipTargetEle.removeAttribute("title"),r.EventHandler.add(this.tooltipTargetEle,"mouseout",this.mouseOutHandler,this)),"FormatPainter"!==l.command)if(!d||d.classList.contains("e-rte-inline-popup")||d.classList.contains("e-rte-text-popup")){var u=document.getElementById(this.parent.getID()+"_rtelink"),h=document.getElementById(this.parent.getID()+"_image");if("SourceCode"!==l.subCommand&&"Preview"!==l.subCommand&&"FontColor"!==l.subCommand&&"BackgroundColor"!==l.subCommand){var p=this.nodeSelectionObj.getRange(this.parent.contentModule.getDocument());n.i(r.isNullOrUndefined)(u)&&n.i(r.isNullOrUndefined)(h)&&(t=this.nodeSelectionObj.save(p,this.parent.contentModule.getDocument())),o=this.nodeSelectionObj.getNodeCollection(p),s=this.nodeSelectionObj.getParentNodeCollection(p)}switch(l.subCommand){case"Maximize":this.parent.notify(i.z,{args:e});break;case"Minimize":this.parent.notify(i.A,{args:e});break;case"CreateLink":this.parent.notify(i.O,{member:"link",args:e,selectNode:o,selection:t,selectParent:s});break;case"RemoveLink":this.parent.notify(i.P,{member:"link",args:e,selectNode:o,selection:t,selectParent:s});break;case"Print":this.parent.print();break;case"Image":this.parent.notify(i.X,{member:"image",args:e,selectNode:o,selection:t,selectParent:s});break;case"Audio":this.parent.notify(i.Y,{member:"audio",args:e,selectNode:o,selection:t,selectParent:s});break;case"Video":this.parent.notify(i.Z,{member:"video",args:e,selectNode:o,selection:t,selectParent:s});break;case"CreateTable":this.parent.notify(i._39,{member:"table",args:e,selection:t});break;case"SourceCode":this.parent.notify(i._14,{member:"viewSource",args:e});break;case"Preview":this.parent.notify(i._15,{member:"updateSource",args:e});break;case"FontColor":case"BackgroundColor":break;case"File":this.parent.notify(i._73,{member:"fileManager",args:e,selectNode:o,selection:t,selectParent:s});break;case"EmojiPicker":this.parent.notify(i._92,{member:"emojiPicker",args:e});break;default:this.parent.formatter.process(this.parent,e,e.originalEvent,null)}}else{if("SourceCode"!==l.subCommand&&"Preview"!==l.subCommand&&"FontColor"!==l.subCommand&&"BackgroundColor"!==l.subCommand){n.i(f.b)()&&"Images"===l.command&&this.nodeSelectionObj.restore();var p=this.nodeSelectionObj.getRange(this.parent.contentModule.getDocument());t=this.nodeSelectionObj.save(p,this.parent.contentModule.getDocument()),o=this.nodeSelectionObj.getNodeCollection(p),s=this.nodeSelectionObj.getParentNodeCollection(p)}"Images"===l.command&&this.parent.notify(i.E,{member:"image",args:e,selectNode:o,selection:t,selectParent:s}),"Audios"===l.command&&this.parent.notify(i.F,{member:"audio",args:e,selectNode:o,selection:t,selectParent:s}),"Videos"===l.command&&this.parent.notify(i.G,{member:"video",args:e,selectNode:o,selection:t,selectParent:s}),"Links"===l.command&&this.parent.notify(i.H,{member:"link",args:e,selectNode:o,selection:t,selectParent:s}),"Table"===l.command&&this.parent.notify(i._41,{member:"table",args:e,selectNode:o,selection:t,selectParent:s})}else 1===e.originalEvent.detail?(clearTimeout(this.clickTimeout),this.clickTimeout=setTimeout(function(){a.parent.notify(i._90,{member:"formatPainter",args:e})},200)):(clearTimeout(this.clickTimeout),this.parent.notify(i._91,{member:"formatPainter",args:e}))},e.prototype.renderColorPicker=function(e){this.colorPickerModule.renderColorPickerInput(e)},e.prototype.instantiateRenderer=function(){this.parent.iframeSettings.enable?this.renderFactory.addRenderer(s.a.Content,new d.a(this.parent,this.locator)):this.renderFactory.addRenderer(s.a.Content,new c.a(this.parent,this.locator))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i.g,this.render),this.parent.off(i.s,this.onPropertyChanged),this.parent.off(i.p,this.onToolbarClick),this.parent.off(i.o,this.renderColorPicker),this.parent.off(i.i,this.destroy),this.parent.off(i.v,this.onKeyDown),this.parent.off(i.e,this.instantiateRenderer),this.parent.off(i._32,this.selectAll),this.parent.off(i._33,this.selectRange),this.parent.off(i._34,this.getSelectedHtml),this.parent.off(i._18,this.onSelectionSave),this.parent.off(i._19,this.onSelectionRestore),this.parent.off(i._43,this.updateReadOnly),this.parent.off(i._36,this.onPaste),this.parent.off(i.c,this.isTableClassAdded))},e.prototype.render=function(){this.contentRenderer=this.renderFactory.getRenderer(s.a.Content);var e=this.contentRenderer.getEditPanel(),t={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};if(n.i(r.isNullOrUndefined)(this.parent.formatter)){var a=new o.a({currentDocument:this.contentRenderer.getDocument(),element:e,options:t,formatPainterSettings:this.parent.formatPainterSettings});this.parent.setProperties({formatter:a},!0)}else this.parent.formatter.updateFormatter(e,this.contentRenderer.getDocument(),t);this.parent.enableXhtml&&this.parent.notify(i._69,{}),this.parent.toolbarSettings.enable&&(this.toolbarUpdate=new l.a(this.parent)),this.parent.inlineMode.enable&&(n.i(r.isNullOrUndefined)(this.parent.fontFamily.default)||(e.style.fontFamily=this.parent.fontFamily.default),n.i(r.isNullOrUndefined)(this.parent.fontSize.default)||(e.style.fontSize=this.parent.fontSize.default)),this.parent.notify(i.n,{})},e.prototype.onPropertyChanged=function(e){if(n.i(r.isNullOrUndefined)(e)||n.i(r.isNullOrUndefined)(e.newProp.toolbarSettings)||n.i(r.isNullOrUndefined)(e.newProp.toolbarSettings.enable)||(this.toolbarUpdate=new l.a(this.parent)),!n.i(r.isNullOrUndefined)(e.newProp.formatter)){var t=this.contentRenderer.getEditPanel(),i={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};this.parent.formatter.updateFormatter(t,this.contentRenderer.getDocument(),i)}},e.prototype.getModuleName=function(){return"htmlEditor"},e.prototype.selectAll=function(){var e=n.i(m.n)(this.parent.contentModule.getDocument(),this.parent.contentModule.getEditPanel());e.length>0&&this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.parent.contentModule.getDocument(),e[0],e[e.length-1],0,e[e.length-1].textContent.length)},e.prototype.selectRange=function(e){this.parent.formatter.editorManager.nodeSelection.setRange(this.parent.contentModule.getDocument(),e.range)},e.prototype.getSelectedHtml=function(e){e.callBack(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).toString())},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(1),r=n(0),o=(n.n(r),n(72)),s=n(5),a=n(2),l=n(67),d=n(76),c=n(23),u=function(){function e(e,t){this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener()}return e.prototype.destroy=function(){n.i(r.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null,this.toolbarUpdate.parent=null},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.saveSelection=new c.a,this.parent.on(i.e,this.instantiateRenderer,this),this.parent.on(i.g,this.render,this),this.parent.on(i.s,this.onPropertyChanged,this),this.parent.on(i.q,this.onToolbarClick,this),this.parent.on(i.i,this.destroy,this),this.parent.on(i._32,this.selectAll,this),this.parent.on(i._34,this.getSelectedHtml,this),this.parent.on(i._18,this.onSelectionSave,this),this.parent.on(i._19,this.onSelectionRestore,this),this.parent.on(i._43,this.updateReadOnly,this),this.parent.on(i._44,this.moduleDestroy,this))},e.prototype.updateReadOnly=function(){this.parent.readonly?(this.parent.contentModule.getEditPanel().setAttribute("readonly","readonly"),n.i(r.addClass)([this.parent.element],a._31)):(this.parent.contentModule.getEditPanel().removeAttribute("readonly"),n.i(r.removeClass)([this.parent.element],a._31))},e.prototype.onSelectionSave=function(){var e=this.parent.contentModule.getEditPanel();this.saveSelection.save(e.selectionStart,e.selectionEnd)},e.prototype.onSelectionRestore=function(e){this.contentRenderer.getEditPanel().focus();var t=this.parent.contentModule.getEditPanel();this.saveSelection.restore(t)},e.prototype.onToolbarClick=function(e){var t=e.item,n=this.parent.contentModule.getEditPanel();n.focus();var r=n.selectionStart,o=n.selectionEnd,s=n.value.substring(r,o);switch(t.subCommand){case"Maximize":this.parent.notify(i.z,{args:e});break;case"Minimize":this.parent.notify(i.A,{args:e});break;case"CreateLink":this.parent.notify(i.O,{member:"link",args:e,text:s,module:"Markdown"});break;case"Image":this.parent.notify(i.X,{member:"image",args:e,text:s,module:"Markdown"});break;case"CreateTable":var a={headingText:this.parent.localeObj.getConstant("TableHeadingText"),colText:this.parent.localeObj.getConstant("TableColText")};this.parent.formatter.process(this.parent,e,e.originalEvent,a);break;default:this.parent.formatter.process(this.parent,e,e.originalEvent,null)}},e.prototype.instantiateRenderer=function(){this.renderFactory.addRenderer(s.a.Content,new d.a(this.parent))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i.g,this.render),this.parent.off(i.s,this.onPropertyChanged),this.parent.off(i.i,this.destroy),this.parent.off(i.q,this.onToolbarClick),this.parent.off(i.e,this.instantiateRenderer),this.parent.off(i._32,this.selectAll),this.parent.off(i._34,this.getSelectedHtml),this.parent.off(i._18,this.onSelectionSave),this.parent.off(i._19,this.onSelectionRestore),this.parent.off(i._43,this.updateReadOnly),this.parent.off(i._44,this.moduleDestroy))},e.prototype.render=function(){this.contentRenderer=this.renderFactory.getRenderer(s.a.Content);var e=this.contentRenderer.getEditPanel(),t={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};n.i(r.isNullOrUndefined)(this.parent.formatter)?this.parent.formatter=new o.a({element:e,options:t}):this.parent.formatter.updateFormatter(e,this.contentRenderer.getDocument(),t),this.parent.toolbarSettings.enable&&(this.toolbarUpdate=new l.a(this.parent)),this.parent.notify(i.n,{})},e.prototype.onPropertyChanged=function(e){if(!n.i(r.isNullOrUndefined)(e.newProp.formatter)){var t=this.contentRenderer.getEditPanel(),i={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};this.parent.formatter.updateFormatter(t,this.contentRenderer.getDocument(),i)}},e.prototype.getModuleName=function(){return"markdownEditor"},e.prototype.selectAll=function(){this.parent.formatter.editorManager.markdownSelection.setSelection(this.parent.contentModule.getEditPanel(),0,this.parent.contentModule.getEditPanel().value.length)},e.prototype.getSelectedHtml=function(e){e.callBack(this.parent.formatter.editorManager.markdownSelection.getSelectedText(this.parent.contentModule.getEditPanel()))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var i=n(1),r=n(9),o=(n.n(r),n(18)),s=(n.n(o),n(0)),a=(n.n(s),n(2)),l=n(15),d=n(20),c=n(3),u=n(5),h=n(14),p=(n.n(h),n(4)),m=function(){function e(e,t){this.inlineNode=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],this.blockNode=["div","h1","h2","h3","h4","h5","h6","address","blockquote","button","center","dd","dir","dl","dt","fieldset","frameset","hr","iframe","isindex","li","map","menu","noframes","noscript","object","ol","pre","td","tr","th","tbody","tfoot","thead","table","ul","header","article","nav","footer","section","aside","main","figure","figcaption"],this.isNotFromHtml=!1,this.containsHtml=!1,this.cropImageData=[],this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.i10n=t.getService("rteLocale"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return e.prototype.addEventListener=function(){this.nodeSelectionObj=new d.a,this.parent.isDestroyed||(this.parent.on(i._45,this.pasteClean,this),this.parent.on(i._89,this.setCssClass,this),this.parent.on(i.i,this.destroy,this))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i._45,this.pasteClean),this.parent.off(i._89,this.setCssClass),this.parent.off(i.i,this.destroy))},e.prototype.pasteClean=function(e){var t,r=this,o={requestType:"Paste",editorMode:this.parent.editorMode,event:e},a=null,l=!1;if(e.args&&!n.i(s.isNullOrUndefined)(e.args.clipboardData)&&(a=e.args.clipboardData.getData("text/html")),this.parent.trigger(i._76,{value:a}),e.args&&null!==a&&"HTML"===this.parent.editorMode){var d=void 0;if(0===a.length){var h=new RegExp(/<\/[a-z][\s\S]*>/i);if(a=e.args.clipboardData.getData("text/plain"),this.isNotFromHtml=""!==a,a=a.replace(/</g,"<"),a=a.replace(/>/g,">"),this.containsHtml=h.test(a),d=e&&e.args.clipboardData&&e.args.clipboardData.items.length>0?null===e.args.clipboardData.items[0].getAsFile()?n.i(s.isNullOrUndefined)(e.args.clipboardData.items[1])?null:e.args.clipboardData.items[1].getAsFile():e.args.clipboardData.items[0].getAsFile():null,this.parent.notify(i._36,{file:d,args:e.args,text:a,callBack:function(n){t=n,"object"==typeof t?r.parent.formatter.editorManager.execCommand("Images","Image",e.args,r.imageFormatting.bind(r,o),"pasteCleanup",t,"pasteCleanupModule"):a=t}}),!h.test(a)){var p=this.parent.createElement("div");p.innerHTML=this.splitBreakLine(a),a=p.innerHTML,l=!0}}else a.length>0&&this.parent.formatter.editorManager.observer.notify(c.k,{args:e.args,text:e.text,allowedStylePropertiesArray:this.parent.pasteCleanupSettings.allowedStyleProps,callBack:function(e,t){a=e.trim(),r.cropImageData=t}});this.contentRenderer=this.renderFactory.getRenderer(u.a.Content);var m=this.contentRenderer.getDocument(),f=this.nodeSelectionObj.getRange(m);this.saveSelection=this.nodeSelectionObj.save(f,m);var g=this.parent.createElement("div");g.innerHTML=a;var b=""!==g.textContent||!n.i(s.isNullOrUndefined)(g.querySelector("img"))||!n.i(s.isNullOrUndefined)(g.querySelector("table"));this.parent.notify(i._95,{value:a,callBack:function(e){a=e}}),this.parent.pasteCleanupSettings.prompt?b?(e.args.preventDefault(),this.pasteDialog(a,o,l)):-1!==s.Browser.userAgent.indexOf("Firefox")&&n.i(s.isNullOrUndefined)(d)&&this.fireFoxImageUpload():b||this.parent.pasteCleanupSettings.plainText||-1===s.Browser.userAgent.indexOf("Firefox")?this.parent.pasteCleanupSettings.plainText?(e.args.preventDefault(),this.plainFormatting(a,o,l)):this.parent.pasteCleanupSettings.keepFormat?(e.args.preventDefault(),this.formatting(a,!1,o)):(e.args.preventDefault(),this.formatting(a,!0,o)):this.fireFoxImageUpload()}},e.prototype.fireFoxImageUpload=function(){var e=this;setTimeout(function(){if(-1!==s.Browser.userAgent.indexOf("Firefox")){var t=e.nodeSelectionObj.getRange(e.contentRenderer.getDocument()).startContainer;"#text"!==t.nodeName&&(t=t.childNodes[e.nodeSelectionObj.getRange(e.contentRenderer.getDocument()).startOffset]),"IMG"===t.previousSibling.nodeName&&(n.i(s.isNullOrUndefined)(t.previousSibling.getAttribute("src"))||t.previousSibling.classList.add("pasteContent_Img"),t.previousSibling.classList.add(a._47),"inline"===e.parent.insertImageSettings.display?t.previousSibling.classList.add(a._3):t.previousSibling.classList.add(a.T),t.previousSibling.classList.add(),e.setImageProperties(t.previousSibling))}e.imgUploading(e.parent.inputElement)},500)},e.prototype.splitBreakLine=function(e){for(var t=e.split("\n"),i="",r="P"===this.parent.enterKey?"<p>":"DIV"===this.parent.enterKey?"<div>":"",o="P"===this.parent.enterKey?"</p>":"DIV"===this.parent.enterKey?"</div>":"<br>",s=0;s<t.length;s++)if(""===t[s].trim())i+=n.i(p.r)(this.parent);else{var a=this.makeSpace(t[s]);i+=(0===s&&"BR"!==this.parent.enterKey?"<span>":r)+(""===a.trim()?"<br>":a.trim())+(t.length-1===s&&"BR"===this.parent.enterKey?"":0===s&&"BR"!==this.parent.enterKey?"</span>":o)}return i},e.prototype.makeSpace=function(e){var t="",n=!0;e=e.replace(/\t/g," ");for(var i=e.split(" "),r=0;r<i.length;r++)""===i[r].trim()?t+=n?" ":" ":(n=!1,t+=i[r]+" ");return t},e.prototype.imgUploading=function(e){var t=e.querySelectorAll(".pasteContent_Img");if(this.parent.insertImageSettings.saveUrl&&t.length>0){for(var i=[],r=[],o=[],a=0;a<t.length;a++)!n.i(s.isNullOrUndefined)(t[a].getAttribute("src"))&&t[a].getAttribute("src").split(",")[0].indexOf("base64")>=0&&(i.push(t[a].getAttribute("src")),r.push(n.i(s.getUniqueID)("rte_image")),o.push(t[a]));for(var l=[],a=0;a<i.length;a++)l.push(this.base64ToFile(i[a],r[a]));for(var a=0;a<l.length;a++)this.uploadMethod(l[a],o[a]);n.i(s.isNullOrUndefined)(this.parent.insertImageSettings.path)&&"Blob"===this.parent.insertImageSettings.saveFormat&&this.getBlob(t)}else"Blob"===this.parent.insertImageSettings.saveFormat&&this.getBlob(t);for(var d=e.querySelectorAll(".pasteContent_Img"),a=0;a<d.length;a++)d[a].classList.remove("pasteContent_Img"),""===d[a].getAttribute("class").trim()&&t[a].removeAttribute("class")},e.prototype.getBlob=function(e){for(var t=0;t<e.length;t++)if(!n.i(s.isNullOrUndefined)(e[t].getAttribute("src"))&&e[t].getAttribute("src").split(",")[0].indexOf("base64")>=0){var i=URL.createObjectURL(n.i(p.v)(e[t].getAttribute("src")));e[t].setAttribute("src",i)}},e.prototype.toolbarEnableDisable=function(e){this.parent.inlineMode.enable||this.parent.toolbarModule.baseToolbar.toolbarObj.disable(e)},e.prototype.uploadMethod=function(e,t){var o=this,l=document.createElement("div");document.body.appendChild(l),l.setAttribute("display","none"),t.style.opacity="0.5";var d=this.parent.createElement("div");this.parent.element.appendChild(d);var c=this.parent.createElement("input",{id:this.parent.getID()+"_upload",attrs:{type:"File",name:"UploadFiles"}}),u=this.parent.iframeSettings.enable?-50:-90;this.popupObj=new r.Popup(d,{relateTo:t,height:"85px",width:"300px",offsetY:u,content:c,viewPortElement:this.parent.element,position:{X:"center",Y:"top"},enableRtl:this.parent.enableRtl,zIndex:10001,close:function(e){o.parent.isBlur=!1,o.popupObj.destroy(),n.i(s.detach)(o.popupObj.element)}}),this.popupObj.element.style.display="none",n.i(s.addClass)([this.popupObj.element],[a._54,a._53]),n.i(s.isNullOrUndefined)(this.parent.cssClass)||n.i(s.addClass)([this.popupObj.element],this.parent.cssClass);var p=e.size>1e6?300:100;setTimeout(function(){o.refreshPopup(t,o.popupObj)},p);this.uploadObj=new h.Uploader({asyncSettings:{saveUrl:this.parent.insertImageSettings.saveUrl,removeUrl:this.parent.insertImageSettings.removeUrl},cssClass:a._59,dropArea:this.parent.inputElement,allowedExtensions:this.parent.insertImageSettings.allowedTypes.toString(),success:function(e){setTimeout(function(){o.popupClose(o.popupObj,o.uploadObj,t,e)},900)},uploading:function(e){o.parent.isServerRendered||o.parent.trigger(i._57,e,function(e){e.cancel?(n.i(s.isNullOrUndefined)(t)||n.i(s.detach)(t),n.i(s.isNullOrUndefined)(o.popupObj.element)||n.i(s.detach)(o.popupObj.element)):o.parent.inputElement.contentEditable="false"})},beforeUpload:function(e){o.parent.trigger(i._70,e),o.toolbarEnableDisable(!0)},failure:function(e){setTimeout(function(){o.uploadFailure(t,o.uploadObj,o.popupObj,e)},900)},canceling:function(){o.parent.inputElement.contentEditable="true"," "===t.nextSibling.textContent&&n.i(s.detach)(t.nextSibling),n.i(s.detach)(t),o.popupObj.close()},selected:function(e){e.cancel=!0},removing:function(){o.parent.inputElement.contentEditable="true"," "===t.nextSibling.textContent&&n.i(s.detach)(t.nextSibling),n.i(s.detach)(t),o.popupObj.close()}}),this.uploadObj.appendTo(this.popupObj.element.childNodes[0]);var m=[{name:e.name,rawFile:e,size:e.size,type:e.type,validationMessages:{minSize:"",maxSize:""},statusCode:"1"}];this.uploadObj.createFileList(m),this.uploadObj.upload(m),this.popupObj.element.getElementsByClassName("e-file-select-wrap")[0].style.display="none",n.i(s.detach)(this.popupObj.element.querySelector(".e-rte-dialog-upload .e-file-select-wrap"))},e.prototype.uploadFailure=function(e,t,r,o){this.parent.inputElement.contentEditable="true",n.i(s.detach)(e),r&&r.close(),this.parent.trigger(i._59,o),t.destroy()},e.prototype.popupClose=function(e,t,r,o){var a=this;this.parent.inputElement.contentEditable="true",o.element=r,this.parent.trigger(i._58,o,function(e){if(!n.i(s.isNullOrUndefined)(a.parent.insertImageSettings.path)){var t=a.parent.insertImageSettings.path+e.file.name;r.src=t,r.setAttribute("alt",e.file.name)}}),e.close(),r.style.opacity="1",t.destroy(),this.toolbarEnableDisable(!1)},e.prototype.refreshPopup=function(e,t){(this.parent.iframeSettings.enable?this.parent.element.offsetTop+e.offsetTop:e.offsetTop)>this.parent.element.offsetTop+this.parent.element.offsetHeight?(t.relateTo=this.parent.inputElement,t.offsetY=this.parent.iframeSettings.enable?-30:-65,t.element.style.display="block"):t&&(t.refreshPosition(e),t.element.style.display="block")},e.prototype.base64ToFile=function(e,t){for(var i=e.split(","),r=i[0].match(/:(.*?);/)[1],o=r.split("/")[1],a=atob(i[1]),l=a.length,d=new Uint8Array(l);l--;)d[l]=a.charCodeAt(l);if(s.Browser.isIE||navigator.appVersion.indexOf("Edge")>-1){var c=new Blob([d],{type:o});return n.i(s.extend)(c,{name:t+"."+(n.i(s.isNullOrUndefined)(o)?"":o)}),c}return new File([d],t+"."+(n.i(s.isNullOrUndefined)(o)?"":o),{type:o})},e.prototype.imageFormatting=function(e,t){n.i(s.isNullOrUndefined)(t.elements[0].getAttribute("src"))||t.elements[0].classList.add("pasteContent_Img");var i=this.parent.createElement("span");i.appendChild(t.elements[0]);var r=i.innerHTML;this.contentRenderer=this.renderFactory.getRenderer(u.a.Content);var o=this.contentRenderer.getDocument(),a=this.nodeSelectionObj.getRange(o);this.saveSelection=this.nodeSelectionObj.save(a,o),this.parent.pasteCleanupSettings.prompt?this.pasteDialog(r,e,!1):this.parent.pasteCleanupSettings.plainText?this.plainFormatting(r,e,!1):this.parent.pasteCleanupSettings.keepFormat?this.formatting(r,!1,e):this.formatting(r,!0,e)},e.prototype.radioRender=function(){this.keepRadioButton=new o.RadioButton({label:this.i10n.getConstant("keepFormat"),name:"pasteOption",checked:!0}),this.keepRadioButton.isStringTemplate=!0;var e=this.parent.element.querySelector("#keepFormating");this.keepRadioButton.appendTo(e),this.cleanRadioButton=new o.RadioButton({label:this.i10n.getConstant("cleanFormat"),name:"pasteOption"}),this.cleanRadioButton.isStringTemplate=!0;var t=this.parent.element.querySelector("#cleanFormat");this.cleanRadioButton.appendTo(t),this.plainTextRadioButton=new o.RadioButton({label:this.i10n.getConstant("plainText"),name:"pasteOption"}),this.plainTextRadioButton.isStringTemplate=!0;var n=this.parent.element.querySelector("#plainTextFormat");this.plainTextRadioButton.appendTo(n)},e.prototype.selectFormatting=function(e,t,n,i,r){n?this.formatting(e,!1,t):i?this.formatting(e,!0,t):this.plainFormatting(e,t,r)},e.prototype.pasteDialog=function(e,t,n){var i=this,r=!1,o=this.parent.height,s={buttons:[{click:function(){if(!i.dialogObj.isDestroyed){var s=i.parent.element.querySelector("#keepFormating").checked,a=i.parent.element.querySelector("#cleanFormat").checked;i.dialogObj.hide(),i.parent.height=r?o:i.parent.height,r=!1;var l=i.dialogObj;i.dialogRenderObj.close(l),i.dialogObj.destroy(),i.selectFormatting(e,t,s,a,n)}},buttonModel:{isPrimary:!0,cssClass:"e-flat "+a._42,content:this.i10n.getConstant("pasteDialogOk")}},{click:function(){if(!i.dialogObj.isDestroyed){i.dialogObj.hide(),i.parent.height=r?o:i.parent.height,r=!1;var e=i.dialogObj;i.dialogRenderObj.close(e),i.dialogObj.destroy()}},buttonModel:{cssClass:"e-flat "+a._43,content:this.i10n.getConstant("pasteDialogCancel")}}],header:this.i10n.getConstant("pasteFormat"),content:this.i10n.getConstant("pasteFormatContent")+'<br/><div><div style="padding-top:24px;"><input type="radio" class="'+a._39+'" id="keepFormating"/></div><div style="padding-top:20px;"><input type="radio" class="'+a._40+'" id="cleanFormat"/></div><div style="padding-top:20px;"><input type="radio" class="'+a._41+'" id="plainTextFormat"/></div></div>',target:this.parent.element,width:"300px",height:"265px",cssClass:a._44,isModal:!0,visible:!1};this.dialogObj=this.dialogRenderObj.render(s);var l=this.parent.element.querySelector("#"+this.parent.getID()+"_pasteCleanupDialog");null!==l&&""!==l.innerHTML&&this.destroyDialog(l),null===l&&(l=this.parent.createElement("div",{id:this.parent.getID()+"_pasteCleanupDialog"}),this.parent.element.appendChild(l)),this.dialogObj.appendTo(l),this.radioRender(),this.parent.element.offsetHeight<parseInt(this.dialogObj.height.split("px")[0],null)&&(this.parent.setProperties({height:parseInt(this.dialogObj.height.split("px")[0],null)+40}),r=!0),this.dialogObj.show(),this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(s.isNullOrUndefined)(t.oldCssClass)?e.setProperties({cssClass:(e.cssClass+" "+t.cssClass).trim()}):e.setProperties({cssClass:(e.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){this.popupObj&&e.cssClass&&(n.i(s.isNullOrUndefined)(e.oldCssClass)?n.i(s.addClass)([this.popupObj.element],e.cssClass):(n.i(s.removeClass)([this.popupObj.element],e.oldCssClass),n.i(s.addClass)([this.popupObj.element],e.cssClass))),this.updateCss(this.dialogObj,e),this.updateCss(this.uploadObj,e),this.updateCss(this.plainTextRadioButton,e),this.updateCss(this.cleanRadioButton,e),this.updateCss(this.keepRadioButton,e)},e.prototype.destroyDialog=function(e){var t=this.parent.element.querySelector(".e-dlg-container");n.i(s.detach)(t);for(var i=e.children.length,r=0;r<i;r++)n.i(s.detach)(e.children[0])},e.prototype.cleanAppleClass=function(e){for(var t=e.querySelectorAll("br.Apple-interchange-newline"),i=0;i<t.length;i++)n.i(s.detach)(t[i]);return e},e.prototype.formatting=function(e,t,r){var o=this,a=this.parent.createElement("div",{className:"pasteContent",styles:"display:inline;"});this.isNotFromHtml&&this.containsHtml&&(e=this.splitBreakLine(e)),a.innerHTML=e,a=this.cleanAppleClass(a),null!==this.parent.pasteCleanupSettings.deniedTags&&(a=this.deniedTags(a)),t?a=this.deniedAttributes(a,t):null!==this.parent.pasteCleanupSettings.deniedAttrs&&(a=this.deniedAttributes(a,t)),null!==this.parent.pasteCleanupSettings.allowedStyleProps&&(a=this.allowedStyle(a)),this.saveSelection.restore(),a.innerHTML=this.sanitizeHelper(a.innerHTML);for(var l=a.querySelectorAll("img"),d=0;d<l.length;d++)n.i(s.isNullOrUndefined)(l[d].getAttribute("src"))||l[d].classList.add("pasteContent_Img"),this.setImageProperties(l[d]);if(this.addTempClass(a),""!==a.textContent||!n.i(s.isNullOrUndefined)(a.querySelector("img"))||!n.i(s.isNullOrUndefined)(a.querySelector("table"))){var c=this.parent.createElement("div");c.innerHTML=e;var u=[];if(!n.i(s.isNullOrUndefined)(c.querySelector("img"))){for(var h=c.querySelectorAll("img"),p=[],m=[],f=[],d=0;d<h.length;d++)h[d].getAttribute("src")&&h[d].getAttribute("src").split(",")[0].indexOf("base64")>=0&&(p.push(h[d].getAttribute("src")),m.push(n.i(s.getUniqueID)("rte_image")),f.push(h[d]));for(var g=[],b=void 0,d=0;d<p.length;d++)g.push(this.base64ToFile(p[d],m[d])),b={name:g[d].name,rawFile:g[d],size:g[d].size,type:g[d].type,status:"",validationMessages:{minSize:"",maxSize:""},statusCode:"1"},u.push(b)}this.parent.trigger(i._77,{value:a.innerHTML,filesData:u},function(t){e=t.value}),a.innerHTML=e,a=this.addTableClass(a),this.parent.formatter.editorManager.execCommand("inserthtml","pasteCleanup",r,function(e){n.i(s.extend)(r,{elements:e.elements,imageElements:e.imgElem},!0),o.parent.formatter.onSuccess(o.parent,r)},a,null,null,this.parent.enterKey),this.removeTempClass(),this.parent.notify(i.k,{}),this.cropImageHandler(this.parent.inputElement)}},e.prototype.cropImageHandler=function(e){var t=this,n=e.querySelectorAll(".e-img-cropped");if(n.length>0)for(var i=0;i<n.length;i++)!function(e){if(n[e].getAttribute("src").split(",")[0].indexOf("base64")>=0){var i=new Image;i.src=n[e].getAttribute("src");var r=document.createElement("canvas"),o=r.getContext("2d");i.onload=function(){var s=t.cropImageData[e].goalWidth/i.naturalWidth,a=t.cropImageData[e].goalHeight/i.naturalHeight,l=t.cropImageData[e].cropLength/s,d=t.cropImageData[e].cropTop/a,c=(t.cropImageData[e].goalWidth-t.cropImageData[e].cropLength-t.cropImageData[e].cropR)/s,u=(t.cropImageData[e].goalHeight-t.cropImageData[e].cropTop-t.cropImageData[e].cropB)/a;r.width=c,r.height=u,o.drawImage(i,l,d,c,u,0,0,c,u);var h=r.toDataURL("image/png");n[e].setAttribute("src",h),n[e].classList.remove("e-img-cropped"),t.imgUploading(t.parent.inputElement),t.parent.iframeSettings.enable&&t.parent.updateValue()}}}(i);else this.imgUploading(this.parent.inputElement),this.parent.iframeSettings.enable&&this.parent.updateValue()},e.prototype.addTableClass=function(e){for(var t=e.querySelectorAll("table"),n=0;n<t.length;n++)t[n].classList.contains("e-rte-table")||t[n].classList.add("e-rte-table");return e},e.prototype.setImageProperties=function(e){"auto"!==this.parent.insertImageSettings.width&&e.setAttribute("width",this.parent.insertImageSettings.width),"0"!==this.parent.insertImageSettings.minWidth&&0!==this.parent.insertImageSettings.minWidth&&(e.style.minWidth=this.parent.insertImageSettings.minWidth.toString()),null!==this.parent.insertImageSettings.maxWidth&&(e.style.maxWidth=this.parent.getInsertImgMaxWidth().toString()),"auto"!==this.parent.insertImageSettings.height&&e.setAttribute("height",this.parent.insertImageSettings.height),"0"!==this.parent.insertImageSettings.minHeight&&0!==this.parent.insertImageSettings.minHeight&&(e.style.minHeight=this.parent.insertImageSettings.minHeight.toString()),null!==this.parent.insertImageSettings.maxHeight&&(e.style.maxHeight=this.parent.insertImageSettings.maxHeight.toString())},e.prototype.addTempClass=function(e){for(var t=e.children,n=0;n<t.length;n++)t[n].classList.add("pasteContent_RTE")},e.prototype.removeTempClass=function(){for(var e=this.parent.inputElement.querySelectorAll(".pasteContent_RTE"),t=0;t<e.length;t++)e[t].classList.remove("pasteContent_RTE"),""===e[t].getAttribute("class")&&e[t].removeAttribute("class")},e.prototype.sanitizeHelper=function(e){return e=n.i(p.u)(e,this.parent)},e.prototype.plainFormatting=function(e,t,r){var o=this,a=this.parent.createElement("div",{className:"pasteContent",styles:"display:inline;"});if(a.innerHTML=e,this.detachInlineElements(a),this.getTextContent(a),""!==a.textContent.trim()){if(!n.i(s.isNullOrUndefined)(a.firstElementChild)&&"BR"!==a.firstElementChild.tagName){var l=a.firstElementChild;if(!n.i(s.isNullOrUndefined)(a.firstElementChild)){for(var d=this.parent.createElement("span"),c=0,u=0;c<l.childNodes.length;c++,u++)if("#text"===l.childNodes[c].nodeName)d.appendChild(l.childNodes[c]),a.insertBefore(d,a.firstElementChild),c--;else{if("#text"===l.childNodes[c].nodeName||0!==u)break;for(var h=0;h<l.childNodes[c].childNodes.length;h++)d.appendChild(l.childNodes[c].childNodes[h]),a.insertBefore(d,a.firstElementChild),h--;c--}l.hasChildNodes()||n.i(s.detach)(l)}}this.removeEmptyElements(a),this.saveSelection.restore(),a.innerHTML=this.sanitizeHelper(a.innerHTML),this.addTempClass(a),this.removingComments(a),"BR"!==this.parent.enterKey||r?"DIV"===this.parent.enterKey&&(a.innerHTML=a.innerHTML.replace(/<p class="pasteContent_RTE">/g,"<div>").replace(/<\/p>/g,"</div>")):a=this.reframeToBrContent(a),this.parent.trigger(i._77,{value:a.innerHTML,filesData:null},function(t){e=t.value}),a.innerHTML=e,this.parent.formatter.editorManager.execCommand("inserthtml","pasteCleanup",t,function(e){n.i(s.extend)(t,{elements:e.elements,imageElements:e.imgElem},!0),o.parent.formatter.onSuccess(o.parent,t)},a,null,null,this.parent.enterKey),this.removeTempClass()}else this.saveSelection.restore(),n.i(s.extend)(t,{elements:[]},!0),this.parent.formatter.onSuccess(this.parent,t)},e.prototype.removingComments=function(e){var t=e.innerHTML;t=t.replace(/<!--[\s\S]*?-->/g,""),e.innerHTML=t},e.prototype.reframeToBrContent=function(e){for(var t=this.parent.createElement("div",{className:"pasteContent",styles:"display:inline;"});!n.i(s.isNullOrUndefined)(e.firstChild);){var i=this.parent.createElement("br"),r=e.firstChild;if("#text"===r.nodeName){var o=!n.i(s.isNullOrUndefined)(r.nextSibling);t.appendChild(r),o&&t.appendChild(i)}else{var a="BR"===r.nodeName;a?t.appendChild(r):t.appendChild(r.childNodes[0]),n.i(s.isNullOrUndefined)(r)||n.i(s.isNullOrUndefined)(r.nextSibling)||t.appendChild(i),a||n.i(s.isNullOrUndefined)(r)||n.i(s.detach)(r)}}return t},e.prototype.getTextContent=function(e){for(var t=0;t<this.blockNode.length;t++)for(var i=e.querySelectorAll(this.blockNode[t]),r=0;r<i.length;r++){for(var o=void 0,a=0,l=0,d=void 0;a<i[r].childNodes.length;a++,l++)if("DIV"===i[r].childNodes[a].nodeName||"P"===i[r].childNodes[a].nodeName||"#text"===i[r].childNodes[a].nodeName&&" "!==i[r].childNodes[a].nodeValue.replace(/\u00a0/g," ")&&""===i[r].childNodes[a].textContent.trim())o=i[r].childNodes[a].parentElement,i[r].childNodes[a].parentElement.parentElement.insertBefore(i[r].childNodes[a],i[r].childNodes[a].parentElement),a--;else{if(o=i[r].childNodes[a].parentElement,"text"===d){var c=o.previousElementSibling;c.appendChild(i[r].childNodes[a])}else{var u=this.parent.createElement("div",{id:"newDiv"});u.appendChild(i[r].childNodes[a]),o.parentElement.insertBefore(u,o)}a--,d="text"}n.i(s.isNullOrUndefined)(o)||n.i(s.detach)(o)}for(var h=e.querySelectorAll("*"),t=0;t<h.length;t++)for(var p=h[t].attributes,r=0;r<p.length;r++)h[t].removeAttribute(p[r].name),r--},e.prototype.detachInlineElements=function(e){for(var t=0;t<this.inlineNode.length;t++)for(var i=e.querySelectorAll(this.inlineNode[t]),r=0;r<i.length;r++)if(i[r]!==e.firstChild||"SPAN"!==i[r].nodeName){for(var o=void 0,a=0;a<i[r].childNodes.length;a++)o=i[r].childNodes[a].parentElement,i[r].childNodes[a].parentElement.parentElement.insertBefore(i[r].childNodes[a],i[r].childNodes[a].parentElement),a--;n.i(s.isNullOrUndefined)(o)||n.i(s.detach)(o)}},e.prototype.findDetachEmptyElem=function(e){var t;if(n.i(s.isNullOrUndefined)(e.parentElement))t=null;else{t=e.parentElement.textContent.length>0&&e.parentElement.textContent.match(/\u00a0/g)&&e.parentElement.textContent.match(/\u00a0/g).length>0||""!==e.parentElement.textContent.trim()||"pasteContent"===e.parentElement.getAttribute("class")?e:this.findDetachEmptyElem(e.parentElement)}return t},e.prototype.removeEmptyElements=function(e){for(var t=e.querySelectorAll(":empty"),i=0;i<t.length;i++)if("BR"!==t[i].tagName){var r=this.findDetachEmptyElem(t[i]);n.i(s.isNullOrUndefined)(r)||n.i(s.detach)(r)}},e.prototype.tagGrouping=function(e){for(var t=e.slice(),n=Object.keys(l.f),i=n.map(function(e){return l.f[""+e]}),r=[],o=0;o<t.length;o++)if(t[o].split("[").length>1&&(t[o]=t[o].split("[")[0].trim()),n.indexOf(t[o])>-1)for(var s=0;s<i[n.indexOf(t[o])].length;s++)t.indexOf(i[n.indexOf(t[o])][s])<0&&r.indexOf(i[n.indexOf(t[o])][s])<0&&r.push(i[n.indexOf(t[o])][s]);return e=e.concat(r)},e.prototype.attributesfilter=function(e){for(var t=0;t<e.length;t++)if(e[t].split("[").length>1){for(var n=e[t].split("[")[1].split("]")[0].split(","),i=[],r=[],o=0;o<n.length;o++)n[o].indexOf("!")<0?i.push(n[o].trim()):r.push(n[o].split("!")[1].trim());var s=i.length>1?i.join("]["):i.join(),a=r.length>1?r.join("]["):r.join();if(a.length>0){var l=""!==s?e[t].split("[")[0]+"["+s+"]":e[t].split("[")[0];e[t]=l+":not(["+a+"])"}else e[t]=e[t].split("[")[0]+"["+s+"]"}return e},e.prototype.deniedTags=function(e){var t=n.i(s.isNullOrUndefined)(this.parent.pasteCleanupSettings.deniedTags)?[]:this.parent.pasteCleanupSettings.deniedTags.slice();t=this.attributesfilter(t),t=this.tagGrouping(t);for(var i=0;i<t.length;i++)for(var r=e.querySelectorAll(t[i]),o=r.length-1;o>=0;o--){for(var a=r[o].parentNode;r[o].firstChild;)a.insertBefore(r[o].firstChild,r[o]);a.removeChild(r[o])}return e},e.prototype.deniedAttributes=function(e,t){var i=n.i(s.isNullOrUndefined)(this.parent.pasteCleanupSettings.deniedAttrs)?[]:this.parent.pasteCleanupSettings.deniedAttrs.slice();t&&i.push("style");for(var r=0;r<i.length;r++)for(var o=e.querySelectorAll("["+i[r]+"]"),a=0;a<o.length;a++)o[a].removeAttribute(i[r]);return e},e.prototype.allowedStyle=function(e){var t=n.i(s.isNullOrUndefined)(this.parent.pasteCleanupSettings.allowedStyleProps)?[]:this.parent.pasteCleanupSettings.allowedStyleProps.slice();t.push("list-style-type","list-style");for(var i=e.querySelectorAll("[style]"),r=0;r<i.length;r++){for(var o="",a=[],l=i[r].getAttribute("style").split(";"),d=0;d<l.length;d++)t.indexOf(l[d].split(":")[0].trim())>=0&&a.push(l[d]);i[r].removeAttribute("style"),o=""===a.join(";").trim()?a.join(";"):a.join(";")+";",o&&i[r].setAttribute("style",o)}return e},e.prototype.getModuleName=function(){return"pasteCleanup"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(0),r=(n.n(i),n(5)),o=n(1),s=n(4),a=n(62),l=n(77),d=n(2),c=function(){function e(e,t){this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.renderFactory.addRenderer(r.a.Popup,new l.a(this.parent)),this.addEventListener()}return e.prototype.formatItems=function(e){var t=[];return e.forEach(function(e){if("string"==typeof e)switch(e.toLocaleLowerCase()){case"open":t.push("openLink");break;case"edit":t.push("editLink");break;case"unlink":t.push("removeLink");break;default:t.push(e)}else t.push(e)}),t},e.prototype.getQTBarOptions=function(e,t,n,i){return{popupType:e,toolbarItems:n,mode:t,renderType:i,cssClass:this.parent.getCssClass()}},e.prototype.createQTBar=function(e,t,n,i){if(n.length<1)return null;var r=new a.a(this.parent,this.locator);return r.render(this.getQTBarOptions(e,t,this.formatItems(n),i)),r},e.prototype.initializeQuickToolbars=function(){this.parent.quickToolbarModule=this,this.contentRenderer=this.renderFactory.getRenderer(r.a.Content),this.parent.inlineMode.enable&&this.parent.inlineMode.onSelection&&n.i(s.d)()&&i.EventHandler.add(this.contentRenderer.getDocument(),"selectionchange",this.selectionChangeHandler,this)},e.prototype.onMouseDown=function(e){this.parent.isBlur=!1,this.parent.isRTE=!0},e.prototype.keyUpQT=function(e){27===e.which&&this.hideQuickToolbars()},e.prototype.renderQuickToolbars=function(){this.linkQTBar||this.imageQTBar||this.audioQTBar||this.videoQTBar||this.textQTBar||this.tableQTBar||(this.linkQTBar=this.createQTBar("Link","Scrollable",this.parent.quickToolbarSettings.link,r.a.LinkToolbar),this.renderFactory.addRenderer(r.a.LinkToolbar,this.linkQTBar),n.i(i.isNullOrUndefined)(this.parent.quickToolbarSettings.text)||this.parent.inlineMode.enable||(this.textQTBar=this.createQTBar("Text","MultiRow",this.parent.quickToolbarSettings.text,r.a.TextToolbar),this.renderFactory.addRenderer(r.a.TextToolbar,this.textQTBar)),this.imageQTBar=this.createQTBar("Image","MultiRow",this.parent.quickToolbarSettings.image,r.a.ImageToolbar),this.renderFactory.addRenderer(r.a.ImageToolbar,this.imageQTBar),this.audioQTBar=this.createQTBar("Audio","MultiRow",this.parent.quickToolbarSettings.audio,r.a.AudioToolbar),this.renderFactory.addRenderer(r.a.AudioToolbar,this.audioQTBar),this.videoQTBar=this.createQTBar("Video","MultiRow",this.parent.quickToolbarSettings.video,r.a.VideoToolbar),this.renderFactory.addRenderer(r.a.VideoToolbar,this.videoQTBar),this.tableQTBar=this.createQTBar("Table","MultiRow",this.parent.quickToolbarSettings.table,r.a.TableToolbar),this.renderFactory.addRenderer(r.a.TableToolbar,this.tableQTBar),this.linkQTBar&&(i.EventHandler.add(this.linkQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.linkQTBar.element,"keyup",this.keyUpQT,this)),this.imageQTBar&&(i.EventHandler.add(this.imageQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.imageQTBar.element,"keyup",this.keyUpQT,this)),this.audioQTBar&&(i.EventHandler.add(this.audioQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.audioQTBar.element,"keyup",this.keyUpQT,this)),this.videoQTBar&&(i.EventHandler.add(this.videoQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.videoQTBar.element,"keyup",this.keyUpQT,this)),this.textQTBar&&(i.EventHandler.add(this.textQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.textQTBar.element,"keyup",this.keyUpQT,this)),this.tableQTBar&&(i.EventHandler.add(this.tableQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.tableQTBar.element,"keyup",this.keyUpQT,this)))},e.prototype.renderInlineQuickToolbar=function(){!this.parent.inlineMode.enable||i.Browser.isDevice&&!n.i(s.d)()||(n.i(i.addClass)([this.parent.element],[d.k]),this.inlineQTBar=this.createQTBar("Inline","MultiRow",this.parent.toolbarSettings.items,r.a.InlineToolbar),this.renderFactory.addRenderer(r.a.InlineToolbar,this.inlineQTBar),i.EventHandler.add(this.inlineQTBar.element,"mousedown",this.onMouseDown,this),i.EventHandler.add(this.inlineQTBar.element,"keyup",this.keyUpQT,this))},e.prototype.showInlineQTBar=function(e,t,r){n.i(i.isNullOrUndefined)(this.parent)||this.parent.readonly||"img"===r.tagName.toLowerCase()||this.inlineQTBar.showPopup(e,t,r)},e.prototype.hideInlineQTBar=function(){this.inlineQTBar&&!n.i(s.b)(this.inlineQTBar.element,"e-popup-close")&&this.inlineQTBar.hidePopup()},e.prototype.hideQuickToolbars=function(){this.linkQTBar&&!n.i(s.b)(this.linkQTBar.element,"e-popup-close")&&document.body.contains(this.linkQTBar.element)&&this.linkQTBar.hidePopup(),this.textQTBar&&!n.i(s.b)(this.textQTBar.element,"e-popup-close")&&document.body.contains(this.textQTBar.element)&&this.textQTBar.hidePopup(),this.imageQTBar&&!n.i(s.b)(this.imageQTBar.element,"e-popup-close")&&document.body.contains(this.imageQTBar.element)&&this.imageQTBar.hidePopup(),this.audioQTBar&&!n.i(s.b)(this.audioQTBar.element,"e-popup-close")&&document.body.contains(this.audioQTBar.element)&&this.audioQTBar.hidePopup(),this.videoQTBar&&!n.i(s.b)(this.videoQTBar.element,"e-popup-close")&&document.body.contains(this.videoQTBar.element)&&this.videoQTBar.hidePopup(),this.tableQTBar&&!n.i(s.b)(this.tableQTBar.element,"e-popup-close")&&document.body.contains(this.tableQTBar.element)&&this.tableQTBar.hidePopup(),n.i(i.isNullOrUndefined)(this.parent)||!this.parent.inlineMode.enable||i.Browser.isDevice&&!n.i(s.d)()||this.hideInlineQTBar()},e.prototype.deBounce=function(e,t,n){var i=this;clearTimeout(this.deBouncer),this.deBouncer=window.setTimeout(function(){i.showInlineQTBar(e,t,n)},1e3)},e.prototype.mouseUpHandler=function(e){if(this.parent.inlineMode.enable&&(!i.Browser.isDevice||n.i(s.d)())){var t=e.args.touches?e.args.changedTouches[0]:e.args,r=this.parent.getRange(),o=e.args.target;if(n.i(i.isNullOrUndefined)(n.i(i.select)("."+d.w,document.body))){if(n.i(s.d)()&&e.touchData&&e.touchData.prevClientX!==e.touchData.clientX&&e.touchData.prevClientY!==e.touchData.clientY)return;this.hideInlineQTBar();var a=this.parent.element.getBoundingClientRect().left;if(this.offsetX=this.parent.iframeSettings.enable?window.pageXOffset+a+t.clientX:t.pageX,this.offsetY=n.i(s.f)(t,this.parent.element,this.parent.iframeSettings.enable),"TEXTAREA"===o.nodeName)this.showInlineQTBar(this.offsetX,this.offsetY,o);else{var l=n.i(i.closest)(o,"a");o=l||o;var c=this.parent.getRange().startContainer.parentElement,u=this.parent.getRange().endContainer.parentElement;if((n.i(i.isNullOrUndefined)(n.i(i.closest)(c,"A"))||n.i(i.isNullOrUndefined)(n.i(i.closest)(u,"A")))&&(!n.i(i.closest)(o,"td,th")||!r.collapsed)&&("IMG"!==o.tagName||this.parent.getRange().startOffset!==this.parent.getRange().endOffset)){if(this.parent.inlineMode.onSelection&&r.collapsed)return;this.target=o,this.showInlineQTBar(this.offsetX,this.offsetY,o)}}}}if(!n.i(i.isNullOrUndefined)(this.textQTBar)&&!n.i(i.isNullOrUndefined)(this.parent.quickToolbarSettings.text)&&!this.parent.inlineMode.enable){var t=e.args.touches?e.args.changedTouches[0]:e.args,o=e.args.target;this.hideQuickToolbars();var a=this.parent.element.getBoundingClientRect().left;this.offsetX=this.parent.iframeSettings.enable?this.parent.element.ownerDocument.documentElement.scrollLeft+a+t.clientX:t.pageX,this.offsetY=n.i(s.f)(t,this.parent.element,this.parent.iframeSettings.enable);var r=this.parent.getRange();if(r.endContainer.parentElement.tagName===r.startContainer.parentElement.tagName&&"A"===r.startContainer.parentElement.tagName&&"A"===r.endContainer.parentElement.tagName||"IMG"===o.tagName||"VIDEO"===o.tagName||"AUDIO"===o.tagName||1===o.childNodes[0].nodeType&&o.childNodes[0].classList.contains("e-rte-audio")||this.parent.getRange().startOffset===this.parent.getRange().endOffset)return;this.target=o,this.textQTBar.showPopup(this.offsetX,this.offsetY,o,"text")}},e.prototype.keyDownHandler=function(){!this.parent.inlineMode.enable||i.Browser.isDevice&&!n.i(s.d)()||n.i(i.isNullOrUndefined)(n.i(i.select)("."+d.w,document))||this.hideInlineQTBar(),this.textQTBar&&!n.i(s.b)(this.textQTBar.element,"e-popup-close")&&this.textQTBar.hidePopup()},e.prototype.inlineQTBarMouseDownHandler=function(){!this.parent.inlineMode.enable||i.Browser.isDevice&&!n.i(s.d)()||n.i(i.isNullOrUndefined)(n.i(i.select)("."+d.w,document))||this.hideInlineQTBar(),n.i(i.isNullOrUndefined)(this.parent.quickToolbarSettings.text)||this.textQTBar&&!n.i(s.b)(this.textQTBar.element,"e-popup-close")&&document.body.contains(this.textQTBar.element)&&this.textQTBar.hidePopup()},e.prototype.keyUpHandler=function(e){var t=e.args;if(this.parent.inlineMode.enable&&!i.Browser.isDevice){if(this.parent.inlineMode.onSelection)return void(this.parent.getSelection().length>0&&(t.ctrlKey&&65===t.keyCode||t.shiftKey&&(33===t.keyCode||34===t.keyCode||35===t.keyCode||36===t.keyCode||37===t.keyCode||38===t.keyCode||39===t.keyCode||40===t.keyCode))&&this.showInlineQTBar(this.offsetX,this.offsetY,t.target));this.deBounce(this.offsetX,this.offsetY,t.target)}this.parent.quickToolbarSettings.text&&!i.Browser.isDevice&&(t.ctrlKey&&65===t.keyCode||t.shiftKey&&(33===t.keyCode||34===t.keyCode||35===t.keyCode||36===t.keyCode||37===t.keyCode||38===t.keyCode||39===t.keyCode||40===t.keyCode))&&this.textQTBar.showPopup(this.offsetX,this.offsetY,t.target,"text")},e.prototype.selectionChangeHandler=function(e){var t=this;clearTimeout(this.deBouncer),this.deBouncer=window.setTimeout(function(){t.onSelectionChange(e)},1e3)},e.prototype.onSelectionChange=function(e){if(n.i(i.isNullOrUndefined)(n.i(i.select)("."+d.w,document.body))){this.contentRenderer.getDocument().getSelection().isCollapsed||this.mouseUpHandler({args:e})}},e.prototype.getInlineBaseToolbar=function(){return this.inlineQTBar&&this.inlineQTBar.quickTBarObj},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||(this.linkQTBar&&(i.EventHandler.remove(this.linkQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.linkQTBar.element,"keyup",this.keyUpQT),this.linkQTBar.destroy()),this.textQTBar&&(i.EventHandler.remove(this.textQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.textQTBar.element,"keyup",this.keyUpQT),this.textQTBar.destroy()),this.imageQTBar&&(i.EventHandler.remove(this.imageQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.imageQTBar.element,"keyup",this.keyUpQT),this.imageQTBar.destroy()),this.audioQTBar&&(i.EventHandler.remove(this.audioQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.audioQTBar.element,"keyup",this.keyUpQT),this.audioQTBar.destroy()),this.videoQTBar&&(i.EventHandler.remove(this.videoQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.videoQTBar.element,"keyup",this.keyUpQT),this.videoQTBar.destroy()),this.tableQTBar&&(i.EventHandler.remove(this.tableQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.tableQTBar.element,"keyup",this.keyUpQT),this.tableQTBar.destroy()),this.inlineQTBar&&(i.EventHandler.remove(this.inlineQTBar.element,"mousedown",this.onMouseDown),i.EventHandler.remove(this.inlineQTBar.element,"keyup",this.keyUpQT),n.i(s.d)()&&i.EventHandler.remove(document,"selectionchange",this.selectionChangeHandler),this.inlineQTBar.destroy()),this.removeEventListener())},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.wireInlineQTBarEvents=function(){this.parent.on(o.w,this.mouseUpHandler,this),this.parent.on(o._24,this.inlineQTBarMouseDownHandler,this),this.parent.on(o.v,this.keyDownHandler,this),this.parent.on(o.u,this.keyUpHandler,this),this.parent.on(o._25,this.mouseUpHandler,this),this.parent.on(o._35,this.renderInlineQuickToolbar,this),this.parent.on(o._44,this.moduleDestroy,this)},e.prototype.unWireInlineQTBarEvents=function(){this.parent.off(o.w,this.mouseUpHandler),this.parent.off(o._24,this.inlineQTBarMouseDownHandler),this.parent.off(o.v,this.keyDownHandler),this.parent.off(o.u,this.keyUpHandler),this.parent.off(o._25,this.mouseUpHandler),this.parent.off(o._35,this.renderInlineQuickToolbar),this.parent.off(o._44,this.moduleDestroy)},e.prototype.toolbarUpdated=function(e){this.linkQTBar&&!n.i(s.b)(this.linkQTBar.element,"e-popup-close")&&this.linkQTBar.hidePopup(),this.imageQTBar&&!n.i(s.b)(this.imageQTBar.element,"e-popup-close")&&this.imageQTBar.hidePopup(),this.audioQTBar&&!n.i(s.b)(this.audioQTBar.element,"e-popup-close")&&this.audioQTBar.hidePopup(),this.videoQTBar&&!n.i(s.b)(this.videoQTBar.element,"e-popup-close")&&this.videoQTBar.hidePopup(),this.tableQTBar&&!n.i(s.b)(this.tableQTBar.element,"e-popup-close")&&this.tableQTBar.hidePopup()},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(o.g,this.initializeQuickToolbars,this),this.parent.on(o._24,this.renderQuickToolbars,this),this.parent.on(o.m,this.toolbarUpdated,this),this.parent.on(o._68,this.renderQuickToolbars,this),this.wireInlineQTBarEvents(),this.parent.on(o.s,this.onPropertyChanged,this),"hide"===this.parent.quickToolbarSettings.actionOnScroll&&(this.parent.on(o._27,this.hideQuickToolbars,this),this.parent.on(o._28,this.hideQuickToolbars,this)),this.parent.on(o._31,this.hideQuickToolbars,this),this.parent.on(o.h,this.onIframeMouseDown,this),this.parent.on(o.i,this.destroy,this),this.parent.on(o.v,this.onKeyDown,this),this.parent.on(o._38,this.setRtl,this),this.parent.on(o._89,this.setCssClass,this),this.parent.on(o._94,this.hideQuickToolbars,this))},e.prototype.onKeyDown=function(e){var t=e.args;8!==t.which&&46!==t.which||(this.imageQTBar&&!n.i(s.b)(this.imageQTBar.element,"e-popup-close")&&this.imageQTBar.hidePopup(),this.audioQTBar&&!n.i(s.b)(this.audioQTBar.element,"e-popup-close")&&this.audioQTBar.hidePopup(),this.videoQTBar&&!n.i(s.b)(this.videoQTBar.element,"e-popup-close")&&this.videoQTBar.hidePopup(),this.tableQTBar&&!n.i(s.b)(this.tableQTBar.element,"e-popup-close")&&this.tableQTBar.hidePopup(),this.linkQTBar&&!n.i(s.b)(this.linkQTBar.element,"e-popup-close")&&this.linkQTBar.hidePopup(),this.textQTBar&&!n.i(s.b)(this.textQTBar.element,"e-popup-close")&&this.textQTBar.hidePopup())},e.prototype.onIframeMouseDown=function(){this.hideQuickToolbars(),this.hideInlineQTBar()},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(i.isNullOrUndefined)(t.oldCssClass&&e.quickTBarObj.toolbarObj.cssClass!==t.cssClass)?e.quickTBarObj.toolbarObj.setProperties({cssClass:(e.quickTBarObj.toolbarObj.cssClass+" "+t.cssClass).trim()}):e.quickTBarObj.toolbarObj.setProperties({cssClass:(e.quickTBarObj.toolbarObj.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){for(var t=[this.inlineQTBar,this.imageQTBar,this.linkQTBar,this.textQTBar,this.tableQTBar],n=0;n<t.length;n++)this.updateCss(t[n],e)},e.prototype.setRtl=function(e){this.inlineQTBar&&this.inlineQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.imageQTBar&&this.imageQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.audioQTBar&&this.audioQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.videoQTBar&&this.videoQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.linkQTBar&&this.linkQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.textQTBar&&this.textQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl})},e.prototype.removeEventListener=function(){this.deBouncer&&clearTimeout(this.deBouncer),this.parent.isDestroyed||(this.parent.off(o.g,this.initializeQuickToolbars),this.parent.off(o._24,this.renderQuickToolbars),this.parent.off(o.m,this.toolbarUpdated),this.parent.off(o._68,this.renderQuickToolbars),this.unWireInlineQTBarEvents(),this.parent.off(o.s,this.onPropertyChanged),"hide"===this.parent.quickToolbarSettings.actionOnScroll&&(this.parent.off(o._27,this.hideQuickToolbars),this.parent.off(o._28,this.hideQuickToolbars)),this.parent.off(o._31,this.hideQuickToolbars),this.parent.off(o.i,this.destroy),this.parent.off(o.h,this.onIframeMouseDown),this.parent.off(o.v,this.onKeyDown),this.parent.off(o._38,this.setRtl),this.parent.off(o._89,this.setCssClass),this.parent.off(o._94,this.hideQuickToolbars))},e.prototype.onPropertyChanged=function(e){if(!n.i(i.isNullOrUndefined)(e.newProp.quickToolbarSettings))for(var t=0,r=Object.keys(e.newProp.quickToolbarSettings);t<r.length;t++){var a=r[t];switch(a){case"actionOnScroll":"none"===e.newProp.quickToolbarSettings.actionOnScroll?(this.parent.off(o._27,this.hideQuickToolbars),this.parent.off(o._28,this.hideQuickToolbars)):(this.parent.on(o._27,this.hideQuickToolbars,this),this.parent.on(o._28,this.hideQuickToolbars,this))}}e.module===this.getModuleName()&&(this.inlineQTBar&&(n.i(i.removeClass)([this.parent.element],[d.k]),this.unWireInlineQTBarEvents(),this.hideInlineQTBar()),!this.parent.inlineMode.enable||i.Browser.isDevice&&!n.i(s.d)()||(n.i(i.addClass)([this.parent.element],[d.k]),this.wireInlineQTBarEvents()))},e.prototype.getModuleName=function(){return"quickToolbar"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.g,this.renderResizable,this),this.parent.on(r.i,this.destroy,this))},e.prototype.renderResizable=function(){var e=this.parent.enableRtl?o._68:o._46;this.resizer=this.parent.createElement("div",{id:this.parent.getID()+"-resizable",className:"e-icons "+o._45+" "+e}),this.parent.element.classList.add(o._60),this.parent.element.appendChild(this.resizer),this.touchStartEvent="msie"===i.Browser.info.name?"pointerdown":"touchstart",i.EventHandler.add(this.resizer,"mousedown",this.resizeStart,this),i.EventHandler.add(this.resizer,this.touchStartEvent,this.resizeStart,this)},e.prototype.resizeStart=function(e){var t=this;e.cancelable&&e.preventDefault(),this.wireResizeEvents(),this.parent.notify(r._72,{});var n={event:e,requestType:"editor"};this.parent.trigger(r.J,n,function(e){e.cancel&&t.unwireResizeEvents()})},e.prototype.performResize=function(e){var t=this,n={event:e,requestType:"editor"};this.parent.trigger(r.K,n,function(e){e.cancel&&t.unwireResizeEvents()});var s=this.parent.element.getBoundingClientRect();if(this.isMouseEvent(e)){this.parent.element.style.height=e.clientY-s.top+"px",this.parent.element.style.width=this.parent.enableRtl?s.right-e.clientX+"px":e.clientX-s.left+"px";var a=this.parent.toolbarModule.getToolbarElement();if(null!==a&&a.classList.contains(o.i)&&this.parent.toolbarSettings.enableFloating&&this.parent.getToolbar()&&!this.parent.inlineMode.enable){var l=this.parent.contentModule.getPanel(),d=l.getBoundingClientRect().width;a.style.width=d+"px"}}else{var c="msie"!==i.Browser.info.name?e.touches[0]:e;this.parent.element.style.height=c.clientY-s.top+"px",this.parent.element.style.width=this.parent.enableRtl?s.right-c.clientX+"px":c.clientX-s.left+"px"}this.parent.toolbarSettings.enable||this.parent.setContentHeight("",!1),this.parent.refreshUI()},e.prototype.stopResize=function(e){this.parent.refreshUI(),this.unwireResizeEvents();var t={event:e,requestType:"editor"};this.parent.trigger(r.L,t)},e.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},e.prototype.isMouseEvent=function(e){var t=!1;return("mouse"===this.getEventType(e.type)||!n.i(i.isNullOrUndefined)(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(t=!0),t},e.prototype.wireResizeEvents=function(){i.EventHandler.add(document,"mousemove",this.performResize,this),i.EventHandler.add(document,"mouseup",this.stopResize,this),this.touchMoveEvent="msie"===i.Browser.info.name?"pointermove":"touchmove",this.touchEndEvent="msie"===i.Browser.info.name?"pointerup":"touchend",i.EventHandler.add(document,this.touchMoveEvent,this.performResize,this),i.EventHandler.add(document,this.touchEndEvent,this.stopResize,this)},e.prototype.unwireResizeEvents=function(){i.EventHandler.remove(document,"mousemove",this.performResize),i.EventHandler.remove(document,"mouseup",this.stopResize),i.EventHandler.remove(document,this.touchMoveEvent,this.performResize),i.EventHandler.remove(document,this.touchEndEvent,this.stopResize)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.g,this.renderResizable),this.parent.element.classList.remove(o._60),i.EventHandler.remove(this.resizer,"mousedown",this.resizeStart),i.EventHandler.remove(this.resizer,this.touchStartEvent,this.resizeStart),this.resizer&&n.i(i.detach)(this.resizer),this.parent.off(r.i,this.destroy))},e.prototype.getModuleName=function(){return"resize"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(5),a=n(4),l=n(17),d=n(79),c=n(24),u=n(27),h=n(68),p=function(){function e(e,t){this.tools={},this.parent=e,this.isToolbar=!1,this.locator=t,this.isTransformChild=!1,this.renderFactory=this.locator.getService("rendererFactory"),l.x(this.parent),n.i(a.x)(this.parent),this.renderFactory.addRenderer(s.a.Toolbar,new d.a(this.parent,this.locator)),this.toolbarRenderer=this.renderFactory.getRenderer(s.a.Toolbar),this.baseToolbar=new c.a(this.parent,this.locator),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?n.i(i.extend)(this.tools,l.v,n.i(a.o)(this.parent.toolbarSettings.itemConfigs),!0):this.tools=l.v}return e.prototype.initializeInstance=function(){this.contentRenderer=this.renderFactory.getRenderer(s.a.Content),this.editableElement=this.contentRenderer.getEditPanel(),this.editPanel=this.contentRenderer.getPanel()},e.prototype.toolbarBindEvent=function(){this.parent.inlineMode.enable||(this.keyBoardModule=new i.KeyboardEvents(this.getToolbarElement(),{keyAction:this.toolBarKeyDown.bind(this),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"}))},e.prototype.toolBarKeyDown=function(e){switch(e.action){case"escape":this.parent.contentModule.getEditPanel().focus();break;case"enter":e.target.classList.contains("e-hor-nav")&&this.adjustContentHeight(e.target,!0)}},e.prototype.createToolbarElement=function(){this.tbElement=this.parent.createElement("div",{id:this.parent.getID()+"_toolbar"}),!i.Browser.isDevice&&this.parent.inlineMode.enable&&n.i(a.d)()||(this.parent.toolbarSettings.enableFloating&&!this.parent.inlineMode.enable?(this.tbWrapper=this.parent.createElement("div",{id:this.parent.getID()+"_toolbar_wrapper",innerHTML:this.tbElement.outerHTML,className:o.F}),this.tbElement=this.tbWrapper.firstElementChild,this.parent.element.insertBefore(this.tbWrapper,this.editPanel)):this.parent.element.insertBefore(this.tbElement,this.editPanel))},e.prototype.getToolbarMode=function(){var e;switch(this.parent.toolbarSettings.type){case s.b.Expand:e="Extended";break;case s.b.Scrollable:e="Scrollable";break;default:e="MultiRow"}return n.i(a.d)()&&this.parent.toolbarSettings.type===s.b.Expand&&(e=s.b.Scrollable),e},e.prototype.checkToolbarResponsive=function(e){if(!i.Browser.isDevice||n.i(a.d)())return!1;var t;return t=this.parent.toolbarSettings.type===s.b.Expand?s.b.MultiRow:this.parent.toolbarSettings.type,this.baseToolbar.render({container:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items,mode:t,target:e,cssClass:this.parent.getCssClass()}),this.parent.toolbarSettings.type===s.b.Expand&&(n.i(i.addClass)([e],["e-rte-tb-mobile"]),this.parent.inlineMode.enable?this.addFixedTBarClass():n.i(i.addClass)([e],[o.r])),this.wireEvents(),this.dropDownModule.renderDropDowns({container:e,containerType:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items}),this.parent.notify(r.o,{container:this.tbElement,containerType:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items}),!0},e.prototype.checkIsTransformChild=function(){this.isTransformChild=!1;for(var e=n.i(i.selectAll)('[style*="transform"]',document),t=0;t<e.length;t++)if(!n.i(i.isNullOrUndefined)(e[t].contains)&&e[t].contains(this.parent.element)){this.isTransformChild=!0;break}},e.prototype.toggleFloatClass=function(e){var t,r,s=!1,a=!1,l=this.parent.floatingToolbarOffset;e&&this.parent.iframeSettings.enable&&this.parent.inputElement.ownerDocument===e.target?r=e.target.body:e&&e.target!==document?r=e.target:(s=!0,r=document.body);var d=this.getToolbarHeight()+this.getExpandTBarPopHeight();if(this.isTransformChild){t=0;var c=0,u=this.parent.element.offsetHeight;if(s){var h=window.getComputedStyle(r);c=parseFloat(h.marginTop.split("px")[0])+parseFloat(h.paddingTop.split("px")[0])}var p=this.parent.element.getBoundingClientRect().top,m=i.Browser.isMSPointer&&s?window.pageYOffset:r.parentElement.scrollTop,f=r.getBoundingClientRect(),g=s?f.top+m:f.top,b=!(p-(s?0:g)+u>d+l);p>g+l||p<-u||p<0&&b?(a=!1,n.i(i.removeClass)([this.tbElement],[o.j])):p<g+l&&(t=p<0?-p+g:g-p,t=s?t-c:t,n.i(i.addClass)([this.tbElement],[o.j]),a=!0)}else{var v=this.parent.element.getBoundingClientRect();if(window.innerHeight<v.top)return;t=e&&e.target!==document?r.getBoundingClientRect().top:0,v.bottom<l+d+t||v.bottom<0||v.top>l+t?a=!1:(v.top<l||v.top<l+t)&&(a=!0)}a?(n.i(i.addClass)([this.tbElement],[o.i]),n.i(i.setStyleAttribute)(this.tbElement,{width:this.parent.element.offsetWidth+"px",top:l+t+"px"})):(n.i(i.removeClass)([this.tbElement],[o.i]),n.i(i.setStyleAttribute)(this.tbElement,{top:"0px",width:"100%"}))},e.prototype.renderToolbar=function(){if(this.initializeInstance(),this.createToolbarElement(),!this.checkToolbarResponsive(this.tbElement)){this.parent.inlineMode.enable?this.parent.notify(r._35,{}):(this.baseToolbar.render({container:"toolbar",items:this.parent.toolbarSettings.items,mode:this.getToolbarMode(),target:this.tbElement,cssClass:this.parent.getCssClass()}),this.parent.inlineMode.enable||(this.parent.toolbarSettings.enableFloating&&(this.checkIsTransformChild(),this.toggleFloatClass()),n.i(i.addClass)([this.parent.element],[o._67]),this.parent.toolbarSettings.type===s.b.Expand&&n.i(i.addClass)([this.parent.element],[o.m]))),this.wireEvents(),this.parent.inlineMode.enable&&!n.i(a.d)()&&this.addFixedTBarClass(),this.parent.inlineMode.enable||(this.dropDownModule.renderDropDowns({container:this.tbElement,containerType:"toolbar",items:this.parent.toolbarSettings.items}),this.parent.notify(r.o,{container:this.tbElement,containerType:"toolbar",items:this.parent.toolbarSettings.items}),this.refreshToolbarOverflow());var e=this.parent.element.querySelector("."+o._69),t=this.parent.element.querySelector(".e-source-content");(!this.parent.iframeSettings.enable&&!n.i(i.isNullOrUndefined)(e)&&"block"===e.style.display||this.parent.iframeSettings.enable&&!n.i(i.isNullOrUndefined)(t)&&"block"===t.style.display)&&(this.parent.notify(r.W,{targetItem:"SourceCode",updateItem:"Preview",baseToolbar:this.parent.getBaseToolbarObject()}),this.parent.disableToolbarItem(this.parent.toolbarSettings.items))}},e.prototype.addFixedTBarClass=function(){n.i(i.addClass)([this.tbElement],[o.h])},e.prototype.removeFixedTBarClass=function(){n.i(i.removeClass)([this.tbElement],[o.h])},e.prototype.showFixedTBar=function(){n.i(i.addClass)([this.tbElement],[o.L]),i.Browser.isIos&&n.i(i.addClass)([this.tbElement],[o._15])},e.prototype.hideFixedTBar=function(){this.isToolbar?this.isToolbar=!1:n.i(i.removeClass)([this.tbElement],[o.L,o._15])},e.prototype.updateItem=function(e){var t=this.tools[e.updateItem.toLocaleLowerCase()];"en-US"!==this.parent.locale&&(t.tooltip=n.i(a.g)(e.updateItem.toLocaleLowerCase(),this.locator));var r=this.tools[e.targetItem.toLocaleLowerCase()],o=n.i(a.j)(n.i(a.i)(r.subCommand),e.baseToolbar.toolbarObj.items)[0];if(n.i(i.isNullOrUndefined)(o))this.addTBarItem(e,0);else{var s=this.parent.inlineMode.enable?"_quick_":"_toolbar_";e.baseToolbar.toolbarObj.items[o].id=this.parent.getID()+s+t.id,e.baseToolbar.toolbarObj.items[o].prefixIcon=t.icon,e.baseToolbar.toolbarObj.items[o].tooltipText=t.tooltip,e.baseToolbar.toolbarObj.items[o].subCommand=t.subCommand,e.baseToolbar.toolbarObj.dataBind(),e.baseToolbar.toolbarObj.refreshOverflow()}},e.prototype.updateToolbarStatus=function(e){if(this.tbElement&&(!this.parent.inlineMode.enable||!n.i(a.d)()&&i.Browser.isDevice)){var t={args:e,dropDownModule:this.dropDownModule,parent:this.parent,tbElements:n.i(i.selectAll)("."+o.D,this.tbElement),tbItems:this.baseToolbar.toolbarObj.items};n.i(a.h)(t,!!this.parent.inlineMode.enable,this.parent)}},e.prototype.fullScreen=function(e){this.parent.fullScreenModule.showFullScreen(e)},e.prototype.hideScreen=function(e){this.parent.fullScreenModule.hideFullScreen(e)},e.prototype.getBaseToolbar=function(){return this.baseToolbar},e.prototype.addTBarItem=function(e,t){e.baseToolbar.toolbarObj.addItems([e.baseToolbar.getObject(e.updateItem,"toolbar")],t)},e.prototype.enableTBarItems=function(e,t,r,s){var l=n.i(a.j)(n.i(a.i)(t),e.toolbarObj.items);this.tbItems=n.i(i.selectAll)("."+o.D,e.toolbarObj.element);for(var d=0;d<l.length;d++){var c=this.tbItems[l[d]];c&&e.toolbarObj.enableItems(c,r)}n.i(i.select)("."+o._69,this.parent.element)||s||n.i(a.k)(e,this.parent.formatter.editorManager.undoRedoManager.getUndoStatus())},e.prototype.removeTBarItems=function(e){n.i(i.isNullOrUndefined)(this.baseToolbar.toolbarObj)&&(this.baseToolbar=this.parent.getBaseToolbarObject());var t=n.i(a.j)(n.i(a.i)(e),this.baseToolbar.toolbarObj.items);this.tbItems=this.parent.inlineMode.enable?n.i(i.selectAll)("."+o.D,this.baseToolbar.toolbarObj.element):n.i(i.selectAll)("."+o.D,this.parent.element);for(var r=0;r<t.length;r++)this.baseToolbar.toolbarObj.removeItems(this.tbItems[t[r]])},e.prototype.getExpandTBarPopHeight=function(){var e=0;if(this.parent.toolbarSettings.type===s.b.Expand&&this.tbElement.classList.contains("e-extended-toolbar")){var t=n.i(i.select)(".e-toolbar-extended",this.tbElement);t&&this.tbElement.classList.contains("e-expand-open")||t&&t.classList.contains("e-popup-open")?(n.i(i.addClass)([t],[o.N]),e+=t.offsetHeight,n.i(i.removeClass)([t],[o.N])):n.i(i.removeClass)([this.tbElement],[o._11])}return e},e.prototype.getToolbarHeight=function(){return this.tbElement.offsetHeight},e.prototype.getToolbarElement=function(){return n.i(i.select)("."+o.g,this.parent.element)},e.prototype.refreshToolbarOverflow=function(){this.parent.element.classList.remove(o.b),this.baseToolbar.toolbarObj.refreshOverflow(),this.parent.enableRtl&&this.parent.element.classList.add(o.b)},e.prototype.isToolbarDestroyed=function(){return this.baseToolbar.toolbarObj&&!this.baseToolbar.toolbarObj.isDestroyed},e.prototype.destroyToolbar=function(){if(this.isToolbarDestroyed()){this.parent.unWireScrollElementsEvents(),this.unWireEvents(),this.parent.notify(r.r,{}),this.dropDownModule.destroyDropDowns(),this.baseToolbar.toolbarObj.destroy(),this.removeEventListener(),n.i(i.removeClass)([this.parent.element],[o._67]),n.i(i.removeClass)([this.parent.element],[o.m]);var e=n.i(i.select)("."+o.F,this.parent.element),t=n.i(i.select)("."+o.g,this.parent.element);n.i(i.isNullOrUndefined)(e)?n.i(i.isNullOrUndefined)(t)||n.i(i.detach)(t):n.i(i.detach)(e)}},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.isToolbarDestroyed()&&(this.destroyToolbar(),this.keyBoardModule&&this.keyBoardModule.destroy())},e.prototype.moduleDestroy=function(){this.parent=null,this.baseToolbar.parent=null,this.toolbarActionModule.parent=null,this.dropDownModule.parent=null},e.prototype.scrollHandler=function(e){this.parent.inlineMode.enable||this.parent.toolbarSettings.enableFloating&&this.getDOMVisibility(this.tbElement)&&this.toggleFloatClass(e.args)},e.prototype.getDOMVisibility=function(e){return!(!e.offsetParent&&0===e.offsetWidth&&0===e.offsetHeight)},e.prototype.mouseDownHandler=function(){i.Browser.isDevice&&this.parent.inlineMode.enable&&!n.i(a.d)()&&this.showFixedTBar()},e.prototype.focusChangeHandler=function(){i.Browser.isDevice&&this.parent.inlineMode.enable&&!n.i(a.d)()&&(this.isToolbar=!1,this.hideFixedTBar())},e.prototype.dropDownBeforeOpenHandler=function(){this.isToolbar=!0},e.prototype.tbFocusHandler=function(e){var t=document.activeElement,r=n.i(i.closest)(t,".e-rte-toolbar");if(t===this.parent.getToolbarElement()||r===this.parent.getToolbarElement())for(var o=this.parent.getToolbarElement().querySelectorAll(".e-expended-nav"),s=0;s<o.length;s++)n.i(i.isNullOrUndefined)(this.parent.getToolbarElement().querySelector(".e-insert-table-btn"))?o[s].setAttribute("tabindex","0"):o[s].setAttribute("tabindex","1")},e.prototype.toolbarClickHandler=function(e){var t=n.i(i.closest)(e.originalEvent.target,".e-hor-nav");this.adjustContentHeight(t,!1)},e.prototype.adjustContentHeight=function(e,t){if(e&&this.parent.toolbarSettings.type===s.b.Expand&&!n.i(i.isNullOrUndefined)(e)){var r=this.tbElement.querySelector(".e-toolbar-extended");n.i(i.isNullOrUndefined)(r)||(n.i(i.setStyleAttribute)(r,{maxHeight:"",display:"block"}),n.i(i.setStyleAttribute)(r,{maxHeight:r.offsetHeight+"px",display:""}));var a=e.classList.contains("e-nav-active"),l=t?!a:!!a;l?n.i(i.addClass)([this.tbElement],[o._11]):n.i(i.removeClass)([this.tbElement],[o._11]),this.parent.setContentHeight("toolbar",l)}else(i.Browser.isDevice||this.parent.inlineMode.enable)&&(this.isToolbar=!0);n.i(i.isNullOrUndefined)(e)&&this.parent.toolbarSettings.type===s.b.Expand&&n.i(i.removeClass)([this.tbElement],[o._11])},e.prototype.wireEvents=function(){this.parent.inlineMode.enable&&n.i(a.d)()||i.EventHandler.add(this.tbElement,"focusin",this.tbFocusHandler,this)},e.prototype.unWireEvents=function(){i.EventHandler.remove(this.tbElement,"focusin",this.tbFocusHandler)},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.dropDownModule=new u.a(this.parent,this.locator),this.toolbarActionModule=new h.a(this.parent),this.parent.on(r.g,this.renderToolbar,this),this.parent.on(r._27,this.scrollHandler,this),this.parent.on(r.n,this.toolbarBindEvent,this),this.parent.on(r.m,this.updateToolbarStatus,this),this.parent.on(r.s,this.onPropertyChanged,this),this.parent.on(r.l,this.onRefresh,this),this.parent.on(r.i,this.destroy,this),this.parent.on(r.z,this.fullScreen,this),this.parent.on(r.A,this.hideScreen,this),this.parent.on(r.W,this.updateItem,this),this.parent.on(r._17,this.dropDownBeforeOpenHandler,this),this.parent.on(r._20,this.parent.setContentHeight,this.parent),this.parent.on(r._31,this.focusChangeHandler,this),this.parent.on(r._24,this.mouseDownHandler,this),this.parent.on(r._25,this.mouseDownHandler,this),this.parent.on(r._89,this.setCssClass,this),this.parent.on(r._44,this.moduleDestroy,this),this.parent.inlineMode.enable||n.i(a.d)()||this.parent.on(r.j,this.toolbarClickHandler,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.g,this.renderToolbar),this.parent.off(r._27,this.scrollHandler),this.parent.off(r.n,this.toolbarBindEvent),this.parent.off(r.m,this.updateToolbarStatus),this.parent.off(r.s,this.onPropertyChanged),this.parent.off(r.l,this.onRefresh),this.parent.off(r.i,this.destroy),this.parent.off(r.z,this.parent.fullScreenModule.showFullScreen),this.parent.off(r.A,this.parent.fullScreenModule.hideFullScreen),this.parent.off(r.W,this.updateItem),this.parent.off(r._17,this.dropDownBeforeOpenHandler),this.parent.off(r._20,this.parent.setContentHeight),this.parent.off(r._31,this.focusChangeHandler),this.parent.off(r._24,this.mouseDownHandler),this.parent.off(r._25,this.mouseDownHandler),this.parent.off(r._89,this.setCssClass),this.parent.off(r._44,this.moduleDestroy),this.parent.inlineMode.enable||n.i(a.d)()||this.parent.off(r.j,this.toolbarClickHandler))},e.prototype.setCssClass=function(e){this.toolbarObj&&e.cssClass&&(n.i(i.isNullOrUndefined)(e.oldCssClass)?this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass+" "+e.cssClass).trim()}):this.toolbarObj.setProperties({cssClass:(this.toolbarObj.cssClass.replace(e.oldCssClass,"").trim()+" "+e.cssClass).trim()}))},e.prototype.onRefresh=function(){this.parent.inlineMode.enable||this.refreshToolbarOverflow(),this.parent.setContentHeight("",!0)},e.prototype.onPropertyChanged=function(e){if(!n.i(i.isNullOrUndefined)(e.newProp.inlineMode))for(var t=0,r=Object.keys(e.newProp.inlineMode);t<r.length;t++){var o=r[t];switch(o){case"enable":this.refreshToolbar()}}e.module===this.getModuleName()&&this.refreshToolbar()},e.prototype.refreshToolbar=function(){n.i(i.isNullOrUndefined)(this.baseToolbar.toolbarObj)&&(this.baseToolbar=this.parent.getBaseToolbarObject());var e=n.i(i.select)("."+o.F,this.parent.element);(n.i(i.select)("."+o.g,this.parent.element)||e)&&this.destroyToolbar(),this.parent.toolbarSettings.enable&&(this.addEventListener(),this.renderToolbar(),this.parent.wireScrollElementsEvents(),n.i(i.select)("."+o._69,this.parent.element)||n.i(a.k)(this.baseToolbar,this.parent.formatter.editorManager.undoRedoManager.getUndoStatus()),this.parent.notify(r._75,{}))},e.prototype.getModuleName=function(){return"toolbar"},e}()},function(e,t,n){"use strict";var i=n(105);n.d(t,"a",function(){return i.a});var r=n(5);n.d(t,"b",function(){return r.a}),n.d(t,"c",function(){return r.b}),n.d(t,"d",function(){return r.c});var o=n(70);n.d(t,"e",function(){return o.a});var s=n(1);n.d(t,"f",function(){return s.a}),n.d(t,"g",function(){return s.b}),n.d(t,"h",function(){return s.c}),n.d(t,"i",function(){return s.d}),n.d(t,"j",function(){return s.e}),n.d(t,"k",function(){return s.f}),n.d(t,"l",function(){return s.g}),n.d(t,"m",function(){return s.h}),n.d(t,"n",function(){return s.i}),n.d(t,"o",function(){return s.j}),n.d(t,"p",function(){return s.k}),n.d(t,"q",function(){return s.l}),n.d(t,"r",function(){return s.m}),n.d(t,"s",function(){return s.n}),n.d(t,"t",function(){return s.o}),n.d(t,"u",function(){return s.p}),n.d(t,"v",function(){return s.q}),n.d(t,"w",function(){return s.r}),n.d(t,"x",function(){return s.s}),n.d(t,"y",function(){return s.t}),n.d(t,"z",function(){return s.u}),n.d(t,"A",function(){return s.v}),n.d(t,"B",function(){return s.w}),n.d(t,"C",function(){return s.x}),n.d(t,"D",function(){return s.y}),n.d(t,"E",function(){return s.z}),n.d(t,"F",function(){return s.A}),n.d(t,"G",function(){return s.B}),n.d(t,"H",function(){return s.C}),n.d(t,"I",function(){return s.D}),n.d(t,"J",function(){return s.E}),n.d(t,"K",function(){return s.F}),n.d(t,"L",function(){return s.G}),n.d(t,"M",function(){return s.H}),n.d(t,"N",function(){return s.I}),n.d(t,"O",function(){return s.J}),n.d(t,"P",function(){return s.K}),n.d(t,"Q",function(){return s.L}),n.d(t,"R",function(){return s.M}),n.d(t,"S",function(){return s.N}),n.d(t,"T",function(){return s.O}),n.d(t,"U",function(){return s.P}),n.d(t,"V",function(){return s.Q}),n.d(t,"W",function(){return s.R}),n.d(t,"X",function(){return s.S}),n.d(t,"Y",function(){return s.T}),n.d(t,"Z",function(){return s.U}),n.d(t,"_0",function(){return s.V}),n.d(t,"_1",function(){return s.W}),n.d(t,"_2",function(){return s.X}),n.d(t,"_3",function(){return s.Y}),n.d(t,"_4",function(){return s.Z}),n.d(t,"_5",function(){return s._0}),n.d(t,"_6",function(){return s._1}),n.d(t,"_7",function(){return s._2}),n.d(t,"_8",function(){return s._3}),n.d(t,"_9",function(){return s._4}),n.d(t,"_10",function(){return s._5}),n.d(t,"_11",function(){return s._6}),n.d(t,"_12",function(){return s._7}),n.d(t,"_13",function(){return s._8}),n.d(t,"_14",function(){return s._9}),n.d(t,"_15",function(){return s._10}),n.d(t,"_16",function(){return s._11}),n.d(t,"_17",function(){return s._12}),n.d(t,"_18",function(){return s._13}),n.d(t,"_19",function(){return s._14}),n.d(t,"_20",function(){return s._15}),n.d(t,"_21",function(){return s._16}),n.d(t,"_22",function(){return s._17}),n.d(t,"_23",function(){return s._18}),n.d(t,"_24",function(){return s._19}),n.d(t,"_25",function(){return s._20}),n.d(t,"_26",function(){return s._21}),n.d(t,"_27",function(){return s._22}),n.d(t,"_28",function(){return s._23}),n.d(t,"_29",function(){return s._24}),n.d(t,"_30",function(){return s._25}),n.d(t,"_31",function(){return s._26}),n.d(t,"_32",function(){return s._27}),n.d(t,"_33",function(){return s._28}),n.d(t,"_34",function(){return s._29}),n.d(t,"_35",function(){return s._30}),n.d(t,"_36",function(){return s._31}),n.d(t,"_37",function(){return s._32}),n.d(t,"_38",function(){return s._33}),n.d(t,"_39",function(){return s._34}),n.d(t,"_40",function(){return s._35}),n.d(t,"_41",function(){return s._36}),n.d(t,"_42",function(){return s._37}),n.d(t,"_43",function(){return s._38}),n.d(t,"_44",function(){return s._39}),n.d(t,"_45",function(){return s._40}),n.d(t,"_46",function(){return s._41}),n.d(t,"_47",function(){return s._42}),n.d(t,"_48",function(){return s._43}),n.d(t,"_49",function(){return s._44}),n.d(t,"_50",function(){return s._45}),n.d(t,"_51",function(){return s._46}),n.d(t,"_52",function(){return s._47}),n.d(t,"_53",function(){return s._48}),n.d(t,"_54",function(){return s._49}),n.d(t,"_55",function(){return s._50}),n.d(t,"_56",function(){return s._51}),n.d(t,"_57",function(){return s._52}),n.d(t,"_58",function(){return s._53}),n.d(t,"_59",function(){return s._54}),n.d(t,"_60",function(){return s._55}),n.d(t,"_61",function(){return s._56}),n.d(t,"_62",function(){return s._57}),n.d(t,"_63",function(){return s._58}),n.d(t,"_64",function(){return s._59}),n.d(t,"_65",function(){return s._60}),n.d(t,"_66",function(){return s._61}),n.d(t,"_67",function(){return s._62}),n.d(t,"_68",function(){return s._63}),n.d(t,"_69",function(){return s._64}),n.d(t,"_70",function(){return s._65}),n.d(t,"_71",function(){return s._66}),n.d(t,"_72",function(){return s._67}),n.d(t,"_73",function(){return s._68}),n.d(t,"_74",function(){return s._69}),n.d(t,"_75",function(){return s._70}),n.d(t,"_76",function(){return s._71}),n.d(t,"_77",function(){return s._72}),n.d(t,"_78",function(){return s._73}),n.d(t,"_79",function(){return s._74}),n.d(t,"_80",function(){return s._75}),n.d(t,"_81",function(){return s._76}),n.d(t,"_82",function(){return s._77}),n.d(t,"_83",function(){return s._78}),n.d(t,"_84",function(){return s._79}),n.d(t,"_85",function(){return s._80}),n.d(t,"_86",function(){return s._81}),n.d(t,"_87",function(){return s._82}),n.d(t,"_88",function(){return s._83}),n.d(t,"_89",function(){return s._84}),n.d(t,"_90",function(){return s._85}),n.d(t,"_91",function(){return s._86}),n.d(t,"_92",function(){return s._87}),n.d(t,"_93",function(){return s._88}),n.d(t,"_94",function(){return s._89}),n.d(t,"_95",function(){return s._90}),n.d(t,"_96",function(){return s._91}),n.d(t,"_97",function(){return s._92}),n.d(t,"_98",function(){return s._93}),n.d(t,"_99",function(){return s._94}),n.d(t,"_100",function(){return s._95}),n.d(t,"_101",function(){return s._96}),n.d(t,"_102",function(){return s._97});var a=n(2);n.d(t,"_103",function(){return a.a}),n.d(t,"_104",function(){return a.b}),n.d(t,"_105",function(){return a.c}),n.d(t,"_106",function(){return a.d}),n.d(t,"_107",function(){return a.e}),n.d(t,"_108",function(){return a.f}),n.d(t,"_109",function(){return a.g}),n.d(t,"_110",function(){return a.h}),n.d(t,"_111",function(){return a.i}),n.d(t,"_112",function(){return a.j}),n.d(t,"_113",function(){return a.k}),n.d(t,"_114",function(){return a.l}),n.d(t,"_115",function(){return a.m}),n.d(t,"_116",function(){return a.n}),n.d(t,"_117",function(){return a.o}),n.d(t,"_118",function(){return a.p}),n.d(t,"_119",function(){return a.q}),n.d(t,"_120",function(){return a.r}),n.d(t,"_121",function(){return a.s}),n.d(t,"_122",function(){return a.t}),n.d(t,"_123",function(){return a.u}),n.d(t,"_124",function(){return a.v}),n.d(t,"_125",function(){return a.w}),n.d(t,"_126",function(){return a.x}),n.d(t,"_127",function(){return a.y}),n.d(t,"_128",function(){return a.z}),n.d(t,"_129",function(){return a.A}),n.d(t,"_130",function(){return a.B}),n.d(t,"_131",function(){return a.C}),n.d(t,"_132",function(){return a.D}),n.d(t,"_133",function(){return a.E}),n.d(t,"_134",function(){return a.F}),n.d(t,"_135",function(){return a.G}),n.d(t,"_136",function(){return a.H}),n.d(t,"_137",function(){return a.I}),n.d(t,"_138",function(){return a.J}),n.d(t,"_139",function(){return a.K}),n.d(t,"_140",function(){return a.L}),n.d(t,"_141",function(){return a.M}),n.d(t,"_142",function(){return a.N}),n.d(t,"_143",function(){return a.O}),n.d(t,"_144",function(){return a.P}),n.d(t,"_145",function(){return a.Q}),n.d(t,"_146",function(){return a.R}),n.d(t,"_147",function(){return a.S}),n.d(t,"_148",function(){return a.T}),n.d(t,"_149",function(){return a.U}),n.d(t,"_150",function(){return a.V}),n.d(t,"_151",function(){return a.W}),n.d(t,"_152",function(){return a.X}),n.d(t,"_153",function(){return a.Y}),n.d(t,"_154",function(){return a.Z}),n.d(t,"_155",function(){return a._0}),n.d(t,"_156",function(){return a._1}),n.d(t,"_157",function(){return a._2}),n.d(t,"_158",function(){return a._3}),n.d(t,"_159",function(){return a._4}),n.d(t,"_160",function(){return a._5}),n.d(t,"_161",function(){return a._6}),n.d(t,"_162",function(){return a._7}),n.d(t,"_163",function(){return a._8}),n.d(t,"_164",function(){return a._9}),n.d(t,"_165",function(){return a._10}),n.d(t,"_166",function(){return a._11}),n.d(t,"_167",function(){return a._12}),n.d(t,"_168",function(){return a._13}),n.d(t,"_169",function(){return a._14}),n.d(t,"_170",function(){return a._15}),n.d(t,"_171",function(){return a._16}),n.d(t,"_172",function(){return a._17}),n.d(t,"_173",function(){return a._18}),n.d(t,"_174",function(){return a._19}),n.d(t,"_175",function(){return a._20}),n.d(t,"_176",function(){return a._21}),n.d(t,"_177",function(){return a._22}),n.d(t,"_178",function(){return a._23}),n.d(t,"_179",function(){return a._24}),n.d(t,"_180",function(){return a._25}),n.d(t,"_181",function(){return a._26}),n.d(t,"_182",function(){return a._27}),n.d(t,"_183",function(){return a._28}),n.d(t,"_184",function(){return a._29}),n.d(t,"_185",function(){return a._30}),n.d(t,"_186",function(){return a._31}),n.d(t,"_187",function(){return a._32}),n.d(t,"_188",function(){return a._33}),n.d(t,"_189",function(){return a._34}),n.d(t,"_190",function(){return a._35}),n.d(t,"_191",function(){return a._36}),n.d(t,"_192",function(){return a._37}),n.d(t,"_193",function(){return a._38}),n.d(t,"_194",function(){return a._39}),n.d(t,"_195",function(){return a._40}),n.d(t,"_196",function(){return a._41}),n.d(t,"_197",function(){return a._42}),n.d(t,"_198",function(){return a._43}),n.d(t,"_199",function(){return a._44}),n.d(t,"_200",function(){return a._45}),n.d(t,"_201",function(){return a._46}),n.d(t,"_202",function(){return a._47}),n.d(t,"_203",function(){return a._48}),n.d(t,"_204",function(){return a._49}),n.d(t,"_205",function(){return a._50}),n.d(t,"_206",function(){return a._51}),n.d(t,"_207",function(){return a._52}),n.d(t,"_208",function(){return a._53}),n.d(t,"_209",function(){return a._54}),n.d(t,"_210",function(){return a._55}),n.d(t,"_211",function(){return a._56}),n.d(t,"_212",function(){return a._57}),n.d(t,"_213",function(){return a._58}),n.d(t,"_214",function(){return a._59}),n.d(t,"_215",function(){return a._60}),n.d(t,"_216",function(){return a._61}),n.d(t,"_217",function(){return a._62}),n.d(t,"_218",function(){return a._63}),n.d(t,"_219",function(){return a._64}),n.d(t,"_220",function(){return a._65}),n.d(t,"_221",function(){return a._66}),n.d(t,"_222",function(){return a._67}),n.d(t,"_223",function(){return a._68}),n.d(t,"_224",function(){return a._69});var l=n(4);n.d(t,"_225",function(){return l.a}),n.d(t,"_226",function(){return l.b}),n.d(t,"_227",function(){return l.c}),n.d(t,"_228",function(){return l.d}),n.d(t,"_229",function(){return l.e}),n.d(t,"_230",function(){return l.f}),n.d(t,"_231",function(){return l.g}),n.d(t,"_232",function(){return l.h}),n.d(t,"_233",function(){return l.i}),n.d(t,"_234",function(){return l.j}),n.d(t,"_235",function(){return l.k}),n.d(t,"_236",function(){return l.l}),n.d(t,"_237",function(){return l.m}),n.d(t,"_238",function(){return l.n}),n.d(t,"_239",function(){return l.o}),n.d(t,"_240",function(){return l.p}),n.d(t,"_241",function(){return l.q}),n.d(t,"_242",function(){return l.r}),n.d(t,"_243",function(){return l.s}),n.d(t,"_244",function(){return l.t}),n.d(t,"_245",function(){return l.u}),n.d(t,"_246",function(){return l.v}),n.d(t,"_247",function(){return l.w}),n.d(t,"_248",function(){return l.x})},function(e,t,n){"use strict";n.d(t,"a",function(){return L});var i=n(0),r=(n.n(i),n(9)),o=(n.n(r),n(1)),s=n(2),a=n(78),l=n(80),d=n(70),c=n(32),u=n(31),h=n(5),p=n(63),m=n(28),f=n(25),g=n(107),b=n(108),v=n(73),C=n(65),y=n(64),N=n(95),E=n(3),S=n(4),T=n(74),O=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),k=this&&this.__assign||function(){return k=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},k.apply(this,arguments)},w=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},L=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.needsID=!0,i}return O(t,e),t.prototype.requiredModules=function(){var e=[];return this.toolbarSettings.enable&&(e.push({member:"toolbar",args:[this,this.serviceLocator]}),e.push({member:"link",args:[this,this.serviceLocator]}),e.push({member:"table",args:[this,this.serviceLocator]}),e.push({member:"image",args:[this,this.serviceLocator]}),this.quickToolbarSettings.enable&&e.push({member:"quickToolbar",args:[this,this.serviceLocator]})),this.showCharCount&&e.push({member:"count",args:[this,this.serviceLocator]}),"Markdown"===this.editorMode&&e.push({member:"markdownEditor",args:[this,this.serviceLocator]}),"HTML"===this.editorMode&&(e.push({member:"htmlEditor",args:[this,this.serviceLocator]}),e.push({member:"pasteCleanup",args:[this,this.serviceLocator]}),e.push({member:"audio",args:[this,this.serviceLocator]}),e.push({member:"video",args:[this,this.serviceLocator]}),e.push({member:"formatPainter",args:[this]}),e.push({member:"emojiPicker",args:[this,this.serviceLocator]})),this.fileManagerSettings.enable&&e.push({member:"fileManager",args:[this,this.serviceLocator]}),this.enableResize&&e.push({member:"resize",args:[this]}),e},t.prototype.updateEnable=function(){this.enabled?(n.i(i.removeClass)([this.element],s.d),this.element.setAttribute("aria-disabled","false"),n.i(i.isNullOrUndefined)(this.htmlAttributes.tabindex)?this.inputElement.setAttribute("tabindex","0"):this.inputElement.setAttribute("tabindex",this.htmlAttributes.tabindex)):(this.getToolbar()&&(n.i(i.removeClass)(this.getToolbar().querySelectorAll("."+s._10),s._10),n.i(i.removeClass)([this.getToolbar()],[s.i,s.j])),n.i(i.addClass)([this.element],s.d),this.element.tabIndex=-1,this.element.setAttribute("aria-disabled","true"),this.inputElement.setAttribute("tabindex","-1"))},t.prototype.setEnable=function(){this.updateEnable(),this.enabled?this.eventInitializer():this.unWireEvents()},t.prototype.initializeValue=function(){this.isFocusOut=!1,this.isRTE=!1,this.isBlur=!0,this.defaultResetValue=null,this.isResizeInitialized=!1},t.prototype.preRender=function(){this.initializeValue(),this.onBlurHandler=this.blurHandler.bind(this),this.onFocusHandler=this.focusHandler.bind(this),this.onResizeHandler=this.resizeHandler.bind(this),this.clickPoints={clientX:0,clientY:0},this.initialValue=this.value,this.serviceLocator=new c.a,this.initializeServices(),this.setContainer(),this.persistData(),n.i(i.setStyleAttribute)(this.element,{width:n.i(i.formatUnit)(this.width)}),n.i(i.attributes)(this.element,{role:"application","aria-label":"Rich Text Editor"})},t.prototype.persistData=function(){if(this.enablePersistence&&"TEXTAREA"===this.originalElement.tagName){this.element.id=this.originalElement.id+"_wrapper";var e=window.localStorage.getItem(this.getModuleName()+this.element.id);n.i(i.isNullOrUndefined)(e)||""===e||this.setProperties(JSON.parse(e),!0)}},t.prototype.setContainer=function(){this.originalElement=this.element.cloneNode(!0),null!==this.value&&null===this.valueTemplate||this.setValue(),this.element.hasAttribute("tabindex")&&(this.htmlAttributes={tabindex:this.element.getAttribute("tabindex")},this.element.removeAttribute("tabindex")),this.element.innerHTML="";for(var e=["class","style","id","ejs-for"],t={},r=0;r<this.element.attributes.length;r++)-1!==e.indexOf(this.element.attributes[r].name)||/^data-val/.test(this.element.attributes[r].name)||(t[this.element.attributes[r].name]=this.element.getAttribute(this.element.attributes[r].name));if(n.i(i.extend)(t,this.htmlAttributes,t),this.setProperties({htmlAttributes:t},!0),n.i(i.isNullOrUndefined)(this.htmlAttributes.id)||(this.element.id=this.htmlAttributes.id),"TEXTAREA"===this.element.tagName){var o=this.createElement("div",{className:this.element.getAttribute("class")});this.element.innerHTML="",this.element.parentElement.insertBefore(o,this.element),this.valueContainer=this.element,n.i(i.removeClass)([this.valueContainer],this.element.getAttribute("class").split(" ")),this.element=o}else this.valueContainer=this.createElement("textarea",{id:this.getID()+"-value",attrs:{"aria-labelledby":this.getID()}});if(this.valueContainer.name=this.getID(),n.i(i.addClass)([this.valueContainer],s._38),!n.i(i.isNullOrUndefined)(this.cssClass))for(var a=this.cssClass.split(" "),l=0;l<a.length;l++)n.i(i.addClass)([this.valueContainer],a[l]);this.element.appendChild(this.valueContainer)},t.prototype.getPersistData=function(){return this.addOnPersist(["value"])},t.prototype.focusIn=function(){this.enabled&&(this.inputElement.focus(),this.focusHandler({}))},t.prototype.focusOut=function(){this.enabled&&(this.inputElement.blur(),this.blurHandler({}))},t.prototype.selectAll=function(){this.notify(o._32,{})},t.prototype.selectRange=function(e){this.notify(o._33,{range:e})},t.prototype.getSelection=function(){var e="";return this.notify(o._34,{callBack:function(t){e=t}}),e},t.prototype.showEmojiPicker=function(e,t){this.readonly||this.notify(o._92,{x:e,y:t})},t.prototype.executeCommand=function(e,t,r){t=this.htmlPurifier(e,t);var s;if("HTML"===this.editorMode){var a=this.getRange();this.iframeSettings.enable&&this.formatter.editorManager.nodeSelection.Clear(this.element.ownerDocument);(!(!this.iframeSettings.enable||a.startContainer!==this.inputElement)||!this.inputElement.contains(a.startContainer))&&this.focusIn()}var l=d.a[""+e];if(r&&r.undo&&r.undo&&0===this.formatter.getUndoRedoStack().length&&this.formatter.saveData(),-1!==this.maxLength&&!n.i(i.isNullOrUndefined)(l.command)){var c=0;if("Links"===l.command&&(c=0===t.text.length?t.url.length:t.text.length),"Images"!==l.command&&"Table"!==l.command&&"Files"!==l.command||(c=1),"InsertHTML"===l.command)if(n.i(i.isNullOrUndefined)(t))n.i(i.isNullOrUndefined)(l.value)||"<hr/>"!==l.value&&"<br/>"!==l.value||(c=1);else{var u=this.createElement("div");u.innerHTML=t,c=u.textContent.length}"InsertText"===l.command&&(c=t.length);var h=this.getText().trim().replace(/(\r\n|\n|\r)/gm,"").replace(/\u200B/g,"").length,p=this.getSelection().length,m=h-p+c;if(!(-1===this.maxLength||m<=this.maxLength))return}s=t,"FormatPainter"===l.command&&(n.i(i.isNullOrUndefined)(t)||(this.formatPainterSettings=t),s={formatPainterAction:l.value}),this.formatter.editorManager.execCommand(l.command,l.subCommand?l.subCommand:s||l.value,null,null,s||l.value,s||l.value),r&&r.undo&&(this.formatter.saveData(),this.formatter.enableUndo(this)),this.setPlaceHolder(),this.notify(o.f,{})},t.prototype.htmlPurifier=function(e,t){if("HTML"===this.editorMode)switch(e){case"insertHTML":this.enableHtmlSanitizer&&(t="string"==typeof t?this.htmlEditorModule.sanitizeHelper(t):this.htmlEditorModule.sanitizeHelper(t.outerHTML));break;case"insertTable":n.i(i.isNullOrUndefined)(t.width)&&(t.width={minWidth:this.tableSettings.minWidth,maxWidth:this.tableSettings.maxWidth,width:this.tableSettings.width});break;case"insertImage":var r=this.createElement("img",{attrs:{src:t.url}}),o=r.outerHTML;this.enableHtmlSanitizer&&(o=this.htmlEditorModule.sanitizeHelper(r.outerHTML));var s=""!==o&&this.createElement("div",{innerHTML:o}).firstElementChild.getAttribute("src")||null;s=n.i(i.isNullOrUndefined)(s)?"":s,t.url=s,n.i(i.isNullOrUndefined)(t.width)&&(t.width={minWidth:this.insertImageSettings.minWidth,maxWidth:this.insertImageSettings.maxWidth,width:this.insertImageSettings.width}),n.i(i.isNullOrUndefined)(t.height)&&(t.height={minHeight:this.insertImageSettings.minHeight,maxHeight:this.insertImageSettings.maxHeight,height:this.insertImageSettings.height});break;case"insertAudio":var a=this.createElement("audio",{attrs:{controls:""}}),r=this.createElement("source",{attrs:{src:t.url,type:t.url&&t.url.split(".").length>0?"audio/"+t.url.split(".")[t.url.split(".").length-1]:""}});a.appendChild(r);var l=a.outerHTML;this.enableHtmlSanitizer&&(l=this.htmlEditorModule.sanitizeHelper(a.outerHTML));var s=""!==l&&this.createElement("div",{innerHTML:l}).firstElementChild.firstElementChild.getAttribute("src")||null;s=n.i(i.isNullOrUndefined)(s)?"":s,t.url=s;break;case"insertVideo":var a=this.createElement("video",{attrs:{controls:""}}),r=this.createElement("source",{attrs:{src:t.url,type:t.url&&t.url.split(".").length>0?"video/"+t.url.split(".")[t.url.split(".").length-1]:""}});a.appendChild(r);var l=a.outerHTML;this.enableHtmlSanitizer&&(l=this.htmlEditorModule.sanitizeHelper(r.outerHTML));var s=""!==l&&this.createElement("div",{innerHTML:l}).firstElementChild.getAttribute("src")||null;s=n.i(i.isNullOrUndefined)(s)?"":s,t.url=s,n.i(i.isNullOrUndefined)(t.width)&&(t.width={minWidth:this.insertVideoSettings.minWidth,maxWidth:this.insertVideoSettings.maxWidth,width:this.insertVideoSettings.width}),n.i(i.isNullOrUndefined)(t.height)&&(t.height={minHeight:this.insertVideoSettings.minHeight,maxHeight:this.insertVideoSettings.maxHeight,height:this.insertVideoSettings.height});break;case"createLink":var d=this.createElement("a",{attrs:{href:t.url}}),c=d.outerHTML;this.enableHtmlSanitizer&&(c=this.htmlEditorModule.sanitizeHelper(d.outerHTML));var u=""!==c&&this.createElement("div",{innerHTML:c}).firstElementChild.getAttribute("href")||null;u=n.i(i.isNullOrUndefined)(u)?"":u,t.url=u}return t},t.prototype.encode=function(e){var t=this.createElement("div");return t.innerText=e.trim(),t.innerHTML.replace(/<br\s*[\/]?>/gi,"\n")},t.prototype.render=function(){this.value&&!this.valueTemplate&&this.setProperties({value:this.serializeValue(this.value)},!0),this.renderModule=new a.a(this,this.serviceLocator),this.sourceCodeModule=new l.a(this,this.serviceLocator),this.notify(o.e,{}),this.trigger(o.d),this.RTERender();new p.a(this);this.notify(o.g,{}),this.enableXhtml&&this.setProperties({value:this.getXhtml()},!0),this.toolbarSettings.enable&&("Expand"===this.toolbarSettings.type||"MultiRow"===this.toolbarSettings.type||"Scrollable"===this.toolbarSettings.type)&&!n.i(i.isNullOrUndefined)(this.getToolbar())&&this.toolbarSettings.items.indexOf("Undo")>-1&&this.toolbarSettings.items.indexOf("Redo")>-1&&this.disableToolbarItem(["Undo","Redo"]),this.setContentHeight(),null!==this.value&&(this.valueContainer.defaultValue=this.value),this.enabled&&!this.readonly?this.eventInitializer():this.unWireEvents(),this.notify(o._89,{cssClass:this.getCssClass()}),this.addAudioVideoWrapper(),this.notify(o.c,{}),this.renderComplete()},t.prototype.addAudioVideoWrapper=function(){for(var e,t=this,n=this.element.querySelectorAll("audio"),r=0;r<n.length;r++)if(n[r].classList.contains("e-rte-audio")||(n[r].classList.add("e-rte-audio"),n[r].classList.add(s._4)),!n[r].parentElement.classList.contains(s.V)&&!n[r].parentElement.classList.contains(s.X)){var a=this.createElement("span",{className:s.X});a.setAttribute("style","width:300px; margin:0 auto;"),a.contentEditable="false";var l=this.createElement("span",{className:s.V});a.appendChild(l),n[r].parentNode.insertBefore(a,n[r].nextSibling),l.appendChild(n[r]),null===a.nextElementSibling&&(e=this.createElement("br"),a.parentNode.insertBefore(e,a.nextSibling))}for(var d=this.element.querySelectorAll("video"),r=0;r<d.length;r++){if(d[r].classList.contains("e-rte-video")||(d[r].classList.add("e-rte-video"),d[r].classList.add(s._5)),!d[r].parentElement.classList.contains(s.V)&&!d[r].parentElement.classList.contains(s.Y)){var c=this.createElement("span",{className:s.Y});c.contentEditable="false",d[r].parentNode.insertBefore(c,d[r].nextSibling),c.appendChild(d[r]),null===c.nextElementSibling&&(e=this.createElement("br"),c.parentNode.insertBefore(e,c.nextSibling))}-1!==i.Browser.userAgent.indexOf("Firefox")&&(d[r].addEventListener("play",function(e){t.notify(o._24,{args:e}),t.notify("editAreaClick",{args:e})}),d[r].addEventListener("pause",function(e){t.notify(o._24,{args:e}),t.notify("editAreaClick",{args:e})}))}},t.prototype.eventInitializer=function(){this.wireEvents()},t.prototype.cleanList=function(e){var t=this.getRange(),r=t.startContainer,o=t.endContainer,s=t.startOffset,a=r===o,l=(o.textContent.length,"#text"===t.endContainer.nodeName?t.endContainer.parentElement:t.endContainer),d=n.i(i.closest)(l,"LI"),c=!1,u=t.endOffset;if(o.nodeType===Node.TEXT_NODE&&"\ufeff"===o.textContent.charAt(u-1)&&u--,!n.i(i.isNullOrUndefined)(d)&&l.textContent.trim().length===u&&!t.collapsed&&n.i(i.isNullOrUndefined)(l.nextElementSibling)){for(var h=0;h<d.childNodes.length;h++)"#text"===d.childNodes[h].nodeName&&0===d.childNodes[h].textContent.trim().length&&(n.i(i.detach)(d.childNodes[h]),c=!0,h--);for(var p=d;null!==p.lastChild&&"#text"!==p.nodeName;)p=p.lastChild;if(c){var m="BR"!==p.nodeName||n.i(i.isNullOrUndefined)(p.previousSibling)?p:p.previousSibling;this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),a?m:r,m,s,"BR"===m.nodeName?0:m.textContent.length)}}},t.prototype.keyDown=function(e){if(this.notify(o.v,{member:"keydown",args:e}),this.restrict(e),"HTML"===this.editorMode&&this.cleanList(e),"HTML"===this.editorMode&&(8===e.which&&"Backspace"===e.code||46===e.which&&"Delete"===e.code)){var t=this.getRange(),r="#text"===t.startContainer.nodeName?t.startContainer.parentElement:t.startContainer;if(n.i(i.closest)(r,"pre")&&8===e.which&&8203===t.startContainer.textContent.charCodeAt(t.startOffset-1)||46===e.which&&8203===t.startContainer.textContent.charCodeAt(t.startOffset)){var s=new RegExp(String.fromCharCode(8203),"g"),a=8===e.which?t.startOffset-1:t.startOffset;t.startContainer.textContent=t.startContainer.textContent.replace(s,""),this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),t.startContainer,a)}else if("Backspace"===e.code&&8===e.which&&8203===t.startContainer.textContent.charCodeAt(0)&&t.collapsed){var l=t.startContainer.parentElement,d=void 0,c=void 0;for(c=0;c<l.childNodes.length;c++)l.childNodes[c]===t.startContainer&&(d=c);var u=!0,h=[];for(c=d;c>=0;c--)3===l.childNodes[c].nodeType&&8203===l.childNodes[c].textContent.charCodeAt(0)&&u?h.push(c):u=!1;if(h.length>0)for(c=h.length-1;c>0;c--)l.childNodes[h[c]].textContent="";this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),t.startContainer,t.startOffset)}}var p=!!n.i(i.isNullOrUndefined)(e.action)||"format-copy"!==e.action;if(0===this.formatter.getUndoRedoStack().length&&p&&!(e.altKey||e.shiftKey||e.altKey&&e.shiftKey&&67==e.which)&&this.formatter.saveData(),"insert-link"!==e.action&&"format-copy"!==e.action&&"format-paste"!==e.action&&(!e.target||!e.target.classList.contains("e-mention")||"Tab"!==e.code)&&(e.action&&"paste"!==e.action&&"space"!==e.action||9===e.which||"Backspace"===e.code&&8===e.which)){var m=!1;switch(n.i(i.isNullOrUndefined)(this.formatPainterModule)||(m="escape"===this.formatPainterModule.previousAction),m||this.formatter.process(this,null,e),e.action){case"toolbar-focus":if(this.toolbarSettings.enable&&this.getToolbarElement()){var f=this.getToolbarElement().querySelector(".e-toolbar-item:not(.e-overlay)[title]");f.firstElementChild.removeAttribute("tabindex"),f.firstElementChild.focus()}break;case"escape":this.contentModule.getEditPanel().focus()}}n.i(i.isNullOrUndefined)(this.placeholder)||(n.i(i.isNullOrUndefined)(this.placeHolderWrapper)||1===this.inputElement.textContent.length?this.iframeSettings.enable&&this.inputElement.classList.contains("e-rte-placeholder")?n.i(i.removeClass)([this.inputElement],"e-rte-placeholder"):this.setPlaceHolder():this.placeHolderWrapper.style.display="none"),this.autoResize()},t.prototype.keyUp=function(e){if("HTML"===this.editorMode){var t=this.getRange();if(-1!==i.Browser.userAgent.indexOf("Firefox")&&"#text"===t.startContainer.nodeName&&t.startContainer.parentElement===this.inputElement&&"BR"!==this.enterKey){var r=this.getRange(),s=this.createElement(this.enterKey);r.startContainer.parentElement.insertBefore(s,r.startContainer),s.appendChild(r.startContainer),this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),s.childNodes[0],s.childNodes[0],s.childNodes[0].textContent.length,s.childNodes[0].textContent.length)}}this.notify(o.u,{member:"keyup",args:e}),39!==e.keyCode&&37!==e.keyCode||this.notify(o.t,{member:"tableModulekeyUp",args:e}),"KeyX"!==e.code||88!==e.which||88!==e.keyCode||!e.ctrlKey||""!==this.inputElement.innerHTML&&"<br>"!==this.inputElement.innerHTML||(this.inputElement.innerHTML=n.i(S.p)(n.i(S.r)(this),this));var a=32===e.which||13===e.which||8===e.which||46===e.which,l="C"===e.key&&e.altKey&&e.shiftKey,d="V"===e.key&&e.altKey&&e.shiftKey;(!l&&!d&&("shift"!==e.key&&!e.ctrlKey&&e.key&&1===e.key.length||a)||"Markdown"===this.editorMode&&("shift"!==e.key&&!e.ctrlKey&&e.key&&1===e.key.length||a)&&!this.inlineMode.enable)&&this.formatter.onKeyHandler(this,e),(this.inputElement&&0!==this.inputElement.textContent.length||this.element.querySelectorAll(".e-toolbar-item.e-active").length>0||this.formatter.getUndoRedoStack().length>0)&&this.notify(o.k,{args:e}),n.i(i.isNullOrUndefined)(this.placeholder)||"Enter"===e.key&&13===e.keyCode||"<p><br></p>"!==this.inputElement.innerHTML&&"<div><br></div>"!==this.inputElement.innerHTML&&"<br>"!==this.inputElement.innerHTML||this.setPlaceHolder()},t.prototype.serializeValue=function(e){return"HTML"!==this.editorMode||n.i(i.isNullOrUndefined)(e)||(this.enableHtmlEncode?(e=this.htmlEditorModule.sanitizeHelper(n.i(S.t)(e)),e=this.encode(e)):(e=this.htmlEditorModule.sanitizeHelper(e),e=this.enableXhtml?this.htmlEditorModule.xhtmlValidation.selfEncloseValidation(e):e)),e},t.prototype.sanitizeHtml=function(e){return this.serializeValue(e)},t.prototype.updateValue=function(e){if(n.i(i.isNullOrUndefined)(e)){var t=this.inputElement.innerHTML;this.setProperties({value:n.i(S.s)(t)?null:t})}else this.setProperties({value:e})},t.prototype.triggerEditArea=function(e){if(n.i(S.d)()){var t=e.touches?e.changedTouches[0]:e;this.clickPoints.clientX===t.clientX&&this.clickPoints.clientY===t.clientY&&this.notify(o._26,{member:"editAreaClick",args:e})}else this.notify(o._26,{member:"editAreaClick",args:e})},t.prototype.notifyMouseUp=function(e){var t=e.touches?e.changedTouches[0]:e;this.notify(o.w,{member:"mouseUp",args:e,touchData:{prevClientX:this.clickPoints.clientX,prevClientY:this.clickPoints.clientY,clientX:t.clientX,clientY:t.clientY}}),(this.inputElement&&("HTML"===this.editorMode&&0!==this.inputElement.textContent.length||"Markdown"===this.editorMode&&0!==this.inputElement.value.length)||e.target&&("VIDEO"===e.target.nodeName||e.target.querySelectorAll("."+s.Y).length>0)||e.target&&"BR"!==e.target.nodeName&&(e.target.classList.contains(s.X)||e.target.classList.contains(s.V)||e.target.classList.contains(s.W)))&&this.notify(o.k,{args:e}),this.triggerEditArea(e)},t.prototype.mouseUp=function(e){if(this.quickToolbarSettings.showOnRightClick&&i.Browser.isDevice){var t=e.target,r=n.i(i.closest)(t,"table");if(t&&"A"===t.nodeName||"IMG"===t.nodeName||"TD"===t.nodeName||"TH"===t.nodeName||"TABLE"===t.nodeName||r&&this.contentModule.getEditPanel().contains(r))return}if(3===e.detail){var o=this.getRange();if(this.formatter.editorManager.domNode.getSelection().rangeCount>0&&!n.i(i.isNullOrUndefined)(o.startContainer.parentElement)&&(!n.i(i.isNullOrUndefined)(o.startContainer.parentElement.nextSibling)&&(3!==o.startContainer.parentElement.nextSibling.nodeType||/\s+$/.test(o.startContainer.parentElement.nextSibling.textContent))||o.startOffset===o.endOffset)||"li"===o.startContainer.parentElement.tagName.toLocaleLowerCase()){var s=new Range,a=o.startContainer,l=o.endContainer,d=!1,c="OL"===o.commonAncestorContainer.nodeName||"UL"===o.commonAncestorContainer.nodeName||"LI"===o.commonAncestorContainer.nodeName;for(c||1!==l.nodeType||"LI"!==l.nodeName?c&&1===l.nodeType&&0===o.endOffset?l.previousElementSibling&&l.previousElementSibling.lastElementChild?l=l.previousElementSibling.lastElementChild:(l=n.i(i.closest)(l.parentElement,"li"))&&"LI"===l.nodeName&&(l=l.previousElementSibling):!n.i(i.closest)(l,"li")&&l.previousElementSibling&&l.previousElementSibling.lastChild&&l.previousElementSibling.textContent.trim().length>0?l=l.previousElementSibling.lastChild:n.i(i.closest)(l,"li")&&l.previousElementSibling&&l.previousElementSibling.lastChild&&(l=n.i(i.closest)(l,"li").parentElement.previousElementSibling.lastChild):l=n.i(i.closest)(l,"ol, ul").previousElementSibling.lastElementChild,l&&l!==this.inputElement||(l=a,d=!0);"#text"!==l.nodeName&&!d;)l=l.lastElementChild?l.lastElementChild:l.lastChild;s.setStart(a,0),s.setEnd(l,l.textContent.length),this.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(),s)}}this.notifyMouseUp(e)},t.prototype.ensureModuleInjected=function(e){return this.getInjectedModules().indexOf(e)>=0},t.prototype.onCopy=function(){this.contentModule.getDocument().execCommand("copy",!1,null)},t.prototype.onCut=function(){this.contentModule.getDocument().execCommand("cut",!1,null)},t.prototype.onPaste=function(e){var t=this,r={originalEvent:e,cancel:!1,requestType:"Paste"};this.trigger(o.S,r,function(r){var s=t.inputElement.textContent.length,a=t.getSelection().length,l=n.i(i.isNullOrUndefined)(e)||n.i(i.isNullOrUndefined)(e.clipboardData)?0:e.clipboardData.getData("text/plain").replace(/(\r\n|\n|\r)/gm,"").replace(/\u200B/g,"").length,d=s-a+l;if("Markdown"===t.editorMode){var c={requestType:"Paste",editorMode:t.editorMode,event:e};return setTimeout(function(){t.formatter.onSuccess(t,c)},0),void(-1===t.maxLength||d<=t.maxLength||e.preventDefault())}if(!r.cancel&&"true"===t.inputElement.contentEditable&&(-1===t.maxLength||d<=t.maxLength))if(n.i(i.isNullOrUndefined)(t.pasteCleanupModule)){var u={requestType:"Paste",editorMode:t.editorMode,event:e},h=null,p=!1;e&&!n.i(i.isNullOrUndefined)(e.clipboardData)&&(h=e.clipboardData.getData("text/plain"),p=e.clipboardData.getData("text/html").indexOf("MsoNormal")>0);var m=e&&e.clipboardData&&e.clipboardData.items.length>0?e.clipboardData.items[0].getAsFile():null;null!==h&&t.notify(o._36,{file:m,args:e,text:h,isWordPaste:p}),setTimeout(function(){t.formatter.onSuccess(t,u)},0)}else t.notify(o._45,{args:e});else e.preventDefault()})},t.prototype.clipboardAction=function(e,t){switch(e.toLowerCase()){case"cut":this.onCut(),this.formatter.onSuccess(this,{requestType:"Cut",editorMode:this.editorMode,event:t});break;case"copy":this.onCopy(),this.formatter.onSuccess(this,{requestType:"Copy",editorMode:this.editorMode,event:t});break;case"paste":this.onPaste(t)}},t.prototype.destroy=function(){if(!this.isDestroyed&&this.isRendered){if(n.i(i.isNullOrUndefined)(this.timeInterval)||(clearInterval(this.timeInterval),this.timeInterval=null),null===this.element.offsetParent)return n.i(i.isNullOrUndefined)(this.toolbarModule)||this.toolbarModule.destroy(),this.notify(o._44,{}),e.prototype.destroy.call(this),void(this.isRendered=!1);if(this.notify(o.i,{}),this.destroyDependentModules(),this.unWireEvents(),"TEXTAREA"===this.originalElement.tagName){this.element.parentElement.insertBefore(this.valueContainer,this.element),this.valueContainer.id=this.getID(),this.valueContainer.removeAttribute("name"),n.i(i.detach)(this.element),""!==this.originalElement.innerHTML.trim()?(this.valueContainer.value=this.originalElement.innerHTML.trim(),this.setProperties({value:n.i(i.isNullOrUndefined)(this.initialValue)?null:this.initialValue},!0)):this.valueContainer.value=this.valueContainer.defaultValue,this.element=this.valueContainer;for(var t=0;t<this.originalElement.classList.length;t++)n.i(i.addClass)([this.element],this.originalElement.classList[t]);if(!n.i(i.isNullOrUndefined)(this.cssClass))for(var r=this.cssClass.split(" "),t=0;t<r.length;t++)n.i(i.addClass)([this.element],r[t]);n.i(i.removeClass)([this.element],s._38)}else""!==this.originalElement.innerHTML.trim()?(this.element.innerHTML=this.originalElement.innerHTML.trim(),this.setProperties({value:n.i(i.isNullOrUndefined)(this.initialValue)?null:this.initialValue},!0)):this.element.innerHTML="";if(this.placeholder&&this.placeHolderWrapper&&(this.placeHolderWrapper=null),!n.i(i.isNullOrUndefined)(this.cssClass))for(var a=this.cssClass.split(" "),t=0;t<a.length;t++)""!==a[t].trim()&&n.i(i.removeClass)([this.element],a[t]);this.removeHtmlAttributes(),this.removeAttributes(),e.prototype.destroy.call(this),this.isRendered=!1}},t.prototype.removeHtmlAttributes=function(){if(this.htmlAttributes)for(var e=Object.keys(this.htmlAttributes),t=0;t<e.length&&this.element.hasAttribute(e[t]);t++)this.element.removeAttribute(e[t])},t.prototype.removeAttributes=function(){this.enabled||n.i(i.removeClass)([this.element],s.d),this.enableRtl&&n.i(i.removeClass)([this.element],s.b),this.readonly&&n.i(i.removeClass)([this.element],s._31),""!==this.element.style.width&&""===this.originalElement.style.width&&this.element.style.removeProperty("width"),""!==this.element.style.height&&""===this.originalElement.style.height&&this.element.style.removeProperty("height"),this.element.removeAttribute("aria-disabled"),this.element.removeAttribute("role"),this.element.removeAttribute("tabindex")},t.prototype.destroyDependentModules=function(){this.renderModule.destroy(),this.formatter.editorManager.undoRedoManager.destroy(),this.sourceCodeModule.destroy()},t.prototype.getContent=function(){return this.contentModule.getPanel()},t.prototype.getText=function(){return this.contentModule.getText()},t.prototype.getSelectedHtml=function(){var e,t=this.createElement("div"),n=this.contentModule.getDocument().getSelection();if(n.rangeCount>0){e=n.getRangeAt(0);var i=e.cloneContents();t.appendChild(i)}return t.innerHTML},t.prototype.showInlineToolbar=function(){if(this.inlineMode.enable){var e=this.getRange(),t="#text"===e.endContainer.nodeName?e.endContainer.parentElement:e.endContainer,n=e.getClientRects()[0].left,i=e.getClientRects()[0].top;this.quickToolbarModule.showInlineQTBar(n,i,t)}},t.prototype.hideInlineToolbar=function(){this.quickToolbarModule.hideInlineQTBar()},t.prototype.getModuleName=function(){return"richtexteditor"},t.prototype.onPropertyChanged=function(t,r){for(var a=0,l=Object.keys(t);a<l.length;a++){var d=l[a];switch(d){case"enterKey":case"value":var c=void 0;c="enterKey"===d?null===this.value||"<div><br></div>"===this.value||"<p><br></p>"===this.value||"<br>"===this.value?null:this.value:t[d],c=this.serializeValue(c);var u="HTML"===this.editorMode?n.i(S.p)(c,this):c;(!n.i(i.isNullOrUndefined)(c)&&""!==c||"enterKey"===d)&&this.setProperties({value:this.enableHtmlEncode?this.encode(n.i(S.t)(u)):u},!0),this.updatePanelValue(),this.inputElement&&this.notify(o.c,{}),this.setPlaceHolder(),this.notify(o._69,{module:"XhtmlValidation",newProp:t,oldProp:r}),this.enableXhtml&&this.setProperties({value:this.getXhtml()},!0),this.showCharCount&&this.countModule.refresh(),this.addAudioVideoWrapper();break;case"valueTemplate":this.setValue(!0),this.showCharCount&&this.countModule.refresh();break;case"width":this.setWidth(t[d]),this.toolbarSettings.enable&&!this.inlineMode.enable&&(this.toolbarModule.refreshToolbarOverflow(),this.resizeHandler());break;case"height":this.setHeight(t[d]),this.setContentHeight(),this.autoResize();break;case"readonly":this.setReadOnly(!1);break;case"cssClass":this.element.classList.remove(r[d]),this.setCssClass(t[d]),this.notify(o._89,{cssClass:t[d],oldCssClass:r[d]});break;case"enabled":this.setEnable();break;case"enableRtl":this.updateRTL();break;case"placeholder":this.placeholder=t[d],this.setPlaceHolder();break;case"htmlAttributes":n.i(C.a)(this.htmlAttributes,this,!1,!1);break;case"iframeSettings":var h=r[d];if(h.resources){var p=this.contentModule.getDocument(),m=p.querySelector("head"),f=void 0;h.resources.scripts&&(f=m.querySelectorAll("."+s.e),this.removeSheets(f)),h.resources.styles&&(f=m.querySelectorAll("."+s.f),this.removeSheets(f))}this.setIframeSettings();break;case"locale":e.prototype.refresh.call(this);break;case"inlineMode":this.notify(o.s,{module:"quickToolbar",newProp:t,oldProp:r}),this.setContentHeight();break;case"toolbarSettings":this.notify(o.s,{module:"toolbar",newProp:t,oldProp:r}),this.setContentHeight();break;case"maxLength":this.showCharCount&&this.countModule.refresh();break;case"showCharCount":t[d]&&this.countModule?this.countModule.renderCount():!1===t[d]&&this.countModule&&this.countModule.destroy();break;case"enableHtmlEncode":this.updateValueData(),this.updatePanelValue(),this.setPlaceHolder(),this.showCharCount&&this.countModule.refresh();break;case"undoRedoSteps":case"undoRedoTimer":this.formatter.editorManager.observer.notify(E.i,{newProp:t,oldProp:r});break;case"enableXhtml":this.notify(o._69,{module:"XhtmlValidation",newProp:t,oldProp:r});break;case"quickToolbarSettings":t.quickToolbarSettings.showOnRightClick?this.wireContextEvent():this.unWireContextEvent(),this.notify(o.s,{newProp:t,oldProp:r});break;case"formatPainterSettings":this.formatter.editorManager.observer.notify(E.i,{module:"formatPainter",newProp:t});break;default:this.notify(o.s,{newProp:t,oldProp:r})}}},t.prototype.updateValueData=function(){this.enableHtmlEncode?this.setProperties({value:this.encode(n.i(S.t)(this.inputElement.innerHTML))},!0):this.setProperties({value:/<[a-z][\s\S]*>/i.test(this.inputElement.innerHTML)?this.inputElement.innerHTML:n.i(S.t)(this.inputElement.innerHTML)})},t.prototype.removeSheets=function(e){var t;for(t=0;t<e.length;t++)n.i(i.detach)(e[t])},t.prototype.updatePanelValue=function(){var e=this.value;e=this.enableHtmlEncode&&this.value?n.i(S.t)(e):e;var t=this.element.querySelector("."+s._69);e?(t&&"block"===t.style.display&&(t.value=this.value),this.valueContainer&&(this.valueContainer.value=this.enableHtmlEncode?this.value:e),"HTML"===this.editorMode&&this.inputElement&&this.inputElement.innerHTML.replace("&","&").trim()!==e.trim()?this.inputElement.innerHTML=e:"Markdown"===this.editorMode&&this.inputElement&&this.inputElement.value.trim()!==e.trim()&&(this.inputElement.value=e)):(t&&"block"===t.style.display&&(t.value=""),"HTML"===this.editorMode?"DIV"===this.enterKey?this.inputElement.innerHTML="<div><br/></div>":"BR"===this.enterKey?this.inputElement.innerHTML="<br/>":(this.inputElement.innerHTML="<p><br/></p>",""===e&&this.formatter&&this.inputElement&&this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),this.inputElement.firstElementChild,this.inputElement.firstElementChild.childElementCount)):this.inputElement.value="",this.valueContainer&&(this.valueContainer.value="")),this.showCharCount&&this.countModule.refresh()},t.prototype.setHeight=function(e){this.element.style.height="auto"!==e?n.i(i.formatUnit)(e):"auto","Expand"===this.toolbarSettings.type&&("string"==typeof this.height&&this.height.indexOf("px")>-1||"number"==typeof this.height)?this.element.classList.add(s._66):this.element.classList.remove(s._66)},t.prototype.setPlaceHolder=function(){this.inputElement&&this.placeholder&&!0!==this.iframeSettings.enable&&("Markdown"!==this.editorMode?(this.placeHolderWrapper||(this.placeHolderWrapper=this.createElement("span",{className:"rte-placeholder e-rte-placeholder "+this.cssClass}),this.inputElement&&this.inputElement.parentElement.insertBefore(this.placeHolderWrapper,this.inputElement),n.i(i.attributes)(this.placeHolderWrapper,{style:"font-size: 14px; margin-left: 0px; margin-right: 0px;"})),this.placeHolderWrapper.innerHTML=this.placeholder,!(0===this.inputElement.textContent.length&&this.inputElement.childNodes.length<2)||n.i(i.isNullOrUndefined)(this.inputElement.firstChild)||"BR"!==this.inputElement.firstChild.nodeName&&("P"!==this.inputElement.firstChild.nodeName&&"DIV"!==this.inputElement.firstChild.nodeName||n.i(i.isNullOrUndefined)(this.inputElement.firstChild.firstChild)||"BR"!==this.inputElement.firstChild.firstChild.nodeName)?this.placeHolderWrapper.style.display="none":this.placeHolderWrapper.style.display="block"):this.inputElement.setAttribute("placeholder",this.placeholder)),this.placeholder&&this.iframeSettings.enable&&(!(0===this.inputElement.textContent.length&&this.inputElement.childNodes.length<2)||n.i(i.isNullOrUndefined)(this.inputElement.firstChild)||"BR"!==this.inputElement.firstChild.nodeName&&("P"!==this.inputElement.firstChild.nodeName&&"DIV"!==this.inputElement.firstChild.nodeName||n.i(i.isNullOrUndefined)(this.inputElement.firstChild.firstChild)||"BR"!==this.inputElement.firstChild.firstChild.nodeName)?n.i(i.removeClass)([this.inputElement],"e-rte-placeholder"):(n.i(i.addClass)([this.inputElement],"e-rte-placeholder"),this.inputElement.setAttribute("placeholder",this.placeholder)))},t.prototype.setWidth=function(e){"auto"!==e?n.i(i.setStyleAttribute)(this.element,{width:n.i(i.formatUnit)(this.width)}):this.element.style.width="auto"},t.prototype.setCssClass=function(e){if(!n.i(i.isNullOrUndefined)(e))for(var t=e.split(" "),r=0;r<t.length;r++)""!==t[r].trim()&&this.element.classList.add(t[r])},t.prototype.updateRTL=function(){this.notify(o._38,{enableRtl:this.enableRtl}),this.enableRtl?(this.element.classList.add(s.b),this.inputElement.classList.add(s.b)):(this.element.classList.remove(s.b),this.inputElement.classList.remove(s.b))},t.prototype.updateReadOnly=function(){this.notify(o._43,{editPanel:this.inputElement,mode:this.readonly})},t.prototype.setReadOnly=function(e){this.updateReadOnly(),e||(this.readonly&&this.enabled?(this.unbindEvents(),this.unWireEvents()):this.enabled&&this.wireEvents())},t.prototype.print=function(){var e,t=this,r={element:this.inputElement,requestType:"print",cancel:!1};this.trigger(o.S,r,function(r){if(e=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth),"msie"===i.Browser.info.name&&e.resizeTo(screen.availWidth,screen.availHeight),e=n.i(i.print)(t.inputElement,e),!r.cancel){var s={requestType:"print"};t.trigger(o.T,s)}})},t.prototype.refreshUI=function(){this.renderModule.refresh()},t.prototype.showFullScreen=function(){this.fullScreenModule.showFullScreen()},t.prototype.enableToolbarItem=function(e,t){this.toolbarModule.enableTBarItems(this.getBaseToolbarObject(),e,!0,t)},t.prototype.disableToolbarItem=function(e,t){this.toolbarModule.enableTBarItems(this.getBaseToolbarObject(),e,!1,t)},t.prototype.removeToolbarItem=function(e){this.toolbarModule.removeTBarItems(e)},t.prototype.getRange=function(){return this.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument())},t.prototype.initializeServices=function(){this.serviceLocator.register("rendererFactory",new u.a),this.serviceLocator.register("rteLocale",this.localeObj=new i.L10n(this.getModuleName(),v.f,this.locale)),this.serviceLocator.register("dialogRenderObject",new T.a(this))},t.prototype.RTERender=function(){var e=this.serviceLocator.getService("rendererFactory");this.contentModule=e.getRenderer(h.a.Content),this.fullScreenModule=new y.a(this),this.enterKeyModule=new N.a(this),this.renderModule.render(),this.inputElement=this.contentModule.getEditPanel(),this.setHeight(this.height),n.i(C.a)(this.htmlAttributes,this,!1,!0),this.iframeSettings&&this.setIframeSettings(),this.setCssClass(this.cssClass),this.updateEnable(),this.setPlaceHolder(),this.updateRTL(),this.updateReadOnly(),this.updatePanelValue(),this.enableHtmlEncode&&!n.i(i.isNullOrUndefined)(this.value)&&this.setProperties({value:this.encode(n.i(S.t)(this.value))})},t.prototype.setIframeSettings=function(){if(this.iframeSettings.resources){var e=this.iframeSettings.resources.styles,t=this.iframeSettings.resources.scripts;this.iframeSettings.resources.scripts.length>0&&this.InjectSheet(!0,t),this.iframeSettings.resources.styles.length>0&&this.InjectSheet(!1,e)}this.iframeSettings.attributes&&n.i(C.a)(this.iframeSettings.attributes,this,!0,!1)},t.prototype.InjectSheet=function(e,t){try{if(t&&t.length>0)for(var n=this.contentModule.getDocument(),i=n.querySelector("head"),r=0;r<t.length;r++)if(e){var o=this.createScriptElement();o.src=t[r],i.appendChild(o)}else{var s=this.createStyleElement();s.href=t[r],i.appendChild(s)}}catch(e){return}},t.prototype.createScriptElement=function(){var e=this.createElement("script",{className:s.e});return e.type="text/javascript",e},t.prototype.createStyleElement=function(){var e=this.createElement("link",{className:s.f});return e.rel="stylesheet",e},t.prototype.setValue=function(e){var t=this;if(this.valueTemplate){var r=new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);if("string"==typeof this.valueTemplate&&r.test(this.valueTemplate))this.setProperties({value:this.valueTemplate});else{var o=n.i(i.compile)(this.valueTemplate)("",this,"valueTemplate");if("string"!=typeof this.valueTemplate&&this.isReact){this.displayTempElem=this.createElement("div");for(var s=0;s<o.length;s++){var a=o[s];n.i(i.append)([a],this.displayTempElem)}this.renderTemplates(function(){t.inputElement.innerHTML=t.displayTempElem.childNodes[0].innerHTML,t.setProperties({value:t.inputElement.innerHTML.trim()})})}else{var l=this.element;e&&(this.inputElement.innerHTML="",l=this.inputElement);for(var s=0;s<o.length;s++){var a=o[s];n.i(i.append)([a],l)}this.setProperties({value:l.innerHTML.trim()}),this.renderReactTemplates()}}}else{var d=!n.i(i.isNullOrUndefined)(this.element.innerHTML)&&this.element.innerHTML.replace(/<(\/?|\!?)(!--!--)>/g,"").trim();""!==d&&("TEXTAREA"===this.element.tagName?this.setProperties({value:n.i(S.t)(d)}):this.setProperties({value:d}))}},t.prototype.renderTemplates=function(e){this.renderReactTemplates(e)},t.prototype.updateResizeFlag=function(){this.isResizeInitialized=!0},t.prototype.getInsertImgMaxWidth=function(){var e=this.insertImageSettings.maxWidth,t=this.contentModule.getEditPanel(),r=window.getComputedStyle(t),o=t.offsetWidth-(14+parseFloat(r.paddingLeft.split("px")[0])+parseFloat(r.paddingRight.split("px")[0])+parseFloat(r.marginLeft.split("px")[0])+parseFloat(r.marginRight.split("px")[0]));return n.i(i.isNullOrUndefined)(e)?o:e},t.prototype.getInsertVidMaxWidth=function(){var e=this.insertVideoSettings.maxWidth,t=this.contentModule.getEditPanel(),r=window.getComputedStyle(t),o=t.offsetWidth-(14+parseFloat(r.paddingLeft.split("px")[0])+parseFloat(r.paddingRight.split("px")[0])+parseFloat(r.marginLeft.split("px")[0])+parseFloat(r.marginRight.split("px")[0]));return n.i(i.isNullOrUndefined)(e)?o:e},t.prototype.setContentHeight=function(e,t){var r,o,a=0,l="string"==typeof this.height&&this.height.indexOf("%")>-1,d=this.sourceCodeModule.getPanel()&&"block"===this.sourceCodeModule.getPanel().parentElement.style.display?this.sourceCodeModule.getPanel().parentElement:this.contentModule.getPanel(),c=this.element.offsetHeight;0!==c||"auto"===this.height||this.getToolbar()||(c=parseInt(this.height,10),l&&(o=this.height));var u=this.getToolbar()?this.toolbarModule.getToolbarHeight():0,p=this.element.querySelector("."+s._45),m=this.enableResize?n.i(i.isNullOrUndefined)(p)?0:p.offsetHeight+8:0,f=this.getToolbar()?this.toolbarModule.getExpandTBarPopHeight():0;if(this.toolbarSettings.type===h.b.Expand&&t?(r="auto"===this.height&&0===m?"auto":c-(u+f+m)+"px",a=this.toolbarSettings.enableFloating?0:f):r="auto"!==this.height||this.element.classList.contains("e-rte-full-screen")||this.isResizeInitialized?l&&o?o:c-(u+m)+"px":"auto",("windowResize"!==e||l)&&(this.iframeSettings.enable?"auto"!==r&&n.i(i.setStyleAttribute)(d,{height:r,marginTop:a+"px"}):("windowResize"===e&&l&&(r=parseInt(r,10)-2+"px"),n.i(i.setStyleAttribute)(d,{height:r,marginTop:a+"px"}))),this.iframeSettings.enable&&"sourceCode"===e){var g=n.i(i.select)("."+s.C,this.element);n.i(i.setStyleAttribute)(g,{height:r,marginTop:a+"px"})}if(this.toolbarSettings.enableFloating&&this.getToolbar()&&!this.inlineMode.enable){var b=(t?u+f:u)+"px";n.i(i.setStyleAttribute)(this.getToolbar().parentElement,{height:b})}0===m&&this.autoResize()},t.prototype.getHtml=function(){var e=this.removeResizeElement(this.contentModule.getEditPanel().innerHTML);return!this.enableXhtml||"<p><br></p>"!==e&&"<div><br></div>"!==e&&"<br>"!==e?this.serializeValue(e):null},t.prototype.getXhtml=function(){var e=this.removeResizeElement(this.value);return!n.i(i.isNullOrUndefined)(e)&&this.enableXhtml&&(e=this.htmlEditorModule.xhtmlValidation.selfEncloseValidation(e)),e},t.prototype.showSourceCode=function(){this.readonly||this.notify(o._14,{})},t.prototype.getCharCount=function(){var e="Markdown"===this.editorMode?this.inputElement.value.trim():this.inputElement.textContent.trim();return"Markdown"!==this.editorMode&&-1!==e.indexOf("")?e.replace(/\u200B/g,"").length:e.length},t.prototype.showDialog=function(e){e===h.c.InsertLink?this.notify(o._79,{}):e===h.c.InsertImage?this.notify(o._81,{}):e===h.c.InsertAudio?this.notify(o._82,{}):e===h.c.InsertVideo?this.notify(o._83,{}):e===h.c.InsertTable&&this.notify(o._87,{})},t.prototype.closeDialog=function(e){e===h.c.InsertLink?this.notify(o._80,{}):e===h.c.InsertImage?this.notify(o._84,{}):e===h.c.InsertAudio?this.notify(o._85,{}):e===h.c.InsertVideo?this.notify(o._86,{}):e===h.c.InsertTable&&this.notify(o._88,{})},t.prototype.getBaseToolbarObject=function(){return!this.inlineMode.enable||i.Browser.isDevice&&!n.i(S.d)()?this.toolbarModule&&this.toolbarModule.getBaseToolbar():this.quickToolbarModule&&this.quickToolbarModule.getInlineBaseToolbar()},t.prototype.getToolbar=function(){return this.toolbarModule?this.toolbarModule.getToolbarElement():null},t.prototype.getToolbarElement=function(){return this.toolbarModule&&this.toolbarModule.getToolbarElement()},t.prototype.getID=function(){return"TEXTAREA"===this.originalElement.tagName?this.valueContainer.id:this.element.id},t.prototype.getCssClass=function(e){return n.i(i.isNullOrUndefined)(this.cssClass)?"":e?" "+this.cssClass:this.cssClass},t.prototype.mouseDownHandler=function(e){var t=e.touches?e.changedTouches[0]:e;n.i(i.addClass)([this.element],[s.O]),this.preventDefaultResize(e),this.notify(o._24,{args:e}),this.clickPoints={clientX:t.clientX,clientY:t.clientY}},t.prototype.preventImgResize=function(e){"img"===e.target.nodeName.toLocaleLowerCase()&&e.preventDefault()},t.prototype.preventDefaultResize=function(e){"msie"===i.Browser.info.name?this.contentModule.getEditPanel().addEventListener("mscontrolselect",this.preventImgResize):"mozilla"===i.Browser.info.name&&(this.contentModule.getDocument().execCommand("enableObjectResizing",!1,"false"),this.contentModule.getDocument().execCommand("enableInlineTableEditing",!1,"false"))},t.prototype.defaultResize=function(e){"msie"===i.Browser.info.name?this.contentModule.getEditPanel().removeEventListener("mscontrolselect",this.preventImgResize):"mozilla"===i.Browser.info.name&&(this.contentModule.getDocument().execCommand("enableObjectResizing",!0,"true"),this.contentModule.getDocument().execCommand("enableInlineTableEditing",!0,"true"))},t.prototype.resizeHandler=function(){var e=!1;if(!document.body.contains(this.element))return void document.defaultView.removeEventListener("resize",this.onResizeHandler,!0);this.toolbarSettings.enable&&!this.inlineMode.enable&&(this.toolbarModule.refreshToolbarOverflow(),e=this.toolbarModule.baseToolbar.toolbarObj.element.classList.contains(s._11)),!0!==this.iframeSettings.enable&&(this.contentModule.getPanel().style.borderBottom="none"),this.setContentHeight("windowResize",e),this.notify(o.I,null)},t.prototype.scrollHandler=function(e){this.element&&this.notify(o._27,{args:e})},t.prototype.contentScrollHandler=function(e){this.notify(o._28,{args:e})},t.prototype.focusHandler=function(e){if(!this.isRTE||this.isFocusOut){this.isRTE=!this.isFocusOut,this.isFocusOut=!1,n.i(i.addClass)([this.element],[s.O]),"HTML"===this.editorMode?this.cloneValue="<p><br></p>"===this.inputElement.innerHTML||"<div><br></div>"===this.inputElement.innerHTML||"<br>"===this.inputElement.innerHTML?null:this.enableHtmlEncode?this.encode(n.i(S.t)(this.inputElement.innerHTML)):this.inputElement.innerHTML:this.cloneValue=""===this.inputElement.value?null:this.inputElement.value;var t=document.activeElement;if((t===this.element||t===this.getToolbarElement()||t===this.contentModule.getEditPanel()||this.iframeSettings.enable&&t===this.contentModule.getPanel()&&e.target&&!e.target.classList.contains("e-img-inner")&&e.target&&e.target.parentElement&&!e.target.parentElement.classList.contains("e-img-wrap")||n.i(i.closest)(t,".e-rte-toolbar")===this.getToolbarElement())&&(this.contentModule.getEditPanel().focus(),!n.i(i.isNullOrUndefined)(this.getToolbarElement()))){this.getToolbarElement().setAttribute("tabindex","-1");for(var r=this.getToolbarElement().querySelectorAll('[tabindex="0"]'),o=0;o<r.length;o++)r[o].setAttribute("tabindex","-1")}this.preventDefaultResize(e),this.trigger("focus",{event:e,isInteracted:0!==Object.keys(e).length}),!n.i(i.isNullOrUndefined)(this.saveInterval)&&this.saveInterval>0&&!this.autoSaveOnIdle&&(this.timeInterval=setInterval(this.updateValueOnIdle.bind(this),this.saveInterval)),i.EventHandler.add(document,"mousedown",this.onDocumentClick,this)}if(!this.readonly){var a=this.getCurrentFocus(e);"editArea"!==a&&"textArea"!==a&&"sourceCode"!==a||this.resetToolbarTabIndex()}},t.prototype.getUpdatedValue=function(){var e,t=this.element.querySelector("."+s._69);return"HTML"===this.editorMode?(e="<p><br></p>"===this.inputElement.innerHTML||"<div><br></div>"===this.inputElement.innerHTML||"<br>"===this.inputElement.innerHTML?null:this.enableHtmlEncode?this.encode(n.i(S.t)(this.removeResizeElement(this.inputElement.innerHTML))):this.inputElement.innerHTML,t&&"block"===t.style.display&&(e=t.value)):e=""===this.inputElement.value?null:this.inputElement.value,null==e||this.enableHtmlEncode||(e=this.removeResizeElement(e)),e},t.prototype.updateValueOnIdle=function(){(n.i(i.isNullOrUndefined)(this.tableModule)||n.i(i.isNullOrUndefined)(this.inputElement.querySelector(".e-table-box.e-rbox-select")))&&(this.setProperties({value:this.getUpdatedValue()},!0),this.valueContainer.value=this.value,this.isValueChangeBlurhandler=!1,this.invokeChangeEvent())},t.prototype.updateIntervalValue=function(){clearTimeout(this.idleInterval),this.idleInterval=setTimeout(this.updateValueOnIdle.bind(this),0)},t.prototype.cleanupResizeElements=function(e){var t=this.removeResizeElement(e.value);e.callBack(t)},t.prototype.removeResizeElement=function(e){var t=document.createElement("div");t.innerHTML=e;var r=t.querySelectorAll(".e-column-resize, .e-row-resize, .e-table-box, .e-table-rhelper, .e-img-resize");if(r.length>0)for(var o=0;o<r.length;o++)n.i(i.detach)(r[o]);return t.innerHTML},t.prototype.updateStatus=function(e){if(!n.i(i.isNullOrUndefined)(e.html)||!n.i(i.isNullOrUndefined)(e.markdown)){var t=this.formatter.editorManager.undoRedoManager.getUndoStatus(),r={undo:t.undo,redo:t.redo,html:e.html,markdown:e.markdown};this.trigger(o.U,r)}},t.prototype.onDocumentClick=function(e){var t=e.target,r=n.i(i.closest)(t,"."+s.a);this.element.contains(e.target)||document===e.target||r===this.element||n.i(i.closest)(t,'[aria-owns="'+this.getID()+'"]')||(this.isBlur=!0,this.isRTE=!1),this.notify(o._40,{args:e}),"msie"!==i.Browser.info.name&&e.detail>3&&e.preventDefault()},t.prototype.blurHandler=function(e){var t=e.relatedTarget;if(t){var r=n.i(i.closest)(t,"."+s.a);r&&r===this.element?(this.isBlur=!1,t===this.getToolbarElement()&&t.setAttribute("tabindex","-1")):n.i(i.closest)(t,'[aria-owns="'+this.getID()+'"]')||n.i(i.closest)(t,"."+s._12)?this.isBlur=!1:(this.isBlur=!0,t=null)}if(this.isBlur&&n.i(i.isNullOrUndefined)(t)){n.i(i.removeClass)([this.element],[s.O]),this.notify(o._31,{});var a=this.getUpdatedValue();this.setProperties({value:a}),this.valueContainer.value=this.value,this.notify(o.k,{args:e,documentNode:document}),this.isValueChangeBlurhandler=!0,this.invokeChangeEvent(),this.isFocusOut=!0,this.isBlur=!1,n.i(S.l)(this.valueContainer,"focusout"),this.defaultResize(e),this.trigger("blur",{event:e,isInteracted:0!==Object.keys(e).length}),n.i(i.isNullOrUndefined)(this.timeInterval)||(clearInterval(this.timeInterval),this.timeInterval=null),!n.i(i.isNullOrUndefined)(this.placeHolderWrapper)&&this.element.querySelector("[title = Preview]")&&(this.placeHolderWrapper.style.display="none"),i.EventHandler.remove(document,"mousedown",this.onDocumentClick)}else this.isRTE=!0;this.readonly||"outside"!==this.getCurrentFocus(e)||this.resetToolbarTabIndex()},t.prototype.contentChanged=function(){this.autoSaveOnIdle&&(n.i(i.isNullOrUndefined)(this.saveInterval)||(clearTimeout(this.timeInterval),this.timeInterval=setTimeout(this.updateIntervalValue.bind(this),this.saveInterval)))},t.prototype.invokeChangeEvent=function(){var e;e=this.enableXhtml?this.getXhtml():this.value;var t={value:e,isInteracted:this.isValueChangeBlurhandler};this.value!==this.cloneValue&&(this.trigger("change",t),this.cloneValue=this.value)},t.prototype.wireScrollElementsEvents=function(){this.scrollParentElements=n.i(r.getScrollableParent)(this.element);for(var e=0,t=this.scrollParentElements;e<t.length;e++){var o=t[e];i.EventHandler.add(o,"scroll",this.scrollHandler,this)}this.iframeSettings.enable||i.EventHandler.add(this.inputElement,"scroll",this.contentScrollHandler,this)},t.prototype.wireContextEvent=function(){this.quickToolbarSettings.showOnRightClick&&(i.EventHandler.add(this.inputElement,"contextmenu",this.contextHandler,this),i.Browser.isDevice&&(this.touchModule=new i.Touch(this.inputElement,{tapHold:this.touchHandler.bind(this),tapHoldThreshold:500})))},t.prototype.unWireContextEvent=function(){i.EventHandler.remove(this.inputElement,"contextmenu",this.contextHandler),i.Browser.isDevice&&this.touchModule&&this.touchModule.destroy()},t.prototype.unWireScrollElementsEvents=function(){this.scrollParentElements=n.i(r.getScrollableParent)(this.element);for(var e=0,t=this.scrollParentElements;e<t.length;e++){var o=t[e];i.EventHandler.remove(o,"scroll",this.scrollHandler)}this.iframeSettings.enable||i.EventHandler.remove(this.inputElement,"scroll",this.contentScrollHandler)},t.prototype.touchHandler=function(e){this.notifyMouseUp(e.originalEvent),this.triggerEditArea(e.originalEvent)},t.prototype.contextHandler=function(e){var t=n.i(i.closest)(e.target,"a, table, img");!1!==this.inlineMode.onSelection&&(n.i(i.isNullOrUndefined)(t)||!this.inputElement.contains(t)||"IMG"!==t.tagName&&"TABLE"!==t.tagName&&"A"!==t.tagName)||e.preventDefault()},t.prototype.resetHandler=function(){var e=this.valueContainer.defaultValue.trim();this.setProperties({value:""===e?null:e})},t.prototype.autoResize=function(){var e=this;if("auto"===this.height){if("Markdown"===this.editorMode)setTimeout(function(){e.setAutoHeight(e.inputElement)},0);else if(this.iframeSettings.enable){var t=this.element.querySelector("#"+this.getID()+"_rte-view");setTimeout(function(){e.setAutoHeight(t)},100),this.inputElement.style.overflow="hidden"}}else this.inputElement.style.overflow=null},t.prototype.setAutoHeight=function(e){n.i(i.isNullOrUndefined)(e)||(e.style.height=this.inputElement.scrollHeight+"px",e.style.overflow="hidden")},t.prototype.wireEvents=function(){this.element.addEventListener("focusin",this.onFocusHandler,!0),this.element.addEventListener("focusout",this.onBlurHandler,!0),this.on(o.f,this.contentChanged,this),this.on(o._72,this.updateResizeFlag,this),this.on(o._78,this.updateStatus,this),this.on(o._95,this.cleanupResizeElements,this),this.readonly&&this.enabled||this.bindEvents()},t.prototype.restrict=function(e){if(this.maxLength>=0){var t="Markdown"===this.editorMode?this.contentModule.getText():e&&e.currentTarget.textContent;if(!t)return;for(var n=[8,16,17,37,38,39,40,46,65],i=void 0,r=0;r<=n.length-1;r++)if(e.which===n[r]){if(e.ctrlKey&&65===e.which)return;if(65!==e.which)return void(i=n[r])}t.length>=this.maxLength&&-1!==this.maxLength&&e.which!==i&&e.preventDefault()}},t.prototype.bindEvents=function(){this.keyboardModule=new m.a(this.inputElement,{keyAction:this.keyDown.bind(this),keyConfigs:k({},this.formatter.keyConfig,this.keyConfig),eventName:"keydown"});var e=n.i(i.closest)(this.valueContainer,"form");e&&i.EventHandler.add(e,"reset",this.resetHandler,this),i.EventHandler.add(this.inputElement,"keyup",this.keyUp,this),i.EventHandler.add(this.inputElement,"paste",this.onPaste,this),i.EventHandler.add(this.inputElement,"content-changed",this.contentChanged,this),i.EventHandler.add(this.inputElement,i.Browser.touchEndEvent,n.i(i.debounce)(this.mouseUp,30),this),i.EventHandler.add(this.inputElement,i.Browser.touchStartEvent,this.mouseDownHandler,this),this.wireContextEvent(),this.formatter.editorManager.observer.on(E.d,this.editorKeyDown,this),this.element.ownerDocument.defaultView.addEventListener("resize",this.onResizeHandler,!0),this.iframeSettings.enable&&(i.EventHandler.add(this.inputElement,"focusin",this.focusHandler,this),i.EventHandler.add(this.inputElement,"focusout",this.blurHandler,this),i.EventHandler.add(this.inputElement.ownerDocument,"scroll",this.contentScrollHandler,this),i.EventHandler.add(this.inputElement.ownerDocument,i.Browser.touchStartEvent,this.onIframeMouseDown,this)),this.wireScrollElementsEvents()},t.prototype.onIframeMouseDown=function(e){this.isBlur=!1,this.currentTarget=e.target,this.notify(o.h,e)},t.prototype.editorKeyDown=function(e){switch(e.event.action){case"copy":this.onCopy();break;case"cut":this.onCut();break;case"tab":this.iframeSettings.enable&&(this.isBlur=!0)}!e.callBack||"copy"!==e.event.action&&"cut"!==e.event.action&&"delete"!==e.event.action||e.callBack({requestType:e.event.action,editorMode:"HTML",event:e.event})},t.prototype.unWireEvents=function(){this.element.removeEventListener("focusin",this.onFocusHandler,!0),this.element.removeEventListener("focusout",this.onBlurHandler,!0),this.off(o.f,this.contentChanged),this.off(o._72,this.updateResizeFlag),this.off(o._78,this.updateStatus),this.off(o._95,this.cleanupResizeElements),this.readonly&&this.enabled||this.unbindEvents()},t.prototype.unbindEvents=function(){this.keyboardModule&&this.keyboardModule.destroy();var e=n.i(i.closest)(this.valueContainer,"form");e&&i.EventHandler.remove(e,"reset",this.resetHandler),i.EventHandler.remove(this.inputElement,"keyup",this.keyUp),i.EventHandler.remove(this.inputElement,"paste",this.onPaste),i.EventHandler.remove(this.inputElement,"content-changed",this.contentChanged),i.EventHandler.remove(this.inputElement,i.Browser.touchEndEvent,n.i(i.debounce)(this.mouseUp,30)),i.EventHandler.remove(this.inputElement,i.Browser.touchStartEvent,this.mouseDownHandler),this.unWireContextEvent(),this.formatter&&this.formatter.editorManager.observer.off(E.d,this.editorKeyDown),this.element.ownerDocument.defaultView.removeEventListener("resize",this.onResizeHandler,!0),this.iframeSettings.enable&&(i.EventHandler.remove(this.inputElement,"focusin",this.focusHandler),i.EventHandler.remove(this.inputElement,"focusout",this.blurHandler),i.EventHandler.remove(this.inputElement.ownerDocument,"scroll",this.contentScrollHandler),i.EventHandler.remove(this.inputElement.ownerDocument,i.Browser.touchStartEvent,this.onIframeMouseDown)),this.unWireScrollElementsEvents()},t.prototype.getCurrentFocus=function(e){return e.target===this.inputElement&&document.activeElement===this.inputElement?"editArea":e.target===this.getToolbarElement()||!n.i(i.isNullOrUndefined)(e.relatedTarget)&&n.i(i.closest)(e.relatedTarget,".e-rte-toolbar")===this.getToolbarElement()?"toolbar":e.target===this.valueContainer&&document.activeElement===this.valueContainer?"textArea":!n.i(i.isNullOrUndefined)(e.target)&&e.target.classList.contains(s._69)&&document.activeElement===e.target?"sourceCode":"outside"},t.prototype.resetToolbarTabIndex=function(){if(this.getToolbarElement())for(var e=this.getToolbarElement().querySelectorAll("input,select,button,a,[tabindex]"),t=0;t<e.length;t++)e[t].classList.contains("e-rte-dropdown-btn")||e[t].classList.contains("e-insert-table-btn")||e[t].hasAttribute("tabindex")&&"-1"===e[t].getAttribute("tabindex")||e[t].setAttribute("tabindex","-1")},w([n.i(i.Complex)({},f.a)],t.prototype,"toolbarSettings",void 0),w([n.i(i.Complex)({},f.b)],t.prototype,"quickToolbarSettings",void 0),w([n.i(i.Complex)({},f.c)],t.prototype,"pasteCleanupSettings",void 0),w([n.i(i.Complex)({},f.d)],t.prototype,"formatPainterSettings",void 0),w([n.i(i.Complex)({},f.e)],t.prototype,"emojiPickerSettings",void 0),w([n.i(i.Complex)({},g.a)],t.prototype,"iframeSettings",void 0),w([n.i(i.Complex)({},f.f)],t.prototype,"insertImageSettings",void 0),w([n.i(i.Complex)({},f.g)],t.prototype,"insertAudioSettings",void 0),w([n.i(i.Complex)({},f.h)],t.prototype,"insertVideoSettings",void 0),w([n.i(i.Complex)({},f.i)],t.prototype,"tableSettings",void 0),w([n.i(i.Property)(0)],t.prototype,"floatingToolbarOffset",void 0),w([n.i(i.Complex)({},b.a)],t.prototype,"inlineMode",void 0),w([n.i(i.Complex)({},f.j)],t.prototype,"fileManagerSettings",void 0),w([n.i(i.Property)("100%")],t.prototype,"width",void 0),w([n.i(i.Property)(!1)],t.prototype,"enablePersistence",void 0),w([n.i(i.Property)(!0)],t.prototype,"showTooltip",void 0),w([n.i(i.Property)(!1)],t.prototype,"enableResize",void 0),w([n.i(i.Property)({})],t.prototype,"htmlAttributes",void 0),w([n.i(i.Property)(null)],t.prototype,"placeholder",void 0),w([n.i(i.Property)(!1)],t.prototype,"autoSaveOnIdle",void 0),w([n.i(i.Property)(!1)],t.prototype,"readonly",void 0),w([n.i(i.Property)(!0)],t.prototype,"enabled",void 0),w([n.i(i.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),w([n.i(i.Property)(!1)],t.prototype,"enableHtmlEncode",void 0),w([n.i(i.Property)(!1)],t.prototype,"enableXhtml",void 0),w([n.i(i.Property)("auto")],t.prototype,"height",void 0),w([n.i(i.Property)(null)],t.prototype,"cssClass",void 0),w([n.i(i.Property)(null)],t.prototype,"value",void 0),w([n.i(i.Property)("P")],t.prototype,"enterKey",void 0),w([n.i(i.Property)("BR")],t.prototype,"shiftEnterKey",void 0),w([n.i(i.Property)(30)],t.prototype,"undoRedoSteps",void 0),w([n.i(i.Property)(300)],t.prototype,"undoRedoTimer",void 0),w([n.i(i.Property)("HTML")],t.prototype,"editorMode",void 0),w([n.i(i.Property)(null)],t.prototype,"keyConfig",void 0),w([n.i(i.Property)(!1)],t.prototype,"showCharCount",void 0),w([n.i(i.Property)(!1)],t.prototype,"enableTabKey",void 0),w([n.i(i.Property)(!1)],t.prototype,"enableAutoUrl",void 0),w([n.i(i.Property)(-1)],t.prototype,"maxLength",void 0),w([n.i(i.Complex)({},f.k)],t.prototype,"format",void 0),w([n.i(i.Complex)({},f.l)],t.prototype,"numberFormatList",void 0),w([n.i(i.Complex)({},f.m)],t.prototype,"bulletFormatList",void 0),w([n.i(i.Complex)({},f.n)],t.prototype,"fontFamily",void 0),w([n.i(i.Complex)({},f.o)],t.prototype,"fontSize",void 0),w([n.i(i.Complex)({},f.p)],t.prototype,"fontColor",void 0),w([n.i(i.Complex)({},f.q)],t.prototype,"backgroundColor",void 0),w([n.i(i.Property)(null)],t.prototype,"valueTemplate",void 0),w([n.i(i.Property)(1e4)],t.prototype,"saveInterval",void 0),w([n.i(i.Event)()],t.prototype,"actionBegin",void 0),w([n.i(i.Event)()],t.prototype,"actionComplete",void 0),w([n.i(i.Event)()],t.prototype,"beforeDialogOpen",void 0),w([n.i(i.Event)()],t.prototype,"dialogOpen",void 0),w([n.i(i.Event)()],t.prototype,"beforeDialogClose",void 0),w([n.i(i.Event)()],t.prototype,"dialogClose",void 0),w([n.i(i.Event)()],t.prototype,"beforeQuickToolbarOpen",void 0),w([n.i(i.Event)()],t.prototype,"quickToolbarOpen",void 0),w([n.i(i.Event)()],t.prototype,"quickToolbarClose",void 0),w([n.i(i.Event)()],t.prototype,"toolbarStatusUpdate",void 0),w([n.i(i.Event)()],t.prototype,"updatedToolbarStatus",void 0),w([n.i(i.Event)()],t.prototype,"imageSelected",void 0),w([n.i(i.Event)()],t.prototype,"beforeImageUpload",void 0),w([n.i(i.Event)()],t.prototype,"imageUploading",void 0),w([n.i(i.Event)()],t.prototype,"imageUploadSuccess",void 0),w([n.i(i.Event)()],t.prototype,"imageUploadFailed",void 0),w([n.i(i.Event)()],t.prototype,"imageRemoving",void 0),w([n.i(i.Event)()],t.prototype,"afterImageDelete",void 0),w([n.i(i.Event)()],t.prototype,"fileSelected",void 0),w([n.i(i.Event)()],t.prototype,"beforeFileUpload",void 0),w([n.i(i.Event)()],t.prototype,"fileUploading",void 0),w([n.i(i.Event)()],t.prototype,"fileUploadSuccess",void 0),w([n.i(i.Event)()],t.prototype,"fileUploadFailed",void 0),w([n.i(i.Event)()],t.prototype,"fileRemoving",void 0),w([n.i(i.Event)()],t.prototype,"afterMediaDelete",void 0),w([n.i(i.Event)()],t.prototype,"created",void 0),w([n.i(i.Event)()],t.prototype,"destroyed",void 0),w([n.i(i.Event)()],t.prototype,"beforeSanitizeHtml",void 0),w([n.i(i.Event)()],t.prototype,"blur",void 0),w([n.i(i.Event)()],t.prototype,"toolbarClick",void 0),w([n.i(i.Event)()],t.prototype,"focus",void 0),w([n.i(i.Event)()],t.prototype,"change",void 0),w([n.i(i.Event)()],t.prototype,"resizing",void 0),w([n.i(i.Event)()],t.prototype,"resizeStart",void 0),w([n.i(i.Event)()],t.prototype,"resizeStop",void 0),w([n.i(i.Event)()],t.prototype,"beforePasteCleanup",void 0),w([n.i(i.Event)()],t.prototype,"afterPasteCleanup",void 0),w([n.i(i.Event)()],t.prototype,"beforeImageDrop",void 0),w([n.i(i.Property)(null)],t.prototype,"formatter",void 0),t=w([i.NotifyPropertyChanges],t)}(i.Component)},function(e,t,n){"use strict";var i=n(71);n.d(t,"a",function(){return i.a});var r=n(29);n.d(t,"b",function(){return r.a});var o=n(72);n.d(t,"c",function(){return o.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(0),r=(n.n(i),this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),o=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([n.i(i.Property)([])],t.prototype,"styles",void 0),o([n.i(i.Property)([])],t.prototype,"scripts",void 0),t}(i.ChildProperty),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([n.i(i.Property)(!1)],t.prototype,"enable",void 0),o([n.i(i.Property)(null)],t.prototype,"attributes",void 0),o([n.i(i.Complex)({},s)],t.prototype,"resources",void 0),t}(i.ChildProperty)},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(0),r=(n.n(i),this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}()),o=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([n.i(i.Property)(!1)],t.prototype,"enable",void 0),o([n.i(i.Property)(!0)],t.prototype,"onSelection",void 0),t}(i.ChildProperty)},function(e,t,n){"use strict";var i=n(30);n.d(t,"a",function(){return i.a});var r=n(78);n.d(t,"b",function(){return r.a});var o=n(79);n.d(t,"c",function(){return o.a});var s=n(112);n.d(t,"d",function(){return s.a});var a=n(111);n.d(t,"e",function(){return a.a});var l=n(110);n.d(t,"f",function(){return l.a});var d=n(114);n.d(t,"g",function(){return d.a});var c=n(80);n.d(t,"h",function(){return c.a});var u=n(113);n.d(t,"i",function(){return u.a});var h=n(74);n.d(t,"j",function(){return h.a});var p=n(75);n.d(t,"k",function(){return p.a});var m=n(76);n.d(t,"l",function(){return m.a});var f=n(77);n.d(t,"m",function(){return f.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(14),a=(n.n(s),n(18)),l=(n.n(a),n(5)),d=n(4),c=n(6),u=function(){function e(e,t){this.isAudioUploaded=!1,this.isAllowedTypes=!0,this.deletedAudio=[],this.parent=e,this.rteID=e.element.id,this.i10n=t.getService("rteLocale"),this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.v,this.onKeyDown,this),this.parent.on(r.u,this.onKeyUp,this),this.parent.on(r.Y,this.insertingAudio,this),this.parent.on(r.g,this.afterRender,this),this.parent.on(r._75,this.afterRender,this),this.parent.on(r._82,this.showDialog,this),this.parent.on(r._85,this.closeDialog,this),this.parent.on(r.F,this.onToolbarAction,this),this.parent.on(r.B,this.alignmentSelect,this),this.parent.on(r._9,this.deleteAudio,this),this.parent.on(r._26,this.editAreaClickHandler,this),this.parent.on(r._0,this.showAudioQuickToolbar,this),this.parent.on(r.i,this.removeEventListener,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.v,this.onKeyDown),this.parent.off(r.u,this.onKeyUp),this.parent.off(r.Y,this.insertingAudio),this.parent.off(r.g,this.afterRender),this.parent.off(r._75,this.afterRender),this.parent.off(r._82,this.showDialog),this.parent.off(r._85,this.closeDialog),this.parent.off(r.F,this.onToolbarAction),this.parent.off(r.B,this.alignmentSelect),this.parent.off(r._9,this.deleteAudio),this.parent.off(r._26,this.editAreaClickHandler),this.parent.off(r._0,this.showAudioQuickToolbar),this.parent.off(r.i,this.removeEventListener),n.i(i.isNullOrUndefined)(this.contentModule)||(i.EventHandler.remove(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.touchStart),i.EventHandler.remove(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.audioClick),i.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick)))},e.prototype.afterRender=function(){this.contentModule=this.rendererFactory.getRenderer(l.a.Content),i.EventHandler.add(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.touchStart,this),i.EventHandler.add(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.audioClick,this),i.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this)},e.prototype.checkAudioBack=function(e){"#text"===e.startContainer.nodeName&&0===e.startOffset&&!n.i(i.isNullOrUndefined)(e.startContainer.previousSibling)&&this.isAudioElem(e.startContainer.previousSibling)?this.deletedAudio.push(e.startContainer.previousSibling):"#text"!==e.startContainer.nodeName&&!n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset-1])&&this.isAudioElem(e.startContainer.childNodes[e.startOffset-1])&&this.deletedAudio.push(e.startContainer.childNodes[e.startOffset-1])},e.prototype.checkAudioDel=function(e){"#text"!==e.startContainer.nodeName||e.startOffset!==e.startContainer.textContent.length||n.i(i.isNullOrUndefined)(e.startContainer.nextSibling)||"IMG"!==e.startContainer.nextSibling.nodeName?"#text"!==e.startContainer.nodeName&&!n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset])&&this.isAudioElem(e.startContainer.childNodes[e.startOffset])&&this.deletedAudio.push(e.startContainer.childNodes[e.startOffset]):this.deletedAudio.push(e.startContainer.nextSibling)},e.prototype.undoStack=function(e){if("undo"===e.subCommand.toLowerCase()||"redo"===e.subCommand.toLowerCase())for(var t=0;t<this.parent.formatter.getUndoRedoStack().length;t++){var n=this.parent.createElement("div"),i=this.parent.formatter.getUndoRedoStack()[t].text;n.appendChild(i.cloneNode(!0))}},e.prototype.touchStart=function(e,t){this.parent.readonly||(this.prevSelectedAudEle=this.audEle)},e.prototype.onToolbarAction=function(e){switch(n.i(c.b)()&&this.parent.notify(r._19,{}),e.args.item.subCommand){case"AudioReplace":this.parent.notify(r.Y,e);break;case"AudioRemove":this.parent.notify(r._9,e)}},e.prototype.onKeyUp=function(e){if(!n.i(i.isNullOrUndefined)(this.deletedAudio)&&this.deletedAudio.length>0)for(var t=0;t<this.deletedAudio.length-1;t++){var o={element:this.deletedAudio[t].querySelector("audio"),src:this.deletedAudio[t].querySelector("source").getAttribute("src")};this.parent.trigger(r._67,o)}},e.prototype.onKeyDown=function(e){var t,r,s,a,l=e.args;this.deletedAudio=[];var d,c=[27,112,113,114,115,116,117,118,119,120,121,122,123,44,45,9,16,17,18,19,20,33,34,35,36,37,38,39,40,91,92,93,144,145,182,183];if("HTML"===this.parent.editorMode&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),d=t.startContainer===t.endContainer&&t.startOffset===t.endOffset),!d&&"HTML"===this.parent.editorMode&&c.indexOf(l.which)<0)for(var u=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),h=0;h<u.length;h++)this.isAudioElem(u[h])&&this.deletedAudio.push(u[h]);if("HTML"===this.parent.editorMode&&(8===l.which&&"Backspace"===l.code||46===l.which&&"Delete"===l.code)){var p=t.startContainer===t.endContainer&&t.startOffset===t.endOffset;8===l.which&&"Backspace"===l.code&&p?this.checkAudioBack(t):46===l.which&&"Delete"===l.code&&p&&this.checkAudioDel(t)}if(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&"KeyK"!==l.code&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),s=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),a=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t),!l.ctrlKey&&l.key&&(1===l.key.length||"enter"===l.action)&&this.isAudioElem(a[0])&&a[0].parentElement)){var m=a[0].parentElement.childNodes[0];this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),m,m,m.textContent.length,m.textContent.length),n.i(i.removeClass)([a[0]],o._50),this.quickToolObj.audioQTBar.hidePopup()}if(!l.ctrlKey||89!==l.keyCode&&90!==l.keyCode||this.undoStack({subCommand:90===l.keyCode?"undo":"redo"}),(8===l.keyCode||46===l.keyCode)&&s&&this.isAudioElem(s[0])&&s.length<1){n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),l.preventDefault();var f={selectNode:s,selection:r,selectParent:a,args:{item:{command:"Audios",subCommand:"AudioRemove"},originalEvent:l}};this.deleteAudio(f,l.keyCode)}switch(l.action){case"escape":n.i(i.isNullOrUndefined)(this.dialogObj)||this.dialogObj.close();break;case"backspace":case"delete":for(var h=0;h<this.deletedAudio.length;h++){var g=this.deletedAudio[h].src;this.audioRemovePost(g)}"Markdown"!==this.parent.editorMode&&(3===t.startContainer.nodeType?"Backspace"===l.code?t.startContainer.previousElementSibling&&0===t.startOffset&&t.startContainer.previousElementSibling.classList.contains(o.X)&&n.i(i.detach)(t.startContainer.previousElementSibling):t.startContainer.nextElementSibling&&t.endContainer.textContent.length===t.endOffset&&t.startContainer.nextElementSibling.classList.contains(o.X)&&n.i(i.detach)(t.startContainer.nextElementSibling):1===t.startContainer.nodeType&&t.startContainer.classList&&(t.startContainer.classList.contains(o.X)||t.startContainer.classList.contains(o.V)||t.startContainer.classList.contains(o.W))&&n.i(i.detach)(t.startContainer));break;case"insert-audio":n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),this.openDialog(!0,l,r,s,a),l.preventDefault()}},e.prototype.openDialog=function(e,t,r,o,s){var a,l,d,c;e||n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)?(l=r,d=o,c=s):(a=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),l=this.parent.formatter.editorManager.nodeSelection.save(a,this.parent.contentModule.getDocument()),d=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(a),c=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(a)),"HTML"===this.parent.editorMode&&this.insertAudio({args:{item:{command:"Audios",subCommand:"Audio"},originalEvent:t,name:e?null:"showDialog"},selectNode:d,selection:l,selectParent:c})},e.prototype.showDialog=function(){this.openDialog(!1)},e.prototype.closeDialog=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.deleteAudio=function(e,t){if(this.isAudioElem(e.selectNode[0])){this.audEle&&(3===e.selectNode[0].nodeType?e.selectNode[0]=this.audEle:this.isAudioElem(e.selectNode[0])&&(e.selectNode[0]=e.selectNode[0].classList.contains(o.X)?e.selectNode[0]:e.selectNode[0].parentElement));var s={element:e.selectNode[0].querySelector("audio"),src:e.selectNode[0].querySelector("source").getAttribute("src")};0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),e.selection.restore(),this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.audioRemovePost(s.src),this.quickToolObj&&document.body.contains(this.quickToolObj.audioQTBar.element)&&this.quickToolObj.audioQTBar.hidePopup(),n.i(i.isNullOrUndefined)(t)&&this.parent.trigger(r._67,s)}},e.prototype.audioRemovePost=function(e){var t=this,r="";if(!n.i(i.isNullOrUndefined)(this.parent.insertAudioSettings.removeUrl)&&""!==this.parent.insertAudioSettings.removeUrl){r=e.indexOf("http://")>-1||e.indexOf("https://")>-1?e:new URL(e,document.baseURI).href,this.removingAudioName=r.replace(/^.*[\\\/]/,"");var o=new XMLHttpRequest;o.addEventListener("readystatechange",function(){4===this.readyState&&200===this.status&&t.triggerPost(this.response)}),o.open("GET",r),o.responseType="blob",o.send()}},e.prototype.triggerPost=function(e){var t=this.parent.insertAudioSettings.removeUrl;if(!n.i(i.isNullOrUndefined)(t)&&""!==t){var r=new File([e],this.removingAudioName),o=new i.Ajax(t,"POST",!0,null),s=new FormData;s.append("UploadFiles",r),o.send(s)}},e.prototype.audioClick=function(e){i.Browser.isDevice&&(this.isAudioElem(e.target)?(this.contentModule.getEditPanel().setAttribute("contenteditable","false"),e.target.focus()):this.parent.readonly||this.contentModule.getEditPanel().setAttribute("contenteditable","true")),this.isAudioElem(e.target)&&(this.audEle=e.target.querySelector("audio"),e.preventDefault())},e.prototype.onDocumentClick=function(e){var t=e.target;this.isAudioElem(t)&&(this.audEle=t.querySelector("audio")),!n.i(i.isNullOrUndefined)(this.dialogObj)&&(!n.i(i.closest)(t,"[id='"+this.dialogObj.element.id+"']")&&this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()&&!this.parent.getToolbarElement().contains(e.target)||this.parent.getToolbarElement()&&this.parent.getToolbarElement().contains(e.target)&&!n.i(i.closest)(t,"#"+this.parent.getID()+"_toolbar_Audio")&&!t.querySelector("#"+this.parent.getID()+"_toolbar_Audio"))&&(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight||(this.dialogObj.hide({returnValue:!0}),this.parent.isBlur=!0,n.i(d.l)(this.parent.element,"focusout"))),this.contentModule.getEditPanel().querySelector("."+o._50)&&(this.isAudioElem(e.target)||n.i(i.isNullOrUndefined)(this.audEle)?n.i(i.isNullOrUndefined)(this.prevSelectedAudEle)||this.prevSelectedAudEle===t||(this.prevSelectedAudEle.style.outline=""):this.audEle.style.outline="")},e.prototype.alignmentSelect=function(e){var t=e.item;if(document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))&&"Audios"===t.command){var r=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),s=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(r);s=[this.audEle];var a={args:e,selectNode:s};switch(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),t.subCommand){case"Inline":this.inline(a);break;case"Break":this.break(a)}this.quickToolObj&&document.body.contains(this.quickToolObj.audioQTBar.element)&&(this.quickToolObj.audioQTBar.hidePopup(),n.i(i.removeClass)([s[0]],o._50))}},e.prototype.break=function(e){if("AUDIO"===e.selectNode[0].nodeName){var t=e.args.item?e.args.item.subCommand:"Break";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.inline=function(e){if("AUDIO"===e.selectNode[0].nodeName){var t=e.args.item?e.args.item.subCommand:"Inline";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.editAreaClickHandler=function(e){if(this.parent.readonly)return void this.hideAudioQuickToolbar();var t=e.args,o=this.parent.quickToolbarSettings.showOnRightClick;if(2===t.which||o&&1===t.which||!o&&3===t.which)return void(o&&1===t.which&&!n.i(i.isNullOrUndefined)(t.target)&&this.isAudioElem(t.target)&&(this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),t.target)));if("HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.audioQTBar){this.quickToolObj=this.parent.quickToolbarModule;var s=t.target;this.contentModule=this.rendererFactory.getRenderer(l.a.Content);var a=this.quickToolObj.audioQTBar.element.classList.contains("e-rte-pop");if(this.isAudioElem(s)&&this.parent.quickToolbarModule){if(a)return;this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),s),n.i(c.b)()&&this.parent.notify(r._18,e),s.querySelector("audio").style.outline="2px solid #4a90e2",this.showAudioQuickToolbar({args:t,type:"Audios",elements:[t.target]})}else this.hideAudioQuickToolbar()}},e.prototype.isAudioElem=function(e){return!(!e||3===e.nodeType||"BR"===e.nodeName||!e.classList||!e.classList.contains(o.X)&&!e.classList.contains(o.V))},e.prototype.showAudioQuickToolbar=function(e){var t=this;if(!("Audios"!==e.type||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule.audioQTBar)||n.i(i.isNullOrUndefined)(e.args))){this.quickToolObj=this.parent.quickToolbarModule;var r=e.args,s=e.elements;[].forEach.call(e.elements,function(e,t){0===t&&(s=e)}),this.isAudioElem(s)&&(n.i(i.addClass)([s.querySelector("audio")],[o._50]),s.querySelector("audio").style.outline="2px solid #4a90e2"),this.parent.quickToolbarModule.audioQTBar&&(e.isNotify?setTimeout(function(){t.parent.formatter.editorManager.nodeSelection.Clear(t.contentModule.getDocument()),t.parent.formatter.editorManager.nodeSelection.setSelectionContents(t.contentModule.getDocument(),s),t.quickToolObj.audioQTBar.showPopup(r.pageX-50,s.getBoundingClientRect().top+34,s)},400):this.quickToolObj.audioQTBar.showPopup(r.pageX-50,s.getBoundingClientRect().top+34,s))}},e.prototype.hideAudioQuickToolbar=function(){n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector("."+o._50))||(n.i(i.removeClass)([this.contentModule.getEditPanel().querySelector("."+o._50)],o._50),n.i(i.isNullOrUndefined)(this.audEle)||(this.audEle.style.outline=""),this.quickToolObj&&this.quickToolObj.audioQTBar&&document.body.contains(this.quickToolObj.audioQTBar.element)&&this.quickToolObj.audioQTBar.hidePopup())},e.prototype.insertingAudio=function(e){if(this.insertAudio(e),!n.i(i.isNullOrUndefined)(this.dialogObj)){this.dialogObj.element.style.maxHeight="inherit";var t=this.dialogObj.element.querySelector(".e-audio-content");n.i(i.isNullOrUndefined)(this.parent.insertAudioSettings.path)&&"HTML"!==this.parent.editorMode?t.querySelector(".e-audio-url").focus():document.getElementById(this.rteID+"_insertAudio").focus()}},e.prototype.insertAudio=function(e){var t=this;if(this.dialogObj)return void this.dialogObj.hide({returnValue:!0});var r=this.parent.createElement("div",{className:"e-rte-audio-dialog",id:this.rteID+"_audio"});this.parent.element.appendChild(r);var s=this.i10n.getConstant("dialogInsert"),a=this.i10n.getConstant("dialogCancel"),l=this.i10n.getConstant("audioHeader"),d=e.selection,c={selfAudio:this,selection:e.selection,args:e.args,selectParent:e.selectParent},u={header:l,cssClass:o._12,enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:i.Browser.isDevice?"290px":"340px",isModal:i.Browser.isDevice,buttons:[{click:this.insertAudioUrl.bind(c),buttonModel:{content:s,cssClass:"e-flat e-insertAudio",isPrimary:!0,disabled:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel",content:a}}],target:i.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){t.isAudioUploaded&&t.uploadObj.removing(),t.parent.isBlur=!1,e&&e.event.returnValue&&"HTML"===t.parent.editorMode&&d.restore(),t.dialogObj.destroy(),n.i(i.detach)(t.dialogObj.element),t.dialogRenderObj.close(e),t.dialogObj=null}},h=this.parent.createElement("div",{className:"e-audio-content"});n.i(i.isNullOrUndefined)(this.parent.insertAudioSettings.path)&&"HTML"!==this.parent.editorMode||h.appendChild(this.audioUpload(e));var p=this.parent.createElement("div",{className:"e-audioheader"}),m=this.i10n.getConstant("audioLinkHeader");"HTML"===this.parent.editorMode&&(p.innerHTML=m),h.appendChild(p),h.appendChild(this.audioUrlPopup(e)),e.selectNode&&1===e.selectNode[0].nodeType&&this.isAudioElem(e.selectNode[0])?(u.header=this.parent.localeObj.getConstant("editAudioHeader"),u.content=h):u.content=h,this.dialogObj=this.dialogRenderObj.render(u),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(r),e.selectNode&&1===e.selectNode[0].nodeType&&this.isAudioElem(e.selectNode[0])&&"insertAudio"===e.name&&(this.dialogObj.element.querySelector(".e-insertAudio").textContent=this.parent.localeObj.getConstant("dialogUpdate")),r.style.maxHeight="inherit",this.quickToolObj&&(this.quickToolObj.audioQTBar&&document.body.contains(this.quickToolObj.audioQTBar.element)&&this.quickToolObj.audioQTBar.hidePopup(),this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup(),this.quickToolObj.textQTBar&&this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)&&this.quickToolObj.textQTBar.hidePopup())},e.prototype.audioUrlPopup=function(e){var t=this,r=this.parent.createElement("div",{className:"audioUrl"}),o=this.i10n.getConstant("audioUrl");return this.inputUrl=this.parent.createElement("input",{className:"e-input e-audio-url",attrs:{placeholder:o,spellcheck:"false","aria-label":this.i10n.getConstant("audioLinkHeader")}}),this.inputUrl.addEventListener("input",function(){n.i(i.isNullOrUndefined)(t.inputUrl)||(0===t.inputUrl.value.length?t.dialogObj.getButtons(0).element.disabled=!0:t.dialogObj.getButtons(0).element.removeAttribute("disabled"))}),r.appendChild(this.inputUrl),r},e.prototype.audioUpload=function(e){var t,o,l=this,c=this,u=c.parent.iframeSettings.enable;if("HTML"===c.parent.editorMode&&(!u&&n.i(i.isNullOrUndefined)(n.i(i.closest)(e.selection.range.startContainer.parentNode,"[id='"+this.parent.contentModule.getPanel().id+"']"))||u&&!n.i(d.b)(e.selection.range.startContainer.parentNode.ownerDocument.querySelector("body"),"e-lib"))){this.contentModule.getEditPanel().focus();var h=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());t=this.parent.formatter.editorManager.nodeSelection.save(h,this.parent.contentModule.getDocument()),o=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(h)}else t=e.selection,o=e.selectParent;var p=this.parent.createElement("div",{className:"e-aud-uploadwrap e-droparea"}),m=this.i10n.getConstant("audioDeviceUploadMessage"),f=this.i10n.getConstant("audioUploadMessage"),g=this.parent.createElement("span",{className:"e-droptext"}),b=this.parent.createElement("span",{className:"e-rte-upload-text",innerHTML:i.Browser.isDevice?m:f});g.appendChild(b);var v=this.parent.createElement("button",{className:"e-browsebtn",id:this.rteID+"_insertAudio",attrs:{autofocus:"true",type:"button"}});g.appendChild(v),p.appendChild(g);var C=this.i10n.getConstant("browse"),y=new a.Button({content:C,enableRtl:this.parent.enableRtl});y.isStringTemplate=!0,y.createElement=this.parent.createElement,y.appendTo(v);var N=i.Browser.isDevice?g:v;i.EventHandler.add(N,"click",this.fileSelect,this);var E=this.parent.createElement("input",{id:this.rteID+"_upload",attrs:{type:"File",name:"UploadFiles"}});p.appendChild(E);var S,T,O;return this.uploadObj=new s.Uploader({asyncSettings:{saveUrl:this.parent.insertAudioSettings.saveUrl,removeUrl:this.parent.insertAudioSettings.removeUrl},dropArea:g,multiple:!1,enableRtl:this.parent.enableRtl,allowedExtensions:this.parent.insertAudioSettings.allowedTypes.toString(),selected:function(e){c.isAudioUploaded=!0,T=e,O=e.filesData,l.parent.trigger(r._61,T,function(e){if(!e.cancel&&(l.checkExtension(e.filesData[0]),S=e.filesData[0].name,"HTML"===l.parent.editorMode&&n.i(i.isNullOrUndefined)(l.parent.insertAudioSettings.path))){var r=new FileReader;r.addEventListener("load",function(e){var s="Base64"===l.parent.insertAudioSettings.saveFormat?r.result:URL.createObjectURL(n.i(d.v)(r.result));c.uploadUrl={url:s,selection:t,fileName:S,selectParent:o},c.inputUrl.setAttribute("disabled","true"),n.i(i.isNullOrUndefined)(c.parent.insertAudioSettings.saveUrl)&&l.isAllowedTypes&&!n.i(i.isNullOrUndefined)(l.dialogObj)&&l.dialogObj.getButtons(0).element.removeAttribute("disabled")}),r.readAsDataURL(e.filesData[0].rawFile)}})},beforeUpload:function(e){l.parent.trigger(r._71,e)},uploading:function(e){l.parent.isServerRendered||l.parent.trigger(r._62,e)},success:function(e){l.parent.trigger(r._63,e,function(e){if(!n.i(i.isNullOrUndefined)(l.parent.insertAudioSettings.path)){var r=l.parent.insertAudioSettings.path+e.file.name;c.uploadUrl={url:r,selection:t,fileName:S,selectParent:o},c.inputUrl.setAttribute("disabled","true")}"upload"!==e.operation||n.i(i.isNullOrUndefined)(l.dialogObj)||l.dialogObj.getButtons(0).element.removeAttribute("disabled")})},failure:function(e){l.parent.trigger(r._64,e)},removing:function(){l.parent.trigger(r._65,e,function(e){c.isAudioUploaded=!1,l.dialogObj.getButtons(0).element.disabled=!0,c.inputUrl.removeAttribute("disabled"),c.uploadUrl&&(c.uploadUrl.url="")})}}),this.uploadObj.isStringTemplate=!0,this.uploadObj.createElement=this.parent.createElement,this.uploadObj.appendTo(E),p},e.prototype.checkExtension=function(e){this.uploadObj.allowedExtensions&&(-1===this.uploadObj.allowedExtensions.toLocaleLowerCase().indexOf(("."+e.type).toLocaleLowerCase())?(this.dialogObj.getButtons(0).element.setAttribute("disabled","disabled"),this.isAllowedTypes=!1):this.isAllowedTypes=!0)},e.prototype.fileSelect=function(){return this.dialogObj.element.getElementsByClassName("e-file-select-wrap")[0].querySelector("button").click(),!1},e.prototype.cancelDialog=function(e){this.parent.isBlur=!1,this.dialogObj.hide({returnValue:!0}),this.isAudioUploaded&&this.uploadObj.removing()},e.prototype.insertAudioUrl=function(e){var t=this.selfAudio;t.isAudioUploaded=!1;var r=t.inputUrl.value;if(0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData(),n.i(i.isNullOrUndefined)(t.uploadUrl)||""===t.uploadUrl.url){if(""!==r){if("HTML"===t.parent.editorMode&&n.i(i.isNullOrUndefined)(n.i(i.closest)(this.selection.range.startContainer.parentNode,"[id='"+t.contentModule.getPanel().id+"']"))){t.contentModule.getEditPanel().focus();var s=t.parent.formatter.editorManager.nodeSelection.getRange(t.contentModule.getDocument());this.selection=t.parent.formatter.editorManager.nodeSelection.save(s,t.contentModule.getDocument()),this.selectParent=t.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(s)}var a="HTML"===t.parent.editorMode?r.split("/")[r.split("/").length-1]:"",l={cssClass:"Inline"===t.parent.insertAudioSettings.layoutOption?o._4:o.U,url:r,selection:this.selection,fileName:a,selectParent:this.selectParent};t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,l),t.dialogObj.hide({returnValue:!1})}}else t.uploadUrl.cssClass="Inline"===t.parent.insertAudioSettings.layoutOption?o._4:o.U,t.dialogObj.hide({returnValue:!1}),t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,t.uploadUrl),t.uploadUrl.url=""},e.prototype.destroy=function(){this.prevSelectedAudEle=void 0,this.removeEventListener()},e.prototype.getModuleName=function(){return"audio"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(14),a=(n.n(s),n(9)),l=(n.n(a),n(18)),d=(n.n(l),n(5)),c=n(4),u=n(6),h=function(){function e(e,t){this.isImgUploaded=!1,this.isAllowedTypes=!0,this.pageX=null,this.pageY=null,this.mouseX=null,this.deletedImg=[],this.parent=e,this.rteID=e.element.id,this.i10n=t.getService("rteLocale"),this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.v,this.onKeyDown,this),this.parent.on(r.u,this.onKeyUp,this),this.parent.on(r.X,this.insertImage,this),this.parent.on(r._81,this.showDialog,this),this.parent.on(r._84,this.closeDialog,this),this.parent.on(r.I,this.onWindowResize,this),this.parent.on(r._0,this.showImageQuickToolbar,this),this.parent.on(r._48,this.clearDialogObj,this),this.parent.on(r.E,this.onToolbarAction,this),this.parent.on(r._11,this.caption,this),this.parent.on(r._8,this.deleteImg,this),this.parent.on(r._6,this.insertImgLink,this),this.parent.on(r._7,this.insertAltText,this),this.parent.on(r._26,this.editAreaClickHandler,this),this.parent.on(r.h,this.onIframeMouseDown,this),this.parent.on(r._12,this.imageSize,this),this.parent.on(r.B,this.alignmentSelect,this),this.parent.on(r.g,this.afterRender,this),this.parent.on(r._75,this.afterRender,this),this.parent.on(r._36,this.imagePaste,this),this.parent.on(r._89,this.setCssClass,this),this.parent.on(r.i,this.removeEventListener,this),this.parent.on(r._44,this.moduleDestroy,this))},e.prototype.removeEventListener=function(){if(!this.parent.isDestroyed){this.parent.off(r.v,this.onKeyDown),this.parent.off(r.u,this.onKeyUp),this.parent.off(r.I,this.onWindowResize),this.parent.off(r.X,this.insertImage),this.parent.off(r._81,this.showDialog),this.parent.off(r._84,this.closeDialog),this.parent.off(r._0,this.showImageQuickToolbar),this.parent.off(r._48,this.clearDialogObj),this.parent.off(r._11,this.caption),this.parent.off(r.E,this.onToolbarAction),this.parent.off(r._8,this.deleteImg),this.parent.off(r._6,this.insertImgLink),this.parent.off(r._7,this.insertAltText),this.parent.off(r._26,this.editAreaClickHandler),this.parent.off(r.h,this.onIframeMouseDown),this.parent.off(r._12,this.imageSize),this.parent.off(r.B,this.alignmentSelect),this.parent.off(r.g,this.afterRender),this.parent.off(r._75,this.afterRender),this.parent.off(r._36,this.imagePaste),this.parent.off(r._89,this.setCssClass),this.parent.off(r.i,this.removeEventListener),this.parent.off(r._44,this.moduleDestroy);var e=this.parent.iframeSettings.enable?this.parent.inputElement.ownerDocument:this.parent.inputElement;e.removeEventListener("drop",this.dragDrop.bind(this),!0),e.removeEventListener("dragstart",this.dragStart.bind(this),!0),e.removeEventListener("dragenter",this.dragEnter.bind(this),!0),e.removeEventListener("dragover",this.dragOver.bind(this),!0),n.i(i.isNullOrUndefined)(this.contentModule)||(i.EventHandler.remove(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.imageClick),this.parent.formatter.editorManager.observer.off(r._42,this.undoStack),this.parent.insertImageSettings.resize&&(i.EventHandler.remove(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.resizeStart),i.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick),i.EventHandler.remove(this.contentModule.getEditPanel(),"cut",this.onCutHandler),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing)))}},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(i.isNullOrUndefined)(t.oldCssClass)?e.setProperties({cssClass:(e.cssClass+" "+t.cssClass).trim()}):e.setProperties({cssClass:(e.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){this.popupObj&&e.cssClass&&(n.i(i.isNullOrUndefined)(e.oldCssClass)?n.i(i.addClass)([this.popupObj.element],e.cssClass):(n.i(i.removeClass)([this.popupObj.element],e.oldCssClass),n.i(i.addClass)([this.popupObj.element],e.cssClass))),this.updateCss(this.checkBoxObj,e),this.updateCss(this.widthNum,e),this.updateCss(this.heightNum,e),this.updateCss(this.uploadObj,e),this.updateCss(this.dialogObj,e)},e.prototype.onIframeMouseDown=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.afterRender=function(){this.contentModule=this.rendererFactory.getRenderer(d.a.Content),i.EventHandler.add(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.imageClick,this),this.parent.insertImageSettings.resize&&(i.EventHandler.add(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.resizeStart,this),i.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this),i.EventHandler.add(this.contentModule.getEditPanel(),"cut",this.onCutHandler,this));var e=this.parent.iframeSettings.enable?this.parent.inputElement.ownerDocument:this.parent.inputElement;e.addEventListener("drop",this.dragDrop.bind(this),!0),e.addEventListener("dragstart",this.dragStart.bind(this),!0),e.addEventListener("dragenter",this.dragOver.bind(this),!0),e.addEventListener("dragover",this.dragOver.bind(this),!0)},e.prototype.undoStack=function(e){if("undo"===e.subCommand.toLowerCase()||"redo"===e.subCommand.toLowerCase())for(var t=0;t<this.parent.formatter.getUndoRedoStack().length;t++){var r=this.parent.createElement("div"),o=this.parent.formatter.getUndoRedoStack()[t].text;r.appendChild(o.cloneNode(!0));var s=r.querySelectorAll("img");if(r.querySelector(".e-img-resize")&&s.length>0){for(var a=0;a<s.length;a++)s[a].style.outline="";n.i(i.detach)(r.querySelector(".e-img-resize"));for(var l=r.cloneNode(!0),d=document.createDocumentFragment();l.firstChild;)d.appendChild(l.firstChild);this.parent.formatter.getUndoRedoStack()[t].text=d}}},e.prototype.resizeEnd=function(e){this.resizeBtnInit(),this.imgEle.parentElement.style.cursor="auto",i.Browser.isDevice&&n.i(i.removeClass)([e.target.parentElement],"e-mob-span");var t={event:e,requestType:"images"};this.parent.trigger(r.L,t);this.getPointX(e),this.parent.iframeSettings.enable?(window.pageYOffset,this.parent.element.getBoundingClientRect().top,e.clientY):e.pageY;this.parent.formatter.editorManager.observer.on(r._42,this.undoStack,this),this.parent.formatter.saveData()},e.prototype.resizeStart=function(e,t){var o=this;if(!this.parent.readonly){var s=t||e.target;if(this.prevSelectedImgEle=this.imgEle,"IMG"===s.tagName){this.parent.preventDefaultResize(e);var a=s;this.imgResizeDiv&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&n.i(i.detach)(this.imgResizeDiv),this.imageResize(a)}if(s.classList.contains("e-rte-imageboxmark")){if(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),this.pageX=this.getPointX(e),this.pageY=this.getPointY(e),e.preventDefault(),e.stopImmediatePropagation(),this.resizeBtnInit(),this.quickToolObj&&this.quickToolObj.imageQTBar.hidePopup(),s.classList.contains("e-rte-topLeft")&&(this.resizeBtnStat.topLeft=!0),s.classList.contains("e-rte-topRight")&&(this.resizeBtnStat.topRight=!0),s.classList.contains("e-rte-botLeft")&&(this.resizeBtnStat.botLeft=!0),s.classList.contains("e-rte-botRight")&&(this.resizeBtnStat.botRight=!0),i.Browser.isDevice&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&!this.imgResizeDiv.classList.contains("e-mob-span"))n.i(i.addClass)([this.imgResizeDiv],"e-mob-span");else{var l={event:e,requestType:"images"};this.parent.trigger(r.J,l,function(e){e.cancel&&o.cancelResizeAction()})}i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd,this)}}},e.prototype.imageClick=function(e){i.Browser.isDevice&&("IMG"===e.target.tagName&&"A"===e.target.parentElement.tagName||"IMG"===e.target.tagName?(this.contentModule.getEditPanel().setAttribute("contenteditable","false"),e.target.focus()):this.parent.readonly||this.contentModule.getEditPanel().setAttribute("contenteditable","true")),"IMG"===e.target.tagName&&"A"===e.target.parentElement.tagName&&e.preventDefault()},e.prototype.onCutHandler=function(){this.imgResizeDiv&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&this.cancelResizeAction()},e.prototype.imageResize=function(e){this.resizeBtnInit(),this.imgEle=e,n.i(i.addClass)([this.imgEle],"e-resize"),this.imgResizeDiv=this.parent.createElement("span",{className:"e-img-resize"+this.parent.getCssClass(!0),id:this.rteID+"_imgResize"}),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-topLeft"+this.parent.getCssClass(!0),styles:"cursor: nwse-resize"})),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-topRight"+this.parent.getCssClass(!0),styles:"cursor: nesw-resize"})),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-botLeft"+this.parent.getCssClass(!0),styles:"cursor: nesw-resize"})),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-botRight"+this.parent.getCssClass(!0),styles:"cursor: nwse-resize"})),i.Browser.isDevice&&n.i(i.addClass)([this.imgResizeDiv],"e-mob-rte"),e.style.outline="2px solid #4a90e2",this.imgResizePos(e,this.imgResizeDiv),this.resizeImgDupPos(e),this.contentModule.getEditPanel().appendChild(this.imgResizeDiv),i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing,this)},e.prototype.getPointX=function(e){return e.touches&&e.touches.length?e.touches[0].pageX:e.pageX},e.prototype.getPointY=function(e){return e.touches&&e.touches.length?e.touches[0].pageY:e.pageY},e.prototype.imgResizePos=function(e,t){var n=this.calcPos(e),r=n.top,o=n.left,s=e.getBoundingClientRect().width,a=e.getBoundingClientRect().height,l=i.Browser.isDevice?4*parseInt(e.style.outline.slice(-3),10)+2:2*parseInt(e.style.outline.slice(-3),10)+2,d=i.Browser.isDevice?0:2;t.querySelector(".e-rte-botLeft").style.left=o-l+"px",t.querySelector(".e-rte-botLeft").style.top=a-l+r+"px",t.querySelector(".e-rte-botRight").style.left=s-(l-d)+o+"px",t.querySelector(".e-rte-botRight").style.top=a-l+r+"px",t.querySelector(".e-rte-topRight").style.left=s-(l-d)+o+"px",t.querySelector(".e-rte-topRight").style.top=r-l+"px",t.querySelector(".e-rte-topLeft").style.left=o-l+"px",t.querySelector(".e-rte-topLeft").style.top=r-l+"px"},e.prototype.calcPos=function(e){for(var t,r=["TD","TH","TABLE","A"],o={top:0,left:0},s=e.ownerDocument,a=(e.offsetParent&&(e.offsetParent.classList.contains("e-img-caption")||r.indexOf(e.offsetParent.tagName)>-1)?n.i(i.closest)(e,"#"+this.parent.getID()+"_rte-edit-view"):e.offsetParent)||s.documentElement;a&&(a===s.body||a===s.documentElement)&&"static"===a.style.position;)a=a.parentNode;return a&&a!==e&&1===a.nodeType&&(o=a.getBoundingClientRect()),e.offsetParent&&e.offsetParent.classList.contains("e-img-caption")?(t=e.getBoundingClientRect(),{top:t.top-o.top,left:t.left-o.left}):{top:e.offsetTop,left:e.offsetLeft}},e.prototype.setAspectRatio=function(e,t,r,o){if(!n.i(i.isNullOrUndefined)(e.width)){var s=""!==e.style.width?e.style.width.match(/^\d+(\.\d*)?%$/g)?parseFloat(e.style.width):parseInt(e.style.width,10):e.width,a=""!==e.style.height?parseInt(e.style.height,10):e.height;if(s>a)if(e.style.minWidth=0===this.parent.insertImageSettings.minWidth?"20px":n.i(i.formatUnit)(this.parent.insertImageSettings.minWidth),this.parent.insertImageSettings.resizeByPercent){if(0!==parseInt(""+e.getBoundingClientRect().width,10)&&0!==parseInt(""+s,10)){var l=e.offsetWidth+this.mouseX,d=l/e.offsetWidth*("NaN"===parseFloat(e.style.width).toString()?e.offsetWidth/parseFloat(getComputedStyle(this.parent.element).width)*100:parseFloat(e.style.width));e.style.width=(d>3?d:3)+"%"}else e.style.width=this.pixToPerc(s/a*r,e.previousElementSibling||e.parentElement)+"%";e.style.height=null,e.removeAttribute("height")}else if(""===e.style.width&&""!==e.style.height)e.style.height=r+"px";else if(""!==e.style.width&&""===e.style.height){var c=s/a*r+s/a<this.parent.inputElement.getBoundingClientRect().right-32?s/a*r+s/a:this.parent.inputElement.getBoundingClientRect().right-32;e.style.width=c.toString()+"px",e.style.height=r+"px"}else if(""!==e.style.width){var c=s/a*r<this.parent.inputElement.getBoundingClientRect().right-32?s/a*r:this.parent.inputElement.getBoundingClientRect().right-32;e.style.width=c+"px",e.style.height=r+"px"}else if(this.parent.iframeSettings.enable)e.setAttribute("width",(e.width+this.mouseX).toString());else{var c=0===e.offsetWidth?e.width+this.mouseX+parseInt(e.style.outlineWidth.split("p")[0],10):e.offsetWidth+this.mouseX;e.setAttribute("width",c.toString())}else if(a>s)if(this.parent.insertImageSettings.resizeByPercent){if(0!==parseInt(""+e.getBoundingClientRect().width,10)&&0!==parseInt(""+s,10)){var l=e.offsetWidth+this.mouseX,d=l/e.offsetWidth*("NaN"===parseFloat(e.style.width).toString()?e.offsetWidth/parseFloat(getComputedStyle(this.parent.element).width)*100:parseFloat(e.style.width));e.style.width=(d>3?d:3)+"%"}else e.style.width=this.pixToPerc(t/a*r,e.previousElementSibling||e.parentElement)+"%";e.style.height=null,e.removeAttribute("height")}else""!==e.style.width?(e.style.width=t+"px",e.style.height=a/s*t+"px"):e.setAttribute("width",this.resizeBtnStat.botRight?(this.getPointX(o.event)-e.getBoundingClientRect().left).toString():t.toString());else this.parent.insertImageSettings.resizeByPercent?(e.style.width=this.pixToPerc(t,e.previousElementSibling||e.parentElement)+"%",e.style.height=null,e.removeAttribute("height")):(e.style.width=(t>=15?t:15)+"px",e.style.height=(t>=15?t:15)+"px")}},e.prototype.pixToPerc=function(e,t){return e/parseFloat(getComputedStyle(t).width)*100},e.prototype.imgDupMouseMove=function(e,t,o){var s=this,a={event:o,requestType:"images"};this.parent.trigger(r.K,a,function(r){if(r.cancel)s.cancelResizeAction();else{if(parseInt(s.parent.insertImageSettings.minWidth,10)>=parseInt(e,10)||parseInt(s.parent.getInsertImgMaxWidth(),10)<=parseInt(e,10)&&n.i(i.isNullOrUndefined)(s.imgEle.style.width))return;if(!s.parent.insertImageSettings.resizeByPercent&&(parseInt(s.parent.insertImageSettings.minHeight,10)>=parseInt(t,10)||parseInt(s.parent.insertImageSettings.maxHeight,10)<=parseInt(t,10)))return;s.imgEle.parentElement.style.cursor="pointer",s.setAspectRatio(s.imgEle,parseInt(e,10),parseInt(t,10),a),s.resizeImgDupPos(s.imgEle),s.imgResizePos(s.imgEle,s.imgResizeDiv)}})},e.prototype.resizing=function(e){if(!this.parent)return void this.cancelResizeAction();this.imgEle.offsetWidth>=this.parent.getInsertImgMaxWidth()?this.imgEle.style.maxHeight=this.imgEle.offsetHeight+"px":n.i(i.isNullOrUndefined)(this.parent.insertImageSettings.maxHeight)&&(this.imgEle.style.maxHeight=""),this.imgEle.style.maxWidth=(null!=n.i(i.closest)(this.imgEle,"ol,ul")?this.parent.getInsertImgMaxWidth()-parseInt(getComputedStyle(n.i(i.closest)(this.imgEle,"ol,ul")).paddingLeft,0):this.parent.getInsertImgMaxWidth())+"px";var t=this.getPointX(e),r=this.getPointY(e),o=this.resizeBtnStat.botLeft||this.resizeBtnStat.topLeft?-(t-this.pageX):t-this.pageX,s=this.resizeBtnStat.botLeft||this.resizeBtnStat.topLeft?-(r-this.pageY):r-this.pageY,a=parseInt(this.imgDupPos.width,10)+o,l=parseInt(this.imgDupPos.height,10)+s;this.mouseX=o,this.pageX=t,this.pageY=r,this.resizeBtnStat.botRight?this.imgDupMouseMove(a+"px",l+"px",e):this.resizeBtnStat.botLeft?this.imgDupMouseMove(a+"px",l+"px",e):this.resizeBtnStat.topRight?this.imgDupMouseMove(a+"px",l+"px",e):this.resizeBtnStat.topLeft&&this.imgDupMouseMove(a+"px",l+"px",e)},e.prototype.cancelResizeAction=function(){i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),this.imgEle&&this.imgResizeDiv&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&(n.i(i.detach)(this.imgResizeDiv),this.imgEle.style.outline="",this.imgResizeDiv=null,this.pageX=null,this.pageY=null)},e.prototype.resizeImgDupPos=function(e){this.imgDupPos={width:""!==e.style.width&&this.parent.insertImageSettings&&!this.parent.insertImageSettings.resizeByPercent?this.imgEle.style.width:e.width+"px",height:""!==e.style.height?this.imgEle.style.height:e.height+"px"}},e.prototype.resizeBtnInit=function(){return this.resizeBtnStat={botLeft:!1,botRight:!1,topRight:!1,topLeft:!1}},e.prototype.onToolbarAction=function(e){switch(n.i(u.b)()&&this.parent.notify(r._19,{}),e.args.item.subCommand){case"Replace":this.parent.fileManagerSettings.enable?this.parent.notify(r._73,e):this.parent.notify(r.X,e);break;case"Caption":this.parent.notify(r._11,e);break;case"InsertLink":this.parent.notify(r._6,e);break;case"AltText":this.parent.notify(r._7,e);break;case"Remove":this.parent.notify(r._8,e);break;case"Dimension":this.parent.notify(r._12,e);break;case"OpenImageLink":this.openImgLink(e);break;case"EditImageLink":this.editImgLink(e);break;case"RemoveImageLink":this.removeImgLink(e)}},e.prototype.openImgLink=function(e){var t=""===e.selectParent[0].parentNode.target?"_self":"_blank";this.parent.formatter.process(this.parent,e.args,e.args,{url:e.selectParent[0].parentNode.href,target:t,selectNode:e.selectNode,subCommand:e.args.item.subCommand})},e.prototype.editImgLink=function(e){var t=e.selectParent[0].parentNode,n=this.i10n.getConstant("dialogUpdate"),i={url:t.href,target:t.target,header:"Edit Link",btnText:n};this.insertImgLink(e,i)},e.prototype.removeImgLink=function(e){i.Browser.isIE&&this.contentModule.getEditPanel().focus(),e.selection.restore();var t=!(!this.contentModule.getEditPanel().contains(this.captionEle)||!n.i(i.select)("a",this.captionEle)),r=t?[this.captionEle]:[e.selectNode[0].parentElement];this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:e.selectNode[0],selectParent:r,selection:e.selection,subCommand:e.args.item.subCommand}),this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),n.i(i.isNullOrUndefined)(e.selectParent)||n.i(i.removeClass)([e.selectParent[0]],"e-img-focus")),t&&n.i(i.select)(".e-img-inner",this.captionEle).focus()},e.prototype.onKeyDown=function(e){var t,r,s,a,l=e.args;this.deletedImg=[];var d,c=[27,112,113,114,115,116,117,118,119,120,121,122,123,44,45,9,16,17,18,19,20,33,34,35,36,37,38,39,40,91,92,93,144,145,182,183];if("HTML"===this.parent.editorMode&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),d=t.startContainer===t.endContainer&&t.startOffset===t.endOffset),!d&&"HTML"===this.parent.editorMode&&c.indexOf(l.which)<0)for(var u=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),h=0;h<u.length;h++)"IMG"===u[h].nodeName&&this.deletedImg.push(u[h]);if("HTML"===this.parent.editorMode&&(8===l.which&&"Backspace"===l.code||46===l.which&&"Delete"===l.code)){var p=t.startContainer===t.endContainer&&t.startOffset===t.endOffset;8===l.which&&"Backspace"===l.code&&p?this.checkImageBack(t):46===l.which&&"Delete"===l.code&&p&&this.checkImageDel(t)}if(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&"KeyK"!==l.code&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),s=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),a=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t),!l.ctrlKey&&l.key&&(1===l.key.length||"enter"===l.action)&&!n.i(i.isNullOrUndefined)(a[0])&&"IMG"===a[0].tagName&&a[0].parentElement)){var m=a[0].parentElement.childNodes[0];this.contentModule.getEditPanel().querySelector(".e-img-resize")&&this.removeResizeEle(),this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),m,m,m.textContent.length,m.textContent.length),n.i(i.removeClass)([a[0]],"e-img-focus"),this.quickToolObj.imageQTBar.hidePopup()}if(!l.ctrlKey||89!==l.keyCode&&90!==l.keyCode||this.undoStack({subCommand:90===l.keyCode?"undo":"redo"}),8===l.keyCode||46===l.keyCode){if(s&&"IMG"===s[0].nodeName&&s.length<1){n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),l.preventDefault();var f={selectNode:s,selection:r,selectParent:a,args:{item:{command:"Images",subCommand:"Remove"},originalEvent:l}};this.deleteImg(f,l.keyCode)}this.parent.contentModule.getEditPanel().querySelector(".e-img-resize")&&this.removeResizeEle()}switch("Backspace"===l.code&&(l.action="backspace"),l.action){case"escape":n.i(i.isNullOrUndefined)(this.dialogObj)||this.dialogObj.close();break;case"backspace":case"delete":for(var h=0;h<this.deletedImg.length;h++){var g=this.deletedImg[h].src;this.imageRemovePost(g)}if("Markdown"!==this.parent.editorMode)if(3===t.startContainer.nodeType)"Backspace"===l.code?t.startContainer.previousElementSibling&&0===t.startOffset&&t.startContainer.previousElementSibling.classList.contains(o._0)&&t.startContainer.previousElementSibling.classList.contains(o._2)&&n.i(i.detach)(t.startContainer.previousElementSibling):t.startContainer.nextElementSibling&&t.endContainer.textContent.length===t.endOffset&&t.startContainer.nextElementSibling.classList.contains(o._0)&&t.startContainer.nextElementSibling.classList.contains(o._2)&&n.i(i.detach)(t.startContainer.nextElementSibling);else if(1===t.startContainer.nodeType)if(t.startContainer.querySelector("."+o._0+"."+o._2))n.i(i.detach)(t.startContainer.querySelector("."+o._0+"."+o._2));else if(t.startContainer.querySelector("."+o._0+"."+o.T))n.i(i.detach)(t.startContainer.querySelector("."+o._0+"."+o.T));else if(t.startContainer.classList.contains("e-img-wrap")&&n.i(i.closest)(t.startContainer,"."+o._0)){var b=t.startContainer.parentElement.parentElement;if(n.i(i.detach)(n.i(i.closest)(t.startContainer,"."+o._0)),b&&""===b.textContent.trim()){var v=this.parent.createElement("br");v.classList.add("e-rte-image-remove-focus"),b.appendChild(v)}}break;case"insert-image":n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),this.openDialog(!0,l,r,s,a),l.preventDefault()}},e.prototype.openDialog=function(e,t,r,o,s){var a,l,d,c;e||n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)?(l=r,d=o,c=s):(a=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),l=this.parent.formatter.editorManager.nodeSelection.save(a,this.parent.contentModule.getDocument()),d=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(a),c=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(a)),"HTML"===this.parent.editorMode?this.insertImage({args:{item:{command:"Images",subCommand:"Image"},originalEvent:t,name:e?null:"showDialog"},selectNode:d,selection:l,selectParent:c}):this.insertImage({args:{item:{command:"Images",subCommand:"Image"},originalEvent:t,name:e?null:"showDialog"},member:"image",text:this.parent.formatter.editorManager.markdownSelection.getSelectedText(this.parent.contentModule.getEditPanel()),module:"Markdown",name:"insertImage"})},e.prototype.showDialog=function(){this.openDialog(!1),this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.closeDialog=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.onKeyUp=function(e){if(!n.i(i.isNullOrUndefined)(this.deletedImg)&&this.deletedImg.length>0)for(var t=0;t<this.deletedImg.length;t++){var o={element:this.deletedImg[t],src:this.deletedImg[t].getAttribute("src")};this.parent.trigger(r._66,o)}},e.prototype.checkImageBack=function(e){"#text"!==e.startContainer.nodeName||0!==e.startOffset||n.i(i.isNullOrUndefined)(e.startContainer.previousSibling)||"IMG"!==e.startContainer.previousSibling.nodeName?"#text"===e.startContainer.nodeName||n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset-1])||"IMG"!==e.startContainer.childNodes[e.startOffset-1].nodeName||this.deletedImg.push(e.startContainer.childNodes[e.startOffset-1]):this.deletedImg.push(e.startContainer.previousSibling)},e.prototype.checkImageDel=function(e){"#text"!==e.startContainer.nodeName||e.startOffset!==e.startContainer.textContent.length||n.i(i.isNullOrUndefined)(e.startContainer.nextSibling)||"IMG"!==e.startContainer.nextSibling.nodeName?"#text"===e.startContainer.nodeName||n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset])||"IMG"!==e.startContainer.childNodes[e.startOffset].nodeName||this.deletedImg.push(e.startContainer.childNodes[e.startOffset]):this.deletedImg.push(e.startContainer.nextSibling)},e.prototype.alignmentSelect=function(e){var t=e.item;if(document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))&&"Images"===t.command){var r=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),o=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(r);o="IMG"===o[0].nodeName?o:[this.imgEle];var s={args:e,selectNode:o};switch(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),t.subCommand){case"JustifyLeft":this.alignImage(s,"JustifyLeft");break;case"JustifyCenter":this.alignImage(s,"JustifyCenter");break;case"JustifyRight":this.alignImage(s,"JustifyRight");break;case"Inline":this.inline(s);break;case"Break":this.break(s)}this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),n.i(i.removeClass)([o[0]],"e-img-focus")),this.cancelResizeAction()}},e.prototype.imageWithLinkQTBarItemUpdate=function(){for(var e=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item"),t=0;t<e.length;t++)e[t].getAttribute("title")===this.i10n.getConstant("openLink")||e[t].getAttribute("title")===this.i10n.getConstant("editLink")||e[t].getAttribute("title")===this.i10n.getConstant("removeLink")?(n.i(i.addClass)([e[t]],"e-link-groups"),e[t].style.display="none"):"Insert Link"===e[t].getAttribute("title")?e[t].style.display="":e[t].classList.contains("e-rte-horizontal-separator")&&(e[t],n.i(i.detach)(e[t]));var r=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item:not(.e-link-groups)");this.quickToolObj.imageQTBar.addQTBarItem(["-"],Math.round(r.length/2))},e.prototype.showImageQuickToolbar=function(e){var t=this;if(!("Images"!==e.type||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule.imageQTBar)||n.i(i.isNullOrUndefined)(e.args))){this.quickToolObj=this.parent.quickToolbarModule;var r=e.args,o=e.elements;[].forEach.call(e.elements,function(e,t){0===t&&(o=e)}),o&&!n.i(i.closest)(o,"a")&&this.imageWithLinkQTBarItemUpdate(),"IMG"===o.nodeName&&n.i(i.addClass)([o],["e-img-focus"]);var s=this.parent.iframeSettings.enable?window.pageYOffset+this.parent.element.getBoundingClientRect().top+r.clientY:r.pageY;this.parent.quickToolbarModule.imageQTBar&&(e.isNotify?setTimeout(function(){t.parent.formatter.editorManager.nodeSelection.Clear(t.contentModule.getDocument()),t.parent.formatter.editorManager.nodeSelection.setSelectionContents(t.contentModule.getDocument(),o),t.quickToolObj.imageQTBar.showPopup(r.pageX,s,o)},400):this.quickToolObj.imageQTBar.showPopup(r.pageX,s,o))}},e.prototype.hideImageQuickToolbar=function(){n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector(".e-img-focus"))||(n.i(i.removeClass)([this.contentModule.getEditPanel().querySelector(".e-img-focus")],"e-img-focus"),this.quickToolObj&&this.quickToolObj.imageQTBar&&document.body.contains(this.quickToolObj.imageQTBar.element)&&this.quickToolObj.imageQTBar.hidePopup())},e.prototype.editAreaClickHandler=function(e){if(this.parent.readonly)return void this.hideImageQuickToolbar();var t=e.args,o=this.parent.quickToolbarSettings.showOnRightClick;if(2===t.which||o&&1===t.which||!o&&3===t.which)return void(o&&1===t.which&&!n.i(i.isNullOrUndefined)(t.target)&&"IMG"===t.target.tagName&&(this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),t.target)));if("HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.imageQTBar){this.quickToolObj=this.parent.quickToolbarModule;var s=t.target;this.contentModule=this.rendererFactory.getRenderer(d.a.Content);var a=this.quickToolObj.imageQTBar.element.classList.contains("e-rte-pop");if("IMG"===s.nodeName&&this.parent.quickToolbarModule){if(a)return;this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),s),n.i(u.b)()&&this.parent.notify(r._18,e),n.i(i.addClass)([s],"e-img-focus");var l=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item");if(n.i(i.closest)(s,"a")){for(var c=0;c<l.length;c++)l[c].getAttribute("title")===this.i10n.getConstant("openLink")||l[c].getAttribute("title")===this.i10n.getConstant("editLink")||l[c].getAttribute("title")===this.i10n.getConstant("removeLink")?(l[c].style.display="",n.i(i.removeClass)([l[c]],"e-link-groups")):"Insert Link"===l[c].getAttribute("title")?l[c].style.display="none":l[c].classList.contains("e-rte-horizontal-separator")&&(l[c],n.i(i.detach)(l[c]));var h=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item:not(.e-link-groups)");this.quickToolObj.imageQTBar.addQTBarItem(["-"],Math.round(h.length/2))}else n.i(i.closest)(s,"a")||this.imageWithLinkQTBarItemUpdate();this.showImageQuickToolbar({args:t,type:"Images",elements:[t.target]})}else this.hideImageQuickToolbar()}},e.prototype.insertImgLink=function(e,t){var r=this;if("IMG"===e.selectNode[0].nodeName&&(this.imagDialog(e),!n.i(i.isNullOrUndefined)(this.dialogObj))){var o=this.parent.createElement("div",{className:"e-img-linkwrap"+this.parent.getCssClass(!0)}),s=this.i10n.getConstant("linkurl"),a='<div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" class="e-input e-img-link'+this.parent.getCssClass(!0)+'" spellcheck="false" placeholder="'+s+'"/></div><div class="e-rte-label"></div><div class="e-rte-field"><input type="checkbox" class="e-rte-linkTarget'+this.parent.getCssClass(!0)+'" data-role ="none"></div>',d=n.i(c.m)(a);o.appendChild(d);var u=o.querySelector(".e-rte-linkTarget"),h=o.querySelector(".e-img-link"),p=this.i10n.getConstant("linkOpenInNewWindow");this.checkBoxObj=new l.CheckBox({label:p,checked:!0,enableRtl:this.parent.enableRtl,cssClass:this.parent.getCssClass(),change:function(e){m=e.checked?"_blank":null}}),this.checkBoxObj.isStringTemplate=!0,this.checkBoxObj.createElement=this.parent.createElement,this.checkBoxObj.appendTo(u);var m=this.checkBoxObj.checked?"_blank":null,f=this.checkBoxObj.checked?this.i10n.getConstant("ImageLinkAriaLabel"):null,g=this.i10n.getConstant("dialogUpdate"),b={args:e.args,selfImage:this,selection:e.selection,selectNode:e.selectNode,selectParent:e.selectParent,link:h,target:m,ariaLabel:f};this.dialogObj.setProperties({height:"inherit",width:"290px",header:this.parent.localeObj.getConstant("imageInsertLinkHeader"),content:o,buttons:[{click:function(e){r.insertlink(b)},buttonModel:{content:g,cssClass:"e-flat e-update-link"+this.parent.getCssClass(!0),isPrimary:!0}}],cssClass:this.dialogObj.cssClass+" e-rte-img-link-dialog"}),n.i(i.isNullOrUndefined)(this.parent.cssClass)||this.dialogObj.setProperties({cssClass:this.parent.cssClass}),n.i(i.isNullOrUndefined)(t)||(h.value=t.url,t.target?this.checkBoxObj.checked=!0:this.checkBoxObj.checked=!1,this.dialogObj.header=t.header),this.dialogObj.element.style.maxHeight="inherit",this.dialogObj.content.querySelector("input").focus()}},e.prototype.insertAltText=function(e){var t=this;if("IMG"===e.selectNode[0].nodeName){this.imagDialog(e);var r=this.i10n.getConstant("altText");if(!n.i(i.isNullOrUndefined)(this.dialogObj)){var o=this.parent.createElement("div",{className:"e-img-altwrap"+this.parent.getCssClass(!0)}),s=this.i10n.getConstant("alternateHeader"),a=this.i10n.getConstant("dialogUpdate"),l=null===e.selectNode[0].getAttribute("alt")?"":e.selectNode[0].getAttribute("alt"),d='<div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" spellcheck="false" class="e-input e-img-alt'+this.parent.getCssClass(!0)+'" placeholder="'+r+'"/></div>',u=n.i(c.m)(d);u.querySelector("input").setAttribute("value",l),o.appendChild(u);var h=o.querySelector(".e-img-alt"),p={args:e.args,selfImage:this,selection:e.selection,selectNode:e.selectNode,alt:h};this.dialogObj.setProperties({height:"inherit",width:"290px",header:s,content:o,buttons:[{click:function(e){t.insertAlt(p)},buttonModel:{content:a,cssClass:"e-flat e-update-alt"+this.parent.getCssClass(!0),isPrimary:!0}}],cssClass:this.dialogObj.cssClass+" e-rte-img-alt-dialog"}),n.i(i.isNullOrUndefined)(this.parent.cssClass)||this.dialogObj.setProperties({cssClass:this.parent.cssClass}),this.dialogObj.element.style.maxHeight="inherit",this.dialogObj.content.querySelector("input").focus()}}},e.prototype.insertAlt=function(e){if(!n.i(i.isNullOrUndefined)(e.alt)){e.selection.restore(),0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData();var t=e.alt.value;this.parent.formatter.process(this.parent,e.args,e.args,{altText:t,selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.dialogObj.hide({returnValue:!1})}},e.prototype.insertlink=function(e){if("IMG"===e.selectNode[0].nodeName){var t=e.link.value;if(""===t)return n.i(i.addClass)([e.link],"e-error"),e.link.setSelectionRange(0,t.length),void e.link.focus();this.isUrl(t)?n.i(i.removeClass)([e.link],"e-error"):t="http://"+t;var r=e.selfImage;if("HTML"===r.parent.editorMode&&e.selection.restore(),0===r.parent.formatter.getUndoRedoStack().length&&r.parent.formatter.saveData(),"A"===e.selectNode[0].parentElement.nodeName)return r.parent.formatter.process(r.parent,e.args,e.args,{url:t,target:r.checkBoxObj.checked?"_blank":null,ariaLabel:r.checkBoxObj.checked?this.i10n.getConstant("ImageLinkAriaLabel"):null,selectNode:e.selectNode,subCommand:e.args.item.subCommand}),void r.dialogObj.hide({returnValue:!0});r.parent.formatter.process(r.parent,e.args,e.args,{url:t,target:r.checkBoxObj.checked?"_blank":null,ariaLabel:r.checkBoxObj.checked?this.i10n.getConstant("ImageLinkAriaLabel"):null,selectNode:e.selectNode,subCommand:e.args.item.subCommand,selection:e.selection});var o=n.i(i.closest)(e.selectNode[0],".e-img-caption");o&&n.i(i.select)(".e-img-inner",o).focus(),o&&n.i(i.select)(".e-img-inner",o).focus(),r.dialogObj.hide({returnValue:!1})}},e.prototype.isUrl=function(e){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi.test(e)},e.prototype.deleteImg=function(e,t){if("IMG"===e.selectNode[0].nodeName){var s={element:e.selectNode[0],src:e.selectNode[0].getAttribute("src")};0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),e.selection.restore(),this.contentModule.getEditPanel().querySelector(".e-img-resize")&&this.removeResizeEle(),this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,captionClass:o._0,subCommand:e.args.item.subCommand}),this.imageRemovePost(s.src),this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&this.quickToolObj.imageQTBar.hidePopup(),this.cancelResizeAction(),n.i(i.isNullOrUndefined)(t)&&this.parent.trigger(r._66,s)}},e.prototype.imageRemovePost=function(e){var t=this,r="";if(!n.i(i.isNullOrUndefined)(this.parent.insertImageSettings.removeUrl)&&""!==this.parent.insertImageSettings.removeUrl){r=e.indexOf("http://")>-1||e.indexOf("https://")>-1?e:new URL(e,document.baseURI).href,this.removingImgName=r.replace(/^.*[\\\/]/,"");var o=new XMLHttpRequest;o.addEventListener("readystatechange",function(){4===this.readyState&&200===this.status&&t.triggerPost(this.response)}),o.open("GET",r),o.responseType="blob",o.send()}},e.prototype.triggerPost=function(e){var t=this.parent.insertImageSettings.removeUrl;if(!n.i(i.isNullOrUndefined)(t)&&""!==t){var r=new File([e],this.removingImgName),o=new i.Ajax(t,"POST",!0,null),s=new FormData;s.append("UploadFiles",r),o.send(s)}},e.prototype.caption=function(e){var t=e.selectNode[0];if("IMG"===t.nodeName){e.selection.restore(),0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),this.cancelResizeAction(),n.i(i.addClass)([t],"e-rte-image");var r=e.args.item?e.args.item.subCommand:"Caption";if(n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"."+o._0))){this.captionEle=this.parent.createElement("span",{className:o._0+" "+o._1+this.parent.getCssClass(!0),attrs:{contenteditable:"false",draggable:"false",style:"width:"+this.parent.insertImageSettings.width}});var s=this.parent.createElement("span",{className:"e-img-wrap"+this.parent.getCssClass(!0)}),a=this.parent.createElement("span",{className:"e-img-inner"+this.parent.getCssClass(!0),attrs:{contenteditable:"true"}}),l=e.selectNode[0].parentElement;"A"===l.tagName&&l.setAttribute("contenteditable","true"),s.appendChild("A"===l.tagName?l:e.selectNode[0]),s.appendChild(a);var d=this.i10n.getConstant("imageCaption");a.innerHTML=d,this.captionEle.appendChild(s),t.classList.contains(o._3)&&n.i(i.addClass)([this.captionEle],o._2),t.classList.contains(o.T)&&n.i(i.addClass)([this.captionEle],o.T),t.classList.contains(o.R)&&n.i(i.addClass)([this.captionEle],o.R),t.classList.contains(o.Q)&&n.i(i.addClass)([this.captionEle],o.Q),t.classList.contains(o.S)&&n.i(i.addClass)([this.captionEle],o.S),this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:this.captionEle,selectNode:e.selectNode,subCommand:r}),this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),a.childNodes[0],a.childNodes[0],0,a.childNodes[0].textContent.length)}else n.i(i.detach)(n.i(i.closest)(t,"."+o._0)),i.Browser.isIE&&(this.contentModule.getEditPanel().focus(),e.selection.restore()),"A"===t.parentElement.tagName?this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:t.parentElement,selectNode:e.selectNode,subCommand:r}):this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:t,selectNode:e.selectNode,subCommand:r});this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),n.i(i.removeClass)([t],"e-img-focus"))}},e.prototype.imageSize=function(e){var t=this;if("IMG"===e.selectNode[0].nodeName&&(this.imagDialog(e),!n.i(i.isNullOrUndefined)(this.dialogObj))){var r=this.i10n.getConstant("imageSizeHeader"),o=this.i10n.getConstant("dialogUpdate"),s=this.imgsizeInput(e),a={args:e.args,selfImage:this,selection:e.selection,selectNode:e.selectNode};this.dialogObj.setProperties({height:i.Browser.isDevice?"300px":"inherit",width:"290px",header:r,content:s,buttons:[{click:function(e){t.insertSize(a)},buttonModel:{content:o,cssClass:"e-flat e-update-size"+this.parent.getCssClass(!0),isPrimary:!0}}],cssClass:this.dialogObj.cssClass+" e-rte-img-size-dialog"}),n.i(i.isNullOrUndefined)(this.parent.cssClass)||this.dialogObj.setProperties({cssClass:this.parent.cssClass}),this.dialogObj.element.style.maxHeight="inherit",this.dialogObj.content.querySelector("input").focus()}},e.prototype.break=function(e){if("IMG"===e.selectNode[0].nodeName){var t=e.args.item?e.args.item.subCommand:"Break";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.inline=function(e){if("IMG"===e.selectNode[0].nodeName){var t=e.args.item?e.args.item.subCommand:"Inline";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.alignImage=function(e,t){var n=e.args.item?e.args.item.subCommand:t;this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:n})},e.prototype.clearDialogObj=function(){this.dialogObj&&(this.dialogObj.destroy(),n.i(i.detach)(this.dialogObj.element),this.dialogObj=null)},e.prototype.imagDialog=function(e){var t=this;if(this.dialogObj)return void this.dialogObj.hide({returnValue:!0});var r=this.parent.createElement("div",{className:"e-rte-img-dialog"+this.parent.getCssClass(!0),id:this.rteID+"_image"});this.parent.element.appendChild(r);var s=this.i10n.getConstant("dialogInsert"),a=this.i10n.getConstant("dialogCancel"),l=this.i10n.getConstant("imageHeader"),d=e.selection,c={selfImage:this,selection:e.selection,args:e.args,selectParent:e.selectParent},u={header:l,cssClass:o._12+this.parent.getCssClass(!0),enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:i.Browser.isDevice?"290px":"340px",isModal:i.Browser.isDevice,buttons:[{click:this.insertImageUrl.bind(c),buttonModel:{content:s,cssClass:"e-flat e-insertImage"+this.parent.getCssClass(!0),isPrimary:!0,disabled:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel"+this.parent.getCssClass(!0),content:a}}],target:i.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){t.isImgUploaded&&t.uploadObj.removing(),t.parent.isBlur=!1,e&&e.event.returnValue&&("HTML"===t.parent.editorMode?d.restore():t.parent.formatter.editorManager.markdownSelection.restore(t.parent.contentModule.getEditPanel())),t.dialogObj.destroy(),n.i(i.detach)(t.dialogObj.element),t.dialogRenderObj.close(e),t.dialogObj=null}},h=this.parent.createElement("div",{className:"e-img-content"+this.parent.getCssClass(!0)});(!n.i(i.isNullOrUndefined)(this.parent.insertImageSettings.path)&&"Markdown"===this.parent.editorMode||"HTML"===this.parent.editorMode)&&h.appendChild(this.imgUpload(e));var p=this.parent.createElement("div",{className:"e-linkheader"+this.parent.getCssClass(!0)}),m=this.i10n.getConstant("imageLinkHeader");"HTML"===this.parent.editorMode?p.innerHTML=m:p.innerHTML=this.i10n.getConstant("mdimageLink"),h.appendChild(p),h.appendChild(this.imageUrlPopup(e)),e.selectNode&&"IMG"===e.selectNode[0].nodeName?(u.header=this.parent.localeObj.getConstant("editImageHeader"),u.content=h):u.content=h,this.dialogObj=this.dialogRenderObj.render(u),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(r),n.i(i.isNullOrUndefined)(this.dialogObj)||(e.selectNode&&"IMG"===e.selectNode[0].nodeName&&"insertImage"===e.name&&(this.dialogObj.element.querySelector(".e-insertImage").textContent=this.parent.localeObj.getConstant("dialogUpdate")),r.style.maxHeight="inherit",this.quickToolObj&&(this.quickToolObj.imageQTBar&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),n.i(i.isNullOrUndefined)(e.selectParent)||n.i(i.removeClass)([e.selectParent[0]],"e-img-focus")),this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup(),this.quickToolObj.textQTBar&&this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)&&this.quickToolObj.textQTBar.hidePopup()))},e.prototype.cancelDialog=function(e){this.parent.isBlur=!1,this.dialogObj.hide({returnValue:!0}),this.isImgUploaded&&this.uploadObj.removing()},e.prototype.onDocumentClick=function(e){var t=e.target;if("IMG"===t.nodeName&&(this.imgEle=t),this.parent&&("#document"!==t.nodeName&&(this.parent.currentTarget=e.target),!n.i(i.isNullOrUndefined)(this.dialogObj)&&(!n.i(i.closest)(t,"[id='"+this.dialogObj.element.id+"']")&&this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()&&!this.parent.getToolbarElement().contains(e.target)||this.parent.getToolbarElement()&&this.parent.getToolbarElement().contains(e.target)&&!n.i(i.closest)(t,"#"+this.parent.getID()+"_toolbar_Image")&&!t.querySelector("#"+this.parent.getID()+"_toolbar_Image"))&&(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight||(this.dialogObj.hide({returnValue:!0}),this.parent.isBlur=!0,n.i(c.l)(this.parent.element,"focusout"))),this.parent.iframeSettings.enable&&!n.i(i.isNullOrUndefined)(this.parent.currentTarget)&&"IMG"===this.parent.currentTarget.nodeName||"IMG"===e.target.tagName||!this.imgResizeDiv||this.quickToolObj&&this.quickToolObj.imageQTBar&&this.quickToolObj.imageQTBar.element.contains(e.target)||!this.contentModule.getEditPanel().contains(this.imgResizeDiv)||this.cancelResizeAction(),!this.contentModule.getEditPanel().querySelector(".e-img-resize")||this.parent.iframeSettings.enable&&"IMG"===this.parent.currentTarget.nodeName||("IMG"!==t.tagName&&this.removeResizeEle(),"IMG"===t.tagName||n.i(i.isNullOrUndefined)(this.imgEle)?n.i(i.isNullOrUndefined)(this.prevSelectedImgEle)||this.prevSelectedImgEle===t||(this.prevSelectedImgEle.style.outline=""):this.imgEle.style.outline=""),"IMG"!==t.tagName))for(var r=this.contentModule.getEditPanel().querySelectorAll("img"),o=0;o<r.length;o++)n.i(i.removeClass)([r[o]],"e-img-focus"),n.i(i.removeClass)([r[o]],"e-resize"),r[o].style.maxWidth=""},e.prototype.removeResizeEle=function(){i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),n.i(i.detach)(this.contentModule.getEditPanel().querySelector(".e-img-resize"))},e.prototype.onWindowResize=function(){n.i(i.isNullOrUndefined)(this.contentModule)||n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector(".e-img-resize"))||this.cancelResizeAction()},e.prototype.imageUrlPopup=function(e){var t=this,r=this.parent.createElement("div",{className:"imgUrl"+this.parent.getCssClass(!0)}),o=this.i10n.getConstant("imageUrl");return this.inputUrl=this.parent.createElement("input",{className:"e-input e-img-url"+this.parent.getCssClass(!0),attrs:{placeholder:o,spellcheck:"false","aria-label":this.i10n.getConstant("imageLinkHeader")}}),this.inputUrl.addEventListener("input",function(){n.i(i.isNullOrUndefined)(t.inputUrl)||(0===t.inputUrl.value.length?t.dialogObj.getButtons(0).element.disabled=!0:t.dialogObj.getButtons(0).element.removeAttribute("disabled"))}),r.appendChild(this.inputUrl),r},e.prototype.insertImageUrl=function(e){var t=this.selfImage;t.isImgUploaded=!1;var r=t.inputUrl.value;if(0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData(),n.i(i.isNullOrUndefined)(t.uploadUrl)||""===t.uploadUrl.url){if(""!==r){if("HTML"===t.parent.editorMode&&n.i(i.isNullOrUndefined)(n.i(i.closest)(this.selection.range.startContainer.parentNode,"[id='"+t.contentModule.getPanel().id+"']"))){t.contentModule.getEditPanel().focus();var s=t.parent.formatter.editorManager.nodeSelection.getRange(t.contentModule.getDocument());this.selection=t.parent.formatter.editorManager.nodeSelection.save(s,t.contentModule.getDocument()),this.selectParent=t.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(s)}var a=/[\w-]+.(jpg|png|jpeg|gif)/g,l=n.i(i.isNullOrUndefined)(r.match(a))||"HTML"!==t.parent.editorMode?"":r.match(a)[0],d={cssClass:"inline"===t.parent.insertImageSettings.display?o._3:o.T,url:r,selection:this.selection,altText:l,selectParent:this.selectParent,width:{width:t.parent.insertImageSettings.width,minWidth:t.parent.insertImageSettings.minWidth,maxWidth:t.parent.getInsertImgMaxWidth()},height:{height:t.parent.insertImageSettings.height,minHeight:t.parent.insertImageSettings.minHeight,maxHeight:t.parent.insertImageSettings.maxHeight}};t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,d),t.dialogObj.hide({returnValue:!1})}}else t.uploadUrl.cssClass="inline"===t.parent.insertImageSettings.display?o._3:o.T,t.dialogObj.hide({returnValue:!1}),t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,t.uploadUrl),t.uploadUrl.url="",t.contentModule.getEditPanel().querySelector(".e-img-resize")&&(t.imgEle.style.outline="",t.removeResizeEle())},e.prototype.imgsizeInput=function(e){var t=this,r=e.selectNode[0],o=this.i10n.getConstant("imageHeight"),a=this.i10n.getConstant("imageWidth"),l=this.parent.createElement("div",{className:"e-img-sizewrap"+this.parent.getCssClass(!0)}),d=!n.i(i.isNullOrUndefined)(this.changedWidthValue)||"auto"!==r.style.width.toString()&&""===r.style.width?n.i(i.isNullOrUndefined)(this.changedWidthValue)?parseInt(r.getClientRects()[0].width.toString(),10).toString():this.changedWidthValue:r.style.width,u=!n.i(i.isNullOrUndefined)(this.changedHeightValue)||"auto"!==r.style.height.toString()&&""===r.style.height?n.i(i.isNullOrUndefined)(this.changedHeightValue)?parseInt(r.getClientRects()[0].height.toString(),10).toString():this.changedHeightValue:r.style.height;this.changedWidthValue=null,this.changedHeightValue=null;var h='<div class="e-rte-label'+this.parent.getCssClass(!0)+'"><label>'+a+'</label></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" id="imgwidth" class="e-img-width'+this.parent.getCssClass(!0)+'"/></div><div class="e-rte-label'+this.parent.getCssClass(!0)+'"><label>'+o+'</label></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"> <input type="text" id="imgheight" class="e-img-height'+this.parent.getCssClass(!0)+'"/></div>',p=n.i(c.m)(h);return p.getElementById("imgwidth").setAttribute("value",d),p.getElementById("imgheight").setAttribute("value",u),l.appendChild(p),this.widthNum=new s.TextBox({value:n.i(i.formatUnit)(d),enableRtl:this.parent.enableRtl,cssClass:this.parent.getCssClass(),input:function(e){t.inputWidthValue=n.i(i.formatUnit)(t.inputValue(e.value))}}),this.widthNum.createElement=this.parent.createElement,this.widthNum.appendTo(l.querySelector("#imgwidth")),this.heightNum=new s.TextBox({value:n.i(i.formatUnit)(u),enableRtl:this.parent.enableRtl,cssClass:this.parent.getCssClass(),input:function(e){t.inputHeightValue=n.i(i.formatUnit)(t.inputValue(e.value))}}),this.heightNum.createElement=this.parent.createElement,this.heightNum.appendTo(l.querySelector("#imgheight")),l},e.prototype.inputValue=function(e){return"auto"===e||-1!==e.indexOf("%")||-1!==e.indexOf("px")||e.match(/(\d+)/)?e:"auto"},e.prototype.insertSize=function(e){e.selection.restore();var t=e.selfImage;0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData();var n=t.dialogObj.element;this.changedWidthValue=this.inputWidthValue,this.changedHeightValue=this.inputHeightValue;var i=n.querySelector(".e-img-width").value,r=n.parentElement.querySelector(".e-img-height").value;t.parent.formatter.process(this.parent,e.args,e.args,{width:i,height:r,selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.imgResizeDiv&&t.imgResizePos(e.selectNode[0],this.imgResizeDiv),t.dialogObj.hide({returnValue:!0})},e.prototype.insertImage=function(e){if(this.imagDialog(e),!n.i(i.isNullOrUndefined)(this.dialogObj)){this.dialogObj.element.style.maxHeight="inherit";var t=this.dialogObj.element.querySelector(".e-img-content");!n.i(i.isNullOrUndefined)(this.parent.insertImageSettings.path)&&"Markdown"===this.parent.editorMode||"HTML"===this.parent.editorMode?document.getElementById(this.rteID+"_insertImage").focus():t.querySelector(".e-img-url").focus()}},e.prototype.imgUpload=function(e){var t,o,a=this,d=this,u=d.parent.iframeSettings.enable;if("HTML"===d.parent.editorMode&&(!u&&n.i(i.isNullOrUndefined)(n.i(i.closest)(e.selection.range.startContainer.parentNode,"[id='"+this.parent.contentModule.getPanel().id+"']"))||u&&!n.i(c.b)(e.selection.range.startContainer.parentNode.ownerDocument.querySelector("body"),"e-lib"))){this.contentModule.getEditPanel().focus();var h=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());t=this.parent.formatter.editorManager.nodeSelection.save(h,this.parent.contentModule.getDocument()),o=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(h)}else t=e.selection,o=e.selectParent;var p=this.parent.createElement("div",{className:"e-img-uploadwrap e-droparea"+this.parent.getCssClass(!0)}),m=this.i10n.getConstant("imageDeviceUploadMessage"),f=this.i10n.getConstant("imageUploadMessage"),g=this.parent.createElement("span",{className:"e-droptext"+this.parent.getCssClass(!0)}),b=this.parent.createElement("span",{className:"e-rte-upload-text"+this.parent.getCssClass(!0),innerHTML:i.Browser.isDevice?m:f});g.appendChild(b);var v=this.parent.createElement("button",{className:"e-browsebtn"+this.parent.getCssClass(!0),id:this.rteID+"_insertImage",attrs:{autofocus:"true",type:"button"}});g.appendChild(v),p.appendChild(g);var C=this.i10n.getConstant("browse");this.browseButton=new l.Button({content:C,enableRtl:this.parent.enableRtl}),this.browseButton.isStringTemplate=!0,this.browseButton.createElement=this.parent.createElement,this.browseButton.appendTo(v);var y=i.Browser.isDevice?g:v;i.EventHandler.add(y,"click",this.fileSelect,this);var N=this.parent.createElement("input",{id:this.rteID+"_upload",attrs:{type:"File",name:"UploadFiles"},className:this.parent.getCssClass()});p.appendChild(N);var E,S,T;return this.uploadObj=new s.Uploader({asyncSettings:{saveUrl:this.parent.insertImageSettings.saveUrl,removeUrl:this.parent.insertImageSettings.removeUrl},dropArea:g,multiple:!1,enableRtl:this.parent.enableRtl,cssClass:this.parent.getCssClass(),allowedExtensions:this.parent.insertImageSettings.allowedTypes.toString(),selected:function(e){d.isImgUploaded=!0,S=e,T=e.filesData,a.parent.trigger(r._56,S,function(e){if(!e.cancel&&(a.checkExtension(e.filesData[0]),E=e.filesData[0].name,"HTML"===a.parent.editorMode&&n.i(i.isNullOrUndefined)(a.parent.insertImageSettings.path))){var r=new FileReader;r.addEventListener("load",function(e){var s="Base64"===a.parent.insertImageSettings.saveFormat?r.result:URL.createObjectURL(n.i(c.v)(r.result));d.uploadUrl={url:s,selection:t,altText:E,selectParent:o,width:{width:d.parent.insertImageSettings.width,minWidth:d.parent.insertImageSettings.minWidth,maxWidth:d.parent.getInsertImgMaxWidth()},height:{height:d.parent.insertImageSettings.height,minHeight:d.parent.insertImageSettings.minHeight,maxHeight:d.parent.insertImageSettings.maxHeight}},d.inputUrl.setAttribute("disabled","true"),n.i(i.isNullOrUndefined)(d.parent.insertImageSettings.saveUrl)&&a.isAllowedTypes&&!n.i(i.isNullOrUndefined)(a.dialogObj)&&a.dialogObj.getButtons(0).element.removeAttribute("disabled")}),r.readAsDataURL(e.filesData[0].rawFile)}})},beforeUpload:function(e){a.parent.trigger(r._70,e)},uploading:function(e){a.parent.isServerRendered||a.parent.trigger(r._57,e)},success:function(e){a.parent.trigger(r._58,e,function(e){if(!n.i(i.isNullOrUndefined)(a.parent.insertImageSettings.path)){var r=a.parent.insertImageSettings.path+e.file.name;d.uploadUrl={url:r,selection:t,altText:E,selectParent:o,width:{width:d.parent.insertImageSettings.width,minWidth:d.parent.insertImageSettings.minWidth,maxWidth:d.parent.getInsertImgMaxWidth()},height:{height:d.parent.insertImageSettings.height,minHeight:d.parent.insertImageSettings.minHeight,maxHeight:d.parent.insertImageSettings.maxHeight}},d.inputUrl.setAttribute("disabled","true")}"upload"!==e.operation||n.i(i.isNullOrUndefined)(a.dialogObj)||a.dialogObj.getButtons(0).element.removeAttribute("disabled")})},failure:function(e){a.parent.trigger(r._59,e)},removing:function(e){a.parent.trigger(r._60,e,function(e){d.isImgUploaded=!1,a.dialogObj.getButtons(0).element.disabled=!0,d.inputUrl.removeAttribute("disabled"),d.uploadUrl&&(d.uploadUrl.url="")})}}),this.uploadObj.isStringTemplate=!0,this.uploadObj.createElement=this.parent.createElement,this.uploadObj.appendTo(N),p},e.prototype.checkExtension=function(e){this.uploadObj.allowedExtensions&&(-1===this.uploadObj.allowedExtensions.toLocaleLowerCase().indexOf(("."+e.type).toLocaleLowerCase())?(this.dialogObj.getButtons(0).element.setAttribute("disabled","disabled"),this.isAllowedTypes=!1):this.isAllowedTypes=!0)},e.prototype.fileSelect=function(){return this.dialogObj.element.getElementsByClassName("e-file-select-wrap")[0].querySelector("button").click(),!1},e.prototype.dragStart=function(e){if("IMG"!==e.target.nodeName)return!0;this.parent.trigger(r.S,e,function(t){t.cancel?e.preventDefault():(e.dataTransfer.effectAllowed="copyMove",e.target.classList.add(o._52))})},e.prototype.dragEnter=function(e){e.dataTransfer.dropEffect="copy",e.preventDefault()},e.prototype.dragOver=function(e){if(!("edge"===i.Browser.info.name&&e.dataTransfer.items[0].type.split("/")[0].indexOf("image")>-1||i.Browser.isIE&&"Files"===e.dataTransfer.types[0]))return!0;e.preventDefault()},e.prototype.dragDrop=function(e){var t=this;this.parent.trigger(r._74,e,function(e){var s=t.parent.inputElement.ownerDocument.querySelector("."+o._52),a=s&&"IMG"===s.tagName||e.dataTransfer.files.length>0;!e.cancel&&a?t.parent.trigger(r.S,e,function(s){if(s.cancel)e.preventDefault();else{if(n.i(i.closest)(e.target,"#"+t.parent.getID()+"_toolbar")||"false"===t.parent.inputElement.contentEditable)return void e.preventDefault();t.parent.element.querySelector("."+o._55)&&n.i(i.detach)(t.imgResizeDiv),e.preventDefault();var a=void 0;t.contentModule.getDocument().caretRangeFromPoint?a=t.contentModule.getDocument().caretRangeFromPoint(e.clientX,e.clientY):e.rangeParent?(a=t.contentModule.getDocument().createRange(),a.setStart(e.rangeParent,e.rangeOffset)):a=t.getDropRange(e.clientX,e.clientY),t.parent.notify(r._33,{range:a});if(t.parent.element.querySelector("."+o._56))return;t.insertDragImage(e)}}):a&&e.preventDefault()})},e.prototype.getDropRange=function(e,t){var n=this.contentModule.getDocument().createRange();this.parent.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(),n);var i=this.contentModule.getDocument().elementFromPoint(e,t),r=i.childNodes.length>0?i.childNodes[0]:i,o=0;if("<br>"===this.parent.inputElement.firstChild.innerHTML)n.setStart(r,o),n.setEnd(r,o);else{var s=void 0;do{o++,n.setStart(r,o),n.setEnd(r,o+1),s=n.getBoundingClientRect()}while(s.left<e&&o<r.length-1)}return n},e.prototype.insertDragImage=function(e){var t=this;e.preventDefault();var n=this.parent.element.querySelector(""+o._54);this.parent.notify(r._68,{args:e}),n&&n.classList.add(o.M);var i=this.parent.inputElement.ownerDocument.querySelector("."+o._52);if(e.dataTransfer.files.length>0&&null===i){if(e.dataTransfer.files.length>1)return;for(var s=e.dataTransfer.files,a=s[0].name,l=a.substring(a.lastIndexOf(".")),d=this.parent.insertImageSettings.allowedTypes,c=0;c<d.length;c++)if(l.toLocaleLowerCase()===d[c].toLowerCase())if(this.parent.insertImageSettings.saveUrl)this.onSelect(e);else{var u={args:e,text:"",file:s[0]};e.preventDefault(),this.imagePaste(u)}}else{var h=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());if(i&&"IMG"===i.tagName){i.nextElementSibling&&i.nextElementSibling.classList.contains(o._57)?h.insertNode(i.parentElement.parentElement):h.insertNode(i),i.classList.remove(o._52);var p={elements:[i]};i.addEventListener("load",function(){t.parent.trigger(r.T,p)}),this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument());var u=e;this.resizeStart(u,i),this.hideImageQuickToolbar()}}},e.prototype.onSelect=function(e){var t=this,s=this,a=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),l=this.parent.createElement("ul",{className:o._58});this.parent.element.appendChild(l);var d={name:"",size:0,status:"",statusCode:"",type:"",rawFile:e.dataTransfer.files[0],validationMessages:{}},u=this.parent.createElement("IMG");u.style.opacity="0.5",u.classList.add(o._47),u.classList.add(o._3),u.classList.add(o._48);var h=d.rawFile,p=new FileReader;p.addEventListener("load",function(){var e=URL.createObjectURL(n.i(c.v)(p.result));u.src="Blob"===s.parent.insertImageSettings.saveFormat?e:p.result}),h&&p.readAsDataURL(h),a.insertNode(u),this.uploadMethod(e,u);var m={elements:[u]};u.addEventListener("load",function(){t.parent.trigger(r.T,m)}),n.i(i.detach)(l)},e.prototype.uploadMethod=function(e,t){var l=this,d=!1,c=this,u=this.parent.createElement("div");this.parent.element.appendChild(u);var h=this.parent.createElement("input",{id:this.rteID+"_upload",attrs:{type:"File",name:"UploadFiles"}}),p=this.parent.iframeSettings.enable?-50:-90;this.popupObj=new a.Popup(u,{relateTo:t,height:"85px",width:"300px",offsetY:p,content:h,viewPortElement:this.parent.element,position:{X:"center",Y:"top"},enableRtl:this.parent.enableRtl,zIndex:10001,close:function(e){l.parent.isBlur=!1,l.popupObj.destroy(),n.i(i.detach)(l.popupObj.element),l.popupObj=null,l.parent.inlineMode.enable||l.parent.toolbarModule.baseToolbar.toolbarObj.disable(!1)}}),this.popupObj.element.style.display="none",n.i(i.addClass)([this.popupObj.element],o._54),n.i(i.addClass)([this.popupObj.element],o._53),n.i(i.isNullOrUndefined)(this.parent.cssClass)||n.i(i.addClass)([this.popupObj.element],this.parent.cssClass);var m=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),f=e.dataTransfer.files[0].size>1e6?300:100;setTimeout(function(){c.refreshPopup(t)},f),this.uploadObj=new s.Uploader({asyncSettings:{saveUrl:this.parent.insertImageSettings.saveUrl,removeUrl:this.parent.insertImageSettings.removeUrl},cssClass:o._59+this.parent.getCssClass(!0),dropArea:this.parent.element,allowedExtensions:this.parent.insertImageSettings.allowedTypes.toString(),removing:function(){l.parent.inputElement.contentEditable="true",d=!1,n.i(i.detach)(t),l.popupObj.close()},canceling:function(){l.parent.inputElement.contentEditable="true",d=!1,n.i(i.detach)(t),l.popupObj.close(),l.quickToolObj.imageQTBar.hidePopup(),setTimeout(function(){l.uploadObj.destroy()},900)},beforeUpload:function(e){l.parent.trigger(r._70,e),l.parent.inlineMode.enable||l.parent.toolbarModule.baseToolbar.toolbarObj.disable(!0)},uploading:function(e){l.parent.isServerRendered||(d=!0,l.parent.trigger(r._57,e,function(e){e.cancel?(n.i(i.isNullOrUndefined)(t)||n.i(i.detach)(t),n.i(i.isNullOrUndefined)(l.popupObj.element)||n.i(i.detach)(l.popupObj.element)):l.parent.inputElement.contentEditable="false"}))},selected:function(e){d&&(e.cancel=!0)},failure:function(n){d=!1,l.parent.inputElement.contentEditable="true";var i={args:e,type:"Images",isNotify:void 0,elements:t};setTimeout(function(){l.uploadFailure(t,i,n)},900)},success:function(n){if("cancel"!==n.operation){d=!1,l.parent.inputElement.contentEditable="true";var i={args:e,type:"Images",isNotify:void 0,elements:t};setTimeout(function(){l.uploadSuccess(t,e,i,n)},900)}}}),this.uploadObj.appendTo(this.popupObj.element.childNodes[0]),this.popupObj.element.querySelector(".e-rte-dialog-upload .e-file-select-wrap").style.display="none",m.selectNodeContents(t),this.parent.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(),m)},e.prototype.refreshPopup=function(e){(this.parent.iframeSettings.enable?this.parent.element.offsetTop+e.offsetTop:e.offsetTop)>this.parent.element.offsetTop+this.parent.element.offsetHeight?(this.popupObj.relateTo=this.parent.inputElement,this.popupObj.offsetY=this.parent.iframeSettings.enable?-30:-65,this.popupObj.element.style.display="block"):this.popupObj&&(this.popupObj.refreshPosition(e),this.popupObj.element.style.display="block")},e.prototype.uploadFailure=function(e,t,o){n.i(i.detach)(e),this.popupObj&&this.popupObj.close(),this.parent.trigger(r._59,o),this.uploadObj.destroy()},e.prototype.uploadSuccess=function(e,t,s,a){var l=this;e.style.opacity="1",e.classList.add(o._49),a.element=e,this.parent.trigger(r._58,a,function(t){if(!n.i(i.isNullOrUndefined)(l.parent.insertImageSettings.path)){var r=l.parent.insertImageSettings.path+t.file.name;e.src=r,e.setAttribute("alt",t.file.name)}}),this.popupObj&&(this.popupObj.close(),this.uploadObj.destroy()),this.showImageQuickToolbar(s),this.resizeStart(t,e)},e.prototype.imagePaste=function(e){var t=this;if(0===e.text.length&&!n.i(i.isNullOrUndefined)(e.file)){var r=this,s=new FileReader;e.args.preventDefault(),s.addEventListener("load",function(a){var l={cssClass:"inline"===r.parent.insertImageSettings.display?o._3:o.T,url:"Base64"!==t.parent.insertImageSettings.saveFormat&&n.i(i.isNullOrUndefined)(e.callBack)?URL.createObjectURL(n.i(c.v)(s.result)):s.result,width:{width:r.parent.insertImageSettings.width,minWidth:r.parent.insertImageSettings.minWidth,maxWidth:r.parent.getInsertImgMaxWidth()},height:{height:r.parent.insertImageSettings.height,minHeight:r.parent.insertImageSettings.minHeight,maxHeight:r.parent.insertImageSettings.maxHeight}};if(!n.i(i.isNullOrUndefined)(e.callBack))return void e.callBack(l);r.parent.formatter.process(r.parent,{item:{command:"Images",subCommand:"Image"}},e.args,l),t.showPopupToolBar(e,l)}),s.readAsDataURL(e.file)}},e.prototype.showPopupToolBar=function(e,t){var n=this,i='img[src="'+t.url+'"]',r=this.parent.inputElement.querySelector(i);this.parent.quickToolbarModule.createQTBar("Image","MultiRow",this.parent.quickToolbarSettings.image,d.a.ImageToolbar);var o={args:e.args,type:"Images",isNotify:void 0,elements:r};r&&setTimeout(function(){n.showImageQuickToolbar(o),n.resizeStart(e.args,r)},0)},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||(this.prevSelectedImgEle=void 0,this.removeEventListener())},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.getModuleName=function(){return"image"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(18),a=(n.n(s),n(5)),l=n(4),d=n(6),c=function(){function e(e,t){this.parent=e,this.rteID=e.element.id,this.i10n=t.getService("rteLocale"),this.addEventListener(),this.serviceLocator=t,this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject")}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.O,this.linkDialog,this),this.parent.on(r._79,this.showDialog,this),this.parent.on(r._80,this.closeDialog,this),this.parent.on(r.v,this.onKeyDown,this),this.parent.on(r._0,this.showLinkQuickToolbar,this),this.parent.on(r._48,this.clearDialogObj,this),this.parent.on(r.H,this.onToolbarAction,this),this.parent.on(r.h,this.onIframeMouseDown,this),this.parent.on(r.P,this.removeLink,this),this.parent.on(r.Q,this.editLink,this),this.parent.on(r.R,this.openLink,this),this.parent.on(r._26,this.editAreaClickHandler,this),this.parent.on(r._89,this.setCssClass,this),this.parent.on(r.i,this.destroy,this),this.parent.on(r._44,this.moduleDestroy,this))},e.prototype.onToolbarAction=function(e){switch(e.args.item.subCommand){case"OpenLink":this.parent.notify(r.R,e);break;case"EditLink":this.parent.notify(r.Q,e);break;case"RemoveLink":this.parent.notify(r.P,e)}},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.O,this.linkDialog),this.parent.off(r._79,this.showDialog),this.parent.off(r._80,this.closeDialog),this.parent.off(r.v,this.onKeyDown),this.parent.off(r._0,this.showLinkQuickToolbar),this.parent.off(r._48,this.clearDialogObj),this.parent.off(r.H,this.onToolbarAction),this.parent.off(r.P,this.removeLink),this.parent.off(r.h,this.onIframeMouseDown),this.parent.off(r.Q,this.editLink),this.parent.off(r.R,this.openLink),this.parent.off(r._26,this.editAreaClickHandler),this.parent.off(r._89,this.setCssClass),this.parent.off(r.i,this.destroy),this.parent.off(r._44,this.moduleDestroy))},e.prototype.onIframeMouseDown=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(i.isNullOrUndefined)(t.oldCssClass)?e.setProperties({cssClass:(e.cssClass+" "+t.cssClass).trim()}):e.setProperties({cssClass:(e.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){this.updateCss(this.checkBoxObj,e),this.updateCss(this.dialogObj,e)},e.prototype.showLinkQuickToolbar=function(e){if(!n.i(i.isNullOrUndefined)(e.args)&&"enter"!==e.args.action&&"space"!==e.args.action){var t=void 0,r=void 0;if("Links"!==e.type||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule.linkQTBar))return;this.quickToolObj=this.parent.quickToolbarModule;var o,s=this.parent.element.getBoundingClientRect().top,a=this.parent.element.getBoundingClientRect().left,l=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());if([].forEach.call(e.elements,function(e,t){0===t&&(o="#text"===e.nodeName?e.parentNode:e)}),e.isNotify){var d=this.parent.toolbarModule.getToolbarElement(),c=o.getBoundingClientRect().top,u=o.getBoundingClientRect().left,h=c-s,p=d?d.offsetHeight+this.parent.toolbarModule.getExpandTBarPopHeight():0;t=this.parent.iframeSettings.enable?a+u:o.getBoundingClientRect().left,r=window.pageYOffset+(this.parent.iframeSettings.enable?s+p+c:s+h)}else{var m=void 0;m=e.args.touches?e.args.changedTouches[0]:m=e.args,t=this.parent.iframeSettings.enable?window.pageXOffset+a+m.clientX:m.pageX,r=this.parent.iframeSettings.enable?window.pageYOffset+s+m.clientY:m.pageY}this.quickToolObj.linkQTBar&&this.quickToolObj.linkQTBar.showPopup(t,r,l.endContainer,"link")}},e.prototype.hideLinkQuickToolbar=function(){this.quickToolObj&&this.quickToolObj.linkQTBar&&document.body.contains(this.quickToolObj.linkQTBar.element)&&this.quickToolObj.linkQTBar.hidePopup()},e.prototype.editAreaClickHandler=function(e){if(this.parent.readonly)return void this.hideLinkQuickToolbar();var t=e.args,o=this.parent.quickToolbarSettings.showOnRightClick;if(!(2===t.which||o&&1===t.which||!o&&3===t.which)&&"HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.linkQTBar){this.quickToolObj=this.parent.quickToolbarModule;var s=t.target;s=this.getAnchorNode(s),this.contentModule=this.rendererFactory.getRenderer(a.a.Content);var l=this.quickToolObj.linkQTBar.element.classList.contains("e-rte-pop");if("A"===s.nodeName&&s.childNodes.length>0&&"IMG"!==s.childNodes[0].nodeName&&"IMG"!==e.args.target.nodeName&&!n.i(i.isNullOrUndefined)(n.i(i.closest)(this.parent.getRange().startContainer.parentElement,"A"))&&!n.i(i.isNullOrUndefined)(n.i(i.closest)(this.parent.getRange().endContainer.parentElement,"A"))){if(l)return;if(!1===e.args.ctrlKey)this.showLinkQuickToolbar({args:t,isNotify:!1,type:"Links",elements:[t.target]});else{var d=this.parent.formatter.editorManager.nodeSelection,c=d.getRange(this.parent.contentModule.getDocument()),u={args:{item:{subCommand:"OpenLink",command:"Links",name:""},originalEvent:e.args},selectNode:d.getNodeCollection(c),selectParent:d.getParentNodeCollection(c),selection:d.save(c,this.parent.contentModule.getDocument())};this.parent.notify(r.R,u)}}else this.hideLinkQuickToolbar()}},e.prototype.onKeyDown=function(e){var t=e.args;switch(t.action){case"escape":n.i(i.isNullOrUndefined)(this.dialogObj)||this.dialogObj.close();break;case"insert-link":this.openDialog(!0,e),t.preventDefault()}},e.prototype.openDialog=function(e,t){if(e||this.parent.contentModule.getEditPanel().focus(),"HTML"===this.parent.editorMode){var n=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),i=this.parent.formatter.editorManager.nodeSelection.save(n,this.parent.contentModule.getDocument()),r=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(n),o=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(n),s={args:t?t.args:{item:{command:"Links",subCommand:"CreateLink"},originalEvent:void 0,name:e?null:"showDialog"},selectNode:r,selection:i,selectParent:o};this.linkDialog(s)}else{var a=this.parent.contentModule.getEditPanel();this.parent.formatter.editorManager.markdownSelection.save(a.selectionStart,a.selectionEnd),this.linkDialog({args:{item:{command:"Links",subCommand:"Link"},originalEvent:t&&t.args},member:"link",text:this.parent.formatter.editorManager.markdownSelection.getSelectedText(this.parent.contentModule.getEditPanel()),module:"Markdown",name:"insertLink"})}},e.prototype.showDialog=function(){this.openDialog(!1),this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.closeDialog=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.clearDialogObj=function(){this.dialogObj&&(this.dialogObj.destroy(),n.i(i.detach)(this.dialogObj.element),this.dialogObj=null)},e.prototype.linkDialog=function(e,t){var r=this;if(this.dialogObj)return void this.dialogObj.hide({returnValue:!0});if("HTML"===this.parent.editorMode&&e.selectParent.length>0&&!n.i(i.isNullOrUndefined)(e.selectParent[0].classList)&&e.selectParent[0].classList.contains("e-rte-anchor")&&n.i(i.isNullOrUndefined)(t))return void this.editLink(e);var a=this.i10n.getConstant("linkWebUrl"),d=this.i10n.getConstant("linkText"),c=this.i10n.getConstant("linkTooltipLabel"),u=this.i10n.getConstant("linkurl"),h=this.i10n.getConstant("textPlaceholder"),p=this.i10n.getConstant("linkTitle"),m=this.parent.createElement("div",{className:"e-rte-link-dialog"+this.parent.getCssClass(!0),id:this.rteID+"_rtelink"});this.parent.element.appendChild(m);var f=this.parent.createElement("div",{className:"e-rte-linkcontent"+this.parent.getCssClass(!0),id:this.rteID+"_linkContent"}),g="HTML"===this.parent.editorMode?"<label>"+c+'</label></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" spellcheck="false" placeholder = "'+p+'"aria-label="'+this.i10n.getConstant("linkTitle")+'" class="e-input e-rte-linkTitle'+this.parent.getCssClass(!0)+'"></div><div class="e-rte-label'+this.parent.getCssClass(!0)+'"></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="checkbox" class="e-rte-linkTarget'+this.parent.getCssClass(!0)+'" data-role ="none"></div>':"",b='<div class="e-rte-label'+this.parent.getCssClass(!0)+'"><label>'+a+'</label></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" spellcheck="false" placeholder="'+u+'"aria-label="'+this.i10n.getConstant("linkWebUrl")+'" class="e-input e-rte-linkurl'+this.parent.getCssClass(!0)+'"/></div><div class="e-rte-label'+this.parent.getCssClass(!0)+'"><label>'+d+'</label></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"> <input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText'+this.parent.getCssClass(!0)+'"aria-label="'+this.i10n.getConstant("linkText")+'" placeholder="'+h+'"></div><div class="e-rte-label'+this.parent.getCssClass(!0)+'">'+g,v=n.i(l.m)(b);f.appendChild(v);var C=f.querySelector(".e-rte-linkTarget"),y=f.querySelector(".e-rte-linkurl"),N=f.querySelector(".e-rte-linkText"),E=f.querySelector(".e-rte-linkTitle"),S=this.i10n.getConstant("linkOpenInNewWindow");this.checkBoxObj=new s.CheckBox({label:S,checked:!0,enableRtl:this.parent.enableRtl,cssClass:this.parent.getCssClass()}),this.checkBoxObj.isStringTemplate=!0,this.checkBoxObj.createElement=this.parent.createElement,this.checkBoxObj.appendTo(C);var T="HTML"===this.parent.editorMode?e.selection.getRange(this.parent.contentModule.getDocument()).toString():e.text,O=this.i10n.getConstant("dialogInsert"),k=this.i10n.getConstant("dialogCancel"),w=e.selection,L={selfLink:this,selection:e.selection,selectParent:e.selectParent,args:e.args},_={header:this.i10n.getConstant("linkHeader"),content:f,cssClass:o._12+this.parent.getCssClass(!0),enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:i.Browser.isDevice?"290px":"310px",isModal:i.Browser.isDevice,buttons:[{click:this.insertlink.bind(L),buttonModel:{content:O,cssClass:"e-flat e-insertLink"+this.parent.getCssClass(!0),isPrimary:!0}},{click:this.cancelDialog.bind(L),buttonModel:{cssClass:"e-flat"+this.parent.getCssClass(!0),content:k}}],target:i.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){r.parent.isBlur=!1,e&&e.event.returnValue&&("HTML"===r.parent.editorMode?w.restore():r.parent.formatter.editorManager.markdownSelection.restore(r.parent.contentModule.getEditPanel())),r.dialogObj.destroy(),n.i(i.detach)(r.dialogObj.element);var t=r.dialogObj;r.dialogRenderObj.close(t),r.dialogObj=null}};this.dialogObj=this.dialogRenderObj.render(_),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(m),m.style.maxHeight="inherit",n.i(i.isNullOrUndefined)(this.dialogObj)||(n.i(i.isNullOrUndefined)(t)||(y.value=t.url,N.value=t.text,E.value=t.title,t.target?this.checkBoxObj.checked=!0:this.checkBoxObj.checked=!1,this.dialogObj.header=t.header,this.dialogObj.element.querySelector(".e-insertLink").textContent=t.btnText),this.checkUrl(!1),("HTML"===this.parent.editorMode&&n.i(i.isNullOrUndefined)(t)&&(!n.i(i.isNullOrUndefined)(T)&&""!==T&&0===e.selection.range.startOffset||e.selection.range.startOffset!==e.selection.range.endOffset)||"Markdown"===e.module)&&(N.value=T),i.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this),this.quickToolObj&&(this.hideLinkQuickToolbar(),this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup(),this.quickToolObj.textQTBar&&this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)&&this.quickToolObj.textQTBar.hidePopup()))},e.prototype.insertlink=function(e){var t,r=this.selfLink.dialogObj.element,o=r.querySelector(".e-rte-linkurl").value,s=r.querySelector(".e-rte-linkText").value;"HTML"===this.selfLink.parent.editorMode&&(t=r.querySelector(".e-rte-linkTitle").value);var a=this.selfLink.checkBoxObj.checked?"_blank":null,l=this.selfLink.checkBoxObj.checked?this.selfLink.i10n.getConstant("linkAriaLabel"):null;if(""===o)return void this.selfLink.checkUrl(!0);this.selfLink.isUrl(o)?this.selfLink.checkUrl(!1):(s=""===s?o:s,o=this.selfLink.parent.enableAutoUrl?o:o.indexOf("http")>-1?o:"http://"+o);var c=this.selfLink;if("HTML"===c.parent.editorMode&&n.i(i.isNullOrUndefined)(n.i(i.closest)(this.selection.range.startContainer.parentNode,"[id='"+c.parent.contentModule.getPanel().id+"']"))){c.parent.contentModule.getEditPanel().focus(),i.Browser.isIE&&c.parent.iframeSettings.enable&&this.selection.restore();var u=c.parent.formatter.editorManager.nodeSelection.getRange(c.parent.contentModule.getDocument());this.selection=c.parent.formatter.editorManager.nodeSelection.save(u,c.parent.contentModule.getDocument()),this.selectParent=c.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(u)}var h={url:o,text:s,title:t,target:a,ariaLabel:l,selection:this.selection,selectParent:this.selectParent};document.body.contains(c.dialogObj.element)&&this.selfLink.dialogObj.hide({returnValue:!1}),n.i(d.b)()&&c.parent.iframeSettings.enable&&n.i(i.select)("iframe",c.parent.element).contentWindow.focus(),"HTML"===c.parent.editorMode&&this.selection.restore(),0===c.parent.formatter.getUndoRedoStack().length&&c.parent.formatter.saveData();var p;if(n.i(i.isNullOrUndefined)(this.args)||"KeyK"!==this.args.code)p=this.args;else{var m=this.args;n.i(i.extend)(this.args,{item:{command:"Links",subCommand:"CreateLink"},originalEvent:m},!0);p={item:{command:"Links",subCommand:"CreateLink"},originalEvent:m}}this.selfLink.parent.formatter.process(this.selfLink.parent,p,!n.i(i.isNullOrUndefined)(this.args)&&this.args.originalEvent,h),this.selfLink.parent.contentModule.getEditPanel().focus()},e.prototype.isUrl=function(e){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi.test(e)},e.prototype.checkUrl=function(e){var t=this.dialogObj.element,r=t.querySelector(".e-rte-linkurl");e?(n.i(i.addClass)([r],"e-error"),r.setSelectionRange(0,r.value.length),r.focus()):n.i(i.removeClass)([r],"e-error")},e.prototype.removeLink=function(e){0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData();var t=this.getAnchorNode(e.selectParent[0]);this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,selectParent:e.selectParent,selection:e.selection,text:t.innerText,subCommand:e.args.item.subCommand}),n.i(d.b)()&&this.parent.iframeSettings.enable?n.i(i.select)("iframe",this.parent.element).contentWindow.focus():this.parent.contentModule.getEditPanel().focus(),this.hideLinkQuickToolbar()},e.prototype.openLink=function(e){var t=this.getAnchorNode(e.selectParent[0]);(t.classList.contains("e-rte-anchor")||"A"===t.tagName)&&this.parent.formatter.process(this.parent,e.args,e.args,{url:t.href,text:t.innerText,target:""===t.target?"_self":"_blank",selectNode:e.selectNode,subCommand:e.args.item.subCommand})},e.prototype.getAnchorNode=function(e){var t=n.i(i.closest)(e,"a");return t||e},e.prototype.editLink=function(e){var t=this.getAnchorNode(e.selectNode[0]),n=this.getAnchorNode(e.selectParent[0]);if(n="A"===t.nodeName?t:n,n.classList.contains("e-rte-anchor")||"A"===n.tagName){var i=this.i10n.getConstant("dialogUpdate"),r={url:n.getAttribute("href"),text:n.innerText,title:n.title,target:n.target,header:this.i10n.getConstant("editLink"),btnText:i};this.linkDialog(e,r)}},e.prototype.cancelDialog=function(e){this.selfLink.parent.isBlur=!1,this.selfLink.dialogObj.hide({returnValue:!0}),n.i(d.b)()?this.selection.restore():this.selfLink.parent.contentModule.getEditPanel().focus()},e.prototype.onDocumentClick=function(e){var t=e.target;!n.i(i.isNullOrUndefined)(this.dialogObj)&&(!n.i(i.closest)(t,"[id='"+this.dialogObj.element.id+"']")&&this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()&&!this.parent.getToolbarElement().contains(e.target)||(this.parent.getToolbarElement()&&this.parent.getToolbarElement().contains(e.target)||this.parent.inlineMode.enable&&!n.i(i.closest)(t,"#"+this.dialogObj.element.id))&&!n.i(i.closest)(t,"#"+this.parent.getID()+"_toolbar_CreateLink")&&!t.querySelector("#"+this.parent.getID()+"_toolbar_CreateLink"))&&(this.dialogObj.hide({returnValue:!0}),i.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick),this.parent.isBlur=!0,n.i(l.l)(this.parent.element,"focusout"))},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.getModuleName=function(){return"link"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(0),r=(n.n(i),n(9)),o=(n.n(r),n(18)),s=(n.n(o),n(1)),a=n(5),l=n(14),d=(n.n(l),n(2)),c=n(4),u=function(){function e(e,t){this.ensureInsideTableList=!0,this.pageX=null,this.pageY=null,this.moveEle=null,this.currentColumnResize="",this.currentMarginLeft=0,this.parent=e,this.rteID=e.element.id,this.l10n=t.getService("rteLocale"),this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(s._39,this.renderDlgContent,this),this.parent.on(s.g,this.afterRender,this),this.parent.on(s._75,this.afterRender,this),this.parent.on(s._87,this.showDialog,this),this.parent.on(s._88,this.closeDialog,this),this.parent.on(s._40,this.docClick,this),this.parent.on(s.h,this.onIframeMouseDown,this),this.parent.on(s._26,this.editAreaClickHandler,this),this.parent.on(s._48,this.clearDialogObj,this),this.parent.on(s._41,this.onToolbarAction,this),this.parent.on(s.B,this.dropdownSelect,this),this.parent.on(s.v,this.keyDown,this),this.parent.on(s.u,this.keyUp,this),this.parent.on(s.w,this.selectionTable,this),this.parent.on(s.t,this.tableModulekeyUp,this),this.parent.on(s._89,this.setCssClass,this),this.parent.on(s.i,this.destroy,this),this.parent.on(s._44,this.moduleDestroy,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(s._39,this.renderDlgContent),this.parent.off(s.g,this.afterRender),this.parent.off(s._75,this.afterRender),this.parent.off(s._40,this.docClick),this.parent.off(s.h,this.onIframeMouseDown),this.parent.off(s._87,this.showDialog),this.parent.off(s._88,this.closeDialog),this.parent.off(s._26,this.editAreaClickHandler),this.parent.off(s._48,this.clearDialogObj),this.parent.off(s._41,this.onToolbarAction),this.parent.off(s.B,this.dropdownSelect),this.parent.off(s._24,this.cellSelect),this.parent.off(s._30,this.setBGColor),this.parent.off(s.v,this.keyDown),this.parent.off(s.u,this.keyUp),this.parent.off(s.w,this.selectionTable),this.parent.off(s.t,this.tableModulekeyUp),this.parent.off(s._89,this.setCssClass),this.parent.off(s.i,this.destroy),this.parent.off(s._44,this.moduleDestroy),!i.Browser.isDevice&&this.parent.tableSettings.resize&&i.EventHandler.remove(this.contentModule.getEditPanel(),"mouseover",this.resizeHelper))},e.prototype.updateCss=function(e,t){e&&t.cssClass&&(n.i(i.isNullOrUndefined)(t.oldCssClass)?e.setProperties({cssClass:(e.cssClass+" "+t.cssClass).trim()}):e.setProperties({cssClass:(e.cssClass.replace(t.oldCssClass,"").trim()+" "+t.cssClass).trim()}))},e.prototype.setCssClass=function(e){this.popupObj&&e.cssClass&&(n.i(i.isNullOrUndefined)(e.oldCssClass)?n.i(i.addClass)([this.popupObj.element],e.cssClass):(n.i(i.removeClass)([this.popupObj.element],e.oldCssClass),n.i(i.addClass)([this.popupObj.element],e.cssClass))),this.updateCss(this.createTableButton,e),this.updateCss(this.editdlgObj,e);for(var t=[this.columnTextBox,this.rowTextBox,this.tableWidthNum,this.tableCellPadding,this.tableCellSpacing],r=0;r<t.length;r++)this.updateCss(t[r],e)},e.prototype.selectionTable=function(e){var t=e.args.target;"mozilla"!==i.Browser.info.name||n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"table"))||"TABLE"!==n.i(i.closest)(t,"table").tagName||this.parent.contentModule.getEditPanel().setAttribute("contenteditable","true")},e.prototype.afterRender=function(){n.i(i.isNullOrUndefined)(this.contentModule)&&(this.contentModule=this.rendererFactory.getRenderer(a.a.Content),this.parent.on(s._30,this.setBGColor,this),this.parent.on(s._24,this.cellSelect,this),this.parent.tableSettings.resize&&i.EventHandler.add(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.resizeStart,this),!i.Browser.isDevice&&this.parent.tableSettings.resize&&i.EventHandler.add(this.contentModule.getEditPanel(),"mouseover",this.resizeHelper,this))},e.prototype.dropdownSelect=function(e){var t=e.item;if(document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))&&"Table"===t.command){var n=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),i={args:e,selection:this.parent.formatter.editorManager.nodeSelection.save(n,this.contentModule.getDocument()),selectParent:this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(n)};switch(t.subCommand){case"InsertRowBefore":case"InsertRowAfter":this.addRow(i.selection,e);break;case"InsertColumnLeft":case"InsertColumnRight":this.addColumn(i.selection,e);break;case"DeleteColumn":case"DeleteRow":this.removeRowColumn(i.selection,e);break;case"AlignTop":case"AlignMiddle":case"AlignBottom":this.verticalAlign(i,e);break;case"Dashed":case"Alternate":case"Custom":this.tableStyles(i,t.subCommand);break;case"Merge":case"VerticalSplit":case"HorizontalSplit":this.UpdateCells(i.selection,e)}}},e.prototype.UpdateCells=function(e,t){this.parent.formatter.process(this.parent,t,t,{selection:e,subCommand:t.item.subCommand}),this.hideTableQuickToolbar()},e.prototype.keyUp=function(e){var t=e.args.target;"escape"===e.args.key.toLocaleLowerCase()&&t&&t.classList&&this.popupObj&&!n.i(i.closest)(t,"[id='"+this.popupObj.element.id+"']")&&this.popupObj&&this.popupObj.hide()},e.prototype.keyDown=function(e){var t=e.args,r=this;switch(t.action){case"escape":break;case"insert-table":this.openDialog(!0,e),t.preventDefault()}if(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&this.contentModule&&"KeyK"!==t.code){var o=void 0,s=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),a=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(s)[0];if(a=a&&"TD"!==a.tagName&&"TH"!==a.tagName?a.parentElement:a,(8===t.keyCode||46===t.keyCode||t.ctrlKey&&88===t.keyCode)&&(a&&"TBODY"===a.tagName?(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&this.contentModule&&(o=this.parent.formatter.editorManager.nodeSelection.save(s,this.contentModule.getDocument())),t.preventDefault(),r.removeTable(o,t,!0)):a&&a.querySelectorAll("table").length>0&&(this.removeResizeElement(),this.hideTableQuickToolbar())),a&&"TD"!==a.tagName&&"TH"!==a.tagName){var l=n.i(i.closest)(a,"td");a=!n.i(i.isNullOrUndefined)(l)&&this.parent.inputElement.contains(l)?l:a}if(a&&("TD"===a.tagName||"TH"===a.tagName))switch(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&this.contentModule&&(o=this.parent.formatter.editorManager.nodeSelection.save(s,this.contentModule.getDocument())),t.keyCode){case 9:case 37:case 39:r.tabSelection(t,o,a);break;case 40:case 38:r.tableArrowNavigation(t,o,a)}}},e.prototype.tableModulekeyUp=function(e){if(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&this.contentModule){var t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),r=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t)[0];if((r=r&&"TD"!==r.tagName&&"TH"!==r.tagName?r.parentElement:r)&&"TD"!==r.tagName&&"TH"!==r.tagName){var o=n.i(i.closest)(r,"td");r=!n.i(i.isNullOrUndefined)(o)&&this.parent.inputElement.contains(o)?o:r}this.previousTableElement===r||n.i(i.isNullOrUndefined)(this.previousTableElement)||this.previousTableElement.classList.remove(d._32)}},e.prototype.openDialog=function(e,t){if(e||this.parent.contentModule.getEditPanel().focus(),"HTML"===this.parent.editorMode){var n=this.parent.contentModule.getDocument(),i=this.parent.formatter.editorManager.nodeSelection.getRange(n),r=this.parent.formatter.editorManager.nodeSelection.save(i,n),o={originalEvent:t?t.args:{action:"insert-table"},item:{command:"Table",subCommand:"CreateTable"},name:e?null:"showDialog"};this.insertTableDialog({self:this,args:o,selection:r}),this.parent.formatter.editorManager.nodeSelection.restore()}},e.prototype.showDialog=function(){this.openDialog(!1),this.setCssClass({cssClass:this.parent.getCssClass()})},e.prototype.closeDialog=function(){this.editdlgObj&&this.editdlgObj.hide({returnValue:!0})},e.prototype.onToolbarAction=function(e){switch(e.args.item.subCommand){case"TableHeader":this.tableHeader(e.selection,e.args);break;case"TableRemove":this.removeTable(e.selection,e.args);break;case"TableEditProperties":this.editTable(e)}},e.prototype.verticalAlign=function(e,t){var r=n.i(i.closest)(e.selectParent[0],"td")||n.i(i.closest)(e.selectParent[0],"th");r&&this.parent.formatter.process(this.parent,t,t,{tableCell:r,subCommand:t.item.subCommand})},e.prototype.tableStyles=function(e,t){var r=n.i(i.closest)(e.selectParent[0],"table");if("Dashed"===t&&(this.parent.element.classList.contains(d._33)?this.parent.element.classList.remove(d._33):this.parent.element.classList.add(d._33),r.classList.contains(d._33)?r.classList.remove(d._33):r.classList.add(d._33)),"Alternate"===t&&(this.parent.element.classList.contains(d._34)?this.parent.element.classList.remove(d._34):this.parent.element.classList.add(d._34),r.classList.contains(d._34)?r.classList.remove(d._34):r.classList.add(d._34)),e.args&&e.args.item.cssClass)for(var o=e.args.item.cssClass.split(" "),s=0;s<o.length;s++)r.classList.contains(o[s])?r.classList.remove(o[s]):r.classList.add(o[s]);this.parent.formatter.saveData(),this.parent.formatter.editorManager.nodeSelection.restore()},e.prototype.insideList=function(e){for(var t=this.parent.formatter.editorManager.domNode.blockNodes(),n=[],i=0;i<t.length;i++)"LI"===t[i].parentNode.tagName?n.push(t[i].parentNode):"LI"===t[i].tagName&&"P"!==t[i].childNodes[0].tagName&&"OL"!==t[i].childNodes[0].tagName&&"UL"!==t[i].childNodes[0].tagName&&n.push(t[i]);return n.length>1||n.length&&0===e.startOffset&&0===e.endOffset?(this.ensureInsideTableList=!0,!0):(this.ensureInsideTableList=!1,!1)},e.prototype.tabSelection=function(e,t,r){this.previousTableElement=r;var o=this.insideList(t.range);if((37!==e.keyCode&&39!==e.keyCode||3!==t.range.startContainer.nodeType)&&!o)if(e.preventDefault(),r.classList.remove(d._32),e.shiftKey||37===e.keyCode){var s=n.i(i.isNullOrUndefined)(r.previousSibling)?n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"tr").previousSibling)?n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"table").previousSibling)?r:"td"===n.i(i.closest)(r,"table").previousSibling.nodeName.toLowerCase()?n.i(i.closest)(r,"table").previousSibling:r:n.i(i.closest)(r,"tr").previousSibling.childNodes[n.i(i.closest)(r,"tr").previousSibling.childNodes.length-1]:r.previousSibling;if(r===s&&0===r.cellIndex&&n.i(i.closest)(r,"table").tHead){var a=n.i(i.closest)(r,"table");s=a.rows[0].cells[a.rows[0].cells.length-1]}37===e.keyCode&&r===s&&(s=n.i(i.closest)(r,"table").previousSibling),s&&(""!==s.textContent.trim()&&n.i(i.closest)(s,"td")?t.setSelectionNode(this.contentModule.getDocument(),s):t.setSelectionText(this.contentModule.getDocument(),s,s,0,0))}else{var l=n.i(i.isNullOrUndefined)(r.nextSibling)?n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"tr").nextSibling)?n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"table").nextSibling)?r:"td"===n.i(i.closest)(r,"table").nextSibling.nodeName.toLowerCase()?n.i(i.closest)(r,"table").nextSibling:r:n.i(i.closest)(r,"tr").nextSibling.childNodes[0]:r.nextSibling;r===l&&"TH"===r.nodeName&&(l=n.i(i.closest)(r,"table").rows[1].cells[0]),39===e.keyCode&&r===l&&(l=n.i(i.closest)(r,"table").nextSibling),l&&(""!==l.textContent.trim()&&n.i(i.closest)(l,"td")?t.setSelectionNode(this.contentModule.getDocument(),l):t.setSelectionText(this.contentModule.getDocument(),l,l,0,0)),r===l&&39!==e.keyCode&&l&&(r.classList.add(d._32),this.addRow(t,e,!0),r.classList.remove(d._32),l=l.parentElement.nextSibling?l.parentElement.nextSibling.firstChild:l.parentElement.firstChild,""!==l.textContent.trim()&&n.i(i.closest)(l,"td")?t.setSelectionNode(this.contentModule.getDocument(),l):t.setSelectionText(this.contentModule.getDocument(),l,l,0,0))}},e.prototype.tableArrowNavigation=function(e,t,r){var o=t.range.startContainer;40===e.keyCode&&3===o.nodeType&&(o.nextSibling&&"BR"===o.nextSibling.nodeName||o.parentNode&&"TD"!==o.parentNode.nodeName)||38===e.keyCode&&3===o.nodeType&&(o.previousSibling&&"BR"===o.previousSibling.nodeName||o.parentNode&&"TD"!==o.parentNode.nodeName)||(e.preventDefault(),r.classList.remove(d._32),(r=40===e.keyCode?n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"tr").nextElementSibling)?n.i(i.closest)(r,"table").tHead&&"TH"===r.nodeName?n.i(i.closest)(r,"table").rows[1].cells[r.cellIndex]:n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"table").nextSibling)?r:n.i(i.closest)(r,"table").nextSibling:n.i(i.closest)(r,"tr").nextElementSibling.children[r.cellIndex]:n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"tr").previousElementSibling)?n.i(i.closest)(r,"table").tHead&&"TH"!==r.nodeName?n.i(i.closest)(r,"table").tHead.rows[0].cells[r.cellIndex]:n.i(i.isNullOrUndefined)(n.i(i.closest)(r,"table").previousSibling)?r:n.i(i.closest)(r,"table").previousSibling:n.i(i.closest)(r,"tr").previousElementSibling.children[r.cellIndex])&&t.setSelectionText(this.contentModule.getDocument(),r,r,0,0))},e.prototype.setBGColor=function(e){for(var t=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument()),n=(this.parent.formatter.editorManager.nodeSelection.save(t,this.contentModule.getDocument()),this.curTable.querySelectorAll(".e-cell-select")),i=0;i<n.length;i++)n[i].style.backgroundColor=e.item.value;this.parent.formatter.saveData()},e.prototype.hideTableQuickToolbar=function(){this.quickToolObj&&this.quickToolObj.tableQTBar&&document.body.contains(this.quickToolObj.tableQTBar.element)&&this.quickToolObj.tableQTBar.hidePopup()},e.prototype.tableHeader=function(e,t){this.parent.formatter.process(this.parent,t,t.originalEvent,{selection:e,subCommand:t.item.subCommand})},e.prototype.getAnchorNode=function(e){var t=n.i(i.closest)(e,"a");return t||e},e.prototype.editAreaClickHandler=function(e){if(!this.parent.readonly&&n.i(i.isNullOrUndefined)(n.i(i.closest)(e.args.target,".e-img-caption"))){var t=e.args,r=this.parent.quickToolbarSettings.showOnRightClick;if(!(2===t.which||r&&1===t.which||!r&&3===t.which)&&"HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.tableQTBar){this.quickToolObj=this.parent.quickToolbarModule;var o=t.target;this.contentModule=this.rendererFactory.getRenderer(a.a.Content);if(this.quickToolObj.tableQTBar.element.classList.contains("e-rte-pop"))return;var s=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument()),l=n.i(i.closest)(o,"table"),c=this.parent.getRange().startContainer.parentElement,u=this.parent.getRange().endContainer.parentElement,h=this.getAnchorNode(o);if(o&&"A"!==o.nodeName&&"A"!==h.nodeName&&"IMG"!==o.nodeName&&"VIDEO"!==o.nodeName&&!o.classList.contains(d.V)&&"AUDIO"!==o.nodeName&&c===u&&("TD"===o.nodeName||"TH"===o.nodeName||"TABLE"===o.nodeName||l&&this.parent.contentModule.getEditPanel().contains(l))&&(3!==s.startContainer.nodeType||s.collapsed)){var p=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());this.parent.formatter.editorManager.nodeSelection.save(p,this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument());var m=void 0,f=void 0;i.Browser.isDevice&&e.args.touches?(m=this.parent.iframeSettings.enable?window.pageXOffset+this.parent.element.getBoundingClientRect().left+e.args.changedTouches[0].clientX:e.args.changedTouches[0].pageX,f=this.parent.iframeSettings.enable?window.pageYOffset+this.parent.element.getBoundingClientRect().top+(this.parent.inlineMode.enable?0:this.parent.toolbarModule.getToolbarHeight())+e.args.changedTouches[0].clientY:e.args.changedTouches[0].pageY):(m=this.parent.iframeSettings.enable?window.pageXOffset+this.parent.element.getBoundingClientRect().left+t.clientX:t.pageX,f=this.parent.iframeSettings.enable?window.pageYOffset+this.parent.element.getBoundingClientRect().top+this.parent.toolbarModule.getToolbarHeight()+t.clientY:t.pageY),this.quickToolObj.tableQTBar.showPopup(m,f,o),this.parent.formatter.editorManager.nodeSelection.restore()}else this.hideTableQuickToolbar()}}},e.prototype.tableCellSelect=function(e){var t=e.target,r=Array.prototype.slice.call(t.parentElement.parentElement.children).indexOf(t.parentElement),o=Array.prototype.slice.call(t.parentElement.children).indexOf(t),s=this.dlgDiv.querySelectorAll(".e-rte-tablecell");Array.prototype.forEach.call(s,function(e){var t=Array.prototype.slice.call(e.parentElement.parentElement.children).indexOf(e.parentElement),s=Array.prototype.slice.call(e.parentElement.children).indexOf(e);n.i(i.removeClass)([e],"e-active"),t<=r&&s<=o&&n.i(i.addClass)([e],"e-active")}),this.tblHeader.innerHTML=o+1+"x"+(r+1)},e.prototype.tableMouseUp=function(e){i.EventHandler.remove(this.curTable,"mousemove",this.tableMove)},e.prototype.tableCellLeave=function(e){n.i(i.removeClass)(this.dlgDiv.querySelectorAll(".e-rte-tablecell"),"e-active"),n.i(i.addClass)([this.dlgDiv.querySelector(".e-rte-tablecell")],"e-active"),this.tblHeader.innerHTML="1x1"},e.prototype.tableCellClick=function(e){var t=e.target,n=Array.prototype.slice.call(t.parentElement.parentElement.children).indexOf(t.parentElement)+1,i=Array.prototype.slice.call(t.parentElement.children).indexOf(t)+1;this.self.tableInsert(n,i,e,this)},e.prototype.tableInsert=function(e,t,r,o){var a=o.self?o.self:this,l=o.selection.range.startContainer;"P"!==l.nodeName||""!==l.textContent.trim()||l.childNodes.length>0||(l.innerHTML="<br />");var d=l.parentNode;if("HTML"===a.parent.editorMode&&(a.parent.iframeSettings.enable&&!n.i(c.b)(d.ownerDocument.querySelector("body"),"e-lib")||!a.parent.iframeSettings.enable&&n.i(i.isNullOrUndefined)(n.i(i.closest)(d,"[id='"+a.contentModule.getPanel().id+"']")))){a.contentModule.getEditPanel().focus();var u=a.parent.formatter.editorManager.nodeSelection.getRange(a.contentModule.getDocument());o.selection=a.parent.formatter.editorManager.nodeSelection.save(u,a.contentModule.getDocument())}var h={rows:e,columns:t,width:{minWidth:a.parent.tableSettings.minWidth,maxWidth:a.parent.tableSettings.maxWidth,width:a.parent.tableSettings.width},selection:o.selection};a.popupObj&&a.popupObj.hide(),a.editdlgObj&&a.editdlgObj.hide(),a.parent.formatter.process(a.parent,o.args,o.args.originalEvent,h),a.contentModule.getEditPanel().focus(),a.parent.on(s._24,a.cellSelect,a)},e.prototype.cellSelect=function(e){var t=e.args.target,r=n.i(i.closest)(t,"td,th");t="TD"!==t.nodeName&&r&&this.parent.contentModule.getEditPanel().contains(r)?r:t,n.i(i.removeClass)(this.contentModule.getEditPanel().querySelectorAll("table td, table th"),d._32),!t||"TD"!==t.tagName&&"TH"!==t.tagName||(n.i(i.addClass)([t],d._32),this.activeCell=t,this.curTable=this.curTable?this.curTable:n.i(i.closest)(t,"table"),i.EventHandler.add(this.curTable,"mousemove",this.tableMove,this),i.EventHandler.add(this.curTable,"mouseup",this.tableMouseUp,this),this.removeResizeElement(),this.helper&&this.contentModule.getEditPanel().contains(this.helper)&&n.i(i.detach)(this.helper)),"mozilla"!==i.Browser.info.name||n.i(i.isNullOrUndefined)(n.i(i.closest)(t,"table"))||"TABLE"!==n.i(i.closest)(t,"table").tagName||this.parent.contentModule.getEditPanel().setAttribute("contenteditable","false")},e.prototype.tableMove=function(e){this.parent.formatter.editorManager.observer.notify("TABLE_MOVE",{event:e,selectNode:[this.activeCell]})},e.prototype.resizeHelper=function(e){if(!this.parent.readonly){var t=e.target||e.targetTouches[0].target,r=n.i(i.closest)(t,"table.e-rte-table");n.i(i.isNullOrUndefined)(this.curTable)||n.i(i.isNullOrUndefined)(r)||r===this.curTable||!this.parent.contentModule.getEditPanel().contains(r)||(this.removeResizeElement(),this.removeHelper(e),this.cancelResizeAction()),"TABLE"!==t.nodeName&&"TD"!==t.nodeName&&"TH"!==t.nodeName||(this.curTable=r&&this.parent.contentModule.getEditPanel().contains(r)&&("TD"===t.nodeName||"TH"===t.nodeName)?r:t,this.removeResizeElement(),this.tableResizeEleCreation(this.curTable,e))}},e.prototype.tableResizeEleCreation=function(e,t){this.parent.preventDefaultResize(t);for(var r=e.rows[this.calMaxCol(e)].cells,o=[],s=0;s<e.rows.length;s++)for(var a=0;a<e.rows[s].cells.length;a++)if(!e.rows[s].cells[a].hasAttribute("rowspan")){o.push(Array.prototype.slice.call(e.rows[s].cells,0,e.rows[s].cells.length)[a]);break}for(var l=parseInt(getComputedStyle(e).height,10),c=parseInt(getComputedStyle(e).width,10),u=this.calcPos(e),s=0;r.length>=s;s++){var h=this.parent.createElement("span",{attrs:{"data-col":s.toString(),unselectable:"on",contenteditable:"false"}});h.classList.add(d._65,d._35),r.length===s?h.style.cssText="height: "+l+"px; width: 4px; top: "+u.top+"px; left:"+(u.left+this.calcPos(r[s-1]).left+r[s-1].offsetWidth)+"px;":h.style.cssText="height: "+l+"px; width: 4px; top: "+u.top+"px; left:"+(u.left+this.calcPos(r[s]).left)+"px;",this.contentModule.getEditPanel().appendChild(h)}for(var s=0;o.length>s;s++){var p=this.parent.createElement("span",{attrs:{"data-row":s.toString(),unselectable:"on",contenteditable:"false"}});p.classList.add(d._65,d._36);var m=n.i(i.isNullOrUndefined)(e.getAttribute("cellspacing"))&&""===e.getAttribute("cellspacing")?this.calcPos(o[s]).left:0;p.style.cssText="width: "+c+"px; height: 4px; top: "+(this.calcPos(o[s]).top+u.top+o[s].offsetHeight-2)+"px; left:"+(m+u.left)+"px;",this.contentModule.getEditPanel().appendChild(p)}var f=this.parent.createElement("span",{className:d._37+this.parent.getCssClass(!0),attrs:{"data-col":r.length.toString(),unselectable:"on",contenteditable:"false"}});f.style.cssText="top: "+(u.top+l-4)+"px; left:"+(u.left+c-4)+"px;",i.Browser.isDevice&&f.classList.add("e-rmob"),this.contentModule.getEditPanel().appendChild(f)},e.prototype.removeResizeElement=function(){var e=this.parent.contentModule.getEditPanel().querySelectorAll(".e-column-resize, .e-row-resize, .e-table-box, .e-table-rhelper");if(e.length>0)for(var t=0;t<e.length;t++)n.i(i.detach)(e[t])},e.prototype.calcPos=function(e){for(var t={top:0,left:0},r=e.getBoundingClientRect(),o=e.ownerDocument,s=e.offsetParent||o.documentElement,a=!1;s&&(s===o.body||s===o.documentElement)&&"static"===s.style.position;)s=s.parentNode;if("TD"===s.nodeName&&"TABLE"===e.nodeName&&(s=n.i(i.closest)(s,".e-rte-content"),a=!0),s&&s!==e&&1===s.nodeType&&(t=s.getBoundingClientRect()),a){a=!1;return{top:this.parent.inputElement&&this.parent.inputElement.scrollTop>0?this.parent.inputElement.scrollTop+r.top-t.top:r.top-t.top,left:this.parent.inputElement&&this.parent.inputElement.scrollLeft>0?this.parent.inputElement.scrollLeft+r.left-t.left:r.left-t.left}}return{top:e.offsetTop,left:e.offsetLeft}},e.prototype.getPointX=function(e){return e.touches&&e.touches.length?e.touches[0].pageX:e.pageX},e.prototype.getPointY=function(e){return e.touches&&e.touches.length?e.touches[0].pageY:e.pageY},e.prototype.resizeStart=function(e){var t=this;if(!this.parent.readonly){i.Browser.isDevice&&this.resizeHelper(e);var r=e.target;if(r.classList.contains(d._35)||r.classList.contains(d._36)||r.classList.contains(d._37)){if(e.preventDefault(),this.parent.preventDefaultResize(e),n.i(i.removeClass)(this.curTable.querySelectorAll("td,th"),d._32),this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.pageX=this.getPointX(e),this.pageY=this.getPointY(e),this.resizeBtnInit(),this.hideTableQuickToolbar(),r.classList.contains(d._35)&&(this.resizeBtnStat.column=!0,parseInt(r.getAttribute("data-col"),10)===this.curTable.rows[this.calMaxCol(this.curTable)].cells.length?(this.currentColumnResize="last",this.columnEle=this.curTable.rows[this.calMaxCol(this.curTable)].cells[parseInt(r.getAttribute("data-col"),10)-1]):(0===parseInt(r.getAttribute("data-col"),10)?this.currentColumnResize="first":this.currentColumnResize="middle",this.columnEle=this.curTable.rows[this.calMaxCol(this.curTable)].cells[parseInt(r.getAttribute("data-col"),10)]),this.colIndex=this.columnEle.cellIndex,this.moveEle=e.target,this.appendHelper()),r.classList.contains(d._36)&&(this.rowEle=this.curTable.rows[parseInt(r.getAttribute("data-row"),10)],this.resizeBtnStat.row=!0,this.appendHelper()),r.classList.contains(d._37)&&(this.resizeBtnStat.tableBox=!0),i.Browser.isDevice&&this.helper&&!this.helper.classList.contains("e-reicon"))this.helper.classList.add("e-reicon"),i.EventHandler.add(document,i.Browser.touchStartEvent,this.removeHelper,this),i.EventHandler.add(this.helper,i.Browser.touchStartEvent,this.resizeStart,this);else{var o={event:e,requestType:"Table"};this.parent.trigger(s.J,o,function(e){e.cancel&&t.cancelResizeAction()})}i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing,this),i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd,this)}}},e.prototype.removeHelper=function(e){!e.target.classList.contains("e-reicon")&&this.helper&&(i.EventHandler.remove(document,i.Browser.touchStartEvent,this.removeHelper),i.EventHandler.remove(this.helper,i.Browser.touchStartEvent,this.resizeStart),this.helper&&this.contentModule.getEditPanel().contains(this.helper)&&n.i(i.detach)(this.helper),this.pageX=null,this.helper=null)},e.prototype.appendHelper=function(){this.helper=this.parent.createElement("div",{className:"e-table-rhelper"+this.parent.getCssClass(!0)}),i.Browser.isDevice&&this.helper.classList.add("e-reicon"),this.contentModule.getEditPanel().appendChild(this.helper),this.setHelperHeight()},e.prototype.setHelperHeight=function(){var e=this.calcPos(this.curTable);this.resizeBtnStat.column?(this.helper.classList.add("e-column-helper"),this.helper.style.cssText="height: "+getComputedStyle(this.curTable).height+"; top: "+e.top+"px; left:"+(e.left+this.calcPos(this.columnEle).left+("last"===this.currentColumnResize?this.columnEle.offsetWidth+2:0)-1)+"px;"):(this.helper.classList.add("e-row-helper"),this.helper.style.cssText="width: "+getComputedStyle(this.curTable).width+"; top: "+(this.calcPos(this.rowEle).top+e.top+this.rowEle.offsetHeight)+"px; left:"+(this.calcPos(this.rowEle).left+e.left)+"px;")},e.prototype.updateHelper=function(){var e=this.calcPos(this.curTable);if(this.resizeBtnStat.column){var t=e.left+this.calcPos(this.columnEle).left+("last"===this.currentColumnResize?this.columnEle.offsetWidth+2:0)-1;this.helper.style.left=t+"px"}else{var n=this.calcPos(this.rowEle).top+e.top+this.rowEle.offsetHeight;this.helper.style.top=n+"px"}},e.prototype.calMaxCol=function(e){for(var t,n=0,i=0;i<e.rows.length;i++)n<e.rows[i].cells.length&&(t=i,n=e.rows[i].cells.length);return t},e.prototype.resizing=function(e){var t=this,r=this.getPointX(e),o=this.getPointY(e),a=this.parent.enableRtl?-(r-this.pageX):r-this.pageX,l=this.parent.enableRtl?-(o-this.pageY):o-this.pageY;this.pageX=r,this.pageY=o;var d,c,u,h=this.curTable.closest("td"),p={event:e,requestType:"table"},m=!1,f=!1;this.parent.trigger(s.K,p,function(r){if(r.cancel)t.cancelResizeAction();else{var o=t.contentModule.getEditPanel().querySelector(".e-table-box"),s=parseInt(getComputedStyle(t.curTable).width,10),p=parseInt(getComputedStyle(t.curTable).height,10),g=+getComputedStyle(t.contentModule.getEditPanel()).paddingRight.match(/\d/g).join(""),b=t.contentModule.getEditPanel().offsetWidth-(t.contentModule.getEditPanel().offsetWidth-t.contentModule.getEditPanel().clientWidth)-2*g,v=void 0;if(n.i(i.isNullOrUndefined)(t.curTable.parentElement.closest("table"))||n.i(i.isNullOrUndefined)(t.curTable.closest("td"))||!t.contentModule.getEditPanel().contains(t.curTable.closest("td")))v=b;else{var C=t.curTable.closest("td"),y=+getComputedStyle(C).paddingRight.match(/\d/g).join("");v=C.offsetWidth-(C.offsetWidth-C.clientWidth)-2*y}if(t.resizeBtnStat.column){var N=parseFloat(t.columnEle.offsetWidth.toString()),E="TH"===t.curTable.rows[0].cells[0].nodeName?1:0,S=void 0;S=""!==t.curTable.style.width&&t.curTable.style.width.includes("%")?parseFloat(t.curTable.style.width.split("%")[0]):t.getCurrentTableWidth(t.curTable.offsetWidth,t.parent.inputElement.offsetWidth);var T=parseFloat(t.curTable.rows[E].cells[t.colIndex>=t.curTable.rows[E].cells.length?t.curTable.rows[E].cells.length-1:t.colIndex].style.width.split("%")[0]);if("first"===t.currentColumnResize){if(a-=.75,t.removeResizeElement(),h&&(d=t.curTable.getBoundingClientRect().right-t.calcPos(h).left,t.curTable.style.maxWidth=d+"px"),(0!==a&&5<T||a<0)&&S<=100&&t.convertPixelToPercentage(s-a,v)<=100){var O=t.findFirstLastColCells(t.curTable,!0);t.curTable.style.width=t.convertPixelToPercentage(s-a,v)>100?"100%":t.convertPixelToPercentage(s-a,v)+"%";var k=S-t.convertPixelToPercentage(s-a,v);t.currentMarginLeft=t.currentMarginLeft+k,t.curTable.style.marginLeft="calc("+("100%"===t.curTable.style.width?0:t.currentMarginLeft)+"%)";for(var w=0;w<O.length;w++)t.curTable.rows[w].cells[t.colIndex].style.width=T-k+"%"}}else if("last"===t.currentColumnResize){if(a+=.75,t.removeResizeElement(),h&&(d=h.getBoundingClientRect().right-t.curTable.getBoundingClientRect().left,t.curTable.style.maxWidth=d+"px"),(0!==a&&5<T||a>0)&&S<=100&&t.convertPixelToPercentage(s+a,v)<=100){var L=t.findFirstLastColCells(t.curTable,!1);t.curTable.style.width=t.convertPixelToPercentage(s+a,v)>100?"100%":t.convertPixelToPercentage(s+a,v)+"%";for(var k=S-t.convertPixelToPercentage(s+a,v),w=0;w<L.length;w++)t.curTable.rows[w].cells[t.colIndex]&&(t.curTable.rows[w].cells[t.curTable.rows[w].cells.length===t.colIndex?t.colIndex-1:t.colIndex].style.width=T-k+"%")}}else for(var _=t.curTable.rows[t.calMaxCol(t.curTable)].cells,x=N-a,D=parseFloat(t.columnEle.offsetWidth.toString())+parseFloat(_[t.colIndex-1].offsetWidth.toString()),w=0;w<t.curTable.rows.length;w++){var M=t.curTable.rows[w];if(D-x>20&&x>20){var R=D-x,B=x,A=void 0,I=!1,P=void 0,U=void 0;f=!1,m=!1;for(var H=0;H<M.cells.length;H++)M.cells[H].hasAttribute("rowspan")&&H<=t.colIndex?(m=!0,c=w,u=M.cells[H]):M.cells[H].hasAttribute("colspan")&&H<=M.cells.length&&(f=!0,c=w,u=M.cells[H]);if(A=!n.i(i.isNullOrUndefined)(M.cells[w])&&M.cells[w].hasAttribute("colspan")?parseInt(M.cells[w].getAttribute("colspan"),10)-1:t.colIndex,m||f){var j=void 0;M.cells.length<_.length?(A=M.cells.length===t.colIndex||M===t.curTable.rows[t.curTable.rows.length-1]?t.colIndex-1:t.colIndex,j=t.curTable.rows[n.i(i.isNullOrUndefined)(c)?t.colIndex-1:c],I=!(!j||j===M||j.cells[t.colIndex-1]!==u&&j.cells[j.cells.length-1]!==u)):A=t.colIndex,P=I?j&&j.cells[j.cells.length-1]!==u?j.cells[t.colIndex-1]:M.cells[M.cells.length-1]:M.cells[A-1],U=I?U&&U.hasAttribute("rowspan")?j.cells[t.colIndex]:j&&j.cells[j.cells.length-1]!==u?M.cells[A-1]:j.cells[j.cells.length-1]:M.cells[A]}n.i(i.isNullOrUndefined)(M.cells[A-1])||m||f?P&&(P.style.width=t.convertPixelToPercentage(R,s)+"%"):M.cells[A-1].style.width=t.convertPixelToPercentage(R,s)+"%",n.i(i.isNullOrUndefined)(M.cells[A])||m||f?U&&(U.style.width=t.convertPixelToPercentage(B,s)+"%"):M.cells[A].style.width=t.convertPixelToPercentage(B,s)+"%"}}t.updateHelper()}else if(t.resizeBtnStat.row){t.parent.preventDefaultResize(e);var F=parseFloat(t.rowEle.clientHeight.toString())+l;F>20&&(t.rowEle.style.height=F+"px"),t.curTable.style.height="",n.i(i.isNullOrUndefined)(o)||(o.style.cssText="top: "+(t.calcPos(t.curTable).top+p-4)+"px; left:"+(t.calcPos(t.curTable).left+s-4)+"px;"),t.updateHelper()}else if(t.resizeBtnStat.tableBox){if(h){var q=t.curTable.getBoundingClientRect().left-h.getBoundingClientRect().left;d=Math.abs(q-h.getBoundingClientRect().width)-5,t.curTable.style.maxWidth=d+"px"}var z=t.curTable.style.width.indexOf("%")>-1;t.curTable.style.width=z?t.convertPixelToPercentage(s+a,v)+"%":s+a+"px",t.curTable.style.height=p+l+"px",n.i(i.isNullOrUndefined)(o)||(o.classList.add("e-rbox-select"),o.style.cssText="top: "+(t.calcPos(t.curTable).top+p-4)+"px; left:"+(t.calcPos(t.curTable).left+s-4)+"px;")}}})},e.prototype.getCurrentTableWidth=function(e,t){return e/t*100},e.prototype.findFirstLastColCells=function(e,t){for(var n=[],i=e.querySelectorAll("tr"),r=0;r<i.length;r++)if(i[r].closest("table")===e){var o=i[r].querySelectorAll("th, td");n.push(t?o[0]:o[o.length-1])}return n},e.prototype.convertPixelToPercentage=function(e,t){return e/t*100},e.prototype.cancelResizeAction=function(){i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),this.removeResizeElement()},e.prototype.resizeEnd=function(e){this.resizeBtnInit(),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),this.contentModule.getEditPanel().querySelector(".e-table-box")&&this.contentModule.getEditPanel().contains(this.contentModule.getEditPanel().querySelector(".e-table-box"))&&this.removeResizeElement(),this.helper&&this.contentModule.getEditPanel().contains(this.helper)&&(n.i(i.detach)(this.helper),this.helper=null),this.pageX=null,this.pageY=null,this.moveEle=null;var t={event:e,requestType:"table"};this.parent.trigger(s.L,t),this.parent.formatter.saveData()},e.prototype.resizeBtnInit=function(){return this.resizeBtnStat={column:!1,row:!1,tableBox:!1}},e.prototype.addRow=function(e,t,n){var i;n&&(i={item:{command:"Table",subCommand:"InsertRowAfter"}});var r={selection:e,subCommand:n?i.item.subCommand:t.item.subCommand};this.parent.formatter.process(this.parent,n?i:t,t,r)},e.prototype.addColumn=function(e,t){this.parent.formatter.process(this.parent,t,t,{selection:e,width:this.parent.tableSettings.width,subCommand:t.item.subCommand})},e.prototype.removeRowColumn=function(e,t){this.parent.formatter.process(this.parent,t,t,{selection:e,subCommand:t.item.subCommand}),this.hideTableQuickToolbar()},e.prototype.removeTable=function(e,t,n){var i;n&&(i={item:{command:"Table",subCommand:"TableRemove"}});var r={selection:e,subCommand:n?i.item.subCommand:t.item.subCommand};this.parent.formatter.process(this.parent,n?i:t,t.originalEvent,r),this.contentModule.getEditPanel().focus(),null!==this.parent.inputElement.innerHTML&&""!==this.parent.inputElement.innerHTML||("DIV"===this.parent.enterKey?this.contentModule.getEditPanel().innerHTML="<div><br/></div>":"BR"===this.parent.enterKey?this.contentModule.getEditPanel().innerHTML="<br/>":this.contentModule.getEditPanel().innerHTML="<p><br/></p>"),this.removeResizeElement(),this.hideTableQuickToolbar()},e.prototype.renderDlgContent=function(e){var t=this,s=e.args.originalEvent.target;if(i.Browser.isDevice||this.parent.inlineMode.enable||!n.i(i.isNullOrUndefined)(n.i(i.closest)(s,".e-rte-text-popup")))return void this.insertTableDialog(e);if(this.popupObj)return void this.popupObj.hide();this.hideTableQuickToolbar();var a=this.l10n.getConstant("inserttablebtn");this.dlgDiv=this.parent.createElement("div",{className:"e-rte-table-popup"+this.parent.getCssClass(!0),id:this.rteID+"_table"}),this.tblHeader=this.parent.createElement("div",{className:"e-rte-popup-header"+this.parent.getCssClass(!0)}),this.tblHeader.innerHTML="1X1",this.dlgDiv.appendChild(this.tblHeader);var l=this.parent.createElement("div",{className:"e-rte-table-span"+this.parent.getCssClass(!0)});this.drawTable(l,e),this.dlgDiv.appendChild(l),this.dlgDiv.appendChild(this.parent.createElement("span",{className:"e-span-border"+this.parent.getCssClass(!0)}));var d=this.parent.createElement("button",{className:"e-insert-table-btn"+this.parent.getCssClass(!0),id:this.rteID+"_insertTable",attrs:{type:"button",tabindex:"0"}});n.i(i.isNullOrUndefined)(this.parent.getToolbarElement().querySelector(".e-expended-nav"))||this.parent.getToolbarElement().querySelector(".e-expended-nav").setAttribute("tabindex","1"),this.dlgDiv.appendChild(d),this.createTableButton=new o.Button({iconCss:"e-icons e-create-table",content:a,cssClass:"e-flat"+this.parent.getCssClass(!0),enableRtl:this.parent.enableRtl,locale:this.parent.locale}),this.createTableButton.isStringTemplate=!0,this.createTableButton.appendTo(d),i.EventHandler.add(d,"click",this.insertTableDialog,{self:this,args:e.args,selection:e.selection}),this.parent.getToolbar().appendChild(this.dlgDiv);var c=e.args.originalEvent.target;c=c.classList.contains("e-toolbar-item")?c.firstChild:c.parentElement,this.popupObj=new r.Popup(this.dlgDiv,{targetType:"relative",relateTo:c,collision:{X:"fit",Y:"none"},offsetY:8,viewPortElement:this.parent.element,position:{X:"left",Y:"bottom"},enableRtl:this.parent.enableRtl,zIndex:10001,close:function(e){t.parent.isBlur=!1,t.popupObj.destroy(),n.i(i.detach)(t.popupObj.element),t.popupObj=null}}),n.i(i.addClass)([this.popupObj.element],"e-popup-open"),n.i(i.isNullOrUndefined)(this.parent.cssClass)||n.i(i.addClass)([this.popupObj.element],this.parent.getCssClass()),this.popupObj.refreshPosition(c)},e.prototype.onIframeMouseDown=function(){this.popupObj&&this.popupObj.hide()},e.prototype.docClick=function(e){var t=e.args.target;t&&t.classList&&(this.popupObj&&!n.i(i.closest)(t,"[id='"+this.popupObj.element.id+"']")||this.editdlgObj&&!n.i(i.closest)(t,"#"+this.editdlgObj.element.id))&&!t.classList.contains("e-create-table")&&t.offsetParent&&!t.offsetParent.classList.contains("e-rte-backgroundcolor-dropdown")&&(this.popupObj&&this.popupObj.hide(),this.editdlgObj&&this.editdlgObj.hide(),this.parent.isBlur=!0,n.i(c.l)(this.parent.element,"focusout"));var r=n.i(i.closest)(t,"td"),o=!(!r||!this.parent.contentModule.getEditPanel().contains(r));!t||"TD"===t.tagName||"TH"===t.tagName||o||null!==n.i(i.closest)(t,".e-rte-quick-popup")||!t.offsetParent||t.offsetParent.classList.contains("e-quick-dropdown")||t.offsetParent.classList.contains("e-rte-backgroundcolor-dropdown")||n.i(i.closest)(t,".e-rte-dropdown-popup")||n.i(i.closest)(t,".e-rte-elements")||(n.i(i.removeClass)(this.parent.inputElement.querySelectorAll("table td"),d._32),i.Browser.isIE||this.hideTableQuickToolbar()),!t||!t.classList||t.classList.contains(d._35)||t.classList.contains(d._36)||t.classList.contains(d._37)||this.removeResizeElement()},e.prototype.drawTable=function(e,t){for(var r,o,s=0;s<3;s++){r=this.parent.createElement("div",{className:"e-rte-table-row"+this.parent.getCssClass(!0),attrs:{"data-column":""+s}});for(var a=0;a<10;a++){var l=s>2?"none":"inline-block";o=this.parent.createElement("div",{className:"e-rte-tablecell e-default"+this.parent.getCssClass(!0),attrs:{"data-cell":""+a}}),r.appendChild(o),o.style.display=l,0===a&&0===s&&n.i(i.addClass)([o],"e-active"),i.EventHandler.add(o,"mousemove",this.tableCellSelect,this),i.EventHandler.add(r,"mouseleave",this.tableCellLeave,this),i.EventHandler.add(o,"mouseup",this.tableCellClick,{self:this,args:t.args,selection:t.selection})}e.appendChild(r)}},e.prototype.editTable=function(e){var t=this;this.createDialog(e);var n=this.tableDlgContent(e),i=this.l10n.getConstant("dialogUpdate"),r=this.l10n.getConstant("dialogCancel"),o=this.l10n.getConstant("tableEditHeader");this.editdlgObj.setProperties({height:"initial",width:"290px",content:n,header:o,buttons:[{click:this.applyProperties.bind(this,e),buttonModel:{content:i,cssClass:"e-flat e-size-update"+this.parent.getCssClass(!0),isPrimary:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel"+this.parent.getCssClass(!0),content:r}}],cssClass:this.editdlgObj.cssClass+" e-rte-edit-table-prop-dialog"}),this.editdlgObj.element.style.maxHeight="none",this.editdlgObj.content.querySelector("input").focus(),this.hideTableQuickToolbar()},e.prototype.insertTableDialog=function(e){var t=this.self?this.self:this;t.popupObj&&t.popupObj.hide(),t.createDialog(e);var r=t.tableCellDlgContent(),o=t.l10n.getConstant("dialogInsert"),s=t.l10n.getConstant("dialogCancel");n.i(i.isNullOrUndefined)(t.editdlgObj)||(t.editdlgObj.setProperties({height:"initial",width:"290px",content:r,buttons:[{click:t.customTable.bind(this,e),buttonModel:{content:o,cssClass:"e-flat e-insert-table "+t.parent.cssClass,isPrimary:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel "+t.parent.cssClass,content:s}}]}),n.i(i.isNullOrUndefined)(t.parent.cssClass)||t.editdlgObj.setProperties({cssClass:t.parent.cssClass}),t.editdlgObj.element.style.maxHeight="none",t.editdlgObj.content.querySelector("input").focus())},e.prototype.tableCellDlgContent=function(){var e=this.l10n.getConstant("columns"),t=this.l10n.getConstant("rows"),i=this.parent.createElement("div",{className:"e-cell-wrap"+this.parent.getCssClass(!0)}),r='<div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" id="tableColumn" class="e-table-column'+this.parent.getCssClass(!0)+'"/></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" id="tableRow" class="e-table-row'+this.parent.getCssClass(!0)+'" /></div>',o=n.i(c.m)(r);return i.appendChild(o),this.columnTextBox=new l.NumericTextBox({format:"n0",min:1,value:3,placeholder:e,floatLabelType:"Auto",max:50,enableRtl:this.parent.enableRtl,locale:this.parent.locale,cssClass:this.parent.getCssClass()}),this.columnTextBox.isStringTemplate=!0,this.columnTextBox.appendTo(i.querySelector("#tableColumn")),this.rowTextBox=new l.NumericTextBox({format:"n0",min:1,value:3,placeholder:t,floatLabelType:"Auto",max:1e3,enableRtl:this.parent.enableRtl,locale:this.parent.locale,cssClass:this.parent.getCssClass()}),this.rowTextBox.isStringTemplate=!0,this.rowTextBox.appendTo(i.querySelector("#tableRow")),i},e.prototype.clearDialogObj=function(){this.editdlgObj&&(this.editdlgObj.destroy(),n.i(i.detach)(this.editdlgObj.element),this.editdlgObj=null)},e.prototype.createDialog=function(e){var t=this;if(this.editdlgObj)return void this.editdlgObj.hide({returnValue:!0});var r=this.parent.createElement("div",{className:"e-rte-edit-table"+this.parent.getCssClass(!0),id:this.rteID+"_tabledialog"});this.parent.element.appendChild(r);var o=this.l10n.getConstant("dialogInsert"),s=this.l10n.getConstant("dialogCancel"),a=this.l10n.getConstant("tabledialogHeader"),l={header:a,cssClass:d._12+this.parent.getCssClass(!0),enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:i.Browser.isDevice?"290px":"340px",height:"initial",position:{X:"center",Y:i.Browser.isDevice?"center":"top"},isModal:i.Browser.isDevice,buttons:[{buttonModel:{content:o,cssClass:"e-flat e-insert-table"+this.parent.getCssClass(!0),isPrimary:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel"+this.parent.getCssClass(!0),content:s}}],target:i.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){t.parent.isBlur=!1,t.editdlgObj.destroy(),n.i(i.detach)(t.editdlgObj.element),t.dialogRenderObj.close(e),t.editdlgObj=null}};this.editdlgObj=this.dialogRenderObj.render(l),this.editdlgObj.appendTo(r),this.quickToolObj&&this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup(),this.quickToolObj&&this.quickToolObj.textQTBar&&this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)&&this.quickToolObj.textQTBar.hidePopup()},e.prototype.customTable=function(e,t){var r=this.self?this.self:this;if(r.rowTextBox.value&&r.columnTextBox.value){var o=i.Browser.isDevice||!n.i(i.isNullOrUndefined)(e.args)&&!n.i(i.isNullOrUndefined)(e.args.originalEvent)&&"insert-table"===e.args.originalEvent.action||r.parent.inlineMode.enable||!n.i(i.isNullOrUndefined)(r.parent.quickToolbarSettings.text)?e:this;r.tableInsert(r.rowTextBox.value,r.columnTextBox.value,t,o)}},e.prototype.cancelDialog=function(e){this.parent.isBlur=!1,this.editdlgObj.hide({returnValue:!0})},e.prototype.applyProperties=function(e,t){var r=this.editdlgObj.element,o=n.i(i.closest)(e.selectNode[0],"table");if(o.style.width=r.querySelector(".e-table-width").value+"px",""!==r.querySelector(".e-cell-padding").value)for(var s=o.querySelectorAll("td"),a=0;a<s.length;a++){var l="";""===s[a].style.padding?l=s[a].getAttribute("style")+" padding:"+r.querySelector(".e-cell-padding").value+"px;":(s[a].style.padding=r.querySelector(".e-cell-padding").value+"px",l=s[a].getAttribute("style")),s[a].setAttribute("style",l)}o.cellSpacing=r.querySelector(".e-cell-spacing").value,n.i(i.isNullOrUndefined)(o.cellSpacing)&&"0"===o.cellSpacing?n.i(i.removeClass)([o],d._64):n.i(i.addClass)([o],d._64),this.parent.formatter.saveData(),this.editdlgObj.hide({returnValue:!0})},e.prototype.tableDlgContent=function(e){var t=e.selectParent[0],r=this.l10n.getConstant("tableWidth"),o=this.l10n.getConstant("cellpadding"),s=this.l10n.getConstant("cellspacing"),a=this.parent.createElement("div",{className:"e-table-sizewrap"+this.parent.getCssClass(!0)}),d=n.i(i.closest)(t,"table").getClientRects()[0].width,u=n.i(i.closest)(t,"td").style.padding,h=n.i(i.closest)(t,"table").getAttribute("cellspacing"),p='<div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" id="tableWidth" class="e-table-width'+this.parent.getCssClass(!0)+'" /></div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" id="cellPadding" class="e-cell-padding'+this.parent.getCssClass(!0)+'" /> </div><div class="e-rte-field'+this.parent.getCssClass(!0)+'"><input type="text" data-role ="none" id="cellSpacing" class="e-cell-spacing'+this.parent.getCssClass(!0)+'" /></div>',m=n.i(c.m)(p);return a.appendChild(m),this.tableWidthNum=new l.NumericTextBox({format:"n0",min:0,value:d,placeholder:r,floatLabelType:"Auto",enableRtl:this.parent.enableRtl,locale:this.parent.locale}),this.tableWidthNum.isStringTemplate=!0,this.tableWidthNum.appendTo(a.querySelector("#tableWidth")),this.tableCellPadding=new l.NumericTextBox({format:"n0",min:0,value:""!==u?parseInt(u,null):0,placeholder:o,floatLabelType:"Auto",enableRtl:this.parent.enableRtl,locale:this.parent.locale}),this.tableCellPadding.isStringTemplate=!0,this.tableCellPadding.appendTo(a.querySelector("#cellPadding")),this.tableCellSpacing=new l.NumericTextBox({format:"n0",min:0,value:""===h||n.i(i.isNullOrUndefined)(h)?0:parseInt(h,null),placeholder:s,floatLabelType:"Auto",enableRtl:this.parent.enableRtl,locale:this.parent.locale}),this.tableCellSpacing.isStringTemplate=!0,this.tableCellSpacing.appendTo(a.querySelector("#cellSpacing")),a},e.prototype.destroy=function(){n.i(i.isNullOrUndefined)(this.parent)||this.removeEventListener()},e.prototype.moduleDestroy=function(){this.parent=null},e.prototype.getModuleName=function(){return"table"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(0),r=(n.n(i),n(1)),o=n(2),s=n(14),a=(n.n(s),n(18)),l=(n.n(a),n(5)),d=n(4),c=n(6),u=function(){function e(e,t){this.isVideoUploaded=!1,this.isAllowedTypes=!0,this.pageX=null,this.pageY=null,this.deletedVid=[],this.parent=e,this.rteID=e.element.id,this.i10n=t.getService("rteLocale"),this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(r.v,this.onKeyDown,this),this.parent.on(r.u,this.onKeyUp,this),this.parent.on(r.Z,this.insertingVideo,this),this.parent.on(r.g,this.afterRender,this),this.parent.on(r._75,this.afterRender,this),this.parent.on(r.I,this.onWindowResize,this),this.parent.on(r._83,this.showDialog,this),this.parent.on(r._86,this.closeDialog,this),this.parent.on(r.B,this.alignmentSelect,this),this.parent.on(r._10,this.deleteVideo,this),this.parent.on(r.G,this.onToolbarAction,this),this.parent.on(r._26,this.editAreaClickHandler,this),this.parent.on(r.h,this.onIframeMouseDown,this),this.parent.on(r._13,this.videoSize,this),this.parent.on(r._0,this.showVideoQuickToolbar,this),this.parent.on(r._48,this.clearDialogObj,this),this.parent.on(r.i,this.removeEventListener,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.v,this.onKeyDown),this.parent.off(r.u,this.onKeyUp),this.parent.off(r.Z,this.insertingVideo),this.parent.off(r.I,this.onWindowResize),this.parent.off(r.g,this.afterRender),this.parent.off(r._75,this.afterRender),this.parent.off(r._83,this.showDialog),this.parent.off(r._86,this.closeDialog),this.parent.off(r.B,this.alignmentSelect),this.parent.off(r._10,this.deleteVideo),this.parent.off(r.G,this.onToolbarAction),this.parent.off(r._26,this.editAreaClickHandler),this.parent.off(r.h,this.onIframeMouseDown),this.parent.off(r._13,this.videoSize),this.parent.off(r._0,this.showVideoQuickToolbar),this.parent.off(r._48,this.clearDialogObj),this.parent.off(r.i,this.removeEventListener),n.i(i.isNullOrUndefined)(this.contentModule)||(i.EventHandler.remove(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.videoClick),this.parent.formatter.editorManager.observer.off(r._42,this.undoStack),this.parent.insertVideoSettings.resize&&(i.EventHandler.remove(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.resizeStart),i.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick),i.EventHandler.remove(this.contentModule.getEditPanel(),"cut",this.onCutHandler),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing))))},e.prototype.afterRender=function(){this.contentModule=this.rendererFactory.getRenderer(l.a.Content),i.EventHandler.add(this.contentModule.getEditPanel(),i.Browser.touchEndEvent,this.videoClick,this),this.parent.insertVideoSettings.resize&&(i.EventHandler.add(this.parent.contentModule.getEditPanel(),i.Browser.touchStartEvent,this.resizeStart,this),i.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this),i.EventHandler.add(this.contentModule.getEditPanel(),"cut",this.onCutHandler,this))},e.prototype.clearDialogObj=function(){this.dialogObj&&(this.dialogObj.destroy(),n.i(i.detach)(this.dialogObj.element),this.dialogObj=null)},e.prototype.onKeyUp=function(e){if(!n.i(i.isNullOrUndefined)(this.deletedVid)&&this.deletedVid.length>0)for(var t=0;t<this.deletedVid.length;t++){var o={element:this.deletedVid[t],src:"IFRAME"!==this.deletedVid[t].tagName?this.deletedVid[t].querySelector("source").getAttribute("src"):this.deletedVid[t].src};this.parent.trigger(r._67,o)}},e.prototype.undoStack=function(e){if("undo"===e.subCommand.toLowerCase()||"redo"===e.subCommand.toLowerCase())for(var t=0;t<this.parent.formatter.getUndoRedoStack().length;t++){var r=this.parent.createElement("div"),o=this.parent.formatter.getUndoRedoStack()[t].text;r.appendChild(o.cloneNode(!0));var s=r.querySelectorAll("video");if(r.querySelector(".e-vid-resize")&&s.length>0){for(var a=0;a<s.length;a++)s[a].style.outline="";n.i(i.detach)(r.querySelector(".e-vid-resize"));for(var l=r.cloneNode(!0),d=document.createDocumentFragment();l.firstChild;)d.appendChild(l.firstChild);this.parent.formatter.getUndoRedoStack()[t].text=d}}},e.prototype.onIframeMouseDown=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.videoSize=function(e){var t=this;if(("VIDEO"===e.selectNode[0].nodeName||this.isEmbedVidElem(e.selectNode[0]))&&(this.insertVideo(e),!n.i(i.isNullOrUndefined)(this.dialogObj))){var r=this.i10n.getConstant("videoSizeHeader"),o=this.i10n.getConstant("dialogUpdate"),s=this.vidsizeInput(e),a={args:e.args,selfVideo:this,selection:e.selection,selectNode:e.selectNode};this.dialogObj.setProperties({height:"inherit",width:"290px",header:r,content:s,buttons:[{click:function(e){t.insertSize(a)},buttonModel:{content:o,cssClass:"e-flat e-update-size",isPrimary:!0}}]}),this.dialogObj.element.style.maxHeight="inherit",this.dialogObj.content.querySelector("input").focus()}},e.prototype.vidsizeInput=function(e){var t=this,r=e.selectNode[0],o=this.i10n.getConstant("videoHeight"),a=this.i10n.getConstant("videoWidth"),l=this.parent.createElement("div",{className:"e-video-sizewrap"}),c=!n.i(i.isNullOrUndefined)(this.changedWidthValue)||"auto"!==r.style.width.toString()&&""===r.style.width?n.i(i.isNullOrUndefined)(this.changedWidthValue)?parseInt(r.getClientRects()[0].width.toString(),10).toString():this.changedWidthValue:r.style.width,u=!n.i(i.isNullOrUndefined)(this.changedHeightValue)||"auto"!==r.style.height.toString()&&""===r.style.height?n.i(i.isNullOrUndefined)(this.changedHeightValue)?parseInt(r.getClientRects()[0].height.toString(),10).toString():this.changedHeightValue:r.style.height;this.changedWidthValue=null,this.changedHeightValue=null;var h='<div class="e-rte-label"><label>'+a+'</label></div><div class="e-rte-field"><input type="text" id="vidwidth" class="e-vid-width" value='+c+' /></div><div class="e-rte-label"><label>'+o+'</label></div><div class="e-rte-field"> <input type="text" id="vidheight" class="e-vid-height" value='+u+" /></div>",p=n.i(d.m)(h);l.appendChild(p);var m=new s.TextBox({value:n.i(i.formatUnit)(c),enableRtl:this.parent.enableRtl,input:function(e){t.inputWidthValue=n.i(i.formatUnit)(e.value)}});m.createElement=this.parent.createElement,m.appendTo(l.querySelector("#vidwidth"));var f=new s.TextBox({value:n.i(i.formatUnit)(u),enableRtl:this.parent.enableRtl,input:function(e){t.inputHeightValue=n.i(i.formatUnit)(e.value)}});return f.createElement=this.parent.createElement,f.appendTo(l.querySelector("#vidheight")),l},e.prototype.insertSize=function(e){e.selection.restore();var t=e.selfVideo;0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData();var n=t.dialogObj.element;this.changedWidthValue=this.inputWidthValue,this.changedHeightValue=this.inputHeightValue;var i=n.querySelector(".e-vid-width").value,r=n.parentElement.querySelector(".e-vid-height").value;t.parent.formatter.process(this.parent,e.args,e.args,{width:i,height:r,selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.vidResizeDiv&&(e.selectNode[0]="VIDEO"===e.selectNode[0].tagName||"IFRAME"===e.selectNode[0].tagName?e.selectNode[0]:e.selectNode[0].querySelector("iframe"),t.vidResizePos(e.selectNode[0],this.vidResizeDiv)),t.dialogObj.hide({returnValue:!0})},e.prototype.resizeEnd=function(e){this.resizeBtnInit(),this.videoEle.parentElement.style.cursor="auto",i.Browser.isDevice&&n.i(i.removeClass)([e.target.parentElement],"e-mob-span");var t={event:e,requestType:"videos"};this.parent.trigger(r.L,t);this.getPointX(e),this.parent.iframeSettings.enable?(window.pageYOffset,this.parent.element.getBoundingClientRect().top,e.clientY):e.pageY;this.parent.formatter.editorManager.observer.on(r._42,this.undoStack,this),this.parent.formatter.saveData()},e.prototype.resizeStart=function(e,t){var o=this;if(!this.parent.readonly){var s=t||(this.isEmbedVidElem(e.target)?e.target.querySelector("iframe"):e.target);if(this.prevSelectedVidEle=this.videoEle,"VIDEO"===s.tagName||"IFRAME"===s.tagName){this.parent.preventDefaultResize(e);var a=s;this.vidResizeDiv&&this.contentModule.getEditPanel().contains(this.vidResizeDiv)&&n.i(i.detach)(this.vidResizeDiv),this.videoResize(a)}if(s.classList.contains("e-rte-videoboxmark")){if(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),this.pageX=this.getPointX(e),this.pageY=this.getPointY(e),e.preventDefault(),e.stopImmediatePropagation(),this.resizeBtnInit(),this.quickToolObj&&this.quickToolObj.videoQTBar.hidePopup(),s.classList.contains("e-rte-topLeft")&&(this.resizeBtnStat.topLeft=!0),s.classList.contains("e-rte-topRight")&&(this.resizeBtnStat.topRight=!0),s.classList.contains("e-rte-botLeft")&&(this.resizeBtnStat.botLeft=!0),s.classList.contains("e-rte-botRight")&&(this.resizeBtnStat.botRight=!0),i.Browser.isDevice&&this.contentModule.getEditPanel().contains(this.vidResizeDiv)&&!this.vidResizeDiv.classList.contains("e-mob-span"))n.i(i.addClass)([this.vidResizeDiv],"e-mob-span");else{var l={event:e,requestType:"videos"};this.parent.trigger(r.J,l,function(e){e.cancel&&o.cancelResizeAction()})}i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd,this)}}},e.prototype.videoClick=function(e){i.Browser.isDevice&&("VIDEO"===e.target.tagName||this.isEmbedVidElem(e.target)?(this.contentModule.getEditPanel().setAttribute("contenteditable","false"),e.target.focus()):this.parent.readonly||this.contentModule.getEditPanel().setAttribute("contenteditable","true")),("VIDEO"===e.target.tagName||this.isEmbedVidElem(e.target))&&e.preventDefault()},e.prototype.onCutHandler=function(){this.vidResizeDiv&&this.contentModule.getEditPanel().contains(this.vidResizeDiv)&&this.cancelResizeAction()},e.prototype.videoResize=function(e){this.resizeBtnInit(),this.videoEle=e,n.i(i.addClass)([this.videoEle],"e-resize"),this.vidResizeDiv=this.parent.createElement("span",{className:"e-vid-resize",id:this.rteID+"_vidResize"}),this.vidResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-videoboxmark e-rte-topLeft",styles:"cursor: nwse-resize"})),this.vidResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-videoboxmark e-rte-topRight",styles:"cursor: nesw-resize"})),this.vidResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-videoboxmark e-rte-botLeft",styles:"cursor: nesw-resize"})),this.vidResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-videoboxmark e-rte-botRight",styles:"cursor: nwse-resize"})),i.Browser.isDevice&&n.i(i.addClass)([this.vidResizeDiv],"e-mob-rte"),e.style.outline="2px solid #4a90e2",this.vidResizePos(e,this.vidResizeDiv),this.resizeVidDupPos(e),this.contentModule.getEditPanel().appendChild(this.vidResizeDiv),i.EventHandler.add(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing,this)},e.prototype.getPointX=function(e){return e.touches&&e.touches.length?e.touches[0].pageX:e.pageX},e.prototype.getPointY=function(e){return e.touches&&e.touches.length?e.touches[0].pageY:e.pageY},e.prototype.vidResizePos=function(e,t){if(!n.i(i.isNullOrUndefined)(t)){var r=this.calcPos(e),o=r.top,s=r.left,a=0!==e.width&&"auto"!==e.width&&"NaN"!==e.width?e.width:e.getBoundingClientRect().width,l=0!==e.height&&"auto"!==e.height&&"NaN"!==e.height?e.height:e.getBoundingClientRect().height,d=i.Browser.isDevice?4*parseInt(e.style.outline.slice(-3),10)+2:2*parseInt(e.style.outline.slice(-3),10)+2,c=i.Browser.isDevice?0:2;t.querySelector(".e-rte-botLeft").style.left=s-d+"px",t.querySelector(".e-rte-botLeft").style.top=parseInt(l.toString(),10)-d+o+"px",t.querySelector(".e-rte-botRight").style.left=parseInt(a.toString(),10)-(d-c)+s+"px",t.querySelector(".e-rte-botRight").style.top=parseInt(l.toString(),10)-d+o+"px",t.querySelector(".e-rte-topRight").style.left=parseInt(a.toString(),10)-(d-c)+s+"px",t.querySelector(".e-rte-topRight").style.top=o-d+"px",t.querySelector(".e-rte-topLeft").style.left=s-d+"px",t.querySelector(".e-rte-topLeft").style.top=o-d+"px"}},e.prototype.calcPos=function(e){for(var t,r=["TD","TH","TABLE","A"],o={top:0,left:0},s=e.ownerDocument,a=(e.offsetParent&&(e.offsetParent.classList.contains("e-video-clickelem")||r.indexOf(e.offsetParent.tagName)>-1)?n.i(i.closest)(e,"#"+this.parent.getID()+"_rte-edit-view"):e.offsetParent)||s.documentElement;a&&(a===s.body||a===s.documentElement)&&"static"===a.style.position;)a=a.parentNode;return a&&a!==e&&1===a.nodeType&&(o=a.getBoundingClientRect()),e&&1===e.nodeType&&"IFRAME"===e.tagName?(t=e.getBoundingClientRect(),{top:t.top-o.top,left:t.left-o.left}):{top:e.offsetTop,left:e.offsetLeft}},e.prototype.setAspectRatio=function(e,t,r,o){var s=getComputedStyle(e);if(!n.i(i.isNullOrUndefined)(s)){var a=""!==s.width?s.width.match(/^\d+(\.\d*)?%$/g)?parseFloat(s.width):parseInt(s.width,10):""!==e.style.width?e.style.width:e.width,l=""!==s.height?parseInt(s.height,10):""!==e.style.height?e.style.height:e.height;if(a>l)if(e.style.minWidth=0===this.parent.insertVideoSettings.minWidth?"200px":n.i(i.formatUnit)(this.parent.insertVideoSettings.minWidth),e.style.minHeight=0===this.parent.insertVideoSettings.minHeight?"90px":n.i(i.formatUnit)(this.parent.insertVideoSettings.minHeight),this.parent.insertVideoSettings.resizeByPercent){if(0!==parseInt(""+e.getBoundingClientRect().width,10)&&0!==parseInt(""+a,10)){var d=this.pixToPerc(parseInt(a.toString(),10)/parseInt(l.toString(),10)*r,e.previousElementSibling||e.parentElement);e.style.width=Math.min(Math.round(d/e.getBoundingClientRect().width*t*100)/100,100)+"%"}else e.style.width=this.pixToPerc(parseInt(a.toString(),10)/parseInt(l.toString(),10)*r,e.previousElementSibling||e.parentElement)+"%";e.style.height=null,e.removeAttribute("height")}else if(""===e.style.width&&""!==e.style.height||""===s.width&&""!==s.height)e.style.height=r+"px";else if(""!==e.style.width&&""===e.style.height||""!==s.width&&""===s.height){var c=parseInt(a.toString(),10)/parseInt(l.toString(),10)*r+parseInt(a.toString(),10)/parseInt(l.toString(),10)<this.parent.inputElement.getBoundingClientRect().right-32?parseInt(a.toString(),10)/parseInt(l.toString(),10)*r+parseInt(a.toString(),10)/parseInt(l.toString(),10):this.parent.inputElement.getBoundingClientRect().right-32;e.style.width=c.toString()+"px"}else if(""!==e.style.width||""!==s.width){var c=parseInt(a.toString(),10)/parseInt(l.toString(),10)*r<this.parent.inputElement.getBoundingClientRect().right-32?parseInt(a.toString(),10)/parseInt(l.toString(),10)*r:this.parent.inputElement.getBoundingClientRect().right-32;e.style.width=c+"px",e.style.height=r+"px"}else e.setAttribute("width",parseInt((parseInt(a.toString(),10)/parseInt(l.toString(),10)*r+parseInt(a.toString(),10)/parseInt(l.toString(),10)).toString(),10).toString());else l>a?this.parent.insertVideoSettings.resizeByPercent?(0!==parseInt(""+e.getBoundingClientRect().width,10)&&0!==parseInt(""+a,10)?e.style.width=Math.min(Math.round(parseInt(a.toString(),10)/e.getBoundingClientRect().width*t*100)/100,100)+"%":e.style.width=this.pixToPerc(t/parseInt(l.toString(),10)*r,e.previousElementSibling||e.parentElement)+"%",e.style.height=null,e.removeAttribute("height")):""!==e.style.width||""!==s.width?(e.style.width=t+"px",e.style.height=parseInt(l.toString(),10)/parseInt(a.toString(),10)*t+"px"):e.setAttribute("width",this.resizeBtnStat.botRight?(this.getPointX(o.event)-e.getBoundingClientRect().left).toString():t.toString()):this.parent.insertVideoSettings.resizeByPercent?(e.style.width=this.pixToPerc(t,e.previousElementSibling||e.parentElement)+"%",e.style.height=null,e.removeAttribute("height")):(e.style.width=t+"px",e.style.height=t+"px")}},e.prototype.pixToPerc=function(e,t){return e/parseFloat(getComputedStyle(t).width)*100},e.prototype.vidDupMouseMove=function(e,t,o){var s=this,a={event:o,requestType:"videos"};this.parent.trigger(r.K,a,function(r){if(r.cancel)s.cancelResizeAction();else{if(parseInt(s.parent.insertVideoSettings.minWidth,10)>=parseInt(e,10)||parseInt(s.parent.getInsertVidMaxWidth(),10)<=parseInt(e,10)&&n.i(i.isNullOrUndefined)(s.videoEle.style.width))return;if(!s.parent.insertVideoSettings.resizeByPercent&&(parseInt(s.parent.insertVideoSettings.minHeight,10)>=parseInt(t,10)||parseInt(s.parent.insertVideoSettings.maxHeight,10)<=parseInt(t,10)))return;s.videoEle.parentElement.style.cursor="pointer",s.setAspectRatio(s.videoEle,parseInt(e,10),parseInt(t,10),a),s.resizeVidDupPos(s.videoEle),s.vidResizePos(s.videoEle,s.vidResizeDiv),s.parent.setContentHeight("",!1)}})},e.prototype.resizing=function(e){this.videoEle.offsetWidth>=this.parent.getInsertVidMaxWidth()&&(this.videoEle.style.maxHeight=this.videoEle.offsetHeight+"px");var t=this.getPointX(e),n=this.getPointY(e),i=this.resizeBtnStat.botLeft||this.resizeBtnStat.topLeft?-(t-this.pageX):t-this.pageX,r=this.resizeBtnStat.topLeft||this.resizeBtnStat.topRight?-(n-this.pageY):n-this.pageY,o=parseInt(this.vidDupPos.width,10)+i,s=parseInt(this.vidDupPos.height,10)+r;this.pageX=t,this.pageY=n,this.resizeBtnStat.botRight?this.vidDupMouseMove(o+"px",s+"px",e):this.resizeBtnStat.botLeft?this.vidDupMouseMove(o+"px",s+"px",e):this.resizeBtnStat.topRight?this.vidDupMouseMove(o+"px",s+"px",e):this.resizeBtnStat.topLeft&&this.vidDupMouseMove(o+"px",s+"px",e)},e.prototype.cancelResizeAction=function(){i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),this.videoEle&&this.vidResizeDiv&&this.contentModule.getEditPanel().contains(this.vidResizeDiv)&&(n.i(i.detach)(this.vidResizeDiv),this.videoEle.style.outline="",this.vidResizeDiv=null,this.pageX=null,this.pageY=null)},e.prototype.resizeVidDupPos=function(e){this.vidDupPos={width:""!==e.style.width&&this.parent.insertVideoSettings&&!this.parent.insertVideoSettings.resizeByPercent?this.videoEle.style.width:"auto"!==e.width&&0!==e.width&&"NaN"!==e.width?e.width+"px":parseInt(getComputedStyle(e).width,10)+"px",height:""!==e.style.height?this.videoEle.style.height:"auto"!==e.height&&0!==e.height&&"NaN"!==e.height?e.height+"px":parseInt(getComputedStyle(e).height,10)+"px"}},e.prototype.resizeBtnInit=function(){return this.resizeBtnStat={botLeft:!1,botRight:!1,topRight:!1,topLeft:!1}},e.prototype.onToolbarAction=function(e){switch(n.i(c.b)()&&this.parent.notify(r._19,{}),e.args.item.subCommand){case"VideoReplace":this.parent.notify(r.Z,e);break;case"VideoRemove":this.parent.notify(r._10,e);break;case"VideoDimension":this.parent.notify(r._13,e)}},e.prototype.onKeyDown=function(e){var t,r,s,a,l=e.args;this.deletedVid=[];var d,c=[27,112,113,114,115,116,117,118,119,120,121,122,123,44,45,9,16,17,18,19,20,33,34,35,36,37,38,39,40,91,92,93,144,145,182,183];if("HTML"===this.parent.editorMode&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),d=t.startContainer===t.endContainer&&t.startOffset===t.endOffset),!d&&"HTML"===this.parent.editorMode&&c.indexOf(l.which)<0)for(var u=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),h=0;h<u.length;h++)"VIDEO"!==u[h].nodeName&&"IFRAME"!==u[h].nodeName||this.deletedVid.push(u[h]);if("HTML"===this.parent.editorMode&&(8===l.which&&"Backspace"===l.code||46===l.which&&"Delete"===l.code)){var p=t.startContainer===t.endContainer&&t.startOffset===t.endOffset;8===l.which&&"Backspace"===l.code&&p?this.checkVideoBack(t):46===l.which&&"Delete"===l.code&&p&&this.checkVideoDel(t)}if(!n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)&&"KeyK"!==l.code&&(t=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),s=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(t),a=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t),!l.ctrlKey&&l.key&&(1===l.key.length||"enter"===l.action)&&(!n.i(i.isNullOrUndefined)(a[0])&&"VIDEO"===a[0].tagName||this.isEmbedVidElem(a[0]))&&a[0].parentElement)){var m=a[0].parentElement.childNodes[0];this.contentModule.getEditPanel().querySelector(".e-vid-resize")&&this.removeResizeEle(),this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),m,m,m.textContent.length,m.textContent.length),n.i(i.removeClass)([a[0]],o._51),this.quickToolObj.videoQTBar.hidePopup()}if(!l.ctrlKey||89!==l.keyCode&&90!==l.keyCode||this.undoStack({subCommand:90===l.keyCode?"undo":"redo"}),8===l.keyCode||46===l.keyCode){if(s&&("VIDEO"===s[0].nodeName||this.isEmbedVidElem(s[0]))&&s.length<1){n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),l.preventDefault();var f={selectNode:s,selection:r,selectParent:a,args:{item:{command:"Videos",subCommand:"VideoRemove"},originalEvent:l}};this.deleteVideo(f,l.keyCode)}this.parent.contentModule.getEditPanel().querySelector(".e-vid-resize")&&this.removeResizeEle()}switch("Backspace"===l.code&&(l.action="backspace"),l.action){case"escape":n.i(i.isNullOrUndefined)(this.dialogObj)||this.dialogObj.close();break;case"backspace":case"delete":for(var h=0;h<this.deletedVid.length;h++){var g=this.deletedVid[h].src;this.videoRemovePost(g)}"Markdown"!==this.parent.editorMode&&(3===t.startContainer.nodeType?"Backspace"===l.code?t.startContainer.previousElementSibling&&0===t.startOffset&&t.startContainer.previousElementSibling.classList.contains(o.Y)&&n.i(i.detach)(t.startContainer.previousElementSibling):t.startContainer.nextElementSibling&&t.endContainer.textContent.length===t.endOffset&&t.startContainer.nextElementSibling.classList.contains(o.Y)&&n.i(i.detach)(t.startContainer.nextElementSibling):1===t.startContainer.nodeType&&t.startContainer.classList&&t.startContainer.classList.contains(o.Y)&&n.i(i.detach)(t.startContainer));break;case"insert-video":n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)||(r=this.parent.formatter.editorManager.nodeSelection.save(t,this.parent.contentModule.getDocument())),this.openDialog(!0,l,r,s,a),l.preventDefault()}},e.prototype.openDialog=function(e,t,r,o,s){var a,l,d,c;e||n.i(i.isNullOrUndefined)(this.parent.formatter.editorManager.nodeSelection)?(l=r,d=o,c=s):(a=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),l=this.parent.formatter.editorManager.nodeSelection.save(a,this.parent.contentModule.getDocument()),d=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(a),c=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(a)),"HTML"===this.parent.editorMode&&this.insertVideo({args:{item:{command:"Videos",subCommand:"Video"},originalEvent:t,name:e?null:"showDialog"},selectNode:d,selection:l,selectParent:c})},e.prototype.showDialog=function(){this.openDialog(!1)},e.prototype.closeDialog=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},e.prototype.checkVideoBack=function(e){"#text"!==e.startContainer.nodeName||0!==e.startOffset||n.i(i.isNullOrUndefined)(e.startContainer.previousSibling)||"VIDEO"!==e.startContainer.previousSibling.nodeName&&!this.isEmbedVidElem(e.startContainer.previousSibling)?"#text"===e.startContainer.nodeName||n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset-1])||"VIDEO"!==e.startContainer.childNodes[e.startOffset-1].nodeName&&!this.isEmbedVidElem(e.startContainer.childNodes[e.startOffset-1])||this.deletedVid.push(e.startContainer.childNodes[e.startOffset-1]):this.deletedVid.push(e.startContainer.previousSibling)},e.prototype.checkVideoDel=function(e){"#text"!==e.startContainer.nodeName||e.startOffset!==e.startContainer.textContent.length||n.i(i.isNullOrUndefined)(e.startContainer.nextSibling)||"VIDEO"!==e.startContainer.nextSibling.nodeName&&!this.isEmbedVidElem(e.startContainer.nextSibling)?"#text"===e.startContainer.nodeName||n.i(i.isNullOrUndefined)(e.startContainer.childNodes[e.startOffset])||"VIDEO"!==e.startContainer.childNodes[e.startOffset].nodeName&&!this.isEmbedVidElem(e.startContainer.childNodes[e.startOffset])||this.deletedVid.push(e.startContainer.childNodes[e.startOffset]):this.deletedVid.push(e.startContainer.nextSibling)},e.prototype.alignmentSelect=function(e){var t=e.item;if(document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))&&"Videos"===t.command){var r=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),s=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(r);s="VIDEO"===s[0].nodeName?s:[this.videoEle];var a={args:e,selectNode:s};switch(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),t.subCommand){case"JustifyLeft":case"JustifyCenter":case"JustifyRight":this.alignVideo(a,t.subCommand);break;case"Inline":this.inline(a);break;case"Break":this.break(a)}this.quickToolObj&&document.body.contains(this.quickToolObj.videoQTBar.element)&&(this.quickToolObj.videoQTBar.hidePopup(),n.i(i.removeClass)([s[0]],o._51)),this.cancelResizeAction()}},e.prototype.deleteVideo=function(e,t){if("VIDEO"===e.selectNode[0].nodeName||this.isEmbedVidElem(e.selectNode[0])){this.isEmbedVidElem(e.selectNode[0])&&(e.selectNode[0]=e.selectNode[0].classList.contains(o.W)?e.selectNode[0]:e.selectNode[0].parentElement);var s={element:this.isEmbedVidElem(e.selectNode[0])?e.selectNode[0]:e.selectNode[0].querySelector("iframe"),src:this.isEmbedVidElem(e.selectNode[0])?e.selectNode[0].querySelector("iframe").getAttribute("src"):e.selectNode[0].querySelector("source").getAttribute("src")};0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),e.selection.restore(),this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.videoRemovePost(s.src),this.quickToolObj&&document.body.contains(this.quickToolObj.videoQTBar.element)&&this.quickToolObj.videoQTBar.hidePopup(),this.cancelResizeAction(),n.i(i.isNullOrUndefined)(t)&&this.parent.trigger(r._67,s)}},e.prototype.videoRemovePost=function(e){var t=this,r="";if(!n.i(i.isNullOrUndefined)(this.parent.insertVideoSettings.removeUrl)&&""!==this.parent.insertVideoSettings.removeUrl){r=e.indexOf("http://")>-1||e.indexOf("https://")>-1?e:new URL(e,document.baseURI).href,this.removingVideoName=r.replace(/^.*[\\\/]/,"");var o=new XMLHttpRequest;o.addEventListener("readystatechange",function(){4===this.readyState&&200===this.status&&t.triggerPost(this.response)}),o.open("GET",r),o.responseType="blob",o.send()}},e.prototype.triggerPost=function(e){var t=this.parent.insertVideoSettings.removeUrl;if(!n.i(i.isNullOrUndefined)(t)&&""!==t){var r=new File([e],this.removingVideoName),o=new i.Ajax(t,"POST",!0,null),s=new FormData;s.append("UploadFiles",r),o.send(s)}},e.prototype.onDocumentClick=function(e){var t=e.target;("VIDEO"===t.nodeName||this.isEmbedVidElem(t))&&(this.videoEle=this.isEmbedVidElem(t)?t.querySelector("iframe"):t),!n.i(i.isNullOrUndefined)(this.dialogObj)&&(!n.i(i.closest)(t,"[id='"+this.dialogObj.element.id+"']")&&this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()&&!this.parent.getToolbarElement().contains(e.target)||this.parent.getToolbarElement()&&this.parent.getToolbarElement().contains(e.target)&&!n.i(i.closest)(t,"#"+this.parent.getID()+"_toolbar_Video")&&!t.querySelector("#"+this.parent.getID()+"_toolbar_Video"))&&(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight||(this.dialogObj.hide({returnValue:!0}),this.parent.isBlur=!0,n.i(d.l)(this.parent.element,"focusout"))),this.contentModule.getEditPanel().querySelector(".e-vid-resize")&&("VIDEO"===t.tagName||this.isEmbedVidElem(t)||this.removeResizeEle(),"VIDEO"===t.tagName||this.isEmbedVidElem(t)||n.i(i.isNullOrUndefined)(this.videoEle)?n.i(i.isNullOrUndefined)(this.prevSelectedVidEle)||this.prevSelectedVidEle===("IFRAME"===t.tagName||"VIDEO"===t.tagName?t:t.querySelector("iframe"))||(this.prevSelectedVidEle.style.outline=""):this.videoEle.style.outline="")},e.prototype.removeResizeEle=function(){i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchMoveEvent,this.resizing),i.EventHandler.remove(this.contentModule.getDocument(),i.Browser.touchEndEvent,this.resizeEnd),n.i(i.detach)(this.contentModule.getEditPanel().querySelector(".e-vid-resize"))},e.prototype.onWindowResize=function(){n.i(i.isNullOrUndefined)(this.contentModule)||n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector(".e-vid-resize"))||this.cancelResizeAction()},e.prototype.break=function(e){if("VIDEO"===e.selectNode[0].nodeName||this.isEmbedVidElem(e.selectNode[0])){var t=e.args.item?e.args.item.subCommand:"Break";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.inline=function(e){if("VIDEO"===e.selectNode[0].nodeName||this.isEmbedVidElem(e.selectNode[0])){var t=e.args.item?e.args.item.subCommand:"Inline";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},e.prototype.alignVideo=function(e,t){var n=e.args.item?e.args.item.subCommand:t;this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:n})},e.prototype.editAreaClickHandler=function(e){if(this.parent.readonly)return void this.hideVideoQuickToolbar();var t=e.args,s=this.parent.quickToolbarSettings.showOnRightClick;if(2===t.which||s&&1===t.which||!s&&3===t.which)return void(!s||1!==t.which||n.i(i.isNullOrUndefined)(t.target)||"VIDEO"!==t.target.tagName&&!this.isEmbedVidElem(t.target)||(this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),t.target)));if("HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.videoQTBar){this.quickToolObj=this.parent.quickToolbarModule;var a=t.target;this.contentModule=this.rendererFactory.getRenderer(l.a.Content);var d=this.quickToolObj.videoQTBar.element.classList.contains("e-rte-pop");if(("VIDEO"===a.nodeName||this.isEmbedVidElem(a))&&this.parent.quickToolbarModule){if(d)return;this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),a),n.i(c.b)()&&this.parent.notify(r._18,e),n.i(i.addClass)([this.isEmbedVidElem(a)?a.querySelector("iframe"):a],o._51),this.showVideoQuickToolbar({args:t,type:"Videos",elements:[t.target]})}else this.hideVideoQuickToolbar()}},e.prototype.showVideoQuickToolbar=function(e){var t=this;if(!("Videos"!==e.type||!n.i(i.isNullOrUndefined)(e.args)&&2===e.args.detail||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule)||n.i(i.isNullOrUndefined)(this.parent.quickToolbarModule.videoQTBar)||n.i(i.isNullOrUndefined)(e.args))){this.quickToolObj=this.parent.quickToolbarModule;var r=e.args,s=e.elements;[].forEach.call(e.elements,function(e,t){0===t&&(s=e)}),("VIDEO"===s.tagName||this.isEmbedVidElem(s))&&n.i(i.addClass)([this.isEmbedVidElem(s)&&"IFRAME"!==s.tagName?s.querySelector("iframe"):s],[o._51]);var a=this.parent.iframeSettings.enable?window.pageYOffset+this.parent.element.getBoundingClientRect().top+r.clientY:r.pageY;this.parent.quickToolbarModule.videoQTBar&&(e.isNotify?setTimeout(function(){t.parent.formatter.editorManager.nodeSelection.Clear(t.contentModule.getDocument()),t.parent.formatter.editorManager.nodeSelection.setSelectionContents(t.contentModule.getDocument(),s),t.quickToolObj.videoQTBar.showPopup(r.pageX-50,a+s.getBoundingClientRect().height/2-s.offsetTop,s)},400):this.quickToolObj.videoQTBar.showPopup(r.pageX-50,a+s.getBoundingClientRect().height/2-s.offsetTop,s))}},e.prototype.hideVideoQuickToolbar=function(){n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector("."+o._51))||(n.i(i.removeClass)([this.contentModule.getEditPanel().querySelector("."+o._51)],o._51),n.i(i.isNullOrUndefined)(this.videoEle)||(this.videoEle.style.outline=""),n.i(i.isNullOrUndefined)(this.contentModule.getEditPanel().querySelector(".e-vid-resize"))||n.i(i.detach)(this.contentModule.getEditPanel().querySelector(".e-vid-resize")),this.quickToolObj&&this.quickToolObj.videoQTBar&&document.body.contains(this.quickToolObj.videoQTBar.element)&&this.quickToolObj.videoQTBar.hidePopup())},e.prototype.isEmbedVidElem=function(e){return!!(e&&3!==e.nodeType&&"BR"!==e.nodeName&&e.classList&&e.classList.contains(o.W)||e&&"IFRAME"===e.nodeName)},e.prototype.insertingVideo=function(e){if(this.insertVideo(e),!n.i(i.isNullOrUndefined)(this.dialogObj)){this.dialogObj.element.style.maxHeight="inherit";var t=this.dialogObj.element.querySelector(".e-video-content");n.i(i.isNullOrUndefined)(this.parent.insertVideoSettings.path)&&"HTML"!==this.parent.editorMode?t.querySelector(".e-video-url").focus():document.getElementById(this.rteID+"_insertVideo").focus()}},e.prototype.insertVideo=function(e){var t=this;if(this.dialogObj)return void this.dialogObj.hide({returnValue:!0});var r=this.parent.createElement("div",{className:"e-rte-video-dialog",id:this.rteID+"_video"});this.parent.element.appendChild(r);var s=this.i10n.getConstant("dialogInsert"),a=this.i10n.getConstant("dialogCancel"),l=this.i10n.getConstant("videoHeader"),d=e.selection,c={selfVideo:this,selection:e.selection,args:e.args,selectParent:e.selectParent},u={header:l,cssClass:o._12,enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:i.Browser.isDevice?"290px":"340px",isModal:i.Browser.isDevice,buttons:[{click:this.insertVideoUrl.bind(c),buttonModel:{content:s,cssClass:"e-flat e-insertVideo",isPrimary:!0,disabled:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel",content:a}}],target:i.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){t.isVideoUploaded&&t.uploadObj.removing(),t.parent.isBlur=!1,e&&e.event.returnValue&&"HTML"===t.parent.editorMode&&d.restore(),t.dialogObj.destroy(),n.i(i.detach)(t.dialogObj.element),t.dialogRenderObj.close(e),t.dialogObj=null}},h=this.parent.createElement("div",{className:"e-video-content"});n.i(i.isNullOrUndefined)(this.parent.insertVideoSettings.path)&&"HTML"!==this.parent.editorMode||h.appendChild(this.videoUpload(e));var p=this.parent.createElement("div",{className:"e-videoheader"}),m=this.parent.createElement("div",{className:"e-embed-videoheader"}),f=this.i10n.getConstant("videoLinkHeader"),g=this.i10n.getConstant("embedVideoLinkHeader");"HTML"===this.parent.editorMode&&(p.innerHTML=f,m.innerHTML=g),h.appendChild(this.urlPopup(e)),e.selectNode&&1===e.selectNode[0].nodeType&&("VIDEO"===e.selectNode[0].tagName||this.isEmbedVidElem(e.selectNode[0]))?(u.header=this.parent.localeObj.getConstant("editVideoHeader"),u.content=h):u.content=h,this.dialogObj=this.dialogRenderObj.render(u),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(r),e.selectNode&&1===e.selectNode[0].nodeType&&("VIDEO"===e.selectNode[0].tagName||this.isEmbedVidElem(e.selectNode[0]))&&"insertVideo"===e.name&&(this.dialogObj.element.querySelector(".e-insertVideo").textContent=this.parent.localeObj.getConstant("dialogUpdate")),r.style.maxHeight="inherit",this.quickToolObj&&(this.quickToolObj.videoQTBar&&document.body.contains(this.quickToolObj.videoQTBar.element)&&(this.quickToolObj.videoQTBar.hidePopup(),n.i(i.isNullOrUndefined)(e.selectParent)||n.i(i.removeClass)([e.selectParent[0]],o._51)),this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup(),this.quickToolObj.textQTBar&&this.parent.element.ownerDocument.body.contains(this.quickToolObj.textQTBar.element)&&this.quickToolObj.textQTBar.hidePopup())},e.prototype.urlPopup=function(e){var t=this,r=this.parent.createElement("div",{className:"e-video-url-wrap"}),o=this.parent.createElement("div",{id:"urlcontent"}),s=this.i10n.getConstant("videoUrl"),l=n.i(d.m)('<input id="embedURL" type="radio"><input id="webURL" type="radio" >');return r.appendChild(l),r.appendChild(o),this.embedInputUrl=this.parent.createElement("textarea",{className:"e-input e-embed-video-url",attrs:{placeholder:this.i10n.getConstant("pasteEmbeddedCodeHere"),type:"text",tabindex:"-1","aria-label":this.i10n.getConstant("embedVideoLinkHeader")}}),this.embedInputUrl.addEventListener("keyup",function(){n.i(i.isNullOrUndefined)(t.embedInputUrl)||(0===t.embedInputUrl.value.length?t.dialogObj.getButtons(0).element.disabled=!0:t.dialogObj.getButtons(0).element.removeAttribute("disabled"))}),this.inputUrl=this.parent.createElement("input",{className:"e-input e-video-url",attrs:{placeholder:s,spellcheck:"false"}}),this.inputUrl.addEventListener("input",function(){n.i(i.isNullOrUndefined)(t.inputUrl)||(0===t.inputUrl.value.length?t.dialogObj.getButtons(0).element.disabled=!0:t.dialogObj.getButtons(0).element.removeAttribute("disabled"))}),new a.RadioButton({label:this.i10n.getConstant("embeddedCode"),checked:!0,name:"URL",created:function(){o.appendChild(t.embedInputUrl)},change:function(){o.innerHTML="",t.inputUrl.value="",o.appendChild(t.embedInputUrl)}}).appendTo(r.querySelector("#embedURL")),new a.RadioButton({label:this.i10n.getConstant("webUrl"),name:"URL",change:function(){o.innerHTML="",t.embedInputUrl.value="",o.appendChild(t.inputUrl)}}).appendTo(r.querySelector("#webURL")),r},e.prototype.videoUpload=function(e){var t,o,l=this,c=this,u=c.parent.iframeSettings.enable;if("HTML"===c.parent.editorMode&&(!u&&n.i(i.isNullOrUndefined)(n.i(i.closest)(e.selection.range.startContainer.parentNode,"[id='"+this.parent.contentModule.getPanel().id+"']"))||u&&!n.i(d.b)(e.selection.range.startContainer.parentNode.ownerDocument.querySelector("body"),"e-lib"))){this.contentModule.getEditPanel().focus();var h=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());t=this.parent.formatter.editorManager.nodeSelection.save(h,this.parent.contentModule.getDocument()),o=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(h)}else t=e.selection,o=e.selectParent;var p=this.parent.createElement("div",{className:"e-vid-uploadwrap e-droparea"}),m=this.i10n.getConstant("videoDeviceUploadMessage"),f=this.i10n.getConstant("videoUploadMessage"),g=this.parent.createElement("span",{className:"e-droptext"}),b=this.parent.createElement("span",{className:"e-rte-upload-text",innerHTML:i.Browser.isDevice?m:f});g.appendChild(b);var v=this.parent.createElement("button",{className:"e-browsebtn",id:this.rteID+"_insertVideo",attrs:{autofocus:"true",type:"button"}});g.appendChild(v),p.appendChild(g);var C=this.i10n.getConstant("browse"),y=new a.Button({content:C,enableRtl:this.parent.enableRtl});y.isStringTemplate=!0,y.createElement=this.parent.createElement,y.appendTo(v);var N=i.Browser.isDevice?g:v;i.EventHandler.add(N,"click",this.fileSelect,this);var E=this.parent.createElement("input",{id:this.rteID+"_upload",attrs:{type:"File",name:"UploadFiles"}});p.appendChild(E);var S,T,O;return this.uploadObj=new s.Uploader({asyncSettings:{saveUrl:this.parent.insertVideoSettings.saveUrl,removeUrl:this.parent.insertVideoSettings.removeUrl},dropArea:g,multiple:!1,enableRtl:this.parent.enableRtl,allowedExtensions:this.parent.insertVideoSettings.allowedTypes.toString(),selected:function(e){c.isVideoUploaded=!0,T=e,O=e.filesData,l.parent.trigger(r._61,T,function(e){if(!e.cancel&&(l.checkExtension(e.filesData[0]),S=e.filesData[0].name,"HTML"===l.parent.editorMode&&n.i(i.isNullOrUndefined)(l.parent.insertVideoSettings.path))){var r=new FileReader;r.addEventListener("load",function(e){var s="Base64"===l.parent.insertVideoSettings.saveFormat?r.result:URL.createObjectURL(n.i(d.v)(r.result));c.uploadUrl={url:s,selection:t,fileName:S,selectParent:o},c.inputUrl.setAttribute("disabled","true"),c.embedInputUrl.setAttribute("disabled","true"),n.i(i.isNullOrUndefined)(c.parent.insertVideoSettings.saveUrl)&&l.isAllowedTypes&&!n.i(i.isNullOrUndefined)(l.dialogObj)&&l.dialogObj.getButtons(0).element.removeAttribute("disabled")}),r.readAsDataURL(e.filesData[0].rawFile)}})},beforeUpload:function(e){l.parent.trigger(r._71,e)},uploading:function(e){l.parent.isServerRendered||l.parent.trigger(r._62,e)},success:function(e){l.parent.trigger(r._63,e,function(e){if(!n.i(i.isNullOrUndefined)(l.parent.insertVideoSettings.path)){var r=l.parent.insertVideoSettings.path+e.file.name;c.uploadUrl={url:r,selection:t,fileName:S,selectParent:o,width:{width:c.parent.insertVideoSettings.width,minWidth:c.parent.insertVideoSettings.minWidth,maxWidth:c.parent.getInsertImgMaxWidth()},height:{height:c.parent.insertVideoSettings.height,minHeight:c.parent.insertVideoSettings.minHeight,maxHeight:c.parent.insertVideoSettings.maxHeight}},c.embedInputUrl.setAttribute("disabled","true")}"upload"!==e.operation||n.i(i.isNullOrUndefined)(l.dialogObj)||l.dialogObj.getButtons(0).element.removeAttribute("disabled")})},failure:function(e){l.parent.trigger(r._64,e)},removing:function(){l.parent.trigger(r._65,e,function(e){c.isVideoUploaded=!1,l.dialogObj.getButtons(0).element.disabled=!0,c.embedInputUrl.removeAttribute("disabled"),c.uploadUrl&&(c.uploadUrl.url="")})}}),this.uploadObj.isStringTemplate=!0,this.uploadObj.createElement=this.parent.createElement,this.uploadObj.appendTo(E),p},e.prototype.checkExtension=function(e){this.uploadObj.allowedExtensions&&(-1===this.uploadObj.allowedExtensions.toLocaleLowerCase().indexOf(("."+e.type).toLocaleLowerCase())?(this.dialogObj.getButtons(0).element.setAttribute("disabled","disabled"),this.isAllowedTypes=!1):this.isAllowedTypes=!0)},e.prototype.fileSelect=function(){return this.dialogObj.element.getElementsByClassName("e-file-select-wrap")[0].querySelector("button").click(),!1},e.prototype.cancelDialog=function(e){this.parent.isBlur=!1,this.dialogObj.hide({returnValue:!0}),this.isVideoUploaded&&this.uploadObj.removing()},e.prototype.insertVideoUrl=function(e){var t=this.selfVideo;t.isVideoUploaded=!1;var r=t.inputUrl.value,s=t.embedInputUrl.value;if(0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData(),n.i(i.isNullOrUndefined)(t.uploadUrl)||""===t.uploadUrl.url){if("HTML"===t.parent.editorMode&&(""!==r||""!==s)){if("HTML"===t.parent.editorMode&&n.i(i.isNullOrUndefined)(n.i(i.closest)(this.selection.range.startContainer.parentNode,"[id='"+t.contentModule.getPanel().id+"']"))){t.contentModule.getEditPanel().focus();var a=t.parent.formatter.editorManager.nodeSelection.getRange(t.contentModule.getDocument());this.selection=t.parent.formatter.editorManager.nodeSelection.save(a,t.contentModule.getDocument()),this.selectParent=t.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(a)}var l=""!==r?r.split("/")[r.split("/").length-1]:s,d={cssClass:"Inline"===t.parent.insertVideoSettings.layoutOption?o._5:o.Z,url:r,selection:this.selection,fileName:l,isEmbedUrl:""!==s,selectParent:this.selectParent,width:{width:t.parent.insertVideoSettings.width,minWidth:t.parent.insertVideoSettings.minWidth,maxWidth:t.parent.getInsertImgMaxWidth()},height:{height:t.parent.insertVideoSettings.height,minHeight:t.parent.insertVideoSettings.minHeight,maxHeight:t.parent.insertVideoSettings.maxHeight}};t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,d),t.dialogObj.hide({returnValue:!1})}}else t.uploadUrl.cssClass="Inline"===t.parent.insertVideoSettings.layoutOption?o._5:o.Z,t.dialogObj.hide({returnValue:!1}),t.parent.formatter.process(t.parent,this.args,this.args.originalEvent,t.uploadUrl),t.uploadUrl.url=""},e.prototype.destroy=function(){this.prevSelectedVidEle=void 0,this.removeEventListener()},e.prototype.getModuleName=function(){return"video"},e}()},function(e,t,n){"use strict";var i=n(32);n.d(t,"a",function(){return i.a});var r=n(31);n.d(t,"b",function(){return r.a})},function(e,t){e.exports=s}])});
|