@dangl/angular-material-shared 2.2.0 → 2.3.0-beta0037
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/{esm2015/dangl-angular-material-shared.js → esm2020/dangl-angular-material-shared.mjs} +0 -0
- package/esm2020/lib/angular-material-shared.module.mjs +38 -0
- package/esm2020/lib/components/footer/footer.component.mjs +33 -0
- package/esm2020/lib/components/header/header.component.mjs +80 -0
- package/esm2020/lib/components/tiny-mce/tiny-mce.component.mjs +104 -0
- package/{esm2015/lib/models/footer-options.js → esm2020/lib/models/footer-options.mjs} +0 -0
- package/{esm2015/lib/utils/guid-generator.js → esm2020/lib/utils/guid-generator.mjs} +0 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/fesm2015/dangl-angular-material-shared.mjs +292 -0
- package/fesm2015/dangl-angular-material-shared.mjs.map +1 -0
- package/fesm2020/dangl-angular-material-shared.mjs +290 -0
- package/fesm2020/dangl-angular-material-shared.mjs.map +1 -0
- package/{dangl-angular-material-shared.d.ts → index.d.ts} +1 -0
- package/lib/angular-material-shared.module.d.ts +12 -0
- package/lib/components/footer/footer.component.d.ts +3 -0
- package/lib/components/header/header.component.d.ts +3 -0
- package/lib/components/tiny-mce/tiny-mce.component.d.ts +3 -0
- package/package.json +28 -16
- package/styles/material-style.scss +1 -1
- package/styles/material-theme.scss +4 -3
- package/styles/material-variables.scss +9 -8
- package/tinymce-assets/icons/default/icons.js +11 -1
- package/tinymce-assets/icons/default/icons.min.js +1 -1
- package/tinymce-assets/langs/cs.js +118 -75
- package/tinymce-assets/langs/cy.js +61 -18
- package/tinymce-assets/langs/da.js +60 -17
- package/tinymce-assets/langs/de.js +60 -17
- package/tinymce-assets/langs/eo.js +334 -138
- package/tinymce-assets/langs/es_ES.js +32 -2
- package/tinymce-assets/langs/fa.js +60 -17
- package/tinymce-assets/langs/fa_IR.js +31 -1
- package/tinymce-assets/langs/fr_FR.js +60 -17
- package/tinymce-assets/langs/hu_HU.js +60 -17
- package/tinymce-assets/langs/ja.js +60 -17
- package/tinymce-assets/langs/ko_KR.js +3 -3
- package/tinymce-assets/langs/nb_NO.js +61 -18
- package/tinymce-assets/langs/nl.js +60 -17
- package/tinymce-assets/langs/pl.js +60 -17
- package/tinymce-assets/langs/pt_BR.js +60 -17
- package/tinymce-assets/langs/pt_PT.js +60 -17
- package/tinymce-assets/langs/ro.js +60 -17
- package/tinymce-assets/langs/ro_RO.js +32 -2
- package/tinymce-assets/langs/ru.js +60 -17
- package/tinymce-assets/langs/ru_RU.js +445 -0
- package/tinymce-assets/langs/sl.js +59 -14
- package/tinymce-assets/langs/ta.js +60 -17
- package/tinymce-assets/langs/ta_IN.js +60 -17
- package/tinymce-assets/langs/th_TH.js +60 -17
- package/tinymce-assets/langs/tr_TR.js +81 -8
- package/tinymce-assets/langs/vi.js +179 -21
- package/tinymce-assets/langs/zh_CN.js +60 -17
- package/tinymce-assets/plugins/advlist/plugin.js +29 -48
- package/tinymce-assets/plugins/advlist/plugin.min.js +2 -2
- package/tinymce-assets/plugins/anchor/plugin.js +8 -8
- package/tinymce-assets/plugins/anchor/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autolink/plugin.js +58 -30
- package/tinymce-assets/plugins/autolink/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autoresize/plugin.js +25 -12
- package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autosave/plugin.js +9 -9
- package/tinymce-assets/plugins/autosave/plugin.min.js +2 -2
- package/tinymce-assets/plugins/bbcode/plugin.js +6 -6
- package/tinymce-assets/plugins/bbcode/plugin.min.js +2 -2
- package/tinymce-assets/plugins/charmap/plugin.js +39 -49
- package/tinymce-assets/plugins/charmap/plugin.min.js +2 -2
- package/tinymce-assets/plugins/code/plugin.js +9 -10
- package/tinymce-assets/plugins/code/plugin.min.js +2 -2
- package/tinymce-assets/plugins/codesample/plugin.js +1921 -1914
- package/tinymce-assets/plugins/codesample/plugin.min.js +2 -2
- package/tinymce-assets/plugins/colorpicker/plugin.js +1 -2
- package/tinymce-assets/plugins/colorpicker/plugin.min.js +2 -2
- package/tinymce-assets/plugins/contextmenu/plugin.js +1 -2
- package/tinymce-assets/plugins/contextmenu/plugin.min.js +2 -2
- package/tinymce-assets/plugins/directionality/plugin.js +186 -53
- package/tinymce-assets/plugins/directionality/plugin.min.js +2 -2
- package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1572 -1572
- package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/js/emojis.js +1572 -1572
- package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/plugin.js +231 -200
- package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -2
- package/tinymce-assets/plugins/fullpage/plugin.js +42 -42
- package/tinymce-assets/plugins/fullpage/plugin.min.js +2 -2
- package/tinymce-assets/plugins/fullscreen/plugin.js +496 -129
- package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -2
- package/tinymce-assets/plugins/help/plugin.js +101 -122
- package/tinymce-assets/plugins/help/plugin.min.js +2 -2
- package/tinymce-assets/plugins/hr/plugin.js +9 -10
- package/tinymce-assets/plugins/hr/plugin.min.js +2 -2
- package/tinymce-assets/plugins/image/plugin.js +78 -73
- package/tinymce-assets/plugins/image/plugin.min.js +2 -2
- package/tinymce-assets/plugins/imagetools/plugin.js +484 -307
- package/tinymce-assets/plugins/imagetools/plugin.min.js +2 -2
- package/tinymce-assets/plugins/importcss/plugin.js +50 -51
- package/tinymce-assets/plugins/importcss/plugin.min.js +2 -2
- package/tinymce-assets/plugins/insertdatetime/plugin.js +22 -17
- package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -2
- package/tinymce-assets/plugins/legacyoutput/plugin.js +8 -8
- package/tinymce-assets/plugins/legacyoutput/plugin.min.js +2 -2
- package/tinymce-assets/plugins/link/plugin.js +131 -125
- package/tinymce-assets/plugins/link/plugin.min.js +2 -2
- package/tinymce-assets/plugins/lists/plugin.js +256 -229
- package/tinymce-assets/plugins/lists/plugin.min.js +2 -2
- package/tinymce-assets/plugins/media/plugin.js +124 -147
- package/tinymce-assets/plugins/media/plugin.min.js +2 -2
- package/tinymce-assets/plugins/nonbreaking/plugin.js +13 -14
- package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -2
- package/tinymce-assets/plugins/noneditable/plugin.js +6 -6
- package/tinymce-assets/plugins/noneditable/plugin.min.js +2 -2
- package/tinymce-assets/plugins/pagebreak/plugin.js +16 -17
- package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -2
- package/tinymce-assets/plugins/paste/plugin.js +196 -157
- package/tinymce-assets/plugins/paste/plugin.min.js +2 -2
- package/tinymce-assets/plugins/preview/plugin.js +13 -14
- package/tinymce-assets/plugins/preview/plugin.min.js +2 -2
- package/tinymce-assets/plugins/print/plugin.js +13 -14
- package/tinymce-assets/plugins/print/plugin.min.js +2 -2
- package/tinymce-assets/plugins/quickbars/plugin.js +33 -48
- package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -2
- package/tinymce-assets/plugins/save/plugin.js +9 -8
- package/tinymce-assets/plugins/save/plugin.min.js +2 -2
- package/tinymce-assets/plugins/searchreplace/plugin.js +73 -70
- package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -2
- package/tinymce-assets/plugins/spellchecker/plugin.js +22 -23
- package/tinymce-assets/plugins/spellchecker/plugin.min.js +2 -2
- package/tinymce-assets/plugins/tabfocus/plugin.js +21 -20
- package/tinymce-assets/plugins/tabfocus/plugin.min.js +2 -2
- package/tinymce-assets/plugins/table/plugin.js +2831 -2264
- package/tinymce-assets/plugins/table/plugin.min.js +2 -2
- package/tinymce-assets/plugins/template/plugin.js +84 -70
- package/tinymce-assets/plugins/template/plugin.min.js +2 -2
- package/tinymce-assets/plugins/textcolor/plugin.js +1 -2
- package/tinymce-assets/plugins/textcolor/plugin.min.js +2 -2
- package/tinymce-assets/plugins/textpattern/plugin.js +76 -96
- package/tinymce-assets/plugins/textpattern/plugin.min.js +2 -2
- package/tinymce-assets/plugins/toc/plugin.js +31 -29
- package/tinymce-assets/plugins/toc/plugin.min.js +2 -2
- package/tinymce-assets/plugins/visualblocks/plugin.js +10 -11
- package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -2
- package/tinymce-assets/plugins/visualchars/plugin.js +52 -67
- package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -2
- package/tinymce-assets/plugins/wordcount/plugin.js +67 -58
- package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -2
- package/tinymce-assets/skins/ui/oxide/content.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.inline.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.css +35 -22
- package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +7 -7
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.css +35 -22
- package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +7 -7
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -1
- package/tinymce-assets/themes/mobile/theme.js +2798 -3255
- package/tinymce-assets/themes/mobile/theme.min.js +2 -2
- package/tinymce-assets/themes/silver/theme.js +25400 -25371
- package/tinymce-assets/themes/silver/theme.min.js +2 -2
- package/bundles/dangl-angular-material-shared.umd.js +0 -285
- package/bundles/dangl-angular-material-shared.umd.js.map +0 -1
- package/dangl-angular-material-shared.metadata.json +0 -1
- package/esm2015/lib/angular-material-shared.module.js +0 -25
- package/esm2015/lib/components/footer/footer.component.js +0 -27
- package/esm2015/lib/components/header/header.component.js +0 -67
- package/esm2015/lib/components/tiny-mce/tiny-mce.component.js +0 -100
- package/fesm2015/dangl-angular-material-shared.js +0 -259
- package/fesm2015/dangl-angular-material-shared.js.map +0 -1
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
|
-
!function(){"use strict";var t,e,n,r,a,o,d=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},i=tinymce.util.Tools.resolve("tinymce.PluginManager"),P=function(e){return!(null===(t=e)||t===undefined);var t},s=function(e){return typeof e===t},u=function(){},l=function(e){return function(){return e}},c=l(!(t="function")),f=l(!0),m=function(){return p},p=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:c,isSome:c,isNone:f,getOr:r=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(undefined),or:r,orThunk:n,map:m,each:u,bind:m,exists:c,forall:f,filter:m,equals:e,equals_:e,toArray:function(){return[]},toString:l("none()")}),g=function(n){var e=l(n),t=function(){return a},r=function(e){return e(n)},a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:f,isNone:c,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return g(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?a:p},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(c,function(e){return t(n,e)})}};return a},v={some:g,none:m,from:function(e){return null===e||e===undefined?p:g(e)}},h=Array.prototype.slice,y=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return!0}return!1},b=function(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var o=e[a];r[a]=t(o,a)}return r},x=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}},w=s(Array.from)?Array.from:function(e){return h.call(e)},_=function(){var t=d(v.none());return{clear:function(){return t.set(v.none())},set:function(e){return t.set(v.some(e))},isSet:function(){return t.get().isSome()},on:function(e){return t.get().each(e)}}},C=function(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t},T=tinymce.util.Tools.resolve("tinymce.Env"),D=tinymce.util.Tools.resolve("tinymce.util.Delay"),k=tinymce.util.Tools.resolve("tinymce.util.Promise"),S=tinymce.util.Tools.resolve("tinymce.util.VK"),O=function(e,t){return e.fire("PastePlainTextToggle",{state:t})},j=tinymce.util.Tools.resolve("tinymce.util.Tools"),R=function(e){return e.getParam("paste_data_images",!1)},A=function(e){return e.getParam("paste_retain_style_properties")},I=function(e){return e.getParam("validate")},F=function(e){return e.getParam("paste_data_images",!1,"boolean")},E=function(e){return j.explode(e.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))},M="x-tinymce/html",N="\x3c!-- "+M+" --\x3e",B=function(e){return-1!==e.indexOf(N)},L=tinymce.util.Tools.resolve("tinymce.html.Entities"),H=function(e,t,n){var r=e.split(/\n\n/),a=function(e,t){var n,r=[],a="<"+e;if("object"==typeof t){for(n in t)t.hasOwnProperty(n)&&r.push(n+'="'+L.encodeAllRaw(t[n])+'"');r.length&&(a+=" "+r.join(" "))}return a+">"}(t,n),o="</"+t+">",i=j.map(r,function(e){return e.split(/\n/).join("<br />")});return 1===i.length?i[0]:j.map(i,function(e){return a+e+o}).join("")},$=tinymce.util.Tools.resolve("tinymce.html.DomParser"),z=tinymce.util.Tools.resolve("tinymce.html.Serializer"),U=tinymce.util.Tools.resolve("tinymce.html.Node"),q=tinymce.util.Tools.resolve("tinymce.html.Schema"),V=function(t,e){return j.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t},K=function(e){return e=V(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},X=function(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)},W=function(e){for(var a,o,i=1,n=function(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)for(;t+=n(e),e=e.next;);return t},s=function(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!s(e,t))return!1}while(e=e.next);return!0},u=function(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)for(;u(e),e=e.next;);},t=function(e,t,n){var r=e._listLevel||i;r!==i&&(a=r<i?a&&a.parent.parent:(o=a,null)),a&&a.name===t?a.append(e):(o=o||a,a=new U(t,1),1<n&&a.attr("start",""+n),e.wrap(a)),e.name="li",i<r&&o&&o.lastChild.append(a),i=r,u(e),s(e,/^\u00a0+/),s(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),s(e,/^\u00a0+/)},r=[],l=e.firstChild;null!=l;)if(r.push(l),null!==(l=l.walk()))for(;void 0!==l&&l.parent!==e;)l=l.walk();for(var c=0;c<r.length;c++)if("p"===(e=r[c]).name&&e.firstChild){var f=n(e);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(f)){t(e,"ul");continue}if(function(t){var n;return t=t.replace(/^[\u00a0 ]+/,""),j.each([/^[IVXLMCD]+\.[ \u00a0]/,/^[ivxlmcd]+\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],function(e){if(e.test(t))return!(n=!0)}),n}(f)){var d=/([0-9]+)\./.exec(f),m=1;d&&(m=parseInt(d[1],10)),t(e,"ol",m);continue}if(e._listLevel){t(e,"ul",1);continue}a=null}else o=a,a=null},Y=function(r,e){var a,t=A(r);t&&(a=j.makeMap(t.split(/[, ]/))),e=V(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var n=r.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody"),o=q({valid_elements:n,valid_children:"-li[p]"});j.each(o.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var i=$({},o);i.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)(t=e[n]).attr("style",function(n,r,a,o){var i,s={},e=n.dom.parseStyle(o);return j.each(e,function(e,t){switch(t){case"mso-list":(i=/\w+ \w+([0-9]+)/i.exec(o))&&(a._listLevel=parseInt(i[1],10)),/Ignore/i.test(e)&&a.firstChild&&(a._listIgnore=!0,a.firstChild._listIgnore=!0);break;case"horiz-align":t="text-align";break;case"vert-align":t="vertical-align";break;case"font-color":case"mso-foreground":t="color";break;case"mso-background":case"mso-highlight":t="background";break;case"font-weight":case"font-style":return void("normal"!==e&&(s[t]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void a.remove()}0!==t.indexOf("mso-comment")?0!==t.indexOf("mso-")&&("all"===A(n)||r&&r[t])&&(s[t]=e):a.remove()}),/(bold)/i.test(s["font-weight"])&&(delete s["font-weight"],a.wrap(new U("b",1))),/(italic)/i.test(s["font-style"])&&(delete s["font-style"],a.wrap(new U("i",1))),(s=n.dom.serializeStyle(s,a.name))||null}(r,a,t,t.attr("style"))),"span"===t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),i.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),i.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),i.addNodeFilter("a",function(e){for(var t,n,r,a=e.length;a--;)if(n=(t=e[a]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=(n=n.split("#")[1])&&"#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){t.unwrap();continue}t.attr({href:n,name:r})}else t.unwrap()});var s=i.parse(e);return r.getParam("paste_convert_word_fake_lists",!0)&&W(s),e=z({validate:I(r)},o).serialize(s)},Z=function(e,t){return{content:e,cancelled:t}},G=function(e,t,n,r){var a,o,i,s,u,l,c,f,d,m,p,g,v=(a=t,o=n,i=r,e.fire("PastePreProcess",{content:a,internal:o,wordContent:i})),h=function(e,t){var n=$({},e.schema);n.addNodeFilter("meta",function(e){j.each(e,function(e){e.remove()})});var r=n.parse(t,{forced_root_block:!1,isRootContent:!0});return z({validate:I(e)},e.schema).serialize(r)}(e,v.content);return e.hasEventListeners("PastePostProcess")&&!v.isDefaultPrevented()?(u=h,l=n,c=r,p=(s=e).dom.create("div",{style:"display:none"},u),f=p,d=l,m=c,g=s.fire("PastePostProcess",{node:f,internal:d,wordContent:m}),Z(g.node.innerHTML,g.isDefaultPrevented())):Z(h,v.isDefaultPrevented())},J=function(e,t,n){var r,a,o=X(t),i=o?(a=t,(r=e).getParam("paste_enable_default_filters",!0)?Y(r,a):a):t;return G(e,i,n,o)},Q=function(e,t){return e.insertContent(t,{merge:e.getParam("paste_merge_formats",!0),paste:!0}),!0},ee=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},te=function(e,r){return ee(r)&&y(E(e),function(e){return t=r.toLowerCase(),n="."+e.toLowerCase(),C(t,n,t.length-n.length);var t,n})},ne=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!ee(t))&&(a=t,o=n,(r=e).undoManager.extra(function(){o(r,a)},function(){r.execCommand("mceInsertLink",!1,a)}),!0);var r,a,o},re=function(e,t,n){return!!te(e,t)&&(a=t,o=n,(r=e).undoManager.extra(function(){o(r,a)},function(){r.insertContent('<img src="'+a+'">')}),!0);var r,a,o},ae=function(e,t,n){var r,a;n||!1===e.getParam("smart_paste",!0)?Q(e,t):(r=e,a=t,j.each([ne,re,Q],function(e){return!0!==e(r,a,Q)}))},oe=function(e){return"\n"===e||"\r"===e},ie=function(e,t){var n,r,a,o,i=(n=" ",(r=e.getParam("paste_tab_spaces",4,"number"))<=0?"":new Array(r+1).join(n)),s=t.replace(/\t/g,i);return(o={pcIsSpace:!(a=function(e,t){return-1!==" \f\t\x0B".indexOf(t)||"\xa0"===t?e.pcIsSpace||""===e.str||e.str.length===s.length-1||(n=s,(r=e.str.length+1)<n.length&&0<=r&&oe(n[r]))?{pcIsSpace:!1,str:e.str+"\xa0"}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:oe(t),str:e.str+t};var n,r}),str:""},x(s,function(e){o=a(o,e)}),o).str},se=function(e,t,n,r){var a=J(e,t,n);!1===a.cancelled&&ae(e,a.content,r)},ue=function(e,t,n){var r=n||B(t);se(e,t.replace(N,""),r,!1)},le=function(e,t){var n,r,a,o=e.dom.encode(t).replace(/\r\n/g,"\n"),i=ie(e,o),s=(n=i,r=e.getParam("forced_root_block"),a=e.getParam("forced_root_block_attrs"),r?H(n,!0===r?"p":r,a):n.replace(/\r?\n/g,"<br>"));se(e,s,!1,!0)},ce=function(e){var t,n={};if(e&&(!e.getData||(t=e.getData("Text"))&&0<t.length&&-1===t.indexOf("data:text/mce-internal,")&&(n["text/plain"]=t),e.types))for(var r=0;r<e.types.length;r++){var a=e.types[r];try{n[a]=e.getData(a)}catch(o){n[a]=""}}return n},fe=function(e,t){return t in e&&0<e[t].length},de=function(e){return fe(e,"text/html")||fe(e,"text/plain")},me=(a="mceclip",o=0,function(){return a+o++}),pe=function(e,t){var n,r,a,o,i,s,u,l,c,f,d,m,p,g=(n=t.uri,(r=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(n))?{type:r[1],data:decodeURIComponent(r[2])}:{type:null,data:null}),v=g.data,h=g.type,y=me(),b=t.blob,x=new Image;x.src=t.uri,m=x,!(p=e.getParam("images_dataimg_filter"))||p(m)?(l=void 0,(o=(a=e.editorUpload.blobCache).getByData(v,h))?l=o:(s=(i=e.getParam("images_reuse_filename")&&P(b.name))?(c=e,f=b.name,d=f.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i),P(d)?c.dom.encode(d[1]):null):y,u=i?b.name:undefined,l=a.create(y,b,v,s,u),a.add(l)),ue(e,'<img src="'+l.blobUri()+'">',!1)):ue(e,'<img src="'+t.uri+'">',!1)},ge=function(e){return k.all(b(e,function(r){return new k(function(e){var t=P(r.getAsFile)?r.getAsFile():r,n=new window.FileReader;n.onload=function(){e({blob:t,uri:n.result})},n.readAsDataURL(t)})}))},ve=function(e){var t=E(e);return function(r){return e=r.type,C(e,"image/",0)&&y(t,function(e){return t=e.toLowerCase(),n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"},(j.hasOwn(n,t)?"image/"+n[t]:"image/"+t)===r.type;var t,n});var e}},he=function(t,e,n){var r,a,o,i,s="paste"===e.type?e.clipboardData:e.dataTransfer;if(F(t)&&s){var u=(r=t,o=(a=s).items?b(w(a.items),function(e){return e.getAsFile()}):[],i=a.files?w(a.files):[],function(e,t){for(var n=[],r=0,a=e.length;r<a;r++){var o=e[r];t(o,r)&&n.push(o)}return n}(0<o.length?o:i,ve(r)));if(0<u.length)return e.preventDefault(),ge(u).then(function(e){n&&t.selection.setRng(n),x(e,function(e){pe(t,e)})}),!0}return!1},ye=function(e){return S.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode},be=function(s,v,u){var l,c=_(),f=_();s.on("keyup",f.clear),s.on("keydown",function(e){var t,n=function(e){ye(e)&&!e.isDefaultPrevented()&&v.remove()};if(ye(e)&&!e.isDefaultPrevented()){if((l=e.shiftKey&&86===e.keyCode)&&T.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(e.stopImmediatePropagation(),c.set(e),f.set(!0),T.ie&&l)return e.preventDefault(),t=!0,void s.fire("paste",{ieFake:t});v.remove(),v.create(),s.once("keyup",n),s.once("paste",function(){s.off("keyup",n)})}});var d=function(e,t,n,r,a){var o;fe(t,"text/html")?o=t["text/html"]:(o=v.getHtml(),a=a||B(o),v.isDefaultContent(o)&&(r=!0)),o=K(o),v.remove();var i,s,u,l,c,f,d,m,p=!1===a&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(o),g=ee(o);o.length&&(!p||g)||(r=!0),(r||g)&&(o=fe(t,"text/plain")&&p?t["text/plain"]:(i=o,s=q(),u=$({},s),l="",c=s.getShortEndedElements(),f=j.makeMap("script noscript style textarea video audio iframe object"," "),d=s.getBlockElements(),m=function(e){var t=e.name,n=e;if("br"!==t){if("wbr"!==t)if(c[t]&&(l+=" "),f[t])l+=" ";else{if(3===e.type&&(l+=e.value),!e.shortEnded&&(e=e.firstChild))for(;m(e),e=e.next;);d[t]&&n.next&&(l+="\n","p"===t&&(l+="\n"))}}else l+="\n"},i=V(i,[/<!\[[^\]]+\]>/g]),m(u.parse(i)),l)),v.isDefaultContent(o)?n||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):r?le(e,o):ue(e,o,a)};s.on("paste",function(e){var t=c.isSet()||f.isSet();t&&c.clear();var n,r,a=(n=s,ce(e.clipboardData||n.getDoc().dataTransfer)),o="text"===u.get()||l,i=fe(a,M);l=!1,!(e.isDefaultPrevented()||(r=e.clipboardData,-1!==navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length))&&(de(a)||!he(s,e,v.getLastRng()||s.selection.getRng()))?(t||e.preventDefault(),!T.ie||t&&!e.ieFake||fe(a,"text/html")||(v.create(),s.dom.bind(v.getEl(),"paste",function(e){e.stopPropagation()}),s.getDoc().execCommand("Paste",!1,null),a["text/html"]=v.getHtml()),fe(a,"text/html")?(e.preventDefault(),i=i||B(a["text/html"]),d(s,a,t,o,i)):D.setEditorTimeout(s,function(){d(s,a,t,o,i)},0)):v.remove()})},xe=function(i,e,t){var s;be(i,e,t),i.parser.addNodeFilter("img",function(e,t,n){var r,a=function(e){e.attr("data-mce-object")||s===T.transparentSrc||e.remove()};if(!F(i)&&((r=n).data&&!0===r.data.paste))for(var o=e.length;o--;)(s=e[o].attr("src"))&&(0!==s.indexOf("webkit-fake-url")&&(i.getParam("allow_html_data_urls",!1,"boolean")||0!==s.indexOf("data:"))||a(e[o]))})},Pe=function(e){return T.ie&&e.inline?document.body:e.getBody()},we=function(t,e,n){var r;Pe(r=t)!==r.getBody()&&t.dom.bind(e,"paste keyup",function(e){Te(t,n)||t.fire("paste")})},_e=function(e){return e.dom.get("mcepastebin")},Ce=function(e,t){return t===e},Te=function(e,t){var n,r=_e(e);return(n=r)&&"mcepastebin"===n.id&&Ce(t,r.innerHTML)},De=function(e){var t=d(null),n="%MCEPASTEBIN%";return{create:function(){return function(e,t,n){var r=e.dom,a=e.getBody();t.set(e.selection.getRng());var o=e.dom.add(Pe(e),"div",{id:"mcepastebin","class":"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n);(T.ie||T.gecko)&&r.setStyle(o,"left","rtl"===r.getStyle(a,"direction",!0)?65535:-65535),r.bind(o,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),we(e,o,n),o.focus(),e.selection.select(o,!0)}(e,t,n)},remove:function(){return function(e,t){if(_e(e)){for(var n=void 0,r=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);r&&e.selection.setRng(r)}t.set(null)}(e,t)},getEl:function(){return _e(e)},getHtml:function(){return function(n){var t=function(e,t){e.appendChild(t),n.dom.remove(t,!0)},e=j.grep(Pe(n).childNodes,function(e){return"mcepastebin"===e.id}),r=e.shift();j.each(e,function(e){t(r,e)});for(var a=n.dom.select("div[id=mcepastebin]",r),o=a.length-1;0<=o;o--){var i=n.dom.create("div");r.insertBefore(i,a[o]),t(i,a[o])}return r?r.innerHTML:""}(e)},getLastRng:function(){return t.get()},isDefault:function(){return Te(e,n)},isDefaultContent:function(e){return e===n}}},ke=function(n,r){n.addCommand("mceTogglePlainTextPaste",function(){var e,t;e=n,"text"===(t=r).pasteFormat.get()?(t.pasteFormat.set("html"),O(e,!1)):(t.pasteFormat.set("text"),O(e,!0)),e.focus()}),n.addCommand("mceInsertClipboardContent",function(e,t){t.content&&r.pasteHtml(t.content,t.internal),t.text&&r.pasteText(t.text)})},Se=function(e,t,n){if(r=e,!1!==T.iOS||"function"!=typeof(null==r?void 0:r.setData))return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(M,t),!0}catch(a){return!1}var r},Oe=function(e,t,n,r){Se(e.clipboardData,t.html,t.text)?(e.preventDefault(),r()):n(t.html,r)},je=function(s){return function(e,t){var n=N+e,r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),a=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(a),s.dom.add(s.getBody(),r);var o=s.selection.getRng();a.focus();var i=s.dom.createRng();i.selectNodeContents(a),s.selection.setRng(i),D.setTimeout(function(){s.selection.setRng(o),r.parentNode.removeChild(r),t()},0)}},Re=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},Ae=function(e){return!e.selection.isCollapsed()||!!(t=e).dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody());var t},Ie=function(e){var t,n;e.on("cut",(t=e,function(e){Ae(t)&&Oe(e,Re(t),je(t),function(){var e;T.browser.isChrome()||T.browser.isFirefox()?(e=t.selection.getRng(),D.setEditorTimeout(t,function(){t.selection.setRng(e),t.execCommand("Delete")},0)):t.execCommand("Delete")})})),e.on("copy",(n=e,function(e){Ae(n)&&Oe(e,Re(n),je(n),u)}))},Fe=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Ee=function(e,t){return Fe.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())},Me=function(e,t){e.focus(),e.selection.setRng(t)},Ne=function(i,s,u){i.getParam("paste_block_drop",!1)&&i.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),R(i)||i.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()}),i.on("drop",function(e){var t,n,r,a,o=Ee(i,e);e.isDefaultPrevented()||u.get()||(t=s.getDataTransferItems(e.dataTransfer),n=s.hasContentType(t,M),(!s.hasHtmlOrText(t)||(r=t["text/plain"])&&0===r.indexOf("file://"))&&s.pasteImageData(e,o)||!o||!i.getParam("paste_filter_drop",!0)||(a=t["mce-internal"]||t["text/html"]||t["text/plain"])&&(e.preventDefault(),D.setEditorTimeout(i,function(){i.undoManager.transact(function(){t["mce-internal"]&&i.execCommand("Delete"),Me(i,o),a=K(a),t["text/html"]?s.pasteHtml(a,n):s.pasteText(a)})})))}),i.on("dragstart",function(e){u.set(!0)}),i.on("dragover dragend",function(e){R(i)&&!1===u.get()&&(e.preventDefault(),Me(i,Ee(i,e))),"dragend"===e.type&&u.set(!1)})},Be=function(t,n){t.on("PastePreProcess",function(e){e.content=n(t,e.content,e.internal,e.wordContent)})},Le=function(e,t){if(!X(t))return t;var n=[];j.each(e.schema.getBlockElements(),function(e,t){n.push(t)});var r=new RegExp("(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*","g");return t=V(t,[[r,"$1"]]),t=V(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])},He=function(e,t,n,r){if(r||n)return t;var l,c,f,a=e.getParam("paste_webkit_styles");return!1===e.getParam("paste_remove_styles_if_webkit",!0)||"all"===a?t:(a&&(l=a.split(/[, ]/)),t=(t=l?(c=e.dom,f=e.selection.getNode(),t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,r){var a=c.parseStyle(c.decode(n)),o={};if("none"===l)return t+r;for(var i=0;i<l.length;i++){var s=a[l[i]],u=c.getStyle(f,l[i],!0);/color/.test(l[i])&&(s=c.toHex(s),u=c.toHex(u)),u!==s&&(o[l[i]]=s)}return(o=c.serializeStyle(o,"span"))?t+' style="'+o+'"'+r:t+r})):t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3")).replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r}))},$e=function(n,e){n.$("a",e).find("font,u").each(function(e,t){n.dom.remove(t,!0)})},ze=function(n,r){return function(t){t.setActive("text"===r.pasteFormat.get());var e=function(e){return t.setActive(e.state)};return n.on("PastePlainTextToggle",e),function(){return n.off("PastePlainTextToggle",e)}}};i.add("paste",function(e){if(!1==(!!e.hasPlugin("powerpaste",!0)&&("undefined"!=typeof window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0))){var t=d(!1),n=d(e.getParam("paste_as_text",!1)?"text":"html"),r=(c=n,f=De(l=e),l.on("PreInit",function(){return xe(l,f,c)}),{pasteFormat:c,pasteHtml:function(e,t){return ue(l,e,t)},pasteText:function(e){return le(l,e)},pasteImageData:function(e,t){return he(l,e,t)},getDataTransferItems:ce,hasHtmlOrText:de,hasContentType:fe});i=e,T.webkit&&Be(i,He),T.ie&&(Be(i,Le),u=$e,(s=i).on("PastePostProcess",function(e){u(s,e.node)}));return o=r,(a=e).ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:function(){return a.execCommand("mceTogglePlainTextPaste")},onSetup:ze(a,o)}),a.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:function(){return a.execCommand("mceTogglePlainTextPaste")},onSetup:ze(a,o)}),ke(e,r),function(e){var t=e.plugins.paste,n=e.getParam("paste_preprocess");n&&e.on("PastePreProcess",function(e){n.call(t,t,e)});var r=e.getParam("paste_postprocess");r&&e.on("PastePostProcess",function(e){r.call(t,t,e)})}(e),Ie(e),Ne(e,r,t),{clipboard:r,quirks:void 0}}var a,o,i,s,u,l,c,f})}();
|
|
9
|
+
!function(){"use strict";function w(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function P(e){return!(null==e)}function _(){}function o(e){return function(){return e}}function e(e){return e}function t(){return l}var n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return n=typeof(t=e),"array"==(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n);var t,n},i=o(!(n="function")),s=o(!0),l={fold:function(e,t){return e()},isSome:i,isNone:s,getOr:e,getOrThunk:a,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:e,orThunk:a,map:t,each:_,bind:t,exists:i,forall:s,filter:function(){return l},toArray:function(){return[]},toString:o("none()")};function a(e){return e()}function c(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1}function f(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var o=e[a];r[a]=t(o,a)}return r}function d(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function p(){var e,t,n=(e=_,t=w(le.none()),{clear:function(){r(),t.set(le.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(e){r(),t.set(le.some(e))}});function r(){return t.get().each(e)}return de(de({},n),{on:function(e){return n.get().each(e)}})}function m(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t}function C(e,t){return e.fire("PastePlainTextToggle",{state:t})}function T(e){return e.getParam("paste_data_images",!1)}function g(e){return e.getParam("paste_retain_style_properties")}function h(e){return e.getParam("validate")}function y(e){return e.getParam("paste_data_images",!1,"boolean")}function v(e){return he.explode(e.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))}function b(e){return-1!==e.indexOf(be)}function x(e,t,n){return t?(r=!0===t?"p":t,a=n,o=e.split(/\n\n/),i=function(e,t){var n,r=[],a="<"+e;if("object"==typeof t){for(var o in t)n=o,we.call(t,n)&&r.push(o+'="'+Pe.encodeAllRaw(t[o])+'"');r.length&&(a+=" "+r.join(" "))}return a+">"}(r,a),s="</"+r+">",1===(l=he.map(o,function(e){return e.split(/\n/).join("<br />")})).length?l[0]:he.map(l,function(e){return i+e+s}).join("")):e.replace(/\r?\n/g,"<br>");var r,a,o,i,s,l}function D(t,e){return he.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function k(e){return D(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function O(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function S(r,e){var a,t=g(r);t&&(a=he.makeMap(t.split(/[, ]/))),e=D(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var n=r.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody"),o=De({valid_elements:n,valid_children:"-li[p]"});he.each(o.elements,function(e){e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var i=_e({},o);i.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)(t=e[n]).attr("style",function(r,a,o,i){var s={},e=r.dom.parseStyle(i);return he.each(e,function(e,t){switch(t){case"mso-list":var n=/\w+ \w+([0-9]+)/i.exec(i);n&&(o._listLevel=parseInt(n[1],10)),/Ignore/i.test(e)&&o.firstChild&&(o._listIgnore=!0,o.firstChild._listIgnore=!0);break;case"horiz-align":t="text-align";break;case"vert-align":t="vertical-align";break;case"font-color":case"mso-foreground":t="color";break;case"mso-background":case"mso-highlight":t="background";break;case"font-weight":case"font-style":return void("normal"!==e&&(s[t]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void o.remove()}0!==t.indexOf("mso-comment")?0!==t.indexOf("mso-")&&("all"===g(r)||a&&a[t])&&(s[t]=e):o.remove()}),/(bold)/i.test(s["font-weight"])&&(delete s["font-weight"],o.wrap(new Te("b",1))),/(italic)/i.test(s["font-style"])&&(delete s["font-style"],o.wrap(new Te("i",1))),r.dom.serializeStyle(s,o.name)||null}(r,a,t,t.attr("style"))),"span"===t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),i.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),i.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),i.addNodeFilter("a",function(e){for(var t,n,r,a=e.length;a--;)n=(t=e[a]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_")?t.remove():!(n=n&&0===n.indexOf("file://")?(n=n.split("#")[1])&&"#"+n:n)&&!r||r&&!/^_?(?:toc|edn|ftn)/i.test(r)?t.unwrap():t.attr({href:n,name:r})});var s=i.parse(e);return r.getParam("paste_convert_word_fake_lists",!0)&&function(e){for(var a,o,i=1,n=function(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)for(;t+=n(e),e=e.next;);return t},s=function(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!s(e,t))return!1}while(e=e.next);return!0},l=function(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)for(;l(e),e=e.next;);},t=function(e,t,n){var r=e._listLevel||i;(a=r!==i?r<i?a&&a.parent.parent:(o=a,null):a)&&a.name===t?a.append(e):(o=o||a,a=new Te(t,1),1<n&&a.attr("start",""+n),e.wrap(a)),e.name="li",i<r&&o&&o.lastChild.append(a),i=r,l(e),s(e,/^\u00a0+/),s(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),s(e,/^\u00a0+/)},r=[],u=e.firstChild;null!=u;)if(r.push(u),null!==(u=u.walk()))for(;void 0!==u&&u.parent!==e;)u=u.walk();for(var c,f,d,p=0;p<r.length;p++)"p"===(e=r[p]).name&&e.firstChild?(c=n(e),/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(c)?t(e,"ul"):function(t){var n=!1;return t=c.replace(/^[\u00a0 ]+/,""),he.each([/^[IVXLMCD]+\.[ \u00a0]/,/^[ivxlmcd]+\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],function(e){if(e.test(t))return!(n=!0)}),n}(c)?(d=1,t(e,"ol",d=(f=/([0-9]+)\./.exec(c))?parseInt(f[1],10):d)):e._listLevel?t(e,"ul",1):a=null):(o=a,a=null)}(s),Ce({validate:h(r)},o).serialize(s)}function j(e,t){return{content:e,cancelled:t}}function A(e,t,n){var r,a,o,i,s,l,u,c,f,d,p,m,g=O(t),v=g?(a=t,(r=e).getParam("paste_enable_default_filters",!0)?S(r,a):a):t;return i=n,s=g,p=(o=e).fire("PastePreProcess",{content:v,internal:i,wordContent:s}),m=function(e,t){var n=_e({},e.schema);n.addNodeFilter("meta",function(e){he.each(e,function(e){e.remove()})});var r=n.parse(t,{forced_root_block:!1,isRootContent:!0});return Ce({validate:h(e)},e.schema).serialize(r)}(o,p.content),o.hasEventListeners("PastePostProcess")&&!p.isDefaultPrevented()?(u=i,c=s,f=(l=o).dom.create("div",{style:"display:none"},m),j((d=l.fire("PastePostProcess",{node:f,internal:u,wordContent:c})).node.innerHTML,d.isDefaultPrevented())):j(m,p.isDefaultPrevented())}function R(e,t){return e.insertContent(t,{merge:e.getParam("paste_merge_formats",!0),paste:!0}),!0}function I(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)}function F(e,t,n){return!(!1!==e.selection.isCollapsed()||!I(t)||(a=t,o=n,(r=e).undoManager.extra(function(){o(r,a)},function(){r.execCommand("mceInsertLink",!1,a)}),0));var r,a,o}function E(e,t,n){return r=e,!(!I(a=t)||!c(v(r),function(e){return m(t=a.toLowerCase(),n="."+e.toLowerCase(),t.length-n.length);var t,n})||(i=t,s=n,(o=e).undoManager.extra(function(){s(o,i)},function(){o.insertContent('<img src="'+i+'">')}),0));var r,a,o,i,s}function M(e){return"\n"===e||"\r"===e}function B(e,t,n,r){var a,o,i,s,l=A(e,t,n);!1===l.cancelled&&(a=e,o=l.content,r||!1===a.getParam("smart_paste",!0)?R(a,o):(i=a,s=o,he.each([F,E,R],function(e){return!0!==e(i,s,R)})))}function L(e,t,n){var r=n||b(t);B(e,t.replace(be,""),r,!1)}function N(e,t){var n,r,a,o,i,s,l=e.dom.encode(t).replace(/\r\n/g,"\n"),u=x((n=l,o=(r=e.getParam("paste_tab_spaces",4,"number"))<=0?"":new Array(r+1).join(" "),i=n.replace(/\t/g,o),s={pcIsSpace:!(a=function(e,t){return-1!==" \f\t\v".indexOf(t)||"\xa0"===t?e.pcIsSpace||""===e.str||e.str.length===i.length-1||(n=e.str.length+1)<i.length&&0<=n&&M(i[n])?{pcIsSpace:!1,str:e.str+"\xa0"}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:M(t),str:e.str+t};var n}),str:""},d(i,function(e,t){s=a(s,e)}),s.str),e.getParam("forced_root_block"),e.getParam("forced_root_block_attrs"));B(e,u,!1,!0)}function H(e){var t,n={};if(e&&(!e.getData||(t=e.getData("Text"))&&0<t.length&&-1===t.indexOf("data:text/mce-internal,")&&(n["text/plain"]=t),e.types))for(var r=0;r<e.types.length;r++){var a=e.types[r];try{n[a]=e.getData(a)}catch(e){n[a]=""}}return n}function $(e,t){return t in e&&0<e[t].length}function z(e){return $(e,"text/html")||$(e,"text/plain")}function U(w,e,t){var n,r,a,o,i,s="paste"===e.type?e.clipboardData:e.dataTransfer;if(y(w)&&s){var l=(n=w,a=(r=s).items?function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!u(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);ce.apply(t,e[n])}return t}(f(fe(r.items),function(e){return"file"===e.kind?[e.getAsFile()]:[]})):[],o=r.files?fe(r.files):[],function(e,t){for(var n=[],r=0,a=e.length;r<a;r++){var o=e[r];t(o,r)&&n.push(o)}return n}(0<a.length?a:o,(i=v(n),function(r){return m(r.type,"image/",0)&&c(i,function(e){return t=e.toLowerCase(),(he.hasOwn(n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"},t)?"image/"+n[t]:"image/"+t)===r.type;var t,n})})));if(0<l.length)return e.preventDefault(),ge.all(f(l,function(r){return new ge(function(e){var t=P(r.getAsFile)?r.getAsFile():r,n=new window.FileReader;n.onload=function(){e({blob:t,uri:n.result})},n.readAsDataURL(t)})})).then(function(e){t&&w.selection.setRng(t),d(e,function(e){var t,n,r,a,o,i,s,l,u,c,f,d,p,m,g,v,h,y,b,x;t=w,r=(n=e).uri,g=(a=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(r))?{type:a[1],data:decodeURIComponent(a[2])}:{type:null,data:null},v=g.data,h=g.type,y=ke(),b=n.blob,(x=new Image).src=n.uri,p=x,!(m=t.getParam("images_dataimg_filter"))||m(p)?(c=void 0,(i=(o=t.editorUpload.blobCache).getByData(v,h))?c=i:(l=(s=t.getParam("images_reuse_filename")&&P(b.name))?(f=t,P(d=b.name.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i))?f.dom.encode(d[1]):null):y,u=s?b.name:void 0,c=o.create(y,b,v,l,u),o.add(c)),L(t,'<img src="'+c.blobUri()+'">',!1)):L(t,'<img src="'+n.uri+'">',!1)})}),!0}return!1}function V(e){return ve.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode}function K(o,e,t){var i,s,v,l,u,c,f;function d(e,t,n,r,a){var o;$(t,"text/html")?o=t["text/html"]:(o=v.getHtml(),a=a||b(o),v.isDefaultContent(o)&&(r=!0)),o=k(o),v.remove();var i,s,l,u,c,f,d,p,m=!1===a&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(o),g=I(o);((r=!o.length||m&&!g||r)||g)&&(o=$(t,"text/plain")&&m?t["text/plain"]:(i=o,s=De(),l=_e({},s),u="",c=s.getShortEndedElements(),f=he.makeMap("script noscript style textarea video audio iframe object"," "),d=s.getBlockElements(),p=function(e){var t=e.name,n=e;if("br"!==t){if("wbr"!==t)if(c[t]&&(u+=" "),f[t])u+=" ";else{if(3===e.type&&(u+=e.value),!e.shortEnded&&(e=e.firstChild))for(;p(e),e=e.next;);d[t]&&n.next&&(u+="\n","p"===t&&(u+="\n"))}}else u+="\n"},i=D(i,[/<!\[[^\]]+\]>/g]),p(l.parse(i)),u)),v.isDefaultContent(o)?n||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):r?N(e,o):L(e,o,a)}s=o,v=e,l=t,c=p(),f=p(),s.on("keyup",f.clear),s.on("keydown",function(e){function t(e){V(e)&&!e.isDefaultPrevented()&&v.remove()}if(V(e)&&!e.isDefaultPrevented()&&(!(u=e.shiftKey&&86===e.keyCode)||!pe.webkit||-1===navigator.userAgent.indexOf("Version/"))){if(e.stopImmediatePropagation(),c.set(e),f.set(!0),pe.ie&&u)return e.preventDefault(),void s.fire("paste",{ieFake:!0});v.remove(),v.create(),s.once("keyup",t),s.once("paste",function(){s.off("keyup",t)})}}),s.on("paste",function(e){var t=c.isSet()||f.isSet();t&&c.clear();var n,r=H(e.clipboardData||s.getDoc().dataTransfer),a="text"===l.get()||u,o=$(r,xe());u=!1,e.isDefaultPrevented()||(n=e.clipboardData,-1!==navigator.userAgent.indexOf("Android")&&n&&n.items&&0===n.items.length)||!z(r)&&U(s,e,v.getLastRng()||s.selection.getRng())?v.remove():(t||e.preventDefault(),!pe.ie||t&&!e.ieFake||$(r,"text/html")||(v.create(),s.dom.bind(v.getEl(),"paste",function(e){e.stopPropagation()}),s.getDoc().execCommand("Paste",!1,null),r["text/html"]=v.getHtml()),$(r,"text/html")?(e.preventDefault(),o=o||b(r["text/html"]),d(s,r,t,a,o)):me.setEditorTimeout(s,function(){d(s,r,t,a,o)},0))}),o.parser.addNodeFilter("img",function(e,t,n){var r;if(!y(o)&&n.data&&!0===n.data.paste)for(var a=e.length;a--;)(i=e[a].attr("src"))&&(0!==i.indexOf("webkit-fake-url")&&(o.getParam("allow_html_data_urls",!1,"boolean")||0!==i.indexOf("data:"))||((r=e[a]).attr("data-mce-object")||i===pe.transparentSrc||r.remove()))})}function X(e){return pe.ie&&e.inline?document.body:e.getBody()}function W(e){var t=w(null),n="%MCEPASTEBIN%";return{create:function(){return function(e,t,n){var r=e.dom,a=e.getBody();t.set(e.selection.getRng());var o,i,s,l,u=e.dom.add(X(e),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n);(pe.ie||pe.gecko)&&r.setStyle(u,"left","rtl"===r.getStyle(a,"direction",!0)?65535:-65535),r.bind(u,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),i=u,s=n,X(l=o=e)!==l.getBody()&&o.dom.bind(i,"paste keyup",function(e){Oe(o,s)||o.fire("paste")}),u.focus(),e.selection.select(u,!0)}(e,t,n)},remove:function(){return function(e,t){if(oe(e)){for(var n,r=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);r&&e.selection.setRng(r)}t.set(null)}(e,t)},getEl:function(){return oe(e)},getHtml:function(){return function(n){function t(e,t){e.appendChild(t),n.dom.remove(t,!0)}var e=he.grep(X(n).childNodes,function(e){return"mcepastebin"===e.id}),r=e.shift();he.each(e,function(e){t(r,e)});for(var a=n.dom.select("div[id=mcepastebin]",r),o=a.length-1;0<=o;o--){var i=n.dom.create("div");r.insertBefore(i,a[o]),t(i,a[o])}return r?r.innerHTML:""}(e)},getLastRng:t.get,isDefault:function(){return Oe(e,n)},isDefaultContent:function(e){return e===n}}}function Y(e,t,n,r){!function(e,t,n){if(!1===pe.iOS&&"function"==typeof(null==e?void 0:e.setData))try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(xe(),t),1}catch(e){return}}(e.clipboardData,t.html,t.text)?n(t.html,r):(e.preventDefault(),r())}function Z(s){return function(e,t){var n=be+e,r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),a=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(a),s.dom.add(s.getBody(),r);var o=s.selection.getRng();a.focus();var i=s.dom.createRng();i.selectNodeContents(a),s.selection.setRng(i),me.setTimeout(function(){s.selection.setRng(o),r.parentNode.removeChild(r),t()},0)}}function q(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}}function G(e){return!e.selection.isCollapsed()||(t=e).dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody());var t}function J(e,t){return Se.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())}function Q(e,t){e.focus(),e.selection.setRng(t)}function ee(t,n){t.on("PastePreProcess",function(e){e.content=n(t,e.content,e.internal,e.wordContent)})}function te(e,t){if(!O(t))return t;var n=[];return he.each(e.schema.getBlockElements(),function(e,t){n.push(t)}),t=D(t,[[new RegExp("(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*","g"),"$1"]]),D(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function ne(e,t,n,r){if(r||n)return t;var c,f,d,a=e.getParam("paste_webkit_styles");return!1===e.getParam("paste_remove_styles_if_webkit",!0)||"all"===a?t:(t=(c=a?a.split(/[, ]/):c)?(f=e.dom,d=e.selection.getNode(),t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,r){var a=f.parseStyle(f.decode(n)),o={};if("none"===c)return t+r;for(var i=0;i<c.length;i++){var s=a[c[i]],l=f.getStyle(d,c[i],!0);/color/.test(c[i])&&(s=f.toHex(s),l=f.toHex(l)),l!==s&&(o[c[i]]=s)}var u=f.serializeStyle(o,"span");return u?t+' style="'+u+'"'+r:t+r})):t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3")).replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r})}function re(n,e){n.$("a",e).find("font,u").each(function(e,t){n.dom.remove(t,!0)})}function ae(n,r){return function(t){function e(e){return t.setActive(e.state)}return t.setActive("text"===r.pasteFormat.get()),n.on("PastePlainTextToggle",e),function(){return n.off("PastePlainTextToggle",e)}}}function oe(e){return e.dom.get("mcepastebin")}var ie,se=function(n){function e(){return a}function t(e){return e(n)}var r=o(n),a={fold:function(e,t){return t(n)},isSome:s,isNone:i,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return se(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?a:l},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return a},le={some:se,none:t,from:function(e){return null==e?l:se(e)}},ue=Array.prototype.slice,ce=Array.prototype.push,fe=typeof Array.from===n?Array.from:function(e){return ue.call(e)},de=function(){return(de=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},pe=tinymce.util.Tools.resolve("tinymce.Env"),me=tinymce.util.Tools.resolve("tinymce.util.Delay"),ge=tinymce.util.Tools.resolve("tinymce.util.Promise"),ve=tinymce.util.Tools.resolve("tinymce.util.VK"),he=tinymce.util.Tools.resolve("tinymce.util.Tools"),ye="x-tinymce/html",be="\x3c!-- "+ye+" --\x3e",xe=o(ye),we=Object.hasOwnProperty,Pe=tinymce.util.Tools.resolve("tinymce.html.Entities"),_e=tinymce.util.Tools.resolve("tinymce.html.DomParser"),Ce=tinymce.util.Tools.resolve("tinymce.html.Serializer"),Te=tinymce.util.Tools.resolve("tinymce.html.Node"),De=tinymce.util.Tools.resolve("tinymce.html.Schema"),ke=(ie=0,function(){return"mceclip"+ie++}),Oe=function(e,t){var n=oe(e);return n&&"mcepastebin"===n.id&&n.innerHTML===t},Se=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils");r.add("paste",function(e){if(0==(!!e.hasPlugin("powerpaste",!0)&&(void 0!==window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0))){var t=w(!1),n=w(e.getParam("paste_as_text",!1)?"text":"html"),r=(y=n,b=W(h=e),h.on("PreInit",function(){return K(h,b,y)}),{pasteFormat:y,pasteHtml:function(e,t){return L(h,e,t)},pasteText:function(e){return N(h,e)},pasteImageData:function(e,t){return U(h,e,t)},getDataTransferItems:H,hasHtmlOrText:z,hasContentType:$}),a=e;return pe.webkit&&ee(a,ne),pe.ie&&(ee(a,te),v=re,(g=a).on("PastePostProcess",function(e){v(g,e.node)})),(p=e).ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:x,onSetup:ae(p,m=r)}),p.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:x,onSetup:ae(p,m)}),d=r,(f=e).addCommand("mceTogglePlainTextPaste",function(){var e,t=f;"text"===(e=d).pasteFormat.get()?(e.pasteFormat.set("html"),C(t,!1)):(e.pasteFormat.set("text"),C(t,!0)),t.focus()}),f.addCommand("mceInsertClipboardContent",function(e,t){t.content&&d.pasteHtml(t.content,t.internal),t.text&&d.pasteText(t.text)}),function(e){var t=e.plugins.paste,n=e.getParam("paste_preprocess");n&&e.on("PastePreProcess",function(e){n.call(t,t,e)});var r=e.getParam("paste_postprocess");r&&e.on("PastePostProcess",function(e){r.call(t,t,e)})}(e),(o=e).on("cut",(u=o,function(e){G(u)&&Y(e,q(u),Z(u),function(){var e;pe.browser.isChrome()||pe.browser.isFirefox()?(e=u.selection.getRng(),me.setEditorTimeout(u,function(){u.selection.setRng(e),u.execCommand("Delete")},0)):u.execCommand("Delete")})})),o.on("copy",(c=o,function(e){G(c)&&Y(e,q(c),Z(c),_)})),s=r,l=t,(i=e).getParam("paste_block_drop",!1)&&i.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),T(i)||i.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()}),i.on("drop",function(e){var t,n,r,a,o=J(i,e);e.isDefaultPrevented()||l.get()||(t=s.getDataTransferItems(e.dataTransfer),n=s.hasContentType(t,xe()),(!s.hasHtmlOrText(t)||(r=t["text/plain"])&&0===r.indexOf("file://"))&&s.pasteImageData(e,o)||!o||!i.getParam("paste_filter_drop",!0)||(a=t["mce-internal"]||t["text/html"]||t["text/plain"])&&(e.preventDefault(),me.setEditorTimeout(i,function(){i.undoManager.transact(function(){t["mce-internal"]&&i.execCommand("Delete"),Q(i,o),a=k(a),t["text/html"]?s.pasteHtml(a,n):s.pasteText(a)})})))}),i.on("dragstart",function(e){l.set(!0)}),i.on("dragover dragend",function(e){T(i)&&!1===l.get()&&(e.preventDefault(),Q(i,J(i,e))),"dragend"===e.type&&l.set(!1)}),{clipboard:r}}var i,s,l,o,u,c,f,d,p,m,a,g,v,h,y,b;function x(){return p.execCommand("mceTogglePlainTextPaste")}})}();
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
9
|
(function () {
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
12
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
13
13
|
|
|
14
14
|
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
15
15
|
|
|
16
|
-
var global
|
|
16
|
+
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
17
17
|
|
|
18
18
|
var getContentStyle = function (editor) {
|
|
19
19
|
return editor.getParam('content_style', '', 'string');
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
var contentStyle = getContentStyle(editor);
|
|
53
53
|
headHtml += '<base href="' + encode(editor.documentBaseURI.getURI()) + '">';
|
|
54
54
|
var cors = shouldUseContentCssCors(editor) ? ' crossorigin="anonymous"' : '';
|
|
55
|
-
global
|
|
55
|
+
global.each(editor.contentCSS, function (url) {
|
|
56
56
|
headHtml += '<link type="text/css" rel="stylesheet" href="' + encode(editor.documentBaseURI.toAbsolute(url)) + '"' + cors + '>';
|
|
57
57
|
});
|
|
58
58
|
if (contentStyle) {
|
|
@@ -92,33 +92,32 @@
|
|
|
92
92
|
dataApi.focus('close');
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
var register = function (editor) {
|
|
95
|
+
var register$1 = function (editor) {
|
|
96
96
|
editor.addCommand('mcePreview', function () {
|
|
97
97
|
open(editor);
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
var register
|
|
101
|
+
var register = function (editor) {
|
|
102
|
+
var onAction = function () {
|
|
103
|
+
return editor.execCommand('mcePreview');
|
|
104
|
+
};
|
|
102
105
|
editor.ui.registry.addButton('preview', {
|
|
103
106
|
icon: 'preview',
|
|
104
107
|
tooltip: 'Preview',
|
|
105
|
-
onAction:
|
|
106
|
-
return editor.execCommand('mcePreview');
|
|
107
|
-
}
|
|
108
|
+
onAction: onAction
|
|
108
109
|
});
|
|
109
110
|
editor.ui.registry.addMenuItem('preview', {
|
|
110
111
|
icon: 'preview',
|
|
111
112
|
text: 'Preview',
|
|
112
|
-
onAction:
|
|
113
|
-
return editor.execCommand('mcePreview');
|
|
114
|
-
}
|
|
113
|
+
onAction: onAction
|
|
115
114
|
});
|
|
116
115
|
};
|
|
117
116
|
|
|
118
117
|
function Plugin () {
|
|
119
|
-
global.add('preview', function (editor) {
|
|
120
|
-
register(editor);
|
|
118
|
+
global$2.add('preview', function (editor) {
|
|
121
119
|
register$1(editor);
|
|
120
|
+
register(editor);
|
|
122
121
|
});
|
|
123
122
|
}
|
|
124
123
|
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
|
-
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.Env"),w=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(
|
|
9
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.Env"),w=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("preview",function(e){var n,t;function i(){return t.execCommand("mcePreview")}(n=e).addCommand("mcePreview",function(){var e,t;t=function(t){var n="",i=t.dom.encode,e=t.getParam("content_style","","string");n+='<base href="'+i(t.documentBaseURI.getURI())+'">';var o=t.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"";w.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+i(t.documentBaseURI.toAbsolute(e))+'"'+o+">"}),e&&(n+='<style type="text/css">'+e+"</style>");var a,r,s,c,d,l,m,y=-1===(c=(a=t).getParam("body_id","tinymce","string")).indexOf("=")?c:(s=(r=a).getParam("body_id","","hash"))[r.id]||s,u=-1===(m=(d=t).getParam("body_class","","string")).indexOf("=")?m:(l=d).getParam("body_class","","hash")[l.id]||"",v='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(f.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",g=t.getBody().dir,p=g?' dir="'+i(g)+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+i(y)+'" class="mce-content-body '+i(u)+'"'+p+">"+t.getContent()+v+"</body></html>"}(e=n),e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}}).focus("close")}),(t=e).ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:i}),t.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:i})})}();
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
9
|
(function () {
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
12
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
13
13
|
|
|
14
|
-
var global
|
|
14
|
+
var global = tinymce.util.Tools.resolve('tinymce.Env');
|
|
15
15
|
|
|
16
|
-
var register = function (editor) {
|
|
16
|
+
var register$1 = function (editor) {
|
|
17
17
|
editor.addCommand('mcePrint', function () {
|
|
18
|
-
if (global
|
|
18
|
+
if (global.browser.isIE()) {
|
|
19
19
|
editor.getDoc().execCommand('print', false, null);
|
|
20
20
|
} else {
|
|
21
21
|
editor.getWin().print();
|
|
@@ -23,27 +23,26 @@
|
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
var register
|
|
26
|
+
var register = function (editor) {
|
|
27
|
+
var onAction = function () {
|
|
28
|
+
return editor.execCommand('mcePrint');
|
|
29
|
+
};
|
|
27
30
|
editor.ui.registry.addButton('print', {
|
|
28
31
|
icon: 'print',
|
|
29
32
|
tooltip: 'Print',
|
|
30
|
-
onAction:
|
|
31
|
-
return editor.execCommand('mcePrint');
|
|
32
|
-
}
|
|
33
|
+
onAction: onAction
|
|
33
34
|
});
|
|
34
35
|
editor.ui.registry.addMenuItem('print', {
|
|
35
36
|
text: 'Print...',
|
|
36
37
|
icon: 'print',
|
|
37
|
-
onAction:
|
|
38
|
-
return editor.execCommand('mcePrint');
|
|
39
|
-
}
|
|
38
|
+
onAction: onAction
|
|
40
39
|
});
|
|
41
40
|
};
|
|
42
41
|
|
|
43
42
|
function Plugin () {
|
|
44
|
-
global.add('print', function (editor) {
|
|
45
|
-
register(editor);
|
|
43
|
+
global$1.add('print', function (editor) {
|
|
46
44
|
register$1(editor);
|
|
45
|
+
register(editor);
|
|
47
46
|
editor.addShortcut('Meta+P', '', 'mcePrint');
|
|
48
47
|
});
|
|
49
48
|
}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
|
-
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),
|
|
9
|
+
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.Env");n.add("print",function(n){var t,i;function e(){return i.execCommand("mcePrint")}(t=n).addCommand("mcePrint",function(){r.browser.isIE()?t.getDoc().execCommand("print",!1,null):t.getWin().print()}),(i=n).ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:e}),i.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:e}),n.addShortcut("Meta+P","","mcePrint")})}();
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
9
|
(function () {
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
12
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
13
13
|
|
|
14
14
|
var unique = 0;
|
|
15
15
|
var generate = function (prefix) {
|
|
@@ -21,12 +21,11 @@
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
var createTableHtml = function (cols, rows) {
|
|
24
|
-
var
|
|
25
|
-
html = '<table data-mce-id="mce" style="width: 100%">';
|
|
24
|
+
var html = '<table data-mce-id="mce" style="width: 100%">';
|
|
26
25
|
html += '<tbody>';
|
|
27
|
-
for (y = 0; y < rows; y++) {
|
|
26
|
+
for (var y = 0; y < rows; y++) {
|
|
28
27
|
html += '<tr>';
|
|
29
|
-
for (x = 0; x < cols; x++) {
|
|
28
|
+
for (var x = 0; x < cols; x++) {
|
|
30
29
|
html += '<td><br></td>';
|
|
31
30
|
}
|
|
32
31
|
html += '</tr>';
|
|
@@ -58,10 +57,10 @@
|
|
|
58
57
|
editor.insertContent(editor.dom.createHTML('img', { src: blobInfo.blobUri() }));
|
|
59
58
|
};
|
|
60
59
|
|
|
61
|
-
var global$
|
|
60
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Promise');
|
|
62
61
|
|
|
63
62
|
var blobToBase64 = function (blob) {
|
|
64
|
-
return new global$
|
|
63
|
+
return new global$2(function (resolve) {
|
|
65
64
|
var reader = new FileReader();
|
|
66
65
|
reader.onloadend = function () {
|
|
67
66
|
resolve(reader.result.split(',')[1]);
|
|
@@ -70,12 +69,12 @@
|
|
|
70
69
|
});
|
|
71
70
|
};
|
|
72
71
|
|
|
73
|
-
var global$
|
|
72
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
74
73
|
|
|
75
|
-
var global
|
|
74
|
+
var global = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
|
76
75
|
|
|
77
76
|
var pickFile = function (editor) {
|
|
78
|
-
return new global$
|
|
77
|
+
return new global$2(function (resolve) {
|
|
79
78
|
var fileInput = document.createElement('input');
|
|
80
79
|
fileInput.type = 'file';
|
|
81
80
|
fileInput.accept = 'image/*';
|
|
@@ -93,8 +92,8 @@
|
|
|
93
92
|
resolve([]);
|
|
94
93
|
fileInput.parentNode.removeChild(fileInput);
|
|
95
94
|
};
|
|
96
|
-
if (global$
|
|
97
|
-
global
|
|
95
|
+
if (global$1.os.isAndroid() && e.type !== 'remove') {
|
|
96
|
+
global.setEditorTimeout(editor, cleanup, 0);
|
|
98
97
|
} else {
|
|
99
98
|
cleanup();
|
|
100
99
|
}
|
|
@@ -170,6 +169,9 @@
|
|
|
170
169
|
return value;
|
|
171
170
|
};
|
|
172
171
|
};
|
|
172
|
+
var identity = function (x) {
|
|
173
|
+
return x;
|
|
174
|
+
};
|
|
173
175
|
var never = constant(false);
|
|
174
176
|
var always = constant(true);
|
|
175
177
|
|
|
@@ -177,20 +179,14 @@
|
|
|
177
179
|
return NONE;
|
|
178
180
|
};
|
|
179
181
|
var NONE = function () {
|
|
180
|
-
var eq = function (o) {
|
|
181
|
-
return o.isNone();
|
|
182
|
-
};
|
|
183
182
|
var call = function (thunk) {
|
|
184
183
|
return thunk();
|
|
185
184
|
};
|
|
186
|
-
var id =
|
|
187
|
-
return n;
|
|
188
|
-
};
|
|
185
|
+
var id = identity;
|
|
189
186
|
var me = {
|
|
190
187
|
fold: function (n, _s) {
|
|
191
188
|
return n();
|
|
192
189
|
},
|
|
193
|
-
is: never,
|
|
194
190
|
isSome: never,
|
|
195
191
|
isNone: always,
|
|
196
192
|
getOr: id,
|
|
@@ -207,9 +203,9 @@
|
|
|
207
203
|
bind: none,
|
|
208
204
|
exists: never,
|
|
209
205
|
forall: always,
|
|
210
|
-
filter:
|
|
211
|
-
|
|
212
|
-
|
|
206
|
+
filter: function () {
|
|
207
|
+
return none();
|
|
208
|
+
},
|
|
213
209
|
toArray: function () {
|
|
214
210
|
return [];
|
|
215
211
|
},
|
|
@@ -229,9 +225,6 @@
|
|
|
229
225
|
fold: function (n, s) {
|
|
230
226
|
return s(a);
|
|
231
227
|
},
|
|
232
|
-
is: function (v) {
|
|
233
|
-
return a === v;
|
|
234
|
-
},
|
|
235
228
|
isSome: always,
|
|
236
229
|
isNone: never,
|
|
237
230
|
getOr: constant_a,
|
|
@@ -258,14 +251,6 @@
|
|
|
258
251
|
},
|
|
259
252
|
toString: function () {
|
|
260
253
|
return 'some(' + a + ')';
|
|
261
|
-
},
|
|
262
|
-
equals: function (o) {
|
|
263
|
-
return o.is(a);
|
|
264
|
-
},
|
|
265
|
-
equals_: function (o, elementEq) {
|
|
266
|
-
return o.fold(never, function (b) {
|
|
267
|
-
return elementEq(a, b);
|
|
268
|
-
});
|
|
269
254
|
}
|
|
270
255
|
};
|
|
271
256
|
return me;
|
|
@@ -348,14 +333,14 @@
|
|
|
348
333
|
}
|
|
349
334
|
};
|
|
350
335
|
|
|
351
|
-
|
|
336
|
+
typeof window !== 'undefined' ? window : Function('return this;')();
|
|
352
337
|
|
|
353
338
|
var name = function (element) {
|
|
354
339
|
var r = element.dom.nodeName;
|
|
355
340
|
return r.toLowerCase();
|
|
356
341
|
};
|
|
357
342
|
|
|
358
|
-
var ancestor = function (scope, predicate, isRoot) {
|
|
343
|
+
var ancestor$1 = function (scope, predicate, isRoot) {
|
|
359
344
|
var element = scope.dom;
|
|
360
345
|
var stop = isFunction(isRoot) ? isRoot : never;
|
|
361
346
|
while (element.parentNode) {
|
|
@@ -369,23 +354,23 @@
|
|
|
369
354
|
}
|
|
370
355
|
return Optional.none();
|
|
371
356
|
};
|
|
372
|
-
var closest = function (scope, predicate, isRoot) {
|
|
357
|
+
var closest$1 = function (scope, predicate, isRoot) {
|
|
373
358
|
var is = function (s, test) {
|
|
374
359
|
return test(s);
|
|
375
360
|
};
|
|
376
|
-
return ClosestOrAncestor(is, ancestor, scope, predicate, isRoot);
|
|
361
|
+
return ClosestOrAncestor(is, ancestor$1, scope, predicate, isRoot);
|
|
377
362
|
};
|
|
378
363
|
|
|
379
|
-
var ancestor
|
|
380
|
-
return ancestor(scope, function (e) {
|
|
364
|
+
var ancestor = function (scope, selector, isRoot) {
|
|
365
|
+
return ancestor$1(scope, function (e) {
|
|
381
366
|
return is(e, selector);
|
|
382
367
|
}, isRoot);
|
|
383
368
|
};
|
|
384
|
-
var closest
|
|
369
|
+
var closest = function (scope, selector, isRoot) {
|
|
385
370
|
var is$1 = function (element, selector) {
|
|
386
371
|
return is(element, selector);
|
|
387
372
|
};
|
|
388
|
-
return ClosestOrAncestor(is$1, ancestor
|
|
373
|
+
return ClosestOrAncestor(is$1, ancestor, scope, selector, isRoot);
|
|
389
374
|
};
|
|
390
375
|
|
|
391
376
|
var validDefaultOrDie = function (value, predicate) {
|
|
@@ -425,7 +410,7 @@
|
|
|
425
410
|
return getToolbarItemsOr(editor, 'quickbars_image_toolbar', 'alignleft aligncenter alignright');
|
|
426
411
|
};
|
|
427
412
|
|
|
428
|
-
var addToEditor = function (editor) {
|
|
413
|
+
var addToEditor$1 = function (editor) {
|
|
429
414
|
var insertToolbarItems = getInsertToolbarItems(editor);
|
|
430
415
|
if (insertToolbarItems.trim().length > 0) {
|
|
431
416
|
editor.ui.registry.addContextToolbar('quickblock', {
|
|
@@ -435,8 +420,8 @@
|
|
|
435
420
|
var isRoot = function (elem) {
|
|
436
421
|
return elem.dom === editor.getBody();
|
|
437
422
|
};
|
|
438
|
-
return closest
|
|
439
|
-
return closest(sugarNode, function (elem) {
|
|
423
|
+
return closest(sugarNode, 'table', isRoot).fold(function () {
|
|
424
|
+
return closest$1(sugarNode, function (elem) {
|
|
440
425
|
return name(elem) in textBlockElementsMap && editor.dom.isEmpty(elem.dom);
|
|
441
426
|
}, isRoot).isSome();
|
|
442
427
|
}, never);
|
|
@@ -448,7 +433,7 @@
|
|
|
448
433
|
}
|
|
449
434
|
};
|
|
450
435
|
|
|
451
|
-
var addToEditor
|
|
436
|
+
var addToEditor = function (editor) {
|
|
452
437
|
var isEditable = function (node) {
|
|
453
438
|
return editor.dom.getContentEditableParent(node) !== 'false';
|
|
454
439
|
};
|
|
@@ -477,10 +462,10 @@
|
|
|
477
462
|
};
|
|
478
463
|
|
|
479
464
|
function Plugin () {
|
|
480
|
-
global.add('quickbars', function (editor) {
|
|
465
|
+
global$3.add('quickbars', function (editor) {
|
|
481
466
|
setupButtons(editor);
|
|
482
|
-
addToEditor(editor);
|
|
483
467
|
addToEditor$1(editor);
|
|
468
|
+
addToEditor(editor);
|
|
484
469
|
});
|
|
485
470
|
}
|
|
486
471
|
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
|
-
!function(){"use strict";
|
|
9
|
+
!function(){"use strict";function n(a){a.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){var i=a;new s(function(n){var r=document.createElement("input");r.type="file",r.accept="image/*",r.style.position="fixed",r.style.left="0",r.style.top="0",r.style.opacity="0.001",document.body.appendChild(r),r.addEventListener("change",function(t){n(Array.prototype.slice.call(t.target.files))});var o=function(t){function e(){n([]),r.parentNode.removeChild(r)}d.os.isAndroid()&&"remove"!==t.type?f.setEditorTimeout(i,e,0):e(),i.off("focusin remove",o)};i.on("focusin remove",o),r.click()}).then(function(t){var c,n;0<t.length&&(c=t[0],n=c,new s(function(t){var e=new FileReader;e.onloadend=function(){t(e.result.split(",")[1])},e.readAsDataURL(n)}).then(function(t){var e,n,r,o,i,u;n=t,r=c,i=(e=a).editorUpload.blobCache,u=i.create((o=(new Date).getTime(),"mceu_"+Math.floor(1e9*Math.random())+ ++l+String(o)),r,n),i.add(u),e.insertContent(e.dom.createHTML("img",{src:u.blobUri()}))}))})}}),a.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:function(){var t,n;(t=a).plugins.table?t.plugins.table.insertTable(2,2):(n=t).undoManager.transact(function(){n.insertContent(function(){var t='<table data-mce-id="mce" style="width: 100%">';t+="<tbody>";for(var e=0;e<2;e++){t+="<tr>";for(var n=0;n<2;n++)t+="<td><br></td>";t+="</tr>"}return(t+="</tbody>")+"</table>"}());var t=n.dom.select("*[data-mce-id]")[0];t.removeAttribute("data-mce-id");var e=n.dom.select("td,th",t);n.selection.setCursorLocation(e[0],0)})}})}function t(r){return function(t){return n=typeof(e=t),(null===e?"null":"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n)===r;var e,n}}function e(e){return function(t){return typeof t===e}}function i(t){return function(){return t}}function r(t){return t}function o(){return y}var u,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=0,s=tinymce.util.Tools.resolve("tinymce.util.Promise"),d=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=t("string"),m=t("object"),g=t("array"),v=e("boolean"),h=e("function"),p=i(!1),b=i(!(u=void 0)),y={fold:function(t,e){return t()},isSome:p,isNone:b,getOr:r,getOrThunk:k,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:r,orThunk:k,map:o,each:function(){},bind:o,exists:p,forall:b,filter:function(){return y},toArray:function(){return[]},toString:i("none()")};function k(t){return t()}var w=function(n){function t(){return o}function e(t){return t(n)}var r=i(n),o={fold:function(t,e){return e(n)},isSome:b,isNone:p,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return w(t(n))},each:function(t){t(n)},bind:e,exists:e,forall:e,filter:function(t){return t(n)?o:y},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},T={some:w,none:o,from:function(t){return null==t?y:w(t)}};function E(t,e,n,r,o){return t(n,r)?T.some(n):h(o)&&o(n)?T.none():e(n,r,o)}function N(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}function M(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}}var S={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return M(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return M(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return M(n)},fromDom:M,fromPoint:function(t,e,n){return T.from(t.dom.elementFromPoint(e,n)).map(M)}};function C(t,e,n){for(var r=t.dom,o=h(n)?n:p;r.parentNode;){var r=r.parentNode,i=S.fromDom(r);if(e(i))return T.some(i);if(o(i))break}return T.none()}function O(t,e,n){return C(t,function(t){return N(t,e)},n)}"undefined"!=typeof window||Function("return this;")();var q,x=(q=a,function(t,e,n){return function(){if(!q(n))throw new Error("Default value doesn't match requested type.")}(),function(t,e){if(g(t)||m(t))throw new Error("expected a string but found: "+t);return u===t?e:v(t)?!1===t?"":e:t}(t.getParam(e,n),n)});c.add("quickbars",function(t){var o,e;n(t),0<(e=x(o=t,"quickbars_insert_toolbar","quickimage quicktable")).trim().length&&o.ui.registry.addContextToolbar("quickblock",{predicate:function(t){function e(t){return t.dom===o.getBody()}var n=S.fromDom(t),r=o.schema.getTextBlockElements();return E(N,O,n,"table",e).fold(function(){return E(function(t,e){return e(t)},C,n,function(t){return t.dom.nodeName.toLowerCase()in r&&o.dom.isEmpty(t.dom)},e).isSome()},p)},items:e,position:"line",scope:"editor"}),function(e){function n(t){return"IMG"===t.nodeName||"FIGURE"===t.nodeName&&/image/i.test(t.className)}var t=x(e,"quickbars_image_toolbar","alignleft aligncenter alignright");0<t.trim().length&&e.ui.registry.addContextToolbar("imageselection",{predicate:n,items:t,position:"node"});var r=x(e,"quickbars_selection_toolbar","bold italic | quicklink h2 h3 blockquote");0<r.trim().length&&e.ui.registry.addContextToolbar("textselection",{predicate:function(t){return!n(t)&&!e.selection.isCollapsed()&&"false"!==e.dom.getContentEditableParent(t)},items:r,position:"selection",scope:"editor"})}(t)})}();
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
9
|
(function () {
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
12
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
13
13
|
|
|
14
14
|
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
|
15
15
|
|
|
16
|
-
var global
|
|
16
|
+
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
17
17
|
|
|
18
18
|
var enableWhenDirty = function (editor) {
|
|
19
19
|
return editor.getParam('save_enablewhendirty', true);
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
var cancel = function (editor) {
|
|
60
|
-
var h = global
|
|
60
|
+
var h = global.trim(editor.startContent);
|
|
61
61
|
if (hasOnCancelCallback(editor)) {
|
|
62
62
|
editor.execCallback('save_oncancelcallback', editor);
|
|
63
63
|
return;
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
editor.resetContent(h);
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
var register = function (editor) {
|
|
68
|
+
var register$1 = function (editor) {
|
|
69
69
|
editor.addCommand('mceSave', function () {
|
|
70
70
|
save(editor);
|
|
71
71
|
});
|
|
@@ -79,13 +79,14 @@
|
|
|
79
79
|
var handler = function () {
|
|
80
80
|
api.setDisabled(enableWhenDirty(editor) && !editor.isDirty());
|
|
81
81
|
};
|
|
82
|
+
handler();
|
|
82
83
|
editor.on('NodeChange dirty', handler);
|
|
83
84
|
return function () {
|
|
84
85
|
return editor.off('NodeChange dirty', handler);
|
|
85
86
|
};
|
|
86
87
|
};
|
|
87
88
|
};
|
|
88
|
-
var register
|
|
89
|
+
var register = function (editor) {
|
|
89
90
|
editor.ui.registry.addButton('save', {
|
|
90
91
|
icon: 'save',
|
|
91
92
|
tooltip: 'Save',
|
|
@@ -108,9 +109,9 @@
|
|
|
108
109
|
};
|
|
109
110
|
|
|
110
111
|
function Plugin () {
|
|
111
|
-
global.add('save', function (editor) {
|
|
112
|
-
register$1(editor);
|
|
112
|
+
global$2.add('save', function (editor) {
|
|
113
113
|
register(editor);
|
|
114
|
+
register$1(editor);
|
|
114
115
|
});
|
|
115
116
|
}
|
|
116
117
|
|