/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.8.1 (2021-05-20) */ !function(){"use strict";var n,t=function(o){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)===o;var n,e}},e=function(n){return function(t){return typeof t===n}},x=t("string"),w=t("object"),c=t("array"),S=e("boolean"),o=(n=undefined,function(t){return n===t}),i=function(t){return!(null===(n=t)||n===undefined);var n},y=e("function"),at=e("number"),s=function(t,n){if(c(t)){for(var e=0,o=t.length;e "+o.toString()},function(t,n){return"state("+t+")"})}).join("\n")+"}"}}},dn=function(r){return{extract:function(e,o,t){var n=V(t,function(t,n){return r.extract(e.concat(["["+n+"]"]),o,t)});return nn(n)},toString:function(){return"array("+r.toString()+")"}}},mn=function(a){return{extract:function(t,n,e){for(var o=[],r=0,i=a;r ")+")\n"+t.getErrorInfo()}).join("\n"))+"\n\nInput object: "+en(t.input);var n,e},Bn=xn,An=function(t,n){return xn(t,Tt(n,fn))},Mn=st(wn),Fn=function(e,o){return sn(function(t){var n=typeof t;return e(t)?vt(t):yt("Expected type: "+o+" but got: "+n)})},In=Fn(at,"number"),Rn=Fn(x,"string"),Vn=Fn(S,"boolean"),Pn=Fn(y,"function"),Hn=function(n){var t=function(t,n){for(var e=t.next();!e.done;){if(!n(e.value))return!1;e=t.next()}return!0};if(Object(n)!==n)return!0;switch({}.toString.call(n).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(n).every(function(t){return Hn(n[t])});case"Map":return t(n.keys(),Hn)&&t(n.values(),Hn);case"Set":return t(n.keys(),Hn);default:return!1}},zn=sn(function(t){return Hn(t)?vt(t):yt("Expected value to be acceptable for sending via postMessage")}),Nn=function(n){return Cn(function(t){return M(n,t)?pt.value(t):pt.error('Unsupported value: "'+t+'", choose one of "'+n.join(", ")+'".')})},Ln=function(t){return bn(t,t,Wt(),pn())},jn=function(t,n){return bn(t,t,Wt(),n)},Un=function(t){return jn(t,Rn)},Wn=function(t,n){return bn(t,t,Wt(),Nn(n))},Gn=function(t){return jn(t,Pn)},Xn=function(t,n){return bn(t,t,Wt(),fn(n))},Yn=function(t,n){return bn(t,t,Wt(),hn(n))},qn=function(t,n){return bn(t,t,Wt(),dn(n))},Kn=function(t){return bn(t,t,Gt(),pn())},Jn=function(t,n){return bn(t,t,Gt(),n)},$n=function(t){return Jn(t,In)},Qn=function(t){return Jn(t,Rn)},Zn=function(t){return Jn(t,Pn)},te=function(t,n){return Jn(t,fn(n))},ne=function(t,n){return bn(t,t,Ut(n),pn())},ee=function(t,n,e){return bn(t,t,Ut(n),e)},oe=function(t,n){return ee(t,n,In)},re=function(t,n){return ee(t,n,Rn)},ie=function(t,n,e){return ee(t,n,Nn(e))},ue=function(t,n){return ee(t,n,Vn)},ae=function(t,n){return ee(t,n,Pn)},ce=function(t,n,e){return ee(t,n,dn(e))},se=function(t,n,e){return ee(t,n,fn(e))},le=function(t,n){return vn(t,n)},fe=function(t){var n=t;return{get:function(){return n},set:function(t){n=t}}},de=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:t}},me={fromHtml:function(t,n){var e=(n||document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||1=o.length&&e.substr(r,r+o.length)===o;var e,o,r},ke=(nt=/^\s+|\s+$/g,function(t){return t.replace(nt,"")}),Ce=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Oe=function(n){return function(t){return we(t,n)}},_e=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return we(t,"edge/")&&we(t,"chrome")&&we(t,"safari")&&we(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ce],search:function(t){return we(t,"chrome")&&!we(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return we(t,"msie")||we(t,"trident")}},{name:"Opera",versionRegexes:[Ce,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Oe("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Oe("firefox")},{name:"Safari",versionRegexes:[Ce,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(we(t,"safari")||we(t,"mobile/"))&&we(t,"applewebkit")}}],Te=[{name:"Windows",search:Oe("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return we(t,"iphone")||we(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Oe("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Oe("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Oe("linux"),versionRegexes:[]},{name:"Solaris",search:Oe("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Oe("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Oe("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ee={browsers:st(_e),oses:st(Te)},De="Firefox",Be=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isEdge:o("Edge"),isChrome:o("Chrome"),isIE:o("IE"),isOpera:o("Opera"),isFirefox:o(De),isSafari:o("Safari")}},Ae={unknown:function(){return Be({current:undefined,version:ve.unknown()})},nu:Be,edge:st("Edge"),chrome:st("Chrome"),ie:st("IE"),opera:st("Opera"),firefox:st(De),safari:st("Safari")},Me="Windows",Fe="Android",Ie="Solaris",Re="FreeBSD",Ve="ChromeOS",Pe=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isWindows:o(Me),isiOS:o("iOS"),isAndroid:o(Fe),isOSX:o("OSX"),isLinux:o("Linux"),isSolaris:o(Ie),isFreeBSD:o(Re),isChromeOS:o(Ve)}},He={unknown:function(){return Pe({current:undefined,version:ve.unknown()})},nu:Pe,windows:st(Me),ios:st("iOS"),android:st(Fe),linux:st("Linux"),osx:st("OSX"),solaris:st(Ie),freebsd:st(Re),chromeos:st(Ve)},ze=function(t,n){var e,o,r,i,u,a,c,s,l,f,d,m,g=Ee.browsers(),p=Ee.oses(),h=ye(g,t).fold(Ae.unknown,Ae.nu),v=xe(p,t).fold(He.unknown,He.nu);return{browser:h,os:v,deviceType:(o=h,r=t,i=n,u=(e=v).isiOS()&&!0===/ipad/i.test(r),a=e.isiOS()&&!u,c=e.isiOS()||e.isAndroid(),s=c||i("(pointer:coarse)"),l=u||!a&&c&&i("(min-device-width:768px)"),f=a||c&&!l,d=o.isSafari()&&e.isiOS()&&!1===/safari/i.test(r),m=!f&&!l&&!d,{isiPad:st(u),isiPhone:st(a),isTablet:st(l),isPhone:st(f),isTouch:st(s),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:st(d),isDesktop:st(m)})}},Ne=function(t){return window.matchMedia(t).matches},Le=Lt(function(){return ze(navigator.userAgent,Ne)}),je=function(){return Le()},Ue=function(t,n){var e=t.dom;if(1!==e.nodeType)return!1;var o=e;if(o.matches!==undefined)return o.matches(n);if(o.msMatchesSelector!==undefined)return o.msMatchesSelector(n);if(o.webkitMatchesSelector!==undefined)return o.webkitMatchesSelector(n);if(o.mozMatchesSelector!==undefined)return o.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},We=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Ge=function(t,n){return t.dom===n.dom},Xe=function(t,n){return e=t.dom,o=n.dom,r=e,i=o,u=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(r.compareDocumentPosition(i)&u);var e,o,r,i,u},Ye=function(t,n){return je().browser.isIE()?Xe(t,n):(e=n,o=t.dom,r=e.dom,o!==r&&o.contains(r));var e,o,r},qe=function(t){return y(t)?t:l},Ke=function(t,n,e){for(var o=t.dom,r=qe(e);o.parentNode;){o=o.parentNode;var i=me.fromDom(o),u=n(i);if(u.isSome())return u;if(r(i))break}return dt.none()},Je=function(t,n,e){var o=n(t),r=qe(e);return o.orThunk(function(){return r(t)?dt.none():Ke(t,n,r)})},$e=function(t,n){return Ge(t.element,n.event.target)},Qe=function(t){if(!Rt(t,"can")&&!Rt(t,"abort")&&!Rt(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return En("Extracting event.handler",ln([ne("can",O),ne("abort",l),ne("run",ct)]),t)},Ze=function(e){var n,o,r,i,t=(o=function(t){return t.can},function(){for(var e=[],t=0;t "):o[0].name;return Jt(r,{handler:n,purpose:e})})});return Qt(n,{})},Di="alloy.base.behaviour",Bi=function(t){var n,e;return _n("custom.definition",fn([bn("dom","dom",Wt(),fn([Ln("tag"),ne("styles",{}),ne("classes",[]),ne("attributes",{}),Kn("value"),Kn("innerHtml")])),Ln("components"),Ln("uid"),ne("events",{}),ne("apis",{}),bn("eventOrder","eventOrder",((n={})[_o()]=["disabling",Di,"toggling","typeaheadevents"],n[So()]=[Di,"focusing","keying"],n[Mo()]=[Di,"disabling","toggling","representing"],n[po()]=[Di,"representing","streaming","invalidating"],n[Ho()]=[Di,"representing","item-events","tooltipping"],n[io()]=["focusing",Di,"item-type-events"],n[no()]=["focusing",Di,"item-type-events"],n[so()]=["item-type-events","tooltipping"],n[Oo()]=["receiving","reflecting","tooltipping"],e=n,jt.mergeWithThunk(st(e))),Mn()),Kn("domModification")]),t)},Ai=function(t,n){var e=qr(t,n);return e===undefined||""===e?[]:e.split(" ")},Mi=function(t){return t.dom.classList!==undefined},Fi=function(t,n){return r=n,i=Ai(e=t,o="class").concat([r]),Yr(e,o,i.join(" ")),!0;var e,o,r,i},Ii=function(t,n){return r=n,0<(i=H(Ai(e=t,o="class"),function(t){return t!==r})).length?Yr(e,o,i.join(" ")):$r(e,o),!1;var e,o,r,i},Ri=function(t,n){Mi(t)?t.dom.classList.add(n):Fi(t,n)},Vi=function(t){0===(Mi(t)?t.dom.classList:Ai(t,"class")).length&&$r(t,"class")},Pi=function(t,n){Mi(t)?t.dom.classList.remove(n):Ii(t,n),Vi(t)},Hi=function(t,n){return Mi(t)&&t.dom.classList.contains(n)},zi=function(n,t){mt(t,function(t){Ri(n,t)})},Ni=function(n,t){mt(t,function(t){Pi(n,t)})},Li=function(t){return t.style!==undefined&&y(t.style.getPropertyValue)},ji=function(t){var n=hr(t)?t.dom.parentNode:t.dom;if(n===undefined||null===n||null===n.ownerDocument)return!1;var e,o,r=n.ownerDocument;return Fr(me.fromDom(n)).fold(function(){return r.body.contains(n)},(e=ji,o=Ir,function(t){return e(o(t))}))},Ui=function(){return Wi(me.fromDom(document))},Wi=function(t){var n=t.dom.body;if(null===n||n===undefined)throw new Error("Body is not available yet");return me.fromDom(n)},Gi=function(t,n,e){if(!x(e))throw console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Li(t)&&t.style.setProperty(n,e)},Xi=function(t,n){Li(t)&&t.style.removeProperty(n)},Yi=function(t,n,e){var o=t.dom;Gi(o,n,e)},qi=function(t,n){var e=t.dom;_t(n,function(t,n){Gi(e,n,t)})},Ki=function(t,n){var e=t.dom;_t(n,function(t,n){t.fold(function(){Xi(e,n)},function(t){Gi(e,n,t)})})},Ji=function(t,n){var e=t.dom,o=window.getComputedStyle(e).getPropertyValue(n);return""!==o||ji(t)?o:$i(e,n)},$i=function(t,n){return Li(t)?t.style.getPropertyValue(n):""},Qi=function(t,n){var e=t.dom,o=$i(e,n);return dt.from(o).filter(function(t){return 0"}),Mn()),cf=le("schema",function(){return[Kn("preprocess")]}),sf=ne("defaults",st({})),lf=ne("overrides",st({})),ff=fn([of,rf,uf,af,sf,lf]),df=fn([of,rf,uf,sf,lf]),mf=fn([of,rf,uf,af,sf,lf]),gf=fn([of,cf,uf,Ln("unit"),af,sf,lf]),pf=function(t){return t.fold(dt.some,dt.none,dt.some,dt.some)},hf=function(t){var n=function(t){return t.name};return t.fold(n,n,n,n)},vf=function(e,o){return function(t){var n=En("Converting part type",o,t);return e(n)}},bf=vf(ef.required,ff),yf=vf(ef.external,df),xf=vf(ef.optional,mf),wf=vf(ef.group,gf),Sf=st("entirety"),kf=/* */Object.freeze({__proto__:null,required:bf,external:yf,optional:xf,group:wf,asNamedPart:pf,name:hf,asCommon:function(t){return t.fold(lt,lt,lt,lt)},original:Sf}),Cf=function(t,n,e,o){return zt(n.defaults(t,e,o),e,{uid:t.partUids[n.name]},n.overrides(t,e,o))},Of=function(r,t){var n={};return mt(t,function(t){pf(t).each(function(e){var o=_f(r,e.pname);n[e.name]=function(t){var n=En("Part: "+e.name+" in "+r,fn(e.schema),t);return ft(ft({},o),{config:t,validated:n})}})}),n},_f=function(t,n){return{uiType:nf(),owner:t,name:n}},Tf=function(t,n,e){return{uiType:nf(),owner:t,name:n,config:e,validated:{}}},Ef=function(t){return U(t,function(t){return t.fold(dt.none,dt.some,dt.none,dt.none).map(function(t){return Xn(t.name,t.schema.concat([ba(Sf())]))}).toArray()})},Df=function(t){return V(t,hf)},Bf=function(t,n,e){return o=n,i={},r={},mt(e,function(t){t.fold(function(o){i[o.pname]=Zl(!0,function(t,n,e){return o.factory.sketch(Cf(t,o,n,e))})},function(t){var n=o.parts[t.name];r[t.name]=st(t.factory.sketch(Cf(o,t,n[Sf()]),n))},function(o){i[o.pname]=Zl(!1,function(t,n,e){return o.factory.sketch(Cf(t,o,n,e))})},function(r){i[r.pname]=tf(!0,function(n,t,e){var o=n[r.name];return V(o,function(t){return r.factory.sketch(zt(r.defaults(n,t,e),t,r.overrides(n,t)))})})})}),{internals:st(i),externals:st(r)};var o,i,r},Af=function(t,n,e){return Ql(dt.some(t),n,n.components,e)},Mf=function(t,n,e){var o=n.partUids[e];return t.getSystem().getByUid(o).toOptional()},Ff=function(t,n,e){return Mf(t,n,e).getOrDie("Could not find part: "+e)},If=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return mt(e,function(t){o[t]=st(i.getByUid(r[t]))}),o},Rf=function(t,n){var e=t.getSystem();return Tt(n.partUids,function(t,n){return st(e.getByUid(t))})},Vf=function(t){return Ct(t.partUids)},Pf=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return mt(e,function(t){o[t]=st(i.getByUid(r[t]).getOrDie())}),o},Hf=function(n,t){var e=Df(t);return $t(V(e,function(t){return{key:t,value:n+"-"+t}}))},zf=function(n){return bn("partUids","partUids",Yt(function(t){return Hf(t.uid,n)}),Mn())},Nf=/* */Object.freeze({__proto__:null,generate:Of,generateOne:Tf,schemas:Ef,names:Df,substitutes:Bf,components:Af,defaultUids:Hf,defaultUidsSchema:zf,getAllParts:Rf,getAllPartNames:Vf,getPart:Mf,getPartOrDie:Ff,getParts:If,getPartsOrDie:Pf}),Lf=function(t,n,e,o,r){var i,u,a=(u=r,(0<(i=o).length?[Xn("parts",i)]:[]).concat([Ln("uid"),ne("dom",{}),ne("components",[]),ba("originalSpec"),ne("debug.sketcher",{})]).concat(u));return En(t+" [SpecSchema]",ln(a.concat(n)),e)},jf=function(t,n,e,o,r){var i=Uf(r),u=Ef(e),a=zf(e),c=Lf(t,n,i,u,[a]),s=Bf(0,c,e);return o(c,Af(t,c,s.internals()),i,s.externals())},Uf=function(t){return It(t,"uid")?t:ft(ft({},t),{uid:li("uid")})},Wf=ln([Ln("name"),Ln("factory"),Ln("configFields"),ne("apis",{}),ne("extraApis",{})]),Gf=ln([Ln("name"),Ln("factory"),Ln("configFields"),Ln("partFields"),ne("apis",{}),ne("extraApis",{})]),Xf=function(t){var i=En("Sketcher for "+t.name,Wf,t),n=Tt(i.apis,bi),e=Tt(i.extraApis,pi);return ft(ft({name:i.name,configFields:i.configFields,sketch:function(t){return n=i.name,e=i.configFields,o=i.factory,r=Uf(t),o(Lf(n,e,r,[],[]),r);var n,e,o,r}},n),e)},Yf=function(t){var n=En("Sketcher for "+t.name,Gf,t),e=Of(n.name,n.partFields),o=Tt(n.apis,bi),r=Tt(n.extraApis,pi);return ft(ft({name:n.name,partFields:n.partFields,configFields:n.configFields,sketch:function(t){return jf(n.name,n.configFields,n.partFields,n.factory,t)},parts:e},o),r)},qf=function(t){for(var n=[],e=function(t){n.push(t)},o=0;o',e.getDoc());return zr(t,me.fromDom(n.extractContents())),n.insertNode(t.dom),kr(t).each(function(t){return t.dom.normalize()}),Cs(t,ks).map(function(t){var n;e.selection.setCursorLocation(t.dom,"img"===mr(n=t)?1:ws(n).fold(function(){return _r(n).length},function(t){return t.length}))}),t})},Op=function(t){return Ku(t,"[data-mce-autocompleter]")},_p=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},Tp=function(t){return""!==t&&-1!==" \xa0\f\n\r\t\x0B".indexOf(t)},Ep=function(t,n){return t.substring(n.length)},Dp=function(t,o,r,i){if(void 0===i&&(i=0),!(n=o).collapsed||3!==n.startContainer.nodeType)return dt.none();var n,e=t.getParent(o.startContainer,t.isBlock)||t.getRoot();return kp(t,o.startContainer,o.startOffset,function(t,n,e){return function(t,n,e){for(var o=n-1;0<=o;o--){var r=t.charAt(o);if(Tp(r))return dt.none();if(r===e)break}return dt.some(o)}(e,n,r).getOr(n)},e).bind(function(t){var n=o.cloneRange();if(n.setStart(t.container,t.offset),n.setEnd(o.endContainer,o.endOffset),n.collapsed)return dt.none();var e=_p(n);return 0!==e.lastIndexOf(r)||Ep(e,r).length=t.minChars&&t.matches.getOrThunk(function(){return Vp(n.dom)})(e.range,i,e.text)});if(0===u.length)return dt.none();var a=Mp.all(V(u,function(n){return n.fetch(e.text,n.maxResults,o).then(function(t){return{matchText:e.text,items:t,columns:n.columns,onAction:n.onAction,highlightOn:n.highlightOn}})}));return dt.some({lookupData:a,context:e})},zp=fn([Un("type"),Qn("text")]),Np=fn([ne("type","autocompleteitem"),ne("active",!1),ne("disabled",!1),ne("meta",{}),Un("value"),Qn("text"),Qn("icon")]),Lp=fn([Un("type"),Un("ch"),oe("minChars",1),ne("columns",1),oe("maxResults",10),Zn("matches"),Gn("fetch"),Gn("onAction"),ce("highlightOn",[],Rn)]),jp=[ue("disabled",!1),Qn("tooltip"),Qn("icon"),Qn("text"),ae("onSetup",function(){return ct})],Up=fn([Un("type"),Gn("onAction")].concat(jp)),Wp=function(t){return _n("toolbarbutton",Up,t)},Gp=[ue("active",!1)].concat(jp),Xp=fn(Gp.concat([Un("type"),Gn("onAction")])),Yp=function(t){return _n("ToggleButton",Xp,t)},qp=[ae("predicate",l),ie("scope","node",["node","editor"]),ie("position","selection",["node","selection","line"])],Kp=jp.concat([ne("type","contextformbutton"),ne("primary",!1),Gn("onAction"),le("original",lt)]),Jp=Gp.concat([ne("type","contextformbutton"),ne("primary",!1),Gn("onAction"),le("original",lt)]),$p=jp.concat([ne("type","contextformbutton")]),Qp=Gp.concat([ne("type","contextformtogglebutton")]),Zp=An("type",{contextformbutton:Kp,contextformtogglebutton:Jp}),th=fn([ne("type","contextform"),ae("initValue",function(){return""}),Qn("label"),qn("commands",Zp),Jn("launch",An("type",{contextformbutton:$p,contextformtogglebutton:Qp}))].concat(qp)),nh=fn([ne("type","contexttoolbar"),Un("items")].concat(qp)),eh=function(t){var n,e,o=t.ui.registry.getAll().popups,r=Tt(o,function(t){return _n("Autocompleter",Lp,t).fold(function(t){throw new Error(Dn(t))},function(t){return t})}),i=(n=Bt(r,function(t){return t.ch}),e={},mt(n,function(t){e[t]={}}),Ct(e)),u=Mt(r);return{dataset:r,triggerChars:i,lookupByChar:function(n){return H(u,function(t){return t.ch===n})}}};(xp=yp=yp||{})[xp.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",xp[xp.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX";var oh,rh,ih=yp,uh="tox-menu-nav__js",ah="tox-collection__item",ch="tox-swatch",sh={normal:uh,color:ch},lh="tox-collection__item--enabled",fh="tox-collection__item-label",dh="tox-collection__item-caret",mh="tox-collection__item--active",gh="tox-collection__item-container",ph="tox-collection__item-container--row",hh=function(t){return Ft(sh,t).getOr(uh)},vh=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:"color"===t?"tox-swatches":"tox-menu",tieredMenu:"tox-tiered-menu"}},bh=function(t){var n=vh(t);return{backgroundMenu:n.backgroundMenu,selectedMenu:n.selectedMenu,menu:n.menu,selectedItem:n.selectedItem,item:hh(t)}},yh=[Xg.parts.items({})],xh=function(t,n,e){var o=vh(e);return{dom:{tag:"div",classes:gt([[o.tieredMenu]])},markers:bh(e)}},wh=function(e,o){return function(t){var n=R(t,o);return V(n,function(t){return{dom:e,components:t}})}},Sh=function(t,e){var o=[],r=[];return mt(t,function(t,n){e(t,n)?(0o}).getOr(r.length);return dt.some({numColumns:e,numRows:Math.ceil(r.length/e)})}return dt.none()},jh=function(t,n){return rc([fg(t,n)])},Uh=function(t){return jh(oi("unnamed-events"),t)},Wh=oi("tooltip.exclusive"),Gh=oi("tooltip.show"),Xh=oi("tooltip.hide"),Yh=function(t,n,e){t.getSystem().broadcastOn([Wh],{})},qh=/* */Object.freeze({__proto__:null,hideAllExclusive:Yh,setComponents:function(t,n,e,o){e.getTooltip().each(function(t){t.getSystem().isConnected()&&lg.set(t,o)})}}),Kh=/* */Object.freeze({__proto__:null,events:function(r,i){var e=function(n){i.getTooltip().each(function(t){al(t),r.onHide(n,t),i.clearTooltip()}),i.clearTimer()};return Zo(gt([[er(Gh,function(o){i.resetTimer(function(){var n,t,e;n=o,i.isShowing()||(Yh(n),t=r.lazySink(n).getOrDie(),e=n.getSystem().build({dom:r.tooltipDom,components:r.tooltipComponents,events:Zo("normal"===r.mode?[er(so(),function(t){Yo(n,Gh)}),er(ao(),function(t){Yo(n,Xh)})]:[]),behaviours:rc([lg.config({})])}),i.setTooltip(e),rl(t,e),r.onShow(n,e),Zs.position(t,r.anchor(n),e))},r.delay)}),er(Xh,function(t){i.resetTimer(function(){e(t)},r.delay)}),er(Oo(),function(t,n){n.universal||M(n.channels,Wh)&&e(t)}),lr(function(t){e(t)})],"normal"===r.mode?[er(lo(),function(t){Yo(t,Gh)}),er(ko(),function(t){Yo(t,Xh)}),er(so(),function(t){Yo(t,Gh)}),er(ao(),function(t){Yo(t,Xh)})]:[er(Go(),function(t,n){Yo(t,Gh)}),er(Xo(),function(t){Yo(t,Xh)})]]))}}),Jh=[Ln("lazySink"),Ln("tooltipDom"),ne("exclusive",!0),ne("tooltipComponents",[]),ne("delay",300),ie("mode","normal",["normal","follow-highlight"]),ne("anchor",function(t){return{anchor:"hotspot",hotspot:t,layouts:{onLtr:st([ja,La,Pa,za,Ha,Na]),onRtl:st([ja,La,Pa,za,Ha,Na])}}}),ma("onHide"),ma("onShow")],$h=uc({fields:Jh,name:"tooltipping",active:Kh,state:/* */Object.freeze({__proto__:null,init:function(){var e=fe(dt.none()),n=fe(dt.none()),o=function(){e.get().each(function(t){clearTimeout(t)})},t=st("not-implemented");return xi({getTooltip:function(){return n.get()},isShowing:function(){return n.get().isSome()},setTooltip:function(t){n.set(dt.some(t))},clearTooltip:function(){n.set(dt.none())},clearTimer:o,resetTimer:function(t,n){o(),e.set(dt.some(setTimeout(function(){t()},n)))},readState:t})}}),apis:qh}),Qh=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Zh=tinymce.util.Tools.resolve("tinymce.util.I18n"),tv=["input","button","textarea","select"],nv=function(t,n,e){(n.disabled()?av:cv)(t,n)},ev=function(t,n){return!0===n.useNative&&M(tv,mr(t.element))},ov=function(t){Yr(t.element,"disabled","disabled")},rv=function(t){$r(t.element,"disabled")},iv=function(t){Yr(t.element,"aria-disabled","true")},uv=function(t){Yr(t.element,"aria-disabled","false")},av=function(n,t,e){t.disableClass.each(function(t){Ri(n.element,t)}),(ev(n,t)?ov:iv)(n),t.onDisabled(n)},cv=function(n,t,e){t.disableClass.each(function(t){Pi(n.element,t)}),(ev(n,t)?rv:uv)(n),t.onEnabled(n)},sv=function(t,n){return ev(t,n)?Jr(t.element,"disabled"):"true"===qr(t.element,"aria-disabled")},lv=/* */Object.freeze({__proto__:null,enable:cv,disable:av,isDisabled:sv,onLoad:nv,set:function(t,n,e,o){(o?av:cv)(t,n)}}),fv=/* */Object.freeze({__proto__:null,exhibit:function(t,n){return Si({classes:n.disabled()?n.disableClass.toArray():[]})},events:function(e,t){return Zo([tr(_o(),function(t,n){return sv(t,e)}),Za(e,t,nv)])}}),dv=[ae("disabled",l),ne("useNative",!0),Kn("disableClass"),ma("onDisabled"),ma("onEnabled")],mv=uc({fields:dv,name:"disabling",active:fv,apis:lv}),gv=tinymce.util.Tools.resolve("tinymce.EditorManager"),pv=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},hv=function(t){return t.getParam("width",Qh.DOM.getStyle(t.getElement(),"width"))},vv=function(t){return dt.from(t.getParam("min_width")).filter(at)},bv=function(t){return dt.from(t.getParam("min_height")).filter(at)},yv=function(t){return dt.from(t.getParam("max_width")).filter(at)},xv=function(t){return dt.from(t.getParam("max_height")).filter(at)},wv=function(t){return!1!==t.getParam("menubar",!0,"boolean")},Sv=function(t){var n=t.getParam("toolbar",!0),e=!0===n,o=x(n),r=c(n)&&0'+t+""})}return r},fb=function(t,s){return V(t,function(t){switch(t.type){case"cardcontainer":return u=fb((i=t).items,s),a="vertical"===i.direction?"tox-collection__item-container--column":ph,c="left"===i.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right",{dom:{tag:"div",classes:[gh,a,c,function(){switch(i.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}}()]},components:u};case"cardimage":return e=t.src,o=t.classes,r=t.alt,{dom:{tag:"img",classes:o,attributes:{src:e,alt:r.getOr("")}}};case"cardtext":var n=t.name.exists(function(t){return M(s.cardText.highlightOn,t)})?dt.from(s.cardText.matchText).getOr(""):"";return nb(lb(t.text,n),t.classes)}var e,o,r,i,u,a,c})},db=Of(zg(),Ng()),mb=function(t){return{value:t}},gb=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,pb=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,hb=function(t){return gb.test(t)||pb.test(t)},vb=function(t){var n={value:t.value.replace(gb,function(t,n,e,o){return n+n+e+e+o+o})},e=pb.exec(n.value);return null===e?["FFFFFF","FF","FF","FF"]:e},bb=function(t){var n=t.toString(16);return(1===n.length?"0"+n:n).toUpperCase()},yb=function(t){var n=bb(t.red)+bb(t.green)+bb(t.blue);return mb(n)},xb=Math.min,wb=Math.max,Sb=Math.round,kb=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Cb=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Ob=function(t,n,e,o){return{red:t,green:n,blue:e,alpha:o}},_b=function(t){var n=parseInt(t,10);return n.toString()===t&&0<=n&&n<=255},Tb=function(t){var n,e,o,r=(t.hue||0)%360,i=t.saturation/100,u=t.value/100,i=wb(0,xb(i,1)),u=wb(0,xb(u,1));if(0===i)return n=e=o=Sb(255*u),Ob(n,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),l=u-c;switch(Math.floor(a)){case 0:n=c,e=s,o=0;break;case 1:n=s,e=c,o=0;break;case 2:n=0,e=c,o=s;break;case 3:n=0,e=s,o=c;break;case 4:n=s,e=0,o=c;break;case 5:n=c,e=0,o=s;break;default:n=e=o=0}return n=Sb(255*(n+l)),e=Sb(255*(e+l)),o=Sb(255*(o+l)),Ob(n,e,o,1)},Eb=function(t){var n=vb(t),e=parseInt(n[1],16),o=parseInt(n[2],16),r=parseInt(n[3],16);return Ob(e,o,r,1)},Db=function(t,n,e,o){var r=parseInt(t,10),i=parseInt(n,10),u=parseInt(e,10),a=parseFloat(o);return Ob(r,i,u,a)},Bb=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},Ab=Ob(255,0,0,1),Mb=function(t,n){return t.fire("ResizeContent",n)},Fb=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),Ib="tinymce-custom-colors";var Rb,Vb,Pb="choiceitem",Hb=[{type:Pb,text:"Light Green",value:"#BFEDD2"},{type:Pb,text:"Light Yellow",value:"#FBEEB8"},{type:Pb,text:"Light Red",value:"#F8CAC6"},{type:Pb,text:"Light Purple",value:"#ECCAFA"},{type:Pb,text:"Light Blue",value:"#C2E0F4"},{type:Pb,text:"Green",value:"#2DC26B"},{type:Pb,text:"Yellow",value:"#F1C40F"},{type:Pb,text:"Red",value:"#E03E2D"},{type:Pb,text:"Purple",value:"#B96AD9"},{type:Pb,text:"Blue",value:"#3598DB"},{type:Pb,text:"Dark Turquoise",value:"#169179"},{type:Pb,text:"Orange",value:"#E67E23"},{type:Pb,text:"Dark Red",value:"#BA372A"},{type:Pb,text:"Dark Purple",value:"#843FA1"},{type:Pb,text:"Dark Blue",value:"#236FA1"},{type:Pb,text:"Light Gray",value:"#ECF0F1"},{type:Pb,text:"Medium Gray",value:"#CED4D9"},{type:Pb,text:"Gray",value:"#95A5A6"},{type:Pb,text:"Dark Gray",value:"#7E8C8D"},{type:Pb,text:"Navy Blue",value:"#34495E"},{type:Pb,text:"Black",value:"#000000"},{type:Pb,text:"White",value:"#ffffff"}],zb=function(e){void 0===e&&(e=10);var t,n=Fb.getItem(Ib),o=x(n)?JSON.parse(n):[],r=e-(t=o).length<0?t.slice(0,e):t,i=function(t){r.splice(t,1)};return{add:function(t){var n;(-1===(n=A(r,t))?dt.none():dt.some(n)).each(i),r.unshift(t),r.length>e&&r.pop(),Fb.setItem(Ib,JSON.stringify(r))},state:function(){return r.slice(0)}}}(10),Nb=function(t){return!1!==t.getParam("custom_colors")},Lb=function(t){var n=t.getParam("color_map");return n!==undefined?function(t){var n=[],u=document.createElement("canvas");u.height=1,u.width=1;for(var a=u.getContext("2d"),c=function(t,n){var e=n/255;return("0"+Math.round(t*e+255*(1-e)).toString(16)).slice(-2).toUpperCase()},e=0;e'+n+"":"",o='
'+t.icon+"
",r={_:" "," - ":" ","-":" "},i=n.replace(/\_| \- |\-/g,function(t){return r[t]});return'
'+o+e+"
"}),r="auto"!==u.columns&&1'+t.join("")+""}),Gr(n.element,i.join("")),"auto"===u.columns&&Lh(o,5,"tox-collection__item").each(function(t){var n=t.numRows,e=t.numColumns;ig.setGridSize(o,n,e)}),Yo(o,ax)}}),Yy.config({}),ig.config((n=u.columns,e="normal",1===n?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===n?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===e?".tox-swatches__row":".tox-collection__group",cell:"color"===e?"."+ch:"."+ah}})),fg("collection-events",c)]),eventOrder:((t={})[_o()]=["disabling","alloy.base.behaviour","collection-events"],t)});return Ky(o,l,["tox-form__group--collection"],[])},sx=st([Kn("data"),ne("inputAttributes",{}),ne("inputStyles",{}),ne("tag","input"),ne("inputClasses",[]),ma("onSetValue"),ne("styles",{}),ne("eventOrder",{}),jl("inputBehaviours",[Ll,hg]),ne("selectOnFocus",!0)]),lx=function(t){return rc([hg.config({onFocus:t.selectOnFocus?function(t){var n=t.element,e=eu(n);n.dom.setSelectionRange(0,e.length)}:ct})])},fx=function(t){return{tag:t.tag,attributes:ft({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},dx=Xf({name:"Input",configFields:sx(),factory:function(t,n){return{uid:t.uid,dom:fx(t),components:[],behaviours:ft(ft({},lx(e=t)),Wl(e.inputBehaviours,[Ll.config({store:ft(ft({mode:"manual"},e.data.map(function(t){return{initialValue:t}}).getOr({})),{getValue:function(t){return eu(t.element)},setValue:function(t,n){eu(t.element)!==n&&ou(t.element,n)}}),onSetValue:e.onSetValue})])),eventOrder:t.eventOrder};var e}}),mx={},gx={exports:mx};dy=undefined,my=mx,gy=gx,py=undefined,function(t){"object"==typeof my&&void 0!==gy?gy.exports=t():"function"==typeof dy&&dy.amd?dy([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}(function(){return function l(i,u,a){function c(n,t){if(!u[n]){if(!i[n]){var e="function"==typeof py&&py;if(!t&&e)return e(n,!0);if(s)return s(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var r=u[n]={exports:{}};i[n][0].call(r.exports,function(t){return c(i[n][1][t]||t)},r,r.exports,l,i,u,a)}return u[n].exports}for(var s="function"==typeof py&&py,t=0;t"},QS=function(o,t){return{uid:o.uid,dom:o.dom,components:t,behaviours:Wl(o.formBehaviours,[Ll.config({store:{mode:"manual",getValue:function(t){var n=Rf(t,o);return Tt(n,function(t,r){return t().bind(function(t){var n,e,o=Zf.getCurrent(t);return n=o,e=new Error("Cannot find a current component to extract the value from for form part '"+r+"': "+Zr(t.element)),n.fold(function(){return pt.error(e)},pt.value)}).map(Ll.getValue)})},setValue:function(e,t){_t(t,function(n,t){Mf(e,o,t).each(function(t){Zf.getCurrent(t).each(function(t){Ll.setValue(t,n)})})})}}})]),apis:{getField:function(t,n){return Mf(t,o,n).bind(Zf.getCurrent)}}}},ZS={getField:bi(function(t,n,e){return t.getField(n,e)}),sketch:function(t){var e,n=(e=[],{field:function(t,n){return e.push(t),Tf("form",$S(t),n)},record:function(){return e}}),o=t(n),r=n.record(),i=V(r,function(t){return bf({name:t,pname:$S(t)})});return jf("form",JS,i,QS,o)}},tk=oi("valid-input"),nk=oi("invalid-input"),ek=oi("validating-input"),ok="colorcustom.rgb.",rk=function(d,m,g,p){var h=function(t,n,e,o,r){var i,u,a=d(ok+"range"),c=[Wy.parts.label({dom:{tag:"label",innerHtml:e,attributes:{"aria-label":o}}}),Wy.parts.field({data:r,factory:dx,inputAttributes:ft({type:"text"},"hex"===n?{"aria-live":"polite"}:{}),inputClasses:[m("textfield")],inputBehaviours:rc([(i=n,u=t,Fx.config({invalidClass:m("invalid"),notify:{onValidate:function(t){qo(t,ek,{type:i})},onValid:function(t){qo(t,tk,{type:i,value:Ll.getValue(t)})},onInvalid:function(t){qo(t,nk,{type:i,value:Ll.getValue(t)})}},validator:{validate:function(t){var n=Ll.getValue(t),e=u(n)?pt.value(!0):pt.error(d("aria.input.invalid"));return kx(e)},validateOnLoad:!1}})),Yy.config({})]),onSetValue:function(t){Fx.isInvalid(t)&&Fx.run(t).get(ct)}})],s="hex"!==n?[Wy.parts["aria-descriptor"]({text:a})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:c.concat(s)}},v=function(t,n){var e=n.red,o=n.green,r=n.blue;Ll.setValue(t,{red:e,green:o,blue:r})},b=mp({dom:{tag:"div",classes:[m("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),y=function(t,n){b.getOpt(t).each(function(t){Yi(t.element,"background-color","#"+n.value)})};return Xf({factory:function(){var e={red:fe(dt.some(255)),green:fe(dt.some(255)),blue:fe(dt.some(255)),hex:fe(dt.some("ffffff"))},o=function(t){return e[t].get()},i=function(t,n){e[t].set(n)},r=function(t){var n=t.red,e=t.green,o=t.blue;i("red",dt.some(n)),i("green",dt.some(e)),i("blue",dt.some(o))},n=function(t,n){var e=n.event;"hex"!==e.type?i(e.type,dt.none()):p(t)},u=function(r,t,n){var e=parseInt(n,10);i(t,dt.some(e)),o("red").bind(function(e){return o("green").bind(function(n){return o("blue").map(function(t){return Ob(e,n,t,1)})})}).each(function(t){var n,e,o=(n=r,e=yb(t),ZS.getField(n,"hex").each(function(t){hg.isFocused(t)||Ll.setValue(n,{hex:e.value})}),e);qo(r,YS,{hex:o}),y(r,o)})},a=function(t,n){var e=n.event;"hex"===e.type?function(t,n){g(t);var e=mb(n);i("hex",dt.some(n));var o=Eb(e);v(t,o),r(o),qo(t,YS,{hex:e}),y(t,e)}(t,e.value):u(t,e.type,e.value)},t=function(t){return{label:d(ok+t+".label"),description:d(ok+t+".description")}},c=t("red"),s=t("green"),l=t("blue"),f=t("hex");return zt(ZS.sketch(function(t){return{dom:{tag:"form",classes:[m("rgb-form")],attributes:{"aria-label":d("aria.color.picker")}},components:[t.field("red",Wy.sketch(h(_b,"red",c.label,c.description,255))),t.field("green",Wy.sketch(h(_b,"green",s.label,s.description,255))),t.field("blue",Wy.sketch(h(_b,"blue",l.label,l.description,255))),t.field("hex",Wy.sketch(h(hb,"hex",f.label,f.description,"ffffff"))),b.asSpec()],formBehaviours:rc([Fx.config({invalidClass:m("form-invalid")}),fg("rgb-form-events",[er(tk,a),er(nk,n),er(ek,n)])])}}),{apis:{updateHex:function(t,n){var e,o;Ll.setValue(t,{hex:n.value}),e=t,o=Eb(n),v(e,o),r(o),y(t,n)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,n,e){t.updateHex(n,e)}},extraApis:{}})},ik=function(t,o){var r=US.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[o("sv-palette-spectrum")]}}),i=US.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette-thumb")],innerHtml:"'}}),a=function(t,n){var e,o,r=t.width,i=t.height,u=t.getContext("2d");null!==u&&(u.fillStyle=n,u.fillRect(0,0,r,i),(e=u.createLinearGradient(0,0,r,0)).addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(1,"rgba(255,255,255,0)"),u.fillStyle=e,u.fillRect(0,0,r,i),(o=u.createLinearGradient(0,0,0,i)).addColorStop(0,"rgba(0,0,0,0)"),o.addColorStop(1,"rgba(0,0,0,1)"),u.fillStyle=o,u.fillRect(0,0,r,i))};return Xf({factory:function(t){var n=st({x:0,y:0}),e=rc([Zf.config({find:dt.some}),hg.config({})]);return US.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette")]},model:{mode:"xy",getInitialValue:n},rounded:!1,components:[r,i],onChange:function(t,n,e){qo(t,KS,{value:e})},onInit:function(t,n,e,o){a(e.element.dom,Bb(Ab))},sliderBehaviours:e})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,n,e){var o,r,i,u;o=e,r=n.components()[0].element.dom,i=WS(o,100,100),u=Tb(i),a(r,Bb(u))},setThumb:function(t,n,e){var o,r;o=n,r=GS(Eb(e)),US.setValue(o,{x:r.saturation,y:100-r.value})}},extraApis:{}})},uk=function(b,y){return Xf({name:"ColourPicker",configFields:[Ln("dom"),ne("onValidHex",ct),ne("onInvalidHex",ct)],factory:function(t){var n,e,o,a,u,r,i=rk(b,y,t.onValidHex,t.onInvalidHex),c=ik(0,y),s={paletteRgba:fe(Ab),paletteHue:fe(0)},l=mp((n=y,e=US.parts.spectrum({dom:{tag:"div",classes:[n("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=US.parts.thumb({dom:{tag:"div",classes:[n("hue-slider-thumb")],attributes:{role:"presentation"}}}),US.sketch({dom:{tag:"div",classes:[n("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:st({y:0})},components:[e,o],sliderBehaviours:rc([hg.config({})]),onChange:function(t,n,e){qo(t,qS,{value:e})}}))),f=mp(c.sketch({})),d=mp(i.sketch({})),m=function(t,n,e){f.getOpt(t).each(function(t){c.setHue(t,e)})},g=function(t,n){d.getOpt(t).each(function(t){i.updateHex(t,n)})},p=function(t,n,e){l.getOpt(t).each(function(t){US.setValue(t,{y:100-e/360*100})})},h=function(t,n){f.getOpt(t).each(function(t){c.setThumb(t,n)})},v=function(n,e,o,t){var r,i;r=o,i=Eb(e),s.paletteRgba.set(i),s.paletteHue.set(r),mt(t,function(t){t(n,e,o)})};return{uid:t.uid,dom:t.dom,components:[f.asSpec(),l.asSpec(),d.asSpec()],behaviours:rc([fg("colour-picker-events",[er(YS,(r=[m,p,h],function(t,n){var e=n.event.hex,o=GS(Eb(e));v(t,e,o.hue,r)})),er(KS,(u=[g],function(t,n){var e=n.event.value,o=s.paletteHue.get(),r=WS(o,e.x,100-e.y),i=XS(r);v(t,i,o,u)})),er(qS,(a=[m,g],function(t,n){var e=(100-n.event.value.y)/100*360,o=s.paletteRgba.get(),r=GS(o),i=WS(e,r.saturation,r.value),u=XS(i);v(t,u,e,a)}))]),Zf.config({find:function(t){return d.getOpt(t)}}),ig.config({mode:"acyclic"})])}}})},ak=function(){return Zf.config({find:dt.some})},ck=function(t){return Zf.config({find:t.getOpt})},sk=function(t){return Zf.config({find:function(n){return Tr(n.element,t).bind(function(t){return n.getSystem().getByDom(t).toOptional()})}})},lk={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},fk=function(t){return lk[t]},dk=tinymce.util.Tools.resolve("tinymce.Resource"),mk=tinymce.util.Tools.resolve("tinymce.util.Tools"),gk=fn([ne("preprocess",lt),ne("postprocess",lt)]),pk=function(t,n,e){return Ll.config(zt({store:{mode:"manual",getValue:n,setValue:e}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))},hk=function(t,n,e){return pk(t,function(t){return n(t.element)},function(t,n){return e(t.element,n)})},vk=function(r,t){var i=En("RepresentingConfigs.memento processors",gk,t);return Ll.config({store:{mode:"manual",getValue:function(t){var n=r.get(t),e=Ll.getValue(n);return i.postprocess(e)},setValue:function(t,n){var e=i.preprocess(n),o=r.get(t);Ll.setValue(o,e)}}})},bk=pk,yk=function(t){return hk(t,Wr,Gr)},xk=function(t){return Ll.config({store:{mode:"memory",initialValue:t}})},wk=function(i,u){var n=function(t,n){n.stop()},e=function(t){return function(n,e){mt(t,function(t){t(n,e)})}},o=function(t,n){var e;mv.isDisabled(t)||(e=n.event.raw,a(t,e.dataTransfer.files))},r=function(t,n){var e=n.event.raw.target;a(t,e.files)},a=function(t,n){var e,o,r;Ll.setValue(t,(e=n,o=u,r=mk.explode(o.getSetting("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string")),H($(e),function(n){return F(r,function(t){return Se(n.name.toLowerCase(),"."+t.toLowerCase())})}))),qo(t,Zy,{name:i.name})},c=mp({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:rc([fg("input-file-events",[ar(vo()),ar(Eo())])])}),t=i.label.map(function(t){return Qy(t,u)}),s=Wy.parts.field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:rc([xk([]),ak(),mv.config({}),Eg.config({toggleClass:"dragenter",toggleOnExecute:!1}),fg("dropzone-events",[er("dragenter",e([n,Eg.toggle])),er("dragleave",e([n,Eg.toggle])),er("dragover",n),er("drop",e([n,o])),er(ho(),r)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:u.translate("Drop an image here")}},dp.sketch({dom:{tag:"button",innerHtml:u.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[c.asSpec()],action:function(t){c.get(t).element.dom.click()},buttonBehaviours:rc([Yy.config({}),jv(u.isDisabled),Nv()])})]}]}}}});return Ky(t,s,["tox-form__group--stretched"],[])},Sk=oi("alloy-fake-before-tabstop"),kk=oi("alloy-fake-after-tabstop"),Ck=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:rc([hg.config({ignore:!0}),Yy.config({})])}},Ok=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[Ck([Sk]),t,Ck([kk])],behaviours:rc([sk(1)])}},_k=function(t,n){qo(t,mo(),{raw:{which:9,shiftKey:n}})},Tk=function(t,n){var e=n.element;Hi(e,Sk)?_k(t,!0):Hi(e,kk)&&_k(t,!1)},Ek=function(t){return Oy(t,["."+Sk,"."+kk].join(","),l)},Dk=!(je().browser.isIE()||je().browser.isEdge()),Bk=function(t,n){var o,r,e=Dk&&t.sandboxed,i=ft(ft({},t.label.map(function(t){return{title:t}}).getOr({})),e?{sandbox:"allow-scripts allow-same-origin"}:{}),u=(o=e,r=fe(""),{getValue:function(t){return r.get()},setValue:function(t,n){var e;o?Yr(t.element,"srcdoc",n):(Yr(t.element,"src","javascript:''"),(e=t.element.dom.contentWindow.document).open(),e.write(n),e.close()),r.set(n)}}),a=t.label.map(function(t){return Qy(t,n)}),c=Wy.parts.field({factory:{sketch:function(t){return Ok({uid:t.uid,dom:{tag:"iframe",attributes:i},behaviours:rc([Yy.config({}),hg.config({}),bk(dt.none(),u.getValue,u.setValue)])})}}});return Ky(a,c,["tox-form__group--stretched"],[])},Ak=function(t,n){return Ik(document.createElement("canvas"),t,n)},Mk=function(t){var n=Ak(t.width,t.height);return Fk(n).drawImage(t,0,0),n},Fk=function(t){return t.getContext("2d")},Ik=function(t,n,e){return t.width=n,t.height=e,t},Rk=function(t){return t.naturalWidth||t.width},Vk=function(t){return t.naturalHeight||t.height},Pk=window.Promise?window.Promise:(zx=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],Wx(t,jx(zk,this),jx(Nk,this))},Nx=window,Lx=zx.immediateFn||"function"==typeof Nx.setImmediate&&Nx.setImmediate||function(t){return setTimeout(t,1)},jx=function(e,o){return function(){for(var t=[],n=0;n").css({position:"absolute",top:0,left:0,width:f.width,height:f.height,zIndex:2147483647,opacity:1e-4,cursor:l}).appendTo(b.body),vO(b).on("mousemove touchmove",x).on("mouseup touchend",w),m.start(t)}),{destroy:function(){vO(y).off()}}}var SO=0,kO=function(s,e,l,o,r){var t,n="tox-",u="tox-crid-"+SO++,a=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],i=["top","right","bottom","left"],f=function(t,n){return{x:n.x-t.x,y:n.y-t.y,w:n.w,h:n.h}},c=function(t,n,e,o){var r,i=n.x,u=n.y,a=n.w,c=n.h;i+=e*t.deltaX,u+=o*t.deltaY,(a+=e*t.deltaW)<20&&(a=20),(c+=o*t.deltaH)<20&&(c=20),r=s=hO.clamp({x:i,y:u,w:a,h:c},l,"move"===t.name),r=f(l,r),p.fire("updateRect",{rect:r}),g(r)},d=function(n){var t=function(t,n){n.h<0&&(n.h=0),n.w<0&&(n.w=0),vO("#"+u+"-"+t,o).css({left:n.x,top:n.y,width:n.w,height:n.h})};mk.each(a,function(t){vO("#"+u+"-"+t.name,o).css({left:n.w*t.xMul+n.x,top:n.h*t.yMul+n.y})}),t("top",{x:e.x,y:e.y,w:e.w,h:n.y-e.y}),t("right",{x:n.x+n.w,y:n.y,w:e.w-n.x-n.w+e.x,h:n.h}),t("bottom",{x:e.x,y:n.y+n.h,w:e.w,h:e.h-n.y-n.h+e.y}),t("left",{x:e.x,y:n.y,w:n.x-e.x,h:n.h}),t("move",n)},m=function(t){d(s=t)},g=function(t){var n,e;m((n=l,{x:(e=t).x+n.x,y:e.y+n.y,w:e.w,h:e.h}))};vO('
').appendTo(o),mk.each(i,function(t){vO("#"+u,o).append('