/** * 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.10.7 (2022-12-06) */ !function(){"use strict";function t(o){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)===o;var e,n}}function e(e){return function(t){return typeof t===e}}function n(e){return function(t){return e===t}}function g(t){return null==t}function f(t,e){if(c(t)){for(var n=0,o=t.length;n=e.length&&t.substr(n,n+e.length)===e}function ut(t,e){return-1!==t.indexOf(e)}function at(t){return 0 "+o.toString()},function(t,e){return"state("+t+")"})}).join("\n")+"}"}}},Qo=r(eo,$o),Zo=rt(Jo),tr=oo(u,"number"),er=oo(y,"string"),nr=oo(w,"boolean"),or=oo(S,"function"),rr=function(e){if(Object(e)!==e)return!0;switch({}.toString.call(e).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(e).every(function(t){return rr(e[t])});default:return!1}},ir=Jn(function(t){return rr(t)?Lo(t):zo("Expected value to be acceptable for sending via postMessage")}),ur=function(t){return"Errors: \n"+B(10<(e=t.errors).length?e.slice(0,10).concat([{path:[],getErrorInfo:rt("... (only showing first ten failures)")}]):e,function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}).join("\n")+"\n\nInput object: "+qn(t.input);var e},ar=Ln,cr=function(t,e){return{tag:"custom",newKey:t,instantiator:e}};function sr(t,e){return(n={})[t]=e,n;var n}function lr(t){return e={},St(t,function(t){e[t.key]=t.value}),e;var e}function fr(t){return S(t)?t:T}function dr(t,e,n){for(var o=t.dom,r=fr(n);o.parentNode;){var o=o.parentNode,i=Mt.fromDom(o),u=e(i);if(u.isSome())return u;if(r(i))break}return vt.none()}function mr(t,e,n){var o=e(t),r=fr(n);return o.orThunk(function(){return r(t)?vt.none():dr(t,e,r)})}function gr(t,e){return zt(t.element,e.event.target)}function pr(t){if(!et(t,"can")&&!et(t,"abort")&&!et(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return lt(lt({},ai),t)}function hr(t){return rt("alloy."+t)}function vr(t,e){eu(t,t.element,e,{})}function br(t,e,n){eu(t,t.element,e,n)}function yr(t){vr(t,Ii())}function xr(t,e,n){eu(t,e,n,{})}function wr(t,e,n,o){t.getSystem().triggerEvent(n,e,o.event)}function Sr(t,e){return{key:t,value:pr({abort:e})}}function kr(t){return{key:t,value:pr({run:function(t,e){e.event.prevent()}})}}function Cr(t,e){return{key:t,value:pr({run:e})}}function Or(t,n,o){return{key:t,value:pr({run:function(t,e){n.apply(void 0,[t,e].concat(o))}})}}function _r(t){return function(n){return{key:t,value:pr({run:function(t,e){gr(t,e)&&n(t,e)}})}}}function Tr(t,e,n){var o,r=e.partUids[n];return Cr(o=t,function(t,e){t.getSystem().getByUid(r).each(function(t){wr(t,t.element,o,e)})})}function Er(t,r){return Cr(t,function(e,t){var n=t.event,o=e.getSystem().getByDom(n.target).getOrThunk(function(){return mr(n.target,function(t){return e.getSystem().getByDom(t).toOptional()},T).getOr(e)});r(e,o,t)})}function Dr(t){return Cr(t,function(t,e){e.cut()})}function Ar(t,e){return _r(t)(e)}function Br(t){return t.dom.innerHTML}function Mr(t,e){var n,o,r=jt(t).dom,i=Mt.fromDom(r.createDocumentFragment());Be(i,(n=e,(o=(r||document).createElement("div")).innerHTML=n,Kt(Mt.fromDom(o)))),Me(t),Tn(t,i)}function Fr(t){if(Zt(t))return"#shadow-root";var e=Mt.fromDom(t.dom.cloneNode(!1)),n=Mt.fromTag("div"),o=Mt.fromDom(e.dom.cloneNode(!0));return Tn(n,o),Br(n)}function Ir(t){var e=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++su+String(e)}function Rr(t){var e=Ge(t)?t.dom[mu]:null;return vt.from(e)}function Nr(e){function n(t){return"The component must be in a context to execute: "+t+(e?"\n"+Fr(e().element)+" is not in context.":"")}function t(t){return function(){throw new Error(n(t))}}function o(t){return function(){console.warn(n(t))}}return{debugInfo:rt("fake"),triggerEvent:o("triggerEvent"),triggerFocus:o("triggerFocus"),triggerEscape:o("triggerEscape"),broadcast:o("broadcast"),broadcastOn:o("broadcastOn"),broadcastEvent:o("broadcastEvent"),build:t("build"),addToWorld:t("addToWorld"),removeFromWorld:t("removeFromWorld"),addToGui:t("addToGui"),removeFromGui:t("removeFromGui"),getByUid:t("getByUid"),getByDom:t("getByDom"),isConnected:T}}function Pr(t,e){var n=t.toString(),o=n.indexOf(")")+1,r=n.indexOf("("),i=n.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:bu(i)}},t}function Vr(t){return sr(yu,t)}function Hr(o){return t=function(t){for(var e=[],n=1;n "):r[0].name;return sr(u,{handler:n,purpose:o})})});return e={},n=[],o=[],St(c,function(t){t.fold(function(t){n.push(t)},function(t){o.push(t)})}),0<(u={errors:n,values:o}).errors.length?Nn.error(ft(u.errors)):(i=e,0===(r=u.values).length?Nn.value(i):Nn.value(Yo(i,qo.apply(void 0,r))))},ku="alloy.base.behaviour",Cu=$o([ar("dom","dom",jn(),$o([mo("tag"),Eo("styles",{}),Eo("classes",[]),Eo("attributes",{}),wo("value"),wo("innerHtml")])),mo("components"),mo("uid"),Eo("events",{}),Eo("apis",{}),ar("eventOrder","eventOrder",((ui={})[Ii()]=["disabling",ku,"toggling","typeaheadevents"],ui[Ai()]=[ku,"focusing","keying"],ui[Li()]=[ku,"disabling","toggling","representing"],ui[Si()]=[ku,"representing","streaming","invalidating"],ui[Xi()]=[ku,"representing","item-events","tooltipping"],ui[mi()]=["focusing",ku,"item-type-events"],ui[si()]=["focusing",ku,"item-type-events"],ui[vi()]=["item-type-events","tooltipping"],ui[Fi()]=["receiving","reflecting","tooltipping"],Yn(rt(ui))),Zo()),wo("domModification")]),Ou=function(t){var e=so("external.component",to([mo("element"),wo("uid")]),t),n=Po(Nr()),o=e.uid.getOrThunk(function(){return pu("external")});gu(e.element,o);var r={uid:o,getSystem:n.get,config:vt.none,hasConfigured:T,connect:function(t){n.set(t)},disconnect:function(){n.set(Nr(function(){return r}))},getApis:function(){return{}},element:e.element,spec:t,readState:rt("No state"),syncComponents:st,components:rt([]),events:{}};return Vr(r)},_u=pu,Tu=function(t){return tt(t,yu).getOrThunk(function(){return oi(Tt(t,"uid")?t:lt({uid:_u("")},t)).getOrDie()})},Eu=Vr;function Du(t,e,n,o,r){return t(n,o)?vt.some(n):S(r)&&r(n)?vt.none():e(n,o,r)}function Au(t,e,n){for(var o=t.dom,r=S(n)?n:T;o.parentNode;){var o=o.parentNode,i=Mt.fromDom(o);if(e(i))return vt.some(i);if(r(i))break}return vt.none()}function Bu(t,e,n){return Du(function(t,e){return e(t)},Au,t,e,n)}function Mu(t,e,n){return Bu(t,e,n).isSome()}function Fu(t,e,n){return Au(t,function(t){return Ht(t,e)},n)}function Iu(t,e){return n=e,Lt(o=void 0===t?document:t.dom)?vt.none():vt.from(o.querySelector(n)).map(Mt.fromDom);var n,o}function Ru(t,e,n){return Du(Ht,Fu,t,e,n)}function Nu(){var e=Ir("aria-owns");return{id:e,link:function(t){oe(t,"aria-owns",e)},unlink:function(t){ce(t,"aria-owns")}}}var Pu,Vu,Hu=function(e,t){return Mu(t,function(t){return zt(t,e.element)},T)||(n=e,Bu(t,function(t){if(!Ge(t))return!1;var e=ie(t,"id");return void 0!==e&&-1"}),Zo()),jf=cr("schema",function(){return[wo("preprocess")]}),Wf=Eo("defaults",rt({})),Gf=Eo("overrides",rt({})),Xf=$o([Hf,Lf,zf,Uf,Wf,Gf]),Yf=$o([Hf,Lf,zf,Wf,Gf]),qf=$o([Hf,Lf,zf,Uf,Wf,Gf]),Kf=$o([Hf,jf,zf,mo("unit"),Uf,Wf,Gf]),Jf=il(Vf.required,Xf),$f=il(Vf.external,Yf),Qf=il(Vf.optional,qf),Zf=il(Vf.group,Kf),td=rt("entirety"),ed=Object.freeze({__proto__:null,required:Jf,external:$f,optional:Qf,group:Zf,asNamedPart:ol,name:rl,asCommon:function(t){return t.fold(h,h,h,h)},original:td}),nd=function(t,e){return{uiType:Pf(),owner:t,name:e}},od=Object.freeze({__proto__:null,generate:al,generateOne:cl,schemas:sl,names:ll,substitutes:fl,components:dl,defaultUids:yl,defaultUidsSchema:xl,getAllParts:hl,getAllPartNames:vl,getPart:ml,getPartOrDie:gl,getParts:pl,getPartsOrDie:bl}),rd=function(t){return Tt(t,"uid")?t:lt(lt({},t),{uid:pu("uid")})},id=to([mo("name"),mo("factory"),mo("configFields"),Eo("apis",{}),Eo("extraApis",{})]),ud=to([mo("name"),mo("factory"),mo("configFields"),mo("partFields"),Eo("apis",{}),Eo("extraApis",{})]),ad=Object.freeze({__proto__:null,getCurrent:function(t,e,n){return e.find(t)}}),cd=xa({fields:[mo("find")],name:"composing",apis:ad}),sd=["input","button","textarea","select"],ld=function(e,t,n){t.disableClass.each(function(t){Yr(e.element,t)}),(Tl(e,t)?function(t){oe(t.element,"disabled","disabled")}:function(t){oe(t.element,"aria-disabled","true")})(e),t.onDisabled(e)},fd=function(e,t,n){t.disableClass.each(function(t){qr(e.element,t)}),(Tl(e,t)?function(t){ce(t.element,"disabled")}:function(t){oe(t.element,"aria-disabled","false")})(e),t.onEnabled(e)},dd=Object.freeze({__proto__:null,enable:fd,disable:ld,isDisabled:El,onLoad:_l,set:function(t,e,n,o){(o?ld:fd)(t,e)}}),md=Object.freeze({__proto__:null,exhibit:function(t,e){return zr({classes:e.disabled()?e.disableClass.toArray():[]})},events:function(n,t){return nu([Sr(Ii(),function(t,e){return El(t,n)}),ba(n,t,_l)])}}),gd=xa({fields:[Io("disabled",T),Eo("useNative",!0),wo("disableClass"),Ju("onDisabled"),Ju("onEnabled")],name:"disabling",active:md,apis:dd}),pd=Object.freeze({__proto__:null,dehighlightAll:function(t,e,n){return Dl(t,e,0,[])},dehighlight:function(t,e,n,o){Yl(0,e,0,o)&&(qr(o.element,e.highlightClass),e.onDehighlight(t,o),vr(o,tu()))},highlight:Al,highlightFirst:function(e,n,t){ql(e,n).each(function(t){Al(e,n,0,t)})},highlightLast:function(e,n,t){Kl(e,n).each(function(t){Al(e,n,0,t)})},highlightAt:function(e,n,t,o){var r,i,u;i=o,u=vs((r=e).element,"."+n.itemClass),vt.from(u[i]).fold(function(){return Nn.error(new Error("No element found with index "+i))},r.getSystem().getByDom).fold(function(t){throw t},function(t){Al(e,n,0,t)})},highlightBy:function(e,n,t,o){N(Jl(e,n),o).each(function(t){Al(e,n,0,t)})},isHighlighted:Yl,getHighlighted:function(e,t,n){return Iu(e.element,"."+t.highlightClass).bind(function(t){return e.getSystem().getByDom(t).toOptional()})},getFirst:ql,getLast:Kl,getPrevious:function(t,e,n){return Bl(t,e,0,-1)},getNext:function(t,e,n){return Bl(t,e,0,1)},getCandidates:Jl}),hd=xa({fields:[mo("highlightClass"),mo("itemClass"),Ju("onHighlight"),Ju("onDehighlight")],name:"highlighting",apis:pd}),vd=[8],bd=[9],yd=[13],xd=[27],wd=[32],Sd=[37],kd=[38],Cd=[39],Od=[40],_d=O(Vl);function Td(t,e,n,o,a){function c(e,n,t,o,r){var i=t(e,n,o,r),u=n.event;return N(i,function(t){return t.matches(u)}).map(function(t){return t.classification}).bind(function(t){return t(e,n,o,r)})}var r={schema:function(){return t.concat([Eo("focusManager",Ul()),Do("focusInside","onFocus",io(function(t){return wt(["onFocus","onEnterOrSpace","onApi"],t)?Nn.value(t):Nn.error("Invalid value for focusInside")})),ta("handler",r),ta("state",e),ta("sendFocusIn",a)])},processKey:c,toEvents:function(i,u){var t=i.focusInside!==Zl.OnFocusMode?vt.none():a(i).map(function(n){return Cr(Ai(),function(t,e){n(t,i,u),e.stop()})}),e=[Cr(xi(),function(o,r){c(o,r,n,i,u).fold(function(){var e=o,n=r,t=Nl(wd.concat(yd))(n.event);i.focusInside===Zl.OnEnterOrSpaceMode&&t&&gr(e,n)&&a(i).each(function(t){t(e,i,u),n.stop()})},function(t){r.stop()})}),Cr(wi(),function(t,e){c(t,e,o,i,u).each(function(t){e.stop()})})];return nu(t.toArray().concat(e))}};return r}function Ed(t){function a(t,e){return 0',n.getDoc());return Tn(t,Mt.fromDom(e.extractContents())),e.insertNode(t.dom),Yt(t).each(function(t){return t.dom.normalize()}),i=hs,(u=function(t){for(var e=Kt(t),n=e.length-1;0<=n;n--){var o=e[n];if(i(o))return vt.some(o);var r=u(o);if(r.isSome())return r}return vt.none()})(t).map(function(t){var e;n.selection.setCursorLocation(t.dom,"img"===Ft(e=t)?1:ps(e).fold(function(){return Kt(e).length},function(t){return t.length}))}),t})}function xp(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")}function wp(t){return""!==t&&-1!==" \xa0\f\n\r\t\v".indexOf(t)}function Sp(t,e){return t.substring(e.length)}function kp(o,t,r,e){return void 0===e&&(e=0),Bp(Mt.fromDom(t.startContainer)).fold(function(){return function(t,o,i,r){if(void 0===r&&(r=0),!o.collapsed||3!==o.startContainer.nodeType)return vt.none();var e=t.getParent(o.startContainer,t.isBlock)||t.getRoot();return bp(t,o.startContainer,o.startOffset,function(t,r,e){return function(t,e){for(var n=r-1;0<=n;n--){var o=t.charAt(n);if(wp(o))return vt.none();if(o===e)break}return vt.some(n)}(e,i).getOr(r)},e).bind(function(t){var e=o.cloneRange();if(e.setStart(t.container,t.offset),e.setEnd(o.endContainer,o.endOffset),e.collapsed)return vt.none();var n=xp(e);return 0!==n.lastIndexOf(i)||Sp(n,i).length=t.minChars&&t.matches.getOrThunk(function(){return n=e.dom,function(t){var e=Ip(t.startContainer,t.startOffset);return!bp(n,e.container,e.offset,function(t,e){return 0===e?-1:e},n.getRoot()).filter(function(t){return!wp(t.container.data.charAt(t.offset-1))}).isSome()};var n})(n.range,i,n.text)});if(0===u.length)return vt.none();var a=Mp.all(B(u,function(e){return e.fetch(n.text,e.maxResults,o).then(function(t){return{matchText:n.text,items:t,columns:e.columns,onAction:e.onAction,highlightOn:e.highlightOn}})}));return vt.some({lookupData:a,context:n})}var Ep,Dp,Ap=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),Bp=function(t){return Ru(t,"[data-mce-autocompleter]")},Mp=tinymce.util.Tools.resolve("tinymce.util.Promise"),Fp=function(t){if(3===t.nodeType)return Cp(t,t.data.length);var e=t.childNodes;return 0o}).getOr(r.length);return vt.some({numColumns:n,numRows:Math.ceil(r.length/n)})}return vt.none()}function ch(t,e,n){t.getSystem().broadcastOn([Jh],{})}function sh(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))}function lh(t){return t.getParam("width",nv.DOM.getStyle(t.getElement(),"width"))}function fh(t){return vt.from(t.getParam("min_width")).filter(u)}function dh(t){return vt.from(t.getParam("min_height")).filter(u)}function mh(t){return vt.from(t.getParam("max_width")).filter(u)}function gh(t){return vt.from(t.getParam("max_height")).filter(u)}function ph(t){return!1!==t.getParam("menubar",!0,"boolean")}function hh(t){var e=t.getParam("toolbar",!0),n=!0===e,o=y(e),r=c(e)&&0'+t+""})}return o}function Bv(t){return{value:t}}function Mv(t){return rb.test(t)||ib.test(t)}function Fv(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()}function Iv(t){return Bv(Fv(t.red)+Fv(t.green)+Fv(t.blue))}function Rv(t,e,n,o){return{red:t,green:e,blue:n,alpha:o}}function Nv(t){var e=parseInt(t,10);return e.toString()===t&&0<=e&&e<=255}function Pv(t){var e,n,o,r=(t.hue||0)%360,i=t.saturation/100,u=t.value/100,i=ab(0,ub(i,1)),u=ab(0,ub(u,1));if(0===i)return Rv(e=n=o=cb(255*u),n,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:e=c,n=s,o=0;break;case 1:e=s,n=c,o=0;break;case 2:e=0,n=c,o=s;break;case 3:e=0,n=s,o=c;break;case 4:e=s,n=0,o=c;break;case 5:e=c,n=0,o=s;break;default:e=n=o=0}return Rv(e=cb(255*(e+l)),n=cb(255*(n+l)),o=cb(255*(o+l)),1)}function Vv(t){var e,n,o=(e={value:t.value.replace(rb,function(t,e,n,o){return e+e+n+n+o+o})},null===(n=ib.exec(e.value))?["FFFFFF","FF","FF","FF"]:n);return Rv(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16),1)}function Hv(t,e,n,o){return Rv(parseInt(t,10),parseInt(e,10),parseInt(n,10),parseFloat(o))}function Lv(t){if("transparent"===t)return vt.some(Rv(0,0,0,0));var e=sb.exec(t);if(null!==e)return vt.some(Hv(e[1],e[2],e[3],"1"));var n=lb.exec(t);return null!==n?vt.some(Hv(n[1],n[2],n[3],n[4])):vt.none()}function zv(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"}function Uv(t,e){return t.fire("ResizeContent",e)}function jv(t,e,n){return{hue:t,saturation:e,value:n}}function Wv(t){var e,n,o=0,r=t.red/255,i=t.green/255,u=t.blue/255,a=Math.min(r,Math.min(i,u)),c=Math.max(r,Math.max(i,u));return a===c?jv(0,0,100*(o=a)):(n=60*((r===a?3:u===a?1:5)-(r===a?i-u:u===a?r-i:u-r)/(c-a)),e=(c-a)/c,o=c,jv(Math.round(n),Math.round(100*e),Math.round(100*o)))}function Gv(t){return Iv(Pv(t))}function Xv(o){return(Mv(e=o)?vt.some({value:(Dt(t=e,"#")?t.substring("#".length):t).toUpperCase()}):vt.none()).orThunk(function(){return Lv(o).map(Iv)}).getOrThunk(function(){var t=document.createElement("canvas");t.height=1,t.width=1;var e=t.getContext("2d");e.clearRect(0,0,t.width,t.height),e.fillStyle="#FFFFFF",e.fillStyle=o,e.fillRect(0,0,1,1);var n=e.getImageData(0,0,1,1).data;return Iv(Rv(n[0],n[1],n[2],n[3]))});var t,e}(yh=bh=bh||{}).default="wrap",yh.floating="floating",yh.sliding="sliding",yh.scrolling="scrolling",(wh=xh=xh||{}).auto="auto",wh.top="top",wh.bottom="bottom";function Yv(t){return gd.config({disabled:t,disableClass:"tox-tbtn--disabled"})}var qv,Kv="silver.readonly",Jv=$o([go("readonly",nr)]),$v=function(t){return gd.config({disabled:t})},Qv=function(t){return gd.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},Zv=((qv={})[Ii()]=["disabling","alloy.base.behaviour","toggling","item-events"],qv),tb=nt,eb=tinymce.util.Tools.resolve("tinymce.Env"),nb=function(t,a){return B(t,function(t){switch(t.type){case"cardcontainer":return r=nb((o=t).items,a),i="vertical"===o.direction?"tox-collection__item-container--column":Fh,u="left"===o.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right",{dom:{tag:"div",classes:[Mh,i,u,function(){switch(o.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:r};case"cardimage":return n=t.src,{dom:{tag:"img",classes:t.classes,attributes:{src:n,alt:t.alt.getOr("")}}};case"cardtext":var e=t.name.exists(function(t){return wt(a.cardText.highlightOn,t)})?vt.from(a.cardText.matchText).getOr(""):"";return kv(Av(t.text,e),t.classes)}var n,o,r,i,u})},ob=al(qg(),Kg()),rb=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,ib=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ub=Math.min,ab=Math.max,cb=Math.round,sb=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,lb=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,fb=Rv(255,0,0,1),db=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),mb="tinymce-custom-colors";function gb(t){return!1!==t.getParam("custom_colors")}function pb(t){var e=t.getParam("color_map");return void 0!==e?function(t){for(var e=[],n=0;nn&&i.pop(),db.setItem(mb,JSON.stringify(i))},state:function(){return i.slice(0)}}}(10),Fb="#000000",Ib=function(r){return function(n,t){var o=!1;r.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{colorpicker:t},onAction:function(t,e){"hex-valid"===e.name&&(o=e.value)},onSubmit:function(t){var e=t.getData().colorpicker;o?(n(vt.from(e)),t.close()):r.windowManager.alert(r.translate(["Invalid hex color code: {0}",e]))},onClose:st,onCancel:function(){n(vt.none())}})}},Rb=function(n,o,r,i,u,a,c){return nt(B(n,function(e){return"choiceitem"===e.type?ao("choicemenuitem",jh,e).fold(rh,function(t){return vt.some(function(e,t,n,o,r,i,u,a){void 0===a&&(a=!0);var c=Ev({presets:n,textContent:t?e.text:vt.none(),htmlContent:vt.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:t?e.shortcut:vt.none(),checkMark:t?vt.some(_v(u.icons)):vt.none(),caret:vt.none(),value:e.value},u,a);return Yo(yv({data:xv(e),disabled:e.disabled,getApi:function(e){return{setActive:function(t){zg.set(e,t)},isActive:function(){return zg.isOn(e)},isDisabled:function(){return gd.isDisabled(e)},setDisabled:function(t){return gd.set(e,t)}}},onAction:function(t){return o(e.value)},onSetup:function(t){return t.setActive(r),st},triggersSubmenu:!1,itemBehaviours:[]},c,i,u),{toggling:{toggleClass:Th,toggleOnExecute:!1,selected:e.active}})}(t,1===r,i,o,a(e.value),u,c,oh(n)))}):vt.none()}))},Nb=Ir("cell-over"),Pb=Ir("cell-execute"),Vb={inserttable:function(u){var t=Ir("size-label"),a=function(t){for(var e=[],n=0;n<10;n++){for(var o=[],r=0;r<10;r++)o.push(function(e,n,t){function o(t){return br(t,Pb,{row:e,col:n})}function r(t,e){e.stop(),o(t)}var i;return Tu({dom:{tag:"div",attributes:((i={role:"button"})["aria-labelledby"]=t,i)},behaviours:ec([mm("insert-table-picker-cell",[Cr(vi(),Vg.focus),Cr(Ii(),o),Cr(Ci(),r),Cr(Ni(),r)]),zg.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Vg.config({onFocus:function(t){return br(t,Nb,{row:e,col:n})}})])})}(n,r,t));e.push(o)}return e}(t),e=Tb(0,0),c=Hm({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:t}},components:[e],behaviours:ec([Rg.config({})])});return{type:"widget",data:{value:Ir("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[ob.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:H(a,function(t){return B(t,Eu)}).concat(c.asSpec()),behaviours:ec([mm("insert-table-picker",[ou(function(t){Rg.set(c.get(t),[e])}),Er(Nb,function(t,e,n){var o=n.event,r=o.row,i=o.col;!function(t,e,n){for(var o=0;o<10;o++)for(var r=0;r<10;r++)zg.set(t[o][r],o<=e&&r<=n)}(a,r,i),Rg.set(c.get(t),[Tb(r+1,i+1)])}),Er(Pb,function(t,e,n){var o=n.event,r=o.row,i=o.col;u.onAction({numRows:r+1,numColumns:i+1}),vr(t,Vi())})]),Fg.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(e,t){var n,o,r,i=(o=t,r=(n=e).initData.allowCustomColors&&o.colorinput.hasCustomColors(),n.initData.colors.fold(function(){return xb(o.colorinput.getColors(),r)},function(t){return t.concat(bb(r))})),u=t.colorinput.getColorCols(),a=Ob(Ir("menu-value"),i,function(t){e.onAction({value:t})},u,"color",Sh.CLOSE_ON_EXECUTE,T,t.shared.providers),c=lt(lt({},a),{markers:Qp("color"),movement:_b(u,"color")});return{type:"widget",data:{value:Ir("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[ob.widget(tp.sketch(c))]}}},Hb=function(t){var e=t.text.fold(function(){return{}},function(t){return{innerHtml:t}});return{type:"separator",dom:lt({tag:"div",classes:[Ch,"tox-collection__group-heading"]},e),components:[]}},Lb=function(t,e,n,o){void 0===o&&(o=!0);var r=Ev({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:vt.none(),ariaLabel:t.text,caret:vt.none(),checkMark:vt.none(),shortcutContent:t.shortcut},n,o);return yv({data:xv(t),getApi:function(e){return{isDisabled:function(){return gd.isDisabled(e)},setDisabled:function(t){return gd.set(e,t)}}},disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,e,n)},zb=function(t,e,n,o,r){void 0===o&&(o=!0);var i=(r=void 0!==r&&r)?wv("chevron-down",n.icons,[Ah]):wv("chevron-right",n.icons,[Ah]),u=Ev({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:vt.none(),ariaLabel:t.text,caret:vt.some(i),checkMark:vt.none(),shortcutContent:t.shortcut},n,o);return yv({data:xv(t),getApi:function(e){return{isDisabled:function(){return gd.isDisabled(e)},setDisabled:function(t){return gd.set(e,t)}}},disabled:t.disabled,onAction:st,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},u,e,n)},Ub=function(t,e,n,o){void 0===o&&(o=!0);var r=Ev({iconContent:t.icon,textContent:t.text,htmlContent:vt.none(),ariaLabel:t.text,checkMark:vt.some(_v(n.icons)),caret:vt.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},n,o);return Yo(yv({data:xv(t),disabled:t.disabled,getApi:function(e){return{setActive:function(t){zg.set(e,t)},isActive:function(){return zg.isOn(e)},isDisabled:function(){return gd.isDisabled(e)},setDisabled:function(t){return gd.set(e,t)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,e,n),{toggling:{toggleClass:Th,toggleOnExecute:!1,selected:t.active}})},jb=function(e,n){return tt(Vb,e.fancytype).map(function(t){return t(e,n)})};function Wb(t,u,a,e,c,s,l){var n=1===e,o=!n||oh(t);return nt(B(t,function(t){switch(t.type){case"separator":return ao("Autocompleter.Separator",Rp,t).fold(rh,function(t){return vt.some(Hb(t))});case"cardmenuitem":return ao("cardmenuitem",Uh,t).fold(rh,function(e){return vt.some((t=lt(lt({},e),{onAction:function(t){e.onAction(t),a(e.value,e.meta)}}),n=c,o=s,r={itemBehaviours:Dv(e.meta,s),cardText:{matchText:u,highlightOn:l}},i={dom:Tv(t.label),optComponents:[vt.some({dom:{tag:"div",classes:[Mh,Fh]},components:nb(t.items,r)})]},yv({data:xv(lt({text:vt.none()},t)),disabled:t.disabled,getApi:function(n){return{isDisabled:function(){return gd.isDisabled(n)},setDisabled:function(e){gd.set(n,e),St(vs(n.element,"*"),function(t){n.getSystem().getByDom(t).each(function(t){t.hasConfigured(gd)&&gd.set(t,e)})})}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:vt.from(r.itemBehaviours).getOr([])},i,n,o.providers)));var t,n,o,r,i});default:return ao("Autocompleter.Item",Np,t).fold(rh,function(t){return vt.some(function(e,n,t,o,r,i,u,a){void 0===a&&(a=!0);var c=Ev({presets:o,textContent:vt.none(),htmlContent:t?e.text.map(function(t){return Av(t,n)}):vt.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:vt.none(),checkMark:vt.none(),caret:vt.none(),value:e.value},u.providers,a,e.icon);return yv({data:xv(e),disabled:e.disabled,getApi:rt({}),onAction:function(t){return r(e.value,e.meta)},onSetup:rt(st),triggersSubmenu:!1,itemBehaviours:Dv(e.meta,u)},c,i,u.providers)}(t,u,n,"normal",a,c,s,o))})}}))}function Gb(t,e,n,o,r){var i=oh(e),u=nt(B(e,function(t){function e(t){return function(t,e,n,o,r){function i(t){return r?lt(lt({},t),{shortcut:vt.none(),icon:t.text.isSome()?vt.none():t.icon}):t}var u=n.shared.providers;switch(t.type){case"menuitem":return ao("menuitem",Xh,t).fold(rh,function(t){return vt.some(Lb(i(t),e,u,o))});case"nestedmenuitem":return ao("nestedmenuitem",Yh,t).fold(rh,function(t){return vt.some(zb(i(t),e,u,o,r))});case"togglemenuitem":return ao("togglemenuitem",qh,t).fold(rh,function(t){return vt.some(Ub(i(t),e,u,o))});case"separator":return ao("separatormenuitem",Rp,t).fold(rh,function(t){return vt.some(Hb(t))});case"fancymenuitem":return ao("fancymenuitem",Gh,t).fold(rh,function(t){return jb(i(t),n)});default:return console.error("Unknown item in general menu",t),vt.none()}}(t,n,o,r?!Tt(t,"text"):i,r)}return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?e(lt(lt({},t),{disabled:!0})):e(t)}));return(r?ih:uh)(t,i,u,1,"normal")}function Xb(t){return ip.singleData(t.value,t)}function Yb(t,e,n){return Ru(t,e,n).isSome()}function qb(n,o){var r=null;return{cancel:function(){null!==r&&(clearTimeout(r),r=null)},schedule:function(){for(var t=[],e=0;e"}function u0(f,d,m,g){function p(t,e,n,o,r){var i,u,a=f(uS+"range"),c=[my.parts.label({dom:{tag:"label",innerHtml:n,attributes:{"aria-label":o}}}),my.parts.field({data:r,factory:Dy,inputAttributes:lt({type:"text"},"hex"===e?{"aria-live":"polite"}:{}),inputClasses:[d("textfield")],inputBehaviours:ec([(i=e,u=t,Ky.config({invalidClass:d("invalid"),notify:{onValidate:function(t){br(t,iS,{type:i})},onValid:function(t){br(t,oS,{type:i,value:Df.getValue(t)})},onInvalid:function(t){br(t,rS,{type:i,value:Df.getValue(t)})}},validator:{validate:function(t){var e=Df.getValue(t),n=u(e)?Nn.value(!0):Nn.error(f("aria.input.invalid"));return Gy(n)},validateOnLoad:!1}})),py.config({})]),onSetValue:function(t){Ky.isInvalid(t)&&Ky.run(t).get(st)}})],s="hex"!==e?[my.parts["aria-descriptor"]({text:a})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:c.concat(s)}}function h(t,e){var n=e.red,o=e.green,r=e.blue;Df.setValue(t,{red:n,green:o,blue:r})}function v(t,e){b.getOpt(t).each(function(t){fe(t.element,"background-color","#"+e.value)})}var b=Hm({dom:{tag:"div",classes:[d("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}});return kl({factory:function(){function a(t){return o[t].get()}function c(t,e){o[t].set(e)}function e(t,e){var n=e.event;"hex"!==n.type?c(n.type,vt.none()):g(t)}function n(t,e){var r,n,o,i,u=e.event;"hex"===u.type?function(t,e){m(t);var n=Bv(e);c("hex",vt.some(e));var o=Vv(n);h(t,o),s(o),br(t,Qw,{hex:n}),v(t,n)}(t,u.value):(r=t,n=u.type,o=u.value,i=parseInt(o,10),c(n,vt.some(i)),a("red").bind(function(n){return a("green").bind(function(e){return a("blue").map(function(t){return Rv(n,e,t,1)})})}).each(function(t){var e,n,o=(e=r,n=Iv(t),nS.getField(e,"hex").each(function(t){Vg.isFocused(t)||Df.setValue(e,{hex:n.value})}),n);br(r,Qw,{hex:o}),v(r,o)}))}function t(t){return{label:f(uS+t+".label"),description:f(uS+t+".description")}}function s(t){var e=t.red,n=t.green,o=t.blue;c("red",vt.some(e)),c("green",vt.some(n)),c("blue",vt.some(o))}var o={red:Po(vt.some(255)),green:Po(vt.some(255)),blue:Po(vt.some(255)),hex:Po(vt.some("ffffff"))},r=t("red"),i=t("green"),u=t("blue"),l=t("hex");return Yo(nS.sketch(function(t){return{dom:{tag:"form",classes:[d("rgb-form")],attributes:{"aria-label":f("aria.color.picker")}},components:[t.field("red",my.sketch(p(Nv,"red",r.label,r.description,255))),t.field("green",my.sketch(p(Nv,"green",i.label,i.description,255))),t.field("blue",my.sketch(p(Nv,"blue",u.label,u.description,255))),t.field("hex",my.sketch(p(Mv,"hex",l.label,l.description,"ffffff"))),b.asSpec()],formBehaviours:ec([Ky.config({invalidClass:d("form-invalid")}),mm("rgb-form-events",[Cr(oS,n),Cr(rS,e),Cr(iS,e)])])}}),{apis:{updateHex:function(t,e){var n;Df.setValue(t,{hex:e.value}),h(t,n=Vv(e)),s(n),v(t,e)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,e,n){t.updateHex(e,n)}},extraApis:{}})}function a0(x,w){return kl({name:"ColourPicker",configFields:[mo("dom"),Eo("onValidHex",st),Eo("onInvalidHex",st)],factory:function(t){function e(t,e,n){v.getOpt(t).each(function(t){g.setHue(t,n)})}function n(t,e){b.getOpt(t).each(function(t){m.updateHex(t,e)})}function r(e,n,o,t){var r=o,i=Vv(n);p.paletteRgba.set(i),p.paletteHue.set(r),St(t,function(t){t(e,n,o)})}var o,i,u,a,c,s,l,f,d,m=u0(x,w,t.onValidHex,t.onInvalidHex),g=(l=w,f=$w.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[l("sv-palette-spectrum")]}}),d=$w.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[l("sv-palette-thumb")],innerHtml:"'}}),kl({factory:function(t){var e=rt({x:0,y:0}),n=ec([cd.config({find:vt.some}),Vg.config({})]);return $w.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[l("sv-palette")]},model:{mode:"xy",getInitialValue:e},rounded:!1,components:[f,d],onChange:function(t,e,n){br(t,tS,{value:n})},onInit:function(t,e,n,o){y(n.element.dom,zv(fb))},sliderBehaviours:n})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,e,n){var o=n;y(e.components()[0].element.dom,zv(Pv(jv(o,100,100))))},setThumb:function(t,e,n){var o=e,r=Wv(Vv(n));$w.setValue(o,{x:r.saturation,y:100-r.value})}},extraApis:{}})),p={paletteRgba:Po(fb),paletteHue:Po(0)},h=Hm((i=$w.parts.spectrum({dom:{tag:"div",classes:[(o=w)("hue-slider-spectrum")],attributes:{role:"presentation"}}}),u=$w.parts.thumb({dom:{tag:"div",classes:[o("hue-slider-thumb")],attributes:{role:"presentation"}}}),$w.sketch({dom:{tag:"div",classes:[o("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:rt({y:0})},components:[i,u],sliderBehaviours:ec([Vg.config({})]),onChange:function(t,e,n){br(t,Zw,{value:n})}}))),v=Hm(g.sketch({})),b=Hm(m.sketch({}));function y(t,e){var n,o,r=t.width,i=t.height,u=t.getContext("2d");null!==u&&(u.fillStyle=e,u.fillRect(0,0,r,i),(n=u.createLinearGradient(0,0,r,0)).addColorStop(0,"rgba(255,255,255,1)"),n.addColorStop(1,"rgba(255,255,255,0)"),u.fillStyle=n,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{uid:t.uid,dom:t.dom,components:[v.asSpec(),h.asSpec(),b.asSpec()],behaviours:ec([mm("colour-picker-events",[Cr(Qw,(s=[e,function(t,e,n){h.getOpt(t).each(function(t){$w.setValue(t,{y:100-n/360*100})})},function(t,e){v.getOpt(t).each(function(t){g.setThumb(t,e)})}],function(t,e){var n=e.event.hex;r(t,n,Wv(Vv(n)).hue,s)})),Cr(tS,(c=[n],function(t,e){var n=e.event.value,o=p.paletteHue.get();r(t,Gv(jv(o,n.x,100-n.y)),o,c)})),Cr(Zw,(a=[e,n],function(t,e){var n=(100-e.event.value.y)/100*360,o=Wv(p.paletteRgba.get());r(t,Gv(jv(n,o.saturation,o.value)),n,a)}))]),cd.config({find:function(t){return b.getOpt(t)}}),Fg.config({mode:"acyclic"})])}}})}function c0(t){return sS[t]}function s0(t,e,n){return Df.config(Yo({store:{mode:"manual",getValue:e,setValue:n}},t.map(function(t){return{store:{initialValue:t}}}).getOr({})))}function l0(r,i){function e(t,e){e.stop()}function n(t){return function(e,n){St(t,function(t){t(e,n)})}}function o(t,e){var n;gd.isDisabled(t)||(n=e.event.raw,a(t,n.dataTransfer.files))}function u(t,e){var n=e.event.raw.target;a(t,n.files)}function a(t,e){var n,o;Df.setValue(t,(n=e,o=fS.explode(i.getSetting("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string")),F(kt(n),function(e){return d(o,function(t){return At(e.name.toLowerCase(),"."+t.toLowerCase())})}))),br(t,yy,{name:r.name})}var c=Hm({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:ec([mm("input-file-events",[Dr(Ci()),Dr(Ni())])])});return ny(r.label.map(function(t){return oy(t,i)}),my.parts.field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:ec([pS([]),aw(),gd.config({}),zg.config({toggleClass:"dragenter",toggleOnExecute:!1}),mm("dropzone-events",[Cr("dragenter",n([e,zg.toggle])),Cr("dragleave",n([e,zg.toggle])),Cr("dragover",e),Cr("drop",n([e,o])),Cr(ki(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:i.translate("Drop an image here")}},fp.sketch({dom:{tag:"button",innerHtml:i.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:ec([py.config({}),$v(i.isDisabled),pv()])})]}]}}}}),["tox-form__group--stretched"],[])}function f0(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:ec([Vg.config({ignore:!0}),py.config({})])}}function d0(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[f0([hS]),t,f0([vS])],behaviours:ec([cS(1)])}}function m0(t,e){br(t,xi(),{raw:{which:9,shiftKey:e}})}function g0(t,e){var n=e.element;Kr(n,hS)?m0(t,!0):Kr(n,vS)&&m0(t,!1)}function p0(t){return Yb(t,["."+hS,"."+vS].join(","),T)}function h0(t,e){return xS(document.createElement("canvas"),t,e)}function v0(t){var e=h0(t.width,t.height);return yS(e).drawImage(t,0,0),e}function b0(t){return t.naturalWidth||t.width}function y0(t){return t.naturalHeight||t.height}function x0(t,o,r){return o=o||"image/png",S(HTMLCanvasElement.prototype.toBlob)?new Ly(function(e,n){t.toBlob(function(t){t?e(t):n()},o,r)}):(g=t.toDataURL(o,r),new Ly(function(t,e){!function(){var t=g.split(","),e=/data:([^;]+)/.exec(t[0]);if(!e)return vt.none();for(var n=e[1],o=t[1],r=atob(o),i=r.length,u=Math.ceil(i/1024),a=new Array(u),c=0;c",t)}).toArray(),dk("anchor",t.targets),vt.from(t.anchorBottom).map(function(t){return fk("",t)}).toArray()]))],function(t,e){return 0===t.length||0===e.length?t.concat(e):t.concat(h1,e)},[]):e})),Sh.BUBBLE_TO_SANDBOX,a,!1);return Gy(i)},getHotspot:function(t){return p.getOpt(t)},onSetValue:function(t,e){t.hasConfigured(Ky)&&Ky.run(t).get(st)},typeaheadBehaviours:ec(ft([c.getValidationHandler().map(function(n){return Ky.config({getRoot:function(t){return Yt(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,e){f.getOpt(t).each(function(t){oe(t.element,"title",i.translate(e))})}},validator:{validate:function(t){var e=Df.getValue(t);return p1(function(o){n({type:u.filetype,url:e.value},function(t){var e,n;"invalid"===t.status?(e=Nn.error(t.message),o(e)):(n=Nn.value(t.message),o(n))})})},validateOnLoad:!1}})}).toArray(),[gd.config({disabled:function(){return u.disabled||i.isDisabled()}}),py.config({}),mm("urlinput-events",ft(["file"===u.filetype?[Cr(Si(),function(t){br(t,yy,{name:u.name})})]:[],[Cr(ki(),function(t){br(t,yy,{name:u.name}),r(t)}),Cr(Mi(),function(t){br(t,yy,{name:u.name}),r(t)})]]))]])),eventOrder:((t={})[Si()]=["streaming","urlinput-events","invalidating"],t),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:a.shared.getSink,parts:{menu:Zp(0,0,"normal")},onExecute:function(t,e,n){br(e,ky,{})},onItemExecute:function(t,e,n,o){r(t),br(t,yy,{name:u.name})}}),l=u.label.map(function(t){return oy(t,i)}),f=Hm((e="invalid",n=vt.some(v1),Xm("warning",{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+e],attributes:lt({title:i.translate(o=void 0===o?e:o),"aria-live":"polite"},n.fold(function(){return{}},function(t){return{id:t}}))},i.icons))),d=Hm({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[f.asSpec()]}),m=c.getUrlPicker(u.filetype),g=Ir("browser.url.event"),p=Hm({dom:{tag:"div",classes:["tox-control-wrap"]},components:[s,d.asSpec()],behaviours:ec([gd.config({disabled:function(){return u.disabled||i.isDisabled()}})])}),h=Hm(J0({name:u.name,icon:vt.some("browse"),text:u.label.getOr(""),disabled:u.disabled,primary:!1,borderless:!0},function(t){return vr(t,g)},i,[],["tox-browse-url"]));return my.sketch({dom:by([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:ft([[p.asSpec()],m.map(function(){return h.asSpec()}).toArray()])}]),fieldBehaviours:ec([gd.config({disabled:function(){return u.disabled||i.isDisabled()},onDisabled:function(t){my.getField(t).each(gd.disable),h.getOpt(t).each(gd.disable)},onEnabled:function(t){my.getField(t).each(gd.enable),h.getOpt(t).each(gd.enable)}}),pv(),mm("url-input-events",[Cr(g,function(o){cd.getCurrent(o).each(function(e){var t=Df.getValue(e),n=lt({fieldname:u.name},t);m.each(function(t){t(n).get(function(t){Df.setValue(e,t),br(o,yy,{name:u.name})})})})})])])})}function pk(r){return function(e,n,o){return tt(n,"name").fold(function(){return r(n,o)},function(t){return e.field(t,r(n,o))})}}function hk(e,t,n){var o=Yo(n,{shared:{interpreter:function(t){return x1(e,t,o)}}});return x1(e,t,o)}function vk(t,e,n){function o(){return Mt.fromDom(t.getContentAreaContainer())}function r(){return p||!n()}var i,u,a,c,s,l,f,d,m,g,p=sv(t);return{inlineDialog:(f=o,d=e,m=r,g={maxHeightFunction:Nc()},function(){return m()?{type:"node",root:te(f()),node:vt.from(f()),bubble:Sc(12,12,w1),layouts:{onRtl:function(){return[Mm]},onLtr:function(){return[Bm]}},overrides:g}:{type:"hotspot",hotspot:d(),bubble:Sc(-12,12,w1),layouts:{onRtl:function(){return[Xa]},onLtr:function(){return[Ya]}},overrides:g}}),banner:(c=o,s=e,l=r,function(){return l()?{type:"node",root:te(c()),node:vt.from(c()),layouts:{onRtl:function(){return[cp]},onLtr:function(){return[cp]}}}:{type:"hotspot",hotspot:s(),layouts:{onRtl:function(){return[$a]},onLtr:function(){return[$a]}}}}),cursor:(u=t,function(){return{type:"selection",root:a(),getSelection:function(){var t=u.selection.getRng();return vt.some(ms.range(Mt.fromDom(t.startContainer),t.startOffset,Mt.fromDom(t.endContainer),t.endOffset))}}}),node:(i=a=function(){return Mt.fromDom(t.getBody())},function(t){return{type:"node",root:i(),node:t}})}}function bk(i){return vt.from(i.getParam("style_formats")).filter(c).map(function(t){var e,n,o=(e=i,n=k1(t),e.formatter?r(n.customFormats):e.on("init",function(){r(n.customFormats)}),n.formats);function r(t){St(t,function(t){e.formatter.has(t.name)||e.formatter.register(t.name,t.format)})}return i.getParam("style_formats_merge",!1,"boolean")?S1.concat(o):o}).getOr(S1)}function yk(t,e,n){var o={type:"formatter",isSelected:e(t.format),getStylePreview:n(t.format)};return Yo(t,o)}function xk(c,t,s,l){var f=function(t){return B(t,function(t){var e,n,o,r,i,u=Ct(t);if(et(t,"items")){var a=f(t.items);return Yo(Yo(t,{type:"submenu"}),{getStyleItems:rt(a)})}return et(t,"format")?yk(t,s,l):1===u.length&&wt(u,"title")?Yo(t,{type:"separator"}):(r={type:"formatter",format:o="custom-"+(n=y((e=t).name)?e.name:Ir(e.title)),isSelected:s(o),getStylePreview:l(o)},i=Yo(e,r),c.formatter.register(n,i),i)})};return f(t)}function wk(n){return function(t){if(k(e=t)&&1===e.nodeType){if(t.contentEditable===n)return!0;if(t.getAttribute("data-mce-contenteditable")===n)return!0}var e;return!1}}function Sk(t,e,n,o,r){return{type:t,title:e,url:n,level:o,attach:r}}function kk(t){return t.innerText||t.textContent}function Ck(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)&&JC(t)}function Ok(t){return t&&/^(H[1-6])$/.test(t.nodeName)}function _k(t){return Ok(t)&&JC(t)}function Tk(t){var e,n=t.id||Ir("h");return Sk("header",kk(t),"#"+n,Ok(e=t)?parseInt(e.nodeName.substr(1),10):0,function(){t.id=n})}function Ek(t){var e=t.id||t.name;return Sk("anchor",kk(t)||"#"+e,"#"+e,0,st)}function Dk(t){return 0=n.y}})}function Xk(e,t){return t.getInitialPos().map(function(t){return Bn(t.bounds.x,t.bounds.y,Ce(e),xe(e))})}function Yk(n,o,r){return r.getInitialPos().bind(function(t){switch(r.clearInitialPos(),t.position){case"static":return vt.some(H1.static());case"absolute":var e=zk(n).map(Mn).getOrThunk(function(){return Mn(bn())});return vt.some(H1.absolute(Ea("absolute",tt(t.style,"left").map(function(t){return o.x-e.x}),tt(t.style,"top").map(function(t){return o.y-e.y}),tt(t.style,"right").map(function(t){return e.right-o.right}),tt(t.style,"bottom").map(function(t){return e.bottom-o.bottom}))));default:return vt.none()}})}function qk(t,e,n){var o,r,i,u=t.element;return mt(pe(u,"position"),"fixed")?(r=e,Xk(o=u,i=n).filter(function(t){return Gk(i.getModes(),t,r)}).bind(function(t){return Yk(o,t,i)})):function(t,e,n){var r,o,i=Mn(t);if(Gk(n.getModes(),i,e))return vt.none();r=t,o=i,n.setInitialPos({style:function(){var t={},e=r.dom;if(ct(e))for(var n=0;ni.y;e!==r.isVisible()&&(r.setVisible(e),u&&!e?(Jr(o.element,[n.fadeOutClass]),n.onHide(o)):(e?jk:Wk)(o,n))})})}function Qk(t,e,n){var o,r,i,u,a,c;n.isDocked()&&(r=e,i=n,c=(o=t).element,i.setDocked(!1),Xk(a=o.element,u=i).bind(function(t){return Yk(a,t,u)}).each(function(t){t.fold(function(){return Kk(o,r,i)},function(t){return Jk(o,r,i,t)},st)}),i.setVisible(!0),r.contextual.each(function(t){$r(c,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(o)}),L1(o,r,i))}function Zk(t,e){return wt(j1.getModes(t),e)}function tC(r){var i=r.element;Yt(i).each(function(t){var e,n,o="padding-"+j1.getModes(r)[0];j1.isDocked(r)?(e=Ce(t),fe(i,"width",e+"px"),fe(t,o,we(n=i)+(parseInt(ge(n,"margin-top"),10)||0)+(parseInt(ge(n,"margin-bottom"),10)||0)+"px")):(ve(i,"width"),ve(t,o))})}function eC(t,e){e?(qr(t,G1.fadeOutClass),Jr(t,[G1.transitionClass,G1.fadeInClass])):(qr(t,G1.fadeInClass),Jr(t,[G1.fadeOutClass,G1.transitionClass]))}function nC(t,e){var n=Mt.fromDom(t.getContainer());e?(Yr(n,X1),qr(n,Y1)):(Yr(n,Y1),qr(n,X1))}function oC(u,t){function o(e){r().each(function(t){return e(t.element)})}function e(t){u.inline||tC(t),nC(u,j1.isDocked(t)),t.getSystem().broadcastOn([xf()],{}),r().each(function(t){return t.getSystem().broadcastOn([xf()],{})})}var n,i=gc(),r=t.getSink,a=u.inline?[]:[ic.config({channels:((n={})[W1()]={onReceive:tC},n)})];return V([Vg.config({}),j1.config({contextual:lt({lazyContext:function(t){var e=we(t.element),n=u.inline?u.getContentAreaContainer():u.getContainer(),o=Mn(Mt.fromDom(n)),r=o.height-e,i=o.y+(Zk(t,"top")?0:e);return vt.some(Bn(o.x,i,o.width,r))},onShow:function(){o(function(t){return eC(t,!0)})},onShown:function(r){o(function(t){return $r(t,[G1.transitionClass,G1.fadeInClass])}),i.get().each(function(t){var e,n=r.element,o=jt(e=t);Oa(o).filter(function(t){return!zt(e,t)}).filter(function(t){return zt(t,Mt.fromDom(o.dom.body))||Ut(n,t)}).each(function(){return ka(e)}),i.clear()})},onHide:function(t){var e=t.element,n=r;_a(e).orThunk(function(){return n().toOptional().bind(function(t){return _a(t.element)})}).fold(i.clear,i.set),o(function(t){return eC(t,!1)})},onHidden:function(){o(function(t){return $r(t,[G1.transitionClass])})}},G1),lazyViewport:function(t){var e=Fn(),n=u.getParam("toolbar_sticky_offset",0,"number"),o=e.y+(Zk(t,"top")?n:0),r=e.height-(Zk(t,"bottom")?n:0);return Bn(e.x,o,e.width,r)},modes:[t.header.getDockingMode()],onDocked:e,onUndocked:e})],a,!0)}function rC(t){return ao("menubutton",$1,t)}function iC(e,t){return t.getAnimationRoot.fold(function(){return e.element},function(t){return t(e)})}function uC(t){return t.dimension.property}function aC(t,e){return t.dimension.getDimension(e)}function cC(t,e){$r(iC(t,e),[e.shrinkingClass,e.growingClass])}function sC(t,e){qr(t.element,e.openClass),Yr(t.element,e.closedClass),fe(t.element,uC(e),"0px"),be(t.element)}function lC(t,e){qr(t.element,e.closedClass),Yr(t.element,e.openClass),ve(t.element,uC(e))}function fC(t,e,n,o){n.setCollapsed(),fe(t.element,uC(e),aC(e,t.element)),be(t.element),cC(t,e),sC(t,e),e.onStartShrink(t),e.onShrunk(t)}function dC(t,e,n){var o=aC(e,t.element);("0px"===o?fC:function(t,e,n,o){var r=o.getOrThunk(function(){return aC(e,t.element)});n.setCollapsed(),fe(t.element,uC(e),r),be(t.element);var i=iC(t,e);qr(i,e.growingClass),Yr(i,e.shrinkingClass),sC(t,e),e.onStartShrink(t)})(t,e,n,vt.some(o))}function mC(t,e,n){var o=iC(t,e),r=Kr(o,e.shrinkingClass),i=aC(e,t.element);lC(t,e);var u=aC(e,t.element);(r?function(){fe(t.element,uC(e),i),be(t.element)}:function(){sC(t,e)})(),qr(o,e.shrinkingClass),Yr(o,e.growingClass),lC(t,e),fe(t.element,uC(e),u),n.setExpanded(),e.onStartGrow(t)}function gC(t,e,n){return!0===Kr(iC(t,e),e.growingClass)}function pC(t,e,n){return!0===Kr(iC(t,e),e.shrinkingClass)}function hC(t){return""}function vC(t){return{element:function(){return t.element.dom}}}function bC(t,n){cd.getCurrent(t).each(function(t){return Rg.set(t,[(e=n,uO.sketch(function(t){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:(n=t,r=B(Ct(o=e),function(t){var e=o[t],n=co(ao("sidebar",aO,e));return{name:t,getApi:vC,onSetup:n.onSetup,onShow:n.onShow,onHide:n.onHide}}),B(r,function(t){var e=Po(st);return n.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Kh([vv(t,e),bv(t,e),Cr(Ji(),function(e,t){var n=t.event;N(r,function(t){return t.name===n.name}).each(function(t){(n.visible?t.onShow:t.onHide)(t.getApi(e))})})])})})),slotBehaviours:Kh([ou(function(t){return uO.hideAllSlots(t)})])};var n,o,r}))]);var e})}function yC(t){return cd.getCurrent(t).bind(function(t){return nO.isGrowing(t)||nO.hasGrown(t)?cd.getCurrent(t).bind(function(e){return N(uO.getSlotNames(e),function(t){return uO.isShowing(e,t)})}):vt.none()})}function xC(t){var e=Mt.fromHtml(t),n=Kt(e),o=R(void 0!==e.dom.attributes?e.dom.attributes:[],function(t,e){var n;return"class"===e.name?t:lt(lt({},t),((n={})[e.name]=e.value,n))},{}),r=Array.prototype.slice.call(e.dom.classList,0),i=0===n.length?{}:{innerHtml:Br(e)};return lt({tag:Ft(e),classes:r,attributes:o},i)}function wC(t){return cd.getCurrent(t).each(function(t){return ka(t.element)})}function SC(f,d,m){function e(t){var e;!g.get()||"focusin"===(e=t).type&&(e.composed?Y(e.composedPath()):vt.from(e.target)).map(Mt.fromDom).filter(Ge).exists(function(t){return Kr(t,"mce-pastebin")})||(t.preventDefault(),wC(d()),f.editorManager.setActive(f))}var g=Po(!1),n=gc();function o(t){var e,n,o,r,i,u,a,c,s,l;t!==g.get()&&(g.set(t),e=f,n=d(),o=t,r=m.providers,c=n.element,s=o,l="data-mce-"+(i="tabindex"),vt.from(e.iframeElement).map(Mt.fromDom).each(function(e){s?(ue(e,i).each(function(t){return oe(e,l,t)}),oe(e,i,-1)):(ce(e,i),ue(e,l).each(function(t){oe(e,i,t),ce(e,l)}))}),o?(fO.block(n,(a=r,function(t,e){return{dom:{tag:"div",attributes:{"aria-label":a.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:xC('
')}]}})),ve(c,"display"),ce(c,"aria-hidden"),e.hasFocus()&&wC(n)):(u=cd.getCurrent(n).exists(function(t){return Ca(t.element)}),fO.unblock(n),fe(c,"display","none"),oe(c,"aria-hidden","true"),u&&e.focus()),f.fire("AfterProgressState",{state:t}))}f.inline||f.on("PreInit",function(){f.dom.bind(f.getWin(),"focusin",e),f.on("BeforeExecCommand",function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&e(t)})}),f.on("ProgressState",function(t){var e;n.on(lp.clearTimeout),u(t.time)?(e=lp.setEditorTimeout(f,function(){return o(t.state)},t.time),n.set(e)):(o(t.state),n.clear())})}function kC(t,e,n){return{within:t,extra:e,withinWidth:n}}function CC(t,e,o){var n,r=(n=function(t,e){var n=o(t);return vt.some({element:t,start:e,finish:e+n,width:n})},R(t,function(e,t){return n(t,e.len).fold(rt(e),function(t){return{len:t.finish,list:e.list.concat([t])}})},{len:0,list:[]}).list),i=F(r,function(t){return t.finish<=e}),u=I(i,function(t,e){return t+e.width},0);return{within:i,extra:r.slice(i.length),withinWidth:u}}function OC(t){return B(t,function(t){return t.element})}function _C(t,e){var n=B(e,function(t){return Eu(t)});N1.setGroups(t,n)}function TC(t,e,n){var o,r,i,u,a,c,s,l,f,d,m,g,p,h,v,b,y,x,w,S,k=e.builtGroups.get();0!==k.length&&(o=gl(t,e,"primary"),r=$y.getCoupled(t,"overflowGroup"),fe(o.element,"visibility","hidden"),u=K(i=k.concat([r]),function(e){return _a(e.element).bind(function(t){return e.getSystem().getByDom(t).toOptional()})}),n([]),_C(o,i),a=Ce(o.element),0===(s=a,l=e.builtGroups.get(),d=r,y=(0===(m=CC(l,s,f=function(t){return Ce(t.element)})).extra.length?vt.some(m):vt.none()).getOrThunk(function(){return CC(l,s-f(d),f)}),x=y.within,w=y.extra,S=y.withinWidth,(c=1===w.length&&w[0].width<=f(d)?(b=S,kC(OC(x.concat(w)),[],b)):1<=w.length?(p=w,h=d,v=S,kC(OC(x).concat([h]),OC(p),v)):(g=S,kC(OC(x),[],g))).extra.length)?(Rg.remove(o,r),n([])):(_C(o,c.within),n(c.extra)),ve(o.element,"visibility"),be(o.element),u.each(Vg.focus))}function EC(t,e){var n=$y.getCoupled(t,"toolbarSandbox");bf.isOpen(n)?bf.close(n):bf.open(n,e.toolbar())}function DC(t,e,n,o){var r=n.getBounds.map(function(t){return t()}),i=n.lazySink(t).getOrDie();ff.positionWithinBounds(i,e,{anchor:{type:"hotspot",hotspot:t,layouts:o,overrides:{maxWidthFunction:pO()}}},r)}function AC(t,e,n,o,r){N1.setGroups(e,r),DC(t,e,n,o),zg.on(t)}function BC(t){return B(t,function(t){return Eu(t)})}function MC(t,n,o){TC(t,o,function(e){o.overflowGroups.set(e),n.getOpt(t).each(function(t){bO.setGroups(t,BC(e))})})}function FC(e,n){ml(e,n,"overflow-button").bind(function(){return ml(e,n,"overflow")}).each(function(t){QC(e,n),nO.toggleGrow(t)})}function IC(t){var e=t.title.fold(function(){return{}},function(t){return{attributes:{title:t}}});return{dom:lt({tag:"div",classes:["tox-toolbar__group"]},e),components:[wO.parts.items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:ec([py.config({}),Vg.config({})])}}function RC(t){return wO.sketch(IC(t))}function NC(n,t){var e=ou(function(t){var e=B(n.initGroups,RC);N1.setGroups(t,e)});return ec([Qv(n.providers.isDisabled),pv(),Fg.config({mode:t,onEscape:n.onEscape,selector:".tox-toolbar__group"}),mm("toolbar-events",[e])])}function PC(t){var e=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":IC({title:vt.none(),items:[]}),"overflow-button":Y0({name:"more",icon:vt.some("more-drawer"),disabled:!1,tooltip:vt.some("More..."),primary:!1,borderless:!1},vt.none(),t.providers)},splitToolbarBehaviours:NC(t,e)}}function VC(t){var e=t.cyclicKeying?"cyclic":"acyclic";return N1.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===bh.scrolling?["tox-toolbar--scrolling"]:[])},components:[N1.parts.groups({})],toolbarBehaviours:NC(t,e)})}function HC(t){return"string"==typeof t?t.split(" "):t}function LC(i,u){var a=lt(lt({},IO),u.menus),n=0=r.minChars&&(n=cd.getCurrent(o).bind(function(t){return hd.getHighlighted(t).map(Df.getValue)}),r.previewing.set(!0),ex(r,u(t),t,o,i,function(t){cd.getCurrent(o).each(function(t){n.fold(function(){r.model.selectsOver&&hd.highlightFirst(t)},function(e){hd.highlightBy(t,function(t){return Df.getValue(t).value===e.value}),hd.getHighlighted(t).orThunk(function(){return hd.highlightFirst(t),vt.none()})})})},Vy.HighlightFirst).get(st))},cancelEvent:Hi()}),Fg.config({mode:"special",onDown:function(t,e){return n(t,e,hd.highlightFirst),vt.some(!0)},onEscape:function(t){var e=$y.getCoupled(t,"sandbox");return bf.isOpen(e)?(bf.close(e),vt.some(!0)):vt.none()},onUp:function(t,e){return n(t,e,hd.highlightLast),vt.some(!0)},onEnter:function(e){var t=$y.getCoupled(e,"sandbox"),n=bf.isOpen(t);if(n&&!r.previewing.get())return cd.getCurrent(t).bind(function(t){return hd.getHighlighted(t)}).map(function(t){return br(e,l1(),{item:t}),!0});var o=Df.getValue(e);return vr(e,Hi()),r.onExecute(t,e,o),n&&bf.close(t),vt.some(!0)}}),zg.config({toggleClass:r.markers.openClass,aria:{mode:"expanded"}}),$y.config({others:{sandbox:function(t){return rx(r,t,{onOpen:function(){return zg.on(t)},onClose:function(){return zg.off(t)}})}}}),mm("typeaheadevents",[uu(function(t){nx(r,u(t),t,i,st,Vy.HighlightFirst).get(st)}),Cr(l1(),function(t,e){var n=$y.getCoupled(t,"sandbox");ck(r.model,t,e.event.item),vr(t,Hi()),r.onItemExecute(t,n,e.event.item,Df.getValue(t)),bf.close(n),s1(t)})].concat(r.dismissOnBlur?[Cr(Bi(),function(t){var e=$y.getCoupled(t,"sandbox");_a(e.element).isNone()&&bf.close(e)})]:[]))];return{uid:r.uid,dom:iy(Yo(r,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:lt(lt({},o),el(r.typeaheadBehaviours,a)),eventOrder:r.eventOrder}}}),g1=function(i){return lt(lt({},i),{toCached:function(){return g1(i.toCached())},bindFuture:function(e){return g1(i.bind(function(t){return t.fold(function(t){return Gy(Nn.error(t))},function(t){return e(t)})}))},bindResult:function(e){return g1(i.map(function(t){return t.bind(e)}))},mapResult:function(e){return g1(i.map(function(t){return t.map(e)}))},mapError:function(e){return g1(i.map(function(t){return t.mapError(e)}))},foldResult:function(e,n){return i.map(function(t){return t.fold(e,n)})},withTimeout:function(t,r){return g1(Wy(function(e){var n=!1,o=setTimeout(function(){n=!0,e(Nn.error(r()))},t);i.get(function(t){n||(clearTimeout(o),e(t))})}))}})},p1=function(t){return g1(Wy(t))},h1={type:"separator"},v1=Ir("aria-invalid"),b1={bar:pk(function(t,e){return n=e.shared,{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:B(t.items,n.interpreter)};var n}),collection:pk(function(t,e){return u=t,a=e.shared.providers,c=u.label.map(function(t){return oy(t,a)}),s=n(function(t,e,n,o){e.stop(),a.isDisabled()||br(t,Sy,{name:u.name,value:o})}),l=[Cr(vi(),n(function(t,e,n){ka(n)})),Cr(Ci(),s),Cr(Ni(),s),Cr(bi(),n(function(t,e,n){Iu(t.element,"."+Bh).each(function(t){qr(t,Bh)}),Yr(n,Bh)})),Cr(yi(),n(function(t){Iu(t.element,"."+Bh).each(function(t){qr(t,Bh)})})),uu(n(function(t,e,n,o){br(t,Sy,{name:u.name,value:o})}))],ny(c,my.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==u.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:h},behaviours:ec([gd.config({disabled:a.isDisabled,onDisabled:function(t){o(t,function(t){Yr(t,"tox-collection__item--state-disabled"),oe(t,"aria-disabled",!0)})},onEnabled:function(t){o(t,function(t){qr(t,"tox-collection__item--state-disabled"),ce(t,"aria-disabled")})}}),pv(),Rg.config({}),Df.config({store:{mode:"memory",initialValue:[]},onSetValue:function(o,t){var e=o,n=B(t,function(t){var e=dp.translate(t.text),n=1===u.columns?'
'+e+"
":"",o='
'+t.icon+"
",r={_:" "," - ":" ","-":" "},i=e.replace(/\_| \- |\-/g,function(t){return r[t]});return'
'+o+n+"
"}),r=B("auto"!==u.columns&&1'+t.join("")+""});Mr(e.element,r.join("")),"auto"===u.columns&&ah(o,5,"tox-collection__item").each(function(t){var e=t.numRows,n=t.numColumns;Fg.setGridSize(o,e,n)}),vr(o,Ty)}}),py.config({}),Fg.config(1===(i=u.columns)?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===i?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:".tox-collection__group",cell:"."+Ch}}),mm("collection-events",l)]),eventOrder:((r={})[Ii()]=["disabling","alloy.base.behaviour","collection-events"],r)}),["tox-form__group--collection"],[]);function n(o){return function(e,n){Ru(n.event.target,"[data-collection-item-value]").each(function(t){o(e,n,t,ie(t,"data-collection-item-value"))})}}function o(t,e){return B(vs(t.element,".tox-collection__item"),e)}var u,a,r,i,c,s,l}),alertbanner:pk(function(t,e){return o=e.shared.providers,ly.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+(n=t).level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[fp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:jm(n.icon,o.icons),attributes:{title:o.translate(n.iconTooltip)}},action:function(t){br(t,Sy,{name:"alert-banner",value:n.url})},buttonBehaviours:ec([Wm()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:o.translate(n.text)}}]});var n,o}),input:pk(function(t,e){return o=e.shared.providers,uk({name:(n=t).name,multiline:!1,label:n.label,inputMode:n.inputMode,placeholder:n.placeholder,flex:!1,disabled:n.disabled,classname:"tox-textfield",validation:vt.none(),maximized:n.maximized},o);var n,o}),textarea:pk(function(t,e){return o=e.shared.providers,uk({name:(n=t).name,multiline:!0,label:n.label,inputMode:vt.none(),placeholder:n.placeholder,flex:!0,disabled:n.disabled,classname:"tox-textarea",validation:vt.none(),maximized:n.maximized},o);var n,o}),label:pk(function(t,e){return r={dom:{tag:"label",innerHtml:(o=e.shared).providers.translate((n=t).label),classes:["tox-label"]}},i=B(n.items,o.interpreter),{dom:{tag:"div",classes:["tox-form__group"]},components:[r].concat(i),behaviours:ec([aw(),Rg.config({}),cw(vt.none()),Fg.config({mode:"acyclic"})])};var n,o,r,i}),iframe:(ZC=function(t,e){return n=t,o=e.shared.providers,u=bS&&n.sandboxed,a=lt(lt({},n.label.map(function(t){return{title:t}}).getOr({})),u?{sandbox:"allow-scripts allow-same-origin"}:{}),r=u,i=Po(""),c={getValue:function(t){return i.get()},setValue:function(t,e){var n;r?oe(t.element,"srcdoc",e):(oe(t.element,"src","javascript:''"),(n=t.element.dom.contentWindow.document).open(),n.write(e),n.close()),i.set(e)}},ny(n.label.map(function(t){return oy(t,o)}),my.parts.field({factory:{sketch:function(t){return d0({uid:t.uid,dom:{tag:"iframe",attributes:a},behaviours:ec([py.config({}),Vg.config({}),gS(vt.none(),c.getValue,c.setValue)])})}}}),["tox-form__group--stretched"],[]);var n,o,r,i,u,a,c},function(t,e,n){var o=Yo(e,{source:"dynamic"});return pk(ZC)(t,o,n)}),button:pk(function(t,e){return n=t,o=e.shared.providers,r=$0(n.name,"custom"),ny(vt.none(),my.parts.field(lt({factory:fp},K0(n,vt.some(r),o,[pS(""),aw()]))),[],[]);var n,o,r}),checkbox:pk(function(t,e){return r=t,i=e.shared.providers,u=Df.config({store:{mode:"manual",getValue:function(t){return t.element.dom.checked},setValue:function(t,e){t.element.dom.checked=e}}}),a=my.parts.field({factory:{sketch:h},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:ec([aw(),gd.config({disabled:function(){return r.disabled||i.isDisabled()}}),py.config({}),Vg.config({}),u,Fg.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:!0}),mm("checkbox-events",[Cr(ki(),function(t,e){br(t,yy,{name:r.name})})])])}),c=my.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:i.translate(r.label)},behaviours:ec([vw.config({})])}),s=Hm({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[o("checked"),o("unchecked")]}),my.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[a,s.asSpec(),c],fieldBehaviours:ec([gd.config({disabled:function(){return r.disabled||i.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){my.getField(t).each(gd.disable)},onEnabled:function(t){my.getField(t).each(gd.enable)}}),pv()])});function n(t){return t.element.dom.click(),vt.some(!0)}function o(t){return Xm("checked"===t?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},i.icons)}var r,i,u,a,c,s}),colorinput:pk(function(t,e){return n=t,r=e.shared,i=e.colorinput,c=my.parts.field({factory:Dy,inputClasses:["tox-textfield"],onSetValue:function(t){return Ky.run(t).get(st)},inputBehaviours:ec([gd.config({disabled:r.providers.isDisabled}),pv(),py.config({}),Ky.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return Yt(t.element)},notify:{onValid:function(t){var e=Df.getValue(t);br(t,bw,{color:e})}},validator:{validateOnLoad:!1,validate:function(t){var e=Df.getValue(t);if(0===e.length)return Gy(Nn.value(!0));var n=Mt.fromTag("span");fe(n,"background-color",e);var o=pe(n,"background-color").fold(function(){return Nn.error("blah")},function(t){return Nn.value(e)});return Gy(o)}}})]),selectOnFocus:!1}),s=n.label.map(function(t){return oy(t,r.providers)}),l=Hm((u={dom:{tag:"span",attributes:{"aria-label":r.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Ya,Xa,$a]},onLtr:function(){return[Xa,Ya,$a]}},components:[],fetch:wb(i.getColors(),i.hasCustomColors()),columns:i.getColorCols(),presets:"color",onItemAction:function(t,n){l.getOpt(t).each(function(e){"custom"===n?i.colorPicker(function(t){t.fold(function(){return vr(e,xw)},function(t){o(e,t),hb(t)})},"#ffffff"):o(e,"remove"===n?"":n)})}},hw.sketch({dom:u.dom,components:u.components,toggleClass:"mce-active",dropdownBehaviours:ec([$v((a=r).providers.isDisabled),pv(),vw.config({}),py.config({})]),layouts:u.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:a.getSink,fetch:function(e){return Wy(function(t){return u.fetch(t)}).map(function(t){return vt.from(Xb(Yo(Ob(Ir("menu-value"),t,function(t){u.onItemAction(e,t)},u.columns,u.presets,Sh.CLOSE_ON_EXECUTE,T,a.providers),{movement:_b(u.columns,u.presets)})))})},parts:{menu:Zp(0,0,u.presets)}}))),my.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:s.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[c,l.asSpec()]}]),fieldBehaviours:ec([mm("form-field-events",[Cr(bw,function(t,e){l.getOpt(t).each(function(t){fe(t.element,"background-color",e.event.color)}),br(t,yy,{name:n.name})}),Cr(yw,function(e,n){my.getField(e).each(function(t){Df.setValue(t,n.event.value),cd.getCurrent(e).each(Vg.focus)})}),Cr(xw,function(e,t){my.getField(e).each(function(t){cd.getCurrent(e).each(Vg.focus)})})])])});function o(t,e){br(t,yw,{value:e})}var n,r,i,u,a,c,s,l}),colorpicker:pk(function(t){var r=Hm(a0(c0,function(t){return"tox-"+t}).sketch({dom:{tag:"div",classes:["tox-color-picker-container"],attributes:{role:"presentation"}},onValidHex:function(t){br(t,Sy,{name:"hex-valid",value:!0})},onInvalidHex:function(t){br(t,Sy,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[r.asSpec()],behaviours:ec([Df.config({store:{mode:"manual",getValue:function(t){var e=r.get(t);return cd.getCurrent(e).bind(function(t){return Df.getValue(t).hex}).map(function(t){return"#"+t}).getOr("")},setValue:function(t,e){var n=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(e),o=r.get(t);cd.getCurrent(o).fold(function(){console.log("Can not find form")},function(t){Df.setValue(t,{hex:vt.from(n[1]).getOr("")}),nS.getField(t,"hex").each(function(t){vr(t,Si())})})}}}),aw()])}}),dropzone:pk(function(t,e){return l0(t,e.shared.providers)}),grid:pk(function(t,e){return n=e.shared,{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:B(t.items,n.interpreter)};var n}),listbox:pk(function(t,e){return n=t,r=(o=e).shared.providers,i=Y(n.items).filter(rk),u=n.label.map(function(t){return oy(t,r)}),a={dom:{tag:"div",classes:["tox-listboxfield"]},components:[my.parts.field({dom:{},factory:{sketch:function(t){return z0({uid:t.uid,text:i.map(function(t){return t.text}),icon:vt.none(),tooltip:n.label,role:vt.none(),fetch:function(t,e){e(j0(o1(t,n.name,n.items,Df.getValue(t)),Sh.CLOSE_ON_EXECUTE,o,!1))},onSetup:rt(st),getApi:rt({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[py.config({}),Df.config({store:{mode:"manual",initialValue:i.map(function(t){return t.value}).getOr(""),getValue:function(t){return ie(t.element,n1)},setValue:function(e,t){r1(n.items,t).each(function(t){oe(e.element,n1,t.value),br(e,NS,{text:t.text})})}}})]},"tox-listbox",o.shared)}}})]},my.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:ft([u.toArray(),[a]]),fieldBehaviours:ec([gd.config({disabled:rt(n.disabled),onDisabled:function(t){my.getField(t).each(gd.disable)},onEnabled:function(t){my.getField(t).each(gd.enable)}})])});var n,o,r,i,u,a}),selectbox:pk(function(t,e){return n=t,o=e.shared.providers,r=B(n.items,function(t){return{text:o.translate(t.text),value:t.value}}),i=n.label.map(function(t){return oy(t,o)}),u={dom:{tag:"div",classes:["tox-selectfield"]},components:ft([[my.parts.field({dom:{},selectAttributes:{size:n.size},options:r,factory:i1,selectBehaviours:ec([gd.config({disabled:function(){return n.disabled||o.isDisabled()}}),py.config({}),mm("selectbox-change",[Cr(ki(),function(t,e){br(t,yy,{name:n.name})})])])})],(1n)return"top";var r=Gt(a),i=Math.max(r.dom.scrollHeight,xe(r));return o.bottom=(n=void 0===n?.01:n)&&t.bottom-e.y>=n}function u_(t){var e=function(t){var e=t.getBoundingClientRect();if(e.height<=0&&e.width<=0){var n=Qt(Mt.fromDom(t.startContainer),t.startOffset).element;return(Xe(n)?Yt(n):vt.some(n)).filter(Ge).map(function(t){return t.dom.getBoundingClientRect()}).getOr(e)}return e}(t.selection.getRng());if(t.inline){var n=Ie();return Bn(n.left+e.left,n.top+e.top,e.width,e.height)}var o=He(Mt.fromDom(t.getBody()));return Bn(o.x+e.left,o.y+e.top,e.width,e.height)}function a_(t,e,n,o){void 0===o&&(o=0);var r,i,u,a,c=Pe(window),s=Mn(Mt.fromDom(t.getContentAreaContainer())),l=ph(t)||hh(t)||rv(t),f=(r=s,i=c,u=o,{x:a=Math.max(r.x+u,i.x),width:Math.min(r.right-u,i.right)-a}),d=f.x,m=f.width;if(t.inline&&!l)return Bn(d,c.y,m,c.height);var g=function(t,e,n,o,r,i){var u=Mt.fromDom(t.getContainer()),a=Iu(u,".tox-editor-header").getOr(u),c=Mn(a),s=c.y>=e.bottom,l=o&&!s;if(t.inline&&l)return{y:Math.max(c.bottom+i,n.y),bottom:n.bottom};if(t.inline&&!l)return{y:n.y,bottom:Math.min(c.y-i,n.bottom)};var f="line"===r?Mn(u):e;return l?{y:Math.max(c.bottom+i,n.y),bottom:Math.min(f.bottom-i,n.bottom)}:{y:Math.max(f.y+i,n.y),bottom:Math.min(c.y-i,n.bottom)}}(t,s,c,e.header.isPositionedAtTop(),n,o),p=g.y,h=g.bottom;return Bn(d,p,m,h-p)}function c_(t){return"node"===t}function s_(t,r,e,i,n){var u=u_(t),o=i.lastElement().exists(function(t){return zt(e,t)}),a=e,c=t.selection.getRng(),s=Qt(Mt.fromDom(c.startContainer),c.startOffset);return c.startContainer===c.endContainer&&c.startOffset===c.endOffset-1&&zt(s.element,a)?o?Nm:cp:o?function(e,t){var n=pe(e,"position");fe(e,"position",t);var o=i_(u,Mn(r))&&!i.isReposition()?Vm:Nm;return n.each(function(t){return fe(e,"position",t)}),o}(r,i.getMode()):("fixed"===i.getMode()?n.y+Ie().top:n.y)+(xe(r)+12)<=u.y?cp:sp}function l_(e,t){var n=M(F(t,function(t){return t.predicate(e.dom)}),function(t){return"contexttoolbar"===t.type});return{contextToolbars:n.pass,contextForms:n.fail}}function f_(n,t){function o(t){return zt(t,r)}var e,r=Mt.fromDom(t.getBody()),i=Mt.fromDom(t.selection.getNode());return o(e=i)||Ut(r,e)?function(t,e,n){var o=l_(t,e);if(0=o.clientX&&t.top<=o.clientY&&t.bottom>=o.clientY})}}(f,d)?e():(f.once("selectionchange",e),f.once("touchend",function(){return f.off("selectionchange",e)}))):t()}function aT(t){return"string"==typeof t?t.split(/[ ,]/):t}function cT(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")}function sT(t){return y(t)?"|"===t:"separator"===t.type}function lT(t,e){if(0===e.length)return t;var n=q(t).filter(function(t){return!sT(t)}).fold(function(){return[]},function(t){return[WT]});return t.concat(n).concat(e).concat([WT])}function fT(t,e){return"longpress"!==e.type&&(2!==e.button||e.target===t.getBody()&&""===e.pointerType)}function dT(t,e){return fT(t,e)?t.selection.getStart(!0):e.target}function mT(s,t,e){function n(t){return up.hide(i)}function o(c){var t;cT(s)&&c.preventDefault(),c.ctrlKey&&!cT(s)||!1===s.getParam("contextmenu")||(t=function(t,e){var n=t.getParam("contextmenu_avoid_overlap","","string"),o=fT(t,e)?"selection":"point";if(at(n)){var r=dT(t,e);return Yb(Mt.fromDom(r),n)?"node":o}return o}(s,c),(r()?uT:function(t,e,n,o,r,i){var u=n(),a=iT(t,e,i);j0(u,Sh.CLOSE_ON_EXECUTE,o,!1).map(function(t){e.preventDefault(),up.showMenuAt(r,{anchor:a},{menu:{markers:Qp("normal")},data:t})})})(s,c,function(){var t,e,n,o=dT(s,c),r=s.ui.registry.getAll(),i=(n=(e=s).ui.registry.getAll().contextMenus,vt.from(e.getParam("contextmenu")).map(aT).getOrThunk(function(){return F(aT("link linkchecker image imagetools table spellchecker configurepermanentpen"),function(t){return Tt(n,t)})})),u=r.contextMenus,a=o;return 0<(t=R(i,function(o,t){return tt(u,t.toLowerCase()).map(function(t){var e=t.update(a);if(y(e))return lT(o,e.split(" "));if(0n;(o||r)&&fe(t.element,"display","none")}(t)}function i(t){return r(h,t,e,"top")}function u(t){return r(v,t,o,"bottom")}var c=Po([]),s=Po([]),t=Po(!1),l=gc(),f=gc(),d=RT(function(){return B(c.get(),e)},l,function(e){f.get().each(function(t){a.fire("TableSelectorChange",{start:e,finish:t})})}),m=RT(function(){return B(s.get(),o)},f,function(e){l.get().each(function(t){a.fire("TableSelectorChange",{start:t,finish:e})})}),g=NT(d),p=NT(m),h=Tu(g.asSpec()),v=Tu(p.asSpec());ln().deviceType.isTouch()&&(a.on("TableSelectionChange",function(e){t.get()||(Ns(n,h),Ns(n,v),t.set(!0)),l.set(e.start),f.set(e.finish),e.otherCells.each(function(t){c.set(t.upOrLeftCells),s.set(t.downOrRightCells),i(e.start),u(e.finish)})}),a.on("ResizeEditor ResizeWindow ScrollContent",function(){l.get().each(i),f.get().each(u)}),a.on("TableSelectionClear",function(){t.get()&&(Vs(h),Vs(v),t.set(!1)),l.clear(),f.clear()}))}var VT,HT,LT={name:"lineheight",text:"Line height",icon:"line-height",getOptions:function(t){return t.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},hash:function(t){return r=["fixed","relative","empty"],vt.from(q_.exec(t)).bind(function(t){var e=Number(t[1]),n=t[2],o=n;return d(r,function(t){return d(Y_[t],function(t){return o===t})})?vt.some({value:e,unit:n}):vt.none()}).map(function(t){return t.value+t.unit}).getOr(t);var r},display:h,watcher:function(t,e,n){return t.formatter.formatChanged("lineheight",n,!1,{value:e}).unbind},getCurrent:function(t){return vt.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,e){return t.execCommand("LineHeight",!1,e)}},zT=function(t){return{type:"selection",root:Mt.fromDom(t.selection.getNode())}},UT={onLtr:function(){return[$a,Xa,Ya,qa,Ka,Ja,cp,sp,Mm,Am,Bm,Dm]},onRtl:function(){return[$a,Ya,Xa,Ka,qa,Ja,cp,sp,Bm,Dm,Mm,Am]}},jT={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},WT={type:"separator"},GT=function(e){function t(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}}var n;if(y(e))return e;switch(e.type){case"separator":return WT;case"submenu":return lt(lt({type:"nestedmenuitem"},t(e)),{getSubmenuItems:function(){var t=e.getSubmenuItems();return y(t)?t:B(t,GT)}});default:return lt(lt({type:"menuitem"},t(e)),{onAction:(n=e.onAction,function(){return n()})})}},XT=Vo([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),YT=XT.offset,qT=XT.absolute,KT=XT.fixed,JT=function(t,e,l,f,d){var n=e.getSnapPoints(t);return CT(n,l,f,d).orThunk(function(){return R(n,function(e,n){var t,o,r,i,u,a,c,s=(t=n.sensor,n.range.left,n.range.top,i=bT(l,o=f,r=d),u=bT(t,o,r),a=Math.abs(i.left-u.left),c=Math.abs(i.top-u.top),kn(a,c));return e.deltas.fold(function(){return{deltas:vt.some(s),snap:vt.some(n)}},function(t){return(s.left+s.top)/2<=(t.left+t.top)/2?{deltas:vt.some(s),snap:vt.some(n)}:e})},{deltas:vt.none(),snap:vt.none()}).snap.map(function(t){return{output:wT(t.output,l,f,d),extra:t.extra}})})},$T=function(t,e,n,o,r){return CT(e.getSnapPoints(t),n,o,r)},QT=Object.freeze({__proto__:null,snapTo:function(t,e,n,o){var r,i,u,a=e.getTarget(t.element);e.repositionTarget&&(r=Ie(jt(t.element)),i=Uk(a),me(a,xT({coord:wT((u=o).output,u.output,r,i),extra:u.extra}.coord,0,i)))}}),ZT="data-initial-z-index",tE=To("snaps",[mo("getSnapPoints"),Ju("onSensor"),mo("leftAttr"),mo("topAttr"),Eo("lazyViewport",Fn),Eo("mustSnap",!1)]),eE=[Eo("useFixed",T),mo("blockerClass"),Eo("getTarget",h),Eo("onDrag",st),Eo("repositionTarget",!0),Eo("onDrop",st),Io("getBounds",Fn),tE],nE=Object.freeze({__proto__:null,getData:function(t){return vt.from(kn(t.x,t.y))},getDelta:function(t,e){return kn(e.left-t.left,e.top-t.top)}}),oE=V(V([],eE,!0),[ta("dragger",{handlers:BT(MT)})],!1),rE=Object.freeze({__proto__:null,getData:function(t){var e,n=t.raw.touches;return 1===n.length?(e=n[0],vt.some(kn(e.clientX,e.clientY))):vt.none()},getDelta:function(t,e){return kn(e.left-t.left,e.top-t.top)}}),iE=V(V([],eE,!0),[ta("dragger",{handlers:BT(FT)})],!1),uE=V(V([],eE,!0),[ta("dragger",{handlers:BT(function(t,e,n){return V(V([],MT(t,e,n),!0),FT(t,e,n),!0)})})],!1),aE=wa({branchKey:"mode",branches:Object.freeze({__proto__:null,mouse:oE,touch:iE,mouseOrTouch:uE}),name:"dragging",active:{events:function(t,e){return t.dragger.handlers(t,e)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:vt.from(t.extra)}}},state:Object.freeze({__proto__:null,init:function(){var i=vt.none(),e=vt.none(),t=rt({});return wu({readState:t,reset:function(){i=vt.none(),e=vt.none()},update:function(r,t){return r.getData(t).bind(function(t){return e=r,n=t,o=i.map(function(t){return e.getDelta(t,n)}),i=vt.some(n),o;var e,n,o})},getStartData:function(){return e},setStartData:function(t){e=vt.some(t)}})}}),apis:QT});function cE(t,e,n){var o,r,i,u,a,c,s=Mt.fromDom(t.getContainer());J((o=t,r=e,i=n,u=xe(s),a=Ce(s),(c={}).height=t_(u+r.top,dh(o),gh(o)),i===VT.Both&&(c.width=t_(a+r.left,fh(o),mh(o))),c),function(t,e){return fe(s,e,ZO(t)),0}),t.fire("ResizeEditor")}function sE(t,e,n,o){return cE(t,kn(20*n,20*o),e),vt.some(!0)}function lE(t,e){var n,o,r,i,u,a,c,s,l,f,d,m,g,p,h,v;return{dom:{tag:"div",classes:["tox-statusbar"]},components:(v=[],t.getParam("elementpath",!0,"boolean")&&v.push((g=t,h=e,(p={}).delimiter||(p.delimiter="\xbb"),{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:ec([Fg.config({mode:"flow",selector:"div[role=button]"}),gd.config({disabled:h.isDisabled}),pv(),py.config({}),Rg.config({}),mm("elementPathEvents",[ou(function(r,t){g.shortcuts.add("alt+F11","focus statusbar elementpath",function(){return Fg.focusIn(r)}),g.on("NodeChange",function(t){var e,o,n=function(t){for(var e=[],n=t.length;0'+l+""}}),n=0=o.dom.offsetLeft+Ce(o)?Math.max(xe(o),u):u,c=parseInt(ge(e,"margin-top"),10)||0,s=parseInt(ge(e,"margin-bottom"),10)||0,i-(xe(e)+c+s-a)));var e,n,o,r,i,u,a,c,s}).each(function(t){hE(d,t)})})})}function bE(t){return Iu(t,'[role="tabpanel"]')}function yE(t,n){function o(t){var e=pE(Df.getValue(t)).getOr({}),n=i.get(),o=Yo(n,e);i.set(o)}function r(t){var e=i.get();Df.setValue(t,e)}var u,a,i=Po({}),c=Po(null),e=B(t.tabs,function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:n.shared.providers.translate(t.title)},view:function(){return[nS.sketch(function(e){return{dom:{tag:"div",classes:["tox-form"]},components:B(t.items,function(t){return hk(e,t,n)}),formBehaviours:ec([Fg.config({mode:"acyclic",useTabstopAt:O(p0)}),mm("TabView.form.events",[ou(r),ru(o)]),ic.config({channels:lr([{key:QD,value:{onReceive:o}},{key:ZD,value:{onReceive:r}}])})])}})]}}}),s=(u=e,a=gc(),{extraEvents:[ou(function(t){var o=t.element;bE(o).each(function(e){var n;fe(e,"visibility","hidden"),t.getSystem().getByDom(e).toOptional().each(function(t){var o,r,i;Y(G((r=e,i=t,B(o=u,function(t,e){Rg.set(i,o[e].view());var n=r.dom.getBoundingClientRect();return Rg.set(i,[]),n.height})),function(t,e){return et.length)&&(e=t.length);for(var n=0,o=new Array(e);n/gm),KA=vA(/^data-[\-\w.\u00B7-\uFFFF]/),JA=vA(/^aria-[\-\w]+$/),$A=vA(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),QA=vA(/^(?:\w+script|data):/i),ZA=vA(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tB=vA(/^html$/i);function eB(t,e){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,e]}}function nB(t,e){return OE.parts.close(fp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close")}},action:t,buttonBehaviours:ec([py.config({})])}))}function oB(){return OE.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})}function rB(t,e){return OE.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:xC("

"+(n=e.translate(t),_B().sanitize(n))+"

")}]}]});var n}function iB(t){return OE.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})}function uB(t,e){return[ly.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),ly.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:e})]}function aB(e){var t,n="tox-dialog",o=n+"-wrap",r=o+"__backdrop",i=n+"__disable-scroll";return OE.sketch({lazySink:e.lazySink,onEscape:function(t){return e.onEscape(t),vt.some(!0)},useTabstopAt:function(t){return!p0(t)},dom:{tag:"div",classes:[n].concat(e.extraClasses),styles:lt({position:"relative"},e.extraStyles)},components:V([e.header,e.body],e.footer.toArray(),!0),parts:{blocker:{dom:xC('
'),components:[{dom:{tag:"div",classes:TB?[r,r+"--opaque"]:[r]}}]}},dragBlockClass:o,modalBehaviours:ec(V([Vg.config({}),mm("dialog-events",e.dialogEvents.concat([Ar(bi(),function(t,e){Fg.focusIn(t)})])),mm("scroll-lock",[ou(function(){Yr(bn(),i)}),ru(function(){qr(bn(),i)})])],e.extraBehaviours,!0)),eventOrder:lt(((t={})[Ii()]=["dialog-events"],t[Gi()]=["scroll-lock","dialog-events","alloy.base.behaviour"],t[Xi()]=["alloy.base.behaviour","dialog-events","scroll-lock"],t),e.eventOrder)})}function cB(t){return fp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[Xm("close",{tag:"div",classes:["tox-icon"]},t.icons)],action:function(t){vr(t,wy)}})}function sB(t,e,n){function o(t){return[ri(n.translate(t.title))]}return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:lt({},e.map(function(t){return{id:t}}).getOr({}))},components:o(t),behaviours:ec([k_.config({channel:eA,renderComponents:o})])}}function lB(){return{dom:xC('
')}}function fB(t,e){return n={title:e.shared.providers.translate(t),draggable:e.dialog.isDraggableModal()},o=e.shared.providers,r=OE.parts.title(sB(n,vt.none(),o)),i=OE.parts.draghandle(lB()),u=OE.parts.close(cB(o)),a=[r].concat(n.draggable?[i]:[]).concat([u]),ly.sketch({dom:xC('
'),components:a});var n,o,r,i,u,a}function dB(t,e,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":n.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:e,components:[{dom:xC('
')}]}}function mB(t,o,e){return{onClose:function(){return e.closeWindow()},onBlock:function(n){OE.setBusy(t(),function(t,e){return dB(n.message,e,o)})},onUnblock:function(){OE.setIdle(t())}}}function gB(t,e,n,o){var r;return Tu(aB(lt(lt({},t),{lazySink:o.shared.getSink,extraBehaviours:V([k_.config({channel:tA,updateState:function(t,e){return vt.some(e)},initialData:e}),pS({})],t.extraBehaviours,!0),onEscape:function(t){vr(t,wy)},dialogEvents:n,eventOrder:((r={})[Fi()]=[k_.name(),ic.name()],r[Gi()]=["scroll-lock",k_.name(),"messages","dialog-events","alloy.base.behaviour"],r[Xi()]=["alloy.base.behaviour","dialog-events","messages",k_.name(),"scroll-lock"],r)})))}function pB(t){return B(t,function(t){return"menu"===t.type?(n=B((e=t).items,function(t){var e=Po(!1);return lt(lt({},t),{storage:e})}),lt(lt({},e),{items:n})):t;var e,n})}function hB(t){return R(t,function(t,e){return"menu"!==e.type?t:R(e.items,function(t,e){return t[e.name]=e.storage,t},t)},{})}function vB(t,n){return[Er(bi(),g0),t(xy,function(t,e){n.onClose(),e.onClose()}),t(wy,function(t,e,n,o){e.onCancel(t),vr(o,xy)}),Cr(Oy,function(t,e){return n.onUnblock()}),Cr(Cy,function(t,e){return n.onBlock(e.event)})]}function bB(t,e){function n(t,e){return ly.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:B(e,function(t){return t.memento.asSpec()})})}var o=M(e.map(function(t){return t.footerButtons}).getOr([]),function(t){return"start"===t.align});return[n("start",o.pass),n("end",o.fail)]}function yB(t,n){return{dom:xC(''),components:[],behaviours:ec([k_.config({channel:oA,initialData:t,updateState:function(t,e){var r=B(e.buttons,function(t){var e=Hm(Q0(t,t.type,n));return{name:t.name,align:t.align,memento:e}});return vt.some({lookupByName:function(t,e){return n=t,o=e,N(r,function(t){return t.name===o}).bind(function(t){return t.memento.getOpt(n)});var n,o},footerButtons:r})},renderComponents:bB})])}}function xB(t,e){return OE.parts.footer(yB(t,e))}function wB(e,n){if(e.getRoot().getSystem().isConnected()){var o=cd.getCurrent(e.getFormWrapper()).getOr(e.getFormWrapper());return nS.getField(o,n).fold(function(){var t=e.getFooter();return k_.getState(t).get().bind(function(t){return t.lookupByName(o,n)})},function(t){return vt.some(t)})}return vt.none()}function SB(c,o,s){function t(t){var e=c.getRoot();e.getSystem().isConnected()&&t(e)}var l={getData:function(){var t=c.getRoot(),e=t.getSystem().isConnected()?c.getFormWrapper():t,n=Df.getValue(e),o=dt(s,function(t){return t.get()});return lt(lt({},n),o)},setData:function(a){t(function(t){var e,n,o=l.getData(),r=lt(lt({},o),a),i=(e=r,n=c.getRoot(),k_.getState(n).get().map(function(t){return co(ao("data",t.dataValidator,e))}).getOr(e)),u=c.getFormWrapper();Df.setValue(u,i),J(s,function(t,e){Tt(r,e)&&t.set(r[e])})})},disable:function(t){wB(c,t).each(gd.disable)},enable:function(t){wB(c,t).each(gd.enable)},focus:function(t){wB(c,t).each(Vg.focus)},block:function(e){if(!y(e))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t(function(t){br(t,Cy,{message:e})})},unblock:function(){t(function(t){vr(t,Oy)})},showTab:function(n){t(function(t){var e=c.getBody();k_.getState(e).get().exists(function(t){return t.isTabPanel()})&&cd.getCurrent(e).each(function(t){$D.showTab(t,n)})})},redial:function(n){t(function(t){var e=o(n);t.getSystem().broadcastOn([tA],e),t.getSystem().broadcastOn([eA],e.internalDialog),t.getSystem().broadcastOn([nA],e.internalDialog),t.getSystem().broadcastOn([oA],e.internalDialog),l.setData(e.initialData)})},close:function(){t(function(t){vr(t,xy)})}};return l}function kB(t){return x(t)&&-1!==MB.indexOf(t.mceAction)}function CB(o,t,r,e){var n,i,u,a=fB(o.title,e),c=(i={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[d0({dom:{tag:"iframe",attributes:{src:o.url}},behaviours:ec([py.config({}),Vg.config({})])})]}],behaviours:ec([Fg.config({mode:"acyclic",useTabstopAt:O(p0)})])},OE.parts.body(i)),s=o.buttons.bind(function(t){return 0===t.length?vt.none():vt.some(xB({buttons:t},e))}),l=EB(function(){return v},mB(function(){return h},e.shared.providers,t)),f=lt(lt({},o.height.fold(function(){return{}},function(t){return{height:t+"px","max-height":t+"px"}})),o.width.fold(function(){return{}},function(t){return{width:t+"px","max-width":t+"px"}})),d=o.width.isNone()&&o.height.isNone()?["tox-dialog--width-lg"]:[],m=new BB(o.url,{base_uri:new BB(window.location.href)}),g=m.protocol+"://"+m.host+(m.port?":"+m.port:""),p=mc(),h=gB({header:a,body:c,footer:s,extraClasses:d,extraBehaviours:[mm("messages",[ou(function(){var t=pc(Mt.fromDom(window),"message",function(t){var e,n;m.isSameOrigin(new BB(t.raw.origin))&&(kB(e=t.raw.data)?function(t,e,n){switch(n.mceAction){case"insertContent":t.insertContent(n.content);break;case"setContent":t.setContent(n.content);break;case"execCommand":var o=!!w(n.ui)&&n.ui;t.execCommand(n.cmd,o,n.value);break;case"close":e.close();break;case"block":e.block(n.message);break;case"unblock":e.unblock()}}(r,v,e):!kB(n=e)&&x(n)&&Tt(n,"mceAction")&&o.onMessage(v,e))});p.set(t)}),ru(p.clear)]),ic.config({channels:((n={})[rA]={onReceive:function(t,e){Iu(t.element,"iframe").each(function(t){t.dom.contentWindow.postMessage(e,g)})}},n)})],extraStyles:f},o,l,e),v={block:function(e){if(!y(e))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");b(function(t){br(t,Cy,{message:e})})},unblock:function(){b(function(t){vr(t,Oy)})},close:function(){b(function(t){vr(t,xy)})},sendMessage:function(e){b(function(t){t.getSystem().broadcastOn([rA],e)})}};function b(t){u.getSystem().isConnected()&&t(u)}return{dialog:u=h,instanceApi:v}}function OB(t){function o(t,y){return jD.open(function(t,e,n){var o,r,i,u,a,c,s,l,f,d,m,g,p,h,v=e,b=(r={redial:jD.redial,closeWindow:function(){OE.hide(b.dialog),y(b.instanceApi)}},i=R,c=fB((o={dataValidator:n,initialData:v,internalDialog:t}).internalDialog.title,i),u=i,a=xE({body:o.internalDialog.body},vt.none(),u,!1),s=OE.parts.body(a),l=pB(o.internalDialog.buttons),f=hB(l),d=xB({buttons:l},i),m=DB(function(){return h},mB(function(){return p},i.shared.providers,r),i.shared.getSink),g=function(){switch(o.internalDialog.size){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}}(),p=gB({header:c,body:s,footer:vt.some(d),extraClasses:g,extraBehaviours:[],extraStyles:{}},o,m,i),h=SB({getRoot:rt(p),getBody:function(){return OE.getBody(p)},getFooter:function(){return OE.getFooter(p)},getFormWrapper:function(){var t=OE.getBody(p);return cd.getCurrent(t).getOr(t)}},r.redial,f),{dialog:p,instanceApi:h});return OE.show(b.dialog),b.instanceApi.setData(v),b.instanceApi},t)}function r(t,M,F,I){return jD.open(function(t,e,n){function o(){return E.on(function(t){up.reposition(t),j1.refresh(t)})}var r,i,u,a,c,s,l,f,d,m,g,p,h,v,b,y,x,w,S,k,C,O,_,T=co(ao("data",n,e)),E=gc(),D=R.shared.header.isPositionedAtTop(),A=(i={dataValidator:n,initialData:T,internalDialog:t},u={redial:jD.redial,closeWindow:function(){E.on(up.hide),N.off("ResizeEditor",o),E.clear(),F(A.instanceApi)}},a=R,c=I,v=Ir("dialog-label"),b=Ir("dialog-content"),y=Hm((f={title:i.internalDialog.title,draggable:!0},d=v,m=a.shared.providers,ly.sketch({dom:xC('
'),components:[sB(f,vt.some(d),m),lB(),cB(m)],containerBehaviours:ec([aE.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Ru(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),x=Hm((g={body:i.internalDialog.body},p=a,h=c,xE(g,vt.some(b),p,h))),w=pB(i.internalDialog.buttons),S=hB(w),k=Hm(AB({buttons:w},a)),C=DB(function(){return _},{onBlock:function(n){fO.block(O,function(t,e){return dB(n.message,e,a.shared.providers)})},onUnblock:function(){fO.unblock(O)},onClose:function(){return u.closeWindow()}},a.shared.getSink),O=Tu({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:((s={role:"dialog"})["aria-labelledby"]=v,s["aria-describedby"]=b,s)},eventOrder:((l={})[Fi()]=[k_.name(),ic.name()],l[Ii()]=["execute-on-form"],l[Gi()]=["reflecting","execute-on-form"],l),behaviours:ec([Fg.config({mode:"cyclic",onEscape:function(t){return vr(t,xy),vt.some(!0)},useTabstopAt:function(t){return!p0(t)&&("button"!==Ft(t)||"disabled"!==ie(t,"disabled"))}}),k_.config({channel:tA,updateState:function(t,e){return vt.some(e)},initialData:i}),Vg.config({}),mm("execute-on-form",C.concat([Ar(bi(),function(t,e){Fg.focusIn(t)})])),fO.config({getRoot:function(){return vt.some(O)}}),Rg.config({}),pS({})]),components:[y.asSpec(),x.asSpec(),k.asSpec()]}),_=SB({getRoot:rt(O),getFooter:function(){return k.get(O)},getBody:function(){return x.get(O)},getFormWrapper:function(){var t=x.get(O);return cd.getCurrent(t).getOr(t)}},u.redial,S),{dialog:O,instanceApi:_}),B=Tu(up.sketch(lt(lt({lazySink:R.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},D?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:ec(V([mm("window-manager-inline-events",[Cr(Yi(),function(t,e){vr(A.dialog,wy)})])],(r=N,P&&D?[]:[j1.config({contextual:{lazyContext:function(){return vt.some(Mn(Mt.fromDom(r.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]),!0)),isExtraPart:function(t,e){return Yb(n=e,".tox-alert-dialog")||Yb(n,".tox-confirm-dialog");var n}})));return E.set(B),up.showWithin(B,Eu(A.dialog),{anchor:M},vt.some(bn())),P&&D||(j1.refresh(B),N.on("ResizeEditor",o)),A.instanceApi.setData(T),Fg.focusIn(A.dialog),A.instanceApi},t)}var c,s,l,f,R=t.backstage,N=t.editor,P=dv(N),n=(s=(c=t).backstage.shared,{open:function(t,e){function n(){OE.hide(u),e()}var o=Hm(Q0({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:vt.none()},"cancel",c.backstage)),r=oB(),i=nB(n,s.providers),u=Tu(aB({lazySink:function(){return s.getSink()},header:eB(r,i),body:rB(t,s.providers),footer:vt.some(iB(uB([],[o.asSpec()]))),onEscape:n,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Cr(wy,n)],eventOrder:{}}));OE.show(u);var a=o.get(u);Vg.focus(a)}}),i=(f=(l=t).backstage.shared,{open:function(t,e){function n(t){OE.hide(a),e(t)}var o=Hm(Q0({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:vt.none()},"submit",l.backstage)),r=Q0({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:vt.none()},"cancel",l.backstage),i=oB(),u=nB(function(){return n(!1)},f.providers),a=Tu(aB({lazySink:function(){return f.getSink()},header:eB(i,u),body:rB(t,f.providers),footer:vt.some(iB(uB([],[r,o.asSpec()]))),onEscape:function(){return n(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Cr(wy,function(){return n(!1)}),Cr(ky,function(){return n(!0)})],eventOrder:{}}));OE.show(a);var c=o.get(a);Vg.focus(c)}});return{open:function(t,e,n){return void 0!==e&&"toolbar"===e.inline?r(t,R.shared.anchors.inlineDialog(),n,e.ariaAttrs):void 0!==e&&"cursor"===e.inline?r(t,R.shared.anchors.cursor(),n,e.ariaAttrs):o(t,n)},openUrl:function(t,e){return n=e,jD.openUrl(function(t){var e=CB(t,{closeWindow:function(){OE.hide(e.dialog),n(e.instanceApi)}},N,R);return OE.show(e.dialog),e.instanceApi},t);var n},alert:function(t,e){n.open(t,function(){e()})},close:function(t){t.close()},confirm:function(t,e){i.open(t,function(t){e(t)})}}}var _B=function e(t){function l(t){return e(t)}var f=0'+t+"");var r=S?S.createHTML(t):t;if(xt===yt)try{e=(new p).parseFromString(r,R)}catch(t){}if(!e||!e.documentElement){e=O.createDocument(xt,"template",null);try{e.documentElement.innerHTML=P?"":r}catch(t){}}var i=e.body||e.documentElement;return t&&o&&i.insertBefore(u.createTextNode(o),i.childNodes[0]||null),xt===yt?E.call(e,nt?"html":"body")[0]:nt?e.documentElement:i}function Mt(t){return _.call(t.ownerDocument||t,t,r.SHOW_ELEMENT|r.SHOW_COMMENT|r.SHOW_TEXT,null,!1)}function Ft(t){return"object"===iA(g)?t instanceof g:t&&"object"===iA(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName}function It(t,e,n){B[t]&&SA(B[t],function(t){t.call(l,e,n,St)})}function Rt(t){var e;if(It("beforeSanitizeElements",t,null),t instanceof s&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof c)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore))return Dt(t),1;if(AA(/[\u0080-\uFFFF]/,t.nodeName))return Dt(t),1;var n=N(t.nodeName);if(It("uponSanitizeElement",t,{tagName:n,allowedTags:G}),t.hasChildNodes()&&!Ft(t.firstElementChild)&&(!Ft(t.content)||!Ft(t.content.firstElementChild))&&AA(/<[/\w]/g,t.innerHTML)&&AA(/<[/\w]/g,t.textContent))return Dt(t),1;if("select"===n&&AA(/