1(self.webpackChunkplone_staticresources=self.webpackChunkplone_staticresources||[]).push([[3041],{3041:function(){!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>typeof e===t,r=e("boolean"),o=t=>!(t=>null==t)(t),n=e("function"),i=e("number"),s=(t,e)=>t===e,l=()=>!1;class a{tag;value;static singletonNone=new a(!1);constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(t??"Called getOrDie on None")}static from(t){return o(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}Array.prototype.slice;const c=(t,e)=>{for(let r=0,o=t.length;r<o;r++)e(t[r],r)};n(Array.from)&&Array.from;const u=(d=/^\s+|\s+$/g,t=>t.replace(d,""));var d;const m=t=>t.length>0,h=t=>{if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},g=(t,e)=>{const r=t.dom;if(1!==r.nodeType)return!1;{const t=r;if(void 0!==t.matches)return t.matches(e);if(void 0!==t.msMatchesSelector)return t.msMatchesSelector(e);if(void 0!==t.webkitMatchesSelector)return t.webkitMatchesSelector(e);if(void 0!==t.mozMatchesSelector)return t.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}},f=t=>e=>(t=>t.dom.nodeType)(e)===t,y=f(1),v=f(3),p=f(11),w=t=>h(t.dom.host),b=(t,e)=>{const r=t.dom.getAttribute(e);return null===r?void 0:r},S=(t,e)=>{t.dom.removeAttribute(e)},A=t=>void 0!==t.style&&n(t.style.getPropertyValue),N=t=>{const e=v(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;const r=e.ownerDocument;return(t=>{const e=(t=>h(t.dom.getRootNode()))(t);return p(r=e)&&o(r.dom.host)?a.some(e):a.none();var r})(h(e)).fold(()=>r.body.contains(e),(n=N,i=w,t=>n(i(t))));var n,i},k=t=>y(t)&&"li"===t.dom.nodeName.toLowerCase(),C=(t,e,o)=>{c(e,e=>{const d=h(e),f=k(d),y=((t,e)=>{return(e?(r=t,((t,e,r)=>{let o=t.dom;const i=n(r)?r:l;for(;o.parentNode;){o=o.parentNode;const t=h(o);if(e(t))return a.some(t);if(i(t))break}return a.none()})(r,t=>g(t,"ol,ul"),void 0)):a.some(t)).getOr(t);var r})(d,f),v=b(y,"dir"),p=a.from(t.getStyle(y.dom,"direction",!1)).filter(m);if(v===o||p.exists(t=>t===o)?(S(y,"dir"),((t,e)=>{A(t)&&t.style.removeProperty(e)})((w=y).dom,"direction"),((t,e,r=s)=>t.exists(t=>r(t,e)))((t=>a.from(b(t,"style")))(w).map(u),"")&&S(w,"style")):v!==o&&(((t,e,o)=>{((t,e,o)=>{if(!((t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(n=String).prototype.isPrototypeOf(r)||o.constructor?.name===n.name)?"string":e;var r,o,n})(t))(o)||r(o)||i(o)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",o,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,o+"")})(t.dom,"dir",o)})(y,0,o),(p.exists(t=>t!==o)||(t=>"rtl"===((t,e)=>{const r=t.dom,o=window.getComputedStyle(r).getPropertyValue(e);return""!==o||N(t)?o:((t,e)=>A(t)?t.style.getPropertyValue(e):"")(r,e)})(t,"direction")?"rtl":"ltr")(y)!==o)&&t.setStyle(y.dom,"direction",o)),f){const e=((t,e)=>(t=>((t,e)=>{const r=[];for(let o=0,n=t.length;o<n;o++){const n=t[o];e(n)&&r.push(n)}return r})(((t,e)=>{const r=t.length,o=new Array(r);for(let n=0;n<r;n++){const r=t[n];o[n]=e(r,n)}return o})(t.dom.childNodes,h),t=>g(t,e)))(t))(y,"li[dir],li[style]");c(e,e=>{S(e,"dir"),t.setStyle(e.dom,"direction",null)})}var w})},T=(t,e)=>{t.selection.isEditable()&&(C(t.dom,t.selection.getSelectedBlocks(),e),t.nodeChanged())};t.add("directionality",t=>{(t=>{t.addCommand("mceDirectionLTR",()=>{T(t,"ltr")}),t.addCommand("mceDirectionRTL",()=>{T(t,"rtl")})})(t),(t=>{const e=e=>r=>{const o=o=>{const n=t.dom.isBlock(o.element)?o.element:t.dom.getParent(o.element,t.dom.isBlock);if(n){const o=t.dom.getStyle(n,"direction")||t.dom.getAttrib(n,"dir");r.setActive(o===e)}};return t.on("NodeChange",o),()=>t.off("NodeChange",o)};t.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",context:"editable",onAction:()=>t.execCommand("mceDirectionLTR"),onSetup:e("ltr")}),t.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",context:"editable",onAction:()=>t.execCommand("mceDirectionRTL"),onSetup:e("rtl")})})(t)})}()}}]); 2//# sourceMappingURL=3041.9032788f40cce2a08516.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.