diff --git a/frontend/webpack-stats.json b/frontend/webpack-stats.json index b23285488..a2a78c131 100644 --- a/frontend/webpack-stats.json +++ b/frontend/webpack-stats.json @@ -1 +1 @@ -{"status":"done","publicPath":"/static/sapl/frontend/","chunks":{"chunk-vendors":[{"name":"css/chunk-vendors.da853c1c.css","publicPath":"/static/sapl/frontend/css/chunk-vendors.da853c1c.css","path":"sapl/static/sapl/frontend/css/chunk-vendors.da853c1c.css"},{"name":"js/chunk-vendors.147fda66.js","publicPath":"/static/sapl/frontend/js/chunk-vendors.147fda66.js","path":"sapl/static/sapl/frontend/js/chunk-vendors.147fda66.js"},{"name":"css/chunk-vendors.da853c1c.css.map","publicPath":"/static/sapl/frontend/css/chunk-vendors.da853c1c.css.map","path":"sapl/static/sapl/frontend/css/chunk-vendors.da853c1c.css.map"},{"name":"js/chunk-vendors.147fda66.js.map","publicPath":"/static/sapl/frontend/js/chunk-vendors.147fda66.js.map","path":"sapl/static/sapl/frontend/js/chunk-vendors.147fda66.js.map"}],"compilacao":[{"name":"css/compilacao.90ba9ac3.css","publicPath":"/static/sapl/frontend/css/compilacao.90ba9ac3.css","path":"sapl/static/sapl/frontend/css/compilacao.90ba9ac3.css"},{"name":"js/compilacao.ae866d2d.js","publicPath":"/static/sapl/frontend/js/compilacao.ae866d2d.js","path":"sapl/static/sapl/frontend/js/compilacao.ae866d2d.js"},{"name":"css/compilacao.90ba9ac3.css.map","publicPath":"/static/sapl/frontend/css/compilacao.90ba9ac3.css.map","path":"sapl/static/sapl/frontend/css/compilacao.90ba9ac3.css.map"},{"name":"js/compilacao.ae866d2d.js.map","publicPath":"/static/sapl/frontend/js/compilacao.ae866d2d.js.map","path":"sapl/static/sapl/frontend/js/compilacao.ae866d2d.js.map"}],"global":[{"name":"css/global.cfffff0f.css","publicPath":"/static/sapl/frontend/css/global.cfffff0f.css","path":"sapl/static/sapl/frontend/css/global.cfffff0f.css"},{"name":"js/global.8d7024d2.js","publicPath":"/static/sapl/frontend/js/global.8d7024d2.js","path":"sapl/static/sapl/frontend/js/global.8d7024d2.js"},{"name":"css/global.cfffff0f.css.map","publicPath":"/static/sapl/frontend/css/global.cfffff0f.css.map","path":"sapl/static/sapl/frontend/css/global.cfffff0f.css.map"},{"name":"js/global.8d7024d2.js.map","publicPath":"/static/sapl/frontend/js/global.8d7024d2.js.map","path":"sapl/static/sapl/frontend/js/global.8d7024d2.js.map"}],"painel":[{"name":"css/painel.5d957a9b.css","publicPath":"/static/sapl/frontend/css/painel.5d957a9b.css","path":"sapl/static/sapl/frontend/css/painel.5d957a9b.css"},{"name":"js/painel.22053ae6.js","publicPath":"/static/sapl/frontend/js/painel.22053ae6.js","path":"sapl/static/sapl/frontend/js/painel.22053ae6.js"},{"name":"css/painel.5d957a9b.css.map","publicPath":"/static/sapl/frontend/css/painel.5d957a9b.css.map","path":"sapl/static/sapl/frontend/css/painel.5d957a9b.css.map"},{"name":"js/painel.22053ae6.js.map","publicPath":"/static/sapl/frontend/js/painel.22053ae6.js.map","path":"sapl/static/sapl/frontend/js/painel.22053ae6.js.map"}],"parlamentar":[{"name":"css/parlamentar.0e433876.css","publicPath":"/static/sapl/frontend/css/parlamentar.0e433876.css","path":"sapl/static/sapl/frontend/css/parlamentar.0e433876.css"},{"name":"js/parlamentar.e6a288dc.js","publicPath":"/static/sapl/frontend/js/parlamentar.e6a288dc.js","path":"sapl/static/sapl/frontend/js/parlamentar.e6a288dc.js"},{"name":"css/parlamentar.0e433876.css.map","publicPath":"/static/sapl/frontend/css/parlamentar.0e433876.css.map","path":"sapl/static/sapl/frontend/css/parlamentar.0e433876.css.map"},{"name":"js/parlamentar.e6a288dc.js.map","publicPath":"/static/sapl/frontend/js/parlamentar.e6a288dc.js.map","path":"sapl/static/sapl/frontend/js/parlamentar.e6a288dc.js.map"}]}} \ No newline at end of file +{"status":"done","publicPath":"/static/sapl/frontend/","chunks":{"chunk-vendors":[{"name":"css/chunk-vendors.da853c1c.css","publicPath":"/static/sapl/frontend/css/chunk-vendors.da853c1c.css","path":"sapl/static/sapl/frontend/css/chunk-vendors.da853c1c.css"},{"name":"js/chunk-vendors.926da1dd.js","publicPath":"/static/sapl/frontend/js/chunk-vendors.926da1dd.js","path":"sapl/static/sapl/frontend/js/chunk-vendors.926da1dd.js"},{"name":"css/chunk-vendors.da853c1c.css.map","publicPath":"/static/sapl/frontend/css/chunk-vendors.da853c1c.css.map","path":"sapl/static/sapl/frontend/css/chunk-vendors.da853c1c.css.map"},{"name":"js/chunk-vendors.926da1dd.js.map","publicPath":"/static/sapl/frontend/js/chunk-vendors.926da1dd.js.map","path":"sapl/static/sapl/frontend/js/chunk-vendors.926da1dd.js.map"}],"compilacao":[{"name":"css/compilacao.90ba9ac3.css","publicPath":"/static/sapl/frontend/css/compilacao.90ba9ac3.css","path":"sapl/static/sapl/frontend/css/compilacao.90ba9ac3.css"},{"name":"js/compilacao.ae866d2d.js","publicPath":"/static/sapl/frontend/js/compilacao.ae866d2d.js","path":"sapl/static/sapl/frontend/js/compilacao.ae866d2d.js"},{"name":"css/compilacao.90ba9ac3.css.map","publicPath":"/static/sapl/frontend/css/compilacao.90ba9ac3.css.map","path":"sapl/static/sapl/frontend/css/compilacao.90ba9ac3.css.map"},{"name":"js/compilacao.ae866d2d.js.map","publicPath":"/static/sapl/frontend/js/compilacao.ae866d2d.js.map","path":"sapl/static/sapl/frontend/js/compilacao.ae866d2d.js.map"}],"global":[{"name":"css/global.cfffff0f.css","publicPath":"/static/sapl/frontend/css/global.cfffff0f.css","path":"sapl/static/sapl/frontend/css/global.cfffff0f.css"},{"name":"js/global.8d7024d2.js","publicPath":"/static/sapl/frontend/js/global.8d7024d2.js","path":"sapl/static/sapl/frontend/js/global.8d7024d2.js"},{"name":"css/global.cfffff0f.css.map","publicPath":"/static/sapl/frontend/css/global.cfffff0f.css.map","path":"sapl/static/sapl/frontend/css/global.cfffff0f.css.map"},{"name":"js/global.8d7024d2.js.map","publicPath":"/static/sapl/frontend/js/global.8d7024d2.js.map","path":"sapl/static/sapl/frontend/js/global.8d7024d2.js.map"}],"painel":[{"name":"css/painel.5d957a9b.css","publicPath":"/static/sapl/frontend/css/painel.5d957a9b.css","path":"sapl/static/sapl/frontend/css/painel.5d957a9b.css"},{"name":"js/painel.22053ae6.js","publicPath":"/static/sapl/frontend/js/painel.22053ae6.js","path":"sapl/static/sapl/frontend/js/painel.22053ae6.js"},{"name":"css/painel.5d957a9b.css.map","publicPath":"/static/sapl/frontend/css/painel.5d957a9b.css.map","path":"sapl/static/sapl/frontend/css/painel.5d957a9b.css.map"},{"name":"js/painel.22053ae6.js.map","publicPath":"/static/sapl/frontend/js/painel.22053ae6.js.map","path":"sapl/static/sapl/frontend/js/painel.22053ae6.js.map"}],"parlamentar":[{"name":"css/parlamentar.0e433876.css","publicPath":"/static/sapl/frontend/css/parlamentar.0e433876.css","path":"sapl/static/sapl/frontend/css/parlamentar.0e433876.css"},{"name":"js/parlamentar.e6a288dc.js","publicPath":"/static/sapl/frontend/js/parlamentar.e6a288dc.js","path":"sapl/static/sapl/frontend/js/parlamentar.e6a288dc.js"},{"name":"css/parlamentar.0e433876.css.map","publicPath":"/static/sapl/frontend/css/parlamentar.0e433876.css.map","path":"sapl/static/sapl/frontend/css/parlamentar.0e433876.css.map"},{"name":"js/parlamentar.e6a288dc.js.map","publicPath":"/static/sapl/frontend/js/parlamentar.e6a288dc.js.map","path":"sapl/static/sapl/frontend/js/parlamentar.e6a288dc.js.map"}]}} \ No newline at end of file diff --git a/package.json b/package.json index 6245770d7..622b2428d 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@fortawesome/fontawesome-free": "^5.13.0", - "axios": "^0.21.1", + "axios": "^0.21.4", "axios-progress-bar": "^1.2.0", "bootstrap": "^4.6.0", "bootstrap-vue": "^2.21.2", diff --git a/sapl/static/sapl/frontend/js/chunk-vendors.147fda66.js b/sapl/static/sapl/frontend/js/chunk-vendors.147fda66.js deleted file mode 100644 index 11c838324..000000000 --- a/sapl/static/sapl/frontend/js/chunk-vendors.147fda66.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see chunk-vendors.147fda66.js.LICENSE */ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"030f":function(t,e,n){(function(t){(function(){"use strict";var e=function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},n=function(t){return function(n){return e(n)===t}},r=function(t){return function(e){return typeof e===t}},o=function(t){return function(e){return t===e}},i=n("string"),a=n("object"),u=n("array"),s=o(null),c=r("boolean"),l=o(void 0),f=function(t){return null===t||void 0===t},d=function(t){return!f(t)},h=r("function"),p=r("number"),m=function(t,e){if(u(t)){for(var n=0,r=t.length;n-1},U=function(t,e){for(var n=0,r=t.length;n=0;n--){var r=t[n];e(r,n)}},X=function(t,e){for(var n=[],r=[],o=0,i=t.length;o=0&&e0?At.svalue(Jt(e,Qt.apply(void 0,t))):At.svalue(e)},ue=function(t){return b(At.serror,rt)(t)},se=function(t,e){var n=At.partition(t);return n.errors.length>0?ue(n.errors):ae(n.values,e)},ce=function(t){var e=At.partition(t);return e.errors.length>0?ue(e.errors):At.svalue(e.values)},le={consolidateObj:se,consolidateArr:ce},fe=function(t){return a(t)&&zt(t).length>100?" removed due to size":JSON.stringify(t,null,2)},de=function(t){var e=t.length>10?t.slice(0,10).concat([{path:[],getErrorInfo:w("... (only showing first ten failures)")}]):t;return q(e,(function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}))},he=function(t,e){return At.serror([{path:t,getErrorInfo:e}])},pe=function(t,e,n){return he(t,(function(){return'Could not find valid *required* value for "'+e+'" in '+fe(n)}))},me=function(t,e){return he(t,(function(){return'Choice schema did not contain choice key: "'+e+'"'}))},ge=function(t,e,n){return he(t,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+fe(e)}))},ve=function(t,e){return he(t,(function(){return"There are unsupported fields: ["+e.join(", ")+"] specified"}))},be=function(t,e){return he(t,w(e))},ye=function(t){var e=function(e,n){return At.bindError(t(n),(function(t){return be(e,t)}))},n=w("val");return{extract:e,toString:n}},we=ye(At.svalue),_e=function(t,e,n,r){return $t(e,n).fold((function(){return pe(t,n,e)}),r)},xe=function(t,e,n,r){var o=$t(t,e).getOrThunk((function(){return n(t)}));return r(o)},Ce=function(t,e,n){return n($t(t,e))},ke=function(t,e,n,r){var o=$t(t,e).map((function(e){return!0===e?n(t):e}));return r(o)},Se=function(t,e,n,r,o){var i=function(t){return o.extract(e.concat([r]),t)},a=function(t){return t.fold((function(){return At.svalue(L.none())}),(function(t){var n=o.extract(e.concat([r]),t);return At.map(n,L.some)}))};switch(t.tag){case"required":return _e(e,n,r,i);case"defaultedThunk":return xe(n,r,t.process,i);case"option":return Ce(n,r,a);case"defaultedOptionThunk":return ke(n,r,t.process,a);case"mergeWithThunk":return xe(n,r,w({}),(function(e){var r=Jt(t.process(n),e);return i(r)}))}},Te=function(t,e,n){for(var r={},o=[],i=0,a=n;i0?At.serror(o):At.svalue(r)},De=function(t){var e=function(e,n){return t().extract(e,n)},n=function(){return t().toString()};return{extract:e,toString:n}},Oe=function(t){return zt(jt(t,d))},Ee=function(t){var e=Ae(t),n=Q(t,(function(t,e){return Rt(e,(function(e){var n;return Jt(t,(n={},n[e]=!0,n))}),w(t))}),{}),r=function(t,r){var o=c(r)?[]:Oe(r),i=J(o,(function(t){return!qt(n,t)}));return 0===i.length?e.extract(t,r):ve(t,i)};return{extract:r,toString:e.toString}},Ae=function(t){var e=function(e,n){return Te(e,n,t)},n=function(){var e=q(t,(function(t){return Rt(t,(function(t,e,n,r){return t+" -> "+r.toString()}),(function(t,e){return"state("+t+")"}))}));return"obj{\n"+e.join("\n")+"}"};return{extract:e,toString:n}},Me=function(t){var e=function(e,n){var r=q(n,(function(n,r){return t.extract(e.concat(["["+r+"]"]),n)}));return le.consolidateArr(r)},n=function(){return"array("+t.toString()+")"};return{extract:e,toString:n}},Ne=function(t){var e=function(e,n){for(var r=[],o=0,i=t;o1)throw new Error("HTML must have a single root node");return Hn(r.childNodes[0])},Ln=function(t,e){var n=e||document,r=n.createElement(t);return Hn(r)},Bn=function(t,e){var n=e||document,r=n.createTextNode(t);return Hn(r)},Hn=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},Fn=function(t,e,n){return L.from(t.dom.elementFromPoint(e,n)).map(Hn)},jn={fromHtml:In,fromTag:Ln,fromText:Bn,fromDom:Hn,fromPoint:Fn},Vn=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),u=a||r("(pointer:coarse)"),s=o||!i&&a&&r("(min-device-width:768px)"),c=i||a&&!s,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!c&&!s&&!l;return{isiPad:w(o),isiPhone:w(i),isTablet:w(s),isPhone:w(c),isTouch:w(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:w(l),isDesktop:w(f)}},Wn=function(t,e){for(var n=0;n=e.length&&t.substr(n,n+e.length)===e},nr=function(t,e){return ir(t,e)?tr(t,e.length):t},rr=function(t,e){return ar(t,e)?t:Zn(t,e)},or=function(t,e){return-1!==t.indexOf(e)},ir=function(t,e){return er(t,e,0)},ar=function(t,e){return er(t,e,t.length-e.length)},ur=function(t){return function(e){return e.replace(t,"")}},sr=ur(/^\s+|\s+$/g),cr=function(t){return t.length>0},lr=function(t){return!cr(t)},fr=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,dr=function(t){return function(e){return or(e,t)}},hr=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return or(t,"edge/")&&or(t,"chrome")&&or(t,"safari")&&or(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,fr],search:function(t){return or(t,"chrome")&&!or(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return or(t,"msie")||or(t,"trident")}},{name:"Opera",versionRegexes:[fr,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:dr("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:dr("firefox")},{name:"Safari",versionRegexes:[fr,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(or(t,"safari")||or(t,"mobile/"))&&or(t,"applewebkit")}}],pr=[{name:"Windows",search:dr("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return or(t,"iphone")||or(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:dr("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:dr("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:dr("linux"),versionRegexes:[]},{name:"Solaris",search:dr("sunos"),versionRegexes:[]},{name:"FreeBSD",search:dr("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:dr("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],mr={browsers:w(hr),oses:w(pr)},gr="Edge",vr="Chrome",br="IE",yr="Opera",wr="Firefox",_r="Safari",xr=function(){return Cr({current:void 0,version:Gn.unknown()})},Cr=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(gr),isChrome:r(vr),isIE:r(br),isOpera:r(yr),isFirefox:r(wr),isSafari:r(_r)}},kr={unknown:xr,nu:Cr,edge:w(gr),chrome:w(vr),ie:w(br),opera:w(yr),firefox:w(wr),safari:w(_r)},Sr="Windows",Tr="iOS",Dr="Android",Or="Linux",Er="OSX",Ar="Solaris",Mr="FreeBSD",Nr="ChromeOS",Rr=function(){return zr({current:void 0,version:Gn.unknown()})},zr=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(Sr),isiOS:r(Tr),isAndroid:r(Dr),isOSX:r(Er),isLinux:r(Or),isSolaris:r(Ar),isFreeBSD:r(Mr),isChromeOS:r(Nr)}},Pr={unknown:Rr,nu:zr,windows:w(Sr),ios:w(Tr),android:w(Dr),linux:w(Or),osx:w(Er),solaris:w(Ar),freebsd:w(Mr),chromeos:w(Nr)},Ir=function(t,e,n){var r=mr.browsers(),o=mr.oses(),i=e.bind((function(t){return Kn(r,t)})).orThunk((function(){return Jn(r,t)})).fold(kr.unknown,kr.nu),a=Qn(o,t).fold(Pr.unknown,Pr.nu),u=Vn(a,i,t,n);return{browser:i,os:a,deviceType:u}},Lr={detect:Ir},Br=function(t){return window.matchMedia(t).matches},Hr=Zt((function(){return Lr.detect(navigator.userAgent,L.from(navigator.userAgentData),Br)})),Fr=function(){return Hr()},jr=function(t,e,n){return 0!==(t.compareDocumentPosition(e)&n)},Vr=function(t,e){return jr(t,e,Node.DOCUMENT_POSITION_CONTAINED_BY)},Wr=9,Ur=11,$r=1,Yr=3,qr=function(t,e){var n=t.dom;if(n.nodeType!==$r)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},Gr=function(t){return t.nodeType!==$r&&t.nodeType!==Wr&&t.nodeType!==Ur||0===t.childElementCount},Kr=function(t,e){var n=void 0===e?document:e.dom;return Gr(n)?[]:q(n.querySelectorAll(t),jn.fromDom)},Xr=function(t,e){var n=void 0===e?document:e.dom;return Gr(n)?L.none():L.from(n.querySelector(t)).map(jn.fromDom)},Jr=function(t,e){return t.dom===e.dom},Qr=function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)},Zr=function(t,e){return Vr(t.dom,e.dom)},to=function(t,e){return Fr().browser.isIE()?Zr(t,e):Qr(t,e)},eo=function(t){if(!u(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return G(t,(function(r,o){var i=zt(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],s=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!u(s))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r0?fo(n.errors):lo(n.values,e)},po=function(t){return h(t)?t:T},mo=function(t,e,n){var r=t.dom,o=po(n);while(r.parentNode){r=r.parentNode;var i=jn.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return L.none()},go=function(t,e,n){var r=e(t),o=po(n);return r.orThunk((function(){return o(t)?L.none():mo(t,e,o)}))},vo=function(t,e){return Jr(t.element,e.event.target)},bo={can:D,abort:T,run:g},yo=function(t){if(!qt(t,"can")&&!qt(t,"abort")&&!qt(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return E(E({},bo),t)},wo=function(t,e){return function(){for(var n=[],r=0;r0&&e0&&ka(t,e),Da(t)},Ea=function(t,e){var n=e||document,r=n.createElement("div");return r.innerHTML=t,oa(jn.fromDom(r))},Aa=function(t){return t.dom.innerHTML},Ma=function(t,e){var n=Xi(t),r=n.dom,o=jn.fromDom(r.createDocumentFragment()),i=Ea(e,r);Sa(o,i),Ta(t),xa(t,o)},Na=function(t){var e=jn.fromTag("div"),n=jn.fromDom(t.dom.cloneNode(!0));return xa(e,n),Aa(e)},Ra=function(t,e,n){if(!(i(n)||c(n)||p(n)))throw new Error("Attribute value was not simple");t.setAttribute(e,n+"")},za=function(t,e,n){Ra(t.dom,e,n)},Pa=function(t,e){var n=t.dom;It(e,(function(t,e){Ra(n,e,t)}))},Ia=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},La=function(t,e){return L.from(Ia(t,e))},Ba=function(t,e){var n=t.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(e)},Ha=function(t,e){t.dom.removeAttribute(e)},Fa=function(t,e){return jn.fromDom(t.dom.cloneNode(e))},ja=function(t){return Fa(t,!1)},Va=function(t){if(ca(t))return"#shadow-root";var e=ja(t);return Na(e)},Wa=function(t){return Va(t)},Ua=function(t,e,n){return Jr(e,t.element)&&!Jr(e,n)},$a=ki([Ti(qo(),(function(t,e){var n=e.event,r=n.originator,o=n.target;return!Ua(t,r,o)}))]),Ya=Object.freeze({__proto__:null,events:$a}),qa=0,Ga=function(t){var e=new Date,n=e.getTime(),r=Math.floor(1e9*Math.random());return qa++,t+"_"+r+qa+String(n)},Ka=w("alloy-id-"),Xa=w("data-alloy-id"),Ja=Ka(),Qa=Xa(),Za=function(t,e){var n=Ga(Ja+t);return tu(e,n),n},tu=function(t,e){Object.defineProperty(t.dom,Qa,{value:e,writable:!0})},eu=function(t){var e=Yi(t)?t.dom[Qa]:null;return L.from(e)},nu=function(t){return Ga(t)},ru=_,ou=function(t){var e=function(e){return"The component must be in a context to execute: "+e+(t?"\n"+Wa(t().element)+" is not in context.":"")},n=function(t){return function(){throw new Error(e(t))}},r=function(t){return function(){}};return{debugInfo:w("fake"),triggerEvent:r("triggerEvent"),triggerFocus:r("triggerFocus"),triggerEscape:r("triggerEscape"),broadcast:r("broadcast"),broadcastOn:r("broadcastOn"),broadcastEvent:r("broadcastEvent"),build:n("build"),addToWorld:n("addToWorld"),removeFromWorld:n("removeFromWorld"),addToGui:n("addToGui"),removeFromGui:n("removeFromGui"),getByUid:n("getByUid"),getByDom:n("getByDom"),isConnected:T}},iu=ou(),au=function(t,e,n){var r=n.toString(),o=r.indexOf(")")+1,i=r.indexOf("("),a=r.substring(i+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:uu(a.slice(0,1).concat(a.slice(3)))}},t},uu=function(t){return q(t,(function(t){return ar(t,"/*")?t.substring(0,t.length-"/*".length):t}))},su=function(t,e){var n=t.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:uu(i)}},t},cu=function(t,e){var n=e.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:uu(i.slice(1))}},t},lu=Ga("alloy-premade"),fu=function(t){return so(lu,t)},du=function(t){return $t(t,lu)},hu=function(t){return cu((function(e){for(var n=[],r=1;r1?J(e[n],(function(e){return U(t,(function(t){return t.name===e}))})).join(" > "):t[0].name;return so(n,ku(o,i))}))}));return ho(n,{})},Iu="alloy.base.behaviour",Lu=Ae([nn("dom","dom",te(),Ae([an("tag"),Sn("styles",{}),Sn("classes",[]),Sn("attributes",{}),vn("value"),vn("innerHtml")])),an("components"),an("uid"),Sn("events",{}),Sn("apis",{}),nn("eventOrder","eventOrder",ie((Vi={},Vi[Jo()]=["disabling",Iu,"toggling","typeaheadevents"],Vi[qo()]=[Iu,"focusing","keying"],Vi[ri()]=[Iu,"disabling","toggling","representing"],Vi[Bo()]=[Iu,"representing","streaming","invalidating"],Vi[ci()]=[Iu,"representing","item-events","tooltipping"],Vi[Eo()]=["focusing",Iu,"item-type-events"],Vi[So()]=["focusing",Iu,"item-type-events"],Vi[Ro()]=["item-type-events","tooltipping"],Vi[Xo()]=["receiving","reflecting","tooltipping"],Vi)),Ie()),vn("domModification")]),Bu=function(t){return Xe("custom.definition",Lu,t)},Hu=function(t){return E(E({},t.dom),{uid:t.uid,domChildren:q(t.components,(function(t){return t.element}))})},Fu=function(t){return t.domModification.fold((function(){return wu({})}),wu)},ju=function(t){return t.events},Vu=function(t,e){var n=Ia(t,e);return void 0===n||""===n?[]:n.split(" ")},Wu=function(t,e,n){var r=Vu(t,e),o=r.concat([n]);return za(t,e,o.join(" ")),!0},Uu=function(t,e,n){var r=J(Vu(t,e),(function(t){return t!==n}));return r.length>0?za(t,e,r.join(" ")):Ha(t,e),!1},$u=function(t){return void 0!==t.dom.classList},Yu=function(t){return Vu(t,"class")},qu=function(t,e){return Wu(t,"class",e)},Gu=function(t,e){return Uu(t,"class",e)},Ku=function(t,e){$u(t)?t.dom.classList.add(e):qu(t,e)},Xu=function(t){var e=$u(t)?t.dom.classList:Yu(t);0===e.length&&Ha(t,"class")},Ju=function(t,e){if($u(t)){var n=t.dom.classList;n.remove(e)}else Gu(t,e);Xu(t)},Qu=function(t,e){return $u(t)&&t.dom.classList.contains(e)},Zu=function(t,e){G(e,(function(e){Ku(t,e)}))},ts=function(t,e){G(e,(function(e){Ju(t,e)}))},es=function(t,e){return it(e,(function(e){return Qu(t,e)}))},ns=function(t,e,n){return void 0===n&&(n=x),t.exists((function(t){return n(t,e)}))},rs=function(t,e,n){return void 0===n&&(n=x),as(t,e,n).getOr(t.isNone()&&e.isNone())},os=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r0}))},xs=function(t){var e={},n=t.dom;if(ls(n))for(var r=0;r0?xu(n,i,e,r):o;return _u(r,a)},Rs=function(t,e,n){var r={"alloy.base.behaviour":ju(t)};return Mu(n,t.eventOrder,e,r).getOrDie()},zs=function(t){var e=function(){return y},n=Pn(iu),r=Je(Bu(t)),o=Ms(t),i=vu(o),a=bu(o),u=Ns(r,i,a),s=Os(u),c=Rs(r,i,a),l=Pn(r.components),f=function(t){n.set(t)},d=function(){n.set(ou(e))},p=function(){var t=oa(s),e=ot(t,(function(t){return n.get().getByDom(t).fold((function(){return[]}),ct)}));l.set(e)},m=function(e){var n=a,r=h(n[e.name()])?n[e.name()]:function(){throw new Error("Could not find "+e.name()+" in "+JSON.stringify(t,null,2))};return r()},g=function(t){return h(a[t.name()])},v=function(){return r.apis},b=function(t){return a[t]().map((function(t){return t.state.readState()})).getOr("not enabled")},y={uid:t.uid,getSystem:n.get,config:m,hasConfigured:g,spec:t,readState:b,getApis:v,connect:f,disconnect:d,element:s,syncComponents:p,components:l.get,events:c};return y},Ps=function(t){var e=$t(t,"components").getOr([]);return q(e,js)},Is=function(t){var e=ru(t),n=e.events,r=A(e,["events"]),o=Ps(r),i=E(E({},r),{events:E(E({},Ya),n),components:o});return yt.value(zs(i))},Ls=function(t){var e=jn.fromText(t);return Bs({element:e})},Bs=function(t){var e=Qe("external.component",Ee([an("element"),vn("uid")]),t),n=Pn(ou()),r=function(t){n.set(t)},o=function(){n.set(ou((function(){return a})))},i=e.uid.getOrThunk((function(){return nu("external")}));tu(e.element,i);var a={uid:i,getSystem:n.get,config:L.none,hasConfigured:T,connect:r,disconnect:o,getApis:function(){return{}},element:e.element,spec:t,readState:w("No state"),syncComponents:g,components:w([]),events:{}};return fu(a)},Hs=nu,Fs=function(t){return Yt(t,"uid")},js=function(t){return du(t).getOrThunk((function(){var e=Fs(t)?t:E({uid:Hs("")},t);return Is(e).getOrDie()}))},Vs=fu,Ws=function(t,e){var n=function(e,n){if(!p(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;ls(r)&&(r.style[t]=n+"px")},r=function(n){var r=e(n);if(r<=0||null===r){var o=ys(n,t);return parseFloat(o)||0}return r},o=r,i=function(t,e){return Z(e,(function(e,n){var r=ys(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)},a=function(t,e,n){var r=i(t,n),o=e>r?e-r:0;return o};return{set:n,get:r,getOuter:o,aggregate:i,max:a}},Us=Ws("height",(function(t){var e=t.dom;return fs(t)?e.getBoundingClientRect().height:e.offsetHeight})),$s=function(t){return Us.get(t)},Ys=function(t){return Us.getOuter(t)},qs=function(t,e){var n=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],r=Us.max(t,e,n);gs(t,"max-height",r+"px")},Gs=function(t,e){var n=function(n,r){return Gs(t+n,e+r)};return{left:t,top:e,translate:n}},Ks=Gs,Xs=function(t){var e=t.getBoundingClientRect();return Ks(e.left,e.top)},Js=function(t,e){return void 0!==t?t:void 0!==e?e:0},Qs=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return Ks(n.offsetLeft,n.offsetTop);var i=Js(null===r||void 0===r?void 0:r.pageYOffset,o.scrollTop),a=Js(null===r||void 0===r?void 0:r.pageXOffset,o.scrollLeft),u=Js(o.clientTop,n.clientTop),s=Js(o.clientLeft,n.clientLeft);return Zs(t).translate(a-s,i-u)},Zs=function(t){var e=t.dom,n=e.ownerDocument,r=n.body;return r===e?Ks(r.offsetLeft,r.offsetTop):fs(t)?Xs(e):Ks(0,0)},tc=Ws("width",(function(t){return t.dom.offsetWidth})),ec=function(t,e){return tc.set(t,e)},nc=function(t){return tc.get(t)},rc=function(t){return tc.getOuter(t)},oc=function(t,e){var n=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],r=tc.max(t,e,n);gs(t,"max-width",r+"px")},ic=function(t,e,n,r,o,i,a){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:a}},ac=function(t){var e=jn.fromDom(va(t).getOr(t.target)),n=function(){return t.stopPropagation()},r=function(){return t.preventDefault()},o=b(r,n);return ic(e,t.clientX,t.clientY,n,r,o,t)},uc=function(t,e){return function(n){t(n)&&e(ac(n))}},sc=function(t,e,n,r,o){var i=uc(n,r);return t.dom.addEventListener(e,i,o),{unbind:C(fc,t,e,i,o)}},cc=function(t,e,n,r){return sc(t,e,n,r,!1)},lc=function(t,e,n,r){return sc(t,e,n,r,!0)},fc=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},dc=function(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return Ks(n,r)},hc=function(t,e,n){var r=void 0!==n?n.dom:document,o=r.defaultView;o&&o.scrollTo(t,e)},pc=function(t){var e=void 0===t?window:t;return L.from(e["visualViewport"])},mc=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},gc=function(t){var e=void 0===t?window:t,n=e.document,r=dc(jn.fromDom(n));return pc(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return mc(r.left,r.top,n,o)}),(function(t){return mc(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},vc=function(t,e){var n=t.view(e);return n.fold(w([]),(function(e){var n=t.owner(e),r=vc(t,n);return[e].concat(r)}))},bc=function(t,e){var n=e.owner(t),r=vc(e,n);return L.some(r)},yc=function(t){var e,n=t.dom===document?L.none():L.from(null===(e=t.dom.defaultView)||void 0===e?void 0:e.frameElement);return n.map(jn.fromDom)},wc=function(t){return Xi(t)},_c=Object.freeze({__proto__:null,view:yc,owner:wc}),xc=function(t){var e=jn.fromDom(document),n=dc(e),r=bc(t,_c);return r.fold(C(Qs,t),(function(e){var r=Zs(t),o=Q(e,(function(t,e){var n=Zs(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return Ks(o.left+r.left+n.left,o.top+r.top+n.top)}))},Cc=function(t,e,n){return{point:t,width:e,height:n}},kc=function(t,e,n,r){return{x:t,y:e,width:n,height:r}},Sc=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Tc=function(t){var e=Qs(t),n=rc(t),r=Ys(t);return Sc(e.left,e.top,n,r)},Dc=function(t){var e=xc(t),n=rc(t),r=Ys(t);return Sc(e.left,e.top,n,r)},Oc=function(){return gc(window)};function Ec(t,e,n,r,o){return t(n,r)?L.some(n):h(o)&&o(n)?L.none():e(n,r,o)}var Ac,Mc=function(t,e,n){var r=t.dom,o=h(n)?n:T;while(r.parentNode){r=r.parentNode;var i=jn.fromDom(r);if(e(i))return L.some(i);if(o(i))break}return L.none()},Nc=function(t,e,n){var r=function(t,e){return e(t)};return Ec(r,Mc,t,e,n)},Rc=function(t,e){var n=function(t){return e(jn.fromDom(t))},r=et(t.dom.childNodes,n);return r.map(jn.fromDom)},zc=function(t,e){var n=function(t){for(var r=0;r-1}));return e.bind((function(t){var e=Ia(t,"id"),n=da(t);return Bc(n,'[aria-owns="'+e+'"]')}))},jc=function(){var t=Ga("aria-owns"),e=function(e){za(e,"aria-owns",t)},n=function(t){Ha(t,"aria-owns")};return{id:t,link:e,unlink:n}},Vc=function(t,e){return Fc(e).exists((function(e){return Wc(t,e)}))},Wc=function(t,e){return Pc(e,(function(e){return Jr(e,t.element)}),T)||Vc(t,e)},Uc="unknown";(function(t){t[t["STOP"]=0]="STOP",t[t["NORMAL"]=1]="NORMAL",t[t["LOGGING"]=2]="LOGGING"})(Ac||(Ac={}));var $c=Pn({}),Yc=function(t,e){var n=[];(new Date).getTime();return{logEventCut:function(t,e,r){n.push({outcome:"cut",target:e,purpose:r})},logEventStopped:function(t,e,r){n.push({outcome:"stopped",target:e,purpose:r})},logNoParent:function(t,e,r){n.push({outcome:"no-parent",target:e,purpose:r})},logEventNoHandlers:function(t,e){n.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(t,e,r){n.push({outcome:"response",purpose:r,target:e})},write:function(){(new Date).getTime();W(["mousemove","mouseover","mouseout",ri()],t)}}},qc=function(t,e,n){var r=$t($c.get(),t).orThunk((function(){var e=zt($c.get());return mt(e,(function(e){return t.indexOf(e)>-1?L.some($c.get()[e]):L.none()}))})).getOr(Ac.NORMAL);switch(r){case Ac.NORMAL:return n(Qc());case Ac.LOGGING:var o=Yc(t,e),i=n(o);return o.write(),i;case Ac.STOP:return!0}},Gc=["alloy/data/Fields","alloy/debugging/Debugging"],Kc=function(){var t=new Error;if(void 0!==t.stack){var e=t.stack.split("\n");return et(e,(function(t){return t.indexOf("alloy")>0&&!U(Gc,(function(e){return t.indexOf(e)>-1}))})).getOr(Uc)}return Uc},Xc={logEventCut:g,logEventStopped:g,logNoParent:g,logEventNoHandlers:g,logEventResponse:g,write:g},Jc=function(t,e,n){return qc(t,e,n)},Qc=w(Xc),Zc=w([an("menu"),an("selectedMenu")]),tl=w([an("item"),an("selectedItem")]);w(Ae(tl().concat(Zc())));var el=w(Ae(tl())),nl=pn("initSize",[an("numColumns"),an("numRows")]),rl=function(){return un("markers",el())},ol=function(){return pn("markers",[an("backgroundMenu")].concat(Zc()).concat(tl()))},il=function(t){return pn("markers",q(t,an))},al=function(t,e,n){return Kc(),nn(e,e,n,qe((function(t){return yt.value((function(){for(var e=[],n=0;nr?n:o=n&&a<=o,h=u>=r&&u<=i,p=d&&h,m=s<=o&&s>=n,g=c<=i&&c>=r,v=m&&g,b=Math.min(l,a>=n?o-a:s-n),y=Math.min(f,u>=r?i-u:c-r);return{originInBounds:p,sizeInBounds:v,visibleW:b,visibleH:y}},Xf=function(t,e){var n=e.x,r=e.y,o=e.right,i=e.bottom,a=t.x,u=t.y,s=t.width,c=t.height,l=Math.max(n,o-s),f=Math.max(r,i-c),d=Ol(a,n,l),h=Ol(u,r,f),p=Math.min(d+s,o)-d,m=Math.min(h+c,i)-h;return Sc(d,h,p,m)},Jf=function(t,e,n){var r=w(e.bottom-n.y),o=w(n.bottom-e.y),i=vl(t,o,o,r),a=w(e.right-n.x),u=w(n.right-e.x),s=bl(t,u,u,a);return{maxWidth:s,maxHeight:i}},Qf=function(t,e,n,r){var o=t.bubble,i=o.offset,a=Ml(r,t.restriction,i),u=t.x+i.left,s=t.y+i.top,c=Sc(u,s,e,n),l=Kf(c,a),f=l.originInBounds,d=l.sizeInBounds,h=l.visibleW,p=l.visibleH,m=f&&d,g=m?c:Xf(c,a),v=g.width>0&&g.height>0,b=Jf(t.direction,g,r),y=b.maxWidth,w=b.maxHeight,_={rect:g,maxHeight:w,maxWidth:y,direction:t.direction,placement:t.placement,classes:{on:o.classesOn,off:o.classesOff},layout:t.label,testY:s};return m||t.alwaysFit?Gf.fit(_):Gf.nofit(_,h,p,v)},Zf=function(t,e,n,r,o,i){var a=r.width,u=r.height,s=function(e,s,c,l,f){var d=e(n,r,o,t,i),h=Qf(d,a,u,i);return h.fold(w(h),(function(t,e,n,r){var o=f===r?n>l||e>c:!f&&r;return o?h:Gf.nofit(s,c,l,f)}))},c=Z(e,(function(t,e){var n=C(s,e);return t.fold(w(t),n)}),Gf.nofit({rect:n,maxHeight:r.height,maxWidth:r.width,direction:yl(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:n.y},-1,-1,!1));return c.fold(_,_)},td=function(t){var e=Pn(L.none()),n=function(){return e.get().each(t)},r=function(){n(),e.set(L.none())},o=function(){return e.get().isSome()},i=function(){return e.get()},a=function(t){n(),e.set(L.some(t))};return{clear:r,isSet:o,get:i,set:a}},ed=function(){return td((function(t){return t.destroy()}))},nd=function(){return td((function(t){return t.unbind()}))},rd=function(){var t=td(g),e=function(e){return t.get().each(e)};return E(E({},t),{on:e})},od=D,id=function(t,e,n){return cc(t,e,od,n)},ad=function(t,e,n){return lc(t,e,od,n)},ud=ac,sd=["top","bottom","right","left"],cd="data-alloy-transition-timer",ld=function(t,e){return es(t,e.classes)},fd=function(t,e,n){return n.exists((function(n){var r=t.mode;return"all"===r||n[r]!==e[r]}))},dd=function(t,e){var n=function(t){return parseFloat(t).toPrecision(3)};return Wt(e,(function(e,r){var o=t[r].map(n),i=e.map(n);return!rs(o,i)})).isSome()},hd=function(t){var e=function(e){var n=ys(t,e),r=i(n)?n.split(/\s*,\s*/):[];return J(r,cr)},n=function(t){if(i(t)&&/^[\d.]+/.test(t)){var e=parseFloat(t);return ar(t,"ms")?e:1e3*e}return 0},r=e("transition-delay"),o=e("transition-duration");return Z(o,(function(t,e,o){var i=n(r[o])+n(e);return Math.max(t,i)}),0)},pd=function(t,e){var n,r=nd(),o=nd(),i=function(e){var n,r=null!==(n=e.raw.pseudoElement)&&void 0!==n?n:"";return Jr(e.target,t)&&lr(r)&&W(sd,e.raw.propertyName)},a=function(a){if(f(a)||i(a)){r.clear(),o.clear();var u=null===a||void 0===a?void 0:a.raw.type;(f(u)||u===Vo())&&(clearTimeout(n),Ha(t,cd),ts(t,e.classes))}},u=function(){r.set(id(t,Vo(),a)),o.set(id(t,jo(),a))};if("ontransitionstart"in t.dom)var s=id(t,Wo(),(function(t){i(t)&&(s.unbind(),u())}));else u();var c=hd(t);requestAnimationFrame((function(){n=setTimeout(a,c+17),za(t,cd,n)}))},md=function(t,e){Zu(t,e.classes),La(t,cd).each((function(e){clearTimeout(parseInt(e,10)),Ha(t,cd)})),pd(t,e)},gd=function(t,e,n,r,o,i){var a=fd(r,o,i);if(a||ld(t,r)){gs(t,"position",n.position);var u=Pf(e,t),s=zf(e,E(E({},o),{rect:u})),c=st(sd,(function(t){return s[t]}));dd(n,c)&&(bs(t,c),a&&md(t,r),Ss(t))}else ts(t,r.classes)},vd=function(t){return{width:rc(t),height:Ys(t)}},bd=function(t,e,n,r){ks(e,"max-height"),ks(e,"max-width");var o=vd(e);return Zf(e,r.preference,t,o,n,r.bounds)},yd=function(t,e){var n=e.classes;ts(t,n.off),Zu(t,n.on)},wd=function(t,e,n){var r=n.maxHeightFunction;r(t,e.maxHeight)},_d=function(t,e,n){var r=n.maxWidthFunction;r(t,e.maxWidth)},xd=function(t,e,n){var r=zf(n.origin,e);n.transition.each((function(o){gd(t,n.origin,r,o,e,n.lastPlacement)})),Mf(t,r)},Cd=function(t,e){$f(t,e.placement)},kd=function(t,e){qs(t,Math.floor(e))},Sd=w((function(t,e){kd(t,e),vs(t,{"overflow-x":"hidden","overflow-y":"auto"})})),Td=w((function(t,e){kd(t,e)})),Dd=function(t,e,n){return void 0===t[e]?n:t[e]},Od=function(t,e,n,r,o,i,a,u){var s=Dd(a,"maxHeightFunction",Sd()),c=Dd(a,"maxWidthFunction",g),l=t.anchorBox,f=t.origin,d={bounds:If(f,i),origin:f,preference:r,maxHeightFunction:s,maxWidthFunction:c,lastPlacement:o,transition:u};return Ed(l,e,n,d)},Ed=function(t,e,n,r){var o=bd(t,e,n,r);return xd(e,o,r),Cd(e,o),yd(e,o),wd(e,o,r),_d(e,o,r),{layout:o.layout,placement:o.placement}},Ad=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Md=function(t,e,n,r){void 0===r&&(r=1);var o=t*r,i=e*r,a=function(t){return $t(n,t).getOr([])},u=function(t,e,n){var r=ut(Ad,n);return{offset:Ks(t,e),classesOn:ot(n,a),classesOff:ot(r,a)}};return{southeast:function(){return u(-t,e,["top","alignLeft"])},southwest:function(){return u(t,e,["top","alignRight"])},south:function(){return u(-t/2,e,["top","alignCentre"])},northeast:function(){return u(-t,-e,["bottom","alignLeft"])},northwest:function(){return u(t,-e,["bottom","alignRight"])},north:function(){return u(-t/2,-e,["bottom","alignCentre"])},east:function(){return u(t,-e/2,["valignCentre","left"])},west:function(){return u(-t,-e/2,["valignCentre","right"])},insetNortheast:function(){return u(o,i,["top","alignLeft","inset"])},insetNorthwest:function(){return u(-o,i,["top","alignRight","inset"])},insetNorth:function(){return u(-o/2,i,["top","alignCentre","inset"])},insetSoutheast:function(){return u(o,-i,["bottom","alignLeft","inset"])},insetSouthwest:function(){return u(-o,-i,["bottom","alignRight","inset"])},insetSouth:function(){return u(-o/2,-i,["bottom","alignCentre","inset"])},insetEast:function(){return u(-o,-i/2,["valignCentre","right","inset"])},insetWest:function(){return u(o,-i/2,["valignCentre","left","inset"])}}},Nd=function(){return Md(0,0,{})},Rd=_,zd=function(t,e){return function(n){return"rtl"===Pd(n)?e:t}},Pd=function(t){return"rtl"===ys(t,"direction")?"rtl":"ltr"};(function(t){t["TopToBottom"]="toptobottom",t["BottomToTop"]="bottomtotop"})(Hf||(Hf={}));var Id="data-alloy-vertical-dir",Ld=function(t){return Pc(t,(function(t){return Yi(t)&&Ia(t,"data-alloy-vertical-dir")===Hf.BottomToTop}))},Bd=function(){return Cn("layouts",[an("onLtr"),an("onRtl"),vn("onBottomLtr"),vn("onBottomRtl")])},Hd=function(t,e,n,r,o,i,a){var u=a.map(Ld).getOr(!1),s=e.layouts.map((function(e){return e.onLtr(t)})),c=e.layouts.map((function(e){return e.onRtl(t)})),l=u?e.layouts.bind((function(e){return e.onBottomLtr.map((function(e){return e(t)}))})).or(s).getOr(o):s.getOr(n),f=u?e.layouts.bind((function(e){return e.onBottomRtl.map((function(e){return e(t)}))})).or(c).getOr(i):c.getOr(r),d=zd(l,f);return d(t)},Fd=function(t,e,n){var r=e.hotspot,o=Pf(n,r.element),i=Hd(t.element,e,Zl(),tf(),Jl(),Ql(),L.some(e.hotspot.element));return L.some(Rd({anchorBox:o,bubble:e.bubble.getOr(Nd()),overrides:e.overrides,layouts:i,placer:L.none()}))},jd=[an("hotspot"),vn("bubble"),Sn("overrides",{}),Bd(),fl("placement",Fd)],Vd=function(t,e,n){var r=Lf(n,e.x,e.y),o=Sc(r.left,r.top,e.width,e.height),i=Hd(t.element,e,Kl(),Xl(),Kl(),Xl(),L.none());return L.some(Rd({anchorBox:o,bubble:e.bubble,overrides:e.overrides,layouts:i,placer:L.none()}))},Wd=[an("x"),an("y"),Sn("height",0),Sn("width",0),Sn("bubble",Nd()),Sn("overrides",{}),Bd(),fl("placement",Vd)],Ud=no.generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),$d=function(t){return t.fold(_,(function(t,e,n){return t.translate(-e,-n)}))},Yd=function(t){return t.fold(_,_)},qd=function(t){return Z(t,(function(t,e){return t.translate(e.left,e.top)}),Ks(0,0))},Gd=function(t){var e=q(t,$d);return qd(e)},Kd=function(t){var e=q(t,Yd);return qd(e)},Xd=Ud.screen,Jd=Ud.absolute,Qd=function(t,e,n){var r=Zi(n.root).dom,o=function(e){var n=Xi(e),r=Xi(t.element);return Jr(n,r)};return L.from(r.frameElement).map(jn.fromDom).filter(o).map(Qs)},Zd=function(t,e,n){var r=Xi(t.element),o=dc(r),i=Qd(t,e,n).getOr(o);return Jd(i,o.left,o.top)},th=function(t,e,n,r){var o=Xd(Ks(t,e));return L.some(Cc(o,n,r))},eh=function(t,e,n,r,o){return t.map((function(t){var i=[e,t.point],a=Bf(r,(function(){return Kd(i)}),(function(){return Kd(i)}),(function(){return Gd(i)})),u=kc(a.left,a.top,t.width,t.height),s=n.showAbove?Jl():Zl(),c=n.showAbove?Ql():tf(),l=Hd(o,n,s,c,s,c,L.none());return Rd({anchorBox:u,bubble:n.bubble.getOr(Nd()),overrides:n.overrides,layouts:l,placer:L.none()})}))},nh=function(t,e,n){var r=Zd(t,n,e);return e.node.filter(fs).bind((function(o){var i=o.dom.getBoundingClientRect(),a=th(i.left,i.top,i.width,i.height),u=e.node.getOr(t.element);return eh(a,r,e,n,u)}))},rh=[an("node"),an("root"),vn("bubble"),Bd(),Sn("overrides",{}),Sn("showAbove",!1),fl("placement",nh)],oh="\ufeff",ih=" ",ah=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},uh={create:ah},sh=no.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),ch=function(t,e,n,r){return t.fold(e,n,r)},lh=function(t){return t.fold(_,_,_)},fh=sh.before,dh=sh.on,hh=sh.after,ph={before:fh,on:dh,after:hh,cata:ch,getStart:lh},mh=no.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),gh=function(t){return mh.exact(t.start,t.soffset,t.finish,t.foffset)},vh=function(t){return t.match({domRange:function(t){return jn.fromDom(t.startContainer)},relative:function(t,e){return ph.getStart(t)},exact:function(t,e,n,r){return t}})},bh=mh.domRange,yh=mh.relative,wh=mh.exact,_h=function(t){var e=vh(t);return Zi(e)},xh=uh.create,Ch={domRange:bh,relative:yh,exact:wh,exactFromRange:gh,getWin:_h,range:xh},kh=function(t,e){e.fold((function(e){t.setStartBefore(e.dom)}),(function(e,n){t.setStart(e.dom,n)}),(function(e){t.setStartAfter(e.dom)}))},Sh=function(t,e){e.fold((function(e){t.setEndBefore(e.dom)}),(function(e,n){t.setEnd(e.dom,n)}),(function(e){t.setEndAfter(e.dom)}))},Th=function(t,e,n){var r=t.document.createRange();return kh(r,e),Sh(r,n),r},Dh=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},Oh=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},Eh=function(t){var e=t.getClientRects(),n=e.length>0?e[0]:t.getBoundingClientRect();return n.width>0||n.height>0?L.some(n).map(Oh):L.none()},Ah=function(t){var e=t.getBoundingClientRect();return e.width>0||e.height>0?L.some(e).map(Oh):L.none()},Mh=no.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Nh=function(t,e,n){return e(jn.fromDom(n.startContainer),n.startOffset,jn.fromDom(n.endContainer),n.endOffset)},Rh=function(t,e){return e.match({domRange:function(t){return{ltr:w(t),rtl:L.none}},relative:function(e,n){return{ltr:Zt((function(){return Th(t,e,n)})),rtl:Zt((function(){return L.some(Th(t,n,e))}))}},exact:function(e,n,r,o){return{ltr:Zt((function(){return Dh(t,e,n,r,o)})),rtl:Zt((function(){return L.some(Dh(t,r,o,e,n))}))}}})},zh=function(t,e){var n=e.ltr();if(n.collapsed){var r=e.rtl().filter((function(t){return!1===t.collapsed}));return r.map((function(t){return Mh.rtl(jn.fromDom(t.endContainer),t.endOffset,jn.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return Nh(t,Mh.ltr,n)}))}return Nh(t,Mh.ltr,n)},Ph=function(t,e){var n=Rh(t,e);return zh(t,n)},Ih=function(t,e){var n=Ph(t,e);return n.match({ltr:function(e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},rtl:function(e,n,r,o){var i=t.document.createRange();return i.setStart(r.dom,o),i.setEnd(e.dom,n),i}})};Mh.ltr,Mh.rtl;var Lh,Bh=function(t,e){var n=function(n){if(!t(n))throw new Error("Can only get "+e+" value of a "+e+" node");return r(n).getOr("")},r=function(e){return t(e)?L.from(e.dom.nodeValue):L.none()},o=function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r};return{get:n,getOption:r,set:o}},Hh=Bh(qi,"text"),Fh=function(t){return Hh.get(t)},jh=function(t){return Hh.getOption(t)},Vh=function(t){return"img"===Wi(t)?1:jh(t).fold((function(){return oa(t).length}),(function(t){return t.length}))},Wh=function(t){return jh(t).filter((function(t){return 0!==t.trim().length||t.indexOf(ih)>-1})).isSome()},Uh=["img","br"],$h=function(t){var e=Wh(t);return e||W(Uh,Wi(t))},Yh=function(t){return qh(t,$h)},qh=function(t,e){var n=function(t){for(var r=oa(t),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return L.some(i);var a=n(i);if(a.isSome())return a}return L.none()};return n(t)},Gh=function(t,e){return Kr(e,t)},Kh=function(t,e,n,r){var o=Xi(t),i=o.dom.createRange();return i.setStart(t.dom,e),i.setEnd(n.dom,r),i},Xh=function(t,e,n,r){var o=Kh(t,e,n,r),i=Jr(t,n)&&e===r;return o.collapsed&&!i},Jh=function(t){return L.from(t.getSelection())},Qh=function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return L.some(uh.create(jn.fromDom(e.startContainer),e.startOffset,jn.fromDom(n.endContainer),n.endOffset))}return L.none()},Zh=function(t){if(null===t.anchorNode||null===t.focusNode)return Qh(t);var e=jn.fromDom(t.anchorNode),n=jn.fromDom(t.focusNode);return Xh(e,t.anchorOffset,n,t.focusOffset)?L.some(uh.create(e,t.anchorOffset,n,t.focusOffset)):Qh(t)},tp=function(t){return Jh(t).filter((function(t){return t.rangeCount>0})).bind(Zh)},ep=function(t,e){var n=Ih(t,e);return Eh(n)},np=function(t,e){var n=Ih(t,e);return Ah(n)},rp=function(t,e){return{element:t,offset:e}},op=function(t,e){var n=oa(t);if(0===n.length)return rp(t,e);if(e"})),Ie()),_g=rn("schema",(function(){return[vn("preprocess")]})),xg=Sn("defaults",w({})),Cg=Sn("overrides",w({})),kg=Ae([vg,bg,yg,wg,xg,Cg]),Sg=Ae([vg,bg,yg,xg,Cg]),Tg=Ae([vg,bg,yg,wg,xg,Cg]),Dg=Ae([vg,_g,yg,an("unit"),wg,xg,Cg]),Og=function(t){return t.fold(L.some,L.none,L.some,L.some)},Eg=function(t){var e=function(t){return t.name};return t.fold(e,e,e,e)},Ag=function(t){return t.fold(_,_,_,_)},Mg=function(t,e){return function(n){var r=Qe("Converting part type",e,n);return t(r)}},Ng=Mg(gg.required,kg),Rg=Mg(gg.external,Sg),zg=Mg(gg.optional,Tg),Pg=Mg(gg.group,Dg),Ig=w("entirety"),Lg=Object.freeze({__proto__:null,required:Ng,external:Rg,optional:zg,group:Pg,asNamedPart:Og,name:Eg,asCommon:Ag,original:Ig}),Bg=function(t,e,n,r){return Jt(e.defaults(t,n,r),n,{uid:t.partUids[e.name]},e.overrides(t,n,r))},Hg=function(t,e,n){var r={},o={};return G(n,(function(t){t.fold((function(t){r[t.pname]=hg(!0,(function(e,n,r){return t.factory.sketch(Bg(e,t,n,r))}))}),(function(t){var n=e.parts[t.name];o[t.name]=w(t.factory.sketch(Bg(e,t,n[Ig()]),n))}),(function(t){r[t.pname]=hg(!1,(function(e,n,r){return t.factory.sketch(Bg(e,t,n,r))}))}),(function(t){r[t.pname]=pg(!0,(function(e,n,r){var o=e[t.name];return q(o,(function(n){return t.factory.sketch(Jt(t.defaults(e,n,r),n,t.overrides(e,n)))}))}))}))})),{internals:w(r),externals:w(o)}},Fg=function(t,e){var n={};return G(e,(function(e){Og(e).each((function(e){var r=jg(t,e.pname);n[e.name]=function(n){var o=Qe("Part: "+e.name+" in "+t,Ae(e.schema),n);return E(E({},r),{config:n,validated:o})}}))})),n},jg=function(t,e){return{uiType:mg(),owner:t,name:e}},Vg=function(t,e,n){return{uiType:mg(),owner:t,name:e,config:n,validated:{}}},Wg=function(t){return ot(t,(function(t){return t.fold(L.none,L.some,L.none,L.none).map((function(t){return pn(t.name,t.schema.concat([dl(Ig())]))})).toArray()}))},Ug=function(t){return q(t,Eg)},$g=function(t,e,n){return Hg(t,e,n)},Yg=function(t,e,n){return dg(L.some(t),e,e.components,n)},qg=function(t,e,n){var r=e.partUids[n];return t.getSystem().getByUid(r).toOptional()},Gg=function(t,e,n){return qg(t,e,n).getOrDie("Could not find part: "+n)},Kg=function(t,e,n){var r={},o=e.partUids,i=t.getSystem();return G(n,(function(t){r[t]=w(i.getByUid(o[t]))})),r},Xg=function(t,e){var n=t.getSystem();return Lt(e.partUids,(function(t,e){return w(n.getByUid(t))}))},Jg=function(t){return zt(t.partUids)},Qg=function(t,e,n){var r={},o=e.partUids,i=t.getSystem();return G(n,(function(t){r[t]=w(i.getByUid(o[t]).getOrDie())})),r},Zg=function(t,e){var n=Ug(e);return co(q(n,(function(e){return{key:e,value:t+"-"+e}})))},tv=function(t){return nn("partUids","partUids",oe((function(e){return Zg(e.uid,t)})),Ie())},ev=Object.freeze({__proto__:null,generate:Fg,generateOne:Vg,schemas:Wg,names:Ug,substitutes:$g,components:Yg,defaultUids:Zg,defaultUidsSchema:tv,getAllParts:Xg,getAllPartNames:Jg,getPart:qg,getPartOrDie:Gg,getParts:Kg,getPartsOrDie:Qg}),nv=function(t,e){var n=t.length>0?[pn("parts",t)]:[];return n.concat([an("uid"),Sn("dom",{}),Sn("components",[]),dl("originalSpec"),Sn("debug.sketcher",{})]).concat(e)},rv=function(t,e,n,r,o){var i=nv(r,o);return Qe(t+" [SpecSchema]",Ee(i.concat(e)),n)},ov=function(t,e,n,r){var o=uv(r),i=rv(t,e,o,[],[]);return n(i,o)},iv=function(t,e,n,r,o){var i=uv(o),a=Wg(n),u=tv(n),s=rv(t,e,i,a,[u]),c=$g(t,s,n),l=Yg(t,s,c.internals());return r(s,l,i,c.externals())},av=function(t){return Yt(t,"uid")},uv=function(t){return av(t)?t:E(E({},t),{uid:nu("uid")})},sv=function(t){return void 0!==t.uid},cv=Ee([an("name"),an("factory"),an("configFields"),Sn("apis",{}),Sn("extraApis",{})]),lv=Ee([an("name"),an("factory"),an("configFields"),an("partFields"),Sn("apis",{}),Sn("extraApis",{})]),fv=function(t){var e=Qe("Sketcher for "+t.name,cv,t),n=function(t){return ov(e.name,e.configFields,e.factory,t)},r=Lt(e.apis,hu),o=Lt(e.extraApis,(function(t,e){return su(t,e)}));return E(E({name:e.name,configFields:e.configFields,sketch:n},r),o)},dv=function(t){var e=Qe("Sketcher for "+t.name,lv,t),n=function(t){return iv(e.name,e.configFields,e.partFields,e.factory,t)},r=Fg(e.name,e.partFields),o=Lt(e.apis,hu),i=Lt(e.extraApis,(function(t,e){return su(t,e)}));return E(E({name:e.name,partFields:e.partFields,configFields:e.configFields,sketch:n,parts:r},o),i)},hv=function(t){return"input"===Wi(t)&&"radio"!==Ia(t,"type")||"textarea"===Wi(t)},pv=function(t,e,n){return e.find(t)},mv=Object.freeze({__proto__:null,getCurrent:pv}),gv=[an("find")],vv=mf({fields:gv,name:"composing",apis:mv}),bv=["input","button","textarea","select"],yv=function(t,e,n){var r=e.disabled()?Dv:Ov;r(t,e)},wv=function(t,e){return!0===e.useNative&&W(bv,Wi(t.element))},_v=function(t){return Ba(t.element,"disabled")},xv=function(t){za(t.element,"disabled","disabled")},Cv=function(t){Ha(t.element,"disabled")},kv=function(t){return"true"===Ia(t.element,"aria-disabled")},Sv=function(t){za(t.element,"aria-disabled","true")},Tv=function(t){za(t.element,"aria-disabled","false")},Dv=function(t,e,n){e.disableClass.each((function(e){Ku(t.element,e)}));var r=wv(t,e)?xv:Sv;r(t),e.onDisabled(t)},Ov=function(t,e,n){e.disableClass.each((function(e){Ju(t.element,e)}));var r=wv(t,e)?Cv:Tv;r(t),e.onEnabled(t)},Ev=function(t,e){return wv(t,e)?_v(t):kv(t)},Av=function(t,e,n,r){var o=r?Dv:Ov;o(t,e)},Mv=Object.freeze({__proto__:null,enable:Ov,disable:Dv,isDisabled:Ev,onLoad:yv,set:Av}),Nv=function(t,e){return wu({classes:e.disabled()?e.disableClass.toArray():[]})},Rv=function(t,e){return ki([Si(Jo(),(function(e,n){return Ev(e,t)})),uf(t,e,yv)])},zv=Object.freeze({__proto__:null,exhibit:Nv,events:Rv}),Pv=[Mn("disabled",T),Sn("useNative",!0),vn("disableClass"),ul("onDisabled"),ul("onEnabled")],Iv=mf({fields:Pv,name:"disabling",active:zv,apis:Mv}),Lv=function(t,e,n,r){var o=Gh(t.element,"."+e.highlightClass);G(o,(function(n){U(r,(function(t){return t.element===n}))||(Ju(n,e.highlightClass),t.getSystem().getByDom(n).each((function(n){e.onDehighlight(t,n),bi(n,vi())})))}))},Bv=function(t,e,n){return Lv(t,e,n,[])},Hv=function(t,e,n,r){$v(t,e,n,r)&&(Ju(r.element,e.highlightClass),e.onDehighlight(t,r),bi(r,vi()))},Fv=function(t,e,n,r){Lv(t,e,n,[r]),$v(t,e,n,r)||(Ku(r.element,e.highlightClass),e.onHighlight(t,r),bi(r,gi()))},jv=function(t,e,n){Gv(t,e).each((function(r){Fv(t,e,n,r)}))},Vv=function(t,e,n){Kv(t,e).each((function(r){Fv(t,e,n,r)}))},Wv=function(t,e,n,r){qv(t,e,n,r).fold((function(t){throw t}),(function(r){Fv(t,e,n,r)}))},Uv=function(t,e,n,r){var o=Zv(t,e),i=et(o,r);i.each((function(r){Fv(t,e,n,r)}))},$v=function(t,e,n,r){return Qu(r.element,e.highlightClass)},Yv=function(t,e,n){return Bc(t.element,"."+e.highlightClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},qv=function(t,e,n,r){var o=Gh(t.element,"."+e.itemClass);return L.from(o[r]).fold((function(){return yt.error(new Error("No element found with index "+r))}),t.getSystem().getByDom)},Gv=function(t,e,n){return Bc(t.element,"."+e.itemClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Kv=function(t,e,n){var r=Gh(t.element,"."+e.itemClass),o=r.length>0?L.some(r[r.length-1]):L.none();return o.bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Xv=function(t,e,n,r){var o=Gh(t.element,"."+e.itemClass),i=nt(o,(function(t){return Qu(t,e.highlightClass)}));return i.bind((function(e){var n=Dl(e,r,0,o.length-1);return t.getSystem().getByDom(o[n]).toOptional()}))},Jv=function(t,e,n){return Xv(t,e,n,-1)},Qv=function(t,e,n){return Xv(t,e,n,1)},Zv=function(t,e,n){var r=Gh(t.element,"."+e.itemClass);return os(q(r,(function(e){return t.getSystem().getByDom(e).toOptional()})))},tb=Object.freeze({__proto__:null,dehighlightAll:Bv,dehighlight:Hv,highlight:Fv,highlightFirst:jv,highlightLast:Vv,highlightAt:Wv,highlightBy:Uv,isHighlighted:$v,getHighlighted:Yv,getFirst:Gv,getLast:Kv,getPrevious:Jv,getNext:Qv,getCandidates:Zv}),eb=[an("highlightClass"),an("itemClass"),ul("onHighlight"),ul("onDehighlight")],nb=mf({fields:eb,name:"highlighting",apis:tb}),rb=[8],ob=[9],ib=[13],ab=[27],ub=[32],sb=[37],cb=[38],lb=[39],fb=[40],db=function(t,e,n){var r=at(t.slice(0,e)),o=at(t.slice(e+1));return et(r.concat(o),n)},hb=function(t,e,n){var r=at(t.slice(0,e));return et(r,n)},pb=function(t,e,n){var r=t.slice(0,e),o=t.slice(e+1);return et(o.concat(r),n)},mb=function(t,e,n){var r=t.slice(e+1);return et(r,n)},gb=function(t){return function(e){var n=e.raw;return W(t,n.which)}},vb=function(t){return function(e){return it(t,(function(t){return t(e)}))}},bb=function(t){var e=t.raw;return!0===e.shiftKey},yb=function(t){var e=t.raw;return!0===e.ctrlKey},wb=k(bb),_b=function(t,e){return{matches:t,classification:e}},xb=function(t,e){var n=et(t,(function(t){return t.matches(e)}));return n.map((function(t){return t.classification}))},Cb=function(t,e,n){var r=e.exists((function(t){return n.exists((function(e){return Jr(e,t)}))}));r||yi(t,di(),{prevFocus:e,newFocus:n})},kb=function(){var t=function(t){return Df(t.element)},e=function(e,n){var r=t(e);e.getSystem().triggerFocus(n,e.element);var o=t(e);Cb(e,r,o)};return{get:t,set:e}},Sb=function(){var t=function(t){return nb.getHighlighted(t).map((function(t){return t.element}))},e=function(e,n){var r=t(e);e.getSystem().getByDom(n).fold(g,(function(t){nb.highlight(e,t)}));var o=t(e);Cb(e,r,o)};return{get:t,set:e}};(function(t){t["OnFocusMode"]="onFocus",t["OnEnterOrSpaceMode"]="onEnterOrSpace",t["OnApiMode"]="onApi"})(Lh||(Lh={}));var Tb=function(t,e,n,r,o){var i=function(){return t.concat([Sn("focusManager",kb()),Tn("focusInside","onFocus",qe((function(t){return W(["onFocus","onEnterOrSpace","onApi"],t)?yt.value(t):yt.error("Invalid value for focusInside")}))),fl("handler",s),fl("state",e),fl("sendFocusIn",o)])},a=function(t,e,n,r,o){var i=n(t,e,r,o);return xb(i,e.event).bind((function(n){return n(t,e,r,o)}))},u=function(t,e){var i=t.focusInside!==Lh.OnFocusMode?L.none():o(t).map((function(n){return Oi(qo(),(function(r,o){n(r,t,e),o.stop()}))})),u=function(n,r){var i=gb(ub.concat(ib))(r.event);t.focusInside===Lh.OnEnterOrSpaceMode&&i&&vo(n,r)&&o(t).each((function(o){o(n,t,e),r.stop()}))},s=[Oi(Io(),(function(r,o){a(r,o,n,t,e).fold((function(){u(r,o)}),(function(t){o.stop()}))})),Oi(Lo(),(function(n,o){a(n,o,r,t,e).each((function(t){o.stop()}))}))];return ki(i.toArray().concat(s))},s={schema:i,processKey:a,toEvents:u};return s},Db=function(t){var e=[vn("onEscape"),vn("onEnter"),Sn("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Sn("firstTabstop",0),Sn("useTabstopAt",D),vn("visibilitySelector")].concat([t]),n=function(t,e){var n=t.visibilitySelector.bind((function(t){return Hc(e,t)})).getOr(e);return $s(n)>0},r=function(t,e){var r=Gh(t.element,e.selector),o=J(r,(function(t){return n(e,t)}));return L.from(o[e.firstTabstop])},o=function(t,e){return e.focusManager.get(t).bind((function(t){return Hc(t,e.selector)}))},i=function(t,e){return n(t,e)&&t.useTabstopAt(e)},a=function(t,e,n){r(t,e).each((function(n){e.focusManager.set(t,n)}))},u=function(t,e,n,r,o){return o(e,n,(function(t){return i(r,t)})).fold((function(){return r.cyclic?L.some(!0):L.none()}),(function(e){return r.focusManager.set(t,e),L.some(!0)}))},s=function(t,e,n,r){var i=Gh(t.element,n.selector);return o(t,n).bind((function(e){var o=nt(i,C(Jr,e));return o.bind((function(e){return u(t,i,e,n,r)}))}))},c=function(t,e,n){var r=n.cyclic?db:hb;return s(t,e,n,r)},l=function(t,e,n){var r=n.cyclic?pb:mb;return s(t,e,n,r)},f=function(t,e,n){return n.onEnter.bind((function(n){return n(t,e)}))},d=function(t,e,n){return n.onEscape.bind((function(n){return n(t,e)}))},h=w([_b(vb([bb,gb(ob)]),c),_b(gb(ob),l),_b(gb(ab),d),_b(vb([wb,gb(ib)]),f)]),p=w([]);return Tb(e,pu.init,h,p,(function(){return L.some(a)}))},Ob=Db(rn("cyclic",T)),Eb=Db(rn("cyclic",D)),Ab=function(t,e,n){return _i(t,n,Jo()),L.some(!0)},Mb=function(t,e,n){var r=hv(n)&&gb(ub)(e.event);return r?L.none():Ab(t,e,n)},Nb=function(t,e){return L.some(!0)},Rb=[Sn("execute",Mb),Sn("useSpace",!1),Sn("useEnter",!0),Sn("useControlEnter",!1),Sn("useDown",!1)],zb=function(t,e,n){return n.execute(t,e,t.element)},Pb=function(t,e,n,r){var o=n.useSpace&&!hv(t.element)?ub:[],i=n.useEnter?ib:[],a=n.useDown?fb:[],u=o.concat(i).concat(a);return[_b(gb(u),zb)].concat(n.useControlEnter?[_b(vb([yb,gb(ib)]),zb)]:[])},Ib=function(t,e,n,r){return n.useSpace&&!hv(t.element)?[_b(gb(ub),Nb)]:[]},Lb=Tb(Rb,pu.init,Pb,Ib,(function(){return L.none()})),Bb=function(){var t=rd(),e=function(e,n){t.set({numRows:e,numColumns:n})},n=function(){return t.get().map((function(t){return t.numRows}))},r=function(){return t.get().map((function(t){return t.numColumns}))};return mu({readState:function(){return t.get().map((function(t){return{numRows:String(t.numRows),numColumns:String(t.numColumns)}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:e,getNumRows:n,getNumColumns:r})},Hb=function(t){return t.state(t)},Fb=Object.freeze({__proto__:null,flatgrid:Bb,init:Hb}),jb=function(t){return function(e,n,r,o){var i=t(e.element);return $b(i,e,n,r,o)}},Vb=function(t,e){var n=zd(t,e);return jb(n)},Wb=function(t,e){var n=zd(e,t);return jb(n)},Ub=function(t){return function(e,n,r,o){return $b(t,e,n,r,o)}},$b=function(t,e,n,r,o){var i=r.focusManager.get(e).bind((function(n){return t(e.element,n,r,o)}));return i.map((function(t){return r.focusManager.set(e,t),!0}))},Yb=Ub,qb=Ub,Gb=Ub,Kb=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},Xb=function(t){return!Kb(t.dom)},Jb=function(t,e){return nt(t,e).map((function(e){return{index:e,candidates:t}}))},Qb=function(t,e,n){var r=function(t){return Jr(t,e)},o=Gh(t,n),i=J(o,Xb);return Jb(i,r)},Zb=function(t,e){return nt(t,(function(t){return Jr(e,t)}))},ty=function(t,e,n,r){var o=Math.floor(e/n),i=e%n;return r(o,i).bind((function(e){var r=e.row*n+e.column;return r>=0&&r1?L.some(t.slice(1)):L.none()}))},p=function(t){return $t(n.get(),t)},m=function(t){return g(t).bind(U_)},g=function(t){return $t(e.get(),t)},v=function(e){return $t(t.get(),e)},b=function(t){var e=o.get();return ut(zt(e),t)},y=function(){return r.get().bind(m)},w=function(){return e.get()};return{setMenuBuilt:u,setContents:s,expand:d,refresh:p,collapse:h,lookupMenu:g,lookupItem:v,otherMenus:b,getPrimary:y,getMenus:w,clear:i,isClear:a,getTriggeringPath:f}},U_=function(t){return"prepared"===t.type?L.some(t.menu):L.none()},$_={init:W_,extractPreparedMenu:U_},Y_=function(t,e){var n,r=rd(),o=function(e,n,r){return Lt(r,(function(r,o){var i=function(){return H_.sketch(E(E({},r),{value:o,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:t.onHighlight,focusManager:t.fakeFocus?Sb():kb()}))};return o===n?{type:"prepared",menu:e.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}}))},i=$_.init(),a=function(e){var n=o(e,t.data.primary,t.data.menus),r=c();return i.setContents(t.data.primary,n,t.data.expansions,r),i.getPrimary()},u=function(t){return Zm.getValue(t).value},s=function(t,e,n){return mt(e,(function(t){if(!t.getSystem().isConnected())return L.none();var e=nb.getCandidates(t);return et(e,(function(t){return u(t)===n}))}))},c=function(e){return Lt(t.data.menus,(function(t,e){return ot(t.items,(function(t){return"separator"===t.type?[]:[t.data.value]}))}))},l=function(t,e){nb.highlight(t,e),nb.getHighlighted(e).orThunk((function(){return nb.getFirst(e)})).each((function(e){_i(t,e.element,Qo())}))},f=function(t,e){return os(q(e,(function(e){return t.lookupMenu(e).bind((function(t){return"prepared"===t.type?L.some(t.menu):L.none()}))})))},d=function(e,n,r){var o=f(n,n.otherMenus(r));G(o,(function(n){ts(n.element,[t.markers.backgroundMenu]),t.stayInDom||Bw.remove(e,n)}))},h=function(e){return r.get().getOrThunk((function(){var n={},o=Gh(e.element,"."+t.markers.item),i=J(o,(function(t){return"true"===Ia(t,"aria-haspopup")}));return G(i,(function(t){e.getSystem().getByDom(t).each((function(t){var e=u(t);n[e]=t}))})),r.set(n),n}))},p=function(t,e){var n=h(t);It(n,(function(t,n){var r=W(e,n);za(t.element,"aria-expanded",r)}))},m=function(e,n,r){return L.from(r[0]).bind((function(o){return n.lookupMenu(o).bind((function(o){if("notbuilt"===o.type)return L.none();var i=o.menu,a=f(n,r.slice(1));return G(a,(function(e){Ku(e.element,t.markers.backgroundMenu)})),fs(i.element)||Bw.append(e,Vs(i)),ts(i.element,[t.markers.backgroundMenu]),l(e,i),d(e,n,r),L.some(i)}))}))};(function(t){t[t["HighlightSubmenu"]=0]="HighlightSubmenu",t[t["HighlightParent"]=1]="HighlightParent"})(n||(n={}));var v=function(t,e,n){if("notbuilt"===n.type){var r=t.getSystem().build(n.nbMenu());return i.setMenuBuilt(e,r),r}return n.menu},b=function(e,r,o){if(void 0===o&&(o=n.HighlightSubmenu),r.hasConfigured(Iv)&&Iv.isDisabled(r))return L.some(r);var a=u(r);return i.expand(a).bind((function(a){return p(e,a),L.from(a[0]).bind((function(u){return i.lookupMenu(u).bind((function(s){var c=v(e,u,s);return fs(c.element)||Bw.append(e,Vs(c)),t.onOpenSubmenu(e,r,c,at(a)),o===n.HighlightSubmenu?(nb.highlightFirst(c),m(e,i,a)):(nb.dehighlightAll(c),L.some(r))}))}))}))},y=function(e,n){var r=u(n);return i.collapse(r).bind((function(r){return p(e,r),m(e,i,r).map((function(r){return t.onCollapseMenu(e,n,r),r}))}))},w=function(t,e){var n=u(e);return i.refresh(n).bind((function(e){return p(t,e),m(t,i,e)}))},_=function(t,e){return hv(e.element)?L.none():b(t,e,n.HighlightSubmenu)},x=function(t,e){return hv(e.element)?L.none():y(t,e)},C=function(e,n){return y(e,n).orThunk((function(){return t.onEscape(e,n).map((function(){return e}))}))},k=function(e){return function(n,r){return Hc(r.getSource(),"."+t.markers.item).bind((function(t){return n.getSystem().getByDom(t).toOptional().bind((function(t){return e(n,t).map(D)}))}))}},S=ki([Oi(L_(),(function(t,e){var n=e.event.item;i.lookupItem(u(n)).each((function(){var n=e.event.menu;nb.highlight(t,n);var r=u(e.event.item);i.refresh(r).each((function(e){return d(t,i,e)}))}))})),ji((function(e,r){var o=r.event.target;e.getSystem().getByDom(o).each((function(r){var o=u(r);0===o.indexOf("collapse-item")&&y(e,r),b(e,r,n.HighlightSubmenu).fold((function(){t.onExecute(e,r)}),g)}))})),Bi((function(e,n){a(e).each((function(n){Bw.append(e,Vs(n)),t.onOpenMenu(e,n),t.highlightImmediately&&l(e,n)}))}))].concat(t.navigateOnHover?[Oi(__(),(function(e,r){var o=r.event.item;w(e,o),b(e,o,n.HighlightParent),t.onHover(e,o)}))]:[])),T=function(t){return nb.getHighlighted(t).bind(nb.getHighlighted)},O=function(t){T(t).each((function(e){y(t,e)}))},A=function(t){i.getPrimary().each((function(e){l(t,e)}))},M=function(t){return L.from(t.components()[0]).filter((function(t){return"menu"===Ia(t.element,"role")}))},N=function(e){var n=i.getPrimary().bind((function(t){return T(e).bind((function(t){var n=u(t),r=Ut(i.getMenus()),o=os(q(r,$_.extractPreparedMenu));return i.getTriggeringPath(n,(function(t){return s(e,o,t)}))})).map((function(e){return{primary:t,triggeringPath:e}}))}));n.fold((function(){M(e).each((function(n){t.onRepositionMenu(e,n,[])}))}),(function(n){var r=n.primary,o=n.triggeringPath;t.onRepositionMenu(e,r,o)}))},R={collapseMenu:O,highlightPrimary:A,repositionMenus:N};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:ng(t.tmenuBehaviours,[Ow.config({mode:"special",onRight:k(_),onLeft:k(x),onEscape:k(C),focusIn:function(t,e){i.getPrimary().each((function(e){_i(t,e.element,Qo())}))}}),nb.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),vv.config({find:function(t){return nb.getHighlighted(t)}}),Bw.config({})]),eventOrder:t.eventOrder,apis:R,events:S}},q_=w("collapse-item"),G_=function(t,e,n){return{primary:t,menus:e,expansions:n}},K_=function(t,e){return{primary:t,menus:so(t,e),expansions:{}}},X_=function(t){return{value:Ga(q_()),meta:{text:t}}},J_=fv({name:"TieredMenu",configFields:[ll("onExecute"),ll("onEscape"),cl("onOpenMenu"),cl("onOpenSubmenu"),ul("onRepositionMenu"),ul("onCollapseMenu"),Sn("highlightImmediately",!0),pn("data",[an("primary"),an("menus"),an("expansions")]),Sn("fakeFocus",!1),ul("onHighlight"),ul("onHover"),ol(),an("dom"),Sn("navigateOnHover",!0),Sn("stayInDom",!1),tg("tmenuBehaviours",[Ow,nb,vv,Bw]),Sn("eventOrder",{})],apis:{collapseMenu:function(t,e){t.collapseMenu(e)},highlightPrimary:function(t,e){t.highlightPrimary(e)},repositionMenus:function(t,e){t.repositionMenus(e)}},factory:Y_,extraApis:{tieredData:G_,singleData:K_,collapseItem:X_}}),Q_=function(t,e,n,r,o){var i=function(){return t.lazySink(e)},a="horizontal"===r.type?{layouts:{onLtr:function(){return Zl()},onRtl:function(){return tf()}}}:{},u=function(t){return 2===t.length},s=function(t){return u(t)?a:{}};return J_.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return vm.close(e),t.onEscape.map((function(t){return t(e)})),L.some(!0)},onExecute:function(){return L.some(!0)},onOpenMenu:function(t,e){Lp.positionWithinBounds(i().getOrDie(),e,n,o())},onOpenSubmenu:function(t,e,n,r){var o=i().getOrDie();Lp.position(o,n,{anchor:E({type:"submenu",item:e},s(r))})},onRepositionMenu:function(t,e,r){var a=i().getOrDie();Lp.positionWithinBounds(a,e,n,o()),G(r,(function(t){var e=s(t.triggeringPath);Lp.position(a,t.triggeredMenu,{anchor:E({type:"submenu",item:t.triggeringItem},e)})}))}})},Z_=function(t,e){var n=function(e,n){var r=t.getRelated(e);return r.exists((function(t){return Wc(t,n)}))},r=function(t,e){vm.setContent(t,e)},o=function(t,e,n){i(t,e,n,L.none())},i=function(t,e,n,r){a(t,e,n,(function(){return r.map((function(t){return Tc(t)}))}))},a=function(e,n,r,o){var i=t.lazySink(e).getOrDie();vm.openWhileCloaked(e,n,(function(){return Lp.positionWithinBounds(i,e,r,o())})),Zm.setValue(e,L.some({mode:"position",config:r,getBounds:o}))},u=function(t,e,n){s(t,e,n,L.none)},s=function(e,n,r,o){var i=Q_(t,e,n,r,o);vm.open(e,i),Zm.setValue(e,L.some({mode:"menu",menu:i}))},c=function(t){vm.isOpen(t)&&(Zm.setValue(t,L.none()),vm.close(t))},l=function(t){return vm.getState(t)},f=function(e){vm.isOpen(e)&&Zm.getValue(e).each((function(n){switch(n.mode){case"menu":vm.getState(e).each(J_.repositionMenus);break;case"position":var r=t.lazySink(e).getOrDie();Lp.positionWithinBounds(r,e,n.config,n.getBounds());break}}))},d={setContent:r,showAt:o,showWithin:i,showWithinBounds:a,showMenuAt:u,showMenuWithinBounds:s,hide:c,getContent:l,reposition:f,isOpen:vm.isOpen};return{uid:t.uid,dom:t.dom,behaviours:ng(t.inlineBehaviours,[vm.config({isPartOf:function(t,e,r){return Wc(e,r)||n(t,r)},getAttachPoint:function(e){return t.lazySink(e).getOrDie()},onOpen:function(e){t.onShow(e)},onClose:function(e){t.onHide(e)}}),Zm.config({store:{mode:"memory",initialValue:L.none()}}),yf.config({channels:E(E({},xm(E({isExtraPart:e.isExtraPart},t.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),km(E(E({},t.fireRepositionEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})),{doReposition:f})))})]),eventOrder:t.eventOrder,apis:d}},tx=fv({name:"InlineView",configFields:[an("lazySink"),ul("onShow"),ul("onHide"),_n("onEscape"),tg("inlineBehaviours",[vm,Zm,yf]),Cn("fireDismissalEventInstead",[Sn("event",li())]),Cn("fireRepositionEventInstead",[Sn("event",fi())]),Sn("getRelated",L.none),Sn("isExtraPart",T),Sn("eventOrder",L.none)],factory:Z_,apis:{showAt:function(t,e,n,r){t.showAt(e,n,r)},showWithin:function(t,e,n,r,o){t.showWithin(e,n,r,o)},showWithinBounds:function(t,e,n,r,o){t.showWithinBounds(e,n,r,o)},showMenuAt:function(t,e,n,r){t.showMenuAt(e,n,r)},showMenuWithinBounds:function(t,e,n,r,o){t.showMenuWithinBounds(e,n,r,o)},hide:function(t,e){t.hide(e)},isOpen:function(t,e){return t.isOpen(e)},getContent:function(t,e){return t.getContent(e)},setContent:function(t,e,n){t.setContent(e,n)},reposition:function(t,e){t.reposition(e)}}}),ex="layout-inset",nx=function(t){return t.x},rx=function(t,e){return t.x+t.width/2-e.width/2},ox=function(t,e){return t.x+t.width-e.width},ix=function(t){return t.y},ax=function(t,e){return t.y+t.height-e.height},ux=function(t,e){return t.y+t.height/2-e.height/2},sx=function(t,e,n){return pl(ox(t,e),ax(t,e),n.insetSouthwest(),xl(),"southwest",Al(t,{right:0,bottom:3}),ex)},cx=function(t,e,n){return pl(nx(t),ax(t,e),n.insetSoutheast(),_l(),"southeast",Al(t,{left:1,bottom:3}),ex)},lx=function(t,e,n){return pl(ox(t,e),ix(t),n.insetNorthwest(),wl(),"northwest",Al(t,{right:0,top:2}),ex)},fx=function(t,e,n){return pl(nx(t),ix(t),n.insetNortheast(),yl(),"northeast",Al(t,{left:1,top:2}),ex)},dx=function(t,e,n){return pl(rx(t,e),ix(t),n.insetNorth(),Cl(),"north",Al(t,{top:2}),ex)},hx=function(t,e,n){return pl(rx(t,e),ax(t,e),n.insetSouth(),kl(),"south",Al(t,{bottom:3}),ex)},px=function(t,e,n){return pl(ox(t,e),ux(t,e),n.insetEast(),Tl(),"east",Al(t,{right:0}),ex)},mx=function(t,e,n){return pl(nx(t),ux(t,e),n.insetWest(),Sl(),"west",Al(t,{left:1}),ex)},gx=function(t){switch(t){case"north":return dx;case"northeast":return fx;case"northwest":return lx;case"south":return hx;case"southeast":return cx;case"southwest":return sx;case"east":return px;case"west":return mx}},vx=function(t,e,n,r,o){var i=Yf(r).map(gx).getOr(dx);return i(t,e,n,r,o)},bx=function(t){switch(t){case"north":return hx;case"northeast":return cx;case"northwest":return sx;case"south":return dx;case"southeast":return fx;case"southwest":return lx;case"east":return mx;case"west":return px}},yx=function(t,e,n,r,o){var i=Yf(r).map(bx).getOr(dx);return i(t,e,n,r,o)},wx=tinymce.util.Tools.resolve("tinymce.util.Delay"),_x=function(t){var e=g_(t.action),n=t.dom.tag,r=function(e){return $t(t.dom,"attributes").bind((function(t){return $t(t,e)}))},o=function(){if("button"===n){var t=r("type").getOr("button"),e=r("role").map((function(t){return{role:t}})).getOr({});return E({type:t},e)}var o=r("role").getOr("button");return{role:o}};return{uid:t.uid,dom:t.dom,components:t.components,events:e,behaviours:rg.augment(t.buttonBehaviours,[Kw.config({}),Ow.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:o()},eventOrder:t.eventOrder}},xx=fv({name:"Button",factory:_x,configFields:[Sn("uid",void 0),an("dom"),Sn("components",[]),rg.field("buttonBehaviours",[Kw,Ow]),vn("action"),vn("role"),Sn("eventOrder",{})]}),Cx=function(t){var e=sv(t)&&qt(t,"uid")?t.uid:nu("memento"),n=function(t){return t.getSystem().getByUid(e).getOrDie()},r=function(t){return t.getSystem().getByUid(e).toOptional()},o=function(){return E(E({},t),{uid:e})};return{get:n,getOpt:r,asSpec:o}},kx=tinymce.util.Tools.resolve("tinymce.util.I18n"),Sx={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},Tx="temporary-placeholder",Dx=function(t){return function(){return $t(t,Tx).getOr("!not found!")}},Ox=function(t,e){var n=t.toLowerCase();if(kx.isRtl()){var r=rr(n,"-rtl");return Yt(e,r)?r:n}return n},Ex=function(t,e){return $t(e,Ox(t,e))},Ax=function(t,e){var n=e();return Ex(t,n).getOrThunk(Dx(n))},Mx=function(t,e,n){var r=e();return Ex(t,r).or(n).getOrThunk(Dx(r))},Nx=function(t){return!!kx.isRtl()&&Yt(Sx,t)},Rx=function(){return Fw("add-focusable",[Bi((function(t){Lc(t.element,"svg").each((function(t){return za(t,"focusable","false")}))}))])},zx=function(t,e,n,r){var o,i,a=Nx(e)?["tox-icon--flip"]:[],u=$t(n,Ox(e,n)).or(r).getOrThunk(Dx(n));return{dom:{tag:t.tag,attributes:null!==(o=t.attributes)&&void 0!==o?o:{},classes:t.classes.concat(a),innerHtml:u},behaviours:hf(M(M([],null!==(i=t.behaviours)&&void 0!==i?i:[]),[Rx()]))}},Px=function(t,e,n,r){return void 0===r&&(r=L.none()),zx(e,t,n(),r)},Ix=function(t,e,n){var r=n(),o=et(t,(function(t){return Yt(r,Ox(t,r))}));return zx(e,o.getOr(Tx),r,L.none())},Lx={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},Bx=function(t){var e=Cx({dom:{tag:"p",innerHtml:t.translationProvider(t.text)},behaviours:hf([Bw.config({})])}),n=function(t){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+t+"%"}}}},r=function(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:t+"%"}}},o=Cx({dom:{tag:"div",classes:t.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(0)]},r(0)],behaviours:hf([Bw.config({})])}),i=function(t,e){t.getSystem().isConnected()&&o.getOpt(t).each((function(t){Bw.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(e)]},r(e)])}))},a=function(t,n){if(t.getSystem().isConnected()){var r=e.get(t);Bw.set(r,[Ls(n)])}},u={updateProgress:i,updateText:a},s=rt([t.icon.toArray(),t.level.toArray(),t.level.bind((function(t){return L.from(Lx[t])})).toArray()]),c=Cx(xx.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[Px("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":t.translationProvider("Close")}},t.iconProvider)],action:function(e){t.onAction(e)}})),l=Ix(s,{tag:"div",classes:["tox-notification__icon"]},t.iconProvider),f={dom:{tag:"div",classes:["tox-notification__body"]},components:[e.asSpec()],behaviours:hf([Bw.config({})])},d=[l,f];return{uid:t.uid,dom:{tag:"div",attributes:{role:"alert"},classes:t.level.map((function(t){return["tox-notification","tox-notification--in","tox-notification--"+t]})).getOr(["tox-notification","tox-notification--in"])},behaviours:hf([Kw.config({}),Fw("notification-events",[Oi(zo(),(function(t){c.getOpt(t).each(Kw.focus)}))])]),components:d.concat(t.progress?[o.asSpec()]:[]).concat(t.closeButton?[c.asSpec()]:[]),apis:u}},Hx=fv({name:"Notification",factory:Bx,configFields:[vn("level"),an("progress"),an("icon"),an("onAction"),an("text"),an("iconProvider"),an("translationProvider"),An("closeButton",!0)],apis:{updateProgress:function(t,e,n){t.updateProgress(e,n)},updateText:function(t,e,n){t.updateText(e,n)}}});function Fx(t,e,n){var r=e.backstage.shared,o=function(t){switch(t){case"bc-bc":return hx;case"tc-tc":return dx;case"tc-bc":return $l;case"bc-tc":default:return Yl}},i=function(t){G(t,(function(t){return t.moveTo(0,0)}))},a=function(t){t.length>0&&(dt(t).each((function(t){return t.moveRel(null,"banner")})),G(t,(function(e,n){n>0&&e.moveRel(t[n-1].getEl(),"bc-tc")})))},u=function(t){i(t),a(t)},s=function(t,e){var i=!t.closeButton&&t.timeout&&(t.timeout>0||t.timeout<0),a=function(){e(),tx.hide(s)},u=js(Hx.sketch({text:t.text,level:W(["success","error","warning","warn","info"],t.type)?t.type:void 0,progress:!0===t.progressBar,icon:L.from(t.icon),closeButton:!i,onAction:a,iconProvider:r.providers.icons,translationProvider:r.providers.translate})),s=js(tx.sketch(E({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:r.getSink,fireDismissalEventInstead:{}},r.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));return n.add(s),t.timeout>0&&wx.setTimeout((function(){a()}),t.timeout),{close:a,moveTo:function(t,e){tx.showAt(s,Vs(u),{anchor:{type:"makeshift",x:t,y:e}})},moveRel:function(t,e){if("banner"!==e){var n=o(e),i={type:"node",root:ds(),node:L.some(jn.fromDom(t)),layouts:{onRtl:function(){return[n]},onLtr:function(){return[n]}}};tx.showAt(s,Vs(u),{anchor:i})}else tx.showAt(s,Vs(u),{anchor:r.anchors.banner()})},text:function(t){Hx.updateText(u,t)},settings:t,getEl:function(){return u.element.dom},progressBar:{value:function(t){Hx.updateProgress(u,t)}}}},c=function(t){t.close()},l=function(t){return t.settings};return{open:s,close:c,reposition:u,getArgs:l}}var jx,Vx=function(t,e){var n=null,r=function(){s(n)||(clearTimeout(n),n=null)},o=function(){for(var r=[],o=0;o',t.getDoc());return xa(n,jn.fromDom(e.extractContents())),e.insertNode(n.dom),ta(n).each((function(t){return t.dom.normalize()})),Yh(n).map((function(e){t.selection.setCursorLocation(e.dom,Vh(e))})),n}))},Kx=function(t){return Hc(t,qx)},Xx=function(t){return t.collapsed&&3===t.startContainer.nodeType},Jx=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},Qx=function(t){return""!==t&&-1!=="  \f\n\r\t\v".indexOf(t)},Zx=function(t,e){return t.substring(e.length)},tC=function(t,e,n){var r;for(r=e-1;r>=0;r--){var o=t.charAt(r);if(Qx(o))return L.none();if(o===n)break}return L.some(r)},eC=function(t,e,n,r){if(void 0===r&&(r=0),!Xx(e))return L.none();var o=function(t,e,r){return tC(r,e,n).getOr(e)},i=t.getParent(e.startContainer,t.isBlock)||t.getRoot();return Yx(t,e.startContainer,e.startOffset,o,i).bind((function(t){var o=e.cloneRange();if(o.setStart(t.container,t.offset),o.setEnd(e.endContainer,e.endOffset),o.collapsed)return L.none();var i=Jx(o),a=i.lastIndexOf(n);return 0!==a||Zx(i,n).length0?cC(e[e.length-1]):aC(t,e.length)},lC=function(t,e){var n=t.childNodes;return n.length>0&&e0&&sC(t)&&n.length===e?cC(n[n.length-1]):aC(t,e)},fC=function(t,e){return Yx(t,e.container,e.offset,(function(t,e){return 0===e?-1:e}),t.getRoot()).filter((function(t){var e=t.container.data.charAt(t.offset-1);return!Qx(e)})).isSome()},dC=function(t){return function(e){var n=lC(e.startContainer,e.startOffset);return!fC(t,n)}},hC=function(t,e,n){return mt(n.triggerChars,(function(n){return nC(t,e,n)}))},pC=function(t,e){var n=e(),r=t.selection.getRng();return hC(t.dom,r,n).bind((function(n){return mC(t,e,n)}))},mC=function(t,e,n,r){void 0===r&&(r={});var o=e(),i=t.selection.getRng(),a=i.startContainer.nodeValue,u=J(o.lookupByChar(n.triggerChar),(function(e){return n.text.length>=e.minChars&&e.matches.getOrThunk((function(){return dC(t.dom)}))(n.range,a,n.text)}));if(0===u.length)return L.none();var s=iC.all(q(u,(function(t){var e=t.fetch(n.text,t.maxResults,r);return e.then((function(e){return{matchText:n.text,items:e,columns:t.columns,onAction:t.onAction,highlightOn:t.highlightOn}}))})));return L.some({lookupData:s,context:n})},gC=Ae([cn("type"),wn("text")]),vC=function(t){return Xe("separatormenuitem",gC,t)},bC=Ae([Sn("type","autocompleteitem"),Sn("active",!1),Sn("disabled",!1),Sn("meta",{}),cn("value"),wn("text"),wn("icon")]),yC=Ae([cn("type"),cn("ch"),Dn("minChars",1),Sn("columns",1),Dn("maxResults",10),_n("matches"),dn("fetch"),dn("onAction"),Rn("highlightOn",[],He)]),wC=function(t){return Xe("Autocompleter.Separator",gC,t)},_C=function(t){return Xe("Autocompleter.Item",bC,t)},xC=function(t){return Xe("Autocompleter",yC,t)},CC=[An("disabled",!1),wn("tooltip"),wn("icon"),wn("text"),Mn("onSetup",(function(){return g}))],kC=Ae([cn("type"),dn("onAction")].concat(CC)),SC=function(t){return Xe("toolbarbutton",kC,t)},TC=[An("active",!1)].concat(CC),DC=Ae(TC.concat([cn("type"),dn("onAction")])),OC=function(t){return Xe("ToggleButton",DC,t)},EC=[Mn("predicate",T),En("scope","node",["node","editor"]),En("position","selection",["node","selection","line"])],AC=CC.concat([Sn("type","contextformbutton"),Sn("primary",!1),dn("onAction"),rn("original",_)]),MC=TC.concat([Sn("type","contextformbutton"),Sn("primary",!1),dn("onAction"),rn("original",_)]),NC=CC.concat([Sn("type","contextformbutton")]),RC=TC.concat([Sn("type","contextformtogglebutton")]),zC=tn("type",{contextformbutton:AC,contextformtogglebutton:MC}),PC=Ae([Sn("type","contextform"),Mn("initValue",w("")),wn("label"),gn("commands",zC),bn("launch",tn("type",{contextformbutton:NC,contextformtogglebutton:RC}))].concat(EC)),IC=function(t){return Xe("ContextForm",PC,t)},LC=Ae([Sn("type","contexttoolbar"),cn("items")].concat(EC)),BC=function(t){return Xe("ContextToolbar",LC,t)},HC=function(t){var e={};return G(t,(function(t){e[t]={}})),zt(e)},FC=function(t){var e=t.ui.registry.getAll().popups,n=Lt(e,(function(t){return xC(t).fold((function(t){throw new Error(Ze(t))}),_)})),r=HC(Vt(n,(function(t){return t.ch}))),o=Ut(n),i=function(t){return J(o,(function(e){return e.ch===t}))};return{dataset:n,triggerChars:r,lookupByChar:i}};(function(t){t[t["CLOSE_ON_EXECUTE"]=0]="CLOSE_ON_EXECUTE",t[t["BUBBLE_TO_SANDBOX"]=1]="BUBBLE_TO_SANDBOX"})(jx||(jx={}));var jC,VC=jx,WC="tox-menu-nav__js",UC="tox-collection__item",$C="tox-swatch",YC={normal:WC,color:$C},qC="tox-collection__item--enabled",GC="tox-collection__group-heading",KC="tox-collection__item-icon",XC="tox-collection__item-label",JC="tox-collection__item-accessory",QC="tox-collection__item-caret",ZC="tox-collection__item-checkmark",tk="tox-collection__item--active",ek="tox-collection__item-container",nk="tox-collection__item-container--column",rk="tox-collection__item-container--row",ok="tox-collection__item-container--align-right",ik="tox-collection__item-container--align-left",ak="tox-collection__item-container--valign-top",uk="tox-collection__item-container--valign-middle",sk="tox-collection__item-container--valign-bottom",ck=function(t){return $t(YC,t).getOr(WC)},lk=function(t){return"color"===t?"tox-swatches":"tox-menu"},fk=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:lk(t),tieredMenu:"tox-tiered-menu"}},dk=function(t){var e=fk(t);return{backgroundMenu:e.backgroundMenu,selectedMenu:e.selectedMenu,menu:e.menu,selectedItem:e.selectedItem,item:ck(t)}},hk=function(t,e,n){var r=fk(n);return{tag:"div",classes:rt([[r.menu,"tox-menu-"+e+"-column"],t?[r.hasIcons]:[]])}},pk=[H_.parts.items({})],mk=function(t,e,n){var r=fk(n),o={tag:"div",classes:rt([[r.tieredMenu]])};return{dom:o,markers:dk(n)}},gk=function(t,e){return function(n){var r=Y(n,e);return q(r,(function(e){return{dom:t,components:e}}))}},vk=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[H_.parts.items({preprocess:"auto"!==t?gk({tag:"div",classes:["tox-swatches__row"]},t):_})]}]}},bk=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[H_.parts.items({preprocess:gk({tag:"div",classes:["tox-collection__group"]},t)})]}},yk=function(t,e){var n=[],r=[];return G(t,(function(t,o){e(t,o)?(r.length>0&&n.push(r),r=[],Yt(t.dom,"innerHtml")&&r.push(t)):r.push(t)})),r.length>0&&n.push(r),q(n,(function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}}))},wk=function(t,e,n){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[H_.parts.items({preprocess:function(n){return"auto"!==t&&t>1?gk({tag:"div",classes:["tox-collection__group"]},t)(n):yk(n,(function(t,n){return"separator"===e[n].type}))}})]}},_k=function(t,e){return{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[H_.parts.items({preprocess:function(e){return yk(e,(function(e,n){return"separator"===t[n].type}))}})]}},xk=function(t){return U(t,(function(t){return"icon"in t&&void 0!==t.icon}))},Ck=function(t){return L.none()},kk=function(t,e,n,r,o){var i=_k(n);return{value:t,dom:i.dom,components:i.components,items:n}},Sk=function(t,e,n,r,o){if("color"===o){var i=vk(r);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o&&"auto"===r){i=wk(r,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o&&1===r){i=wk(1,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o){i=wk(r,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("listpreview"===o&&"auto"!==r){i=bk(r);return{value:t,dom:i.dom,components:i.components,items:n}}return{value:t,dom:hk(e,r,o),components:pk,items:n}},Tk=[cn("type"),cn("src"),wn("alt"),Rn("classes",[],He)],Dk=Ae(Tk),Ok=[cn("type"),cn("text"),wn("name"),Rn("classes",["tox-collection__item-label"],He)],Ek=Ae(Ok),Ak=De((function(){return $e("type",{cardimage:Dk,cardtext:Ek,cardcontainer:Mk})})),Mk=Ae([cn("type"),On("direction","horizontal"),On("align","left"),On("valign","middle"),gn("items",Ak)]),Nk=[An("disabled",!1),wn("text"),wn("shortcut"),nn("value","value",ee((function(){return Ga("menuitem-value")})),Ie()),Sn("meta",{})],Rk=Ae([cn("type"),wn("label"),gn("items",Ak),Mn("onSetup",(function(){return g})),Mn("onAction",g)].concat(Nk)),zk=function(t){return Xe("cardmenuitem",Rk,t)},Pk=Ae([cn("type"),An("active",!1),wn("icon")].concat(Nk)),Ik=function(t){return Xe("choicemenuitem",Pk,t)},Lk=[cn("type"),cn("fancytype"),Mn("onAction",g)],Bk=[Sn("initData",{})].concat(Lk),Hk=[zn("initData",{},[An("allowCustomColors",!0),xn("colors",Ie())])].concat(Lk),Fk=tn("fancytype",{inserttable:Bk,colorswatch:Hk}),jk=function(t){return Xe("fancymenuitem",Fk,t)},Vk=Ae([cn("type"),Mn("onSetup",(function(){return g})),Mn("onAction",g),wn("icon")].concat(Nk)),Wk=function(t){return Xe("menuitem",Vk,t)},Uk=Ae([cn("type"),dn("getSubmenuItems"),Mn("onSetup",(function(){return g})),wn("icon")].concat(Nk)),$k=function(t){return Xe("nestedmenuitem",Uk,t)},Yk=Ae([cn("type"),wn("icon"),An("active",!1),Mn("onSetup",(function(){return g})),dn("onAction")].concat(Nk)),qk=function(t){return Xe("togglemenuitem",Yk,t)},Gk=function(t,e,n){var r=Gh(t.element,"."+n);if(r.length>0){var o=nt(r,(function(t){var n=t.dom.getBoundingClientRect().top,o=r[0].dom.getBoundingClientRect().top;return Math.abs(n-o)>e})).getOr(r.length);return L.some({numColumns:o,numRows:Math.ceil(r.length/o)})}return L.none()},Kk=function(t,e){return hf([Fw(t,e)])},Xk=function(t){return Kk(Ga("unnamed-events"),t)},Jk={namedEvents:Kk,unnamedEvents:Xk},Qk=Ga("tooltip.exclusive"),Zk=Ga("tooltip.show"),tS=Ga("tooltip.hide"),eS=function(t,e,n){t.getSystem().broadcastOn([Qk],{})},nS=function(t,e,n,r){n.getTooltip().each((function(t){t.getSystem().isConnected()&&Bw.set(t,r)}))},rS=Object.freeze({__proto__:null,hideAllExclusive:eS,setComponents:nS}),oS=function(t,e){var n=function(n){e.getTooltip().each((function(r){Yp(r),t.onHide(n,r),e.clearTooltip()})),e.clearTimer()},r=function(n){if(!e.isShowing()){eS(n);var r=t.lazySink(n).getOrDie(),o=n.getSystem().build({dom:t.tooltipDom,components:t.tooltipComponents,events:ki("normal"===t.mode?[Oi(Ro(),(function(t){bi(n,Zk)})),Oi(Mo(),(function(t){bi(n,tS)}))]:[]),behaviours:hf([Bw.config({})])});e.setTooltip(o),Wp(r,o),t.onShow(n,o),Lp.position(r,o,{anchor:t.anchor(n)})}};return ki(rt([[Oi(Zk,(function(n){e.resetTimer((function(){r(n)}),t.delay)})),Oi(tS,(function(r){e.resetTimer((function(){n(r)}),t.delay)})),Oi(Xo(),(function(t,e){var r=e;r.universal||W(r.channels,Qk)&&n(t)})),Hi((function(t){n(t)}))],"normal"===t.mode?[Oi(zo(),(function(t){bi(t,Zk)})),Oi(Go(),(function(t){bi(t,tS)})),Oi(Ro(),(function(t){bi(t,Zk)})),Oi(Mo(),(function(t){bi(t,tS)}))]:[Oi(gi(),(function(t,e){bi(t,Zk)})),Oi(vi(),(function(t){bi(t,tS)}))]]))},iS=Object.freeze({__proto__:null,events:oS}),aS=[an("lazySink"),an("tooltipDom"),Sn("exclusive",!0),Sn("tooltipComponents",[]),Sn("delay",300),En("mode","normal",["normal","follow-highlight"]),Sn("anchor",(function(t){return{type:"hotspot",hotspot:t,layouts:{onLtr:w([Yl,$l,jl,Wl,Vl,Ul]),onRtl:w([Yl,$l,jl,Wl,Vl,Ul])}}})),ul("onHide"),ul("onShow")],uS=function(){var t=rd(),e=rd(),n=function(){t.on(clearTimeout)},r=function(e,r){n(),t.set(setTimeout(e,r))},o=w("not-implemented");return mu({getTooltip:e.get,isShowing:e.isSet,setTooltip:e.set,clearTooltip:e.clear,clearTimer:n,resetTimer:r,readState:o})},sS=Object.freeze({__proto__:null,init:uS}),cS=mf({fields:aS,name:"tooltipping",active:iS,state:sS,apis:rS}),lS=function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},fS=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),dS=tinymce.util.Tools.resolve("tinymce.EditorManager"),hS=function(t){var e=t.getParam("skin"),n=t.getParam("skin_url");if(!1!==e){var r=e||"oxide";n=n?t.documentBaseURI.toAbsolute(n):dS.baseURL+"/skins/ui/"+r}return n},pS=function(t){return t.getParam("readonly",!1,"boolean")},mS=function(t){return!1===t.getParam("skin")},gS=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},vS=function(t){return t.getParam("width",fS.DOM.getStyle(t.getElement(),"width"))},bS=function(t){return L.from(t.getParam("min_width")).filter(p)},yS=function(t){return L.from(t.getParam("min_height")).filter(p)},wS=function(t){return L.from(t.getParam("max_width")).filter(p)},_S=function(t){return L.from(t.getParam("max_height")).filter(p)},xS=function(t){return L.from(t.getParam("style_formats")).filter(u)},CS=function(t){return t.getParam("style_formats_merge",!1,"boolean")},kS=function(t){return t.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},SS=function(t){return t.getParam("content_langs",void 0,"array")},TS=function(t){return t.getParam("removed_menuitems","")},DS=function(t){return!1!==t.getParam("menubar",!0,"boolean")},OS=function(t){var e=t.getParam("toolbar",!0),n=!0===e,r=i(e),o=u(e)&&e.length>0;return!AS(t)&&(o||r||n)},ES=function(t){var e=$(9,(function(e){return t.getParam("toolbar"+(e+1),!1,"string")})),n=J(e,(function(t){return"string"===typeof t}));return n.length>0?L.some(n):L.none()},AS=function(t){return ES(t).fold((function(){var e=t.getParam("toolbar",[],"string[]");return e.length>0}),D)};(function(t){t["default"]="wrap",t["floating"]="floating",t["sliding"]="sliding",t["scrolling"]="scrolling"})(jC||(jC={}));var MS,NS=function(t){return t.getParam("toolbar_mode","","string")};(function(t){t["auto"]="auto",t["top"]="top",t["bottom"]="bottom"})(MS||(MS={}));var RS,zS=function(t){return t.getParam("toolbar_groups",{},"object")},PS=function(t){return t.getParam("toolbar_location",MS.auto,"string")},IS=function(t){return PS(t)===MS.bottom},LS=function(t){return t.getParam("fixed_toolbar_container","","string")},BS=function(t){return t.getParam("fixed_toolbar_container_target")},HS=function(t){return t.getParam("toolbar_persist",!1,"boolean")},FS=function(t){if(!t.inline)return L.none();var e=LS(t);if(e.length>0)return Bc(ds(),e);var n=BS(t);return d(n)?L.some(jn.fromDom(n)):L.none()},jS=function(t){return t.inline&&FS(t).isSome()},VS=function(t){var e=FS(t);return e.getOrThunk((function(){return ha(da(jn.fromDom(t.getElement())))}))},WS=function(t){return t.inline&&!DS(t)&&!OS(t)&&!AS(t)},US=function(t){var e=t.getParam("toolbar_sticky",!1,"boolean");return(e||t.inline)&&!jS(t)&&!WS(t)},$S=function(t){return t.getParam("toolbar_sticky_offset",0,"number")},YS=function(t){return t.getParam("draggable_modal",!1,"boolean")},qS=function(t){var e=t.getParam("menu");return e?Lt(e,(function(t){return E(E({},t),{items:t.items})})):{}},GS=function(t){return t.getParam("menubar")},KS=function(t){return t.getParam("toolbar",!0)},XS=function(t){return t.getParam("file_picker_callback")},JS=function(t){return t.getParam("file_picker_types")},QS=function(t){return t.getParam("file_browser_callback_types")},ZS=function(t){return!1===t.getParam("typeahead_urls")},tT=function(t){return t.getParam("anchor_top","#top")},eT=function(t){return t.getParam("anchor_bottom","#bottom")},nT=function(t){var e=t.getParam("file_picker_validator_handler",void 0,"function");return void 0===e?t.getParam("filepicker_validator_handler",void 0,"function"):e},rT="silver.readonly",oT=Ae([fn("readonly")]),iT=function(t,e){var n=t.outerContainer,r=n.element;e&&(t.mothership.broadcastOn([bm()],{target:r}),t.uiMothership.broadcastOn([bm()],{target:r})),t.mothership.broadcastOn([rT],{readonly:e}),t.uiMothership.broadcastOn([rT],{readonly:e})},aT=function(t,e){t.on("init",(function(){t.mode.isReadOnly()&&iT(e,!0)})),t.on("SwitchMode",(function(){return iT(e,t.mode.isReadOnly())})),pS(t)&&t.setMode("readonly")},uT=function(){var t;return yf.config({channels:(t={},t[rT]={schema:oT,onReceive:function(t,e){Iv.set(t,e.readonly)}},t)})},sT=function(t){return Iv.config({disabled:t,disableClass:"tox-collection__item--state-disabled"})},cT=function(t){return Iv.config({disabled:t})},lT=function(t){return Iv.config({disabled:t,disableClass:"tox-tbtn--disabled"})},fT=function(t){return Iv.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},dT={item:sT,button:cT,splitButton:lT,toolbarButton:fT},hT=function(t,e){var n=t.getApi(e);return function(t){t(n)}},pT=function(t,e){return Bi((function(n){var r=hT(t,n);r((function(n){var r=t.onSetup(n);h(r)&&e.set(r)}))}))},mT=function(t,e){return Hi((function(n){return hT(t,n)(e.get())}))},gT=function(t,e){return ji((function(n,r){hT(t,n)(t.onAction),t.triggersSubmenu||e!==VC.CLOSE_ON_EXECUTE||(bi(n,ei()),r.stop())}))},vT=(RS={},RS[Jo()]=["disabling","alloy.base.behaviour","toggling","item-events"],RS),bT=os,yT=function(t,e,n,r){var o=Pn(g);return{type:"item",dom:e.dom,components:bT(e.optComponents),data:t.data,eventOrder:vT,hasSubmenu:t.triggersSubmenu,itemBehaviours:hf([Fw("item-events",[gT(t,n),pT(t,o),mT(t,o)]),dT.item((function(){return t.disabled||r.isDisabled()})),uT(),Bw.config({})].concat(t.itemBehaviours))}},wT=function(t){return{value:t.value,meta:E({text:t.text.getOr("")},t.meta)}},_T=tinymce.util.Tools.resolve("tinymce.Env"),xT=function(t){var e={alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"},n={meta:"Ctrl",access:"Shift+Alt"},r=_T.mac?e:n,o=t.split("+"),i=q(o,(function(t){var e=t.toLowerCase().trim();return Yt(r,e)?r[e]:t}));return _T.mac?i.join(""):i.join("+")},CT=function(t,e,n){return void 0===n&&(n=[KC]),Px(t,{tag:"div",classes:n},e)},kT=function(t){return{dom:{tag:"div",classes:[XC]},components:[Ls(kx.translate(t))]}},ST=function(t,e){return{dom:{tag:"div",classes:e,innerHtml:t}}},TT=function(t,e){return{dom:{tag:"div",classes:[XC]},components:[{dom:{tag:t.tag,styles:t.styles},components:[Ls(kx.translate(e))]}]}},DT=function(t){return{dom:{tag:"div",classes:[JC],innerHtml:xT(t)}}},OT=function(t){return CT("checkmark",t,[ZC])},ET=function(t){return CT("chevron-right",t,[QC])},AT=function(t){return CT("chevron-down",t,[QC])},MT=function(t,e){var n="vertical"===t.direction?nk:rk,r="left"===t.align?ik:ok,o=function(){switch(t.valign){case"top":return ak;case"middle":return uk;case"bottom":return sk}};return{dom:{tag:"div",classes:[ek,n,r,o()]},components:e}},NT=function(t,e,n){return{dom:{tag:"img",classes:e,attributes:{src:t,alt:n.getOr("")}}}},RT=function(t,e,n){var r="custom",o="remove",i=t.ariaLabel,a=t.value,u=t.iconContent.map((function(t){return Mx(t,e.icons,n)})),s=function(){var t=$C,n=u.getOr(""),s=i.map((function(t){return{title:e.translate(t)}})).getOr({}),c={tag:"div",attributes:s,classes:[t]};return E(E({},c),a===r?{tag:"button",classes:M(M([],c.classes),["tox-swatches__picker-btn"]),innerHtml:n}:a===o?{classes:M(M([],c.classes),["tox-swatch--remove"]),innerHtml:n}:{attributes:E(E({},c.attributes),{"data-mce-color":a}),styles:{"background-color":a}})};return{dom:s(),optComponents:[]}},zT=function(t){var e=t.map((function(t){return{attributes:{title:kx.translate(t)}}})).getOr({});return E({tag:"div",classes:[WC,UC]},e)},PT=function(t,e,n,r){var o={tag:"div",classes:[KC]},i=function(t){return Px(t,o,e.icons,r)},a=function(){return L.some({dom:o})},u=n?t.iconContent.map(i).orThunk(a):L.none(),s=t.checkMark,c=L.from(t.meta).fold((function(){return kT}),(function(t){return Yt(t,"style")?C(TT,t.style):kT})),l=t.htmlContent.fold((function(){return t.textContent.map(c)}),(function(t){return L.some(ST(t,[XC]))})),f={dom:zT(t.ariaLabel),optComponents:[u,l,t.shortcutContent.map(DT),s,t.caret]};return f},IT=function(t,e,n,r){return void 0===r&&(r=L.none()),"color"===t.presets?RT(t,e,r):PT(t,e,n,r)},LT=function(t,e){return $t(t,"tooltipWorker").map((function(t){return[cS.config({lazySink:e.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{type:"submenu",item:t,overrides:{maxHeightFunction:Td}}},mode:"follow-highlight",onShow:function(e,n){t((function(t){cS.setComponents(e,[Bs({element:jn.fromDom(t)})])}))}})]})).getOr([])},BT=function(t){return fS.DOM.encode(t)},HT=function(t,e){var n=kx.translate(t),r=BT(n);if(e.length>0){var o=new RegExp(lS(e),"gi");return r.replace(o,(function(t){return''+t+""}))}return r},FT=function(t,e,n,r,o,i,a,u){void 0===u&&(u=!0);var s=IT({presets:r,textContent:L.none(),htmlContent:n?t.text.map((function(t){return HT(t,e)})):L.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:L.none(),checkMark:L.none(),caret:L.none(),value:t.value},a.providers,u,t.icon);return yT({data:wT(t),disabled:t.disabled,getApi:w({}),onAction:function(e){return o(t.value,t.meta)},onSetup:w(g),triggersSubmenu:!1,itemBehaviours:LT(t.meta,a)},s,i,a.providers)},jT=function(t,e){return q(t,(function(t){switch(t.type){case"cardcontainer":return MT(t,jT(t.items,e));case"cardimage":return NT(t.src,t.classes,t.alt);case"cardtext":var n=t.name.exists((function(t){return W(e.cardText.highlightOn,t)})),r=n?L.from(e.cardText.matchText).getOr(""):"";return ST(HT(t.text,r),t.classes)}}))},VT=function(t,e,n,r){var o=function(t){return{isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){Iv.set(t,e),G(Gh(t.element,"*"),(function(n){t.getSystem().getByDom(n).each((function(t){t.hasConfigured(Iv)&&Iv.set(t,e)}))}))}}},i={dom:zT(t.label),optComponents:[L.some({dom:{tag:"div",classes:[ek,rk]},components:jT(t.items,r)})]};return yT({data:wT(E({text:L.none()},t)),disabled:t.disabled,getApi:o,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:L.from(r.itemBehaviours).getOr([])},i,e,n.providers)},WT=function(t,e,n,r,o,i,a,u){void 0===u&&(u=!0);var s=function(t){return{setActive:function(e){p_.set(t,e)},isActive:function(){return p_.isOn(t)},isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){return Iv.set(t,e)}}},c=IT({presets:n,textContent:e?t.text:L.none(),htmlContent:L.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:e?t.shortcut:L.none(),checkMark:e?L.some(OT(a.icons)):L.none(),caret:L.none(),value:t.value},a,u);return Jt(yT({data:wT(t),disabled:t.disabled,getApi:s,onAction:function(e){return r(t.value)},onSetup:function(t){return t.setActive(o),g},triggersSubmenu:!1,itemBehaviours:[]},c,i,a),{toggling:{toggleClass:qC,toggleOnExecute:!1,selected:t.active}})},UT=Fg(D_(),O_()),$T=function(t){return{value:t}},YT=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,qT=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,GT=function(t){return YT.test(t)||qT.test(t)},KT=function(t){return nr(t,"#").toUpperCase()},XT=function(t){return GT(t)?L.some({value:KT(t)}):L.none()},JT=function(t){var e=t.value.replace(YT,(function(t,e,n,r){return e+e+n+n+r+r}));return{value:e}},QT=function(t){var e=JT(t),n=qT.exec(e.value);return null===n?["FFFFFF","FF","FF","FF"]:n},ZT=function(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()},tD=function(t){var e=ZT(t.red)+ZT(t.green)+ZT(t.blue);return $T(e)},eD=Math.min,nD=Math.max,rD=Math.round,oD=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,iD=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,aD=function(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}},uD=function(t){var e=parseInt(t,10);return e.toString()===t&&e>=0&&e<=255},sD=function(t){var e,n,r,o=(t.hue||0)%360,i=t.saturation/100,a=t.value/100;if(i=nD(0,eD(i,1)),a=nD(0,eD(a,1)),0===i)return e=n=r=rD(255*a),aD(e,n,r,1);var u=o/60,s=a*i,c=s*(1-Math.abs(u%2-1)),l=a-s;switch(Math.floor(u)){case 0:e=s,n=c,r=0;break;case 1:e=c,n=s,r=0;break;case 2:e=0,n=s,r=c;break;case 3:e=0,n=c,r=s;break;case 4:e=c,n=0,r=s;break;case 5:e=s,n=0,r=c;break;default:e=n=r=0}return e=rD(255*(e+l)),n=rD(255*(n+l)),r=rD(255*(r+l)),aD(e,n,r,1)},cD=function(t){var e=QT(t),n=parseInt(e[1],16),r=parseInt(e[2],16),o=parseInt(e[3],16);return aD(n,r,o,1)},lD=function(t,e,n,r){var o=parseInt(t,10),i=parseInt(e,10),a=parseInt(n,10),u=parseFloat(r);return aD(o,i,a,u)},fD=function(t){if("transparent"===t)return L.some(aD(0,0,0,0));var e=oD.exec(t);if(null!==e)return L.some(lD(e[1],e[2],e[3],"1"));var n=iD.exec(t);return null!==n?L.some(lD(n[1],n[2],n[3],n[4])):L.none()},dD=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},hD=aD(255,0,0,1),pD=function(t){return t.fire("SkinLoaded")},mD=function(t,e){return t.fire("SkinLoadError",e)},gD=function(t){return t.fire("ResizeEditor")},vD=function(t,e){return t.fire("ResizeContent",e)},bD=function(t,e){return t.fire("ScrollContent",e)},yD=function(t,e){return t.fire("TextColorChange",e)},wD=function(t,e,n){return{hue:t,saturation:e,value:n}},_D=function(t){var e=0,n=0,r=0,o=t.red/255,i=t.green/255,a=t.blue/255,u=Math.min(o,Math.min(i,a)),s=Math.max(o,Math.max(i,a));if(u===s)return r=u,wD(0,0,100*r);var c=o===u?i-a:a===u?o-i:a-o;return e=o===u?3:a===u?1:5,e=60*(e-c/(s-u)),n=(s-u)/s,r=s,wD(Math.round(e),Math.round(100*n),Math.round(100*r))},xD=function(t){return _D(cD(t))},CD=function(t){return tD(sD(t))},kD=function(t){return XT(t).orThunk((function(){return fD(t).map(tD)})).getOrThunk((function(){var e=document.createElement("canvas");e.height=1,e.width=1;var n=e.getContext("2d");n.clearRect(0,0,e.width,e.height),n.fillStyle="#FFFFFF",n.fillStyle=t,n.fillRect(0,0,1,1);var r=n.getImageData(0,0,1,1).data,o=r[0],i=r[1],a=r[2],u=r[3];return tD(aD(o,i,a,u))}))},SD=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),TD="tinymce-custom-colors";function DD(t){void 0===t&&(t=10);var e=SD.getItem(TD),n=i(e)?JSON.parse(e):[],r=function(e){var n=t-e.length;return n<0?e.slice(0,t):e},o=r(n),a=function(e){V(o,e).each(u),o.unshift(e),o.length>t&&o.pop(),SD.setItem(TD,JSON.stringify(o))},u=function(t){o.splice(t,1)},s=function(){return o.slice(0)};return{add:a,state:s}}var OD,ED="choiceitem",AD=[{type:ED,text:"Light Green",value:"#BFEDD2"},{type:ED,text:"Light Yellow",value:"#FBEEB8"},{type:ED,text:"Light Red",value:"#F8CAC6"},{type:ED,text:"Light Purple",value:"#ECCAFA"},{type:ED,text:"Light Blue",value:"#C2E0F4"},{type:ED,text:"Green",value:"#2DC26B"},{type:ED,text:"Yellow",value:"#F1C40F"},{type:ED,text:"Red",value:"#E03E2D"},{type:ED,text:"Purple",value:"#B96AD9"},{type:ED,text:"Blue",value:"#3598DB"},{type:ED,text:"Dark Turquoise",value:"#169179"},{type:ED,text:"Orange",value:"#E67E23"},{type:ED,text:"Dark Red",value:"#BA372A"},{type:ED,text:"Dark Purple",value:"#843FA1"},{type:ED,text:"Dark Blue",value:"#236FA1"},{type:ED,text:"Light Gray",value:"#ECF0F1"},{type:ED,text:"Medium Gray",value:"#CED4D9"},{type:ED,text:"Gray",value:"#95A5A6"},{type:ED,text:"Dark Gray",value:"#7E8C8D"},{type:ED,text:"Navy Blue",value:"#34495E"},{type:ED,text:"Black",value:"#000000"},{type:ED,text:"White",value:"#ffffff"}],MD=DD(10),ND=function(t){for(var e=[],n=0;n0?d(n,r,e,o):r.text.length-n.matchLength>=10?s():u()}}))}))}))},m=Wx((function(t){27!==t.which&&p()}),50),g={onKeypress:m,cancelIfNecessary:s,isMenuOpen:i,isActive:a,isProcessingAction:r.get,getView:function(){return tx.getContent(o)}};!1===t.hasPlugin("rtc")&&oC.setup(g,t)},RO={register:NO},zO=function(t,e,n){return Hc(t,e,n).isSome()},PO=function(t,e){var n=null,r=function(){for(var r=[],o=0;oIO||r>IO},FO=function(t){var e=rd(),n=Pn(!1),r=PO((function(e){t.triggerEvent(ti(),e),n.set(!0)}),LO),o=function(t){return BO(t).each((function(o){r.cancel();var i={x:o.clientX,y:o.clientY,target:t.target};r.schedule(t),n.set(!1),e.set(i)})),L.none()},i=function(t){return r.cancel(),BO(t).each((function(t){e.on((function(n){HO(t,n)&&e.clear()}))})),L.none()},a=function(o){r.cancel();var i=function(t){return Jr(t.target,o.target)};return e.get().filter(i).map((function(e){return n.get()?(o.prevent(),!1):t.triggerEvent(Zo(),o)}))},u=co([{key:So(),value:o},{key:To(),value:i},{key:Do(),value:a}]),s=function(t,e){return $t(u,e).bind((function(e){return e(t)}))};return{fireIfReady:s}},jO=function(t){var e=t.raw;return e.which===rb[0]&&!W(["input","textarea"],Wi(t.target))&&!zO(t.target,'[contenteditable="true"]')},VO=function(){return Fr().browser.isFirefox()},WO=Ee([dn("triggerEvent"),Sn("stopBackspace",!0)]),UO=function(t,e){return VO()?ad(t,"focus",e):id(t,"focusin",e)},$O=function(t,e){return VO()?ad(t,"blur",e):id(t,"focusout",e)},YO=function(t,e){var n=Qe("Getting GUI events settings",WO,e),r=["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"],o=FO(n),i=q(r.concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(function(e){return id(t,e,(function(t){o.fireIfReady(t,e).each((function(e){e&&t.kill()}));var r=n.triggerEvent(e,t);r&&t.kill()}))})),a=rd(),u=id(t,"paste",(function(t){o.fireIfReady(t,"paste").each((function(e){e&&t.kill()}));var e=n.triggerEvent("paste",t);e&&t.kill(),a.set(setTimeout((function(){n.triggerEvent(Ko(),t)}),0))})),s=id(t,"keydown",(function(t){var e=n.triggerEvent("keydown",t);e?t.kill():!0===n.stopBackspace&&jO(t)&&t.prevent()})),c=UO(t,(function(t){var e=n.triggerEvent("focusin",t);e&&t.kill()})),l=rd(),f=$O(t,(function(t){var e=n.triggerEvent("focusout",t);e&&t.kill(),l.set(setTimeout((function(){n.triggerEvent(Go(),t)}),0))})),d=function(){G(i,(function(t){t.unbind()})),s.unbind(),c.unbind(),f.unbind(),u.unbind(),a.on(clearTimeout),l.on(clearTimeout)};return{unbind:d}},qO=function(t,e){var n=$t(t,"target").getOr(e);return Pn(n)},GO=function(t,e){var n=Pn(!1),r=Pn(!1),o=function(){n.set(!0)},i=function(){r.set(!0)};return{stop:o,cut:i,isStopped:n.get,isCut:r.get,event:t,setSource:e.set,getSource:e.get}},KO=function(t){var e=Pn(!1),n=function(){e.set(!0)};return{stop:n,cut:g,isStopped:e.get,isCut:T,event:t,setSource:S("Cannot set source of a broadcasted event"),getSource:S("Cannot get source of a broadcasted event")}},XO=no.generate([{stopped:[]},{resume:["element"]},{complete:[]}]),JO=function(t,e,n,r,o,i){var a=t(e,r),u=GO(n,o);return a.fold((function(){return i.logEventNoHandlers(e,r),XO.complete()}),(function(t){var n=t.descHandler,r=Du(n);return r(u),u.isStopped()?(i.logEventStopped(e,t.element,n.purpose),XO.stopped()):u.isCut()?(i.logEventCut(e,t.element,n.purpose),XO.complete()):ta(t.element).fold((function(){return i.logNoParent(e,t.element,n.purpose),XO.complete()}),(function(r){return i.logEventResponse(e,t.element,n.purpose),XO.resume(r)}))}))},QO=function(t,e,n,r,o,i){return JO(t,e,n,r,o,i).fold(D,(function(r){return QO(t,e,n,r,o,i)}),T)},ZO=function(t,e,n,r,o){var i=qO(n,r);return JO(t,e,n,r,i,o)},tE=function(t,e,n){var r=KO(e);return G(t,(function(t){var e=t.descHandler,n=Du(e);n(r)})),r.isStopped()},eE=function(t,e,n,r){return nE(t,e,n,n.target,r)},nE=function(t,e,n,r,o){var i=qO(n,r);return QO(t,e,n,r,i,o)},rE=function(t,e){return{element:t,descHandler:e}},oE=function(t,e){return{id:t,descHandler:e}},iE=function(){var t={},e=function(e,n,r){It(r,(function(r,o){var i=void 0!==t[o]?t[o]:{};i[n]=Tu(r,e),t[o]=i}))},n=function(t,e){return eu(e).fold((function(){return L.none()}),(function(n){return t.bind((function(t){return $t(t,n)})).map((function(t){return rE(e,t)}))}))},r=function(e){return $t(t,e).map((function(t){return Vt(t,(function(t,e){return oE(e,t)}))})).getOr([])},o=function(e,r,o){var i=$t(t,r);return go(o,(function(t){return n(i,t)}),e)},i=function(e){It(t,(function(t,n){Yt(t,e)&&delete t[e]}))};return{registerId:e,unregisterId:i,filterByType:r,find:o}},aE=function(){var t=iE(),e={},n=function(t){var e=t.element;return eu(e).getOrThunk((function(){return Za("uid-",t.element)}))},r=function(t,n){var r=e[n];if(r!==t)throw new Error('The tagId "'+n+'" is already used by: '+Wa(r.element)+"\nCannot use it for: "+Wa(t.element)+"\nThe conflicting element is"+(fs(r.element)?" ":" not ")+"already in the DOM");i(t)},o=function(o){var i=n(o);qt(e,i)&&r(o,i);var a=[o];t.registerId(a,i,o.events),e[i]=o},i=function(n){eu(n.element).each((function(n){delete e[n],t.unregisterId(n)}))},a=function(e){return t.filterByType(e)},u=function(e,n,r){return t.find(e,n,r)},s=function(t){return $t(e,t)};return{find:u,filter:a,register:o,unregister:i,getById:s}},uE=function(t){var e=t.dom,n=e.attributes,r=A(e,["attributes"]);return{uid:t.uid,dom:E({tag:"div",attributes:E({role:"presentation"},n)},r),components:t.components,behaviours:eg(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},sE=fv({name:"Container",factory:uE,configFields:[Sn("components",[]),tg("containerBehaviours",[]),Sn("events",{}),Sn("domModification",{}),Sn("eventOrder",{})]}),cE=function(t){var e=function(e){return ta(t.element).fold(D,(function(t){return Jr(e,t)}))},n=aE(),r=function(t,r){return n.find(e,t,r)},o=YO(t.element,{triggerEvent:function(t,e){return Jc(t,e.target,(function(n){return eE(r,t,e,n)}))}}),i={debugInfo:w("real"),triggerEvent:function(t,e,n){Jc(t,e,(function(o){return nE(r,t,n,e,o)}))},triggerFocus:function(t,e){eu(t).fold((function(){Cf(t)}),(function(n){Jc(qo(),t,(function(n){return ZO(r,qo(),{originator:e,kill:g,prevent:g,target:t},t,n),!1}))}))},triggerEscape:function(t,e){i.triggerEvent("keydown",t.element,e.event)},getByUid:function(t){return m(t)},getByDom:function(t){return v(t)},build:js,addToGui:function(t){s(t)},removeFromGui:function(t){c(t)},addToWorld:function(t){a(t)},removeFromWorld:function(t){u(t)},broadcast:function(t){d(t)},broadcastOn:function(t,e){h(t,e)},broadcastEvent:function(t,e){p(t,e)},isConnected:D},a=function(t){t.connect(i),qi(t.element)||(n.register(t),G(t.components(),a),i.triggerEvent(ri(),t.element,{target:t.element}))},u=function(t){qi(t.element)||(G(t.components(),u),n.unregister(t)),t.disconnect()},s=function(e){Wp(t,e)},c=function(t){Yp(t)},l=function(){o.unbind(),Da(t.element)},f=function(t){var e=n.filter(Xo());G(e,(function(e){var n=e.descHandler,r=Du(n);r(t)}))},d=function(t){f({universal:!0,data:t})},h=function(t,e){f({universal:!1,channels:t,data:e})},p=function(t,e){var r=n.filter(t);return tE(r,e)},m=function(t){return n.getById(t).fold((function(){return yt.error(new Error('Could not find component with uid: "'+t+'" in system.'))}),yt.value)},v=function(t){var e=eu(t).getOr("not found");return m(e)};return a(t),{root:t,element:t.element,destroy:l,add:s,remove:c,getByUid:m,getByDom:v,addToWorld:a,removeFromWorld:u,broadcast:d,broadcastOn:h,broadcastEvent:p}},lE=function(t,e){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:q(t.items,e.interpreter)}},fE=w([Sn("prefix","form-field"),tg("fieldBehaviours",[vv,Zm])]),dE=w([zg({schema:[an("dom")],name:"label"}),zg({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[an("text")],name:"aria-descriptor"}),Ng({factory:{sketch:function(t){var e=uo(t,["factory"]);return t.factory.sketch(e)}},schema:[an("factory")],name:"field"})]),hE=function(t,e,n,r){var o=ng(t.fieldBehaviours,[vv.config({find:function(e){return qg(e,t,"field")}}),Zm.config({store:{mode:"manual",getValue:function(t){return vv.getCurrent(t).bind(Zm.getValue)},setValue:function(t,e){vv.getCurrent(t).each((function(t){Zm.setValue(t,e)}))}}})]),i=ki([Bi((function(e,n){var r=Kg(e,t,["label","field","aria-descriptor"]);r.field().each((function(e){var n=Ga(t.prefix);r.label().each((function(t){za(t.element,"for",n),za(e.element,"id",n)})),r["aria-descriptor"]().each((function(n){var r=Ga(t.prefix);za(n.element,"id",r),za(e.element,"aria-describedby",r)}))}))}))]),a={getField:function(e){return qg(e,t,"field")},getLabel:function(e){return qg(e,t,"label")}};return{uid:t.uid,dom:t.dom,components:e,behaviours:o,events:i,apis:a}},pE=dv({name:"FormField",configFields:fE(),partFields:dE(),factory:hE,apis:{getField:function(t,e){return t.getField(e)},getLabel:function(t,e){return t.getLabel(e)}}}),mE=function(t,e){return wu({attributes:co([{key:e.tabAttr,value:"true"}])})},gE=Object.freeze({__proto__:null,exhibit:mE}),vE=[Sn("tabAttr","data-alloy-tabstop")],bE=mf({fields:vE,name:"tabstopping",active:gE}),yE=tinymce.util.Tools.resolve("tinymce.html.Entities"),wE=function(t,e,n,r){var o=xE(t,e,n,r);return pE.sketch(o)},_E=function(t,e){return wE(t,e,[],[])},xE=function(t,e,n,r){return{dom:kE(n),components:t.toArray().concat([e]),fieldBehaviours:hf(r)}},CE=function(){return kE([])},kE=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},SE=function(t,e){return pE.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}})},TE=Ga("form-component-change"),DE=Ga("form-close"),OE=Ga("form-cancel"),EE=Ga("form-action"),AE=Ga("form-submit"),ME=Ga("form-block"),NE=Ga("form-unblock"),RE=Ga("form-tabchange"),zE=Ga("form-resize"),PE=function(t,e){var n,r=t.label.map((function(t){return SE(t,e)})),o=function(t){return function(e,n){Hc(n.event.target,"[data-collection-item-value]").each((function(r){t(e,n,r,Ia(r,"data-collection-item-value"))}))}},i=function(n,r){var o=q(r,(function(n){var r=kx.translate(n.text),o=1===t.columns?'
'+r+"
":"",i='
'+n.icon+"
",a={_:" "," - ":" ","-":" "},u=r.replace(/\_| \- |\-/g,(function(t){return a[t]})),s=e.isDisabled()?" tox-collection__item--state-disabled":"";return'
'+i+o+"
"})),i="auto"!==t.columns&&t.columns>1?Y(o,t.columns):[o],a=q(i,(function(t){return'
'+t.join("")+"
"}));Ma(n.element,a.join(""))},a=o((function(n,r,o,i){r.stop(),e.isDisabled()||yi(n,EE,{name:t.name,value:i})})),u=[Oi(Ro(),o((function(t,e,n){Cf(n)}))),Oi(Fo(),a),Oi(Zo(),a),Oi(zo(),o((function(t,e,n){Bc(t.element,"."+tk).each((function(t){Ju(t,tk)})),Ku(n,tk)}))),Oi(Po(),o((function(t){Bc(t.element,"."+tk).each((function(t){Ju(t,tk)}))}))),ji(o((function(e,n,r,o){yi(e,EE,{name:t.name,value:o})})))],s=function(t,e){return q(Gh(t.element,".tox-collection__item"),e)},c=pE.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==t.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:_},behaviours:hf([Iv.config({disabled:e.isDisabled,onDisabled:function(t){s(t,(function(t){Ku(t,"tox-collection__item--state-disabled"),za(t,"aria-disabled",!0)}))},onEnabled:function(t){s(t,(function(t){Ju(t,"tox-collection__item--state-disabled"),Ha(t,"aria-disabled")}))}}),uT(),Bw.config({}),Zm.config({store:{mode:"memory",initialValue:[]},onSetValue:function(e,n){i(e,n),"auto"===t.columns&&Gk(e,5,"tox-collection__item").each((function(t){var n=t.numRows,r=t.numColumns;Ow.setGridSize(e,n,r)})),bi(e,zE)}}),bE.config({}),Ow.config(rO(t.columns,"normal")),Fw("collection-events",u)]),eventOrder:(n={},n[Jo()]=["disabling","alloy.base.behaviour","collection-events"],n)}),l=["tox-form__group--collection"];return wE(r,c,l,[])},IE=w([vn("data"),Sn("inputAttributes",{}),Sn("inputStyles",{}),Sn("tag","input"),Sn("inputClasses",[]),ul("onSetValue"),Sn("styles",{}),Sn("eventOrder",{}),tg("inputBehaviours",[Zm,Kw]),Sn("selectOnFocus",!0)]),LE=function(t){return hf([Kw.config({onFocus:t.selectOnFocus?function(t){var e=t.element,n=Ts(e);e.dom.setSelectionRange(0,n.length)}:g})])},BE=function(t){return E(E({},LE(t)),ng(t.inputBehaviours,[Zm.config({store:E(E({mode:"manual"},t.data.map((function(t){return{initialValue:t}})).getOr({})),{getValue:function(t){return Ts(t.element)},setValue:function(t,e){var n=Ts(t.element);n!==e&&Ds(t.element,e)}}),onSetValue:t.onSetValue})]))},HE=function(t){return{tag:t.tag,attributes:E({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},FE=function(t,e){return{uid:t.uid,dom:HE(t),components:[],behaviours:BE(t),eventOrder:t.eventOrder}},jE=fv({name:"Input",configFields:IE(),factory:FE}),VE={},WE={exports:VE};(function(e,n,r,o){(function(o){if("object"===typeof n&&"undefined"!==typeof r)r.exports=o();else if("function"===typeof e&&e.amd)e([],o);else{var i;i="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:this,i.EphoxContactWrapper=o()}})((function(){return function(){function t(e,n,r){function i(u,s){if(!n[u]){if(!e[u]){var c="function"==typeof o&&o;if(!s&&c)return c(u,!0);if(a)return a(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var f=n[u]={exports:{}};e[u][0].call(f.exports,(function(t){var n=e[u][1][t];return i(n||t)}),f,f.exports,t,e,n,r)}return n[u].exports}for(var a="function"==typeof o&&o,u=0;u1)for(var n=1;n=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n.setImmediate="function"===typeof e?e:function(t){var e=s++,r=!(arguments.length<2)&&a.call(arguments,1);return u[e]=!0,o((function(){u[e]&&(r?t.apply(null,r):t.call(null),n.clearImmediate(e))})),e},n.clearImmediate="function"===typeof r?r:function(t){delete u[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),o=function(){return"undefined"!==typeof window?window:Function("return this;")()}();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)}))})(void 0,VE,WE,void 0);var UE,$E=WE.exports.boltExport,YE=function(t){var e=L.none(),n=[],r=function(t){return YE((function(e){o((function(n){e(t(n))}))}))},o=function(t){a()?s(t):n.push(t)},i=function(t){a()||(e=L.some(t),u(n),n=[])},a=function(){return e.isSome()},u=function(t){G(t,s)},s=function(t){e.each((function(e){setTimeout((function(){t(e)}),0)}))};return t(i),{get:o,map:r,isReady:a}},qE=function(t){return YE((function(e){e(t)}))},GE={nu:YE,pure:qE},KE=function(t){setTimeout((function(){throw t}),0)},XE=function(t){var e=function(e){t().then(e,KE)},n=function(e){return XE((function(){return t().then(e)}))},r=function(e){return XE((function(){return t().then((function(t){return e(t).toPromise()}))}))},o=function(e){return XE((function(){return t().then((function(){return e.toPromise()}))}))},i=function(){return GE.nu(e)},a=function(){var e=null;return XE((function(){return null===e&&(e=t()),e}))},u=t;return{map:n,bind:r,anonBind:o,toLazy:i,toCached:a,toPromise:u,get:e}},JE=function(t){return XE((function(){return new $E(t)}))},QE=function(t){return XE((function(){return $E.resolve(t)}))},ZE={nu:JE,pure:QE},tA=["input","textarea"],eA=function(t){var e=Wi(t);return W(tA,e)},nA=function(t,e){var n=e.getRoot(t).getOr(t.element);Ju(n,e.invalidClass),e.notify.each((function(e){eA(t.element)&&za(t.element,"aria-invalid",!1),e.getContainer(t).each((function(t){Ma(t,e.validHtml)})),e.onValid(t)}))},rA=function(t,e,n,r){var o=e.getRoot(t).getOr(t.element);Ku(o,e.invalidClass),e.notify.each((function(e){eA(t.element)&&za(t.element,"aria-invalid",!0),e.getContainer(t).each((function(t){Ma(t,r)})),e.onInvalid(t,r)}))},oA=function(t,e,n){return e.validator.fold((function(){return ZE.pure(yt.value(!0))}),(function(e){return e.validate(t)}))},iA=function(t,e,n){return e.notify.each((function(e){e.onValidate(t)})),oA(t,e).map((function(r){return t.getSystem().isConnected()?r.fold((function(r){return rA(t,e,n,r),yt.error(r)}),(function(n){return nA(t,e),yt.value(n)})):yt.error("No longer in system")}))},aA=function(t,e){var n=e.getRoot(t).getOr(t.element);return Qu(n,e.invalidClass)},uA=Object.freeze({__proto__:null,markValid:nA,markInvalid:rA,query:oA,run:iA,isInvalid:aA}),sA=function(t,e){return t.validator.map((function(n){return ki([Oi(n.onEvent,(function(n){iA(n,t,e).get(_)}))].concat(n.validateOnLoad?[Bi((function(n){iA(n,t,e).get(g)}))]:[]))})).getOr({})},cA=Object.freeze({__proto__:null,events:sA}),lA=[an("invalidClass"),Sn("getRoot",L.none),Cn("notify",[Sn("aria","alert"),Sn("getContainer",L.none),Sn("validHtml",""),ul("onValid"),ul("onInvalid"),ul("onValidate")]),Cn("validator",[an("validate"),Sn("onEvent","input"),Sn("validateOnLoad",!0)])],fA=mf({fields:lA,name:"invalidating",active:cA,apis:uA,extra:{validation:function(t){return function(e){var n=Zm.getValue(e);return ZE.pure(t(n))}}}}),dA=function(t,e,n,r){return n.getOrCreate(t,e,r)},hA=Object.freeze({__proto__:null,getCoupled:dA}),pA=[un("others",Ge(yt.value,Ie()))],mA=function(){var t={},e=function(e,n,r){var o=zt(n.others);if(o)return $t(t,r).getOrThunk((function(){var o=$t(n.others,r).getOrDie("No information found for coupled component: "+r),i=o(e),a=e.getSystem().build(i);return t[r]=a,a}));throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(o,null,2))},n=w({});return mu({readState:n,getOrCreate:e})},gA=Object.freeze({__proto__:null,init:mA}),vA=mf({fields:pA,name:"coupling",apis:hA,state:gA}),bA=w("sink"),yA=w(zg({name:bA(),overrides:w({dom:{tag:"div"},behaviours:hf([Lp.config({useFixed:D})]),events:ki([Pi(Io()),Pi(Eo()),Pi(Fo())])})}));(function(t){t[t["HighlightFirst"]=0]="HighlightFirst",t[t["HighlightNone"]=1]="HighlightNone"})(UE||(UE={}));var wA,_A=function(t,e){var n=t.getHotspot(e).getOr(e),r="hotspot",o=t.getAnchorOverrides();return t.layouts.fold((function(){return{type:r,hotspot:n,overrides:o}}),(function(t){return{type:r,hotspot:n,overrides:o,layouts:t}}))},xA=function(t,e,n){var r=t.fetch;return r(n).map(e)},CA=function(t,e,n,r,o,i,a){var u=xA(t,e,r),s=OA(r,t);return u.map((function(t){return t.bind((function(t){return L.from(J_.sketch(E(E({},i.menu()),{uid:nu(""),data:t,highlightImmediately:a===UE.HighlightFirst,onOpenMenu:function(t,e){var r=s().getOrDie();Lp.position(r,e,{anchor:n}),vm.decloak(o)},onOpenSubmenu:function(t,e,n){var r=s().getOrDie();Lp.position(r,n,{anchor:{type:"submenu",item:e}}),vm.decloak(o)},onRepositionMenu:function(t,e,r){var o=s().getOrDie();Lp.position(o,e,{anchor:n}),G(r,(function(t){Lp.position(o,t.triggeredMenu,{anchor:{type:"submenu",item:t.triggeringItem}})}))},onEscape:function(){return Kw.focus(r),vm.close(o),L.some(!0)}})))}))}))},kA=function(t,e,n,r,o,i,a){var u=_A(t,n),s=CA(t,e,u,n,r,o,a);return s.map((function(t){return t.fold((function(){vm.isOpen(r)&&vm.close(r)}),(function(t){vm.cloak(r),vm.open(r,t),i(r)})),r}))},SA=function(t,e,n,r,o,i,a){return vm.close(r),ZE.pure(r)},TA=function(t,e,n,r,o,i){var a=vA.getCoupled(n,"sandbox"),u=vm.isOpen(a),s=u?SA:kA;return s(t,e,n,a,r,o,i)},DA=function(t,e,n){var r=vv.getCurrent(e).getOr(e),o=nc(t.element);n?gs(r.element,"min-width",o+"px"):ec(r.element,o)},OA=function(t,e){return t.getSystem().getByUid(e.uid+"-"+bA()).map((function(t){return function(){return yt.value(t)}})).getOrThunk((function(){return e.lazySink.fold((function(){return function(){return yt.error(new Error("No internal sink is specified, nor could an external sink be found"))}}),(function(e){return function(){return e(t)}}))}))},EA=function(t){vm.getState(t).each((function(t){J_.repositionMenus(t)}))},AA=function(t,e,n){var r=jc(),o=function(o,i){var a=_A(t,e);r.link(e.element),t.matchWidth&&DA(a.hotspot,i,t.useMinWidth),t.onOpen(a,o,i),void 0!==n&&void 0!==n.onOpen&&n.onOpen(o,i)},i=function(t,o){r.unlink(e.element),void 0!==n&&void 0!==n.onClose&&n.onClose(t,o)},a=OA(e,t);return{dom:{tag:"div",classes:t.sandboxClasses,attributes:{id:r.id,role:"listbox"}},behaviours:rg.augment(t.sandboxBehaviours,[Zm.config({store:{mode:"memory",initialValue:e}}),vm.config({onOpen:o,onClose:i,isPartOf:function(t,n,r){return Wc(n,r)||Wc(e,r)},getAttachPoint:function(){return a().getOrDie()}}),vv.config({find:function(t){return vm.getState(t).bind((function(t){return vv.getCurrent(t)}))}}),yf.config({channels:E(E({},xm({isExtraPart:T})),km({doReposition:EA}))})])}},MA=function(t){var e=vA.getCoupled(t,"sandbox");EA(e)},NA=function(){return[Sn("sandboxClasses",[]),rg.field("sandboxBehaviours",[vv,yf,vm,Zm])]},RA=w([an("dom"),an("fetch"),ul("onOpen"),sl("onExecute"),Sn("getHotspot",L.some),Sn("getAnchorOverrides",w({})),Bd(),tg("dropdownBehaviours",[p_,vA,Ow,Kw]),an("toggleClass"),Sn("eventOrder",{}),vn("lazySink"),Sn("matchWidth",!1),Sn("useMinWidth",!1),vn("role")].concat(NA())),zA=w([Rg({schema:[ol()],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),yA()]),PA=function(t,e,n,r){var o,i=function(e){return $t(t.dom,"attributes").bind((function(t){return $t(t,e)}))},a=function(t){vm.getState(t).each((function(t){J_.highlightPrimary(t)}))},u=function(e){var n=a;TA(t,_,e,r,n,UE.HighlightFirst).get(g)},s={expand:function(e){p_.isOn(e)||TA(t,_,e,r,g,UE.HighlightNone).get(g)},open:function(e){p_.isOn(e)||TA(t,_,e,r,g,UE.HighlightFirst).get(g)},isOpen:p_.isOn,close:function(e){p_.isOn(e)&&TA(t,_,e,r,g,UE.HighlightFirst).get(g)},repositionMenus:function(t){p_.isOn(t)&&MA(t)}},c=function(t,e){return wi(t),L.some(!0)};return{uid:t.uid,dom:t.dom,components:e,behaviours:ng(t.dropdownBehaviours,[p_.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),vA.config({others:{sandbox:function(e){return AA(t,e,{onOpen:function(){return p_.on(e)},onClose:function(){return p_.off(e)}})}}}),Ow.config({mode:"special",onSpace:c,onEnter:c,onDown:function(t,e){if(IA.isOpen(t)){var n=vA.getCoupled(t,"sandbox");a(n)}else IA.open(t);return L.some(!0)},onEscape:function(t,e){return IA.isOpen(t)?(IA.close(t),L.some(!0)):L.none()}}),Kw.config({})]),events:g_(L.some(u)),eventOrder:E(E({},t.eventOrder),(o={},o[Jo()]=["disabling","toggling","alloy.base.behaviour"],o)),apis:s,domModification:{attributes:E(E({"aria-haspopup":"true"},t.role.fold((function(){return{}}),(function(t){return{role:t}}))),"button"===t.dom.tag?{type:i("type").getOr("button")}:{})}}},IA=dv({name:"Dropdown",configFields:RA(),partFields:zA(),factory:PA,apis:{open:function(t,e){return t.open(e)},expand:function(t,e){return t.expand(e)},close:function(t,e){return t.close(e)},isOpen:function(t,e){return t.isOpen(e)},repositionMenus:function(t,e){return t.repositionMenus(e)}}}),LA=function(){return wu({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})},BA=function(){return ki([Si(Uo(),D)])},HA=Object.freeze({__proto__:null,events:BA,exhibit:LA}),FA=mf({fields:[],name:"unselecting",active:HA}),jA=function(t,e){return IA.sketch({dom:t.dom,components:t.components,toggleClass:"mce-active",dropdownBehaviours:hf([dT.button(e.providers.isDisabled),uT(),FA.config({}),bE.config({})]),layouts:t.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:e.getSink,fetch:function(n){return ZE.nu((function(e){return t.fetch(e)})).map((function(r){return L.from(AO(Jt(tO(Ga("menu-value"),r,(function(e){t.onItemAction(n,e)}),t.columns,t.presets,VC.CLOSE_ON_EXECUTE,T,e.providers),{movement:nO(t.columns,t.presets)})))}))},parts:{menu:mk(!1,1,t.presets)}})},VA=Ga("color-input-change"),WA=Ga("color-swatch-change"),UA=Ga("color-picker-cancel"),$A=function(t,e,n){var r=pE.parts.field({factory:jE,inputClasses:["tox-textfield"],onSetValue:function(t){return fA.run(t).get(g)},inputBehaviours:hf([Iv.config({disabled:e.providers.isDisabled}),uT(),bE.config({}),fA.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return ta(t.element)},notify:{onValid:function(t){var e=Zm.getValue(t);yi(t,VA,{color:e})}},validator:{validateOnLoad:!1,validate:function(t){var e=Zm.getValue(t);if(0===e.length)return ZE.pure(yt.value(!0));var n=jn.fromTag("span");gs(n,"background-color",e);var r=_s(n,"background-color").fold((function(){return yt.error("blah")}),(function(t){return yt.value(e)}));return ZE.pure(r)}}})]),selectOnFocus:!1}),o=t.label.map((function(t){return SE(t,e.providers)})),i=function(t,e){yi(t,WA,{value:e})},a=function(t,e){u.getOpt(t).each((function(t){"custom"===e?n.colorPicker((function(e){e.fold((function(){return bi(t,UA)}),(function(e){i(t,e),BD(e)}))}),"#ffffff"):i(t,"remove"===e?"":e)}))},u=Cx(jA({dom:{tag:"span",attributes:{"aria-label":e.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Vl,jl,Yl]},onLtr:function(){return[jl,Vl,Yl]}},components:[],fetch:GD(n.getColors(),n.hasCustomColors()),columns:n.getColorCols(),presets:"color",onItemAction:a},e));return pE.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:o.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[r,u.asSpec()]}]),fieldBehaviours:hf([Fw("form-field-events",[Oi(VA,(function(e,n){u.getOpt(e).each((function(t){gs(t.element,"background-color",n.event.color)})),yi(e,TE,{name:t.name})})),Oi(WA,(function(t,e){pE.getField(t).each((function(n){Zm.setValue(n,e.event.value),vv.getCurrent(t).each(Kw.focus)}))})),Oi(UA,(function(t,e){pE.getField(t).each((function(e){vv.getCurrent(t).each(Kw.focus)}))}))])])})},YA=zg({schema:[an("dom")],name:"label"}),qA=function(t){return zg({name:t+"-edge",overrides:function(e){var n=e.model.manager.edgeActions[t];return n.fold((function(){return{}}),(function(t){return{events:ki([Ei(So(),(function(e,n,r){return t(e,r)}),[e]),Ei(Eo(),(function(e,n,r){return t(e,r)}),[e]),Ei(Ao(),(function(e,n,r){r.mouseIsDown.get()&&t(e,r)}),[e])])}}))}})},GA=qA("top-left"),KA=qA("top"),XA=qA("top-right"),JA=qA("right"),QA=qA("bottom-right"),ZA=qA("bottom"),tM=qA("bottom-left"),eM=qA("left"),nM=Ng({name:"thumb",defaults:w({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:ki([Ri(So(),t,"spectrum"),Ri(To(),t,"spectrum"),Ri(Do(),t,"spectrum"),Ri(Eo(),t,"spectrum"),Ri(Ao(),t,"spectrum"),Ri(No(),t,"spectrum")])}}}),rM=Ng({schema:[rn("mouseIsDown",(function(){return Pn(!1)}))],name:"spectrum",overrides:function(t){var e=t.model,n=e.manager,r=function(e,r){return n.getValueFromEvent(r).map((function(r){return n.setValueFrom(e,t,r)}))};return{behaviours:hf([Ow.config({mode:"special",onLeft:function(e){return n.onLeft(e,t)},onRight:function(e){return n.onRight(e,t)},onUp:function(e){return n.onUp(e,t)},onDown:function(e){return n.onDown(e,t)}}),Kw.config({})]),events:ki([Oi(So(),r),Oi(To(),r),Oi(Eo(),r),Oi(Ao(),(function(e,n){t.mouseIsDown.get()&&r(e,n)}))])}}}),oM=[YA,eM,JA,KA,ZA,GA,XA,tM,QA,nM,rM],iM="slider.change.value",aM=w(iM),uM=function(t){return-1!==t.type.indexOf("touch")},sM=function(t){var e=t.event.raw;if(uM(e)){var n=e;return void 0!==n.touches&&1===n.touches.length?L.some(n.touches[0]).map((function(t){return Ks(t.clientX,t.clientY)})):L.none()}var r=e;return void 0!==r.clientX?L.some(r).map((function(t){return Ks(t.clientX,t.clientY)})):L.none()},cM="top",lM="right",fM="bottom",dM="left",hM=function(t){return t.model.minX},pM=function(t){return t.model.minY},mM=function(t){return t.model.minX-1},gM=function(t){return t.model.minY-1},vM=function(t){return t.model.maxX},bM=function(t){return t.model.maxY},yM=function(t){return t.model.maxX+1},wM=function(t){return t.model.maxY+1},_M=function(t,e,n){return e(t)-n(t)},xM=function(t){return _M(t,vM,hM)},CM=function(t){return _M(t,bM,pM)},kM=function(t){return xM(t)/2},SM=function(t){return CM(t)/2},TM=function(t){return t.stepSize},DM=function(t){return t.snapToGrid},OM=function(t){return t.snapStart},EM=function(t){return t.rounded},AM=function(t,e){return void 0!==t[e+"-edge"]},MM=function(t){return AM(t,dM)},NM=function(t){return AM(t,lM)},RM=function(t){return AM(t,cM)},zM=function(t){return AM(t,fM)},PM=function(t){return t.model.value.get()},IM=function(t){return{x:t}},LM=function(t){return{y:t}},BM=function(t,e){return{x:t,y:e}},HM=function(t,e){yi(t,aM(),{value:e})},FM=function(t,e){HM(t,BM(mM(e),gM(e)))},jM=function(t,e){HM(t,LM(gM(e)))},VM=function(t,e){HM(t,BM(kM(e),gM(e)))},WM=function(t,e){HM(t,BM(yM(e),gM(e)))},UM=function(t,e){HM(t,IM(yM(e)))},$M=function(t,e){HM(t,BM(yM(e),SM(e)))},YM=function(t,e){HM(t,BM(yM(e),wM(e)))},qM=function(t,e){HM(t,LM(wM(e)))},GM=function(t,e){HM(t,BM(kM(e),wM(e)))},KM=function(t,e){HM(t,BM(mM(e),wM(e)))},XM=function(t,e){HM(t,IM(mM(e)))},JM=function(t,e){HM(t,BM(mM(e),SM(e)))},QM=function(t,e,n,r){return tn?n:t===e?e-1:Math.max(e,t-r)},ZM=function(t,e,n,r){return t>n?t:td)return m;var g=nN(o,f,d),v=tN(g/h*r+e,p,m);return a&&v>=e&&v<=n?eN(v,e,n,i,u):s?Math.round(v):v},oN=function(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.hasMinEdge,a=t.hasMaxEdge,u=t.maxBound,s=t.maxOffset,c=t.centerMinEdge,l=t.centerMaxEdge;return on?a?u:l:(o-e)/r*s},iN="top",aN="right",uN="bottom",sN="left",cN="width",lN="height",fN=function(t){return t.element.dom.getBoundingClientRect()},dN=function(t,e){return t[e]},hN=function(t){var e=fN(t);return dN(e,sN)},pN=function(t){var e=fN(t);return dN(e,aN)},mN=function(t){var e=fN(t);return dN(e,iN)},gN=function(t){var e=fN(t);return dN(e,uN)},vN=function(t){var e=fN(t);return dN(e,cN)},bN=function(t){var e=fN(t);return dN(e,lN)},yN=function(t,e,n){return(t+e)/2-n},wN=function(t,e){var n=fN(t),r=fN(e),o=dN(n,sN),i=dN(n,aN),a=dN(r,sN);return yN(o,i,a)},_N=function(t,e){var n=fN(t),r=fN(e),o=dN(n,iN),i=dN(n,uN),a=dN(r,iN);return yN(o,i,a)},xN=function(t,e){yi(t,aM(),{value:e})},CN=function(t){return{x:t}},kN=function(t,e,n){var r={min:hM(e),max:vM(e),range:xM(e),value:n,step:TM(e),snap:DM(e),snapStart:OM(e),rounded:EM(e),hasMinEdge:MM(e),hasMaxEdge:NM(e),minBound:hN(t),maxBound:pN(t),screenRange:vN(t)};return rN(r)},SN=function(t,e,n){var r=kN(t,e,n),o=CN(r);return xN(t,o),r},TN=function(t,e){var n=hM(e);xN(t,CN(n))},DN=function(t,e){var n=vM(e);xN(t,CN(n))},ON=function(t,e,n){var r=t>0?ZM:QM,o=r(PM(n).x,hM(n),vM(n),TM(n));return xN(e,CN(o)),L.some(o)},EN=function(t){return function(e,n){return ON(t,e,n).map(D)}},AN=function(t){var e=sM(t);return e.map((function(t){return t.left}))},MN=function(t,e,n,r,o){var i=0,a=vN(t),u=r.bind((function(e){return L.some(wN(e,t))})).getOr(i),s=o.bind((function(e){return L.some(wN(e,t))})).getOr(a),c={min:hM(e),max:vM(e),range:xM(e),value:n,hasMinEdge:MM(e),hasMaxEdge:NM(e),minBound:hN(t),minOffset:i,maxBound:pN(t),maxOffset:a,centerMinEdge:u,centerMaxEdge:s};return oN(c)},NN=function(t,e,n,r,o,i){var a=MN(e,i,n,r,o);return hN(e)-hN(t)+a},RN=function(t,e,n,r){var o=PM(n),i=NN(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=nc(e.element)/2;gs(e.element,"left",i-a+"px")},zN=EN(-1),PN=EN(1),IN=L.none,LN=L.none,BN={"top-left":L.none(),top:L.none(),"top-right":L.none(),right:L.some(UM),"bottom-right":L.none(),bottom:L.none(),"bottom-left":L.none(),left:L.some(XM)},HN=Object.freeze({__proto__:null,setValueFrom:SN,setToMin:TN,setToMax:DN,findValueOfOffset:kN,getValueFromEvent:AN,findPositionOfValue:NN,setPositionFromValue:RN,onLeft:zN,onRight:PN,onUp:IN,onDown:LN,edgeActions:BN}),FN=function(t,e){yi(t,aM(),{value:e})},jN=function(t){return{y:t}},VN=function(t,e,n){var r={min:pM(e),max:bM(e),range:CM(e),value:n,step:TM(e),snap:DM(e),snapStart:OM(e),rounded:EM(e),hasMinEdge:RM(e),hasMaxEdge:zM(e),minBound:mN(t),maxBound:gN(t),screenRange:bN(t)};return rN(r)},WN=function(t,e,n){var r=VN(t,e,n),o=jN(r);return FN(t,o),r},UN=function(t,e){var n=pM(e);FN(t,jN(n))},$N=function(t,e){var n=bM(e);FN(t,jN(n))},YN=function(t,e,n){var r=t>0?ZM:QM,o=r(PM(n).y,pM(n),bM(n),TM(n));return FN(e,jN(o)),L.some(o)},qN=function(t){return function(e,n){return YN(t,e,n).map(D)}},GN=function(t){var e=sM(t);return e.map((function(t){return t.top}))},KN=function(t,e,n,r,o){var i=0,a=bN(t),u=r.bind((function(e){return L.some(_N(e,t))})).getOr(i),s=o.bind((function(e){return L.some(_N(e,t))})).getOr(a),c={min:pM(e),max:bM(e),range:CM(e),value:n,hasMinEdge:RM(e),hasMaxEdge:zM(e),minBound:mN(t),minOffset:i,maxBound:gN(t),maxOffset:a,centerMinEdge:u,centerMaxEdge:s};return oN(c)},XN=function(t,e,n,r,o,i){var a=KN(e,i,n,r,o);return mN(e)-mN(t)+a},JN=function(t,e,n,r){var o=PM(n),i=XN(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),a=$s(e.element)/2;gs(e.element,"top",i-a+"px")},QN=L.none,ZN=L.none,tR=qN(-1),eR=qN(1),nR={"top-left":L.none(),top:L.some(jM),"top-right":L.none(),right:L.none(),"bottom-right":L.none(),bottom:L.some(qM),"bottom-left":L.none(),left:L.none()},rR=Object.freeze({__proto__:null,setValueFrom:WN,setToMin:UN,setToMax:$N,findValueOfOffset:VN,getValueFromEvent:GN,findPositionOfValue:XN,setPositionFromValue:JN,onLeft:QN,onRight:ZN,onUp:tR,onDown:eR,edgeActions:nR}),oR=function(t,e){yi(t,aM(),{value:e})},iR=function(t,e){return{x:t,y:e}},aR=function(t,e,n){var r=kN(t,e,n.left),o=VN(t,e,n.top),i=iR(r,o);return oR(t,i),i},uR=function(t,e,n,r){var o=t>0?ZM:QM,i=e?PM(r).x:o(PM(r).x,hM(r),vM(r),TM(r)),a=e?o(PM(r).y,pM(r),bM(r),TM(r)):PM(r).y;return oR(n,iR(i,a)),L.some(i)},sR=function(t,e){return function(n,r){return uR(t,e,n,r).map(D)}},cR=function(t,e){var n=hM(e),r=pM(e);oR(t,iR(n,r))},lR=function(t,e){var n=vM(e),r=bM(e);oR(t,iR(n,r))},fR=function(t){return sM(t)},dR=function(t,e,n,r){var o=PM(n),i=NN(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=XN(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),u=nc(e.element)/2,s=$s(e.element)/2;gs(e.element,"left",i-u+"px"),gs(e.element,"top",a-s+"px")},hR=sR(-1,!1),pR=sR(1,!1),mR=sR(-1,!0),gR=sR(1,!0),vR={"top-left":L.some(FM),top:L.some(VM),"top-right":L.some(WM),right:L.some($M),"bottom-right":L.some(YM),bottom:L.some(GM),"bottom-left":L.some(KM),left:L.some(JM)},bR=Object.freeze({__proto__:null,setValueFrom:aR,setToMin:cR,setToMax:lR,getValueFromEvent:fR,setPositionFromValue:dR,onLeft:hR,onRight:pR,onUp:mR,onDown:gR,edgeActions:vR}),yR=[Sn("stepSize",1),Sn("onChange",g),Sn("onChoose",g),Sn("onInit",g),Sn("onDragStart",g),Sn("onDragEnd",g),Sn("snapToGrid",!1),Sn("rounded",!0),vn("snapStart"),un("model",tn("mode",{x:[Sn("minX",0),Sn("maxX",100),rn("value",(function(t){return Pn(t.mode.minX)})),an("getInitialValue"),fl("manager",HN)],y:[Sn("minY",0),Sn("maxY",100),rn("value",(function(t){return Pn(t.mode.minY)})),an("getInitialValue"),fl("manager",rR)],xy:[Sn("minX",0),Sn("maxX",100),Sn("minY",0),Sn("maxY",100),rn("value",(function(t){return Pn({x:t.mode.minX,y:t.mode.minY})})),an("getInitialValue"),fl("manager",bR)]})),tg("sliderBehaviours",[Ow,Zm]),rn("mouseIsDown",(function(){return Pn(!1)}))],wR=function(t,e,n,r){var o,i=function(e){return Gg(e,t,"thumb")},a=function(e){return Gg(e,t,"spectrum")},u=function(e){return qg(e,t,"left-edge")},s=function(e){return qg(e,t,"right-edge")},c=function(e){return qg(e,t,"top-edge")},l=function(e){return qg(e,t,"bottom-edge")},f=t.model,d=f.manager,h=function(e,n){d.setPositionFromValue(e,n,t,{getLeftEdge:u,getRightEdge:s,getTopEdge:c,getBottomEdge:l,getSpectrum:a})},p=function(t,e){f.value.set(e);var n=i(t);h(t,n)},m=function(e,n){p(e,n);var r=i(e);return t.onChange(e,r,n),L.some(!0)},g=function(e){d.setToMin(e,t)},v=function(e){d.setToMax(e,t)},b=function(e){var n=function(){qg(e,t,"thumb").each((function(n){var r=f.value.get();t.onChoose(e,n,r)}))},r=t.mouseIsDown.get();t.mouseIsDown.set(!1),r&&n()},y=function(e,n){n.stop(),t.mouseIsDown.set(!0),t.onDragStart(e,i(e))},w=function(e,n){n.stop(),t.onDragEnd(e,i(e)),b(e)};return{uid:t.uid,dom:t.dom,components:e,behaviours:ng(t.sliderBehaviours,[Ow.config({mode:"special",focusIn:function(e){return qg(e,t,"spectrum").map(Ow.focusIn).map(D)}}),Zm.config({store:{mode:"manual",getValue:function(t){return f.value.get()}}}),yf.config({channels:(o={},o[wm()]={onReceive:b},o)})]),events:ki([Oi(aM(),(function(t,e){m(t,e.event.value)})),Bi((function(e,n){var r=f.getInitialValue();f.value.set(r);var o=i(e);h(e,o);var u=a(e);t.onInit(e,o,u,f.value.get())})),Oi(So(),y),Oi(Do(),w),Oi(Eo(),y),Oi(No(),w)]),apis:{resetToMin:g,resetToMax:v,setValue:p,refresh:h},domModification:{styles:{position:"relative"}}}},_R=dv({name:"Slider",configFields:yR,partFields:oM,factory:wR,apis:{setValue:function(t,e,n){t.setValue(e,n)},resetToMin:function(t,e){t.resetToMin(e)},resetToMax:function(t,e){t.resetToMax(e)},refresh:function(t,e){t.refresh(e)}}}),xR=Ga("rgb-hex-update"),CR=Ga("slider-update"),kR=Ga("palette-update"),SR=function(t,e){var n=_R.parts.spectrum({dom:{tag:"div",classes:[e("hue-slider-spectrum")],attributes:{role:"presentation"}}}),r=_R.parts.thumb({dom:{tag:"div",classes:[e("hue-slider-thumb")],attributes:{role:"presentation"}}});return _R.sketch({dom:{tag:"div",classes:[e("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:w({y:0})},components:[n,r],sliderBehaviours:hf([Kw.config({})]),onChange:function(t,e,n){yi(t,CR,{value:n})}})},TR="form",DR=[tg("formBehaviours",[Zm])],OR=function(t){return""},ER=function(t){var e=function(){var t=[],e=function(e,n){return t.push(e),Vg(TR,OR(e),n)};return{field:e,record:w(t)}}(),n=t(e),r=e.record(),o=q(r,(function(t){return Ng({name:t,pname:OR(t)})}));return iv(TR,DR,o,MR,n)},AR=function(t,e){return t.fold((function(){return yt.error(e)}),yt.value)},MR=function(t,e){return{uid:t.uid,dom:t.dom,components:e,behaviours:ng(t.formBehaviours,[Zm.config({store:{mode:"manual",getValue:function(e){var n=Xg(e,t);return Lt(n,(function(t,e){return t().bind((function(t){var n=vv.getCurrent(t);return AR(n,new Error("Cannot find a current component to extract the value from for form part '"+e+"': "+Wa(t.element)))})).map(Zm.getValue)}))},setValue:function(e,n){It(n,(function(n,r){qg(e,t,r).each((function(t){vv.getCurrent(t).each((function(t){Zm.setValue(t,n)}))}))}))}}})]),apis:{getField:function(e,n){return qg(e,t,n).bind(vv.getCurrent)}}}},NR={getField:hu((function(t,e,n){return t.getField(e,n)})),sketch:ER},RR=Ga("valid-input"),zR=Ga("invalid-input"),PR=Ga("validating-input"),IR="colorcustom.rgb.",LR=function(t,e,n,r){var o=function(n,r){return fA.config({invalidClass:e("invalid"),notify:{onValidate:function(t){yi(t,PR,{type:n})},onValid:function(t){yi(t,RR,{type:n,value:Zm.getValue(t)})},onInvalid:function(t){yi(t,zR,{type:n,value:Zm.getValue(t)})}},validator:{validate:function(e){var n=Zm.getValue(e),o=r(n)?yt.value(!0):yt.error(t("aria.input.invalid"));return ZE.pure(o)},validateOnLoad:!1}})},i=function(n,r,i,a,u){var s=t(IR+"range"),c=pE.parts.label({dom:{tag:"label",innerHtml:i,attributes:{"aria-label":a}}}),l=pE.parts.field({data:u,factory:jE,inputAttributes:E({type:"text"},"hex"===r?{"aria-live":"polite"}:{}),inputClasses:[e("textfield")],inputBehaviours:hf([o(r,n),bE.config({})]),onSetValue:function(t){if(fA.isInvalid(t)){var e=fA.run(t);e.get(g)}}}),f=[c,l],d="hex"!==r?[pE.parts["aria-descriptor"]({text:s})]:[],h=f.concat(d);return{dom:{tag:"div",attributes:{role:"presentation"}},components:h}},a=function(t,e){var n=tD(e);return NR.getField(t,"hex").each((function(e){Kw.isFocused(e)||Zm.setValue(t,{hex:n.value})})),n},u=function(t,e){var n=e.red,r=e.green,o=e.blue;Zm.setValue(t,{red:n,green:r,blue:o})},s=Cx({dom:{tag:"div",classes:[e("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),c=function(t,e){s.getOpt(t).each((function(t){gs(t.element,"background-color","#"+e.value)}))},l=function(){var o={red:Pn(L.some(255)),green:Pn(L.some(255)),blue:Pn(L.some(255)),hex:Pn(L.some("ffffff"))},l=function(t,e){var n=cD(e);u(t,n),p(n)},f=function(t){return o[t].get()},d=function(t,e){o[t].set(e)},h=function(){return f("red").bind((function(t){return f("green").bind((function(e){return f("blue").map((function(n){return aD(t,e,n,1)}))}))}))},p=function(t){var e=t.red,n=t.green,r=t.blue;d("red",L.some(e)),d("green",L.some(n)),d("blue",L.some(r))},m=function(t,e){var n=e.event;"hex"!==n.type?d(n.type,L.none()):r(t)},g=function(t,e){n(t);var r=$T(e);d("hex",L.some(e));var o=cD(r);u(t,o),p(o),yi(t,xR,{hex:r}),c(t,r)},v=function(t,e,n){var r=parseInt(n,10);d(e,L.some(r)),h().each((function(e){var n=a(t,e);yi(t,xR,{hex:n}),c(t,n)}))},b=function(t){return"hex"===t.type},y=function(t,e){var n=e.event;b(n)?g(t,n.value):v(t,n.type,n.value)},w=function(e){return{label:t(IR+e+".label"),description:t(IR+e+".description")}},_=w("red"),x=w("green"),C=w("blue"),k=w("hex");return Jt(NR.sketch((function(n){return{dom:{tag:"form",classes:[e("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[n.field("red",pE.sketch(i(uD,"red",_.label,_.description,255))),n.field("green",pE.sketch(i(uD,"green",x.label,x.description,255))),n.field("blue",pE.sketch(i(uD,"blue",C.label,C.description,255))),n.field("hex",pE.sketch(i(GT,"hex",k.label,k.description,"ffffff"))),s.asSpec()],formBehaviours:hf([fA.config({invalidClass:e("form-invalid")}),Fw("rgb-form-events",[Oi(RR,y),Oi(zR,m),Oi(PR,m)])])}})),{apis:{updateHex:function(t,e){Zm.setValue(t,{hex:e.value}),l(t,e),c(t,e)}}})},f=fv({factory:l,name:"RgbForm",configFields:[],apis:{updateHex:function(t,e,n){t.updateHex(e,n)}},extraApis:{}});return f},BR=function(t,e){var n=_R.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[e("sv-palette-spectrum")]}}),r=_R.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette-thumb")],innerHtml:"'}}),o=function(t,e){var n=t.width,r=t.height,o=t.getContext("2d");if(null!==o){o.fillStyle=e,o.fillRect(0,0,n,r);var i=o.createLinearGradient(0,0,n,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),o.fillStyle=i,o.fillRect(0,0,n,r);var a=o.createLinearGradient(0,0,0,r);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),o.fillStyle=a,o.fillRect(0,0,n,r)}},i=function(t,e){var n=t.components()[0].element.dom,r=wD(e,100,100),i=sD(r);o(n,dD(i))},a=function(t,e){var n=_D(cD(e));_R.setValue(t,{x:n.saturation,y:100-n.value})},u=function(t){var i=w({x:0,y:0}),a=function(t,e,n){yi(t,kR,{value:n})},u=function(t,e,n,r){o(n.element.dom,dD(hD))},s=hf([vv.config({find:L.some}),Kw.config({})]);return _R.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette")]},model:{mode:"xy",getInitialValue:i},rounded:!1,components:[n,r],onChange:a,onInit:u,sliderBehaviours:s})},s=fv({factory:u,name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,e,n){i(e,n)},setThumb:function(t,e,n){a(e,n)}},extraApis:{}});return s},HR=function(t,e){var n=function(n){var r=LR(t,e,n.onValidHex,n.onInvalidHex),o=BR(t,e),i=function(t){return(100-t)/100*360},a=function(t){return 100-t/360*100},u={paletteRgba:Pn(hD),paletteHue:Pn(0)},s=Cx(SR(t,e)),c=Cx(o.sketch({})),l=Cx(r.sketch({})),f=function(t,e,n){c.getOpt(t).each((function(t){o.setHue(t,n)}))},d=function(t,e){l.getOpt(t).each((function(t){r.updateHex(t,e)}))},h=function(t,e,n){s.getOpt(t).each((function(t){_R.setValue(t,{y:a(n)})}))},p=function(t,e){c.getOpt(t).each((function(t){o.setThumb(t,e)}))},m=function(t,e){var n=cD(t);u.paletteRgba.set(n),u.paletteHue.set(e)},g=function(t,e,n,r){m(e,n),G(r,(function(r){r(t,e,n)}))},v=function(){var t=[d];return function(e,n){var r=n.event.value,o=u.paletteHue.get(),i=wD(o,r.x,100-r.y),a=CD(i);g(e,a,o,t)}},b=function(){var t=[f,d];return function(e,n){var r=i(n.event.value.y),o=u.paletteRgba.get(),a=_D(o),s=wD(r,a.saturation,a.value),c=CD(s);g(e,c,r,t)}},y=function(){var t=[f,h,p];return function(e,n){var r=n.event.hex,o=xD(r);g(e,r,o.hue,t)}};return{uid:n.uid,dom:n.dom,components:[c.asSpec(),s.asSpec(),l.asSpec()],behaviours:hf([Fw("colour-picker-events",[Oi(xR,y()),Oi(kR,v()),Oi(CR,b())]),vv.config({find:function(t){return l.getOpt(t)}}),Ow.config({mode:"acyclic"})])}},r=fv({name:"ColourPicker",configFields:[an("dom"),Sn("onValidHex",g),Sn("onInvalidHex",g)],factory:n});return r},FR=function(){return vv.config({find:L.some})},jR=function(t){return vv.config({find:t.getOpt})},VR=function(t){return vv.config({find:function(e){return ia(e.element,t).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))}})},WR={self:FR,memento:jR,childAt:VR},UR={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},$R=function(t){return UR[t]},YR=function(t){return $R(t)},qR=function(t){var e=function(t){return"tox-"+t},n=HR(YR,e),r=function(t){yi(t,EE,{name:"hex-valid",value:!0})},o=function(t){yi(t,EE,{name:"hex-valid",value:!1})},i=Cx(n.sketch({dom:{tag:"div",classes:[e("color-picker-container")],attributes:{role:"presentation"}},onValidHex:r,onInvalidHex:o}));return{dom:{tag:"div"},components:[i.asSpec()],behaviours:hf([Zm.config({store:{mode:"manual",getValue:function(t){var e=i.get(t),n=vv.getCurrent(e),r=n.bind((function(t){var e=Zm.getValue(t);return e.hex}));return r.map((function(t){return"#"+t})).getOr("")},setValue:function(t,e){var n=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/,r=n.exec(e),o=i.get(t),a=vv.getCurrent(o);a.fold((function(){}),(function(t){Zm.setValue(t,{hex:L.from(r[1]).getOr("")}),NR.getField(t,"hex").each((function(t){bi(t,Bo())}))}))}}}),WR.self()])}},GR=tinymce.util.Tools.resolve("tinymce.Resource"),KR=function(t){return Yt(t,"init")},XR=function(t){var e=rd(),n=Cx({dom:{tag:t.tag}}),r=rd();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:hf([Fw("custom-editor-events",[Bi((function(o){n.getOpt(o).each((function(n){(KR(t)?t.init(n.element.dom):GR.load(t.scriptId,t.scriptUrl).then((function(e){return e(n.element.dom,t.settings)}))).then((function(t){r.on((function(e){t.setValue(e)})),r.clear(),e.set(t)}))}))}))]),Zm.config({store:{mode:"manual",getValue:function(){return e.get().fold((function(){return r.get().getOr("")}),(function(t){return t.getValue()}))},setValue:function(t,n){e.get().fold((function(){r.set(n)}),(function(t){return t.setValue(n)}))}}}),WR.self()]),components:[n.asSpec()]}},JR=tinymce.util.Tools.resolve("tinymce.util.Tools"),QR=Ae([Sn("preprocess",_),Sn("postprocess",_)]),ZR=function(t,e){var n=Qe("RepresentingConfigs.memento processors",QR,e);return Zm.config({store:{mode:"manual",getValue:function(e){var r=t.get(e),o=Zm.getValue(r);return n.postprocess(o)},setValue:function(e,r){var o=n.preprocess(r),i=t.get(e);Zm.setValue(i,o)}}})},tz=function(t,e,n){return Zm.config(Jt({store:{mode:"manual",getValue:e,setValue:n}},t.map((function(t){return{store:{initialValue:t}}})).getOr({})))},ez=function(t,e,n){return tz(t,(function(t){return e(t.element)}),(function(t,e){return n(t.element,e)}))},nz=function(t){return ez(t,Ts,Ds)},rz=function(t){return ez(t,Aa,Ma)},oz=function(t){return Zm.config({store:{mode:"memory",initialValue:t}})},iz={memento:ZR,withElement:ez,withComp:tz,domValue:nz,domHtml:rz,memory:oz},az="jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",uz=function(t,e){var n=JR.explode(e.getSetting("images_file_types",az,"string")),r=function(t){return U(n,(function(e){return ar(t.name.toLowerCase(),"."+e.toLowerCase())}))};return J(pt(t),r)},sz=function(t,e){var n=function(t,e){e.stop()},r=function(t){return function(e,n){G(t,(function(t){t(e,n)}))}},o=function(t,e){if(!Iv.isDisabled(t)){var n=e.event.raw;a(t,n.dataTransfer.files)}},i=function(t,e){var n=e.event.raw.target;a(t,n.files)},a=function(n,r){Zm.setValue(n,uz(r,e)),yi(n,TE,{name:t.name})},u=Cx({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:hf([Fw("input-file-events",[Pi(Fo()),Pi(Zo())])])}),s=function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:hf([iz.memory([]),WR.self(),Iv.config({}),p_.config({toggleClass:"dragenter",toggleOnExecute:!1}),Fw("dropzone-events",[Oi("dragenter",r([n,p_.toggle])),Oi("dragleave",r([n,p_.toggle])),Oi("dragover",n),Oi("drop",r([n,o])),Oi(Ho(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:e.translate("Drop an image here")}},xx.sketch({dom:{tag:"button",innerHtml:e.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[u.asSpec()],action:function(t){var e=u.get(t);e.element.dom.click()},buttonBehaviours:hf([bE.config({}),dT.button(e.isDisabled),uT()])})]}]}},c=t.label.map((function(t){return SE(t,e)})),l=pE.parts.field({factory:{sketch:s}});return wE(c,l,["tox-form__group--stretched"],[])},cz=function(t,e){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:q(t.items,e.interpreter)}},lz=Ga("alloy-fake-before-tabstop"),fz=Ga("alloy-fake-after-tabstop"),dz=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:hf([Kw.config({ignore:!0}),bE.config({})])}},hz=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[dz([lz]),t,dz([fz])],behaviours:hf([WR.childAt(1)])}},pz=function(t,e){yi(t,Io(),{raw:{which:9,shiftKey:e}})},mz=function(t,e){var n=e.element;Qu(n,lz)?pz(t,!0):Qu(n,fz)&&pz(t,!1)},gz=function(t){return zO(t,["."+lz,"."+fz].join(","),T)},vz=!(Fr().browser.isIE()||Fr().browser.isEdge()),bz=function(t){var e=Pn("");return{getValue:function(t){return e.get()},setValue:function(n,r){if(t)za(n.element,"srcdoc",r);else{za(n.element,"src","javascript:''");var o=n.element.dom.contentWindow.document;o.open(),o.write(r),o.close()}e.set(r)}}},yz=function(t,e){var n=vz&&t.sandboxed,r=E(E({},t.label.map((function(t){return{title:t}})).getOr({})),n?{sandbox:"allow-scripts allow-same-origin"}:{}),o=bz(n),i=t.label.map((function(t){return SE(t,e)})),a=function(t){return hz({uid:t.uid,dom:{tag:"iframe",attributes:r},behaviours:hf([bE.config({}),Kw.config({}),iz.withComp(L.none(),o.getValue,o.setValue)])})},u=pE.parts.field({factory:{sketch:a}});return wE(i,u,["tox-form__group--stretched"],[])},wz=function(t,e){return Cz(document.createElement("canvas"),t,e)},_z=function(t){var e=wz(t.width,t.height),n=xz(e);return n.drawImage(t,0,0),e},xz=function(t){return t.getContext("2d")},Cz=function(t,e,n){return t.width=e,t.height=n,t},kz=function(t){return t.naturalWidth||t.width},Sz=function(t){return t.naturalHeight||t.height},Tz=function(){var t=function(t){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(t,r(a,this),r(u,this))},e=window,n=t.immediateFn||"function"===typeof e.setImmediate&&e.setImmediate||function(t){return setTimeout(t,1)},r=function(t,e){return function(){for(var n=[],r=0;rn?r=n:rn?t=n:t2)&&(i=i<.5?.5:2,u=!0),(a<.5||a>2)&&(a=a<.5?.5:2,u=!0);var s=sP(t,i,a);return u?s.then((function(t){return uP(t,e,n)})):s},sP=function(t,e,n){return new Dz((function(r){var o=kz(t),i=Sz(t),a=Math.floor(o*e),u=Math.floor(i*n),s=wz(a,u),c=xz(s);c.drawImage(t,0,0,o,i,0,0,a,u),r(s)}))},cP=function(t,e){void 0===e&&(e=2);var n=Math.pow(10,e),r=Math.round(t*n);return Math.ceil(r/n)},lP=function(t,e){return t.toCanvas().then((function(n){return fP(n,t.getType(),e)}))},fP=function(t,e,n){var r=n<0?360+n:n,o=r*Math.PI/180,i=t.width,a=t.height,u=Math.sin(o),s=Math.cos(o),c=cP(Math.abs(i*s)+Math.abs(a*u)),l=cP(Math.abs(i*u)+Math.abs(a*s)),f=wz(c,l),d=xz(f);return d.translate(c/2,l/2),d.rotate(o),d.drawImage(t,-i/2,-a/2),Bz(f,e)},dP=function(t,e){return t.toCanvas().then((function(n){return hP(n,t.getType(),e)}))},hP=function(t,e,n){var r=wz(t.width,t.height),o=xz(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),Bz(r,e)},pP=function(t,e,n,r,o){return t.toCanvas().then((function(i){return mP(i,t.getType(),e,n,r,o)}))},mP=function(t,e,n,r,o,i){var a=wz(o,i),u=xz(a);return u.drawImage(t,-n,-r),Bz(a,e)},gP=function(t,e,n){return t.toCanvas().then((function(r){return uP(r,e,n).then((function(e){return Bz(e,t.getType())}))}))},vP=function(t){return eP(t)},bP=function(t){return iP(t)},yP=function(t,e){return aP(t,e)},wP=function(t,e,n,r){return oP(t,e,n,r)},_P=function(t,e){return nP(t,e)},xP=function(t,e){return rP(t,e)},CP=function(t,e){return dP(t,e)},kP=function(t,e,n,r,o){return pP(t,e,n,r,o)},SP=function(t,e,n){return gP(t,e,n)},TP=function(t,e){return lP(t,e)},DP=function(t,e,n){return Px(t,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:n},e)},OP=function(t,e){return DP(t,e,[])},EP=function(t,e){return DP(t,e,[Bw.config({})])},AP=function(t,e,n){return{dom:{tag:"span",innerHtml:n.translate(t),classes:[e+"__select-label"]},behaviours:hf([Bw.config({})])}},MP=Ga("toolbar.button.execute"),NP=function(t){return ji((function(e,n){hT(t,e)((function(n){yi(e,MP,{buttonApi:n}),t.onAction(n)}))}))},RP=(wA={},wA[Jo()]=["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],wA),zP=Ga("update-menu-text"),PP=Ga("update-menu-icon"),IP=function(t,e,n){var r=Pn(g),o=t.text.map((function(t){return Cx(AP(t,e,n.providers))})),i=t.icon.map((function(t){return Cx(EP(t,n.providers.icons))})),a=function(t,e){var n=Zm.getValue(t);return Kw.focus(n),yi(n,"keydown",{raw:e.event.raw}),IA.close(n),L.some(!0)},u=t.role.fold((function(){return{}}),(function(t){return{role:t}})),s=t.tooltip.fold((function(){return{}}),(function(t){var e=n.providers.translate(t);return{title:e,"aria-label":e}})),c=Px("chevron-down",{tag:"div",classes:[e+"__select-chevron"]},n.providers.icons),l=Cx(IA.sketch(E(E(E({},t.uid?{uid:t.uid}:{}),u),{dom:{tag:"button",classes:[e,e+"--select"].concat(q(t.classes,(function(t){return e+"--"+t}))),attributes:E({},s)},components:bT([i.map((function(t){return t.asSpec()})),o.map((function(t){return t.asSpec()})),L.some(c)]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:hf(M(M([],t.dropdownBehaviours),[dT.button((function(){return t.disabled||n.providers.isDisabled()})),uT(),FA.config({}),Bw.config({}),Fw("dropdown-events",[pT(t,r),mT(t,r)]),Fw("menubutton-update-display-text",[Oi(zP,(function(t,e){o.bind((function(e){return e.getOpt(t)})).each((function(t){Bw.set(t,[Ls(n.providers.translate(e.event.text))])}))})),Oi(PP,(function(t,e){i.bind((function(e){return e.getOpt(t)})).each((function(t){Bw.set(t,[EP(e.event.icon,n.providers.icons)])}))}))])])),eventOrder:Jt(RP,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:hf([Ow.config({mode:"special",onLeft:a,onRight:a})]),lazySink:n.getSink,toggleClass:e+"--active",parts:{menu:mk(!1,t.columns,t.presets)},fetch:function(e){return ZE.nu(C(t.fetch,e))}})));return l.asSpec()},LP=function(t){return i(t)},BP=function(t){return"separator"===t.type},HP=function(t){return Yt(t,"getSubmenuItems")},FP={type:"separator"},jP=function(t,e){var n=Z(t,(function(t,n){return LP(n)?""===n?t:"|"===n?t.length>0&&!BP(t[t.length-1])?t.concat([FP]):t:Yt(e,n.toLowerCase())?t.concat([e[n.toLowerCase()]]):t:t.concat([n])}),[]);return n.length>0&&BP(n[n.length-1])&&n.pop(),n},VP=function(t,e){var n=t.getSubmenuItems(),r=$P(n,e),o=Jt(r.menus,so(t.value,r.items)),i=Jt(r.expansions,so(t.value,t.value));return{item:t,menus:o,expansions:i}},WP=function(t,e){return HP(t)?VP(t,e):{item:t,menus:{},expansions:{}}},UP=function(t){if(BP(t))return t;var e=$t(t,"value").getOrThunk((function(){return Ga("generated-menu-item")}));return Jt({value:e},t)},$P=function(t,e){var n=jP(i(t)?t.split(" "):t,e);return Q(n,(function(t,n){var r=UP(n),o=WP(r,e);return{menus:Jt(t.menus,o.menus),items:[o.item].concat(t.items),expansions:Jt(t.expansions,o.expansions)}}),{menus:{},expansions:{},items:[]})},YP=function(t,e,n,r){var o=Ga("primary-menu"),i=$P(t,n.shared.providers.menuItems());if(0===i.items.length)return L.none();var a=EO(o,i.items,e,n,r),u=Lt(i.menus,(function(t,r){return EO(r,t,e,n,!1)})),s=Jt(u,so(o,a));return L.from(J_.tieredData(o,s,i.expansions))},qP=function(t){return{isDisabled:function(){return Iv.isDisabled(t)},setDisabled:function(e){return Iv.set(t,e)},setActive:function(e){var n=t.element;e?(Ku(n,"tox-tbtn--enabled"),za(n,"aria-pressed",!0)):(Ju(n,"tox-tbtn--enabled"),Ha(n,"aria-pressed"))},isActive:function(){return Qu(t.element,"tox-tbtn--enabled")}}},GP=function(t,e,n,r){return IP({text:t.text,icon:t.icon,tooltip:t.tooltip,role:r,fetch:function(e,r){t.fetch((function(t){r(YP(t,VC.CLOSE_ON_EXECUTE,n,!1))}))},onSetup:t.onSetup,getApi:qP,columns:1,presets:"normal",classes:[],dropdownBehaviours:[bE.config({})]},e,n.shared)},KP=function(t,e,n){var r=function(t){return function(r){var o=!r.isActive();r.setActive(o),t.storage.set(o),n.shared.getSink().each((function(n){e().getOpt(n).each((function(e){Cf(e.element),yi(e,EE,{name:t.name,value:t.storage.get()})}))}))}},o=function(t){return function(e){e.setActive(t.storage.get())}};return function(e){e(q(t,(function(t){var e=t.text.fold((function(){return{}}),(function(t){return{text:t}}));return E(E({type:t.type,active:!1},e),{onAction:r(t),onSetup:o(t)})})))}},XP=function(t,e,n,r,o,i){void 0===n&&(n=[]);var a=e.fold((function(){return{}}),(function(t){return{action:t}})),u=E({buttonBehaviours:hf([dT.button((function(){return t.disabled||i.isDisabled()})),uT(),bE.config({}),Fw("button press",[Di("click"),Di("mousedown")])].concat(n)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},a),s=Jt(u,{dom:r});return Jt(s,{components:o})},JP=function(t,e,n,r){void 0===r&&(r=[]);var o=t.tooltip.map((function(t){return{"aria-label":n.translate(t),title:n.translate(t)}})).getOr({}),i={tag:"button",classes:["tox-tbtn"],attributes:o},a=t.icon.map((function(t){return OP(t,n.icons)})),u=bT([a]);return XP(t,e,r,i,u,n)},QP=function(t,e,n,r){void 0===r&&(r=[]);var o=JP(t,L.some(e),n,r);return xx.sketch(o)},ZP=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=n.translate(t.text),a=t.icon?t.icon.map((function(t){return OP(t,n.icons)})):L.none(),u=a.isSome()?bT([a]):[],s=a.isSome()?{}:{innerHtml:i},c=M(M(M(M([],t.primary||t.borderless?["tox-button"]:["tox-button","tox-button--secondary"]),a.isSome()?["tox-button--icon"]:[]),t.borderless?["tox-button--naked"]:[]),o),l=E(E({tag:"button",classes:c},s),{attributes:{title:i}});return XP(t,e,r,l,u,n)},tI=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=ZP(t,L.some(e),n,r,o);return xx.sketch(i)},eI=function(t,e){return function(n){"custom"===e?yi(n,EE,{name:t,value:{}}):"submit"===e?bi(n,AE):"cancel"===e&&bi(n,OE)}},nI=function(t,e){return"menu"===e},rI=function(t,e){return"custom"===e||"cancel"===e||"submit"===e},oI=function(t,e,n){if(nI(t,e)){var r=function(){return a},o=t,i=E(E({},t),{onSetup:function(e){return e.setDisabled(t.disabled),g},fetch:KP(o.items,r,n)}),a=Cx(GP(i,"tox-tbtn",n,L.none()));return a.asSpec()}if(rI(t,e)){var u=eI(t.name,e),s=E(E({},t),{borderless:!1});return tI(s,u,n.shared.providers,[])}},iI=function(t,e){var n=eI(t.name,"custom");return _E(L.none(),pE.parts.field(E({factory:xx},ZP(t,L.some(n),e,[iz.memory(""),WR.self()]))))},aI=w([Sn("field1Name","field1"),Sn("field2Name","field2"),cl("onLockedChange"),il(["lockClass"]),Sn("locked",!1),rg.field("coupledFieldBehaviours",[vv,Zm])]),uI=function(t,e,n){return qg(t,e,n).bind(vv.getCurrent)},sI=function(t,e){return Ng({factory:pE,name:t,overrides:function(t){return{fieldBehaviours:hf([Fw("coupled-input-behaviour",[Oi(Bo(),(function(n){uI(n,t,e).each((function(e){qg(n,t,"lock").each((function(r){p_.isOn(r)&&t.onLockedChange(n,e,r)}))}))}))])])}}})},cI=w([sI("field1","field2"),sI("field2","field1"),Ng({factory:xx,schema:[an("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:hf([p_.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),lI=function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:rg.augment(t.coupledFieldBehaviours,[vv.config({find:L.some}),Zm.config({store:{mode:"manual",getValue:function(e){var n,r=Qg(e,t,["field1","field2"]);return n={},n[t.field1Name]=Zm.getValue(r.field1()),n[t.field2Name]=Zm.getValue(r.field2()),n},setValue:function(e,n){var r=Qg(e,t,["field1","field2"]);qt(n,t.field1Name)&&Zm.setValue(r.field1(),n[t.field1Name]),qt(n,t.field2Name)&&Zm.setValue(r.field2(),n[t.field2Name])}}})]),apis:{getField1:function(e){return qg(e,t,"field1")},getField2:function(e){return qg(e,t,"field2")},getLock:function(e){return qg(e,t,"lock")}}}},fI=dv({name:"FormCoupledInputs",configFields:aI(),partFields:cI(),factory:lI,apis:{getField1:function(t,e){return t.getField1(e)},getField2:function(t,e){return t.getField2(e)},getLock:function(t,e){return t.getLock(e)}}}),dI=function(t){var e={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},n=function(t){return t in e?e[t]:1},r=t.value.toFixed(n(t.unit));return-1!==r.indexOf(".")&&(r=r.replace(/\.?0*$/,"")),r+t.unit},hI=function(t){var e=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/,n=e.exec(t);if(null!==n){var r=parseFloat(n[1]),o=n[2];return yt.value({value:r,unit:o})}return yt.error(t)},pI=function(t,e){var n={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},r=function(t){return Yt(n,t)};return t.unit===e?L.some(t.value):r(t.unit)&&r(e)?n[t.unit]===n[e]?L.some(t.value):L.some(t.value/n[t.unit]*n[e]):L.none()},mI=function(t){return L.none()},gI=function(t,e){return function(n){return pI(n,e).map((function(n){return{value:n*t,unit:e}}))}},vI=function(t,e){var n=hI(t).toOptional(),r=hI(e).toOptional();return as(n,r,(function(t,e){return pI(t,e.unit).map((function(t){return e.value/t})).map((function(t){return gI(t,e.unit)})).getOr(mI)})).getOr(mI)},bI=function(t,e){var n=mI,r=Ga("ratio-event"),o=function(t){return Px(t,{tag:"span",classes:["tox-icon","tox-lock-icon__"+t]},e.icons)},i=fI.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:e.translate(t.label.getOr("Constrain proportions"))}},components:[o("lock"),o("unlock")],buttonBehaviours:hf([Iv.config({disabled:function(){return t.disabled||e.isDisabled()}}),uT(),bE.config({})])}),a=function(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}},u=function(n){return pE.parts.field({factory:jE,inputClasses:["tox-textfield"],inputBehaviours:hf([Iv.config({disabled:function(){return t.disabled||e.isDisabled()}}),uT(),bE.config({}),Fw("size-input-events",[Oi(zo(),(function(t,e){yi(t,r,{isField1:n})})),Oi(Ho(),(function(e,n){yi(e,TE,{name:t.name})}))])]),selectOnFocus:!1})},s=function(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}},c=fI.parts.field1(a([pE.parts.label(s("Width")),u(!0)])),l=fI.parts.field2(a([pE.parts.label(s("Height")),u(!1)]));return fI.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,l,a([s(" "),i])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,e,r){hI(Zm.getValue(t)).each((function(t){n(t).each((function(t){Zm.setValue(e,dI(t))}))}))},coupledFieldBehaviours:hf([Iv.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){fI.getField1(t).bind(pE.getField).each(Iv.disable),fI.getField2(t).bind(pE.getField).each(Iv.disable),fI.getLock(t).each(Iv.disable)},onEnabled:function(t){fI.getField1(t).bind(pE.getField).each(Iv.enable),fI.getField2(t).bind(pE.getField).each(Iv.enable),fI.getLock(t).each(Iv.enable)}}),uT(),Fw("size-input-events2",[Oi(r,(function(t,e){var r=e.event.isField1,o=r?fI.getField1(t):fI.getField2(t),i=r?fI.getField2(t):fI.getField1(t),a=o.map(Zm.getValue).getOr(""),u=i.map(Zm.getValue).getOr("");n=vI(a,u)}))])])})},yI=w(Ga("undo")),wI=w(Ga("redo")),_I=w(Ga("zoom")),xI=w(Ga("back")),CI=w(Ga("apply")),kI=w(Ga("swap")),SI=w(Ga("transform")),TI=w(Ga("temp-transform")),DI=w(Ga("transform-apply")),OI={undo:yI,redo:wI,zoom:_I,back:xI,apply:CI,swap:kI,transform:SI,tempTransform:TI,transformApply:DI},EI=w("save-state"),AI=w("disable"),MI=w("enable"),NI={formActionEvent:EE,saveState:EI,disable:AI,enable:MI},RI=function(t,e){var n=function(t,n,r,o){return Cx(tI({name:t,text:t,disabled:r,primary:o,icon:L.none(),borderless:!1},n,e))},r=function(t,n,r,o){return Cx(QP({name:t,icon:L.some(t),tooltip:L.some(n),disabled:o,primary:!1,borderless:!1},r,e))},o=function(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(Iv)&&Iv.disable(n)}))},i=function(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(Iv)&&Iv.enable(n)}))},a={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},u=g,s=function(t,e,n){yi(t,e,n)},c=function(t){return bi(t,NI.disable())},l=function(t){return bi(t,NI.enable())},f=function(t,e){c(t),s(t,OI.transform(),{transform:e}),l(t)},d=function(t,e){c(t),s(t,OI.tempTransform(),{transform:e}),l(t)},h=function(t){return function(){at.getOpt(t).each((function(t){Bw.set(t,[ot])}))}},p=function(t,e){c(t),s(t,OI.transformApply(),{transform:e,swap:h(t)}),l(t)},m=function(){return n("Back",(function(t){return s(t,OI.back(),{swap:h(t)})}),!1,!1)},v=function(){return Cx({dom:{tag:"div",classes:["tox-spacer"]},behaviours:hf([Iv.config({})])})},b=function(){return n("Apply",(function(t){return s(t,OI.apply(),{swap:h(t)})}),!0,!0)},y=function(){return function(e){var n=t.getRect();return kP(e,n.x,n.y,n.w,n.h)}},_=[m(),v(),n("Apply",(function(e){var n=y();p(e,n),t.hideCrop()}),!1,!0)],x=sE.sketch({dom:a,components:_.map((function(t){return t.asSpec()})),containerBehaviours:hf([Fw("image-tools-crop-buttons-events",[Oi(NI.disable(),(function(t,e){o(_,t)})),Oi(NI.enable(),(function(t,e){i(_,t)}))])])}),C=Cx(bI({name:"size",label:L.none(),constrain:!0,disabled:!1},e)),k=function(t,e){return function(n){return SP(n,t,e)}},S=[m(),v(),C,v(),n("Apply",(function(t){C.getOpt(t).each((function(e){var n=Zm.getValue(e),r=parseInt(n.width,10),o=parseInt(n.height,10),i=k(r,o);p(t,i)}))}),!1,!0)],T=sE.sketch({dom:a,components:S.map((function(t){return t.asSpec()})),containerBehaviours:hf([Fw("image-tools-resize-buttons-events",[Oi(NI.disable(),(function(t,e){o(S,t)})),Oi(NI.enable(),(function(t,e){i(S,t)}))])])}),D=function(t,e){return function(n){return t(n,e)}},O=D(CP,"h"),E=D(CP,"v"),A=D(TP,-90),M=D(TP,90),N=function(t,e){d(t,e)},R=[m(),v(),r("flip-horizontally","Flip horizontally",(function(t){N(t,O)}),!1),r("flip-vertically","Flip vertically",(function(t){N(t,E)}),!1),r("rotate-left","Rotate counterclockwise",(function(t){N(t,A)}),!1),r("rotate-right","Rotate clockwise",(function(t){N(t,M)}),!1),v(),b()],z=sE.sketch({dom:a,components:R.map((function(t){return t.asSpec()})),containerBehaviours:hf([Fw("image-tools-fliprotate-buttons-events",[Oi(NI.disable(),(function(t,e){o(R,t)})),Oi(NI.enable(),(function(t,e){i(R,t)}))])])}),P=function(t,n,r,o,i){var a=_R.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}),u=_R.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),s=_R.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return Cx(_R.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:r,maxX:i,getInitialValue:w({x:o})},components:[a,u,s],sliderBehaviours:hf([Kw.config({})]),onChoose:n}))},I=function(t,e,n,r,o){var i=function(t,n,r){var o=D(e,r.x/100);f(t,o)};return P(t,i,n,r,o)},B=function(t,e,n,r,o){return[m(),I(t,e,n,r,o),b()]},H=function(t,e,n,r,u){var s=B(t,e,n,r,u);return sE.sketch({dom:a,components:s.map((function(t){return t.asSpec()})),containerBehaviours:hf([Fw("image-tools-filter-panel-buttons-events",[Oi(NI.disable(),(function(t,e){o(s,t)})),Oi(NI.enable(),(function(t,e){i(s,t)}))])])})},F=[m(),v(),b()],j=sE.sketch({dom:a,components:F.map((function(t){return t.asSpec()}))}),V=H("Brightness",_P,-100,0,100),W=H("Contrast",xP,-100,0,100),U=H("Gamma",yP,-100,0,100),$=function(t,e,n){return function(r){return wP(r,t,e,n)}},Y=function(t){var e=function(t,e,n){var r=q.getOpt(t),o=K.getOpt(t),i=G.getOpt(t);r.each((function(e){o.each((function(n){i.each((function(r){var o=Zm.getValue(e).x/100,i=Zm.getValue(r).x/100,a=Zm.getValue(n).x/100,u=$(o,i,a);f(t,u)}))}))}))};return P(t,e,0,100,200)},q=Y("R"),G=Y("G"),K=Y("B"),X=[m(),q,G,K,b()],J=sE.sketch({dom:a,components:X.map((function(t){return t.asSpec()}))}),Q=function(t,e,n){return function(r){var o=function(){at.getOpt(r).each((function(e){Bw.set(e,[t]),n(e)}))};s(r,OI.swap(),{transform:e,swap:o})}},Z=function(e){t.showCrop()},tt=function(e){C.getOpt(e).each((function(e){var n=t.getMeasurements(),r=n.width,o=n.height;Zm.setValue(e,{width:r,height:o})}))},et=L.some(bP),nt=L.some(vP),rt=[r("crop","Crop",Q(x,L.none(),Z),!1),r("resize","Resize",Q(T,L.none(),tt),!1),r("orientation","Orientation",Q(z,L.none(),u),!1),r("brightness","Brightness",Q(V,L.none(),u),!1),r("sharpen","Sharpen",Q(j,et,u),!1),r("contrast","Contrast",Q(W,L.none(),u),!1),r("color-levels","Color levels",Q(J,L.none(),u),!1),r("gamma","Gamma",Q(U,L.none(),u),!1),r("invert","Invert",Q(j,nt,u),!1)],ot=sE.sketch({dom:a,components:rt.map((function(t){return t.asSpec()}))}),it=sE.sketch({dom:{tag:"div"},components:[ot],containerBehaviours:hf([Bw.config({})])}),at=Cx(it),ut=function(t){return at.getOpt(t).map((function(t){var e=t.components()[0];return e.components()[e.components().length-1]}))};return{memContainer:at,getApplyButton:ut}},zI=tinymce.util.Tools.resolve("tinymce.geom.Rect"),PI=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),II=tinymce.util.Tools.resolve("tinymce.util.Observable"),LI=tinymce.util.Tools.resolve("tinymce.util.VK"),BI=function(t){var e=Math.max,n=t.documentElement,r=t.body,o=e(n.scrollWidth,r.scrollWidth),i=e(n.clientWidth,r.clientWidth),a=e(n.offsetWidth,r.offsetWidth),u=e(n.scrollHeight,r.scrollHeight),s=e(n.clientHeight,r.clientHeight),c=e(n.offsetHeight,r.offsetHeight);return{width:o").css({position:"absolute",top:0,left:0,width:f.width,height:f.height,zIndex:2147483647,opacity:1e-4,cursor:s}).appendTo(a.body),PI(a).on("mousemove touchmove",c).on("mouseup touchend",l),e.start(t)},c=function(t){if(HI(t),t.button!==r)return l(t);t.deltaX=t.screenX-o,t.deltaY=t.screenY-i,t.preventDefault(),e.drag(t)},l=function(t){HI(t),PI(a).off("mousemove touchmove",c).off("mouseup touchend",l),n.remove(),e.stop&&e.stop(t)},f=function(){PI(u).off()};return PI(u).on("mousedown touchstart",s),{destroy:f}}var jI=0,VI=function(t,e,n,r,o){var i,a="tox-",u=a+"crid-"+jI++,s=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],c=["top","right","bottom","left"],l=function(t,e){return{x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},f=function(t,e){return{x:e.x-t.x,y:e.y-t.y,w:e.w,h:e.h}},d=function(){return f(n,t)},h=function(e,r,o,i){var a,u,s,c,l;a=r.x,u=r.y,s=r.w,c=r.h,a+=o*e.deltaX,u+=i*e.deltaY,s+=o*e.deltaW,c+=i*e.deltaH,s<20&&(s=20),c<20&&(c=20),l=t=zI.clamp({x:a,y:u,w:s,h:c},n,"move"===e.name),l=f(n,l),x.fire("updateRect",{rect:l}),y(l)},p=function(){var e=function(e){var n;return FI(u,{document:r.ownerDocument,handle:u+"-"+e.name,start:function(){n=t},drag:function(t){h(e,n,t.deltaX,t.deltaY)}})};PI('
').appendTo(r),JR.each(c,(function(t){PI("#"+u,r).append('