From b202561a5f199773c307f557029853812dab1d02 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 15 May 2019 23:44:37 +0000 Subject: [PATCH] Update TinyMCE to 4.9.4. Changelog: https://github.com/tinymce/tinymce/blob/4.x/changelog.txt. Fixes #47229 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@45316 602fd350-edb4-49c9-b593-d223f7449a82 --- .../tinymce/plugins/fullscreen/plugin.js | 20 +- .../tinymce/plugins/fullscreen/plugin.min.js | 2 +- .../vendor/tinymce/plugins/image/plugin.js | 56 +- .../tinymce/plugins/image/plugin.min.js | 2 +- .../vendor/tinymce/plugins/link/plugin.js | 20 +- .../vendor/tinymce/plugins/link/plugin.min.js | 2 +- .../vendor/tinymce/plugins/lists/plugin.js | 920 ++-- .../tinymce/plugins/lists/plugin.min.js | 2 +- .../vendor/tinymce/plugins/paste/plugin.js | 72 +- .../tinymce/plugins/paste/plugin.min.js | 2 +- .../vendor/tinymce/plugins/tabfocus/plugin.js | 6 +- .../tinymce/plugins/tabfocus/plugin.min.js | 2 +- .../tinymce/skins/lightgray/skin.min.css | 2 +- .../vendor/tinymce/themes/inlite/theme.js | 1532 +++--- .../vendor/tinymce/themes/inlite/theme.min.js | 2 +- .../vendor/tinymce/themes/modern/theme.js | 1526 +++--- .../vendor/tinymce/themes/modern/theme.min.js | 2 +- src/js/_enqueues/vendor/tinymce/tinymce.js | 4247 +++++++++-------- .../_enqueues/vendor/tinymce/tinymce.min.js | 4 +- src/wp-includes/version.php | 2 +- 20 files changed, 4329 insertions(+), 4094 deletions(-) diff --git a/src/js/_enqueues/vendor/tinymce/plugins/fullscreen/plugin.js b/src/js/_enqueues/vendor/tinymce/plugins/fullscreen/plugin.js index ee21331cb3..1c5c00ea20 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/fullscreen/plugin.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/fullscreen/plugin.js @@ -1,5 +1,5 @@ (function () { -var fullscreen = (function () { +var fullscreen = (function (domGlobals) { 'use strict'; var Cell = function (initial) { @@ -42,8 +42,8 @@ var fullscreen = (function () { var getWindowSize = function () { var w; var h; - var win = window; - var doc = document; + var win = domGlobals.window; + var doc = domGlobals.document; var body = doc.body; if (body.offsetWidth) { w = body.offsetWidth; @@ -66,11 +66,11 @@ var fullscreen = (function () { }; }; var setScrollPos = function (pos) { - window.scrollTo(pos.x, pos.y); + domGlobals.window.scrollTo(pos.x, pos.y); }; var toggleFullscreen = function (editor, fullscreenState) { - var body = document.body; - var documentElement = document.documentElement; + var body = domGlobals.document.body; + var documentElement = domGlobals.document.documentElement; var editorContainerStyle; var editorContainer, iframe, iframeStyle; var fullscreenInfo = fullscreenState.get(); @@ -78,7 +78,7 @@ var fullscreen = (function () { DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight)); }; var removeResize = function () { - DOM.unbind(window, 'resize', resize); + DOM.unbind(domGlobals.window, 'resize', resize); }; editorContainer = editor.getContainer(); editorContainerStyle = editorContainer.style; @@ -99,7 +99,7 @@ var fullscreen = (function () { DOM.addClass(body, 'mce-fullscreen'); DOM.addClass(documentElement, 'mce-fullscreen'); DOM.addClass(editorContainer, 'mce-fullscreen'); - DOM.bind(window, 'resize', resize); + DOM.bind(domGlobals.window, 'resize', resize); editor.on('remove', removeResize); resize(); fullscreenState.set(newFullScreenInfo); @@ -117,7 +117,7 @@ var fullscreen = (function () { DOM.removeClass(documentElement, 'mce-fullscreen'); DOM.removeClass(editorContainer, 'mce-fullscreen'); setScrollPos(fullscreenInfo.scrollPos); - DOM.unbind(window, 'resize', fullscreenInfo.resizeHandler); + DOM.unbind(domGlobals.window, 'resize', fullscreenInfo.resizeHandler); editor.off('remove', fullscreenInfo.removeHandler); fullscreenState.set(null); Events.fireFullscreenStateChanged(editor, false); @@ -173,5 +173,5 @@ var fullscreen = (function () { return Plugin; -}()); +}(window)); })(); diff --git a/src/js/_enqueues/vendor/tinymce/plugins/fullscreen/plugin.min.js b/src/js/_enqueues/vendor/tinymce/plugins/fullscreen/plugin.min.js index cd4eb5ed47..259afc9a5b 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/fullscreen/plugin.min.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/fullscreen/plugin.min.js @@ -1 +1 @@ -!function(){"use strict";var i=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),m=function(e,n){e.fire("FullscreenStateChanged",{state:n})},g=n.DOM,r=function(e,n){var t,r,l,i,o,c,s=document.body,u=document.documentElement,d=n.get(),a=function(){var e,n,t,i;g.setStyle(l,"height",(t=window,i=document.body,i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}).h-(r.clientHeight-l.clientHeight))},h=function(){g.unbind(window,"resize",a)};if(t=(r=e.getContainer()).style,i=(l=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),g.removeClass(s,"mce-fullscreen"),g.removeClass(u,"mce-fullscreen"),g.removeClass(r,"mce-fullscreen"),o=d.scrollPos,window.scrollTo(o.x,o.y),g.unbind(window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),m(e,!1);else{var f={scrollPos:(c=g.getViewPort(),{x:c.x,y:c.y}),containerWidth:t.width,containerHeight:t.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:h};i.width=i.height="100%",t.width=t.height="",g.addClass(s,"mce-fullscreen"),g.addClass(u,"mce-fullscreen"),g.addClass(r,"mce-fullscreen"),g.bind(window,"resize",a),e.on("remove",h),a(),n.set(f),m(e,!0)}},l=function(e,n){e.addCommand("mceFullScreen",function(){r(e,n)})},o=function(t){return function(e){var n=e.control;t.on("FullscreenStateChanged",function(e){n.active(e.state)})}},c=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:o(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:o(e)})};e.add("fullscreen",function(e){var n=i(null);return e.settings.inline||(l(e,n),c(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),t(n)})}(); \ No newline at end of file +!function(m){"use strict";var i=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),g=function(e,n){e.fire("FullscreenStateChanged",{state:n})},w=n.DOM,r=function(e,n){var t,r,l,i,o,c,s=m.document.body,u=m.document.documentElement,d=n.get(),a=function(){var e,n,t,i;w.setStyle(l,"height",(t=m.window,i=m.document.body,i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}).h-(r.clientHeight-l.clientHeight))},h=function(){w.unbind(m.window,"resize",a)};if(t=(r=e.getContainer()).style,i=(l=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),w.removeClass(s,"mce-fullscreen"),w.removeClass(u,"mce-fullscreen"),w.removeClass(r,"mce-fullscreen"),o=d.scrollPos,m.window.scrollTo(o.x,o.y),w.unbind(m.window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),g(e,!1);else{var f={scrollPos:(c=w.getViewPort(),{x:c.x,y:c.y}),containerWidth:t.width,containerHeight:t.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:h};i.width=i.height="100%",t.width=t.height="",w.addClass(s,"mce-fullscreen"),w.addClass(u,"mce-fullscreen"),w.addClass(r,"mce-fullscreen"),w.bind(m.window,"resize",a),e.on("remove",h),a(),n.set(f),g(e,!0)}},l=function(e,n){e.addCommand("mceFullScreen",function(){r(e,n)})},o=function(t){return function(e){var n=e.control;t.on("FullscreenStateChanged",function(e){n.active(e.state)})}},c=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:o(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:o(e)})};e.add("fullscreen",function(e){var n=i(null);return e.settings.inline||(l(e,n),c(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),t(n)})}(window); \ No newline at end of file diff --git a/src/js/_enqueues/vendor/tinymce/plugins/image/plugin.js b/src/js/_enqueues/vendor/tinymce/plugins/image/plugin.js index ba68a9bd94..84f5d54c68 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/image/plugin.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/image/plugin.js @@ -1,5 +1,5 @@ (function () { -var image = (function () { +var image = (function (domGlobals) { 'use strict'; var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); @@ -63,7 +63,7 @@ var image = (function () { getUploadCredentials: getUploadCredentials }; - var Global = typeof window !== 'undefined' ? window : Function('return this;')(); + var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')(); var path = function (parts, scope) { var o = scope !== undefined && scope !== null ? scope : Global; @@ -102,7 +102,7 @@ var image = (function () { return Math.max(parseInt(val1, 10), parseInt(val2, 10)); }; var getImageSize = function (url, callback) { - var img = document.createElement('img'); + var img = domGlobals.document.createElement('img'); function done(width, height) { if (img.parentNode) { img.parentNode.removeChild(img); @@ -125,7 +125,7 @@ var image = (function () { style.position = 'fixed'; style.bottom = style.left = '0px'; style.width = style.height = 'auto'; - document.body.appendChild(img); + domGlobals.document.body.appendChild(img); img.src = url; }; var buildListItems = function (inputList, itemCallback, startItems) { @@ -294,21 +294,21 @@ var image = (function () { return ''; } }; - var getAttrib = function (image, name$$1) { - if (image.hasAttribute(name$$1)) { - return image.getAttribute(name$$1); + var getAttrib = function (image, name) { + if (image.hasAttribute(name)) { + return image.getAttribute(name); } else { return ''; } }; - var getStyle = function (image, name$$1) { - return image.style[name$$1] ? image.style[name$$1] : ''; + var getStyle = function (image, name) { + return image.style[name] ? image.style[name] : ''; }; var hasCaption = function (image) { return image.parentNode !== null && image.parentNode.nodeName === 'FIGURE'; }; - var setAttrib = function (image, name$$1, value) { - image.setAttribute(name$$1, value); + var setAttrib = function (image, name, value) { + image.setAttribute(name, value); }; var wrapInFigure = function (image) { var figureElm = DOM.create('figure', { class: 'image' }); @@ -339,21 +339,21 @@ var image = (function () { image.removeAttribute('style'); } }; - var setSize = function (name$$1, normalizeCss) { - return function (image, name$$1, value) { - if (image.style[name$$1]) { - image.style[name$$1] = Utils.addPixelSuffix(value); + var setSize = function (name, normalizeCss) { + return function (image, name, value) { + if (image.style[name]) { + image.style[name] = Utils.addPixelSuffix(value); normalizeStyle(image, normalizeCss); } else { - setAttrib(image, name$$1, value); + setAttrib(image, name, value); } }; }; - var getSize = function (image, name$$1) { - if (image.style[name$$1]) { - return Utils.removePixelSuffix(image.style[name$$1]); + var getSize = function (image, name) { + if (image.style[name]) { + return Utils.removePixelSuffix(image.style[name]); } else { - return getAttrib(image, name$$1); + return getAttrib(image, name); } }; var setHspace = function (image, value) { @@ -396,7 +396,7 @@ var image = (function () { }; }; var getStyleValue = function (normalizeCss, data) { - var image = document.createElement('img'); + var image = domGlobals.document.createElement('img'); setAttrib(image, 'style', data.style); if (getHspace(image) || data.hspace !== '') { setHspace(image, data.hspace); @@ -413,7 +413,7 @@ var image = (function () { return normalizeCss(image.getAttribute('style')); }; var create = function (normalizeCss, data) { - var image = document.createElement('img'); + var image = domGlobals.document.createElement('img'); write(normalizeCss, merge(data, { caption: false }), image); setAttrib(image, 'alt', data.alt); if (data.caption) { @@ -442,13 +442,13 @@ var image = (function () { borderStyle: getStyle(image, 'borderStyle') }; }; - var updateProp = function (image, oldData, newData, name$$1, set) { - if (newData[name$$1] !== oldData[name$$1]) { - set(image, name$$1, newData[name$$1]); + var updateProp = function (image, oldData, newData, name, set) { + if (newData[name] !== oldData[name]) { + set(image, name, newData[name]); } }; var normalized = function (set, normalizeCss) { - return function (image, name$$1, value) { + return function (image, name, value) { set(image, value); normalizeStyle(image, normalizeCss); }; @@ -952,7 +952,7 @@ var image = (function () { } success(pathJoin(settings.basePath, json.location)); }; - formData = new FormData(); + formData = new domGlobals.FormData(); formData.append('file', blobInfo.blob(), blobInfo.filename()); xhr.send(formData); }; @@ -1200,5 +1200,5 @@ var image = (function () { return Plugin; -}()); +}(window)); })(); diff --git a/src/js/_enqueues/vendor/tinymce/plugins/image/plugin.min.js b/src/js/_enqueues/vendor/tinymce/plugins/image/plugin.min.js index 2bb78be4b3..d4764ad625 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/image/plugin.min.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/image/plugin.min.js @@ -1 +1 @@ -!function(){"use strict";var i,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(e){return!1!==e.settings.image_dimensions},l=function(e){return!0===e.settings.image_advtab},m=function(e){return e.getParam("image_prepend_url","")},n=function(e){return e.getParam("image_class_list")},r=function(e){return!1!==e.settings.image_description},a=function(e){return!0===e.settings.image_title},o=function(e){return!0===e.settings.image_caption},u=function(e){return e.getParam("image_list",!1)},c=function(e){return e.getParam("images_upload_url",!1)},s=function(e){return e.getParam("images_upload_handler",!1)},g=function(e){return e.getParam("images_upload_url")},f=function(e){return e.getParam("images_upload_handler")},p=function(e){return e.getParam("images_upload_base_path")},h=function(e){return e.getParam("images_upload_credentials")},v="undefined"!=typeof window?window:Function("return this;")(),b=function(e,t){return function(e,t){for(var n=t!==undefined&&null!==t?t:v,r=0;r 10) { - var link = document.createElement('a'); + var link = domGlobals.document.createElement('a'); link.target = '_blank'; link.href = url; link.rel = 'noreferrer noopener'; - var evt = document.createEvent('MouseEvents'); - evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); + var evt = domGlobals.document.createEvent('MouseEvents'); + evt.initMouseEvent('click', true, true, domGlobals.window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); appendClickRemove(link, evt); } else { - var win = window.open('', '_blank'); + var win = domGlobals.window.open('', '_blank'); if (win) { win.opener = null; var doc = win.document; @@ -94,7 +94,7 @@ var link = (function () { } } }; - var OpenUrl = { open: open$$1 }; + var OpenUrl = { open: open }; var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools'); @@ -709,5 +709,5 @@ var link = (function () { return Plugin; -}()); +}(window)); })(); diff --git a/src/js/_enqueues/vendor/tinymce/plugins/link/plugin.min.js b/src/js/_enqueues/vendor/tinymce/plugins/link/plugin.min.js index ebd4165e89..e07a9120b9 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/link/plugin.min.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/link/plugin.min.js @@ -1 +1 @@ -!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.VK"),e=function(t){return t.target_list},o=function(t){return t.rel_list},i=function(t){return t.link_class_list},p=function(t){return"boolean"==typeof t.link_assume_external_targets&&t.link_assume_external_targets},a=function(t){return"boolean"==typeof t.link_context_toolbar&&t.link_context_toolbar},r=function(t){return t.link_list},k=function(t){return"string"==typeof t.default_link_target},y=function(t){return t.default_link_target},b=e,_=function(t,e){t.settings.target_list=e},w=function(t){return!1!==e(t)},T=o,C=function(t){return o(t)!==undefined},M=i,O=function(t){return i(t)!==undefined},R=function(t){return!1!==t.link_title},N=function(t){return"boolean"==typeof t.allow_unsafe_link_target&&t.allow_unsafe_link_target},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),u=tinymce.util.Tools.resolve("tinymce.Env"),c=function(t){if(!u.ie||10'),i.close()}}var r,a},A=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(t,e){var n,o,i=["noopener"],r=t?t.split(/\s+/):[],a=function(t){return t.filter(function(t){return-1===A.inArray(i,t)})};return(r=e?(n=a(n=r)).length?n.concat(i):i:a(r)).length?(o=r,A.trim(o.sort().join(" "))):null},f=function(t,e){return e=e||t.selection.getNode(),m(e)?t.dom.select("a[href]",e)[0]:t.dom.getParent(e,"a[href]")},d=function(t){return t&&"A"===t.nodeName&&t.href},m=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},v=function(t,e){var n,o;(o=t.dom.select("img",e)[0])&&(n=t.dom.getParents(o,"a[href]",e)[0])&&(n.parentNode.insertBefore(o,n),t.dom.remove(n))},g=function(t,e,n){var o,i;(i=t.dom.select("img",e)[0])&&(o=t.dom.create("a",n),i.parentNode.insertBefore(o,i),o.appendChild(i))},L=function(i,r){return function(o){i.undoManager.transact(function(){var t=i.selection.getNode(),e=f(i,t),n={href:o.href,target:o.target?o.target:null,rel:o.rel?o.rel:null,"class":o["class"]?o["class"]:null,title:o.title?o.title:null};C(i.settings)||!1!==N(i.settings)||(n.rel=s(n.rel,"_blank"===n.target)),o.href===r.href&&(r.attach(),r={}),e?(i.focus(),o.hasOwnProperty("text")&&("innerText"in e?e.innerText=o.text:e.textContent=o.text),i.dom.setAttribs(e,n),i.selection.select(e),i.undoManager.add()):m(t)?g(i,t,n):o.hasOwnProperty("text")?i.insertContent(i.dom.createHTML("a",n,i.dom.encode(o.text))):i.execCommand("mceInsertLink",!1,n)})}},P=function(e){return function(){e.undoManager.transact(function(){var t=e.selection.getNode();m(t)?v(e,t):e.execCommand("unlink")})}},h=d,x=function(t){return 0]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},S=f,I=function(t,e){var n=e?e.innerText||e.textContent:t.getContent({format:"text"});return n.replace(/\uFEFF/g,"")},K=s,U=tinymce.util.Tools.resolve("tinymce.util.Delay"),D=tinymce.util.Tools.resolve("tinymce.util.XHR"),B={},F=function(t,o,e){var i=function(t,n){return n=n||[],A.each(t,function(t){var e={text:t.text||t.title};t.menu?e.menu=i(t.menu):(e.value=t.value,o&&o(e)),n.push(e)}),n};return i(t,e||[])},q=function(e,t,n){var o=e.selection.getRng();U.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),n(t)})})},V=function(a,t){var e,l,o,u,n,i,r,c,s,f,d,m={},v=a.selection,g=a.dom,h=function(t){var e=o.find("#text");(!e.value()||t.lastControl&&e.value()===t.lastControl.text())&&e.value(t.control.text()),o.find("#href").value(t.control.value())},x=function(){l||!u||m.text||this.parent().parent().find("#text")[0].value(this.value())};u=E(v.getContent()),e=S(a),m.text=l=I(a.selection,e),m.href=e?g.getAttrib(e,"href"):"",e?m.target=g.getAttrib(e,"target"):k(a.settings)&&(m.target=y(a.settings)),(d=g.getAttrib(e,"rel"))&&(m.rel=d),(d=g.getAttrib(e,"class"))&&(m["class"]=d),(d=g.getAttrib(e,"title"))&&(m.title=d),u&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){m.text=this.value()}}),t&&(i={type:"listbox",label:"Link list",values:F(t,function(t){t.value=a.convertURL(t.value||t.url,"href")},[{text:"None",value:""}]),onselect:h,value:a.convertURL(m.href,"href"),onPostRender:function(){i=this}}),w(a.settings)&&(b(a.settings)===undefined&&_(a,[{text:"None",value:""},{text:"New window",value:"_blank"}]),c={name:"target",type:"listbox",label:"Target",values:F(b(a.settings))}),C(a.settings)&&(r={name:"rel",type:"listbox",label:"Rel",values:F(T(a.settings),function(t){!1===N(a.settings)&&(t.value=K(t.value,"_blank"===m.target))})}),O(a.settings)&&(s={name:"class",type:"listbox",label:"Class",values:F(M(a.settings),function(t){t.value&&(t.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[t.value]})})})}),R(a.settings)&&(f={name:"title",type:"textbox",label:"Title",value:m.title}),o=a.windowManager.open({title:"Insert link",data:m,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:function(t){var e=t.meta||{};i&&i.value(a.convertURL(this.value(),"href")),A.each(t.meta,function(t,e){var n=o.find("#"+e);"text"===e?0===l.length&&(n.value(t),m.text=t):n.value(t)}),e.attach&&(B={href:this.value(),attach:e.attach}),e.text||x.call(this)},onkeyup:x,onpaste:x,onbeforecall:function(t){t.meta=o.toJSON()}},n,f,function(n){var o=[];if(A.each(a.dom.select("a:not([href])"),function(t){var e=t.name||t.id;e&&o.push({text:e,value:"#"+e,selected:-1!==n.indexOf("#"+e)})}),o.length)return o.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:o,onselect:h}}(m.href),i,r,c,s],onSubmit:function(t){var e=p(a.settings),n=L(a,B),o=P(a),i=A.extend({},m,t.data),r=i.href;r?(u&&i.text!==l||delete i.text,0'),i.close()}}var r,a},A=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=function(t,e){var n,o,i=["noopener"],r=t?t.split(/\s+/):[],a=function(t){return t.filter(function(t){return-1===A.inArray(i,t)})};return(r=e?(n=a(n=r)).length?n.concat(i):i:a(r)).length?(o=r,A.trim(o.sort().join(" "))):null},d=function(t,e){return e=e||t.selection.getNode(),v(e)?t.dom.select("a[href]",e)[0]:t.dom.getParent(e,"a[href]")},m=function(t){return t&&"A"===t.nodeName&&t.href},v=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},g=function(t,e){var n,o;(o=t.dom.select("img",e)[0])&&(n=t.dom.getParents(o,"a[href]",e)[0])&&(n.parentNode.insertBefore(o,n),t.dom.remove(n))},h=function(t,e,n){var o,i;(i=t.dom.select("img",e)[0])&&(o=t.dom.create("a",n),i.parentNode.insertBefore(o,i),o.appendChild(i))},L=function(i,r){return function(o){i.undoManager.transact(function(){var t=i.selection.getNode(),e=d(i,t),n={href:o.href,target:o.target?o.target:null,rel:o.rel?o.rel:null,"class":o["class"]?o["class"]:null,title:o.title?o.title:null};C(i.settings)||!1!==N(i.settings)||(n.rel=f(n.rel,"_blank"===n.target)),o.href===r.href&&(r.attach(),r={}),e?(i.focus(),o.hasOwnProperty("text")&&("innerText"in e?e.innerText=o.text:e.textContent=o.text),i.dom.setAttribs(e,n),i.selection.select(e),i.undoManager.add()):v(t)?h(i,t,n):o.hasOwnProperty("text")?i.insertContent(i.dom.createHTML("a",n,i.dom.encode(o.text))):i.execCommand("mceInsertLink",!1,n)})}},P=function(e){return function(){e.undoManager.transact(function(){var t=e.selection.getNode();v(t)?g(e,t):e.execCommand("unlink")})}},x=m,E=function(t){return 0]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},I=d,K=function(t,e){var n=e?e.innerText||e.textContent:t.getContent({format:"text"});return n.replace(/\uFEFF/g,"")},U=f,D=tinymce.util.Tools.resolve("tinymce.util.Delay"),B=tinymce.util.Tools.resolve("tinymce.util.XHR"),F={},q=function(t,o,e){var i=function(t,n){return n=n||[],A.each(t,function(t){var e={text:t.text||t.title};t.menu?e.menu=i(t.menu):(e.value=t.value,o&&o(e)),n.push(e)}),n};return i(t,e||[])},V=function(e,t,n){var o=e.selection.getRng();D.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),n(t)})})},z=function(a,t){var e,l,o,u,n,i,r,c,s,f,d,m={},v=a.selection,g=a.dom,h=function(t){var e=o.find("#text");(!e.value()||t.lastControl&&e.value()===t.lastControl.text())&&e.value(t.control.text()),o.find("#href").value(t.control.value())},x=function(){l||!u||m.text||this.parent().parent().find("#text")[0].value(this.value())};u=S(v.getContent()),e=I(a),m.text=l=K(a.selection,e),m.href=e?g.getAttrib(e,"href"):"",e?m.target=g.getAttrib(e,"target"):k(a.settings)&&(m.target=y(a.settings)),(d=g.getAttrib(e,"rel"))&&(m.rel=d),(d=g.getAttrib(e,"class"))&&(m["class"]=d),(d=g.getAttrib(e,"title"))&&(m.title=d),u&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){m.text=this.value()}}),t&&(i={type:"listbox",label:"Link list",values:q(t,function(t){t.value=a.convertURL(t.value||t.url,"href")},[{text:"None",value:""}]),onselect:h,value:a.convertURL(m.href,"href"),onPostRender:function(){i=this}}),w(a.settings)&&(b(a.settings)===undefined&&_(a,[{text:"None",value:""},{text:"New window",value:"_blank"}]),c={name:"target",type:"listbox",label:"Target",values:q(b(a.settings))}),C(a.settings)&&(r={name:"rel",type:"listbox",label:"Rel",values:q(T(a.settings),function(t){!1===N(a.settings)&&(t.value=U(t.value,"_blank"===m.target))})}),O(a.settings)&&(s={name:"class",type:"listbox",label:"Class",values:q(M(a.settings),function(t){t.value&&(t.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[t.value]})})})}),R(a.settings)&&(f={name:"title",type:"textbox",label:"Title",value:m.title}),o=a.windowManager.open({title:"Insert link",data:m,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:function(t){var e=t.meta||{};i&&i.value(a.convertURL(this.value(),"href")),A.each(t.meta,function(t,e){var n=o.find("#"+e);"text"===e?0===l.length&&(n.value(t),m.text=t):n.value(t)}),e.attach&&(F={href:this.value(),attach:e.attach}),e.text||x.call(this)},onkeyup:x,onpaste:x,onbeforecall:function(t){t.meta=o.toJSON()}},n,f,function(n){var o=[];if(A.each(a.dom.select("a:not([href])"),function(t){var e=t.name||t.id;e&&o.push({text:e,value:"#"+e,selected:-1!==n.indexOf("#"+e)})}),o.length)return o.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:o,onselect:h}}(m.href),i,r,c,s],onSubmit:function(t){var e=p(a.settings),n=L(a,F),o=P(a),i=A.extend({},m,t.data),r=i.href;r?(u&&i.text!==l||delete i.text,0 1) { + domGlobals.console.error('HTML does not have a single root node', html); + throw new Error('HTML must have a single root node'); + } + return fromDom(div.childNodes[0]); + }; + var fromTag = function (tag, scope) { + var doc = scope || domGlobals.document; + var node = doc.createElement(tag); + return fromDom(node); + }; + var fromText = function (text, scope) { + var doc = scope || domGlobals.document; + var node = doc.createTextNode(text); + return fromDom(node); + }; + var fromDom = function (node) { + if (node === null || node === undefined) { + throw new Error('Node cannot be null or undefined'); + } + return { dom: constant(node) }; + }; + var fromPoint = function (docElm, x, y) { + var doc = docElm.dom(); + return Option.from(doc.elementFromPoint(x, y)).map(fromDom); + }; + var Element = { + fromHtml: fromHtml, + fromTag: fromTag, + fromText: fromText, + fromDom: fromDom, + fromPoint: fromPoint + }; + + var liftN = function (arr, f) { + var r = []; + for (var i = 0; i < arr.length; i++) { + var x = arr[i]; + if (x.isSome()) { + r.push(x.getOrDie()); + } else { + return Option.none(); + } + } + return Option.some(f.apply(null, r)); + }; + + var fromElements = function (elements, scope) { + var doc = scope || domGlobals.document; + var fragment = doc.createDocumentFragment(); + each(elements, function (element) { + fragment.appendChild(element.dom()); + }); + return Element.fromDom(fragment); + }; + + var Immutable = function () { + var fields = []; + for (var _i = 0; _i < arguments.length; _i++) { + fields[_i] = arguments[_i]; + } + return function () { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + if (fields.length !== values.length) { + throw new Error('Wrong number of arguments to struct. Expected "[' + fields.length + ']", got ' + values.length + ' arguments'); + } + var struct = {}; + each(fields, function (name, i) { + struct[name] = constant(values[i]); + }); + return struct; + }; + }; + + var keys = Object.keys; + var each$1 = function (obj, f) { + var props = keys(obj); + for (var k = 0, len = props.length; k < len; k++) { + var i = props[k]; + var x = obj[i]; + f(x, i, obj); + } + }; + var node = function () { var f = Global$1.getOrDie('Node'); return f; @@ -602,7 +679,7 @@ var lists = (function () { var documentPositionContainedBy = function (a, b) { return compareDocumentPosition(a, b, node().DOCUMENT_POSITION_CONTAINED_BY); }; - var Node$1 = { + var Node = { documentPositionPreceding: documentPositionPreceding, documentPositionContainedBy: documentPositionContainedBy }; @@ -801,14 +878,14 @@ var lists = (function () { detectOs: detectOs }; - var contains$1 = function (str, substr) { + var contains = function (str, substr) { return str.indexOf(substr) !== -1; }; var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/; var checkContains = function (target) { return function (uastring) { - return contains$1(uastring, target); + return contains(uastring, target); }; }; var browsers = [ @@ -816,7 +893,7 @@ var lists = (function () { name: 'Edge', versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/], search: function (uastring) { - var monstrosity = contains$1(uastring, 'edge/') && contains$1(uastring, 'chrome') && contains$1(uastring, 'safari') && contains$1(uastring, 'applewebkit'); + var monstrosity = contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit'); return monstrosity; } }, @@ -827,7 +904,7 @@ var lists = (function () { normalVersionRegex ], search: function (uastring) { - return contains$1(uastring, 'chrome') && !contains$1(uastring, 'chromeframe'); + return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe'); } }, { @@ -837,7 +914,7 @@ var lists = (function () { /.*?rv:([0-9]+)\.([0-9]+).*/ ], search: function (uastring) { - return contains$1(uastring, 'msie') || contains$1(uastring, 'trident'); + return contains(uastring, 'msie') || contains(uastring, 'trident'); } }, { @@ -860,7 +937,7 @@ var lists = (function () { /.*?cpu os ([0-9]+)_([0-9]+).*/ ], search: function (uastring) { - return (contains$1(uastring, 'safari') || contains$1(uastring, 'mobile/')) && contains$1(uastring, 'applewebkit'); + return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit'); } } ]; @@ -873,7 +950,7 @@ var lists = (function () { { name: 'iOS', search: function (uastring) { - return contains$1(uastring, 'iphone') || contains$1(uastring, 'ipad'); + return contains(uastring, 'iphone') || contains(uastring, 'ipad'); }, versionRegexes: [ /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, @@ -927,99 +1004,102 @@ var lists = (function () { var PlatformDetection = { detect: detect$2 }; var detect$3 = cached(function () { - var userAgent = navigator.userAgent; + var userAgent = domGlobals.navigator.userAgent; return PlatformDetection.detect(userAgent); }); var PlatformDetection$1 = { detect: detect$3 }; - var fromHtml = function (html, scope) { - var doc = scope || document; - var div = doc.createElement('div'); - div.innerHTML = html; - if (!div.hasChildNodes() || div.childNodes.length > 1) { - console.error('HTML does not have a single root node', html); - throw 'HTML must have a single root node'; - } - return fromDom(div.childNodes[0]); - }; - var fromTag = function (tag, scope) { - var doc = scope || document; - var node = doc.createElement(tag); - return fromDom(node); - }; - var fromText = function (text, scope) { - var doc = scope || document; - var node = doc.createTextNode(text); - return fromDom(node); - }; - var fromDom = function (node) { - if (node === null || node === undefined) - throw new Error('Node cannot be null or undefined'); - return { dom: constant(node) }; - }; - var fromPoint = function (docElm, x, y) { - var doc = docElm.dom(); - return Option.from(doc.elementFromPoint(x, y)).map(fromDom); - }; - var Element$$1 = { - fromHtml: fromHtml, - fromTag: fromTag, - fromText: fromText, - fromDom: fromDom, - fromPoint: fromPoint - }; - - var ATTRIBUTE = Node.ATTRIBUTE_NODE; - var CDATA_SECTION = Node.CDATA_SECTION_NODE; - var COMMENT = Node.COMMENT_NODE; - var DOCUMENT = Node.DOCUMENT_NODE; - var DOCUMENT_TYPE = Node.DOCUMENT_TYPE_NODE; - var DOCUMENT_FRAGMENT = Node.DOCUMENT_FRAGMENT_NODE; - var ELEMENT = Node.ELEMENT_NODE; - var TEXT = Node.TEXT_NODE; - var PROCESSING_INSTRUCTION = Node.PROCESSING_INSTRUCTION_NODE; - var ENTITY_REFERENCE = Node.ENTITY_REFERENCE_NODE; - var ENTITY = Node.ENTITY_NODE; - var NOTATION = Node.NOTATION_NODE; + var ATTRIBUTE = domGlobals.Node.ATTRIBUTE_NODE; + var CDATA_SECTION = domGlobals.Node.CDATA_SECTION_NODE; + var COMMENT = domGlobals.Node.COMMENT_NODE; + var DOCUMENT = domGlobals.Node.DOCUMENT_NODE; + var DOCUMENT_TYPE = domGlobals.Node.DOCUMENT_TYPE_NODE; + var DOCUMENT_FRAGMENT = domGlobals.Node.DOCUMENT_FRAGMENT_NODE; + var ELEMENT = domGlobals.Node.ELEMENT_NODE; + var TEXT = domGlobals.Node.TEXT_NODE; + var PROCESSING_INSTRUCTION = domGlobals.Node.PROCESSING_INSTRUCTION_NODE; + var ENTITY_REFERENCE = domGlobals.Node.ENTITY_REFERENCE_NODE; + var ENTITY = domGlobals.Node.ENTITY_NODE; + var NOTATION = domGlobals.Node.NOTATION_NODE; var ELEMENT$1 = ELEMENT; var is = function (element, selector) { var elem = element.dom(); - if (elem.nodeType !== ELEMENT$1) + if (elem.nodeType !== ELEMENT$1) { return false; - else if (elem.matches !== undefined) + } else if (elem.matches !== undefined) { return elem.matches(selector); - else if (elem.msMatchesSelector !== undefined) + } else if (elem.msMatchesSelector !== undefined) { return elem.msMatchesSelector(selector); - else if (elem.webkitMatchesSelector !== undefined) + } else if (elem.webkitMatchesSelector !== undefined) { return elem.webkitMatchesSelector(selector); - else if (elem.mozMatchesSelector !== undefined) + } else if (elem.mozMatchesSelector !== undefined) { return elem.mozMatchesSelector(selector); - else + } else { throw new Error('Browser lacks native selectors'); + } }; var eq = function (e1, e2) { return e1.dom() === e2.dom(); }; var regularContains = function (e1, e2) { - var d1 = e1.dom(), d2 = e2.dom(); + var d1 = e1.dom(); + var d2 = e2.dom(); return d1 === d2 ? false : d1.contains(d2); }; var ieContains = function (e1, e2) { - return Node$1.documentPositionContainedBy(e1.dom(), e2.dom()); + return Node.documentPositionContainedBy(e1.dom(), e2.dom()); }; var browser = PlatformDetection$1.detect().browser; - var contains$2 = browser.isIE() ? ieContains : regularContains; + var contains$1 = browser.isIE() ? ieContains : regularContains; var is$1 = is; - var keys = Object.keys; - var each$1 = function (obj, f) { - var props = keys(obj); - for (var k = 0, len = props.length; k < len; k++) { - var i = props[k]; - var x = obj[i]; - f(x, i, obj); + var parent = function (element) { + var dom = element.dom(); + return Option.from(dom.parentNode).map(Element.fromDom); + }; + var children = function (element) { + var dom = element.dom(); + return map(dom.childNodes, Element.fromDom); + }; + var child = function (element, index) { + var cs = element.dom().childNodes; + return Option.from(cs[index]).map(Element.fromDom); + }; + var firstChild = function (element) { + return child(element, 0); + }; + var lastChild = function (element) { + return child(element, element.dom().childNodes.length - 1); + }; + var spot = Immutable('element', 'offset'); + + var before = function (marker, element) { + var parent$1 = parent(marker); + parent$1.each(function (v) { + v.dom().insertBefore(element.dom(), marker.dom()); + }); + }; + var append = function (parent, element) { + parent.dom().appendChild(element.dom()); + }; + + var before$1 = function (marker, elements) { + each(elements, function (x) { + before(marker, x); + }); + }; + var append$1 = function (parent, elements) { + each(elements, function (x) { + append(parent, x); + }); + }; + + var remove = function (element) { + var dom = element.dom(); + if (dom.parentNode !== null) { + dom.parentNode.removeChild(dom); } }; @@ -1028,11 +1108,11 @@ var lists = (function () { return r.toLowerCase(); }; - var rawSet = function (dom, key, value$$1) { - if (isString(value$$1) || isBoolean(value$$1) || isNumber(value$$1)) { - dom.setAttribute(key, value$$1 + ''); + var rawSet = function (dom, key, value) { + if (isString(value) || isBoolean(value) || isNumber(value)) { + dom.setAttribute(key, value + ''); } else { - console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value$$1, ':: Element ', dom); + domGlobals.console.error('Invalid call to Attr.set. Key ', key, ':: Value ', value, ':: Element ', dom); throw new Error('Attribute value was not simple'); } }; @@ -1049,82 +1129,32 @@ var lists = (function () { }, {}); }; - var Immutable = function () { - var fields = []; - for (var _i = 0; _i < arguments.length; _i++) { - fields[_i] = arguments[_i]; + var isSupported = function (dom) { + return dom.style !== undefined; + }; + + var internalSet = function (dom, property, value) { + if (!isString(value)) { + domGlobals.console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom); + throw new Error('CSS value must be a string: ' + value); + } + if (isSupported(dom)) { + dom.style.setProperty(property, value); } - return function () { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - if (fields.length !== values.length) { - throw new Error('Wrong number of arguments to struct. Expected "[' + fields.length + ']", got ' + values.length + ' arguments'); - } - var struct = {}; - each(fields, function (name, i) { - struct[name] = constant(values[i]); - }); - return struct; - }; }; - - var parent = function (element) { + var set = function (element, property, value) { var dom = element.dom(); - return Option.from(dom.parentNode).map(Element$$1.fromDom); - }; - var children = function (element) { - var dom = element.dom(); - return map(dom.childNodes, Element$$1.fromDom); - }; - var child = function (element, index) { - var children = element.dom().childNodes; - return Option.from(children[index]).map(Element$$1.fromDom); - }; - var firstChild = function (element) { - return child(element, 0); - }; - var lastChild = function (element) { - return child(element, element.dom().childNodes.length - 1); - }; - var spot = Immutable('element', 'offset'); - - var before = function (marker, element) { - var parent$$1 = parent(marker); - parent$$1.each(function (v) { - v.dom().insertBefore(element.dom(), marker.dom()); - }); - }; - var append = function (parent$$1, element) { - parent$$1.dom().appendChild(element.dom()); + internalSet(dom, property, value); }; - var before$1 = function (marker, elements) { - each(elements, function (x) { - before(marker, x); - }); - }; - var append$1 = function (parent, elements) { - each(elements, function (x) { - append(parent, x); - }); - }; - - var remove$1 = function (element) { - var dom = element.dom(); - if (dom.parentNode !== null) - dom.parentNode.removeChild(dom); - }; - - var clone$1 = function (original, deep) { - return Element$$1.fromDom(original.dom().cloneNode(deep)); + var clone$1 = function (original, isDeep) { + return Element.fromDom(original.dom().cloneNode(isDeep)); }; var deep = function (original) { return clone$1(original, true); }; var shallowAs = function (original, tag) { - var nu = Element$$1.fromTag(tag); + var nu = Element.fromTag(tag); var attributes = clone(original); setAll(nu, attributes); return nu; @@ -1132,222 +1162,125 @@ var lists = (function () { var mutate = function (original, tag) { var nu = shallowAs(original, tag); before(original, nu); - var children$$1 = children(original); - append$1(nu, children$$1); - remove$1(original); + var children$1 = children(original); + append$1(nu, children$1); + remove(original); return nu; }; - var global$8 = tinymce.util.Tools.resolve('tinymce.Env'); - - var DOM$1 = global$6.DOM; - var createNewTextBlock = function (editor, contentNode, blockName) { - var node, textBlock; - var fragment = DOM$1.createFragment(); - var hasContentNode; - var blockElements = editor.schema.getBlockElements(); - if (editor.settings.forced_root_block) { - blockName = blockName || editor.settings.forced_root_block; - } - if (blockName) { - textBlock = DOM$1.create(blockName); - if (textBlock.tagName === editor.settings.forced_root_block) { - DOM$1.setAttribs(textBlock, editor.settings.forced_root_block_attrs); - } - if (!NodeType.isBlock(contentNode.firstChild, blockElements)) { - fragment.appendChild(textBlock); - } - } - if (contentNode) { - while (node = contentNode.firstChild) { - var nodeName = node.nodeName; - if (!hasContentNode && (nodeName !== 'SPAN' || node.getAttribute('data-mce-type') !== 'bookmark')) { - hasContentNode = true; - } - if (NodeType.isBlock(node, blockElements)) { - fragment.appendChild(node); - textBlock = null; - } else { - if (blockName) { - if (!textBlock) { - textBlock = DOM$1.create(blockName); - fragment.appendChild(textBlock); - } - textBlock.appendChild(node); - } else { - fragment.appendChild(node); - } - } - } - } - if (!editor.settings.forced_root_block) { - fragment.appendChild(DOM$1.create('br')); - } else { - if (!hasContentNode && (!global$8.ie || global$8.ie > 10)) { - textBlock.appendChild(DOM$1.create('br', { 'data-mce-bogus': '1' })); - } - } - return fragment; + var joinSegment = function (parent, child) { + append(parent.item, child.list); }; - var TextBlock = { createNewTextBlock: createNewTextBlock }; - - var DOM$2 = global$6.DOM; - var splitList = function (editor, ul, li, newBlock) { - var tmpRng, fragment, bookmarks, node; - var removeAndKeepBookmarks = function (targetNode) { - global$5.each(bookmarks, function (node) { - targetNode.parentNode.insertBefore(node, li.parentNode); - }); - DOM$2.remove(targetNode); + var joinSegments = function (segments) { + for (var i = 1; i < segments.length; i++) { + joinSegment(segments[i - 1], segments[i]); + } + }; + var appendSegments = function (head$1, tail) { + liftN([ + last(head$1), + head(tail) + ], joinSegment); + }; + var createSegment = function (scope, listType) { + var segment = { + list: Element.fromTag(listType, scope), + item: Element.fromTag('li', scope) }; - bookmarks = DOM$2.select('span[data-mce-type="bookmark"]', ul); - newBlock = newBlock || TextBlock.createNewTextBlock(editor, li); - tmpRng = DOM$2.createRng(); - tmpRng.setStartAfter(li); - tmpRng.setEndAfter(ul); - fragment = tmpRng.extractContents(); - for (node = fragment.firstChild; node; node = node.firstChild) { - if (node.nodeName === 'LI' && editor.dom.isEmpty(node)) { - DOM$2.remove(node); - break; - } - } - if (!editor.dom.isEmpty(fragment)) { - DOM$2.insertAfter(fragment, ul); - } - DOM$2.insertAfter(newBlock, ul); - if (NodeType.isEmpty(editor.dom, li.parentNode)) { - removeAndKeepBookmarks(li.parentNode); - } - DOM$2.remove(li); - if (NodeType.isEmpty(editor.dom, ul)) { - DOM$2.remove(ul); - } + append(segment.list, segment.item); + return segment; }; - var SplitList = { splitList: splitList }; - - var liftN = function (arr, f) { - var r = []; - for (var i = 0; i < arr.length; i++) { - var x = arr[i]; - if (x.isSome()) { - r.push(x.getOrDie()); - } else { - return Option.none(); - } + var createSegments = function (scope, entry, size) { + var segments = []; + for (var i = 0; i < size; i++) { + segments.push(createSegment(scope, entry.listType)); } - return Option.some(f.apply(null, r)); + return segments; }; - - var fromElements = function (elements, scope) { - var doc = scope || document; - var fragment = doc.createDocumentFragment(); - each(elements, function (element) { - fragment.appendChild(element.dom()); + var populateSegments = function (segments, entry) { + for (var i = 0; i < segments.length - 1; i++) { + set(segments[i].item, 'list-style-type', 'none'); + } + last(segments).each(function (segment) { + setAll(segment.list, entry.listAttributes); + setAll(segment.item, entry.itemAttributes); + append$1(segment.item, entry.content); }); - return Element$$1.fromDom(fragment); }; - - var isSupported = function (dom) { - return dom.style !== undefined; - }; - - var internalSet = function (dom, property, value$$1) { - if (!isString(value$$1)) { - console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value$$1, ':: Element ', dom); - throw new Error('CSS value must be a string: ' + value$$1); + var normalizeSegment = function (segment, entry) { + if (name(segment.list) !== entry.listType) { + segment.list = mutate(segment.list, entry.listType); } - if (isSupported(dom)) - dom.style.setProperty(property, value$$1); - }; - var set$1 = function (element, property, value$$1) { - var dom = element.dom(); - internalSet(dom, property, value$$1); - }; - - var createSection = function (scope, listType) { - var section = { - list: Element$$1.fromTag(listType, scope), - item: Element$$1.fromTag('li', scope) - }; - append(section.list, section.item); - return section; - }; - var joinSections = function (parent, appendor) { - append(parent.item, appendor.list); - }; - var createJoinedSections = function (scope, length, listType) { - var sections = []; - var _loop_1 = function (i) { - var newSection = createSection(scope, listType); - last(sections).each(function (lastSection) { - return joinSections(lastSection, newSection); - }); - sections.push(newSection); - }; - for (var i = 0; i < length; i++) { - _loop_1(i); - } - return sections; - }; - var normalizeSection = function (section, entry) { - if (name(section.list).toUpperCase() !== entry.listType) { - section.list = mutate(section.list, entry.listType); - } - setAll(section.list, entry.listAttributes); + setAll(segment.list, entry.listAttributes); }; var createItem = function (scope, attr, content) { - var item = Element$$1.fromTag('li', scope); + var item = Element.fromTag('li', scope); setAll(item, attr); append$1(item, content); return item; }; - var setItem = function (section, item) { - append(section.list, item); - section.item = item; + var appendItem = function (segment, item) { + append(segment.list, item); + segment.item = item; }; - var writeShallow = function (scope, outline, entry) { - var newOutline = outline.slice(0, entry.depth); - last(newOutline).each(function (section) { - setItem(section, createItem(scope, entry.itemAttributes, entry.content)); - normalizeSection(section, entry); + var writeShallow = function (scope, cast, entry) { + var newCast = cast.slice(0, entry.depth); + last(newCast).each(function (segment) { + var item = createItem(scope, entry.itemAttributes, entry.content); + appendItem(segment, item); + normalizeSegment(segment, entry); }); - return newOutline; + return newCast; }; - var populateSections = function (sections, entry) { - last(sections).each(function (section) { - setAll(section.list, entry.listAttributes); - setAll(section.item, entry.itemAttributes); - append$1(section.item, entry.content); - }); - for (var i = 0; i < sections.length - 1; i++) { - set$1(sections[i].item, 'list-style-type', 'none'); - } - }; - var writeDeep = function (scope, outline, entry) { - var newSections = createJoinedSections(scope, entry.depth - outline.length, entry.listType); - populateSections(newSections, entry); - liftN([ - last(outline), - head(newSections) - ], joinSections); - return outline.concat(newSections); + var writeDeep = function (scope, cast, entry) { + var segments = createSegments(scope, entry, entry.depth - cast.length); + joinSegments(segments); + populateSegments(segments, entry); + appendSegments(cast, segments); + return cast.concat(segments); }; var composeList = function (scope, entries) { - var outline = foldl(entries, function (outline, entry) { - return entry.depth > outline.length ? writeDeep(scope, outline, entry) : writeShallow(scope, outline, entry); + var cast = foldl(entries, function (cast, entry) { + return entry.depth > cast.length ? writeDeep(scope, cast, entry) : writeShallow(scope, cast, entry); }, []); - return head(outline).map(function (section) { - return section.list; + return head(cast).map(function (segment) { + return segment.list; }); }; + var isList$1 = function (el) { + return is$1(el, 'OL,UL'); + }; + var hasFirstChildList = function (el) { + return firstChild(el).map(isList$1).getOr(false); + }; + var hasLastChildList = function (el) { + return lastChild(el).map(isList$1).getOr(false); + }; + var isIndented = function (entry) { return entry.depth > 0; }; var isSelected = function (entry) { return entry.isSelected; }; + var cloneItemContent = function (li) { + var children$1 = children(li); + var content = hasLastChildList(li) ? children$1.slice(0, -1) : children$1; + return map(content, deep); + }; + var createEntry = function (li, depth, isSelected) { + return parent(li).map(function (list) { + return { + depth: depth, + isSelected: isSelected, + content: cloneItemContent(li), + itemAttributes: clone(li), + listAttributes: clone(list), + listType: name(list) + }; + }); + }; var indentEntry = function (indentation, entry) { switch (indentation) { @@ -1362,8 +1295,8 @@ var lists = (function () { } }; - var hasOwnProperty$1 = Object.prototype.hasOwnProperty; - var shallow$1 = function (old, nu) { + var hasOwnProperty = Object.prototype.hasOwnProperty; + var shallow = function (old, nu) { return nu; }; var baseMerge = function (merger) { @@ -1377,41 +1310,37 @@ var lists = (function () { for (var j = 0; j < objects.length; j++) { var curObject = objects[j]; for (var key in curObject) - if (hasOwnProperty$1.call(curObject, key)) { + if (hasOwnProperty.call(curObject, key)) { ret[key] = merger(ret[key], curObject[key]); } } return ret; }; }; - var merge = baseMerge(shallow$1); + var merge = baseMerge(shallow); - var assimilateEntry = function (adherent, source) { - adherent.listType = source.listType; - adherent.listAttributes = merge({}, source.listAttributes); + var cloneListProperties = function (target, source) { + target.listType = source.listType; + target.listAttributes = merge({}, source.listAttributes); }; - var normalizeShallow = function (outline, entry) { - var matchingEntryDepth = entry.depth - 1; - outline[matchingEntryDepth].each(function (matchingEntry) { - return assimilateEntry(entry, matchingEntry); - }); - var newOutline = outline.slice(0, matchingEntryDepth); - newOutline.push(Option.some(entry)); - return newOutline; - }; - var normalizeDeep = function (outline, entry) { - var newOutline = outline.slice(0); - var diff = entry.depth - outline.length; - for (var i = 1; i < diff; i++) { - newOutline.push(Option.none()); + var previousSiblingEntry = function (entries, start) { + var depth = entries[start].depth; + for (var i = start - 1; i >= 0; i--) { + if (entries[i].depth === depth) { + return Option.some(entries[i]); + } + if (entries[i].depth < depth) { + break; + } } - newOutline.push(Option.some(entry)); - return newOutline; + return Option.none(); }; var normalizeEntries = function (entries) { - foldl(entries, function (outline, entry) { - return entry.depth > outline.length ? normalizeDeep(outline, entry) : normalizeShallow(outline, entry); - }, []); + each(entries, function (entry, i) { + previousSiblingEntry(entries, i).each(function (matchingEntry) { + cloneListProperties(entry, matchingEntry); + }); + }); }; var Cell = function (initial) { @@ -1432,72 +1361,32 @@ var lists = (function () { }; }; - var ListType; - (function (ListType) { - ListType['OL'] = 'OL'; - ListType['UL'] = 'UL'; - ListType['DL'] = 'DL'; - }(ListType || (ListType = {}))); - var getListType = function (list) { - switch (name(list)) { - case 'ol': - return Option.some(ListType.OL); - case 'ul': - return Option.some(ListType.UL); - case 'dl': - return Option.some(ListType.DL); - default: - return Option.none(); - } - }; - var isList$1 = function (el) { - return is$1(el, 'OL,UL,DL'); - }; - - var hasFirstChildList = function (li) { - return firstChild(li).map(isList$1).getOr(false); - }; - var hasLastChildList = function (li) { - return lastChild(li).map(isList$1).getOr(false); - }; - - var getItemContent = function (li) { - var childNodes = children(li); - var contentLength = childNodes.length + (hasLastChildList(li) ? -1 : 0); - return map(childNodes.slice(0, contentLength), deep); - }; - var createEntry = function (li, depth, isSelected) { - var list = parent(li); - return { - depth: depth, - isSelected: isSelected, - content: getItemContent(li), - listType: list.bind(getListType).getOr(ListType.OL), - listAttributes: list.map(clone).getOr({}), - itemAttributes: clone(li) - }; - }; var parseItem = function (depth, itemSelection, selectionState, item) { - var curriedParseList = curry(parseList, depth, itemSelection, selectionState); - var updateSelectionState = function (itemRange) { - return itemSelection.each(function (selection) { - if (eq(itemRange === 'Start' ? selection.start : selection.end, item)) { - selectionState.set(itemRange === 'Start'); + return firstChild(item).filter(isList$1).fold(function () { + itemSelection.each(function (selection) { + if (eq(selection.start, item)) { + selectionState.set(true); } }); - }; - return firstChild(item).filter(isList$1).fold(function () { - updateSelectionState('Start'); - var fromCurrentItem = createEntry(item, depth, selectionState.get()); - updateSelectionState('End'); - var fromChildList = lastChild(item).filter(isList$1).map(curriedParseList).getOr([]); - return [fromCurrentItem].concat(fromChildList); - }, curriedParseList); + var currentItemEntry = createEntry(item, depth, selectionState.get()); + itemSelection.each(function (selection) { + if (eq(selection.end, item)) { + selectionState.set(false); + } + }); + var childListEntries = lastChild(item).filter(isList$1).map(function (list) { + return parseList(depth, itemSelection, selectionState, list); + }).getOr([]); + return currentItemEntry.toArray().concat(childListEntries); + }, function (list) { + return parseList(depth, itemSelection, selectionState, list); + }); }; var parseList = function (depth, itemSelection, selectionState, list) { - var newDepth = depth + 1; - return bind(children(list), function (child$$1) { - return isList$1(child$$1) ? parseList(newDepth, itemSelection, selectionState, child$$1) : parseItem(newDepth, itemSelection, selectionState, child$$1); + return bind(children(list), function (element) { + var parser = isList$1(element) ? parseList : parseItem; + var newDepth = depth + 1; + return parser(newDepth, itemSelection, selectionState, element); }); }; var parseLists = function (lists, itemSelection) { @@ -1505,16 +1394,67 @@ var lists = (function () { var initialDepth = 0; return map(lists, function (list) { return { - entries: parseList(initialDepth, itemSelection, selectionState, list), - sourceList: list + sourceList: list, + entries: parseList(initialDepth, itemSelection, selectionState, list) }; }); }; + var global$8 = tinymce.util.Tools.resolve('tinymce.Env'); + + var createTextBlock = function (editor, contentNode) { + var dom = editor.dom; + var blockElements = editor.schema.getBlockElements(); + var fragment = dom.createFragment(); + var node, textBlock, blockName, hasContentNode; + if (editor.settings.forced_root_block) { + blockName = editor.settings.forced_root_block; + } + if (blockName) { + textBlock = dom.create(blockName); + if (textBlock.tagName === editor.settings.forced_root_block) { + dom.setAttribs(textBlock, editor.settings.forced_root_block_attrs); + } + if (!NodeType.isBlock(contentNode.firstChild, blockElements)) { + fragment.appendChild(textBlock); + } + } + if (contentNode) { + while (node = contentNode.firstChild) { + var nodeName = node.nodeName; + if (!hasContentNode && (nodeName !== 'SPAN' || node.getAttribute('data-mce-type') !== 'bookmark')) { + hasContentNode = true; + } + if (NodeType.isBlock(node, blockElements)) { + fragment.appendChild(node); + textBlock = null; + } else { + if (blockName) { + if (!textBlock) { + textBlock = dom.create(blockName); + fragment.appendChild(textBlock); + } + textBlock.appendChild(node); + } else { + fragment.appendChild(node); + } + } + } + } + if (!editor.settings.forced_root_block) { + fragment.appendChild(dom.create('br')); + } else { + if (!hasContentNode && (!global$8.ie || global$8.ie > 10)) { + textBlock.appendChild(dom.create('br', { 'data-mce-bogus': '1' })); + } + } + return fragment; + }; + var outdentedComposer = function (editor, entries) { return map(entries, function (entry) { var content = fromElements(entry.content); - return Element$$1.fromDom(TextBlock.createNewTextBlock(editor, content.dom())); + return Element.fromDom(createTextBlock(editor, content.dom())); }); }; var indentedComposer = function (editor, entries) { @@ -1533,7 +1473,7 @@ var lists = (function () { }); }; var getItemSelection = function (editor) { - var selectedListItems = map(Selection.getSelectedListItems(editor), Element$$1.fromDom); + var selectedListItems = map(Selection.getSelectedListItems(editor), Element.fromDom); return liftN([ find(selectedListItems, not(hasFirstChildList)), find(reverse(selectedListItems), not(hasFirstChildList)) @@ -1545,14 +1485,49 @@ var lists = (function () { }); }; var listsIndentation = function (editor, lists, indentation) { - var parsedLists = parseLists(lists, getItemSelection(editor)); - each(parsedLists, function (entrySet) { + var entrySets = parseLists(lists, getItemSelection(editor)); + each(entrySets, function (entrySet) { indentSelectedEntries(entrySet.entries, indentation); before$1(entrySet.sourceList, composeEntries(editor, entrySet.entries)); - remove$1(entrySet.sourceList); + remove(entrySet.sourceList); }); }; + var DOM$1 = global$6.DOM; + var splitList = function (editor, ul, li) { + var tmpRng, fragment, bookmarks, node, newBlock; + var removeAndKeepBookmarks = function (targetNode) { + global$5.each(bookmarks, function (node) { + targetNode.parentNode.insertBefore(node, li.parentNode); + }); + DOM$1.remove(targetNode); + }; + bookmarks = DOM$1.select('span[data-mce-type="bookmark"]', ul); + newBlock = createTextBlock(editor, li); + tmpRng = DOM$1.createRng(); + tmpRng.setStartAfter(li); + tmpRng.setEndAfter(ul); + fragment = tmpRng.extractContents(); + for (node = fragment.firstChild; node; node = node.firstChild) { + if (node.nodeName === 'LI' && editor.dom.isEmpty(node)) { + DOM$1.remove(node); + break; + } + } + if (!editor.dom.isEmpty(fragment)) { + DOM$1.insertAfter(fragment, ul); + } + DOM$1.insertAfter(newBlock, ul); + if (NodeType.isEmpty(editor.dom, li.parentNode)) { + removeAndKeepBookmarks(li.parentNode); + } + DOM$1.remove(li); + if (NodeType.isEmpty(editor.dom, ul)) { + DOM$1.remove(ul); + } + }; + var SplitList = { splitList: splitList }; + var outdentDlItem = function (editor, item) { if (is$1(item, 'DD')) { mutate(item, 'DT'); @@ -1576,26 +1551,30 @@ var lists = (function () { }); } }; + var selectionIndentation = function (editor, indentation) { - var dlItems = map(Selection.getSelectedDlItems(editor), Element$$1.fromDom); - var lists = map(Selection.getSelectedListRoots(editor), Element$$1.fromDom); - if (dlItems.length || lists.length) { + var lists = map(Selection.getSelectedListRoots(editor), Element.fromDom); + var dlItems = map(Selection.getSelectedDlItems(editor), Element.fromDom); + var isHandled = false; + if (lists.length || dlItems.length) { var bookmark = editor.selection.getBookmark(); - dlIndentation(editor, indentation, dlItems); listsIndentation(editor, lists, indentation); + dlIndentation(editor, indentation, dlItems); editor.selection.moveToBookmark(bookmark); editor.selection.setRng(Range.normalizeRange(editor.selection.getRng())); editor.nodeChanged(); + isHandled = true; } + return isHandled; }; var indentListSelection = function (editor) { - selectionIndentation(editor, 'Indent'); + return selectionIndentation(editor, 'Indent'); }; var outdentListSelection = function (editor) { - selectionIndentation(editor, 'Outdent'); + return selectionIndentation(editor, 'Outdent'); }; var flattenListSelection = function (editor) { - selectionIndentation(editor, 'Flatten'); + return selectionIndentation(editor, 'Flatten'); }; var updateListStyle = function (dom, el, detail) { @@ -1823,7 +1802,7 @@ var lists = (function () { mergeWithAdjacentLists: mergeWithAdjacentLists }; - var DOM$3 = global$6.DOM; + var DOM$2 = global$6.DOM; var normalizeList = function (dom, ul) { var sibling; var parentNode = ul.parentNode; @@ -1832,10 +1811,10 @@ var lists = (function () { if (sibling && sibling.nodeName === 'LI') { sibling.appendChild(ul); if (NodeType.isEmpty(dom, parentNode)) { - DOM$3.remove(parentNode); + DOM$2.remove(parentNode); } } else { - DOM$3.setStyle(parentNode, 'listStyleType', 'none'); + DOM$2.setStyle(parentNode, 'listStyleType', 'none'); } } if (NodeType.isListNode(parentNode)) { @@ -1928,10 +1907,14 @@ var lists = (function () { if (listNode) { toElm.appendChild(listNode); } + var contains = contains$1(Element.fromDom(toElm), Element.fromDom(fromElm)); + var nestedLists = contains ? dom.getParents(fromElm, NodeType.isListNode, toElm) : []; dom.remove(fromElm); - if (NodeType.isEmpty(dom, ul) && ul !== dom.getRoot()) { - dom.remove(ul); - } + each(nestedLists, function (list) { + if (NodeType.isEmpty(dom, list) && list !== dom.getRoot()) { + dom.remove(list); + } + }); }; var mergeIntoEmptyLi = function (editor, fromLi, toLi) { editor.dom.$(toLi).empty(); @@ -2047,14 +2030,14 @@ var lists = (function () { backspaceDelete: backspaceDelete }; - var get$3 = function (editor) { + var get = function (editor) { return { backspaceDelete: function (isForward) { Delete.backspaceDelete(editor, isForward); } }; }; - var Api = { get: get$3 }; + var Api = { get: get }; var queryListCommandState = function (editor, listName) { return function () { @@ -2099,16 +2082,11 @@ var lists = (function () { if (e.keyCode !== global$3.TAB || global$3.metaKeyPressed(e)) { return; } - if (Selection.isList(editor)) { - e.preventDefault(); - editor.undoManager.transact(function () { - if (e.shiftKey) { - outdentListSelection(editor); - } else { - indentListSelection(editor); - } - }); - } + editor.undoManager.transact(function () { + if (e.shiftKey ? outdentListSelection(editor) : indentListSelection(editor)) { + e.preventDefault(); + } + }); }); }; var setup$1 = function (editor) { @@ -2119,7 +2097,7 @@ var lists = (function () { }; var Keyboard = { setup: setup$1 }; - var findIndex$2 = function (list, predicate) { + var findIndex = function (list, predicate) { for (var index = 0; index < list.length; index++) { var element = list[index]; if (predicate(element)) { @@ -2132,7 +2110,7 @@ var lists = (function () { return function (e) { var ctrl = e.control; editor.on('NodeChange', function (e) { - var tableCellIndex = findIndex$2(e.parents, NodeType.isTableCellNode); + var tableCellIndex = findIndex(e.parents, NodeType.isTableCellNode); var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents; var lists = global$5.grep(parents, NodeType.isListNode); ctrl.active(lists.length > 0 && lists[0].nodeName === listName); @@ -2177,5 +2155,5 @@ var lists = (function () { return Plugin; -}()); +}(window)); })(); diff --git a/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.min.js b/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.min.js index 17fe490429..e717525212 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.min.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/lists/plugin.min.js @@ -1 +1 @@ -!function(){"use strict";var e,n,t,r,o,i,u,a,l,s,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),d=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),m=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),h=function(e){return e&&"BR"===e.nodeName},y=function(e){return e&&3===e.nodeType},N=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},S=function(e){return e&&/^(OL|UL)$/.test(e.nodeName)},O=function(e){return e&&/^(DT|DD)$/.test(e.nodeName)},C=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},b=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},L=h,T=function(e,n){return n&&!!e.schema.getTextBlockElements()[n.nodeName]},D=function(e,n){return e&&e.nodeName in n},E=function(e,n){return!!h(n)&&!(!e.isBlock(n.nextSibling)||h(n.previousSibling))},w=function(e,n,t){var r=e.isEmpty(n);return!(t&&0=e.childNodes.length?t.data.length:0}:t.previousSibling&&y(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&y(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},x=function(e){var n=e.cloneRange(),t=A(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=A(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},R=g.DOM,I=function(o){var i={},e=function(e){var n,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=R.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):R.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},B=function(o){function e(e){var n,t,r;n=r=o[e?"startContainer":"endContainer"],t=o[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(t=function(e){for(var n=e.parentNode.firstChild,t=0;n;){if(n===e)return t;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(n),n=n.parentNode,R.remove(r),!n.hasChildNodes()&&R.isBlock(n)&&n.appendChild(R.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=R.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),x(n)},_=function(e){return function(){return e}},P=function(t){return function(){for(var e=[],n=0;ne.length?function(e,n){for(var t=e.slice(0),r=n.depth-e.length,o=1;oe.length?Sn(t,e,n):Nn(t,e,n)},[]),oe(o).map(function(e){return e.list})).toArray();var t,r,o},Pn=function(e){var n,t,r=Y(ve.getSelectedListItems(e),We.fromDom);return pn([ee(r,P(An)),ee((n=r,t=re.call(n,0),t.reverse(),t),P(An))],function(e,n){return{start:e,end:n}})},Mn=function(a,e,s){var n,t,r,o=(n=e,t=Pn(a),r=En(!1),Y(n,function(e){return{entries:In(0,t,r,e),sourceList:e}}));G(o,function(e){var n,t,r,o,i,u;n=e.entries,t=s,G(J(n,Cn),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}(t,e)}),r=e.sourceList,i=a,u=e.entries,o=te(function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i=e.childNodes.length?t.data.length:0}:t.previousSibling&&h(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&h(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},A=function(e){var n=e.cloneRange(),t=k(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=k(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},x=m.DOM,R=function(o){var i={},e=function(e){var n,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=x.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):x.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},I=function(o){function e(e){var n,t,r;n=r=o[e?"startContainer":"endContainer"],t=o[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(t=function(e){for(var n=e.parentNode.firstChild,t=0;n;){if(n===e)return t;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(n),n=n.parentNode,x.remove(r),!n.hasChildNodes()&&x.isBlock(n)&&n.appendChild(x.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=x.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),A(n)},_=function(e){return function(){return e}},B=function(t){return function(){for(var e=[],n=0;ne.length?yn(t,e,n):hn(t,e,n)},[]),re(o).map(function(e){return e.list})).toArray();var t,r,o},_n=function(e){var n,t,r=Q(pe.getSelectedListItems(e),he.fromDom);return ye([Z(r,B(Sn)),Z((n=r,t=te.call(n,0),t.reverse(),t),B(Sn))],function(e,n){return{start:e,end:n}})},Bn=function(a,e,s){var n,t,r,o=(n=e,t=_n(a),r=En(!1),Q(n,function(e){return{sourceList:e,entries:kn(0,t,r,e)}}));Y(o,function(e){var n,t,r,o,i,u;n=e.entries,t=s,Y(G(n,On),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}(t,e)}),r=e.sourceList,i=a,u=e.entries,o=ne(function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i', false); } }; - var isClipboardEvent = function (event$$1) { - return event$$1.type === 'paste'; + var isClipboardEvent = function (event) { + return event.type === 'paste'; }; var readBlobsAsDataUris = function (items) { return mapM(items, function (item) { @@ -1239,7 +1239,7 @@ var paste = (function () { }; var isBrokenAndroidClipboardEvent = function (e) { var clipboardData = e.clipboardData; - return navigator.userAgent.indexOf('Android') !== -1 && clipboardData && clipboardData.items && clipboardData.items.length === 0; + return domGlobals.navigator.userAgent.indexOf('Android') !== -1 && clipboardData && clipboardData.items && clipboardData.items.length === 0; }; var isKeyboardPasteEvent = function (e) { return global$4.metaKeyPressed(e) && e.keyCode === 86 || e.shiftKey && e.keyCode === 45; @@ -1255,7 +1255,7 @@ var paste = (function () { } if (isKeyboardPasteEvent(e) && !e.isDefaultPrevented()) { keyboardPastePlainTextState = e.shiftKey && e.keyCode === 86; - if (keyboardPastePlainTextState && global$1.webkit && navigator.userAgent.indexOf('Version/') !== -1) { + if (keyboardPastePlainTextState && global$1.webkit && domGlobals.navigator.userAgent.indexOf('Version/') !== -1) { return; } e.stopImmediatePropagation(); @@ -1355,7 +1355,7 @@ var paste = (function () { var registerEventsAndFilters = function (editor, pasteBin, pasteFormat) { registerEventHandlers(editor, pasteBin, pasteFormat); var src; - editor.parser.addNodeFilter('img', function (nodes, name$$1, args) { + editor.parser.addNodeFilter('img', function (nodes, name, args) { var isPasteInsert = function (args) { return args.data && args.data.paste === true; }; @@ -1388,7 +1388,7 @@ var paste = (function () { }; var getPasteBinParent = function (editor) { - return global$1.ie && editor.inline ? document.body : editor.getBody(); + return global$1.ie && editor.inline ? domGlobals.document.body : editor.getBody(); }; var isExternalPasteBin = function (editor) { return getPasteBinParent(editor) !== editor.getBody(); @@ -1524,7 +1524,7 @@ var paste = (function () { }; }; - var noop$1 = function () { + var noop = function () { }; var hasWorkingClipboardApi = function (clipboardData) { return global$1.iOS === false && clipboardData !== undefined && typeof clipboardData.setData === 'function' && Utils.isMsEdge() !== true; @@ -1607,7 +1607,7 @@ var paste = (function () { var copy = function (editor) { return function (evt) { if (hasSelectedContent(editor)) { - setClipboardData(evt, getData(editor), fallback(editor), noop$1); + setClipboardData(evt, getData(editor), fallback(editor), noop); } }; }; @@ -1854,5 +1854,5 @@ var paste = (function () { return Plugin; -}()); +}(window)); })(); diff --git a/src/js/_enqueues/vendor/tinymce/plugins/paste/plugin.min.js b/src/js/_enqueues/vendor/tinymce/plugins/paste/plugin.min.js index a75c4534ce..a1f5d533f3 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/paste/plugin.min.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/paste/plugin.min.js @@ -1 +1 @@ -!function(){"use strict";var l=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return l(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(t){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(t.settings.plugins)||!e.get("powerpaste")||("undefined"!=typeof window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))},s=function(t,e){return{clipboard:t,quirks:e}},f=function(t,e,n,r){return t.fire("PastePreProcess",{content:e,internal:n,wordContent:r})},d=function(t,e,n,r){return t.fire("PastePostProcess",{node:e,internal:n,wordContent:r})},u=function(t,e){return t.fire("PastePlainTextToggle",{state:e})},n=function(t,e){return t.fire("paste",{ieFake:e})},m={shouldPlainTextInform:function(t){return t.getParam("paste_plaintext_inform",!0)},shouldBlockDrop:function(t){return t.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(t){return t.getParam("paste_data_images",!1)},shouldFilterDrop:function(t){return t.getParam("paste_filter_drop",!0)},getPreProcess:function(t){return t.getParam("paste_preprocess")},getPostProcess:function(t){return t.getParam("paste_postprocess")},getWebkitStyles:function(t){return t.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(t){return t.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(t){return t.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(t){return t.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(t){return t.getParam("paste_as_text",!1)},getRetainStyleProps:function(t){return t.getParam("paste_retain_style_properties")},getWordValidElements:function(t){return t.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")},shouldConvertWordFakeLists:function(t){return t.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(t){return t.getParam("paste_enable_default_filters",!0)}},r=function(t,e,n){var r,o,i;"text"===e.pasteFormat.get()?(e.pasteFormat.set("html"),u(t,!1)):(e.pasteFormat.set("text"),u(t,!0),i=t,!1===n.get()&&m.shouldPlainTextInform(i)&&(o="Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.",(r=t).notificationManager.open({text:r.translate(o),type:"info"}),n.set(!0))),t.focus()},c=function(t,n,e){t.addCommand("mceTogglePlainTextPaste",function(){r(t,n,e)}),t.addCommand("mceInsertClipboardContent",function(t,e){e.content&&n.pasteHtml(e.content,e.internal),e.text&&n.pasteText(e.text)})},v=tinymce.util.Tools.resolve("tinymce.Env"),h=tinymce.util.Tools.resolve("tinymce.util.Delay"),y=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=tinymce.util.Tools.resolve("tinymce.util.VK"),t="x-tinymce/html",i="\x3c!-- "+t+" --\x3e",g=function(t){return i+t},p=function(t){return t.replace(i,"")},b=function(t){return-1!==t.indexOf(i)},x=function(){return t},P=tinymce.util.Tools.resolve("tinymce.html.Entities"),w=function(t){return t.replace(/\r?\n/g,"
")},_=function(t,e,n){var r=t.split(/\n\n/),o=function(t,e){var n,r=[],o="<"+t;if("object"==typeof e){for(n in e)e.hasOwnProperty(n)&&r.push(n+'="'+P.encodeAllRaw(e[n])+'"');r.length&&(o+=" "+r.join(" "))}return o+">"}(e,n),i="",a=y.map(r,function(t){return t.split(/\n/).join("
")});return 1===a.length?a[0]:y.map(a,function(t){return o+t+i}).join("")},D=function(t){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(t)},T=function(t,e,n){return e?_(t,e,n):w(t)},C=tinymce.util.Tools.resolve("tinymce.html.DomParser"),k=tinymce.util.Tools.resolve("tinymce.html.Node"),S=tinymce.util.Tools.resolve("tinymce.html.Schema"),O=tinymce.util.Tools.resolve("tinymce.html.Serializer");function R(e,t){return y.each(t,function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e}var F={filter:R,innerText:function(e){var n=S(),r=C({},n),o="",i=n.getShortEndedElements(),a=y.makeMap("script noscript style textarea video audio iframe object"," "),s=n.getBlockElements();return e=R(e,[//g]),function t(e){var n=e.name,r=e;if("br"!==n){if("wbr"!==n)if(i[n]&&(o+=" "),a[n])o+=" ";else{if(3===e.type&&(o+=e.value),!e.shortEnded&&(e=e.firstChild))for(;t(e),e=e.next;);s[n]&&r.next&&(o+="\n","p"===n&&(o+="\n"))}}else o+="\n"}(r.parse(e)),o},trimHtml:function(t){return t=R(t,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/|/g,[/( ?)\u00a0<\/span>( ?)/g,function(t,e,n){return e||n?"\xa0":" "}],/
/g,/
$/i])},createIdGenerator:function(t){var e=0;return function(){return t+e++}},isMsEdge:function(){return-1!==navigator.userAgent.indexOf(" Edge/")}};function E(e){var n,t;return t=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \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]/],e=e.replace(/^[\u00a0 ]+/,""),y.each(t,function(t){if(t.test(e))return!(n=!0)}),n}function A(t){var i,a,s=1;function n(t){var e="";if(3===t.type)return t.value;if(t=t.firstChild)for(;e+=n(t),t=t.next;);return e}function u(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do{if(!u(t,e))return!1}while(t=t.next);return!0}function e(e,n,r){var o=e._listLevel||s;o!==s&&(o/gi,/]+id="?docs-internal-[^>]*>/gi,//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(t,e){return 0')}),!0);var r,o,i},X=function(t,e){var n,r;!1===m.isSmartPasteEnabled(t)?U(t,e):(n=t,r=e,y.each([K,G,U],function(t){return!0!==t(n,r,U)}))},Y=function(t){return function(){return t}},Z=Y(!1),J=Y(!0),Q=Z,tt=J,et=function(){return nt},nt=(j={fold:function(t,e){return t()},is:Q,isSome:Q,isNone:tt,getOr:H=function(t){return t},getOrThunk:B=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:H,orThunk:B,map:et,ap:et,each:function(){},bind:et,flatten:et,exists:Q,forall:tt,filter:et,equals:M=function(t){return t.isNone()},equals_:M,toArray:function(){return[]},toString:Y("none()")},Object.freeze&&Object.freeze(j),j),rt=function(n){var t=function(){return n},e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:tt,isNone:Q,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return rt(t(n))},ap:function(t){return t.fold(et,function(t){return rt(t(n))})},each:function(t){t(n)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(n)?o:nt},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(Q,function(t){return e(n,t)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},ot={some:rt,none:et,from:function(t){return null===t||t===undefined?nt:rt(t)}},it=(L="function",function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&Array.prototype.isPrototypeOf(t)?"array":"object"===e&&String.prototype.isPrototypeOf(t)?"string":e}(t)===L}),at=function(t,e){for(var n=t.length,r=new Array(n),o=0;o=a.length&&r(o)}))})})},pt=function(t,e){var n=at(t,e);return gt(n,mt.nu)},vt=function(t,e,n){var r=n||b(e),o=z(t,p(e),r);!1===o.cancelled&&X(t,o.content)},ht=function(t,e){e=t.dom.encode(e).replace(/\r\n/g,"\n"),e=T(e,t.settings.forced_root_block,t.settings.forced_root_block_attrs),vt(t,e,!1)},yt=function(t){var e={};if(t){if(t.getData){var n=t.getData("Text");n&&0',!1)}else vt(t,'',!1)}(e,t)})}),!0}return!1},_t=function(t){return o.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode},Dt=function(c,f,d){var m,g=0;function p(t,e,n,r){var o,i;bt(t,"text/html")?o=t["text/html"]:(o=f.getHtml(),r=r||b(o),f.isDefaultContent(o)&&(n=!0)),o=F.trimHtml(o),f.remove(),i=!1===r&&D(o),o.length&&!i||(n=!0),n&&(o=bt(t,"text/plain")&&i?t["text/plain"]:F.innerText(o)),f.isDefaultContent(o)?e||c.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):n?ht(c,o):vt(c,o,r)}c.on("keydown",function(t){function e(t){_t(t)&&!t.isDefaultPrevented()&&f.remove()}if(_t(t)&&!t.isDefaultPrevented()){if((m=t.shiftKey&&86===t.keyCode)&&v.webkit&&-1!==navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),g=(new Date).getTime(),v.ie&&m)return t.preventDefault(),void n(c,!0);f.remove(),f.create(),c.once("keyup",e),c.once("paste",function(){c.off("keyup",e)})}}),c.on("paste",function(t){var e,n,r,o=(new Date).getTime(),i=(e=c,n=yt(t.clipboardData||e.getDoc().dataTransfer),F.isMsEdge()?y.extend(n,{"text/html":""}):n),a=(new Date).getTime()-o,s=(new Date).getTime()-g-a<1e3,u="text"===d.get()||m,l=bt(i,x());m=!1,t.isDefaultPrevented()||(r=t.clipboardData,-1!==navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length)?f.remove():xt(i)||!wt(c,t,f.getLastRng()||c.selection.getRng())?(s||t.preventDefault(),!v.ie||s&&!t.ieFake||bt(i,"text/html")||(f.create(),c.dom.bind(f.getEl(),"paste",function(t){t.stopPropagation()}),c.getDoc().execCommand("Paste",!1,null),i["text/html"]=f.getHtml()),bt(i,"text/html")?(t.preventDefault(),l||(l=b(i["text/html"])),p(i,s,u,l)):h.setEditorTimeout(c,function(){p(i,s,u,l)},0)):f.remove()})},Tt=function(t){return v.ie&&t.inline?document.body:t.getBody()},Ct=function(e,t,n){var r;Tt(r=e)!==r.getBody()&&e.dom.bind(t,"paste keyup",function(t){Ot(e,n)||e.fire("paste")})},kt=function(t){return t.dom.get("mcepastebin")},St=function(t,e){return e===t},Ot=function(t,e){var n,r=kt(t);return(n=r)&&"mcepastebin"===n.id&&St(e,r.innerHTML)},Rt=function(a){var s=l(null),u="%MCEPASTEBIN%";return{create:function(){return e=s,n=u,o=(t=a).dom,i=t.getBody(),e.set(t.selection.getRng()),r=t.dom.add(Tt(t),"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),(v.ie||v.gecko)&&o.setStyle(r,"left","rtl"===o.getStyle(i,"direction",!0)?65535:-65535),o.bind(r,"beforedeactivate focusin focusout",function(t){t.stopPropagation()}),Ct(t,r,n),r.focus(),void t.selection.select(r,!0);var t,e,n,r,o,i},remove:function(){return function(t,e){if(kt(t)){for(var n=void 0,r=e.get();n=t.dom.get("mcepastebin");)t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)}(a,s)},getEl:function(){return kt(a)},getHtml:function(){return function(n){var e,t,r,o,i,a=function(t,e){t.appendChild(e),n.dom.remove(e,!0)};for(t=y.grep(Tt(n).childNodes,function(t){return"mcepastebin"===t.id}),e=t.shift(),y.each(t,function(t){a(e,t)}),r=(o=n.dom.select("div[id=mcepastebin]",e)).length-1;0<=r;r--)i=n.dom.create("div"),e.insertBefore(i,o[r]),a(i,o[r]);return e?e.innerHTML:""}(a)},getLastRng:function(){return s.get()},isDefault:function(){return Ot(a,u)},isDefaultContent:function(t){return St(u,t)}}},Ft=function(n,t){var e=Rt(n);return n.on("preInit",function(){return Dt(a=n,e,t),void a.parser.addNodeFilter("img",function(t,e,n){var r,o=function(t){t.attr("data-mce-object")||s===v.transparentSrc||t.remove()};if(!a.settings.paste_data_images&&(r=n).data&&!0===r.data.paste)for(var i=t.length;i--;)(s=t[i].attributes.map.src)&&(0===s.indexOf("webkit-fake-url")?o(t[i]):a.settings.allow_html_data_urls||0!==s.indexOf("data:")||o(t[i]))});var a,s}),{pasteFormat:t,pasteHtml:function(t,e){return vt(n,t,e)},pasteText:function(t){return ht(n,t)},pasteImageData:function(t,e){return wt(n,t,e)},getDataTransferItems:yt,hasHtmlOrText:xt,hasContentType:bt}},Et=function(){},At=function(t,e,n){if(r=t,!1!==v.iOS||r===undefined||"function"!=typeof r.setData||!0===F.isMsEdge())return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(x(),e),!0}catch(o){return!1}var r},It=function(t,e,n,r){At(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)},Mt=function(s){return function(t,e){var n=g(t),r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),o=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(o),s.dom.add(s.getBody(),r);var i=s.selection.getRng();o.focus();var a=s.dom.createRng();a.selectNodeContents(o),s.selection.setRng(a),setTimeout(function(){s.selection.setRng(i),r.parentNode.removeChild(r),e()},0)}},Bt=function(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}},Ht=function(t){return!t.selection.isCollapsed()||!!(e=t).dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody());var e},jt=function(t){var e,n;t.on("cut",(e=t,function(t){Ht(e)&&It(t,Bt(e),Mt(e),function(){setTimeout(function(){e.execCommand("Delete")},0)})})),t.on("copy",(n=t,function(t){Ht(n)&&It(t,Bt(n),Mt(n),Et)}))},Lt=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Nt=function(t,e){return Lt.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())},$t=function(t,e){t.focus(),t.selection.setRng(e)},Wt=function(a,s,u){m.shouldBlockDrop(a)&&a.on("dragend dragover draggesture dragdrop drop drag",function(t){t.preventDefault(),t.stopPropagation()}),m.shouldPasteDataImages(a)||a.on("drop",function(t){var e=t.dataTransfer;e&&e.files&&0 [\\s\\r\\n]+|
)*(<\\/?("+n.join("|")+")[^>]*>)(?:
 [\\s\\r\\n]+|
)*","g");return e=F.filter(e,[[r,"$1"]]),e=F.filter(e,[[/

/g,"

"],[/
/g," "],[/

/g,"
"]])}function qt(t,e,n,r){if(r||n)return e;var l,o=m.getWebkitStyles(t);if(!1===m.shouldRemoveWebKitStyles(t)||"all"===o)return e;if(o&&(l=o.split(/[, ]/)),l){var c=t.dom,f=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(t,e,n,r){var o=c.parseStyle(c.decode(n)),i={};if("none"===l)return e+r;for(var a=0;a]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(t,e,n,r){return e+' style="'+n+'"'+r})}function Kt(n,t){n.$("a",t).find("font,u").each(function(t,e){n.dom.remove(e,!0)})}var Gt=function(t){var e,n;v.webkit&&Ut(t,qt),v.ie&&(Ut(t,Vt),n=Kt,(e=t).on("PastePostProcess",function(t){n(e,t.node)}))},Xt=function(t,e,n){var r=n.control;r.active("text"===e.pasteFormat.get()),t.on("PastePlainTextToggle",function(t){r.active(t.state)})},Yt=function(t,e){var n=function(r){for(var o=[],t=1;t")},D=function(t,e,n){var r=t.split(/\n\n/),o=function(t,e){var n,r=[],o="<"+t;if("object"==typeof e){for(n in e)e.hasOwnProperty(n)&&r.push(n+'="'+w.encodeAllRaw(e[n])+'"');r.length&&(o+=" "+r.join(" "))}return o+">"}(e,n),i="",a=b.map(r,function(t){return t.split(/\n/).join("
")});return 1===a.length?a[0]:b.map(a,function(t){return o+t+i}).join("")},T=function(t){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(t)},C=function(t,e,n){return e?D(t,e,n):_(t)},k=tinymce.util.Tools.resolve("tinymce.html.DomParser"),S=tinymce.util.Tools.resolve("tinymce.html.Node"),O=tinymce.util.Tools.resolve("tinymce.html.Schema"),R=tinymce.util.Tools.resolve("tinymce.html.Serializer");function F(e,t){return b.each(t,function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e}var E={filter:F,innerText:function(e){var n=O(),r=k({},n),o="",i=n.getShortEndedElements(),a=b.makeMap("script noscript style textarea video audio iframe object"," "),s=n.getBlockElements();return e=F(e,[//g]),function t(e){var n=e.name,r=e;if("br"!==n){if("wbr"!==n)if(i[n]&&(o+=" "),a[n])o+=" ";else{if(3===e.type&&(o+=e.value),!e.shortEnded&&(e=e.firstChild))for(;t(e),e=e.next;);s[n]&&r.next&&(o+="\n","p"===n&&(o+="\n"))}}else o+="\n"}(r.parse(e)),o},trimHtml:function(t){return t=F(t,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/|/g,[/( ?)\u00a0<\/span>( ?)/g,function(t,e,n){return e||n?"\xa0":" "}],/
/g,/
$/i])},createIdGenerator:function(t){var e=0;return function(){return t+e++}},isMsEdge:function(){return-1!==v.navigator.userAgent.indexOf(" Edge/")}};function A(e){var n,t;return t=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \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]/],e=e.replace(/^[\u00a0 ]+/,""),b.each(t,function(t){if(t.test(e))return!(n=!0)}),n}function I(t){var i,a,s=1;function n(t){var e="";if(3===t.type)return t.value;if(t=t.firstChild)for(;e+=n(t),t=t.next;);return e}function u(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do{if(!u(t,e))return!1}while(t=t.next);return!0}function e(e,n,r){var o=e._listLevel||s;o!==s&&(o/gi,/]+id="?docs-internal-[^>]*>/gi,//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(t,e){return 0')}),!0);var r,o,i},Y=function(t,e){var n,r;!1===m.isSmartPasteEnabled(t)?V(t,e):(n=t,r=e,b.each([G,X,V],function(t){return!0!==t(n,r,V)}))},Z=function(t){return function(){return t}},J=Z(!1),Q=Z(!0),tt=J,et=Q,nt=function(){return rt},rt=(L={fold:function(t,e){return t()},is:tt,isSome:tt,isNone:et,getOr:j=function(t){return t},getOrThunk:H=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:j,orThunk:H,map:nt,ap:nt,each:function(){},bind:nt,flatten:nt,exists:tt,forall:et,filter:nt,equals:B=function(t){return t.isNone()},equals_:B,toArray:function(){return[]},toString:Z("none()")},Object.freeze&&Object.freeze(L),L),ot=function(n){var t=function(){return n},e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:et,isNone:tt,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return ot(t(n))},ap:function(t){return t.fold(nt,function(t){return ot(t(n))})},each:function(t){t(n)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(n)?o:rt},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(tt,function(t){return e(n,t)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},it={some:ot,none:nt,from:function(t){return null===t||t===undefined?rt:ot(t)}},at=(N="function",function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&Array.prototype.isPrototypeOf(t)?"array":"object"===e&&String.prototype.isPrototypeOf(t)?"string":e}(t)===N}),st=function(t,e){for(var n=t.length,r=new Array(n),o=0;o=a.length&&r(o)}))})})},vt=function(t,e){var n=st(t,e);return pt(n,gt.nu)},ht=function(t,e,n){var r=n||x(e),o=U(t,p(e),r);!1===o.cancelled&&Y(t,o.content)},yt=function(t,e){e=t.dom.encode(e).replace(/\r\n/g,"\n"),e=C(e,t.settings.forced_root_block,t.settings.forced_root_block_attrs),ht(t,e,!1)},bt=function(t){var e={};if(t){if(t.getData){var n=t.getData("Text");n&&0',!1)}else ht(t,'',!1)}(e,t)})}),!0}return!1},Dt=function(t){return o.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode},Tt=function(c,f,d){var m,g=0;function p(t,e,n,r){var o,i;xt(t,"text/html")?o=t["text/html"]:(o=f.getHtml(),r=r||x(o),f.isDefaultContent(o)&&(n=!0)),o=E.trimHtml(o),f.remove(),i=!1===r&&T(o),o.length&&!i||(n=!0),n&&(o=xt(t,"text/plain")&&i?t["text/plain"]:E.innerText(o)),f.isDefaultContent(o)?e||c.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):n?yt(c,o):ht(c,o,r)}c.on("keydown",function(t){function e(t){Dt(t)&&!t.isDefaultPrevented()&&f.remove()}if(Dt(t)&&!t.isDefaultPrevented()){if((m=t.shiftKey&&86===t.keyCode)&&h.webkit&&-1!==v.navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),g=(new Date).getTime(),h.ie&&m)return t.preventDefault(),void n(c,!0);f.remove(),f.create(),c.once("keyup",e),c.once("paste",function(){c.off("keyup",e)})}}),c.on("paste",function(t){var e,n,r,o=(new Date).getTime(),i=(e=c,n=bt(t.clipboardData||e.getDoc().dataTransfer),E.isMsEdge()?b.extend(n,{"text/html":""}):n),a=(new Date).getTime()-o,s=(new Date).getTime()-g-a<1e3,u="text"===d.get()||m,l=xt(i,P());m=!1,t.isDefaultPrevented()||(r=t.clipboardData,-1!==v.navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length)?f.remove():Pt(i)||!_t(c,t,f.getLastRng()||c.selection.getRng())?(s||t.preventDefault(),!h.ie||s&&!t.ieFake||xt(i,"text/html")||(f.create(),c.dom.bind(f.getEl(),"paste",function(t){t.stopPropagation()}),c.getDoc().execCommand("Paste",!1,null),i["text/html"]=f.getHtml()),xt(i,"text/html")?(t.preventDefault(),l||(l=x(i["text/html"])),p(i,s,u,l)):y.setEditorTimeout(c,function(){p(i,s,u,l)},0)):f.remove()})},Ct=function(t){return h.ie&&t.inline?v.document.body:t.getBody()},kt=function(e,t,n){var r;Ct(r=e)!==r.getBody()&&e.dom.bind(t,"paste keyup",function(t){Rt(e,n)||e.fire("paste")})},St=function(t){return t.dom.get("mcepastebin")},Ot=function(t,e){return e===t},Rt=function(t,e){var n,r=St(t);return(n=r)&&"mcepastebin"===n.id&&Ot(e,r.innerHTML)},Ft=function(a){var s=l(null),u="%MCEPASTEBIN%";return{create:function(){return e=s,n=u,o=(t=a).dom,i=t.getBody(),e.set(t.selection.getRng()),r=t.dom.add(Ct(t),"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),(h.ie||h.gecko)&&o.setStyle(r,"left","rtl"===o.getStyle(i,"direction",!0)?65535:-65535),o.bind(r,"beforedeactivate focusin focusout",function(t){t.stopPropagation()}),kt(t,r,n),r.focus(),void t.selection.select(r,!0);var t,e,n,r,o,i},remove:function(){return function(t,e){if(St(t)){for(var n=void 0,r=e.get();n=t.dom.get("mcepastebin");)t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)}(a,s)},getEl:function(){return St(a)},getHtml:function(){return function(n){var e,t,r,o,i,a=function(t,e){t.appendChild(e),n.dom.remove(e,!0)};for(t=b.grep(Ct(n).childNodes,function(t){return"mcepastebin"===t.id}),e=t.shift(),b.each(t,function(t){a(e,t)}),r=(o=n.dom.select("div[id=mcepastebin]",e)).length-1;0<=r;r--)i=n.dom.create("div"),e.insertBefore(i,o[r]),a(i,o[r]);return e?e.innerHTML:""}(a)},getLastRng:function(){return s.get()},isDefault:function(){return Rt(a,u)},isDefaultContent:function(t){return Ot(u,t)}}},Et=function(n,t){var e=Ft(n);return n.on("preInit",function(){return Tt(a=n,e,t),void a.parser.addNodeFilter("img",function(t,e,n){var r,o=function(t){t.attr("data-mce-object")||s===h.transparentSrc||t.remove()};if(!a.settings.paste_data_images&&(r=n).data&&!0===r.data.paste)for(var i=t.length;i--;)(s=t[i].attributes.map.src)&&(0===s.indexOf("webkit-fake-url")?o(t[i]):a.settings.allow_html_data_urls||0!==s.indexOf("data:")||o(t[i]))});var a,s}),{pasteFormat:t,pasteHtml:function(t,e){return ht(n,t,e)},pasteText:function(t){return yt(n,t)},pasteImageData:function(t,e){return _t(n,t,e)},getDataTransferItems:bt,hasHtmlOrText:Pt,hasContentType:xt}},At=function(){},It=function(t,e,n){if(r=t,!1!==h.iOS||r===undefined||"function"!=typeof r.setData||!0===E.isMsEdge())return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(P(),e),!0}catch(o){return!1}var r},Mt=function(t,e,n,r){It(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)},Bt=function(s){return function(t,e){var n=g(t),r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),o=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(o),s.dom.add(s.getBody(),r);var i=s.selection.getRng();o.focus();var a=s.dom.createRng();a.selectNodeContents(o),s.selection.setRng(a),setTimeout(function(){s.selection.setRng(i),r.parentNode.removeChild(r),e()},0)}},Ht=function(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}},jt=function(t){return!t.selection.isCollapsed()||!!(e=t).dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody());var e},Lt=function(t){var e,n;t.on("cut",(e=t,function(t){jt(e)&&Mt(t,Ht(e),Bt(e),function(){setTimeout(function(){e.execCommand("Delete")},0)})})),t.on("copy",(n=t,function(t){jt(n)&&Mt(t,Ht(n),Bt(n),At)}))},Nt=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),$t=function(t,e){return Nt.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())},Wt=function(t,e){t.focus(),t.selection.setRng(e)},zt=function(a,s,u){m.shouldBlockDrop(a)&&a.on("dragend dragover draggesture dragdrop drop drag",function(t){t.preventDefault(),t.stopPropagation()}),m.shouldPasteDataImages(a)||a.on("drop",function(t){var e=t.dataTransfer;e&&e.files&&0 [\\s\\r\\n]+|
)*(<\\/?("+n.join("|")+")[^>]*>)(?:
 [\\s\\r\\n]+|
)*","g");return e=E.filter(e,[[r,"$1"]]),e=E.filter(e,[[/

/g,"

"],[/
/g," "],[/

/g,"
"]])}function Kt(t,e,n,r){if(r||n)return e;var l,o=m.getWebkitStyles(t);if(!1===m.shouldRemoveWebKitStyles(t)||"all"===o)return e;if(o&&(l=o.split(/[, ]/)),l){var c=t.dom,f=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(t,e,n,r){var o=c.parseStyle(c.decode(n)),i={};if("none"===l)return e+r;for(var a=0;a]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(t,e,n,r){return e+' style="'+n+'"'+r})}function Gt(n,t){n.$("a",t).find("font,u").each(function(t,e){n.dom.remove(e,!0)})}var Xt=function(t){var e,n;h.webkit&&Vt(t,Kt),h.ie&&(Vt(t,qt),n=Gt,(e=t).on("PastePostProcess",function(t){n(e,t.node)}))},Yt=function(t,e,n){var r=n.control;r.active("text"===e.pasteFormat.get()),t.on("PastePlainTextToggle",function(t){r.active(t.state)})},Zt=function(t,e){var n=function(r){for(var o=[],t=1;t.mce-container-body{display:flex;padding-right:16px}.mce-statusbar>.mce-container-body .mce-path{flex:1}.mce-wordcount{font-size:inherit;text-transform:uppercase;padding:8px 0}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative;font-size:11px}.mce-fullscreen .mce-resizehandle{display:none}.mce-statusbar .mce-flow-layout-item{margin:0}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #c5c5c5;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:white}.mce-grid td.mce-grid-cell div{border:1px solid #c5c5c5;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#91bbe9}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#91bbe9}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#c5c5c5;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#91bbe9;background:#bdd6f2}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#8b8b8b}.mce-monospace{font-family:"Courier New",Courier,monospace}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-container b{font-weight:bold}.mce-container p{margin-bottom:5px}.mce-container a{cursor:pointer;color:#2276d2}.mce-container a:hover{text-decoration:underline}.mce-container ul{margin-left:15px}.mce-container .mce-table-striped{border-collapse:collapse;margin:10px}.mce-container .mce-table-striped thead>tr{background-color:#fafafa}.mce-container .mce-table-striped thead>tr th{font-weight:bold}.mce-container .mce-table-striped td,.mce-container .mce-table-striped th{padding:5px}.mce-container .mce-table-striped tr:nth-child(even){background-color:#fafafa}.mce-container .mce-table-striped tbody>tr:hover{background-color:#e1e1e1}.mce-branding{font-size:inherit;text-transform:uppercase;white-space:pre;padding:8px 0}.mce-branding a{font-size:inherit;color:inherit}.mce-top-part{position:relative}.mce-top-part::before{content:'';position:absolute;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);top:0;right:0;bottom:0;left:0;pointer-events:none}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-rtl .mce-statusbar>.mce-container-body>*:last-child{padding-right:0;padding-left:10px}.mce-rtl .mce-path{text-align:right;padding-right:16px}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.5;filter:alpha(opacity=50);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#2276d2}.mce-croprect-handle-move:focus{outline:1px solid #2276d2}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel-bg{position:absolute;background:url('data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==')}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:12px}.mce-arrow-down{margin-top:-12px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:#c5c5c5;border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:#c5c5c5;border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#fff;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#fff;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:8px}.mce-arrow.mce-arrow-left:after{left:9px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:8px}.mce-arrow.mce-arrow-right:after{right:9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:before{left:-9px;top:50%;border-right-color:#c5c5c5;border-width:9px 9px 9px 0;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:after{left:-8px;top:50%;border-right-color:#fff;border-width:8px 8px 8px 0;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left{margin-left:12px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:before{right:-9px;top:50%;border-left-color:#c5c5c5;border-width:9px 0 9px 9px;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:after{right:-8px;top:50%;border-left-color:#fff;border-width:8px 0 8px 8px;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right{margin-left:-14px}.mce-edit-aria-container>.mce-container-body{display:flex}.mce-edit-aria-container>.mce-container-body .mce-edit-area{flex:1}.mce-edit-aria-container>.mce-container-body .mce-sidebar>.mce-container-body{display:flex;align-items:stretch;height:100%}.mce-edit-aria-container>.mce-container-body .mce-sidebar-panel{min-width:250px;max-width:250px;position:relative}.mce-edit-aria-container>.mce-container-body .mce-sidebar-panel>.mce-container-body{position:absolute;width:100%;height:100%;overflow:auto;top:0;left:0}.mce-sidebar-toolbar{border:0 solid #c5c5c5;border-left-width:1px}.mce-sidebar-toolbar .mce-btn{border-left:0;border-right:0}.mce-sidebar-toolbar .mce-btn.mce-active,.mce-sidebar-toolbar .mce-btn.mce-active:hover{background-color:#555c66}.mce-sidebar-toolbar .mce-btn.mce-active button,.mce-sidebar-toolbar .mce-btn.mce-active:hover button,.mce-sidebar-toolbar .mce-btn.mce-active button i,.mce-sidebar-toolbar .mce-btn.mce-active:hover button i{color:white;text-shadow:1px 1px none}.mce-sidebar-panel{border:0 solid #c5c5c5;border-left-width:1px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #f3f3f3;border:0 solid #c5c5c5;background-color:#fff}.mce-floatpanel{position:absolute;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);top:0;left:0;background:#FFF;border:1px solid #c5c5c5;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#c5c5c5;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#FFF}.mce-floatpanel.mce-popover.mce-top{margin-top:-10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-top>.mce-arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#c5c5c5;top:auto;bottom:-11px}.mce-floatpanel.mce-popover.mce-top>.mce-arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#FFF}.mce-floatpanel.mce-popover.mce-bottom.mce-start,.mce-floatpanel.mce-popover.mce-top.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow,.mce-floatpanel.mce-popover.mce-top.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end,.mce-floatpanel.mce-popover.mce-top.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow,.mce-floatpanel.mce-popover.mce-top.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#FFF}#mce-modal-block.mce-in{opacity:.5;filter:alpha(opacity=50);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#FFF;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#9b9b9b}.mce-close:hover i{color:#bdbdbd}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#FFF;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#e2e4e7}.mce-window .mce-btn:hover{border-color:#c5c5c5}.mce-window .mce-btn:focus{border-color:#2276d2}.mce-window-body .mce-btn,.mce-foot .mce-btn{border-color:#c5c5c5}.mce-foot .mce-btn.mce-primary{border-color:transparent}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:0}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right;padding-right:0;padding-left:20px}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1;margin-top:1px}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-ne,.mce-tooltip-se{margin-left:14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#595959}.mce-bar{display:block;width:0;height:100%;background-color:#dfdfdf;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#fff;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#c5c5c5;transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0;box-sizing:border-box}.mce-notification.mce-in{opacity:1}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ECB}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#595959}.mce-notification .mce-progress .mce-bar-container{border-color:#c5c5c5}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#595959}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ECB}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#9b9b9b;cursor:pointer}.mce-abs-layout{position:relative}html .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b3b3b3;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);background:white;display:inline-block;*display:inline;*zoom:1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-btn:hover,.mce-btn:active{background:white;color:#595959;border-color:#e2e4e7}.mce-btn:focus{background:white;color:#595959;border-color:#e2e4e7}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover,.mce-btn.mce-active:focus,.mce-btn.mce-active:active{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:#555c66;color:white;border-color:transparent}.mce-btn.mce-active button,.mce-btn.mce-active:hover button,.mce-btn.mce-active i,.mce-btn.mce-active:hover i{color:white}.mce-btn:hover .mce-caret{border-top-color:#b5bcc2}.mce-btn.mce-active .mce-caret,.mce-btn.mce-active:hover .mce-caret{border-top-color:white}.mce-btn button{padding:4px 6px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#595959;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary.mce-btn-has-text{min-width:50px}.mce-primary{color:white;border:1px solid transparent;border-color:transparent;background-color:#2276d2}.mce-primary:hover,.mce-primary:focus{background-color:#1e6abc;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#1e6abc;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-primary button,.mce-primary button i{color:white;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #b5bcc2;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #b5bcc2;border-top:0}.mce-btn-flat{border:0;background:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-toolbar .mce-btn-group{margin:0;padding:2px 0}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:0;margin-left:2px}.mce-btn-group{margin-left:2px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:white;text-indent:-10em;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#595959;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid #2276d2;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#bdbdbd}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{position:relative;display:inline-block;*display:inline;*zoom:1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#bdbdbd}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0;margin:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-combobox .mce-status{position:absolute;right:2px;top:50%;line-height:16px;margin-top:-8px;font-size:12px;width:15px;height:15px;text-align:center;cursor:pointer}.mce-combobox.mce-has-status input{padding-right:20px}.mce-combobox.mce-has-open .mce-status{right:37px}.mce-combobox .mce-status.mce-i-warning{color:#c09853}.mce-combobox .mce-status.mce-i-checkmark{color:#468847}.mce-menu.mce-combobox-menu{border-top:0;margin-top:0;max-height:200px}.mce-menu.mce-combobox-menu .mce-menu-item{padding:4px 6px 4px 4px;font-size:11px}.mce-menu.mce-combobox-menu .mce-menu-item-sep{padding:0}.mce-menu.mce-combobox-menu .mce-text,.mce-menu.mce-combobox-menu .mce-text b{font-size:11px}.mce-menu.mce-combobox-menu .mce-menu-item-link,.mce-menu.mce-combobox-menu .mce-menu-item-link b{font-size:11px}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid black;background:white;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal;font-size:inherit}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#595959;font-size:inherit;text-transform:uppercase}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#555c66;color:white}.mce-path .mce-divider{display:inline;font-size:inherit}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #c5c5c5;width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #e2e4e7}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar{border:1px solid #e2e4e7}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar .mce-menubtn button span{color:#595959}.mce-menubar .mce-caret{border-top-color:#b5bcc2}.mce-menubar .mce-active .mce-caret,.mce-menubar .mce-menubtn:hover .mce-caret{border-top-color:#b5bcc2}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#e2e4e7;background:white;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubar .mce-menubtn.mce-active{border-bottom:none;z-index:65537}div.mce-menubtn.mce-opened{border-bottom-color:white;z-index:65537}div.mce-menubtn.mce-opened.mce-opened-under{z-index:0}.mce-menubtn button{color:#595959}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-rtl .mce-menubtn.mce-fixed-width span{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 4px 6px 4px;clear:both;font-weight:normal;line-height:20px;color:#595959;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-text,.mce-menu-item .mce-text b{line-height:1;vertical-align:initial}.mce-menu-item .mce-caret{margin-top:4px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #595959}.mce-menu-item .mce-menu-shortcut{display:inline-block;padding:0 10px 0 20px;color:#aaa}.mce-menu-item .mce-ico{padding-right:4px}.mce-menu-item:hover,.mce-menu-item:focus{background:#ededee}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#aaa}.mce-menu-item:hover .mce-text,.mce-menu-item:focus .mce-text,.mce-menu-item:hover .mce-ico,.mce-menu-item:focus .mce-ico{color:#595959}.mce-menu-item.mce-selected{background:#ededee}.mce-menu-item.mce-selected .mce-text,.mce-menu-item.mce-selected .mce-ico{color:#595959}.mce-menu-item.mce-active.mce-menu-item-normal{background:#555c66}.mce-menu-item.mce-active.mce-menu-item-normal .mce-text,.mce-menu-item.mce-active.mce-menu-item-normal .mce-ico{color:white}.mce-menu-item.mce-active.mce-menu-item-checkbox .mce-ico{visibility:visible}.mce-menu-item.mce-disabled,.mce-menu-item.mce-disabled:hover{background:white}.mce-menu-item.mce-disabled:focus,.mce-menu-item.mce-disabled:hover:focus{background:#ededee}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled:hover .mce-text,.mce-menu-item.mce-disabled .mce-ico,.mce-menu-item.mce-disabled:hover .mce-ico{color:#aaa}.mce-menu-item.mce-menu-item-preview.mce-active{border-left:5px solid #555c66;background:white}.mce-menu-item.mce-menu-item-preview.mce-active .mce-text,.mce-menu-item.mce-menu-item-preview.mce-active .mce-ico{color:#595959}.mce-menu-item.mce-menu-item-preview.mce-active:hover{background:#ededee}.mce-menu-item-link{color:#093;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mce-menu-item-link b{color:#093}.mce-menu-item-ellipsis{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mce-menu-item:hover *,.mce-menu-item.mce-selected *,.mce-menu-item:focus *{color:#595959}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}div.mce-menu .mce-menu-item b{font-weight:bold}.mce-menu-item-indent-1{padding-left:20px}.mce-menu-item-indent-2{padding-left:35px}.mce-menu-item-indent-2{padding-left:35px}.mce-menu-item-indent-3{padding-left:40px}.mce-menu-item-indent-4{padding-left:45px}.mce-menu-item-indent-5{padding-left:50px}.mce-menu-item-indent-6{padding-left:55px}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #595959;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#595959}.mce-rtl .mce-menu-item .mce-ico{padding-right:0;padding-left:4px}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:180px;background:white;border:1px solid #c5c9cf;border:1px solid #e2e4e7;z-index:1002;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);max-height:500px;overflow:auto;overflow-x:hidden}.mce-menu.mce-animate{opacity:.01;transform:rotateY(10deg) rotateX(-10deg);transform-origin:left top}.mce-menu.mce-menu-align .mce-menu-shortcut,.mce-menu.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block}.mce-menu.mce-in.mce-animate{opacity:1;transform:rotateY(0) rotateX(0);transition:opacity .075s ease,transform .1s ease}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-rtl .mce-menu-item .mce-ico{padding-right:0;padding-left:4px}.mce-rtl.mce-menu-align .mce-caret,.mce-rtl .mce-menu-shortcut{right:auto;left:0}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#595959}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #c5c5c5;background:#fff;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #c5c5c5;background:#e6e6e6;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{border-color:#2276d2}.mce-spacer{visibility:hidden}.mce-splitbtn:hover .mce-open{border-left:1px solid #e2e4e7}.mce-splitbtn .mce-open{border-left:1px solid transparent;padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open:focus{border-left:1px solid #e2e4e7}.mce-splitbtn .mce-open:hover,.mce-splitbtn .mce-open:active{border-left:1px solid #e2e4e7}.mce-splitbtn.mce-active:hover .mce-open{border-left:1px solid white}.mce-splitbtn.mce-opened{border-color:#e2e4e7}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#fff;padding:8px 15px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#FDFDFD}.mce-tab.mce-active{background:#FDFDFD;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-tab:focus{color:#2276d2}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#595959}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#2276d2;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#bdbdbd}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-dropzone{border:3px dashed gray;text-align:center}.mce-dropzone span{text-transform:uppercase;display:inline-block;vertical-align:middle}.mce-dropzone:after{content:"";height:100%;display:inline-block;vertical-align:middle}.mce-dropzone.mce-disabled{opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-dropzone.mce-disabled.mce-dragenter{cursor:not-allowed}.mce-browsebutton{position:relative;overflow:hidden}.mce-browsebutton button{position:relative;z-index:1}.mce-browsebutton input{opacity:0;filter:alpha(opacity=0);zoom:1;position:absolute;top:0;left:0;width:100%;height:100%;z-index:0}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#595959}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-alignnone:before{content:"\e003"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-rotateleft:before{content:"\eaa8"}.mce-i-rotateright:before{content:"\eaa9"}.mce-i-crop:before{content:"\ee78"}.mce-i-editimage:before{content:"\e915"}.mce-i-options:before{content:"\ec6a"}.mce-i-flipv:before{content:"\eaaa"}.mce-i-fliph:before{content:"\eaac"}.mce-i-zoomin:before{content:"\eb35"}.mce-i-zoomout:before{content:"\eb36"}.mce-i-sun:before{content:"\eccc"}.mce-i-moon:before{content:"\eccd"}.mce-i-arrowleft:before{content:"\edc0"}.mce-i-arrowright:before{content:"\e93c"}.mce-i-drop:before{content:"\e935"}.mce-i-contrast:before{content:"\ecd4"}.mce-i-sharpen:before{content:"\eba7"}.mce-i-resize2:before{content:"\edf9"}.mce-i-orientation:before{content:"\e601"}.mce-i-invert:before{content:"\e602"}.mce-i-gamma:before{content:"\e600"}.mce-i-remove:before{content:"\ed6a"}.mce-i-tablerowprops:before{content:"\e604"}.mce-i-tablecellprops:before{content:"\e605"}.mce-i-table2:before{content:"\e606"}.mce-i-tablemergecells:before{content:"\e607"}.mce-i-tableinsertcolbefore:before{content:"\e608"}.mce-i-tableinsertcolafter:before{content:"\e609"}.mce-i-tableinsertrowbefore:before{content:"\e60a"}.mce-i-tableinsertrowafter:before{content:"\e60b"}.mce-i-tablesplitcells:before{content:"\e60d"}.mce-i-tabledelete:before{content:"\e60e"}.mce-i-tableleftheader:before{content:"\e62a"}.mce-i-tabletopheader:before{content:"\e62b"}.mce-i-tabledeleterow:before{content:"\e800"}.mce-i-tabledeletecol:before{content:"\e801"}.mce-i-codesample:before{content:"\e603"}.mce-i-fill:before{content:"\e902"}.mce-i-borderwidth:before{content:"\e903"}.mce-i-line:before{content:"\e904"}.mce-i-count:before{content:"\e905"}.mce-i-translate:before{content:"\e907"}.mce-i-drag:before{content:"\e908"}.mce-i-home:before{content:"\e90b"}.mce-i-upload:before{content:"\e914"}.mce-i-bubble:before{content:"\e91c"}.mce-i-user:before{content:"\e91d"}.mce-i-lock:before{content:"\e926"}.mce-i-unlock:before{content:"\e927"}.mce-i-settings:before{content:"\e928"}.mce-i-remove2:before{content:"\e92a"}.mce-i-menu:before{content:"\e92d"}.mce-i-warning:before{content:"\e930"}.mce-i-question:before{content:"\e931"}.mce-i-pluscircle:before{content:"\e932"}.mce-i-info:before{content:"\e933"}.mce-i-notice:before{content:"\e934"}.mce-i-arrowup:before{content:"\e93b"}.mce-i-arrowdown:before{content:"\e93d"}.mce-i-arrowup2:before{content:"\e93f"}.mce-i-arrowdown2:before{content:"\e940"}.mce-i-menu2:before{content:"\e941"}.mce-i-newtab:before{content:"\e961"}.mce-i-a11y:before{content:"\e900"}.mce-i-plus:before{content:"\e93a"}.mce-i-insert:before{content:"\e93a"}.mce-i-minus:before{content:"\e939"}.mce-i-books:before{content:"\e911"}.mce-i-reload:before{content:"\e906"}.mce-i-toc:before{content:"\e901"}.mce-i-checkmark:before{content:"\e033"}.mce-i-format-painter:before{content:"\e909"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-insert{font-size:14px}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#BBB}.mce-rtl .mce-filepicker input{direction:ltr} +.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#595959;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2)}.mce-statusbar>.mce-container-body{display:flex;padding-right:16px}.mce-statusbar>.mce-container-body .mce-path{flex:1}.mce-wordcount{font-size:inherit;text-transform:uppercase;padding:8px 0}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative;font-size:11px}.mce-fullscreen .mce-resizehandle{display:none}.mce-statusbar .mce-flow-layout-item{margin:0}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #c5c5c5;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:white}.mce-grid td.mce-grid-cell div{border:1px solid #c5c5c5;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#91bbe9}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#91bbe9}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#c5c5c5;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#91bbe9;background:#bdd6f2}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#8b8b8b}.mce-monospace{font-family:"Courier New",Courier,monospace}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-container b{font-weight:bold}.mce-container p{margin-bottom:5px}.mce-container a{cursor:pointer;color:#2276d2}.mce-container a:hover{text-decoration:underline}.mce-container ul{margin-left:15px}.mce-container .mce-table-striped{border-collapse:collapse;margin:10px}.mce-container .mce-table-striped thead>tr{background-color:#fafafa}.mce-container .mce-table-striped thead>tr th{font-weight:bold}.mce-container .mce-table-striped td,.mce-container .mce-table-striped th{padding:5px}.mce-container .mce-table-striped tr:nth-child(even){background-color:#fafafa}.mce-container .mce-table-striped tbody>tr:hover{background-color:#e1e1e1}.mce-branding{font-size:inherit;text-transform:uppercase;white-space:pre;padding:8px 0}.mce-branding a{font-size:inherit;color:inherit}.mce-top-part{position:relative}.mce-top-part::before{content:'';position:absolute;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);top:0;right:0;bottom:0;left:0;pointer-events:none}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-rtl .mce-statusbar>.mce-container-body>*:last-child{padding-right:0;padding-left:10px}.mce-rtl .mce-path{text-align:right;padding-right:16px}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.5;filter:alpha(opacity=50);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#2276d2}.mce-croprect-handle-move:focus{outline:1px solid #2276d2}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel-bg{position:absolute;background:url('data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==')}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:12px}.mce-arrow-down{margin-top:-12px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:#c5c5c5;border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:#c5c5c5;border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#fff;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#fff;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:8px}.mce-arrow.mce-arrow-left:after{left:9px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:8px}.mce-arrow.mce-arrow-right:after{right:9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:before{left:-9px;top:50%;border-right-color:#c5c5c5;border-width:9px 9px 9px 0;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:after{left:-8px;top:50%;border-right-color:#fff;border-width:8px 8px 8px 0;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left{margin-left:12px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:before{right:-9px;top:50%;border-left-color:#c5c5c5;border-width:9px 0 9px 9px;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:after{right:-8px;top:50%;border-left-color:#fff;border-width:8px 0 8px 8px;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right{margin-left:-14px}.mce-edit-aria-container>.mce-container-body{display:flex}.mce-edit-aria-container>.mce-container-body .mce-edit-area{flex:1}.mce-edit-aria-container>.mce-container-body .mce-sidebar>.mce-container-body{display:flex;align-items:stretch;height:100%}.mce-edit-aria-container>.mce-container-body .mce-sidebar-panel{min-width:250px;max-width:250px;position:relative}.mce-edit-aria-container>.mce-container-body .mce-sidebar-panel>.mce-container-body{position:absolute;width:100%;height:100%;overflow:auto;top:0;left:0}.mce-sidebar-toolbar{border:0 solid #c5c5c5;border-left-width:1px}.mce-sidebar-toolbar .mce-btn{border-left:0;border-right:0}.mce-sidebar-toolbar .mce-btn.mce-active,.mce-sidebar-toolbar .mce-btn.mce-active:hover{background-color:#555c66}.mce-sidebar-toolbar .mce-btn.mce-active button,.mce-sidebar-toolbar .mce-btn.mce-active:hover button,.mce-sidebar-toolbar .mce-btn.mce-active button i,.mce-sidebar-toolbar .mce-btn.mce-active:hover button i{color:white;text-shadow:1px 1px none}.mce-sidebar-panel{border:0 solid #c5c5c5;border-left-width:1px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #f3f3f3;border:0 solid #c5c5c5;background-color:#fff}.mce-floatpanel{position:absolute;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);top:0;left:0;background:#FFF;border:1px solid #c5c5c5;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#c5c5c5;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#FFF}.mce-floatpanel.mce-popover.mce-top{margin-top:-10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-top>.mce-arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#c5c5c5;top:auto;bottom:-11px}.mce-floatpanel.mce-popover.mce-top>.mce-arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#FFF}.mce-floatpanel.mce-popover.mce-bottom.mce-start,.mce-floatpanel.mce-popover.mce-top.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow,.mce-floatpanel.mce-popover.mce-top.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end,.mce-floatpanel.mce-popover.mce-top.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow,.mce-floatpanel.mce-popover.mce-top.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#FFF}#mce-modal-block.mce-in{opacity:.5;filter:alpha(opacity=50);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#FFF;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#9b9b9b}.mce-close:hover i{color:#bdbdbd}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#FFF;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#e2e4e7}.mce-window .mce-btn:hover{border-color:#c5c5c5}.mce-window .mce-btn:focus{border-color:#2276d2}.mce-window-body .mce-btn,.mce-foot .mce-btn{border-color:#c5c5c5}.mce-foot .mce-btn.mce-primary{border-color:transparent}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:0}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right;padding-right:0;padding-left:20px}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1;margin-top:1px}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-ne,.mce-tooltip-se{margin-left:14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#595959}.mce-bar{display:block;width:0;height:100%;background-color:#dfdfdf;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#fff;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#c5c5c5;transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0;box-sizing:border-box}.mce-notification.mce-in{opacity:1}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ECB}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#595959}.mce-notification .mce-progress .mce-bar-container{border-color:#c5c5c5}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#595959}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ECB}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#9b9b9b;cursor:pointer}.mce-abs-layout{position:relative}html .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b3b3b3;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);background:white;display:inline-block;*display:inline;*zoom:1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-btn:hover,.mce-btn:active{background:white;color:#595959;border-color:#e2e4e7}.mce-btn:focus{background:white;color:#595959;border-color:#e2e4e7}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover,.mce-btn.mce-active:focus,.mce-btn.mce-active:active{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:#555c66;color:white;border-color:transparent}.mce-btn.mce-active button,.mce-btn.mce-active:hover button,.mce-btn.mce-active i,.mce-btn.mce-active:hover i{color:white}.mce-btn:hover .mce-caret{border-top-color:#b5bcc2}.mce-btn.mce-active .mce-caret,.mce-btn.mce-active:hover .mce-caret{border-top-color:white}.mce-btn button{padding:4px 6px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#595959;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary.mce-btn-has-text{min-width:50px}.mce-primary{color:white;border:1px solid transparent;border-color:transparent;background-color:#2276d2}.mce-primary:hover,.mce-primary:focus{background-color:#1e6abc;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#1e6abc;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-primary button,.mce-primary button i{color:white;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #b5bcc2;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #b5bcc2;border-top:0}.mce-btn-flat{border:0;background:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-toolbar .mce-btn-group{margin:0;padding:2px 0}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:0;margin-left:2px}.mce-btn-group{margin-left:2px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:white;text-indent:-10em;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#595959;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid #2276d2;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#bdbdbd}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{position:relative;display:inline-block;*display:inline;*zoom:1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#bdbdbd}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0;margin:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-combobox .mce-status{position:absolute;right:2px;top:50%;line-height:16px;margin-top:-8px;font-size:12px;width:15px;height:15px;text-align:center;cursor:pointer}.mce-combobox.mce-has-status input{padding-right:20px}.mce-combobox.mce-has-open .mce-status{right:37px}.mce-combobox .mce-status.mce-i-warning{color:#c09853}.mce-combobox .mce-status.mce-i-checkmark{color:#468847}.mce-menu.mce-combobox-menu{border-top:0;margin-top:0;max-height:200px}.mce-menu.mce-combobox-menu .mce-menu-item{padding:4px 6px 4px 4px;font-size:11px}.mce-menu.mce-combobox-menu .mce-menu-item-sep{padding:0}.mce-menu.mce-combobox-menu .mce-text,.mce-menu.mce-combobox-menu .mce-text b{font-size:11px}.mce-menu.mce-combobox-menu .mce-menu-item-link,.mce-menu.mce-combobox-menu .mce-menu-item-link b{font-size:11px}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid black;background:white;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal;font-size:inherit}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#595959;font-size:inherit;text-transform:uppercase}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#555c66;color:white}.mce-path .mce-divider{display:inline;font-size:inherit}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #c5c5c5;width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #e2e4e7}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar{border:1px solid #e2e4e7}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar .mce-menubtn button span{color:#595959}.mce-menubar .mce-caret{border-top-color:#b5bcc2}.mce-menubar .mce-active .mce-caret,.mce-menubar .mce-menubtn:hover .mce-caret{border-top-color:#b5bcc2}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#e2e4e7;background:white;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubar .mce-menubtn.mce-active{border-bottom:none;z-index:65537}div.mce-menubtn.mce-opened{border-bottom-color:white;z-index:65537}div.mce-menubtn.mce-opened.mce-opened-under{z-index:0}.mce-menubtn button{color:#595959}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-rtl .mce-menubtn.mce-fixed-width span{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 4px 6px 4px;clear:both;font-weight:normal;line-height:20px;color:#595959;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-text,.mce-menu-item .mce-text b{line-height:1;vertical-align:initial}.mce-menu-item .mce-caret{margin-top:4px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #595959}.mce-menu-item .mce-menu-shortcut{display:inline-block;padding:0 10px 0 20px;color:#aaa}.mce-menu-item .mce-ico{padding-right:4px}.mce-menu-item:hover,.mce-menu-item:focus{background:#ededee}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#aaa}.mce-menu-item:hover .mce-text,.mce-menu-item:focus .mce-text,.mce-menu-item:hover .mce-ico,.mce-menu-item:focus .mce-ico{color:#595959}.mce-menu-item.mce-selected{background:#ededee}.mce-menu-item.mce-selected .mce-text,.mce-menu-item.mce-selected .mce-ico{color:#595959}.mce-menu-item.mce-active.mce-menu-item-normal{background:#555c66}.mce-menu-item.mce-active.mce-menu-item-normal .mce-text,.mce-menu-item.mce-active.mce-menu-item-normal .mce-ico{color:white}.mce-menu-item.mce-active.mce-menu-item-checkbox .mce-ico{visibility:visible}.mce-menu-item.mce-disabled,.mce-menu-item.mce-disabled:hover{background:white}.mce-menu-item.mce-disabled:focus,.mce-menu-item.mce-disabled:hover:focus{background:#ededee}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled:hover .mce-text,.mce-menu-item.mce-disabled .mce-ico,.mce-menu-item.mce-disabled:hover .mce-ico{color:#aaa}.mce-menu-item.mce-menu-item-preview.mce-active{border-left:5px solid #555c66;background:white}.mce-menu-item.mce-menu-item-preview.mce-active .mce-text,.mce-menu-item.mce-menu-item-preview.mce-active .mce-ico{color:#595959}.mce-menu-item.mce-menu-item-preview.mce-active:hover{background:#ededee}.mce-menu-item-link{color:#093;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mce-menu-item-link b{color:#093}.mce-menu-item-ellipsis{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mce-menu-item:hover *,.mce-menu-item.mce-selected *,.mce-menu-item:focus *{color:#595959}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}div.mce-menu .mce-menu-item b{font-weight:bold}.mce-menu-item-indent-1{padding-left:20px}.mce-menu-item-indent-2{padding-left:35px}.mce-menu-item-indent-2{padding-left:35px}.mce-menu-item-indent-3{padding-left:40px}.mce-menu-item-indent-4{padding-left:45px}.mce-menu-item-indent-5{padding-left:50px}.mce-menu-item-indent-6{padding-left:55px}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #595959;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#595959}.mce-rtl .mce-menu-item .mce-ico{padding-right:0;padding-left:4px}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:180px;background:white;border:1px solid #c5c9cf;border:1px solid #e2e4e7;z-index:1002;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);max-height:500px;overflow:auto;overflow-x:hidden}.mce-menu.mce-animate{opacity:.01;transform:rotateY(10deg) rotateX(-10deg);transform-origin:left top}.mce-menu.mce-menu-align .mce-menu-shortcut,.mce-menu.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block}.mce-menu.mce-in.mce-animate{opacity:1;transform:rotateY(0) rotateX(0);transition:opacity .075s ease,transform .1s ease}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-rtl .mce-menu-item .mce-ico{padding-right:0;padding-left:4px}.mce-rtl.mce-menu-align .mce-caret,.mce-rtl .mce-menu-shortcut{right:auto;left:0}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#595959}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #c5c5c5;background:#fff;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #c5c5c5;background:#e6e6e6;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{border-color:#2276d2}.mce-spacer{visibility:hidden}.mce-splitbtn:hover .mce-open{border-left:1px solid #e2e4e7}.mce-splitbtn .mce-open{border-left:1px solid transparent;padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open:focus{border-left:1px solid #e2e4e7}.mce-splitbtn .mce-open:hover,.mce-splitbtn .mce-open:active{border-left:1px solid #e2e4e7}.mce-splitbtn.mce-active:hover .mce-open{border-left:1px solid white}.mce-splitbtn.mce-opened{border-color:#e2e4e7}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#fff;padding:8px 15px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#FDFDFD}.mce-tab.mce-active{background:#FDFDFD;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-tab:focus{color:#2276d2}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#595959}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#2276d2;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#bdbdbd}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-dropzone{border:3px dashed gray;text-align:center}.mce-dropzone span{text-transform:uppercase;display:inline-block;vertical-align:middle}.mce-dropzone:after{content:"";height:100%;display:inline-block;vertical-align:middle}.mce-dropzone.mce-disabled{opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-dropzone.mce-disabled.mce-dragenter{cursor:not-allowed}.mce-browsebutton{position:relative;overflow:hidden}.mce-browsebutton button{position:relative;z-index:1}.mce-browsebutton input{opacity:0;filter:alpha(opacity=0);zoom:1;position:absolute;top:0;left:0;width:100%;height:100%;z-index:0}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#595959}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-alignnone:before{content:"\e003"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-rotateleft:before{content:"\eaa8"}.mce-i-rotateright:before{content:"\eaa9"}.mce-i-crop:before{content:"\ee78"}.mce-i-editimage:before{content:"\e915"}.mce-i-options:before{content:"\ec6a"}.mce-i-flipv:before{content:"\eaaa"}.mce-i-fliph:before{content:"\eaac"}.mce-i-zoomin:before{content:"\eb35"}.mce-i-zoomout:before{content:"\eb36"}.mce-i-sun:before{content:"\eccc"}.mce-i-moon:before{content:"\eccd"}.mce-i-arrowleft:before{content:"\edc0"}.mce-i-arrowright:before{content:"\e93c"}.mce-i-drop:before{content:"\e935"}.mce-i-contrast:before{content:"\ecd4"}.mce-i-sharpen:before{content:"\eba7"}.mce-i-resize2:before{content:"\edf9"}.mce-i-orientation:before{content:"\e601"}.mce-i-invert:before{content:"\e602"}.mce-i-gamma:before{content:"\e600"}.mce-i-remove:before{content:"\ed6a"}.mce-i-tablerowprops:before{content:"\e604"}.mce-i-tablecellprops:before{content:"\e605"}.mce-i-table2:before{content:"\e606"}.mce-i-tablemergecells:before{content:"\e607"}.mce-i-tableinsertcolbefore:before{content:"\e608"}.mce-i-tableinsertcolafter:before{content:"\e609"}.mce-i-tableinsertrowbefore:before{content:"\e60a"}.mce-i-tableinsertrowafter:before{content:"\e60b"}.mce-i-tablesplitcells:before{content:"\e60d"}.mce-i-tabledelete:before{content:"\e60e"}.mce-i-tableleftheader:before{content:"\e62a"}.mce-i-tabletopheader:before{content:"\e62b"}.mce-i-tabledeleterow:before{content:"\e800"}.mce-i-tabledeletecol:before{content:"\e801"}.mce-i-codesample:before{content:"\e603"}.mce-i-fill:before{content:"\e902"}.mce-i-borderwidth:before{content:"\e903"}.mce-i-line:before{content:"\e904"}.mce-i-count:before{content:"\e905"}.mce-i-translate:before{content:"\e907"}.mce-i-drag:before{content:"\e908"}.mce-i-home:before{content:"\e90b"}.mce-i-upload:before{content:"\e914"}.mce-i-bubble:before{content:"\e91c"}.mce-i-user:before{content:"\e91d"}.mce-i-lock:before{content:"\e926"}.mce-i-unlock:before{content:"\e927"}.mce-i-settings:before{content:"\e928"}.mce-i-remove2:before{content:"\e92a"}.mce-i-menu:before{content:"\e92d"}.mce-i-warning:before{content:"\e930"}.mce-i-question:before{content:"\e931"}.mce-i-pluscircle:before{content:"\e932"}.mce-i-info:before{content:"\e933"}.mce-i-notice:before{content:"\e934"}.mce-i-arrowup:before{content:"\e93b"}.mce-i-arrowdown:before{content:"\e93d"}.mce-i-arrowup2:before{content:"\e93f"}.mce-i-arrowdown2:before{content:"\e940"}.mce-i-menu2:before{content:"\e941"}.mce-i-newtab:before{content:"\e961"}.mce-i-a11y:before{content:"\e900"}.mce-i-plus:before{content:"\e93a"}.mce-i-insert:before{content:"\e93a"}.mce-i-minus:before{content:"\e939"}.mce-i-books:before{content:"\e911"}.mce-i-reload:before{content:"\e906"}.mce-i-toc:before{content:"\e901"}.mce-i-checkmark:before{content:"\e033"}.mce-i-format-painter:before{content:"\e909"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-insert{font-size:14px}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#BBB}.mce-rtl .mce-filepicker input{direction:ltr}/*# sourceMappingURL=skin.min.css.map */ \ No newline at end of file diff --git a/src/js/_enqueues/vendor/tinymce/themes/inlite/theme.js b/src/js/_enqueues/vendor/tinymce/themes/inlite/theme.js index 4f6c4fd8d1..93ddc28240 100644 --- a/src/js/_enqueues/vendor/tinymce/themes/inlite/theme.js +++ b/src/js/_enqueues/vendor/tinymce/themes/inlite/theme.js @@ -1,5 +1,5 @@ (function () { -var inlite = (function () { +var inlite = (function (domGlobals) { 'use strict'; var global = tinymce.util.Tools.resolve('tinymce.ThemeManager'); @@ -475,7 +475,7 @@ var inlite = (function () { return result && result.rect ? result : null; }; var editorHasFocus = function (editor) { - return document.activeElement === editor.getBody(); + return domGlobals.document.activeElement === editor.getBody(); }; var togglePanel = function (editor, panel) { var toggle = function () { @@ -573,13 +573,13 @@ var inlite = (function () { var eq = function (o) { return o.isNone(); }; - var call$$1 = function (thunk) { + var call = function (thunk) { return thunk(); }; var id = function (n) { return n; }; - var noop$$1 = function () { + var noop = function () { }; var nul = function () { return null; @@ -595,17 +595,17 @@ var inlite = (function () { isSome: never$1, isNone: always$1, getOr: id, - getOrThunk: call$$1, + getOrThunk: call, getOrDie: function (msg) { throw new Error(msg || 'error: getOrDie called on none.'); }, getOrNull: nul, getOrUndefined: undef, or: id, - orThunk: call$$1, + orThunk: call, map: none, ap: none, - each: noop$$1, + each: noop, bind: none, flatten: none, exists: never$1, @@ -805,8 +805,8 @@ var inlite = (function () { id: function () { return 'mceu_' + count++; }, - create: function (name$$1, attrs, children) { - var elm = document.createElement(name$$1); + create: function (name, attrs, children) { + var elm = domGlobals.document.createElement(name); global$2.DOM.setAttribs(elm, attrs); if (typeof children === 'string') { elm.innerHTML = children; @@ -844,13 +844,13 @@ var inlite = (function () { return global$2.DOM.getPos(elm, root || funcs.getContainer()); }, getContainer: function () { - return global$1.container ? global$1.container : document.body; + return global$1.container ? global$1.container : domGlobals.document.body; }, getViewPort: function (win) { return global$2.DOM.getViewPort(win); }, get: function (id) { - return document.getElementById(id); + return domGlobals.document.getElementById(id); }, addClass: function (elm, cls) { return global$2.DOM.addClass(elm, cls); @@ -864,20 +864,20 @@ var inlite = (function () { toggleClass: function (elm, cls, state) { return global$2.DOM.toggleClass(elm, cls, state); }, - css: function (elm, name$$1, value) { - return global$2.DOM.setStyle(elm, name$$1, value); + css: function (elm, name, value) { + return global$2.DOM.setStyle(elm, name, value); }, - getRuntimeStyle: function (elm, name$$1) { - return global$2.DOM.getStyle(elm, name$$1, true); + getRuntimeStyle: function (elm, name) { + return global$2.DOM.getStyle(elm, name, true); }, - on: function (target, name$$1, callback, scope) { - return global$2.DOM.bind(target, name$$1, callback, scope); + on: function (target, name, callback, scope) { + return global$2.DOM.bind(target, name, callback, scope); }, - off: function (target, name$$1, callback) { - return global$2.DOM.unbind(target, name$$1, callback); + off: function (target, name, callback) { + return global$2.DOM.unbind(target, name, callback); }, - fire: function (target, name$$1, args) { - return global$2.DOM.fire(target, name$$1, args); + fire: function (target, name, args) { + return global$2.DOM.fire(target, name, args); }, innerHtml: function (elm, html) { global$2.DOM.setHTML(elm, html); @@ -1506,13 +1506,13 @@ var inlite = (function () { var dirtyCtrls = {}, animationFrameRequested; var ReflowQueue = { add: function (ctrl) { - var parent$$1 = ctrl.parent(); - if (parent$$1) { - if (!parent$$1._layout || parent$$1._layout.isNative()) { + var parent = ctrl.parent(); + if (parent) { + if (!parent._layout || parent._layout.isNative()) { return; } - if (!dirtyCtrls[parent$$1._id]) { - dirtyCtrls[parent$$1._id] = parent$$1; + if (!dirtyCtrls[parent._id]) { + dirtyCtrls[parent._id] = parent; } if (!animationFrameRequested) { animationFrameRequested = true; @@ -1526,7 +1526,7 @@ var inlite = (function () { } } dirtyCtrls = {}; - }, document.body); + }, domGlobals.document.body); } } }, @@ -1568,7 +1568,7 @@ var inlite = (function () { inheritUiContainer: inheritUiContainer }; - var hasMouseWheelEventSupport = 'onmousewheel' in document; + var hasMouseWheelEventSupport = 'onmousewheel' in domGlobals.document; var hasWheelEventSupport = false; var classPrefix = 'mce-'; var Control, idCounter = 0; @@ -1579,59 +1579,59 @@ var inlite = (function () { }, classPrefix: classPrefix, init: function (settings) { - var self$$1 = this; + var self = this; var classes, defaultClasses; function applyClasses(classes) { var i; classes = classes.split(' '); for (i = 0; i < classes.length; i++) { - self$$1.classes.add(classes[i]); + self.classes.add(classes[i]); } } - self$$1.settings = settings = global$4.extend({}, self$$1.Defaults, settings); - self$$1._id = settings.id || 'mceu_' + idCounter++; - self$$1._aria = { role: settings.role }; - self$$1._elmCache = {}; - self$$1.$ = global$7; - self$$1.state = new ObservableObject({ + self.settings = settings = global$4.extend({}, self.Defaults, settings); + self._id = settings.id || 'mceu_' + idCounter++; + self._aria = { role: settings.role }; + self._elmCache = {}; + self.$ = global$7; + self.state = new ObservableObject({ visible: true, active: false, disabled: false, value: '' }); - self$$1.data = new ObservableObject(settings.data); - self$$1.classes = new ClassList(function () { - if (self$$1.state.get('rendered')) { - self$$1.getEl().className = this.toString(); + self.data = new ObservableObject(settings.data); + self.classes = new ClassList(function () { + if (self.state.get('rendered')) { + self.getEl().className = this.toString(); } }); - self$$1.classes.prefix = self$$1.classPrefix; + self.classes.prefix = self.classPrefix; classes = settings.classes; if (classes) { - if (self$$1.Defaults) { - defaultClasses = self$$1.Defaults.classes; + if (self.Defaults) { + defaultClasses = self.Defaults.classes; if (defaultClasses && classes !== defaultClasses) { applyClasses(defaultClasses); } } applyClasses(classes); } - global$4.each('title text name visible disabled active value'.split(' '), function (name$$1) { - if (name$$1 in settings) { - self$$1[name$$1](settings[name$$1]); + global$4.each('title text name visible disabled active value'.split(' '), function (name) { + if (name in settings) { + self[name](settings[name]); } }); - self$$1.on('click', function () { - if (self$$1.disabled()) { + self.on('click', function () { + if (self.disabled()) { return false; } }); - self$$1.settings = settings; - self$$1.borderBox = BoxUtils.parseBox(settings.border); - self$$1.paddingBox = BoxUtils.parseBox(settings.padding); - self$$1.marginBox = BoxUtils.parseBox(settings.margin); + self.settings = settings; + self.borderBox = BoxUtils.parseBox(settings.border); + self.paddingBox = BoxUtils.parseBox(settings.padding); + self.marginBox = BoxUtils.parseBox(settings.margin); if (settings.hidden) { - self$$1.hide(); + self.hide(); } }, Properties: 'parent,name', @@ -1652,15 +1652,15 @@ var inlite = (function () { return ctrl; }, initLayoutRect: function () { - var self$$1 = this; - var settings = self$$1.settings; + var self = this; + var settings = self.settings; var borderBox, layoutRect; - var elm = self$$1.getEl(); + var elm = self.getEl(); var width, height, minWidth, minHeight, autoResize; var startMinWidth, startMinHeight, initialSize; - borderBox = self$$1.borderBox = self$$1.borderBox || BoxUtils.measureBox(elm, 'border'); - self$$1.paddingBox = self$$1.paddingBox || BoxUtils.measureBox(elm, 'padding'); - self$$1.marginBox = self$$1.marginBox || BoxUtils.measureBox(elm, 'margin'); + borderBox = self.borderBox = self.borderBox || BoxUtils.measureBox(elm, 'border'); + self.paddingBox = self.paddingBox || BoxUtils.measureBox(elm, 'padding'); + self.marginBox = self.marginBox || BoxUtils.measureBox(elm, 'margin'); initialSize = funcs.getSize(elm); startMinWidth = settings.minWidth; startMinHeight = settings.minHeight; @@ -1676,7 +1676,7 @@ var inlite = (function () { var deltaH = borderBox.top + borderBox.bottom; var maxW = settings.maxWidth || 65535; var maxH = settings.maxHeight || 65535; - self$$1._layoutRect = layoutRect = { + self._layoutRect = layoutRect = { x: settings.x || 0, y: settings.y || 0, w: width, @@ -1696,14 +1696,14 @@ var inlite = (function () { autoResize: autoResize, scrollW: 0 }; - self$$1._lastLayoutRect = {}; + self._lastLayoutRect = {}; return layoutRect; }, layoutRect: function (newRect) { - var self$$1 = this; - var curRect = self$$1._layoutRect, lastLayoutRect, size, deltaWidth, deltaHeight, repaintControls; + var self = this; + var curRect = self._layoutRect, lastLayoutRect, size, deltaWidth, deltaHeight, repaintControls; if (!curRect) { - curRect = self$$1.initLayoutRect(); + curRect = self.initLayoutRect(); } if (newRect) { deltaWidth = curRect.deltaW; @@ -1754,13 +1754,13 @@ var inlite = (function () { if (newRect.contentH !== undefined) { curRect.contentH = newRect.contentH; } - lastLayoutRect = self$$1._lastLayoutRect; + lastLayoutRect = self._lastLayoutRect; if (lastLayoutRect.x !== curRect.x || lastLayoutRect.y !== curRect.y || lastLayoutRect.w !== curRect.w || lastLayoutRect.h !== curRect.h) { repaintControls = Control.repaintControls; if (repaintControls) { - if (repaintControls.map && !repaintControls.map[self$$1._id]) { - repaintControls.push(self$$1); - repaintControls.map[self$$1._id] = true; + if (repaintControls.map && !repaintControls.map[self._id]) { + repaintControls.push(self); + repaintControls.map[self._id] = true; } } lastLayoutRect.x = curRect.x; @@ -1768,21 +1768,21 @@ var inlite = (function () { lastLayoutRect.w = curRect.w; lastLayoutRect.h = curRect.h; } - return self$$1; + return self; } return curRect; }, repaint: function () { - var self$$1 = this; + var self = this; var style, bodyStyle, bodyElm, rect, borderBox; var borderW, borderH, lastRepaintRect, round, value; - round = !document.createRange ? Math.round : function (value) { + round = !domGlobals.document.createRange ? Math.round : function (value) { return value; }; - style = self$$1.getEl().style; - rect = self$$1._layoutRect; - lastRepaintRect = self$$1._lastRepaintRect || {}; - borderBox = self$$1.borderBox; + style = self.getEl().style; + rect = self._layoutRect; + lastRepaintRect = self._lastRepaintRect || {}; + borderBox = self.borderBox; borderW = borderBox.left + borderBox.right; borderH = borderBox.top + borderBox.bottom; if (rect.x !== lastRepaintRect.x) { @@ -1803,92 +1803,92 @@ var inlite = (function () { style.height = (value >= 0 ? value : 0) + 'px'; lastRepaintRect.h = rect.h; } - if (self$$1._hasBody && rect.innerW !== lastRepaintRect.innerW) { + if (self._hasBody && rect.innerW !== lastRepaintRect.innerW) { value = round(rect.innerW); - bodyElm = self$$1.getEl('body'); + bodyElm = self.getEl('body'); if (bodyElm) { bodyStyle = bodyElm.style; bodyStyle.width = (value >= 0 ? value : 0) + 'px'; } lastRepaintRect.innerW = rect.innerW; } - if (self$$1._hasBody && rect.innerH !== lastRepaintRect.innerH) { + if (self._hasBody && rect.innerH !== lastRepaintRect.innerH) { value = round(rect.innerH); - bodyElm = bodyElm || self$$1.getEl('body'); + bodyElm = bodyElm || self.getEl('body'); if (bodyElm) { bodyStyle = bodyStyle || bodyElm.style; bodyStyle.height = (value >= 0 ? value : 0) + 'px'; } lastRepaintRect.innerH = rect.innerH; } - self$$1._lastRepaintRect = lastRepaintRect; - self$$1.fire('repaint', {}, false); + self._lastRepaintRect = lastRepaintRect; + self.fire('repaint', {}, false); }, updateLayoutRect: function () { - var self$$1 = this; - self$$1.parent()._lastRect = null; - funcs.css(self$$1.getEl(), { + var self = this; + self.parent()._lastRect = null; + funcs.css(self.getEl(), { width: '', height: '' }); - self$$1._layoutRect = self$$1._lastRepaintRect = self$$1._lastLayoutRect = null; - self$$1.initLayoutRect(); + self._layoutRect = self._lastRepaintRect = self._lastLayoutRect = null; + self.initLayoutRect(); }, - on: function (name$$1, callback) { - var self$$1 = this; - function resolveCallbackName(name$$1) { + on: function (name, callback) { + var self = this; + function resolveCallbackName(name) { var callback, scope; - if (typeof name$$1 !== 'string') { - return name$$1; + if (typeof name !== 'string') { + return name; } return function (e) { if (!callback) { - self$$1.parentsAndSelf().each(function (ctrl) { + self.parentsAndSelf().each(function (ctrl) { var callbacks = ctrl.settings.callbacks; - if (callbacks && (callback = callbacks[name$$1])) { + if (callbacks && (callback = callbacks[name])) { scope = ctrl; return false; } }); } if (!callback) { - e.action = name$$1; + e.action = name; this.fire('execute', e); return; } return callback.call(scope, e); }; } - getEventDispatcher(self$$1).on(name$$1, resolveCallbackName(callback)); - return self$$1; + getEventDispatcher(self).on(name, resolveCallbackName(callback)); + return self; }, - off: function (name$$1, callback) { - getEventDispatcher(this).off(name$$1, callback); + off: function (name, callback) { + getEventDispatcher(this).off(name, callback); return this; }, - fire: function (name$$1, args, bubble) { - var self$$1 = this; + fire: function (name, args, bubble) { + var self = this; args = args || {}; if (!args.control) { - args.control = self$$1; + args.control = self; } - args = getEventDispatcher(self$$1).fire(name$$1, args); - if (bubble !== false && self$$1.parent) { - var parent$$1 = self$$1.parent(); - while (parent$$1 && !args.isPropagationStopped()) { - parent$$1.fire(name$$1, args, false); - parent$$1 = parent$$1.parent(); + args = getEventDispatcher(self).fire(name, args); + if (bubble !== false && self.parent) { + var parent = self.parent(); + while (parent && !args.isPropagationStopped()) { + parent.fire(name, args, false); + parent = parent.parent(); } } return args; }, - hasEventListeners: function (name$$1) { - return getEventDispatcher(this).has(name$$1); + hasEventListeners: function (name) { + return getEventDispatcher(this).has(name); }, parents: function (selector) { - var self$$1 = this; + var self = this; var ctrl, parents = new Collection$2(); - for (ctrl = self$$1.parent(); ctrl; ctrl = ctrl.parent()) { + for (ctrl = self.parent(); ctrl; ctrl = ctrl.parent()) { parents.add(ctrl); } if (selector) { @@ -1935,16 +1935,16 @@ var inlite = (function () { this.getEl().blur(); return this; }, - aria: function (name$$1, value) { - var self$$1 = this, elm = self$$1.getEl(self$$1.ariaTarget); + aria: function (name, value) { + var self = this, elm = self.getEl(self.ariaTarget); if (typeof value === 'undefined') { - return self$$1._aria[name$$1]; + return self._aria[name]; } - self$$1._aria[name$$1] = value; - if (self$$1.state.get('rendered')) { - elm.setAttribute(name$$1 === 'role' ? name$$1 : 'aria-' + name$$1, value); + self._aria[name] = value; + if (self.state.get('rendered')) { + elm.setAttribute(name === 'role' ? name : 'aria-' + name, value); } - return self$$1; + return self; }, encode: function (text, translate) { if (translate !== false) { @@ -1958,55 +1958,55 @@ var inlite = (function () { return Control.translate ? Control.translate(text) : text; }, before: function (items) { - var self$$1 = this, parent$$1 = self$$1.parent(); - if (parent$$1) { - parent$$1.insert(items, parent$$1.items().indexOf(self$$1), true); + var self = this, parent = self.parent(); + if (parent) { + parent.insert(items, parent.items().indexOf(self), true); } - return self$$1; + return self; }, after: function (items) { - var self$$1 = this, parent$$1 = self$$1.parent(); - if (parent$$1) { - parent$$1.insert(items, parent$$1.items().indexOf(self$$1)); + var self = this, parent = self.parent(); + if (parent) { + parent.insert(items, parent.items().indexOf(self)); } - return self$$1; + return self; }, remove: function () { - var self$$1 = this; - var elm = self$$1.getEl(); - var parent$$1 = self$$1.parent(); + var self = this; + var elm = self.getEl(); + var parent = self.parent(); var newItems, i; - if (self$$1.items) { - var controls = self$$1.items().toArray(); + if (self.items) { + var controls = self.items().toArray(); i = controls.length; while (i--) { controls[i].remove(); } } - if (parent$$1 && parent$$1.items) { + if (parent && parent.items) { newItems = []; - parent$$1.items().each(function (item) { - if (item !== self$$1) { + parent.items().each(function (item) { + if (item !== self) { newItems.push(item); } }); - parent$$1.items().set(newItems); - parent$$1._lastRect = null; + parent.items().set(newItems); + parent._lastRect = null; } - if (self$$1._eventsRoot && self$$1._eventsRoot === self$$1) { + if (self._eventsRoot && self._eventsRoot === self) { global$7(elm).off(); } - var lookup = self$$1.getRoot().controlIdLookup; + var lookup = self.getRoot().controlIdLookup; if (lookup) { - delete lookup[self$$1._id]; + delete lookup[self._id]; } if (elm && elm.parentNode) { elm.parentNode.removeChild(elm); } - self$$1.state.set('rendered', false); - self$$1.state.destroy(); - self$$1.fire('remove'); - return self$$1; + self.state.set('rendered', false); + self.state.destroy(); + self.fire('remove'); + return self; }, renderBefore: function (elm) { global$7(elm).before(this.renderHtml()); @@ -2026,81 +2026,81 @@ var inlite = (function () { return '
'; }, postRender: function () { - var self$$1 = this; - var settings = self$$1.settings; - var elm, box, parent$$1, name$$1, parentEventsRoot; - self$$1.$el = global$7(self$$1.getEl()); - self$$1.state.set('rendered', true); - for (name$$1 in settings) { - if (name$$1.indexOf('on') === 0) { - self$$1.on(name$$1.substr(2), settings[name$$1]); + var self = this; + var settings = self.settings; + var elm, box, parent, name, parentEventsRoot; + self.$el = global$7(self.getEl()); + self.state.set('rendered', true); + for (name in settings) { + if (name.indexOf('on') === 0) { + self.on(name.substr(2), settings[name]); } } - if (self$$1._eventsRoot) { - for (parent$$1 = self$$1.parent(); !parentEventsRoot && parent$$1; parent$$1 = parent$$1.parent()) { - parentEventsRoot = parent$$1._eventsRoot; + if (self._eventsRoot) { + for (parent = self.parent(); !parentEventsRoot && parent; parent = parent.parent()) { + parentEventsRoot = parent._eventsRoot; } if (parentEventsRoot) { - for (name$$1 in parentEventsRoot._nativeEvents) { - self$$1._nativeEvents[name$$1] = true; + for (name in parentEventsRoot._nativeEvents) { + self._nativeEvents[name] = true; } } } - bindPendingEvents(self$$1); + bindPendingEvents(self); if (settings.style) { - elm = self$$1.getEl(); + elm = self.getEl(); if (elm) { elm.setAttribute('style', settings.style); elm.style.cssText = settings.style; } } - if (self$$1.settings.border) { - box = self$$1.borderBox; - self$$1.$el.css({ + if (self.settings.border) { + box = self.borderBox; + self.$el.css({ 'border-top-width': box.top, 'border-right-width': box.right, 'border-bottom-width': box.bottom, 'border-left-width': box.left }); } - var root = self$$1.getRoot(); + var root = self.getRoot(); if (!root.controlIdLookup) { root.controlIdLookup = {}; } - root.controlIdLookup[self$$1._id] = self$$1; - for (var key in self$$1._aria) { - self$$1.aria(key, self$$1._aria[key]); + root.controlIdLookup[self._id] = self; + for (var key in self._aria) { + self.aria(key, self._aria[key]); } - if (self$$1.state.get('visible') === false) { - self$$1.getEl().style.display = 'none'; + if (self.state.get('visible') === false) { + self.getEl().style.display = 'none'; } - self$$1.bindStates(); - self$$1.state.on('change:visible', function (e) { + self.bindStates(); + self.state.on('change:visible', function (e) { var state = e.value; var parentCtrl; - if (self$$1.state.get('rendered')) { - self$$1.getEl().style.display = state === false ? 'none' : ''; - self$$1.getEl().getBoundingClientRect(); + if (self.state.get('rendered')) { + self.getEl().style.display = state === false ? 'none' : ''; + self.getEl().getBoundingClientRect(); } - parentCtrl = self$$1.parent(); + parentCtrl = self.parent(); if (parentCtrl) { parentCtrl._lastRect = null; } - self$$1.fire(state ? 'show' : 'hide'); - ReflowQueue.add(self$$1); + self.fire(state ? 'show' : 'hide'); + ReflowQueue.add(self); }); - self$$1.fire('postrender', {}, false); + self.fire('postrender', {}, false); }, bindStates: function () { }, scrollIntoView: function (align) { function getOffset(elm, rootElm) { - var x, y, parent$$1 = elm; + var x, y, parent = elm; x = y = 0; - while (parent$$1 && parent$$1 !== rootElm && parent$$1.nodeType) { - x += parent$$1.offsetLeft || 0; - y += parent$$1.offsetTop || 0; - parent$$1 = parent$$1.offsetParent; + while (parent && parent !== rootElm && parent.nodeType) { + x += parent.offsetLeft || 0; + y += parent.offsetTop || 0; + parent = parent.offsetParent; } return { x: x, @@ -2150,20 +2150,20 @@ var inlite = (function () { }, reflow: function () { ReflowQueue.remove(this); - var parent$$1 = this.parent(); - if (parent$$1 && parent$$1._layout && !parent$$1._layout.isNative()) { - parent$$1.reflow(); + var parent = this.parent(); + if (parent && parent._layout && !parent._layout.isNative()) { + parent.reflow(); } return this; } }; - global$4.each('text title visible disabled active value'.split(' '), function (name$$1) { - proto$1[name$$1] = function (value) { + global$4.each('text title visible disabled active value'.split(' '), function (name) { + proto$1[name] = function (value) { if (arguments.length === 0) { - return this.state.get(name$$1); + return this.state.get(name); } if (typeof value !== 'undefined') { - this.state.set(name$$1, value); + this.state.set(name, value); } return this; }; @@ -2173,12 +2173,12 @@ var inlite = (function () { if (!obj._eventDispatcher) { obj._eventDispatcher = new global$9({ scope: obj, - toggleEvent: function (name$$1, state) { - if (state && global$9.isNative(name$$1)) { + toggleEvent: function (name, state) { + if (state && global$9.isNative(name)) { if (!obj._nativeEvents) { obj._nativeEvents = {}; } - obj._nativeEvents[name$$1] = true; + obj._nativeEvents[name] = true; if (obj.state.get('rendered')) { bindPendingEvents(obj); } @@ -2189,7 +2189,7 @@ var inlite = (function () { return obj._eventDispatcher; } function bindPendingEvents(eventCtrl) { - var i, l, parents, eventRootCtrl, nativeEvents, name$$1; + var i, l, parents, eventRootCtrl, nativeEvents, name; function delegate(e) { var control = eventCtrl.getParentCtrl(e.target); if (control) { @@ -2262,11 +2262,11 @@ var inlite = (function () { if (!eventRootDelegates) { eventRootDelegates = eventRootCtrl._delegates = {}; } - for (name$$1 in nativeEvents) { + for (name in nativeEvents) { if (!nativeEvents) { return false; } - if (name$$1 === 'wheel' && !hasWheelEventSupport) { + if (name === 'wheel' && !hasWheelEventSupport) { if (hasMouseWheelEventSupport) { global$7(eventCtrl.getEl()).on('mousewheel', fixWheelEvent); } else { @@ -2274,16 +2274,16 @@ var inlite = (function () { } continue; } - if (name$$1 === 'mouseenter' || name$$1 === 'mouseleave') { + if (name === 'mouseenter' || name === 'mouseleave') { if (!eventRootCtrl._hasMouseEnter) { global$7(eventRootCtrl.getEl()).on('mouseleave', mouseLeaveHandler).on('mouseover', mouseEnterHandler); eventRootCtrl._hasMouseEnter = 1; } - } else if (!eventRootDelegates[name$$1]) { - global$7(eventRootCtrl.getEl()).on(name$$1, delegate); - eventRootDelegates[name$$1] = true; + } else if (!eventRootDelegates[name]) { + global$7(eventRootCtrl.getEl()).on(name, delegate); + eventRootDelegates[name] = true; } - nativeEvents[name$$1] = false; + nativeEvents[name] = false; } } } @@ -2301,7 +2301,7 @@ var inlite = (function () { pos = funcs.getPos(targetElm, UiContainer.getUiContainer(ctrl)); x = pos.x; y = pos.y; - if (isFixed(ctrl) && isStatic(document.body)) { + if (isFixed(ctrl) && isStatic(domGlobals.document.body)) { x -= viewport.x; y -= viewport.y; } @@ -2353,11 +2353,11 @@ var inlite = (function () { }; }; var getWindowViewPort = function () { - var win = window; - var x = Math.max(win.pageXOffset, document.body.scrollLeft, document.documentElement.scrollLeft); - var y = Math.max(win.pageYOffset, document.body.scrollTop, document.documentElement.scrollTop); - var w = win.innerWidth || document.documentElement.clientWidth; - var h = win.innerHeight || document.documentElement.clientHeight; + var win = domGlobals.window; + var x = Math.max(win.pageXOffset, domGlobals.document.body.scrollLeft, domGlobals.document.documentElement.scrollLeft); + var y = Math.max(win.pageYOffset, domGlobals.document.body.scrollTop, domGlobals.document.documentElement.scrollTop); + var w = win.innerWidth || domGlobals.document.documentElement.clientWidth; + var h = win.innerHeight || domGlobals.document.documentElement.clientHeight; return { x: x, y: y, @@ -2394,12 +2394,12 @@ var inlite = (function () { return this.moveTo(pos.x, pos.y); }, moveBy: function (dx, dy) { - var self$$1 = this, rect = self$$1.layoutRect(); - self$$1.moveTo(rect.x + dx, rect.y + dy); - return self$$1; + var self = this, rect = self.layoutRect(); + self.moveTo(rect.x + dx, rect.y + dy); + return self; }, moveTo: function (x, y) { - var self$$1 = this; + var self = this; function constrain(value, max, size) { if (value < 0) { return 0; @@ -2410,14 +2410,14 @@ var inlite = (function () { } return value; } - if (self$$1.settings.constrainToViewport) { + if (self.settings.constrainToViewport) { var viewPortRect = getViewPortRect(this); - var layoutRect = self$$1.layoutRect(); + var layoutRect = self.layoutRect(); x = constrain(x, viewPortRect.w + viewPortRect.x, layoutRect.w); y = constrain(y, viewPortRect.h + viewPortRect.y, layoutRect.h); } - var uiContainer = UiContainer.getUiContainer(self$$1); - if (uiContainer && isStatic(uiContainer) && !isFixed(self$$1)) { + var uiContainer = UiContainer.getUiContainer(self); + if (uiContainer && isStatic(uiContainer) && !isFixed(self)) { x -= uiContainer.scrollLeft; y -= uiContainer.scrollTop; } @@ -2425,20 +2425,20 @@ var inlite = (function () { x += 1; y += 1; } - if (self$$1.state.get('rendered')) { - self$$1.layoutRect({ + if (self.state.get('rendered')) { + self.layoutRect({ x: x, y: y }).repaint(); } else { - self$$1.settings.x = x; - self$$1.settings.y = y; + self.settings.x = x; + self.settings.y = y; } - self$$1.fire('move', { + self.fire('move', { x: x, y: y }); - return self$$1; + return self; } }; @@ -2766,9 +2766,9 @@ var inlite = (function () { } function DragHelper (id, settings) { var $eventOverlay; - var doc = settings.document || document; + var doc = settings.document || domGlobals.document; var downButton; - var start, stop$$1, drag, startX, startY; + var start, stop, drag, startX, startY; settings = settings || {}; var handleElement = doc.getElementById(settings.handle || id); start = function (e) { @@ -2780,8 +2780,8 @@ var inlite = (function () { handleElm = handleElement; startX = e.screenX; startY = e.screenY; - if (window.getComputedStyle) { - cursor = window.getComputedStyle(handleElm, null).getPropertyValue('cursor'); + if (domGlobals.window.getComputedStyle) { + cursor = domGlobals.window.getComputedStyle(handleElm, null).getPropertyValue('cursor'); } else { cursor = handleElm.runtimeStyle.cursor; } @@ -2795,22 +2795,22 @@ var inlite = (function () { opacity: 0.0001, cursor: cursor }).appendTo(doc.body); - global$7(doc).on('mousemove touchmove', drag).on('mouseup touchend', stop$$1); + global$7(doc).on('mousemove touchmove', drag).on('mouseup touchend', stop); settings.start(e); }; drag = function (e) { updateWithTouchData(e); if (e.button !== downButton) { - return stop$$1(e); + return stop(e); } e.deltaX = e.screenX - startX; e.deltaY = e.screenY - startY; e.preventDefault(); settings.drag(e); }; - stop$$1 = function (e) { + stop = function (e) { updateWithTouchData(e); - global$7(doc).off('mousemove touchmove', drag).off('mouseup touchend', stop$$1); + global$7(doc).off('mousemove touchmove', drag).off('mouseup touchend', stop); $eventOverlay.remove(); if (settings.stop) { settings.stop(e); @@ -2834,9 +2834,9 @@ var inlite = (function () { return node && node.nodeType === 1; } try { - focusedElement = document.activeElement; + focusedElement = domGlobals.document.activeElement; } catch (ex) { - focusedElement = document.body; + focusedElement = domGlobals.document.body; } focusedControl = root.getParentCtrl(focusedElement); function getRole(elm) { @@ -2847,17 +2847,17 @@ var inlite = (function () { return null; } function getParentRole(elm) { - var role, parent$$1 = elm || focusedElement; - while (parent$$1 = parent$$1.parentNode) { - if (role = getRole(parent$$1)) { + var role, parent = elm || focusedElement; + while (parent = parent.parentNode) { + if (role = getRole(parent)) { return role; } } } - function getAriaProp(name$$1) { + function getAriaProp(name) { var elm = focusedElement; if (isElement(elm)) { - return elm.getAttribute('aria-' + name$$1); + return elm.getAttribute('aria-' + name); } } function isTextInputElement(elm) { @@ -3432,9 +3432,9 @@ var inlite = (function () { var visiblePanels = []; var zOrder = []; var hasModal; - function isChildOf(ctrl, parent$$1) { + function isChildOf(ctrl, parent) { while (ctrl) { - if (ctrl === parent$$1) { + if (ctrl === parent) { return true; } ctrl = ctrl.parent(); @@ -3465,7 +3465,7 @@ var inlite = (function () { } skipOrHidePanels(e); }; - global$7(document).on('click touchstart', documentClickHandler); + global$7(domGlobals.document).on('click touchstart', documentClickHandler); } } function bindDocumentScrollHandler() { @@ -3477,32 +3477,32 @@ var inlite = (function () { repositionPanel$1(visiblePanels[i]); } }; - global$7(window).on('scroll', documentScrollHandler); + global$7(domGlobals.window).on('scroll', documentScrollHandler); } } function bindWindowResizeHandler() { if (!windowResizeHandler) { - var docElm_1 = document.documentElement; + var docElm_1 = domGlobals.document.documentElement; var clientWidth_1 = docElm_1.clientWidth, clientHeight_1 = docElm_1.clientHeight; windowResizeHandler = function () { - if (!document.all || clientWidth_1 !== docElm_1.clientWidth || clientHeight_1 !== docElm_1.clientHeight) { + if (!domGlobals.document.all || clientWidth_1 !== docElm_1.clientWidth || clientHeight_1 !== docElm_1.clientHeight) { clientWidth_1 = docElm_1.clientWidth; clientHeight_1 = docElm_1.clientHeight; FloatPanel.hideAll(); } }; - global$7(window).on('resize', windowResizeHandler); + global$7(domGlobals.window).on('resize', windowResizeHandler); } } function repositionPanel$1(panel) { - var scrollY$$1 = funcs.getViewPort().y; + var scrollY = funcs.getViewPort().y; function toggleFixedChildPanels(fixed, deltaY) { - var parent$$1; + var parent; for (var i = 0; i < visiblePanels.length; i++) { if (visiblePanels[i] !== panel) { - parent$$1 = visiblePanels[i].parent(); - while (parent$$1 && (parent$$1 = parent$$1.parent())) { - if (parent$$1 === panel) { + parent = visiblePanels[i].parent(); + while (parent && (parent = parent.parent())) { + if (parent === panel) { visiblePanels[i].fixed(fixed).moveBy(0, deltaY).repaint(); } } @@ -3512,14 +3512,14 @@ var inlite = (function () { if (panel.settings.autofix) { if (!panel.state.get('fixed')) { panel._autoFixY = panel.layoutRect().y; - if (panel._autoFixY < scrollY$$1) { + if (panel._autoFixY < scrollY) { panel.fixed(true).layoutRect({ y: 0 }).repaint(); - toggleFixedChildPanels(true, scrollY$$1 - panel._autoFixY); + toggleFixedChildPanels(true, scrollY - panel._autoFixY); } } else { - if (panel._autoFixY > scrollY$$1) { + if (panel._autoFixY > scrollY) { panel.fixed(false).layoutRect({ y: panel._autoFixY }).repaint(); - toggleFixedChildPanels(false, panel._autoFixY - scrollY$$1); + toggleFixedChildPanels(false, panel._autoFixY - scrollY); } } } @@ -3562,83 +3562,83 @@ var inlite = (function () { Resizable ], init: function (settings) { - var self$$1 = this; - self$$1._super(settings); - self$$1._eventsRoot = self$$1; - self$$1.classes.add('floatpanel'); + var self = this; + self._super(settings); + self._eventsRoot = self; + self.classes.add('floatpanel'); if (settings.autohide) { bindDocumentClickHandler(); bindWindowResizeHandler(); - visiblePanels.push(self$$1); + visiblePanels.push(self); } if (settings.autofix) { bindDocumentScrollHandler(); - self$$1.on('move', function () { + self.on('move', function () { repositionPanel$1(this); }); } - self$$1.on('postrender show', function (e) { - if (e.control === self$$1) { + self.on('postrender show', function (e) { + if (e.control === self) { var $modalBlockEl_1; - var prefix_1 = self$$1.classPrefix; - if (self$$1.modal && !hasModal) { - $modalBlockEl_1 = global$7('#' + prefix_1 + 'modal-block', self$$1.getContainerElm()); + var prefix_1 = self.classPrefix; + if (self.modal && !hasModal) { + $modalBlockEl_1 = global$7('#' + prefix_1 + 'modal-block', self.getContainerElm()); if (!$modalBlockEl_1[0]) { - $modalBlockEl_1 = global$7('
').appendTo(self$$1.getContainerElm()); + $modalBlockEl_1 = global$7('
').appendTo(self.getContainerElm()); } global$3.setTimeout(function () { $modalBlockEl_1.addClass(prefix_1 + 'in'); - global$7(self$$1.getEl()).addClass(prefix_1 + 'in'); + global$7(self.getEl()).addClass(prefix_1 + 'in'); }); hasModal = true; } - addRemove(true, self$$1); + addRemove(true, self); } }); - self$$1.on('show', function () { - self$$1.parents().each(function (ctrl) { + self.on('show', function () { + self.parents().each(function (ctrl) { if (ctrl.state.get('fixed')) { - self$$1.fixed(true); + self.fixed(true); return false; } }); }); if (settings.popover) { - self$$1._preBodyHtml = '
'; - self$$1.classes.add('popover').add('bottom').add(self$$1.isRtl() ? 'end' : 'start'); + self._preBodyHtml = '
'; + self.classes.add('popover').add('bottom').add(self.isRtl() ? 'end' : 'start'); } - self$$1.aria('label', settings.ariaLabel); - self$$1.aria('labelledby', self$$1._id); - self$$1.aria('describedby', self$$1.describedBy || self$$1._id + '-none'); + self.aria('label', settings.ariaLabel); + self.aria('labelledby', self._id); + self.aria('describedby', self.describedBy || self._id + '-none'); }, fixed: function (state) { - var self$$1 = this; - if (self$$1.state.get('fixed') !== state) { - if (self$$1.state.get('rendered')) { + var self = this; + if (self.state.get('fixed') !== state) { + if (self.state.get('rendered')) { var viewport = funcs.getViewPort(); if (state) { - self$$1.layoutRect().y -= viewport.y; + self.layoutRect().y -= viewport.y; } else { - self$$1.layoutRect().y += viewport.y; + self.layoutRect().y += viewport.y; } } - self$$1.classes.toggle('fixed', state); - self$$1.state.set('fixed', state); + self.classes.toggle('fixed', state); + self.state.set('fixed', state); } - return self$$1; + return self; }, show: function () { - var self$$1 = this; + var self = this; var i; - var state = self$$1._super(); + var state = self._super(); i = visiblePanels.length; while (i--) { - if (visiblePanels[i] === self$$1) { + if (visiblePanels[i] === self) { break; } } if (i === -1) { - visiblePanels.push(self$$1); + visiblePanels.push(self); } return state; }, @@ -3651,23 +3651,23 @@ var inlite = (function () { FloatPanel.hideAll(); }, close: function () { - var self$$1 = this; - if (!self$$1.fire('close').isDefaultPrevented()) { - self$$1.remove(); - addRemove(false, self$$1); + var self = this; + if (!self.fire('close').isDefaultPrevented()) { + self.remove(); + addRemove(false, self); } - return self$$1; + return self; }, remove: function () { removeVisiblePanel(this); this._super(); }, postRender: function () { - var self$$1 = this; - if (self$$1.settings.bodyRole) { - this.getEl('body').setAttribute('role', self$$1.settings.bodyRole); + var self = this; + if (self.settings.bodyRole) { + this.getEl('body').setAttribute('role', self.settings.bodyRole); } - return self$$1._super(); + return self._super(); } }); FloatPanel.hideAll = function () { @@ -3705,9 +3705,9 @@ var inlite = (function () { return; } if (!viewport) { - viewport = document.createElement('meta'); + viewport = domGlobals.document.createElement('meta'); viewport.setAttribute('name', 'viewport'); - document.getElementsByTagName('head')[0].appendChild(viewport); + domGlobals.document.getElementsByTagName('head')[0].appendChild(viewport); } contentValue = viewport.getAttribute('content'); if (contentValue && typeof oldMetaValue !== 'undefined') { @@ -3718,8 +3718,8 @@ var inlite = (function () { function toggleBodyFullScreenClasses(classPrefix, state) { if (checkFullscreenWindows() && state === false) { global$7([ - document.documentElement, - document.body + domGlobals.document.documentElement, + domGlobals.document.body ]).removeClass(classPrefix + 'fullscreen'); } } @@ -3734,17 +3734,17 @@ var inlite = (function () { function handleWindowResize() { if (!global$1.desktop) { var lastSize_1 = { - w: window.innerWidth, - h: window.innerHeight + w: domGlobals.window.innerWidth, + h: domGlobals.window.innerHeight }; global$3.setInterval(function () { - var w = window.innerWidth, h = window.innerHeight; + var w = domGlobals.window.innerWidth, h = domGlobals.window.innerHeight; if (lastSize_1.w !== w || lastSize_1.h !== h) { lastSize_1 = { w: w, h: h }; - global$7(window).trigger('resize'); + global$7(domGlobals.window).trigger('resize'); } }, 100); } @@ -3757,9 +3757,9 @@ var inlite = (function () { windows[i].moveTo(windows[i].settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2), windows[i].settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2)); } } - global$7(window).on('resize', reposition); + global$7(domGlobals.window).on('resize', reposition); } - var Window$$1 = FloatPanel.extend({ + var Window = FloatPanel.extend({ modal: true, Defaults: { border: 1, @@ -3776,73 +3776,73 @@ var inlite = (function () { } }, init: function (settings) { - var self$$1 = this; - self$$1._super(settings); - if (self$$1.isRtl()) { - self$$1.classes.add('rtl'); + var self = this; + self._super(settings); + if (self.isRtl()) { + self.classes.add('rtl'); } - self$$1.classes.add('window'); - self$$1.bodyClasses.add('window-body'); - self$$1.state.set('fixed', true); + self.classes.add('window'); + self.bodyClasses.add('window-body'); + self.state.set('fixed', true); if (settings.buttons) { - self$$1.statusbar = new Panel({ + self.statusbar = new Panel({ layout: 'flex', border: '1 0 0 0', spacing: 3, padding: 10, align: 'center', - pack: self$$1.isRtl() ? 'start' : 'end', + pack: self.isRtl() ? 'start' : 'end', defaults: { type: 'button' }, items: settings.buttons }); - self$$1.statusbar.classes.add('foot'); - self$$1.statusbar.parent(self$$1); + self.statusbar.classes.add('foot'); + self.statusbar.parent(self); } - self$$1.on('click', function (e) { - var closeClass = self$$1.classPrefix + 'close'; + self.on('click', function (e) { + var closeClass = self.classPrefix + 'close'; if (funcs.hasClass(e.target, closeClass) || funcs.hasClass(e.target.parentNode, closeClass)) { - self$$1.close(); + self.close(); } }); - self$$1.on('cancel', function () { - self$$1.close(); + self.on('cancel', function () { + self.close(); }); - self$$1.on('move', function (e) { - if (e.control === self$$1) { + self.on('move', function (e) { + if (e.control === self) { FloatPanel.hideAll(); } }); - self$$1.aria('describedby', self$$1.describedBy || self$$1._id + '-none'); - self$$1.aria('label', settings.title); - self$$1._fullscreen = false; + self.aria('describedby', self.describedBy || self._id + '-none'); + self.aria('label', settings.title); + self._fullscreen = false; }, recalc: function () { - var self$$1 = this; - var statusbar$$1 = self$$1.statusbar; + var self = this; + var statusbar = self.statusbar; var layoutRect, width, x, needsRecalc; - if (self$$1._fullscreen) { - self$$1.layoutRect(funcs.getWindowSize()); - self$$1.layoutRect().contentH = self$$1.layoutRect().innerH; + if (self._fullscreen) { + self.layoutRect(funcs.getWindowSize()); + self.layoutRect().contentH = self.layoutRect().innerH; } - self$$1._super(); - layoutRect = self$$1.layoutRect(); - if (self$$1.settings.title && !self$$1._fullscreen) { + self._super(); + layoutRect = self.layoutRect(); + if (self.settings.title && !self._fullscreen) { width = layoutRect.headerW; if (width > layoutRect.w) { x = layoutRect.x - Math.max(0, width / 2); - self$$1.layoutRect({ + self.layoutRect({ w: width, x: x }); needsRecalc = true; } } - if (statusbar$$1) { - statusbar$$1.layoutRect({ w: self$$1.layoutRect().innerW }).recalc(); - width = statusbar$$1.layoutRect().minW + layoutRect.deltaW; + if (statusbar) { + statusbar.layoutRect({ w: self.layoutRect().innerW }).recalc(); + width = statusbar.layoutRect().minW + layoutRect.deltaW; if (width > layoutRect.w) { x = layoutRect.x - Math.max(0, width - layoutRect.w); - self$$1.layoutRect({ + self.layoutRect({ w: width, x: x }); @@ -3850,158 +3850,158 @@ var inlite = (function () { } } if (needsRecalc) { - self$$1.recalc(); + self.recalc(); } }, initLayoutRect: function () { - var self$$1 = this; - var layoutRect = self$$1._super(); + var self = this; + var layoutRect = self._super(); var deltaH = 0, headEl; - if (self$$1.settings.title && !self$$1._fullscreen) { - headEl = self$$1.getEl('head'); + if (self.settings.title && !self._fullscreen) { + headEl = self.getEl('head'); var size = funcs.getSize(headEl); layoutRect.headerW = size.width; layoutRect.headerH = size.height; deltaH += layoutRect.headerH; } - if (self$$1.statusbar) { - deltaH += self$$1.statusbar.layoutRect().h; + if (self.statusbar) { + deltaH += self.statusbar.layoutRect().h; } layoutRect.deltaH += deltaH; layoutRect.minH += deltaH; layoutRect.h += deltaH; var rect = funcs.getWindowSize(); - layoutRect.x = self$$1.settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2); - layoutRect.y = self$$1.settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2); + layoutRect.x = self.settings.x || Math.max(0, rect.w / 2 - layoutRect.w / 2); + layoutRect.y = self.settings.y || Math.max(0, rect.h / 2 - layoutRect.h / 2); return layoutRect; }, renderHtml: function () { - var self$$1 = this, layout = self$$1._layout, id = self$$1._id, prefix = self$$1.classPrefix; - var settings = self$$1.settings; + var self = this, layout = self._layout, id = self._id, prefix = self.classPrefix; + var settings = self.settings; var headerHtml = '', footerHtml = '', html = settings.html; - self$$1.preRender(); - layout.preRender(self$$1); + self.preRender(); + layout.preRender(self); if (settings.title) { - headerHtml = '
' + '
' + self$$1.encode(settings.title) + '
' + '
' + '' + '
'; + headerHtml = '
' + '
' + self.encode(settings.title) + '
' + '
' + '' + '
'; } if (settings.url) { html = ''; } if (typeof html === 'undefined') { - html = layout.renderHtml(self$$1); + html = layout.renderHtml(self); } - if (self$$1.statusbar) { - footerHtml = self$$1.statusbar.renderHtml(); + if (self.statusbar) { + footerHtml = self.statusbar.renderHtml(); } - return '
' + '
' + headerHtml + '
' + html + '
' + footerHtml + '
' + '
'; + return '
' + '
' + headerHtml + '
' + html + '
' + footerHtml + '
' + '
'; }, fullscreen: function (state) { - var self$$1 = this; - var documentElement = document.documentElement; + var self = this; + var documentElement = domGlobals.document.documentElement; var slowRendering; - var prefix = self$$1.classPrefix; + var prefix = self.classPrefix; var layoutRect; - if (state !== self$$1._fullscreen) { - global$7(window).on('resize', function () { + if (state !== self._fullscreen) { + global$7(domGlobals.window).on('resize', function () { var time; - if (self$$1._fullscreen) { + if (self._fullscreen) { if (!slowRendering) { time = new Date().getTime(); var rect = funcs.getWindowSize(); - self$$1.moveTo(0, 0).resizeTo(rect.w, rect.h); + self.moveTo(0, 0).resizeTo(rect.w, rect.h); if (new Date().getTime() - time > 50) { slowRendering = true; } } else { - if (!self$$1._timer) { - self$$1._timer = global$3.setTimeout(function () { + if (!self._timer) { + self._timer = global$3.setTimeout(function () { var rect = funcs.getWindowSize(); - self$$1.moveTo(0, 0).resizeTo(rect.w, rect.h); - self$$1._timer = 0; + self.moveTo(0, 0).resizeTo(rect.w, rect.h); + self._timer = 0; }, 50); } } } }); - layoutRect = self$$1.layoutRect(); - self$$1._fullscreen = state; + layoutRect = self.layoutRect(); + self._fullscreen = state; if (!state) { - self$$1.borderBox = BoxUtils.parseBox(self$$1.settings.border); - self$$1.getEl('head').style.display = ''; + self.borderBox = BoxUtils.parseBox(self.settings.border); + self.getEl('head').style.display = ''; layoutRect.deltaH += layoutRect.headerH; global$7([ documentElement, - document.body + domGlobals.document.body ]).removeClass(prefix + 'fullscreen'); - self$$1.classes.remove('fullscreen'); - self$$1.moveTo(self$$1._initial.x, self$$1._initial.y).resizeTo(self$$1._initial.w, self$$1._initial.h); + self.classes.remove('fullscreen'); + self.moveTo(self._initial.x, self._initial.y).resizeTo(self._initial.w, self._initial.h); } else { - self$$1._initial = { + self._initial = { x: layoutRect.x, y: layoutRect.y, w: layoutRect.w, h: layoutRect.h }; - self$$1.borderBox = BoxUtils.parseBox('0'); - self$$1.getEl('head').style.display = 'none'; + self.borderBox = BoxUtils.parseBox('0'); + self.getEl('head').style.display = 'none'; layoutRect.deltaH -= layoutRect.headerH + 2; global$7([ documentElement, - document.body + domGlobals.document.body ]).addClass(prefix + 'fullscreen'); - self$$1.classes.add('fullscreen'); + self.classes.add('fullscreen'); var rect = funcs.getWindowSize(); - self$$1.moveTo(0, 0).resizeTo(rect.w, rect.h); + self.moveTo(0, 0).resizeTo(rect.w, rect.h); } } - return self$$1.reflow(); + return self.reflow(); }, postRender: function () { - var self$$1 = this; + var self = this; var startPos; setTimeout(function () { - self$$1.classes.add('in'); - self$$1.fire('open'); + self.classes.add('in'); + self.fire('open'); }, 0); - self$$1._super(); - if (self$$1.statusbar) { - self$$1.statusbar.postRender(); + self._super(); + if (self.statusbar) { + self.statusbar.postRender(); } - self$$1.focus(); - this.dragHelper = new DragHelper(self$$1._id + '-dragh', { + self.focus(); + this.dragHelper = new DragHelper(self._id + '-dragh', { start: function () { startPos = { - x: self$$1.layoutRect().x, - y: self$$1.layoutRect().y + x: self.layoutRect().x, + y: self.layoutRect().y }; }, drag: function (e) { - self$$1.moveTo(startPos.x + e.deltaX, startPos.y + e.deltaY); + self.moveTo(startPos.x + e.deltaX, startPos.y + e.deltaY); } }); - self$$1.on('submit', function (e) { + self.on('submit', function (e) { if (!e.isDefaultPrevented()) { - self$$1.close(); + self.close(); } }); - windows.push(self$$1); + windows.push(self); toggleFullScreenState(true); }, submit: function () { return this.fire('submit', { data: this.toJSON() }); }, remove: function () { - var self$$1 = this; + var self = this; var i; - self$$1.dragHelper.destroy(); - self$$1._super(); - if (self$$1.statusbar) { + self.dragHelper.destroy(); + self._super(); + if (self.statusbar) { this.statusbar.remove(); } - toggleBodyFullScreenClasses(self$$1.classPrefix, false); + toggleBodyFullScreenClasses(self.classPrefix, false); i = windows.length; while (i--) { - if (windows[i] === self$$1) { + if (windows[i] === self) { windows.splice(i, 1); } } @@ -4014,7 +4014,7 @@ var inlite = (function () { }); handleWindowResize(); - var MessageBox = Window$$1.extend({ + var MessageBox = Window.extend({ init: function (settings) { settings = { border: 1, @@ -4047,14 +4047,14 @@ var inlite = (function () { var buttons; var callback = settings.callback || function () { }; - function createButton(text, status$$1, primary) { + function createButton(text, status, primary) { return { type: 'button', text: text, subtype: primary ? 'primary' : '', onClick: function (e) { e.control.parents()[1].close(); - callback(status$$1); + callback(status); } }; } @@ -4079,7 +4079,7 @@ var inlite = (function () { buttons = [createButton('Ok', true, true)]; break; } - return new Window$$1({ + return new Window({ padding: 20, x: settings.x, y: settings.y, @@ -4105,7 +4105,7 @@ var inlite = (function () { onCancel: function () { callback(false); } - }).renderTo(document.body).reflow(); + }).renderTo(domGlobals.document.body).reflow(); }, alert: function (settings, callback) { if (typeof settings === 'string') { @@ -4126,7 +4126,7 @@ var inlite = (function () { }); function WindowManagerImpl (editor) { - var open$$1 = function (args, params, closeCallback) { + var open = function (args, params, closeCallback) { var win; args.title = args.title || ' '; args.url = args.url || args.file; @@ -4160,26 +4160,26 @@ var inlite = (function () { } ]; } - win = new Window$$1(args); + win = new Window(args); win.on('close', function () { closeCallback(win); }); if (args.data) { win.on('postRender', function () { this.find('*').each(function (ctrl) { - var name$$1 = ctrl.name(); - if (name$$1 in args.data) { - ctrl.value(args.data[name$$1]); + var name = ctrl.name(); + if (name in args.data) { + ctrl.value(args.data[name]); } }); }); } win.features = args || {}; win.params = params || {}; - win = win.renderTo(document.body).reflow(); + win = win.renderTo(domGlobals.document.body).reflow(); return win; }; - var alert$$1 = function (message, choiceCallback, closeCallback) { + var alert = function (message, choiceCallback, closeCallback) { var win; win = MessageBox.alert(message, function () { choiceCallback(); @@ -4189,7 +4189,7 @@ var inlite = (function () { }); return win; }; - var confirm$$1 = function (message, choiceCallback, closeCallback) { + var confirm = function (message, choiceCallback, closeCallback) { var win; win = MessageBox.confirm(message, function (state) { choiceCallback(state); @@ -4199,20 +4199,20 @@ var inlite = (function () { }); return win; }; - var close$$1 = function (window$$1) { - window$$1.close(); + var close = function (window) { + window.close(); }; - var getParams = function (window$$1) { - return window$$1.params; + var getParams = function (window) { + return window.params; }; - var setParams = function (window$$1, params) { - window$$1.params = params; + var setParams = function (window, params) { + window.params = params; }; return { - open: open$$1, - alert: alert$$1, - confirm: confirm$$1, - close: close$$1, + open: open, + alert: alert, + confirm: confirm, + close: close, getParams: getParams, setParams: setParams }; @@ -4234,7 +4234,7 @@ var inlite = (function () { }; var ThemeApi = { get: get }; - var Global = typeof window !== 'undefined' ? window : Function('return this;')(); + var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')(); var path = function (parts, scope) { var o = scope !== undefined && scope !== null ? scope : Global; @@ -4279,13 +4279,13 @@ var inlite = (function () { var pickFile = function () { return new global$c(function (resolve) { var fileInput; - fileInput = document.createElement('input'); + fileInput = domGlobals.document.createElement('input'); fileInput.type = 'file'; fileInput.style.position = 'fixed'; fileInput.style.left = 0; fileInput.style.top = 0; fileInput.style.opacity = 0.001; - document.body.appendChild(fileInput); + domGlobals.document.body.appendChild(fileInput); fileInput.onchange = function (e) { resolve(Array.prototype.slice.call(e.target.files)); }; @@ -5029,26 +5029,26 @@ var inlite = (function () { role: 'button' }, init: function (settings) { - var self$$1 = this; + var self = this; var size; - self$$1._super(settings); - settings = self$$1.settings; - size = self$$1.settings.size; - self$$1.on('click mousedown', function (e) { + self._super(settings); + settings = self.settings; + size = self.settings.size; + self.on('click mousedown', function (e) { e.preventDefault(); }); - self$$1.on('touchstart', function (e) { - self$$1.fire('click', e); + self.on('touchstart', function (e) { + self.fire('click', e); e.preventDefault(); }); if (settings.subtype) { - self$$1.classes.add(settings.subtype); + self.classes.add(settings.subtype); } if (size) { - self$$1.classes.add('btn-' + size); + self.classes.add('btn-' + size); } if (settings.icon) { - self$$1.icon(settings.icon); + self.icon(settings.icon); } }, icon: function (icon) { @@ -5068,67 +5068,67 @@ var inlite = (function () { this._super(); }, renderHtml: function () { - var self$$1 = this, id = self$$1._id, prefix = self$$1.classPrefix; - var icon = self$$1.state.get('icon'), image; - var text = self$$1.state.get('text'); + var self = this, id = self._id, prefix = self.classPrefix; + var icon = self.state.get('icon'), image; + var text = self.state.get('text'); var textHtml = ''; var ariaPressed; - var settings = self$$1.settings; + var settings = self.settings; image = settings.image; if (image) { icon = 'none'; if (typeof image !== 'string') { - image = window.getSelection ? image[0] : image[1]; + image = domGlobals.window.getSelection ? image[0] : image[1]; } image = ' style="background-image: url(\'' + image + '\')"'; } else { image = ''; } if (text) { - self$$1.classes.add('btn-has-text'); - textHtml = '' + self$$1.encode(text) + ''; + self.classes.add('btn-has-text'); + textHtml = '' + self.encode(text) + ''; } icon = icon ? prefix + 'ico ' + prefix + 'i-' + icon : ''; ariaPressed = typeof settings.active === 'boolean' ? ' aria-pressed="' + settings.active + '"' : ''; - return '
' + '' + '
'; + return '
' + '' + '
'; }, bindStates: function () { - var self$$1 = this, $ = self$$1.$, textCls = self$$1.classPrefix + 'txt'; + var self = this, $ = self.$, textCls = self.classPrefix + 'txt'; function setButtonText(text) { - var $span = $('span.' + textCls, self$$1.getEl()); + var $span = $('span.' + textCls, self.getEl()); if (text) { if (!$span[0]) { - $('button:first', self$$1.getEl()).append(''); - $span = $('span.' + textCls, self$$1.getEl()); + $('button:first', self.getEl()).append(''); + $span = $('span.' + textCls, self.getEl()); } - $span.html(self$$1.encode(text)); + $span.html(self.encode(text)); } else { $span.remove(); } - self$$1.classes.toggle('btn-has-text', !!text); + self.classes.toggle('btn-has-text', !!text); } - self$$1.state.on('change:text', function (e) { + self.state.on('change:text', function (e) { setButtonText(e.value); }); - self$$1.state.on('change:icon', function (e) { + self.state.on('change:icon', function (e) { var icon = e.value; - var prefix = self$$1.classPrefix; - self$$1.settings.icon = icon; - icon = icon ? prefix + 'ico ' + prefix + 'i-' + self$$1.settings.icon : ''; - var btnElm = self$$1.getEl().firstChild; + var prefix = self.classPrefix; + self.settings.icon = icon; + icon = icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : ''; + var btnElm = self.getEl().firstChild; var iconElm = btnElm.getElementsByTagName('i')[0]; if (icon) { if (!iconElm || iconElm !== btnElm.firstChild) { - iconElm = document.createElement('i'); + iconElm = domGlobals.document.createElement('i'); btnElm.insertBefore(iconElm, btnElm.firstChild); } iconElm.className = icon; } else if (iconElm) { btnElm.removeChild(iconElm); } - setButtonText(self$$1.state.get('text')); + setButtonText(self.state.get('text')); }); - return self$$1._super(); + return self._super(); } }); @@ -5207,18 +5207,18 @@ var inlite = (function () { checked: false }, init: function (settings) { - var self$$1 = this; - self$$1._super(settings); - self$$1.on('click mousedown', function (e) { + var self = this; + self._super(settings); + self.on('click mousedown', function (e) { e.preventDefault(); }); - self$$1.on('click', function (e) { + self.on('click', function (e) { e.preventDefault(); - if (!self$$1.disabled()) { - self$$1.checked(!self$$1.checked()); + if (!self.disabled()) { + self.checked(!self.checked()); } }); - self$$1.checked(self$$1.settings.checked); + self.checked(self.settings.checked); }, checked: function (state) { if (!arguments.length) { @@ -5234,35 +5234,35 @@ var inlite = (function () { return this.checked(state); }, renderHtml: function () { - var self$$1 = this, id = self$$1._id, prefix = self$$1.classPrefix; - return '
' + '' + '' + self$$1.encode(self$$1.state.get('text')) + '' + '
'; + var self = this, id = self._id, prefix = self.classPrefix; + return '
' + '' + '' + self.encode(self.state.get('text')) + '' + '
'; }, bindStates: function () { - var self$$1 = this; + var self = this; function checked(state) { - self$$1.classes.toggle('checked', state); - self$$1.aria('checked', state); + self.classes.toggle('checked', state); + self.aria('checked', state); } - self$$1.state.on('change:text', function (e) { - self$$1.getEl('al').firstChild.data = self$$1.translate(e.value); + self.state.on('change:text', function (e) { + self.getEl('al').firstChild.data = self.translate(e.value); }); - self$$1.state.on('change:checked change:value', function (e) { - self$$1.fire('change'); + self.state.on('change:checked change:value', function (e) { + self.fire('change'); checked(e.value); }); - self$$1.state.on('change:icon', function (e) { + self.state.on('change:icon', function (e) { var icon = e.value; - var prefix = self$$1.classPrefix; + var prefix = self.classPrefix; if (typeof icon === 'undefined') { - return self$$1.settings.icon; + return self.settings.icon; } - self$$1.settings.icon = icon; - icon = icon ? prefix + 'ico ' + prefix + 'i-' + self$$1.settings.icon : ''; - var btnElm = self$$1.getEl().firstChild; + self.settings.icon = icon; + icon = icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : ''; + var btnElm = self.getEl().firstChild; var iconElm = btnElm.getElementsByTagName('i')[0]; if (icon) { if (!iconElm || iconElm !== btnElm.firstChild) { - iconElm = document.createElement('i'); + iconElm = domGlobals.document.createElement('i'); btnElm.insertBefore(iconElm, btnElm.firstChild); } iconElm.className = icon; @@ -5270,10 +5270,10 @@ var inlite = (function () { btnElm.removeChild(iconElm); } }); - if (self$$1.state.get('checked')) { + if (self.state.get('checked')) { checked(true); } - return self$$1._super(); + return self._super(); } }); @@ -5281,62 +5281,62 @@ var inlite = (function () { var ComboBox = Widget.extend({ init: function (settings) { - var self$$1 = this; - self$$1._super(settings); - settings = self$$1.settings; - self$$1.classes.add('combobox'); - self$$1.subinput = true; - self$$1.ariaTarget = 'inp'; + var self = this; + self._super(settings); + settings = self.settings; + self.classes.add('combobox'); + self.subinput = true; + self.ariaTarget = 'inp'; settings.menu = settings.menu || settings.values; if (settings.menu) { settings.icon = 'caret'; } - self$$1.on('click', function (e) { + self.on('click', function (e) { var elm = e.target; - var root = self$$1.getEl(); + var root = self.getEl(); if (!global$7.contains(root, elm) && elm !== root) { return; } while (elm && elm !== root) { if (elm.id && elm.id.indexOf('-open') !== -1) { - self$$1.fire('action'); + self.fire('action'); if (settings.menu) { - self$$1.showMenu(); + self.showMenu(); if (e.aria) { - self$$1.menu.items()[0].focus(); + self.menu.items()[0].focus(); } } } elm = elm.parentNode; } }); - self$$1.on('keydown', function (e) { + self.on('keydown', function (e) { var rootControl; if (e.keyCode === 13 && e.target.nodeName === 'INPUT') { e.preventDefault(); - self$$1.parents().reverse().each(function (ctrl) { + self.parents().reverse().each(function (ctrl) { if (ctrl.toJSON) { rootControl = ctrl; return false; } }); - self$$1.fire('submit', { data: rootControl.toJSON() }); + self.fire('submit', { data: rootControl.toJSON() }); } }); - self$$1.on('keyup', function (e) { + self.on('keyup', function (e) { if (e.target.nodeName === 'INPUT') { - var oldValue = self$$1.state.get('value'); + var oldValue = self.state.get('value'); var newValue = e.target.value; if (newValue !== oldValue) { - self$$1.state.set('value', newValue); - self$$1.fire('autocomplete', e); + self.state.set('value', newValue); + self.fire('autocomplete', e); } } }); - self$$1.on('mouseover', function (e) { - var tooltip = self$$1.tooltip().moveTo(-65535); - if (self$$1.statusLevel() && e.target.className.indexOf(self$$1.classPrefix + 'status') !== -1) { - var statusMessage = self$$1.statusMessage() || 'Ok'; + self.on('mouseover', function (e) { + var tooltip = self.tooltip().moveTo(-65535); + if (self.statusLevel() && e.target.className.indexOf(self.classPrefix + 'status') !== -1) { + var statusMessage = self.statusMessage() || 'Ok'; var rel = tooltip.text(statusMessage).show().testMoveRel(e.target, [ 'bc-tc', 'bc-tl', @@ -5362,10 +5362,10 @@ var inlite = (function () { return this.state.get('statusMessage'); }, showMenu: function () { - var self$$1 = this; - var settings = self$$1.settings; + var self = this; + var settings = self.settings; var menu; - if (!self$$1.menu) { + if (!self.menu) { menu = settings.menu || []; if (menu.length) { menu = { @@ -5375,32 +5375,32 @@ var inlite = (function () { } else { menu.type = menu.type || 'menu'; } - self$$1.menu = global$b.create(menu).parent(self$$1).renderTo(self$$1.getContainerElm()); - self$$1.fire('createmenu'); - self$$1.menu.reflow(); - self$$1.menu.on('cancel', function (e) { - if (e.control === self$$1.menu) { - self$$1.focus(); + self.menu = global$b.create(menu).parent(self).renderTo(self.getContainerElm()); + self.fire('createmenu'); + self.menu.reflow(); + self.menu.on('cancel', function (e) { + if (e.control === self.menu) { + self.focus(); } }); - self$$1.menu.on('show hide', function (e) { + self.menu.on('show hide', function (e) { e.control.items().each(function (ctrl) { - ctrl.active(ctrl.value() === self$$1.value()); + ctrl.active(ctrl.value() === self.value()); }); }).fire('show'); - self$$1.menu.on('select', function (e) { - self$$1.value(e.control.value()); + self.menu.on('select', function (e) { + self.value(e.control.value()); }); - self$$1.on('focusin', function (e) { + self.on('focusin', function (e) { if (e.target.tagName.toUpperCase() === 'INPUT') { - self$$1.menu.hide(); + self.menu.hide(); } }); - self$$1.aria('expanded', true); + self.aria('expanded', true); } - self$$1.menu.show(); - self$$1.menu.layoutRect({ w: self$$1.layoutRect().w }); - self$$1.menu.moveRel(self$$1.getEl(), self$$1.isRtl() ? [ + self.menu.show(); + self.menu.layoutRect({ w: self.layoutRect().w }); + self.menu.moveRel(self.getEl(), self.isRtl() ? [ 'br-tr', 'tr-br' ] : [ @@ -5412,10 +5412,10 @@ var inlite = (function () { this.getEl('inp').focus(); }, repaint: function () { - var self$$1 = this, elm = self$$1.getEl(), openElm = self$$1.getEl('open'), rect = self$$1.layoutRect(); + var self = this, elm = self.getEl(), openElm = self.getEl('open'), rect = self.layoutRect(); var width, lineHeight, innerPadding = 0; var inputElm = elm.firstChild; - if (self$$1.statusLevel() && self$$1.statusLevel() !== 'none') { + if (self.statusLevel() && self.statusLevel() !== 'none') { innerPadding = parseInt(funcs.getRuntimeStyle(inputElm, 'padding-right'), 10) - parseInt(funcs.getRuntimeStyle(inputElm, 'padding-left'), 10); } if (openElm) { @@ -5423,28 +5423,28 @@ var inlite = (function () { } else { width = rect.w - 10; } - var doc = document; + var doc = domGlobals.document; if (doc.all && (!doc.documentMode || doc.documentMode <= 8)) { - lineHeight = self$$1.layoutRect().h - 2 + 'px'; + lineHeight = self.layoutRect().h - 2 + 'px'; } global$7(inputElm).css({ width: width - innerPadding, lineHeight: lineHeight }); - self$$1._super(); - return self$$1; + self._super(); + return self; }, postRender: function () { - var self$$1 = this; + var self = this; global$7(this.getEl('inp')).on('change', function (e) { - self$$1.state.set('value', e.target.value); - self$$1.fire('change', e); + self.state.set('value', e.target.value); + self.fire('change', e); }); - return self$$1._super(); + return self._super(); }, renderHtml: function () { - var self$$1 = this, id = self$$1._id, settings = self$$1.settings, prefix = self$$1.classPrefix; - var value = self$$1.state.get('value') || ''; + var self = this, id = self._id, settings = self.settings, prefix = self.classPrefix; + var value = self.state.get('value') || ''; var icon, text, openBtnHtml = '', extraAttrs = '', statusHtml = ''; if ('spellcheck' in settings) { extraAttrs += ' spellcheck="' + settings.spellcheck + '"'; @@ -5459,19 +5459,19 @@ var inlite = (function () { extraAttrs += ' type="' + settings.subtype + '"'; } statusHtml = ''; - if (self$$1.disabled()) { + if (self.disabled()) { extraAttrs += ' disabled="disabled"'; } icon = settings.icon; if (icon && icon !== 'caret') { icon = prefix + 'ico ' + prefix + 'i-' + settings.icon; } - text = self$$1.state.get('text'); + text = self.state.get('text'); if (icon || text) { openBtnHtml = '
' + '' + '
'; - self$$1.classes.add('has-open'); + self.classes.add('has-open'); } - return '
' + '' + statusHtml + openBtnHtml + '
'; + return '
' + '' + statusHtml + openBtnHtml + '
'; }, value: function (value) { if (arguments.length) { @@ -5484,30 +5484,30 @@ var inlite = (function () { return this.state.get('value'); }, showAutoComplete: function (items, term) { - var self$$1 = this; + var self = this; if (items.length === 0) { - self$$1.hideMenu(); + self.hideMenu(); return; } var insert = function (value, title) { return function () { - self$$1.fire('selectitem', { + self.fire('selectitem', { title: title, value: value }); }; }; - if (self$$1.menu) { - self$$1.menu.items().remove(); + if (self.menu) { + self.menu.items().remove(); } else { - self$$1.menu = global$b.create({ + self.menu = global$b.create({ type: 'menu', classes: 'combobox-menu', layout: 'flow' - }).parent(self$$1).renderTo(); + }).parent(self).renderTo(); } global$4.each(items, function (item) { - self$$1.menu.add({ + self.menu.add({ text: item.title, url: item.previewUrl, match: term, @@ -5515,28 +5515,28 @@ var inlite = (function () { onclick: insert(item.value, item.title) }); }); - self$$1.menu.renderNew(); - self$$1.hideMenu(); - self$$1.menu.on('cancel', function (e) { - if (e.control.parent() === self$$1.menu) { + self.menu.renderNew(); + self.hideMenu(); + self.menu.on('cancel', function (e) { + if (e.control.parent() === self.menu) { e.stopPropagation(); - self$$1.focus(); - self$$1.hideMenu(); + self.focus(); + self.hideMenu(); } }); - self$$1.menu.on('select', function () { - self$$1.focus(); + self.menu.on('select', function () { + self.focus(); }); - var maxW = self$$1.layoutRect().w; - self$$1.menu.layoutRect({ + var maxW = self.layoutRect().w; + self.menu.layoutRect({ w: maxW, minW: 0, maxW: maxW }); - self$$1.menu.repaint(); - self$$1.menu.reflow(); - self$$1.menu.show(); - self$$1.menu.moveRel(self$$1.getEl(), self$$1.isRtl() ? [ + self.menu.repaint(); + self.menu.reflow(); + self.menu.show(); + self.menu.moveRel(self.getEl(), self.isRtl() ? [ 'br-tr', 'tr-br' ] : [ @@ -5550,32 +5550,32 @@ var inlite = (function () { } }, bindStates: function () { - var self$$1 = this; - self$$1.state.on('change:value', function (e) { - if (self$$1.getEl('inp').value !== e.value) { - self$$1.getEl('inp').value = e.value; + var self = this; + self.state.on('change:value', function (e) { + if (self.getEl('inp').value !== e.value) { + self.getEl('inp').value = e.value; } }); - self$$1.state.on('change:disabled', function (e) { - self$$1.getEl('inp').disabled = e.value; + self.state.on('change:disabled', function (e) { + self.getEl('inp').disabled = e.value; }); - self$$1.state.on('change:statusLevel', function (e) { - var statusIconElm = self$$1.getEl('status'); - var prefix = self$$1.classPrefix, value = e.value; + self.state.on('change:statusLevel', function (e) { + var statusIconElm = self.getEl('status'); + var prefix = self.classPrefix, value = e.value; funcs.css(statusIconElm, 'display', value === 'none' ? 'none' : ''); funcs.toggleClass(statusIconElm, prefix + 'i-checkmark', value === 'ok'); funcs.toggleClass(statusIconElm, prefix + 'i-warning', value === 'warn'); funcs.toggleClass(statusIconElm, prefix + 'i-error', value === 'error'); - self$$1.classes.toggle('has-status', value !== 'none'); - self$$1.repaint(); + self.classes.toggle('has-status', value !== 'none'); + self.repaint(); }); - funcs.on(self$$1.getEl('status'), 'mouseleave', function () { - self$$1.tooltip().hide(); + funcs.on(self.getEl('status'), 'mouseleave', function () { + self.tooltip().hide(); }); - self$$1.on('cancel', function (e) { - if (self$$1.menu && self$$1.menu.visible()) { + self.on('cancel', function (e) { + if (self.menu && self.menu.visible()) { e.stopPropagation(); - self$$1.hideMenu(); + self.hideMenu(); } }); var focusIdx = function (idx, menu) { @@ -5583,20 +5583,20 @@ var inlite = (function () { menu.items().eq(idx)[0].focus(); } }; - self$$1.on('keydown', function (e) { + self.on('keydown', function (e) { var keyCode = e.keyCode; if (e.target.nodeName === 'INPUT') { if (keyCode === global$f.DOWN) { e.preventDefault(); - self$$1.fire('autocomplete'); - focusIdx(0, self$$1.menu); + self.fire('autocomplete'); + focusIdx(0, self.menu); } else if (keyCode === global$f.UP) { e.preventDefault(); - focusIdx(-1, self$$1.menu); + focusIdx(-1, self.menu); } } }); - return self$$1._super(); + return self._super(); }, remove: function () { global$7(this.getEl('inp')).off(); @@ -6207,35 +6207,36 @@ var inlite = (function () { }; var fromHtml = function (html, scope) { - var doc = scope || document; + var doc = scope || domGlobals.document; var div = doc.createElement('div'); div.innerHTML = html; if (!div.hasChildNodes() || div.childNodes.length > 1) { - console.error('HTML does not have a single root node', html); - throw 'HTML must have a single root node'; + domGlobals.console.error('HTML does not have a single root node', html); + throw new Error('HTML must have a single root node'); } return fromDom(div.childNodes[0]); }; var fromTag = function (tag, scope) { - var doc = scope || document; + var doc = scope || domGlobals.document; var node = doc.createElement(tag); return fromDom(node); }; var fromText = function (text, scope) { - var doc = scope || document; + var doc = scope || domGlobals.document; var node = doc.createTextNode(text); return fromDom(node); }; var fromDom = function (node) { - if (node === null || node === undefined) + if (node === null || node === undefined) { throw new Error('Node cannot be null or undefined'); + } return { dom: constant(node) }; }; var fromPoint = function (docElm, x, y) { var doc = docElm.dom(); return Option.from(doc.elementFromPoint(x, y)).map(fromDom); }; - var Element$$1 = { + var Element = { fromHtml: fromHtml, fromTag: fromTag, fromText: fromText, @@ -6259,18 +6260,18 @@ var inlite = (function () { }; }; - var ATTRIBUTE = Node.ATTRIBUTE_NODE; - var CDATA_SECTION = Node.CDATA_SECTION_NODE; - var COMMENT = Node.COMMENT_NODE; - var DOCUMENT = Node.DOCUMENT_NODE; - var DOCUMENT_TYPE = Node.DOCUMENT_TYPE_NODE; - var DOCUMENT_FRAGMENT = Node.DOCUMENT_FRAGMENT_NODE; - var ELEMENT = Node.ELEMENT_NODE; - var TEXT = Node.TEXT_NODE; - var PROCESSING_INSTRUCTION = Node.PROCESSING_INSTRUCTION_NODE; - var ENTITY_REFERENCE = Node.ENTITY_REFERENCE_NODE; - var ENTITY = Node.ENTITY_NODE; - var NOTATION = Node.NOTATION_NODE; + var ATTRIBUTE = domGlobals.Node.ATTRIBUTE_NODE; + var CDATA_SECTION = domGlobals.Node.CDATA_SECTION_NODE; + var COMMENT = domGlobals.Node.COMMENT_NODE; + var DOCUMENT = domGlobals.Node.DOCUMENT_NODE; + var DOCUMENT_TYPE = domGlobals.Node.DOCUMENT_TYPE_NODE; + var DOCUMENT_FRAGMENT = domGlobals.Node.DOCUMENT_FRAGMENT_NODE; + var ELEMENT = domGlobals.Node.ELEMENT_NODE; + var TEXT = domGlobals.Node.TEXT_NODE; + var PROCESSING_INSTRUCTION = domGlobals.Node.PROCESSING_INSTRUCTION_NODE; + var ENTITY_REFERENCE = domGlobals.Node.ENTITY_REFERENCE_NODE; + var ENTITY = domGlobals.Node.ENTITY_NODE; + var NOTATION = domGlobals.Node.NOTATION_NODE; var Immutable = function () { var fields = []; @@ -6306,7 +6307,7 @@ var inlite = (function () { var documentPositionContainedBy = function (a, b) { return compareDocumentPosition(a, b, node().DOCUMENT_POSITION_CONTAINED_BY); }; - var Node$1 = { + var Node = { documentPositionPreceding: documentPositionPreceding, documentPositionContainedBy: documentPositionContainedBy }; @@ -6319,7 +6320,7 @@ var inlite = (function () { } return undefined; }; - var find$2 = function (regexes, agent) { + var find$1 = function (regexes, agent) { var r = firstMatch(regexes, agent); if (!r) return { @@ -6335,7 +6336,7 @@ var inlite = (function () { var cleanedAgent = String(agent).toLowerCase(); if (versionRegexes.length === 0) return unknown(); - return find$2(versionRegexes, cleanedAgent); + return find$1(versionRegexes, cleanedAgent); }; var unknown = function () { return nu(0, 0); @@ -6489,14 +6490,14 @@ var inlite = (function () { detectOs: detectOs }; - var contains$1 = function (str, substr) { + var contains = function (str, substr) { return str.indexOf(substr) !== -1; }; var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/; var checkContains = function (target) { return function (uastring) { - return contains$1(uastring, target); + return contains(uastring, target); }; }; var browsers = [ @@ -6504,7 +6505,7 @@ var inlite = (function () { name: 'Edge', versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/], search: function (uastring) { - var monstrosity = contains$1(uastring, 'edge/') && contains$1(uastring, 'chrome') && contains$1(uastring, 'safari') && contains$1(uastring, 'applewebkit'); + var monstrosity = contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit'); return monstrosity; } }, @@ -6515,7 +6516,7 @@ var inlite = (function () { normalVersionRegex ], search: function (uastring) { - return contains$1(uastring, 'chrome') && !contains$1(uastring, 'chromeframe'); + return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe'); } }, { @@ -6525,7 +6526,7 @@ var inlite = (function () { /.*?rv:([0-9]+)\.([0-9]+).*/ ], search: function (uastring) { - return contains$1(uastring, 'msie') || contains$1(uastring, 'trident'); + return contains(uastring, 'msie') || contains(uastring, 'trident'); } }, { @@ -6548,7 +6549,7 @@ var inlite = (function () { /.*?cpu os ([0-9]+)_([0-9]+).*/ ], search: function (uastring) { - return (contains$1(uastring, 'safari') || contains$1(uastring, 'mobile/')) && contains$1(uastring, 'applewebkit'); + return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit'); } } ]; @@ -6561,7 +6562,7 @@ var inlite = (function () { { name: 'iOS', search: function (uastring) { - return contains$1(uastring, 'iphone') || contains$1(uastring, 'ipad'); + return contains(uastring, 'iphone') || contains(uastring, 'ipad'); }, versionRegexes: [ /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, @@ -6615,7 +6616,7 @@ var inlite = (function () { var PlatformDetection = { detect: detect$2 }; var detect$3 = cached(function () { - var userAgent = navigator.userAgent; + var userAgent = domGlobals.navigator.userAgent; return PlatformDetection.detect(userAgent); }); var PlatformDetection$1 = { detect: detect$3 }; @@ -6626,31 +6627,32 @@ var inlite = (function () { return dom.nodeType !== ELEMENT$1 && dom.nodeType !== DOCUMENT$1 || dom.childElementCount === 0; }; var all = function (selector, scope) { - var base = scope === undefined ? document : scope.dom(); - return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), Element$$1.fromDom); + var base = scope === undefined ? domGlobals.document : scope.dom(); + return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), Element.fromDom); }; var one = function (selector, scope) { - var base = scope === undefined ? document : scope.dom(); - return bypassSelector(base) ? Option.none() : Option.from(base.querySelector(selector)).map(Element$$1.fromDom); + var base = scope === undefined ? domGlobals.document : scope.dom(); + return bypassSelector(base) ? Option.none() : Option.from(base.querySelector(selector)).map(Element.fromDom); }; var regularContains = function (e1, e2) { - var d1 = e1.dom(), d2 = e2.dom(); + var d1 = e1.dom(); + var d2 = e2.dom(); return d1 === d2 ? false : d1.contains(d2); }; var ieContains = function (e1, e2) { - return Node$1.documentPositionContainedBy(e1.dom(), e2.dom()); + return Node.documentPositionContainedBy(e1.dom(), e2.dom()); }; var browser = PlatformDetection$1.detect().browser; - var contains$2 = browser.isIE() ? ieContains : regularContains; + var contains$1 = browser.isIE() ? ieContains : regularContains; var spot = Immutable('element', 'offset'); - var descendants$1 = function (scope, selector) { + var descendants = function (scope, selector) { return all(selector, scope); }; - var trim$1 = global$4.trim; + var trim = global$4.trim; var hasContentEditableState = function (value) { return function (node) { if (node && node.nodeType === 1) { @@ -6685,7 +6687,7 @@ var inlite = (function () { return false; }; var select = function (selector, root) { - return map(descendants$1(Element$$1.fromDom(root), selector), function (element) { + return map(descendants(Element.fromDom(root), selector), function (element) { return element.dom(); }); }; @@ -6736,13 +6738,13 @@ var inlite = (function () { return elms; }; var hasTitle = function (target) { - return trim$1(target.title).length > 0; + return trim(target.title).length > 0; }; - var find$3 = function (elm) { + var find$2 = function (elm) { var elms = getTargetElements(elm); return filter(getHeaderTargets(elms).concat(getAnchorTargets(elms)), hasTitle); }; - var LinkTargets = { find: find$3 }; + var LinkTargets = { find: find$2 }; var getActiveEditor = function () { return window.tinymce ? window.tinymce.activeEditor : global$5.activeEditor; @@ -7188,7 +7190,7 @@ var inlite = (function () { } }); - var descendant$1 = function (scope, selector) { + var descendant = function (scope, selector) { return one(selector, scope); }; @@ -8131,7 +8133,7 @@ var inlite = (function () { }; var setupUiContainer = function (editor) { if (editor.settings.ui_container) { - global$1.container = descendant$1(Element$$1.fromDom(document.body), editor.settings.ui_container).fold(constant(null), function (elm) { + global$1.container = descendant(Element.fromDom(domGlobals.document.body), editor.settings.ui_container).fold(constant(null), function (elm) { return elm.dom(); }); } @@ -8468,9 +8470,9 @@ var inlite = (function () { } }); - function isChildOf$1(node, parent$$1) { + function isChildOf$1(node, parent) { while (node) { - if (parent$$1 === node) { + if (parent === node) { return true; } node = node.parentNode; @@ -8479,26 +8481,26 @@ var inlite = (function () { } var MenuButton = Button.extend({ init: function (settings) { - var self$$1 = this; - self$$1._renderOpen = true; - self$$1._super(settings); - settings = self$$1.settings; - self$$1.classes.add('menubtn'); + var self = this; + self._renderOpen = true; + self._super(settings); + settings = self.settings; + self.classes.add('menubtn'); if (settings.fixedWidth) { - self$$1.classes.add('fixed-width'); + self.classes.add('fixed-width'); } - self$$1.aria('haspopup', true); - self$$1.state.set('menu', settings.menu || self$$1.render()); + self.aria('haspopup', true); + self.state.set('menu', settings.menu || self.render()); }, showMenu: function (toggle) { - var self$$1 = this; + var self = this; var menu; - if (self$$1.menu && self$$1.menu.visible() && toggle !== false) { - return self$$1.hideMenu(); + if (self.menu && self.menu.visible() && toggle !== false) { + return self.hideMenu(); } - if (!self$$1.menu) { - menu = self$$1.state.get('menu') || []; - self$$1.classes.add('opened'); + if (!self.menu) { + menu = self.state.get('menu') || []; + self.classes.add('opened'); if (menu.length) { menu = { type: 'menu', @@ -8510,104 +8512,104 @@ var inlite = (function () { menu.animate = true; } if (!menu.renderTo) { - self$$1.menu = global$b.create(menu).parent(self$$1).renderTo(); + self.menu = global$b.create(menu).parent(self).renderTo(); } else { - self$$1.menu = menu.parent(self$$1).show().renderTo(); + self.menu = menu.parent(self).show().renderTo(); } - self$$1.fire('createmenu'); - self$$1.menu.reflow(); - self$$1.menu.on('cancel', function (e) { - if (e.control.parent() === self$$1.menu) { + self.fire('createmenu'); + self.menu.reflow(); + self.menu.on('cancel', function (e) { + if (e.control.parent() === self.menu) { e.stopPropagation(); - self$$1.focus(); - self$$1.hideMenu(); + self.focus(); + self.hideMenu(); } }); - self$$1.menu.on('select', function () { - self$$1.focus(); + self.menu.on('select', function () { + self.focus(); }); - self$$1.menu.on('show hide', function (e) { - if (e.type === 'hide' && e.control.parent() === self$$1) { - self$$1.classes.remove('opened-under'); + self.menu.on('show hide', function (e) { + if (e.type === 'hide' && e.control.parent() === self) { + self.classes.remove('opened-under'); } - if (e.control === self$$1.menu) { - self$$1.activeMenu(e.type === 'show'); - self$$1.classes.toggle('opened', e.type === 'show'); + if (e.control === self.menu) { + self.activeMenu(e.type === 'show'); + self.classes.toggle('opened', e.type === 'show'); } - self$$1.aria('expanded', e.type === 'show'); + self.aria('expanded', e.type === 'show'); }).fire('show'); } - self$$1.menu.show(); - self$$1.menu.layoutRect({ w: self$$1.layoutRect().w }); - self$$1.menu.repaint(); - self$$1.menu.moveRel(self$$1.getEl(), self$$1.isRtl() ? [ + self.menu.show(); + self.menu.layoutRect({ w: self.layoutRect().w }); + self.menu.repaint(); + self.menu.moveRel(self.getEl(), self.isRtl() ? [ 'br-tr', 'tr-br' ] : [ 'bl-tl', 'tl-bl' ]); - var menuLayoutRect = self$$1.menu.layoutRect(); - var selfBottom = self$$1.$el.offset().top + self$$1.layoutRect().h; + var menuLayoutRect = self.menu.layoutRect(); + var selfBottom = self.$el.offset().top + self.layoutRect().h; if (selfBottom > menuLayoutRect.y && selfBottom < menuLayoutRect.y + menuLayoutRect.h) { - self$$1.classes.add('opened-under'); + self.classes.add('opened-under'); } - self$$1.fire('showmenu'); + self.fire('showmenu'); }, hideMenu: function () { - var self$$1 = this; - if (self$$1.menu) { - self$$1.menu.items().each(function (item) { + var self = this; + if (self.menu) { + self.menu.items().each(function (item) { if (item.hideMenu) { item.hideMenu(); } }); - self$$1.menu.hide(); + self.menu.hide(); } }, activeMenu: function (state) { this.classes.toggle('active', state); }, renderHtml: function () { - var self$$1 = this, id = self$$1._id, prefix = self$$1.classPrefix; - var icon = self$$1.settings.icon, image; - var text = self$$1.state.get('text'); + var self = this, id = self._id, prefix = self.classPrefix; + var icon = self.settings.icon, image; + var text = self.state.get('text'); var textHtml = ''; - image = self$$1.settings.image; + image = self.settings.image; if (image) { icon = 'none'; if (typeof image !== 'string') { - image = window.getSelection ? image[0] : image[1]; + image = domGlobals.window.getSelection ? image[0] : image[1]; } image = ' style="background-image: url(\'' + image + '\')"'; } else { image = ''; } if (text) { - self$$1.classes.add('btn-has-text'); - textHtml = '' + self$$1.encode(text) + ''; + self.classes.add('btn-has-text'); + textHtml = '' + self.encode(text) + ''; } - icon = self$$1.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : ''; - self$$1.aria('role', self$$1.parent() instanceof MenuBar ? 'menuitem' : 'button'); - return '
' + '' + '
'; + icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : ''; + self.aria('role', self.parent() instanceof MenuBar ? 'menuitem' : 'button'); + return '
' + '' + '
'; }, postRender: function () { - var self$$1 = this; - self$$1.on('click', function (e) { - if (e.control === self$$1 && isChildOf$1(e.target, self$$1.getEl())) { - self$$1.focus(); - self$$1.showMenu(!e.aria); + var self = this; + self.on('click', function (e) { + if (e.control === self && isChildOf$1(e.target, self.getEl())) { + self.focus(); + self.showMenu(!e.aria); if (e.aria) { - self$$1.menu.items().filter(':visible')[0].focus(); + self.menu.items().filter(':visible')[0].focus(); } } }); - self$$1.on('mouseenter', function (e) { + self.on('mouseenter', function (e) { var overCtrl = e.control; - var parent$$1 = self$$1.parent(); + var parent = self.parent(); var hasVisibleSiblingMenu; - if (overCtrl && parent$$1 && overCtrl instanceof MenuButton && overCtrl.parent() === parent$$1) { - parent$$1.items().filter('MenuButton').each(function (ctrl) { + if (overCtrl && parent && overCtrl instanceof MenuButton && overCtrl.parent() === parent) { + parent.items().filter('MenuButton').each(function (ctrl) { if (ctrl.hideMenu && ctrl !== overCtrl) { if (ctrl.menu && ctrl.menu.visible()) { hasVisibleSiblingMenu = true; @@ -8621,17 +8623,17 @@ var inlite = (function () { } } }); - return self$$1._super(); + return self._super(); }, bindStates: function () { - var self$$1 = this; - self$$1.state.on('change:menu', function () { - if (self$$1.menu) { - self$$1.menu.remove(); + var self = this; + self.state.on('change:menu', function () { + if (self.menu) { + self.menu.remove(); } - self$$1.menu = null; + self.menu = null; }); - return self$$1._super(); + return self._super(); }, remove: function () { this._super(); @@ -9422,11 +9424,11 @@ var inlite = (function () { role: 'button' }, repaint: function () { - var self$$1 = this; - var elm = self$$1.getEl(); - var rect = self$$1.layoutRect(); + var self = this; + var elm = self.getEl(); + var rect = self.layoutRect(); var mainButtonElm, menuButtonElm; - self$$1._super(); + self._super(); mainButtonElm = elm.firstChild; menuButtonElm = elm.lastChild; global$7(mainButtonElm).css({ @@ -9434,26 +9436,26 @@ var inlite = (function () { height: rect.h - 2 }); global$7(menuButtonElm).css({ height: rect.h - 2 }); - return self$$1; + return self; }, activeMenu: function (state) { - var self$$1 = this; - global$7(self$$1.getEl().lastChild).toggleClass(self$$1.classPrefix + 'active', state); + var self = this; + global$7(self.getEl().lastChild).toggleClass(self.classPrefix + 'active', state); }, renderHtml: function () { - var self$$1 = this; - var id = self$$1._id; - var prefix = self$$1.classPrefix; + var self = this; + var id = self._id; + var prefix = self.classPrefix; var image; - var icon = self$$1.state.get('icon'); - var text = self$$1.state.get('text'); - var settings = self$$1.settings; + var icon = self.state.get('icon'); + var text = self.state.get('text'); + var settings = self.settings; var textHtml = '', ariaPressed; image = settings.image; if (image) { icon = 'none'; if (typeof image !== 'string') { - image = window.getSelection ? image[0] : image[1]; + image = domGlobals.window.getSelection ? image[0] : image[1]; } image = ' style="background-image: url(\'' + image + '\')"'; } else { @@ -9461,15 +9463,15 @@ var inlite = (function () { } icon = settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : ''; if (text) { - self$$1.classes.add('btn-has-text'); - textHtml = '' + self$$1.encode(text) + ''; + self.classes.add('btn-has-text'); + textHtml = '' + self.encode(text) + ''; } ariaPressed = typeof settings.active === 'boolean' ? ' aria-pressed="' + settings.active + '"' : ''; - return '
' + '' + '' + '
'; + return '
' + '' + '' + '
'; }, postRender: function () { - var self$$1 = this, onClickHandler = self$$1.settings.onclick; - self$$1.on('click', function (e) { + var self = this, onClickHandler = self.settings.onclick; + self.on('click', function (e) { var node = e.target; if (e.control === this) { while (node) { @@ -9484,8 +9486,8 @@ var inlite = (function () { } } }); - delete self$$1.settings.onclick; - return self$$1._super(); + delete self.settings.onclick; + return self._super(); } }); @@ -9590,43 +9592,43 @@ var inlite = (function () { var TextBox = Widget.extend({ init: function (settings) { - var self$$1 = this; - self$$1._super(settings); - self$$1.classes.add('textbox'); + var self = this; + self._super(settings); + self.classes.add('textbox'); if (settings.multiline) { - self$$1.classes.add('multiline'); + self.classes.add('multiline'); } else { - self$$1.on('keydown', function (e) { + self.on('keydown', function (e) { var rootControl; if (e.keyCode === 13) { e.preventDefault(); - self$$1.parents().reverse().each(function (ctrl) { + self.parents().reverse().each(function (ctrl) { if (ctrl.toJSON) { rootControl = ctrl; return false; } }); - self$$1.fire('submit', { data: rootControl.toJSON() }); + self.fire('submit', { data: rootControl.toJSON() }); } }); - self$$1.on('keyup', function (e) { - self$$1.state.set('value', e.target.value); + self.on('keyup', function (e) { + self.state.set('value', e.target.value); }); } }, repaint: function () { - var self$$1 = this; + var self = this; var style, rect, borderBox, borderW, borderH = 0, lastRepaintRect; - style = self$$1.getEl().style; - rect = self$$1._layoutRect; - lastRepaintRect = self$$1._lastRepaintRect || {}; - var doc = document; - if (!self$$1.settings.multiline && doc.all && (!doc.documentMode || doc.documentMode <= 8)) { + style = self.getEl().style; + rect = self._layoutRect; + lastRepaintRect = self._lastRepaintRect || {}; + var doc = domGlobals.document; + if (!self.settings.multiline && doc.all && (!doc.documentMode || doc.documentMode <= 8)) { style.lineHeight = rect.h - borderH + 'px'; } - borderBox = self$$1.borderBox; + borderBox = self.borderBox; borderW = borderBox.left + borderBox.right + 8; - borderH = borderBox.top + borderBox.bottom + (self$$1.settings.multiline ? 8 : 0); + borderH = borderBox.top + borderBox.bottom + (self.settings.multiline ? 8 : 0); if (rect.x !== lastRepaintRect.x) { style.left = rect.x + 'px'; lastRepaintRect.x = rect.x; @@ -9643,16 +9645,16 @@ var inlite = (function () { style.height = rect.h - borderH + 'px'; lastRepaintRect.h = rect.h; } - self$$1._lastRepaintRect = lastRepaintRect; - self$$1.fire('repaint', {}, false); - return self$$1; + self._lastRepaintRect = lastRepaintRect; + self.fire('repaint', {}, false); + return self; }, renderHtml: function () { - var self$$1 = this; - var settings = self$$1.settings; + var self = this; + var settings = self.settings; var attrs, elm; attrs = { - id: self$$1._id, + id: self._id, hidefocus: '1' }; global$4.each([ @@ -9669,18 +9671,18 @@ var inlite = (function () { 'placeholder', 'required', 'multiple' - ], function (name$$1) { - attrs[name$$1] = settings[name$$1]; + ], function (name) { + attrs[name] = settings[name]; }); - if (self$$1.disabled()) { + if (self.disabled()) { attrs.disabled = 'disabled'; } if (settings.subtype) { attrs.type = settings.subtype; } elm = funcs.create(settings.multiline ? 'textarea' : 'input', attrs); - elm.value = self$$1.state.get('value'); - elm.className = self$$1.classes.toString(); + elm.value = self.state.get('value'); + elm.className = self.classes.toString(); return elm.outerHTML; }, value: function (value) { @@ -9694,25 +9696,25 @@ var inlite = (function () { return this.state.get('value'); }, postRender: function () { - var self$$1 = this; - self$$1.getEl().value = self$$1.state.get('value'); - self$$1._super(); - self$$1.$el.on('change', function (e) { - self$$1.state.set('value', e.target.value); - self$$1.fire('change', e); + var self = this; + self.getEl().value = self.state.get('value'); + self._super(); + self.$el.on('change', function (e) { + self.state.set('value', e.target.value); + self.fire('change', e); }); }, bindStates: function () { - var self$$1 = this; - self$$1.state.on('change:value', function (e) { - if (self$$1.getEl().value !== e.value) { - self$$1.getEl().value = e.value; + var self = this; + self.state.on('change:value', function (e) { + if (self.getEl().value !== e.value) { + self.getEl().value = e.value; } }); - self$$1.state.on('change:disabled', function (e) { - self$$1.getEl().disabled = e.value; + self.state.on('change:disabled', function (e) { + self.getEl().disabled = e.value; }); - return self$$1._super(); + return self._super(); }, remove: function () { this.$el.off(); @@ -9735,7 +9737,7 @@ var inlite = (function () { Movable: Movable, Resizable: Resizable, FloatPanel: FloatPanel, - Window: Window$$1, + Window: Window, MessageBox: MessageBox, Tooltip: Tooltip, Widget: Widget, @@ -9817,5 +9819,5 @@ var inlite = (function () { return Theme; -}()); +}(window)); })(); diff --git a/src/js/_enqueues/vendor/tinymce/themes/inlite/theme.min.js b/src/js/_enqueues/vendor/tinymce/themes/inlite/theme.min.js index 4c56c7a1b3..c47f21d157 100644 --- a/src/js/_enqueues/vendor/tinymce/themes/inlite/theme.min.js +++ b/src/js/_enqueues/vendor/tinymce/themes/inlite/theme.min.js @@ -1 +1 @@ -!function(){"use strict";var u,t,e,n,i,r,o=tinymce.util.Tools.resolve("tinymce.ThemeManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),v=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.util.Delay"),s=function(t){return t.reduce(function(t,e){return Array.isArray(e)?t.concat(s(e)):t.concat(e)},[])},a={flatten:s},l=function(t,e){for(var n=0;n+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,Ut=/^\s*|\s*$/g,Vt=Nt.extend({init:function(t){var o=this.match;function s(t,e,n){var i;function r(t){t&&e.push(t)}return r(function(e){if(e)return e=e.toLowerCase(),function(t){return"*"===e||t.type===e}}((i=zt.exec(t.replace(Ut,"")))[1])),r(function(e){if(e)return function(t){return t._name===e}}(i[2])),r(function(n){if(n)return n=n.split("."),function(t){for(var e=n.length;e--;)if(!t.classes.contains(n[e]))return!1;return!0}}(i[3])),r(function(n,i,r){if(n)return function(t){var e=t[n]?t[n]():"";return i?"="===i?e===r:"*="===i?0<=e.indexOf(r):"~="===i?0<=(" "+e+" ").indexOf(" "+r+" "):"!="===i?e!==r:"^="===i?0===e.indexOf(r):"$="===i&&e.substr(e.length-r.length)===r:!!r}}(i[4],i[5],i[6])),r(function(i){var e;if(i)return(i=/(?:not\((.+)\))|(.+)/i.exec(i))[1]?(e=a(i[1],[]),function(t){return!o(t,e)}):(i=i[2],function(t,e,n){return"first"===i?0===e:"last"===i?e===n-1:"even"===i?e%2==0:"odd"===i?e%2==1:!!t[i]&&t[i]()})}(i[7])),e.pseudo=!!i[7],e.direct=n,e}function a(t,e){var n,i,r,o=[];do{if(Ft.exec(""),(i=Ft.exec(t))&&(t=i[3],o.push(i[1]),i[2])){n=i[3];break}}while(i);for(n&&a(n,e),t=[],r=0;r"!==o[r]&&t.push(s(o[r],[],">"===o[r-1]));return e.push(t),e}this._selectors=a(t,[])},match:function(t,e){var n,i,r,o,s,a,l,u,c,d,f,h,m;for(n=0,i=(e=e||this._selectors).length;na.maxW?a.maxW:n,a.w=n,a.innerW=n-i),(n=t.h)!==undefined&&(n=(n=na.maxH?a.maxH:n,a.h=n,a.innerH=n-r),(n=t.innerW)!==undefined&&(n=(n=na.maxW-i?a.maxW-i:n,a.innerW=n,a.w=n+i),(n=t.innerH)!==undefined&&(n=(n=na.maxH-r?a.maxH-r:n,a.innerH=n,a.h=n+r),t.contentW!==undefined&&(a.contentW=t.contentW),t.contentH!==undefined&&(a.contentH=t.contentH),(e=s._lastLayoutRect).x===a.x&&e.y===a.y&&e.w===a.w&&e.h===a.h||((o=Kt.repaintControls)&&o.map&&!o.map[s._id]&&(o.push(s),o.map[s._id]=!0),e.x=a.x,e.y=a.y,e.w=a.w,e.h=a.h),s):a},repaint:function(){var t,e,n,i,r,o,s,a,l,u,c=this;l=document.createRange?function(t){return t}:Math.round,t=c.getEl().style,i=c._layoutRect,a=c._lastRepaintRect||{},o=(r=c.borderBox).left+r.right,s=r.top+r.bottom,i.x!==a.x&&(t.left=l(i.x)+"px",a.x=i.x),i.y!==a.y&&(t.top=l(i.y)+"px",a.y=i.y),i.w!==a.w&&(u=l(i.w-o),t.width=(0<=u?u:0)+"px",a.w=i.w),i.h!==a.h&&(u=l(i.h-s),t.height=(0<=u?u:0)+"px",a.h=i.h),c._hasBody&&i.innerW!==a.innerW&&(u=l(i.innerW),(n=c.getEl("body"))&&((e=n.style).width=(0<=u?u:0)+"px"),a.innerW=i.innerW),c._hasBody&&i.innerH!==a.innerH&&(u=l(i.innerH),(n=n||c.getEl("body"))&&((e=e||n.style).height=(0<=u?u:0)+"px"),a.innerH=i.innerH),c._lastRepaintRect=a,c.fire("repaint",{},!1)},updateLayoutRect:function(){var t=this;t.parent()._lastRect=null,St.css(t.getEl(),{width:"",height:""}),t._layoutRect=t._lastRepaintRect=t._lastLayoutRect=null,t.initLayoutRect()},on:function(t,e){var n,i,r,o=this;return ae(o).on(t,"string"!=typeof(n=e)?n:function(t){return i||o.parentsAndSelf().each(function(t){var e=t.settings.callbacks;if(e&&(i=e[n]))return r=t,!1}),i?i.call(r,t):(t.action=n,void this.fire("execute",t))}),o},off:function(t,e){return ae(this).off(t,e),this},fire:function(t,e,n){if((e=e||{}).control||(e.control=this),e=ae(this).fire(t,e),!1!==n&&this.parent)for(var i=this.parent();i&&!e.isPropagationStopped();)i.fire(t,e,!1),i=i.parent();return e},hasEventListeners:function(t){return ae(this).has(t)},parents:function(t){var e,n=new $t;for(e=this.parent();e;e=e.parent())n.add(e);return t&&(n=n.filter(t)),n},parentsAndSelf:function(t){return new $t(this).add(this.parents(t))},next:function(){var t=this.parent().items();return t[t.indexOf(this)+1]},prev:function(){var t=this.parent().items();return t[t.indexOf(this)-1]},innerHtml:function(t){return this.$el.html(t),this},getEl:function(t){var e=t?this._id+"-"+t:this._id;return this._elmCache[e]||(this._elmCache[e]=Mt("#"+e)[0]),this._elmCache[e]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(t){}return this},blur:function(){return this.getEl().blur(),this},aria:function(t,e){var n=this,i=n.getEl(n.ariaTarget);return void 0===e?n._aria[t]:(n._aria[t]=e,n.state.get("rendered")&&i.setAttribute("role"===t?t:"aria-"+t,e),n)},encode:function(t,e){return!1!==e&&(t=this.translate(t)),(t||"").replace(/[&<>"]/g,function(t){return"&#"+t.charCodeAt(0)+";"})},translate:function(t){return Kt.translate?Kt.translate(t):t},before:function(t){var e=this.parent();return e&&e.insert(t,e.items().indexOf(this),!0),this},after:function(t){var e=this.parent();return e&&e.insert(t,e.items().indexOf(this)),this},remove:function(){var e,t,n=this,i=n.getEl(),r=n.parent();if(n.items){var o=n.items().toArray();for(t=o.length;t--;)o[t].remove()}r&&r.items&&(e=[],r.items().each(function(t){t!==n&&e.push(t)}),r.items().set(e),r._lastRect=null),n._eventsRoot&&n._eventsRoot===n&&Mt(i).off();var s=n.getRoot().controlIdLookup;return s&&delete s[n._id],i&&i.parentNode&&i.parentNode.removeChild(i),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(t){return Mt(t).before(this.renderHtml()),this.postRender(),this},renderTo:function(t){return Mt(t||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'
'},postRender:function(){var t,e,n,i,r,o=this,s=o.settings;for(i in o.$el=Mt(o.getEl()),o.state.set("rendered",!0),s)0===i.indexOf("on")&&o.on(i.substr(2),s[i]);if(o._eventsRoot){for(n=o.parent();!r&&n;n=n.parent())r=n._eventsRoot;if(r)for(i in r._nativeEvents)o._nativeEvents[i]=!0}le(o),s.style&&(t=o.getEl())&&(t.setAttribute("style",s.style),t.style.cssText=s.style),o.settings.border&&(e=o.borderBox,o.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left}));var a=o.getRoot();for(var l in a.controlIdLookup||(a.controlIdLookup={}),(a.controlIdLookup[o._id]=o)._aria)o.aria(l,o._aria[l]);!1===o.state.get("visible")&&(o.getEl().style.display="none"),o.bindStates(),o.state.on("change:visible",function(t){var e,n=t.value;o.state.get("rendered")&&(o.getEl().style.display=!1===n?"none":"",o.getEl().getBoundingClientRect()),(e=o.parent())&&(e._lastRect=null),o.fire(n?"show":"hide"),te.add(o)}),o.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(t){var e,n,i,r,o,s,a=this.getEl(),l=a.parentNode,u=function(t,e){var n,i,r=t;for(n=i=0;r&&r!==e&&r.nodeType;)n+=r.offsetLeft||0,i+=r.offsetTop||0,r=r.offsetParent;return{x:n,y:i}}(a,l);return e=u.x,n=u.y,i=a.offsetWidth,r=a.offsetHeight,o=l.clientWidth,s=l.clientHeight,"end"===t?(e-=o-i,n-=s-r):"center"===t&&(e-=o/2-i/2,n-=s/2-r/2),l.scrollLeft=e,l.scrollTop=n,this},getRoot:function(){for(var t,e=this,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),e=(t=e).parent()}t||(t=this);for(var i=n.length;i--;)n[i].rootControl=t;return t},reflow:function(){te.remove(this);var t=this.parent();return t&&t._layout&&!t._layout.isNative()&&t.reflow(),this}};function ae(n){return n._eventDispatcher||(n._eventDispatcher=new Ot({scope:n,toggleEvent:function(t,e){e&&Ot.isNative(t)&&(n._nativeEvents||(n._nativeEvents={}),n._nativeEvents[t]=!0,n.state.get("rendered")&&le(n))}})),n._eventDispatcher}function le(a){var t,e,n,l,i,r;function o(t){var e=a.getParentCtrl(t.target);e&&e.fire(t.type,t)}function s(){var t=l._lastHoverCtrl;t&&(t.fire("mouseleave",{target:t.getEl()}),t.parents().each(function(t){t.fire("mouseleave",{target:t.getEl()})}),l._lastHoverCtrl=null)}function u(t){var e,n,i,r=a.getParentCtrl(t.target),o=l._lastHoverCtrl,s=0;if(r!==o){if((n=(l._lastHoverCtrl=r).parents().toArray().reverse()).push(r),o){for((i=o.parents().toArray().reverse()).push(o),s=0;sn.x&&r.x+r.wn.y&&r.y+r.h
'+t.encode(t.state.get("text"))+"
"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var t,e;t=this.getEl().style,e=this._layoutRect,t.left=e.x+"px",t.top=e.y+"px",t.zIndex=131070}}),ve=ue.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.canFocus=!0,i.tooltip&&!1!==ve.tooltips&&(r.on("mouseenter",function(t){var e=r.tooltip().moveTo(-65535);if(t.control===r){var n=e.text(i.tooltip).show().testMoveRel(r.getEl(),["bc-tc","bc-tl","bc-tr"]);e.classes.toggle("tooltip-n","bc-tc"===n),e.classes.toggle("tooltip-nw","bc-tl"===n),e.classes.toggle("tooltip-ne","bc-tr"===n),e.moveRel(r.getEl(),n)}else e.hide()}),r.on("mouseleave mousedown click",function(){r.tooltip().remove(),r._tooltip=null})),r.aria("label",i.ariaLabel||i.tooltip)},tooltip:function(){return this._tooltip||(this._tooltip=new pe({type:"tooltip"}),ne.inheritUiContainer(this,this._tooltip),this._tooltip.renderTo()),this._tooltip},postRender:function(){var t=this,e=t.settings;t._super(),t.parent()||!e.width&&!e.height||(t.initLayoutRect(),t.repaint()),e.autofocus&&t.focus()},bindStates:function(){var e=this;function n(t){e.aria("disabled",t),e.classes.toggle("disabled",t)}function i(t){e.aria("pressed",t),e.classes.toggle("active",t)}return e.state.on("change:disabled",function(t){n(t.value)}),e.state.on("change:active",function(t){i(t.value)}),e.state.get("disabled")&&n(!0),e.state.get("active")&&i(!0),e._super()},remove:function(){this._super(),this._tooltip&&(this._tooltip.remove(),this._tooltip=null)}}),be=ve.extend({Defaults:{value:0},init:function(t){this._super(t),this.classes.add("progress"),this.settings.filter||(this.settings.filter=function(t){return Math.round(t)})},renderHtml:function(){var t=this._id,e=this.classPrefix;return'
0%
'},postRender:function(){return this._super(),this.value(this.settings.value),this},bindStates:function(){var e=this;function n(t){t=e.settings.filter(t),e.getEl().lastChild.innerHTML=t+"%",e.getEl().firstChild.firstChild.style.width=t+"%"}return e.state.on("change:value",function(t){n(t.value)}),n(e.state.get("value")),e._super()}}),ye=function(t,e){t.getEl().lastChild.textContent=e+(t.progressBar?" "+t.progressBar.value()+"%":"")},xe=ue.extend({Mixins:[ge],Defaults:{classes:"widget notification"},init:function(t){var e=this;e._super(t),e.maxWidth=t.maxWidth,t.text&&e.text(t.text),t.icon&&(e.icon=t.icon),t.color&&(e.color=t.color),t.type&&e.classes.add("notification-"+t.type),t.timeout&&(t.timeout<0||0'),t=' style="max-width: '+e.maxWidth+"px;"+(e.color?"background-color: "+e.color+';"':'"'),e.closeButton&&(r=''),e.progressBar&&(o=e.progressBar.renderHtml()),''},postRender:function(){var t=this;return c.setTimeout(function(){t.$el.addClass(t.classPrefix+"in"),ye(t,t.state.get("text"))},100),t._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().firstChild.innerHTML=t.value,ye(e,t.value)}),e.progressBar&&(e.progressBar.bindStates(),e.progressBar.state.on("change:value",function(t){ye(e,e.state.get("text"))})),e._super()},close:function(){return this.fire("close").isDefaultPrevented()||this.remove(),this},repaint:function(){var t,e;t=this.getEl().style,e=this._layoutRect,t.left=e.x+"px",t.top=e.y+"px",t.zIndex=65534}});function we(o){var s=function(t){return t.inline?t.getElement():t.getContentAreaContainer()};return{open:function(t,e){var n,i=R.extend(t,{maxWidth:(n=s(o),St.getSize(n).width)}),r=new xe(i);return 0<(r.args=i).timeout&&(r.timer=setTimeout(function(){r.close(),e()},i.timeout)),r.on("close",function(){e()}),r.renderTo(),r},close:function(t){t.close()},reposition:function(t){Rt(t,function(t){t.moveTo(0,0)}),function(n){if(0").css({position:"absolute",top:0,left:0,width:f.width,height:f.height,zIndex:2147483647,opacity:1e-4,cursor:d}).appendTo(x.body),Mt(x).on("mousemove touchmove",v).on("mouseup touchend",p),h.start(t)},v=function(t){if(_e(t),t.button!==g)return p(t);t.deltaX=t.screenX-b,t.deltaY=t.screenY-y,t.preventDefault(),h.drag(t)},p=function(t){_e(t),Mt(x).off("mousemove touchmove",v).off("mouseup touchend",p),m.remove(),h.stop&&h.stop(t)},this.destroy=function(){Mt(w).off()},Mt(w).on("mousedown touchstart",e)}var Ce=tinymce.util.Tools.resolve("tinymce.ui.Factory"),ke=function(t){return!!t.getAttribute("data-mce-tabstop")};function Ee(t){var o,r,n=t.root;function i(t){return t&&1===t.nodeType}try{o=document.activeElement}catch(e){o=document.body}function s(t){return i(t=t||o)?t.getAttribute("role"):null}function a(t){for(var e,n=t||o;n=n.parentNode;)if(e=s(n))return e}function l(t){var e=o;if(i(e))return e.getAttribute("aria-"+t)}function u(t){var e=t.tagName.toUpperCase();return"INPUT"===e||"TEXTAREA"===e||"SELECT"===e}function c(e){var r=[];return function t(e){if(1===e.nodeType&&"none"!==e.style.display&&!e.disabled){var n;(u(n=e)&&!n.hidden||ke(n)||/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(s(n)))&&r.push(e);for(var i=0;i=e.length&&(t=0),e[t]&&e[t].focus(),t}function h(t,e){var n=-1,i=d();e=e||c(i.getEl());for(var r=0;r
'+(t.settings.html||"")+e.renderHtml(t)+"
"},postRender:function(){var t,e=this;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e.state.set("rendered",!0),e.settings.style&&e.$el.css(e.settings.style),e.settings.border&&(t=e.borderBox,e.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=Ee({root:e})),e},initLayoutRect:function(){var t=this._super();return this._layout.recalc(this),t},recalc:function(){var t=this,e=t._layoutRect,n=t._lastRect;if(!n||n.w!==e.w||n.h!==e.h)return t._layout.recalc(t),e=t.layoutRect(),t._lastRect={x:e.x,y:e.y,w:e.w,h:e.h},!0},reflow:function(){var t;if(te.remove(this),this.visible()){for(ue.repaintControls=[],ue.repaintControls.map={},this.recalc(),t=ue.repaintControls.length;t--;)ue.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),ue.repaintControls=[]}return this}}),Pe={init:function(){this.on("repaint",this.renderScroll)},renderScroll:function(){var p=this,v=2;function n(){var m,g,t;function e(t,e,n,i,r,o){var s,a,l,u,c,d,f,h;if(a=p.getEl("scroll"+t)){if(f=e.toLowerCase(),h=n.toLowerCase(),Mt(p.getEl("absend")).css(f,p.layoutRect()[i]-1),!r)return void Mt(a).css("display","none");Mt(a).css("display","block"),s=p.getEl("body"),l=p.getEl("scroll"+t+"t"),u=s["client"+n]-2*v,c=(u-=m&&g?a["client"+o]:0)/s["scroll"+n],(d={})[f]=s["offset"+e]+v,d[h]=u,Mt(a).css(d),(d={})[f]=s["scroll"+e]*c,d[h]=u*c,Mt(l).css(d)}}t=p.getEl("body"),m=t.scrollWidth>t.clientWidth,g=t.scrollHeight>t.clientHeight,e("h","Left","Width","contentW",m,"Height"),e("v","Top","Height","contentH",g,"Width")}p.settings.autoScroll&&(p._hasScroll||(p._hasScroll=!0,function(){function t(s,a,l,u,c){var d,t=p._id+"-scroll"+s,e=p.classPrefix;Mt(p.getEl()).append('
'),p.draghelper=new Re(t+"t",{start:function(){d=p.getEl("body")["scroll"+a],Mt("#"+t).addClass(e+"active")},drag:function(t){var e,n,i,r,o=p.layoutRect();n=o.contentW>o.innerW,i=o.contentH>o.innerH,r=p.getEl("body")["client"+l]-2*v,e=(r-=n&&i?p.getEl("scroll"+s)["client"+c]:0)/p.getEl("body")["scroll"+l],p.getEl("body")["scroll"+a]=d+t["delta"+u]/e},stop:function(){Mt("#"+t).removeClass(e+"active")}})}p.classes.add("scroll"),t("v","Top","Height","Y","Width"),t("h","Left","Width","X","Height")}(),p.on("wheel",function(t){var e=p.getEl("body");e.scrollLeft+=10*(t.deltaX||0),e.scrollTop+=10*t.deltaY,n()}),Mt(p.getEl("body")).on("scroll",n)),n())}},We=Oe.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[Pe],renderHtml:function(){var t=this,e=t._layout,n=t.settings.html;return t.preRender(),e.preRender(t),void 0===n?n='
'+e.renderHtml(t)+"
":("function"==typeof n&&(n=n.call(t)),t._hasBody=!1),'
'+(t._preBodyHtml||"")+n+"
"}}),De={resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,e){if(t<=1||e<=1){var n=St.getWindowSize();t=t<=1?t*n.w:t,e=e<=1?e*n.h:e}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:e,w:t,h:e}).reflow()},resizeBy:function(t,e){var n=this.layoutRect();return this.resizeTo(n.w+t,n.h+e)}},Ae=[],Be=[];function Le(t,e){for(;t;){if(t===e)return!0;t=t.parent()}}function Ie(){He||(He=function(t){2!==t.button&&function(t){for(var e=Ae.length;e--;){var n=Ae[e],i=n.getParentCtrl(t.target);if(n.settings.autohide){if(i&&(Le(i,n)||n.parent()===i))continue;(t=n.fire("autohide",{target:t.target})).isDefaultPrevented()||n.hide()}}}(t)},Mt(document).on("click touchstart",He))}function ze(r){var t=St.getViewPort().y;function e(t,e){for(var n,i=0;it&&(r.fixed(!1).layoutRect({y:r._autoFixY}).repaint(),e(!1,r._autoFixY-t)):(r._autoFixY=r.layoutRect().y,r._autoFixY').appendTo(i.getContainerElm())),c.setTimeout(function(){e.addClass(n+"in"),Mt(i.getEl()).addClass(n+"in")}),Me=!0),Fe(!0,i)}}),i.on("show",function(){i.parents().each(function(t){if(t.state.get("fixed"))return i.fixed(!0),!1})}),t.popover&&(i._preBodyHtml='
',i.classes.add("popover").add("bottom").add(i.isRtl()?"end":"start")),i.aria("label",t.ariaLabel),i.aria("labelledby",i._id),i.aria("describedby",i.describedBy||i._id+"-none")},fixed:function(t){var e=this;if(e.state.get("fixed")!==t){if(e.state.get("rendered")){var n=St.getViewPort();t?e.layoutRect().y-=n.y:e.layoutRect().y+=n.y}e.classes.toggle("fixed",t),e.state.set("fixed",t)}return e},show:function(){var t,e=this._super();for(t=Ae.length;t--&&Ae[t]!==this;);return-1===t&&Ae.push(this),e},hide:function(){return Ve(this),Fe(!1,this),this._super()},hideAll:function(){Ue.hideAll()},close:function(){return this.fire("close").isDefaultPrevented()||(this.remove(),Fe(!1,this)),this},remove:function(){Ve(this),this._super()},postRender:function(){return this.settings.bodyRole&&this.getEl("body").setAttribute("role",this.settings.bodyRole),this._super()}});function Ve(t){var e;for(e=Ae.length;e--;)Ae[e]===t&&Ae.splice(e,1);for(e=Be.length;e--;)Be[e]===t&&Be.splice(e,1)}Ue.hideAll=function(){for(var t=Ae.length;t--;){var e=Ae[t];e&&e.settings.autohide&&(e.hide(),Ae.splice(t,1))}};var qe=[],Ye="";function $e(t){var e,n=Mt("meta[name=viewport]")[0];!1!==h.overrideViewPort&&(n||((n=document.createElement("meta")).setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),(e=n.getAttribute("content"))&&void 0!==Ye&&(Ye=e),n.setAttribute("content",t?"width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0":Ye))}function Xe(t,e){(function(){for(var t=0;tt.w&&(n=t.x-Math.max(0,e/2),r.layoutRect({w:e,x:n}),i=!0),o&&(o.layoutRect({w:r.layoutRect().innerW}).recalc(),(e=o.layoutRect().minW+t.deltaW)>t.w&&(n=t.x-Math.max(0,e-t.w),r.layoutRect({w:e,x:n}),i=!0)),i&&r.recalc()},initLayoutRect:function(){var t,e=this,n=e._super(),i=0;if(e.settings.title&&!e._fullscreen){t=e.getEl("head");var r=St.getSize(t);n.headerW=r.width,n.headerH=r.height,i+=n.headerH}e.statusbar&&(i+=e.statusbar.layoutRect().h),n.deltaH+=i,n.minH+=i,n.h+=i;var o=St.getWindowSize();return n.x=e.settings.x||Math.max(0,o.w/2-n.w/2),n.y=e.settings.y||Math.max(0,o.h/2-n.h/2),n},renderHtml:function(){var t=this,e=t._layout,n=t._id,i=t.classPrefix,r=t.settings,o="",s="",a=r.html;return t.preRender(),e.preRender(t),r.title&&(o='
'+t.encode(r.title)+'
'),r.url&&(a=''),void 0===a&&(a=e.renderHtml(t)),t.statusbar&&(s=t.statusbar.renderHtml()),'
'+o+'
'+a+"
"+s+"
"},fullscreen:function(t){var n,e,i=this,r=document.documentElement,o=i.classPrefix;if(t!==i._fullscreen)if(Mt(window).on("resize",function(){var t;if(i._fullscreen)if(n)i._timer||(i._timer=c.setTimeout(function(){var t=St.getWindowSize();i.moveTo(0,0).resizeTo(t.w,t.h),i._timer=0},50));else{t=(new Date).getTime();var e=St.getWindowSize();i.moveTo(0,0).resizeTo(e.w,e.h),50<(new Date).getTime()-t&&(n=!0)}}),e=i.layoutRect(),i._fullscreen=t){i._initial={x:e.x,y:e.y,w:e.w,h:e.h},i.borderBox=Pt("0"),i.getEl("head").style.display="none",e.deltaH-=e.headerH+2,Mt([r,document.body]).addClass(o+"fullscreen"),i.classes.add("fullscreen");var s=St.getWindowSize();i.moveTo(0,0).resizeTo(s.w,s.h)}else i.borderBox=Pt(i.settings.border),i.getEl("head").style.display="",e.deltaH+=e.headerH,Mt([r,document.body]).removeClass(o+"fullscreen"),i.classes.remove("fullscreen"),i.moveTo(i._initial.x,i._initial.y).resizeTo(i._initial.w,i._initial.h);return i.reflow()},postRender:function(){var e,n=this;setTimeout(function(){n.classes.add("in"),n.fire("open")},0),n._super(),n.statusbar&&n.statusbar.postRender(),n.focus(),this.dragHelper=new Re(n._id+"-dragh",{start:function(){e={x:n.layoutRect().x,y:n.layoutRect().y}},drag:function(t){n.moveTo(e.x+t.deltaX,e.y+t.deltaY)}}),n.on("submit",function(t){t.isDefaultPrevented()||n.close()}),qe.push(n),$e(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var t,e=this;for(e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),Xe(e.classPrefix,!1),t=qe.length;t--;)qe[t]===e&&qe.splice(t,1);$e(0",n=0;n
";r+=""}return r+="",r+=""}(r,o)),(t=i.dom.select("*[data-mce-id]")[0]).removeAttribute("data-mce-id"),e=i.dom.select("td,th",t),i.selection.setCursorLocation(e[0],0)}))},xn=function(t,e){t.execCommand("FormatBlock",!1,e)},wn=function(t,e,n){var i,r;r=(i=t.editorUpload.blobCache).create(ln("mceu"),n,e),i.add(r),t.insertContent(t.dom.createHTML("img",{src:r.blobUri()}))},_n=function(t,e){0===e.trim().length?vn(t):bn(t,e)},Rn=vn,Cn=function(n,t){n.addButton("quicklink",{icon:"link",tooltip:"Insert/Edit link",stateSelector:"a[href]",onclick:function(){t.showForm(n,"quicklink")}}),n.addButton("quickimage",{icon:"image",tooltip:"Insert image",onclick:function(){sn().then(function(t){var e=t[0];on(e).then(function(t){wn(n,t,e)})})}}),n.addButton("quicktable",{icon:"table",tooltip:"Insert table",onclick:function(){t.hide(),yn(n,2,2)}}),function(e){for(var t=function(t){return function(){xn(e,t)}},n=1;n<6;n++){var i="h"+n;e.addButton(i,{text:i.toUpperCase(),tooltip:"Heading "+n,stateSelector:i,onclick:t(i),onPostRender:function(){this.getEl().firstChild.firstChild.style.fontWeight="bold"}})}}(n)},kn=function(){var t=h.container;if(t&&"static"!==v.DOM.getStyle(t,"position",!0)){var e=v.DOM.getPos(t),n=e.x-t.scrollLeft,i=e.y-t.scrollTop;return pt.some({x:n,y:i})}return pt.none()},En=function(t){return/^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(t.trim())},Hn=function(t){return/^https?:\/\//.test(t.trim())},Tn=function(t,e){return!Hn(e)&&En(e)?(n=t,i=e,new rn(function(e){n.windowManager.confirm("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){e(!0===t?"http://"+i:i)})})):rn.resolve(e);var n,i},Sn=function(r,e){var t,n,i,o={};return t="quicklink",n={items:[{type:"button",name:"unlink",icon:"unlink",onclick:function(){r.focus(),Rn(r),e()},tooltip:"Remove link"},{type:"filepicker",name:"linkurl",placeholder:"Paste or type a link",filetype:"file",onchange:function(t){var e=t.meta;e&&e.attach&&(o={href:this.value(),attach:e.attach})}},{type:"button",icon:"checkmark",subtype:"primary",tooltip:"Ok",onclick:"submit"}],onshow:function(t){if(t.control===this){var e,n="";(e=r.dom.getParent(r.selection.getStart(),"a[href]"))&&(n=r.dom.getAttrib(e,"href")),this.fromJSON({linkurl:n}),i=this.find("#unlink"),e?i.show():i.hide(),this.find("#linkurl")[0].focus()}var i},onsubmit:function(t){Tn(r,t.data.linkurl).then(function(t){r.undoManager.transact(function(){t===o.href&&(o.attach(),o={}),_n(r,t)}),e()})}},(i=Ce.create(R.extend({type:"form",layout:"flex",direction:"row",padding:5,name:t,spacing:3},n))).on("show",function(){i.find("textbox").eq(0).each(function(t){t.focus()})}),i},Mn=function(n,t,e){var o,i,s=[];if(e)return R.each(B(i=e)?i:P(i)?i.split(/[ ,]/):[],function(t){if("|"===t)o=null;else if(n.buttons[t]){o||(o={type:"buttongroup",items:[]},s.push(o));var e=n.buttons[t];A(e)&&(e=e()),e.type=e.type||"button",(e=Ce.create(e)).on("postRender",(i=n,r=e,function(){var e,t,n=(t=function(t,e){return{selector:t,handler:e}},(e=r).settings.stateSelector?t(e.settings.stateSelector,function(t){e.active(t)}):e.settings.disabledStateSelector?t(e.settings.disabledStateSelector,function(t){e.disabled(t)}):null);null!==n&&i.selection.selectorChanged(n.selector,n.handler)})),o.items.push(e)}var i,r}),Ce.create({type:"toolbar",layout:"flow",name:t,items:s})},Nn=function(){var l,c,o=function(t){return 0'+this._super(t)}}),Wn=ve.extend({Defaults:{classes:"widget btn",role:"button"},init:function(t){var e,n=this;n._super(t),t=n.settings,e=n.settings.size,n.on("click mousedown",function(t){t.preventDefault()}),n.on("touchstart",function(t){n.fire("click",t),t.preventDefault()}),t.subtype&&n.classes.add(t.subtype),e&&n.classes.add("btn-"+e),t.icon&&n.icon(t.icon)},icon:function(t){return arguments.length?(this.state.set("icon",t),this):this.state.get("icon")},repaint:function(){var t,e=this.getEl().firstChild;e&&((t=e.style).width=t.height="100%"),this._super()},renderHtml:function(){var t,e,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a="",l=n.settings;return(t=l.image)?(o="none","string"!=typeof t&&(t=window.getSelection?t[0]:t[1]),t=" style=\"background-image: url('"+t+"')\""):t="",s&&(n.classes.add("btn-has-text"),a=''+n.encode(s)+""),o=o?r+"ico "+r+"i-"+o:"",e="boolean"==typeof l.active?' aria-pressed="'+l.active+'"':"",'
"},bindStates:function(){var o=this,n=o.$,i=o.classPrefix+"txt";function s(t){var e=n("span."+i,o.getEl());t?(e[0]||(n("button:first",o.getEl()).append(''),e=n("span."+i,o.getEl())),e.html(o.encode(t))):e.remove(),o.classes.toggle("btn-has-text",!!t)}return o.state.on("change:text",function(t){s(t.value)}),o.state.on("change:icon",function(t){var e=t.value,n=o.classPrefix;e=(o.settings.icon=e)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];e?(r&&r===i.firstChild||(r=document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=e):r&&i.removeChild(r),s(o.state.get("text"))}),o._super()}}),Dn=Wn.extend({init:function(t){t=R.extend({text:"Browse...",multiple:!1,accept:null},t),this._super(t),this.classes.add("browsebutton"),t.multiple&&this.classes.add("multiple")},postRender:function(){var n=this,e=St.create("input",{type:"file",id:n._id+"-browse",accept:n.settings.accept});n._super(),Mt(e).on("change",function(t){var e=t.target.files;n.value=function(){return e.length?n.settings.multiple?e:e[0]:null},t.preventDefault(),e.length&&n.fire("change",t)}),Mt(e).on("click",function(t){t.stopPropagation()}),Mt(n.getEl("button")).on("click",function(t){t.stopPropagation(),e.click()}),n.getEl().appendChild(e)},remove:function(){Mt(this.getEl("button")).off(),Mt(this.getEl("input")).off(),this._super()}}),An=Oe.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var t=this,e=t._layout;return t.classes.add("btn-group"),t.preRender(),e.preRender(t),'
'+(t.settings.html||"")+e.renderHtml(t)+"
"}}),Bn=ve.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(t){var e=this;e._super(t),e.on("click mousedown",function(t){t.preventDefault()}),e.on("click",function(t){t.preventDefault(),e.disabled()||e.checked(!e.checked())}),e.checked(e.settings.checked)},checked:function(t){return arguments.length?(this.state.set("checked",t),this):this.state.get("checked")},value:function(t){return arguments.length?this.checked(t):this.checked()},renderHtml:function(){var t=this,e=t._id,n=t.classPrefix;return'
'+t.encode(t.state.get("text"))+"
"},bindStates:function(){var o=this;function e(t){o.classes.toggle("checked",t),o.aria("checked",t)}return o.state.on("change:text",function(t){o.getEl("al").firstChild.data=o.translate(t.value)}),o.state.on("change:checked change:value",function(t){o.fire("change"),e(t.value)}),o.state.on("change:icon",function(t){var e=t.value,n=o.classPrefix;if(void 0===e)return o.settings.icon;e=(o.settings.icon=e)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];e?(r&&r===i.firstChild||(r=document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=e):r&&i.removeChild(r)}),o.state.get("checked")&&e(!0),o._super()}}),Ln=tinymce.util.Tools.resolve("tinymce.util.VK"),In=ve.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.classes.add("combobox"),r.subinput=!0,r.ariaTarget="inp",i.menu=i.menu||i.values,i.menu&&(i.icon="caret"),r.on("click",function(t){var e=t.target,n=r.getEl();if(Mt.contains(n,e)||e===n)for(;e&&e!==n;)e.id&&-1!==e.id.indexOf("-open")&&(r.fire("action"),i.menu&&(r.showMenu(),t.aria&&r.menu.items()[0].focus())),e=e.parentNode}),r.on("keydown",function(t){var e;13===t.keyCode&&"INPUT"===t.target.nodeName&&(t.preventDefault(),r.parents().reverse().each(function(t){if(t.toJSON)return e=t,!1}),r.fire("submit",{data:e.toJSON()}))}),r.on("keyup",function(t){if("INPUT"===t.target.nodeName){var e=r.state.get("value"),n=t.target.value;n!==e&&(r.state.set("value",n),r.fire("autocomplete",t))}}),r.on("mouseover",function(t){var e=r.tooltip().moveTo(-65535);if(r.statusLevel()&&-1!==t.target.className.indexOf(r.classPrefix+"status")){var n=r.statusMessage()||"Ok",i=e.text(n).show().testMoveRel(t.target,["bc-tc","bc-tl","bc-tr"]);e.classes.toggle("tooltip-n","bc-tc"===i),e.classes.toggle("tooltip-nw","bc-tl"===i),e.classes.toggle("tooltip-ne","bc-tr"===i),e.moveRel(t.target,i)}})},statusLevel:function(t){return 0
"),'
'},postRender:function(){var e=this,n=e.settings.onclick;return e.on("click",function(t){t.aria&&"down"===t.aria.key||t.control!==e||Un.getParent(t.target,"."+e.classPrefix+"open")||(t.stopImmediatePropagation(),n.call(e,t))}),delete e.settings.onclick,e._super()}}),qn=tinymce.util.Tools.resolve("tinymce.util.Color"),Yn=ve.extend({Defaults:{classes:"widget colorpicker"},init:function(t){this._super(t)},postRender:function(){var n,i,r,o,s,a=this,l=a.color();function u(t,e){var n,i,r=St.getPos(t);return n=e.pageX-r.x,i=e.pageY-r.y,{x:n=Math.max(0,Math.min(n/t.clientWidth,1)),y:i=Math.max(0,Math.min(i/t.clientHeight,1))}}function c(t,e){var n=(360-t.h)/360;St.css(r,{top:100*n+"%"}),e||St.css(s,{left:t.s+"%",top:100-t.v+"%"}),o.style.background=qn({s:100,v:100,h:t.h}).toHex(),a.color().parse({s:t.s,v:t.v,h:t.h})}function t(t){var e;e=u(o,t),n.s=100*e.x,n.v=100*(1-e.y),c(n),a.fire("change")}function e(t){var e;e=u(i,t),(n=l.toHsv()).h=360*(1-e.y),c(n,!0),a.fire("change")}i=a.getEl("h"),r=a.getEl("hp"),o=a.getEl("sv"),s=a.getEl("svp"),a._repaint=function(){c(n=l.toHsv())},a._super(),a._svdraghelper=new Re(a._id+"-sv",{start:t,drag:t}),a._hdraghelper=new Re(a._id+"-h",{start:e,drag:e}),a._repaint()},rgb:function(){return this.color().toRgb()},value:function(t){if(!arguments.length)return this.color().toHex();this.color().parse(t),this._rendered&&this._repaint()},color:function(){return this._color||(this._color=qn()),this._color},renderHtml:function(){var t,e=this._id,o=this.classPrefix,s="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return t='
'+function(){var t,e,n,i,r="";for(n="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",t=0,e=(i=s.split(",")).length-1;t
';return r}()+'
','
'+t+"
"}}),$n=ve.extend({init:function(t){t=R.extend({height:100,text:"Drop an image here",multiple:!1,accept:null},t),this._super(t),this.classes.add("dropzone"),t.multiple&&this.classes.add("multiple")},renderHtml:function(){var t,e,n=this.settings;return t={id:this._id,hidefocus:"1"},e=St.create("div",t,""+this.translate(n.text)+""),n.height&&St.css(e,"height",n.height+"px"),n.width&&St.css(e,"width",n.width+"px"),e.className=this.classes,e.outerHTML},postRender:function(){var i=this,t=function(t){t.preventDefault(),i.classes.toggle("dragenter"),i.getEl().className=i.classes};i._super(),i.$el.on("dragover",function(t){t.preventDefault()}),i.$el.on("dragenter",t),i.$el.on("dragleave",t),i.$el.on("drop",function(t){if(t.preventDefault(),!i.state.get("disabled")){var e=function(t){var e=i.settings.accept;if("string"!=typeof e)return t;var n=new RegExp("("+e.split(/\s*,\s*/).join("|")+")$","i");return R.grep(t,function(t){return n.test(t.name)})}(t.dataTransfer.files);i.value=function(){return e.length?i.settings.multiple?e:e[0]:null},e.length&&i.fire("change",t)}})},remove:function(){this.$el.off(),this._super()}}),Xn=ve.extend({init:function(t){var n=this;t.delimiter||(t.delimiter="\xbb"),n._super(t),n.classes.add("path"),n.canFocus=!0,n.on("click",function(t){var e;(e=t.target.getAttribute("data-index"))&&n.fire("select",{value:n.row()[e],index:e})}),n.row(n.settings.row)},focus:function(){return this.getEl().firstChild.focus(),this},row:function(t){return arguments.length?(this.state.set("row",t),this):this.state.get("row")},renderHtml:function(){return'
'+this._getDataPathHtml(this.state.get("row"))+"
"},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(t){var e,n,i=t||[],r="",o=this.classPrefix;for(e=0,n=i.length;e
"),r=e.settings.icon?i+"ico "+i+"i-"+r:"",e.aria("role",e.parent()instanceof zr?"menuitem":"button"),'
'},postRender:function(){var r=this;return r.on("click",function(t){t.control===r&&function(t,e){for(;t;){if(e===t)return!0;t=t.parentNode}return!1}(t.target,r.getEl())&&(r.focus(),r.showMenu(!t.aria),t.aria&&r.menu.items().filter(":visible")[0].focus())}),r.on("mouseenter",function(t){var e,n=t.control,i=r.parent();n&&i&&n instanceof Fr&&n.parent()===i&&(i.items().filter("MenuButton").each(function(t){t.hideMenu&&t!==n&&(t.menu&&t.menu.visible()&&(e=!0),t.hideMenu())}),e&&(n.focus(),n.showMenu()))}),r._super()},bindStates:function(){var t=this;return t.state.on("change:menu",function(){t.menu&&t.menu.remove(),t.menu=null}),t._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});function Ur(i,r){var o,s,a=this,l=ue.classPrefix;a.show=function(t,e){function n(){o&&(Mt(i).append('
'),e&&e())}return a.hide(),o=!0,t?s=c.setTimeout(n,t):n(),a},a.hide=function(){var t=i.lastChild;return c.clearTimeout(s),t&&-1!==t.className.indexOf("throbber")&&t.parentNode.removeChild(t),o=!1,a}}var Vr=Ue.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(t){if(t.autohide=!0,t.constrainToViewport=!0,"function"==typeof t.items&&(t.itemsFactory=t.items,t.items=[]),t.itemDefaults)for(var e=t.items,n=e.length;n--;)e[n]=R.extend({},t.itemDefaults,e[n]);this._super(t),this.classes.add("menu"),t.animate&&11!==h.ie&&this.classes.add("animate")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){this.hideAll(),this.fire("select")},load:function(){var e,n=this;function i(){n.throbber&&(n.throbber.hide(),n.throbber=null)}n.settings.itemsFactory&&(n.throbber||(n.throbber=new Ur(n.getEl("body"),!0),0===n.items().length?(n.throbber.show(),n.fire("loading")):n.throbber.show(100,function(){n.items().remove(),n.fire("loading")}),n.on("hide close",i)),n.requestTime=e=(new Date).getTime(),n.settings.itemsFactory(function(t){0!==t.length?n.requestTime===e&&(n.getEl().style.width="",n.getEl("body").style.width="",i(),n.items().remove(),n.getEl("body").innerHTML="",n.add(t),n.renderNew(),n.fire("loaded")):n.hide()}))},hideAll:function(){return this.find("menuitem").exec("hideMenu"),this._super()},preRender:function(){var n=this;return n.items().each(function(t){var e=t.settings;if(e.icon||e.image||e.selectable)return!(n._hasIcons=!0)}),n.settings.itemsFactory&&n.on("postrender",function(){n.settings.itemsFactory&&n.load()}),n.on("show hide",function(t){t.control===n&&("show"===t.type?c.setTimeout(function(){n.classes.add("in")},0):n.classes.remove("in"))}),n._super()}}),qr=Fr.extend({init:function(i){var e,r,o,n,s=this;s._super(i),i=s.settings,s._values=e=i.values,e&&("undefined"!=typeof i.value&&function t(e){for(var n=0;n").replace(new RegExp(c("]mce~match!"),"g"),"")}return s&&e.parent().classes.add("menu-has-icons"),i.image&&(a=" style=\"background-image: url('"+i.image+"')\""),l&&(l=function(t){var e,n,i={};for(i=h.mac?{alt:"⌥",ctrl:"⌘",shift:"⇧",meta:"⌘"}:{meta:"Ctrl"},t=t.split("+"),e=0;e\xa0":"",o=f(e.encode(d(o))),u=f(e.encode(d(u))),'
'+t+("-"!==o?''+o+"":"")+(l?'
'+l+"
":"")+(i.menu?'
':"")+(u?'":"")+"
"},postRender:function(){var e=this,n=e.settings,t=n.textStyle;if("function"==typeof t&&(t=t.call(this)),t){var i=e.getEl("text");i&&(i.setAttribute("style",t),e._textStyle=t)}return e.on("mouseenter click",function(t){t.control===e&&(n.menu||"click"!==t.type?(e.showMenu(),t.aria&&e.menu.focus(!0)):(e.fire("select"),c.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){return this.parent().items().each(function(t){t.classes.remove("selected")}),this.classes.toggle("selected",!0),this},active:function(t){return function(t,e){var n=t._textStyle;if(n){var i=t.getEl("text");i.setAttribute("style",n),e&&(i.style.color="",i.style.backgroundColor="")}}(this,t),void 0!==t&&this.aria("checked",t),this._super(t)},remove:function(){this._super(),this.menu&&this.menu.remove()}}),$r=Bn.extend({Defaults:{classes:"radio",role:"radio"}}),Xr=ve.extend({renderHtml:function(){var t=this,e=t.classPrefix;return t.classes.add("resizehandle"),"both"===t.settings.direction&&t.classes.add("resizehandle-both"),t.canFocus=!1,'
'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new Re(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!==e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}});function jr(t){var e="";if(t)for(var n=0;n'+t[n]+"";return e}var Jr=ve.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(t){var n=this;n._super(t),n.settings.size&&(n.size=n.settings.size),n.settings.options&&(n._options=n.settings.options),n.on("keydown",function(t){var e;13===t.keyCode&&(t.preventDefault(),n.parents().reverse().each(function(t){if(t.toJSON)return e=t,!1}),n.fire("submit",{data:e.toJSON()}))})},options:function(t){return arguments.length?(this.state.set("options",t),this):this.state.get("options")},renderHtml:function(){var t,e=this,n="";return t=jr(e._options),e.size&&(n=' size = "'+e.size+'"'),'"},bindStates:function(){var e=this;return e.state.on("change:options",function(t){e.getEl().innerHTML=jr(t.value)}),e._super()}});function Gr(t,e,n){return t
'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){var t,e,n,i,r,o,s,a,l,u,c,d,f,h,m=this;t=m._minValue,e=m._maxValue,"v"===m.settings.orientation?(n="screenY",i="top",r="height",o="h"):(n="screenX",i="left",r="width",o="w"),m._super(),function(o,s){function e(t){var e,n,i,r;e=Gr(e=(((e=m.value())+(r=n=o))/((i=s)-r)+.05*t)*(i-n)-n,o,s),m.value(e),m.fire("dragstart",{value:e}),m.fire("drag",{value:e}),m.fire("dragend",{value:e})}m.on("keydown",function(t){switch(t.keyCode){case 37:case 38:e(-1);break;case 39:case 40:e(1)}})}(t,e),s=t,a=e,l=m.getEl("handle"),m._dragHelper=new Re(m._id,{handle:m._id+"-handle",start:function(t){u=t[n],c=parseInt(m.getEl("handle").style[i],10),d=(m.layoutRect()[o]||100)-St.getSize(l)[r],m.fire("dragstart",{value:h})},drag:function(t){var e=t[n]-u;f=Gr(c+e,0,d),l.style[i]=f+"px",h=s+f/d*(a-s),m.value(h),m.tooltip().text(""+m.settings.previewFilter(h)).show().moveRel(l,"bc tc"),m.fire("drag",{value:h})},stop:function(){m.tooltip().hide(),m.fire("dragend",{value:h})}})},repaint:function(){this._super(),Zr(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){Zr(e,t.value)}),e._super()}}),to=ve.extend({renderHtml:function(){return this.classes.add("spacer"),this.canFocus=!1,'
'}}),eo=Fr.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var t,e,n=this.getEl(),i=this.layoutRect();return this._super(),t=n.firstChild,e=n.lastChild,Mt(t).css({width:i.w-St.getSize(e).width,height:i.h-2}),Mt(e).css({height:i.h-2}),this},activeMenu:function(t){Mt(this.getEl().lastChild).toggleClass(this.classPrefix+"active",t)},renderHtml:function(){var t,e,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a=n.settings,l="";return(t=a.image)?(o="none","string"!=typeof t&&(t=window.getSelection?t[0]:t[1]),t=" style=\"background-image: url('"+t+"')\""):t="",o=a.icon?r+"ico "+r+"i-"+o:"",s&&(n.classes.add("btn-has-text"),l=''+n.encode(s)+""),e="boolean"==typeof a.active?' aria-pressed="'+a.active+'"':"",'
'},postRender:function(){var n=this.settings.onclick;return this.on("click",function(t){var e=t.target;if(t.control===this)for(;e;){if(t.aria&&"down"!==t.aria.key||"BUTTON"===e.nodeName&&-1===e.className.indexOf("open"))return t.stopImmediatePropagation(),void(n&&n.call(this,t));e=e.parentNode}}),delete this.settings.onclick,this._super()}}),no=or.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}}),io=We.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(n){var t;this.activeTabId&&(t=this.getEl(this.activeTabId),Mt(t).removeClass(this.classPrefix+"active"),t.setAttribute("aria-selected","false")),this.activeTabId="t"+n,(t=this.getEl("t"+n)).setAttribute("aria-selected","true"),Mt(t).addClass(this.classPrefix+"active"),this.items()[n].show().fire("showtab"),this.reflow(),this.items().each(function(t,e){n!==e&&t.hide()})},renderHtml:function(){var i=this,t=i._layout,r="",o=i.classPrefix;return i.preRender(),t.preRender(i),i.items().each(function(t,e){var n=i._id+"-t"+e;t.aria("role","tabpanel"),t.aria("labelledby",n),r+='"}),'
'+r+'
'+t.renderHtml(i)+"
"},postRender:function(){var i=this;i._super(),i.settings.activeTab=i.settings.activeTab||0,i.activateTab(i.settings.activeTab),this.on("click",function(t){var e=t.target.parentNode;if(e&&e.id===i._id+"-head")for(var n=e.childNodes.length;n--;)e.childNodes[n]===t.target&&i.activateTab(n)})},initLayoutRect:function(){var t,e,n,i=this;e=(e=St.getSize(i.getEl("head")).width)<0?0:e,n=0,i.items().each(function(t){e=Math.max(e,t.layoutRect().minW),n=Math.max(n,t.layoutRect().minH)}),i.items().each(function(t){t.settings.x=0,t.settings.y=0,t.settings.w=e,t.settings.h=n,t.layoutRect({x:0,y:0,w:e,h:n})});var r=St.getSize(i.getEl("head")).height;return i.settings.minWidth=e,i.settings.minHeight=n+r,(t=i._super()).deltaH+=r,t.innerH=t.h-t.deltaH,t}}),ro=ve.extend({init:function(t){var n=this;n._super(t),n.classes.add("textbox"),t.multiline?n.classes.add("multiline"):(n.on("keydown",function(t){var e;13===t.keyCode&&(t.preventDefault(),n.parents().reverse().each(function(t){if(t.toJSON)return e=t,!1}),n.fire("submit",{data:e.toJSON()}))}),n.on("keyup",function(t){n.state.set("value",t.target.value)}))},repaint:function(){var t,e,n,i,r,o=this,s=0;t=o.getEl().style,e=o._layoutRect,r=o._lastRepaintRect||{};var a=document;return!o.settings.multiline&&a.all&&(!a.documentMode||a.documentMode<=8)&&(t.lineHeight=e.h-s+"px"),i=(n=o.borderBox).left+n.right+8,s=n.top+n.bottom+(o.settings.multiline?8:0),e.x!==r.x&&(t.left=e.x+"px",r.x=e.x),e.y!==r.y&&(t.top=e.y+"px",r.y=e.y),e.w!==r.w&&(t.width=e.w-i+"px",r.w=e.w),e.h!==r.h&&(t.height=e.h-s+"px",r.h=e.h),o._lastRepaintRect=r,o.fire("repaint",{},!1),o},renderHtml:function(){var e,t,n=this,i=n.settings;return e={id:n._id,hidefocus:"1"},R.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(t){e[t]=i[t]}),n.disabled()&&(e.disabled="disabled"),i.subtype&&(e.type=i.subtype),(t=St.create(i.multiline?"textarea":"input",e)).value=n.state.get("value"),t.className=n.classes.toString(),t.outerHTML},value:function(t){return arguments.length?(this.state.set("value",t),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!==t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}}),oo=function(){return{Selector:Vt,Collection:$t,ReflowQueue:te,Control:ue,Factory:Ce,KeyboardNavigation:Ee,Container:Oe,DragHelper:Re,Scrollable:Pe,Panel:We,Movable:ge,Resizable:De,FloatPanel:Ue,Window:je,MessageBox:Ze,Tooltip:pe,Widget:ve,Progress:be,Notification:xe,Layout:On,AbsoluteLayout:Pn,Button:Wn,ButtonGroup:An,Checkbox:Bn,ComboBox:In,ColorBox:zn,PanelButton:Fn,ColorButton:Vn,ColorPicker:Yn,Path:Xn,ElementPath:jn,FormItem:Jn,Form:Gn,FieldSet:Kn,FilePicker:nr,FitLayout:ir,FlexLayout:rr,FlowLayout:or,FormatControls:Wr,GridLayout:Dr,Iframe:Ar,InfoBox:Br,Label:Lr,Toolbar:Ir,MenuBar:zr,MenuButton:Fr,MenuItem:Yr,Throbber:Ur,Menu:Vr,ListBox:qr,Radio:$r,ResizeHandle:Xr,SelectBox:Jr,Slider:Qr,Spacer:to,SplitButton:eo,StackLayout:no,TabPanel:io,TextBox:ro,DropZone:$n,BrowseButton:Dn}},so=function(n){n.ui?R.each(oo(),function(t,e){n.ui[e]=t}):n.ui=oo()};R.each(oo(),function(t,e){Ce.add(e,t)}),so(window.tinymce?window.tinymce:{}),o.add("inlite",function(t){var e=Nn();return Wr.setup(t),Cn(t,e),Qe(t,e)})}(); \ No newline at end of file +!function(_){"use strict";var u,t,e,n,i,r,o=tinymce.util.Tools.resolve("tinymce.ThemeManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),v=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.util.Delay"),s=function(t){return t.reduce(function(t,e){return Array.isArray(e)?t.concat(s(e)):t.concat(e)},[])},a={flatten:s},l=function(t,e){for(var n=0;n+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,Vt=/^\s*|\s*$/g,qt=Ot.extend({init:function(t){var o=this.match;function s(t,e,n){var i;function r(t){t&&e.push(t)}return r(function(e){if(e)return e=e.toLowerCase(),function(t){return"*"===e||t.type===e}}((i=Ft.exec(t.replace(Vt,"")))[1])),r(function(e){if(e)return function(t){return t._name===e}}(i[2])),r(function(n){if(n)return n=n.split("."),function(t){for(var e=n.length;e--;)if(!t.classes.contains(n[e]))return!1;return!0}}(i[3])),r(function(n,i,r){if(n)return function(t){var e=t[n]?t[n]():"";return i?"="===i?e===r:"*="===i?0<=e.indexOf(r):"~="===i?0<=(" "+e+" ").indexOf(" "+r+" "):"!="===i?e!==r:"^="===i?0===e.indexOf(r):"$="===i&&e.substr(e.length-r.length)===r:!!r}}(i[4],i[5],i[6])),r(function(i){var e;if(i)return(i=/(?:not\((.+)\))|(.+)/i.exec(i))[1]?(e=a(i[1],[]),function(t){return!o(t,e)}):(i=i[2],function(t,e,n){return"first"===i?0===e:"last"===i?e===n-1:"even"===i?e%2==0:"odd"===i?e%2==1:!!t[i]&&t[i]()})}(i[7])),e.pseudo=!!i[7],e.direct=n,e}function a(t,e){var n,i,r,o=[];do{if(Ut.exec(""),(i=Ut.exec(t))&&(t=i[3],o.push(i[1]),i[2])){n=i[3];break}}while(i);for(n&&a(n,e),t=[],r=0;r"!==o[r]&&t.push(s(o[r],[],">"===o[r-1]));return e.push(t),e}this._selectors=a(t,[])},match:function(t,e){var n,i,r,o,s,a,l,u,c,d,f,h,m;for(n=0,i=(e=e||this._selectors).length;na.maxW?a.maxW:n,a.w=n,a.innerW=n-i),(n=t.h)!==undefined&&(n=(n=na.maxH?a.maxH:n,a.h=n,a.innerH=n-r),(n=t.innerW)!==undefined&&(n=(n=na.maxW-i?a.maxW-i:n,a.innerW=n,a.w=n+i),(n=t.innerH)!==undefined&&(n=(n=na.maxH-r?a.maxH-r:n,a.innerH=n,a.h=n+r),t.contentW!==undefined&&(a.contentW=t.contentW),t.contentH!==undefined&&(a.contentH=t.contentH),(e=s._lastLayoutRect).x===a.x&&e.y===a.y&&e.w===a.w&&e.h===a.h||((o=Zt.repaintControls)&&o.map&&!o.map[s._id]&&(o.push(s),o.map[s._id]=!0),e.x=a.x,e.y=a.y,e.w=a.w,e.h=a.h),s):a},repaint:function(){var t,e,n,i,r,o,s,a,l,u,c=this;l=_.document.createRange?function(t){return t}:Math.round,t=c.getEl().style,i=c._layoutRect,a=c._lastRepaintRect||{},o=(r=c.borderBox).left+r.right,s=r.top+r.bottom,i.x!==a.x&&(t.left=l(i.x)+"px",a.x=i.x),i.y!==a.y&&(t.top=l(i.y)+"px",a.y=i.y),i.w!==a.w&&(u=l(i.w-o),t.width=(0<=u?u:0)+"px",a.w=i.w),i.h!==a.h&&(u=l(i.h-s),t.height=(0<=u?u:0)+"px",a.h=i.h),c._hasBody&&i.innerW!==a.innerW&&(u=l(i.innerW),(n=c.getEl("body"))&&((e=n.style).width=(0<=u?u:0)+"px"),a.innerW=i.innerW),c._hasBody&&i.innerH!==a.innerH&&(u=l(i.innerH),(n=n||c.getEl("body"))&&((e=e||n.style).height=(0<=u?u:0)+"px"),a.innerH=i.innerH),c._lastRepaintRect=a,c.fire("repaint",{},!1)},updateLayoutRect:function(){var t=this;t.parent()._lastRect=null,Mt.css(t.getEl(),{width:"",height:""}),t._layoutRect=t._lastRepaintRect=t._lastLayoutRect=null,t.initLayoutRect()},on:function(t,e){var n,i,r,o=this;return le(o).on(t,"string"!=typeof(n=e)?n:function(t){return i||o.parentsAndSelf().each(function(t){var e=t.settings.callbacks;if(e&&(i=e[n]))return r=t,!1}),i?i.call(r,t):(t.action=n,void this.fire("execute",t))}),o},off:function(t,e){return le(this).off(t,e),this},fire:function(t,e,n){if((e=e||{}).control||(e.control=this),e=le(this).fire(t,e),!1!==n&&this.parent)for(var i=this.parent();i&&!e.isPropagationStopped();)i.fire(t,e,!1),i=i.parent();return e},hasEventListeners:function(t){return le(this).has(t)},parents:function(t){var e,n=new Xt;for(e=this.parent();e;e=e.parent())n.add(e);return t&&(n=n.filter(t)),n},parentsAndSelf:function(t){return new Xt(this).add(this.parents(t))},next:function(){var t=this.parent().items();return t[t.indexOf(this)+1]},prev:function(){var t=this.parent().items();return t[t.indexOf(this)-1]},innerHtml:function(t){return this.$el.html(t),this},getEl:function(t){var e=t?this._id+"-"+t:this._id;return this._elmCache[e]||(this._elmCache[e]=Nt("#"+e)[0]),this._elmCache[e]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(t){}return this},blur:function(){return this.getEl().blur(),this},aria:function(t,e){var n=this,i=n.getEl(n.ariaTarget);return void 0===e?n._aria[t]:(n._aria[t]=e,n.state.get("rendered")&&i.setAttribute("role"===t?t:"aria-"+t,e),n)},encode:function(t,e){return!1!==e&&(t=this.translate(t)),(t||"").replace(/[&<>"]/g,function(t){return"&#"+t.charCodeAt(0)+";"})},translate:function(t){return Zt.translate?Zt.translate(t):t},before:function(t){var e=this.parent();return e&&e.insert(t,e.items().indexOf(this),!0),this},after:function(t){var e=this.parent();return e&&e.insert(t,e.items().indexOf(this)),this},remove:function(){var e,t,n=this,i=n.getEl(),r=n.parent();if(n.items){var o=n.items().toArray();for(t=o.length;t--;)o[t].remove()}r&&r.items&&(e=[],r.items().each(function(t){t!==n&&e.push(t)}),r.items().set(e),r._lastRect=null),n._eventsRoot&&n._eventsRoot===n&&Nt(i).off();var s=n.getRoot().controlIdLookup;return s&&delete s[n._id],i&&i.parentNode&&i.parentNode.removeChild(i),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(t){return Nt(t).before(this.renderHtml()),this.postRender(),this},renderTo:function(t){return Nt(t||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'
'},postRender:function(){var t,e,n,i,r,o=this,s=o.settings;for(i in o.$el=Nt(o.getEl()),o.state.set("rendered",!0),s)0===i.indexOf("on")&&o.on(i.substr(2),s[i]);if(o._eventsRoot){for(n=o.parent();!r&&n;n=n.parent())r=n._eventsRoot;if(r)for(i in r._nativeEvents)o._nativeEvents[i]=!0}ue(o),s.style&&(t=o.getEl())&&(t.setAttribute("style",s.style),t.style.cssText=s.style),o.settings.border&&(e=o.borderBox,o.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left}));var a=o.getRoot();for(var l in a.controlIdLookup||(a.controlIdLookup={}),(a.controlIdLookup[o._id]=o)._aria)o.aria(l,o._aria[l]);!1===o.state.get("visible")&&(o.getEl().style.display="none"),o.bindStates(),o.state.on("change:visible",function(t){var e,n=t.value;o.state.get("rendered")&&(o.getEl().style.display=!1===n?"none":"",o.getEl().getBoundingClientRect()),(e=o.parent())&&(e._lastRect=null),o.fire(n?"show":"hide"),ee.add(o)}),o.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(t){var e,n,i,r,o,s,a=this.getEl(),l=a.parentNode,u=function(t,e){var n,i,r=t;for(n=i=0;r&&r!==e&&r.nodeType;)n+=r.offsetLeft||0,i+=r.offsetTop||0,r=r.offsetParent;return{x:n,y:i}}(a,l);return e=u.x,n=u.y,i=a.offsetWidth,r=a.offsetHeight,o=l.clientWidth,s=l.clientHeight,"end"===t?(e-=o-i,n-=s-r):"center"===t&&(e-=o/2-i/2,n-=s/2-r/2),l.scrollLeft=e,l.scrollTop=n,this},getRoot:function(){for(var t,e=this,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),e=(t=e).parent()}t||(t=this);for(var i=n.length;i--;)n[i].rootControl=t;return t},reflow:function(){ee.remove(this);var t=this.parent();return t&&t._layout&&!t._layout.isNative()&&t.reflow(),this}};function le(n){return n._eventDispatcher||(n._eventDispatcher=new Pt({scope:n,toggleEvent:function(t,e){e&&Pt.isNative(t)&&(n._nativeEvents||(n._nativeEvents={}),n._nativeEvents[t]=!0,n.state.get("rendered")&&ue(n))}})),n._eventDispatcher}function ue(a){var t,e,n,l,i,r;function o(t){var e=a.getParentCtrl(t.target);e&&e.fire(t.type,t)}function s(){var t=l._lastHoverCtrl;t&&(t.fire("mouseleave",{target:t.getEl()}),t.parents().each(function(t){t.fire("mouseleave",{target:t.getEl()})}),l._lastHoverCtrl=null)}function u(t){var e,n,i,r=a.getParentCtrl(t.target),o=l._lastHoverCtrl,s=0;if(r!==o){if((n=(l._lastHoverCtrl=r).parents().toArray().reverse()).push(r),o){for((i=o.parents().toArray().reverse()).push(o),s=0;sn.x&&r.x+r.wn.y&&r.y+r.h
'+t.encode(t.state.get("text"))+"
"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var t,e;t=this.getEl().style,e=this._layoutRect,t.left=e.x+"px",t.top=e.y+"px",t.zIndex=131070}}),be=ce.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.canFocus=!0,i.tooltip&&!1!==be.tooltips&&(r.on("mouseenter",function(t){var e=r.tooltip().moveTo(-65535);if(t.control===r){var n=e.text(i.tooltip).show().testMoveRel(r.getEl(),["bc-tc","bc-tl","bc-tr"]);e.classes.toggle("tooltip-n","bc-tc"===n),e.classes.toggle("tooltip-nw","bc-tl"===n),e.classes.toggle("tooltip-ne","bc-tr"===n),e.moveRel(r.getEl(),n)}else e.hide()}),r.on("mouseleave mousedown click",function(){r.tooltip().remove(),r._tooltip=null})),r.aria("label",i.ariaLabel||i.tooltip)},tooltip:function(){return this._tooltip||(this._tooltip=new ve({type:"tooltip"}),ie.inheritUiContainer(this,this._tooltip),this._tooltip.renderTo()),this._tooltip},postRender:function(){var t=this,e=t.settings;t._super(),t.parent()||!e.width&&!e.height||(t.initLayoutRect(),t.repaint()),e.autofocus&&t.focus()},bindStates:function(){var e=this;function n(t){e.aria("disabled",t),e.classes.toggle("disabled",t)}function i(t){e.aria("pressed",t),e.classes.toggle("active",t)}return e.state.on("change:disabled",function(t){n(t.value)}),e.state.on("change:active",function(t){i(t.value)}),e.state.get("disabled")&&n(!0),e.state.get("active")&&i(!0),e._super()},remove:function(){this._super(),this._tooltip&&(this._tooltip.remove(),this._tooltip=null)}}),ye=be.extend({Defaults:{value:0},init:function(t){this._super(t),this.classes.add("progress"),this.settings.filter||(this.settings.filter=function(t){return Math.round(t)})},renderHtml:function(){var t=this._id,e=this.classPrefix;return'
0%
'},postRender:function(){return this._super(),this.value(this.settings.value),this},bindStates:function(){var e=this;function n(t){t=e.settings.filter(t),e.getEl().lastChild.innerHTML=t+"%",e.getEl().firstChild.firstChild.style.width=t+"%"}return e.state.on("change:value",function(t){n(t.value)}),n(e.state.get("value")),e._super()}}),xe=function(t,e){t.getEl().lastChild.textContent=e+(t.progressBar?" "+t.progressBar.value()+"%":"")},we=ce.extend({Mixins:[pe],Defaults:{classes:"widget notification"},init:function(t){var e=this;e._super(t),e.maxWidth=t.maxWidth,t.text&&e.text(t.text),t.icon&&(e.icon=t.icon),t.color&&(e.color=t.color),t.type&&e.classes.add("notification-"+t.type),t.timeout&&(t.timeout<0||0'),t=' style="max-width: '+e.maxWidth+"px;"+(e.color?"background-color: "+e.color+';"':'"'),e.closeButton&&(r=''),e.progressBar&&(o=e.progressBar.renderHtml()),''},postRender:function(){var t=this;return c.setTimeout(function(){t.$el.addClass(t.classPrefix+"in"),xe(t,t.state.get("text"))},100),t._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().firstChild.innerHTML=t.value,xe(e,t.value)}),e.progressBar&&(e.progressBar.bindStates(),e.progressBar.state.on("change:value",function(t){xe(e,e.state.get("text"))})),e._super()},close:function(){return this.fire("close").isDefaultPrevented()||this.remove(),this},repaint:function(){var t,e;t=this.getEl().style,e=this._layoutRect,t.left=e.x+"px",t.top=e.y+"px",t.zIndex=65534}});function _e(o){var s=function(t){return t.inline?t.getElement():t.getContentAreaContainer()};return{open:function(t,e){var n,i=C.extend(t,{maxWidth:(n=s(o),Mt.getSize(n).width)}),r=new we(i);return 0<(r.args=i).timeout&&(r.timer=setTimeout(function(){r.close(),e()},i.timeout)),r.on("close",function(){e()}),r.renderTo(),r},close:function(t){t.close()},reposition:function(t){Ct(t,function(t){t.moveTo(0,0)}),function(n){if(0").css({position:"absolute",top:0,left:0,width:f.width,height:f.height,zIndex:2147483647,opacity:1e-4,cursor:d}).appendTo(x.body),Nt(x).on("mousemove touchmove",v).on("mouseup touchend",p),h.start(t)},v=function(t){if(Re(t),t.button!==g)return p(t);t.deltaX=t.screenX-b,t.deltaY=t.screenY-y,t.preventDefault(),h.drag(t)},p=function(t){Re(t),Nt(x).off("mousemove touchmove",v).off("mouseup touchend",p),m.remove(),h.stop&&h.stop(t)},this.destroy=function(){Nt(w).off()},Nt(w).on("mousedown touchstart",e)}var ke=tinymce.util.Tools.resolve("tinymce.ui.Factory"),Ee=function(t){return!!t.getAttribute("data-mce-tabstop")};function He(t){var o,r,n=t.root;function i(t){return t&&1===t.nodeType}try{o=_.document.activeElement}catch(e){o=_.document.body}function s(t){return i(t=t||o)?t.getAttribute("role"):null}function a(t){for(var e,n=t||o;n=n.parentNode;)if(e=s(n))return e}function l(t){var e=o;if(i(e))return e.getAttribute("aria-"+t)}function u(t){var e=t.tagName.toUpperCase();return"INPUT"===e||"TEXTAREA"===e||"SELECT"===e}function c(e){var r=[];return function t(e){if(1===e.nodeType&&"none"!==e.style.display&&!e.disabled){var n;(u(n=e)&&!n.hidden||Ee(n)||/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(s(n)))&&r.push(e);for(var i=0;i=e.length&&(t=0),e[t]&&e[t].focus(),t}function h(t,e){var n=-1,i=d();e=e||c(i.getEl());for(var r=0;r
'+(t.settings.html||"")+e.renderHtml(t)+"
"},postRender:function(){var t,e=this;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e.state.set("rendered",!0),e.settings.style&&e.$el.css(e.settings.style),e.settings.border&&(t=e.borderBox,e.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=He({root:e})),e},initLayoutRect:function(){var t=this._super();return this._layout.recalc(this),t},recalc:function(){var t=this,e=t._layoutRect,n=t._lastRect;if(!n||n.w!==e.w||n.h!==e.h)return t._layout.recalc(t),e=t.layoutRect(),t._lastRect={x:e.x,y:e.y,w:e.w,h:e.h},!0},reflow:function(){var t;if(ee.remove(this),this.visible()){for(ce.repaintControls=[],ce.repaintControls.map={},this.recalc(),t=ce.repaintControls.length;t--;)ce.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),ce.repaintControls=[]}return this}}),We={init:function(){this.on("repaint",this.renderScroll)},renderScroll:function(){var p=this,v=2;function n(){var m,g,t;function e(t,e,n,i,r,o){var s,a,l,u,c,d,f,h;if(a=p.getEl("scroll"+t)){if(f=e.toLowerCase(),h=n.toLowerCase(),Nt(p.getEl("absend")).css(f,p.layoutRect()[i]-1),!r)return void Nt(a).css("display","none");Nt(a).css("display","block"),s=p.getEl("body"),l=p.getEl("scroll"+t+"t"),u=s["client"+n]-2*v,c=(u-=m&&g?a["client"+o]:0)/s["scroll"+n],(d={})[f]=s["offset"+e]+v,d[h]=u,Nt(a).css(d),(d={})[f]=s["scroll"+e]*c,d[h]=u*c,Nt(l).css(d)}}t=p.getEl("body"),m=t.scrollWidth>t.clientWidth,g=t.scrollHeight>t.clientHeight,e("h","Left","Width","contentW",m,"Height"),e("v","Top","Height","contentH",g,"Width")}p.settings.autoScroll&&(p._hasScroll||(p._hasScroll=!0,function(){function t(s,a,l,u,c){var d,t=p._id+"-scroll"+s,e=p.classPrefix;Nt(p.getEl()).append('
'),p.draghelper=new Ce(t+"t",{start:function(){d=p.getEl("body")["scroll"+a],Nt("#"+t).addClass(e+"active")},drag:function(t){var e,n,i,r,o=p.layoutRect();n=o.contentW>o.innerW,i=o.contentH>o.innerH,r=p.getEl("body")["client"+l]-2*v,e=(r-=n&&i?p.getEl("scroll"+s)["client"+c]:0)/p.getEl("body")["scroll"+l],p.getEl("body")["scroll"+a]=d+t["delta"+u]/e},stop:function(){Nt("#"+t).removeClass(e+"active")}})}p.classes.add("scroll"),t("v","Top","Height","Y","Width"),t("h","Left","Width","X","Height")}(),p.on("wheel",function(t){var e=p.getEl("body");e.scrollLeft+=10*(t.deltaX||0),e.scrollTop+=10*t.deltaY,n()}),Nt(p.getEl("body")).on("scroll",n)),n())}},De=Pe.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[We],renderHtml:function(){var t=this,e=t._layout,n=t.settings.html;return t.preRender(),e.preRender(t),void 0===n?n='
'+e.renderHtml(t)+"
":("function"==typeof n&&(n=n.call(t)),t._hasBody=!1),'
'+(t._preBodyHtml||"")+n+"
"}}),Ae={resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,e){if(t<=1||e<=1){var n=Mt.getWindowSize();t=t<=1?t*n.w:t,e=e<=1?e*n.h:e}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:e,w:t,h:e}).reflow()},resizeBy:function(t,e){var n=this.layoutRect();return this.resizeTo(n.w+t,n.h+e)}},Be=[],Le=[];function Ie(t,e){for(;t;){if(t===e)return!0;t=t.parent()}}function ze(){Te||(Te=function(t){2!==t.button&&function(t){for(var e=Be.length;e--;){var n=Be[e],i=n.getParentCtrl(t.target);if(n.settings.autohide){if(i&&(Ie(i,n)||n.parent()===i))continue;(t=n.fire("autohide",{target:t.target})).isDefaultPrevented()||n.hide()}}}(t)},Nt(_.document).on("click touchstart",Te))}function Fe(r){var t=Mt.getViewPort().y;function e(t,e){for(var n,i=0;it&&(r.fixed(!1).layoutRect({y:r._autoFixY}).repaint(),e(!1,r._autoFixY-t)):(r._autoFixY=r.layoutRect().y,r._autoFixY').appendTo(i.getContainerElm())),c.setTimeout(function(){e.addClass(n+"in"),Nt(i.getEl()).addClass(n+"in")}),Ne=!0),Ue(!0,i)}}),i.on("show",function(){i.parents().each(function(t){if(t.state.get("fixed"))return i.fixed(!0),!1})}),t.popover&&(i._preBodyHtml='
',i.classes.add("popover").add("bottom").add(i.isRtl()?"end":"start")),i.aria("label",t.ariaLabel),i.aria("labelledby",i._id),i.aria("describedby",i.describedBy||i._id+"-none")},fixed:function(t){var e=this;if(e.state.get("fixed")!==t){if(e.state.get("rendered")){var n=Mt.getViewPort();t?e.layoutRect().y-=n.y:e.layoutRect().y+=n.y}e.classes.toggle("fixed",t),e.state.set("fixed",t)}return e},show:function(){var t,e=this._super();for(t=Be.length;t--&&Be[t]!==this;);return-1===t&&Be.push(this),e},hide:function(){return qe(this),Ue(!1,this),this._super()},hideAll:function(){Ve.hideAll()},close:function(){return this.fire("close").isDefaultPrevented()||(this.remove(),Ue(!1,this)),this},remove:function(){qe(this),this._super()},postRender:function(){return this.settings.bodyRole&&this.getEl("body").setAttribute("role",this.settings.bodyRole),this._super()}});function qe(t){var e;for(e=Be.length;e--;)Be[e]===t&&Be.splice(e,1);for(e=Le.length;e--;)Le[e]===t&&Le.splice(e,1)}Ve.hideAll=function(){for(var t=Be.length;t--;){var e=Be[t];e&&e.settings.autohide&&(e.hide(),Be.splice(t,1))}};var Ye=[],$e="";function Xe(t){var e,n=Nt("meta[name=viewport]")[0];!1!==h.overrideViewPort&&(n||((n=_.document.createElement("meta")).setAttribute("name","viewport"),_.document.getElementsByTagName("head")[0].appendChild(n)),(e=n.getAttribute("content"))&&void 0!==$e&&($e=e),n.setAttribute("content",t?"width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0":$e))}function je(t,e){(function(){for(var t=0;tt.w&&(n=t.x-Math.max(0,e/2),r.layoutRect({w:e,x:n}),i=!0),o&&(o.layoutRect({w:r.layoutRect().innerW}).recalc(),(e=o.layoutRect().minW+t.deltaW)>t.w&&(n=t.x-Math.max(0,e-t.w),r.layoutRect({w:e,x:n}),i=!0)),i&&r.recalc()},initLayoutRect:function(){var t,e=this,n=e._super(),i=0;if(e.settings.title&&!e._fullscreen){t=e.getEl("head");var r=Mt.getSize(t);n.headerW=r.width,n.headerH=r.height,i+=n.headerH}e.statusbar&&(i+=e.statusbar.layoutRect().h),n.deltaH+=i,n.minH+=i,n.h+=i;var o=Mt.getWindowSize();return n.x=e.settings.x||Math.max(0,o.w/2-n.w/2),n.y=e.settings.y||Math.max(0,o.h/2-n.h/2),n},renderHtml:function(){var t=this,e=t._layout,n=t._id,i=t.classPrefix,r=t.settings,o="",s="",a=r.html;return t.preRender(),e.preRender(t),r.title&&(o='
'+t.encode(r.title)+'
'),r.url&&(a=''),void 0===a&&(a=e.renderHtml(t)),t.statusbar&&(s=t.statusbar.renderHtml()),'
'+o+'
'+a+"
"+s+"
"},fullscreen:function(t){var n,e,i=this,r=_.document.documentElement,o=i.classPrefix;if(t!==i._fullscreen)if(Nt(_.window).on("resize",function(){var t;if(i._fullscreen)if(n)i._timer||(i._timer=c.setTimeout(function(){var t=Mt.getWindowSize();i.moveTo(0,0).resizeTo(t.w,t.h),i._timer=0},50));else{t=(new Date).getTime();var e=Mt.getWindowSize();i.moveTo(0,0).resizeTo(e.w,e.h),50<(new Date).getTime()-t&&(n=!0)}}),e=i.layoutRect(),i._fullscreen=t){i._initial={x:e.x,y:e.y,w:e.w,h:e.h},i.borderBox=Wt("0"),i.getEl("head").style.display="none",e.deltaH-=e.headerH+2,Nt([r,_.document.body]).addClass(o+"fullscreen"),i.classes.add("fullscreen");var s=Mt.getWindowSize();i.moveTo(0,0).resizeTo(s.w,s.h)}else i.borderBox=Wt(i.settings.border),i.getEl("head").style.display="",e.deltaH+=e.headerH,Nt([r,_.document.body]).removeClass(o+"fullscreen"),i.classes.remove("fullscreen"),i.moveTo(i._initial.x,i._initial.y).resizeTo(i._initial.w,i._initial.h);return i.reflow()},postRender:function(){var e,n=this;setTimeout(function(){n.classes.add("in"),n.fire("open")},0),n._super(),n.statusbar&&n.statusbar.postRender(),n.focus(),this.dragHelper=new Ce(n._id+"-dragh",{start:function(){e={x:n.layoutRect().x,y:n.layoutRect().y}},drag:function(t){n.moveTo(e.x+t.deltaX,e.y+t.deltaY)}}),n.on("submit",function(t){t.isDefaultPrevented()||n.close()}),Ye.push(n),Xe(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var t,e=this;for(e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),je(e.classPrefix,!1),t=Ye.length;t--;)Ye[t]===e&&Ye.splice(t,1);Xe(0",n=0;n
";r+=""}return r+="",r+=""}(r,o)),(t=i.dom.select("*[data-mce-id]")[0]).removeAttribute("data-mce-id"),e=i.dom.select("td,th",t),i.selection.setCursorLocation(e[0],0)}))},wn=function(t,e){t.execCommand("FormatBlock",!1,e)},_n=function(t,e,n){var i,r;r=(i=t.editorUpload.blobCache).create(un("mceu"),n,e),i.add(r),t.insertContent(t.dom.createHTML("img",{src:r.blobUri()}))},Rn=function(t,e){0===e.trim().length?bn(t):yn(t,e)},Cn=bn,kn=function(n,t){n.addButton("quicklink",{icon:"link",tooltip:"Insert/Edit link",stateSelector:"a[href]",onclick:function(){t.showForm(n,"quicklink")}}),n.addButton("quickimage",{icon:"image",tooltip:"Insert image",onclick:function(){an().then(function(t){var e=t[0];sn(e).then(function(t){_n(n,t,e)})})}}),n.addButton("quicktable",{icon:"table",tooltip:"Insert table",onclick:function(){t.hide(),xn(n,2,2)}}),function(e){for(var t=function(t){return function(){wn(e,t)}},n=1;n<6;n++){var i="h"+n;e.addButton(i,{text:i.toUpperCase(),tooltip:"Heading "+n,stateSelector:i,onclick:t(i),onPostRender:function(){this.getEl().firstChild.firstChild.style.fontWeight="bold"}})}}(n)},En=function(){var t=h.container;if(t&&"static"!==v.DOM.getStyle(t,"position",!0)){var e=v.DOM.getPos(t),n=e.x-t.scrollLeft,i=e.y-t.scrollTop;return vt.some({x:n,y:i})}return vt.none()},Hn=function(t){return/^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(t.trim())},Tn=function(t){return/^https?:\/\//.test(t.trim())},Sn=function(t,e){return!Tn(e)&&Hn(e)?(n=t,i=e,new on(function(e){n.windowManager.confirm("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){e(!0===t?"http://"+i:i)})})):on.resolve(e);var n,i},Mn=function(r,e){var t,n,i,o={};return t="quicklink",n={items:[{type:"button",name:"unlink",icon:"unlink",onclick:function(){r.focus(),Cn(r),e()},tooltip:"Remove link"},{type:"filepicker",name:"linkurl",placeholder:"Paste or type a link",filetype:"file",onchange:function(t){var e=t.meta;e&&e.attach&&(o={href:this.value(),attach:e.attach})}},{type:"button",icon:"checkmark",subtype:"primary",tooltip:"Ok",onclick:"submit"}],onshow:function(t){if(t.control===this){var e,n="";(e=r.dom.getParent(r.selection.getStart(),"a[href]"))&&(n=r.dom.getAttrib(e,"href")),this.fromJSON({linkurl:n}),i=this.find("#unlink"),e?i.show():i.hide(),this.find("#linkurl")[0].focus()}var i},onsubmit:function(t){Sn(r,t.data.linkurl).then(function(t){r.undoManager.transact(function(){t===o.href&&(o.attach(),o={}),Rn(r,t)}),e()})}},(i=ke.create(C.extend({type:"form",layout:"flex",direction:"row",padding:5,name:t,spacing:3},n))).on("show",function(){i.find("textbox").eq(0).each(function(t){t.focus()})}),i},Nn=function(n,t,e){var o,i,s=[];if(e)return C.each(L(i=e)?i:W(i)?i.split(/[ ,]/):[],function(t){if("|"===t)o=null;else if(n.buttons[t]){o||(o={type:"buttongroup",items:[]},s.push(o));var e=n.buttons[t];B(e)&&(e=e()),e.type=e.type||"button",(e=ke.create(e)).on("postRender",(i=n,r=e,function(){var e,t,n=(t=function(t,e){return{selector:t,handler:e}},(e=r).settings.stateSelector?t(e.settings.stateSelector,function(t){e.active(t)}):e.settings.disabledStateSelector?t(e.settings.disabledStateSelector,function(t){e.disabled(t)}):null);null!==n&&i.selection.selectorChanged(n.selector,n.handler)})),o.items.push(e)}var i,r}),ke.create({type:"toolbar",layout:"flow",name:t,items:s})},On=function(){var l,c,o=function(t){return 0'+this._super(t)}}),Dn=be.extend({Defaults:{classes:"widget btn",role:"button"},init:function(t){var e,n=this;n._super(t),t=n.settings,e=n.settings.size,n.on("click mousedown",function(t){t.preventDefault()}),n.on("touchstart",function(t){n.fire("click",t),t.preventDefault()}),t.subtype&&n.classes.add(t.subtype),e&&n.classes.add("btn-"+e),t.icon&&n.icon(t.icon)},icon:function(t){return arguments.length?(this.state.set("icon",t),this):this.state.get("icon")},repaint:function(){var t,e=this.getEl().firstChild;e&&((t=e.style).width=t.height="100%"),this._super()},renderHtml:function(){var t,e,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a="",l=n.settings;return(t=l.image)?(o="none","string"!=typeof t&&(t=_.window.getSelection?t[0]:t[1]),t=" style=\"background-image: url('"+t+"')\""):t="",s&&(n.classes.add("btn-has-text"),a=''+n.encode(s)+""),o=o?r+"ico "+r+"i-"+o:"",e="boolean"==typeof l.active?' aria-pressed="'+l.active+'"':"",'
"},bindStates:function(){var o=this,n=o.$,i=o.classPrefix+"txt";function s(t){var e=n("span."+i,o.getEl());t?(e[0]||(n("button:first",o.getEl()).append(''),e=n("span."+i,o.getEl())),e.html(o.encode(t))):e.remove(),o.classes.toggle("btn-has-text",!!t)}return o.state.on("change:text",function(t){s(t.value)}),o.state.on("change:icon",function(t){var e=t.value,n=o.classPrefix;e=(o.settings.icon=e)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];e?(r&&r===i.firstChild||(r=_.document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=e):r&&i.removeChild(r),s(o.state.get("text"))}),o._super()}}),An=Dn.extend({init:function(t){t=C.extend({text:"Browse...",multiple:!1,accept:null},t),this._super(t),this.classes.add("browsebutton"),t.multiple&&this.classes.add("multiple")},postRender:function(){var n=this,e=Mt.create("input",{type:"file",id:n._id+"-browse",accept:n.settings.accept});n._super(),Nt(e).on("change",function(t){var e=t.target.files;n.value=function(){return e.length?n.settings.multiple?e:e[0]:null},t.preventDefault(),e.length&&n.fire("change",t)}),Nt(e).on("click",function(t){t.stopPropagation()}),Nt(n.getEl("button")).on("click",function(t){t.stopPropagation(),e.click()}),n.getEl().appendChild(e)},remove:function(){Nt(this.getEl("button")).off(),Nt(this.getEl("input")).off(),this._super()}}),Bn=Pe.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var t=this,e=t._layout;return t.classes.add("btn-group"),t.preRender(),e.preRender(t),'
'+(t.settings.html||"")+e.renderHtml(t)+"
"}}),Ln=be.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(t){var e=this;e._super(t),e.on("click mousedown",function(t){t.preventDefault()}),e.on("click",function(t){t.preventDefault(),e.disabled()||e.checked(!e.checked())}),e.checked(e.settings.checked)},checked:function(t){return arguments.length?(this.state.set("checked",t),this):this.state.get("checked")},value:function(t){return arguments.length?this.checked(t):this.checked()},renderHtml:function(){var t=this,e=t._id,n=t.classPrefix;return'
'+t.encode(t.state.get("text"))+"
"},bindStates:function(){var o=this;function e(t){o.classes.toggle("checked",t),o.aria("checked",t)}return o.state.on("change:text",function(t){o.getEl("al").firstChild.data=o.translate(t.value)}),o.state.on("change:checked change:value",function(t){o.fire("change"),e(t.value)}),o.state.on("change:icon",function(t){var e=t.value,n=o.classPrefix;if(void 0===e)return o.settings.icon;e=(o.settings.icon=e)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];e?(r&&r===i.firstChild||(r=_.document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=e):r&&i.removeChild(r)}),o.state.get("checked")&&e(!0),o._super()}}),In=tinymce.util.Tools.resolve("tinymce.util.VK"),zn=be.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.classes.add("combobox"),r.subinput=!0,r.ariaTarget="inp",i.menu=i.menu||i.values,i.menu&&(i.icon="caret"),r.on("click",function(t){var e=t.target,n=r.getEl();if(Nt.contains(n,e)||e===n)for(;e&&e!==n;)e.id&&-1!==e.id.indexOf("-open")&&(r.fire("action"),i.menu&&(r.showMenu(),t.aria&&r.menu.items()[0].focus())),e=e.parentNode}),r.on("keydown",function(t){var e;13===t.keyCode&&"INPUT"===t.target.nodeName&&(t.preventDefault(),r.parents().reverse().each(function(t){if(t.toJSON)return e=t,!1}),r.fire("submit",{data:e.toJSON()}))}),r.on("keyup",function(t){if("INPUT"===t.target.nodeName){var e=r.state.get("value"),n=t.target.value;n!==e&&(r.state.set("value",n),r.fire("autocomplete",t))}}),r.on("mouseover",function(t){var e=r.tooltip().moveTo(-65535);if(r.statusLevel()&&-1!==t.target.className.indexOf(r.classPrefix+"status")){var n=r.statusMessage()||"Ok",i=e.text(n).show().testMoveRel(t.target,["bc-tc","bc-tl","bc-tr"]);e.classes.toggle("tooltip-n","bc-tc"===i),e.classes.toggle("tooltip-nw","bc-tl"===i),e.classes.toggle("tooltip-ne","bc-tr"===i),e.moveRel(t.target,i)}})},statusLevel:function(t){return 0