/** * 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.4.2 (2020-08-17) */ !function(nt){"use strict";var Z=function(){},d=function(e,o){return function(){for(var t=[],n=0;n "+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,c){return{extract:function(e,o,r){var t,n,i=Ct(r),u=(t=e,n=i,dn(sn(a)).extract(t,ct,n));return xt(u,function(t){var n=V(t,function(t){return rn.field(t,t,Wt(),c)});return ln(n).extract(e,o,r)})},toString:function(){return"setOf("+c.toString()+")"}}},gn=at(sn(vt)),pn=d(dn,ln),hn=rn.state,vn=rn.field,bn=function(e,n,o,r,i){return Ft(r,i).fold(function(){return t=r,n=i,on(e,function(){return'The chosen schema: "'+n+'" did not exist in branches: '+en(t)});var t,n},function(t){return t.extract(e.concat(["branch: "+i]),n,o)})},yn=function(r,i){return{extract:function(n,e,o){return Ft(o,r).fold(function(){return t=r,on(n,function(){return'Choice schema did not contain choice key: "'+t+'"'});var t},function(t){return bn(n,e,o,i,t)})},toString:function(){return"chooseOn("+r+"). Possible values: "+Ct(i)}}},xn=sn(vt),wn=function(t){return pn(t)},Sn=function(o){return{extract:function(t,n,e){return o().extract(t,n,e)},toString:function(){return o().toString()}}},kn=function(n){return sn(function(t){return n(t).fold(yt,vt)})},Cn=function(n,t){return mn(function(t){return pt(n(t))},t)},On=function(t,n,e){return ht((o=t,r=ct,i=e,u=n.extract([o],r,i),kt(u,function(t){return{input:i,errors:t}})));var o,r,i,u},_n=function(t){return t.fold(function(t){throw new Error(En(t))},ct)},Tn=function(t,n,e){return _n(On(t,n,e))},En=function(t){return"Errors: \n"+(n=t.errors,e=10 ")+")\n"+t.getErrorInfo()}).join("\n"))+"\n\nInput object: "+en(t.input);var n,e},Bn=function(t,n){return yn(t,n)},Dn=function(t,n){return yn(t,Tt(n,ln))},Mn=at(xn),An=function(e,o){return sn(function(t){var n=typeof t;return e(t)?vt(t):yt("Expected type: "+o+" but got: "+n)})},Fn=An(ot,"number"),In=An(w,"string"),Rn=An(k,"boolean"),Vn=An(_,"function"),Pn=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 Pn(n[t])});case"Map":return t(n.keys(),Pn)&&t(n.values(),Pn);case"Set":return t(n.keys(),Pn);default:return!1}},Hn=sn(function(t){return Pn(t)?vt(t):yt("Expected value to be acceptable for sending via postMessage")}),zn=function(n){return kn(function(t){return A(n,t)?ut.value(t):ut.error('Unsupported value: "'+t+'", choose one of "'+n.join(", ")+'".')})},Nn=function(t){return vn(t,t,Wt(),gn())},Ln=function(t,n){return vn(t,t,Wt(),n)},jn=function(t){return Ln(t,In)},Un=function(t,n){return vn(t,t,Wt(),zn(n))},Wn=function(t){return Ln(t,Vn)},Gn=function(t,n){return vn(t,t,Wt(),ln(n))},Xn=function(t,n){return vn(t,t,Wt(),pn(n))},Yn=function(t,n){return vn(t,t,Wt(),dn(n))},qn=function(t){return vn(t,t,Gt(),gn())},Kn=function(t,n){return vn(t,t,Gt(),n)},Jn=function(t){return Kn(t,Fn)},$n=function(t){return Kn(t,In)},Qn=function(t){return Kn(t,Vn)},Zn=function(t,n){return Kn(t,ln(n))},te=function(t,n){return vn(t,t,Ut(n),gn())},ne=function(t,n,e){return vn(t,t,Ut(n),e)},ee=function(t,n){return ne(t,n,Fn)},oe=function(t,n){return ne(t,n,In)},re=function(t,n,e){return ne(t,n,zn(e))},ie=function(t,n){return ne(t,n,Rn)},ue=function(t,n){return ne(t,n,Vn)},ae=function(t,n,e){return ne(t,n,ln(e))},ce=function(t,n){return hn(t,n)},se=function(t){var n=t;return{get:function(){return n},set:function(t){n=t}}},fe=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:at(t)}},le={fromHtml:function(t,n){var e=(n||nt.document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||1=o.length&&e.substr(r,r+o.length)===o?t.substring(0,t.length-"/*".length):t;var n,e,o,r})},ei=function(t,n){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:ni(i)}},t},oi=Wr("alloy-premade"),ri=function(t){return Jt(oi,t)},ii=function(o){return t=function(t){for(var n=[],e=1;e "):o[0].name();return Jt(r,{handler:n,purpose:at(e)})})});return Qt(n,{})},vi=function(t){return On("custom.definition",ln([vn("dom","dom",Wt(),ln([Nn("tag"),te("styles",{}),te("classes",[]),te("attributes",{}),qn("value"),qn("innerHtml")])),Nn("components"),Nn("uid"),te("events",{}),te("apis",{}),vn("eventOrder","eventOrder",jt.mergeWithThunk(at({"alloy.execute":["disabling","alloy.base.behaviour","toggling","typeaheadevents"],"alloy.focus":["alloy.base.behaviour","focusing","keying"],"alloy.system.init":["alloy.base.behaviour","disabling","toggling","representing"],input:["alloy.base.behaviour","representing","streaming","invalidating"],"alloy.system.detached":["alloy.base.behaviour","representing","item-events","tooltipping"],mousedown:["focusing","alloy.base.behaviour","item-type-events"],touchstart:["focusing","alloy.base.behaviour","item-type-events"],mouseover:["item-type-events","tooltipping"],"alloy.receive":["receiving","reflecting","tooltipping"]})),Mn()),qn("domModification")]),t)},bi=function(t,n){var e=Ir(t,n);return e===undefined||""===e?[]:e.split(" ")},yi=function(t){return t.dom().classList!==undefined},xi=function(t,n){return r=n,i=bi(e=t,o="class").concat([r]),Fr(e,o,i.join(" ")),!0;var e,o,r,i},wi=function(t,n){return r=n,0<(i=H(bi(e=t,o="class"),function(t){return t!==r})).length?Fr(e,o,i.join(" ")):Pr(e,o),!1;var e,o,r,i},Si=function(t,n){yi(t)?t.dom().classList.add(n):xi(t,n)},ki=function(t){0===(yi(t)?t.dom().classList:bi(t,"class")).length&&Pr(t,"class")},Ci=function(t,n){yi(t)?t.dom().classList.remove(n):wi(t,n);ki(t)},Oi=function(t,n){return yi(t)&&t.dom().classList.contains(n)},_i=function(n,t){rt(t,function(t){Si(n,t)})},Ti=function(n,t){rt(t,function(t){Ci(n,t)})},Ei=function(t){return t.style!==undefined&&_(t.style.getPropertyValue)},Bi=function(t){return mr(t)},Di=_(nt.Element.prototype.attachShadow)&&_(nt.Node.prototype.getRootNode),Mi=at(Di),Ai=Di?function(t){return le.fromDom(t.dom().getRootNode())}:pr,Fi=function(t){return le.fromDom(t.dom().host)},Ii=function(t){return O(t.dom().shadowRoot)},Ri=function(t){var n,e,o,r,i=lr(t)?t.dom().parentNode:t.dom();return i!==undefined&&null!==i&&null!==i.ownerDocument&&(o=le.fromDom(i),r=Ai(o),(Bi(r)?st.some(r):st.none()).fold(function(){return i.ownerDocument.body.contains(i)},(n=Ri,e=Fi,function(t){return n(e(t))})))},Vi=function(){return Pi(le.fromDom(nt.document))},Pi=function(t){var n=t.dom().body;if(null===n||n===undefined)throw new Error("Body is not available yet");return le.fromDom(n)},Hi=function(t,n,e){if(!w(e))throw nt.console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Ei(t)&&t.style.setProperty(n,e)},zi=function(t,n){Ei(t)&&t.style.removeProperty(n)},Ni=function(t,n,e){var o=t.dom();Hi(o,n,e)},Li=function(t,n){var e=t.dom();_t(n,function(t,n){Hi(e,n,t)})},ji=function(t,n){var e=t.dom();_t(n,function(t,n){t.fold(function(){zi(e,n)},function(t){Hi(e,n,t)})})},Ui=function(t,n){var e=t.dom(),o=nt.window.getComputedStyle(e).getPropertyValue(n);return""!==o||Ri(t)?o:Wi(e,n)},Wi=function(t,n){return Ei(t)?t.style.getPropertyValue(n):""},Gi=function(t,n){var e=t.dom(),o=Wi(e,n);return st.from(o).filter(function(t){return 0"}),Mn()),Kf=ce("schema",function(){return[qn("preprocess")]}),Jf=te("defaults",at({})),$f=te("overrides",at({})),Qf=ln([Gf,Xf,Yf,qf,Jf,$f]),Zf=ln([Gf,Xf,Yf,Jf,$f]),tl=ln([Gf,Xf,Yf,qf,Jf,$f]),nl=ln([Gf,Kf,Yf,Nn("unit"),qf,Jf,$f]),el=function(t){return t.fold(st.some,st.none,st.some,st.some)},ol=function(t){var n=function(t){return t.name};return t.fold(n,n,n,n)},rl=function(e,o){return function(t){var n=Tn("Converting part type",o,t);return e(n)}},il=rl(Wf.required,Qf),ul=rl(Wf.external,Zf),al=rl(Wf.optional,tl),cl=rl(Wf.group,nl),sl=at("entirety"),fl=/* */Object.freeze({__proto__:null,required:il,external:ul,optional:al,group:cl,asNamedPart:el,name:ol,asCommon:function(t){return t.fold(ct,ct,ct,ct)},original:sl}),ll=function(t,n,e,o){return zt(n.defaults(t,e,o),e,{uid:t.partUids[n.name]},n.overrides(t,e,o))},dl=function(r,t){var n={};return rt(t,function(t){el(t).each(function(e){var o=ml(r,e.pname);n[e.name]=function(t){var n=Tn("Part: "+e.name+" in "+r,ln(e.schema),t);return et(et({},o),{config:t,validated:n})}})}),n},ml=function(t,n){return{uiType:Uf(),owner:t,name:n}},gl=function(t,n,e){return{uiType:Uf(),owner:t,name:n,config:e,validated:{}}},pl=function(t){return U(t,function(t){return t.fold(st.none,st.some,st.none,st.none).map(function(t){return Gn(t.name,t.schema.concat([da(sl())]))}).toArray()})},hl=function(t){return V(t,ol)},vl=function(t,n,e){return o=n,i={},r={},rt(e,function(t){t.fold(function(o){i[o.pname]=Lf(!0,function(t,n,e){return o.factory.sketch(ll(t,o,n,e))})},function(t){var n=o.parts[t.name];r[t.name]=at(t.factory.sketch(ll(o,t,n[sl()]),n))},function(o){i[o.pname]=Lf(!1,function(t,n,e){return o.factory.sketch(ll(t,o,n,e))})},function(r){i[r.pname]=jf(!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:at(i),externals:at(r)};var o,i,r},bl=function(t,n,e){return Nf(st.some(t),n,n.components,e)},yl=function(t,n,e){var o=n.partUids[e];return t.getSystem().getByUid(o).toOption()},xl=function(t,n,e){return yl(t,n,e).getOrDie("Could not find part: "+e)},wl=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return rt(e,function(t){o[t]=at(i.getByUid(r[t]))}),o},Sl=function(t,n){var e=t.getSystem();return Tt(n.partUids,function(t,n){return at(e.getByUid(t))})},kl=function(t){return Ct(t.partUids)},Cl=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return rt(e,function(t){o[t]=at(i.getByUid(r[t]).getOrDie())}),o},Ol=function(n,t){var e=hl(t);return $t(V(e,function(t){return{key:t,value:n+"-"+t}}))},_l=function(n){return vn("partUids","partUids",Yt(function(t){return Ol(t.uid,n)}),Mn())},Tl=/* */Object.freeze({__proto__:null,generate:dl,generateOne:gl,schemas:pl,names:hl,substitutes:vl,components:bl,defaultUids:Ol,defaultUidsSchema:_l,getAllParts:Sl,getAllPartNames:kl,getPart:yl,getPartOrDie:xl,getParts:wl,getPartsOrDie:Cl}),El=function(t,n,e,o,r){var i,u,a=(u=r,(0<(i=o).length?[Gn("parts",i)]:[]).concat([Nn("uid"),te("dom",{}),te("components",[]),da("originalSpec"),te("debug.sketcher",{})]).concat(u));return Tn(t+" [SpecSchema]",fn(a.concat(n)),e)},Bl=function(t,n,e,o,r){var i=Dl(r),u=pl(e),a=_l(e),c=El(t,n,i,u,[a]),s=vl(0,c,e);return o(c,bl(t,c,s.internals()),i,s.externals())},Dl=function(t){return It(t,"uid")?t:et(et({},t),{uid:$r("uid")})};var Ml,Al,Fl=fn([Nn("name"),Nn("factory"),Nn("configFields"),te("apis",{}),te("extraApis",{})]),Il=fn([Nn("name"),Nn("factory"),Nn("configFields"),Nn("partFields"),te("apis",{}),te("extraApis",{})]),Rl=function(t){var i=Tn("Sketcher for "+t.name,Fl,t),n=Tt(i.apis,ii),e=Tt(i.extraApis,function(t,n){return ei(t,n)});return et(et({name:at(i.name),configFields:at(i.configFields),sketch:function(t){return n=i.name,e=i.configFields,o=i.factory,r=Dl(t),o(El(n,e,r,[],[]),r);var n,e,o,r}},n),e)},Vl=function(t){var n=Tn("Sketcher for "+t.name,Il,t),e=dl(n.name,n.partFields),o=Tt(n.apis,ii),r=Tt(n.extraApis,function(t,n){return ei(t,n)});return et(et({name:at(n.name),partFields:at(n.partFields),configFields:at(n.configFields),sketch:function(t){return Bl(n.name,n.configFields,n.partFields,n.factory,t)},parts:at(e)},o),r)},Pl=function(t){for(var n=[],e=function(t){n.push(t)},o=0;o',e.getDoc());return Or(t,le.fromDom(n.extractContents())),n.insertNode(t.dom()),br(t).each(function(t){return t.dom().normalize()}),es(t,ns).map(function(t){var n;e.selection.setCursorLocation(t.dom(),"img"===cr(n=t)?1:Zc(n).fold(function(){return xr(n).length},function(t){return t.length}))}),t})},lp=function(t){return ju(t,"[data-mce-autocompleter]")},dp=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},mp=function(t){return""!==t&&-1!==" \xa0\f\n\r\t\x0B".indexOf(t)},gp=function(t,n){return t.substring(n.length)},pp=function(t,o,r,i){if(void 0===i&&(i=0),!(n=o).collapsed||3!==n.startContainer.nodeType)return st.none();var n,e=t.getParent(o.startContainer,t.isBlock)||t.getRoot();return sp(t,o.startContainer,o.startOffset,function(t,n,e){return function(t,n,e){var o;for(o=n-1;0<=o;o--){var r=t.charAt(o);if(mp(r))return st.none();if(r===e)break}return st.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 st.none();var e=dp(n);return 0!==e.lastIndexOf(r)||gp(e,r).length=t.minChars&&t.matches.getOrThunk(function(){return Sp(n.dom)})(e.range,i,e.text)});if(0===u.length)return st.none();var a=bp.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}})}));return st.some({lookupData:a,context:e})},Op=ln([jn("type"),$n("text")]),_p=ln([ce("type",function(){return"autocompleteitem"}),ce("active",function(){return!1}),ce("disabled",function(){return!1}),te("meta",{}),jn("value"),$n("text"),$n("icon")]),Tp=ln([jn("type"),jn("ch"),ee("minChars",1),te("columns",1),ee("maxResults",10),Qn("matches"),Wn("fetch"),Wn("onAction")]),Ep=function(t){var n,e,o=t.ui.registry.getAll().popups,r=Tt(o,function(t){return On("Autocompleter",Tp,t).fold(function(t){throw new Error(En(t))},function(t){return t})}),i=(n=Dt(r,function(t){return t.ch}),e={},rt(n,function(t){e[t]={}}),Ct(e)),u=At(r);return{dataset:r,triggerChars:i,lookupByChar:function(n){return H(u,function(t){return t.ch===n})}}};(up=ip=ip||{})[up.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",up[up.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX";var Bp,Dp,Mp=ip,Ap="tox-menu-nav__js",Fp="tox-collection__item",Ip="tox-swatch",Rp={normal:Ap,color:Ip},Vp="tox-collection__item--enabled",Pp="tox-collection__item-label",Hp="tox-collection__item-caret",zp="tox-collection__item--active",Np=function(t){return Ft(Rp,t).getOr(Ap)},Lp=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"}},jp=function(t){var n=Lp(t);return{backgroundMenu:n.backgroundMenu,selectedMenu:n.selectedMenu,menu:n.menu,selectedItem:n.selectedItem,item:Np(t)}},Up=[Ag.parts().items({})],Wp=function(t,n,e){var o=Lp(e);return{dom:{tag:"div",classes:it([[o.tieredMenu]])},markers:jp(e)}},Gp=function(e,o){return function(t){var n=R(t,o);return V(n,function(t){return{dom:e,components:t}})}},Xp=function(t,e){var o=[],r=[];return rt(t,function(t,n){e(t,n)?(0o}).getOr(r.length);return st.some({numColumns:e,numRows:Math.ceil(r.length/e)})}return st.none()},ih=function(t,n){return Ka([$m(t,n)])},uh=function(t){return ih(Wr("unnamed-events"),t)},ah=[Nn("lazySink"),Nn("tooltipDom"),te("exclusive",!0),te("tooltipComponents",[]),te("delay",300),re("mode","normal",["normal","follow-highlight"]),te("anchor",function(t){return{anchor:"hotspot",hotspot:t,layouts:{onLtr:at([Va,Ra,Ma,Fa,Aa,Ia]),onRtl:at([Va,Ra,Ma,Fa,Aa,Ia])}}}),aa("onHide"),aa("onShow")],ch=/* */Object.freeze({__proto__:null,init:function(){var e=se(st.none()),n=se(st.none()),o=function(){e.get().each(function(t){nt.clearTimeout(t)})},t=at("not-implemented");return ai({getTooltip:function(){return n.get()},isShowing:function(){return n.get().isSome()},setTooltip:function(t){n.set(st.some(t))},clearTooltip:function(){n.set(st.none())},clearTimer:o,resetTimer:function(t,n){o(),e.set(st.some(nt.setTimeout(function(){t()},n)))},readState:t})}}),sh=Wr("tooltip.exclusive"),fh=Wr("tooltip.show"),lh=Wr("tooltip.hide"),dh=function(t,n,e){t.getSystem().broadcastOn([sh],{})},mh=/* */Object.freeze({__proto__:null,hideAllExclusive:dh,setComponents:function(t,n,e,o){e.getTooltip().each(function(t){t.getSystem().isConnected()&&Jm.set(t,o)})}}),gh=$a({fields:ah,name:"tooltipping",active:/* */Object.freeze({__proto__:null,events:function(o,r){var e=function(n){r.getTooltip().each(function(t){qs(t),o.onHide(n,t),r.clearTooltip()}),r.clearTimer()};return qo(it([[$o(fh,function(t){r.resetTimer(function(){!function(n){if(!r.isShowing()){dh(n);var t=o.lazySink(n).getOrDie(),e=n.getSystem().build({dom:o.tooltipDom,components:o.tooltipComponents,events:qo("normal"===o.mode?[$o(io(),function(t){jo(n,fh)}),$o(oo(),function(t){jo(n,lh)})]:[]),behaviours:Ka([Jm.config({})])});r.setTooltip(e),Gs(t,e),o.onShow(n,e),Ns.position(t,o.anchor(n),e)}}(t)},o.delay)}),$o(lh,function(t){r.resetTimer(function(){e(t)},o.delay)}),$o(xo(),function(t,n){A(n.channels(),sh)&&e(t)}),ir(function(t){e(t)})],"normal"===o.mode?[$o(uo(),function(t){jo(t,fh)}),$o(bo(),function(t){jo(t,lh)}),$o(io(),function(t){jo(t,fh)}),$o(oo(),function(t){jo(t,lh)})]:[$o(No(),function(t,n){jo(t,fh)}),$o(Lo(),function(t){jo(t,lh)})]]))}}),state:ch,apis:mh}),ph=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),hh=tinymce.util.Tools.resolve("tinymce.util.I18n"),vh=["input","button","textarea","select"],bh=function(t,n,e){(n.disabled()?Ch:Oh)(t,n,e)},yh=function(t,n){return!0===n.useNative&&A(vh,cr(t.element()))},xh=function(t){Fr(t.element(),"disabled","disabled")},wh=function(t){Pr(t.element(),"disabled")},Sh=function(t){Fr(t.element(),"aria-disabled","true")},kh=function(t){Fr(t.element(),"aria-disabled","false")},Ch=function(n,t,e){t.disableClass.each(function(t){Si(n.element(),t)}),(yh(n,t)?xh:Sh)(n),t.onDisabled(n)},Oh=function(n,t,e){t.disableClass.each(function(t){Ci(n.element(),t)}),(yh(n,t)?wh:kh)(n),t.onEnabled(n)},_h=function(t,n){return yh(t,n)?Vr(t.element(),"disabled"):"true"===Ir(t.element(),"aria-disabled")},Th=/* */Object.freeze({__proto__:null,enable:Oh,disable:Ch,isDisabled:_h,onLoad:bh,set:function(t,n,e,o){(o?Ch:Oh)(t,n,e)}}),Eh=/* */Object.freeze({__proto__:null,exhibit:function(t,n){return si({classes:n.disabled()?n.disableClass.toArray():[]})},events:function(e,t){return qo([Ko(wo(),function(t,n){return _h(t,e)}),Wa(e,t,bh)])}}),Bh=[ue("disabled",c),te("useNative",!0),qn("disableClass"),aa("onDisabled"),aa("onEnabled")],Dh=$a({fields:Bh,name:"disabling",active:Eh,apis:Th}),Mh=tinymce.util.Tools.resolve("tinymce.EditorManager"),Ah=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},Fh=function(t){return t.getParam("width",ph.DOM.getStyle(t.getElement(),"width"))},Ih=function(t){return st.from(t.getParam("min_width")).filter(ot)},Rh=function(t){return st.from(t.getParam("min_height")).filter(ot)},Vh=function(t){return st.from(t.getParam("max_width")).filter(ot)},Ph=function(t){return st.from(t.getParam("max_height")).filter(ot)},Hh=function(t){return!1!==t.getParam("menubar",!0,"boolean")},zh=function(t){var n=t.getParam("toolbar",!0),e=!0===n,o=w(n),r=v(n)&&0'+t+""})}return r},Cv=at(dl(Og(),_g())),Ov=Wr("cell-over"),_v=Wr("cell-execute"),Tv=function(n,e,t){var o,r=function(t){return Uo(t,_v,{row:n,col:e})},i=function(t,n){n.stop(),r(t)};return uu({dom:{tag:"div",attributes:((o={role:"button"})["aria-labelledby"]=t,o)},behaviours:Ka([$m("insert-table-picker-cell",[$o(io(),eg.focus),$o(wo(),r),$o(mo(),i),$o(ko(),i)]),gg.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),eg.config({onFocus:function(t){return Uo(t,Ov,{row:n,col:e})}})])})},Ev=function(t){return{value:t}},Bv=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Dv=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Mv=function(t){return Bv.test(t)||Dv.test(t)},Av=function(t){var n={value:t.value.replace(Bv,function(t,n,e,o){return n+n+e+e+o+o})},e=Dv.exec(n.value);return null===e?["FFFFFF","FF","FF","FF"]:e},Fv=function(t){var n=t.toString(16);return 1===n.length?"0"+n:n},Iv=function(t){var n=Fv(t.red)+Fv(t.green)+Fv(t.blue);return Ev(n)},Rv=Math.min,Vv=Math.max,Pv=Math.round,Hv=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,zv=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Nv=function(t,n,e,o){return{red:t,green:n,blue:e,alpha:o}},Lv=function(t){var n=parseInt(t,10);return n.toString()===t&&0<=n&&n<=255},jv=function(t){var n,e,o,r=(t.hue||0)%360,i=t.saturation/100,u=t.value/100;if(i=Vv(0,Rv(i,1)),u=Vv(0,Rv(u,1)),0===i)return n=e=o=Pv(255*u),Nv(n,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),f=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=Pv(255*(n+f)),e=Pv(255*(e+f)),o=Pv(255*(o+f)),Nv(n,e,o,1)},Uv=function(t){var n=Av(t),e=parseInt(n[1],16),o=parseInt(n[2],16),r=parseInt(n[3],16);return Nv(e,o,r,1)},Wv=function(t,n,e,o){var r=parseInt(t,10),i=parseInt(n,10),u=parseInt(e,10),a=parseFloat(o);return Nv(r,i,u,a)},Gv=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},Xv=Nv(255,0,0,1),Yv=function(t,n){return t.fire("ResizeContent",n)},qv=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),Kv="tinymce-custom-colors";var Jv="choiceitem",$v=[{type:Jv,text:"Light Green",value:"#BFEDD2"},{type:Jv,text:"Light Yellow",value:"#FBEEB8"},{type:Jv,text:"Light Red",value:"#F8CAC6"},{type:Jv,text:"Light Purple",value:"#ECCAFA"},{type:Jv,text:"Light Blue",value:"#C2E0F4"},{type:Jv,text:"Green",value:"#2DC26B"},{type:Jv,text:"Yellow",value:"#F1C40F"},{type:Jv,text:"Red",value:"#E03E2D"},{type:Jv,text:"Purple",value:"#B96AD9"},{type:Jv,text:"Blue",value:"#3598DB"},{type:Jv,text:"Dark Turquoise",value:"#169179"},{type:Jv,text:"Orange",value:"#E67E23"},{type:Jv,text:"Dark Red",value:"#BA372A"},{type:Jv,text:"Dark Purple",value:"#843FA1"},{type:Jv,text:"Dark Blue",value:"#236FA1"},{type:Jv,text:"Light Gray",value:"#ECF0F1"},{type:Jv,text:"Medium Gray",value:"#CED4D9"},{type:Jv,text:"Gray",value:"#95A5A6"},{type:Jv,text:"Dark Gray",value:"#7E8C8D"},{type:Jv,text:"Navy Blue",value:"#34495E"},{type:Jv,text:"Black",value:"#000000"},{type:Jv,text:"White",value:"#ffffff"}],Qv=function JF(e){void 0===e&&(e=10);var t,n=qv.getItem(Kv),o=w(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=M(r,t))?st.none():st.some(n)).each(i),r.unshift(t),r.length>e&&r.pop(),qv.setItem(Kv,JSON.stringify(r))},state:function(){return r.slice(0)}}}(10),Zv=function(t){return!1!==t.getParam("custom_colors")},tb=function(t){var n=t.getParam("color_map");return n!==undefined?function(t){var n=[],u=nt.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=function(t){if(/^[0-9A-Fa-f]{6}$/.test(t))return"#"+t.toUpperCase();a.clearRect(0,0,u.width,u.height),a.fillStyle="#FFFFFF",a.fillStyle=t,a.fillRect(0,0,1,1);var n=a.getImageData(0,0,1,1).data,e=n[0],o=n[1],r=n[2],i=n[3];return"#"+c(e,i)+c(o,i)+c(r,i)},o=0;o'+e+"":"",r='
'+t.icon+"
",i={_:" "," - ":" ","-":" "},u=e.replace(/\_| \- |\-/g,function(t){return i[t]});return'
'+r+o+"
"}),o=1'+t.join("")+""});Mr(t.element(),r.join(""))},i=o(function(t,n,e,o){n.stop(),c.isReadOnly()||Uo(t,gy,{name:a.name,value:o})}),u=[$o(io(),o(function(t,n,e){ic(e)})),$o(mo(),i),$o(ko(),i),$o(uo(),o(function(t,n,e){Lu(t.element(),"."+zp).each(function(t){Ci(t,zp)}),Si(e,zp)})),$o(ao(),o(function(t){Lu(t.element(),"."+zp).each(function(t){Ci(t,zp)})})),ar(o(function(t,n,e,o){Uo(t,gy,{name:a.name,value:o})}))],s=function(t,n){return V(os(t.element(),".tox-collection__item"),n)},f=oy.parts().field({dom:{tag:"div",classes:["tox-collection"].concat(1!==a.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:ct},behaviours:Ka([Dh.config({disabled:c.isReadOnly,onDisabled:function(t){s(t,function(t){Si(t,"tox-collection__item--state-disabled"),Fr(t,"aria-disabled",!0)})},onEnabled:function(t){s(t,function(t){Ci(t,"tox-collection__item--state-disabled"),Pr(t,"aria-disabled")})}}),nv(),Jm.config({}),Bf.config({store:{mode:"memory",initialValue:[]},onSetValue:function(o,t){r(o,t),"auto"===a.columns&&rh(o,5,"tox-collection__item").each(function(t){var n=t.numRows,e=t.numColumns;Gm.setGridSize(o,n,e)}),jo(o,yy)}}),uy.config({}),Gm.config((t=a.columns,n="normal",1===t?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===t?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===n?".tox-swatches__row":".tox-collection__group",cell:"color"===n?"."+Ip:"."+Fp}})),$m("collection-events",u)]),eventOrder:{"alloy.execute":["disabling","alloy.base.behaviour","collection-events"]}});return ay(e,f,["tox-form__group--collection"],[])},wy=at([qn("data"),te("inputAttributes",{}),te("inputStyles",{}),te("tag","input"),te("inputClasses",[]),aa("onSetValue"),te("styles",{}),te("eventOrder",{}),Df("inputBehaviours",[Bf,eg]),te("selectOnFocus",!0)]),Sy=function(t){return Ka([eg.config({onFocus:t.selectOnFocus?function(t){var n=t.element(),e=Ki(n);n.dom().setSelectionRange(0,e.length)}:Z})])},ky=function(t){return{tag:t.tag,attributes:et({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},Cy=Rl({name:"Input",configFields:wy(),factory:function(t,n){return{uid:t.uid,dom:ky(t),components:[],behaviours:et(et({},Sy(e=t)),Af(e.inputBehaviours,[Bf.config({store:et(et({mode:"manual"},e.data.map(function(t){return{initialValue:t}}).getOr({})),{getValue:function(t){return Ki(t.element())},setValue:function(t,n){Ki(t.element())!==n&&Ji(t.element(),n)}}),onSetValue:e.onSetValue})])),eventOrder:t.eventOrder};var e}}),Oy={},_y={exports:Oy};Kb=undefined,Jb=Oy,$b=_y,Qb=undefined,function(t){if("object"==typeof Jb&&void 0!==$b)$b.exports=t();else if("function"==typeof Kb&&Kb.amd)Kb([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}}(function(){return function f(i,u,a){function c(n,t){if(!u[n]){if(!i[n]){var e="function"==typeof Qb&&Qb;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,f,i,u,a)}return u[n].exports}for(var s="function"==typeof Qb&&Qb,t=0;t"},nS=function(o,t){return{uid:o.uid,dom:o.dom,components:t,behaviours:Af(o.formBehaviours,[Bf.config({store:{mode:"manual",getValue:function(t){var n=Sl(t,o);return Tt(n,function(t,r){return t().bind(function(t){var n,e,o=Ll.getCurrent(t);return n=o,e=new Error("Cannot find a current component to extract the value from for form part '"+r+"': "+Nr(t.element())),n.fold(function(){return ut.error(e)},ut.value)}).map(Bf.getValue)})},setValue:function(e,t){_t(t,function(n,t){yl(e,o,t).each(function(t){Ll.getCurrent(t).each(function(t){Bf.setValue(t,n)})})})}}})]),apis:{getField:function(t,n){return yl(t,o,n).bind(Ll.getCurrent)}}}},eS={getField:ii(function(t,n,e){return t.getField(n,e)}),sketch:function(t){var e,n=(e=[],{field:function(t,n){return e.push(t),gl("form",tS(t),n)},record:function(){return e}}),o=t(n),r=n.record(),i=V(r,function(t){return il({name:t,pname:tS(t)})});return Bl("form",Zw,i,nS,o)}},oS=Wr("valid-input"),rS=Wr("invalid-input"),iS=Wr("validating-input"),uS="colorcustom.rgb.",aS=function(d,m,g,p){var h=function(t,n,e,o,r){var i,u,a=d(uS+"range"),c=[oy.parts().label({dom:{tag:"label",innerHtml:e,attributes:{"aria-label":o}}}),oy.parts().field({data:r,factory:Cy,inputAttributes:et({type:"text"},"hex"===n?{"aria-live":"polite"}:{}),inputClasses:[m("textfield")],inputBehaviours:Ka([(i=n,u=t,Gy.config({invalidClass:m("invalid"),notify:{onValidate:function(t){Uo(t,iS,{type:i})},onValid:function(t){Uo(t,oS,{type:i,value:Bf.getValue(t)})},onInvalid:function(t){Uo(t,rS,{type:i,value:Bf.getValue(t)})}},validator:{validate:function(t){var n=Bf.getValue(t),e=u(n)?ut.value(!0):ut.error(d("aria.input.invalid"));return Ry(e)},validateOnLoad:!1}})),uy.config({})]),onSetValue:function(t){Gy.isInvalid(t)&&Gy.run(t).get(Z)}})],s="hex"!==n?[oy.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;Bf.setValue(t,{red:e,green:o,blue:r})},b=Zg({dom:{tag:"div",classes:[m("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),y=function(t,n){b.getOpt(t).each(function(t){Ni(t.element(),"background-color","#"+n.value)})};return Rl({factory:function(){var e={red:se(st.some(255)),green:se(st.some(255)),blue:se(st.some(255)),hex:se(st.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",st.some(n)),i("green",st.some(e)),i("blue",st.some(o))},n=function(t,n){var e=n.event();"hex"!==e.type()?i(e.type(),st.none()):p(t)},u=function(r,t,n){var e=parseInt(n,10);i(t,st.some(e)),o("red").bind(function(e){return o("green").bind(function(n){return o("blue").map(function(t){return Nv(e,n,t,1)})})}).each(function(t){var n,e,o=(n=r,e=Iv(t),eS.getField(n,"hex").each(function(t){eg.isFocused(t)||Bf.setValue(n,{hex:e.value})}),e);y(r,o)})},a=function(t,n){var e=n.event();"hex"===e.type()?function(t,n){g(t);var e=Ev(n);i("hex",st.some(n));var o=Uv(e);v(t,o),r(o),Uo(t,hx,{hex:e}),y(t,e)}(t,e.value()):u(t,e.type(),e.value())},t=function(t){return{label:d(uS+t+".label"),description:d(uS+t+".description")}},c=t("red"),s=t("green"),f=t("blue"),l=t("hex");return zt(eS.sketch(function(t){return{dom:{tag:"form",classes:[m("rgb-form")],attributes:{"aria-label":d("aria.color.picker")}},components:[t.field("red",oy.sketch(h(Lv,"red",c.label,c.description,255))),t.field("green",oy.sketch(h(Lv,"green",s.label,s.description,255))),t.field("blue",oy.sketch(h(Lv,"blue",f.label,f.description,255))),t.field("hex",oy.sketch(h(Mv,"hex",l.label,l.description,"ffffff"))),b.asSpec()],formBehaviours:Ka([Gy.config({invalidClass:m("form-invalid")}),$m("rgb-form-events",[$o(oS,a),$o(rS,n),$o(iS,n)])])}}),{apis:{updateHex:function(t,n){var e,o;Bf.setValue(t,{hex:n.value}),e=t,o=Uv(n),v(e,o),r(o),y(t,n)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,n,e){t.updateHex(n,e)}},extraApis:{}})},cS=function(t,o){var r=Qw.parts().spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[o("sv-palette-spectrum")]}}),i=Qw.parts().thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[o("sv-palette-thumb")],innerHtml:"'}}),u=function(t,n){var e=t.width,o=t.height,r=t.getContext("2d");if(null!==r){r.fillStyle=n,r.fillRect(0,0,e,o);var i=r.createLinearGradient(0,0,e,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,e,o);var u=r.createLinearGradient(0,0,0,o);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=u,r.fillRect(0,0,e,o)}};return Rl({factory:function(t){var n=at({x:at(0),y:at(0)}),e=Ka([Ll.config({find:st.some}),eg.config({})]);return Qw.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){Uo(t,bx,{value:e})},onInit:function(t,n,e,o){u(e.element().dom(),Gv(Xv))},sliderBehaviours:e})},name:"SaturationBrightnessPalette",configFields:[],apis:{setRgba:function(t,n,e){var o,r;o=e,r=n.components()[0].element().dom(),u(r,Gv(o))}},extraApis:{}})},sS=function(l,d){return Rl({name:"ColourPicker",configFields:[Nn("dom"),te("onValidHex",Z),te("onInvalidHex",Z)],factory:function(t){var a,v,n,e,o,r=aS(l,d,t.onValidHex,t.onInvalidHex),i=cS(0,d),b={paletteRgba:se(Xv)},u=Zg(i.sketch({})),c=Zg(r.sketch({})),s=function(t,e){u.getOpt(t).each(function(t){var n=Uv(e);b.paletteRgba.set(n),i.setRgba(t,n)})},f=function(t,n){c.getOpt(t).each(function(t){r.updateHex(t,n)})},y=function(n,e,t){rt(t,function(t){t(n,e)})};return{uid:t.uid,dom:t.dom,components:[u.asSpec(),(n=d,e=Qw.parts().spectrum({dom:{tag:"div",classes:[n("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=Qw.parts().thumb({dom:{tag:"div",classes:[n("hue-slider-thumb")],attributes:{role:"presentation"}}}),Qw.sketch({dom:{tag:"div",classes:[n("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:at({y:at(0)})},components:[e,o],sliderBehaviours:Ka([eg.config({})]),onChange:function(t,n,e){Uo(t,vx,{value:e})}})),c.asSpec()],behaviours:Ka([$m("colour-picker-events",[$o(bx,(v=[f],function(t,n){var e,o,r,i,u,a,c,s,f,l=n.event().value(),d=b.paletteRgba.get(),m=(i=r=0,u=(e=d).red/255,a=e.green/255,c=e.blue/255,s=Math.min(u,Math.min(a,c)),f=Math.max(u,Math.max(a,c)),s===f?px(0,0,100*(i=s)):(r=60*((r=u===s?3:c===s?1:5)-(u===s?a-c:c===s?u-a:c-u)/(f-s)),o=(f-s)/f,i=f,px(Math.round(r),Math.round(100*o),Math.round(100*i)))),g=px(m.hue,l.x(),100-l.y()),p=jv(g),h=Iv(p);y(t,h,v)})),$o(vx,(a=[s,f],function(t,n){var e,o,r,i=n.event().value(),u=(e=i.y(),o=px((100-e)/100*360,100,100),r=jv(o),Iv(r));y(t,u,a)}))]),Ll.config({find:function(t){return c.getOpt(t)}}),Gm.config({mode:"acyclic"})])}}})},fS=function(){return Ll.config({find:st.some})},lS=function(t){return Ll.config({find:t.getOpt})},dS=function(t){return Ll.config({find:function(n){return wr(n.element(),t).bind(function(t){return n.getSystem().getByDom(t).toOption()})}})},mS={"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"},gS=function(t){return mS[t]},pS=tinymce.util.Tools.resolve("tinymce.Resource"),hS=ln([te("preprocess",ct),te("postprocess",ct)]),vS=function(t,n,e){return Bf.config(zt({store:{mode:"manual",getValue:n,setValue:e}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))},bS=function(t,n,e){return vS(t,function(t){return n(t.element())},function(t,n){return e(t.element(),n)})},yS=function(r,t){var i=Tn("RepresentingConfigs.memento processors",hS,t);return Bf.config({store:{mode:"manual",getValue:function(t){var n=r.get(t),e=Bf.getValue(n);return i.postprocess(e)},setValue:function(t,n){var e=i.preprocess(n),o=r.get(t);Bf.setValue(o,e)}}})},xS=vS,wS=function(t){return bS(t,Dr,Mr)},SS=function(t){return Bf.config({store:{mode:"memory",initialValue:t}})},kS=function(r,n){var e=function(t,n){n.stop()},o=function(t){return function(n,e){rt(t,function(t){t(n,e)})}},i=function(t,n){if(!Dh.isDisabled(t)){var e=n.event().raw();a(t,e.dataTransfer.files)}},u=function(t,n){var e=n.event().raw().target.files;a(t,e)},a=function(t,n){var e,o;Bf.setValue(t,(e=n,o=new RegExp("("+".jpg,.jpeg,.png,.gif".split(/\s*,\s*/).join("|")+")$","i"),H(J(e),function(t){return o.test(t.name)}))),Uo(t,ly,{name:r.name})},c=Zg({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:Ka([$m("input-file-events",[er(mo()),er(ko())])])}),t=r.label.map(function(t){return fy(t,n)}),s=oy.parts().field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:Ka([SS([]),fS(),Dh.config({}),gg.config({toggleClass:"dragenter",toggleOnExecute:!1}),$m("dropzone-events",[$o("dragenter",o([e,gg.toggle])),$o("dragleave",o([e,gg.toggle])),$o("dragover",e),$o("drop",o([e,i])),$o(lo(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:n.translate("Drop an image here")}},Qg.sketch({dom:{tag:"button",innerHtml:n.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:Ka([uy.config({}),ov(n.isReadOnly),nv()])})]}]}}}});return ay(t,s,["tox-form__group--stretched"],[])},CS=Wr("alloy-fake-before-tabstop"),OS=Wr("alloy-fake-after-tabstop"),_S=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:Ka([eg.config({ignore:!0}),uy.config({})])}},TS=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[_S([CS]),t,_S([OS])],behaviours:Ka([dS(1)])}},ES=function(t,n){Uo(t,co(),{raw:{which:9,shiftKey:n}})},BS=function(t,n){var e=n.element();Oi(e,CS)?ES(t,!0):Oi(e,OS)&&ES(t,!1)},DS=function(t){return Ab(t,["."+CS,"."+OS].join(","),at(!1))},MS=!(ze().browser.isIE()||ze().browser.isEdge()),AS=function(t,n){var o,r,e=MS&&t.sandboxed,i=et(et({},t.label.map(function(t){return{title:t}}).getOr({})),e?{sandbox:"allow-scripts allow-same-origin"}:{}),u=(o=e,r=se(""),{getValue:function(t){return r.get()},setValue:function(t,n){if(o)Fr(t.element(),"srcdoc",n);else{Fr(t.element(),"src","javascript:''");var e=t.element().dom().contentWindow.document;e.open(),e.write(n),e.close()}r.set(n)}}),a=t.label.map(function(t){return fy(t,n)}),c=oy.parts().field({factory:{sketch:function(t){return TS({uid:t.uid,dom:{tag:"iframe",attributes:i},behaviours:Ka([uy.config({}),eg.config({}),xS(st.none(),u.getValue,u.setValue)])})}}});return ay(a,c,["tox-form__group--stretched"],[])};function FS(t,n){return VS(nt.document.createElement("canvas"),t,n)}function IS(t){var n=FS(t.width,t.height);return RS(n).drawImage(t,0,0),n}function RS(t){return t.getContext("2d")}function VS(t,n,e){return t.width=n,t.height=e,t}function PS(t){return t.naturalWidth||t.width}function HS(t){return t.naturalHeight||t.height}var zS,NS,LS,jS=window.Promise?window.Promise:(NS=(zS=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=[],KS(t,US(GS,this),US(XS,this))}).immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){nt.setTimeout(t,1)},LS=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},zS.prototype["catch"]=function(t){return this.then(null,t)},zS.prototype.then=function(e,o){var r=this;return new zS(function(t,n){WS.call(r,new qS(e,o,t,n))})},zS.all=function(){for(var t=[],n=0;n").css({position:"absolute",top:0,left:0,width:e.width,height:e.height,zIndex:2147483647,opacity:1e-4,cursor:n}).appendTo(f.body),gC(f).on("mousemove touchmove",d).on("mouseup touchend",m),r.start(t)})}var wC=0,SC=function(s,e,f,o,r){var n,i="tox-",u="tox-crid-"+wC++,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"}],c=["top","right","bottom","left"],l=function(t,n){return{x:n.x+t.x,y:n.y+t.y,w:n.w,h:n.h}},d=function(t,n){return{x:n.x-t.x,y:n.y-t.y,w:n.w,h:n.h}};function m(t,n,e,o){var r,i,u,a,c;r=n.x,i=n.y,u=n.w,a=n.h,r+=e*t.deltaX,i+=o*t.deltaY,(u+=e*t.deltaW)<20&&(u=20),(a+=o*t.deltaH)<20&&(a=20),c=s=pC.clamp({x:r,y:i,w:u,h:a},f,"move"===t.name),c=d(f,c),v.fire("updateRect",{rect:c}),h(c)}function g(n){function t(t,n){n.h<0&&(n.h=0),n.w<0&&(n.w=0),gC("#"+u+"-"+t,o).css({left:n.x,top:n.y,width:n.w,height:n.h})}vC.each(a,function(t){gC("#"+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)}function p(t){g(s=t)}function h(t){p(l(f,t))}!function b(){gC('
').appendTo(o),vC.each(c,function(t){gC("#"+u,o).append('