tinymce-rails 5.10.3 → 5.10.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/source/tinymce/tinymce.js +3 -3
  3. data/lib/tinymce/rails/version.rb +2 -2
  4. data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -1
  5. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -1
  6. data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -1
  7. data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -1
  8. data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -1
  9. data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -1
  10. data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -1
  11. data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
  12. data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
  13. data/vendor/assets/javascripts/tinymce/plugins/colorpicker/plugin.js +1 -1
  14. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -1
  15. data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -1
  16. data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -1
  17. data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -1
  18. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -1
  19. data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +1 -1
  20. data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -1
  21. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -1
  22. data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +1 -1
  23. data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +1 -1
  24. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -1
  25. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -1
  26. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -1
  27. data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -1
  28. data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -1
  29. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -1
  30. data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -1
  31. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -1
  32. data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -1
  33. data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -1
  34. data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -1
  35. data/vendor/assets/javascripts/tinymce/plugins/quickbars/plugin.js +1 -1
  36. data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -1
  37. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -1
  38. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -1
  39. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +1 -1
  40. data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -1
  41. data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -1
  42. data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -1
  43. data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +1 -1
  44. data/vendor/assets/javascripts/tinymce/plugins/toc/plugin.js +1 -1
  45. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -1
  46. data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -1
  47. data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -1
  48. data/vendor/assets/javascripts/tinymce/themes/mobile/theme.js +1 -1
  49. data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +2 -2
  50. data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
  51. metadata +2 -2
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function e(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}}function t(t){return function(e){return typeof e===t}}function D(e){return!(null==e)}function l(){}function a(e){return function(){return e}}function n(e){return e}function r(){return g}var i,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=function(){return(v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},T=e("string"),s=e("object"),c=e("array"),N=t("boolean"),w=t("function"),u=t("number"),m=a(!1),d=a(!(i=null)),g={fold:function(e,t){return e()},isSome:m,isNone:d,getOr:n,getOrThunk:p,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(void 0),or:n,orThunk:p,map:r,each:l,bind:r,exists:m,forall:d,filter:function(){return g},toArray:function(){return[]},toString:a("none()")};function p(e){return e()}function f(e,a,o,l){return function(e){for(var t=y(e),n=0,r=t.length;n<r;n++){var i=t[n];!function(e,t){(a(e,t)?o:l)(e,t)}(e[i],i)}}(e),1}function h(e,t){return A.call(e,t)}function S(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!c(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);U.apply(t,e[n])}return t}var b=function(n){function e(){return i}function t(e){return e(n)}var r=a(n),i={fold:function(e,t){return t(n)},isSome:d,isNone:m,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return b(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?i:g},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return i},L={some:b,none:r,from:function(e){return null==e?g:b(e)}},y=Object.keys,A=Object.hasOwnProperty,U=Array.prototype.push;function I(e,t,n){!function(e,t,n){if(!(T(n)||N(n)||u(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}(e.dom,t,n)}function C(e){return e.getParam("image_dimensions",!0,"boolean")}function x(e,t){return Math.max(parseInt(e,10),parseInt(t,10))}function O(e){return e&&e.replace(/px$/,"")}function P(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e}function _(e){if(e.margin){var t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e}function E(e){return"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder"))}function R(e,t){return we.isDomSafe(t,"img",e.settings)}function k(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?O(e.style.marginLeft):""}function z(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?O(e.style.marginTop):""}function M(e){return e.style.borderWidth?O(e.style.borderWidth):""}function j(e,t){return e.hasAttribute(t)?e.getAttribute(t):""}function B(e,t){return e.style[t]||""}function H(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName}function F(e,t,n){""===n?e.removeAttribute(t):e.setAttribute(t,n)}function G(e,t){var n=e.getAttribute("style"),r=t(null!==n?n:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")}function W(e,r){return function(e,t,n){e.style[t]?(e.style[t]=P(n),G(e,r)):F(e,t,n)}}function V(e,t){return e.style[t]?O(e.style[t]):j(e,t)}function $(e,t){var n=P(t);e.style.marginLeft=n,e.style.marginRight=n}function J(e,t){var n=P(t);e.style.marginTop=n,e.style.marginBottom=n}function K(e,t){var n=P(t);e.style.borderWidth=n}function X(e,t){e.style.borderStyle=t}function Z(e){return"FIGURE"===e.nodeName}function q(e){return 0===Ue.getAttrib(e,"alt").length&&"presentation"===Ue.getAttrib(e,"role")}function Q(){return{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}}function Y(e,t){return{src:j(t,"src"),alt:q(n=t)?"":j(n,"alt"),title:j(t,"title"),width:V(t,"width"),height:V(t,"height"),class:j(t,"class"),style:e(j(t,"style")),caption:H(t),hspace:k(t),vspace:z(t),border:M(t),borderStyle:B(t,"borderStyle"),isDecorative:q(t)};var n}function ee(e,t,n,r,i){n[r]!==t[r]&&i(e,r,n[r])}function te(r,i){return function(e,t,n){r(e,n),G(e,i)}}function ne(e,t){var n=_(e.dom.styles.parse(t)),r=e.dom.styles.parse(e.dom.styles.serialize(n));return e.dom.styles.serialize(r)}function re(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return n?e.dom.select("img",n)[0]:t&&("IMG"!==t.nodeName||E(t))?null:t}function ie(n,e){var r,t,i=n.dom,a=(f(n.schema.getTextBlockElements(),function(e,t){return!n.schema.isValidChild(t,"figure")},(r=t={},function(e,t){r[t]=e}),l),t),o=i.getParent(e.parentNode,function(e){return h(t=a,n=e.nodeName)&&null!=t[n];var t,n},n.getBody());return o?i.split(o,e):e}function ae(r,e){var t=function(e){var t=document.createElement("img");if(Ce(function(e){return ne(r,e)},v(v({},e),{caption:!1}),t),Ie(t,e.alt,e.isDecorative),e.caption){var n=Ue.create("figure",{class:"image"});return n.appendChild(t),n.appendChild(Ue.create("figcaption",{contentEditable:"true"},"Caption")),n.contentEditable="false",n}return t}(e);r.dom.setAttrib(t,"data-mce-id","__mcenew"),r.focus(),r.selection.setContent(t.outerHTML);var n,i=r.dom.select('*[data-mce-id="__mcenew"]')[0];r.dom.setAttrib(i,"data-mce-id",null),Z(i)?(n=ie(r,i),r.selection.select(n)):r.selection.select(i)}function oe(t,e){var n,r,i,a,o,l,s,c,u,m,d,g,p,f,h,b=re(t);function y(){f.onload=f.onerror=null,g.selection&&(g.selection.select(f),g.nodeChanged())}b?(n=Y(function(e){return ne(t,e)},b),r=v(v({},n),e),s=t,c=r.src,i=v(v({},r),{src:R(s,c)?c:""}),r.src?(m=i,h=re(u=t),Ce(function(e){return ne(u,e)},m,h),u.dom.setAttrib(h,"src",h.getAttribute("src")),Z(h.parentNode)?(d=h.parentNode,ie(u,d),u.selection.select(h.parentNode)):(u.selection.select(h),g=u,p=m,(f=h).onload=function(){p.width||p.height||!C(g)||g.dom.setAttribs(f,{width:String(f.clientWidth),height:String(f.clientHeight)}),y()},f.onerror=y)):(a=t,(o=b)&&(l=a.dom.is(o.parentNode,"figure.image")?o.parentNode:o,a.dom.remove(l),a.focus(),a.nodeChanged(),a.dom.isEmpty(a.getBody())&&(a.setContent(""),a.selection.setCursorLocation())))):e.src&&ae(t,v(v({},Q()),e))}function le(e){return T(e.value)?e.value:""}function se(t){return void 0===t&&(t=le),function(e){return e?L.from(e).map(function(e){return Ne(e,t)}):L.none()}}function ce(e){var t=e.imageList.map(function(e){return{name:"images",type:"listbox",label:"Image list",items:e}}),n={name:"alt",type:"input",label:"Alternative description",disabled:e.hasAccessibilityOptions&&e.image.isDecorative},r=e.classList.map(function(e){return{name:"classes",type:"listbox",label:"Class",items:e}});return S([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[n]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[v(v({},e.classList.isSome()&&e.hasImageCaption?{type:"grid",columns:2}:{type:"panel"}),{items:S([r.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])})]])}function ue(e){return{src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}}function me(e,t){return{src:e.src.value,alt:0===e.alt.length&&t?null:e.alt,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}}function de(e,t,n,r){var i,a,o,l,s,c,u,m,d,g,p,f,h,b,y,v,A,D,w,S,U,I,C,x,O;U=t,C=(I=r).getData(),x=U,O=C.src.value,(/^(?:[a-zA-Z]+:)?\/\//.test(O)?L.none():x.prependURL.bind(function(e){return O.substring(0,e.length)!==e?L.some(e+O):L.none()})).each(function(e){I.setData({src:{value:e,meta:C.src.meta}})}),h=t,w=(b=r).getData(),void 0!==(S=w.src.meta)&&(y=xe({},w),A=y,D=S,(v=h).hasDescription&&T(D.alt)&&(A.alt=D.alt),v.hasAccessibilityOptions&&(A.isDecorative=D.isDecorative||A.isDecorative||!1),v.hasImageTitle&&T(D.title)&&(A.title=D.title),v.hasDimensions&&(T(D.width)&&(A.dimensions.width=D.width),T(D.height)&&(A.dimensions.height=D.height)),T(D.class)&&Ee(v.classList,D.class).each(function(e){A.classes=e.value}),v.hasImageCaption&&N(D.caption)&&(A.caption=D.caption),v.hasAdvTab&&(T(D.style)&&(A.style=D.style),T(D.vspace)&&(A.vspace=D.vspace),T(D.border)&&(A.border=D.border),T(D.hspace)&&(A.hspace=D.hspace),T(D.borderstyle)&&(A.borderstyle=D.borderstyle)),b.setData(y)),i=e,a=t,o=n,c=(s=(l=r).getData()).src.value,(u=s.src.meta||{}).width||u.height||!a.hasDimensions||(0<c.length?i.imageSize(c).then(function(e){o.open&&l.setData({dimensions:e})}).catch(function(e){return console.error(e)}):l.setData({dimensions:{width:"",height:""}})),m=t,d=n,p=(g=r).getData(),f=Ee(m.imageList,p.src.value),d.prevImage=f,g.setData({images:f.map(function(e){return e.value}).getOr("")})}function ge(l,s,t,c){var e,n=c.getData();c.block("Uploading image"),(0<(e=n.fileinput).length?L.some(e[0]):L.none()).fold(function(){c.unblock()},function(n){function r(){c.unblock(),URL.revokeObjectURL(a)}function i(e){c.setData({src:{value:e,meta:{}}}),c.showTab("general"),de(l,s,t,c)}var a=URL.createObjectURL(n),o=n;new De(function(e,t){var n=new FileReader;n.onload=function(){e(n.result)},n.onerror=function(){t(n.error.message)},n.readAsDataURL(o)}).then(function(e){var t=l.createBlobCache(n,a,e);s.automaticUploads?l.uploadImage(t).then(function(e){i(e.url),r()}).catch(function(e){r(),l.alertErr(e)}):(l.addToBlobCache(t),i(t.blobUri()),c.unblock())})})}function pe(S,U,I){return function(e,t){var n,r,i,a,o,l,s,c,u,m,d,g,p,f,h,b,y,v,A,D,w;"src"===t.name?de(S,U,I,e):"images"===t.name?(c=S,u=U,m=I,g=(d=e).getData(),(p=Ee(u.imageList,g.images)).each(function(e){""===g.alt||m.prevImage.map(function(e){return e.text===g.alt}).getOr(!1)?""===e.value?d.setData({src:e,alt:m.prevAlt}):d.setData({src:e,alt:e.text}):d.setData({src:e})}),m.prevImage=p,de(c,u,m,d)):"alt"===t.name?I.prevAlt=e.getData().alt:"style"===t.name?(o=S,s=(l=e).getData(),y=o.parseStyle,v=o.serializeStyle,D=_(y((A=s).style)),(w=xe({},A)).vspace=D["margin-top"]&&D["margin-bottom"]&&D["margin-top"]===D["margin-bottom"]?O(String(D["margin-top"])):"",w.hspace=D["margin-right"]&&D["margin-left"]&&D["margin-right"]===D["margin-left"]?O(String(D["margin-right"])):"",w.border=D["border-width"]?O(String(D["border-width"])):"",w.borderstyle=D["border-style"]?String(D["border-style"]):"",w.style=v(y(v(D))),l.setData(w)):"vspace"===t.name||"hspace"===t.name||"border"===t.name||"borderstyle"===t.name?(n=S,i=xe(ue(U.image),(r=e).getData()),f=n.normalizeCss,h=me(i,!1),F(b=document.createElement("img"),"style",h.style),!k(b)&&""===h.hspace||$(b,h.hspace),!z(b)&&""===h.vspace||J(b,h.vspace),!M(b)&&""===h.border||K(b,h.border),!B(b,"borderStyle")&&""===h.borderStyle||X(b,h.borderStyle),a=f(b.getAttribute("style")),r.setData({style:a})):"fileinput"===t.name?ge(S,U,I,e):"isDecorative"===t.name&&(e.getData().isDecorative?e.disable("alt"):e.enable("alt"))}}function fe(v){var t,n,r,i,a,o,l,s,c,A={onSubmit:function(n){return function(e){var t=xe(ue(n.image),e.getData());c.execCommand("mceUpdateImage",!1,me(t,n.hasAccessibilityOptions)),c.editorUpload.uploadImagesAuto(),e.close()}},imageSize:function(e){return R(s,e)?(i=s.documentBaseURI.toAbsolute(e),new De(function(t){function n(e){r.onload=r.onerror=null,r.parentNode&&r.parentNode.removeChild(r),t(e)}var r=document.createElement("img");r.onload=function(){var e=x(r.width,r.clientWidth),t=x(r.height,r.clientHeight);n(De.resolve({width:e,height:t}))},r.onerror=function(){n(De.reject("Failed to get image dimensions for: "+i))};var e=r.style;e.visibility="hidden",e.position="fixed",e.bottom=e.left="0px",e.width=e.height="auto",document.body.appendChild(r),r.src=i}).then(function(e){return{width:String(e.width),height:String(e.height)}})):De.resolve({width:"",height:""});var i},addToBlobCache:function(e){l.editorUpload.blobCache.add(e)},createBlobCache:function(e,t,n){return o.editorUpload.blobCache.create({blob:e,blobUri:t,name:e.name?e.name.replace(/\.[^\.]+$/,""):null,filename:e.name,base64:n.split(",")[1]})},alertErr:function(e){a.windowManager.alert(e)},normalizeCss:function(e){return ne(i,e)},parseStyle:function(e){return r.dom.parseStyle(e)},serializeStyle:function(e,t){return n.dom.serializeStyle(e,t)},uploadImage:(t=n=r=i=a=o=l=s=c=v,function(e){return Oe(t).upload([e],!1).then(function(e){return 0===e.length?De.reject("Failed to upload image"):!1===e[0].status?De.reject(e[0].error.message):e[0]})})};return{open:function(){var a,r,t,e,i,n,o,l,s,c,u,m,d,g,p,f,h,b,y;r=v,i=Pe(function(e){return r.convertURL(e.value||e.url,"src")}),n=new De(function(t){var n=function(e){t(i(e).map(function(e){return S([[{text:"None",value:""}],e])}))},e=r.getParam("image_list",!1);T(e)?Se.send({url:e,success:function(e){n(JSON.parse(e))}}):w(e)?e(n):n(e)}),o=_e(r.getParam("image_class_list")),l=r.getParam("image_advtab",!1,"boolean"),s=r.getParam("image_uploadtab",!0,"boolean"),c=D(r.getParam("images_upload_url")),u=D(r.getParam("images_upload_handler")),m=(e=re(t=r))?Y(function(e){return ne(t,e)},e):Q(),d=r.getParam("image_description",!0,"boolean"),g=r.getParam("image_title",!1,"boolean"),p=C(r),f=r.getParam("image_caption",!1,"boolean"),h=r.getParam("a11y_advanced_options",!1,"boolean"),b=r.getParam("automatic_uploads",!0,"boolean"),y=L.some(r.getParam("image_prepend_url","","string")).filter(function(e){return T(e)&&0<e.length}),n.then(function(e){return{image:m,imageList:e,classList:o,hasAdvTab:l,hasUploadTab:s,hasUploadUrl:c,hasUploadHandler:u,hasDescription:d,hasImageTitle:g,hasDimensions:p,hasImageCaption:f,prependURL:y,hasAccessibilityOptions:h,automaticUploads:b}}).then((a=A,function(e){var t,n,r,i={prevImage:Ee((t=e).imageList,t.image.src),prevAlt:t.image.alt,open:!0};return{title:"Insert/Edit Image",size:"normal",body:(r=e).hasAdvTab||r.hasUploadUrl||r.hasUploadHandler?{type:"tabpanel",tabs:S([[ke(r)],r.hasAdvTab?[Re(r)]:[],r.hasUploadTab&&(r.hasUploadUrl||r.hasUploadHandler)?[Me(r)]:[]])}:{type:"panel",items:ze(r)},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:ue(e.image),onSubmit:a.onSubmit(e),onChange:pe(a,e,i),onClose:(n=i,function(){n.open=!1})}})).then(v.windowManager.open)}}}function he(a){return function(e){for(var t=e.length,n=function(e){e.attr("contenteditable",a?"true":null)};t--;){var r,i=e[t];(r=i.attr("class"))&&/\bimage\b/.test(r)&&(i.attr("contenteditable",a?"false":null),Te.each(i.getAll("figcaption"),n))}}}"undefined"!=typeof window||Function("return this;")();function be(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}}var ye,ve=be,Ae=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),De=tinymce.util.Tools.resolve("tinymce.util.Promise"),we=tinymce.util.Tools.resolve("tinymce.util.URI"),Se=tinymce.util.Tools.resolve("tinymce.util.XHR"),Ue=Ae.DOM,Ie=function(e,t,n){n?(Ue.setAttrib(e,"role","presentation"),I(ve(e),"alt","")):(i===t?ve(e).dom.removeAttribute("alt"):I(ve(e),"alt",t),"presentation"===Ue.getAttrib(e,"role")&&Ue.setAttrib(e,"role",""))},Ce=function(e,t,n){var r=Y(e,n);ee(n,r,t,"caption",function(e,t,n){return H(r=e)?(o=r.parentNode,Ue.insertAfter(r,o),Ue.remove(o)):(i=r,a=Ue.create("figure",{class:"image"}),Ue.insertAfter(a,i),a.appendChild(i),a.appendChild(Ue.create("figcaption",{contentEditable:"true"},"Caption")),a.contentEditable="false"),0;var r,i,a,o}),ee(n,r,t,"src",F),ee(n,r,t,"title",F),ee(n,r,t,"width",W(0,e)),ee(n,r,t,"height",W(0,e)),ee(n,r,t,"class",F),ee(n,r,t,"style",te(function(e,t){return F(e,"style",t),0},e)),ee(n,r,t,"hspace",te($,e)),ee(n,r,t,"vspace",te(J,e)),ee(n,r,t,"border",te(K,e)),ee(n,r,t,"borderStyle",te(X,e)),t.alt===r.alt&&t.isDecorative===r.isDecorative||Ie(n,t.alt,t.isDecorative)},xe=(ye=function(e,t){return s(e)&&s(t)?xe(e,t):t},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var i,a=e[r];for(i in a)h(a,i)&&(n[i]=ye(n[i],a[i]))}return n}),Oe=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),Te=tinymce.util.Tools.resolve("tinymce.util.Tools"),Ne=function(e,a){var o=[];return Te.each(e,function(e){var t,n,r,i=T((t=e).text)?t.text:T(t.title)?t.title:"";void 0!==e.menu?(n=Ne(e.menu,a),o.push({text:i,items:n})):(r=a(e),o.push({text:i,value:r}))}),o},Le=function(e,i){return function(e){for(var t,n=0;n<e.length;n++){var r=h(t=e[n],"items")?Le(t.items,i):t.value===i?L.some(t):L.none();if(r.isSome())return r}return L.none()}(e)},Pe=se,_e=function(e){return se(le)(e)},Ee=function(e,t){return e.bind(function(e){return Le(e,t)})},Re=function(e){return{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}},ke=function(e){return{title:"General",name:"general",items:ce(e)}},ze=ce,Me=function(e){return{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}};o.add("image",function(e){var t,n,r;(t=e).on("PreInit",function(){t.parser.addNodeFilter("figure",he(!0)),t.serializer.addNodeFilter("figure",he(!1))}),(n=e).ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:fe(n).open,onSetup:function(e){return e.setActive(D(re(n))),n.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",e.setActive).unbind}}),n.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:fe(n).open}),n.ui.registry.addContextMenu("image",{update:function(e){return Z(e)||"IMG"===e.nodeName&&!E(e)?["image"]:[]}}),(r=e).addCommand("mceImage",fe(r).open),r.addCommand("mceUpdateImage",function(e,t){r.undoManager.transact(function(){return oe(r,t)})})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function c(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function h(e){return null!=e}function r(){}function i(e){return function(){return e}}function e(e){return e}function t(){return d}function s(e){return n=typeof(t=e),"array"==(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n);var t,n}var n,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(e){return typeof e===n},u=i(!(n="function")),l=i(!0),d={fold:function(e,t){return e()},isSome:u,isNone:l,getOr:e,getOrThunk:m,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:e,orThunk:m,map:t,each:r,bind:t,exists:u,forall:l,filter:function(){return d},toArray:function(){return[]},toString:i("none()")};function m(e){return e()}var g=function(n){function e(){return o}function t(e){return e(n)}var r=i(n),o={fold:function(e,t){return t(n)},isSome:l,isNone:u,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return g(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?o:d},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},p={some:g,none:t,from:function(e){return null==e?d:g(e)}},v={},y={exports:v};function w(e,t){return U(document.createElement("canvas"),e,t)}function b(e){var t=w(e.width,e.height);return R(t).drawImage(e,0,0),t}function _(u){return new I(function(e,t){function n(){o.removeEventListener("load",i),o.removeEventListener("error",a)}var r=URL.createObjectURL(u),o=new Image,i=function(){n(),e(o)},a=function(){n(),t("Unable to load data of type "+u.type+": "+r)};o.addEventListener("load",i),o.addEventListener("error",a),o.src=r,o.complete&&setTimeout(i,0)})}function E(e,r,o){return r=r||"image/png",a(HTMLCanvasElement.prototype.toBlob)?new I(function(t,n){e.toBlob(function(e){e?t(e):n()},r,o)}):j(e.toDataURL(r,o))}function T(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function x(e,t){return function(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return p.some(i);if(n(i,r))break}return p.none()}(e,t,u)}!function(){var e=this,t=function(){var e,t,n,r={exports:{}};function o(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(e,this)}function a(n,r){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,i._immediateFn(function(){var e,t=1===n._state?r.onFulfilled:r.onRejected;if(null!==t){try{e=t(n._value)}catch(e){return void c(r.promise,e)}u(r.promise,e)}else(1===n._state?u:c)(r.promise,n._value)})):n._deferreds.push(r)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"==typeof n)return void l((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,s(t)}catch(e){c(t,e)}var r,o}function c(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)a(e,e._deferreds[t]);e._deferreds=null}function f(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,u(t,e))},function(e){n||(n=!0,c(t,e))})}catch(e){if(n)return;n=!0,c(t,e)}}e=r,t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=setTimeout,i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(o);return a(this,new f(e,t,n)),n},i.all=function(e){var u=Array.prototype.slice.call(e);return new i(function(o,i){if(0===u.length)return o([]);for(var a=u.length,e=0;e<u.length;e++)!function t(n,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var r=e.then;if("function"==typeof r)return r.call(e,function(e){t(n,e)},i),0}u[n]=e,0==--a&&o(u)}catch(e){i(e)}}(e,u[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i._immediateFn="function"==typeof setImmediate?function(e){setImmediate(e)}:function(e){n(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},e.exports?e.exports=i:t.Promise||(t.Promise=i);var d=r.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||d}};"object"==typeof v&&void 0!==y?y.exports=t():(e="undefined"!=typeof globalThis?globalThis:e||self).EphoxContactWrapper=t()}();var I=y.exports.boltExport,R=function(e){return e.getContext("2d")},U=function(e,t,n){return e.width=t,e.height=n,e},A=function(r){return new I(function(e,t){var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="blob",n.onload=function(){200===this.status&&e(this.response)},n.onerror=function(){var e;t(0===this.status?((e=new Error("No access to download image")).code=18,e.name="SecurityError",e):new Error("Error "+this.status+" downloading image"))},n.send()})},j=function(h){return new I(function(e,t){!function(){var e=h.split(","),t=/data:([^;]+)/.exec(e[0]);if(!t)return p.none();for(var n=t[1],r=e[1],o=atob(r),i=o.length,a=Math.ceil(i/1024),u=new Array(a),c=0;c<a;++c){for(var s=1024*c,f=Math.min(1024+s,i),l=new Array(f-s),d=s,m=0;d<f;++m,++d)l[m]=o[d].charCodeAt(0);u[c]=new Uint8Array(l)}return p.some(new Blob(u,{type:n}))}().fold(function(){t("uri is not base64: "+h)},e)})},S=function(e){URL.revokeObjectURL(e.src)},M=_,P=Array.prototype.indexOf,O=Object.keys;function L(e,t,n){function r(t,n){return e.then(function(e){return e.toDataURL(t||"image/png",n)})}return{getType:i(t.type),toBlob:function(){return I.resolve(t)},toDataURL:i(n),toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(t,n){return e.then(function(e){return E(e,t,n)})},toAdjustedDataURL:r,toAdjustedBase64:function(e,t){return r(e,t).then(function(e){return e.split(",")[1]})},toCanvas:function(){return e.then(b)}}}function k(t,e){return E(t,e).then(function(e){return L(I.resolve(t),e,t.toDataURL())})}function C(e,t){void 0===t&&(t=2);var n=Math.pow(10,t),r=Math.round(e*n);return Math.ceil(r/n)}function F(t,n,r){return void 0===r&&(r=!1),new I(function(e){var a=new XMLHttpRequest;a.onreadystatechange=function(){4===a.readyState&&e({status:a.status,blob:a.response})},a.open("GET",t,!0),a.withCredentials=r,function(e){for(var t,n=O(e),r=0,o=n.length;r<o;r++){var i=n[r];t=e[i],a.setRequestHeader(i,t)}}(n),a.responseType="blob",a.send()})}function B(e){var t,n=(t=e,"ImageProxy HTTP error: "+x(J,function(e){return t===e.code}).fold(i("Unknown ImageProxy error"),function(e){return e.message}));return I.reject(n)}function N(t){return x(K,function(e){return e.type===t}).fold(i("Unknown service error"),function(e){return e.message})}function D(e){return"ImageProxy Service error: "+function(e){try{return p.some(JSON.parse(e))}catch(e){return p.none()}}(e).bind(function(e){return n=function(e,t){return h(e)?e[t]:void 0},r=e,T(["error","type"],function(e,t){r=n(r,e)}),t=r,p.from(t).map(N);var n,r,t}).getOr("Invalid JSON in service error message")}function H(e){return e<200||300<=e}function z(e,t){var n,r,o,i={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":t};return F((r=t,o=-1===(n=e).indexOf("?")?"?":"&",/[?&]apiKey=/.test(n)?n:n+o+"apiKey="+encodeURIComponent(r)),i).then(function(e){return H(e.status)?(t=e.status,"application/json"!==(null==(n=e.blob)?void 0:n.type)||400!==t&&403!==t&&404!==t&&500!==t?B(t):(r=n,new I(function(e,t){var n=new FileReader;n.onload=function(){e(n.result)},n.onerror=function(e){t(e)},n.readAsText(r)}).then(function(e){var t=D(e);return I.reject(t)}))):I.resolve(e.blob);var r,t,n})}function q(e,t,n){return void 0===n&&(n=!1),t?z(e,t):F(e,{},n).then(function(e){return H(e.status)?B(e.status):I.resolve(e.blob)})}function W(t){return n=t,new I(function(e){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n)}).then(function(e){return L(_(t).then(function(e){S(e);var t=w(e.naturalWidth||e.width,e.naturalHeight||e.height);return R(t).drawImage(e,0,0),t}),t,e)});var n}!function(a){if(!s(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};T(a,function(e,r){var t=O(e);if(1!==t.length)throw new Error("one and only one name per case");var i=t[0],o=e[i];if(void 0!==n[i])throw new Error("duplicate key detected:"+i);if("cata"===i)throw new Error("cannot have a case named cata (sorry)");if(!s(o))throw new Error("case arguments must be an array");u.push(i),n[i]=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=n.length;if(t!==o.length)throw new Error("Wrong number of arguments to case "+i+". Expected "+o.length+" ("+o+"), got "+t);return{fold:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length!==a.length)throw new Error("Wrong number of arguments to fold. Expected "+a.length+", got "+e.length);return e[r].apply(null,n)},match:function(e){var o=O(e);if(u.length!==o.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+o.join(","));if(!function(e){for(var t,n=0,r=e.length;n<r;++n)if(!0!==(t=e[n],function(e,t){return-1<P.call(e,t)}(o,t)))return;return 1}(u))throw new Error("Not all branches were specified when using match. Specified: "+o.join(", ")+"\nRequired: "+u.join(", "));return e[i].apply(null,n)},log:function(e){console.log(e,{constructors:u,constructor:i,params:n})}}}})}([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);function $(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}}var V=function(e,t,n){var r=(n<0?360+n:n)*Math.PI/180,o=e.width,i=e.height,a=Math.sin(r),u=Math.cos(r),c=C(Math.abs(o*u)+Math.abs(i*a)),s=C(Math.abs(o*a)+Math.abs(i*u)),f=w(c,s),l=R(f);return l.translate(c/2,s/2),l.rotate(r),l.drawImage(e,-o/2,-i/2),k(f,t)},G=function(e,t,n){var r=w(e.width,e.height),o=R(r);return"v"===n?(o.scale(1,-1),o.drawImage(e,0,-r.height)):(o.scale(-1,1),o.drawImage(e,-r.width,0)),k(r,t)},J=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],K=[{type:"not_found",message:"Failed to load image."},{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],X={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return $(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return $(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return $(n)},fromDom:$,fromPoint:function(e,t,n){return p.from(e.dom.elementFromPoint(t,n)).map($)}};function Q(e){return e.getParam("imagetools_proxy")}function Y(e){function t(e){return/^[0-9\.]+px$/.test(e)}var n=e.style.width,r=e.style.height;return n||r?t(n)&&t(r)?{w:parseInt(n,10),h:parseInt(r,10)}:null:(n=e.width,r=e.height,n&&r?{w:parseInt(n,10),h:parseInt(r,10)}:null)}function Z(e){return{w:e.naturalWidth,h:e.naturalHeight}}function ee(e){return t=X.fromDom(e),n="img",r=function(r){return function(e){var t=r.dom;if(1!==t.nodeType)return!1;var n=t;if(void 0!==n.matches)return n.matches(e);if(void 0!==n.msMatchesSelector)return n.msMatchesSelector(e);if(void 0!==n.webkitMatchesSelector)return n.webkitMatchesSelector(e);if(void 0!==n.mozMatchesSelector)return n.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}(n)},x(t.dom.childNodes,function(e){return r(X.fromDom(e))}).map(X.fromDom);var t,n,r}function te(e,t){return e.dom.is(t,"figure")}function ne(e,t){return e.dom.is(t,"img:not([data-mce-object],[data-mce-placeholder])")}function re(t,e){function n(e){return ne(t,e)&&(be(t,e)||_e(t,e)||h(Q(t)))}return te(t,e)?ee(e).bind(function(e){return n(e.dom)?p.some(e.dom):p.none()}):n(e)?p.some(e):p.none()}function oe(e,t){e.notificationManager.open({text:t,type:"error"})}function ie(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"figure.image");return null!==n&&te(e,n)?ee(n):ne(e,t)?p.some(X.fromDom(t)):p.none()}function ae(e,t,n){var r=t.match(/(?:\/|^)(([^\/\?]+)\.(?:[a-z0-9.]+))(?:\?|$)/i);return h(r)?e.dom.encode(r[n]):null}function ue(e,t){if(_e(e,t))return q(t.src,null,(n=t,-1!==f.inArray(e.getParam("imagetools_credentials_hosts",[],"string[]"),new ye(n.src).host)));var n,r;if(be(e,t))return(0===(r=t.src).indexOf("data:")?j:A)(r);var o=Q(e);return q(o+(-1===o.indexOf("?")?"?":"&")+"url="+encodeURIComponent(t.src),e.getParam("api_key",e.getParam("imagetools_api_key","","string"),"string"),!1)}function ce(e,t){var n,r,o=e.editorUpload.blobCache.getByUri(t.src);return o?ve.resolve(o.blob()):(n=e,r=t,p.from(n.getParam("imagetools_fetch_image",null,"function")).fold(function(){return ue(n,r)},function(e){return e(r)}))}function se(e){pe.clearTimeout(e.get())}function fe(u,c,s,f,l,d,m){return s.toBlob().then(function(e){var t,n,o,r=u.editorUpload.blobCache,i=d.src,a=c.type===e.type;return u.getParam("images_reuse_filename",!1,"boolean")&&(n=h(o=r.getByUri(i))?(i=o.uri(),t=o.name(),o.filename()):(t=ae(u,i,2),ae(u,i,1))),o=r.create({id:"imagetools"+we++,blob:e,base64:s.toBase64(),uri:i,name:t,filename:a?n:void 0}),r.add(o),u.undoManager.transact(function(){var r=function(){var e,t,n;u.$(d).off("load",r),u.nodeChanged(),f?u.editorUpload.uploadImagesAuto():(se(l),e=u,t=l,n=pe.setEditorTimeout(e,function(){e.editorUpload.uploadImagesAuto()},e.getParam("images_upload_timeout",3e4,"number")),t.set(n))};u.$(d).on("load",r),m&&u.$(d).attr({width:m.w,height:m.h}),u.$(d).attr({src:o.blobUri()}).removeAttr("data-mce-src")}),o})}function le(r,o,e,i){return function(){return ie(r).fold(function(){oe(r,"Could not find selected image")},function(n){return r._scanForImages().then(function(){return ce(r,n.dom)}).then(function(t){return W(t).then(e).then(function(e){return fe(r,t,e,!1,o,n.dom,i)})}).catch(function(e){oe(r,e)})})}}function de(t,n,r){return function(){var e=ie(t).map(function(e){var t=Y(e.dom);return t?{w:t.h,h:t.w}:null}).getOrNull();return le(t,n,function(e){return n=r,(t=e).toCanvas().then(function(e){return V(e,t.getType(),n)});var t,n},e)()}}function me(e,t,r){return function(){return le(e,t,function(e){return n=r,(t=e).toCanvas().then(function(e){return G(e,t.getType(),n)});var t,n})()}}function he(s,f){return function(){var n=ie(s),i=n.map(function(e){return Z(e.dom)});n.each(function(t){re(s,t.dom).each(function(e){ce(s,t.dom).then(function(e){var t={blob:e,url:URL.createObjectURL(e)};s.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:t}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(e){var o=e.getData().imagetools.blob;n.each(function(r){i.each(function(e){var t,n,a,u,c;t=s,n=f,a=r.dom,u=e,M(c=o).then(function(e){var t,n,r,o,i=Z(e);return u.w===i.w&&u.h===i.h||Y(a)&&(t=a,(n=i)&&(r=t.style.width,o=t.style.height,(r||o)&&(t.style.width=n.w+"px",t.style.height=n.h+"px",t.removeAttribute("data-mce-style")),r=t.width,o=t.height,(r||o)&&(t.setAttribute("width",String(n.w)),t.setAttribute("height",String(n.h))))),URL.revokeObjectURL(e.src),c}).then(W).then(function(e){return fe(t,c,e,!0,n,a)})})}),e.close()},onCancel:r,onAction:function(e,t){switch(t.name){case"save-state":t.value?e.enable("save"):e.disable("save");break;case"disable":e.disable("save"),e.disable("cancel");break;case"enable":e.enable("cancel")}}})})})})}}function ge(t){function n(e){return function(){return t.execCommand(e)}}function e(){return ie(t).exists(function(e){return re(t,e.dom).isSome()})}function r(t){function i(e){return t.setDisabled(!e)}return i(e()),o=o.concat([i]),function(){o=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];o!==i&&t.push(o)}return t}(o)}}var o=[];t.on("NodeChange",function(){var t=e();T(o,function(e){return e(t)})}),t.ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:n("mceImageRotateLeft"),onSetup:r}),t.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:n("mceImageRotateRight"),onSetup:r}),t.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:n("mceImageFlipVertical"),onSetup:r}),t.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:n("mceImageFlipHorizontal"),onSetup:r}),t.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:n("mceEditImage"),onSetup:r}),t.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image",onAction:n("mceImage")}),t.ui.registry.addContextMenu("imagetools",{update:function(e){return re(t,e).map(function(e){return{text:"Edit image",icon:"edit-image",onAction:n("mceEditImage")}}).toArray()}})}"undefined"!=typeof window||Function("return this;")();var pe=tinymce.util.Tools.resolve("tinymce.util.Delay"),ve=tinymce.util.Tools.resolve("tinymce.util.Promise"),ye=tinymce.util.Tools.resolve("tinymce.util.URI"),we=0,be=function(e,t){var n=t.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new ye(n).host===e.documentBaseURI.host},_e=function(e,t){return-1!==f.inArray(e.getParam("imagetools_cors_hosts",[],"string[]"),new ye(t.src).host)};o.add("imagetools",function(e){var t,r,o,i,n=c(0),a=c(null),u=e;f.each({mceImageRotateLeft:de(u,n,-90),mceImageRotateRight:de(u,n,90),mceImageFlipVertical:me(u,n,"v"),mceImageFlipHorizontal:me(u,n,"h"),mceEditImage:he(u,n)},function(e,t){u.addCommand(t,e)}),ge(e),(t=e).ui.registry.addContextToolbar("imagetools",{items:t.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions"),predicate:function(e){return re(t,e).isSome()},position:"node",scope:"node"}),o=n,i=a,(r=e).on("NodeChange",function(e){var t=i.get(),n=re(r,e.element);t&&!n.exists(function(e){return t.src===e.src})&&(se(o),r.editorUpload.uploadImagesAuto(),i.set(null)),n.each(i.set)})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function t(n){return function(t){return r=typeof(e=t),(null===e?"null":"object"==r&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":r)===n;var e,r}}function y(t){return t.getParam("importcss_selector_converter")}function u(e){return l(e)?function(t){return-1!==t.indexOf(e)}:e instanceof RegExp?function(t){return e.test(t)}:e}function h(t,e){var r,n=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(n){var o=n[1],i=n[2].substr(1).split(".").join(" "),c=x.makeMap("a,img");return n[1]?(r={title:e},t.schema.getTextBlockElements()[o]?r.block=o:t.schema.getBlockElements()[o]||c[o.toLowerCase()]?r.selector=o:r.inline=o):n[2]&&(r={inline:"span",title:e.substr(1),classes:i}),!1!==t.getParam("importcss_merge_classes")?r.classes=i:r.attributes={class:i},r}}function d(t,e){return null===e||!1!==t.getParam("importcss_exclusive")}function r(v){v.on("init",function(){function o(t,e){if(f=t,p=g,!(d(v,m=e)?f in p:f in m.selectors)){a=t,l=g,d(v,u=e)?l[a]=!0:u.selectors[a]=!0;var r=(i=(o=v).plugins.importcss,c=t,((s=e)&&s.selector_converter?s.selector_converter:y(o)?y(o):function(){return h(o,c)}).call(i,c,s));if(r){var n=r.name||_.DOM.uniqueId();return v.formatter.register(n,r),{title:r.title,format:n}}}var o,i,c,s,a,u,l,f,m,p;return null}var e,r,n,t,i=(e=[],r=[],n={},{addItemToGroup:function(t,e){n[t]?n[t].push(e):(r.push(t),n[t]=[e])},addItem:function(t){e.push(t)},toFormats:function(){return function(t){for(var e=[],r=0,n=t.length;r<n;++r){if(!f(t[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+t);P.apply(e,t[r])}return e}(function(t,e){for(var r=t.length,n=new Array(r),o=0;o<r;o++){var i=t[o];n[o]=e(i,o)}return n}(r,function(t){var e=n[t];return 0===e.length?[]:[{title:t,items:e}]})).concat(e)}}),g={},c=u(v.getParam("importcss_selector_filter")),s=(t=v.getParam("importcss_groups"),x.map(t,function(t){return x.extend({},t,{original:t,selectors:{},filter:u(t.filter)})}));x.each(function(c,t,s){var a=[],r={},u=function(t,e){var r,n,o=n=t.href,i=p.cacheSuffix;if((n=o=l(o)?o.replace("?"+i,"").replace("&"+i,""):o)&&s(n,e)&&!function(t,e){var r,n=!1!==(r=t.getParam("skin"))&&(r||"oxide");if(n){var o=t.getParam("skin_url"),i=o?t.documentBaseURI.toAbsolute(o):m.baseURL+"/skins/ui/"+n,c=m.baseURL+"/skins/content/";return e===i+"/content"+(t.inline?".inline":"")+".min.css"||-1!==e.indexOf(c)}}(c,n)){x.each(t.imports,function(t){u(t,!0)});try{r=t.cssRules||t.rules}catch(t){}x.each(r,function(t){t.styleSheet?u(t.styleSheet,!0):t.selectorText&&x.each(t.selectorText.split(","),function(t){a.push(x.trim(t))})})}};x.each(c.contentCSS,function(t){r[t]=!0}),s=s||function(t,e){return e||r[t]};try{x.each(t.styleSheets,function(t){u(t)})}catch(t){}return a}(v,v.getDoc(),u(v.getParam("importcss_file_filter"))),function(r){var t,e,n;T.test(r)||c&&!c(r)||(n=r,0<(t=x.grep(s,function(t){return!t.filter||t.filter(n)})).length?x.each(t,function(t){var e=o(r,t);e&&i.addItemToGroup(t.title,e)}):(e=o(r,null))&&i.addItem(e))});var a=i.toFormats();v.fire("addStyleModifications",{items:a,replace:!v.getParam("importcss_append")})})}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=t("string"),f=t("array"),_=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),m=tinymce.util.Tools.resolve("tinymce.EditorManager"),p=tinymce.util.Tools.resolve("tinymce.Env"),x=tinymce.util.Tools.resolve("tinymce.util.Tools"),P=Array.prototype.push,T=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/;e.add("importcss",function(t){return r(t),e=t,{convertSelectorToFormat:function(t){return h(e,t)}};var e})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function l(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))}function s(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])}function r(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}function d(e,t,n){return void 0===n&&(n=new Date),(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",r(n.getMonth()+1,2))).replace("%d",r(n.getDate(),2))).replace("%H",""+r(n.getHours(),2))).replace("%M",""+r(n.getMinutes(),2))).replace("%S",""+r(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(u[n.getMonth()]))).replace("%b",""+e.translate(o[n.getMonth()]))).replace("%A",""+e.translate(i[n.getDay()]))).replace("%a",""+e.translate(a[n.getDay()]))).replace("%%","%")}function p(e,t){var n,r,a,i,o,u;e.getParam("insertdatetime_element",!1)?(n=d(e,t),r=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d"),(a=e.dom.getParent(e.selection.getStart(),"time"))?(o=a,u=(i=e).dom.create("time",{datetime:r},n),o.parentNode.insertBefore(u,o),i.dom.remove(o),i.selection.select(u,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")):e.insertContent(d(e,t))}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),i="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),u="January February March April May June July August September October November December".split(" "),g=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("insertdatetime",function(e){var n,r,t,a,i,o,u,c;function m(e){return r.execCommand("mceInsertDate",!1,e)}(n=e).addCommand("mceInsertDate",function(e,t){p(n,null!=t?t:n.getParam("insertdatetime_dateformat",n.translate("%Y-%m-%d")))}),n.addCommand("mceInsertTime",function(e,t){p(n,null!=t?t:l(n))}),u=s(r=e),t=0<(o=s(i=r)).length?o[0]:l(i),a=t,c={get:function(){return a},set:function(e){a=e}},r.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===c.get()},fetch:function(e){e(g.map(u,function(e){return{type:"choiceitem",text:d(r,e),value:e}}))},onAction:function(e){m(c.get())},onItemAction:function(e,t){c.set(t),m(t)}}),r.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return g.map(u,function(e){return{type:"menuitem",text:d(r,e),onAction:(t=e,function(){c.set(t),m(t)})};var t})}})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("legacyoutput",function(e){var s,t;(t=s=e).settings.inline_styles=!1,t.getParam("fontsize_formats")||(t.settings.fontsize_formats="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7"),t.getParam("font_formats")||(t.settings.font_formats="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"),s.on("PreInit",function(){var e=s,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table",i=l.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large")),a=e.schema;e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all",preserve_attributes:["class","style"]},{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all",preserve_attributes:["class","style"]},{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",toggle:!1,attributes:{face:"%value"}},fontsize:{inline:"font",toggle:!1,attributes:{size:function(e){return String(l.inArray(i,e.value)+1)}}},forecolor:{inline:"font",attributes:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0}}),l.each("b,i,u,strike".split(","),function(e){a.addValidElements(e+"[*]")}),a.getElementRule("font")||a.addValidElements("font[face|size|color|style]"),l.each(t.split(","),function(e){var t=a.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function t(r){return function(t){return e=typeof(n=t),(null===n?"null":"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e)===r;var n,e}}function n(n){return function(t){return typeof t===n}}function h(){}function i(t){return function(){return t}}function e(t){return t}function r(t,n){return t===n}function o(){return v}var u,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.VK"),l=t("string"),d=t("array"),p=function(t){return u===t},f=n("boolean"),s=n("function"),m=i(!1),g=i(!(u=null)),v={fold:function(t,n){return t()},isSome:m,isNone:g,getOr:e,getOrThunk:y,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:e,orThunk:y,map:o,each:h,bind:o,exists:m,forall:g,filter:function(){return v},toArray:function(){return[]},toString:i("none()")};function y(t){return t()}function k(t,o,i){return function(t){for(var n,e=0,r=t.length;e<r;e++)n=t[e],i=o(i,n,e)}(t),i}function x(t){for(var n=[],e=0,r=t.length;e<r;++e){if(!d(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);at.apply(n,t[e])}return n}function b(t,n){for(var e=0;e<t.length;e++){var r=n(t[e],e);if(r.isSome())return r}return it.none()}function O(t,n,e){return void 0===e&&(e=r),t.exists(function(t){return e(t,n)})}function w(t,n){return t?it.some(n):it.none()}function C(t){var n=t.getParam("link_assume_external_targets",!1);return f(n)&&n?1:!l(n)||"http"!==n&&"https"!==n?0:n}function N(t){return t.getParam("default_link_target")}function A(t){return t.getParam("target_list",!0)}function T(t){return t.getParam("rel_list",[],"array")}function P(t){return t.getParam("allow_unsafe_link_target",!1,"boolean")}function S(t){return l(t.value)?t.value:""}function _(n){return void 0===n&&(n=S),function(t){return it.from(t).map(function(t){return ct(t,n)})}}function R(t,i,u,a){return function(t){for(var n=mt(t),e=0,r=n.length;e<r;e++){var o=n[e];!function(t,n){(i(t,n)?u:a)(t,n)}(t[o],o)}}(t),1}function D(t,n){return gt.call(t,n)}function L(t){return t&&"a"===t.nodeName.toLowerCase()}function E(t){return L(t)&&!!pt(t)}function M(t,n){if(t.collapsed)return[];for(var e=t.cloneContents(),r=new dt(e.firstChild,e),o=[],i=e.firstChild;n(i)&&o.push(i),i=r.next(););return o}function U(t){return/^\w+:/i.test(t)}function B(t,n){function e(t){return t.filter(function(t){return-1===lt.inArray(o,t)})}var r,o=["noopener"],i=t?t.split(/\s+/):[],u=n?0<(r=e(r=i)).length?r.concat(o):o:e(i);return 0<u.length?lt.trim(u.sort().join(" ")):""}function I(t,n){return n=n||t.selection.getNode(),vt(n)?t.dom.select("a[href]",n)[0]:t.dom.getParent(n,"a[href]")}function K(t,n){return(n?n.innerText||n.textContent:t.getContent({format:"text"})).replace(/\uFEFF/g,"")}function z(t){return 0<lt.grep(t,E).length}function j(t){var n=t.schema.getTextInlineElements();return 0===M(t.selection.getRng(),function(t){return 1===t.nodeType&&!L(t)&&!D(n,t.nodeName.toLowerCase())}).length}function V(l,c,f){var t,n,e,r,o,i,u,s=l.selection.getNode(),m=I(l,s),g=(n=l,e=k(["title","rel","class","target"],function(n,e){return t[e].each(function(t){n[e]=0<t.length?t:null}),n},{href:(t=f).href}),u=st({},e),0<T(n).length||!1!==P(n)||(r=B(u.rel,"_blank"===u.target),u.rel=r||null),it.from(u.target).isNone()&&!1===A(n)&&(u.target=N(n)),u.href=(o=u.href,"http"!==(i=C(n))&&"https"!==i||U(o)?o:i+"://"+o),u);l.undoManager.transact(function(){var n,t,e,r,o,i,u,a;f.href===c.href&&c.attach(),m?(l.focus(),o=l,i=m,u=f.text,a=g,u.each(function(t){D(i,"innerText")?i.innerText=t:i.textContent=t}),o.dom.setAttribs(i,a),o.selection.select(i)):(n=l,e=f.text,r=g,vt(t=s)?kt(n,t,r):e.fold(function(){n.execCommand("mceInsertLink",!1,r)},function(t){n.insertContent(n.dom.createHTML("a",r,n.dom.encode(t)))}))})}function q(t,n,e){var r,o,i,u,a,l,c,f,s,m,g=(r=t,o=e.href,st(st({},e),{href:ht.isDomSafe(o,"a",r.settings)?o:""}));t.hasPlugin("rtc",!0)?t.execCommand("createlink",!1,(a=g.class,l=g.href,c=g.rel,f=g.target,s=g.text,m=g.title,R({class:a.getOrNull(),href:l,rel:c.getOrNull(),target:f.getOrNull(),text:s.getOrNull(),title:m.getOrNull()},function(t,n){return!1===p(t)},(i=u={},function(t,n){i[n]=t}),h),u)):V(t,n,g)}function F(t){var l;t.hasPlugin("rtc",!0)?t.execCommand("unlink"):(l=t).undoManager.transact(function(){var t,n,e,r,o,i,u,a=l.selection.getNode();vt(a)?yt(l,a):(n=(t=l).dom,r=(e=t.selection).getBookmark(),o=e.getRng().cloneRange(),i=n.getParent(o.startContainer,"a[href]",t.getBody()),u=n.getParent(o.endContainer,"a[href]",t.getBody()),i&&o.setStartBefore(i),u&&o.setEndAfter(u),e.setRng(o),t.execCommand("unlink"),e.moveToBookmark(r)),l.focus()})}function W(t){var n=t.href;return 0<n.indexOf("@")&&-1===n.indexOf("/")&&-1===n.indexOf("mailto:")?it.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(t){return st(st({},t),{href:"mailto:"+n})}}):it.none()}function H(t,n,e){var r=t.getAttrib(n,e);return null!==r&&0<r.length?it.some(r):it.none()}function G(d){var t,n=I(t=d);Tt(t,n).then(function(t){var n,e,i,u,r=function(t){var e=t.getData();if(!e.url.value)return F(i),void t.close();function n(n){return it.from(e[n]).filter(function(t){return!O(u.anchor[n],t)})}var r={href:e.url.value,text:n("text"),target:n("target"),rel:n("rel"),class:n("linkClass"),title:n("title")},o={href:e.url.value,attach:void 0!==e.url.meta&&e.url.meta.attach?e.url.meta.attach:h};Ct(i,r).then(function(t){q(i,o,t)}),t.close()},o=i=d,a=(n=u=t).anchor.text.map(function(){return{name:"text",type:"input",label:"Text to display"}}).toArray(),l=n.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],c=it.from(N(o)),f=n.anchor,s={url:{value:e=f.url.getOr(""),meta:{original:{value:e}}},text:f.text.getOr(""),title:f.title.getOr(""),anchor:e,link:e,rel:f.rel.getOr(""),target:f.target.or(c).getOr(""),linkClass:f.linkClass.getOr("")},m=n.catalogs,g=bt(s,m);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:x([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],a,l,function(t){for(var n=[],e=function(t){n.push(t)},r=0;r<t.length;r++)t[r].each(e);return n}([m.anchor.map(ft.createUi("anchor","Anchors")),m.rels.map(ft.createUi("rel","Rel")),m.targets.map(ft.createUi("target","Open link in...")),m.link.map(ft.createUi("link","Link list")),m.classes.map(ft.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:s,onChange:function(n,t){var e=t.name;g.onChange(n.getData,{name:e}).each(function(t){n.setData(t)})},onSubmit:r}}).then(function(t){d.windowManager.open(t)})}function J(t,n){return t.dom.getParent(n,"a[href]")}function X(t){return J(t,t.selection.getStart())}function $(t,n){var e,r;n&&(e=pt(n),/^#/.test(e)?(r=t.$(e)).length&&t.selection.scrollIntoView(r[0],!0):function(t){var n=document.createElement("a");n.target="_blank",n.href=t,n.rel="noreferrer noopener";var e,r,o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e=n,r=o,document.body.appendChild(e),e.dispatchEvent(r),document.body.removeChild(e)}(n.href))}function Q(t){return function(){G(t)}}function Y(t){return function(){$(t,X(t))}}function Z(t,n){return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}function tt(e){return function(t){function n(){return t.setActive(!e.mode.isReadOnly()&&null!==I(e,e.selection.getNode()))}return n(),Z(e,n)}}function nt(e){return function(t){function n(){return t.setDisabled(null===I(e,e.selection.getNode()))}return n(),Z(e,n)}}function et(r){return function(n){function e(t){return z(t)||0<M(r.selection.getRng(),E).length}var t=r.dom.getParents(r.selection.getStart());return n.setDisabled(!e(t)),Z(r,function(t){return n.setDisabled(!e(t.parents))})}}function rt(t){var n=x(function(t,n){for(var e=t.length,r=new Array(e),o=0;o<e;o++){var i=t[o];r[o]=n(i,o)}return r}(t.dom.select("a:not([href])"),function(t){var n=t.name||t.id;return n?[{text:n,value:"#"+n}]:[]}));return 0<n.length?it.some([{text:"None",value:""}].concat(n)):it.none()}var ot=function(e){function t(){return o}function n(t){return t(e)}var r=i(e),o={fold:function(t,n){return n(e)},isSome:g,isNone:m,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return ot(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?o:v},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},it={some:ot,none:o,from:function(t){return null==t?v:ot(t)}},ut=Array.prototype.indexOf,at=Array.prototype.push,lt=tinymce.util.Tools.resolve("tinymce.util.Tools"),ct=function(t,i){var u=[];return lt.each(t,function(t){var n,e,r,o=l((n=t).text)?n.text:l(n.title)?n.title:"";void 0!==t.menu?(e=ct(t.menu,i),u.push({text:o,items:e})):(r=i(t),u.push({text:o,value:r}))}),u},ft={sanitize:function(t){return _(S)(t)},sanitizeWith:_,createUi:function(n,e){return function(t){return{name:n,type:"listbox",label:e,items:t}}},getValue:S},st=function(){return(st=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},mt=Object.keys,gt=Object.hasOwnProperty,dt=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),ht=tinymce.util.Tools.resolve("tinymce.util.URI"),pt=function(t){return t.getAttribute("data-mce-href")||t.getAttribute("href")},vt=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},yt=function(t,n){var e,r=t.dom.select("img",n)[0];!r||(e=t.dom.getParents(r,"a[href]",n)[0])&&(e.parentNode.insertBefore(r,e),t.dom.remove(e))},kt=function(t,n,e){var r,o=t.dom.select("img",n)[0];o&&(r=t.dom.create("a",e),o.parentNode.insertBefore(r,o),r.appendChild(o))},xt=function(e,t){return b(t,function(t){return D(n=t,"items")&&void 0!==n.items&&null!==n.items?xt(e,t.items):w(t.value===e,t);var n})},bt=function(t,c){function f(t,n){var e,r,o,i,u,a,l=("link"===(e=n.name)?c.link:"anchor"===e?c.anchor:it.none()).getOr([]);return r=s.text,o=n.name,i=l,u=t[o],a=0<r.length,void 0!==u?xt(u,i).map(function(t){return{url:{value:t.value,meta:{text:a?r:t.text,attach:h}},text:a?r:t.text}}):it.none()}var s={text:t.text,title:t.title};return{onChange:function(t,n){var e,r,o,i,u,a,l=n.name;return"url"===l?(r=t(),o=r.url,u=w(s.text.length<=0,it.from(o.meta.text).getOr(o.value)),i=r.url,a=w(s.title.length<=0,it.from(i.meta.title).getOr("")),u.isSome()||a.isSome()?it.some(st(st({},u.map(function(t){return{text:t}}).getOr({})),a.map(function(t){return{title:t}}).getOr({}))):it.none()):(e=["anchor","link"],-1<ut.call(e,l)?f(t(),n):("text"!==l&&"title"!==l||(s[l]=t()[l]),it.none()))}}},Ot=tinymce.util.Tools.resolve("tinymce.util.Delay"),wt=tinymce.util.Tools.resolve("tinymce.util.Promise"),Ct=function(u,a){return b([W,(e=C(u),r=u.getParam("link_default_protocol","http","string"),function(t){var n=t.href;return 1===e&&!U(n)||0===e&&/^\s*www(\.|\d\.)/i.test(n)?it.some({message:"The URL you entered seems to be an external link. Do you want to add the required "+r+":// prefix?",preprocess:function(t){return st(st({},t),{href:r+"://"+n})}}):it.none()})],function(t){return t(a)}).fold(function(){return wt.resolve(a)},function(i){return new wt(function(n){var e=u,t=i.message,r=function(t){n(t?i.preprocess(a):a)},o=e.selection.getRng();Ot.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),r(t)})})})});var e,r},Nt=tinymce.util.Tools.resolve("tinymce.util.XHR"),At=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],Tt=function(m,g){return t=(e=m).getParam("link_list"),new wt(function(n){l(t)?Nt.send({url:t,success:function(t){return n(function(t){try{return it.some(JSON.parse(t))}catch(t){return it.none()}}(t))},error:function(t){return n(it.none())}}):s(t)?t(function(t){return n(it.some(t))}):n(it.from(t))}).then(function(t){return t.bind(ft.sanitizeWith(n)).map(function(t){return 0<t.length?[{text:"None",value:""}].concat(t):t})}).then(function(t){var n,e,r,o,i,u,a,l,c,f,s=(e=g,r=(n=m).dom,o=j(n)?it.some(K(n.selection,e)):it.none(),i=e?it.some(r.getAttrib(e,"href")):it.none(),u=e?it.from(r.getAttrib(e,"target")):it.none(),a=H(r,e,"rel"),l=H(r,e,"class"),{url:i,text:o,title:H(r,e,"title"),target:u,rel:a,linkClass:l});return{anchor:s,catalogs:{targets:(f=A(m),d(f)?ft.sanitize(f).orThunk(function(){return it.some(At)}):!1===f?it.none():it.some(At)),rels:function(t,n){var e=T(t);if(0<e.length){var r=O(n,"_blank");return(!1===P(t)?ft.sanitizeWith(function(t){return B(ft.getValue(t),r)}):ft.sanitize)(e)}return it.none()}(m,s.target),classes:0<(c=m.getParam("link_class_list",[],"array")).length?ft.sanitize(c):it.none(),anchor:rt(m),link:t},optNode:it.from(g),flags:{titleEnabled:m.getParam("link_title",!0,"boolean")}}});function n(t){return e.convertURL(t.value||t.url,"href")}var e,t};a.add("link",function(t){var n,e,r,o,i,u,a;function l(t){var n=a.selection.getNode();return t.setDisabled(!I(a,n)),h}(n=t).ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Q(n),onSetup:tt(n)}),n.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Y(n),onSetup:nt(n)}),n.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return F(n)},onSetup:et(n)}),(e=t).ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Y(e),onSetup:nt(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Q(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return F(e)},onSetup:et(e)}),(r=t).ui.registry.addContextMenu("link",{update:function(t){return z(r.dom.getParents(t,"a"))?"link unlink openlink":"link"}}),(a=t).ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:tt(a)},label:"Link",predicate:function(t){return!!I(a,t)&&a.getParam("link_context_toolbar",!1,"boolean")},initValue:function(){var t=I(a);return t?pt(t):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(t){var n=a.selection.getNode();return t.setActive(!!I(a,n)),tt(a)(t)},onAction:function(t){var n=t.getValue(),e=function(t){var n=I(a),e=j(a);if(n||!e)return it.none();var r=K(a.selection,n);return it.some(0<r.length?r:t)}(n);q(a,{href:n,attach:h},{href:n,text:e,title:it.none(),rel:it.none(),target:it.none(),class:it.none()}),a.selection.collapse(!1),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:l,onAction:function(t){F(a),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:l,onAction:function(t){Y(a)(),t.hide()}}]}),(u=t).on("click",function(t){var n=J(u,t.target);n&&c.metaKeyPressed(t)&&(t.preventDefault(),$(u,n))}),u.on("keydown",function(t){var n=X(u);n&&13===t.keyCode&&!0===t.altKey&&!1===t.shiftKey&&!1===t.ctrlKey&&!1===t.metaKey&&(t.preventDefault(),$(u,n))}),(o=t).addCommand("mceLink",function(){o.getParam("link_quicklink",!1,"boolean")?o.fire("contexttoolbar-show",{toolbarKey:"quicklink"}):Q(o)()}),(i=t).addShortcut("Meta+K","",function(){i.execCommand("mceLink")})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function e(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}}function t(t){return function(e){return typeof e===t}}function u(){}function S(e){return function(){return e}}function n(e){return e}function r(e,t){return e===t}function y(t){return function(e){return!t(e)}}function o(){return p}var i=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=e("string"),O=e("object"),s=e("array"),c=t("boolean"),f=t("function"),d=t("number"),l=S(!1),m=S(!0),p={fold:function(e,t){return e()},isSome:l,isNone:m,getOr:n,getOrThunk:g,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:S(null),getOrUndefined:S(void 0),or:n,orThunk:g,map:o,each:u,bind:o,exists:l,forall:m,filter:function(){return p},toArray:function(){return[]},toString:S("none()")};function g(e){return e()}function C(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r}function b(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function L(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n}function v(e,n,r){return b(e,function(e,t){r=n(r,e,t)}),r}function h(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return E.some(i);if(n(i,r))break}return E.none()}function N(e,t){return h(e,t,l)}function T(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!s(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);P.apply(t,e[n])}return t}(C(e,t))}function D(e){var t=I.call(e,0);return t.reverse(),t}function x(e,t){return 0<=t&&t<e.length?E.some(e[t]):E.none()}function A(e){return x(e,0)}function w(e){return x(e,e.length-1)}var k=function(n){function e(){return o}function t(e){return e(n)}var r=S(n),o={fold:function(e,t){return t(n)},isSome:m,isNone:l,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return k(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?o:p},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},E={some:k,none:o,from:function(e){return null==e?p:k(e)}},I=Array.prototype.slice,P=Array.prototype.push,B=function(){return(B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function R(r,e){return function(e){for(var t=0;t<e.length;t++){var n=function(t){var n=t.brand.toLowerCase();return N(r,function(e){var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())}).map(function(e){return{current:e.name,version:G.nu(parseInt(t.version,10),0)}})}(e[t]);if(n.isSome())return n}return E.none()}(e.brands)}function M(e,t){var n=String(t).toLowerCase();return N(e,function(e){return e.search(n)})}function U(e,t){return-1!==e.indexOf(t)}function _(t){return function(e){return U(e,t)}}function $(e){return window.matchMedia(e).matches}function F(e,t){return e.dom===t.dom}function H(e,t){return le().browser.isIE()?(n=e.dom,r=t.dom,o=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(n.compareDocumentPosition(r)&o)):(i=e.dom)!==(a=t.dom)&&i.contains(a);var n,r,o,i,a}function j(e,t){for(var n=ye(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}}function K(){return Z(0,0)}function V(e){function t(e){return function(){return n===e}}var n=e.current,r=e.version;return{current:n,version:r,isEdge:t("Edge"),isChrome:t("Chrome"),isIE:t("IE"),isOpera:t("Opera"),isFirefox:t(ne),isSafari:t("Safari")}}function W(e){function t(e){return function(){return n===e}}var n=e.current,r=e.version;return{current:n,version:r,isWindows:t(ie),isiOS:t("iOS"),isAndroid:t(ae),isOSX:t("OSX"),isLinux:t("Linux"),isSolaris:t(se),isFreeBSD:t(ue),isChromeOS:t(ce)}}function Q(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}}var X,q,z,Y,Z=function(e,t){return{major:e,minor:t}},G={nu:Z,detect:function(e,t){var n,r,o=String(t).toLowerCase();return 0===e.length?K():(r=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,n=o))?Z(i(1),i(2)):{major:0,minor:0};function i(e){return Number(n.replace(r,"$"+e))}},unknown:K},J=(X=/^\s+|\s+$/g,function(e){return e.replace(X,"")}),ee=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,te={browsers:S([{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return U(e,"edge/")&&U(e,"chrome")&&U(e,"safari")&&U(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ee],search:function(e){return U(e,"chrome")&&!U(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return U(e,"msie")||U(e,"trident")}},{name:"Opera",versionRegexes:[ee,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:_("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:_("firefox")},{name:"Safari",versionRegexes:[ee,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(U(e,"safari")||U(e,"mobile/"))&&U(e,"applewebkit")}}]),oses:S([{name:"Windows",search:_("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return U(e,"iphone")||U(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:_("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:_("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:_("linux"),versionRegexes:[]},{name:"Solaris",search:_("sunos"),versionRegexes:[]},{name:"FreeBSD",search:_("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:_("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}])},ne="Firefox",re=function(){return V({current:void 0,version:G.unknown()})},oe=V,ie=(S("Edge"),S("Chrome"),S("IE"),S("Opera"),S(ne),S("Safari"),"Windows"),ae="Android",se="Solaris",ue="FreeBSD",ce="ChromeOS",fe=function(){return W({current:void 0,version:G.unknown()})},de=W,le=(S(ie),S("iOS"),S(ae),S("Linux"),S("OSX"),S(se),S(ue),S(ce),Y=!(q=function(){return e=navigator.userAgent,t=E.from(navigator.userAgentData),n=$,g=te.browsers(),v=te.oses(),h=t.bind(function(e){return R(g,e)}).orThunk(function(){return M(g,n=e).map(function(e){var t=G.detect(e.versionRegexes,n);return{current:e.name,version:t}});var n}).fold(re,oe),y=M(v,r=e).map(function(e){var t=G.detect(e.versionRegexes,r);return{current:e.name,version:t}}).fold(fe,de),{browser:h,os:y,deviceType:(i=h,a=e,s=n,u=(o=y).isiOS()&&!0===/ipad/i.test(a),c=o.isiOS()&&!u,d=(f=o.isiOS()||o.isAndroid())||s("(pointer:coarse)"),l=u||!c&&f&&s("(min-device-width:768px)"),m=c||f&&!l,p=i.isSafari()&&o.isiOS()&&!1===/safari/i.test(a),{isiPad:S(u),isiPhone:S(c),isTablet:S(l),isPhone:S(m),isTouch:S(d),isAndroid:o.isAndroid,isiOS:o.isiOS,isWebView:S(p),isDesktop:S(!m&&!l&&!p)})};var e,t,n,r,o,i,a,s,u,c,f,d,l,m,p,g,v,h,y}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Y||(Y=!0,z=q.apply(null,e)),z}),me={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Q(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return Q(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return Q(n)},fromDom:Q,fromPoint:function(e,t,n){return E.from(e.dom.elementFromPoint(t,n)).map(Q)}},pe=function(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},ge=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),ve=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),he=tinymce.util.Tools.resolve("tinymce.util.VK"),ye=Object.keys;function Se(e){return e.dom.nodeName.toLowerCase()}function Ce(t){return function(e){return Bt(e)&&Se(e)===t}}function be(e,t){var n=e.dom;j(t,function(e,t){!function(e,t,n){if(!(a(n)||c(n)||d(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}(n,t,e)})}function Ne(e){return v(e.dom.attributes,function(e,t){return e[t.name]=t.value,e},{})}function Oe(e){return E.from(e.dom.parentNode).map(me.fromDom)}function Le(e){return C(e.dom.childNodes,me.fromDom)}function Te(e,t){var n=e.dom.childNodes;return E.from(n[t]).map(me.fromDom)}function De(e){return Te(e,0)}function xe(e){return Te(e,e.dom.childNodes.length-1)}function Ae(t,n){Oe(t).each(function(e){e.dom.insertBefore(n.dom,t.dom)})}function we(e,t){e.dom.appendChild(t.dom)}function ke(t,e){b(e,function(e){we(t,e)})}function Ee(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)}function Ie(e){return me.fromDom(e.dom.cloneNode(!0))}function Pe(e,t){var n,r,o=(n=e,be(r=me.fromTag(t),Ne(n)),r);return Ae(e,o),ke(o,Le(e)),Ee(e),o}function Be(t){return function(e){return e&&e.nodeName.toLowerCase()===t}}function Re(t){return function(e){return e&&t.test(e.nodeName)}}function Me(e){return e&&3===e.nodeType}function Ue(e,t){return t&&e.schema.getTextBlockElements()[t.nodeName]}function _e(e,t){return e&&e.nodeName in t}function $e(e,t,n){var r=e.isEmpty(t);return!(n&&0<e.select("span[data-mce-type=bookmark]",t).length)&&r}function Fe(e,t){return e.isChildOf(t,e.getRoot())}function He(e,t){var n,r,o,i,a=e.dom,s=e.schema.getBlockElements(),u=a.createFragment(),c=!1===(n=e.getParam("forced_root_block","p"))?"":!0===n?"p":n;if(c&&((o=a.create(c)).tagName===c.toUpperCase()&&a.setAttribs(o,e.getParam("forced_root_block_attrs",{})),_e(t.firstChild,s)||u.appendChild(o)),t)for(;r=t.firstChild;){var f=r.nodeName;i||"SPAN"===f&&"bookmark"===r.getAttribute("data-mce-type")||(i=!0),_e(r,s)?(u.appendChild(r),o=null):c?(o||(o=a.create(c),u.appendChild(o)),o.appendChild(r)):u.appendChild(r)}return c?i||o.appendChild(a.create("br",{"data-mce-bogus":"1"})):u.appendChild(a.create("br")),u}function je(e){Qt(e)&&Pe(e,"dd")}function Ke(r,e,t){b(t,"Indent"===e?je:function(e){return t=r,Wt(n=e)?Pe(n,"dt"):Qt(n)&&Oe(n).each(function(e){return function(e,t,n){var r=Vt.select('span[data-mce-type="bookmark"]',t),o=He(e,n),i=Vt.createRng();i.setStartAfter(n),i.setEndAfter(t);for(var a,s=i.extractContents(),u=s.firstChild;u;u=u.firstChild)if("LI"===u.nodeName&&e.dom.isEmpty(u)){Vt.remove(u);break}e.dom.isEmpty(s)||Vt.insertAfter(s,t),Vt.insertAfter(o,t),$e(e.dom,n.parentNode)&&(a=n.parentNode,Mt.each(r,function(e){a.parentNode.insertBefore(e,n.parentNode)}),Vt.remove(a)),Vt.remove(n),$e(e.dom,t)&&Vt.remove(t)}(t,e.dom,n.dom)}),0;var t,n})}function Ve(e,t){if(Me(e))return{container:e,offset:t};var n=ge.getNode(e,t);return Me(n)?{container:n,offset:t>=e.childNodes.length?n.data.length:0}:n.previousSibling&&Me(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&Me(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:e,offset:t}}function We(e){var t=e.cloneRange(),n=Ve(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);var r=Ve(e.endContainer,e.endOffset);return t.setEnd(r.container,r.offset),t}function Qe(e,t){var n=t||e.selection.getStart(!0);return e.dom.getParent(n,"OL,UL,DL",qt(e,n))}function Xe(e){var t,n,r=e.selection.getSelectedBlocks();return L((t=e,n=Mt.map(r,function(e){return t.dom.getParent(e,"li,dd,dt",qt(t,e))||e}),Xt.unique(n)),Ft)}function qe(e,t){return w(e.dom.getParents(t,"ol,ul",qt(e,t)))}function ze(e,t,n){return void 0===n&&(n=r),e.exists(function(e){return n(e,t)})}function Ye(e,t,n){return e.isSome()&&t.isSome()?E.some(n(e.getOrDie(),t.getOrDie())):E.none()}function Ze(e,t,n){return e.fire("ListMutation",{action:t,element:n})}function Ge(e,t){we(e.item,t.list)}function Je(e,t){for(var n=0;n<e.length-1;n++)(function(e,t,n){if(!a(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);void 0!==e.style&&f(e.style.getPropertyValue)&&e.style.setProperty(t,n)})(e[n].item.dom,"list-style-type","none");w(e).each(function(e){be(e.list,t.listAttributes),be(e.item,t.itemAttributes),ke(e.item,t.content)})}function et(u,e,c){var t=e.slice(0,c.depth);return w(t).each(function(e){var t,n,r,o,i,a,s=(t=c.itemAttributes,n=c.content,be(r=me.fromTag("li",u),t),ke(r,n),r);we((o=e).list,s),o.item=s,a=c,Se((i=e).list)!==a.listType&&(i.list=Pe(i.list,a.listType)),be(i.list,a.listAttributes)}),t}function tt(e,t,n){var r,o=function(e,t,n){for(var r,o,i,a=[],s=0;s<n;s++)a.push((o=t.listType,we((i={list:me.fromTag(o,r=e),item:me.fromTag("li",r)}).list,i.item),i));return a}(e,n,n.depth-t.length);return function(e){for(var t=1;t<e.length;t++)Ge(e[t-1],e[t])}(o),Je(o,n),r=o,Ye(w(t),A(r),Ge),t.concat(o)}function nt(e){return pe(e,"OL,UL")}function rt(e){return De(e).exists(nt)}function ot(e){return 0<e.depth}function it(e){return e.isSelected}function at(s){return b(s,function(a,e){function t(e){return e.depth===i&&!e.dirty}function n(e){return e.depth<i}var r,o,i;i=(r=s)[o=e].depth,h(D(r.slice(0,o)),t,n).orThunk(function(){return h(r.slice(o+1),t,n)}).fold(function(){var e,t,n,r,o,i;a.dirty&&(a.listAttributes=(e=a.listAttributes,n=function(e,t){return"start"!==t},r=t={},o=function(e,t){r[t]=e},i=u,j(e,function(e,t){(n(e,t)?o:i)(e,t)}),t))},function(e){var t=e;a.listType=t.listType,a.listAttributes=B({},t.listAttributes)})}),s}function st(n,a,s,u){return De(u).filter(nt).fold(function(){a.each(function(e){F(e.start,u)&&s.set(!0)});var r,o,i,e=(r=u,o=n,i=s.get(),Oe(r).filter(Bt).map(function(e){return{depth:o,dirty:!1,isSelected:i,content:(n=Le(t=r),C(xe(t).exists(nt)?n.slice(0,-1):n,Ie)),itemAttributes:Ne(r),listAttributes:Ne(e),listType:Se(e)};var t,n}));a.each(function(e){F(e.end,u)&&s.set(!1)});var t=xe(u).filter(nt).map(function(e){return Yt(n,a,s,e)}).getOr([]);return e.toArray().concat(t)},function(e){return Yt(n,a,s,e)})}function ut(o,e){return C(at(e),function(e){var t,n,r=(t=e.content,n=document.createDocumentFragment(),b(t,function(e){n.appendChild(e.dom)}),me.fromDom(n));return me.fromDom(He(o,r.dom))})}function ct(e,t){var n=at(t),r=e.contentDocument;return A(v(n,function(e,t){return(t.depth>e.length?tt:et)(r,e,t)},[])).map(function(e){return e.list}).toArray()}function ft(e,t){b(L(e,it),function(e){return function(e){switch(t){case"Indent":e.depth++;break;case"Outdent":e.depth--;break;case"Flatten":e.depth=0}e.dirty=!0}(e),0})}function dt(e,t){var n,r,o,i,a,s,u,c,f,d,l,m,p,g=C((i=qe(o=r=e,o.selection.getStart()),a=L(o.selection.getSelectedBlocks(),_t),s=i.toArray().concat(a),zt(r,s)),me.fromDom),v=C(L(Xe(e),Ht),me.fromDom),h=!1;return(g.length||v.length)&&(n=e.selection.getBookmark(),c=t,b((f=g,p=C(Xe(u=e),me.fromDom),d=Ye(N(p,y(rt)),N(D(p),y(rt)),function(e,t){return{start:e,end:t}}),l=!1,m={get:function(){return l},set:function(e){l=e}},C(f,function(e){return{sourceList:e,entries:Yt(0,d,m,e)}})),function(e){ft(e.entries,c);var t,n,r=(t=u,T(function(e,t){if(0===e.length)return[];for(var n=t(e[0]),r=[],o=[],i=0,a=e.length;i<a;i++){var s=e[i],u=t(s);u!==n&&(r.push(o),o=[]),n=u,o.push(s)}return 0!==o.length&&r.push(o),r}(e.entries,ot),function(e){return(A(e).exists(ot)?ct:ut)(t,e)}));b(r,function(e){Ze(u,"Indent"===c?"IndentList":"OutdentList",e.dom)}),n=e.sourceList,b(r,function(e){Ae(n,e)}),Ee(e.sourceList)}),Ke(e,t,v),e.selection.moveToBookmark(n),e.selection.setRng(We(e.selection.getRng())),e.nodeChanged(),h=!0),h}function lt(e){return dt(e,"Indent")}function mt(e){return dt(e,"Outdent")}function pt(e){return dt(e,"Flatten")}function gt(o){function e(e){var t,n=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"];1===n.nodeType&&(t=Gt.create("span",{"data-mce-type":"bookmark"}),n.hasChildNodes()?(r=Math.min(r,n.childNodes.length-1),e?n.insertBefore(t,n.childNodes[r]):Gt.insertAfter(t,n.childNodes[r])):n.appendChild(t),n=t,r=0),i[e?"startContainer":"endContainer"]=n,i[e?"startOffset":"endOffset"]=r}var i={};return e(!0),o.collapsed||e(),i}function vt(o){function e(e){var t,n=t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"];n&&(1===n.nodeType&&(r=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(n),n=n.parentNode,Gt.remove(t),!n.hasChildNodes()&&Gt.isBlock(n)&&n.appendChild(Gt.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=r)}e(!0),e();var t=Gt.createRng();return t.setStart(o.startContainer,o.startOffset),o.endContainer&&t.setEnd(o.endContainer,o.endOffset),We(t)}function ht(e){switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}}function yt(e){return/\btox\-/.test(e.className)}function St(e,n,r){function t(e){var t=h(e.parents,Ut,jt).filter(function(e){return e.nodeName===n&&!yt(e)}).isSome();r(t)}return t({parents:e.dom.getParents(e.selection.getNode())}),e.on("NodeChange",t),function(){return e.off("NodeChange",t)}}function Ct(n,e){Mt.each(e,function(e,t){n.setAttribute(t,e)})}function bt(e,t,n){var r,o,i,a=n["list-style-type"]||null;e.setStyle(t,"list-style-type",a),r=e,Ct(o=t,(i=n)["list-attributes"]),Mt.each(r.select("li",o),function(e){Ct(e,i["list-item-attributes"])})}function Nt(e,t,n,r){var o=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"];for(1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!n&&Kt(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(Ue(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o}function Ot(u,c,f){var e,t,n=u.selection.getRng(),d="LI",r=qt(u,u.selection.getStart(!0)),l=u.dom;"false"!==l.getContentEditable(u.selection.getNode())&&("DL"===(c=c.toUpperCase())&&(d="DT"),e=gt(n),t=function(n,e,r){for(var o,i=[],a=n.dom,t=Nt(n,e,!0,r),s=Nt(n,e,!1,r),u=[],c=t;c&&(u.push(c),c!==s);c=c.nextSibling);return Mt.each(u,function(e){if(Ue(n,e))return i.push(e),void(o=null);if(a.isBlock(e)||Kt(e))return Kt(e)&&a.remove(e),void(o=null);var t=e.nextSibling;Zt.isBookmarkNode(e)&&(Ut(t)||Ue(n,t)||!t&&e.parentNode===r)?o=null:(o||(o=a.create("p"),e.parentNode.insertBefore(o,e),i.push(o)),o.appendChild(e))}),i}(u,n,r),Mt.each(t,function(e){var t,n,r,o,i,a=e.previousSibling,s=e.parentNode;Ft(s)||(a&&Ut(a)&&a.nodeName===c&&(o=f,l.getStyle(a,"list-style-type")===(i=null===(i=o?o["list-style-type"]:"")?"":i))?(t=a,e=l.rename(e,d),a.appendChild(e)):(t=l.create(c),e.parentNode.insertBefore(t,e),t.appendChild(e),e=l.rename(e,d)),n=l,r=e,Mt.each(["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],function(e){var t;return n.setStyle(r,((t={})[e]="",t))}),bt(l,t,f),Jt(u.dom,t))}),u.selection.setRng(vt(e)))}function Lt(e,t,n){return a=n,(i=t)&&a&&Ut(i)&&i.nodeName===a.nodeName&&(o=n,(r=e).getStyle(t,"list-style-type",!0)===r.getStyle(o,"list-style-type",!0))&&t.className===n.className;var r,o,i,a}function Tt(e,t,n){var r,o,i,a,s,u,c,f,d,l,m,p,g,v,h,y,S,C=Qe(e),b=(f=Qe(c=e),d=c.selection.getSelectedBlocks(),f&&1===d.length&&d[0]===f?L(f.querySelectorAll("ol,ul,dl"),Ut):L(d,function(e){return Ut(e)&&f!==e})),N=O(n)?n:{};0<b.length?(l=e,p=b,g=t,v=N,(S=Ut(m=C))&&m.nodeName===g&&!en(v)?pt(l):(Ot(l,g,v),h=gt(l.selection.getRng()),y=S?function(e,t){for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||((n=n||Array.prototype.slice.call(t,0,r))[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}([m],p,!0):p,Mt.each(y,function(e){var t,n,r=l,o=g,i=v;(t=e).nodeName!==o?(n=r.dom.rename(t,o),bt(r.dom,n,i),Ze(r,ht(o),n)):(bt(r.dom,t,i),Ze(r,ht(o),t))}),l.selection.setRng(vt(h)))):(i=t,a=N,(o=C)!==(r=e).getBody()&&(o?o.nodeName!==i||en(a)||yt(o)?(s=gt(r.selection.getRng()),bt(r.dom,o,a),u=r.dom.rename(o,i),Jt(r.dom,u),r.selection.setRng(vt(s)),Ot(r,i,a),Ze(r,ht(i),u)):pt(r):(Ot(r,i,a),Ze(r,ht(i),o))))}function Dt(e,t,n,r){var o=t.startContainer,i=t.startOffset;if(Me(o)&&(n?i<o.data.length:0<i))return o;var a=e.schema.getNonEmptyElements();1===o.nodeType&&(o=ge.getNode(o,i));var s,u,c=new ve(o,r);for(n&&(s=e.dom,Kt(u=o)&&s.isBlock(u.nextSibling)&&!Kt(u.previousSibling)&&c.next());o=c[n?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(a[o.nodeName])return o;if(Me(o)&&0<o.data.length)return o}}function xt(e,t){var n=t.childNodes;return 1===n.length&&!Ut(n[0])&&e.isBlock(n[0])}function At(t,e,n){var r,o,i,a=e.parentNode;Fe(t,e)&&Fe(t,n)&&(Ut(n.lastChild)&&(r=n.lastChild),a===n.lastChild&&Kt(a.previousSibling)&&t.remove(a.previousSibling),(o=n.lastChild)&&Kt(o)&&e.hasChildNodes()&&t.remove(o),$e(t,n,!0)&&t.$(n).empty(),function(e,t,n){var r,o,i,a=xt(e,n)?n.firstChild:n;if(xt(o=e,i=t)&&o.remove(i.firstChild,!0),!$e(e,t,!0))for(;r=t.firstChild;)a.appendChild(r)}(t,e,n),r&&n.appendChild(r),i=H(me.fromDom(n),me.fromDom(e))?t.getParents(e,Ut,n):[],t.remove(e),b(i,function(e){$e(t,e)&&e!==t.getRoot()&&t.remove(e)}))}function wt(c,f){var e=c.dom,t=c.selection,n=t.getStart(),r=qt(c,n),d=e.getParent(t.getStart(),"LI",r);if(d){var o=d.parentNode;if(o===c.getBody()&&$e(e,o))return 1;var l=We(t.getRng()),m=e.getParent(Dt(c,l,f,r),"LI",r);if(m&&m!==d)return c.undoManager.transact(function(){var e,t,n,r,o,i,a,s,u;f?(t=l,n=m,r=d,(u=(e=c).dom).isEmpty(r)?(a=n,(i=e).dom.$(s=r).empty(),At(i.dom,a,s),i.selection.setCursorLocation(s,0)):(o=gt(t),At(u,n,r),e.selection.setRng(vt(o)))):d.parentNode.firstChild===d?mt(c):function(e,t,n){var r=gt(l);At(e.dom,t,n);var o=vt(r);e.selection.setRng(o)}(c,d,m)}),1;if(!m&&!f&&0===l.startOffset&&0===l.endOffset)return c.undoManager.transact(function(){pt(c)}),1}}function kt(e,t){return e.selection.isCollapsed()?wt(i=e,a=t)||function(r,o){var i=r.dom,e=r.selection.getStart(),a=qt(r,e),s=i.getParent(e,i.isBlock,a);if(s&&i.isEmpty(s)){var t=We(r.selection.getRng()),u=i.getParent(Dt(r,t,o,a),"LI",a);if(u)return r.undoManager.transact(function(){var e,t=s,n=(e=i).getParent(t.parentNode,e.isBlock,a);e.remove(t),n&&e.isEmpty(n)&&e.remove(n),Jt(i,u.parentNode),r.selection.select(u,!0),r.selection.collapse(o)}),1}}(i,a):(r=(n=e).selection.getStart(),o=qt(n,r),(n.dom.getParent(r,"LI,DT,DD",o)||0<Xe(n).length)&&(n.undoManager.transact(function(){var i,e,t;n.execCommand("Delete"),i=n.dom,e=n.getBody(),t=Mt.grep(i.select("ol,ul",e)),Mt.each(t,function(e){var t,n,r,o=i;"LI"===(r=(t=e).parentNode).nodeName&&r.firstChild===t&&((n=r.previousSibling)&&"LI"===n.nodeName?(n.appendChild(t),$e(o,r)&&tn.remove(r)):tn.setStyle(r,"listStyleType","none")),Ut(r)&&(n=r.previousSibling)&&"LI"===n.nodeName&&n.appendChild(t)})}),1));var n,r,o,i,a}function Et(e){return v(C(D(J(e).split("")),function(e,t){var n=e.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,t)*n}),function(e,t){return e+t},0)}function It(t,n){return function(){var e=Qe(t);return e&&e.nodeName===n}}function Pt(o){o.addCommand("mceListProps",function(){var t,e,n,r;r=Qe(t=o),$t(r)&&t.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:(e={start:t.dom.getAttrib(r,"start","1"),listStyleType:E.some(t.dom.getStyle(r,"list-style-type"))},n=parseInt(e.start,10),ze(e.listStyleType,"upper-alpha")?nn(n):ze(e.listStyleType,"lower-alpha")?nn(n).toLowerCase():e.start)},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){!function(e){switch(/^[0-9]+$/.test(t=e)?2:/^[A-Z]+$/.test(t)?0:/^[a-z]+$/.test(t)?1:0<t.length?4:3){case 2:return E.some({listStyleType:E.none(),start:e});case 0:return E.some({listStyleType:E.some("upper-alpha"),start:Et(e).toString()});case 1:return E.some({listStyleType:E.some("lower-alpha"),start:Et(e).toString()});case 3:return E.some({listStyleType:E.none(),start:""});case 4:return E.none()}var t}(e.getData().start).each(function(e){t.execCommand("mceListUpdate",!1,{attrs:{start:"1"===e.start?"":e.start},styles:{"list-style-type":e.listStyleType.getOr("")}})}),e.close()}})})}"undefined"!=typeof window||Function("return this;")();function Bt(e){return 1===e.dom.nodeType}var Rt=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Mt=tinymce.util.Tools.resolve("tinymce.util.Tools"),Ut=Re(/^(OL|UL|DL)$/),_t=Re(/^(OL|UL)$/),$t=Be("ol"),Ft=Re(/^(LI|DT|DD)$/),Ht=Re(/^(DT|DD)$/),jt=Re(/^(TH|TD)$/),Kt=Be("br"),Vt=Rt.DOM,Wt=Ce("dd"),Qt=Ce("dt"),Xt=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),qt=function(e,t){var n=e.dom.getParents(t,"TD,TH");return 0<n.length?n[0]:e.getBody()},zt=function(t,e){var n=C(e,function(e){return qe(t,e).getOr(e)});return Xt.unique(n)},Yt=function(t,n,r,e){return T(Le(e),function(e){return(nt(e)?Yt:st)(t+1,n,r,e)})},Zt=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),Gt=Rt.DOM,Jt=function(e,t){var n,r=t.nextSibling;if(Lt(e,t,r)){for(;n=r.firstChild;)t.appendChild(n);e.remove(r)}if(Lt(e,t,r=t.previousSibling)){for(;n=r.lastChild;)t.insertBefore(n,t.firstChild);e.remove(r)}},en=function(e){return"list-style-type"in e},tn=Rt.DOM,nn=function(e){if(--e<0)return"";var t=e%26,n=Math.floor(e/26);return nn(n)+String.fromCharCode("A".charCodeAt(0)+t)};i.add("lists",function(e){var n,t,r,o,i,a,s,u;return!1===e.hasPlugin("rtc",!0)?((a=e).getParam("lists_indent_on_tab",!0)&&(s=a).on("keydown",function(e){e.keyCode!==he.TAB||he.metaKeyPressed(e)||s.undoManager.transact(function(){(e.shiftKey?mt:lt)(s)&&e.preventDefault()})}),(u=a).on("keydown",function(e){e.keyCode===he.BACKSPACE?kt(u,!1)&&e.preventDefault():e.keyCode===he.DELETE&&kt(u,!0)&&e.preventDefault()}),(i=e).on("BeforeExecCommand",function(e){var t=e.command.toLowerCase();"indent"===t?lt(i):"outdent"===t&&mt(i)}),i.addCommand("InsertUnorderedList",function(e,t){Tt(i,"UL",t)}),i.addCommand("InsertOrderedList",function(e,t){Tt(i,"OL",t)}),i.addCommand("InsertDefinitionList",function(e,t){Tt(i,"DL",t)}),i.addCommand("RemoveList",function(){pt(i)}),Pt(i),i.addCommand("mceListUpdate",function(e,t){var n,r,o;O(t)&&(r=t,o=Qe(n=i),n.undoManager.transact(function(){O(r.styles)&&n.dom.setStyles(o,r.styles),O(r.attrs)&&j(r.attrs,function(e,t){return n.dom.setAttrib(o,t,e)})}))}),i.addQueryStateHandler("InsertUnorderedList",It(i,"UL")),i.addQueryStateHandler("InsertOrderedList",It(i,"OL")),i.addQueryStateHandler("InsertDefinitionList",It(i,"DL"))):Pt(e),(o=e).hasPlugin("advlist")||(o.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:c("InsertOrderedList"),onSetup:function(e){return St(o,"OL",e.setActive)}}),o.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:c("InsertUnorderedList"),onSetup:function(e){return St(o,"UL",e.setActive)}})),t={text:"List properties...",icon:"ordered-list",onAction:function(){return n.execCommand("mceListProps")},onSetup:function(t){return St(n,"OL",function(e){return t.setDisabled(!e)})}},(n=e).ui.registry.addMenuItem("listprops",t),n.ui.registry.addContextMenu("lists",{update:function(e){var t=Qe(n,e);return $t(t)?["listprops"]:[]}}),r=e,{backspaceDelete:function(e){kt(r,e)}};function c(e){return function(){return o.execCommand(e)}}})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function e(n){return function(e){return r=typeof(t=e),(null===t?"null":"object"==r&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":r)===n;var t,r}}function s(e){return null!=e}function o(e){return function(){return e}}function t(e){return e}function r(){return d}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=function(){return(p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},i=e("string"),u=e("object"),l=e("array"),c=o(!1),m=o(!0),d={fold:function(e,t){return e()},isSome:c,isNone:m,getOr:t,getOrThunk:a,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:t,orThunk:a,map:r,each:function(){},bind:r,exists:c,forall:m,filter:function(){return d},toArray:function(){return[]},toString:o("none()")};function a(e){return e()}function h(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}function f(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function g(e,t){return J(e,t)?W.from(e[t]):W.none()}function v(e){return e.getParam("media_scripts")}function b(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]}function w(e){return e.replace(/px$/,"")}function y(i,e){var c=f(!1),s={};return V({validate:!1,allow_conditional_comments:!0,start:function(e,t){if(!c.get())if(J(t.map,"data-ephox-embed-iri"))c.set(!0),o=(a=(n=t).map.style)?X.parseStyle(a):{},s={type:"ephox-embed-iri",source:n.map["data-ephox-embed-iri"],altsource:"",poster:"",width:g(o,"max-width").map(w).getOr(""),height:g(o,"max-height").map(w).getOr("")};else{if(s.source||"param"!==e||(s.source=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(s.type||(s.type=e),s=K.extend(t.map,s)),"script"===e){var r=b(i,t.map.src);if(!r)return;s={type:"script",source:t.map.src,width:String(r.width),height:String(r.height)}}"source"===e&&(s.source?s.altsource||(s.altsource=t.map.src):s.source=t.map.src),"img"!==e||s.poster||(s.poster=t.map.src)}var n,a,o}}).parse(e),s.source=s.source||s.src||s.data,s.altsource=s.altsource||"",s.poster=s.poster||"",s}function x(e){return{mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()]||""}function j(e){return/^[0-9.]+$/.test(e)?e+"px":e}function O(o,e){!function(e){for(var t=q(e),r=0,n=t.length;r<n;r++){var a=t[r];!function(e,t){var r=""+e;if(o.map[t])for(var n=o.length;n--;){var a=o[n];a.name===t&&(r?(o.map[t]=r,a.value=r):(delete o.map[t],o.splice(n,1)))}else r&&(o.push({name:t,value:r}),o.map[t]=r)}(e[a],a)}}(e)}function S(e,c,s){var u,l=Z(),m=f(!1),d=0;return V({validate:!1,allow_conditional_comments:!0,comment:function(e){l.comment(e)},cdata:function(e){l.cdata(e)},text:function(e,t){l.text(e,t)},start:function(e,t,r){if(!m.get())if(J(t.map,"data-ephox-embed-iri"))m.set(!0),n=c,(i=(o=(a=t).map.style)?ee.parseStyle(o):{})["max-width"]=j(n.width),i["max-height"]=j(n.height),O(a,{style:ee.serializeStyle(i)});else{switch(e){case"video":case"object":case"embed":case"img":case"iframe":void 0!==c.height&&void 0!==c.width&&O(t,{width:c.width,height:c.height})}if(s)switch(e){case"video":O(t,{poster:c.poster,src:""}),c.altsource&&O(t,{src:""});break;case"iframe":O(t,{src:c.source});break;case"source":if(d<2&&(O(t,{src:c[te[d]],type:c[te[d]+"mime"]}),!c[te[d]]))return;d++;break;case"img":if(!c.poster)return;u=!0}}var n,a,o,i;l.start(e,t,r)},end:function(e){if(!m.get()){if("video"===e&&s)for(var t,r=0;r<2;r++)c[te[r]]&&((t=[]).map={},d<=r&&(O(t,{src:c[te[r]],type:c[te[r]+"mime"]}),l.start("source",t,!0)));var n;c.poster&&"object"===e&&s&&!u&&((n=[]).map={},O(n,{src:c.poster,width:c.width,height:c.height}),l.start("img",n,!0))}l.end(e)}},Y({})).parse(e),l.getContent()}function _(e,t){for(var r,n=(r=t.match(/^(https?:\/\/|www\.)(.+)$/i))&&1<r.length&&"www."!==r[1]?r[1]:"https://",a=e.regex.exec(t),o=n+e.url,i=0;i<a.length;i++)!function(e){o=o.replace("$"+e,function(){return a[e]||""})}(i);return o.replace(/\?$/,"")}function k(r,e){var n=K.extend({},e);if(!n.source&&(K.extend(n,y(v(r),n.embed)),!n.source))return"";n.altsource||(n.altsource=""),n.poster||(n.poster=""),n.source=r.convertURL(n.source,"source"),n.altsource=r.convertURL(n.altsource,"source"),n.sourcemime=x(n.source),n.altsourcemime=x(n.altsource),n.poster=r.convertURL(n.poster,"poster");var t,a,o=(t=n.source,0<(a=re.filter(function(e){return e.regex.test(t)})).length?K.extend({},a[0],{url:_(a[0],t)}):null);if(o&&(n.source=o.url,n.type=o.type,n.allowfullscreen=o.allowFullscreen,n.width=n.width||String(o.w),n.height=n.height||String(o.h)),n.embed)return S(n.embed,n,!0);var i=b(v(r),n.source);i&&(n.type="script",n.width=String(i.width),n.height=String(i.height));var c,s,u,l,m=r.getParam("audio_template_callback"),d=r.getParam("video_template_callback");return n.width=n.width||"300",n.height=n.height||"150",K.each(n,function(e,t){n[t]=r.dom.encode(""+e)}),"iframe"===n.type?(l=n.allowfullscreen?' allowFullscreen="1"':"",'<iframe src="'+n.source+'" width="'+n.width+'" height="'+n.height+'"'+l+"></iframe>"):"application/x-shockwave-flash"===n.sourcemime?(u='<object data="'+n.source+'" width="'+n.width+'" height="'+n.height+'" type="application/x-shockwave-flash">',n.poster&&(u+='<img src="'+n.poster+'" width="'+n.width+'" height="'+n.height+'" />'),u+"</object>"):-1!==n.sourcemime.indexOf("audio")?(s=n,m?m(s):'<audio controls="controls" src="'+s.source+'">'+(s.altsource?'\n<source src="'+s.altsource+'"'+(s.altsourcemime?' type="'+s.altsourcemime+'"':"")+" />\n":"")+"</audio>"):"script"===n.type?'<script src="'+n.source+'"><\/script>':(c=n,d?d(c):'<video width="'+c.width+'" height="'+c.height+'"'+(c.poster?' poster="'+c.poster+'"':"")+' controls="controls">\n<source src="'+c.source+'"'+(c.sourcemime?' type="'+c.sourcemime+'"':"")+" />\n"+(c.altsource?'<source src="'+c.altsource+'"'+(c.altsourcemime?' type="'+c.altsourcemime+'"':"")+" />\n":"")+"</video>")}function A(e){return e.hasAttribute("data-mce-object")||e.hasAttribute("data-ephox-embed-iri")}function T(t){return function(e){return k(t,e)}}function C(e,t){var r,n,a,o,i,c=e.getParam("media_url_resolver");return c?(a=t,o=T(e),i=c,new ne(function(t,e){function r(e){return e.html&&(ae[a.source]=e),t({url:a.source,html:e.html||o(a)})}ae[a.source]?r(ae[a.source]):i({url:a.source},r,e)})):(n=T(e),ne.resolve({html:n(r=t),url:r.source}))}function D(e,t){var r,n,o,i,c,a=t?g(e,t).bind(function(e){return g(e,"meta")}).getOr({}):{},s=(o=e,i=a,c=t,function(e){function t(){return g(o,e)}function r(){return g(i,e)}function n(e){return g(e,"value").bind(function(e){return 0<e.length?W.some(e):W.none()})}var a={};return a[e]=(e===c?t().bind(function(e){return u(e)?n(e).orThunk(r):r().orThunk(function(){return W.from(e)})}):r().orThunk(function(){return t().bind(function(e){return u(e)?n(e):W.from(e)})})).getOr(""),a});return p(p(p(p(p({},s("source")),s("altsource")),s("poster")),s("embed")),(r=a,n={},g(e,"dimensions").each(function(e){h(["width","height"],function(t){g(r,t).orThunk(function(){return g(e,t)}).each(function(e){return n[t]=e})})}),n))}function P(e){var n=p(p({},e),{source:{value:g(e,"source").getOr("")},altsource:{value:g(e,"altsource").getOr("")},poster:{value:g(e,"poster").getOr("")}});return h(["width","height"],function(r){g(e,r).each(function(e){var t=n.dimensions||{};t[r]=e,n.dimensions=t})}),n}function $(r){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";r.notificationManager.open({type:"error",text:t})}}function M(e,t){return y(v(e),t)}function F(a,o){return function(e){var t,r,n;i(e.url)&&0<e.url.trim().length&&(t=e.html,r=M(o,t),n=p(p({},r),{source:e.url,embed:t}),a.setData(P(n)))}}function z(e,t){var r=e.dom.select("*[data-mce-object]");e.insertContent(t),function(e,t){for(var r=e.dom.select("*[data-mce-object]"),n=0;n<t.length;n++)for(var a=r.length-1;0<=a;a--)t[n]===r[a]&&r.splice(a,1);e.selection.select(r[0])}(e,r),e.nodeChanged()}function N(m){var e,t,r,n=(r=A(t=(e=m).selection.getNode())?e.serializer.serialize(t,{selection:!0}):"",p({embed:r},y(v(e),r))),d=f(n),a=P(n),o={title:"General",name:"general",items:function(e){for(var t=[],r=0,n=e.length;r<n;++r){if(!l(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);G.apply(t,e[r])}return t}([[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],m.getParam("media_dimensions",!0)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[]])},i=[];m.getParam("media_alt_source",!0)&&i.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),m.getParam("media_poster",!0)&&i.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var c=[o,{title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]}];0<i.length&&c.push({title:"Advanced",name:"advanced",items:i});var h=m.windowManager.open({title:"Insert/Edit Media",size:"normal",body:{type:"tabpanel",tabs:c},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var t,r,n,a,o=D(e.getData());t=d.get(),n=m,(r=o).embed=S(r.embed,r),r.embed&&(t.source===r.source||(a=r.source,J(ae,a)))?z(n,r.embed):C(n,r).then(function(e){z(n,e.html)}).catch($(n)),e.close()},onChange:function(e,t){switch(t.name){case"source":u=d.get(),l=D(e.getData(),"source"),u.source!==l.source&&(F(h,m)({url:l.source,html:""}),C(m,l).then(F(h,m)).catch($(m)));break;case"embed":c=D((i=e).getData()),s=M(m,c.embed),i.setData(P(s));break;case"dimensions":case"altsource":case"poster":n=t.name,a=D((r=e).getData(),n),o=k(m,a),r.setData(P(p(p({},a),{embed:o})))}var r,n,a,o,i,c,s,u,l;d.set(D(e.getData()))},initialData:a})}function U(o,e){if(!1===o.getParam("media_filter_html",!0))return e;var i,c=Z();return V({validate:!1,allow_conditional_comments:!1,comment:function(e){i||c.comment(e)},cdata:function(e){i||c.cdata(e)},text:function(e,t){i||c.text(e,t)},start:function(e,t,r){if(i=!0,"script"!==e&&"noscript"!==e&&"svg"!==e){for(var n=t.length-1;0<=n;n--){var a=t[n].name;0===a.indexOf("on")&&(delete t.map[a],t.splice(n,1)),"style"===a&&(t[n].value=o.dom.serializeStyle(o.dom.parseStyle(t[n].value),e))}c.start(e,t,r),i=!1}},end:function(e){i||c.end(e)}},Y({})).parse(e),c.getContent()}function E(e,t,r,n){void 0===n&&(n=null);var a=e.attr(r);return s(a)?a:J(t,r)?null:n}function R(e,t,r){var n="img"===t.name||"video"===e.name,a="audio"===e.name?"30":"150",o=n?a:null;t.attr({width:E(e,r,"width",n?"300":null),height:E(e,r,"height",o)})}function L(e,t){var r=t.name,n=new oe("span",1);n.attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":r,class:"mce-preview-object mce-object-"+r}),se(e,t,n);var a,o=e.dom.parseStyle(t.attr("style")),i=new oe(r,1);R(t,i,o),i.attr({src:t.attr("src"),style:t.attr("style"),class:t.attr("class")}),"iframe"===r?i.attr({allowfullscreen:t.attr("allowfullscreen"),frameborder:"0"}):(h(["controls","crossorigin","currentTime","loop","muted","poster","preload"],function(e){i.attr(e,t.attr(e))}),s(a=n.attr("data-mce-html"))&&function(e,t,r,n){for(var a=ce({forced_root_block:!1,validate:!1},e.schema).parse(n,{context:t});a.firstChild;)r.append(a.firstChild)}(e,r,i,unescape(a)));var c=new oe("span",1);return c.attr("class","mce-shim"),n.append(i),n.append(c),n}function I(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri")||(t=e.attr("class"))&&/\btiny-pageembed\b/.test(t))return 1;var t}var B=function(r){function e(){return a}function t(e){return e(r)}var n=o(r),a={fold:function(e,t){return t(r)},isSome:m,isNone:c,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(e){return B(e(r))},each:function(e){e(r)},bind:t,exists:t,forall:t,filter:function(e){return e(r)?a:d},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};return a},W={some:B,none:r,from:function(e){return null==e?d:B(e)}},G=Array.prototype.push,q=Object.keys,H=Object.hasOwnProperty,J=function(e,t){return H.call(e,t)},K=tinymce.util.Tools.resolve("tinymce.util.Tools"),Q=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),V=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),X=Q.DOM,Y=tinymce.util.Tools.resolve("tinymce.html.Schema"),Z=tinymce.util.Tools.resolve("tinymce.html.Writer"),ee=Q.DOM,te=["source","altsource"],re=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],ne=tinymce.util.Tools.resolve("tinymce.util.Promise"),ae={},oe=tinymce.util.Tools.resolve("tinymce.html.Node"),ie=tinymce.util.Tools.resolve("tinymce.Env"),ce=tinymce.util.Tools.resolve("tinymce.html.DomParser"),se=function(e,t,r){for(var n=t.attributes,a=n.length;a--;){var o=n[a].name,i=n[a].value;"width"!==o&&"height"!==o&&"style"!==o&&("data"!==o&&"src"!==o||(i=e.convertURL(i,o)),r.attr("data-mce-p-"+o,i))}var c=t.firstChild&&t.firstChild.value;c&&(r.attr("data-mce-html",escape(U(e,c))),r.firstChild=null)};n.add("media",function(e){var t,r,d,n,a;function o(){return r.execCommand("mceMedia")}return(t=e).addCommand("mceMedia",function(){N(t)}),(r=e).ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:o,onSetup:function(e){var t=r.selection;return e.setActive(A(t.getNode())),t.selectorChangedWithUnbind("img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]",e.setActive).unbind}}),r.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:o}),e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}),(d=e).on("preInit",function(){var t=d.schema.getSpecialElements();K.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var u,r=d.schema.getBoolAttrs();K.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",(u=d,function(e){for(var t,r,n,a,o,i,c,s=e.length;s--;)(t=e[s]).parent&&(t.parent.attr("data-mce-object")||"script"===t.name&&!(r=b(v(u),t.attr("src")))||(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),("iframe"===(c=t.name)||"video"===c||"audio"===c)&&u.getParam("media_live_embeds",!0)&&ie.ceFalse?I(t)||t.replace(L(u,t)):I(t)||t.replace((n=u,i=void 0,o=(a=t).name,(i=new oe("img",1)).shortEnded=!0,se(n,a,i),R(a,i,{}),i.attr({style:a.attr("style"),src:ie.transparentSrc,"data-mce-object":o,class:"mce-object mce-object-"+o}),i))))})),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,n,a,o,i,c,s,u,l=e.length;l--;)if((r=e[l]).parent){for(s=r.attr(t),n=new oe(s,1),"audio"!==s&&"script"!==s&&((u=r.attr("class"))&&-1!==u.indexOf("mce-preview-object")?n.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):n.attr({width:r.attr("width"),height:r.attr("height")})),n.attr({style:r.attr("style")}),a=(o=r.attributes).length;a--;){var m=o[a].name;0===m.indexOf("data-mce-p-")&&n.attr(m.substr(11),o[a].value)}"script"===s&&n.attr("type","text/javascript"),(i=r.attr("data-mce-html"))&&((c=new oe("#text",3)).raw=!0,c.value=U(d,unescape(i)),n.append(c)),r.replace(n)}})}),d.on("SetContent",function(){d.$("span.mce-preview-object").each(function(e,t){var r=d.$(t);0===r.find("span.mce-shim").length&&r.append('<span class="mce-shim"></span>')})}),(n=e).on("click keyup touchend",function(){var e=n.selection.getNode();e&&n.dom.hasClass(e,"mce-preview-object")&&n.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),n.on("ObjectSelected",function(e){"script"===e.target.getAttribute("data-mce-object")&&e.preventDefault()}),n.on("ObjectResized",function(e){var t,r=e.target;!r.getAttribute("data-mce-object")||(t=r.getAttribute("data-mce-html"))&&(t=unescape(t),r.setAttribute("data-mce-html",escape(S(t,{width:String(e.width),height:String(e.height)}))))}),a=e,{showDialog:function(){N(a)}}})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function o(n,e){for(var a="",o=0;o<e;o++)a+=n;return a}function s(n,e){var a=n.getParam("nonbreaking_wrap",!0,"boolean")||n.plugins.visualchars?'<span class="'+(n.plugins.visualchars&&n.plugins.visualchars.isEnabled()?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap")+'" contenteditable="false">'+o("&nbsp;",e)+"</span>":o("&nbsp;",e);n.undoManager.transact(function(){return n.insertContent(a)})}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.VK");n.add("nonbreaking",function(n){var e,a,o,t,i;function r(){return a.execCommand("mceNonBreaking")}(e=n).addCommand("mceNonBreaking",function(){s(e,1)}),(a=n).ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:r}),a.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:r}),0<(i="boolean"==typeof(t=(o=n).getParam("nonbreaking_force_tab",0))?!0===t?3:0:t)&&o.on("keydown",function(n){n.keyCode!==c.TAB||n.isDefaultPrevented()||n.shiftKey||(n.preventDefault(),n.stopImmediatePropagation(),s(o,i))})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function l(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")}function u(e){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(e)}}function e(e){var t,r="contenteditable",n=" "+f.trim(e.getParam("noneditable_editable_class","mceEditable"))+" ",a=" "+f.trim(l(e))+" ",i=u(n),o=u(a),c=(t=e.getParam("noneditable_regexp",[]))&&t.constructor===RegExp?[t]:t;e.on("PreInit",function(){0<c.length&&e.on("BeforeSetContent",function(t){!function(t,e,n){var r=e.length,a=n.content;if("raw"!==n.format){for(;r--;)a=a.replace(e[r],function(i,o,c){return function(t){var e=arguments,n=e[e.length-2],r=0<n?o.charAt(n-1):"";if('"'===r)return t;if(">"===r){var a=o.lastIndexOf("<",n);if(-1!==a&&-1!==o.substring(a,n).indexOf('contenteditable="false"'))return t}return'<span class="'+c+'" data-mce-content="'+i.dom.encode(e[0])+'">'+i.dom.encode("string"==typeof e[1]?e[1]:e[0])+"</span>"}}(t,a,l(t)));n.content=a}}(e,c,t)}),e.parser.addAttributeFilter("class",function(t){for(var e,n=t.length;n--;)e=t[n],i(e)?e.attr(r,"true"):o(e)&&e.attr(r,"false")}),e.serializer.addAttributeFilter(r,function(t){for(var e,n=t.length;n--;)e=t[n],(i(e)||o(e))&&(0<c.length&&e.attr("data-mce-content")?(e.name="#text",e.type=3,e.raw=!0,e.value=e.attr("data-mce-content")):e.attr(r,null))})})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.util.Tools");t.add("noneditable",function(t){e(t)})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function u(e){return e.getParam("pagebreak_split_block",!1)}function l(e){var a='<img src="'+n.transparentSrc+'" class="'+m+'" data-mce-resize="false" data-mce-placeholder />';return e?"<p>"+a+"</p>":a}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),m="mce-pagebreak";e.add("pagebreak",function(e){var a,n,o,i,t,r;function c(){return n.execCommand("mcePageBreak")}function g(){return u(o)}(a=e).addCommand("mcePageBreak",function(){a.insertContent(l(u(a)))}),(n=e).ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:c}),n.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:c}),i=(o=e).getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e"),t=new RegExp(i.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),o.on("BeforeSetContent",function(e){e.content=e.content.replace(t,l(g()))}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var a,n,t,r=e.length;r--;)(t=(n=e[r]).attr("class"))&&-1!==t.indexOf(m)&&(a=n.parent,o.schema.getBlockElements()[a.name]&&g()?(a.type=3,a.value=i,a.raw=!0,n.remove()):(n.type=3,n.value=i,n.raw=!0))})}),(r=e).on("ResolveName",function(e){"IMG"===e.target.nodeName&&r.dom.hasClass(e.target,m)&&(e.name="pagebreak")})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function w(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function P(e){return!(null==e)}function _(){}function o(e){return function(){return e}}function e(e){return e}function t(){return l}var n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return n=typeof(t=e),"array"==(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n);var t,n},i=o(!(n="function")),s=o(!0),l={fold:function(e,t){return e()},isSome:i,isNone:s,getOr:e,getOrThunk:a,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:e,orThunk:a,map:t,each:_,bind:t,exists:i,forall:s,filter:function(){return l},toArray:function(){return[]},toString:o("none()")};function a(e){return e()}function c(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1}function f(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var o=e[a];r[a]=t(o,a)}return r}function d(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function p(){var e,t,n=(e=_,t=w(le.none()),{clear:function(){r(),t.set(le.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(e){r(),t.set(le.some(e))}});function r(){return t.get().each(e)}return de(de({},n),{on:function(e){return n.get().each(e)}})}function m(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t}function C(e,t){return e.fire("PastePlainTextToggle",{state:t})}function T(e){return e.getParam("paste_data_images",!1)}function g(e){return e.getParam("paste_retain_style_properties")}function h(e){return e.getParam("validate")}function y(e){return e.getParam("paste_data_images",!1,"boolean")}function v(e){return he.explode(e.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))}function b(e){return-1!==e.indexOf(be)}function x(e,t,n){return t?(r=!0===t?"p":t,a=n,o=e.split(/\n\n/),i=function(e,t){var n,r=[],a="<"+e;if("object"==typeof t){for(var o in t)n=o,we.call(t,n)&&r.push(o+'="'+Pe.encodeAllRaw(t[o])+'"');r.length&&(a+=" "+r.join(" "))}return a+">"}(r,a),s="</"+r+">",1===(l=he.map(o,function(e){return e.split(/\n/).join("<br />")})).length?l[0]:he.map(l,function(e){return i+e+s}).join("")):e.replace(/\r?\n/g,"<br>");var r,a,o,i,s,l}function D(t,e){return he.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function k(e){return D(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function O(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function S(r,e){var a,t=g(r);t&&(a=he.makeMap(t.split(/[, ]/))),e=D(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var n=r.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody"),o=De({valid_elements:n,valid_children:"-li[p]"});he.each(o.elements,function(e){e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var i=_e({},o);i.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)(t=e[n]).attr("style",function(r,a,o,i){var s={},e=r.dom.parseStyle(i);return he.each(e,function(e,t){switch(t){case"mso-list":var n=/\w+ \w+([0-9]+)/i.exec(i);n&&(o._listLevel=parseInt(n[1],10)),/Ignore/i.test(e)&&o.firstChild&&(o._listIgnore=!0,o.firstChild._listIgnore=!0);break;case"horiz-align":t="text-align";break;case"vert-align":t="vertical-align";break;case"font-color":case"mso-foreground":t="color";break;case"mso-background":case"mso-highlight":t="background";break;case"font-weight":case"font-style":return void("normal"!==e&&(s[t]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void o.remove()}0!==t.indexOf("mso-comment")?0!==t.indexOf("mso-")&&("all"===g(r)||a&&a[t])&&(s[t]=e):o.remove()}),/(bold)/i.test(s["font-weight"])&&(delete s["font-weight"],o.wrap(new Te("b",1))),/(italic)/i.test(s["font-style"])&&(delete s["font-style"],o.wrap(new Te("i",1))),r.dom.serializeStyle(s,o.name)||null}(r,a,t,t.attr("style"))),"span"===t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),i.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),i.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),i.addNodeFilter("a",function(e){for(var t,n,r,a=e.length;a--;)n=(t=e[a]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_")?t.remove():!(n=n&&0===n.indexOf("file://")?(n=n.split("#")[1])&&"#"+n:n)&&!r||r&&!/^_?(?:toc|edn|ftn)/i.test(r)?t.unwrap():t.attr({href:n,name:r})});var s=i.parse(e);return r.getParam("paste_convert_word_fake_lists",!0)&&function(e){for(var a,o,i=1,n=function(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)for(;t+=n(e),e=e.next;);return t},s=function(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!s(e,t))return!1}while(e=e.next);return!0},l=function(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)for(;l(e),e=e.next;);},t=function(e,t,n){var r=e._listLevel||i;(a=r!==i?r<i?a&&a.parent.parent:(o=a,null):a)&&a.name===t?a.append(e):(o=o||a,a=new Te(t,1),1<n&&a.attr("start",""+n),e.wrap(a)),e.name="li",i<r&&o&&o.lastChild.append(a),i=r,l(e),s(e,/^\u00a0+/),s(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),s(e,/^\u00a0+/)},r=[],u=e.firstChild;null!=u;)if(r.push(u),null!==(u=u.walk()))for(;void 0!==u&&u.parent!==e;)u=u.walk();for(var c,f,d,p=0;p<r.length;p++)"p"===(e=r[p]).name&&e.firstChild?(c=n(e),/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(c)?t(e,"ul"):function(t){var n=!1;return t=c.replace(/^[\u00a0 ]+/,""),he.each([/^[IVXLMCD]+\.[ \u00a0]/,/^[ivxlmcd]+\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],function(e){if(e.test(t))return!(n=!0)}),n}(c)?(d=1,t(e,"ol",d=(f=/([0-9]+)\./.exec(c))?parseInt(f[1],10):d)):e._listLevel?t(e,"ul",1):a=null):(o=a,a=null)}(s),Ce({validate:h(r)},o).serialize(s)}function j(e,t){return{content:e,cancelled:t}}function A(e,t,n){var r,a,o,i,s,l,u,c,f,d,p,m,g=O(t),v=g?(a=t,(r=e).getParam("paste_enable_default_filters",!0)?S(r,a):a):t;return i=n,s=g,p=(o=e).fire("PastePreProcess",{content:v,internal:i,wordContent:s}),m=function(e,t){var n=_e({},e.schema);n.addNodeFilter("meta",function(e){he.each(e,function(e){e.remove()})});var r=n.parse(t,{forced_root_block:!1,isRootContent:!0});return Ce({validate:h(e)},e.schema).serialize(r)}(o,p.content),o.hasEventListeners("PastePostProcess")&&!p.isDefaultPrevented()?(u=i,c=s,f=(l=o).dom.create("div",{style:"display:none"},m),j((d=l.fire("PastePostProcess",{node:f,internal:u,wordContent:c})).node.innerHTML,d.isDefaultPrevented())):j(m,p.isDefaultPrevented())}function R(e,t){return e.insertContent(t,{merge:e.getParam("paste_merge_formats",!0),paste:!0}),!0}function I(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)}function F(e,t,n){return!(!1!==e.selection.isCollapsed()||!I(t)||(a=t,o=n,(r=e).undoManager.extra(function(){o(r,a)},function(){r.execCommand("mceInsertLink",!1,a)}),0));var r,a,o}function E(e,t,n){return r=e,!(!I(a=t)||!c(v(r),function(e){return m(t=a.toLowerCase(),n="."+e.toLowerCase(),t.length-n.length);var t,n})||(i=t,s=n,(o=e).undoManager.extra(function(){s(o,i)},function(){o.insertContent('<img src="'+i+'">')}),0));var r,a,o,i,s}function M(e){return"\n"===e||"\r"===e}function B(e,t,n,r){var a,o,i,s,l=A(e,t,n);!1===l.cancelled&&(a=e,o=l.content,r||!1===a.getParam("smart_paste",!0)?R(a,o):(i=a,s=o,he.each([F,E,R],function(e){return!0!==e(i,s,R)})))}function L(e,t,n){var r=n||b(t);B(e,t.replace(be,""),r,!1)}function N(e,t){var n,r,a,o,i,s,l=e.dom.encode(t).replace(/\r\n/g,"\n"),u=x((n=l,o=(r=e.getParam("paste_tab_spaces",4,"number"))<=0?"":new Array(r+1).join(" "),i=n.replace(/\t/g,o),s={pcIsSpace:!(a=function(e,t){return-1!==" \f\t\v".indexOf(t)||"\xa0"===t?e.pcIsSpace||""===e.str||e.str.length===i.length-1||(n=e.str.length+1)<i.length&&0<=n&&M(i[n])?{pcIsSpace:!1,str:e.str+"\xa0"}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:M(t),str:e.str+t};var n}),str:""},d(i,function(e,t){s=a(s,e)}),s.str),e.getParam("forced_root_block"),e.getParam("forced_root_block_attrs"));B(e,u,!1,!0)}function H(e){var t,n={};if(e&&(!e.getData||(t=e.getData("Text"))&&0<t.length&&-1===t.indexOf("data:text/mce-internal,")&&(n["text/plain"]=t),e.types))for(var r=0;r<e.types.length;r++){var a=e.types[r];try{n[a]=e.getData(a)}catch(e){n[a]=""}}return n}function $(e,t){return t in e&&0<e[t].length}function z(e){return $(e,"text/html")||$(e,"text/plain")}function U(w,e,t){var n,r,a,o,i,s="paste"===e.type?e.clipboardData:e.dataTransfer;if(y(w)&&s){var l=(n=w,a=(r=s).items?function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!u(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);ce.apply(t,e[n])}return t}(f(fe(r.items),function(e){return"file"===e.kind?[e.getAsFile()]:[]})):[],o=r.files?fe(r.files):[],function(e,t){for(var n=[],r=0,a=e.length;r<a;r++){var o=e[r];t(o,r)&&n.push(o)}return n}(0<a.length?a:o,(i=v(n),function(r){return m(r.type,"image/",0)&&c(i,function(e){return t=e.toLowerCase(),(he.hasOwn(n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"},t)?"image/"+n[t]:"image/"+t)===r.type;var t,n})})));if(0<l.length)return e.preventDefault(),ge.all(f(l,function(r){return new ge(function(e){var t=P(r.getAsFile)?r.getAsFile():r,n=new window.FileReader;n.onload=function(){e({blob:t,uri:n.result})},n.readAsDataURL(t)})})).then(function(e){t&&w.selection.setRng(t),d(e,function(e){var t,n,r,a,o,i,s,l,u,c,f,d,p,m,g,v,h,y,b,x;t=w,r=(n=e).uri,g=(a=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(r))?{type:a[1],data:decodeURIComponent(a[2])}:{type:null,data:null},v=g.data,h=g.type,y=ke(),b=n.blob,(x=new Image).src=n.uri,p=x,!(m=t.getParam("images_dataimg_filter"))||m(p)?(c=void 0,(i=(o=t.editorUpload.blobCache).getByData(v,h))?c=i:(l=(s=t.getParam("images_reuse_filename")&&P(b.name))?(f=t,P(d=b.name.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i))?f.dom.encode(d[1]):null):y,u=s?b.name:void 0,c=o.create(y,b,v,l,u),o.add(c)),L(t,'<img src="'+c.blobUri()+'">',!1)):L(t,'<img src="'+n.uri+'">',!1)})}),!0}return!1}function V(e){return ve.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode}function K(o,e,t){var i,s,v,l,u,c,f;function d(e,t,n,r,a){var o;$(t,"text/html")?o=t["text/html"]:(o=v.getHtml(),a=a||b(o),v.isDefaultContent(o)&&(r=!0)),o=k(o),v.remove();var i,s,l,u,c,f,d,p,m=!1===a&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(o),g=I(o);((r=!o.length||m&&!g||r)||g)&&(o=$(t,"text/plain")&&m?t["text/plain"]:(i=o,s=De(),l=_e({},s),u="",c=s.getShortEndedElements(),f=he.makeMap("script noscript style textarea video audio iframe object"," "),d=s.getBlockElements(),p=function(e){var t=e.name,n=e;if("br"!==t){if("wbr"!==t)if(c[t]&&(u+=" "),f[t])u+=" ";else{if(3===e.type&&(u+=e.value),!e.shortEnded&&(e=e.firstChild))for(;p(e),e=e.next;);d[t]&&n.next&&(u+="\n","p"===t&&(u+="\n"))}}else u+="\n"},i=D(i,[/<!\[[^\]]+\]>/g]),p(l.parse(i)),u)),v.isDefaultContent(o)?n||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):r?N(e,o):L(e,o,a)}s=o,v=e,l=t,c=p(),f=p(),s.on("keyup",f.clear),s.on("keydown",function(e){function t(e){V(e)&&!e.isDefaultPrevented()&&v.remove()}if(V(e)&&!e.isDefaultPrevented()&&(!(u=e.shiftKey&&86===e.keyCode)||!pe.webkit||-1===navigator.userAgent.indexOf("Version/"))){if(e.stopImmediatePropagation(),c.set(e),f.set(!0),pe.ie&&u)return e.preventDefault(),void s.fire("paste",{ieFake:!0});v.remove(),v.create(),s.once("keyup",t),s.once("paste",function(){s.off("keyup",t)})}}),s.on("paste",function(e){var t=c.isSet()||f.isSet();t&&c.clear();var n,r=H(e.clipboardData||s.getDoc().dataTransfer),a="text"===l.get()||u,o=$(r,xe());u=!1,e.isDefaultPrevented()||(n=e.clipboardData,-1!==navigator.userAgent.indexOf("Android")&&n&&n.items&&0===n.items.length)||!z(r)&&U(s,e,v.getLastRng()||s.selection.getRng())?v.remove():(t||e.preventDefault(),!pe.ie||t&&!e.ieFake||$(r,"text/html")||(v.create(),s.dom.bind(v.getEl(),"paste",function(e){e.stopPropagation()}),s.getDoc().execCommand("Paste",!1,null),r["text/html"]=v.getHtml()),$(r,"text/html")?(e.preventDefault(),o=o||b(r["text/html"]),d(s,r,t,a,o)):me.setEditorTimeout(s,function(){d(s,r,t,a,o)},0))}),o.parser.addNodeFilter("img",function(e,t,n){var r;if(!y(o)&&n.data&&!0===n.data.paste)for(var a=e.length;a--;)(i=e[a].attr("src"))&&(0!==i.indexOf("webkit-fake-url")&&(o.getParam("allow_html_data_urls",!1,"boolean")||0!==i.indexOf("data:"))||((r=e[a]).attr("data-mce-object")||i===pe.transparentSrc||r.remove()))})}function X(e){return pe.ie&&e.inline?document.body:e.getBody()}function W(e){var t=w(null),n="%MCEPASTEBIN%";return{create:function(){return function(e,t,n){var r=e.dom,a=e.getBody();t.set(e.selection.getRng());var o,i,s,l,u=e.dom.add(X(e),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n);(pe.ie||pe.gecko)&&r.setStyle(u,"left","rtl"===r.getStyle(a,"direction",!0)?65535:-65535),r.bind(u,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),i=u,s=n,X(l=o=e)!==l.getBody()&&o.dom.bind(i,"paste keyup",function(e){Oe(o,s)||o.fire("paste")}),u.focus(),e.selection.select(u,!0)}(e,t,n)},remove:function(){return function(e,t){if(oe(e)){for(var n,r=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);r&&e.selection.setRng(r)}t.set(null)}(e,t)},getEl:function(){return oe(e)},getHtml:function(){return function(n){function t(e,t){e.appendChild(t),n.dom.remove(t,!0)}var e=he.grep(X(n).childNodes,function(e){return"mcepastebin"===e.id}),r=e.shift();he.each(e,function(e){t(r,e)});for(var a=n.dom.select("div[id=mcepastebin]",r),o=a.length-1;0<=o;o--){var i=n.dom.create("div");r.insertBefore(i,a[o]),t(i,a[o])}return r?r.innerHTML:""}(e)},getLastRng:t.get,isDefault:function(){return Oe(e,n)},isDefaultContent:function(e){return e===n}}}function Y(e,t,n,r){!function(e,t,n){if(!1===pe.iOS&&"function"==typeof(null==e?void 0:e.setData))try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(xe(),t),1}catch(e){return}}(e.clipboardData,t.html,t.text)?n(t.html,r):(e.preventDefault(),r())}function Z(s){return function(e,t){var n=be+e,r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),a=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(a),s.dom.add(s.getBody(),r);var o=s.selection.getRng();a.focus();var i=s.dom.createRng();i.selectNodeContents(a),s.selection.setRng(i),me.setTimeout(function(){s.selection.setRng(o),r.parentNode.removeChild(r),t()},0)}}function q(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}}function G(e){return!e.selection.isCollapsed()||(t=e).dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody());var t}function J(e,t){return Se.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())}function Q(e,t){e.focus(),e.selection.setRng(t)}function ee(t,n){t.on("PastePreProcess",function(e){e.content=n(t,e.content,e.internal,e.wordContent)})}function te(e,t){if(!O(t))return t;var n=[];return he.each(e.schema.getBlockElements(),function(e,t){n.push(t)}),t=D(t,[[new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g"),"$1"]]),D(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function ne(e,t,n,r){if(r||n)return t;var c,f,d,a=e.getParam("paste_webkit_styles");return!1===e.getParam("paste_remove_styles_if_webkit",!0)||"all"===a?t:(t=(c=a?a.split(/[, ]/):c)?(f=e.dom,d=e.selection.getNode(),t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,r){var a=f.parseStyle(f.decode(n)),o={};if("none"===c)return t+r;for(var i=0;i<c.length;i++){var s=a[c[i]],l=f.getStyle(d,c[i],!0);/color/.test(c[i])&&(s=f.toHex(s),l=f.toHex(l)),l!==s&&(o[c[i]]=s)}var u=f.serializeStyle(o,"span");return u?t+' style="'+u+'"'+r:t+r})):t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3")).replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r})}function re(n,e){n.$("a",e).find("font,u").each(function(e,t){n.dom.remove(t,!0)})}function ae(n,r){return function(t){function e(e){return t.setActive(e.state)}return t.setActive("text"===r.pasteFormat.get()),n.on("PastePlainTextToggle",e),function(){return n.off("PastePlainTextToggle",e)}}}function oe(e){return e.dom.get("mcepastebin")}var ie,se=function(n){function e(){return a}function t(e){return e(n)}var r=o(n),a={fold:function(e,t){return t(n)},isSome:s,isNone:i,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return se(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?a:l},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return a},le={some:se,none:t,from:function(e){return null==e?l:se(e)}},ue=Array.prototype.slice,ce=Array.prototype.push,fe=typeof Array.from===n?Array.from:function(e){return ue.call(e)},de=function(){return(de=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},pe=tinymce.util.Tools.resolve("tinymce.Env"),me=tinymce.util.Tools.resolve("tinymce.util.Delay"),ge=tinymce.util.Tools.resolve("tinymce.util.Promise"),ve=tinymce.util.Tools.resolve("tinymce.util.VK"),he=tinymce.util.Tools.resolve("tinymce.util.Tools"),ye="x-tinymce/html",be="\x3c!-- "+ye+" --\x3e",xe=o(ye),we=Object.hasOwnProperty,Pe=tinymce.util.Tools.resolve("tinymce.html.Entities"),_e=tinymce.util.Tools.resolve("tinymce.html.DomParser"),Ce=tinymce.util.Tools.resolve("tinymce.html.Serializer"),Te=tinymce.util.Tools.resolve("tinymce.html.Node"),De=tinymce.util.Tools.resolve("tinymce.html.Schema"),ke=(ie=0,function(){return"mceclip"+ie++}),Oe=function(e,t){var n=oe(e);return n&&"mcepastebin"===n.id&&n.innerHTML===t},Se=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils");r.add("paste",function(e){if(0==(!!e.hasPlugin("powerpaste",!0)&&(void 0!==window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0))){var t=w(!1),n=w(e.getParam("paste_as_text",!1)?"text":"html"),r=(y=n,b=W(h=e),h.on("PreInit",function(){return K(h,b,y)}),{pasteFormat:y,pasteHtml:function(e,t){return L(h,e,t)},pasteText:function(e){return N(h,e)},pasteImageData:function(e,t){return U(h,e,t)},getDataTransferItems:H,hasHtmlOrText:z,hasContentType:$}),a=e;return pe.webkit&&ee(a,ne),pe.ie&&(ee(a,te),v=re,(g=a).on("PastePostProcess",function(e){v(g,e.node)})),(p=e).ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:x,onSetup:ae(p,m=r)}),p.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:x,onSetup:ae(p,m)}),d=r,(f=e).addCommand("mceTogglePlainTextPaste",function(){var e,t=f;"text"===(e=d).pasteFormat.get()?(e.pasteFormat.set("html"),C(t,!1)):(e.pasteFormat.set("text"),C(t,!0)),t.focus()}),f.addCommand("mceInsertClipboardContent",function(e,t){t.content&&d.pasteHtml(t.content,t.internal),t.text&&d.pasteText(t.text)}),function(e){var t=e.plugins.paste,n=e.getParam("paste_preprocess");n&&e.on("PastePreProcess",function(e){n.call(t,t,e)});var r=e.getParam("paste_postprocess");r&&e.on("PastePostProcess",function(e){r.call(t,t,e)})}(e),(o=e).on("cut",(u=o,function(e){G(u)&&Y(e,q(u),Z(u),function(){var e;pe.browser.isChrome()||pe.browser.isFirefox()?(e=u.selection.getRng(),me.setEditorTimeout(u,function(){u.selection.setRng(e),u.execCommand("Delete")},0)):u.execCommand("Delete")})})),o.on("copy",(c=o,function(e){G(c)&&Y(e,q(c),Z(c),_)})),s=r,l=t,(i=e).getParam("paste_block_drop",!1)&&i.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),T(i)||i.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()}),i.on("drop",function(e){var t,n,r,a,o=J(i,e);e.isDefaultPrevented()||l.get()||(t=s.getDataTransferItems(e.dataTransfer),n=s.hasContentType(t,xe()),(!s.hasHtmlOrText(t)||(r=t["text/plain"])&&0===r.indexOf("file://"))&&s.pasteImageData(e,o)||!o||!i.getParam("paste_filter_drop",!0)||(a=t["mce-internal"]||t["text/html"]||t["text/plain"])&&(e.preventDefault(),me.setEditorTimeout(i,function(){i.undoManager.transact(function(){t["mce-internal"]&&i.execCommand("Delete"),Q(i,o),a=k(a),t["text/html"]?s.pasteHtml(a,n):s.pasteText(a)})})))}),i.on("dragstart",function(e){l.set(!0)}),i.on("dragover dragend",function(e){T(i)&&!1===l.get()&&(e.preventDefault(),Q(i,J(i,e))),"dragend"===e.type&&l.set(!1)}),{clipboard:r}}var i,s,l,o,u,c,f,d,p,m,a,g,v,h,y,b;function x(){return p.execCommand("mceTogglePlainTextPaste")}})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.Env"),w=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("preview",function(e){var n,t;function i(){return t.execCommand("mcePreview")}(n=e).addCommand("mcePreview",function(){var e,t;t=function(t){var n="",i=t.dom.encode,e=t.getParam("content_style","","string");n+='<base href="'+i(t.documentBaseURI.getURI())+'">';var o=t.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"";w.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+i(t.documentBaseURI.toAbsolute(e))+'"'+o+">"}),e&&(n+='<style type="text/css">'+e+"</style>");var a,r,s,c,d,l,m,y=-1===(c=(a=t).getParam("body_id","tinymce","string")).indexOf("=")?c:(s=(r=a).getParam("body_id","","hash"))[r.id]||s,u=-1===(m=(d=t).getParam("body_class","","string")).indexOf("=")?m:(l=d).getParam("body_class","","hash")[l.id]||"",v='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(f.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",g=t.getBody().dir,p=g?' dir="'+i(g)+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+i(y)+'" class="mce-content-body '+i(u)+'"'+p+">"+t.getContent()+v+"</body></html>"}(e=n),e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}}).focus("close")}),(t=e).ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:i}),t.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:i})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.Env");n.add("print",function(n){var t,i;function e(){return i.execCommand("mcePrint")}(t=n).addCommand("mcePrint",function(){r.browser.isIE()?t.getDoc().execCommand("print",!1,null):t.getWin().print()}),(i=n).ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:e}),i.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:e}),n.addShortcut("Meta+P","","mcePrint")})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function n(a){a.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){var i=a;new s(function(n){var r=document.createElement("input");r.type="file",r.accept="image/*",r.style.position="fixed",r.style.left="0",r.style.top="0",r.style.opacity="0.001",document.body.appendChild(r),r.addEventListener("change",function(t){n(Array.prototype.slice.call(t.target.files))});var o=function(t){function e(){n([]),r.parentNode.removeChild(r)}d.os.isAndroid()&&"remove"!==t.type?f.setEditorTimeout(i,e,0):e(),i.off("focusin remove",o)};i.on("focusin remove",o),r.click()}).then(function(t){var c,n;0<t.length&&(c=t[0],n=c,new s(function(t){var e=new FileReader;e.onloadend=function(){t(e.result.split(",")[1])},e.readAsDataURL(n)}).then(function(t){var e,n,r,o,i,u;n=t,r=c,i=(e=a).editorUpload.blobCache,u=i.create((o=(new Date).getTime(),"mceu_"+Math.floor(1e9*Math.random())+ ++l+String(o)),r,n),i.add(u),e.insertContent(e.dom.createHTML("img",{src:u.blobUri()}))}))})}}),a.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:function(){var t,n;(t=a).plugins.table?t.plugins.table.insertTable(2,2):(n=t).undoManager.transact(function(){n.insertContent(function(){var t='<table data-mce-id="mce" style="width: 100%">';t+="<tbody>";for(var e=0;e<2;e++){t+="<tr>";for(var n=0;n<2;n++)t+="<td><br></td>";t+="</tr>"}return(t+="</tbody>")+"</table>"}());var t=n.dom.select("*[data-mce-id]")[0];t.removeAttribute("data-mce-id");var e=n.dom.select("td,th",t);n.selection.setCursorLocation(e[0],0)})}})}function t(r){return function(t){return n=typeof(e=t),(null===e?"null":"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n)===r;var e,n}}function e(e){return function(t){return typeof t===e}}function i(t){return function(){return t}}function r(t){return t}function o(){return y}var u,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=0,s=tinymce.util.Tools.resolve("tinymce.util.Promise"),d=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=t("string"),m=t("object"),g=t("array"),v=e("boolean"),h=e("function"),p=i(!1),b=i(!(u=void 0)),y={fold:function(t,e){return t()},isSome:p,isNone:b,getOr:r,getOrThunk:k,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:r,orThunk:k,map:o,each:function(){},bind:o,exists:p,forall:b,filter:function(){return y},toArray:function(){return[]},toString:i("none()")};function k(t){return t()}var w=function(n){function t(){return o}function e(t){return t(n)}var r=i(n),o={fold:function(t,e){return e(n)},isSome:b,isNone:p,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return w(t(n))},each:function(t){t(n)},bind:e,exists:e,forall:e,filter:function(t){return t(n)?o:y},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},T={some:w,none:o,from:function(t){return null==t?y:w(t)}};function E(t,e,n,r,o){return t(n,r)?T.some(n):h(o)&&o(n)?T.none():e(n,r,o)}function N(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}function M(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}}var S={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return M(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return M(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return M(n)},fromDom:M,fromPoint:function(t,e,n){return T.from(t.dom.elementFromPoint(e,n)).map(M)}};function C(t,e,n){for(var r=t.dom,o=h(n)?n:p;r.parentNode;){var r=r.parentNode,i=S.fromDom(r);if(e(i))return T.some(i);if(o(i))break}return T.none()}function O(t,e,n){return C(t,function(t){return N(t,e)},n)}"undefined"!=typeof window||Function("return this;")();var q,x=(q=a,function(t,e,n){return function(){if(!q(n))throw new Error("Default value doesn't match requested type.")}(),function(t,e){if(g(t)||m(t))throw new Error("expected a string but found: "+t);return u===t?e:v(t)?!1===t?"":e:t}(t.getParam(e,n),n)});c.add("quickbars",function(t){var o,e;n(t),0<(e=x(o=t,"quickbars_insert_toolbar","quickimage quicktable")).trim().length&&o.ui.registry.addContextToolbar("quickblock",{predicate:function(t){function e(t){return t.dom===o.getBody()}var n=S.fromDom(t),r=o.schema.getTextBlockElements();return E(N,O,n,"table",e).fold(function(){return E(function(t,e){return e(t)},C,n,function(t){return t.dom.nodeName.toLowerCase()in r&&o.dom.isEmpty(t.dom)},e).isSome()},p)},items:e,position:"line",scope:"editor"}),function(e){function n(t){return"IMG"===t.nodeName||"FIGURE"===t.nodeName&&/image/i.test(t.className)}var t=x(e,"quickbars_image_toolbar","alignleft aligncenter alignright");0<t.trim().length&&e.ui.registry.addContextToolbar("imageselection",{predicate:n,items:t,position:"node"});var r=x(e,"quickbars_selection_toolbar","bold italic | quicklink h2 h3 blockquote");0<r.trim().length&&e.ui.registry.addContextToolbar("textselection",{predicate:function(t){return!n(t)&&!e.selection.isCollapsed()&&"false"!==e.dom.getContentEditableParent(t)},items:r,position:"selection",scope:"editor"})}(t)})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function o(e){return e.getParam("save_enablewhendirty",!0)}function a(e,n){e.notificationManager.open({text:n,type:"error"})}function t(t){t.addCommand("mceSave",function(){!function(e){var n=c.DOM.getParent(e.id,"form");if(!o(e)||e.isDirty()){if(e.save(),e.getParam("save_onsavecallback"))return e.execCallback("save_onsavecallback",e),e.nodeChanged();n?(e.setDirty(!1),n.onsubmit&&!n.onsubmit()||("function"==typeof n.submit?n.submit():a(e,"Error: Form submit field collision.")),e.nodeChanged()):a(e,"Error: No form element found.")}}(t)}),t.addCommand("mceCancel",function(){var e=t,n=r.trim(e.startContent);e.getParam("save_oncancelcallback")?e.execCallback("save_oncancelcallback",e):e.resetContent(n)})}function i(t){return function(e){function n(){e.setDisabled(o(t)&&!t.isDirty())}return n(),t.on("NodeChange dirty",n),function(){return t.off("NodeChange dirty",n)}}}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),r=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("save",function(e){var n;(n=e).ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:i(n)}),n.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return n.execCommand("mceCancel")},onSetup:i(n)}),n.addShortcut("Meta+S","","mceSave"),t(e)})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.10.3 (2022-02-09)
7
+ * Version: 5.10.4 (2022-04-27)
8
8
  */
9
9
  !function(){"use strict";function g(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function e(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}}function t(t){return function(e){return typeof e===t}}function p(){}function i(e){return function(){return e}}function n(e){return e}function r(){return m}var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=function(){return(v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=e("string"),c=e("array"),u=t("boolean"),l=t("number"),s=i(!1),f=i(!0),d=i("[!-#%-*,-\\/:;?@\\[-\\]_{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]"),m={fold:function(e,t){return e()},isSome:s,isNone:f,getOr:n,getOrThunk:h,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:n,orThunk:h,map:r,each:p,bind:r,exists:s,forall:f,filter:function(){return m},toArray:function(){return[]},toString:i("none()")};function h(e){return e()}function y(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r}function x(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function b(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n)}function w(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!c(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);A.apply(t,e[n])}return t}(y(e,t))}function O(e,t){return D.call(e,t)}var C=function(n){function e(){return o}function t(e){return e(n)}var r=i(n),o={fold:function(e,t){return t(n)},isSome:f,isNone:s,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return C(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?o:m},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},T={some:C,none:r,from:function(e){return null==e?m:C(e)}},E=d,N=tinymce.util.Tools.resolve("tinymce.Env"),k=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=Array.prototype.slice,A=Array.prototype.push,D=Object.hasOwnProperty;function M(e,t,n){!function(e,t,n){if(!(a(n)||u(n)||l(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}(e.dom,t,n)}function B(e,t){return{element:e,offset:t}}function F(e,t){var n,r;n=e,r=t,T.from(n.dom.parentNode).map(fe.fromDom).each(function(e){e.dom.insertBefore(r.dom,n.dom)}),t.dom.appendChild(e.dom)}function I(e){return de.get(e)}function P(e,t){return e.isBlock(t)||O(e.schema.getShortEndedElements(),t.nodeName)}function R(e,t){return"false"===e.getContentEditable(t)}function W(e,t){return!e.isBlock(t)&&O(e.schema.getWhiteSpaceElements(),t.nodeName)}function j(){return{sOffset:0,fOffset:0,elements:[]}}function V(e,t){return n=fe.fromDom(e),r=t,0<(o=y(n.dom.childNodes,fe.fromDom)).length&&r<o.length?B(o[r],0):B(n,r);var n,r,o}function H(e,t,n,r,o,i){for(var a=(i=void 0===i||i)?t(!1):n;a;){var c=R(e,a);if(c||W(e,a)){if(c?r.cef(a):r.boundary(a))break;a=t(!0)}else{if(P(e,a)){if(r.boundary(a))break}else 3===a.nodeType&&r.text(a);if(a===o)break;a=t(!1)}}}function L(e,t,n,r,o){var i,a,c,u,l,s;P(i=e,a=n)||R(i,a)||W(i,a)||"true"===(c=i).getContentEditable(u=a)&&"false"===c.getContentEditableParent(u.parentNode)||(l=e.getParent(r,e.isBlock),s=new me(n,l),H(e,(o?s.next:s.prev).bind(s),n,{boundary:f,cef:f,text:function(e){o?t.fOffset+=e.length:t.sOffset+=e.length,t.elements.push(fe.fromDom(e))}}))}function U(e,t,n,r,o,i){void 0===i&&(i=!0);var a=new me(n,t),c=[],u=j();function l(){return 0<u.elements.length&&(c.push(u),u=j()),!1}return L(e,u,n,t,!1),H(e,a.next.bind(a),n,{boundary:l,cef:function(e){return l(),o&&c.push.apply(c,o.cef(e)),!1},text:function(e){u.elements.push(fe.fromDom(e)),o&&o.text(e,u)}},r,i),r&&L(e,u,r,t,!0),l(),c}function $(u,e){var n=V(e.startContainer,e.startOffset),r=n.element.dom,o=V(e.endContainer,e.endOffset),i=o.element.dom;return U(u,e.commonAncestorContainer,r,i,{text:function(e,t){e===i?t.fOffset+=e.length-o.offset:e===r&&(t.sOffset+=n.offset)},cef:function(e){var t,n,r,o,i,a=w((n=fe.fromDom(e),r="*[contenteditable=true]",1!==(o=i=void 0===n?document:n.dom).nodeType&&9!==o.nodeType&&11!==o.nodeType||0===o.childElementCount?[]:y(i.querySelectorAll(r),fe.fromDom)),function(e){var t=e.dom;return U(u,t,t)}),c=function(e,t){return n=e.elements[0].dom,r=t.elements[0].dom,o=Node.DOCUMENT_POSITION_PRECEDING,0!=(n.compareDocumentPosition(r)&o)?1:-1;var n,r,o};return(t=S.call(a,0)).sort(c),t}},!1)}function _(e,t){return t.collapsed?[]:$(e,t)}function z(e,t){var n=e.createRng();return n.selectNode(t),_(e,n)}function q(c,e){return w(e,function(e){var a,n,r,t=e.elements,o=y(t,I).join(""),i=function(e,t,n,r){void 0===r&&(r=e.length);var o=t.regex;o.lastIndex=n=void 0===n?0:n;for(var i,a=[];i=o.exec(e);){var c=i[t.matchIndex],u=i.index+i[0].indexOf(c),l=u+c.length;if(r<l)break;a.push({start:u,finish:l}),o.lastIndex=l}return a}(o,c,e.sOffset,o.length-e.fOffset);return a=i,function(e,t){if(0===e.length)return[];for(var n=t(e[0]),r=[],o=[],i=0,a=e.length;i<a;i++){var c=e[i],u=t(c);u!==n&&(r.push(o),o=[]),n=u,o.push(c)}return 0!==o.length&&r.push(o),r}((n=function(e,n){var t=I(n),r=e.last,o=r+t.length,i=w(a,function(e,t){return e.start<o&&e.finish>r?[{element:n,start:Math.max(r,e.start)-r,finish:Math.min(o,e.finish)-r,matchId:t}]:[]});return{results:e.results.concat(i),last:o}},r={results:[],last:0},x(t,function(e,t){r=n(r,e)}),r.results),function(e){return e.matchId})})}function G(e,i){b(e,function(e,o){b(e,function(e){var t=fe.fromDom(i.cloneNode(!1));M(t,"data-mce-index",o);var n,r=e.element.dom;r.length===e.finish&&0===e.start?F(e.element,t):(r.length!==e.finish&&r.splitText(e.finish),n=r.splitText(e.start),F(fe.fromDom(n),t))})})}function K(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function J(e,t,n,r){var o=e.dom.create("span",{"data-mce-bogus":1});o.className="mce-match-marker";var i,a,c,u,l,s,f,d,m,h,g=e.getBody();return he(e,t,!1),r?(c=e.dom,u=n,l=e.selection,s=o,d=l.getBookmark(),m=c.select("td[data-mce-selected],th[data-mce-selected]"),G(h=q(u,0<m.length?(f=c,w(m,function(e){return z(f,e)})):_(c,l.getRng())),s),l.moveToBookmark(d),h.length):(i=o,G(a=q(n,z(e.dom,g)),i),a.length)}function Q(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function X(e,t){var n=[],r=k.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(var o=0;o<r.length;o++){var i=K(r[o]);null!==i&&i.length&&i===t.toString()&&n.push(r[o])}return n}function Y(e,t,n){var r=t.get(),o=r.index,i=e.dom;(n=!1!==n)?o+1===r.count?o=0:o++:o-1==-1?o=r.count-1:o--,i.removeClass(X(e,r.index),"mce-match-marker-selected");var a=X(e,o);return a.length?(i.addClass(X(e,o),"mce-match-marker-selected"),e.selection.scrollIntoView(a[0]),o):-1}function Z(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)}function ee(e,t,n,r,o,i){var a,c,u,l=e.selection,s=(a=o,c="("+n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]")+")",a?"(?:^|\\s|"+E()+")"+c+"(?=$|\\s|"+E()+")":c),f=l.isForward(),d=J(e,t,{regex:new RegExp(s,r?"g":"gi"),matchIndex:1},i);return N.browser.isSafari()&&l.setRng(l.getRng(),f),d&&(u=Y(e,t,!0),t.set({index:u,count:d,text:n,matchCase:r,wholeWord:o,inSelection:i})),d}function te(e,t){var n=Y(e,t,!0);t.set(v(v({},t.get()),{index:n}))}function ne(e,t){var n=Y(e,t,!1);t.set(v(v({},t.get()),{index:n}))}function re(e){var t=K(e);return null!==t&&0<t.length}function oe(e,t,n,r,o){var i,a=t.get(),c=a.index,u=c;r=!1!==r;for(var l=e.getBody(),s=k.grep(k.toArray(l.getElementsByTagName("span")),re),f=0;f<s.length;f++){var d=K(s[f]),m=i=parseInt(d,10);if(o||m===a.index){for(n.length?(s[f].firstChild.nodeValue=n,Q(s[f])):Z(e.dom,s[f]);s[++f];){if((m=parseInt(K(s[f]),10))!==i){f--;break}Z(e.dom,s[f])}r&&u--}else c<i&&s[f].setAttribute("data-mce-index",String(i-1))}return t.set(v(v({},a),{count:o?0:a.count-1,index:u})),(r?te:ne)(e,t),!o&&0<t.get().count}function ie(i,a){var e,t,n,r=(e=p,t=g(T.none()),v(v({},n={clear:function(){o(),t.set(T.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(e){o(),t.set(T.some(e))}}),{on:function(e){return n.get().each(e)}}));function o(){return t.get().each(e)}function c(e){(1<a.get().count?e.enable:e.disable)("next"),(1<a.get().count?e.enable:e.disable)("prev")}function u(e,t){x(["replace","replaceall","prev","next"],t?e.disable:e.enable)}function l(e,t){N.browser.isSafari()&&N.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)}function s(e){he(i,a,!1),u(e,!0),c(e)}function f(e){var t,n,r=e.getData(),o=a.get();r.findtext.length?(o.text===r.findtext&&o.matchCase===r.matchcase&&o.wholeWord===r.wholewords?te(i,a):((t=ee(i,a,r.findtext,r.matchcase,r.wholewords,r.inselection))<=0&&(n=e,i.windowManager.alert("Could not find the specified string.",function(){n.focus("findtext")})),u(e,0===t)),c(e)):s(e)}i.undoManager.add();var d=k.trim(i.selection.getContent({format:"text"})),m=a.get(),h={title:"Find and Replace",size:"normal",body:{type:"panel",items:[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",disabled:!0,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",disabled:!0,borderless:!0}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}]},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"},{type:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{type:"custom",name:"find",text:"Find",primary:!0},{type:"custom",name:"replace",text:"Replace",disabled:!0},{type:"custom",name:"replaceall",text:"Replace all",disabled:!0}],initialData:{findtext:d,replacetext:"",wholewords:m.wholeWord,matchcase:m.matchCase,inselection:m.inSelection},onChange:function(e,t){"findtext"===t.name&&0<a.get().count&&s(e)},onAction:function(e,t){var n,r,o=e.getData();switch(t.name){case"find":f(e);break;case"replace":(oe(i,a,o.replacetext)?c:s)(e);break;case"replaceall":oe(i,a,o.replacetext,!0,!0),s(e);break;case"prev":ne(i,a),c(e);break;case"next":te(i,a),c(e);break;case"matchcase":case"wholewords":case"inselection":n=e.getData(),r=a.get(),a.set(v(v({},r),{matchCase:n.matchcase,wholeWord:n.wholewords,inSelection:n.inselection})),s(e)}l(e,t.name)},onSubmit:function(e){f(e),l(e,"find")},onClose:function(){i.focus(),he(i,a),i.undoManager.add()}};r.set(i.windowManager.open(h,{inline:"toolbar"}))}function ae(e,t){return function(){ie(e,t)}}"undefined"!=typeof window||Function("return this;")();function ce(e){return 3===e.dom.nodeType}function ue(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}}var le,se,fe={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return ue(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return ue(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return ue(n)},fromDom:ue,fromPoint:function(e,t,n){return T.from(e.dom.elementFromPoint(t,n)).map(ue)}},de=(le=ce,{get:function(e){if(!le(e))throw new Error("Can only get text value of a text node");return se(e).getOr("")},getOption:se=function(e){return le(e)?T.from(e.dom.nodeValue):T.none()},set:function(e,t){if(!le(e))throw new Error("Can only set raw text value of a text node");e.dom.nodeValue=t}}),me=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),he=function(e,t,n){for(var r,o,i=t.get(),a=k.toArray(e.getBody().getElementsByTagName("span")),c=0;c<a.length;c++){var u=K(a[c]);null!==u&&u.length&&(u===i.index.toString()&&(r=r||a[c].firstChild,o=a[c].firstChild),Q(a[c]))}if(t.set(v(v({},i),{index:-1,count:0,text:""})),r&&o){var l=e.dom.createRng();return l.setStart(r,0),l.setEnd(o,o.data.length),!1!==n&&e.selection.setRng(l),l}};o.add("searchreplace",function(e){var t,n,r,o,i,a=g({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1}),c=a;return(t=e).addCommand("SearchReplace",function(){ie(t,c)}),(n=e).ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:ae(n,r=a),icon:"search"}),n.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:ae(n,r),icon:"search"}),n.shortcuts.add("Meta+F","",ae(n,r)),o=e,i=a,{done:function(e){return he(o,i,e)},find:function(e,t,n,r){return ee(o,i,e,t,n,r=void 0!==r&&r)},next:function(){return te(o,i)},prev:function(){return ne(o,i)},replace:function(e,t,n){return oe(o,i,e,t,n)}}})}();