You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
1.2 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0e956594","chunk-2d21065a"],{"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"),u=n("object"),a=n("array"),c=o(null),s=r("boolean"),l=o(void 0),f=function(t){return null===t||void 0===t},d=function(t){return!f(t)},m=r("function"),g=r("number"),h=function(t,e){if(a(t)){for(var n=0,r=t.length;n<r;++n)if(!e(t[n]))return!1;return!0}return!1},p=function(){},v=function(t){return function(){return t()}},b=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},y=function(t,e){return function(n){return t(e(n))}},w=function(t){return function(){return t}},x=function(t){return t},C=function(t,e){return t===e};function S(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var k=function(t){return function(e){return!t(e)}},T=function(t){return function(){throw new Error(t)}},O=w(!1),E=w(!0),_=tinymce.util.Tools.resolve("tinymce.ThemeManager"),A=function(){return A=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},A.apply(this,arguments)};function D(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function M(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var R=function(){return N},N=function(){var t=function(t){return t()},e=x,n={fold:function(t,e){return t()},isSome:O,isNone:E,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:w(null),getOrUndefined:w(void 0),or:e,orThunk:t,map:R,each:p,bind:R,exists:O,forall:E,filter:function(){return R()},toArray:function(){return[]},toString:w("none()")};return n}(),z=function(t){var e=w(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:E,isNone:O,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return z(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:N},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},B=function(t){return null===t||void 0===t?N:z(t)},L={some:z,none:R,from:B},H=Array.prototype.slice,I=Array.prototype.indexOf,P=Array.prototype.push,F=function(t,e){return I.call(t,e)},V=function(t,e){var n=F(t,e);return-1===n?L.none():L.some(n)},U=function(t,e){return F(t,e)>-1},j=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return!0}return!1},W=function(t,e){for(var n=[],r=0;r<t;r++)n.push(e(r));return n},q=function(t,e){for(var n=[],r=0;r<t.length;r+=e){var o=H.call(t,r,r+e);n.push(o)}return n},$=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},G=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},K=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];e(r,n)}},X=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var u=t[o],a=e(u,o)?n:r;a.push(u)}return{pass:n,fail:r}},Y=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},J=function(t,e,n){return K(t,(function(t,r){n=e(n,t,r)})),n},Q=function(t,e,n){return G(t,(function(t,r){n=e(n,t,r)})),n},Z=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return L.some(i);if(n(i,r))break}return L.none()},tt=function(t,e){return Z(t,e,O)},et=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return L.some(n)}return L.none()},nt=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!a(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);P.apply(e,t[n])}return e},rt=function(t,e){return nt($(t,e))},ot=function(t,e){for(var n=0,r=t.length;n<r;++n){var o=t[n];if(!0!==e(o,n))return!1}return!0},it=function(t){var e=H.call(t,0);return e.reverse(),e},ut=function(t,e){return Y(t,(function(t){return!U(e,t)}))},at=function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n},ct=function(t){return[t]},st=function(t,e){var n=H.call(t,0);return n.sort(e),n},lt=function(t,e){return e>=0&&e<t.length?L.some(t[e]):L.none()},ft=function(t){return lt(t,0)},dt=function(t){return lt(t,t.length-1)},mt=m(Array.from)?Array.from:function(t){return H.call(t)},gt=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return L.none()},ht=Object.keys,pt=Object.hasOwnProperty,vt=function(t,e){for(var n=ht(t),r=0,o=n.length;r<o;r++){var i=n[r],u=t[i];e(u,i)}},bt=function(t,e){return yt(t,(function(t,n){return{k:n,v:e(t,n)}}))},yt=function(t,e){var n={};return vt(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},wt=function(t){return function(e,n){t[n]=e}},xt=function(t,e,n,r){var o={};return vt(t,(function(t,o){(e(t,o)?n:r)(t,o)})),o},Ct=function(t,e){var n={};return xt(t,e,wt(n),p),n},St=function(t,e){var n=[];return vt(t,(function(t,r){n.push(e(t,r))})),n},kt=function(t,e){for(var n=ht(t),r=0,o=n.length;r<o;r++){var i=n[r],u=t[i];if(e(u,i,t))return L.some(u)}return L.none()},Tt=function(t){return St(t,x)},Ot=function(t,e){return Et(t,e)?L.from(t[e]):L.none()},Et=function(t,e){return pt.call(t,e)},_t=function(t,e){return Et(t,e)&&void 0!==t[e]&&null!==t[e]},At=function(t,e,n){return void 0===n&&(n=C),t.exists((function(t){return n(t,e)}))},Dt=function(t,e,n){return void 0===n&&(n=C),Nt(t,e,n).getOr(t.isNone()&&e.isNone())},Mt=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},Rt=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];if(!r.isSome())return L.none();e.push(r.getOrDie())}return L.some(e)},Nt=function(t,e,n){return t.isSome()&&e.isSome()?L.some(n(t.getOrDie(),e.getOrDie())):L.none()},zt=function(t,e,n,r){return t.isSome()&&e.isSome()&&n.isSome()?L.some(r(t.getOrDie(),e.getOrDie(),n.getOrDie())):L.none()},Bt=function(t,e){return void 0!==t&&null!==t?L.some(e(t)):L.none()},Lt=function(t,e){return t?L.some(e):L.none()},Ht=function(t,e){return t+e},It=function(t,e){return t.substring(e)},Pt=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},Ft=function(t,e){return jt(t,e)?It(t,e.length):t},Vt=function(t,e){return Wt(t,e)?t:Ht(t,e)},Ut=function(t,e){return-1!==t.indexOf(e)},jt=function(t,e){return Pt(t,e,0)},Wt=function(t,e){return Pt(t,e,t.length-e.length)},qt=function(t){return function(e){return e.replace(t,"")}},$t=qt(/^\s+|\s+$/g),Gt=function(t){return t.length>0},Kt=function(t){return!Gt(t)},Xt=function(t){return void 0!==t.style&&m(t.style.getPropertyValue)},Yt=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Zt(r.childNodes[0])},Jt=function(t,e){var n=e||document,r=n.createElement(t);return Zt(r)},Qt=function(t,e){var n=e||document,r=n.createTextNode(t);return Zt(r)},Zt=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},te=function(t,e,n){return L.from(t.dom.elementFromPoint(e,n)).map(Zt)},ee={fromHtml:Yt,fromTag:Jt,fromText:Qt,fromDom:Zt,fromPoint:te};"undefined"!==typeof window?window:Function("return this;")();var ne,re=9,oe=11,ie=1,ue=3,ae=function(t){var e=t.dom.nodeName;return e.toLowerCase()},ce=function(t){return t.dom.nodeType},se=function(t){return function(e){return ce(e)===t}},le=se(ie),fe=se(ue),de=se(re),me=se(oe),ge=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},he=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,u=t.isiOS()||t.isAndroid(),a=u||r("(pointer:coarse)"),c=o||!i&&u&&r("(min-device-width:768px)"),s=i||u&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:w(o),isiPhone:w(i),isTablet:w(c),isPhone:w(s),isTouch:w(a),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:w(l),isDesktop:w(f)}},pe=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}},ve=function(t,e){var n=pe(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return we(r(1),r(2))},be=function(t,e){var n=String(e).toLowerCase();return 0===t.length?ye():ve(t,n)},ye=function(){return we(0,0)},we=function(t,e){return{major:t,minor:e}},xe={nu:we,detect:be,unknown:ye},Ce=function(t,e){return gt(e.brands,(function(e){var n=e.brand.toLowerCase();return tt(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:xe.nu(parseInt(e.version,10),0)}}))}))},Se=function(t,e){var n=String(e).toLowerCase();return tt(t,(function(t){return t.search(n)}))},ke=function(t,e){return Se(t,e).map((function(t){var n=xe.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},Te=function(t,e){return Se(t,e).map((function(t){var n=xe.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},Oe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ee=function(t){return function(e){return Ut(e,t)}},_e=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Ut(t,"edge/")&&Ut(t,"chrome")&&Ut(t,"safari")&&Ut(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Oe],search:function(t){return Ut(t,"chrome")&&!Ut(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Ut(t,"msie")||Ut(t,"trident")}},{name:"Opera",versionRegexes:[Oe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ee("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ee("firefox")},{name:"Safari",versionRegexes:[Oe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Ut(t,"safari")||Ut(t,"mobile/"))&&Ut(t,"applewebkit")}}],Ae=[{name:"Windows",search:Ee("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Ut(t,"iphone")||Ut(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ee("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ee("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ee("linux"),versionRegexes:[]},{name:"Solaris",search:Ee("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ee("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ee("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],De={browsers:w(_e),oses:w(Ae)},Me="Edge",Re="Chrome",Ne="IE",ze="Opera",Be="Firefox",Le="Safari",He=function(){return Ie({current:void 0,version:xe.unknown()})},Ie=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(Me),isChrome:r(Re),isIE:r(Ne),isOpera:r(ze),isFirefox:r(Be),isSafari:r(Le)}},Pe={unknown:He,nu:Ie,edge:w(Me),chrome:w(Re),ie:w(Ne),opera:w(ze),firefox:w(Be),safari:w(Le)},Fe="Windows",Ve="iOS",Ue="Android",je="Linux",We="OSX",qe="Solaris",$e="FreeBSD",Ge="ChromeOS",Ke=function(){return Xe({current:void 0,version:xe.unknown()})},Xe=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(Fe),isiOS:r(Ve),isAndroid:r(Ue),isOSX:r(We),isLinux:r(je),isSolaris:r(qe),isFreeBSD:r($e),isChromeOS:r(Ge)}},Ye={unknown:Ke,nu:Xe,windows:w(Fe),ios:w(Ve),android:w(Ue),linux:w(je),osx:w(We),solaris:w(qe),freebsd:w($e),chromeos:w(Ge)},Je=function(t,e,n){var r=De.browsers(),o=De.oses(),i=e.bind((function(t){return Ce(r,t)})).orThunk((function(){return ke(r,t)})).fold(Pe.unknown,Pe.nu),u=Te(o,t).fold(Ye.unknown,Ye.nu),a=he(u,i,t,n);return{browser:i,os:u,deviceType:a}},Qe={detect:Je},Ze=function(t){return window.matchMedia(t).matches},tn=ge((function(){return Qe.detect(navigator.userAgent,L.from(navigator.userAgentData),Ze)})),en=function(){return tn()},nn=function(t,e,n){return 0!==(t.compareDocumentPosition(e)&n)},rn=function(t,e){return nn(t,e,Node.DOCUMENT_POSITION_CONTAINED_BY)},on=function(t,e){var n=t.dom;if(n.nodeType!==ie)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")},un=function(t){return t.nodeType!==ie&&t.nodeType!==re&&t.nodeType!==oe||0===t.childElementCount},an=function(t,e){var n=void 0===e?document:e.dom;return un(n)?[]:$(n.querySelectorAll(t),ee.fromDom)},cn=function(t,e){var n=void 0===e?document:e.dom;return un(n)?L.none():L.from(n.querySelector(t)).map(ee.fromDom)},sn=function(t,e){return t.dom===e.dom},ln=function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)},fn=function(t,e){return rn(t.dom,e.dom)},dn=function(t,e){return en().browser.isIE()?fn(t,e):ln(t,e)},mn=function(t){return ee.fromDom(t.dom.ownerDocument)},gn=function(t){return de(t)?t:mn(t)},hn=function(t){return ee.fromDom(gn(t).dom.documentElement)},pn=function(t){return ee.fromDom(gn(t).dom.defaultView)},vn=function(t){return L.from(t.dom.parentNode).map(ee.fromDom)},bn=function(t){return vn(t)},yn=function(t){return L.from(t.dom.offsetParent).map(ee.fromDom)},wn=function(t){return L.from(t.dom.nextSibling).map(ee.fromDom)},xn=function(t){return $(t.dom.childNodes,ee.fromDom)},Cn=function(t,e){var n=t.dom.childNodes;return L.from(n[e]).map(ee.fromDom)},Sn=function(t){return Cn(t,0)},kn=function(t,e){return{element:t,offset:e}},Tn=function(t,e){var n=xn(t);return n.length>0&&e<n.length?kn(n[e],0):kn(t,e)},On=function(t){return me(t)&&d(t.dom.host)},En=m(Element.prototype.attachShadow)&&m(Node.prototype.getRootNode),_n=w(En),An=En?function(t){return ee.fromDom(t.dom.getRootNode())}:gn,Dn=function(t){return On(t)?t:ee.fromDom(gn(t).dom.body)},Mn=function(t){return Rn(t).isSome()},Rn=function(t){var e=An(t);return On(e)?L.some(e):L.none()},Nn=function(t){return ee.fromDom(t.dom.host)},zn=function(t){if(_n()&&d(t.target)){var e=ee.fromDom(t.target);if(le(e)&&Bn(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return ft(n)}}return L.from(t.target)},Bn=function(t){return d(t.dom.shadowRoot)},Ln=function(t){var e=fe(t)?t.dom.parentNode:t.dom;if(void 0===e||null===e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return Rn(ee.fromDom(e)).fold((function(){return n.body.contains(e)}),y(Ln,Nn))},Hn=function(){return In(ee.fromDom(document))},In=function(t){var e=t.dom.body;if(null===e||void 0===e)throw new Error("Body is not available yet");return ee.fromDom(e)},Pn=function(t,e,n){if(!(i(n)||s(n)||g(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},Fn=function(t,e,n){Pn(t.dom,e,n)},Vn=function(t,e){var n=t.dom;vt(e,(function(t,e){Pn(n,e,t)}))},Un=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},jn=function(t,e){return L.from(Un(t,e))},Wn=function(t,e){var n=t.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(e)},qn=function(t,e){t.dom.removeAttribute(e)},$n=function(t,e,n){if(!i(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);Xt(t)&&t.style.setProperty(e,n)},Gn=function(t,e){Xt(t)&&t.style.removeProperty(e)},Kn=function(t,e,n){var r=t.dom;$n(r,e,n)},Xn=function(t,e){var n=t.dom;vt(e,(function(t,e){$n(n,e,t)}))},Yn=function(t,e){var n=t.dom;vt(e,(function(t,e){t.fold((function(){Gn(n,e)}),(function(t){$n(n,e,t)}))}))},Jn=function(t,e){var n=t.dom,r=window.getComputedStyle(n),o=r.getPropertyValue(e);return""!==o||Ln(t)?o:Qn(n,e)},Qn=function(t,e){return Xt(t)?t.style.getPropertyValue(e):""},Zn=function(t,e){var n=t.dom,r=Qn(n,e);return L.from(r).filter((function(t){return t.length>0}))},tr=function(t){var e={},n=t.dom;if(Xt(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);e[o]=n.style[o]}return e},er=function(t,e,n){var r=ee.fromTag(t);Kn(r,e,n);var o=Zn(r,e);return o.isSome()},nr=function(t,e){var n=t.dom;Gn(n,e),At(jn(t,"style").map($t),"")&&qn(t,"style")},rr=function(t){return t.dom.offsetWidth},or=function(t,e){var n=function(e,n){if(!g(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;Xt(r)&&(r.style[t]=n+"px")},r=function(n){var r=e(n);if(r<=0||null===r){var o=Jn(n,t);return parseFloat(o)||0}return r},o=r,i=function(t,e){return Q(e,(function(e,n){var r=Jn(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)},u=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:u}},ir=or("height",(function(t){var e=t.dom;return Ln(t)?e.getBoundingClientRect().height:e.offsetHeight})),ur=function(t){return ir.get(t)},ar=function(t){return ir.getOuter(t)},cr=function(t,e){var n=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],r=ir.max(t,e,n);Kn(t,"max-height",r+"px")},sr=function(t,e){var n=function(n,r){return sr(t+n,e+r)};return{left:t,top:e,translate:n}},lr=sr,fr=function(t){var e=t.getBoundingClientRect();return lr(e.left,e.top)},dr=function(t,e){return void 0!==t?t:void 0!==e?e:0},mr=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return lr(n.offsetLeft,n.offsetTop);var i=dr(null===r||void 0===r?void 0:r.pageYOffset,o.scrollTop),u=dr(null===r||void 0===r?void 0:r.pageXOffset,o.scrollLeft),a=dr(o.clientTop,n.clientTop),c=dr(o.clientLeft,n.clientLeft);return gr(t).translate(u-c,i-a)},gr=function(t){var e=t.dom,n=e.ownerDocument,r=n.body;return r===e?lr(r.offsetLeft,r.offsetTop):Ln(t)?fr(e):lr(0,0)},hr=or("width",(function(t){return t.dom.offsetWidth})),pr=function(t,e){return hr.set(t,e)},vr=function(t){return hr.get(t)},br=function(t){return hr.getOuter(t)},yr=function(t,e){var n=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],r=hr.max(t,e,n);Kn(t,"max-width",r+"px")},wr=function(t,e,n,r,o,i,u){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:u}},xr=function(t){var e=ee.fromDom(zn(t).getOr(t.target)),n=function(){return t.stopPropagation()},r=function(){return t.preventDefault()},o=b(r,n);return wr(e,t.clientX,t.clientY,n,r,o,t)},Cr=function(t,e){return function(n){t(n)&&e(xr(n))}},Sr=function(t,e,n,r,o){var i=Cr(n,r);return t.dom.addEventListener(e,i,o),{unbind:S(Or,t,e,i,o)}},kr=function(t,e,n,r){return Sr(t,e,n,r,!1)},Tr=function(t,e,n,r){return Sr(t,e,n,r,!0)},Or=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},Er=function(t,e){var n=vn(t);n.each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},_r=function(t,e){var n=wn(t);n.fold((function(){var n=vn(t);n.each((function(t){Dr(t,e)}))}),(function(t){Er(t,e)}))},Ar=function(t,e){var n=Sn(t);n.fold((function(){Dr(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},Dr=function(t,e){t.dom.appendChild(e.dom)},Mr=function(t,e,n){Cn(t,n).fold((function(){Dr(t,e)}),(function(t){Er(t,e)}))},Rr=function(t,e){G(e,(function(e){Er(t,e)}))},Nr=function(t,e){G(e,(function(e){Dr(t,e)}))},zr=function(t){t.dom.textContent="",G(xn(t),(function(t){Br(t)}))},Br=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Lr=function(t){var e=xn(t);e.length>0&&Rr(t,e),Br(t)},Hr=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 lr(n,r)},Ir=function(t,e,n){var r=void 0!==n?n.dom:document,o=r.defaultView;o&&o.scrollTo(t,e)},Pr=function(t){var e=void 0===t?window:t;return en().browser.isFirefox()?L.none():L.from(e["visualViewport"])},Fr=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Vr=function(t){var e=void 0===t?window:t,n=e.document,r=Hr(ee.fromDom(n));return Pr(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return Fr(r.left,r.top,n,o)}),(function(t){return Fr(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},Ur=function(t,e){var n=t.view(e);return n.fold(w([]),(function(e){var n=t.owner(e),r=Ur(t,n);return[e].concat(r)}))},jr=function(t,e){var n=e.owner(t),r=Ur(e,n);return L.some(r)},Wr=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(ee.fromDom)},qr=function(t){return mn(t)},$r=Object.freeze({__proto__:null,view:Wr,owner:qr}),Gr=function(t){var e=ee.fromDom(document),n=Hr(e),r=jr(t,$r);return r.fold(S(mr,t),(function(e){var r=gr(t),o=J(e,(function(t,e){var n=gr(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return lr(o.left+r.left+n.left,o.top+r.top+n.top)}))},Kr=function(t,e,n){return{point:t,width:e,height:n}},Xr=function(t,e,n,r){return{x:t,y:e,width:n,height:r}},Yr=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Jr=function(t){var e=mr(t),n=br(t),r=ar(t);return Yr(e.left,e.top,n,r)},Qr=function(t){var e=Gr(t),n=br(t),r=ar(t);return Yr(e.left,e.top,n,r)},Zr=function(){return Vr(window)},to=function(t){var e=function(e){return to(t)},n=function(e){return to(t)},r=function(e){return to(e(t))},o=function(e){return to(t)},i=function(e){e(t)},u=function(e){return e(t)},a=function(e,n){return n(t)},c=function(e){return e(t)},s=function(e){return e(t)},l=function(){return L.some(t)};return{isValue:E,isError:O,getOr:w(t),getOrThunk:w(t),getOrDie:w(t),or:e,orThunk:n,fold:a,map:r,mapError:o,each:i,bind:u,exists:c,forall:s,toOptional:l}},eo=function(t){var e=function(t){return t()},n=function(){return T(String(t))()},r=x,o=function(t){return t()},i=function(e){return eo(t)},u=function(e){return eo(e(t))},a=function(e){return eo(t)},c=function(e,n){return e(t)};return{isValue:O,isError:E,getOr:x,getOrThunk:e,getOrDie:n,or:r,orThunk:o,fold:c,map:i,mapError:u,each:p,bind:a,exists:O,forall:E,toOptional:L.none}},no=function(t,e){return t.fold((function(){return eo(e)}),to)},ro={value:to,error:eo,fromOption:no};(function(t){t[t["Error"]=0]="Error",t[t["Value"]=1]="Value"})(ne||(ne={}));var oo=function(t,e,n){return t.stype===ne.Error?e(t.serror):n(t.svalue)},io=function(t){var e=[],n=[];return G(t,(function(t){oo(t,(function(t){return n.push(t)}),(function(t){return e.push(t)}))})),{values:e,errors:n}},uo=function(t,e){return t.stype===ne.Error?{stype:ne.Error,serror:e(t.serror)}:t},ao=function(t,e){return t.stype===ne.Value?{stype:ne.Value,svalue:e(t.svalue)}:t},co=function(t,e){return t.stype===ne.Value?e(t.svalue):t},so=function(t,e){return t.stype===ne.Error?e(t.serror):t},lo=function(t){return{stype:ne.Value,svalue:t}},fo=function(t){return{stype:ne.Error,serror:t}},mo=function(t){return oo(t,ro.error,ro.value)},go=function(t){return t.fold(fo,lo)},ho={fromResult:go,toResult:mo,svalue:lo,partition:io,serror:fo,bind:co,bindError:so,map:ao,mapError:uo,fold:oo},po=function(t,e,n,r){return{tag:"field",key:t,newKey:e,presence:n,prop:r}},vo=function(t,e){return{tag:"custom",newKey:t,instantiator:e}},bo=function(t,e,n){switch(t.tag){case"field":return e(t.key,t.newKey,t.presence,t.prop);case"custom":return n(t.newKey,t.instantiator)}},yo=function(t,e){return e},wo=function(t,e){var n=u(t)&&u(e);return n?Co(t,e):e},xo=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<e.length;o++){var i=e[o];for(var u in i)Et(i,u)&&(r[u]=t(r[u],i[u]))}return r}},Co=xo(wo),So=xo(yo),ko=function(){return{tag:"required",process:{}}},To=function(t){return{tag:"defaultedThunk",process:t}},Oo=function(t){return To(w(t))},Eo=function(){return{tag:"option",process:{}}},_o=function(t){return{tag:"mergeWithThunk",process:t}},Ao=function(t){return _o(w(t))},Do=function(t,e){return t.length>0?ho.svalue(Co(e,So.apply(void 0,t))):ho.svalue(e)},Mo=function(t){return b(ho.serror,nt)(t)},Ro=function(t,e){var n=ho.partition(t);return n.errors.length>0?Mo(n.errors):Do(n.values,e)},No=function(t){var e=ho.partition(t);return e.errors.length>0?Mo(e.errors):ho.svalue(e.values)},zo={consolidateObj:Ro,consolidateArr:No},Bo=function(t){return u(t)&&ht(t).length>100?" removed due to size":JSON.stringify(t,null,2)},Lo=function(t){var e=t.length>10?t.slice(0,10).concat([{path:[],getErrorInfo:w("... (only showing first ten failures)")}]):t;return $(e,(function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}))},Ho=function(t,e){return ho.serror([{path:t,getErrorInfo:e}])},Io=function(t,e,n){return Ho(t,(function(){return'Could not find valid *required* value for "'+e+'" in '+Bo(n)}))},Po=function(t,e){return Ho(t,(function(){return'Choice schema did not contain choice key: "'+e+'"'}))},Fo=function(t,e,n){return Ho(t,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+Bo(e)}))},Vo=function(t,e){return Ho(t,(function(){return"There are unsupported fields: ["+e.join(", ")+"] specified"}))},Uo=function(t,e){return Ho(t,w(e))},jo=function(t){var e=function(e,n){return ho.bindError(t(n),(function(t){return Uo(e,t)}))},n=w("val");return{extract:e,toString:n}},Wo=jo(ho.svalue),qo=function(t,e,n,r){return Ot(e,n).fold((function(){return Io(t,n,e)}),r)},$o=function(t,e,n,r){var o=Ot(t,e).getOrThunk((function(){return n(t)}));return r(o)},Go=function(t,e,n){return n(Ot(t,e))},Ko=function(t,e,n,r){var o=Ot(t,e).map((function(e){return!0===e?n(t):e}));return r(o)},Xo=function(t,e,n,r,o){var i=function(t){return o.extract(e.concat([r]),t)},u=function(t){return t.fold((function(){return ho.svalue(L.none())}),(function(t){var n=o.extract(e.concat([r]),t);return ho.map(n,L.some)}))};switch(t.tag){case"required":return qo(e,n,r,i);case"defaultedThunk":return $o(n,r,t.process,i);case"option":return Go(n,r,u);case"defaultedOptionThunk":return Ko(n,r,t.process,u);case"mergeWithThunk":return $o(n,r,w({}),(function(e){var r=Co(t.process(n),e);return i(r)}))}},Yo=function(t,e,n){for(var r={},o=[],i=0,u=n;i<u.length;i++){var a=u[i];bo(a,(function(n,i,u,a){var c=Xo(u,t,e,n,a);ho.fold(c,(function(t){o.push.apply(o,t)}),(function(t){r[i]=t}))}),(function(t,n){r[t]=n(e)}))}return o.length>0?ho.serror(o):ho.svalue(r)},Jo=function(t){var e=function(e,n){return t().extract(e,n)},n=function(){return t().toString()};return{extract:e,toString:n}},Qo=function(t){return ht(Ct(t,d))},Zo=function(t){var e=ti(t),n=J(t,(function(t,e){return bo(e,(function(e){var n;return Co(t,(n={},n[e]=!0,n))}),w(t))}),{}),r=function(t,r){var o=s(r)?[]:Qo(r),i=Y(o,(function(t){return!_t(n,t)}));return 0===i.length?e.extract(t,r):Vo(t,i)};return{extract:r,toString:e.toString}},ti=function(t){var e=function(e,n){return Yo(e,n,t)},n=function(){var e=$(t,(function(t){return bo(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}},ei=function(t){var e=function(e,n){var r=$(n,(function(n,r){return t.extract(e.concat(["["+r+"]"]),n)}));return zo.consolidateArr(r)},n=function(){return"array("+t.toString()+")"};return{extract:e,toString:n}},ni=function(t){var e=function(e,n){for(var r=[],o=0,i=t;o<i.length;o++){var u=i[o],a=u.extract(e,n);if(a.stype===ne.Value)return a;r.push(a)}return zo.consolidateArr(r)},n=function(){return"oneOf("+$(t,(function(t){return t.toString()})).join(", ")+")"};return{extract:e,toString:n}},ri=function(t,e){var n=function(e,n){return ei(jo(t)).extract(e,n)},r=function(t,r){var o=ht(r),i=n(t,o);return ho.bind(i,(function(n){var o=$(n,(function(t){return po(t,t,ko(),e)}));return ti(o).extract(t,r)}))},o=function(){return"setOf("+e.toString()+")"};return{extract:r,toString:o}},oi=function(t,e){var n=ge(e),r=function(t,e){return n().extract(t,e)},o=function(){return n().toString()};return{extract:r,toString:o}},ii=b(ei,ti),ui=w(Wo),ai=function(t,e){return jo((function(n){var r=typeof n;return t(n)?ho.svalue(n):ho.serror("Expected type: "+e+" but got: "+r)}))},ci=ai(g,"number"),si=ai(i,"string"),li=ai(s,"boolean"),fi=ai(m,"function"),di=function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every((function(e){return di(t[e])}));default:return!1}},mi=jo((function(t){return di(t)?ho.svalue(t):ho.serror("Expected value to be acceptable for sending via postMessage")})),gi=function(t,e,n,r){var o=Ot(n,r);return o.fold((function(){return Fo(t,n,r)}),(function(n){return n.extract(t.concat(["branch: "+r]),e)}))},hi=function(t,e){var n=function(n,r){var o=Ot(r,t);return o.fold((function(){return Po(n,t)}),(function(t){return gi(n,r,e,t)}))},r=function(){return"chooseOn("+t+"). Possible values: "+ht(e)};return{extract:n,toString:r}},pi=function(){return ei(Wo)},vi=function(t){return jo((function(e){return t(e).fold(ho.serror,ho.svalue)}))},bi=function(t,e){return ri((function(e){return ho.fromResult(t(e))}),e)},yi=function(t,e,n){var r=e.extract([t],n);return ho.mapError(r,(function(t){return{input:n,errors:t}}))},wi=function(t,e,n){return ho.toResult(yi(t,e,n))},xi=function(t){return t.fold((function(t){throw new Error(Si(t))}),x)},Ci=function(t,e,n){return xi(wi(t,e,n))},Si=function(t){return"Errors: \n"+Lo(t.errors).join("\n")+"\n\nInput object: "+Bo(t.input)},ki=function(t,e){return hi(t,bt(e,ti))},Ti=function(t,e){return oi(t,e)},Oi=po,Ei=vo,_i=function(t){return vi((function(e){return U(t,e)?ro.value(e):ro.error('Unsupported value: "'+e+'", choose one of "'+t.join(", ")+'".')}))},Ai=function(t){return Oi(t,t,ko(),ui())},Di=function(t,e){return Oi(t,t,ko(),e)},Mi=function(t){return Di(t,ci)},Ri=function(t){return Di(t,si)},Ni=function(t,e){return Oi(t,t,ko(),_i(e))},zi=function(t){return Di(t,li)},Bi=function(t){return Di(t,fi)},Li=function(t,e){return Oi(t,t,Eo(),jo((function(n){return ho.serror("The field: "+t+" is forbidden. "+e)})))},Hi=function(t,e){return Oi(t,t,ko(),ti(e))},Ii=function(t,e){return Oi(t,t,ko(),ii(e))},Pi=function(t,e){return Oi(t,t,ko(),ei(e))},Fi=function(t){return Oi(t,t,Eo(),ui())},Vi=function(t,e){return Oi(t,t,Eo(),e)},Ui=function(t){return Vi(t,ci)},ji=function(t){return Vi(t,si)},Wi=function(t){return Vi(t,fi)},qi=function(t,e){return Vi(t,ei(e))},$i=function(t,e){return Vi(t,ti(e))},Gi=function(t,e){return Vi(t,Zo(e))},Ki=function(t,e){return Oi(t,t,Oo(e),ui())},Xi=function(t,e,n){return Oi(t,t,Oo(e),n)},Yi=function(t,e){return Xi(t,e,ci)},Ji=function(t,e){return Xi(t,e,si)},Qi=function(t,e,n){return Xi(t,e,_i(n))},Zi=function(t,e){return Xi(t,e,li)},tu=function(t,e){return Xi(t,e,fi)},eu=function(t,e){return Xi(t,e,mi)},nu=function(t,e,n){return Xi(t,e,ei(n))},ru=function(t,e,n){return Xi(t,e,ti(n))},ou=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},iu=function(t){if(!a(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=ht(r);if(1!==i.length)throw new Error("one and only one name per case");var u=i[0],c=r[u];if(void 0!==n[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!a(c))throw new Error("case arguments must be an array");e.push(u),n[u]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==c.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+c.length+" ("+c+"), got "+i);var a=function(t){var r=ht(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));var o=ot(e,(function(t){return U(r,t)}));if(!o)throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[u].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:a,log:function(t){console.log(t,{constructors:e,constructor:u,params:n})}}}})),n},uu={generate:iu};uu.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var au,cu=function(t){var e=[],n=[];return G(t,(function(t){t.fold((function(t){e.push(t)}),(function(t){n.push(t)}))})),{errors:e,values:n}},su=function(t,e){var n={};return vt(t,(function(t,r){U(e,r)||(n[r]=t)})),n},lu=function(t,e){var n;return n={},n[t]=e,n},fu=function(t){var e={};return G(t,(function(t){e[t.key]=t.value})),e},du=function(t,e){return su(t,e)},mu=function(t,e){return lu(t,e)},gu=function(t){return fu(t)},hu=function(t,e){return 0===t.length?ro.value(e):ro.value(Co(e,So.apply(void 0,t)))},pu=function(t){return ro.error(nt(t))},vu=function(t,e){var n=cu(t);return n.errors.length>0?pu(n.errors):hu(n.values,e)},bu=function(t){return m(t)?t:O},yu=function(t,e,n){var r=t.dom,o=bu(n);while(r.parentNode){r=r.parentNode;var i=ee.fromDom(r),u=e(i);if(u.isSome())return u;if(o(i))break}return L.none()},wu=function(t,e,n){var r=e(t),o=bu(n);return r.orThunk((function(){return o(t)?L.none():yu(t,e,o)}))},xu=function(t,e){return sn(t.element,e.event.target)},Cu={can:E,abort:O,run:p},Su=function(t){if(!_t(t,"can")&&!_t(t,"abort")&&!_t(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return A(A({},Cu),t)},ku=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return Q(t,(function(t,r){return t&&e(r).apply(void 0,n)}),!0)}},Tu=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return Q(t,(function(t,r){return t||e(r).apply(void 0,n)}),!1)}},Ou=function(t){return m(t)?{can:E,abort:O,run:t}:t},Eu=function(t){var e=ku(t,(function(t){return t.can})),n=Tu(t,(function(t){return t.abort})),r=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];G(t,(function(t){t.run.apply(void 0,e)}))};return{can:e,abort:n,run:r}},_u=w,Au=_u("touchstart"),Du=_u("touchmove"),Mu=_u("touchend"),Ru=_u("touchcancel"),Nu=_u("mousedown"),zu=_u("mousemove"),Bu=_u("mouseout"),Lu=_u("mouseup"),Hu=_u("mouseover"),Iu=_u("focusin"),Pu=_u("focusout"),Fu=_u("keydown"),Vu=_u("keyup"),Uu=_u("input"),ju=_u("change"),Wu=_u("click"),qu=_u("transitioncancel"),$u=_u("transitionend"),Gu=_u("transitionstart"),Ku=_u("selectstart"),Xu=function(t){return w("alloy."+t)},Yu={tap:Xu("tap")},Ju=Xu("focus"),Qu=Xu("blur.post"),Zu=Xu("paste.post"),ta=Xu("receive"),ea=Xu("execute"),na=Xu("focus.item"),ra=Yu.tap,oa=Xu("longpress"),ia=Xu("sandbox.close"),ua=Xu("typeahead.cancel"),aa=Xu("system.init"),ca=Xu("system.touchmove"),sa=Xu("system.touchend"),la=Xu("system.scroll"),fa=Xu("system.resize"),da=Xu("system.attached"),ma=Xu("system.detached"),ga=Xu("system.dismissRequested"),ha=Xu("system.repositionRequested"),pa=Xu("focusmanager.shifted"),va=Xu("slotcontainer.visibility"),ba=Xu("change.tab"),ya=Xu("dismiss.tab"),wa=Xu("highlight"),xa=Xu("dehighlight"),Ca=function(t,e){Oa(t,t.element,e,{})},Sa=function(t,e,n){Oa(t,t.element,e,n)},ka=function(t){Ca(t,ea())},Ta=function(t,e,n){Oa(t,e,n,{})},Oa=function(t,e,n,r){var o=A({target:e},r);t.getSystem().triggerEvent(n,e,o)},Ea=function(t,e,n,r){t.getSystem().triggerEvent(n,e,r.event)},_a=function(t){return gu(t)},Aa=function(t,e){return{key:t,value:Su({abort:e})}},Da=function(t,e){return{key:t,value:Su({can:e})}},Ma=function(t){return{key:t,value:Su({run:function(t,e){e.event.prevent()}})}},Ra=function(t,e){return{key:t,value:Su({run:e})}},Na=function(t,e,n){return{key:t,value:Su({run:function(t,r){e.apply(void 0,[t,r].concat(n))}})}},za=function(t){return function(e){return Ra(t,e)}},Ba=function(t){return function(e){return{key:t,value:Su({run:function(t,n){xu(t,n)&&e(t,n)}})}}},La=function(t,e){return Ra(t,(function(n,r){n.getSystem().getByUid(e).each((function(e){Ea(e,e.element,t,r)}))}))},Ha=function(t,e,n){var r=e.partUids[n];return La(t,r)},Ia=function(t,e){return Ra(t,(function(t,n){var r=n.event,o=t.getSystem().getByDom(r.target).getOrThunk((function(){var e=wu(r.target,(function(e){return t.getSystem().getByDom(e).toOptional()}),O);return e.getOr(t)}));e(t,o,n)}))},Pa=function(t){return Ra(t,(function(t,e){e.cut()}))},Fa=function(t){return Ra(t,(function(t,e){e.stop()}))},Va=function(t,e){return Ba(t)(e)},Ua=Ba(da()),ja=Ba(ma()),Wa=Ba(aa()),qa=za(ea()),$a=function(t,e){var n=e||document,r=n.createElement("div");return r.innerHTML=t,xn(ee.fromDom(r))},Ga=function(t){return t.dom.innerHTML},Ka=function(t,e){var n=mn(t),r=n.dom,o=ee.fromDom(r.createDocumentFragment()),i=$a(e,r);Nr(o,i),zr(t),Dr(t,o)},Xa=function(t){var e=ee.fromTag("div"),n=ee.fromDom(t.dom.cloneNode(!0));return Dr(e,n),Ga(e)},Ya=function(t,e){return ee.fromDom(t.dom.cloneNode(e))},Ja=function(t){return Ya(t,!1)},Qa=function(t){if(On(t))return"#shadow-root";var e=Ja(t);return Xa(e)},Za=function(t){return Qa(t)},tc=function(t,e,n){return sn(e,t.element)&&!sn(e,n)},ec=_a([Da(Ju(),(function(t,e){var n=e.event,r=n.originator,o=n.target;return!tc(t,r,o)||(console.warn(Ju()+" did not get interpreted by the desired target. \nOriginator: "+Za(r)+"\nTarget: "+Za(o)+"\nCheck the "+Ju()+" event handlers"),!1)}))]),nc=Object.freeze({__proto__:null,events:ec}),rc=0,oc=function(t){var e=new Date,n=e.getTime(),r=Math.floor(1e9*Math.random());return rc++,t+"_"+r+rc+String(n)},ic=w("alloy-id-"),uc=w("data-alloy-id"),ac=ic(),cc=uc(),sc=function(t,e){var n=oc(ac+t);return lc(e,n),n},lc=function(t,e){Object.defineProperty(t.dom,cc,{value:e,writable:!0})},fc=function(t){var e=le(t)?t.dom[cc]:null;return L.from(e)},dc=function(t){return oc(t)},mc=x,gc=function(t){var e=function(e){return"The component must be in a context to execute: "+e+(t?"\n"+Za(t().element)+" is not in context.":"")},n=function(t){return function(){throw new Error(e(t))}},r=function(t){return function(){console.warn(e(t))}};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:O}},hc=gc(),pc=function(t,e,n){var r=n.toString(),o=r.indexOf(")")+1,i=r.indexOf("("),u=r.substring(i+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:vc(u.slice(0,1).concat(u.slice(3)))}},t},vc=function(t){return $(t,(function(t){return Wt(t,"/*")?t.substring(0,t.length-"/*".length):t}))},bc=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:vc(i)}},t},yc=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:vc(i.slice(1))}},t},wc=oc("alloy-premade"),xc=function(t){return mu(wc,t)},Cc=function(t){return Ot(t,wc)},Sc=function(t){return yc((function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.apply(void 0,M([e.getApis(),e],n,!1))}),t)},kc={init:function(){return Tc({readState:w("No State required")})}},Tc=function(t){return t},Oc=function(t,e){var n=$(e,(function(t){return $i(t.name(),[Ai("config"),Ki("state",kc)])})),r=wi("component.behaviours",ti(n),t.behaviours).fold((function(e){throw new Error(Si(e)+"\nComplete spec:\n"+JSON.stringify(t,null,2))}),x);return{list:e,data:bt(r,(function(t){var e=t.map((function(t){return{config:t.config,state:t.state.init(t.config)}}));return w(e)}))}},Ec=function(t){return t.list},_c=function(t){return t.data},Ac=function(t,e){var n={};return vt(t,(function(t,r){vt(t,(function(t,o){var i=Ot(n,o).getOr([]);n[o]=i.concat([e(r,t)])}))})),n},Dc=function(t){return{classes:l(t.classes)?[]:t.classes,attributes:l(t.attributes)?{}:t.attributes,styles:l(t.styles)?{}:t.styles}},Mc=function(t,e){return A(A({},t),{attributes:A(A({},t.attributes),e.attributes),styles:A(A({},t.styles),e.styles),classes:t.classes.concat(e.classes)})},Rc=function(t,e,n,r){var o=A({},e);G(n,(function(e){o[e.name()]=e.exhibit(t,r)}));var i=Ac(o,(function(t,e){return{name:t,modification:e}})),u=function(t){return J(t,(function(t,e){return A(A({},e.modification),t)}),{})},a=J(i.classes,(function(t,e){return e.modification.concat(t)}),[]),c=u(i.attributes),s=u(i.styles);return Dc({classes:a,attributes:c,styles:s})},Nc=function(t,e,n,r){try{var o=st(n,(function(n,o){var i=n[e],u=o[e],a=r.indexOf(i),c=r.indexOf(u);if(-1===a)throw new Error("The ordering for "+t+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(r,null,2));if(-1===c)throw new Error("The ordering for "+t+" does not have an entry for "+u+".\nOrder specified: "+JSON.stringify(r,null,2));return a<c?-1:c<a?1:0}));return ro.value(o)}catch(i){return ro.error([i])}},zc=function(t,e){return{handler:t,purpose:e}},Bc=function(t,e){return{cHandler:t,purpose:e}},Lc=function(t,e){return Bc(S.apply(void 0,[t.handler].concat(e)),t.purpose)},Hc=function(t){return t.cHandler},Ic=function(t,e){return{name:t,handler:e}},Pc=function(t,e){var n={};return G(t,(function(t){n[t.name()]=t.handlers(e)})),n},Fc=function(t,e,n){var r=A(A({},n),Pc(e,t));return Ac(r,Ic)},Vc=function(t,e,n,r){var o=Fc(t,n,r);return qc(o,e)},Uc=function(t){var e=Ou(t);return function(t,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var i=[t,n].concat(r);e.abort.apply(void 0,i)?n.stop():e.can.apply(void 0,i)&&e.run.apply(void 0,i)}},jc=function(t,e){return ro.error(["The event ("+t+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify($(e,(function(t){return t.name})),null,2)])},Wc=function(t,e,n){var r=e[n];return r?Nc("Event: "+n,"name",t,r).map((function(t){var e=$(t,(function(t){return t.handler}));return Eu(e)})):jc(n,t)},qc=function(t,e){var n=St(t,(function(t,n){var r=1===t.length?ro.value(t[0].handler):Wc(t,e,n);return r.map((function(r){var o=Uc(r),i=t.length>1?Y(e[n],(function(e){return j(t,(function(t){return t.name===e}))})).join(" > "):t[0].name;return mu(n,zc(o,i))}))}));return vu(n,{})},$c="alloy.base.behaviour",Gc=ti([Oi("dom","dom",ko(),ti([Ai("tag"),Ki("styles",{}),Ki("classes",[]),Ki("attributes",{}),Fi("value"),Fi("innerHtml")])),Ai("components"),Ai("uid"),Ki("events",{}),Ki("apis",{}),Oi("eventOrder","eventOrder",Ao((au={},au[ea()]=["disabling",$c,"toggling","typeaheadevents"],au[Ju()]=[$c,"focusing","keying"],au[aa()]=[$c,"disabling","toggling","representing"],au[Uu()]=[$c,"representing","streaming","invalidating"],au[ma()]=[$c,"representing","item-events","tooltipping"],au[Nu()]=["focusing",$c,"item-type-events"],au[Au()]=["focusing",$c,"item-type-events"],au[Hu()]=["item-type-events","tooltipping"],au[ta()]=["receiving","reflecting","tooltipping"],au)),ui()),Fi("domModification")]),Kc=function(t){return wi("custom.definition",Gc,t)},Xc=function(t){return A(A({},t.dom),{uid:t.uid,domChildren:$(t.components,(function(t){return t.element}))})},Yc=function(t){return t.domModification.fold((function(){return Dc({})}),Dc)},Jc=function(t){return t.events},Qc=function(t,e){var n=Un(t,e);return void 0===n||""===n?[]:n.split(" ")},Zc=function(t,e,n){var r=Qc(t,e),o=r.concat([n]);return Fn(t,e,o.join(" ")),!0},ts=function(t,e,n){var r=Y(Qc(t,e),(function(t){return t!==n}));return r.length>0?Fn(t,e,r.join(" ")):qn(t,e),!1},es=function(t){return void 0!==t.dom.classList},ns=function(t){return Qc(t,"class")},rs=function(t,e){return Zc(t,"class",e)},os=function(t,e){return ts(t,"class",e)},is=function(t,e){es(t)?t.dom.classList.add(e):rs(t,e)},us=function(t){var e=es(t)?t.dom.classList:ns(t);0===e.length&&qn(t,"class")},as=function(t,e){if(es(t)){var n=t.dom.classList;n.remove(e)}else os(t,e);us(t)},cs=function(t,e){return es(t)&&t.dom.classList.contains(e)},ss=function(t,e){G(e,(function(e){is(t,e)}))},ls=function(t,e){G(e,(function(e){as(t,e)}))},fs=function(t,e){return ot(e,(function(e){return cs(t,e)}))},ds=function(t){return t.dom.value},ms=function(t,e){if(void 0===e)throw new Error("Value.set was undefined");t.dom.value=e},gs=function(t){var e=ee.fromTag(t.tag);Vn(e,t.attributes),ss(e,t.classes),Xn(e,t.styles),t.innerHtml.each((function(t){return Ka(e,t)}));var n=t.domChildren;return Nr(e,n),t.value.each((function(t){ms(e,t)})),t.uid,lc(e,t.uid),e},hs=function(t){var e=Ot(t,"behaviours").getOr({});return rt(ht(e),(function(t){var n=e[t];return d(n)?[n.me]:[]}))},ps=function(t,e){return Oc(t,e)},vs=function(t){var e=hs(t);return ps(t,e)},bs=function(t,e,n){var r=Xc(t),o=Yc(t),i={"alloy.base.modification":o},u=e.length>0?Rc(n,i,e,r):o;return Mc(r,u)},ys=function(t,e,n){var r={"alloy.base.behaviour":Jc(t)};return Vc(n,t.eventOrder,e,r).getOrDie()},ws=function(t){var e=function(){return y},n=ou(hc),r=xi(Kc(t)),o=vs(t),i=Ec(o),u=_c(o),a=bs(r,i,u),c=gs(a),s=ys(r,i,u),l=ou(r.components),f=function(t){n.set(t)},d=function(){n.set(gc(e))},g=function(){var t=xn(c),e=rt(t,(function(t){return n.get().getByDom(t).fold((function(){return[]}),ct)}));l.set(e)},h=function(e){var n=u,r=m(n[e.name()])?n[e.name()]:function(){throw new Error("Could not find "+e.name()+" in "+JSON.stringify(t,null,2))};return r()},p=function(t){return m(u[t.name()])},v=function(){return r.apis},b=function(t){return u[t]().map((function(t){return t.state.readState()})).getOr("not enabled")},y={uid:t.uid,getSystem:n.get,config:h,hasConfigured:p,spec:t,readState:b,getApis:v,connect:f,disconnect:d,element:c,syncComponents:g,components:l.get,events:s};return y},xs=function(t){var e=Ot(t,"components").getOr([]);return $(e,Es)},Cs=function(t){var e=mc(t),n=e.events,r=D(e,["events"]),o=xs(r),i=A(A({},r),{events:A(A({},nc),n),components:o});return ro.value(ws(i))},Ss=function(t){var e=ee.fromText(t);return ks({element:e})},ks=function(t){var e=Ci("external.component",Zo([Ai("element"),Fi("uid")]),t),n=ou(gc()),r=function(t){n.set(t)},o=function(){n.set(gc((function(){return u})))},i=e.uid.getOrThunk((function(){return dc("external")}));lc(e.element,i);var u={uid:i,getSystem:n.get,config:L.none,hasConfigured:O,connect:r,disconnect:o,getApis:function(){return{}},element:e.element,spec:t,readState:w("No state"),syncComponents:p,components:w([]),events:{}};return xc(u)},Ts=dc,Os=function(t){return Et(t,"uid")},Es=function(t){return Cc(t).getOrThunk((function(){var e=Os(t)?t:A({uid:Ts("")},t);return Cs(e).getOrDie()}))},_s=xc;function As(t,e,n,r,o){return t(n,r)?L.some(n):m(o)&&o(n)?L.none():e(n,r,o)}var Ds,Ms=function(t,e,n){var r=t.dom,o=m(n)?n:O;while(r.parentNode){r=r.parentNode;var i=ee.fromDom(r);if(e(i))return L.some(i);if(o(i))break}return L.none()},Rs=function(t,e,n){var r=function(t,e){return e(t)};return As(r,Ms,t,e,n)},Ns=function(t,e){var n=function(t){return e(ee.fromDom(t))},r=tt(t.dom.childNodes,n);return r.map(ee.fromDom)},zs=function(t,e){var n=function(t){for(var r=0;r<t.childNodes.length;r++){var o=ee.fromDom(t.childNodes[r]);if(e(o))return L.some(o);var i=n(t.childNodes[r]);if(i.isSome())return i}return L.none()};return n(t.dom)},Bs=function(t,e,n){return Rs(t,e,n).isSome()},Ls=function(t,e,n){return Ms(t,(function(t){return on(t,e)}),n)},Hs=function(t,e){return Ns(t,(function(t){return on(t,e)}))},Is=function(t,e){return cn(e,t)},Ps=function(t,e,n){var r=function(t,e){return on(t,e)};return As(r,Ls,t,e,n)},Fs=function(t){var e=Rs(t,(function(t){if(!le(t))return!1;var e=Un(t,"id");return void 0!==e&&e.indexOf("aria-owns")>-1}));return e.bind((function(t){var e=Un(t,"id"),n=An(t);return Is(n,'[aria-owns="'+e+'"]')}))},Vs=function(){var t=oc("aria-owns"),e=function(e){Fn(e,"aria-owns",t)},n=function(t){qn(t,"aria-owns")};return{id:t,link:e,unlink:n}},Us=function(t,e){return Fs(e).exists((function(e){return js(t,e)}))},js=function(t,e){return Bs(e,(function(e){return sn(e,t.element)}),O)||Us(t,e)},Ws="unknown";(function(t){t[t["STOP"]=0]="STOP",t[t["NORMAL"]=1]="NORMAL",t[t["LOGGING"]=2]="LOGGING"})(Ds||(Ds={}));var qs=ou({}),$s=function(t,e){var n=[],r=(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(){var o=(new Date).getTime();U(["mousemove","mouseover","mouseout",aa()],t)||console.log(t,{event:t,time:o-r,target:e.dom,sequence:$(n,(function(t){return U(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+Za(t.target)+")":t.outcome}))})}}},Gs=function(t,e,n){var r=Ot(qs.get(),t).orThunk((function(){var e=ht(qs.get());return gt(e,(function(e){return t.indexOf(e)>-1?L.some(qs.get()[e]):L.none()}))})).getOr(Ds.NORMAL);switch(r){case Ds.NORMAL:return n(Qs());case Ds.LOGGING:var o=$s(t,e),i=n(o);return o.write(),i;case Ds.STOP:return!0}},Ks=["alloy/data/Fields","alloy/debugging/Debugging"],Xs=function(){var t=new Error;if(void 0!==t.stack){var e=t.stack.split("\n");return tt(e,(function(t){return t.indexOf("alloy")>0&&!j(Ks,(function(e){return t.indexOf(e)>-1}))})).getOr(Ws)}return Ws},Ys={logEventCut:p,logEventStopped:p,logNoParent:p,logEventNoHandlers:p,logEventResponse:p,write:p},Js=function(t,e,n){return Gs(t,e,n)},Qs=w(Ys),Zs=w([Ai("menu"),Ai("selectedMenu")]),tl=w([Ai("item"),Ai("selectedItem")]);w(ti(tl().concat(Zs())));var el=w(ti(tl())),nl=Hi("initSize",[Ai("numColumns"),Ai("numRows")]),rl=function(){return Di("markers",el())},ol=function(){return Hi("markers",[Ai("backgroundMenu")].concat(Zs()).concat(tl()))},il=function(t){return Hi("markers",$(t,Ai))},ul=function(t,e,n){return Xs(),Oi(e,e,n,vi((function(t){return ro.value((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.apply(void 0,e)}))})))},al=function(t){return ul("onHandler",t,Oo(p))},cl=function(t){return ul("onKeyboardHandler",t,Oo(L.none))},sl=function(t){return ul("onHandler",t,ko())},ll=function(t){return ul("onKeyboardHandler",t,ko())},fl=function(t,e){return Ei(t,w(e))},dl=function(t){return Ei(t,x)},ml=w(nl),gl=function(t,e,n,r,o,i,u,a){return void 0===a&&(a=!1),{x:t,y:e,bubble:n,direction:r,placement:o,restriction:i,label:u+"-"+o,alwaysFit:a}},hl=uu.generate([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),pl=function(t,e,n,r,o,i,u,a,c){return t.fold(e,n,r,o,i,u,a,c)},vl=function(t,e,n,r){return t.fold(e,e,r,r,e,r,n,n)},bl=function(t,e,n,r){return t.fold(e,r,e,r,n,n,e,r)},yl=hl.southeast,wl=hl.southwest,xl=hl.northeast,Cl=hl.northwest,Sl=hl.south,kl=hl.north,Tl=hl.east,Ol=hl.west,El=function(t,e,n,r){var o=t+e;return o>r?n:o<n?r:o},_l=function(t,e,n){return Math.min(Math.max(t,e),n)},Al=function(t,e){switch(e){case 1:return t.x;case 0:return t.x+t.width;case 2:return t.y;case 3:return t.y+t.height}},Dl=function(t,e){return at(["left","right","top","bottom"],(function(n){return Ot(e,n).map((function(e){return Al(t,e)}))}))},Ml=function(t,e,n){var r=function(r,o){return e[r].map((function(e){var i="top"===r||"bottom"===r,u=i?n.top:n.left,a="left"===r||"top"===r?Math.max:Math.min,c=a(e,o)+u;return i?_l(c,t.y,t.bottom):_l(c,t.x,t.right)})).getOr(o)},o=r("left",t.x),i=r("top",t.y),u=r("right",t.right),a=r("bottom",t.bottom);return Yr(o,i,u-o,a-i)},Rl="layout",Nl=function(t){return t.x},zl=function(t,e){return t.x+t.width/2-e.width/2},Bl=function(t,e){return t.x+t.width-e.width},Ll=function(t,e){return t.y-e.height},Hl=function(t){return t.y+t.height},Il=function(t,e){return t.y+t.height/2-e.height/2},Pl=function(t){return t.x+t.width},Fl=function(t,e){return t.x-e.width},Vl=function(t,e,n){return gl(Nl(t),Hl(t),n.southeast(),yl(),"southeast",Dl(t,{left:1,top:3}),Rl)},Ul=function(t,e,n){return gl(Bl(t,e),Hl(t),n.southwest(),wl(),"southwest",Dl(t,{right:0,top:3}),Rl)},jl=function(t,e,n){return gl(Nl(t),Ll(t,e),n.northeast(),xl(),"northeast",Dl(t,{left:1,bottom:2}),Rl)},Wl=function(t,e,n){return gl(Bl(t,e),Ll(t,e),n.northwest(),Cl(),"northwest",Dl(t,{right:0,bottom:2}),Rl)},ql=function(t,e,n){return gl(zl(t,e),Ll(t,e),n.north(),kl(),"north",Dl(t,{bottom:2}),Rl)},$l=function(t,e,n){return gl(zl(t,e),Hl(t),n.south(),Sl(),"south",Dl(t,{top:3}),Rl)},Gl=function(t,e,n){return gl(Pl(t),Il(t,e),n.east(),Tl(),"east",Dl(t,{left:0}),Rl)},Kl=function(t,e,n){return gl(Fl(t,e),Il(t,e),n.west(),Ol(),"west",Dl(t,{right:1}),Rl)},Xl=function(){return[Vl,Ul,jl,Wl,$l,ql,Gl,Kl]},Yl=function(){return[Ul,Vl,Wl,jl,$l,ql,Gl,Kl]},Jl=function(){return[jl,Wl,Vl,Ul,ql,$l]},Ql=function(){return[Wl,jl,Ul,Vl,ql,$l]},Zl=function(){return[Vl,Ul,jl,Wl,$l,ql]},tf=function(){return[Ul,Vl,Wl,jl,$l,ql]},ef=function(t,e){return e.universal?t:Y(t,(function(t){return U(e.channels,t)}))},nf=function(t){return _a([Ra(ta(),(function(e,n){var r=t.channels,o=ht(r),i=n,u=ef(o,i);G(u,(function(t){var n=r[t],o=n.schema,u=Ci("channel["+t+"] data\nReceiver: "+Za(e.element),o,i.data);n.onReceive(e,u)}))}))])},rf=Object.freeze({__proto__:null,events:nf}),of=[Di("channels",bi(ro.value,Zo([sl("onReceive"),Ki("schema",ui())])))],uf=function(t,e,n){return qa((function(r){n(r,t,e)}))},af=function(t,e,n){return Wa((function(r,o){n(r,t,e)}))},cf=function(t,e,n,r,o,i){var u=Zo(t),a=$i(e,[Gi("config",t)]);return df(u,a,e,n,r,o,i)},sf=function(t,e,n,r,o,i){var u=t,a=$i(e,[Vi("config",t)]);return df(u,a,e,n,r,o,i)},lf=function(t,e,n){var r=function(r){for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var u=[r].concat(o);return r.config({name:w(t)}).fold((function(){throw new Error("We could not find any behaviour configuration for: "+t+". Using API: "+n)}),(function(t){var n=Array.prototype.slice.call(u,1);return e.apply(void 0,[r,t.config,t.state].concat(n))}))};return pc(r,n,e)},ff=function(t){return{key:t,value:void 0}},df=function(t,e,n,r,o,i,u){var a=function(t){return _t(t,n)?t[n]():L.none()},c=bt(o,(function(t,e){return lf(n,t,e)})),s=bt(i,(function(t,e){return bc(t,e)})),l=A(A(A({},s),c),{revoke:S(ff,n),config:function(e){var r=Ci(n+"-config",t,e);return{key:n,value:{config:r,me:l,configAsRaw:ge((function(){return Ci(n+"-config",t,e)})),initialConfig:e,state:u}}},schema:w(e),exhibit:function(t,e){return Nt(a(t),Ot(r,"exhibit"),(function(t,n){return n(e,t.config,t.state)})).getOrThunk((function(){return Dc({})}))},name:w(n),handlers:function(t){return a(t).map((function(t){var e=Ot(r,"events").getOr((function(){return{}}));return e(t.config,t.state)})).getOr({})}});return l},mf=function(t){return gu(t)},gf=Zo([Ai("fields"),Ai("name"),Ki("active",{}),Ki("apis",{}),Ki("state",kc),Ki("extra",{})]),hf=function(t){var e=Ci("Creating behaviour: "+t.name,gf,t);return cf(e.fields,e.name,e.active,e.apis,e.extra,e.state)},pf=Zo([Ai("branchKey"),Ai("branches"),Ai("name"),Ki("active",{}),Ki("apis",{}),Ki("state",kc),Ki("extra",{})]),vf=function(t){var e=Ci("Creating behaviour: "+t.name,pf,t);return sf(ki(e.branchKey,e.branches),e.name,e.active,e.apis,e.extra,e.state)},bf=w(void 0),yf=hf({fields:of,name:"receiving",active:rf}),wf=function(t,e){return Dc({classes:[],styles:e.useFixed()?{}:{position:"relative"}})},xf=Object.freeze({__proto__:null,exhibit:wf}),Cf=function(){return ee.fromDom(document)},Sf=function(t){return t.dom.focus()},kf=function(t){return t.dom.blur()},Tf=function(t){var e=An(t).dom;return t.dom===e.activeElement},Of=function(t){return void 0===t&&(t=Cf()),L.from(t.dom.activeElement).map(ee.fromDom)},Ef=function(t){return Of(An(t)).filter((function(e){return t.dom.contains(e.dom)}))},_f=function(t,e){var n=An(e),r=Of(n).bind((function(t){var n=function(e){return sn(t,e)};return n(e)?L.some(e):zs(e,n)})),o=t(e);return r.each((function(t){Of(n).filter((function(e){return sn(e,t)})).fold((function(){Sf(t)}),p)})),o},Af=function(t,e,n,r,o){var i=function(t){return t+"px"};return{position:t,left:e.map(i),top:n.map(i),right:r.map(i),bottom:o.map(i)}},Df=function(t){return A(A({},t),{position:L.some(t.position)})},Mf=function(t,e){Yn(t,Df(e))},Rf=uu.generate([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),Nf=function(t,e,n,r,o,i){var u=e.rect,a=u.x-n,c=u.y-r,s=u.width,l=u.height,f=o-(a+s),d=i-(c+l),m=L.some(a),g=L.some(c),h=L.some(f),p=L.some(d),v=L.none();return pl(e.direction,(function(){return Af(t,m,g,v,v)}),(function(){return Af(t,v,g,h,v)}),(function(){return Af(t,m,v,v,p)}),(function(){return Af(t,v,v,h,p)}),(function(){return Af(t,m,g,v,v)}),(function(){return Af(t,m,v,v,p)}),(function(){return Af(t,m,g,v,v)}),(function(){return Af(t,v,g,h,v)}))},zf=function(t,e){return t.fold((function(){var t=e.rect;return Af("absolute",L.some(t.x),L.some(t.y),L.none(),L.none())}),(function(t,n,r,o){return Nf("absolute",e,t,n,r,o)}),(function(t,n,r,o){return Nf("fixed",e,t,n,r,o)}))},Bf=function(t,e){var n=S(Gr,e),r=t.fold(n,n,(function(){var t=Hr();return Gr(e).translate(-t.left,-t.top)})),o=br(e),i=ar(e);return Yr(r.left,r.top,o,i)},Lf=function(t,e){return e.fold((function(){return t.fold(Zr,Zr,Yr)}),(function(e){return t.fold(e,e,(function(){var n=e(),r=Hf(t,n.x,n.y);return Yr(r.left,r.top,n.width,n.height)}))}))},Hf=function(t,e,n){var r=lr(e,n),o=function(){var t=Hr();return r.translate(-t.left,-t.top)};return t.fold(w(r),w(r),o)},If=function(t,e,n,r){return t.fold(e,n,r)};Rf.none;var Pf,Ff=Rf.relative,Vf=Rf.fixed,Uf=function(t,e){return{anchorBox:t,origin:e}},jf=function(t,e){return Uf(t,e)},Wf="data-alloy-placement",qf=function(t,e){Fn(t,Wf,e)},$f=function(t){return jn(t,Wf)},Gf=function(t){return qn(t,Wf)},Kf=uu.generate([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),Xf=function(t,e){var n=e.x,r=e.y,o=e.right,i=e.bottom,u=t.x,a=t.y,c=t.right,s=t.bottom,l=t.width,f=t.height,d=u>=n&&u<=o,m=a>=r&&a<=i,g=d&&m,h=c<=o&&c>=n,p=s<=i&&s>=r,v=h&&p,b=Math.min(l,u>=n?o-u:c-n),y=Math.min(f,a>=r?i-a:s-r);return{originInBounds:g,sizeInBounds:v,visibleW:b,visibleH:y}},Yf=function(t,e){var n=e.x,r=e.y,o=e.right,i=e.bottom,u=t.x,a=t.y,c=t.width,s=t.height,l=Math.max(n,o-c),f=Math.max(r,i-s),d=_l(u,n,l),m=_l(a,r,f),g=Math.min(d+c,o)-d,h=Math.min(m+s,i)-m;return Yr(d,m,g,h)},Jf=function(t,e,n){var r=w(e.bottom-n.y),o=w(n.bottom-e.y),i=vl(t,o,o,r),u=w(e.right-n.x),a=w(n.right-e.x),c=bl(t,a,a,u);return{maxWidth:c,maxHeight:i}},Qf=function(t,e,n,r){var o=t.bubble,i=o.offset,u=Ml(r,t.restriction,i),a=t.x+i.left,c=t.y+i.top,s=Yr(a,c,e,n),l=Xf(s,u),f=l.originInBounds,d=l.sizeInBounds,m=l.visibleW,g=l.visibleH,h=f&&d,p=h?s:Yf(s,u),v=p.width>0&&p.height>0,b=Jf(t.direction,p,r),y=b.maxWidth,w=b.maxHeight,x={rect:p,maxHeight:w,maxWidth:y,direction:t.direction,placement:t.placement,classes:{on:o.classesOn,off:o.classesOff},layout:t.label,testY:c};return h||t.alwaysFit?Kf.fit(x):Kf.nofit(x,m,g,v)},Zf=function(t,e,n,r,o,i){var u=r.width,a=r.height,c=function(e,c,s,l,f){var d=e(n,r,o,t,i),m=Qf(d,u,a,i);return m.fold(w(m),(function(t,e,n,r){var o=f===r?n>l||e>s:!f&&r;return o?m:Kf.nofit(c,s,l,f)}))},s=Q(e,(function(t,e){var n=S(c,e);return t.fold(w(t),n)}),Kf.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 s.fold(x,x)},td=function(t){var e=ou(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()},u=function(t){n(),e.set(L.some(t))};return{clear:r,isSet:o,get:i,set:u}},ed=function(){return td((function(t){return t.destroy()}))},nd=function(){return td((function(t){return t.unbind()}))},rd=function(){var t=ed(),e=function(e){return t.get().each(e)};return A(A({},t),{run:e})},od=function(){var t=td(p),e=function(e){return t.get().each(e)};return A(A({},t),{on:e})},id=E,ud=function(t,e,n){return kr(t,e,id,n)},ad=function(t,e,n){return Tr(t,e,id,n)},cd=xr,sd=["top","bottom","right","left"],ld="data-alloy-transition-timer",fd=function(t,e){return fs(t,e.classes)},dd=function(t,e,n){return n.exists((function(n){var r=t.mode;return"all"===r||n[r]!==e[r]}))},md=function(t,e){var n=function(t){return parseFloat(t).toFixed(3)};return kt(e,(function(e,r){var o=t[r].map(n),i=e.map(n);return!Dt(o,i)})).isSome()},gd=function(t){var e=function(e){var n=Jn(t,e),r=i(n)?n.split(/\s*,\s*/):[];return Y(r,Gt)},n=function(t){if(i(t)&&/^[\d.]+/.test(t)){var e=parseFloat(t);return Wt(t,"ms")?e:1e3*e}return 0},r=e("transition-delay"),o=e("transition-duration");return Q(o,(function(t,e,o){var i=n(r[o])+n(e);return Math.max(t,i)}),0)},hd=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 sn(e.target,t)&&Kt(r)&&U(sd,e.raw.propertyName)},u=function(u){if(f(u)||i(u)){r.clear(),o.clear();var a=null===u||void 0===u?void 0:u.raw.type;(f(a)||a===$u())&&(clearTimeout(n),qn(t,ld),ls(t,e.classes))}},a=function(){r.set(ud(t,$u(),u)),o.set(ud(t,qu(),u))};if("ontransitionstart"in t.dom)var c=ud(t,Gu(),(function(t){i(t)&&(c.unbind(),a())}));else a();var s=gd(t);requestAnimationFrame((function(){n=setTimeout(u,s+17),Fn(t,ld,n)}))},pd=function(t,e){ss(t,e.classes),jn(t,ld).each((function(e){clearTimeout(parseInt(e,10)),qn(t,ld)})),hd(t,e)},vd=function(t,e,n,r,o,i){var u=dd(r,o,i);if(u||fd(t,r)){Kn(t,"position",n.position);var a=Bf(e,t),c=zf(e,A(A({},o),{rect:a})),s=at(sd,(function(t){return c[t]}));md(n,s)&&(Yn(t,s),u&&pd(t,r),rr(t))}else ls(t,r.classes)},bd=function(t){return{width:br(t),height:ar(t)}},yd=function(t,e,n,r){nr(e,"max-height"),nr(e,"max-width");var o=bd(e);return Zf(e,r.preference,t,o,n,r.bounds)},wd=function(t,e){var n=e.classes;ls(t,n.off),ss(t,n.on)},xd=function(t,e,n){var r=n.maxHeightFunction;r(t,e.maxHeight)},Cd=function(t,e,n){var r=n.maxWidthFunction;r(t,e.maxWidth)},Sd=function(t,e,n){var r=zf(n.origin,e);n.transition.each((function(o){vd(t,n.origin,r,o,e,n.lastPlacement)})),Mf(t,r)},kd=function(t,e){qf(t,e.placement)},Td=function(t,e){cr(t,Math.floor(e))},Od=w((function(t,e){Td(t,e),Xn(t,{"overflow-x":"hidden","overflow-y":"auto"})})),Ed=w((function(t,e){Td(t,e)})),_d=function(t,e,n){return void 0===t[e]?n:t[e]},Ad=function(t,e,n,r,o,i,u,a){var c=_d(u,"maxHeightFunction",Od()),s=_d(u,"maxWidthFunction",p),l=t.anchorBox,f=t.origin,d={bounds:Lf(f,i),origin:f,preference:r,maxHeightFunction:c,maxWidthFunction:s,lastPlacement:o,transition:a};return Dd(l,e,n,d)},Dd=function(t,e,n,r){var o=yd(t,e,n,r);return Sd(e,o,r),kd(e,o),wd(e,o),xd(e,o,r),Cd(e,o,r),{layout:o.layout,placement:o.placement}},Md=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Rd=function(t,e,n,r){void 0===r&&(r=1);var o=t*r,i=e*r,u=function(t){return Ot(n,t).getOr([])},a=function(t,e,n){var r=ut(Md,n);return{offset:lr(t,e),classesOn:rt(n,u),classesOff:rt(r,u)}};return{southeast:function(){return a(-t,e,["top","alignLeft"])},southwest:function(){return a(t,e,["top","alignRight"])},south:function(){return a(-t/2,e,["top","alignCentre"])},northeast:function(){return a(-t,-e,["bottom","alignLeft"])},northwest:function(){return a(t,-e,["bottom","alignRight"])},north:function(){return a(-t/2,-e,["bottom","alignCentre"])},east:function(){return a(t,-e/2,["valignCentre","left"])},west:function(){return a(-t,-e/2,["valignCentre","right"])},insetNortheast:function(){return a(o,i,["top","alignLeft","inset"])},insetNorthwest:function(){return a(-o,i,["top","alignRight","inset"])},insetNorth:function(){return a(-o/2,i,["top","alignCentre","inset"])},insetSoutheast:function(){return a(o,-i,["bottom","alignLeft","inset"])},insetSouthwest:function(){return a(-o,-i,["bottom","alignRight","inset"])},insetSouth:function(){return a(-o/2,-i,["bottom","alignCentre","inset"])},insetEast:function(){return a(-o,-i/2,["valignCentre","right","inset"])},insetWest:function(){return a(o,-i/2,["valignCentre","left","inset"])}}},Nd=function(){return Rd(0,0,{})},zd=x,Bd=function(t,e){return function(n){return"rtl"===Ld(n)?e:t}},Ld=function(t){return"rtl"===Jn(t,"direction")?"rtl":"ltr"};(function(t){t["TopToBottom"]="toptobottom",t["BottomToTop"]="bottomtotop"})(Pf||(Pf={}));var Hd="data-alloy-vertical-dir",Id=function(t){return Bs(t,(function(t){return le(t)&&Un(t,"data-alloy-vertical-dir")===Pf.BottomToTop}))},Pd=function(){return $i("layouts",[Ai("onLtr"),Ai("onRtl"),Fi("onBottomLtr"),Fi("onBottomRtl")])},Fd=function(t,e,n,r,o,i,u){var a=u.map(Id).getOr(!1),c=e.layouts.map((function(e){return e.onLtr(t)})),s=e.layouts.map((function(e){return e.onRtl(t)})),l=a?e.layouts.bind((function(e){return e.onBottomLtr.map((function(e){return e(t)}))})).or(c).getOr(o):c.getOr(n),f=a?e.layouts.bind((function(e){return e.onBottomRtl.map((function(e){return e(t)}))})).or(s).getOr(i):s.getOr(r),d=Bd(l,f);return d(t)},Vd=function(t,e,n){var r=e.hotspot,o=Bf(n,r.element),i=Fd(t.element,e,Zl(),tf(),Jl(),Ql(),L.some(e.hotspot.element));return L.some(zd({anchorBox:o,bubble:e.bubble.getOr(Nd()),overrides:e.overrides,layouts:i,placer:L.none()}))},Ud=[Ai("hotspot"),Fi("bubble"),Ki("overrides",{}),Pd(),fl("placement",Vd)],jd=function(t,e,n){var r=Hf(n,e.x,e.y),o=Yr(r.left,r.top,e.width,e.height),i=Fd(t.element,e,Xl(),Yl(),Xl(),Yl(),L.none());return L.some(zd({anchorBox:o,bubble:e.bubble,overrides:e.overrides,layouts:i,placer:L.none()}))},Wd=[Ai("x"),Ai("y"),Ki("height",0),Ki("width",0),Ki("bubble",Nd()),Ki("overrides",{}),Pd(),fl("placement",jd)],qd=uu.generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),$d=function(t){return t.fold(x,(function(t,e,n){return t.translate(-e,-n)}))},Gd=function(t){return t.fold(x,x)},Kd=function(t){return Q(t,(function(t,e){return t.translate(e.left,e.top)}),lr(0,0))},Xd=function(t){var e=$(t,$d);return Kd(e)},Yd=function(t){var e=$(t,Gd);return Kd(e)},Jd=qd.screen,Qd=qd.absolute,Zd=function(t,e,n){var r=pn(n.root).dom,o=function(e){var n=mn(e),r=mn(t.element);return sn(n,r)};return L.from(r.frameElement).map(ee.fromDom).filter(o).map(mr)},tm=function(t,e,n){var r=mn(t.element),o=Hr(r),i=Zd(t,e,n).getOr(o);return Qd(i,o.left,o.top)},em=function(t,e,n,r){var o=Jd(lr(t,e));return L.some(Kr(o,n,r))},nm=function(t,e,n,r,o){return t.map((function(t){var i=[e,t.point],u=If(r,(function(){return Yd(i)}),(function(){return Yd(i)}),(function(){return Xd(i)})),a=Xr(u.left,u.top,t.width,t.height),c=n.showAbove?Jl():Zl(),s=n.showAbove?Ql():tf(),l=Fd(o,n,c,s,c,s,L.none());return zd({anchorBox:a,bubble:n.bubble.getOr(Nd()),overrides:n.overrides,layouts:l,placer:L.none()})}))},rm=function(t,e,n){var r=tm(t,n,e);return e.node.filter(Ln).bind((function(o){var i=o.dom.getBoundingClientRect(),u=em(i.left,i.top,i.width,i.height),a=e.node.getOr(t.element);return nm(u,r,e,n,a)}))},om=[Ai("node"),Ai("root"),Fi("bubble"),Pd(),Ki("overrides",{}),Ki("showAbove",!1),fl("placement",rm)],im="\ufeff",um=" ",am=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},cm={create:am},sm=uu.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),lm=function(t,e,n,r){return t.fold(e,n,r)},fm=function(t){return t.fold(x,x,x)},dm=sm.before,mm=sm.on,gm=sm.after,hm={before:dm,on:mm,after:gm,cata:lm,getStart:fm},pm=uu.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),vm=function(t){return pm.exact(t.start,t.soffset,t.finish,t.foffset)},bm=function(t){return t.match({domRange:function(t){return ee.fromDom(t.startContainer)},relative:function(t,e){return hm.getStart(t)},exact:function(t,e,n,r){return t}})},ym=pm.domRange,wm=pm.relative,xm=pm.exact,Cm=function(t){var e=bm(t);return pn(e)},Sm=cm.create,km={domRange:ym,relative:wm,exact:xm,exactFromRange:vm,getWin:Cm,range:Sm},Tm=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)}))},Om=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)}))},Em=function(t,e,n){var r=t.document.createRange();return Tm(r,e),Om(r,n),r},_m=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},Am=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},Dm=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(Am):L.none()},Mm=function(t){var e=t.getBoundingClientRect();return e.width>0||e.height>0?L.some(e).map(Am):L.none()},Rm=uu.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Nm=function(t,e,n){return e(ee.fromDom(n.startContainer),n.startOffset,ee.fromDom(n.endContainer),n.endOffset)},zm=function(t,e){return e.match({domRange:function(t){return{ltr:w(t),rtl:L.none}},relative:function(e,n){return{ltr:ge((function(){return Em(t,e,n)})),rtl:ge((function(){return L.some(Em(t,n,e))}))}},exact:function(e,n,r,o){return{ltr:ge((function(){return _m(t,e,n,r,o)})),rtl:ge((function(){return L.some(_m(t,r,o,e,n))}))}}})},Bm=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 Rm.rtl(ee.fromDom(t.endContainer),t.endOffset,ee.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return Nm(t,Rm.ltr,n)}))}return Nm(t,Rm.ltr,n)},Lm=function(t,e){var n=zm(t,e);return Bm(t,n)},Hm=function(t,e){var n=Lm(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}})};Rm.ltr,Rm.rtl;var Im,Pm=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}},Fm=Pm(fe,"text"),Vm=function(t){return Fm.get(t)},Um=function(t){return Fm.getOption(t)},jm=function(t){return"img"===ae(t)?1:Um(t).fold((function(){return xn(t).length}),(function(t){return t.length}))},Wm=function(t){return Um(t).filter((function(t){return 0!==t.trim().length||t.indexOf(um)>-1})).isSome()},qm=["img","br"],$m=function(t){var e=Wm(t);return e||U(qm,ae(t))},Gm=function(t){return Km(t,$m)},Km=function(t,e){var n=function(t){for(var r=xn(t),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return L.some(i);var u=n(i);if(u.isSome())return u}return L.none()};return n(t)},Xm=function(t,e){return an(e,t)},Ym=function(t,e,n,r){var o=mn(t),i=o.dom.createRange();return i.setStart(t.dom,e),i.setEnd(n.dom,r),i},Jm=function(t,e,n,r){var o=Ym(t,e,n,r),i=sn(t,n)&&e===r;return o.collapsed&&!i},Qm=function(t){return L.from(t.getSelection())},Zm=function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return L.some(cm.create(ee.fromDom(e.startContainer),e.startOffset,ee.fromDom(n.endContainer),n.endOffset))}return L.none()},tg=function(t){if(null===t.anchorNode||null===t.focusNode)return Zm(t);var e=ee.fromDom(t.anchorNode),n=ee.fromDom(t.focusNode);return Jm(e,t.anchorOffset,n,t.focusOffset)?L.some(cm.create(e,t.anchorOffset,n,t.focusOffset)):Zm(t)},eg=function(t){return Qm(t).filter((function(t){return t.rangeCount>0})).bind(tg)},ng=function(t,e){var n=Hm(t,e);return Dm(n)},rg=function(t,e){var n=Hm(t,e);return Mm(n)},og=function(t,e){return{element:t,offset:e}},ig=function(t,e){var n=xn(t);if(0===n.length)return og(t,e);if(e<n.length)return og(n[e],0);var r=n[n.length-1],o=fe(r)?Vm(r).length:xn(r).length;return og(r,o)},ug=function(t,e){return fe(t)?og(t,e):ig(t,e)},ag=function(t,e){var n=e.getSelection.getOrThunk((function(){return function(){return eg(t)}}));return n().map((function(t){var e=ug(t.start,t.soffset),n=ug(t.finish,t.foffset);return km.range(e.element,e.offset,n.element,n.offset)}))},cg=function(t,e,n){var r=pn(e.root).dom,o=tm(t,n,e),i=ag(r,e).bind((function(t){var e=rg(r,km.exactFromRange(t)).orThunk((function(){var e=ee.fromText(im);Er(t.start,e);var n=ng(r,km.exact(e,0,e,1));return Br(e),n}));return e.bind((function(t){return em(t.left,t.top,t.width,t.height)}))})),u=ag(r,e).bind((function(t){return le(t.start)?L.some(t.start):bn(t.start)})),a=u.getOr(t.element);return nm(i,o,e,n,a)},sg=[Fi("getSelection"),Ai("root"),Fi("bubble"),Pd(),Ki("overrides",{}),Ki("showAbove",!1),fl("placement",cg)],lg="link-layout",fg=function(t){return t.x+t.width},dg=function(t,e){return t.x-e.width},mg=function(t,e){return t.y-e.height+t.height},gg=function(t){return t.y},hg=function(t,e,n){return gl(fg(t),gg(t),n.southeast(),yl(),"southeast",Dl(t,{left:0,top:2}),lg)},pg=function(t,e,n){return gl(dg(t,e),gg(t),n.southwest(),wl(),"southwest",Dl(t,{right:1,top:2}),lg)},vg=function(t,e,n){return gl(fg(t),mg(t,e),n.northeast(),xl(),"northeast",Dl(t,{left:0,bottom:3}),lg)},bg=function(t,e,n){return gl(dg(t,e),mg(t,e),n.northwest(),Cl(),"northwest",Dl(t,{right:1,bottom:3}),lg)},yg=function(){return[hg,pg,vg,bg]},wg=function(){return[pg,hg,bg,vg]},xg=function(t,e,n){var r=Bf(n,e.item.element),o=Fd(t.element,e,yg(),wg(),yg(),wg(),L.none());return L.some(zd({anchorBox:r,bubble:Nd(),overrides:e.overrides,layouts:o,placer:L.none()}))},Cg=[Ai("item"),Pd(),Ki("overrides",{}),fl("placement",xg)],Sg=ki("type",{selection:sg,node:om,hotspot:Ud,submenu:Cg,makeshift:Wd}),kg=[Pi("classes",si),Qi("mode","all",["all","layout","placement"])],Tg=[Ki("useFixed",O),Fi("getBounds")],Og=[Di("anchor",Sg),$i("transition",kg)],Eg=function(){var t=document.documentElement;return Vf(0,0,t.clientWidth,t.clientHeight)},_g=function(t){var e=mr(t.element),n=t.element.dom.getBoundingClientRect();return Ff(e.left,e.top,n.width,n.height)},Ag=function(t,e,n,r,o,i,u){var a=jf(n.anchorBox,e);return Ad(a,o.element,n.bubble,n.layouts,i,r,n.overrides,u)},Dg=function(t,e,n,r,o){Mg(t,e,n,r,o,L.none())},Mg=function(t,e,n,r,o,i){var u=i.map(Jr);return Rg(t,e,n,r,o,u)},Rg=function(t,e,n,r,o,i){var u=Ci("placement.info",ti(Og),o),a=u.anchor,c=r.element,s=n.get(r.uid);_f((function(){Kn(c,"position","fixed");var o=Zn(c,"visibility");Kn(c,"visibility","hidden");var l=e.useFixed()?Eg():_g(t),f=a.placement,d=i.map(w).or(e.getBounds);f(t,a,l).each((function(e){var o=e.placer.getOr(Ag),i=o(t,l,e,d,r,s,u.transition);n.set(r.uid,i)})),o.fold((function(){nr(c,"visibility")}),(function(t){Kn(c,"visibility",t)})),Zn(c,"left").isNone()&&Zn(c,"top").isNone()&&Zn(c,"right").isNone()&&Zn(c,"bottom").isNone()&&At(Zn(c,"position"),"fixed")&&nr(c,"position")}),c)},Ng=function(t,e,n){return e.useFixed()?"fixed":"absolute"},zg=function(t,e,n,r){var o=r.element;G(["position","left","right","top","bottom"],(function(t){return nr(o,t)})),Gf(o),n.clear(r.uid)},Bg=Object.freeze({__proto__:null,position:Dg,positionWithin:Mg,positionWithinBounds:Rg,getMode:Ng,reset:zg}),Lg=function(){var t={},e=function(e,n){t[e]=n},n=function(e){return Ot(t,e)},r=function(e){d(e)?delete t[e]:t={}};return Tc({readState:function(){return t},clear:r,set:e,get:n})},Hg=Object.freeze({__proto__:null,init:Lg}),Ig=hf({fields:Tg,name:"positioning",active:xf,apis:Bg,state:Hg}),Pg=function(t){Ca(t,ma());var e=t.components();G(e,Pg)},Fg=function(t){var e=t.components();G(e,Fg),Ca(t,da())},Vg=function(t,e){Dr(t.element,e.element)},Ug=function(t){G(t.components(),(function(t){return Br(t.element)})),zr(t.element),t.syncComponents()},jg=function(t,e){var n=t.components();Ug(t);var r=ut(n,e);G(r,(function(e){Pg(e),t.getSystem().removeFromWorld(e)})),G(e,(function(e){e.getSystem().isConnected()?Vg(t,e):(t.getSystem().addToWorld(e),Vg(t,e),Ln(t.element)&&Fg(e)),t.syncComponents()}))},Wg=function(t,e){qg(t,e,Dr)},qg=function(t,e,n){t.getSystem().addToWorld(e),n(t.element,e.element),Ln(t.element)&&Fg(e),t.syncComponents()},$g=function(t){Pg(t),Br(t.element),t.getSystem().removeFromWorld(t)},Gg=function(t){var e=vn(t.element).bind((function(e){return t.getSystem().getByDom(e).toOptional()}));$g(t),e.each((function(t){t.syncComponents()}))},Kg=function(t){var e=t.components();G(e,$g),zr(t.element),t.syncComponents()},Xg=function(t,e){Jg(t,e,Dr)},Yg=function(t,e){Jg(t,e,_r)},Jg=function(t,e,n){n(t,e.element);var r=xn(e.element);G(r,(function(t){e.getByDom(t).each(Fg)}))},Qg=function(t){var e=xn(t.element);G(e,(function(e){t.getByDom(e).each(Pg)})),Br(t.element)},Zg=function(t,e,n,r){n.get().each((function(e){Kg(t)}));var o=e.getAttachPoint(t);Wg(o,t);var i=t.getSystem().build(r);return Wg(t,i),n.set(i),i},th=function(t,e,n,r){var o=Zg(t,e,n,r);return e.onOpen(t,o),o},eh=function(t,e,n,r){return n.get().map((function(){return Zg(t,e,n,r)}))},nh=function(t,e,n,r,o){sh(t,e),th(t,e,n,r),o(),fh(t,e)},rh=function(t,e,n){n.get().each((function(r){Kg(t),Gg(t),e.onClose(t,r),n.clear()}))},oh=function(t,e,n){return n.isOpen()},ih=function(t,e,n,r){return oh(t,e,n)&&n.get().exists((function(n){return e.isPartOf(t,n,r)}))},uh=function(t,e,n){return n.get()},ah=function(t,e,n,r){Zn(t.element,e).fold((function(){qn(t.element,n)}),(function(e){Fn(t.element,n,e)})),Kn(t.element,e,r)},ch=function(t,e,n){jn(t.element,n).fold((function(){return nr(t.element,e)}),(function(n){return Kn(t.element,e,n)}))},sh=function(t,e,n){var r=e.getAttachPoint(t);Kn(t.element,"position",Ig.getMode(r)),ah(t,"visibility",e.cloakVisibilityAttr,"hidden")},lh=function(t){return j(["top","left","right","bottom"],(function(e){return Zn(t,e).isSome()}))},fh=function(t,e,n){lh(t.element)||nr(t.element,"position"),ch(t,"visibility",e.cloakVisibilityAttr)},dh=Object.freeze({__proto__:null,cloak:sh,decloak:fh,open:th,openWhileCloaked:nh,close:rh,isOpen:oh,isPartOf:ih,getState:uh,setContent:eh}),mh=function(t,e){return _a([Ra(ia(),(function(n,r){rh(n,t,e)}))])},gh=Object.freeze({__proto__:null,events:mh}),hh=[al("onOpen"),al("onClose"),Ai("isPartOf"),Ai("getAttachPoint"),Ki("cloakVisibilityAttr","data-precloak-visibility")],ph=function(){var t=od(),e=w("not-implemented");return Tc({readState:e,isOpen:t.isSet,clear:t.clear,set:t.set,get:t.get})},vh=Object.freeze({__proto__:null,init:ph}),bh=hf({fields:hh,name:"sandboxing",active:gh,apis:dh,state:vh}),yh=w("dismiss.popups"),wh=w("reposition.popups"),xh=w("mouse.released"),Ch=Zo([Ki("isExtraPart",O),$i("fireEventInstead",[Ki("event",ga())])]),Sh=function(t){var e,n=Ci("Dismissal",Ch,t);return e={},e[yh()]={schema:Zo([Ai("target")]),onReceive:function(t,e){if(bh.isOpen(t)){var r=bh.isPartOf(t,e.target)||n.isExtraPart(t,e.target);r||n.fireEventInstead.fold((function(){return bh.close(t)}),(function(e){return Ca(t,e.event)}))}}},e},kh=Zo([$i("fireEventInstead",[Ki("event",ha())]),Bi("doReposition")]),Th=function(t){var e,n=Ci("Reposition",kh,t);return e={},e[wh()]={onReceive:function(t){bh.isOpen(t)&&n.fireEventInstead.fold((function(){return n.doReposition(t)}),(function(e){return Ca(t,e.event)}))}},e},Oh=function(t,e,n){e.store.manager.onLoad(t,e,n)},Eh=function(t,e,n){e.store.manager.onUnload(t,e,n)},_h=function(t,e,n,r){e.store.manager.setValue(t,e,n,r)},Ah=function(t,e,n){return e.store.manager.getValue(t,e,n)},Dh=function(t,e,n){return n},Mh=Object.freeze({__proto__:null,onLoad:Oh,onUnload:Eh,setValue:_h,getValue:Ah,getState:Dh}),Rh=function(t,e){var n=t.resetOnDom?[Ua((function(n,r){Oh(n,t,e)})),ja((function(n,r){Eh(n,t,e)}))]:[af(t,e,Oh)];return _a(n)},Nh=Object.freeze({__proto__:null,events:Rh}),zh=function(){var t=ou(null),e=function(){return{mode:"memory",value:t.get()}},n=function(){return null===t.get()},r=function(){t.set(null)};return Tc({set:t.set,get:t.get,isNotSet:n,clear:r,readState:e})},Bh=function(){var t=p;return Tc({readState:t})},Lh=function(){var t=ou({}),e=ou({}),n=function(){return{mode:"dataset",dataByValue:t.get(),dataByText:e.get()}},r=function(){t.set({}),e.set({})},o=function(n){return Ot(t.get(),n).orThunk((function(){return Ot(e.get(),n)}))},i=function(n){var r=t.get(),o=e.get(),i={},u={};G(n,(function(t){i[t.value]=t,Ot(t,"meta").each((function(e){Ot(e,"text").each((function(e){u[e]=t}))}))})),t.set(A(A({},r),i)),e.set(A(A({},o),u))};return Tc({readState:n,lookup:o,update:i,clear:r})},Hh=function(t){return t.store.manager.state(t)},Ih=Object.freeze({__proto__:null,memory:zh,dataset:Lh,manual:Bh,init:Hh}),Ph=function(t,e,n,r){var o=e.store;n.update([r]),o.setValue(t,r),e.onSetValue(t,r)},Fh=function(t,e,n){var r=e.store,o=r.getDataKey(t);return n.lookup(o).getOrThunk((function(){return r.getFallbackEntry(o)}))},Vh=function(t,e,n){var r=e.store;r.initialValue.each((function(r){Ph(t,e,n,r)}))},Uh=function(t,e,n){n.clear()},jh=[Fi("initialValue"),Ai("getFallbackEntry"),Ai("getDataKey"),Ai("setValue"),fl("manager",{setValue:Ph,getValue:Fh,onLoad:Vh,onUnload:Uh,state:Lh})],Wh=function(t,e,n){return e.store.getValue(t)},qh=function(t,e,n,r){e.store.setValue(t,r),e.onSetValue(t,r)},$h=function(t,e,n){e.store.initialValue.each((function(n){e.store.setValue(t,n)}))},Gh=[Ai("getValue"),Ki("setValue",p),Fi("initialValue"),fl("manager",{setValue:qh,getValue:Wh,onLoad:$h,onUnload:p,state:kc.init})],Kh=function(t,e,n,r){n.set(r),e.onSetValue(t,r)},Xh=function(t,e,n){return n.get()},Yh=function(t,e,n){e.store.initialValue.each((function(t){n.isNotSet()&&n.set(t)}))},Jh=function(t,e,n){n.clear()},Qh=[Fi("initialValue"),fl("manager",{setValue:Kh,getValue:Xh,onLoad:Yh,onUnload:Jh,state:zh})],Zh=[Xi("store",{mode:"memory"},ki("mode",{memory:Qh,manual:Gh,dataset:jh})),al("onSetValue"),Ki("resetOnDom",!1)],tp=hf({fields:Zh,name:"representing",active:Nh,apis:Mh,extra:{setValueFrom:function(t,e){var n=tp.getValue(e);tp.setValue(t,n)}},state:Ih}),ep=function(t,e){return ru(t,{},$(e,(function(e){return Li(e.name(),"Cannot configure "+e.name()+" for "+t)})).concat([Ei("dump",x)]))},np=function(t){return t.dump},rp=function(t,e){return A(A({},mf(e)),t.dump)},op={field:ep,augment:rp,get:np},ip="placeholder",up=uu.generate([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),ap=function(t){return Et(t,"uiType")},cp=function(t,e,n,r){return t.exists((function(t){return t!==n.owner}))?up.single(!0,w(n)):Ot(r,n.name).fold((function(){throw new Error("Unknown placeholder component: "+n.name+"\nKnown: ["+ht(r)+"]\nNamespace: "+t.getOr("none")+"\nSpec: "+JSON.stringify(n,null,2))}),(function(t){return t.replace()}))},sp=function(t,e,n,r){return ap(n)&&n.uiType===ip?cp(t,e,n,r):up.single(!1,w(n))},lp=function(t,e,n,r){var o=sp(t,e,n,r);return o.fold((function(o,i){var u=ap(n)?i(e,n.config,n.validated):i(e),a=Ot(u,"components").getOr([]),c=rt(a,(function(n){return lp(t,e,n,r)}));return[A(A({},u),{components:c})]}),(function(t,r){if(ap(n)){var o=r(e,n.config,n.validated),i=n.validated.preprocess.getOr(x);return i(o)}return r(e)}))},fp=function(t,e,n,r){return rt(n,(function(n){return lp(t,e,n,r)}))},dp=function(t,e){var n=!1,r=function(){return n},o=function(){if(n)throw new Error("Trying to use the same placeholder more than once: "+t);return n=!0,e},i=function(){return e.fold((function(t,e){return t}),(function(t,e){return t}))};return{name:w(t),required:i,used:r,replace:o}},mp=function(t,e,n,r){var o=bt(r,(function(t,e){return dp(e,t)})),i=fp(t,e,n,o);return vt(o,(function(n){if(!1===n.used()&&n.required())throw new Error("Placeholder: "+n.name()+" was not found in components list\nNamespace: "+t.getOr("none")+"\nComponents: "+JSON.stringify(e.components,null,2))})),i},gp=up.single,hp=up.multiple,pp=w(ip),vp=uu.generate([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),bp=Ki("factory",{sketch:x}),yp=Ki("schema",[]),wp=Ai("name"),xp=Oi("pname","pname",To((function(t){return"<alloy."+oc(t.name)+">"})),ui()),Cp=Ei("schema",(function(){return[Fi("preprocess")]})),Sp=Ki("defaults",w({})),kp=Ki("overrides",w({})),Tp=ti([bp,yp,wp,xp,Sp,kp]),Op=ti([bp,yp,wp,Sp,kp]),Ep=ti([bp,yp,wp,xp,Sp,kp]),_p=ti([bp,Cp,wp,Ai("unit"),xp,Sp,kp]),Ap=function(t){return t.fold(L.some,L.none,L.some,L.some)},Dp=function(t){var e=function(t){return t.name};return t.fold(e,e,e,e)},Mp=function(t){return t.fold(x,x,x,x)},Rp=function(t,e){return function(n){var r=Ci("Converting part type",e,n);return t(r)}},Np=Rp(vp.required,Tp),zp=Rp(vp.external,Op),Bp=Rp(vp.optional,Ep),Lp=Rp(vp.group,_p),Hp=w("entirety"),Ip=Object.freeze({__proto__:null,required:Np,external:zp,optional:Bp,group:Lp,asNamedPart:Ap,name:Dp,asCommon:Mp,original:Hp}),Pp=function(t,e,n,r){return Co(e.defaults(t,n,r),n,{uid:t.partUids[e.name]},e.overrides(t,n,r))},Fp=function(t,e,n){var r={},o={};return G(n,(function(t){t.fold((function(t){r[t.pname]=gp(!0,(function(e,n,r){return t.factory.sketch(Pp(e,t,n,r))}))}),(function(t){var n=e.parts[t.name];o[t.name]=w(t.factory.sketch(Pp(e,t,n[Hp()]),n))}),(function(t){r[t.pname]=gp(!1,(function(e,n,r){return t.factory.sketch(Pp(e,t,n,r))}))}),(function(t){r[t.pname]=hp(!0,(function(e,n,r){var o=e[t.name];return $(o,(function(n){return t.factory.sketch(Co(t.defaults(e,n,r),n,t.overrides(e,n)))}))}))}))})),{internals:w(r),externals:w(o)}},Vp=function(t,e){var n={};return G(e,(function(e){Ap(e).each((function(e){var r=Up(t,e.pname);n[e.name]=function(n){var o=Ci("Part: "+e.name+" in "+t,ti(e.schema),n);return A(A({},r),{config:n,validated:o})}}))})),n},Up=function(t,e){return{uiType:pp(),owner:t,name:e}},jp=function(t,e,n){return{uiType:pp(),owner:t,name:e,config:n,validated:{}}},Wp=function(t){return rt(t,(function(t){return t.fold(L.none,L.some,L.none,L.none).map((function(t){return Hi(t.name,t.schema.concat([dl(Hp())]))})).toArray()}))},qp=function(t){return $(t,Dp)},$p=function(t,e,n){return Fp(t,e,n)},Gp=function(t,e,n){return mp(L.some(t),e,e.components,n)},Kp=function(t,e,n){var r=e.partUids[n];return t.getSystem().getByUid(r).toOptional()},Xp=function(t,e,n){return Kp(t,e,n).getOrDie("Could not find part: "+n)},Yp=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},Jp=function(t,e){var n=t.getSystem();return bt(e.partUids,(function(t,e){return w(n.getByUid(t))}))},Qp=function(t){return ht(t.partUids)},Zp=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},tv=function(t,e){var n=qp(e);return gu($(n,(function(e){return{key:e,value:t+"-"+e}})))},ev=function(t){return Oi("partUids","partUids",_o((function(e){return tv(e.uid,t)})),ui())},nv=Object.freeze({__proto__:null,generate:Vp,generateOne:jp,schemas:Wp,names:qp,substitutes:$p,components:Gp,defaultUids:tv,defaultUidsSchema:ev,getAllParts:Jp,getAllPartNames:Qp,getPart:Kp,getPartOrDie:Xp,getParts:Yp,getPartsOrDie:Zp}),rv=function(t,e){var n=t.length>0?[Hi("parts",t)]:[];return n.concat([Ai("uid"),Ki("dom",{}),Ki("components",[]),dl("originalSpec"),Ki("debug.sketcher",{})]).concat(e)},ov=function(t,e,n,r,o){var i=rv(r,o);return Ci(t+" [SpecSchema]",Zo(i.concat(e)),n)},iv=function(t,e,n,r){var o=cv(r),i=ov(t,e,o,[],[]);return n(i,o)},uv=function(t,e,n,r,o){var i=cv(o),u=Wp(n),a=ev(n),c=ov(t,e,i,u,[a]),s=$p(t,c,n),l=Gp(t,c,s.internals());return r(c,l,i,s.externals())},av=function(t){return Et(t,"uid")},cv=function(t){return av(t)?t:A(A({},t),{uid:dc("uid")})},sv=function(t){return void 0!==t.uid},lv=Zo([Ai("name"),Ai("factory"),Ai("configFields"),Ki("apis",{}),Ki("extraApis",{})]),fv=Zo([Ai("name"),Ai("factory"),Ai("configFields"),Ai("partFields"),Ki("apis",{}),Ki("extraApis",{})]),dv=function(t){var e=Ci("Sketcher for "+t.name,lv,t),n=function(t){return iv(e.name,e.configFields,e.factory,t)},r=bt(e.apis,Sc),o=bt(e.extraApis,(function(t,e){return bc(t,e)}));return A(A({name:e.name,configFields:e.configFields,sketch:n},r),o)},mv=function(t){var e=Ci("Sketcher for "+t.name,fv,t),n=function(t){return uv(e.name,e.configFields,e.partFields,e.factory,t)},r=Vp(e.name,e.partFields),o=bt(e.apis,Sc),i=bt(e.extraApis,(function(t,e){return bc(t,e)}));return A(A({name:e.name,partFields:e.partFields,configFields:e.configFields,sketch:n,parts:r},o),i)},gv=function(t){return"input"===ae(t)&&"radio"!==Un(t,"type")||"textarea"===ae(t)},hv=function(t,e,n){return e.find(t)},pv=Object.freeze({__proto__:null,getCurrent:hv}),vv=[Ai("find")],bv=hf({fields:vv,name:"composing",apis:pv}),yv=["input","button","textarea","select"],wv=function(t,e,n){var r=e.disabled()?_v:Av;r(t,e)},xv=function(t,e){return!0===e.useNative&&U(yv,ae(t.element))},Cv=function(t){return Wn(t.element,"disabled")},Sv=function(t){Fn(t.element,"disabled","disabled")},kv=function(t){qn(t.element,"disabled")},Tv=function(t){return"true"===Un(t.element,"aria-disabled")},Ov=function(t){Fn(t.element,"aria-disabled","true")},Ev=function(t){Fn(t.element,"aria-disabled","false")},_v=function(t,e,n){e.disableClass.each((function(e){is(t.element,e)}));var r=xv(t,e)?Sv:Ov;r(t),e.onDisabled(t)},Av=function(t,e,n){e.disableClass.each((function(e){as(t.element,e)}));var r=xv(t,e)?kv:Ev;r(t),e.onEnabled(t)},Dv=function(t,e){return xv(t,e)?Cv(t):Tv(t)},Mv=function(t,e,n,r){var o=r?_v:Av;o(t,e)},Rv=Object.freeze({__proto__:null,enable:Av,disable:_v,isDisabled:Dv,onLoad:wv,set:Mv}),Nv=function(t,e){return Dc({classes:e.disabled()?e.disableClass.toArray():[]})},zv=function(t,e){return _a([Aa(ea(),(function(e,n){return Dv(e,t)})),af(t,e,wv)])},Bv=Object.freeze({__proto__:null,exhibit:Nv,events:zv}),Lv=[tu("disabled",O),Ki("useNative",!0),Fi("disableClass"),al("onDisabled"),al("onEnabled")],Hv=hf({fields:Lv,name:"disabling",active:Bv,apis:Rv}),Iv=function(t,e,n,r){var o=Xm(t.element,"."+e.highlightClass);G(o,(function(n){j(r,(function(t){return t.element===n}))||(as(n,e.highlightClass),t.getSystem().getByDom(n).each((function(n){e.onDehighlight(t,n),Ca(n,xa())})))}))},Pv=function(t,e,n){return Iv(t,e,n,[])},Fv=function(t,e,n,r){$v(t,e,n,r)&&(as(r.element,e.highlightClass),e.onDehighlight(t,r),Ca(r,xa()))},Vv=function(t,e,n,r){Iv(t,e,n,[r]),$v(t,e,n,r)||(is(r.element,e.highlightClass),e.onHighlight(t,r),Ca(r,wa()))},Uv=function(t,e,n){Xv(t,e).each((function(r){Vv(t,e,n,r)}))},jv=function(t,e,n){Yv(t,e).each((function(r){Vv(t,e,n,r)}))},Wv=function(t,e,n,r){Kv(t,e,n,r).fold((function(t){throw t}),(function(r){Vv(t,e,n,r)}))},qv=function(t,e,n,r){var o=tb(t,e),i=tt(o,r);i.each((function(r){Vv(t,e,n,r)}))},$v=function(t,e,n,r){return cs(r.element,e.highlightClass)},Gv=function(t,e,n){return Is(t.element,"."+e.highlightClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Kv=function(t,e,n,r){var o=Xm(t.element,"."+e.itemClass);return L.from(o[r]).fold((function(){return ro.error(new Error("No element found with index "+r))}),t.getSystem().getByDom)},Xv=function(t,e,n){return Is(t.element,"."+e.itemClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},Yv=function(t,e,n){var r=Xm(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()}))},Jv=function(t,e,n,r){var o=Xm(t.element,"."+e.itemClass),i=et(o,(function(t){return cs(t,e.highlightClass)}));return i.bind((function(e){var n=El(e,r,0,o.length-1);return t.getSystem().getByDom(o[n]).toOptional()}))},Qv=function(t,e,n){return Jv(t,e,n,-1)},Zv=function(t,e,n){return Jv(t,e,n,1)},tb=function(t,e,n){var r=Xm(t.element,"."+e.itemClass);return Mt($(r,(function(e){return t.getSystem().getByDom(e).toOptional()})))},eb=Object.freeze({__proto__:null,dehighlightAll:Pv,dehighlight:Fv,highlight:Vv,highlightFirst:Uv,highlightLast:jv,highlightAt:Wv,highlightBy:qv,isHighlighted:$v,getHighlighted:Gv,getFirst:Xv,getLast:Yv,getPrevious:Qv,getNext:Zv,getCandidates:tb}),nb=[Ai("highlightClass"),Ai("itemClass"),al("onHighlight"),al("onDehighlight")],rb=hf({fields:nb,name:"highlighting",apis:eb}),ob=[8],ib=[9],ub=[13],ab=[27],cb=[32],sb=[37],lb=[38],fb=[39],db=[40],mb=function(t,e,n){var r=it(t.slice(0,e)),o=it(t.slice(e+1));return tt(r.concat(o),n)},gb=function(t,e,n){var r=it(t.slice(0,e));return tt(r,n)},hb=function(t,e,n){var r=t.slice(0,e),o=t.slice(e+1);return tt(o.concat(r),n)},pb=function(t,e,n){var r=t.slice(e+1);return tt(r,n)},vb=function(t){return function(e){var n=e.raw;return U(t,n.which)}},bb=function(t){return function(e){return ot(t,(function(t){return t(e)}))}},yb=function(t){var e=t.raw;return!0===e.shiftKey},wb=function(t){var e=t.raw;return!0===e.ctrlKey},xb=k(yb),Cb=function(t,e){return{matches:t,classification:e}},Sb=function(t,e){var n=tt(t,(function(t){return t.matches(e)}));return n.map((function(t){return t.classification}))},kb=function(t,e,n){var r=e.exists((function(t){return n.exists((function(e){return sn(e,t)}))}));r||Sa(t,pa(),{prevFocus:e,newFocus:n})},Tb=function(){var t=function(t){return Ef(t.element)},e=function(e,n){var r=t(e);e.getSystem().triggerFocus(n,e.element);var o=t(e);kb(e,r,o)};return{get:t,set:e}},Ob=function(){var t=function(t){return rb.getHighlighted(t).map((function(t){return t.element}))},e=function(e,n){var r=t(e);e.getSystem().getByDom(n).fold(p,(function(t){rb.highlight(e,t)}));var o=t(e);kb(e,r,o)};return{get:t,set:e}};(function(t){t["OnFocusMode"]="onFocus",t["OnEnterOrSpaceMode"]="onEnterOrSpace",t["OnApiMode"]="onApi"})(Im||(Im={}));var Eb=function(t,e,n,r,o){var i=function(){return t.concat([Ki("focusManager",Tb()),Xi("focusInside","onFocus",vi((function(t){return U(["onFocus","onEnterOrSpace","onApi"],t)?ro.value(t):ro.error("Invalid value for focusInside")}))),fl("handler",c),fl("state",e),fl("sendFocusIn",o)])},u=function(t,e,n,r,o){var i=n(t,e,r,o);return Sb(i,e.event).bind((function(n){return n(t,e,r,o)}))},a=function(t,e){var i=t.focusInside!==Im.OnFocusMode?L.none():o(t).map((function(n){return Ra(Ju(),(function(r,o){n(r,t,e),o.stop()}))})),a=function(n,r){var i=vb(cb.concat(ub))(r.event);t.focusInside===Im.OnEnterOrSpaceMode&&i&&xu(n,r)&&o(t).each((function(o){o(n,t,e),r.stop()}))},c=[Ra(Fu(),(function(r,o){u(r,o,n,t,e).fold((function(){a(r,o)}),(function(t){o.stop()}))})),Ra(Vu(),(function(n,o){u(n,o,r,t,e).each((function(t){o.stop()}))}))];return _a(i.toArray().concat(c))},c={schema:i,processKey:u,toEvents:a};return c},_b=function(t){var e=[Fi("onEscape"),Fi("onEnter"),Ki("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Ki("firstTabstop",0),Ki("useTabstopAt",E),Fi("visibilitySelector")].concat([t]),n=function(t,e){var n=t.visibilitySelector.bind((function(t){return Ps(e,t)})).getOr(e);return ur(n)>0},r=function(t,e){var r=Xm(t.element,e.selector),o=Y(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 Ps(t,e.selector)}))},i=function(t,e){return n(t,e)&&t.useTabstopAt(e)},u=function(t,e,n){r(t,e).each((function(n){e.focusManager.set(t,n)}))},a=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)}))},c=function(t,e,n,r){var i=Xm(t.element,n.selector);return o(t,n).bind((function(e){var o=et(i,S(sn,e));return o.bind((function(e){return a(t,i,e,n,r)}))}))},s=function(t,e,n){var r=n.cyclic?mb:gb;return c(t,e,n,r)},l=function(t,e,n){var r=n.cyclic?hb:pb;return c(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)}))},m=w([Cb(bb([yb,vb(ib)]),s),Cb(vb(ib),l),Cb(vb(ab),d),Cb(bb([xb,vb(ub)]),f)]),g=w([]);return Eb(e,kc.init,m,g,(function(){return L.some(u)}))},Ab=_b(Ei("cyclic",O)),Db=_b(Ei("cyclic",E)),Mb=function(t,e,n){return Ta(t,n,ea()),L.some(!0)},Rb=function(t,e,n){var r=gv(n)&&vb(cb)(e.event);return r?L.none():Mb(t,e,n)},Nb=function(t,e){return L.some(!0)},zb=[Ki("execute",Rb),Ki("useSpace",!1),Ki("useEnter",!0),Ki("useControlEnter",!1),Ki("useDown",!1)],Bb=function(t,e,n){return n.execute(t,e,t.element)},Lb=function(t,e,n,r){var o=n.useSpace&&!gv(t.element)?cb:[],i=n.useEnter?ub:[],u=n.useDown?db:[],a=o.concat(i).concat(u);return[Cb(vb(a),Bb)].concat(n.useControlEnter?[Cb(bb([wb,vb(ub)]),Bb)]:[])},Hb=function(t,e,n,r){return n.useSpace&&!gv(t.element)?[Cb(vb(cb),Nb)]:[]},Ib=Eb(zb,kc.init,Lb,Hb,(function(){return L.none()})),Pb=function(){var t=od(),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 Tc({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})},Fb=function(t){return t.state(t)},Vb=Object.freeze({__proto__:null,flatgrid:Pb,init:Fb}),Ub=function(t){return function(e,n,r,o){var i=t(e.element);return $b(i,e,n,r,o)}},jb=function(t,e){var n=Bd(t,e);return Ub(n)},Wb=function(t,e){var n=Bd(e,t);return Ub(n)},qb=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}))},Gb=qb,Kb=qb,Xb=qb,Yb=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},Jb=function(t){return!Yb(t.dom)},Qb=function(t,e){return et(t,e).map((function(e){return{index:e,candidates:t}}))},Zb=function(t,e,n){var r=function(t){return sn(t,e)},o=Xm(t,n),i=Y(o,Jb);return Qb(i,r)},ty=function(t,e){return et(t,(function(t){return sn(e,t)}))},ey=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&&r<t.length?L.some(t[r]):L.none()}))},ny=function(t,e,n,r,o){return ey(t,e,r,(function(e,i){var u=e===n-1,a=u?t.length-e*r:r,c=El(i,o,0,a-1);return L.some({row:e,column:c})}))},ry=function(t,e,n,r,o){return ey(t,e,r,(function(e,i){var u=El(e,o,0,n-1),a=u===n-1,c=a?t.length-u*r:r,s=_l(i,0,c-1);return L.some({row:u,column:s})}))},oy=function(t,e,n,r){return ny(t,e,n,r,1)},iy=function(t,e,n,r){return ny(t,e,n,r,-1)},uy=function(t,e,n,r){return ry(t,e,n,r,-1)},ay=function(t,e,n,r){return ry(t,e,n,r,1)},cy=[Ai("selector"),Ki("execute",Rb),cl("onEscape"),Ki("captureTab",!1),ml()],sy=function(t,e,n){Is(t.element,e.selector).each((function(n){e.focusManager.set(t,n)}))},ly=function(t,e){return e.focusManager.get(t).bind((function(t){return Ps(t,e.selector)}))},fy=function(t,e,n,r){return ly(t,n).bind((function(r){return n.execute(t,e,r)}))},dy=function(t){return function(e,n,r,o){return Zb(e,n,r.selector).bind((function(e){return t(e.candidates,e.index,o.getNumRows().getOr(r.initSize.numRows),o.getNumColumns().getOr(r.initSize.numColumns))}))}},my=function(t,e,n){return n.captureTab?L.some(!0):L.none()},gy=function(t,e,n){return n.onEscape(t,e)},hy=dy(iy),py=dy(oy),vy=dy(uy),by=dy(ay),yy=w([Cb(vb(sb),jb(hy,py)),Cb(vb(fb),Wb(hy,py)),Cb(vb(lb),Gb(vy)),Cb(vb(db),Kb(by)),Cb(bb([yb,vb(ib)]),my),Cb(bb([xb,vb(ib)]),my),Cb(vb(ab),gy),Cb(vb(cb.concat(ub)),fy)]),wy=w([Cb(vb(cb),Nb)]),xy=Eb(cy,Pb,yy,wy,(function(){return L.some(sy)})),Cy=function(t,e,n,r){var o=function(t){return"button"===ae(t)&&"disabled"===Un(t,"disabled")},i=function(t,e,n){var u=El(e,r,0,n.length-1);return u===t?L.none():o(n[u])?i(t,u,n):L.from(n[u])};return Zb(t,n,e).bind((function(t){var e=t.index,n=t.candidates;return i(e,e,n)}))},Sy=[Ai("selector"),Ki("getInitial",L.none),Ki("execute",Rb),cl("onEscape"),Ki("executeOnMove",!1),Ki("allowVertical",!0)],ky=function(t,e){return e.focusManager.get(t).bind((function(t){return Ps(t,e.selector)}))},Ty=function(t,e,n){return ky(t,n).bind((function(r){return n.execute(t,e,r)}))},Oy=function(t,e,n){e.getInitial(t).orThunk((function(){return Is(t.element,e.selector)})).each((function(n){e.focusManager.set(t,n)}))},Ey=function(t,e,n){return Cy(t,n.selector,e,-1)},_y=function(t,e,n){return Cy(t,n.selector,e,1)},Ay=function(t){return function(e,n,r,o){return t(e,n,r,o).bind((function(){return r.executeOnMove?Ty(e,n,r):L.some(!0)}))}},Dy=function(t,e,n){return n.onEscape(t,e)},My=function(t,e,n,r){var o=sb.concat(n.allowVertical?lb:[]),i=fb.concat(n.allowVertical?db:[]);return[Cb(vb(o),Ay(jb(Ey,_y))),Cb(vb(i),Ay(Wb(Ey,_y))),Cb(vb(ub),Ty),Cb(vb(cb),Ty),Cb(vb(ab),Dy)]},Ry=w([Cb(vb(cb),Nb)]),Ny=Eb(Sy,kc.init,My,Ry,(function(){return L.some(Oy)})),zy=function(t,e,n){return L.from(t[e]).bind((function(t){return L.from(t[n]).map((function(t){return{rowIndex:e,columnIndex:n,cell:t}}))}))},By=function(t,e,n,r){var o=t[e],i=o.length,u=El(n,r,0,i-1);return zy(t,e,u)},Ly=function(t,e,n,r){var o=El(n,r,0,t.length-1),i=t[o].length,u=_l(e,0,i-1);return zy(t,o,u)},Hy=function(t,e,n,r){var o=t[e],i=o.length,u=_l(n+r,0,i-1);return zy(t,e,u)},Iy=function(t,e,n,r){var o=_l(n+r,0,t.length-1),i=t[o].length,u=_l(e,0,i-1);return zy(t,o,u)},Py=function(t,e,n){return By(t,e,n,1)},Fy=function(t,e,n){return By(t,e,n,-1)},Vy=function(t,e,n){return Ly(t,n,e,-1)},Uy=function(t,e,n){return Ly(t,n,e,1)},jy=function(t,e,n){return Hy(t,e,n,-1)},Wy=function(t,e,n){return Hy(t,e,n,1)},qy=function(t,e,n){return Iy(t,n,e,-1)},$y=function(t,e,n){return Iy(t,n,e,1)},Gy=[Hi("selectors",[Ai("row"),Ai("cell")]),Ki("cycles",!0),Ki("previousSelector",L.none),Ki("execute",Rb)],Ky=function(t,e,n){var r=e.previousSelector(t).orThunk((function(){var n=e.selectors;return Is(t.element,n.cell)}));r.each((function(n){e.focusManager.set(t,n)}))},Xy=function(t,e,n){return Ef(t.element).bind((function(r){return n.execute(t,e,r)}))},Yy=function(t,e){return $(t,(function(t){return Xm(t,e.selectors.cell)}))},Jy=function(t,e){return function(n,r,o){var i=o.cycles?t:e;return Ps(r,o.selectors.row).bind((function(t){var e=Xm(t,o.selectors.cell);return ty(e,r).bind((function(e){var r=Xm(n,o.selectors.row);return ty(r,t).bind((function(t){var n=Yy(r,o);return i(n,t,e).map((function(t){return t.cell}))}))}))}))}},Qy=Jy(Fy,jy),Zy=Jy(Py,Wy),tw=Jy(Vy,qy),ew=Jy(Uy,$y),nw=w([Cb(vb(sb),jb(Qy,Zy)),Cb(vb(fb),Wb(Qy,Zy)),Cb(vb(lb),Gb(tw)),Cb(vb(db),Kb(ew)),Cb(vb(cb.concat(ub)),Xy)]),rw=w([Cb(vb(cb),Nb)]),ow=Eb(Gy,kc.init,nw,rw,(function(){return L.some(Ky)})),iw=[Ai("selector"),Ki("execute",Rb),Ki("moveOnTab",!1)],uw=function(t,e,n){return n.focusManager.get(t).bind((function(r){return n.execute(t,e,r)}))},aw=function(t,e,n){Is(t.element,e.selector).each((function(n){e.focusManager.set(t,n)}))},cw=function(t,e,n){return Cy(t,n.selector,e,-1)},sw=function(t,e,n){return Cy(t,n.selector,e,1)},lw=function(t,e,n,r){return n.moveOnTab?Xb(cw)(t,e,n,r):L.none()},fw=function(t,e,n,r){return n.moveOnTab?Xb(sw)(t,e,n,r):L.none()},dw=w([Cb(vb(lb),Xb(cw)),Cb(vb(db),Xb(sw)),Cb(bb([yb,vb(ib)]),lw),Cb(bb([xb,vb(ib)]),fw),Cb(vb(ub),uw),Cb(vb(cb),uw)]),mw=w([Cb(vb(cb),Nb)]),gw=Eb(iw,kc.init,dw,mw,(function(){return L.some(aw)})),hw=[cl("onSpace"),cl("onEnter"),cl("onShiftEnter"),cl("onLeft"),cl("onRight"),cl("onTab"),cl("onShiftTab"),cl("onUp"),cl("onDown"),cl("onEscape"),Ki("stopSpaceKeyup",!1),Fi("focusIn")],pw=function(t,e,n){return[Cb(vb(cb),n.onSpace),Cb(bb([xb,vb(ub)]),n.onEnter),Cb(bb([yb,vb(ub)]),n.onShiftEnter),Cb(bb([yb,vb(ib)]),n.onShiftTab),Cb(bb([xb,vb(ib)]),n.onTab),Cb(vb(lb),n.onUp),Cb(vb(db),n.onDown),Cb(vb(sb),n.onLeft),Cb(vb(fb),n.onRight),Cb(vb(cb),n.onSpace),Cb(vb(ab),n.onEscape)]},vw=function(t,e,n){return n.stopSpaceKeyup?[Cb(vb(cb),Nb)]:[]},bw=Eb(hw,kc.init,pw,vw,(function(t){return t.focusIn})),yw=Ab.schema(),ww=Db.schema(),xw=Ny.schema(),Cw=xy.schema(),Sw=ow.schema(),kw=Ib.schema(),Tw=gw.schema(),Ow=bw.schema(),Ew=Object.freeze({__proto__:null,acyclic:yw,cyclic:ww,flow:xw,flatgrid:Cw,matrix:Sw,execution:kw,menu:Tw,special:Ow}),_w=function(t){return _t(t,"setGridSize")},Aw=vf({branchKey:"mode",branches:Ew,name:"keying",active:{events:function(t,e){var n=t.handler;return n.toEvents(t,e)}},apis:{focusIn:function(t,e,n){e.sendFocusIn(e).fold((function(){t.getSystem().triggerFocus(t.element,t.element)}),(function(r){r(t,e,n)}))},setGridSize:function(t,e,n,r,o){_w(n)?n.setGridSize(r,o):console.error("Layout does not support setGridSize")}},state:Vb}),Dw=function(t,e,n,r){_f((function(){var e=$(r,t.getSystem().build);jg(t,e)}),t.element)},Mw=function(t,e,n,r){var o=t.getSystem().build(r);qg(t,o,n)},Rw=function(t,e,n,r){Mw(t,e,Dr,r)},Nw=function(t,e,n,r){Mw(t,e,Ar,r)},zw=function(t,e,n,r){var o=Bw(t),i=tt(o,(function(t){return sn(r.element,t.element)}));i.each(Gg)},Bw=function(t,e){return t.components()},Lw=function(t,e,n,r,o){var i=Bw(t);return L.from(i[r]).map((function(i){return zw(t,e,n,i),o.each((function(n){Mw(t,e,(function(t,e){Mr(t,e,r)}),n)})),i}))},Hw=function(t,e,n,r,o){var i=Bw(t);return et(i,r).bind((function(r){return Lw(t,e,n,r,o)}))},Iw=Object.freeze({__proto__:null,append:Rw,prepend:Nw,remove:zw,replaceAt:Lw,replaceBy:Hw,set:Dw,contents:Bw}),Pw=hf({fields:[],name:"replacing",apis:Iw}),Fw=function(t,e){var n=_a(e);return hf({fields:[Ai("enabled")],name:t,active:{events:w(n)}})},Vw=function(t,e){var n=Fw(t,e);return{key:t,value:{config:{},me:n,configAsRaw:w({}),initialConfig:{},state:kc}}},Uw=function(t,e){e.ignore||(Sf(t.element),e.onFocus(t))},jw=function(t,e){e.ignore||kf(t.element)},Ww=function(t){return Tf(t.element)},qw=Object.freeze({__proto__:null,focus:Uw,blur:jw,isFocused:Ww}),$w=function(t,e){var n=e.ignore?{}:{attributes:{tabindex:"-1"}};return Dc(n)},Gw=function(t){return _a([Ra(Ju(),(function(e,n){Uw(e,t),n.stop()}))].concat(t.stopMousedown?[Ra(Nu(),(function(t,e){e.event.prevent()}))]:[]))},Kw=Object.freeze({__proto__:null,exhibit:$w,events:Gw}),Xw=[al("onFocus"),Ki("stopMousedown",!1),Ki("ignore",!1)],Yw=hf({fields:Xw,name:"focusing",active:Kw,apis:qw}),Jw=function(t){var e=function(){var e=ou(t),n=function(){return e.get()},r=function(t){return e.set(t)},o=function(){return e.set(t)},i=function(){return e.get()};return{get:n,set:r,clear:o,readState:i}};return{init:e}},Qw=function(t,e,n){var r=e.aria;r.update(t,r,n.get())},Zw=function(t,e,n){e.toggleClass.each((function(e){n.get()?is(t.element,e):as(t.element,e)}))},tx=function(t,e,n){rx(t,e,n,!n.get())},ex=function(t,e,n){n.set(!0),Zw(t,e,n),Qw(t,e,n)},nx=function(t,e,n){n.set(!1),Zw(t,e,n),Qw(t,e,n)},rx=function(t,e,n,r){var o=r?ex:nx;o(t,e,n)},ox=function(t,e,n){return n.get()},ix=function(t,e,n){rx(t,e,n,e.selected)},ux=Object.freeze({__proto__:null,onLoad:ix,toggle:tx,isOn:ox,on:ex,off:nx,set:rx}),ax=function(){return Dc({})},cx=function(t,e){var n=uf(t,e,tx),r=af(t,e,ix);return _a(nt([t.toggleOnExecute?[n]:[],[r]]))},sx=Object.freeze({__proto__:null,exhibit:ax,events:cx}),lx=function(t,e,n){Fn(t.element,"aria-pressed",n),e.syncWithExpanded&&mx(t,e,n)},fx=function(t,e,n){Fn(t.element,"aria-selected",n)},dx=function(t,e,n){Fn(t.element,"aria-checked",n)},mx=function(t,e,n){Fn(t.element,"aria-expanded",n)},gx=[Ki("selected",!1),Fi("toggleClass"),Ki("toggleOnExecute",!0),Xi("aria",{mode:"none"},ki("mode",{pressed:[Ki("syncWithExpanded",!1),fl("update",lx)],checked:[fl("update",dx)],expanded:[fl("update",mx)],selected:[fl("update",fx)],none:[fl("update",p)]}))],hx=hf({fields:gx,name:"toggling",active:sx,apis:ux,state:Jw(!1)}),px=function(){var t=function(t,e){e.stop(),ka(t)};return[Ra(Wu(),t),Ra(ra(),t),Pa(Au()),Pa(Nu())]},vx=function(t){var e=function(t){return qa((function(e,n){t(e),n.stop()}))};return _a(nt([t.map(e).toArray(),px()]))},bx="alloy.item-hover",yx="alloy.item-focus",wx=function(t){(Ef(t.element).isNone()||Yw.isFocused(t))&&(Yw.isFocused(t)||Yw.focus(t),Sa(t,bx,{item:t}))},xx=function(t){Sa(t,yx,{item:t})},Cx=w(bx),Sx=w(yx),kx=function(t){return{dom:t.dom,domModification:A(A({},t.domModification),{attributes:A(A(A({role:t.toggling.isSome()?"menuitemcheckbox":"menuitem"},t.domModification.attributes),{"aria-haspopup":t.hasSubmenu}),t.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:op.augment(t.itemBehaviours,[t.toggling.fold(hx.revoke,(function(t){return hx.config(A({aria:{mode:"checked"}},t))})),Yw.config({ignore:t.ignoreFocus,stopMousedown:t.ignoreFocus,onFocus:function(t){xx(t)}}),Aw.config({mode:"execution"}),tp.config({store:{mode:"memory",initialValue:t.data}}),Vw("item-type-events",M(M([],px(),!0),[Ra(Hu(),wx),Ra(na(),Yw.focus)],!1))]),components:t.components,eventOrder:t.eventOrder}},Tx=[Ai("data"),Ai("components"),Ai("dom"),Ki("hasSubmenu",!1),Fi("toggling"),op.field("itemBehaviours",[hx,Yw,Aw,tp]),Ki("ignoreFocus",!1),Ki("domModification",{}),fl("builder",kx),Ki("eventOrder",{})],Ox=function(t){return{dom:t.dom,components:t.components,events:_a([Fa(na())])}},Ex=[Ai("dom"),Ai("components"),fl("builder",Ox)],_x=w("item-widget"),Ax=w([Np({name:"widget",overrides:function(t){return{behaviours:mf([tp.config({store:{mode:"manual",getValue:function(e){return t.data},setValue:p}})])}}})]),Dx=function(t){var e=$p(_x(),t,Ax()),n=Gp(_x(),t,e.internals()),r=function(e){return Kp(e,t,"widget").map((function(t){return Aw.focusIn(t),t}))},o=function(e,n){return gv(n.event.target)?L.none():function(){return t.autofocus?(n.setSource(e.element),L.none()):L.none()}()};return{dom:t.dom,components:n,domModification:t.domModification,events:_a([qa((function(t,e){r(t).each((function(t){e.stop()}))})),Ra(Hu(),wx),Ra(na(),(function(e,n){t.autofocus?r(e):Yw.focus(e)}))]),behaviours:op.augment(t.widgetBehaviours,[tp.config({store:{mode:"memory",initialValue:t.data}}),Yw.config({ignore:t.ignoreFocus,onFocus:function(t){xx(t)}}),Aw.config({mode:"special",focusIn:t.autofocus?function(t){r(t)}:bf(),onLeft:o,onRight:o,onEscape:function(e,n){return Yw.isFocused(e)||t.autofocus?t.autofocus?(n.setSource(e.element),L.none()):L.none():(Yw.focus(e),L.some(!0))}})])}},Mx=[Ai("uid"),Ai("data"),Ai("components"),Ai("dom"),Ki("autofocus",!1),Ki("ignoreFocus",!1),op.field("widgetBehaviours",[tp,Yw,Aw]),Ki("domModification",{}),ev(Ax()),fl("builder",Dx)],Rx=ki("type",{widget:Mx,item:Tx,separator:Ex}),Nx=function(t,e){return{mode:"flatgrid",selector:"."+t.markers.item,initSize:{numColumns:e.initSize.numColumns,numRows:e.initSize.numRows},focusManager:t.focusManager}},zx=function(t,e){return{mode:"matrix",selectors:{row:e.rowSelector,cell:"."+t.markers.item},focusManager:t.focusManager}},Bx=function(t,e){return{mode:"menu",selector:"."+t.markers.item,moveOnTab:e.moveOnTab,focusManager:t.focusManager}},Lx=w([Lp({factory:{sketch:function(t){var e=Ci("menu.spec item",Rx,t);return e.builder(e)}},name:"items",unit:"item",defaults:function(t,e){return Et(e,"uid")?e:A(A({},e),{uid:dc("item")})},overrides:function(t,e){return{type:e.type,ignoreFocus:t.fakeFocus,domModification:{classes:[t.markers.item]}}}})]),Hx=w([Ai("value"),Ai("items"),Ai("dom"),Ai("components"),Ki("eventOrder",{}),ep("menuBehaviours",[rb,tp,bv,Aw]),Xi("movement",{mode:"menu",moveOnTab:!0},ki("mode",{grid:[ml(),fl("config",Nx)],matrix:[fl("config",zx),Ai("rowSelector")],menu:[Ki("moveOnTab",!0),fl("config",Bx)]})),rl(),Ki("fakeFocus",!1),Ki("focusManager",Tb()),al("onHighlight")]),Ix=w("alloy.menu-focus"),Px=function(t,e,n,r){return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:rp(t.menuBehaviours,[rb.config({highlightClass:t.markers.selectedItem,itemClass:t.markers.item,onHighlight:t.onHighlight}),tp.config({store:{mode:"memory",initialValue:t.value}}),bv.config({find:L.some}),Aw.config(t.movement.config(t,t.movement))]),events:_a([Ra(Sx(),(function(t,e){var n=e.event;t.getSystem().getByDom(n.target).each((function(n){rb.highlight(t,n),e.stop(),Sa(t,Ix(),{menu:t,item:n})}))})),Ra(Cx(),(function(t,e){var n=e.event.item;rb.highlight(t,n)}))]),components:e,eventOrder:t.eventOrder,domModification:{attributes:{role:"menu"}}}},Fx=mv({name:"Menu",configFields:Hx(),partFields:Lx(),factory:Px}),Vx=function(t){return yt(t,(function(t,e){return{k:t,v:e}}))},Ux=function(t,e,n,r){return Ot(n,r).bind((function(r){return Ot(t,r).bind((function(r){var o=Ux(t,e,n,r);return L.some([r].concat(o))}))})).getOr([])},jx=function(t,e){var n={};vt(t,(function(t,e){G(t,(function(t){n[t]=e}))}));var r=e,o=Vx(e),i=bt(o,(function(t,e){return[e].concat(Ux(n,r,o,e))}));return bt(n,(function(t){return Ot(i,t).getOr([t])}))},Wx=function(){var t=ou({}),e=ou({}),n=ou({}),r=od(),o=ou({}),i=function(){t.set({}),e.set({}),n.set({}),r.clear()},u=function(){return r.get().isNone()},a=function(t,n){var r;e.set(A(A({},e.get()),(r={},r[t]={type:"prepared",menu:n},r)))},c=function(i,u,a,c){r.set(i),t.set(a),e.set(u),o.set(c);var s=jx(c,a);n.set(s)},s=function(e){return kt(t.get(),(function(t,n){return t===e}))},l=function(t,e,n){return h(t).bind((function(r){return s(t).bind((function(t){return e(t).map((function(t){return{triggeredMenu:r,triggeringItem:t,triggeringPath:n}}))}))}))},f=function(t,e){var o=Y(v(t).toArray(),(function(t){return h(t).isSome()}));return Ot(n.get(),t).bind((function(t){var n=it(o.concat(t)),i=rt(n,(function(t,o){return l(t,e,n.slice(0,o+1)).fold((function(){return At(r.get(),t)?[]:[L.none()]}),(function(t){return[L.some(t)]}))}));return Rt(i)}))},d=function(e){return Ot(t.get(),e).map((function(t){var r=Ot(n.get(),e).getOr([]);return[t].concat(r)}))},m=function(t){return Ot(n.get(),t).bind((function(t){return t.length>1?L.some(t.slice(1)):L.none()}))},g=function(t){return Ot(n.get(),t)},h=function(t){return p(t).bind(qx)},p=function(t){return Ot(e.get(),t)},v=function(e){return Ot(t.get(),e)},b=function(t){var e=o.get();return ut(ht(e),t)},y=function(){return r.get().bind(h)},w=function(){return e.get()};return{setMenuBuilt:a,setContents:c,expand:d,refresh:g,collapse:m,lookupMenu:p,lookupItem:v,otherMenus:b,getPrimary:y,getMenus:w,clear:i,isClear:u,getTriggeringPath:f}},qx=function(t){return"prepared"===t.type?L.some(t.menu):L.none()},$x={init:Wx,extractPreparedMenu:qx},Gx=function(t,e){var n,r=od(),o=function(e,n,r){return bt(r,(function(r,o){var i=function(){return Fx.sketch(A(A({},r),{value:o,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:t.onHighlight,focusManager:t.fakeFocus?Ob():Tb()}))};return o===n?{type:"prepared",menu:e.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}}))},i=$x.init(),u=function(e){var n=o(e,t.data.primary,t.data.menus),r=s();return i.setContents(t.data.primary,n,t.data.expansions,r),i.getPrimary()},a=function(t){return tp.getValue(t).value},c=function(t,e,n){return gt(e,(function(t){if(!t.getSystem().isConnected())return L.none();var e=rb.getCandidates(t);return tt(e,(function(t){return a(t)===n}))}))},s=function(e){return bt(t.data.menus,(function(t,e){return rt(t.items,(function(t){return"separator"===t.type?[]:[t.data.value]}))}))},l=function(t,e){rb.highlight(t,e),rb.getHighlighted(e).orThunk((function(){return rb.getFirst(e)})).each((function(e){Ta(t,e.element,na())}))},f=function(t,e){return Mt($(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){ls(n.element,[t.markers.backgroundMenu]),t.stayInDom||Pw.remove(e,n)}))},m=function(e){return r.get().getOrThunk((function(){var n={},o=Xm(e.element,"."+t.markers.item),i=Y(o,(function(t){return"true"===Un(t,"aria-haspopup")}));return G(i,(function(t){e.getSystem().getByDom(t).each((function(t){var e=a(t);n[e]=t}))})),r.set(n),n}))},g=function(t,e){var n=m(t);vt(n,(function(t,n){var r=U(e,n);Fn(t.element,"aria-expanded",r)}))},h=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,u=f(n,r.slice(1));return G(u,(function(e){is(e.element,t.markers.backgroundMenu)})),Ln(i.element)||Pw.append(e,_s(i)),ls(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(Hv)&&Hv.isDisabled(r))return L.some(r);var u=a(r);return i.expand(u).bind((function(u){return g(e,u),L.from(u[0]).bind((function(a){return i.lookupMenu(a).bind((function(c){var s=v(e,a,c);return Ln(s.element)||Pw.append(e,_s(s)),t.onOpenSubmenu(e,r,s,it(u)),o===n.HighlightSubmenu?(rb.highlightFirst(s),h(e,i,u)):(rb.dehighlightAll(s),L.some(r))}))}))}))},y=function(e,n){var r=a(n);return i.collapse(r).bind((function(r){return g(e,r),h(e,i,r).map((function(r){return t.onCollapseMenu(e,n,r),r}))}))},w=function(t,e){var n=a(e);return i.refresh(n).bind((function(e){return g(t,e),h(t,i,e)}))},x=function(t,e){return gv(e.element)?L.none():b(t,e,n.HighlightSubmenu)},C=function(t,e){return gv(e.element)?L.none():y(t,e)},S=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 Ps(r.getSource(),"."+t.markers.item).bind((function(t){return n.getSystem().getByDom(t).toOptional().bind((function(t){return e(n,t).map(E)}))}))}},T=_a([Ra(Ix(),(function(t,e){var n=e.event.item;i.lookupItem(a(n)).each((function(){var n=e.event.menu;rb.highlight(t,n);var r=a(e.event.item);i.refresh(r).each((function(e){return d(t,i,e)}))}))})),qa((function(e,r){var o=r.event.target;e.getSystem().getByDom(o).each((function(r){var o=a(r);0===o.indexOf("collapse-item")&&y(e,r),b(e,r,n.HighlightSubmenu).fold((function(){t.onExecute(e,r)}),p)}))})),Ua((function(e,n){u(e).each((function(n){Pw.append(e,_s(n)),t.onOpenMenu(e,n),t.highlightImmediately&&l(e,n)}))}))].concat(t.navigateOnHover?[Ra(Cx(),(function(e,r){var o=r.event.item;w(e,o),b(e,o,n.HighlightParent),t.onHover(e,o)}))]:[])),O=function(t){return rb.getHighlighted(t).bind(rb.getHighlighted)},_=function(t){O(t).each((function(e){y(t,e)}))},D=function(t){i.getPrimary().each((function(e){l(t,e)}))},M=function(t){return L.from(t.components()[0]).filter((function(t){return"menu"===Un(t.element,"role")}))},R=function(e){var n=i.getPrimary().bind((function(t){return O(e).bind((function(t){var n=a(t),r=Tt(i.getMenus()),o=Mt($(r,$x.extractPreparedMenu));return i.getTriggeringPath(n,(function(t){return c(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)}))},N={collapseMenu:_,highlightPrimary:D,repositionMenus:R};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:rp(t.tmenuBehaviours,[Aw.config({mode:"special",onRight:k(x),onLeft:k(C),onEscape:k(S),focusIn:function(t,e){i.getPrimary().each((function(e){Ta(t,e.element,na())}))}}),rb.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),bv.config({find:function(t){return rb.getHighlighted(t)}}),Pw.config({})]),eventOrder:t.eventOrder,apis:N,events:T}},Kx=w("collapse-item"),Xx=function(t,e,n){return{primary:t,menus:e,expansions:n}},Yx=function(t,e){return{primary:t,menus:mu(t,e),expansions:{}}},Jx=function(t){return{value:oc(Kx()),meta:{text:t}}},Qx=dv({name:"TieredMenu",configFields:[ll("onExecute"),ll("onEscape"),sl("onOpenMenu"),sl("onOpenSubmenu"),al("onRepositionMenu"),al("onCollapseMenu"),Ki("highlightImmediately",!0),Hi("data",[Ai("primary"),Ai("menus"),Ai("expansions")]),Ki("fakeFocus",!1),al("onHighlight"),al("onHover"),ol(),Ai("dom"),Ki("navigateOnHover",!0),Ki("stayInDom",!1),ep("tmenuBehaviours",[Aw,rb,bv,Pw]),Ki("eventOrder",{})],apis:{collapseMenu:function(t,e){t.collapseMenu(e)},highlightPrimary:function(t,e){t.highlightPrimary(e)},repositionMenus:function(t,e){t.repositionMenus(e)}},factory:Gx,extraApis:{tieredData:Xx,singleData:Yx,collapseItem:Jx}}),Zx=function(t,e,n,r,o){var i=function(){return t.lazySink(e)},u="horizontal"===r.type?{layouts:{onLtr:function(){return Zl()},onRtl:function(){return tf()}}}:{},a=function(t){return 2===t.length},c=function(t){return a(t)?u:{}};return Qx.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return bh.close(e),t.onEscape.map((function(t){return t(e)})),L.some(!0)},onExecute:function(){return L.some(!0)},onOpenMenu:function(t,e){Ig.positionWithinBounds(i().getOrDie(),e,n,o())},onOpenSubmenu:function(t,e,n,r){var o=i().getOrDie();Ig.position(o,n,{anchor:A({type:"submenu",item:e},c(r))})},onRepositionMenu:function(t,e,r){var u=i().getOrDie();Ig.positionWithinBounds(u,e,n,o()),G(r,(function(t){var e=c(t.triggeringPath);Ig.position(u,t.triggeredMenu,{anchor:A({type:"submenu",item:t.triggeringItem},e)})}))}})},tC=function(t,e){var n=function(e,n){var r=t.getRelated(e);return r.exists((function(t){return js(t,n)}))},r=function(t,e){bh.setContent(t,e)},o=function(t,e,n){i(t,e,n,L.none())},i=function(t,e,n,r){u(t,e,n,(function(){return r.map((function(t){return Jr(t)}))}))},u=function(e,n,r,o){var i=t.lazySink(e).getOrDie();bh.openWhileCloaked(e,n,(function(){return Ig.positionWithinBounds(i,e,r,o())})),tp.setValue(e,L.some({mode:"position",config:r,getBounds:o}))},a=function(t,e,n){c(t,e,n,L.none)},c=function(e,n,r,o){var i=Zx(t,e,n,r,o);bh.open(e,i),tp.setValue(e,L.some({mode:"menu",menu:i}))},s=function(t){bh.isOpen(t)&&(tp.setValue(t,L.none()),bh.close(t))},l=function(t){return bh.getState(t)},f=function(e){bh.isOpen(e)&&tp.getValue(e).each((function(n){switch(n.mode){case"menu":bh.getState(e).each(Qx.repositionMenus);break;case"position":var r=t.lazySink(e).getOrDie();Ig.positionWithinBounds(r,e,n.config,n.getBounds());break}}))},d={setContent:r,showAt:o,showWithin:i,showWithinBounds:u,showMenuAt:a,showMenuWithinBounds:c,hide:s,getContent:l,reposition:f,isOpen:bh.isOpen};return{uid:t.uid,dom:t.dom,behaviours:rp(t.inlineBehaviours,[bh.config({isPartOf:function(t,e,r){return js(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)}}),tp.config({store:{mode:"memory",initialValue:L.none()}}),yf.config({channels:A(A({},Sh(A({isExtraPart:e.isExtraPart},t.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),Th(A(A({},t.fireRepositionEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})),{doReposition:f})))})]),eventOrder:t.eventOrder,apis:d}},eC=dv({name:"InlineView",configFields:[Ai("lazySink"),al("onShow"),al("onHide"),Wi("onEscape"),ep("inlineBehaviours",[bh,tp,yf]),$i("fireDismissalEventInstead",[Ki("event",ga())]),$i("fireRepositionEventInstead",[Ki("event",ha())]),Ki("getRelated",L.none),Ki("isExtraPart",O),Ki("eventOrder",L.none)],factory:tC,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)}}}),nC="layout-inset",rC=function(t){return t.x},oC=function(t,e){return t.x+t.width/2-e.width/2},iC=function(t,e){return t.x+t.width-e.width},uC=function(t){return t.y},aC=function(t,e){return t.y+t.height-e.height},cC=function(t,e){return t.y+t.height/2-e.height/2},sC=function(t,e,n){return gl(iC(t,e),aC(t,e),n.insetSouthwest(),Cl(),"southwest",Dl(t,{right:0,bottom:3}),nC)},lC=function(t,e,n){return gl(rC(t),aC(t,e),n.insetSoutheast(),xl(),"southeast",Dl(t,{left:1,bottom:3}),nC)},fC=function(t,e,n){return gl(iC(t,e),uC(t),n.insetNorthwest(),wl(),"northwest",Dl(t,{right:0,top:2}),nC)},dC=function(t,e,n){return gl(rC(t),uC(t),n.insetNortheast(),yl(),"northeast",Dl(t,{left:1,top:2}),nC)},mC=function(t,e,n){return gl(oC(t,e),uC(t),n.insetNorth(),Sl(),"north",Dl(t,{top:2}),nC)},gC=function(t,e,n){return gl(oC(t,e),aC(t,e),n.insetSouth(),kl(),"south",Dl(t,{bottom:3}),nC)},hC=function(t,e,n){return gl(iC(t,e),cC(t,e),n.insetEast(),Ol(),"east",Dl(t,{right:0}),nC)},pC=function(t,e,n){return gl(rC(t),cC(t,e),n.insetWest(),Tl(),"west",Dl(t,{left:1}),nC)},vC=function(t){switch(t){case"north":return mC;case"northeast":return dC;case"northwest":return fC;case"south":return gC;case"southeast":return lC;case"southwest":return sC;case"east":return hC;case"west":return pC}},bC=function(t,e,n,r,o){var i=$f(r).map(vC).getOr(mC);return i(t,e,n,r,o)},yC=function(t){switch(t){case"north":return gC;case"northeast":return lC;case"northwest":return sC;case"south":return mC;case"southeast":return dC;case"southwest":return fC;case"east":return pC;case"west":return hC}},wC=function(t,e,n,r,o){var i=$f(r).map(yC).getOr(mC);return i(t,e,n,r,o)},xC=tinymce.util.Tools.resolve("tinymce.util.Delay"),CC=function(t){var e=vx(t.action),n=t.dom.tag,r=function(e){return Ot(t.dom,"attributes").bind((function(t){return Ot(t,e)}))},o=function(){if("button"===n){var t=r("type").getOr("button"),e=r("role").map((function(t){return{role:t}})).getOr({});return A({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:op.augment(t.buttonBehaviours,[Yw.config({}),Aw.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:o()},eventOrder:t.eventOrder}},SC=dv({name:"Button",factory:CC,configFields:[Ki("uid",void 0),Ai("dom"),Ki("components",[]),op.field("buttonBehaviours",[Yw,Aw]),Fi("action"),Fi("role"),Ki("eventOrder",{})]}),kC=function(t){var e=sv(t)&&_t(t,"uid")?t.uid:dc("memento"),n=function(t){return t.getSystem().getByUid(e).getOrDie()},r=function(t){return t.getSystem().getByUid(e).toOptional()},o=function(){return A(A({},t),{uid:e})};return{get:n,getOpt:r,asSpec:o}},TC=tinymce.util.Tools.resolve("tinymce.util.I18n"),OC={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},EC="temporary-placeholder",_C=function(t){return function(){return Ot(t,EC).getOr("!not found!")}},AC=function(t,e){var n=t.toLowerCase();if(TC.isRtl()){var r=Vt(n,"-rtl");return Et(e,r)?r:n}return n},DC=function(t,e){return Ot(e,AC(t,e))},MC=function(t,e){var n=e();return DC(t,n).getOrThunk(_C(n))},RC=function(t,e,n){var r=e();return DC(t,r).or(n).getOrThunk(_C(r))},NC=function(t){return!!TC.isRtl()&&Et(OC,t)},zC=function(){return Vw("add-focusable",[Ua((function(t){Hs(t.element,"svg").each((function(t){return Fn(t,"focusable","false")}))}))])},BC=function(t,e,n,r){var o,i,u=NC(e)?["tox-icon--flip"]:[],a=Ot(n,AC(e,n)).or(r).getOrThunk(_C(n));return{dom:{tag:t.tag,attributes:null!==(o=t.attributes)&&void 0!==o?o:{},classes:t.classes.concat(u),innerHtml:a},behaviours:mf(M(M([],null!==(i=t.behaviours)&&void 0!==i?i:[],!0),[zC()],!1))}},LC=function(t,e,n,r){return void 0===r&&(r=L.none()),BC(e,t,n(),r)},HC=function(t,e,n){var r=n(),o=tt(t,(function(t){return Et(r,AC(t,r))}));return BC(e,o.getOr(EC),r,L.none())},IC={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},PC=function(t){var e=kC({dom:{tag:"p",innerHtml:t.translationProvider(t.text)},behaviours:mf([Pw.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=kC({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:mf([Pw.config({})])}),i=function(t,e){t.getSystem().isConnected()&&o.getOpt(t).each((function(t){Pw.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(e)]},r(e)])}))},u=function(t,n){if(t.getSystem().isConnected()){var r=e.get(t);Pw.set(r,[Ss(n)])}},a={updateProgress:i,updateText:u},c=nt([t.icon.toArray(),t.level.toArray(),t.level.bind((function(t){return L.from(IC[t])})).toArray()]),s=kC(SC.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[LC("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":t.translationProvider("Close")}},t.iconProvider)],action:function(e){t.onAction(e)}})),l=HC(c,{tag:"div",classes:["tox-notification__icon"]},t.iconProvider),f={dom:{tag:"div",classes:["tox-notification__body"]},components:[e.asSpec()],behaviours:mf([Pw.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:mf([Yw.config({}),Vw("notification-events",[Ra(Iu(),(function(t){s.getOpt(t).each(Yw.focus)}))])]),components:d.concat(t.progress?[o.asSpec()]:[]).concat(t.closeButton?[s.asSpec()]:[]),apis:a}},FC=dv({name:"Notification",factory:PC,configFields:[Fi("level"),Ai("progress"),Ai("icon"),Ai("onAction"),Ai("text"),Ai("iconProvider"),Ai("translationProvider"),Zi("closeButton",!0)],apis:{updateProgress:function(t,e,n){t.updateProgress(e,n)},updateText:function(t,e,n){t.updateText(e,n)}}});function VC(t,e,n){var r=e.backstage.shared,o=function(t){switch(t){case"bc-bc":return gC;case"tc-tc":return mC;case"tc-bc":return ql;case"bc-tc":default:return $l}},i=function(t){t.length>0&&G(t,(function(e,n){0===n?e.moveRel(null,"banner"):e.moveRel(t[n-1].getEl(),"bc-tc")}))},u=function(e,i){var u=!e.closeButton&&e.timeout&&(e.timeout>0||e.timeout<0),a=function(){i(),eC.hide(s)},c=Es(FC.sketch({text:e.text,level:U(["success","error","warning","warn","info"],e.type)?e.type:void 0,progress:!0===e.progressBar,icon:L.from(e.icon),closeButton:!u,onAction:a,iconProvider:r.providers.icons,translationProvider:r.providers.translate})),s=Es(eC.sketch(A({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:r.getSink,fireDismissalEventInstead:{}},r.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));n.add(s),e.timeout>0&&xC.setTimeout((function(){a()}),e.timeout);var l=function(){var e=Jr(ee.fromDom(t.getContentAreaContainer())),n=Zr(),r=_l(n.x,e.x,e.right),o=_l(n.y,e.y,e.bottom),i=Math.max(e.right,n.right),u=Math.max(e.bottom,n.bottom);return L.some(Yr(r,o,i-r,u-o))};return{close:a,moveTo:function(t,e){eC.showAt(s,_s(c),{anchor:{type:"makeshift",x:t,y:e}})},moveRel:function(t,e){var n=_s(c),i={maxHeightFunction:Ed()};if("banner"!==e&&d(t)){var u=o(e),a={type:"node",root:Hn(),node:L.some(ee.fromDom(t)),overrides:i,layouts:{onRtl:function(){return[u]},onLtr:function(){return[u]}}};eC.showWithinBounds(s,n,{anchor:a},l)}else{var f=A(A({},r.anchors.banner()),{overrides:i});eC.showWithinBounds(s,n,{anchor:f},l)}},text:function(t){FC.updateText(c,t)},settings:e,getEl:function(){return c.element.dom},progressBar:{value:function(t){FC.updateProgress(c,t)}}}},a=function(t){t.close()},c=function(t){return t.settings};return{open:u,close:a,reposition:i,getArgs:c}}var UC,jC=function(t,e){var n=null,r=function(){c(n)||(clearTimeout(n),n=null)},o=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];c(n)&&(n=setTimeout((function(){n=null,t.apply(null,r)}),e))};return{cancel:r,throttle:o}},WC=function(t,e){var n=null,r=function(){c(n)||(clearTimeout(n),n=null)},o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r(),n=setTimeout((function(){n=null,t.apply(null,o)}),e)};return{cancel:r,throttle:o}},qC=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),$C=function(t,e){return t.isBlock(e)||U(["BR","IMG","HR","INPUT"],e.nodeName)||"false"===t.getContentEditable(e)},GC=function(t,e,n,r,o){var i=qC(t,(function(e){return $C(t,e)}));return L.from(i.backwards(e,n,r,o))},KC="[data-mce-autocompleter]",XC=function(t,e){return YC(ee.fromDom(t.selection.getNode())).getOrThunk((function(){var n=ee.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',t.getDoc());return Dr(n,ee.fromDom(e.extractContents())),e.insertNode(n.dom),vn(n).each((function(t){return t.dom.normalize()})),Gm(n).map((function(e){t.selection.setCursorLocation(e.dom,jm(e))})),n}))},YC=function(t){return Ps(t,KC)},JC=function(t){return t.collapsed&&3===t.startContainer.nodeType},QC=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},ZC=function(t){return""!==t&&-1!=="  \f\n\r\t\v".indexOf(t)},tS=function(t,e){return t.substring(e.length)},eS=function(t,e,n){var r;for(r=e-1;r>=0;r--){var o=t.charAt(r);if(ZC(o))return L.none();if(o===n)break}return L.some(r)},nS=function(t,e,n,r){if(void 0===r&&(r=0),!JC(e))return L.none();var o=function(t,e,r){return eS(r,e,n).getOr(e)},i=t.getParent(e.startContainer,t.isBlock)||t.getRoot();return GC(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=QC(o),u=i.lastIndexOf(n);return 0!==u||tS(i,n).length<r?L.none():L.some({text:tS(i,n),range:o,triggerChar:n})}))},rS=function(t,e,n,r){return void 0===r&&(r=0),YC(ee.fromDom(e.startContainer)).fold((function(){return nS(t,e,n,r)}),(function(e){var r=t.createRng();r.selectNode(e.dom);var o=QC(r);return L.some({range:r,text:tS(o,n),triggerChar:n})}))},oS=function(t,e){e.on("keypress compositionend",t.onKeypress.throttle),e.on("remove",t.onKeypress.cancel);var n=function(t,e){Sa(t,Fu(),{raw:e})};e.on("keydown",(function(e){var r=function(){return t.getView().bind(rb.getHighlighted)};8===e.which&&t.onKeypress.throttle(e),t.isActive()&&(27===e.which&&t.cancelIfNecessary(),t.isMenuOpen()?13===e.which?(r().each(ka),e.preventDefault()):40===e.which?(r().fold((function(){t.getView().each(rb.highlightFirst)}),(function(t){n(t,e)})),e.preventDefault(),e.stopImmediatePropagation()):37!==e.which&&38!==e.which&&39!==e.which||r().each((function(t){n(t,e),e.preventDefault(),e.stopImmediatePropagation()})):13!==e.which&&38!==e.which&&40!==e.which||t.cancelIfNecessary())})),e.on("NodeChange",(function(e){t.isActive()&&!t.isProcessingAction()&&YC(ee.fromDom(e.element)).isNone()&&t.cancelIfNecessary()}))},iS={setup:oS},uS=tinymce.util.Tools.resolve("tinymce.util.Promise"),aS=function(t,e){return{container:t,offset:e}},cS=function(t){return t.nodeType===ue},sS=function(t){return t.nodeType===ie},lS=function(t){if(cS(t))return aS(t,t.data.length);var e=t.childNodes;return e.length>0?lS(e[e.length-1]):aS(t,e.length)},fS=function(t,e){var n=t.childNodes;return n.length>0&&e<n.length?fS(n[e],0):n.length>0&&sS(t)&&n.length===e?lS(n[n.length-1]):aS(t,e)},dS=function(t,e){return GC(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!ZC(e)})).isSome()},mS=function(t){return function(e){var n=fS(e.startContainer,e.startOffset);return!dS(t,n)}},gS=function(t,e,n){return gt(n.triggerChars,(function(n){return rS(t,e,n)}))},hS=function(t,e){var n=e(),r=t.selection.getRng();return gS(t.dom,r,n).bind((function(n){return pS(t,e,n)}))},pS=function(t,e,n,r){void 0===r&&(r={});var o=e(),i=t.selection.getRng(),u=i.startContainer.nodeValue,a=Y(o.lookupByChar(n.triggerChar),(function(e){return n.text.length>=e.minChars&&e.matches.getOrThunk((function(){return mS(t.dom)}))(n.range,u,n.text)}));if(0===a.length)return L.none();var c=uS.all($(a,(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:c,context:n})},vS=ti([Ri("type"),ji("text")]),bS=function(t){return wi("separatormenuitem",vS,t)},yS=ti([Ki("type","autocompleteitem"),Ki("active",!1),Ki("disabled",!1),Ki("meta",{}),Ri("value"),ji("text"),ji("icon")]),wS=ti([Ri("type"),Ri("ch"),Yi("minChars",1),Ki("columns",1),Yi("maxResults",10),Wi("matches"),Bi("fetch"),Bi("onAction"),nu("highlightOn",[],si)]),xS=function(t){return wi("Autocompleter.Separator",vS,t)},CS=function(t){return wi("Autocompleter.Item",yS,t)},SS=function(t){return wi("Autocompleter",wS,t)},kS=[Zi("disabled",!1),ji("tooltip"),ji("icon"),ji("text"),tu("onSetup",(function(){return p}))],TS=ti([Ri("type"),Bi("onAction")].concat(kS)),OS=function(t){return wi("toolbarbutton",TS,t)},ES=[Zi("active",!1)].concat(kS),_S=ti(ES.concat([Ri("type"),Bi("onAction")])),AS=function(t){return wi("ToggleButton",_S,t)},DS=[tu("predicate",O),Qi("scope","node",["node","editor"]),Qi("position","selection",["node","selection","line"])],MS=kS.concat([Ki("type","contextformbutton"),Ki("primary",!1),Bi("onAction"),Ei("original",x)]),RS=ES.concat([Ki("type","contextformbutton"),Ki("primary",!1),Bi("onAction"),Ei("original",x)]),NS=kS.concat([Ki("type","contextformbutton")]),zS=ES.concat([Ki("type","contextformtogglebutton")]),BS=ki("type",{contextformbutton:MS,contextformtogglebutton:RS}),LS=ti([Ki("type","contextform"),tu("initValue",w("")),ji("label"),Pi("commands",BS),Vi("launch",ki("type",{contextformbutton:NS,contextformtogglebutton:zS}))].concat(DS)),HS=function(t){return wi("ContextForm",LS,t)},IS=ti([Ki("type","contexttoolbar"),Ri("items")].concat(DS)),PS=function(t){return wi("ContextToolbar",IS,t)},FS=function(t){var e={};return G(t,(function(t){e[t]={}})),ht(e)},VS=function(t){var e=t.ui.registry.getAll().popups,n=bt(e,(function(t){return SS(t).fold((function(t){throw new Error(Si(t))}),x)})),r=FS(St(n,(function(t){return t.ch}))),o=Tt(n),i=function(t){return Y(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"})(UC||(UC={}));var US,jS=UC,WS="tox-menu-nav__js",qS="tox-collection__item",$S="tox-swatch",GS={normal:WS,color:$S},KS="tox-collection__item--enabled",XS="tox-collection__group-heading",YS="tox-collection__item-icon",JS="tox-collection__item-label",QS="tox-collection__item-accessory",ZS="tox-collection__item-caret",tk="tox-collection__item-checkmark",ek="tox-collection__item--active",nk="tox-collection__item-container",rk="tox-collection__item-container--column",ok="tox-collection__item-container--row",ik="tox-collection__item-container--align-right",uk="tox-collection__item-container--align-left",ak="tox-collection__item-container--valign-top",ck="tox-collection__item-container--valign-middle",sk="tox-collection__item-container--valign-bottom",lk=function(t){return Ot(GS,t).getOr(WS)},fk=function(t){return"color"===t?"tox-swatches":"tox-menu"},dk=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:fk(t),tieredMenu:"tox-tiered-menu"}},mk=function(t){var e=dk(t);return{backgroundMenu:e.backgroundMenu,selectedMenu:e.selectedMenu,menu:e.menu,selectedItem:e.selectedItem,item:lk(t)}},gk=function(t,e,n){var r=dk(n);return{tag:"div",classes:nt([[r.menu,"tox-menu-"+e+"-column"],t?[r.hasIcons]:[]])}},hk=[Fx.parts.items({})],pk=function(t,e,n){var r=dk(n),o={tag:"div",classes:nt([[r.tieredMenu]])};return{dom:o,markers:mk(n)}},vk=function(t,e){return function(n){var r=q(n,e);return $(r,(function(e){return{dom:t,components:e}}))}},bk=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Fx.parts.items({preprocess:"auto"!==t?vk({tag:"div",classes:["tox-swatches__row"]},t):x})]}]}},yk=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Fx.parts.items({preprocess:vk({tag:"div",classes:["tox-collection__group"]},t)})]}},wk=function(t,e){var n=[],r=[];return G(t,(function(t,o){e(t,o)?(r.length>0&&n.push(r),r=[],Et(t.dom,"innerHtml")&&r.push(t)):r.push(t)})),r.length>0&&n.push(r),$(n,(function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}}))},xk=function(t,e,n){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[Fx.parts.items({preprocess:function(n){return"auto"!==t&&t>1?vk({tag:"div",classes:["tox-collection__group"]},t)(n):wk(n,(function(t,n){return"separator"===e[n].type}))}})]}},Ck=function(t,e){return{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Fx.parts.items({preprocess:function(e){return wk(e,(function(e,n){return"separator"===t[n].type}))}})]}},Sk=function(t){return j(t,(function(t){return"icon"in t&&void 0!==t.icon}))},kk=function(t){return console.error(Si(t)),console.log(t),L.none()},Tk=function(t,e,n,r,o){var i=Ck(n);return{value:t,dom:i.dom,components:i.components,items:n}},Ok=function(t,e,n,r,o){if("color"===o){var i=bk(r);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o&&"auto"===r){i=xk(r,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o&&1===r){i=xk(1,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("normal"===o){i=xk(r,n);return{value:t,dom:i.dom,components:i.components,items:n}}if("listpreview"===o&&"auto"!==r){i=yk(r);return{value:t,dom:i.dom,components:i.components,items:n}}return{value:t,dom:gk(e,r,o),components:hk,items:n}},Ek=[Ri("type"),Ri("src"),ji("alt"),nu("classes",[],si)],_k=ti(Ek),Ak=[Ri("type"),Ri("text"),ji("name"),nu("classes",["tox-collection__item-label"],si)],Dk=ti(Ak),Mk=Jo((function(){return hi("type",{cardimage:_k,cardtext:Dk,cardcontainer:Rk})})),Rk=ti([Ri("type"),Ji("direction","horizontal"),Ji("align","left"),Ji("valign","middle"),Pi("items",Mk)]),Nk=[Zi("disabled",!1),ji("text"),ji("shortcut"),Oi("value","value",To((function(){return oc("menuitem-value")})),ui()),Ki("meta",{})],zk=ti([Ri("type"),ji("label"),Pi("items",Mk),tu("onSetup",(function(){return p})),tu("onAction",p)].concat(Nk)),Bk=function(t){return wi("cardmenuitem",zk,t)},Lk=ti([Ri("type"),Zi("active",!1),ji("icon")].concat(Nk)),Hk=function(t){return wi("choicemenuitem",Lk,t)},Ik=[Ri("type"),Ri("fancytype"),tu("onAction",p)],Pk=[Ki("initData",{})].concat(Ik),Fk=[ru("initData",{},[Zi("allowCustomColors",!0),qi("colors",ui())])].concat(Ik),Vk=ki("fancytype",{inserttable:Pk,colorswatch:Fk}),Uk=function(t){return wi("fancymenuitem",Vk,t)},jk=ti([Ri("type"),tu("onSetup",(function(){return p})),tu("onAction",p),ji("icon")].concat(Nk)),Wk=function(t){return wi("menuitem",jk,t)},qk=ti([Ri("type"),Bi("getSubmenuItems"),tu("onSetup",(function(){return p})),ji("icon")].concat(Nk)),$k=function(t){return wi("nestedmenuitem",qk,t)},Gk=ti([Ri("type"),ji("icon"),Zi("active",!1),tu("onSetup",(function(){return p})),Bi("onAction")].concat(Nk)),Kk=function(t){return wi("togglemenuitem",Gk,t)},Xk=function(t,e,n){var r=Xm(t.element,"."+n);if(r.length>0){var o=et(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()},Yk=function(t,e){return mf([Vw(t,e)])},Jk=function(t){return Yk(oc("unnamed-events"),t)},Qk={namedEvents:Yk,unnamedEvents:Jk},Zk=oc("tooltip.exclusive"),tT=oc("tooltip.show"),eT=oc("tooltip.hide"),nT=function(t,e,n){t.getSystem().broadcastOn([Zk],{})},rT=function(t,e,n,r){n.getTooltip().each((function(t){t.getSystem().isConnected()&&Pw.set(t,r)}))},oT=Object.freeze({__proto__:null,hideAllExclusive:nT,setComponents:rT}),iT=function(t,e){var n=function(n){e.getTooltip().each((function(r){Gg(r),t.onHide(n,r),e.clearTooltip()})),e.clearTimer()},r=function(n){if(!e.isShowing()){nT(n);var r=t.lazySink(n).getOrDie(),o=n.getSystem().build({dom:t.tooltipDom,components:t.tooltipComponents,events:_a("normal"===t.mode?[Ra(Hu(),(function(t){Ca(n,tT)})),Ra(Bu(),(function(t){Ca(n,eT)}))]:[]),behaviours:mf([Pw.config({})])});e.setTooltip(o),Wg(r,o),t.onShow(n,o),Ig.position(r,o,{anchor:t.anchor(n)})}};return _a(nt([[Ra(tT,(function(n){e.resetTimer((function(){r(n)}),t.delay)})),Ra(eT,(function(r){e.resetTimer((function(){n(r)}),t.delay)})),Ra(ta(),(function(t,e){var r=e;r.universal||U(r.channels,Zk)&&n(t)})),ja((function(t){n(t)}))],"normal"===t.mode?[Ra(Iu(),(function(t){Ca(t,tT)})),Ra(Qu(),(function(t){Ca(t,eT)})),Ra(Hu(),(function(t){Ca(t,tT)})),Ra(Bu(),(function(t){Ca(t,eT)}))]:[Ra(wa(),(function(t,e){Ca(t,tT)})),Ra(xa(),(function(t){Ca(t,eT)}))]]))},uT=Object.freeze({__proto__:null,events:iT}),aT=[Ai("lazySink"),Ai("tooltipDom"),Ki("exclusive",!0),Ki("tooltipComponents",[]),Ki("delay",300),Qi("mode","normal",["normal","follow-highlight"]),Ki("anchor",(function(t){return{type:"hotspot",hotspot:t,layouts:{onLtr:w([$l,ql,Vl,jl,Ul,Wl]),onRtl:w([$l,ql,Vl,jl,Ul,Wl])}}})),al("onHide"),al("onShow")],cT=function(){var t=od(),e=od(),n=function(){t.on(clearTimeout)},r=function(e,r){n(),t.set(setTimeout(e,r))},o=w("not-implemented");return Tc({getTooltip:e.get,isShowing:e.isSet,setTooltip:e.set,clearTooltip:e.clear,clearTimer:n,resetTimer:r,readState:o})},sT=Object.freeze({__proto__:null,init:cT}),lT=hf({fields:aT,name:"tooltipping",active:uT,state:sT,apis:oT}),fT=function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},dT=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),mT=tinymce.util.Tools.resolve("tinymce.EditorManager"),gT=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):mT.baseURL+"/skins/ui/"+r}return n},hT=function(t){return t.getParam("readonly",!1,"boolean")},pT=function(t){return!1===t.getParam("skin")},vT=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},bT=function(t){return t.getParam("width",dT.DOM.getStyle(t.getElement(),"width"))},yT=function(t){return L.from(t.getParam("min_width")).filter(g)},wT=function(t){return L.from(t.getParam("min_height")).filter(g)},xT=function(t){return L.from(t.getParam("max_width")).filter(g)},CT=function(t){return L.from(t.getParam("max_height")).filter(g)},ST=function(t){return L.from(t.getParam("style_formats")).filter(a)},kT=function(t){return t.getParam("style_formats_merge",!1,"boolean")},TT=function(t){return t.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},OT=function(t){return t.getParam("content_langs",void 0,"array")},ET=function(t){return t.getParam("removed_menuitems","")},_T=function(t){return!1!==t.getParam("menubar",!0,"boolean")},AT=function(t){var e=t.getParam("toolbar",!0),n=!0===e,r=i(e),o=a(e)&&e.length>0;return!MT(t)&&(o||r||n)},DT=function(t){var e=W(9,(function(e){return t.getParam("toolbar"+(e+1),!1,"string")})),n=Y(e,(function(t){return"string"===typeof t}));return n.length>0?L.some(n):L.none()},MT=function(t){return DT(t).fold((function(){var e=t.getParam("toolbar",[],"string[]");return e.length>0}),E)};(function(t){t["default"]="wrap",t["floating"]="floating",t["sliding"]="sliding",t["scrolling"]="scrolling"})(US||(US={}));var RT,NT=function(t){return t.getParam("toolbar_mode","","string")};(function(t){t["auto"]="auto",t["top"]="top",t["bottom"]="bottom"})(RT||(RT={}));var zT,BT=function(t){return t.getParam("toolbar_groups",{},"object")},LT=function(t){return t.getParam("toolbar_location",RT.auto,"string")},HT=function(t){return LT(t)===RT.bottom},IT=function(t){return t.getParam("fixed_toolbar_container","","string")},PT=function(t){return t.getParam("fixed_toolbar_container_target")},FT=function(t){return t.getParam("toolbar_persist",!1,"boolean")},VT=function(t){if(!t.inline)return L.none();var e=IT(t);if(e.length>0)return Is(Hn(),e);var n=PT(t);return d(n)?L.some(ee.fromDom(n)):L.none()},UT=function(t){return t.inline&&VT(t).isSome()},jT=function(t){var e=VT(t);return e.getOrThunk((function(){return Dn(An(ee.fromDom(t.getElement())))}))},WT=function(t){return t.inline&&!_T(t)&&!AT(t)&&!MT(t)},qT=function(t){var e=t.getParam("toolbar_sticky",!1,"boolean");return(e||t.inline)&&!UT(t)&&!WT(t)},$T=function(t){return t.getParam("toolbar_sticky_offset",0,"number")},GT=function(t){return t.getParam("draggable_modal",!1,"boolean")},KT=function(t){var e=t.getParam("menu");return e?bt(e,(function(t){return A(A({},t),{items:t.items})})):{}},XT=function(t){return t.getParam("menubar")},YT=function(t){return t.getParam("toolbar",!0)},JT=function(t){return t.getParam("file_picker_callback")},QT=function(t){return t.getParam("file_picker_types")},ZT=function(t){return t.getParam("file_browser_callback_types")},tO=function(t){return!1===t.getParam("typeahead_urls")},eO=function(t){return t.getParam("anchor_top","#top")},nO=function(t){return t.getParam("anchor_bottom","#bottom")},rO=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},oO="silver.readonly",iO=ti([zi("readonly")]),uO=function(t,e){var n=t.outerContainer,r=n.element;e&&(t.mothership.broadcastOn([yh()],{target:r}),t.uiMothership.broadcastOn([yh()],{target:r})),t.mothership.broadcastOn([oO],{readonly:e}),t.uiMothership.broadcastOn([oO],{readonly:e})},aO=function(t,e){t.on("init",(function(){t.mode.isReadOnly()&&uO(e,!0)})),t.on("SwitchMode",(function(){return uO(e,t.mode.isReadOnly())})),hT(t)&&t.setMode("readonly")},cO=function(){var t;return yf.config({channels:(t={},t[oO]={schema:iO,onReceive:function(t,e){Hv.set(t,e.readonly)}},t)})},sO=function(t){return Hv.config({disabled:t,disableClass:"tox-collection__item--state-disabled"})},lO=function(t){return Hv.config({disabled:t})},fO=function(t){return Hv.config({disabled:t,disableClass:"tox-tbtn--disabled"})},dO=function(t){return Hv.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},mO={item:sO,button:lO,splitButton:fO,toolbarButton:dO},gO=function(t,e){var n=t.getApi(e);return function(t){t(n)}},hO=function(t,e){return Ua((function(n){var r=gO(t,n);r((function(n){var r=t.onSetup(n);m(r)&&e.set(r)}))}))},pO=function(t,e){return ja((function(n){return gO(t,n)(e.get())}))},vO=function(t,e){return qa((function(n,r){gO(t,n)(t.onAction),t.triggersSubmenu||e!==jS.CLOSE_ON_EXECUTE||(Ca(n,ia()),r.stop())}))},bO=(zT={},zT[ea()]=["disabling","alloy.base.behaviour","toggling","item-events"],zT),yO=Mt,wO=function(t,e,n,r){var o=ou(p);return{type:"item",dom:e.dom,components:yO(e.optComponents),data:t.data,eventOrder:bO,hasSubmenu:t.triggersSubmenu,itemBehaviours:mf([Vw("item-events",[vO(t,n),hO(t,o),pO(t,o)]),mO.item((function(){return t.disabled||r.isDisabled()})),cO(),Pw.config({})].concat(t.itemBehaviours))}},xO=function(t){return{value:t.value,meta:A({text:t.text.getOr("")},t.meta)}},CO=tinymce.util.Tools.resolve("tinymce.Env"),SO=function(t){var e={alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"},n={meta:"Ctrl",access:"Shift+Alt"},r=CO.mac?e:n,o=t.split("+"),i=$(o,(function(t){var e=t.toLowerCase().trim();return Et(r,e)?r[e]:t}));return CO.mac?i.join(""):i.join("+")},kO=function(t,e,n){return void 0===n&&(n=[YS]),LC(t,{tag:"div",classes:n},e)},TO=function(t){return{dom:{tag:"div",classes:[JS]},components:[Ss(TC.translate(t))]}},OO=function(t,e){return{dom:{tag:"div",classes:e,innerHtml:t}}},EO=function(t,e){return{dom:{tag:"div",classes:[JS]},components:[{dom:{tag:t.tag,styles:t.styles},components:[Ss(TC.translate(e))]}]}},_O=function(t){return{dom:{tag:"div",classes:[QS],innerHtml:SO(t)}}},AO=function(t){return kO("checkmark",t,[tk])},DO=function(t){return kO("chevron-right",t,[ZS])},MO=function(t){return kO("chevron-down",t,[ZS])},RO=function(t,e){var n="vertical"===t.direction?rk:ok,r="left"===t.align?uk:ik,o=function(){switch(t.valign){case"top":return ak;case"middle":return ck;case"bottom":return sk}};return{dom:{tag:"div",classes:[nk,n,r,o()]},components:e}},NO=function(t,e,n){return{dom:{tag:"img",classes:e,attributes:{src:t,alt:n.getOr("")}}}},zO=function(t,e,n){var r="custom",o="remove",i=t.ariaLabel,u=t.value,a=t.iconContent.map((function(t){return RC(t,e.icons,n)})),c=function(){var t=$S,n=a.getOr(""),c=i.map((function(t){return{title:e.translate(t)}})).getOr({}),s={tag:"div",attributes:c,classes:[t]};return A(A({},s),u===r?{tag:"button",classes:M(M([],s.classes,!0),["tox-swatches__picker-btn"],!1),innerHtml:n}:u===o?{classes:M(M([],s.classes,!0),["tox-swatch--remove"],!1),innerHtml:n}:{attributes:A(A({},s.attributes),{"data-mce-color":u}),styles:{"background-color":u}})};return{dom:c(),optComponents:[]}},BO=function(t){var e=t.map((function(t){return{attributes:{title:TC.translate(t)}}})).getOr({});return A({tag:"div",classes:[WS,qS]},e)},LO=function(t,e,n,r){var o={tag:"div",classes:[YS]},i=function(t){return LC(t,o,e.icons,r)},u=function(){return L.some({dom:o})},a=n?t.iconContent.map(i).orThunk(u):L.none(),c=t.checkMark,s=L.from(t.meta).fold((function(){return TO}),(function(t){return Et(t,"style")?S(EO,t.style):TO})),l=t.htmlContent.fold((function(){return t.textContent.map(s)}),(function(t){return L.some(OO(t,[JS]))})),f={dom:BO(t.ariaLabel),optComponents:[a,l,t.shortcutContent.map(_O),c,t.caret]};return f},HO=function(t,e,n,r){return void 0===r&&(r=L.none()),"color"===t.presets?zO(t,e,r):LO(t,e,n,r)},IO=function(t,e){return Ot(t,"tooltipWorker").map((function(t){return[lT.config({lazySink:e.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{type:"submenu",item:t,overrides:{maxHeightFunction:Ed}}},mode:"follow-highlight",onShow:function(e,n){t((function(t){lT.setComponents(e,[ks({element:ee.fromDom(t)})])}))}})]})).getOr([])},PO=function(t){return dT.DOM.encode(t)},FO=function(t,e){var n=TC.translate(t),r=PO(n);if(e.length>0){var o=new RegExp(fT(e),"gi");return r.replace(o,(function(t){return'<span class="tox-autocompleter-highlight">'+t+"</span>"}))}return r},VO=function(t,e,n,r,o,i,u,a){void 0===a&&(a=!0);var c=HO({presets:r,textContent:L.none(),htmlContent:n?t.text.map((function(t){return FO(t,e)})):L.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:L.none(),checkMark:L.none(),caret:L.none(),value:t.value},u.providers,a,t.icon);return wO({data:xO(t),disabled:t.disabled,getApi:w({}),onAction:function(e){return o(t.value,t.meta)},onSetup:w(p),triggersSubmenu:!1,itemBehaviours:IO(t.meta,u)},c,i,u.providers)},UO=function(t,e){return $(t,(function(t){switch(t.type){case"cardcontainer":return RO(t,UO(t.items,e));case"cardimage":return NO(t.src,t.classes,t.alt);case"cardtext":var n=t.name.exists((function(t){return U(e.cardText.highlightOn,t)})),r=n?L.from(e.cardText.matchText).getOr(""):"";return OO(FO(t.text,r),t.classes)}}))},jO=function(t,e,n,r){var o=function(t){return{isDisabled:function(){return Hv.isDisabled(t)},setDisabled:function(e){Hv.set(t,e),G(Xm(t.element,"*"),(function(n){t.getSystem().getByDom(n).each((function(t){t.hasConfigured(Hv)&&Hv.set(t,e)}))}))}}},i={dom:BO(t.label),optComponents:[L.some({dom:{tag:"div",classes:[nk,ok]},components:UO(t.items,r)})]};return wO({data:xO(A({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)},WO=function(t,e,n,r,o,i,u,a){void 0===a&&(a=!0);var c=function(t){return{setActive:function(e){hx.set(t,e)},isActive:function(){return hx.isOn(t)},isDisabled:function(){return Hv.isDisabled(t)},setDisabled:function(e){return Hv.set(t,e)}}},s=HO({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(AO(u.icons)):L.none(),caret:L.none(),value:t.value},u,a);return Co(wO({data:xO(t),disabled:t.disabled,getApi:c,onAction:function(e){return r(t.value)},onSetup:function(t){return t.setActive(o),p},triggersSubmenu:!1,itemBehaviours:[]},s,i,u),{toggling:{toggleClass:KS,toggleOnExecute:!1,selected:t.active}})},qO=Vp(_x(),Ax()),$O=function(t){return{value:t}},GO=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,KO=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,XO=function(t){return GO.test(t)||KO.test(t)},YO=function(t){return Ft(t,"#").toUpperCase()},JO=function(t){return XO(t)?L.some({value:YO(t)}):L.none()},QO=function(t){var e=t.value.replace(GO,(function(t,e,n,r){return e+e+n+n+r+r}));return{value:e}},ZO=function(t){var e=QO(t),n=KO.exec(e.value);return null===n?["FFFFFF","FF","FF","FF"]:n},tE=function(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()},eE=function(t){var e=tE(t.red)+tE(t.green)+tE(t.blue);return $O(e)},nE=Math.min,rE=Math.max,oE=Math.round,iE=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,uE=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,aE=function(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}},cE=function(t){var e=parseInt(t,10);return e.toString()===t&&e>=0&&e<=255},sE=function(t){var e,n,r,o=(t.hue||0)%360,i=t.saturation/100,u=t.value/100;if(i=rE(0,nE(i,1)),u=rE(0,nE(u,1)),0===i)return e=n=r=oE(255*u),aE(e,n,r,1);var a=o/60,c=u*i,s=c*(1-Math.abs(a%2-1)),l=u-c;switch(Math.floor(a)){case 0:e=c,n=s,r=0;break;case 1:e=s,n=c,r=0;break;case 2:e=0,n=c,r=s;break;case 3:e=0,n=s,r=c;break;case 4:e=s,n=0,r=c;break;case 5:e=c,n=0,r=s;break;default:e=n=r=0}return e=oE(255*(e+l)),n=oE(255*(n+l)),r=oE(255*(r+l)),aE(e,n,r,1)},lE=function(t){var e=ZO(t),n=parseInt(e[1],16),r=parseInt(e[2],16),o=parseInt(e[3],16);return aE(n,r,o,1)},fE=function(t,e,n,r){var o=parseInt(t,10),i=parseInt(e,10),u=parseInt(n,10),a=parseFloat(r);return aE(o,i,u,a)},dE=function(t){if("transparent"===t)return L.some(aE(0,0,0,0));var e=iE.exec(t);if(null!==e)return L.some(fE(e[1],e[2],e[3],"1"));var n=uE.exec(t);return null!==n?L.some(fE(n[1],n[2],n[3],n[4])):L.none()},mE=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},gE=aE(255,0,0,1),hE=function(t){return t.fire("SkinLoaded")},pE=function(t,e){return t.fire("SkinLoadError",e)},vE=function(t){return t.fire("ResizeEditor")},bE=function(t,e){return t.fire("ResizeContent",e)},yE=function(t,e){return t.fire("ScrollContent",e)},wE=function(t,e){return t.fire("TextColorChange",e)},xE=function(t,e,n){return{hue:t,saturation:e,value:n}},CE=function(t){var e=0,n=0,r=0,o=t.red/255,i=t.green/255,u=t.blue/255,a=Math.min(o,Math.min(i,u)),c=Math.max(o,Math.max(i,u));if(a===c)return r=a,xE(0,0,100*r);var s=o===a?i-u:u===a?o-i:u-o;return e=o===a?3:u===a?1:5,e=60*(e-s/(c-a)),n=(c-a)/c,r=c,xE(Math.round(e),Math.round(100*n),Math.round(100*r))},SE=function(t){return CE(lE(t))},kE=function(t){return eE(sE(t))},TE=function(t){return JO(t).orThunk((function(){return dE(t).map(eE)})).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],u=r[2],a=r[3];return eE(aE(o,i,u,a))}))},OE=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),EE="tinymce-custom-colors";function _E(t){void 0===t&&(t=10);var e=OE.getItem(EE),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),u=function(e){V(o,e).each(a),o.unshift(e),o.length>t&&o.pop(),OE.setItem(EE,JSON.stringify(o))},a=function(t){o.splice(t,1)},c=function(){return o.slice(0)};return{add:u,state:c}}var AE,DE="choiceitem",ME=[{type:DE,text:"Light Green",value:"#BFEDD2"},{type:DE,text:"Light Yellow",value:"#FBEEB8"},{type:DE,text:"Light Red",value:"#F8CAC6"},{type:DE,text:"Light Purple",value:"#ECCAFA"},{type:DE,text:"Light Blue",value:"#C2E0F4"},{type:DE,text:"Green",value:"#2DC26B"},{type:DE,text:"Yellow",value:"#F1C40F"},{type:DE,text:"Red",value:"#E03E2D"},{type:DE,text:"Purple",value:"#B96AD9"},{type:DE,text:"Blue",value:"#3598DB"},{type:DE,text:"Dark Turquoise",value:"#169179"},{type:DE,text:"Orange",value:"#E67E23"},{type:DE,text:"Dark Red",value:"#BA372A"},{type:DE,text:"Dark Purple",value:"#843FA1"},{type:DE,text:"Dark Blue",value:"#236FA1"},{type:DE,text:"Light Gray",value:"#ECF0F1"},{type:DE,text:"Medium Gray",value:"#CED4D9"},{type:DE,text:"Gray",value:"#95A5A6"},{type:DE,text:"Dark Gray",value:"#7E8C8D"},{type:DE,text:"Navy Blue",value:"#34495E"},{type:DE,text:"Black",value:"#000000"},{type:DE,text:"White",value:"#ffffff"}],RE=_E(10),NE=function(t){for(var e=[],n=0;n<t.length;n+=2)e.push({text:t[n+1],value:"#"+TE(t[n]).value,type:"choiceitem"});return e},zE=function(t,e){return t.getParam("color_cols",e,"number")},BE=function(t){return!1!==t.getParam("custom_colors")},LE=function(t){return t.getParam("color_map")},HE=function(t){var e=LE(t);return void 0!==e?NE(e):ME},IE=function(){return $(RE.state(),(function(t){return{type:DE,text:t,value:t}}))},PE=function(t){RE.add(t)},FE="#000000",VE=function(t,e){var n;return t.dom.getParents(t.selection.getStart(),(function(t){var r;(r=t.style["forecolor"===e?"color":"background-color"])&&(n=n||r)})),L.from(n)},UE=function(t,e,n){t.undoManager.transact((function(){t.focus(),t.formatter.apply(e,{value:n}),t.nodeChanged()}))},jE=function(t,e){t.undoManager.transact((function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()}))},WE=function(t){t.addCommand("mceApplyTextcolor",(function(e,n){UE(t,e,n)})),t.addCommand("mceRemoveTextcolor",(function(e){jE(t,e)}))},qE=function(t){return Math.max(5,Math.ceil(Math.sqrt(t)))},$E=function(t){var e=HE(t),n=qE(e.length);return zE(t,n)},GE=function(t){var e="choiceitem",n={type:e,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"},r={type:e,text:"Custom color",icon:"color-picker",value:"custom"};return t?[n,r]:[n]},KE=function(t,e,n,r){if("custom"===n){var o=t_(t);o((function(n){n.each((function(n){PE(n),t.execCommand("mceApplyTextcolor",e,n),r(n)}))}),FE)}else"remove"===n?(r(""),t.execCommand("mceRemoveTextcolor",e)):(r(n),t.execCommand("mceApplyTextcolor",e,n))},XE=function(t,e){return t.concat(IE().concat(GE(e)))},YE=function(t,e){return function(n){n(XE(t,e))}},JE=function(t,e,n){var r="forecolor"===e?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";t.setIconFill(r,n)},QE=function(t,e,n,r,o){t.ui.registry.addSplitButton(e,{tooltip:r,presets:"color",icon:"forecolor"===e?"text-color":"highlight-bg-color",select:function(e){var r=VE(t,n);return r.bind((function(t){return dE(t).map((function(t){var n=eE(t).value;return Ut(e.toLowerCase(),n)}))})).getOr(!1)},columns:$E(t),fetch:YE(HE(t),BE(t)),onAction:function(e){KE(t,n,o.get(),p)},onItemAction:function(r,i){KE(t,n,i,(function(n){o.set(n),wE(t,{name:e,color:n})}))},onSetup:function(n){JE(n,e,o.get());var r=function(t){t.name===e&&JE(n,t.name,t.color)};return t.on("TextColorChange",r),function(){t.off("TextColorChange",r)}}})},ZE=function(t,e,n,r){t.ui.registry.addNestedMenuItem(e,{text:r,icon:"forecolor"===e?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(e){KE(t,n,e.value,p)}}]}})},t_=function(t){return function(e,n){var r=!1,o=function(n){var o=n.getData(),i=o.colorpicker;r?(e(L.from(i)),n.close()):t.windowManager.alert(t.translate(["Invalid hex color code: {0}",i]))},i=function(t,e){"hex-valid"===e.name&&(r=e.value)},u={colorpicker:n};t.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:u,onAction:i,onSubmit:o,onClose:p,onCancel:function(){e(L.none())}})}},e_=function(t){WE(t);var e=ou(FE),n=ou(FE);QE(t,"forecolor","forecolor","Text color",e),QE(t,"backcolor","hilitecolor","Background color",n),ZE(t,"forecolor","forecolor","Text color"),ZE(t,"backcolor","hilitecolor","Background color")},n_=function(t,e,n,r,o,i,u,a){var c=Sk(e),s="color"!==o?"normal":"color",l=r_(e,n,r,s,i,u,a);return Ok(t,c,l,r,o)},r_=function(t,e,n,r,o,i,u){return Mt($(t,(function(a){return"choiceitem"===a.type?Hk(a).fold(kk,(function(c){return L.some(WO(c,1===n,r,e,i(a.value),o,u,Sk(t)))})):L.none()})))},o_=function(t,e){var n=mk(e);if(1===t)return{mode:"menu",moveOnTab:!0};if("auto"===t)return{mode:"grid",selector:"."+n.item,initSize:{numColumns:1,numRows:1}};var r="color"===e?"tox-swatches__row":"tox-collection__group";return{mode:"matrix",rowSelector:"."+r}},i_=function(t,e){return 1===t?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===t?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===e?".tox-swatches__row":".tox-collection__group",cell:"color"===e?"."+$S:"."+qS}}},u_=function(t,e){var n=a_(t,e),r=e.colorinput.getColorCols(),o="color",i=n_(oc("menu-value"),n,(function(e){t.onAction({value:e})}),r,o,jS.CLOSE_ON_EXECUTE,O,e.shared.providers),u=A(A({},i),{markers:mk(o),movement:o_(r,o)});return{type:"widget",data:{value:oc("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[qO.widget(Fx.sketch(u))]}},a_=function(t,e){var n=t.initData.allowCustomColors&&e.colorinput.hasCustomColors();return t.initData.colors.fold((function(){return XE(e.colorinput.getColors(),n)}),(function(t){return t.concat(GE(n))}))},c_=oc("cell-over"),s_=oc("cell-execute"),l_=function(t,e,n){var r,o=function(n){return Sa(n,c_,{row:t,col:e})},i=function(n){return Sa(n,s_,{row:t,col:e})},u=function(t,e){e.stop(),i(t)};return Es({dom:{tag:"div",attributes:(r={role:"button"},r["aria-labelledby"]=n,r)},behaviours:mf([Vw("insert-table-picker-cell",[Ra(Hu(),Yw.focus),Ra(ea(),i),Ra(Wu(),u),Ra(ra(),u)]),hx.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Yw.config({onFocus:o})])})},f_=function(t,e,n){for(var r=[],o=0;o<e;o++){for(var i=[],u=0;u<n;u++)i.push(l_(o,u,t));r.push(i)}return r},d_=function(t,e,n,r,o){for(var i=0;i<r;i++)for(var u=0;u<o;u++)hx.set(t[i][u],i<=e&&u<=n)},m_=function(t){return rt(t,(function(t){return $(t,_s)}))},g_=function(t,e){return Ss(e+"x"+t)},h_=function(t){var e=10,n=10,r=oc("size-label"),o=f_(r,e,n),i=g_(0,0),u=kC({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:r}},components:[i],behaviours:mf([Pw.config({})])});return{type:"widget",data:{value:oc("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[qO.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:m_(o).concat(u.asSpec()),behaviours:mf([Vw("insert-table-picker",[Ua((function(t){Pw.set(u.get(t),[i])})),Ia(c_,(function(t,r,i){var a=i.event,c=a.row,s=a.col;d_(o,c,s,e,n),Pw.set(u.get(t),[g_(c+1,s+1)])})),Ia(s_,(function(e,n,r){var o=r.event,i=o.row,u=o.col;t.onAction({numRows:i+1,numColumns:u+1}),Ca(e,ia())}))]),Aw.config({initSize:{numRows:e,numColumns:n},mode:"flatgrid",selector:'[role="button"]'})])})]}},p_={inserttable:h_,colorswatch:u_},v_=function(t,e){return Ot(p_,t.fancytype).map((function(n){return n(t,e)}))},b_=function(t,e,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!1);var i=o?MO(n.icons):DO(n.icons),u=function(t){return{isDisabled:function(){return Hv.isDisabled(t)},setDisabled:function(e){return Hv.set(t,e)}}},a=HO({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:L.none(),ariaLabel:t.text,caret:L.some(i),checkMark:L.none(),shortcutContent:t.shortcut},n,r);return wO({data:xO(t),getApi:u,disabled:t.disabled,onAction:p,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},a,e,n)},y_=function(t,e,n,r){void 0===r&&(r=!0);var o=function(t){return{isDisabled:function(){return Hv.isDisabled(t)},setDisabled:function(e){return Hv.set(t,e)}}},i=HO({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:L.none(),ariaLabel:t.text,caret:L.none(),checkMark:L.none(),shortcutContent:t.shortcut},n,r);return wO({data:xO(t),getApi:o,disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},i,e,n)},w_=function(t){var e=t.text.fold((function(){return{}}),(function(t){return{innerHtml:t}}));return{type:"separator",dom:A({tag:"div",classes:[qS,XS]},e),components:[]}},x_=function(t,e,n,r){void 0===r&&(r=!0);var o=function(t){return{setActive:function(e){hx.set(t,e)},isActive:function(){return hx.isOn(t)},isDisabled:function(){return Hv.isDisabled(t)},setDisabled:function(e){return Hv.set(t,e)}}},i=HO({iconContent:t.icon,textContent:t.text,htmlContent:L.none(),ariaLabel:t.text,checkMark:L.some(AO(n.icons)),caret:L.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},n,r);return Co(wO({data:xO(t),disabled:t.disabled,getApi:o,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},i,e,n),{toggling:{toggleClass:KS,toggleOnExecute:!1,selected:t.active}})},C_=VO,S_=w_,k_=y_,T_=b_,O_=x_,E_=v_,__=jO;(function(t){t[t["ContentFocus"]=0]="ContentFocus",t[t["UiFocus"]=1]="UiFocus"})(AE||(AE={}));var A_=function(t,e,n,r,o){var i=n.shared.providers,u=function(t){return o?A(A({},t),{shortcut:L.none(),icon:t.text.isSome()?L.none():t.icon}):t};switch(t.type){case"menuitem":return Wk(t).fold(kk,(function(t){return L.some(k_(u(t),e,i,r))}));case"nestedmenuitem":return $k(t).fold(kk,(function(t){return L.some(T_(u(t),e,i,r,o))}));case"togglemenuitem":return Kk(t).fold(kk,(function(t){return L.some(O_(u(t),e,i,r))}));case"separator":return bS(t).fold(kk,(function(t){return L.some(S_(t))}));case"fancymenuitem":return Uk(t).fold(kk,(function(t){return E_(u(t),n)}));default:return console.error("Unknown item in general menu",t),L.none()}},D_=function(t,e,n,r,o,i,u){var a=1===r,c=!a||Sk(t);return Mt($(t,(function(t){switch(t.type){case"separator":return xS(t).fold(kk,(function(t){return L.some(S_(t))}));case"cardmenuitem":return Bk(t).fold(kk,(function(t){return L.some(__(A(A({},t),{onAction:function(e){t.onAction(e),n(t.value,t.meta)}}),o,i,{itemBehaviours:IO(t.meta,i),cardText:{matchText:e,highlightOn:u}}))}));case"autocompleteitem":default:return CS(t).fold(kk,(function(t){return L.some(C_(t,e,a,"normal",n,o,i,c))}))}})))},M_=function(t,e,n,r,o){var i=Sk(e),u=Mt($(e,(function(t){var e=function(t){return o?!Et(t,"text"):i},u=function(t){return A_(t,n,r,e(t),o)};return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?u(A(A({},t),{disabled:!0})):u(t)}))),a=o?Tk:Ok;return a(t,i,u,1,"normal")},R_=function(t){return Qx.singleData(t.value,t)},N_=function(t,e,n,r){var o=n===AE.ContentFocus?Ob():Tb(),i=o_(e,r),u=mk(r);return{dom:t.dom,components:t.components,items:t.items,value:t.value,markers:{selectedItem:u.selectedItem,item:u.item},movement:i,fakeFocus:n===AE.ContentFocus,focusManager:o,menuBehaviours:Qk.unnamedEvents("auto"!==e?[]:[Ua((function(t,e){Xk(t,4,u.item).each((function(e){var n=e.numColumns,r=e.numRows;Aw.setGridSize(t,r,n)}))}))])}},z_=function(t,e){var n=od(),r=ou(!1),o=Es(eC.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:mf([Vw("dismissAutocompleter",[Ra(ga(),(function(){return c()}))])]),lazySink:e.getSink})),i=function(){return eC.isOpen(o)},u=function(){return n.get().isSome()},a=function(){u()&&eC.hide(o)},c=function(){if(u()){var e=n.get().map((function(t){return t.element}));YC(e.getOr(ee.fromDom(t.selection.getNode()))).each(Lr),a(),n.clear(),r.set(!1)}},s=ge((function(){return VS(t)})),l=function(n,o){var i=gt(o,(function(t){return L.from(t.columns)})).getOr(1);return rt(o,(function(o){var u=o.items;return D_(u,o.matchText,(function(e,i){var u=t.selection.getRng();rS(t.dom,u,n).fold((function(){return console.error("Lost context. Cursor probably moved")}),(function(t){var n=t.range,u={hide:function(){c()},reload:function(t){a(),g(t)}};r.set(!0),o.onAction(u,n,e,i),r.set(!1)}))}),i,jS.BUBBLE_TO_SANDBOX,e,o.highlightOn)}))},f=function(e){if(!u()){var o=XC(t,e.range);n.set({triggerChar:e.triggerChar,element:o,matchLength:e.text.length}),r.set(!1)}},d=function(e,n,r,i){e.matchLength=n.text.length;var u=gt(r,(function(t){return L.from(t.columns)})).getOr(1);eC.showAt(o,Fx.sketch(N_(Ok("autocompleter-value",!0,i,u,"normal"),u,AE.ContentFocus,"normal")),{anchor:{type:"node",root:ee.fromDom(t.getBody()),node:L.from(e.element)}}),eC.getContent(o).each(rb.highlightFirst)},m=function(e){return n.get().map((function(n){return rS(t.dom,t.selection.getRng(),n.triggerChar).bind((function(n){return pS(t,s,n,e)}))})).getOrThunk((function(){return hS(t,s)}))},g=function(t){m(t).fold(c,(function(t){f(t.context),t.lookupData.then((function(e){n.get().map((function(n){var r=t.context;if(n.triggerChar===r.triggerChar){var o=l(r.triggerChar,e);o.length>0?d(n,r,e,o):r.text.length-n.matchLength>=10?c():a()}}))}))}))},h=WC((function(t){27!==t.which&&g()}),50),p={onKeypress:h,cancelIfNecessary:c,isMenuOpen:i,isActive:u,isProcessingAction:r.get,getView:function(){return eC.getContent(o)}};!1===t.hasPlugin("rtc")&&iS.setup(p,t)},B_={register:z_},L_=function(t,e,n){return Ps(t,e,n).isSome()},H_=function(t,e){var n=null,r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n=setTimeout((function(){t.apply(null,r),n=null}),e)},o=function(){null!==n&&(clearTimeout(n),n=null)};return{cancel:o,schedule:r}},I_=5,P_=400,F_=function(t){var e=t.raw;return void 0===e.touches||1!==e.touches.length?L.none():L.some(e.touches[0])},V_=function(t,e){var n=Math.abs(t.clientX-e.x),r=Math.abs(t.clientY-e.y);return n>I_||r>I_},U_=function(t){var e=od(),n=ou(!1),r=H_((function(e){t.triggerEvent(oa(),e),n.set(!0)}),P_),o=function(t){return F_(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(),F_(t).each((function(t){e.on((function(n){V_(t,n)&&e.clear()}))})),L.none()},u=function(o){r.cancel();var i=function(t){return sn(t.target,o.target)};return e.get().filter(i).map((function(e){return n.get()?(o.prevent(),!1):t.triggerEvent(ra(),o)}))},a=gu([{key:Au(),value:o},{key:Du(),value:i},{key:Mu(),value:u}]),c=function(t,e){return Ot(a,e).bind((function(e){return e(t)}))};return{fireIfReady:c}},j_=function(t){var e=t.raw;return e.which===ob[0]&&!U(["input","textarea"],ae(t.target))&&!L_(t.target,'[contenteditable="true"]')},W_=function(){return en().browser.isFirefox()},q_=function(t,e){return W_()?ad(t,"focus",e):ud(t,"focusin",e)},$_=function(t,e){return W_()?ad(t,"blur",e):ud(t,"focusout",e)},G_=function(t,e){var n=A({stopBackspace:!0},e),r=["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"],o=U_(n),i=$(r.concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(function(e){return ud(t,e,(function(t){o.fireIfReady(t,e).each((function(e){e&&t.kill()}));var r=n.triggerEvent(e,t);r&&t.kill()}))})),u=od(),a=ud(t,"paste",(function(t){o.fireIfReady(t,"paste").each((function(e){e&&t.kill()}));var e=n.triggerEvent("paste",t);e&&t.kill(),u.set(setTimeout((function(){n.triggerEvent(Zu(),t)}),0))})),c=ud(t,"keydown",(function(t){var e=n.triggerEvent("keydown",t);e?t.kill():n.stopBackspace&&j_(t)&&t.prevent()})),s=q_(t,(function(t){var e=n.triggerEvent("focusin",t);e&&t.kill()})),l=od(),f=$_(t,(function(t){var e=n.triggerEvent("focusout",t);e&&t.kill(),l.set(setTimeout((function(){n.triggerEvent(Qu(),t)}),0))})),d=function(){G(i,(function(t){t.unbind()})),c.unbind(),s.unbind(),f.unbind(),a.unbind(),u.on(clearTimeout),l.on(clearTimeout)};return{unbind:d}},K_=function(t,e){var n=Ot(t,"target").getOr(e);return ou(n)},X_=function(t,e){var n=ou(!1),r=ou(!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}},Y_=function(t){var e=ou(!1),n=function(){e.set(!0)};return{stop:n,cut:p,isStopped:e.get,isCut:O,event:t,setSource:T("Cannot set source of a broadcasted event"),getSource:T("Cannot get source of a broadcasted event")}},J_=uu.generate([{stopped:[]},{resume:["element"]},{complete:[]}]),Q_=function(t,e,n,r,o,i){var u=t(e,r),a=X_(n,o);return u.fold((function(){return i.logEventNoHandlers(e,r),J_.complete()}),(function(t){var n=t.descHandler,r=Hc(n);return r(a),a.isStopped()?(i.logEventStopped(e,t.element,n.purpose),J_.stopped()):a.isCut()?(i.logEventCut(e,t.element,n.purpose),J_.complete()):vn(t.element).fold((function(){return i.logNoParent(e,t.element,n.purpose),J_.complete()}),(function(r){return i.logEventResponse(e,t.element,n.purpose),J_.resume(r)}))}))},Z_=function(t,e,n,r,o,i){return Q_(t,e,n,r,o,i).fold(E,(function(r){return Z_(t,e,n,r,o,i)}),O)},tA=function(t,e,n,r,o){var i=K_(n,r);return Q_(t,e,n,r,i,o)},eA=function(t,e,n){var r=Y_(e);return G(t,(function(t){var e=t.descHandler,n=Hc(e);n(r)})),r.isStopped()},nA=function(t,e,n,r){return rA(t,e,n,n.target,r)},rA=function(t,e,n,r,o){var i=K_(n,r);return Z_(t,e,n,r,i,o)},oA=function(t,e){return{element:t,descHandler:e}},iA=function(t,e){return{id:t,descHandler:e}},uA=function(){var t={},e=function(e,n,r){vt(r,(function(r,o){var i=void 0!==t[o]?t[o]:{};i[n]=Lc(r,e),t[o]=i}))},n=function(t,e){return fc(e).bind((function(e){return Ot(t,e)})).map((function(t){return oA(e,t)}))},r=function(e){return Ot(t,e).map((function(t){return St(t,(function(t,e){return iA(e,t)}))})).getOr([])},o=function(e,r,o){return Ot(t,r).bind((function(t){return wu(o,(function(e){return n(t,e)}),e)}))},i=function(e){vt(t,(function(t,n){Et(t,e)&&delete t[e]}))};return{registerId:e,unregisterId:i,filterByType:r,find:o}},aA=function(){var t=uA(),e={},n=function(t){var e=t.element;return fc(e).getOrThunk((function(){return sc("uid-",t.element)}))},r=function(t,n){var r=e[n];if(r!==t)throw new Error('The tagId "'+n+'" is already used by: '+Za(r.element)+"\nCannot use it for: "+Za(t.element)+"\nThe conflicting element is"+(Ln(r.element)?" ":" not ")+"already in the DOM");i(t)},o=function(o){var i=n(o);_t(e,i)&&r(o,i);var u=[o];t.registerId(u,i,o.events),e[i]=o},i=function(n){fc(n.element).each((function(n){delete e[n],t.unregisterId(n)}))},u=function(e){return t.filterByType(e)},a=function(e,n,r){return t.find(e,n,r)},c=function(t){return Ot(e,t)};return{find:a,filter:u,register:o,unregister:i,getById:c}},cA=function(t){var e=t.dom,n=e.attributes,r=D(e,["attributes"]);return{uid:t.uid,dom:A({tag:"div",attributes:A({role:"presentation"},n)},r),components:t.components,behaviours:np(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},sA=dv({name:"Container",factory:cA,configFields:[Ki("components",[]),ep("containerBehaviours",[]),Ki("events",{}),Ki("domModification",{}),Ki("eventOrder",{})]}),lA=function(t){var e=function(e){return vn(t.element).fold(E,(function(t){return sn(e,t)}))},n=aA(),r=function(t,r){return n.find(e,t,r)},o=G_(t.element,{triggerEvent:function(t,e){return Js(t,e.target,(function(n){return nA(r,t,e,n)}))}}),i={debugInfo:w("real"),triggerEvent:function(t,e,n){Js(t,e,(function(o){return rA(r,t,n,e,o)}))},triggerFocus:function(t,e){fc(t).fold((function(){Sf(t)}),(function(n){Js(Ju(),t,(function(n){return tA(r,Ju(),{originator:e,kill:p,prevent:p,target:t},t,n),!1}))}))},triggerEscape:function(t,e){i.triggerEvent("keydown",t.element,e.event)},getByUid:function(t){return h(t)},getByDom:function(t){return v(t)},build:Es,addToGui:function(t){c(t)},removeFromGui:function(t){s(t)},addToWorld:function(t){u(t)},removeFromWorld:function(t){a(t)},broadcast:function(t){d(t)},broadcastOn:function(t,e){m(t,e)},broadcastEvent:function(t,e){g(t,e)},isConnected:E},u=function(t){t.connect(i),fe(t.element)||(n.register(t),G(t.components(),u),i.triggerEvent(aa(),t.element,{target:t.element}))},a=function(t){fe(t.element)||(G(t.components(),a),n.unregister(t)),t.disconnect()},c=function(e){Wg(t,e)},s=function(t){Gg(t)},l=function(){o.unbind(),Br(t.element)},f=function(t){var e=n.filter(ta());G(e,(function(e){var n=e.descHandler,r=Hc(n);r(t)}))},d=function(t){f({universal:!0,data:t})},m=function(t,e){f({universal:!1,channels:t,data:e})},g=function(t,e){var r=n.filter(t);return eA(r,e)},h=function(t){return n.getById(t).fold((function(){return ro.error(new Error('Could not find component with uid: "'+t+'" in system.'))}),ro.value)},v=function(t){var e=fc(t).getOr("not found");return h(e)};return u(t),{root:t,element:t.element,destroy:l,add:c,remove:s,getByUid:h,getByDom:v,addToWorld:u,removeFromWorld:a,broadcast:d,broadcastOn:m,broadcastEvent:g}},fA=function(t,e){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:$(t.items,e.interpreter)}},dA=w([Ki("prefix","form-field"),ep("fieldBehaviours",[bv,tp])]),mA=w([Bp({schema:[Ai("dom")],name:"label"}),Bp({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[Ai("text")],name:"aria-descriptor"}),Np({factory:{sketch:function(t){var e=du(t,["factory"]);return t.factory.sketch(e)}},schema:[Ai("factory")],name:"field"})]),gA=function(t,e,n,r){var o=rp(t.fieldBehaviours,[bv.config({find:function(e){return Kp(e,t,"field")}}),tp.config({store:{mode:"manual",getValue:function(t){return bv.getCurrent(t).bind(tp.getValue)},setValue:function(t,e){bv.getCurrent(t).each((function(t){tp.setValue(t,e)}))}}})]),i=_a([Ua((function(e,n){var r=Yp(e,t,["label","field","aria-descriptor"]);r.field().each((function(e){var n=oc(t.prefix);r.label().each((function(t){Fn(t.element,"for",n),Fn(e.element,"id",n)})),r["aria-descriptor"]().each((function(n){var r=oc(t.prefix);Fn(n.element,"id",r),Fn(e.element,"aria-describedby",r)}))}))}))]),u={getField:function(e){return Kp(e,t,"field")},getLabel:function(e){return Kp(e,t,"label")}};return{uid:t.uid,dom:t.dom,components:e,behaviours:o,events:i,apis:u}},hA=mv({name:"FormField",configFields:dA(),partFields:mA(),factory:gA,apis:{getField:function(t,e){return t.getField(e)},getLabel:function(t,e){return t.getLabel(e)}}}),pA=function(t,e){return Dc({attributes:gu([{key:e.tabAttr,value:"true"}])})},vA=Object.freeze({__proto__:null,exhibit:pA}),bA=[Ki("tabAttr","data-alloy-tabstop")],yA=hf({fields:bA,name:"tabstopping",active:vA}),wA=tinymce.util.Tools.resolve("tinymce.html.Entities"),xA=function(t,e,n,r){var o=SA(t,e,n,r);return hA.sketch(o)},CA=function(t,e){return xA(t,e,[],[])},SA=function(t,e,n,r){return{dom:TA(n),components:t.toArray().concat([e]),fieldBehaviours:mf(r)}},kA=function(){return TA([])},TA=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},OA=function(t,e){return hA.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}})},EA=oc("form-component-change"),_A=oc("form-close"),AA=oc("form-cancel"),DA=oc("form-action"),MA=oc("form-submit"),RA=oc("form-block"),NA=oc("form-unblock"),zA=oc("form-tabchange"),BA=oc("form-resize"),LA=function(t,e){var n,r=t.label.map((function(t){return OA(t,e)})),o=function(t){return function(e,n){Ps(n.event.target,"[data-collection-item-value]").each((function(r){t(e,n,r,Un(r,"data-collection-item-value"))}))}},i=function(n,r){var o=$(r,(function(n){var r=TC.translate(n.text),o=1===t.columns?'<div class="tox-collection__item-label">'+r+"</div>":"",i='<div class="tox-collection__item-icon">'+n.icon+"</div>",u={_:" "," - ":" ","-":" "},a=r.replace(/\_| \- |\-/g,(function(t){return u[t]})),c=e.isDisabled()?" tox-collection__item--state-disabled":"";return'<div class="tox-collection__item'+c+'" tabindex="-1" data-collection-item-value="'+wA.encodeAllRaw(n.value)+'" title="'+a+'" aria-label="'+a+'">'+i+o+"</div>"})),i="auto"!==t.columns&&t.columns>1?q(o,t.columns):[o],u=$(i,(function(t){return'<div class="tox-collection__group">'+t.join("")+"</div>"}));Ka(n.element,u.join(""))},u=o((function(n,r,o,i){r.stop(),e.isDisabled()||Sa(n,DA,{name:t.name,value:i})})),a=[Ra(Hu(),o((function(t,e,n){Sf(n)}))),Ra(Wu(),u),Ra(ra(),u),Ra(Iu(),o((function(t,e,n){Is(t.element,"."+ek).each((function(t){as(t,ek)})),is(n,ek)}))),Ra(Pu(),o((function(t){Is(t.element,"."+ek).each((function(t){as(t,ek)}))}))),qa(o((function(e,n,r,o){Sa(e,DA,{name:t.name,value:o})})))],c=function(t,e){return $(Xm(t.element,".tox-collection__item"),e)},s=hA.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==t.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:x},behaviours:mf([Hv.config({disabled:e.isDisabled,onDisabled:function(t){c(t,(function(t){is(t,"tox-collection__item--state-disabled"),Fn(t,"aria-disabled",!0)}))},onEnabled:function(t){c(t,(function(t){as(t,"tox-collection__item--state-disabled"),qn(t,"aria-disabled")}))}}),cO(),Pw.config({}),tp.config({store:{mode:"memory",initialValue:[]},onSetValue:function(e,n){i(e,n),"auto"===t.columns&&Xk(e,5,"tox-collection__item").each((function(t){var n=t.numRows,r=t.numColumns;Aw.setGridSize(e,n,r)})),Ca(e,BA)}}),yA.config({}),Aw.config(i_(t.columns,"normal")),Vw("collection-events",a)]),eventOrder:(n={},n[ea()]=["disabling","alloy.base.behaviour","collection-events"],n)}),l=["tox-form__group--collection"];return xA(r,s,l,[])},HA=w([Fi("data"),Ki("inputAttributes",{}),Ki("inputStyles",{}),Ki("tag","input"),Ki("inputClasses",[]),al("onSetValue"),Ki("styles",{}),Ki("eventOrder",{}),ep("inputBehaviours",[tp,Yw]),Ki("selectOnFocus",!0)]),IA=function(t){return mf([Yw.config({onFocus:t.selectOnFocus?function(t){var e=t.element,n=ds(e);e.dom.setSelectionRange(0,n.length)}:p})])},PA=function(t){return A(A({},IA(t)),rp(t.inputBehaviours,[tp.config({store:A(A({mode:"manual"},t.data.map((function(t){return{initialValue:t}})).getOr({})),{getValue:function(t){return ds(t.element)},setValue:function(t,e){var n=ds(t.element);n!==e&&ms(t.element,e)}}),onSetValue:t.onSetValue})]))},FA=function(t){return{tag:t.tag,attributes:A({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},VA=function(t,e){return{uid:t.uid,dom:FA(t),components:[],behaviours:PA(t),eventOrder:t.eventOrder}},UA=dv({name:"Input",configFields:HA(),factory:VA}),jA={},WA={exports:jA};(function(e,n,r,o){(function(t,o){"object"===typeof n&&"undefined"!==typeof r?r.exports=o():"function"===typeof e&&e.amd?e(o):(t="undefined"!==typeof globalThis?globalThis:t||self,t.EphoxContactWrapper=o())})(this,(function(){var e="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},n={exports:{}};(function(t){(function(e){var n=setTimeout;function r(){}function o(t,e){return function(){t.apply(e,arguments)}}function i(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=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(t,this)}function u(t,e){while(3===t._state)t=t._value;0!==t._state?(t._handled=!0,i._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(o){return void c(e.promise,o)}a(e.promise,r)}else(1===t._state?a:c)(e.promise,t._value)}))):t._deferreds.push(e)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===typeof e||"function"===typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"===typeof n)return void f(o(n,e),t)}t._state=1,t._value=e,s(t)}catch(r){c(t,r)}}function c(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&i._immediateFn((function(){t._handled||i._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)u(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"===typeof t?t:null,this.onRejected="function"===typeof e?e:null,this.promise=n}function f(t,e){var n=!1;try{t((function(t){n||(n=!0,a(e,t))}),(function(t){n||(n=!0,c(e,t))}))}catch(r){if(n)return;n=!0,c(e,r)}}i.prototype["catch"]=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(r);return u(this,new l(t,e,n)),n},i.all=function(t){var e=Array.prototype.slice.call(t);return new i((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,u){try{if(u&&("object"===typeof u||"function"===typeof u)){var a=u.then;if("function"===typeof a)return void a.call(u,(function(t){o(i,t)}),n)}e[i]=u,0===--r&&t(e)}catch(c){n(c)}}for(var i=0;i<e.length;i++)o(i,e[i])}))},i.resolve=function(t){return t&&"object"===typeof t&&t.constructor===i?t:new i((function(e){e(t)}))},i.reject=function(t){return new i((function(e,n){n(t)}))},i.race=function(t){return new i((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},i._immediateFn="function"===typeof setImmediate?function(t){setImmediate(t)}:function(t){n(t,0)},i._unhandledRejectionFn=function(t){"undefined"!==typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},i._setImmediateFn=function(t){i._immediateFn=t},i._setUnhandledRejectionFn=function(t){i._unhandledRejectionFn=t},t.exports?t.exports=i:e.Promise||(e.Promise=i)})(e)})(n);var r=n.exports,o=function(){return"undefined"!==typeof window?window:Function("return this;")()}(),i={boltExport:o.Promise||r};return i}))})(void 0,jA,WA);var qA,$A=WA.exports.boltExport,GA=function(t){var e=L.none(),n=[],r=function(t){return GA((function(e){o((function(n){e(t(n))}))}))},o=function(t){u()?c(t):n.push(t)},i=function(t){u()||(e=L.some(t),a(n),n=[])},u=function(){return e.isSome()},a=function(t){G(t,c)},c=function(t){e.each((function(e){setTimeout((function(){t(e)}),0)}))};return t(i),{get:o,map:r,isReady:u}},KA=function(t){return GA((function(e){e(t)}))},XA={nu:GA,pure:KA},YA=function(t){setTimeout((function(){throw t}),0)},JA=function(t){var e=function(e){t().then(e,YA)},n=function(e){return JA((function(){return t().then(e)}))},r=function(e){return JA((function(){return t().then((function(t){return e(t).toPromise()}))}))},o=function(e){return JA((function(){return t().then((function(){return e.toPromise()}))}))},i=function(){return XA.nu(e)},u=function(){var e=null;return JA((function(){return null===e&&(e=t()),e}))},a=t;return{map:n,bind:r,anonBind:o,toLazy:i,toCached:u,toPromise:a,get:e}},QA=function(t){return JA((function(){return new $A(t)}))},ZA=function(t){return JA((function(){return $A.resolve(t)}))},tD={nu:QA,pure:ZA},eD=["input","textarea"],nD=function(t){var e=ae(t);return U(eD,e)},rD=function(t,e){var n=e.getRoot(t).getOr(t.element);as(n,e.invalidClass),e.notify.each((function(e){nD(t.element)&&Fn(t.element,"aria-invalid",!1),e.getContainer(t).each((function(t){Ka(t,e.validHtml)})),e.onValid(t)}))},oD=function(t,e,n,r){var o=e.getRoot(t).getOr(t.element);is(o,e.invalidClass),e.notify.each((function(e){nD(t.element)&&Fn(t.element,"aria-invalid",!0),e.getContainer(t).each((function(t){Ka(t,r)})),e.onInvalid(t,r)}))},iD=function(t,e,n){return e.validator.fold((function(){return tD.pure(ro.value(!0))}),(function(e){return e.validate(t)}))},uD=function(t,e,n){return e.notify.each((function(e){e.onValidate(t)})),iD(t,e).map((function(r){return t.getSystem().isConnected()?r.fold((function(r){return oD(t,e,n,r),ro.error(r)}),(function(n){return rD(t,e),ro.value(n)})):ro.error("No longer in system")}))},aD=function(t,e){var n=e.getRoot(t).getOr(t.element);return cs(n,e.invalidClass)},cD=Object.freeze({__proto__:null,markValid:rD,markInvalid:oD,query:iD,run:uD,isInvalid:aD}),sD=function(t,e){return t.validator.map((function(n){return _a([Ra(n.onEvent,(function(n){uD(n,t,e).get(x)}))].concat(n.validateOnLoad?[Ua((function(n){uD(n,t,e).get(p)}))]:[]))})).getOr({})},lD=Object.freeze({__proto__:null,events:sD}),fD=[Ai("invalidClass"),Ki("getRoot",L.none),$i("notify",[Ki("aria","alert"),Ki("getContainer",L.none),Ki("validHtml",""),al("onValid"),al("onInvalid"),al("onValidate")]),$i("validator",[Ai("validate"),Ki("onEvent","input"),Ki("validateOnLoad",!0)])],dD=hf({fields:fD,name:"invalidating",active:lD,apis:cD,extra:{validation:function(t){return function(e){var n=tp.getValue(e);return tD.pure(t(n))}}}}),mD=function(t,e,n,r){return n.getOrCreate(t,e,r)},gD=Object.freeze({__proto__:null,getCoupled:mD}),hD=[Di("others",bi(ro.value,ui()))],pD=function(){var t={},e=function(e,n,r){var o=ht(n.others);if(o)return Ot(t,r).getOrThunk((function(){var o=Ot(n.others,r).getOrDie("No information found for coupled component: "+r),i=o(e),u=e.getSystem().build(i);return t[r]=u,u}));throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(o,null,2))},n=w({});return Tc({readState:n,getOrCreate:e})},vD=Object.freeze({__proto__:null,init:pD}),bD=hf({fields:hD,name:"coupling",apis:gD,state:vD}),yD=w("sink"),wD=w(Bp({name:yD(),overrides:w({dom:{tag:"div"},behaviours:mf([Ig.config({useFixed:E})]),events:_a([Pa(Fu()),Pa(Nu()),Pa(Wu())])})}));(function(t){t[t["HighlightFirst"]=0]="HighlightFirst",t[t["HighlightNone"]=1]="HighlightNone"})(qA||(qA={}));var xD,CD=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}}))},SD=function(t,e,n){var r=t.fetch;return r(n).map(e)},kD=function(t,e,n,r,o,i,u){var a=SD(t,e,r),c=AD(r,t);return a.map((function(t){return t.bind((function(t){return L.from(Qx.sketch(A(A({},i.menu()),{uid:dc(""),data:t,highlightImmediately:u===qA.HighlightFirst,onOpenMenu:function(t,e){var r=c().getOrDie();Ig.position(r,e,{anchor:n}),bh.decloak(o)},onOpenSubmenu:function(t,e,n){var r=c().getOrDie();Ig.position(r,n,{anchor:{type:"submenu",item:e}}),bh.decloak(o)},onRepositionMenu:function(t,e,r){var o=c().getOrDie();Ig.position(o,e,{anchor:n}),G(r,(function(t){Ig.position(o,t.triggeredMenu,{anchor:{type:"submenu",item:t.triggeringItem}})}))},onEscape:function(){return Yw.focus(r),bh.close(o),L.some(!0)}})))}))}))},TD=function(t,e,n,r,o,i,u){var a=CD(t,n),c=kD(t,e,a,n,r,o,u);return c.map((function(t){return t.fold((function(){bh.isOpen(r)&&bh.close(r)}),(function(t){bh.cloak(r),bh.open(r,t),i(r)})),r}))},OD=function(t,e,n,r,o,i,u){return bh.close(r),tD.pure(r)},ED=function(t,e,n,r,o,i){var u=bD.getCoupled(n,"sandbox"),a=bh.isOpen(u),c=a?OD:TD;return c(t,e,n,u,r,o,i)},_D=function(t,e,n){var r=bv.getCurrent(e).getOr(e),o=vr(t.element);n?Kn(r.element,"min-width",o+"px"):pr(r.element,o)},AD=function(t,e){return t.getSystem().getByUid(e.uid+"-"+yD()).map((function(t){return function(){return ro.value(t)}})).getOrThunk((function(){return e.lazySink.fold((function(){return function(){return ro.error(new Error("No internal sink is specified, nor could an external sink be found"))}}),(function(e){return function(){return e(t)}}))}))},DD=function(t){bh.getState(t).each((function(t){Qx.repositionMenus(t)}))},MD=function(t,e,n){var r=Vs(),o=function(o,i){var u=CD(t,e);r.link(e.element),t.matchWidth&&_D(u.hotspot,i,t.useMinWidth),t.onOpen(u,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)},u=AD(e,t);return{dom:{tag:"div",classes:t.sandboxClasses,attributes:{id:r.id,role:"listbox"}},behaviours:op.augment(t.sandboxBehaviours,[tp.config({store:{mode:"memory",initialValue:e}}),bh.config({onOpen:o,onClose:i,isPartOf:function(t,n,r){return js(n,r)||js(e,r)},getAttachPoint:function(){return u().getOrDie()}}),bv.config({find:function(t){return bh.getState(t).bind((function(t){return bv.getCurrent(t)}))}}),yf.config({channels:A(A({},Sh({isExtraPart:O})),Th({doReposition:DD}))})])}},RD=function(t){var e=bD.getCoupled(t,"sandbox");DD(e)},ND=function(){return[Ki("sandboxClasses",[]),op.field("sandboxBehaviours",[bv,yf,bh,tp])]},zD=w([Ai("dom"),Ai("fetch"),al("onOpen"),cl("onExecute"),Ki("getHotspot",L.some),Ki("getAnchorOverrides",w({})),Pd(),ep("dropdownBehaviours",[hx,bD,Aw,Yw]),Ai("toggleClass"),Ki("eventOrder",{}),Fi("lazySink"),Ki("matchWidth",!1),Ki("useMinWidth",!1),Fi("role")].concat(ND())),BD=w([zp({schema:[ol()],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),wD()]),LD=function(t,e,n,r){var o,i=function(e){return Ot(t.dom,"attributes").bind((function(t){return Ot(t,e)}))},u=function(t){bh.getState(t).each((function(t){Qx.highlightPrimary(t)}))},a=function(e){var n=u;ED(t,x,e,r,n,qA.HighlightFirst).get(p)},c={expand:function(e){hx.isOn(e)||ED(t,x,e,r,p,qA.HighlightNone).get(p)},open:function(e){hx.isOn(e)||ED(t,x,e,r,p,qA.HighlightFirst).get(p)},isOpen:hx.isOn,close:function(e){hx.isOn(e)&&ED(t,x,e,r,p,qA.HighlightFirst).get(p)},repositionMenus:function(t){hx.isOn(t)&&RD(t)}},s=function(t,e){return ka(t),L.some(!0)};return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.dropdownBehaviours,[hx.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),bD.config({others:{sandbox:function(e){return MD(t,e,{onOpen:function(){return hx.on(e)},onClose:function(){return hx.off(e)}})}}}),Aw.config({mode:"special",onSpace:s,onEnter:s,onDown:function(t,e){if(HD.isOpen(t)){var n=bD.getCoupled(t,"sandbox");u(n)}else HD.open(t);return L.some(!0)},onEscape:function(t,e){return HD.isOpen(t)?(HD.close(t),L.some(!0)):L.none()}}),Yw.config({})]),events:vx(L.some(a)),eventOrder:A(A({},t.eventOrder),(o={},o[ea()]=["disabling","toggling","alloy.base.behaviour"],o)),apis:c,domModification:{attributes:A(A({"aria-haspopup":"true"},t.role.fold((function(){return{}}),(function(t){return{role:t}}))),"button"===t.dom.tag?{type:i("type").getOr("button")}:{})}}},HD=mv({name:"Dropdown",configFields:zD(),partFields:BD(),factory:LD,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)}}}),ID=function(){return Dc({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})},PD=function(){return _a([Aa(Ku(),E)])},FD=Object.freeze({__proto__:null,events:PD,exhibit:ID}),VD=hf({fields:[],name:"unselecting",active:FD}),UD=function(t,e){return HD.sketch({dom:t.dom,components:t.components,toggleClass:"mce-active",dropdownBehaviours:mf([mO.button(e.providers.isDisabled),cO(),VD.config({}),yA.config({})]),layouts:t.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:e.getSink,fetch:function(n){return tD.nu((function(e){return t.fetch(e)})).map((function(r){return L.from(R_(Co(n_(oc("menu-value"),r,(function(e){t.onItemAction(n,e)}),t.columns,t.presets,jS.CLOSE_ON_EXECUTE,O,e.providers),{movement:o_(t.columns,t.presets)})))}))},parts:{menu:pk(!1,1,t.presets)}})},jD=oc("color-input-change"),WD=oc("color-swatch-change"),qD=oc("color-picker-cancel"),$D=function(t,e,n){var r=hA.parts.field({factory:UA,inputClasses:["tox-textfield"],onSetValue:function(t){return dD.run(t).get(p)},inputBehaviours:mf([Hv.config({disabled:e.providers.isDisabled}),cO(),yA.config({}),dD.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return vn(t.element)},notify:{onValid:function(t){var e=tp.getValue(t);Sa(t,jD,{color:e})}},validator:{validateOnLoad:!1,validate:function(t){var e=tp.getValue(t);if(0===e.length)return tD.pure(ro.value(!0));var n=ee.fromTag("span");Kn(n,"background-color",e);var r=Zn(n,"background-color").fold((function(){return ro.error("blah")}),(function(t){return ro.value(e)}));return tD.pure(r)}}})]),selectOnFocus:!1}),o=t.label.map((function(t){return OA(t,e.providers)})),i=function(t,e){Sa(t,WD,{value:e})},u=function(t,e){a.getOpt(t).each((function(t){"custom"===e?n.colorPicker((function(e){e.fold((function(){return Ca(t,qD)}),(function(e){i(t,e),PE(e)}))}),"#ffffff"):i(t,"remove"===e?"":e)}))},a=kC(UD({dom:{tag:"span",attributes:{"aria-label":e.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Ul,Vl,$l]},onLtr:function(){return[Vl,Ul,$l]}},components:[],fetch:YE(n.getColors(),n.hasCustomColors()),columns:n.getColorCols(),presets:"color",onItemAction:u},e));return hA.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:o.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[r,a.asSpec()]}]),fieldBehaviours:mf([Vw("form-field-events",[Ra(jD,(function(e,n){a.getOpt(e).each((function(t){Kn(t.element,"background-color",n.event.color)})),Sa(e,EA,{name:t.name})})),Ra(WD,(function(t,e){hA.getField(t).each((function(n){tp.setValue(n,e.event.value),bv.getCurrent(t).each(Yw.focus)}))})),Ra(qD,(function(t,e){hA.getField(t).each((function(e){bv.getCurrent(t).each(Yw.focus)}))}))])])})},GD=Bp({schema:[Ai("dom")],name:"label"}),KD=function(t){return Bp({name:t+"-edge",overrides:function(e){var n=e.model.manager.edgeActions[t];return n.fold((function(){return{}}),(function(t){return{events:_a([Na(Au(),(function(e,n,r){return t(e,r)}),[e]),Na(Nu(),(function(e,n,r){return t(e,r)}),[e]),Na(zu(),(function(e,n,r){r.mouseIsDown.get()&&t(e,r)}),[e])])}}))}})},XD=KD("top-left"),YD=KD("top"),JD=KD("top-right"),QD=KD("right"),ZD=KD("bottom-right"),tM=KD("bottom"),eM=KD("bottom-left"),nM=KD("left"),rM=Np({name:"thumb",defaults:w({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:_a([Ha(Au(),t,"spectrum"),Ha(Du(),t,"spectrum"),Ha(Mu(),t,"spectrum"),Ha(Nu(),t,"spectrum"),Ha(zu(),t,"spectrum"),Ha(Lu(),t,"spectrum")])}}}),oM=Np({schema:[Ei("mouseIsDown",(function(){return ou(!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:mf([Aw.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)}}),Yw.config({})]),events:_a([Ra(Au(),r),Ra(Du(),r),Ra(Nu(),r),Ra(zu(),(function(e,n){t.mouseIsDown.get()&&r(e,n)}))])}}}),iM=[GD,nM,QD,YD,tM,XD,JD,eM,ZD,rM,oM],uM="slider.change.value",aM=w(uM),cM=function(t){return-1!==t.type.indexOf("touch")},sM=function(t){var e=t.event.raw;if(cM(e)){var n=e;return void 0!==n.touches&&1===n.touches.length?L.some(n.touches[0]).map((function(t){return lr(t.clientX,t.clientY)})):L.none()}var r=e;return void 0!==r.clientX?L.some(r).map((function(t){return lr(t.clientX,t.clientY)})):L.none()},lM="top",fM="right",dM="bottom",mM="left",gM=function(t){return t.model.minX},hM=function(t){return t.model.minY},pM=function(t){return t.model.minX-1},vM=function(t){return t.model.minY-1},bM=function(t){return t.model.maxX},yM=function(t){return t.model.maxY},wM=function(t){return t.model.maxX+1},xM=function(t){return t.model.maxY+1},CM=function(t,e,n){return e(t)-n(t)},SM=function(t){return CM(t,bM,gM)},kM=function(t){return CM(t,yM,hM)},TM=function(t){return SM(t)/2},OM=function(t){return kM(t)/2},EM=function(t){return t.stepSize},_M=function(t){return t.snapToGrid},AM=function(t){return t.snapStart},DM=function(t){return t.rounded},MM=function(t,e){return void 0!==t[e+"-edge"]},RM=function(t){return MM(t,mM)},NM=function(t){return MM(t,fM)},zM=function(t){return MM(t,lM)},BM=function(t){return MM(t,dM)},LM=function(t){return t.model.value.get()},HM=function(t){return{x:t}},IM=function(t){return{y:t}},PM=function(t,e){return{x:t,y:e}},FM=function(t,e){Sa(t,aM(),{value:e})},VM=function(t,e){FM(t,PM(pM(e),vM(e)))},UM=function(t,e){FM(t,IM(vM(e)))},jM=function(t,e){FM(t,PM(TM(e),vM(e)))},WM=function(t,e){FM(t,PM(wM(e),vM(e)))},qM=function(t,e){FM(t,HM(wM(e)))},$M=function(t,e){FM(t,PM(wM(e),OM(e)))},GM=function(t,e){FM(t,PM(wM(e),xM(e)))},KM=function(t,e){FM(t,IM(xM(e)))},XM=function(t,e){FM(t,PM(TM(e),xM(e)))},YM=function(t,e){FM(t,PM(pM(e),xM(e)))},JM=function(t,e){FM(t,HM(pM(e)))},QM=function(t,e){FM(t,PM(pM(e),OM(e)))},ZM=function(t,e,n,r){return t<e?t:t>n?n:t===e?e-1:Math.max(e,t-r)},tR=function(t,e,n,r){return t>n?t:t<e?e:t===n?n+1:Math.min(n,t+r)},eR=function(t,e,n){return Math.max(e,Math.min(n,t))},nR=function(t,e,n,r,o){return o.fold((function(){var o=t-e,i=Math.round(o/r)*r;return eR(e+i,e-1,n+1)}),(function(e){var o=(t-e)%r,i=Math.round(o/r),u=Math.floor((t-e)/r),a=Math.floor((n-e)/r),c=Math.min(a,u+i),s=e+c*r;return Math.max(e,s)}))},rR=function(t,e,n){return Math.min(n,Math.max(t,e))-e},oR=function(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.step,u=t.snap,a=t.snapStart,c=t.rounded,s=t.hasMinEdge,l=t.hasMaxEdge,f=t.minBound,d=t.maxBound,m=t.screenRange,g=s?e-1:e,h=l?n+1:n;if(o<f)return g;if(o>d)return h;var p=rR(o,f,d),v=eR(p/m*r+e,g,h);return u&&v>=e&&v<=n?nR(v,e,n,i,a):c?Math.round(v):v},iR=function(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.hasMinEdge,u=t.hasMaxEdge,a=t.maxBound,c=t.maxOffset,s=t.centerMinEdge,l=t.centerMaxEdge;return o<e?i?0:s:o>n?u?a:l:(o-e)/r*c},uR="top",aR="right",cR="bottom",sR="left",lR="width",fR="height",dR=function(t){return t.element.dom.getBoundingClientRect()},mR=function(t,e){return t[e]},gR=function(t){var e=dR(t);return mR(e,sR)},hR=function(t){var e=dR(t);return mR(e,aR)},pR=function(t){var e=dR(t);return mR(e,uR)},vR=function(t){var e=dR(t);return mR(e,cR)},bR=function(t){var e=dR(t);return mR(e,lR)},yR=function(t){var e=dR(t);return mR(e,fR)},wR=function(t,e,n){return(t+e)/2-n},xR=function(t,e){var n=dR(t),r=dR(e),o=mR(n,sR),i=mR(n,aR),u=mR(r,sR);return wR(o,i,u)},CR=function(t,e){var n=dR(t),r=dR(e),o=mR(n,uR),i=mR(n,cR),u=mR(r,uR);return wR(o,i,u)},SR=function(t,e){Sa(t,aM(),{value:e})},kR=function(t){return{x:t}},TR=function(t,e,n){var r={min:gM(e),max:bM(e),range:SM(e),value:n,step:EM(e),snap:_M(e),snapStart:AM(e),rounded:DM(e),hasMinEdge:RM(e),hasMaxEdge:NM(e),minBound:gR(t),maxBound:hR(t),screenRange:bR(t)};return oR(r)},OR=function(t,e,n){var r=TR(t,e,n),o=kR(r);return SR(t,o),r},ER=function(t,e){var n=gM(e);SR(t,kR(n))},_R=function(t,e){var n=bM(e);SR(t,kR(n))},AR=function(t,e,n){var r=t>0?tR:ZM,o=r(LM(n).x,gM(n),bM(n),EM(n));return SR(e,kR(o)),L.some(o)},DR=function(t){return function(e,n){return AR(t,e,n).map(E)}},MR=function(t){var e=sM(t);return e.map((function(t){return t.left}))},RR=function(t,e,n,r,o){var i=0,u=bR(t),a=r.bind((function(e){return L.some(xR(e,t))})).getOr(i),c=o.bind((function(e){return L.some(xR(e,t))})).getOr(u),s={min:gM(e),max:bM(e),range:SM(e),value:n,hasMinEdge:RM(e),hasMaxEdge:NM(e),minBound:gR(t),minOffset:i,maxBound:hR(t),maxOffset:u,centerMinEdge:a,centerMaxEdge:c};return iR(s)},NR=function(t,e,n,r,o,i){var u=RR(e,i,n,r,o);return gR(e)-gR(t)+u},zR=function(t,e,n,r){var o=LM(n),i=NR(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),u=vr(e.element)/2;Kn(e.element,"left",i-u+"px")},BR=DR(-1),LR=DR(1),HR=L.none,IR=L.none,PR={"top-left":L.none(),top:L.none(),"top-right":L.none(),right:L.some(qM),"bottom-right":L.none(),bottom:L.none(),"bottom-left":L.none(),left:L.some(JM)},FR=Object.freeze({__proto__:null,setValueFrom:OR,setToMin:ER,setToMax:_R,findValueOfOffset:TR,getValueFromEvent:MR,findPositionOfValue:NR,setPositionFromValue:zR,onLeft:BR,onRight:LR,onUp:HR,onDown:IR,edgeActions:PR}),VR=function(t,e){Sa(t,aM(),{value:e})},UR=function(t){return{y:t}},jR=function(t,e,n){var r={min:hM(e),max:yM(e),range:kM(e),value:n,step:EM(e),snap:_M(e),snapStart:AM(e),rounded:DM(e),hasMinEdge:zM(e),hasMaxEdge:BM(e),minBound:pR(t),maxBound:vR(t),screenRange:yR(t)};return oR(r)},WR=function(t,e,n){var r=jR(t,e,n),o=UR(r);return VR(t,o),r},qR=function(t,e){var n=hM(e);VR(t,UR(n))},$R=function(t,e){var n=yM(e);VR(t,UR(n))},GR=function(t,e,n){var r=t>0?tR:ZM,o=r(LM(n).y,hM(n),yM(n),EM(n));return VR(e,UR(o)),L.some(o)},KR=function(t){return function(e,n){return GR(t,e,n).map(E)}},XR=function(t){var e=sM(t);return e.map((function(t){return t.top}))},YR=function(t,e,n,r,o){var i=0,u=yR(t),a=r.bind((function(e){return L.some(CR(e,t))})).getOr(i),c=o.bind((function(e){return L.some(CR(e,t))})).getOr(u),s={min:hM(e),max:yM(e),range:kM(e),value:n,hasMinEdge:zM(e),hasMaxEdge:BM(e),minBound:pR(t),minOffset:i,maxBound:vR(t),maxOffset:u,centerMinEdge:a,centerMaxEdge:c};return iR(s)},JR=function(t,e,n,r,o,i){var u=YR(e,i,n,r,o);return pR(e)-pR(t)+u},QR=function(t,e,n,r){var o=LM(n),i=JR(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),u=ur(e.element)/2;Kn(e.element,"top",i-u+"px")},ZR=L.none,tN=L.none,eN=KR(-1),nN=KR(1),rN={"top-left":L.none(),top:L.some(UM),"top-right":L.none(),right:L.none(),"bottom-right":L.none(),bottom:L.some(KM),"bottom-left":L.none(),left:L.none()},oN=Object.freeze({__proto__:null,setValueFrom:WR,setToMin:qR,setToMax:$R,findValueOfOffset:jR,getValueFromEvent:XR,findPositionOfValue:JR,setPositionFromValue:QR,onLeft:ZR,onRight:tN,onUp:eN,onDown:nN,edgeActions:rN}),iN=function(t,e){Sa(t,aM(),{value:e})},uN=function(t,e){return{x:t,y:e}},aN=function(t,e,n){var r=TR(t,e,n.left),o=jR(t,e,n.top),i=uN(r,o);return iN(t,i),i},cN=function(t,e,n,r){var o=t>0?tR:ZM,i=e?LM(r).x:o(LM(r).x,gM(r),bM(r),EM(r)),u=e?o(LM(r).y,hM(r),yM(r),EM(r)):LM(r).y;return iN(n,uN(i,u)),L.some(i)},sN=function(t,e){return function(n,r){return cN(t,e,n,r).map(E)}},lN=function(t,e){var n=gM(e),r=hM(e);iN(t,uN(n,r))},fN=function(t,e){var n=bM(e),r=yM(e);iN(t,uN(n,r))},dN=function(t){return sM(t)},mN=function(t,e,n,r){var o=LM(n),i=NR(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),u=JR(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),a=vr(e.element)/2,c=ur(e.element)/2;Kn(e.element,"left",i-a+"px"),Kn(e.element,"top",u-c+"px")},gN=sN(-1,!1),hN=sN(1,!1),pN=sN(-1,!0),vN=sN(1,!0),bN={"top-left":L.some(VM),top:L.some(jM),"top-right":L.some(WM),right:L.some($M),"bottom-right":L.some(GM),bottom:L.some(XM),"bottom-left":L.some(YM),left:L.some(QM)},yN=Object.freeze({__proto__:null,setValueFrom:aN,setToMin:lN,setToMax:fN,getValueFromEvent:dN,setPositionFromValue:mN,onLeft:gN,onRight:hN,onUp:pN,onDown:vN,edgeActions:bN}),wN=[Ki("stepSize",1),Ki("onChange",p),Ki("onChoose",p),Ki("onInit",p),Ki("onDragStart",p),Ki("onDragEnd",p),Ki("snapToGrid",!1),Ki("rounded",!0),Fi("snapStart"),Di("model",ki("mode",{x:[Ki("minX",0),Ki("maxX",100),Ei("value",(function(t){return ou(t.mode.minX)})),Ai("getInitialValue"),fl("manager",FR)],y:[Ki("minY",0),Ki("maxY",100),Ei("value",(function(t){return ou(t.mode.minY)})),Ai("getInitialValue"),fl("manager",oN)],xy:[Ki("minX",0),Ki("maxX",100),Ki("minY",0),Ki("maxY",100),Ei("value",(function(t){return ou({x:t.mode.minX,y:t.mode.minY})})),Ai("getInitialValue"),fl("manager",yN)]})),ep("sliderBehaviours",[Aw,tp]),Ei("mouseIsDown",(function(){return ou(!1)}))],xN=function(t,e,n,r){var o,i=function(e){return Xp(e,t,"thumb")},u=function(e){return Xp(e,t,"spectrum")},a=function(e){return Kp(e,t,"left-edge")},c=function(e){return Kp(e,t,"right-edge")},s=function(e){return Kp(e,t,"top-edge")},l=function(e){return Kp(e,t,"bottom-edge")},f=t.model,d=f.manager,m=function(e,n){d.setPositionFromValue(e,n,t,{getLeftEdge:a,getRightEdge:c,getTopEdge:s,getBottomEdge:l,getSpectrum:u})},g=function(t,e){f.value.set(e);var n=i(t);m(t,n)},h=function(e,n){g(e,n);var r=i(e);return t.onChange(e,r,n),L.some(!0)},p=function(e){d.setToMin(e,t)},v=function(e){d.setToMax(e,t)},b=function(e){var n=function(){Kp(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:rp(t.sliderBehaviours,[Aw.config({mode:"special",focusIn:function(e){return Kp(e,t,"spectrum").map(Aw.focusIn).map(E)}}),tp.config({store:{mode:"manual",getValue:function(t){return f.value.get()}}}),yf.config({channels:(o={},o[xh()]={onReceive:b},o)})]),events:_a([Ra(aM(),(function(t,e){h(t,e.event.value)})),Ua((function(e,n){var r=f.getInitialValue();f.value.set(r);var o=i(e);m(e,o);var a=u(e);t.onInit(e,o,a,f.value.get())})),Ra(Au(),y),Ra(Mu(),w),Ra(Nu(),y),Ra(Lu(),w)]),apis:{resetToMin:p,resetToMax:v,setValue:g,refresh:m},domModification:{styles:{position:"relative"}}}},CN=mv({name:"Slider",configFields:wN,partFields:iM,factory:xN,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)}}}),SN=oc("rgb-hex-update"),kN=oc("slider-update"),TN=oc("palette-update"),ON=function(t,e){var n=CN.parts.spectrum({dom:{tag:"div",classes:[e("hue-slider-spectrum")],attributes:{role:"presentation"}}}),r=CN.parts.thumb({dom:{tag:"div",classes:[e("hue-slider-thumb")],attributes:{role:"presentation"}}});return CN.sketch({dom:{tag:"div",classes:[e("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:w({y:0})},components:[n,r],sliderBehaviours:mf([Yw.config({})]),onChange:function(t,e,n){Sa(t,kN,{value:n})}})},EN="form",_N=[ep("formBehaviours",[tp])],AN=function(t){return"<alloy.field."+t+">"},DN=function(t){var e=function(){var t=[],e=function(e,n){return t.push(e),jp(EN,AN(e),n)};return{field:e,record:w(t)}}(),n=t(e),r=e.record(),o=$(r,(function(t){return Np({name:t,pname:AN(t)})}));return uv(EN,_N,o,RN,n)},MN=function(t,e){return t.fold((function(){return ro.error(e)}),ro.value)},RN=function(t,e){return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.formBehaviours,[tp.config({store:{mode:"manual",getValue:function(e){var n=Jp(e,t);return bt(n,(function(t,e){return t().bind((function(t){var n=bv.getCurrent(t);return MN(n,new Error("Cannot find a current component to extract the value from for form part '"+e+"': "+Za(t.element)))})).map(tp.getValue)}))},setValue:function(e,n){vt(n,(function(n,r){Kp(e,t,r).each((function(t){bv.getCurrent(t).each((function(t){tp.setValue(t,n)}))}))}))}}})]),apis:{getField:function(e,n){return Kp(e,t,n).bind(bv.getCurrent)}}}},NN={getField:Sc((function(t,e,n){return t.getField(e,n)})),sketch:DN},zN=oc("valid-input"),BN=oc("invalid-input"),LN=oc("validating-input"),HN="colorcustom.rgb.",IN=function(t,e,n,r){var o=function(n,r){return dD.config({invalidClass:e("invalid"),notify:{onValidate:function(t){Sa(t,LN,{type:n})},onValid:function(t){Sa(t,zN,{type:n,value:tp.getValue(t)})},onInvalid:function(t){Sa(t,BN,{type:n,value:tp.getValue(t)})}},validator:{validate:function(e){var n=tp.getValue(e),o=r(n)?ro.value(!0):ro.error(t("aria.input.invalid"));return tD.pure(o)},validateOnLoad:!1}})},i=function(n,r,i,u,a){var c=t(HN+"range"),s=hA.parts.label({dom:{tag:"label",innerHtml:i,attributes:{"aria-label":u}}}),l=hA.parts.field({data:a,factory:UA,inputAttributes:A({type:"text"},"hex"===r?{"aria-live":"polite"}:{}),inputClasses:[e("textfield")],inputBehaviours:mf([o(r,n),yA.config({})]),onSetValue:function(t){if(dD.isInvalid(t)){var e=dD.run(t);e.get(p)}}}),f=[s,l],d="hex"!==r?[hA.parts["aria-descriptor"]({text:c})]:[],m=f.concat(d);return{dom:{tag:"div",attributes:{role:"presentation"}},components:m}},u=function(t,e){var n=eE(e);return NN.getField(t,"hex").each((function(e){Yw.isFocused(e)||tp.setValue(t,{hex:n.value})})),n},a=function(t,e){var n=e.red,r=e.green,o=e.blue;tp.setValue(t,{red:n,green:r,blue:o})},c=kC({dom:{tag:"div",classes:[e("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),s=function(t,e){c.getOpt(t).each((function(t){Kn(t.element,"background-color","#"+e.value)}))},l=function(){var o={red:ou(L.some(255)),green:ou(L.some(255)),blue:ou(L.some(255)),hex:ou(L.some("ffffff"))},l=function(t,e){var n=lE(e);a(t,n),g(n)},f=function(t){return o[t].get()},d=function(t,e){o[t].set(e)},m=function(){return f("red").bind((function(t){return f("green").bind((function(e){return f("blue").map((function(n){return aE(t,e,n,1)}))}))}))},g=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))},h=function(t,e){var n=e.event;"hex"!==n.type?d(n.type,L.none()):r(t)},p=function(t,e){n(t);var r=$O(e);d("hex",L.some(e));var o=lE(r);a(t,o),g(o),Sa(t,SN,{hex:r}),s(t,r)},v=function(t,e,n){var r=parseInt(n,10);d(e,L.some(r)),m().each((function(e){var n=u(t,e);Sa(t,SN,{hex:n}),s(t,n)}))},b=function(t){return"hex"===t.type},y=function(t,e){var n=e.event;b(n)?p(t,n.value):v(t,n.type,n.value)},w=function(e){return{label:t(HN+e+".label"),description:t(HN+e+".description")}},x=w("red"),C=w("green"),S=w("blue"),k=w("hex");return Co(NN.sketch((function(n){return{dom:{tag:"form",classes:[e("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[n.field("red",hA.sketch(i(cE,"red",x.label,x.description,255))),n.field("green",hA.sketch(i(cE,"green",C.label,C.description,255))),n.field("blue",hA.sketch(i(cE,"blue",S.label,S.description,255))),n.field("hex",hA.sketch(i(XO,"hex",k.label,k.description,"ffffff"))),c.asSpec()],formBehaviours:mf([dD.config({invalidClass:e("form-invalid")}),Vw("rgb-form-events",[Ra(zN,y),Ra(BN,h),Ra(LN,h)])])}})),{apis:{updateHex:function(t,e){tp.setValue(t,{hex:e.value}),l(t,e),s(t,e)}}})},f=dv({factory:l,name:"RgbForm",configFields:[],apis:{updateHex:function(t,e,n){t.updateHex(e,n)}},extraApis:{}});return f},PN=function(t,e){var n=CN.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[e("sv-palette-spectrum")]}}),r=CN.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette-thumb")],innerHtml:"<div class="+e("sv-palette-inner-thumb")+' role="presentation"></div>'}}),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 u=o.createLinearGradient(0,0,0,r);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),o.fillStyle=u,o.fillRect(0,0,n,r)}},i=function(t,e){var n=t.components()[0].element.dom,r=xE(e,100,100),i=sE(r);o(n,mE(i))},u=function(t,e){var n=CE(lE(e));CN.setValue(t,{x:n.saturation,y:100-n.value})},a=function(t){var i=w({x:0,y:0}),u=function(t,e,n){Sa(t,TN,{value:n})},a=function(t,e,n,r){o(n.element.dom,mE(gE))},c=mf([bv.config({find:L.some}),Yw.config({})]);return CN.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette")]},model:{mode:"xy",getInitialValue:i},rounded:!1,components:[n,r],onChange:u,onInit:a,sliderBehaviours:c})},c=dv({factory:a,name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,e,n){i(e,n)},setThumb:function(t,e,n){u(e,n)}},extraApis:{}});return c},FN=function(t,e){var n=function(n){var r=IN(t,e,n.onValidHex,n.onInvalidHex),o=PN(t,e),i=function(t){return(100-t)/100*360},u=function(t){return 100-t/360*100},a={paletteRgba:ou(gE),paletteHue:ou(0)},c=kC(ON(t,e)),s=kC(o.sketch({})),l=kC(r.sketch({})),f=function(t,e,n){s.getOpt(t).each((function(t){o.setHue(t,n)}))},d=function(t,e){l.getOpt(t).each((function(t){r.updateHex(t,e)}))},m=function(t,e,n){c.getOpt(t).each((function(t){CN.setValue(t,{y:u(n)})}))},g=function(t,e){s.getOpt(t).each((function(t){o.setThumb(t,e)}))},h=function(t,e){var n=lE(t);a.paletteRgba.set(n),a.paletteHue.set(e)},p=function(t,e,n,r){h(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=a.paletteHue.get(),i=xE(o,r.x,100-r.y),u=kE(i);p(e,u,o,t)}},b=function(){var t=[f,d];return function(e,n){var r=i(n.event.value.y),o=a.paletteRgba.get(),u=CE(o),c=xE(r,u.saturation,u.value),s=kE(c);p(e,s,r,t)}},y=function(){var t=[f,m,g];return function(e,n){var r=n.event.hex,o=SE(r);p(e,r,o.hue,t)}};return{uid:n.uid,dom:n.dom,components:[s.asSpec(),c.asSpec(),l.asSpec()],behaviours:mf([Vw("colour-picker-events",[Ra(SN,y()),Ra(TN,v()),Ra(kN,b())]),bv.config({find:function(t){return l.getOpt(t)}}),Aw.config({mode:"acyclic"})])}},r=dv({name:"ColourPicker",configFields:[Ai("dom"),Ki("onValidHex",p),Ki("onInvalidHex",p)],factory:n});return r},VN=function(){return bv.config({find:L.some})},UN=function(t){return bv.config({find:t.getOpt})},jN=function(t){return bv.config({find:function(e){return Cn(e.element,t).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))}})},WN={self:VN,memento:UN,childAt:jN},qN={"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"},$N=function(t){return qN[t]},GN=function(t){return $N(t)},KN=function(t){var e=function(t){return"tox-"+t},n=FN(GN,e),r=function(t){Sa(t,DA,{name:"hex-valid",value:!0})},o=function(t){Sa(t,DA,{name:"hex-valid",value:!1})},i=kC(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:mf([tp.config({store:{mode:"manual",getValue:function(t){var e=i.get(t),n=bv.getCurrent(e),r=n.bind((function(t){var e=tp.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),u=bv.getCurrent(o);u.fold((function(){console.log("Can not find form")}),(function(t){tp.setValue(t,{hex:L.from(r[1]).getOr("")}),NN.getField(t,"hex").each((function(t){Ca(t,Uu())}))}))}}}),WN.self()])}},XN=tinymce.util.Tools.resolve("tinymce.Resource"),YN=function(t){return Et(t,"init")},JN=function(t){var e=od(),n=kC({dom:{tag:t.tag}}),r=od();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:mf([Vw("custom-editor-events",[Ua((function(o){n.getOpt(o).each((function(n){(YN(t)?t.init(n.element.dom):XN.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)}))}))}))]),tp.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)}))}}}),WN.self()]),components:[n.asSpec()]}},QN=tinymce.util.Tools.resolve("tinymce.util.Tools"),ZN=ti([Ki("preprocess",x),Ki("postprocess",x)]),tz=function(t,e){var n=Ci("RepresentingConfigs.memento processors",ZN,e);return tp.config({store:{mode:"manual",getValue:function(e){var r=t.get(e),o=tp.getValue(r);return n.postprocess(o)},setValue:function(e,r){var o=n.preprocess(r),i=t.get(e);tp.setValue(i,o)}}})},ez=function(t,e,n){return tp.config(Co({store:{mode:"manual",getValue:e,setValue:n}},t.map((function(t){return{store:{initialValue:t}}})).getOr({})))},nz=function(t,e,n){return ez(t,(function(t){return e(t.element)}),(function(t,e){return n(t.element,e)}))},rz=function(t){return nz(t,ds,ms)},oz=function(t){return nz(t,Ga,Ka)},iz=function(t){return tp.config({store:{mode:"memory",initialValue:t}})},uz={memento:tz,withElement:nz,withComp:ez,domValue:rz,domHtml:oz,memory:iz},az="jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",cz=function(t,e){var n=QN.explode(e.getSetting("images_file_types",az,"string")),r=function(t){return j(n,(function(e){return Wt(t.name.toLowerCase(),"."+e.toLowerCase())}))};return Y(mt(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(!Hv.isDisabled(t)){var n=e.event.raw;u(t,n.dataTransfer.files)}},i=function(t,e){var n=e.event.raw.target;u(t,n.files)},u=function(n,r){tp.setValue(n,cz(r,e)),Sa(n,EA,{name:t.name})},a=kC({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:mf([Vw("input-file-events",[Pa(Wu()),Pa(ra())])])}),c=function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:mf([uz.memory([]),WN.self(),Hv.config({}),hx.config({toggleClass:"dragenter",toggleOnExecute:!1}),Vw("dropzone-events",[Ra("dragenter",r([n,hx.toggle])),Ra("dragleave",r([n,hx.toggle])),Ra("dragover",n),Ra("drop",r([n,o])),Ra(ju(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:e.translate("Drop an image here")}},SC.sketch({dom:{tag:"button",innerHtml:e.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[a.asSpec()],action:function(t){var e=a.get(t);e.element.dom.click()},buttonBehaviours:mf([yA.config({}),mO.button(e.isDisabled),cO()])})]}]}},s=t.label.map((function(t){return OA(t,e)})),l=hA.parts.field({factory:{sketch:c}});return xA(s,l,["tox-form__group--stretched"],[])},lz=function(t,e){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:$(t.items,e.interpreter)}},fz=oc("alloy-fake-before-tabstop"),dz=oc("alloy-fake-after-tabstop"),mz=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:mf([Yw.config({ignore:!0}),yA.config({})])}},gz=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[mz([fz]),t,mz([dz])],behaviours:mf([WN.childAt(1)])}},hz=function(t,e){Sa(t,Fu(),{raw:{which:9,shiftKey:e}})},pz=function(t,e){var n=e.element;cs(n,fz)?hz(t,!0):cs(n,dz)&&hz(t,!1)},vz=function(t){return L_(t,["."+fz,"."+dz].join(","),O)},bz=!(en().browser.isIE()||en().browser.isEdge()),yz=function(t){var e=ou("");return{getValue:function(t){return e.get()},setValue:function(n,r){if(t)Fn(n.element,"srcdoc",r);else{Fn(n.element,"src","javascript:''");var o=n.element.dom.contentWindow.document;o.open(),o.write(r),o.close()}e.set(r)}}},wz=function(t,e){var n=bz&&t.sandboxed,r=A(A({},t.label.map((function(t){return{title:t}})).getOr({})),n?{sandbox:"allow-scripts allow-same-origin"}:{}),o=yz(n),i=t.label.map((function(t){return OA(t,e)})),u=function(t){return gz({uid:t.uid,dom:{tag:"iframe",attributes:r},behaviours:mf([yA.config({}),Yw.config({}),uz.withComp(L.none(),o.getValue,o.setValue)])})},a=hA.parts.field({factory:{sketch:u}});return xA(i,a,["tox-form__group--stretched"],[])},xz=function(t,e){return kz(document.createElement("canvas"),t,e)},Cz=function(t){var e=xz(t.width,t.height),n=Sz(e);return n.drawImage(t,0,0),e},Sz=function(t){return t.getContext("2d")},kz=function(t,e,n){return t.width=e,t.height=n,t},Tz=function(t){return t.naturalWidth||t.width},Oz=function(t){return t.naturalHeight||t.height},Ez=function(t){return new $A((function(e,n){var r=URL.createObjectURL(t),o=new Image,i=function(){o.removeEventListener("load",u),o.removeEventListener("error",a)},u=function(){i(),e(o)},a=function(){i(),n("Unable to load data of type "+t.type+": "+r)};o.addEventListener("load",u),o.addEventListener("error",a),o.src=r,o.complete&&setTimeout(u,0)}))},_z=function(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return L.none();for(var r=n[1],o=e[1],i=1024,u=atob(o),a=u.length,c=Math.ceil(a/i),s=new Array(c),l=0;l<c;++l){for(var f=l*i,d=Math.min(f+i,a),m=new Array(d-f),g=f,h=0;g<d;++h,++g)m[h]=u[g].charCodeAt(0);s[l]=new Uint8Array(m)}return L.some(new Blob(s,{type:r}))},Az=function(t){return new $A((function(e,n){_z(t).fold((function(){n("uri is not base64: "+t)}),e)}))},Dz=function(t,e,n){return e=e||"image/png",m(HTMLCanvasElement.prototype.toBlob)?new $A((function(r,o){t.toBlob((function(t){t?r(t):o()}),e,n)})):Az(t.toDataURL(e,n))},Mz=function(t,e,n){return e=e||"image/png",t.toDataURL(e,n)},Rz=function(t){return Ez(t).then((function(t){zz(t);var e=xz(Tz(t),Oz(t)),n=Sz(e);return n.drawImage(t,0,0),e}))},Nz=function(t){return new $A((function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)}))},zz=function(t){URL.revokeObjectURL(t.src)},Bz=function(t,e,n){var r=e.type,o=w(r),i=function(){return $A.resolve(e)},u=w(n),a=function(){return n.split(",")[1]},c=function(e,n){return t.then((function(t){return Dz(t,e,n)}))},s=function(e,n){return t.then((function(t){return Mz(t,e,n)}))},l=function(t,e){return s(t,e).then((function(t){return t.split(",")[1]}))},f=function(){return t.then(Cz)};return{getType:o,toBlob:i,toDataURL:u,toBase64:a,toAdjustedBlob:c,toAdjustedDataURL:s,toAdjustedBase64:l,toCanvas:f}},Lz=function(t){return Nz(t).then((function(e){return Bz(Rz(t),t,e)}))},Hz=function(t,e){return Dz(t,e).then((function(e){return Bz($A.resolve(t),e,t.toDataURL())}))},Iz=function(t){return Lz(t)},Pz=function(t,e,n){var r="string"===typeof t?parseFloat(t):t;return r>n?r=n:r<e&&(r=e),r},Fz=function(){return[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]},Vz=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],Uz=function(t,e){for(var n,r=[],o=new Array(25),i=0;i<5;i++){for(var u=0;u<5;u++)r[u]=e[u+5*i];for(u=0;u<5;u++){n=0;for(var a=0;a<5;a++)n+=t[u+5*a]*r[a];o[u+5*i]=n}}return o},jz=function(t,e){var n;return e=Pz(e,-1,1),e*=100,e<0?n=127+e/100*127:(n=e%1,n=0===n?Vz[e]:Vz[Math.floor(e)]*(1-n)+Vz[Math.floor(e)+1]*n,n=127*n+127),Uz(t,[n/127,0,0,0,.5*(127-n),0,n/127,0,0,.5*(127-n),0,0,n/127,0,.5*(127-n),0,0,0,1,0,0,0,0,0,1])},Wz=function(t,e){return e=Pz(255*e,-255,255),Uz(t,[1,0,0,0,e,0,1,0,0,e,0,0,1,0,e,0,0,0,1,0,0,0,0,0,1])},qz=function(t,e,n,r){return e=Pz(e,0,2),n=Pz(n,0,2),r=Pz(r,0,2),Uz(t,[e,0,0,0,0,0,n,0,0,0,0,0,r,0,0,0,0,0,1,0,0,0,0,0,1])},$z=function(t,e){return t.toCanvas().then((function(n){return Gz(n,t.getType(),e)}))},Gz=function(t,e,n){var r=Sz(t),o=function(t,e){for(var n,r,o,i,u=t.data,a=e[0],c=e[1],s=e[2],l=e[3],f=e[4],d=e[5],m=e[6],g=e[7],h=e[8],p=e[9],v=e[10],b=e[11],y=e[12],w=e[13],x=e[14],C=e[15],S=e[16],k=e[17],T=e[18],O=e[19],E=0;E<u.length;E+=4)n=u[E],r=u[E+1],o=u[E+2],i=u[E+3],u[E]=n*a+r*c+o*s+i*l+f,u[E+1]=n*d+r*m+o*g+i*h+p,u[E+2]=n*v+r*b+o*y+i*w+x,u[E+3]=n*C+r*S+o*k+i*T+O;return t},i=o(r.getImageData(0,0,t.width,t.height),n);return r.putImageData(i,0,0),Hz(t,e)},Kz=function(t,e){return t.toCanvas().then((function(n){return Xz(n,t.getType(),e)}))},Xz=function(t,e,n){var r=Sz(t),o=function(t,e,n){for(var r=function(t,e,n){return t>n?t=n:t<e&&(t=e),t},o=Math.round(Math.sqrt(n.length)),i=Math.floor(o/2),u=t.data,a=e.data,c=t.width,s=t.height,l=0;l<s;l++)for(var f=0;f<c;f++){for(var d=0,m=0,g=0,h=0;h<o;h++)for(var p=0;p<o;p++){var v=r(f+p-i,0,c-1),b=r(l+h-i,0,s-1),y=4*(b*c+v),w=n[h*o+p];d+=u[y]*w,m+=u[y+1]*w,g+=u[y+2]*w}var x=4*(l*c+f);a[x]=r(d,0,255),a[x+1]=r(m,0,255),a[x+2]=r(g,0,255)}return e},i=r.getImageData(0,0,t.width,t.height),u=r.getImageData(0,0,t.width,t.height);return u=o(i,u,n),r.putImageData(u,0,0),Hz(t,e)},Yz=function(t){var e=function(e,n,r){for(var o=Sz(e),i=new Array(256),u=function(t,e){for(var n=t.data,r=0;r<n.length;r+=4)n[r]=e[n[r]],n[r+1]=e[n[r+1]],n[r+2]=e[n[r+2]];return t},a=0;a<i.length;a++)i[a]=t(a,r);var c=u(o.getImageData(0,0,e.width,e.height),i);return o.putImageData(c,0,0),Hz(e,n)};return function(t,n){return t.toCanvas().then((function(r){return e(r,t.getType(),n)}))}},Jz=function(t){return function(e,n){return $z(e,t(Fz(),n))}},Qz=function(t){return function(e){return $z(e,t)}},Zz=function(t){return function(e){return Kz(e,t)}},tB=Qz([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1]),eB=Jz(Wz),nB=Jz(jz),rB=function(t,e,n,r){return $z(t,qz(Fz(),e,n,r))},oB=Zz([0,-1,0,-1,5,-1,0,-1,0]),iB=Yz((function(t,e){return 255*Math.pow(t/255,1-e)})),uB=function(t,e,n){var r=Tz(t),o=Oz(t),i=e/r,u=n/o,a=!1;(i<.5||i>2)&&(i=i<.5?.5:2,a=!0),(u<.5||u>2)&&(u=u<.5?.5:2,a=!0);var c=aB(t,i,u);return a?c.then((function(t){return uB(t,e,n)})):c},aB=function(t,e,n){return new $A((function(r){var o=Tz(t),i=Oz(t),u=Math.floor(o*e),a=Math.floor(i*n),c=xz(u,a),s=Sz(c);s.drawImage(t,0,0,o,i,0,0,u,a),r(c)}))},cB=function(t,e){void 0===e&&(e=2);var n=Math.pow(10,e),r=Math.round(t*n);return Math.ceil(r/n)},sB=function(t,e){return t.toCanvas().then((function(n){return lB(n,t.getType(),e)}))},lB=function(t,e,n){var r=n<0?360+n:n,o=r*Math.PI/180,i=t.width,u=t.height,a=Math.sin(o),c=Math.cos(o),s=cB(Math.abs(i*c)+Math.abs(u*a)),l=cB(Math.abs(i*a)+Math.abs(u*c)),f=xz(s,l),d=Sz(f);return d.translate(s/2,l/2),d.rotate(o),d.drawImage(t,-i/2,-u/2),Hz(f,e)},fB=function(t,e){return t.toCanvas().then((function(n){return dB(n,t.getType(),e)}))},dB=function(t,e,n){var r=xz(t.width,t.height),o=Sz(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),Hz(r,e)},mB=function(t,e,n,r,o){return t.toCanvas().then((function(i){return gB(i,t.getType(),e,n,r,o)}))},gB=function(t,e,n,r,o,i){var u=xz(o,i),a=Sz(u);return a.drawImage(t,-n,-r),Hz(u,e)},hB=function(t,e,n){return t.toCanvas().then((function(r){return uB(r,e,n).then((function(e){return Hz(e,t.getType())}))}))},pB=function(t){return tB(t)},vB=function(t){return oB(t)},bB=function(t,e){return iB(t,e)},yB=function(t,e,n,r){return rB(t,e,n,r)},wB=function(t,e){return eB(t,e)},xB=function(t,e){return nB(t,e)},CB=function(t,e){return fB(t,e)},SB=function(t,e,n,r,o){return mB(t,e,n,r,o)},kB=function(t,e,n){return hB(t,e,n)},TB=function(t,e){return sB(t,e)},OB=function(t,e,n){return LC(t,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:n},e)},EB=function(t,e){return OB(t,e,[])},_B=function(t,e){return OB(t,e,[Pw.config({})])},AB=function(t,e,n){return{dom:{tag:"span",innerHtml:n.translate(t),classes:[e+"__select-label"]},behaviours:mf([Pw.config({})])}},DB=oc("toolbar.button.execute"),MB=function(t){return qa((function(e,n){gO(t,e)((function(n){Sa(e,DB,{buttonApi:n}),t.onAction(n)}))}))},RB=(xD={},xD[ea()]=["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],xD),NB=oc("update-menu-text"),zB=oc("update-menu-icon"),BB=function(t,e,n){var r=ou(p),o=t.text.map((function(t){return kC(AB(t,e,n.providers))})),i=t.icon.map((function(t){return kC(_B(t,n.providers.icons))})),u=function(t,e){var n=tp.getValue(t);return Yw.focus(n),Sa(n,"keydown",{raw:e.event.raw}),HD.close(n),L.some(!0)},a=t.role.fold((function(){return{}}),(function(t){return{role:t}})),c=t.tooltip.fold((function(){return{}}),(function(t){var e=n.providers.translate(t);return{title:e,"aria-label":e}})),s=LC("chevron-down",{tag:"div",classes:[e+"__select-chevron"]},n.providers.icons),l=kC(HD.sketch(A(A(A({},t.uid?{uid:t.uid}:{}),a),{dom:{tag:"button",classes:[e,e+"--select"].concat($(t.classes,(function(t){return e+"--"+t}))),attributes:A({},c)},components:yO([i.map((function(t){return t.asSpec()})),o.map((function(t){return t.asSpec()})),L.some(s)]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:mf(M(M([],t.dropdownBehaviours,!0),[mO.button((function(){return t.disabled||n.providers.isDisabled()})),cO(),VD.config({}),Pw.config({}),Vw("dropdown-events",[hO(t,r),pO(t,r)]),Vw("menubutton-update-display-text",[Ra(NB,(function(t,e){o.bind((function(e){return e.getOpt(t)})).each((function(t){Pw.set(t,[Ss(n.providers.translate(e.event.text))])}))})),Ra(zB,(function(t,e){i.bind((function(e){return e.getOpt(t)})).each((function(t){Pw.set(t,[_B(e.event.icon,n.providers.icons)])}))}))])],!1)),eventOrder:Co(RB,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:mf([Aw.config({mode:"special",onLeft:u,onRight:u})]),lazySink:n.getSink,toggleClass:e+"--active",parts:{menu:pk(!1,t.columns,t.presets)},fetch:function(e){return tD.nu(S(t.fetch,e))}})));return l.asSpec()},LB=function(t){return i(t)},HB=function(t){return"separator"===t.type},IB=function(t){return Et(t,"getSubmenuItems")},PB={type:"separator"},FB=function(t,e){var n=Q(t,(function(t,n){return LB(n)?""===n?t:"|"===n?t.length>0&&!HB(t[t.length-1])?t.concat([PB]):t:Et(e,n.toLowerCase())?t.concat([e[n.toLowerCase()]]):t:t.concat([n])}),[]);return n.length>0&&HB(n[n.length-1])&&n.pop(),n},VB=function(t,e){var n=t.getSubmenuItems(),r=WB(n,e),o=Co(r.menus,mu(t.value,r.items)),i=Co(r.expansions,mu(t.value,t.value));return{item:t,menus:o,expansions:i}},UB=function(t,e){return IB(t)?VB(t,e):{item:t,menus:{},expansions:{}}},jB=function(t){if(HB(t))return t;var e=Ot(t,"value").getOrThunk((function(){return oc("generated-menu-item")}));return Co({value:e},t)},WB=function(t,e){var n=FB(i(t)?t.split(" "):t,e);return J(n,(function(t,n){var r=jB(n),o=UB(r,e);return{menus:Co(t.menus,o.menus),items:[o.item].concat(t.items),expansions:Co(t.expansions,o.expansions)}}),{menus:{},expansions:{},items:[]})},qB=function(t,e,n,r){var o=oc("primary-menu"),i=WB(t,n.shared.providers.menuItems());if(0===i.items.length)return L.none();var u=M_(o,i.items,e,n,r),a=bt(i.menus,(function(t,r){return M_(r,t,e,n,!1)})),c=Co(a,mu(o,u));return L.from(Qx.tieredData(o,c,i.expansions))},$B=function(t){return{isDisabled:function(){return Hv.isDisabled(t)},setDisabled:function(e){return Hv.set(t,e)},setActive:function(e){var n=t.element;e?(is(n,"tox-tbtn--enabled"),Fn(n,"aria-pressed",!0)):(as(n,"tox-tbtn--enabled"),qn(n,"aria-pressed"))},isActive:function(){return cs(t.element,"tox-tbtn--enabled")}}},GB=function(t,e,n,r){return BB({text:t.text,icon:t.icon,tooltip:t.tooltip,role:r,fetch:function(e,r){t.fetch((function(t){r(qB(t,jS.CLOSE_ON_EXECUTE,n,!1))}))},onSetup:t.onSetup,getApi:$B,columns:1,presets:"normal",classes:[],dropdownBehaviours:[yA.config({})]},e,n.shared)},KB=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){Sf(e.element),Sa(e,DA,{name:t.name,value:t.storage.get()})}))}))}},o=function(t){return function(e){e.setActive(t.storage.get())}};return function(e){e($(t,(function(t){var e=t.text.fold((function(){return{}}),(function(t){return{text:t}}));return A(A({type:t.type,active:!1},e),{onAction:r(t),onSetup:o(t)})})))}},XB=function(t,e,n,r,o,i){void 0===n&&(n=[]);var u=e.fold((function(){return{}}),(function(t){return{action:t}})),a=A({buttonBehaviours:mf([mO.button((function(){return t.disabled||i.isDisabled()})),cO(),yA.config({}),Vw("button press",[Ma("click"),Ma("mousedown")])].concat(n)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},u),c=Co(a,{dom:r});return Co(c,{components:o})},YB=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},u=t.icon.map((function(t){return EB(t,n.icons)})),a=yO([u]);return XB(t,e,r,i,a,n)},JB=function(t,e,n,r){void 0===r&&(r=[]);var o=YB(t,L.some(e),n,r);return SC.sketch(o)},QB=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=n.translate(t.text),u=t.icon?t.icon.map((function(t){return EB(t,n.icons)})):L.none(),a=u.isSome()?yO([u]):[],c=u.isSome()?{}:{innerHtml:i},s=M(M(M(M([],t.primary||t.borderless?["tox-button"]:["tox-button","tox-button--secondary"],!0),u.isSome()?["tox-button--icon"]:[],!0),t.borderless?["tox-button--naked"]:[],!0),o,!0),l=A(A({tag:"button",classes:s},c),{attributes:{title:i}});return XB(t,e,r,l,a,n)},ZB=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=QB(t,L.some(e),n,r,o);return SC.sketch(i)},tL=function(t,e){return function(n){"custom"===e?Sa(n,DA,{name:t,value:{}}):"submit"===e?Ca(n,MA):"cancel"===e?Ca(n,AA):console.error("Unknown button type: ",e)}},eL=function(t,e){return"menu"===e},nL=function(t,e){return"custom"===e||"cancel"===e||"submit"===e},rL=function(t,e,n){if(eL(t,e)){var r=function(){return u},o=t,i=A(A({},t),{onSetup:function(e){return e.setDisabled(t.disabled),p},fetch:KB(o.items,r,n)}),u=kC(GB(i,"tox-tbtn",n,L.none()));return u.asSpec()}if(nL(t,e)){var a=tL(t.name,e),c=A(A({},t),{borderless:!1});return ZB(c,a,n.shared.providers,[])}console.error("Unknown footer button type: ",e)},oL=function(t,e){var n=tL(t.name,"custom");return CA(L.none(),hA.parts.field(A({factory:SC},QB(t,L.some(n),e,[uz.memory(""),WN.self()]))))},iL=w([Ki("field1Name","field1"),Ki("field2Name","field2"),sl("onLockedChange"),il(["lockClass"]),Ki("locked",!1),op.field("coupledFieldBehaviours",[bv,tp])]),uL=function(t,e,n){return Kp(t,e,n).bind(bv.getCurrent)},aL=function(t,e){return Np({factory:hA,name:t,overrides:function(t){return{fieldBehaviours:mf([Vw("coupled-input-behaviour",[Ra(Uu(),(function(n){uL(n,t,e).each((function(e){Kp(n,t,"lock").each((function(r){hx.isOn(r)&&t.onLockedChange(n,e,r)}))}))}))])])}}})},cL=w([aL("field1","field2"),aL("field2","field1"),Np({factory:SC,schema:[Ai("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:mf([hx.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),sL=function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:op.augment(t.coupledFieldBehaviours,[bv.config({find:L.some}),tp.config({store:{mode:"manual",getValue:function(e){var n,r=Zp(e,t,["field1","field2"]);return n={},n[t.field1Name]=tp.getValue(r.field1()),n[t.field2Name]=tp.getValue(r.field2()),n},setValue:function(e,n){var r=Zp(e,t,["field1","field2"]);_t(n,t.field1Name)&&tp.setValue(r.field1(),n[t.field1Name]),_t(n,t.field2Name)&&tp.setValue(r.field2(),n[t.field2Name])}}})]),apis:{getField1:function(e){return Kp(e,t,"field1")},getField2:function(e){return Kp(e,t,"field2")},getLock:function(e){return Kp(e,t,"lock")}}}},lL=mv({name:"FormCoupledInputs",configFields:iL(),partFields:cL(),factory:sL,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)}}}),fL=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},dL=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 ro.value({value:r,unit:o})}return ro.error(t)},mL=function(t,e){var n={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},r=function(t){return Et(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()},gL=function(t){return L.none()},hL=function(t,e){return function(n){return mL(n,e).map((function(n){return{value:n*t,unit:e}}))}},pL=function(t,e){var n=dL(t).toOptional(),r=dL(e).toOptional();return Nt(n,r,(function(t,e){return mL(t,e.unit).map((function(t){return e.value/t})).map((function(t){return hL(t,e.unit)})).getOr(gL)})).getOr(gL)},vL=function(t,e){var n=gL,r=oc("ratio-event"),o=function(t){return LC(t,{tag:"span",classes:["tox-icon","tox-lock-icon__"+t]},e.icons)},i=lL.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:mf([Hv.config({disabled:function(){return t.disabled||e.isDisabled()}}),cO(),yA.config({})])}),u=function(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}},a=function(n){return hA.parts.field({factory:UA,inputClasses:["tox-textfield"],inputBehaviours:mf([Hv.config({disabled:function(){return t.disabled||e.isDisabled()}}),cO(),yA.config({}),Vw("size-input-events",[Ra(Iu(),(function(t,e){Sa(t,r,{isField1:n})})),Ra(ju(),(function(e,n){Sa(e,EA,{name:t.name})}))])]),selectOnFocus:!1})},c=function(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}},s=lL.parts.field1(u([hA.parts.label(c("Width")),a(!0)])),l=lL.parts.field2(u([hA.parts.label(c("Height")),a(!1)]));return lL.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[s,l,u([c("&nbsp;"),i])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,e,r){dL(tp.getValue(t)).each((function(t){n(t).each((function(t){tp.setValue(e,fL(t))}))}))},coupledFieldBehaviours:mf([Hv.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){lL.getField1(t).bind(hA.getField).each(Hv.disable),lL.getField2(t).bind(hA.getField).each(Hv.disable),lL.getLock(t).each(Hv.disable)},onEnabled:function(t){lL.getField1(t).bind(hA.getField).each(Hv.enable),lL.getField2(t).bind(hA.getField).each(Hv.enable),lL.getLock(t).each(Hv.enable)}}),cO(),Vw("size-input-events2",[Ra(r,(function(t,e){var r=e.event.isField1,o=r?lL.getField1(t):lL.getField2(t),i=r?lL.getField2(t):lL.getField1(t),u=o.map(tp.getValue).getOr(""),a=i.map(tp.getValue).getOr("");n=pL(u,a)}))])])})},bL=w(oc("undo")),yL=w(oc("redo")),wL=w(oc("zoom")),xL=w(oc("back")),CL=w(oc("apply")),SL=w(oc("swap")),kL=w(oc("transform")),TL=w(oc("temp-transform")),OL=w(oc("transform-apply")),EL={undo:bL,redo:yL,zoom:wL,back:xL,apply:CL,swap:SL,transform:kL,tempTransform:TL,transformApply:OL},_L=w("save-state"),AL=w("disable"),DL=w("enable"),ML={formActionEvent:DA,saveState:_L,disable:AL,enable:DL},RL=function(t,e){var n=function(t,n,r,o){return kC(ZB({name:t,text:t,disabled:r,primary:o,icon:L.none(),borderless:!1},n,e))},r=function(t,n,r,o){return kC(JB({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(Hv)&&Hv.disable(n)}))},i=function(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(Hv)&&Hv.enable(n)}))},u={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},a=p,c=function(t,e,n){Sa(t,e,n)},s=function(t){return Ca(t,ML.disable())},l=function(t){return Ca(t,ML.enable())},f=function(t,e){s(t),c(t,EL.transform(),{transform:e}),l(t)},d=function(t,e){s(t),c(t,EL.tempTransform(),{transform:e}),l(t)},m=function(t){return function(){ut.getOpt(t).each((function(t){Pw.set(t,[ot])}))}},g=function(t,e){s(t),c(t,EL.transformApply(),{transform:e,swap:m(t)}),l(t)},h=function(){return n("Back",(function(t){return c(t,EL.back(),{swap:m(t)})}),!1,!1)},v=function(){return kC({dom:{tag:"div",classes:["tox-spacer"]},behaviours:mf([Hv.config({})])})},b=function(){return n("Apply",(function(t){return c(t,EL.apply(),{swap:m(t)})}),!0,!0)},y=function(){return function(e){var n=t.getRect();return SB(e,n.x,n.y,n.w,n.h)}},x=[h(),v(),n("Apply",(function(e){var n=y();g(e,n),t.hideCrop()}),!1,!0)],C=sA.sketch({dom:u,components:x.map((function(t){return t.asSpec()})),containerBehaviours:mf([Vw("image-tools-crop-buttons-events",[Ra(ML.disable(),(function(t,e){o(x,t)})),Ra(ML.enable(),(function(t,e){i(x,t)}))])])}),S=kC(vL({name:"size",label:L.none(),constrain:!0,disabled:!1},e)),k=function(t,e){return function(n){return kB(n,t,e)}},T=[h(),v(),S,v(),n("Apply",(function(t){S.getOpt(t).each((function(e){var n=tp.getValue(e),r=parseInt(n.width,10),o=parseInt(n.height,10),i=k(r,o);g(t,i)}))}),!1,!0)],O=sA.sketch({dom:u,components:T.map((function(t){return t.asSpec()})),containerBehaviours:mf([Vw("image-tools-resize-buttons-events",[Ra(ML.disable(),(function(t,e){o(T,t)})),Ra(ML.enable(),(function(t,e){i(T,t)}))])])}),E=function(t,e){return function(n){return t(n,e)}},_=E(CB,"h"),A=E(CB,"v"),D=E(TB,-90),M=E(TB,90),R=function(t,e){d(t,e)},N=[h(),v(),r("flip-horizontally","Flip horizontally",(function(t){R(t,_)}),!1),r("flip-vertically","Flip vertically",(function(t){R(t,A)}),!1),r("rotate-left","Rotate counterclockwise",(function(t){R(t,D)}),!1),r("rotate-right","Rotate clockwise",(function(t){R(t,M)}),!1),v(),b()],z=sA.sketch({dom:u,components:N.map((function(t){return t.asSpec()})),containerBehaviours:mf([Vw("image-tools-fliprotate-buttons-events",[Ra(ML.disable(),(function(t,e){o(N,t)})),Ra(ML.enable(),(function(t,e){i(N,t)}))])])}),B=function(t,n,r,o,i){var u=CN.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}),a=CN.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),c=CN.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return kC(CN.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:r,maxX:i,getInitialValue:w({x:o})},components:[u,a,c],sliderBehaviours:mf([Yw.config({})]),onChoose:n}))},H=function(t,e,n,r,o){var i=function(t,n,r){var o=E(e,r.x/100);f(t,o)};return B(t,i,n,r,o)},I=function(t,e,n,r,o){return[h(),H(t,e,n,r,o),b()]},P=function(t,e,n,r,a){var c=I(t,e,n,r,a);return sA.sketch({dom:u,components:c.map((function(t){return t.asSpec()})),containerBehaviours:mf([Vw("image-tools-filter-panel-buttons-events",[Ra(ML.disable(),(function(t,e){o(c,t)})),Ra(ML.enable(),(function(t,e){i(c,t)}))])])})},F=[h(),v(),b()],V=sA.sketch({dom:u,components:F.map((function(t){return t.asSpec()}))}),U=P("Brightness",wB,-100,0,100),j=P("Contrast",xB,-100,0,100),W=P("Gamma",bB,-100,0,100),q=function(t,e,n){return function(r){return yB(r,t,e,n)}},$=function(t){var e=function(t,e,n){var r=G.getOpt(t),o=X.getOpt(t),i=K.getOpt(t);r.each((function(e){o.each((function(n){i.each((function(r){var o=tp.getValue(e).x/100,i=tp.getValue(r).x/100,u=tp.getValue(n).x/100,a=q(o,i,u);f(t,a)}))}))}))};return B(t,e,0,100,200)},G=$("R"),K=$("G"),X=$("B"),Y=[h(),G,K,X,b()],J=sA.sketch({dom:u,components:Y.map((function(t){return t.asSpec()}))}),Q=function(t,e,n){return function(r){var o=function(){ut.getOpt(r).each((function(e){Pw.set(e,[t]),n(e)}))};c(r,EL.swap(),{transform:e,swap:o})}},Z=function(e){t.showCrop()},tt=function(e){S.getOpt(e).each((function(e){var n=t.getMeasurements(),r=n.width,o=n.height;tp.setValue(e,{width:r,height:o})}))},et=L.some(vB),nt=L.some(pB),rt=[r("crop","Crop",Q(C,L.none(),Z),!1),r("resize","Resize",Q(O,L.none(),tt),!1),r("orientation","Orientation",Q(z,L.none(),a),!1),r("brightness","Brightness",Q(U,L.none(),a),!1),r("sharpen","Sharpen",Q(V,et,a),!1),r("contrast","Contrast",Q(j,L.none(),a),!1),r("color-levels","Color levels",Q(J,L.none(),a),!1),r("gamma","Gamma",Q(W,L.none(),a),!1),r("invert","Invert",Q(V,nt,a),!1)],ot=sA.sketch({dom:u,components:rt.map((function(t){return t.asSpec()}))}),it=sA.sketch({dom:{tag:"div"},components:[ot],containerBehaviours:mf([Pw.config({})])}),ut=kC(it),at=function(t){return ut.getOpt(t).map((function(t){var e=t.components()[0];return e.components()[e.components().length-1]}))};return{memContainer:ut,getApplyButton:at}},NL=tinymce.util.Tools.resolve("tinymce.geom.Rect"),zL=tinymce.util.Tools.resolve("tinymce.util.Observable"),BL=tinymce.util.Tools.resolve("tinymce.util.VK"),LL=function(t){var e=Math.max,n=t.documentElement,r=t.body,o=e(n.scrollWidth,r.scrollWidth),i=e(n.clientWidth,r.clientWidth),u=e(n.offsetWidth,r.offsetWidth),a=e(n.scrollHeight,r.scrollHeight),c=e(n.clientHeight,r.clientHeight),s=e(n.offsetHeight,r.offsetHeight);return{width:o<u?i:o,height:a<s?c:a}},HL=function(t){return d(t.changedTouches)},IL=function(t){if(HL(t))for(var e="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<e.length;n++)t[e[n]]=t.changedTouches[0][e[n]]};function PL(t,e){var n,r,o,i,u,a,c,s=[],l=[],f=null!==(n=e.document)&&void 0!==n?n:document,m=null!==(r=e.root)&&void 0!==r?r:f,g=ee.fromDom(f),h=ee.fromDom(m.getElementById(null!==(o=e.handle)&&void 0!==o?o:t)),p=function(t){var n=t.raw,r=LL(f);IL(n),t.prevent(),u=n.button,a=n.screenX,c=n.screenY;var o=Jn(h,"cursor");i=ee.fromTag("div",f),Xn(i,{position:"absolute",top:"0",left:"0",width:r.width+"px",height:r.height+"px","z-index":"2147483647",opacity:"0.0001",cursor:o}),Dr(In(g),i),l.push(ud(g,"mousemove",v),ud(g,"touchmove",v),ud(g,"mouseup",b),ud(g,"touchend",b)),e.start(n)},v=function(t){var n=t.raw;if(IL(n),n.button!==u)return b(t);n.deltaX=n.screenX-a,n.deltaY=n.screenY-c,t.prevent(),e.drag(n)},b=function(t){IL(t.raw),G(l,(function(t){return t.unbind()})),l=[],Br(i),e.stop&&e.stop(t.raw)},y=function(){G(l.concat(s),(function(t){return t.unbind()})),l=[],s=[],d(i)&&Br(i)};return s.push(ud(h,"mousedown",p),ud(h,"touchstart",p)),{destroy:y}}var FL=0,VL=function(t,e,n,r,o){var i,u=[],a="tox-",c=a+"crid-"+FL++,s=ee.fromDom(r),l=[{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"}],f=["top","right","bottom","left"],d=function(t,e){return{x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},m=function(t,e){return{x:e.x-t.x,y:e.y-t.y,w:e.w,h:e.h}},g=function(){return m(n,t)},h=function(e,r,o,i){var u=r.x+o*e.deltaX,a=r.y+i*e.deltaY,c=Math.max(20,r.w+o*e.deltaW),s=Math.max(20,r.h+i*e.deltaH),l=t=NL.clamp({x:u,y:a,w:c,h:s},n,"move"===e.name);l=m(n,l),k.fire("updateRect",{rect:l}),x(l)},p=function(){var e=function(e){var n;return PL(c,{document:r.ownerDocument,root:An(s).dom,handle:c+"-"+e.name,start:function(){n=t},drag:function(t){h(e,n,t.deltaX,t.deltaY)}})},n=ee.fromTag("div");Vn(n,{id:c,class:a+"croprect-container",role:"grid","aria-dropeffect":"execute"}),Dr(s,n),G(f,(function(t){Is(s,"#"+c).each((function(e){var n=ee.fromTag("div");Vn(n,{id:c+"-"+t,class:a+"croprect-block","data-mce-bogus":"all"}),Kn(n,"display","none"),Dr(e,n)}))})),G(l,(function(t){Is(s,"#"+c).each((function(e){var n=ee.fromTag("div");Vn(n,{id:c+"-"+t.name,"aria-label":t.label,"aria-grabbed":"false","data-mce-bogus":"all",role:"gridcell",tabindex:"-1",title:t.label}),ss(n,[a+"croprect-handle",a+"croprect-handle-"+t.name]),Kn(n,"display","none"),Dr(e,n)}))})),i=$(l,e),b(t);var d=function(t){Fn(t.target,"aria-grabbed","focus"===t.raw.type?"true":"false")},m=function(e){var n;G(l,(function(t){if(Un(e.target,"id")===c+"-"+t.name)return n=t,!1}));var r=function(t,e,r,o,i){t.stopPropagation(),t.preventDefault(),h(n,r,o,i)};switch(e.raw.keyCode){case BL.LEFT:r(e,n,t,-10,0);break;case BL.RIGHT:r(e,n,t,10,0);break;case BL.UP:r(e,n,t,0,-10);break;case BL.DOWN:r(e,n,t,0,10);break;case BL.ENTER:case BL.SPACEBAR:e.prevent(),o();break}};u.push(ud(s,"focusin",d),ud(s,"focusout",d),ud(s,"keydown",m))},v=function(t){var e=M(M([],$(l,(function(t){return"#"+c+"-"+t.name})),!0),$(f,(function(t){return"#"+c+"-"+t})),!0).join(","),n=Xm(s,e);G(n,t?function(t){return nr(t,"display")}:function(t){return Kn(t,"display","none")})},b=function(t){var n=function(t,e){Is(s,"#"+c+"-"+t).each((function(t){Xn(t,{left:e.x+"px",top:e.y+"px",width:Math.max(0,e.w)+"px",height:Math.max(0,e.h)+"px"})}))};G(l,(function(e){Is(s,"#"+c+"-"+e.name).each((function(n){Xn(n,{left:t.w*e.xMul+t.x+"px",top:t.h*e.yMul+t.y+"px"})}))})),n("top",{x:e.x,y:e.y,w:e.w,h:t.y-e.y}),n("right",{x:t.x+t.w,y:t.y,w:e.w-t.x-t.w+e.x,h:t.h}),n("bottom",{x:e.x,y:t.y+t.h,w:e.w,h:e.h-t.y-t.h+e.y}),n("left",{x:e.x,y:t.y,w:t.x-e.x,h:t.h}),n("move",t)},y=function(e){t=e,b(t)},w=function(n){e=n,b(t)},x=function(t){y(d(n,t))},C=function(e){n=e,b(t)},S=function(){G(i,(function(t){return t.destroy()})),i=[],G(u,(function(t){return t.unbind()})),u=[]};p();var k=A(A({},zL),{toggleVisibility:v,setClampRect:C,setRect:y,getInnerRect:g,setInnerRect:x,setViewPortRect:w,destroy:S});return k},UL={create:VL},jL=function(t){return new uS((function(e){var n=function(){t.removeEventListener("load",n),e(t)};t.complete?e(t):t.addEventListener("load",n)}))},WL=function(t){var e=kC({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),n=ou(1),r=rd(),o=ou({x:0,y:0,w:1,h:1}),i=ou({x:0,y:0,w:1,h:1}),u=function(t,i){g.getOpt(t).each((function(t){var u=n.get(),a=vr(t.element),c=ur(t.element),s=i.dom.naturalWidth*u,l=i.dom.naturalHeight*u,f=Math.max(0,a/2-s/2),d=Math.max(0,c/2-l/2),m={left:f.toString()+"px",top:d.toString()+"px",width:s.toString()+"px",height:l.toString()+"px",position:"absolute"};Xn(i,m),e.getOpt(t).each((function(t){Xn(t.element,m)})),r.run((function(t){var e=o.get();t.setRect({x:e.x*u+f,y:e.y*u+d,w:e.w*u,h:e.h*u}),t.setClampRect({x:f,y:d,w:s,h:l}),t.setViewPortRect({x:0,y:0,w:a,h:c})}))}))},a=function(t,e){g.getOpt(t).each((function(t){var r=vr(t.element),o=ur(t.element),i=e.dom.naturalWidth,u=e.dom.naturalHeight,a=Math.min(r/i,o/u);a>=1?n.set(1):n.set(a)}))},c=function(t,e){var n=ee.fromTag("img");return Fn(n,"src",e),jL(n.dom).then((function(){t.getSystem().isConnected()&&g.getOpt(t).map((function(t){var e=ks({element:n});Pw.replaceAt(t,1,L.some(e));var r=i.get(),c={x:0,y:0,w:n.dom.naturalWidth,h:n.dom.naturalHeight};i.set(c);var s=NL.inflate(c,-20,-20);o.set(s),r.w===c.w&&r.h===c.h||a(t,n),u(t,n)}))}))},s=function(t,e){var r=n.get(),o=e>0?Math.min(2,r+.1):Math.max(.1,r-.1);n.set(o),g.getOpt(t).each((function(t){var e=t.components()[1].element;u(t,e)}))},l=function(){r.run((function(t){t.toggleVisibility(!0)}))},f=function(){r.run((function(t){t.toggleVisibility(!1)}))},d=function(){return o.get()},m=sA.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[e.asSpec(),{dom:{tag:"img",attributes:{src:t}}},{dom:{tag:"div"},behaviours:mf([Vw("image-panel-crop-events",[Ua((function(t){g.getOpt(t).each((function(t){var e=t.element.dom,i=UL.create({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},e,p);i.toggleVisibility(!1),i.on("updateRect",(function(t){var e=t.rect,r=n.get(),i={x:Math.round(e.x/r),y:Math.round(e.y/r),w:Math.round(e.w/r),h:Math.round(e.h/r)};o.set(i)})),r.set(i)}))})),ja((function(){r.clear()}))])])}],containerBehaviours:mf([Pw.config({}),Vw("image-panel-events",[Ua((function(e){c(e,t)}))])])}),g=kC(m),h=function(){var t=i.get();return{width:t.w,height:t.h}};return{memContainer:g,updateSrc:c,zoom:s,showCrop:l,hideCrop:f,getRect:d,getMeasurements:h}},qL=function(t,e,n,r,o){return JB({name:t,icon:L.some(e),disabled:n,tooltip:L.some(t),primary:!1,borderless:!1},r,o)},$L=function(t,e){e?Hv.enable(t):Hv.disable(t)},GL=function(t){var e=function(t,e,o){n.getOpt(t).each((function(t){$L(t,e)})),r.getOpt(t).each((function(t){$L(t,o)}))},n=kC(qL("Undo","undo",!0,(function(t){Sa(t,EL.undo(),{direction:1})}),t)),r=kC(qL("Redo","redo",!0,(function(t){Sa(t,EL.redo(),{direction:1})}),t)),o=sA.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[n.asSpec(),r.asSpec(),qL("Zoom in","zoom-in",!1,(function(t){Sa(t,EL.zoom(),{direction:1})}),t),qL("Zoom out","zoom-out",!1,(function(t){Sa(t,EL.zoom(),{direction:-1})}),t)]});return{container:o,updateButtonUndoStates:e}};function KL(){var t=[],e=-1,n=function(n){var r=t.splice(++e);return t.push(n),{state:n,removed:r}},r=function(){if(i())return t[--e]},o=function(){if(u())return t[++e]},i=function(){return e>0},u=function(){return-1!==e&&e<t.length-1};return{data:t,add:n,undo:r,redo:o,canUndo:i,canRedo:u}}var XL,YL=function(t){var e=ou(t),n=od(),r=KL();r.add(t);var o=function(){return e.get()},i=function(t){e.set(t)},u=function(){return n.get().getOrThunk(e.get)},a=function(t){var e=c(t);return f(),n.set(e),e.url},c=function(t){return{blob:t,url:URL.createObjectURL(t)}},s=function(t){URL.revokeObjectURL(t.url)},l=function(t){QN.each(t,s)},f=function(){n.on(s),n.clear()},d=function(t){var e=c(t);i(e);var n=r.add(e).removed;return l(n),e.url},m=function(t){var e=c(t);return n.set(e),e.url},g=function(t){return n.get().fold(p,(function(e){d(e.blob),t()}))},h=function(){var t=r.undo();return i(t),t.url},v=function(){var t=r.redo();return i(t),t.url},b=function(){var t=r.canUndo(),e=r.canRedo();return{undoEnabled:t,redoEnabled:e}};return{getBlobState:o,setBlobState:i,addBlobState:d,getTempState:u,updateTempState:a,addTempState:m,applyTempState:g,destroyTempState:f,undo:h,redo:v,getHistoryStates:b}},JL=function(t,e){var n=YL(t.currentState),r=function(t,e){var n=e.event.direction;k.zoom(t,n)},o=function(t){var e=n.getHistoryStates();T.updateButtonUndoStates(t,e.undoEnabled,e.redoEnabled),Sa(t,ML.formActionEvent,{name:ML.saveState(),value:e.undoEnabled})},i=function(t){T.updateButtonUndoStates(t,!1,!1)},u=function(t,e){var r=n.undo();f(t,r).then((function(e){l(t),o(t)}))},a=function(t,e){var r=n.redo();f(t,r).then((function(e){l(t),o(t)}))},c=function(t){return t.toBlob()},s=function(t){Sa(t,ML.formActionEvent,{name:ML.disable(),value:{}})},l=function(t){O.getApplyButton(t).each((function(t){Hv.enable(t)})),Sa(t,ML.formActionEvent,{name:ML.enable(),value:{}})},f=function(t,e){return s(t),k.updateSrc(t,e)},d=function(t,e,n,r,i){s(t),Iz(e).then(n).then(c).then(r).then((function(e){return f(t,e)})).then((function(){o(t),i(),l(t)})).catch((function(e){console.log(e),t.getSystem().isConnected()&&l(t)}))},m=function(t,e,r){var o=n.getBlobState().blob,i=function(t){return n.updateTempState(t)};d(t,o,e,i,r)},g=function(t,e){var r=n.getTempState().blob,o=function(t){return n.addTempState(t)};d(t,r,e,o,p)},h=function(t,e,r){var o=n.getBlobState().blob,i=function(e){var r=n.addBlobState(e);return b(t),r};d(t,o,e,i,r)},v=function(t,e){var r=function(){b(t);var n=e.event.swap;n()};n.applyTempState(r)},b=function(t){var e=n.getBlobState().url;return n.destroyTempState(),o(t),e},y=function(t){var e=b(t);f(t,e).then((function(e){l(t)}))},w=function(t,e){y(t);var n=e.event.swap;n(),k.hideCrop()},x=function(t,e){return m(t,e.event.transform,p)},C=function(t,e){return g(t,e.event.transform)},S=function(t,e){return h(t,e.event.transform,e.event.swap)},k=WL(t.currentState.url),T=GL(e),O=RL(k,e),E=function(t,e){i(t);var n=e.event.transform,r=e.event.swap;n.fold((function(){r()}),(function(e){m(t,e,r)}))};return{dom:{tag:"div",attributes:{role:"presentation"}},components:[O.memContainer.asSpec(),k.memContainer.asSpec(),T.container],behaviours:mf([tp.config({store:{mode:"manual",getValue:function(){return n.getBlobState()}}}),Vw("image-tools-events",[Ra(EL.undo(),u),Ra(EL.redo(),a),Ra(EL.zoom(),r),Ra(EL.back(),w),Ra(EL.apply(),v),Ra(EL.transform(),x),Ra(EL.tempTransform(),C),Ra(EL.transformApply(),S),Ra(EL.swap(),E)]),WN.self()])}},QL=function(t,e){var n={dom:{tag:"label",innerHtml:e.providers.translate(t.label),classes:["tox-label"]}},r=$(t.items,e.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[n].concat(r),behaviours:mf([WN.self(),Pw.config({}),uz.domHtml(L.none()),Aw.config({mode:"acyclic"})])}},ZL=function(t){return!Et(t,"items")},tH="data-value",eH=function(t,e,n,r){return $(n,(function(n){return ZL(n)?{type:"togglemenuitem",text:n.text,value:n.value,active:n.value===r,onAction:function(){tp.setValue(t,n.value),Sa(t,EA,{name:e}),Yw.focus(t)}}:{type:"nestedmenuitem",text:n.text,getSubmenuItems:function(){return eH(t,e,n.items,r)}}}))},nH=function(t,e){return gt(t,(function(t){return ZL(t)?Lt(t.value===e,t):nH(t.items,e)}))},rH=function(t,e){var n=e.shared.providers,r=ft(t.items).filter(ZL),o=t.label.map((function(t){return OA(t,n)})),i=hA.parts.field({dom:{},factory:{sketch:function(n){return BB({uid:n.uid,text:r.map((function(t){return t.text})),icon:L.none(),tooltip:t.label,role:L.none(),fetch:function(n,r){var o=eH(n,t.name,t.items,tp.getValue(n));r(qB(o,jS.CLOSE_ON_EXECUTE,e,!1))},onSetup:w(p),getApi:w({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[yA.config({}),tp.config({store:{mode:"manual",initialValue:r.map((function(t){return t.value})).getOr(""),getValue:function(t){return Un(t.element,tH)},setValue:function(e,n){nH(t.items,n).each((function(t){Fn(e.element,tH,t.value),Sa(e,NB,{text:t.text})}))}}})]},"tox-listbox",e.shared)}}}),u={dom:{tag:"div",classes:["tox-listboxfield"]},components:[i]};return hA.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:nt([o.toArray(),[u]]),fieldBehaviours:mf([Hv.config({disabled:w(t.disabled),onDisabled:function(t){hA.getField(t).each(Hv.disable)},onEnabled:function(t){hA.getField(t).each(Hv.enable)}})])})},oH=function(t,e){return{dom:{tag:"div",classes:t.classes},components:$(t.items,e.shared.interpreter)}},iH=function(t,e){var n=$(t.options,(function(t){return{dom:{tag:"option",value:t.value,innerHtml:t.text}}})),r=t.data.map((function(t){return mu("initialValue",t)})).getOr({});return{uid:t.uid,dom:{tag:"select",classes:t.selectClasses,attributes:t.selectAttributes},components:n,behaviours:rp(t.selectBehaviours,[Yw.config({}),tp.config({store:A({mode:"manual",getValue:function(t){return ds(t.element)},setValue:function(e,n){var r=tt(t.options,(function(t){return t.value===n}));r.isSome()&&ms(e.element,n)}},r)})])}},uH=dv({name:"HtmlSelect",configFields:[Ai("options"),ep("selectBehaviours",[Yw,tp]),Ki("selectClasses",[]),Ki("selectAttributes",{}),Fi("data")],factory:iH}),aH=function(t,e){var n=$(t.items,(function(t){return{text:e.translate(t.text),value:t.value}})),r=t.label.map((function(t){return OA(t,e)})),o=hA.parts.field({dom:{},selectAttributes:{size:t.size},options:n,factory:uH,selectBehaviours:mf([Hv.config({disabled:function(){return t.disabled||e.isDisabled()}}),yA.config({}),Vw("selectbox-change",[Ra(ju(),(function(e,n){Sa(e,EA,{name:t.name})}))])])}),i=t.size>1?L.none():L.some(LC("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},e.icons)),u={dom:{tag:"div",classes:["tox-selectfield"]},components:nt([[o],i.toArray()])};return hA.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:nt([r.toArray(),[u]]),fieldBehaviours:mf([Hv.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){hA.getField(t).each(Hv.disable)},onEnabled:function(t){hA.getField(t).each(Hv.enable)}}),cO()])})},cH=function(t,e){var n=function(t){return{dom:{tag:"th",innerHtml:e.translate(t)}}},r=function(t){return{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:$(t,n)}]}},o=function(t){return{dom:{tag:"td",innerHtml:e.translate(t)}}},i=function(t){return{dom:{tag:"tr"},components:$(t,o)}},u=function(t){return{dom:{tag:"tbody"},components:$(t,i)}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[r(t.header),u(t.cells)],behaviours:mf([yA.config({}),Yw.config({})])}},sH=function(t,e){var n=t.label.map((function(t){return OA(t,e)})),r=[Hv.config({disabled:function(){return t.disabled||e.isDisabled()}}),cO(),Aw.config({mode:"execution",useEnter:!0!==t.multiline,useControlEnter:!0===t.multiline,execute:function(t){return Ca(t,MA),L.some(!0)}}),Vw("textfield-change",[Ra(Uu(),(function(e,n){Sa(e,EA,{name:t.name})})),Ra(Zu(),(function(e,n){Sa(e,EA,{name:t.name})}))]),yA.config({})],o=t.validation.map((function(t){return dD.config({getRoot:function(t){return vn(t.element)},invalidClass:"tox-invalid",validator:{validate:function(e){var n=tp.getValue(e),r=t.validator(n);return tD.pure(!0===r?ro.value(n):ro.error(r))},validateOnLoad:t.validateOnLoad}})})).toArray(),i=t.placeholder.fold(w({}),(function(t){return{placeholder:e.translate(t)}})),u=t.inputMode.fold(w({}),(function(t){return{inputmode:t}})),a=A(A({},i),u),c=hA.parts.field({tag:!0===t.multiline?"textarea":"input",inputAttributes:a,inputClasses:[t.classname],inputBehaviours:mf(nt([r,o])),selectOnFocus:!1,factory:UA}),s=t.flex?["tox-form__group--stretched"]:[],l=s.concat(t.maximized?["tox-form-group--maximize"]:[]),f=[Hv.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){hA.getField(t).each(Hv.disable)},onEnabled:function(t){hA.getField(t).each(Hv.enable)}}),cO()];return xA(n,c,l,f)},lH=function(t,e){return sH({name:t.name,multiline:!1,label:t.label,inputMode:t.inputMode,placeholder:t.placeholder,flex:!1,disabled:t.disabled,classname:"tox-textfield",validation:L.none(),maximized:t.maximized},e)},fH=function(t,e){return sH({name:t.name,multiline:!0,label:t.label,inputMode:L.none(),placeholder:t.placeholder,flex:!0,disabled:t.disabled,classname:"tox-textarea",validation:L.none(),maximized:t.maximized},e)},dH=function(t,e){var n=t.stream.streams,r=n.setup(t,e);return _a([Ra(t.event,r),ja((function(){return e.cancel()}))].concat(t.cancelEvent.map((function(t){return[Ra(t,(function(){return e.cancel()}))]})).getOr([])))},mH=Object.freeze({__proto__:null,events:dH}),gH=function(t){var e=ou(null),n=function(){return{timer:null!==e.get()?"set":"unset"}},r=function(t){e.set(t)},o=function(){var t=e.get();null!==t&&t.cancel()};return Tc({readState:n,setTimer:r,cancel:o})},hH=function(t){return t.stream.streams.state(t)},pH=Object.freeze({__proto__:null,throttle:gH,init:hH}),vH=function(t,e){var n=t.stream,r=WC(t.onStream,n.delay);return e.setTimer(r),function(t,e){r.throttle(t,e),n.stopEvent&&e.stop()}},bH=[Di("stream",ki("mode",{throttle:[Ai("delay"),Ki("stopEvent",!0),fl("streams",{setup:vH,state:gH})]})),Ki("event","input"),Fi("cancelEvent"),sl("onStream")],yH=hf({fields:bH,name:"streaming",active:mH,state:pH}),wH=function(t,e,n){var r=tp.getValue(n);tp.setValue(e,r),CH(e)},xH=function(t,e){var n=t.element,r=ds(n),o=n.dom;"number"!==Un(n,"type")&&e(o,r)},CH=function(t){xH(t,(function(t,e){return t.setSelectionRange(e.length,e.length)}))},SH=function(t,e){xH(t,(function(t,n){return t.setSelectionRange(e,n.length)}))},kH=function(t,e,n){if(t.selectsOver){var r=tp.getValue(e),o=t.getDisplayText(r),i=tp.getValue(n),u=t.getDisplayText(i);return 0===u.indexOf(o)?L.some((function(){wH(t,e,n),SH(e,o.length)})):L.none()}return L.none()},TH=w("alloy.typeahead.itemexecute"),OH=function(t,e,n,r){var o=function(e,n,o){t.previewing.set(!1);var i=bD.getCoupled(e,"sandbox");if(bh.isOpen(i))bv.getCurrent(i).each((function(t){rb.getHighlighted(t).fold((function(){o(t)}),(function(){Ea(i,t.element,"keydown",n)}))}));else{var a=function(t){bv.getCurrent(t).each(o)};TD(t,u(e),e,i,r,a,qA.HighlightFirst).get(p)}},i=IA(t),u=function(t){return function(e){return e.map((function(e){var n=Tt(e.menus),r=rt(n,(function(t){return Y(t.items,(function(t){return"item"===t.type}))})),o=tp.getState(t);return o.update($(r,(function(t){return t.data}))),e}))}},a=[Yw.config({}),tp.config({onSetValue:t.onSetValue,store:A({mode:"dataset",getDataKey:function(t){return ds(t.element)},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(e,n){ms(e.element,t.model.getDisplayText(n))}},t.initialData.map((function(t){return mu("initialValue",t)})).getOr({}))}),yH.config({stream:{mode:"throttle",delay:t.responseTime,stopEvent:!1},onStream:function(e,n){var o=bD.getCoupled(e,"sandbox"),i=Yw.isFocused(e);if(i&&ds(e.element).length>=t.minChars){var a=bv.getCurrent(o).bind((function(t){return rb.getHighlighted(t).map(tp.getValue)}));t.previewing.set(!0);var c=function(e){bv.getCurrent(o).each((function(e){a.fold((function(){t.model.selectsOver&&rb.highlightFirst(e)}),(function(t){rb.highlightBy(e,(function(e){var n=tp.getValue(e);return n.value===t.value})),rb.getHighlighted(e).orThunk((function(){return rb.highlightFirst(e),L.none()}))}))}))};TD(t,u(e),e,o,r,c,qA.HighlightFirst).get(p)}},cancelEvent:ua()}),Aw.config({mode:"special",onDown:function(t,e){return o(t,e,rb.highlightFirst),L.some(!0)},onEscape:function(t){var e=bD.getCoupled(t,"sandbox");return bh.isOpen(e)?(bh.close(e),L.some(!0)):L.none()},onUp:function(t,e){return o(t,e,rb.highlightLast),L.some(!0)},onEnter:function(e){var n=bD.getCoupled(e,"sandbox"),r=bh.isOpen(n);if(r&&!t.previewing.get())return bv.getCurrent(n).bind((function(t){return rb.getHighlighted(t)})).map((function(t){return Sa(e,TH(),{item:t}),!0}));var o=tp.getValue(e);return Ca(e,ua()),t.onExecute(n,e,o),r&&bh.close(n),L.some(!0)}}),hx.config({toggleClass:t.markers.openClass,aria:{mode:"expanded"}}),bD.config({others:{sandbox:function(e){return MD(t,e,{onOpen:function(){return hx.on(e)},onClose:function(){return hx.off(e)}})}}}),Vw("typeaheadevents",[qa((function(e){var n=p;ED(t,u(e),e,r,n,qA.HighlightFirst).get(p)})),Ra(TH(),(function(e,n){var r=bD.getCoupled(e,"sandbox");wH(t.model,e,n.event.item),Ca(e,ua()),t.onItemExecute(e,r,n.event.item,tp.getValue(e)),bh.close(r),CH(e)}))].concat(t.dismissOnBlur?[Ra(Qu(),(function(t){var e=bD.getCoupled(t,"sandbox");Ef(e.element).isNone()&&bh.close(e)}))]:[]))];return{uid:t.uid,dom:FA(Co(t,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:A(A({},i),rp(t.typeaheadBehaviours,a)),eventOrder:t.eventOrder}},EH=w([Fi("lazySink"),Ai("fetch"),Ki("minChars",5),Ki("responseTime",1e3),al("onOpen"),Ki("getHotspot",L.some),Ki("getAnchorOverrides",w({})),Ki("layouts",L.none()),Ki("eventOrder",{}),ru("model",{},[Ki("getDisplayText",(function(t){return void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.value})),Ki("selectsOver",!0),Ki("populateFromBrowse",!0)]),al("onSetValue"),cl("onExecute"),al("onItemExecute"),Ki("inputClasses",[]),Ki("inputAttributes",{}),Ki("inputStyles",{}),Ki("matchWidth",!0),Ki("useMinWidth",!1),Ki("dismissOnBlur",!0),il(["openClass"]),Fi("initialData"),ep("typeaheadBehaviours",[Yw,tp,yH,Aw,hx,bD]),Ei("previewing",(function(){return ou(!0)}))].concat(HA()).concat(ND())),_H=w([zp({schema:[ol()],name:"menu",overrides:function(t){return{fakeFocus:!0,onHighlight:function(e,n){t.previewing.get()?e.getSystem().getByUid(t.uid).each((function(r){kH(t.model,r,n).fold((function(){return rb.dehighlight(e,n)}),(function(t){return t()}))})):e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&wH(t.model,e,n)})),t.previewing.set(!1)},onExecute:function(e,n){return e.getSystem().getByUid(t.uid).toOptional().map((function(t){return Sa(t,TH(),{item:n}),!0}))},onHover:function(e,n){t.previewing.set(!1),e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&wH(t.model,e,n)}))}}}})]),AH=mv({name:"Typeahead",configFields:EH(),partFields:_H(),factory:OH}),DH=function(t){var e=function(){return DH(t.toCached())},n=function(e){return DH(t.bind((function(t){return t.fold((function(t){return tD.pure(ro.error(t))}),(function(t){return e(t)}))})))},r=function(e){return DH(t.map((function(t){return t.bind(e)})))},o=function(e){return DH(t.map((function(t){return t.map(e)})))},i=function(e){return DH(t.map((function(t){return t.mapError(e)})))},u=function(e,n){return t.map((function(t){return t.fold(e,n)}))},a=function(e,n){return DH(tD.nu((function(r){var o=!1,i=setTimeout((function(){o=!0,r(ro.error(n()))}),e);t.get((function(t){o||(clearTimeout(i),r(t))}))})))};return A(A({},t),{toCached:e,bindFuture:n,bindResult:r,mapResult:o,mapError:i,foldResult:u,withTimeout:a})},MH=function(t){return DH(tD.nu(t))},RH=function(t){return DH(tD.pure(ro.value(t)))},NH=function(t){return DH(tD.pure(ro.error(t)))},zH=function(t){return DH(tD.pure(t))},BH=function(t){return DH(t.map(ro.value))},LH=function(t){return MH((function(e){t.then((function(t){e(ro.value(t))}),(function(t){e(ro.error(t))}))}))},HH={nu:MH,wrap:DH,pure:RH,value:RH,error:NH,fromResult:zH,fromFuture:BH,fromPromise:LH},IH={type:"separator"},PH=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:p}},FH=function(t,e){return{type:"menuitem",value:e,text:t,meta:{attach:void 0},onAction:p}},VH=function(t){return $(t,PH)},UH=function(t,e){return Y(e,(function(e){return e.type===t}))},jH=function(t,e){return VH(UH(t,e))},WH=function(t){return jH("header",t.targets)},qH=function(t){return jH("anchor",t.targets)},$H=function(t){return L.from(t.anchorTop).map((function(t){return FH("<top>",t)})).toArray()},GH=function(t){return L.from(t.anchorBottom).map((function(t){return FH("<bottom>",t)})).toArray()},KH=function(t){return $(t,(function(t){return FH(t,t)}))},XH=function(t){return Q(t,(function(t,e){var n=0===t.length||0===e.length;return n?t.concat(e):t.concat(IH,e)}),[])},YH=function(t,e){var n=t.toLowerCase();return Y(e,(function(t){var e=void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.text;return Ut(e.toLowerCase(),n)||Ut(t.value.toLowerCase(),n)}))},JH=function(t,e,n){var r=tp.getValue(e),o=void 0!==r.meta.text?r.meta.text:r.value,i=n.getLinkInformation();return i.fold((function(){return[]}),(function(e){var r=YH(o,KH(n.getHistory(t)));return"file"===t?XH([r,YH(o,WH(e)),YH(o,nt([$H(e),qH(e),GH(e)]))]):r}))},QH=oc("aria-invalid"),ZH=function(t,e,n){var r,o=e.shared.providers,i=function(e){var r=tp.getValue(e);n.addToHistory(r.value,t.filetype)},u=hA.parts.field({factory:AH,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":QH,type:"url"},minChars:0,responseTime:0,fetch:function(r){var o=JH(t.filetype,r,n),i=qB(o,jS.BUBBLE_TO_SANDBOX,e,!1);return tD.pure(i)},getHotspot:function(t){return m.getOpt(t)},onSetValue:function(t,e){t.hasConfigured(dD)&&dD.run(t).get(p)},typeaheadBehaviours:mf(nt([n.getValidationHandler().map((function(e){return dD.config({getRoot:function(t){return vn(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,e){s.getOpt(t).each((function(t){Fn(t.element,"title",o.translate(e))}))}},validator:{validate:function(n){var r=tp.getValue(n);return HH.nu((function(n){e({type:t.filetype,url:r.value},(function(t){if("invalid"===t.status){var e=ro.error(t.message);n(e)}else{var r=ro.value(t.message);n(r)}}))}))},validateOnLoad:!1}})})).toArray(),[Hv.config({disabled:function(){return t.disabled||o.isDisabled()}}),yA.config({}),Vw("urlinput-events",nt(["file"===t.filetype?[Ra(Uu(),(function(e){Sa(e,EA,{name:t.name})}))]:[],[Ra(ju(),(function(e){Sa(e,EA,{name:t.name}),i(e)})),Ra(Zu(),(function(e){Sa(e,EA,{name:t.name}),i(e)}))]]))]])),eventOrder:(r={},r[Uu()]=["streaming","urlinput-events","invalidating"],r),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:e.shared.getSink,parts:{menu:pk(!1,1,"normal")},onExecute:function(t,e,n){Sa(e,MA,{})},onItemExecute:function(e,n,r,o){i(e),Sa(e,EA,{name:t.name})}}),a=t.label.map((function(t){return OA(t,o)})),c=function(t,e,n,r){return void 0===n&&(n=t),void 0===r&&(r=t),LC(n,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+t],attributes:A({title:o.translate(r),"aria-live":"polite"},e.fold((function(){return{}}),(function(t){return{id:t}})))},o.icons)},s=kC(c("invalid",L.some(QH),"warning")),l=kC({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[s.asSpec()]}),f=n.getUrlPicker(t.filetype),d=oc("browser.url.event"),m=kC({dom:{tag:"div",classes:["tox-control-wrap"]},components:[u,l.asSpec()],behaviours:mf([Hv.config({disabled:function(){return t.disabled||o.isDisabled()}})])}),g=kC(ZB({name:t.name,icon:L.some("browse"),text:t.label.getOr(""),disabled:t.disabled,primary:!1,borderless:!0},(function(t){return Ca(t,d)}),o,[],["tox-browse-url"])),h=function(){return{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:nt([[m.asSpec()],f.map((function(){return g.asSpec()})).toArray()])}},v=function(e){bv.getCurrent(e).each((function(n){var r=tp.getValue(n),o=A({fieldname:t.name},r);f.each((function(r){r(o).get((function(r){tp.setValue(n,r),Sa(e,EA,{name:t.name})}))}))}))};return hA.sketch({dom:kA(),components:a.toArray().concat([h()]),fieldBehaviours:mf([Hv.config({disabled:function(){return t.disabled||o.isDisabled()},onDisabled:function(t){hA.getField(t).each(Hv.disable),g.getOpt(t).each(Hv.disable)},onEnabled:function(t){hA.getField(t).each(Hv.enable),g.getOpt(t).each(Hv.enable)}}),cO(),Vw("url-input-events",[Ra(d,v)])])})},tI=function(t,e){return sA.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+t.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[SC.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:MC(t.icon,e.icons),attributes:{title:e.translate(t.iconTooltip)}},action:function(e){Sa(e,DA,{name:"alert-banner",value:t.url})},buttonBehaviours:mf([zC()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:e.translate(t.text)}}]})},eI=function(t,e){var n=tp.config({store:{mode:"manual",getValue:function(t){var e=t.element.dom;return e.checked},setValue:function(t,e){var n=t.element.dom;n.checked=e}}}),r=function(t){return t.element.dom.click(),L.some(!0)},o=hA.parts.field({factory:{sketch:x},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:mf([WN.self(),Hv.config({disabled:function(){return t.disabled||e.isDisabled()}}),yA.config({}),Yw.config({}),n,Aw.config({mode:"special",onEnter:r,onSpace:r,stopSpaceKeyup:!0}),Vw("checkbox-events",[Ra(ju(),(function(e,n){Sa(e,EA,{name:t.name})}))])])}),i=hA.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:e.translate(t.label)},behaviours:mf([VD.config({})])}),u=function(t){var n="checked"===t?"selected":"unselected";return LC(n,{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},e.icons)},a=kC({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[u("checked"),u("unchecked")]});return hA.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[o,a.asSpec(),i],fieldBehaviours:mf([Hv.config({disabled:function(){return t.disabled||e.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){hA.getField(t).each(Hv.disable)},onEnabled:function(t){hA.getField(t).each(Hv.enable)}}),cO()])})},nI=function(t){return"presentation"===t.presets?sA.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}):sA.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:mf([yA.config({}),Yw.config({})])})},rI=function(t){return function(e,n,r){return Ot(n,"name").fold((function(){return t(n,r)}),(function(o){return e.field(o,t(n,r))}))}},oI=function(t){return function(e,n,r){var o=Co(n,{source:"dynamic"});return rI(t)(e,o,r)}},iI={bar:rI((function(t,e){return fA(t,e.shared)})),collection:rI((function(t,e){return LA(t,e.shared.providers)})),alertbanner:rI((function(t,e){return tI(t,e.shared.providers)})),input:rI((function(t,e){return lH(t,e.shared.providers)})),textarea:rI((function(t,e){return fH(t,e.shared.providers)})),label:rI((function(t,e){return QL(t,e.shared)})),iframe:oI((function(t,e){return wz(t,e.shared.providers)})),button:rI((function(t,e){return oL(t,e.shared.providers)})),checkbox:rI((function(t,e){return eI(t,e.shared.providers)})),colorinput:rI((function(t,e){return $D(t,e.shared,e.colorinput)})),colorpicker:rI(KN),dropzone:rI((function(t,e){return sz(t,e.shared.providers)})),grid:rI((function(t,e){return lz(t,e.shared)})),listbox:rI((function(t,e){return rH(t,e)})),selectbox:rI((function(t,e){return aH(t,e.shared.providers)})),sizeinput:rI((function(t,e){return vL(t,e.shared.providers)})),urlinput:rI((function(t,e){return ZH(t,e,e.urlinput)})),customeditor:rI(JN),htmlpanel:rI(nI),imagetools:rI((function(t,e){return JL(t,e.shared.providers)})),table:rI((function(t,e){return cH(t,e.shared.providers)})),panel:rI((function(t,e){return oH(t,e)}))},uI={field:function(t,e){return e}},aI=function(t,e,n){var r=Co(n,{shared:{interpreter:function(e){return cI(t,e,r)}}});return cI(t,e,r)},cI=function(t,e,n){return Ot(iI,e.type).fold((function(){return console.error('Unknown factory type "'+e.type+'", defaulting to container: ',e),e}),(function(r){return r(t,e,n)}))},sI=function(t,e){var n=uI;return cI(n,t,e)},lI={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},fI=function(t,e,n){var r=12,o={maxHeightFunction:Ed()},i=function(){return{type:"node",root:Dn(t()),node:L.from(t()),bubble:Rd(r,r,lI),layouts:{onRtl:function(){return[dC]},onLtr:function(){return[fC]}},overrides:o}},u=function(){return{type:"hotspot",hotspot:e(),bubble:Rd(-r,r,lI),layouts:{onRtl:function(){return[Vl]},onLtr:function(){return[Ul]}},overrides:o}};return function(){return n()?i():u()}},dI=function(t,e,n){var r=function(){return{type:"node",root:Dn(t()),node:L.from(t()),layouts:{onRtl:function(){return[mC]},onLtr:function(){return[mC]}}}},o=function(){return{type:"hotspot",hotspot:e(),layouts:{onRtl:function(){return[$l]},onLtr:function(){return[$l]}}}};return function(){return n()?r():o()}},mI=function(t,e){return function(){return{type:"selection",root:e(),getSelection:function(){var e=t.selection.getRng();return L.some(km.range(ee.fromDom(e.startContainer),e.startOffset,ee.fromDom(e.endContainer),e.endOffset))}}}},gI=function(t){return function(e){return{type:"node",root:t(),node:e}}},hI=function(t,e,n){var r=UT(t),o=function(){return ee.fromDom(t.getBody())},i=function(){return ee.fromDom(t.getContentAreaContainer())},u=function(){return r||!n()};return{inlineDialog:fI(i,e,u),banner:dI(i,e,u),cursor:mI(t,o),node:gI(o)}},pI=function(t){return function(e,n){var r=t_(t);r(e,n)}},vI=function(t){return function(){return BE(t)}},bI=function(t){return function(){return HE(t)}},yI=function(t){return function(){return $E(t)}},wI=function(t){return{colorPicker:pI(t),hasCustomColors:vI(t),getColors:bI(t),getColorCols:yI(t)}},xI=function(t){return function(){return GT(t)}},CI=function(t){return{isDraggableModal:xI(t)}},SI=function(t){var e=ou(HT(t)?"bottom":"top");return{isPositionedAtTop:function(){return"top"===e.get()},getDockingMode:e.get,setDockingMode:e.set}},kI=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],TI=function(t){return Et(t,"items")},OI=function(t){return Et(t,"block")},EI=function(t){return Et(t,"inline")},_I=function(t){return Et(t,"selector")},AI=function(t){return Q(t,(function(t,e){if(TI(e)){var n=AI(e.items);return{customFormats:t.customFormats.concat(n.customFormats),formats:t.formats.concat([{title:e.title,items:n.formats}])}}if(EI(e)||OI(e)||_I(e)){var r=i(e.name)?e.name:e.title.toLowerCase(),o="custom-"+r;return{customFormats:t.customFormats.concat([{name:o,format:e}]),formats:t.formats.concat([{title:e.title,format:o,icon:e.icon}])}}return A(A({},t),{formats:t.formats.concat(e)})}),{customFormats:[],formats:[]})},DI=function(t,e){var n=AI(e),r=function(e){G(e,(function(e){t.formatter.has(e.name)||t.formatter.register(e.name,e.format)}))};return t.formatter?r(n.customFormats):t.on("init",(function(){r(n.customFormats)})),n.formats},MI=function(t){return ST(t).map((function(e){var n=DI(t,e);return kT(t)?kI.concat(n):n})).getOr(kI)},RI=function(t,e,n){var r={type:"formatter",isSelected:e(t.format),getStylePreview:n(t.format)};return Co(t,r)},NI=function(t,e,n,r){var o=function(t){return RI(t,n,r)},u=function(t){var e={type:"submenu"};return Co(t,e)},a=function(e){var o=i(e.name)?e.name:oc(e.title),u="custom-"+o,a={type:"formatter",format:u,isSelected:n(u),getStylePreview:r(u)},c=Co(e,a);return t.formatter.register(o,c),c},c=function(t){return $(t,(function(t){var e=ht(t);if(_t(t,"items")){var n=c(t.items);return Co(u(t),{getStyleItems:w(n)})}return _t(t,"format")?o(t):1===e.length&&U(e,"title")?Co(t,{type:"separator"}):a(t)}))};return c(e)},zI=function(t){var e=function(e){return function(){return t.formatter.match(e)}},n=function(e){return function(){var n=t.formatter.get(e);return void 0!==n?L.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):L.none()}},r=function(t){var e=t.items;return void 0!==e&&e.length>0?rt(e,r):[t.format]},o=ou([]),i=ou([]),u=ou([]),a=ou([]),c=ou(!1);t.on("PreInit",(function(u){var a=MI(t),c=NI(t,a,e,n);o.set(c),i.set(rt(c,r))})),t.on("addStyleModifications",(function(o){var i=NI(t,o.items,e,n);u.set(i),c.set(o.replace),a.set(rt(i,r))}));var s=function(){var t=c.get()?[]:o.get(),e=u.get();return t.concat(e)},l=function(){var t=c.get()?[]:i.get(),e=a.get();return t.concat(e)};return{getData:s,getFlattenedKeys:l}},BI=function(t){return d(t)&&1===t.nodeType},LI=QN.trim,HI=function(t){return function(e){if(BI(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},II=HI("true"),PI=HI("false"),FI=function(t,e,n,r,o){return{type:t,title:e,url:n,level:r,attach:o}},VI=function(t){while(t=t.parentNode){var e=t.contentEditable;if(e&&"inherit"!==e)return II(t)}return!1},UI=function(t,e){return $(Xm(ee.fromDom(e),t),(function(t){return t.dom}))},jI=function(t){return t.innerText||t.textContent},WI=function(t){return t.id?t.id:oc("h")},qI=function(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)},$I=function(t){return qI(t)&&KI(t)},GI=function(t){return t&&/^(H[1-6])$/.test(t.nodeName)},KI=function(t){return VI(t)&&!PI(t)},XI=function(t){return GI(t)&&KI(t)},YI=function(t){return GI(t)?parseInt(t.nodeName.substr(1),10):0},JI=function(t){var e=WI(t),n=function(){t.id=e};return FI("header",jI(t),"#"+e,YI(t),n)},QI=function(t){var e=t.id||t.name,n=jI(t);return FI("anchor",n||"#"+e,"#"+e,0,p)},ZI=function(t){return $(Y(t,XI),JI)},tP=function(t){return $(Y(t,$I),QI)},eP=function(t){var e=UI("h1,h2,h3,h4,h5,h6,a:not([href])",t);return e},nP=function(t){return LI(t.title).length>0},rP=function(t){var e=eP(t);return Y(ZI(e).concat(tP(e)),nP)},oP={find:rP},iP="tinymce-url-history",uP=5,aP=function(t){return i(t)&&/^https?/.test(t)},cP=function(t){return a(t)&&t.length<=uP&&ot(t,aP)},sP=function(t){return u(t)&&kt(t,(function(t){return!cP(t)})).isNone()},lP=function(){var t,e=OE.getItem(iP);if(null===e)return{};try{t=JSON.parse(e)}catch(n){if(n instanceof SyntaxError)return console.log("Local storage "+iP+" was not valid JSON",n),{};throw n}return sP(t)?t:(console.log("Local storage "+iP+" was not valid format",t),{})},fP=function(t){if(!sP(t))throw new Error("Bad format for history:\n"+JSON.stringify(t));OE.setItem(iP,JSON.stringify(t))},dP=function(t){var e=lP();return Ot(e,t).getOr([])},mP=function(t,e){if(aP(t)){var n=lP(),r=Ot(n,e).getOr([]),o=Y(r,(function(e){return e!==t}));n[e]=[t].concat(o).slice(0,uP),fP(n)}},gP=function(t){return!!t},hP=function(t){return bt(QN.makeMap(t,/[, ]/),gP)},pP=function(t){return L.from(JT(t)).filter(m)},vP=function(t){var e=L.some(QT(t)).filter(gP),n=L.some(ZT(t)).filter(gP),r=e.or(n).map(hP);return pP(t).fold(O,(function(t){return r.fold(E,(function(t){return ht(t).length>0&&t}))}))},bP=function(t,e){var n=vP(t);return s(n)?n?pP(t):L.none():n[e]?pP(t):L.none()},yP=function(t,e){return bP(t,e).map((function(n){return function(r){return tD.nu((function(o){var a=function(t,e){if(!i(t))throw new Error("Expected value to be string");if(void 0!==e&&!u(e))throw new Error("Expected meta to be a object");var n={value:t,meta:e};o(n)},c=A({filetype:e,fieldname:r.fieldname},L.from(r.meta).getOr({}));n.call(t,a,r.value,c)}))}}))},wP=function(t){return L.from(t).filter(i).getOrUndefined()},xP=function(t){return tO(t)?L.none():L.some({targets:oP.find(t.getBody()),anchorTop:wP(eO(t)),anchorBottom:wP(nO(t))})},CP=function(t){return L.from(rO(t))},SP=function(t){return{getHistory:dP,addToHistory:mP,getLinkInformation:function(){return xP(t)},getValidationHandler:function(){return CP(t)},getUrlPicker:function(e){return yP(t,e)}}},kP=function(t,e,n){var r=ou(!1),o=SI(e),i={shared:{providers:{icons:function(){return e.ui.registry.getAll().icons},menuItems:function(){return e.ui.registry.getAll().menuItems},translate:TC.translate,isDisabled:function(){return e.mode.isReadOnly()||e.ui.isDisabled()},getSetting:e.getParam.bind(e)},interpreter:function(t){return sI(t,i)},anchors:hI(e,n,o.isPositionedAtTop),header:o,getSink:function(){return ro.value(t)}},urlinput:SP(e),styleselect:zI(e),colorinput:wI(e),dialog:CI(e),isContextMenuOpen:function(){return r.get()},setContextMenuState:function(t){return r.set(t)}};return i},TP=function(t,e,n){var r=function(t,r){G([e,n],(function(e){e.broadcastEvent(t,r)}))},o=function(t,r){G([e,n],(function(e){e.broadcastOn([t],r)}))},i=function(t){return o(yh(),{target:t.target})},u=Cf(),a=ud(u,"touchstart",i),c=ud(u,"touchmove",(function(t){return r(ca(),t)})),s=ud(u,"touchend",(function(t){return r(sa(),t)})),l=ud(u,"mousedown",i),f=ud(u,"mouseup",(function(t){0===t.raw.button&&o(xh(),{target:t.target})})),d=function(t){return o(yh(),{target:ee.fromDom(t.target)})},m=function(t){0===t.button&&o(xh(),{target:ee.fromDom(t.target)})},g=function(){G(t.editorManager.get(),(function(e){t!==e&&e.fire("DismissPopups",{relatedTarget:t})}))},h=function(t){return r(la(),cd(t))},p=function(t){o(wh(),{}),r(fa(),cd(t))},v=function(){return o(wh(),{})},b=function(e){e.state&&o(yh(),{target:ee.fromDom(t.getContainer())})},y=function(t){o(yh(),{target:ee.fromDom(t.relatedTarget.getContainer())})};t.on("PostRender",(function(){t.on("click",d),t.on("tap",d),t.on("mouseup",m),t.on("mousedown",g),t.on("ScrollWindow",h),t.on("ResizeWindow",p),t.on("ResizeEditor",v),t.on("AfterProgressState",b),t.on("DismissPopups",y)})),t.on("remove",(function(){t.off("click",d),t.off("tap",d),t.off("mouseup",m),t.off("mousedown",g),t.off("ScrollWindow",h),t.off("ResizeWindow",p),t.off("ResizeEditor",v),t.off("AfterProgressState",b),t.off("DismissPopups",y),l.unbind(),a.unbind(),c.unbind(),s.unbind(),f.unbind()})),t.on("detach",(function(){Qg(e),Qg(n),e.destroy(),n.destroy()}))},OP=nv,EP=Ip,_P=w([Ki("shell",!1),Ai("makeItem"),Ki("setupItem",p),op.field("listBehaviours",[Pw])]),AP=function(){return{behaviours:mf([Pw.config({})])}},DP=Bp({name:"items",overrides:AP}),MP=w([DP]),RP=w("CustomList"),NP=function(t,e,n,r){var o=function(e,n){u(e).fold((function(){throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(function(r){var o=Pw.contents(r),i=n.length,u=i-o.length,a=u>0?W(u,(function(){return t.makeItem()})):[],c=o.slice(i);G(c,(function(t){return Pw.remove(r,t)})),G(a,(function(t){return Pw.append(r,t)}));var s=Pw.contents(r);G(s,(function(r,o){t.setupItem(e,r,n[o],o)}))}))},i=t.shell?{behaviours:[Pw.config({})],components:[]}:{behaviours:[],components:e},u=function(e){return t.shell?L.some(e):Kp(e,t,"items")};return{uid:t.uid,dom:t.dom,components:i.components,behaviours:rp(t.listBehaviours,i.behaviours),apis:{setItems:o}}},zP=mv({name:RP(),configFields:_P(),partFields:MP(),factory:NP,apis:{setItems:function(t,e,n){t.setItems(e,n)}}}),BP=w([Ai("dom"),Ki("shell",!0),ep("toolbarBehaviours",[Pw])]),LP=function(){return{behaviours:mf([Pw.config({})])}},HP=w([Bp({name:"groups",overrides:LP})]),IP=function(t,e,n,r){var o=function(t,e){i(t).fold((function(){throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(function(t){Pw.set(t,e)}))},i=function(e){return t.shell?L.some(e):Kp(e,t,"groups")},u=t.shell?{behaviours:[Pw.config({})],components:[]}:{behaviours:[],components:e};return{uid:t.uid,dom:t.dom,components:u.components,behaviours:rp(t.toolbarBehaviours,u.behaviours),apis:{setGroups:o},domModification:{attributes:{role:"group"}}}},PP=mv({name:"Toolbar",configFields:BP(),partFields:HP(),factory:IP,apis:{setGroups:function(t,e,n){t.setGroups(e,n)}}}),FP=p,VP=O,UP=w([]),jP=Object.freeze({__proto__:null,setup:FP,isDocked:VP,getBehaviours:UP}),WP=function(t){var e=At(Zn(t,"position"),"fixed"),n=e?L.none():yn(t);return n.orThunk((function(){var e=ee.fromTag("span");return vn(t).bind((function(t){Dr(t,e);var n=yn(e);return Br(e),n}))}))},qP=function(t){return WP(t).map(mr).getOrThunk((function(){return lr(0,0)}))},$P=uu.generate([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),GP=function(t,e){var n=t.element;is(n,e.transitionClass),as(n,e.fadeOutClass),is(n,e.fadeInClass),e.onShow(t)},KP=function(t,e){var n=t.element;is(n,e.transitionClass),as(n,e.fadeInClass),is(n,e.fadeOutClass),e.onHide(t)},XP=function(t,e){return t.y<e.bottom&&t.bottom>e.y},YP=function(t,e){return t.y>=e.y},JP=function(t,e){return t.bottom<=e.bottom},QP=function(t,e,n){return ot(t,(function(t){switch(t){case"bottom":return JP(e,n);case"top":return YP(e,n)}}))},ZP=function(t,e){return e.getInitialPos().map((function(e){return Yr(e.bounds.x,e.bounds.y,vr(t),ur(t))}))},tF=function(t,e,n){n.setInitialPos({style:tr(t),position:Jn(t,"position")||"static",bounds:e})},eF=function(t,e,n){return n.getInitialPos().bind((function(r){switch(n.clearInitialPos(),r.position){case"static":return L.some($P.static());case"absolute":var o=WP(t).map(Jr).getOrThunk((function(){return Jr(Hn())}));return L.some($P.absolute(Af("absolute",Ot(r.style,"left").map((function(t){return e.x-o.x})),Ot(r.style,"top").map((function(t){return e.y-o.y})),Ot(r.style,"right").map((function(t){return o.right-e.right})),Ot(r.style,"bottom").map((function(t){return o.bottom-e.bottom})))));default:return L.none()}}))},nF=function(t,e,n){return ZP(t,n).filter((function(t){return QP(n.getModes(),t,e)})).bind((function(e){return eF(t,e,n)}))},rF=function(t,e,n){var r=Jr(t);if(QP(n.getModes(),r,e))return L.none();tF(t,r,n);var o=Zr(),i=r.x-o.x,u=e.y-o.y,a=o.bottom-e.bottom,c=r.y<=e.y;return L.some($P.fixed(Af("fixed",L.some(i),c?L.some(u):L.none(),L.none(),c?L.none():L.some(a))))},oF=function(t,e,n){var r=t.element,o=At(Zn(r,"position"),"fixed");return o?nF(r,e,n):rF(r,e,n)},iF=function(t,e){var n=t.element;return ZP(n,e).bind((function(t){return eF(n,t,e)}))},uF=function(t,e,n){n.setDocked(!1),G(["left","right","top","bottom","position"],(function(e){return nr(t.element,e)})),e.onUndocked(t)},aF=function(t,e,n,r){var o="fixed"===r.position;n.setDocked(o),Mf(t.element,r);var i=o?e.onDocked:e.onUndocked;i(t)},cF=function(t,e,n,r,o){void 0===o&&(o=!1),e.contextual.each((function(e){e.lazyContext(t).each((function(i){var u=XP(i,r);if(u!==n.isVisible())if(n.setVisible(u),o&&!u)ss(t.element,[e.fadeOutClass]),e.onHide(t);else{var a=u?GP:KP;a(t,e)}}))}))},sF=function(t,e,n){var r=e.lazyViewport(t),o=n.isDocked();o&&cF(t,e,n,r),oF(t,r,n).each((function(o){o.fold((function(){return uF(t,e,n)}),(function(r){return aF(t,e,n,r)}),(function(o){cF(t,e,n,r,!0),aF(t,e,n,o)}))}))},lF=function(t,e,n){var r=t.element;n.setDocked(!1),iF(t,n).each((function(r){r.fold((function(){return uF(t,e,n)}),(function(r){return aF(t,e,n,r)}),p)})),n.setVisible(!0),e.contextual.each((function(e){ls(r,[e.fadeInClass,e.fadeOutClass,e.transitionClass]),e.onShow(t)})),fF(t,e,n)},fF=function(t,e,n){t.getSystem().isConnected()&&sF(t,e,n)},dF=function(t,e,n){n.isDocked()&&lF(t,e,n)},mF=function(t,e,n){return n.isDocked()},gF=function(t,e,n,r){return n.setModes(r)},hF=function(t,e,n){return n.getModes()},pF=Object.freeze({__proto__:null,refresh:fF,reset:dF,isDocked:mF,getModes:hF,setModes:gF}),vF=function(t,e){return _a([Va($u(),(function(n,r){t.contextual.each((function(t){if(cs(n.element,t.transitionClass)){ls(n.element,[t.transitionClass,t.fadeInClass]);var o=e.isVisible()?t.onShown:t.onHidden;o(n)}r.stop()}))})),Ra(la(),(function(n,r){fF(n,t,e)})),Ra(fa(),(function(n,r){dF(n,t,e)}))])},bF=Object.freeze({__proto__:null,events:vF}),yF=[$i("contextual",[Ri("fadeInClass"),Ri("fadeOutClass"),Ri("transitionClass"),Bi("lazyContext"),al("onShow"),al("onShown"),al("onHide"),al("onHidden")]),tu("lazyViewport",Zr),nu("modes",["top","bottom"],si),al("onDocked"),al("onUndocked")],wF=function(t){var e=ou(!1),n=ou(!0),r=od(),o=ou(t.modes),i=function(){return"docked: "+e.get()+", visible: "+n.get()+", modes: "+o.get().join(",")};return Tc({isDocked:e.get,setDocked:e.set,getInitialPos:r.get,setInitialPos:r.set,clearInitialPos:r.clear,isVisible:n.get,setVisible:n.set,getModes:o.get,setModes:o.set,readState:i})},xF=Object.freeze({__proto__:null,init:wF}),CF=hf({fields:yF,name:"docking",active:bF,apis:pF,state:xF}),SF=w(oc("toolbar-height-change")),kF={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},TF="tox-tinymce--toolbar-sticky-on",OF="tox-tinymce--toolbar-sticky-off",EF=function(t,e){var n=mn(e),r=n.dom.defaultView.innerHeight,o=Hr(n),i=ee.fromDom(t.elm),u=Qr(i),a=ur(i),c=u.y,s=c+a,l=mr(e),f=ur(e),d=l.top,m=d+f,g=Math.abs(d-o.top)<2,h=Math.abs(m-(o.top+r))<2;if(g&&c<m)Ir(o.left,c-f,n);else if(h&&s>d){var p=c-r+a+f;Ir(o.left,p,n)}},_F=function(t,e){return U(CF.getModes(t),e)},AF=function(t){var e=function(t){return ar(t)+(parseInt(Jn(t,"margin-top"),10)||0)+(parseInt(Jn(t,"margin-bottom"),10)||0)},n=t.element;vn(n).each((function(r){var o="padding-"+CF.getModes(t)[0];if(CF.isDocked(t)){var i=vr(r);Kn(n,"width",i+"px"),Kn(r,o,e(n)+"px")}else nr(n,"width"),nr(r,o)}))},DF=function(t,e){e?(as(t,kF.fadeOutClass),ss(t,[kF.transitionClass,kF.fadeInClass])):(as(t,kF.fadeInClass),ss(t,[kF.fadeOutClass,kF.transitionClass]))},MF=function(t,e){var n=ee.fromDom(t.getContainer());e?(is(n,TF),as(n,OF)):(is(n,OF),as(n,TF))},RF=function(t,e){var n=mn(e);Of(n).filter((function(t){return!sn(e,t)})).filter((function(e){return sn(e,ee.fromDom(n.dom.body))||dn(t,e)})).each((function(){return Sf(e)}))},NF=function(t,e){return Ef(t).orThunk((function(){return e().toOptional().bind((function(t){return Ef(t.element)}))}))},zF=function(t,e,n){t.inline||(e.header.isPositionedAtTop()||t.on("ResizeEditor",(function(){n().each(CF.reset)})),t.on("ResizeWindow ResizeEditor",(function(){n().each(AF)})),t.on("SkinLoaded",(function(){n().each((function(t){CF.isDocked(t)?CF.reset(t):CF.refresh(t)}))})),t.on("FullscreenStateChanged",(function(){n().each(CF.reset)}))),t.on("AfterScrollIntoView",(function(t){n().each((function(e){CF.refresh(e);var n=e.element;Jb(n)&&EF(t,n)}))})),t.on("PostRender",(function(){MF(t,!1)}))},BF=function(t){return t().map(CF.isDocked).getOr(!1)},LF=function(){var t;return[yf.config({channels:(t={},t[SF()]={onReceive:AF},t)})]},HF=function(t,e){var n=od(),r=e.getSink,o=function(t){r().each((function(e){return t(e.element)}))},i=function(e){t.inline||AF(e),MF(t,CF.isDocked(e)),e.getSystem().broadcastOn([wh()],{}),r().each((function(t){return t.getSystem().broadcastOn([wh()],{})}))},u=t.inline?[]:LF();return M([Yw.config({}),CF.config({contextual:A({lazyContext:function(e){var n=ar(e.element),r=t.inline?t.getContentAreaContainer():t.getContainer(),o=Jr(ee.fromDom(r)),i=o.height-n,u=o.y+(_F(e,"top")?0:n);return L.some(Yr(o.x,u,o.width,i))},onShow:function(){o((function(t){return DF(t,!0)}))},onShown:function(t){o((function(t){return ls(t,[kF.transitionClass,kF.fadeInClass])})),n.get().each((function(e){RF(t.element,e),n.clear()}))},onHide:function(t){NF(t.element,r).fold(n.clear,n.set),o((function(t){return DF(t,!1)}))},onHidden:function(){o((function(t){return ls(t,[kF.transitionClass])}))}},kF),lazyViewport:function(e){var n=Zr(),r=$T(t),o=n.y+(_F(e,"top")?r:0),i=n.height-(_F(e,"bottom")?r:0);return Yr(n.x,o,n.width,i)},modes:[e.header.getDockingMode()],onDocked:i,onUndocked:i})],u,!0)},IF=Object.freeze({__proto__:null,setup:zF,isDocked:BF,getBehaviours:HF}),PF=function(t){var e=t.editor,n=t.sticky?HF:UP;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:mf(n(e,t.sharedBackstage))}},FF=ti([Ri("type"),Di("items",ni([ii([Ri("name"),Pi("items",si)]),si]))].concat(kS)),VF=function(t){return wi("GroupToolbarButton",FF,t)},UF=[ji("text"),ji("tooltip"),ji("icon"),Bi("fetch"),tu("onSetup",(function(){return p}))],jF=ti(M([Ri("type")],UF,!0)),WF=function(t){return wi("menubutton",jF,t)},qF=ti([Ri("type"),ji("tooltip"),ji("icon"),ji("text"),Wi("select"),Bi("fetch"),tu("onSetup",(function(){return p})),Qi("presets","normal",["normal","color","listpreview"]),Ki("columns",1),Bi("onAction"),Bi("onItemAction")]),$F=function(t){return wi("SplitButton",qF,t)},GF=function(t,e){var n=function(t,n){var r=$(n,(function(t){var n={type:"menubutton",text:t.text,fetch:function(e){e(t.getItems())}},r=WF(n).mapError((function(t){return Si(t)})).getOrDie();return GB(r,"tox-mbtn",e.backstage,L.some("menuitem"))}));Pw.set(t,r)},r={focus:Aw.focusIn,setMenus:n};return{uid:t.uid,dom:t.dom,components:[],behaviours:mf([Pw.config({}),Vw("menubar-events",[Ua((function(e){t.onSetup(e)})),Ra(Hu(),(function(t,e){Is(t.element,".tox-mbtn--active").each((function(n){Ps(e.event.target,".tox-mbtn").each((function(e){sn(n,e)||t.getSystem().getByDom(n).each((function(n){t.getSystem().getByDom(e).each((function(t){HD.expand(t),HD.close(n),Yw.focus(t)}))}))}))}))})),Ra(pa(),(function(t,e){e.event.prevFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(n){e.event.newFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(t){HD.isOpen(n)&&(HD.expand(t),HD.close(n))}))}))}))]),Aw.config({mode:"flow",selector:".tox-mbtn",onEscape:function(e){return t.onEscape(e),L.some(!0)}}),yA.config({})]),apis:r,domModification:{attributes:{role:"menubar"}}}},KF=dv({factory:GF,name:"silver.Menubar",configFields:[Ai("dom"),Ai("uid"),Ai("onEscape"),Ai("backstage"),Ki("onSetup",p)],apis:{focus:function(t,e){t.focus(e)},setMenus:function(t,e,n){t.setMenus(e,n)}}}),XF=function(t,e){return e.getAnimationRoot.fold((function(){return t.element}),(function(e){return e(t)}))},YF=function(t){return t.dimension.property},JF=function(t,e){return t.dimension.getDimension(e)},QF=function(t,e){var n=XF(t,e);ls(n,[e.shrinkingClass,e.growingClass])},ZF=function(t,e){as(t.element,e.openClass),is(t.element,e.closedClass),Kn(t.element,YF(e),"0px"),rr(t.element)},tV=function(t,e){as(t.element,e.closedClass),is(t.element,e.openClass),nr(t.element,YF(e))},eV=function(t,e,n,r){n.setCollapsed(),Kn(t.element,YF(e),JF(e,t.element)),rr(t.element),QF(t,e),ZF(t,e),e.onStartShrink(t),e.onShrunk(t)},nV=function(t,e,n,r){var o=r.getOrThunk((function(){return JF(e,t.element)}));n.setCollapsed(),Kn(t.element,YF(e),o),rr(t.element);var i=XF(t,e);as(i,e.growingClass),is(i,e.shrinkingClass),ZF(t,e),e.onStartShrink(t)},rV=function(t,e,n){var r=JF(e,t.element),o="0px"===r?eV:nV;o(t,e,n,L.some(r))},oV=function(t,e,n){var r=XF(t,e),o=cs(r,e.shrinkingClass),i=JF(e,t.element);tV(t,e);var u=JF(e,t.element),a=function(){Kn(t.element,YF(e),i),rr(t.element)},c=function(){ZF(t,e)},s=o?a:c;s(),as(r,e.shrinkingClass),is(r,e.growingClass),tV(t,e),Kn(t.element,YF(e),u),n.setExpanded(),e.onStartGrow(t)},iV=function(t,e,n){if(n.isExpanded()){nr(t.element,YF(e));var r=JF(e,t.element);Kn(t.element,YF(e),r)}},uV=function(t,e,n){n.isExpanded()||oV(t,e,n)},aV=function(t,e,n){n.isExpanded()&&rV(t,e,n)},cV=function(t,e,n){n.isExpanded()&&eV(t,e,n)},sV=function(t,e,n){return n.isExpanded()},lV=function(t,e,n){return n.isCollapsed()},fV=function(t,e,n){var r=XF(t,e);return!0===cs(r,e.growingClass)},dV=function(t,e,n){var r=XF(t,e);return!0===cs(r,e.shrinkingClass)},mV=function(t,e,n){return fV(t,e)||dV(t,e)},gV=function(t,e,n){var r=n.isExpanded()?rV:oV;r(t,e,n)},hV=Object.freeze({__proto__:null,refresh:iV,grow:uV,shrink:aV,immediateShrink:cV,hasGrown:sV,hasShrunk:lV,isGrowing:fV,isShrinking:dV,isTransitioning:mV,toggleGrow:gV,disableTransitions:QF}),pV=function(t,e,n){var r=e.expanded;return Dc(r?{classes:[e.openClass],styles:{}}:{classes:[e.closedClass],styles:mu(e.dimension.property,"0px")})},vV=function(t,e){return _a([Va($u(),(function(n,r){var o=r.event.raw;if(o.propertyName===t.dimension.property){QF(n,t),e.isExpanded()&&nr(n.element,t.dimension.property);var i=e.isExpanded()?t.onGrown:t.onShrunk;i(n)}}))])},bV=Object.freeze({__proto__:null,exhibit:pV,events:vV}),yV=[Ai("closedClass"),Ai("openClass"),Ai("shrinkingClass"),Ai("growingClass"),Fi("getAnimationRoot"),al("onShrunk"),al("onStartShrink"),al("onGrown"),al("onStartGrow"),Ki("expanded",!1),Di("dimension",ki("property",{width:[fl("property","width"),fl("getDimension",(function(t){return vr(t)+"px"}))],height:[fl("property","height"),fl("getDimension",(function(t){return ur(t)+"px"}))]}))],wV=function(t){var e=ou(t.expanded),n=function(){return"expanded: "+e.get()};return Tc({isExpanded:function(){return!0===e.get()},isCollapsed:function(){return!1===e.get()},setCollapsed:S(e.set,!1),setExpanded:S(e.set,!0),readState:n})},xV=Object.freeze({__proto__:null,init:wV}),CV=hf({fields:yV,name:"sliding",active:bV,apis:hV,state:xV}),SV="container",kV=[ep("slotBehaviours",[])],TV=function(t){return"<alloy.field."+t+">"},OV=function(t){var e=function(){var t=[],e=function(e,n){return t.push(e),jp(SV,TV(e),n)};return{slot:e,record:w(t)}}(),n=t(e),r=e.record(),o=$(r,(function(t){return Np({name:t,pname:TV(t)})}));return uv(SV,kV,o,EV,n)},EV=function(t,e){var n=function(e){return Qp(t)},r=function(e,n){return Kp(e,t,n)},o=function(e,n){return function(r,o){return Kp(r,t,o).map((function(t){return e(t,o)})).getOr(n)}},i=function(t){return function(e,n){G(n,(function(n){return t(e,n)}))}},u=function(t,e){return"true"!==Un(t.element,"aria-hidden")},a=function(t,e){if(!u(t)){var n=t.element;nr(n,"display"),qn(n,"aria-hidden"),Sa(t,va(),{name:e,visible:!0})}},c=function(t,e){if(u(t)){var n=t.element;Kn(n,"display","none"),Fn(n,"aria-hidden","true"),Sa(t,va(),{name:e,visible:!1})}},s=o(u,!1),l=o(c),f=i(l),d=function(t){return f(t,n())},m=o(a),g={getSlotNames:n,getSlot:r,isShowing:s,hideSlot:l,hideAllSlots:d,showSlot:m};return{uid:t.uid,dom:t.dom,components:e,behaviours:np(t.slotBehaviours),apis:g}},_V=bt({getSlotNames:function(t,e){return t.getSlotNames(e)},getSlot:function(t,e,n){return t.getSlot(e,n)},isShowing:function(t,e,n){return t.isShowing(e,n)},hideSlot:function(t,e,n){return t.hideSlot(e,n)},hideAllSlots:function(t,e){return t.hideAllSlots(e)},showSlot:function(t,e,n){return t.showSlot(e,n)}},(function(t){return Sc(t)})),AV=A(A({},_V),{sketch:OV}),DV=ti([ji("icon"),ji("tooltip"),tu("onShow",p),tu("onHide",p),tu("onSetup",(function(){return p}))]),MV=function(t){return wi("sidebar",DV,t)},RV=function(t){var e=t.ui.registry.getAll().sidebars;G(ht(e),(function(n){var r=e[n],o=function(){return At(L.from(t.queryCommandValue("ToggleSidebar")),n)};t.ui.registry.addToggleButton(n,{icon:r.icon,tooltip:r.tooltip,onAction:function(e){t.execCommand("ToggleSidebar",!1,n),e.setActive(o())},onSetup:function(e){var n=function(){return e.setActive(o())};return t.on("ToggleSidebar",n),function(){t.off("ToggleSidebar",n)}}})}))},NV=function(t){return{element:function(){return t.element.dom}}},zV=function(t,e){var n=$(ht(e),(function(t){var n=e[t],r=xi(MV(n));return{name:t,getApi:NV,onSetup:r.onSetup,onShow:r.onShow,onHide:r.onHide}}));return $(n,(function(e){var r=ou(p);return t.slot(e.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:Qk.unnamedEvents([hO(e,r),pO(e,r),Ra(va(),(function(t,e){var r=e.event,o=tt(n,(function(t){return t.name===r.name}));o.each((function(e){var n=r.visible?e.onShow:e.onHide;n(e.getApi(t))}))}))])})}))},BV=function(t){return AV.sketch((function(e){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:zV(e,t),slotBehaviours:Qk.unnamedEvents([Ua((function(t){return AV.hideAllSlots(t)}))])}}))},LV=function(t,e){var n=bv.getCurrent(t);n.each((function(t){return Pw.set(t,[BV(e)])}))},HV=function(t,e){var n=bv.getCurrent(t);n.each((function(t){var n=bv.getCurrent(t);n.each((function(n){CV.hasGrown(t)?AV.isShowing(n,e)?CV.shrink(t):(AV.hideAllSlots(n),AV.showSlot(n,e)):(AV.hideAllSlots(n),AV.showSlot(n,e),CV.grow(t))}))}))},IV=function(t){var e=bv.getCurrent(t);return e.bind((function(t){var e=CV.isGrowing(t)||CV.hasGrown(t);if(e){var n=bv.getCurrent(t);return n.bind((function(t){return tt(AV.getSlotNames(t),(function(e){return AV.isShowing(t,e)}))}))}return L.none()}))},PV=oc("FixSizeEvent"),FV=oc("AutoSizeEvent"),VV=function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:mf([yA.config({}),Yw.config({}),CV.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){var e=bv.getCurrent(t);e.each(AV.hideAllSlots),Ca(t,FV)},onGrown:function(t){Ca(t,FV)},onStartGrow:function(t){Sa(t,PV,{width:Zn(t.element,"width").getOr("")})},onStartShrink:function(t){Sa(t,PV,{width:vr(t.element)+"px"})}}),Pw.config({}),bv.config({find:function(t){var e=Pw.contents(t);return ft(e)}})])}],behaviours:mf([WN.childAt(0),Vw("sidebar-sliding-events",[Ra(PV,(function(t,e){Kn(t.element,"width",e.event.width)})),Ra(FV,(function(t,e){nr(t.element,"width")}))])])}},UV=function(t,e,n,r){Fn(t.element,"aria-busy",!0);var o=e.getRoot(t).getOr(t),i=mf([Aw.config({mode:"special",onTab:function(){return L.some(!0)},onShiftTab:function(){return L.some(!0)}}),Yw.config({})]),u=r(o,i),a=o.getSystem().build(u);Pw.append(o,_s(a)),a.hasConfigured(Aw)&&e.focus&&Aw.focusIn(a),n.isBlocked()||e.onBlock(t),n.blockWith((function(){return Pw.remove(o,a)}))},jV=function(t,e,n){qn(t.element,"aria-busy"),n.isBlocked()&&e.onUnblock(t),n.clear()},WV=Object.freeze({__proto__:null,block:UV,unblock:jV}),qV=[tu("getRoot",L.none),Zi("focus",!0),al("onBlock"),al("onUnblock")],$V=function(){var t=ed(),e=function(e){t.set({destroy:e})};return Tc({readState:t.isSet,blockWith:e,clear:t.clear,isBlocked:t.isSet})},GV=Object.freeze({__proto__:null,init:$V}),KV=hf({fields:qV,name:"blocking",apis:WV,state:GV}),XV=function(t){var e=void 0!==t.dom.attributes?t.dom.attributes:[];return Q(e,(function(t,e){var n;return"class"===e.name?t:A(A({},t),(n={},n[e.name]=e.value,n))}),{})},YV=function(t){return Array.prototype.slice.call(t.dom.classList,0)},JV=function(t){var e=ee.fromHtml(t),n=xn(e),r=XV(e),o=YV(e),i=0===n.length?{}:{innerHtml:Ga(e)};return A({tag:ae(e),classes:o,attributes:r},i)},QV=function(t){return function(e,n){return{dom:{tag:"div",attributes:{"aria-label":t.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:JV('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}}},ZV=function(t){return bv.getCurrent(t).each((function(t){return Sf(t.element)}))},tU=function(t,e){var n="tabindex",r="data-mce-"+n;L.from(t.iframeElement).map(ee.fromDom).each((function(t){e?(jn(t,n).each((function(e){return Fn(t,r,e)})),Fn(t,n,-1)):(qn(t,n),jn(t,r).each((function(e){Fn(t,n,e),qn(t,r)})))}))},eU=function(t,e,n,r){var o=e.element;if(tU(t,n),n)KV.block(e,QV(r)),nr(o,"display"),qn(o,"aria-hidden"),t.hasFocus()&&ZV(e);else{var i=bv.getCurrent(e).exists((function(t){return Tf(t.element)}));KV.unblock(e),Kn(o,"display","none"),Fn(o,"aria-hidden","true"),i&&t.focus()}},nU=function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:mf([Pw.config({}),KV.config({focus:!1}),bv.config({find:function(t){return ft(t.components())}})]),components:[]}},rU=function(t){return"focusin"===t.type},oU=function(t){if(rU(t)){var e=t.composed?ft(t.composedPath()):L.from(t.target);return e.map(ee.fromDom).filter(le).exists((function(t){return cs(t,"mce-pastebin")}))}return!1},iU=function(t,e,n){var r=ou(!1),o=od(),i=function(n){r.get()&&!oU(n)&&(n.preventDefault(),ZV(e()),t.editorManager.setActive(t))};t.inline||t.on("PreInit",(function(){t.dom.bind(t.getWin(),"focusin",i),t.on("BeforeExecCommand",(function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&i(t)}))}));var u=function(o){o!==r.get()&&(r.set(o),eU(t,e(),o,n.providers),t.fire("AfterProgressState",{state:o}))};t.on("ProgressState",(function(e){if(o.on(xC.clearTimeout),g(e.time)){var n=xC.setEditorTimeout(t,(function(){return u(e.state)}),e.time);o.set(n)}else u(e.state),o.clear()}))},uU=function(t,e){var n={len:0,list:[]},r=Q(t,(function(t,n){var r=e(n,t.len);return r.fold(w(t),(function(e){return{len:e.finish,list:t.list.concat([e])}}))}),n);return r.list},aU=function(t,e,n){return{within:t,extra:e,withinWidth:n}},cU=function(t,e,n){var r=uU(t,(function(t,e){var r=n(t);return L.some({element:t,start:e,finish:e+r,width:r})})),o=Y(r,(function(t){return t.finish<=e})),i=J(o,(function(t,e){return t+e.width}),0),u=r.slice(o.length);return{within:o,extra:u,withinWidth:i}},sU=function(t){return $(t,(function(t){return t.element}))},lU=function(t,e,n){var r=sU(t.concat(e));return aU(r,[],n)},fU=function(t,e,n,r){var o=sU(t).concat([n]);return aU(o,sU(e),r)},dU=function(t,e,n){return aU(sU(t),[],n)},mU=function(t,e,n){var r=cU(e,t,n);return 0===r.extra.length?L.some(r):L.none()},gU=function(t,e,n,r){var o=mU(t,e,n).getOrThunk((function(){return cU(e,t-n(r),n)})),i=o.within,u=o.extra,a=o.withinWidth;return 1===u.length&&u[0].width<=n(r)?lU(i,u,a):u.length>=1?fU(i,u,r,a):dU(i,u,a)},hU=function(t,e){var n=$(e,(function(t){return _s(t)}));PP.setGroups(t,n)},pU=function(t){return gt(t,(function(t){return Ef(t.element).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))}))},vU=function(t,e,n){var r=e.builtGroups.get();if(0!==r.length){var o=Xp(t,e,"primary"),i=bD.getCoupled(t,"overflowGroup");Kn(o.element,"visibility","hidden");var u=r.concat([i]),a=pU(u);n([]),hU(o,u);var c=vr(o.element),s=gU(c,e.builtGroups.get(),(function(t){return vr(t.element)}),i);0===s.extra.length?(Pw.remove(o,i),n([])):(hU(o,s.within),n(s.extra)),nr(o.element,"visibility"),rr(o.element),a.each(Yw.focus)}},bU=w([ep("splitToolbarBehaviours",[bD]),Ei("builtGroups",(function(){return ou([])}))]),yU=w([il(["overflowToggledClass"]),Wi("getOverflowBounds"),Ai("lazySink"),Ei("overflowGroups",(function(){return ou([])}))].concat(bU())),wU=w([Np({factory:PP,schema:BP(),name:"primary"}),zp({schema:BP(),name:"overflow"}),zp({name:"overflow-button"}),zp({name:"overflow-group"})]),xU=w((function(t,e){yr(t,Math.floor(e))})),CU=w([il(["toggledClass"]),Ai("lazySink"),Bi("fetch"),Wi("getBounds"),$i("fireDismissalEventInstead",[Ki("event",ga())]),Pd()]),SU=w([zp({name:"button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:mf([hx.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),zp({factory:PP,schema:BP(),name:"toolbar",overrides:function(t){return{toolbarBehaviours:mf([Aw.config({mode:"cyclic",onEscape:function(e){return Kp(e,t,"button").each(Yw.focus),L.none()}})])}}})]),kU=function(t,e){var n=bD.getCoupled(t,"toolbarSandbox");bh.isOpen(n)?bh.close(n):bh.open(n,e.toolbar())},TU=function(t,e,n,r){var o=n.getBounds.map((function(t){return t()})),i=n.lazySink(t).getOrDie();Ig.positionWithinBounds(i,e,{anchor:{type:"hotspot",hotspot:t,layouts:r,overrides:{maxWidthFunction:xU()}}},o)},OU=function(t,e,n,r,o){PP.setGroups(e,o),TU(t,e,n,r),hx.on(t)},EU=function(t,e,n){var r=Vs(),o=function(o,i){n.fetch().get((function(o){OU(t,i,n,e.layouts,o),r.link(t.element),Aw.focusIn(i)}))},i=function(){hx.off(t),Yw.focus(t),r.unlink(t.element)};return{dom:{tag:"div",attributes:{id:r.id}},behaviours:mf([Aw.config({mode:"special",onEscape:function(t){return bh.close(t),L.some(!0)}}),bh.config({onOpen:o,onClose:i,isPartOf:function(e,n,r){return js(n,r)||js(t,r)},getAttachPoint:function(){return n.lazySink(t).getOrDie()}}),yf.config({channels:A(A({},Sh(A({isExtraPart:O},n.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),Th({doReposition:function(){bh.getState(bD.getCoupled(t,"toolbarSandbox")).each((function(r){TU(t,r,n,e.layouts)}))}}))})])}},_U=function(t,e,n,r){return A(A({},SC.sketch(A(A({},r.button()),{action:function(t){kU(t,r)},buttonBehaviours:op.augment({dump:r.button().buttonBehaviours},[bD.config({others:{toolbarSandbox:function(e){return EU(e,n,t)}}})])}))),{apis:{setGroups:function(e,r){bh.getState(bD.getCoupled(e,"toolbarSandbox")).each((function(o){OU(e,o,t,n.layouts,r)}))},reposition:function(e){bh.getState(bD.getCoupled(e,"toolbarSandbox")).each((function(r){TU(e,r,t,n.layouts)}))},toggle:function(t){kU(t,r)},getToolbar:function(t){return bh.getState(bD.getCoupled(t,"toolbarSandbox"))},isOpen:function(t){return bh.isOpen(bD.getCoupled(t,"toolbarSandbox"))}}})},AU=mv({name:"FloatingToolbarButton",factory:_U,configFields:CU(),partFields:SU(),apis:{setGroups:function(t,e,n){t.setGroups(e,n)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},getToolbar:function(t,e){return t.getToolbar(e)},isOpen:function(t,e){return t.isOpen(e)}}}),DU=w([Ai("items"),il(["itemSelector"]),ep("tgroupBehaviours",[Aw])]),MU=w([Lp({name:"items",unit:"item"})]),RU=function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.tgroupBehaviours,[Aw.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}},NU=mv({name:"ToolbarGroup",configFields:DU(),partFields:MU(),factory:RU}),zU=function(t){return $(t,(function(t){return _s(t)}))},BU=function(t,e,n){vU(t,n,(function(r){n.overflowGroups.set(r),e.getOpt(t).each((function(t){AU.setGroups(t,zU(r))}))}))},LU=function(t,e,n,r){var o=kC(AU.sketch({fetch:function(){return tD.nu((function(e){e(zU(t.overflowGroups.get()))}))},layouts:{onLtr:function(){return[Ul,Vl]},onRtl:function(){return[Vl,Ul]},onBottomLtr:function(){return[Wl,jl]},onBottomRtl:function(){return[jl,Wl]}},getBounds:n.getOverflowBounds,lazySink:t.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:t.markers.overflowToggledClass},parts:{button:r["overflow-button"](),toolbar:r.overflow()}}));return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.splitToolbarBehaviours,[bD.config({others:{overflowGroup:function(){return NU.sketch(A(A({},r["overflow-group"]()),{items:[o.asSpec()]}))}}})]),apis:{setGroups:function(e,n){t.builtGroups.set($(n,e.getSystem().build)),BU(e,o,t)},refresh:function(e){return BU(e,o,t)},toggle:function(t){o.getOpt(t).each((function(t){AU.toggle(t)}))},isOpen:function(t){return o.getOpt(t).map(AU.isOpen).getOr(!1)},reposition:function(t){o.getOpt(t).each((function(t){AU.reposition(t)}))},getOverflow:function(t){return o.getOpt(t).bind(AU.getToolbar)}},domModification:{attributes:{role:"group"}}}},HU=mv({name:"SplitFloatingToolbar",configFields:yU(),partFields:wU(),factory:LU,apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)},getOverflow:function(t,e){return t.getOverflow(e)}}}),IU=w([il(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),al("onOpened"),al("onClosed")].concat(bU())),PU=w([Np({factory:PP,schema:BP(),name:"primary"}),Np({factory:PP,schema:BP(),name:"overflow",overrides:function(t){return{toolbarBehaviours:mf([CV.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(e){Kp(e,t,"overflow-button").each((function(t){hx.off(t),Yw.focus(t)})),t.onClosed(e)},onGrown:function(e){Aw.focusIn(e),t.onOpened(e)},onStartGrow:function(e){Kp(e,t,"overflow-button").each(hx.on)}}),Aw.config({mode:"acyclic",onEscape:function(e){return Kp(e,t,"overflow-button").each(Yw.focus),L.some(!0)}})])}}}),zp({name:"overflow-button",overrides:function(t){return{buttonBehaviours:mf([hx.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),zp({name:"overflow-group"})]),FU=function(t,e){return Kp(t,e,"overflow").map(CV.hasGrown).getOr(!1)},VU=function(t,e){Kp(t,e,"overflow-button").bind((function(){return Kp(t,e,"overflow")})).each((function(n){UU(t,e),CV.toggleGrow(n)}))},UU=function(t,e){Kp(t,e,"overflow").each((function(n){vU(t,e,(function(t){var e=$(t,(function(t){return _s(t)}));PP.setGroups(n,e)})),Kp(t,e,"overflow-button").each((function(t){CV.hasGrown(n)&&hx.on(t)})),CV.refresh(n)}))},jU=function(t,e,n,r){var o="alloy.toolbar.toggle",i=function(e,n){var r=$(n,e.getSystem().build);t.builtGroups.set(r)};return{uid:t.uid,dom:t.dom,components:e,behaviours:rp(t.splitToolbarBehaviours,[bD.config({others:{overflowGroup:function(t){return NU.sketch(A(A({},r["overflow-group"]()),{items:[SC.sketch(A(A({},r["overflow-button"]()),{action:function(e){Ca(t,o)}}))]}))}}}),Vw("toolbar-toggle-events",[Ra(o,(function(e){VU(e,t)}))])]),apis:{setGroups:function(e,n){i(e,n),UU(e,t)},refresh:function(e){return UU(e,t)},toggle:function(e){return VU(e,t)},isOpen:function(e){return FU(e,t)}},domModification:{attributes:{role:"group"}}}},WU=mv({name:"SplitSlidingToolbar",configFields:IU(),partFields:PU(),factory:jU,apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)}}}),qU=function(t){var e=t.title.fold((function(){return{}}),(function(t){return{attributes:{title:t}}}));return{dom:A({tag:"div",classes:["tox-toolbar__group"]},e),components:[NU.parts.items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:mf([yA.config({}),Yw.config({})])}},$U=function(t){return NU.sketch(qU(t))},GU=function(t,e){var n=Ua((function(e){var n=$(t.initGroups,$U);PP.setGroups(e,n)}));return mf([mO.toolbarButton(t.providers.isDisabled),cO(),Aw.config({mode:e,onEscape:t.onEscape,selector:".tox-toolbar__group"}),Vw("toolbar-events",[n])])},KU=function(t){var e=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":qU({title:L.none(),items:[]}),"overflow-button":YB({name:"more",icon:L.some("more-drawer"),disabled:!1,tooltip:L.some("More..."),primary:!1,borderless:!1},L.none(),t.providers)},splitToolbarBehaviours:GU(t,e)}},XU=function(t){var e=KU(t),n=4,r=HU.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return HU.sketch(A(A({},e),{lazySink:t.getSink,getOverflowBounds:function(){var e=t.moreDrawerData.lazyHeader().element,r=Qr(e),o=hn(e),i=Qr(o),u=Math.max(o.dom.scrollHeight,i.height);return Yr(r.x+n,i.y,r.width-2*n,u)},parts:A(A({},e.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:t.attributes}}}),components:[r],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},YU=function(t){var e=WU.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),n=WU.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),r=KU(t);return WU.sketch(A(A({},r),{components:[e,n],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(t){t.getSystem().broadcastOn([SF()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([SF()],{type:"closed"})}}))},JU=function(t){var e=t.cyclicKeying?"cyclic":"acyclic";return PP.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===US.scrolling?["tox-toolbar--scrolling"]:[])},components:[PP.parts.groups({})],toolbarBehaviours:GU(t,e)})},QU=function(t,e,n){var r={getSocket:function(e){return OP.getPart(e,t,"socket")},setSidebar:function(e,n){OP.getPart(e,t,"sidebar").each((function(t){return LV(t,n)}))},toggleSidebar:function(e,n){OP.getPart(e,t,"sidebar").each((function(t){return HV(t,n)}))},whichSidebar:function(e){return OP.getPart(e,t,"sidebar").bind(IV).getOrNull()},getHeader:function(e){return OP.getPart(e,t,"header")},getToolbar:function(e){return OP.getPart(e,t,"toolbar")},setToolbar:function(e,n){OP.getPart(e,t,"toolbar").each((function(t){t.getApis().setGroups(t,n)}))},setToolbars:function(e,n){OP.getPart(e,t,"multiple-toolbar").each((function(t){zP.setItems(t,n)}))},refreshToolbar:function(e){var n=OP.getPart(e,t,"toolbar");n.each((function(t){return t.getApis().refresh(t)}))},toggleToolbarDrawer:function(e){OP.getPart(e,t,"toolbar").each((function(t){Bt(t.getApis().toggle,(function(e){return e(t)}))}))},isToolbarDrawerToggled:function(e){return OP.getPart(e,t,"toolbar").bind((function(t){return L.from(t.getApis().isOpen).map((function(e){return e(t)}))})).getOr(!1)},getThrobber:function(e){return OP.getPart(e,t,"throbber")},focusToolbar:function(e){var n=OP.getPart(e,t,"toolbar").orThunk((function(){return OP.getPart(e,t,"multiple-toolbar")}));n.each((function(t){Aw.focusIn(t)}))},setMenubar:function(e,n){OP.getPart(e,t,"menubar").each((function(t){KF.setMenus(t,n)}))},focusMenubar:function(e){OP.getPart(e,t,"menubar").each((function(t){KF.focus(t)}))}};return{uid:t.uid,dom:t.dom,components:e,apis:r,behaviours:t.behaviours}},ZU=EP.optional({factory:KF,name:"menubar",schema:[Ai("backstage")]}),tj=function(t){return t.type===US.sliding?YU:t.type===US.floating?XU:JU},ej=EP.optional({factory:{sketch:function(t){return zP.sketch({uid:t.uid,dom:t.dom,listBehaviours:mf([Aw.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return JU({type:t.type,uid:oc("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:function(){return t.onEscape(),L.some(!0)}})},setupItem:function(t,e,n,r){PP.setGroups(e,n)},shell:!0})}},name:"multiple-toolbar",schema:[Ai("dom"),Ai("onEscape")]}),nj=EP.optional({factory:{sketch:function(t){var e=tj(t),n={type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),L.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,providers:t.providers,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes};return e(n)}},name:"toolbar",schema:[Ai("dom"),Ai("onEscape"),Ai("getSink")]}),rj=EP.optional({factory:{sketch:PF},name:"header",schema:[Ai("dom")]}),oj=EP.optional({name:"socket",schema:[Ai("dom")]}),ij=EP.optional({factory:{sketch:VV},name:"sidebar",schema:[Ai("dom")]}),uj=EP.optional({factory:{sketch:nU},name:"throbber",schema:[Ai("dom")]}),aj=mv({name:"OuterContainer",factory:QU,configFields:[Ai("dom"),Ai("behaviours")],partFields:[rj,ZU,nj,ej,oj,ij,uj],apis:{getSocket:function(t,e){return t.getSocket(e)},setSidebar:function(t,e,n){t.setSidebar(e,n)},toggleSidebar:function(t,e,n){t.toggleSidebar(e,n)},whichSidebar:function(t,e){return t.whichSidebar(e)},getHeader:function(t,e){return t.getHeader(e)},getToolbar:function(t,e){return t.getToolbar(e)},setToolbar:function(t,e,n){var r=$(n,(function(t){return $U(t)}));t.setToolbar(e,r)},setToolbars:function(t,e,n){var r=$(n,(function(t){return $(t,$U)}));t.setToolbars(e,r)},refreshToolbar:function(t,e){return t.refreshToolbar(e)},toggleToolbarDrawer:function(t,e){t.toggleToolbarDrawer(e)},isToolbarDrawerToggled:function(t,e){return t.isToolbarDrawerToggled(e)},getThrobber:function(t,e){return t.getThrobber(e)},setMenubar:function(t,e,n){t.setMenubar(e,n)},focusMenubar:function(t,e){t.focusMenubar(e)},focusToolbar:function(t,e){t.focusToolbar(e)}}}),cj="file edit view insert format tools table help",sj={file:{title:"File",items:"newdocument restoredraft | preview | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},lj=function(t,e,n){var r=ET(n).split(/[ ,]/);return{text:t.title,getItems:function(){return rt(t.items,(function(t){var n=t.toLowerCase();return 0===n.trim().length||j(r,(function(t){return t===n}))?[]:"separator"===n||"|"===n?[{type:"separator"}]:e.menuItems[n]?[e.menuItems[n]]:[]}))}}},fj=function(t){return"string"===typeof t?t.split(" "):t},dj=function(t,e){var n=A(A({},sj),e.menus),r=ht(e.menus).length>0,o=void 0===e.menubar||!0===e.menubar?fj(cj):fj(!1===e.menubar?"":e.menubar),i=Y(o,(function(t){var n=Et(sj,t);return r?n||Ot(e.menus,t).exists((function(t){return Et(t,"items")})):n})),u=$(i,(function(r){var o=n[r];return lj({title:o.title,items:fj(o.items)},e,t)}));return Y(u,(function(t){var e=function(t){return"separator"!==t.type};return t.getItems().length>0&&j(t.getItems(),e)}))},mj=function(t){var e=function(){t._skinLoaded=!0,hE(t)};return function(){t.initialized?e():t.on("init",e)}},gj=function(t,e){return function(){return pE(t,{message:e})}},hj=function(t,e,n){return new uS((function(r,o){n.load(e,r,o),t.on("remove",(function(){return n.unload(e)}))}))},pj=function(t,e){var n=e+"/skin.min.css";return hj(t,n,t.ui.styleSheetLoader)},vj=function(t,e){var n=Mn(ee.fromDom(t.getElement()));if(n){var r=e+"/skin.shadowdom.min.css";return hj(t,r,dT.DOM.styleSheetLoader)}return uS.resolve()},bj=function(t,e){var n=gT(e);n&&e.contentCSS.push(n+(t?"/content.inline":"/content")+".min.css"),!1===pT(e)&&i(n)?uS.all([pj(e,n),vj(e,n)]).then(mj(e),gj(e,"Skin could not be loaded")):mj(e)()},yj=S(bj,!1),wj=S(bj,!0),xj=function(t,e){return function(n){var r=nd(),o=function(){n.setActive(t.formatter.match(e));var o=t.formatter.formatChanged(e,n.setActive);r.set(o)};return t.initialized?o():t.once("init",o),function(){t.off("init",o),r.clear()}}},Cj=function(t,e,n){return function(r){var o=function(){return n(r)},i=function(){n(r),t.on(e,o)};return t.initialized?i():t.once("init",i),function(){t.off("init",i),t.off(e,o)}}},Sj=function(t){return function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("mceToggleFormat",!1,e.format)}))}}},kj=function(t,e){return function(){return t.execCommand(e)}},Tj=function(t,e,n){var r=function(t,r,i,u){var a=e.shared.providers.translate(t.title);if("separator"===t.type)return L.some({type:"separator",text:a});if("submenu"===t.type){var c=rt(t.getStyleItems(),(function(t){return o(t,r,u)}));return 0===r&&c.length<=0?L.none():L.some({type:"nestedmenuitem",text:a,disabled:c.length<=0,getSubmenuItems:function(){return rt(t.getStyleItems(),(function(t){return o(t,r,u)}))}})}return L.some(A({type:"togglemenuitem",text:a,icon:t.icon,active:t.isSelected(u),disabled:i,onAction:n.onAction(t)},t.getStylePreview().fold((function(){return{}}),(function(t){return{meta:{style:t}}}))))},o=function(t,e,o){var i="formatter"===t.type&&n.isInvalid(t);return 0===e?i?[]:r(t,e,!1,o).toArray():r(t,e,i,o).toArray()},i=function(t){var e=n.getCurrentValue(),r=n.shouldHide?0:1;return rt(t,(function(t){return o(t,r,e)}))},u=function(t,e){return function(n,r){var o=e(),u=i(o),a=qB(u,jS.CLOSE_ON_EXECUTE,t,!1);r(a)}};return{validateItems:i,getFetch:u}},Oj=function(t,e,n){var r=n.dataset,o="basic"===r.type?function(){return $(r.data,(function(t){return RI(t,n.isSelectedFor,n.getPreviewFor)}))}:r.getData;return{items:Tj(t,e,n),getStyleItems:o}},Ej=function(t,e,n){var r=Oj(t,e,n),o=r.items,i=r.getStyleItems,u=function(t){return{getComponent:w(t)}},a=Cj(t,"NodeChange",(function(t){var e=t.getComponent();n.updateText(e)}));return BB({text:n.icon.isSome()?L.none():n.text,icon:n.icon,tooltip:L.from(n.tooltip),role:L.none(),fetch:o.getFetch(e,i),onSetup:a,getApi:u,columns:1,presets:"normal",classes:n.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",e.shared)},_j=function(t){return $(t,(function(t){var e=t,n=t,r=t.split("=");return r.length>1&&(e=r[0],n=r[1]),{title:e,format:n}}))},Aj=function(t){return{type:"basic",data:t}};(function(t){t[t["SemiColon"]=0]="SemiColon",t[t["Space"]=1]="Space"})(XL||(XL={}));var Dj,Mj=function(t,e){return e===XL.SemiColon?t.replace(/;$/,"").split(";"):t.split(" ")},Rj=function(t,e,n,r){var o=t.getParam(e,n,"string"),i=_j(Mj(o,r));return{type:"basic",data:i}},Nj=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],zj=function(t){var e=function(){return tt(Nj,(function(e){return t.formatter.match(e.format)}))},n=function(e){return function(){return t.formatter.match(e)}},r=function(t){return L.none},o=function(t){var n=e(),r=n.fold(w("left"),(function(t){return t.title.toLowerCase()}));Sa(t,zB,{icon:"align-"+r})},i=Aj(Nj),u=function(e){return function(){return tt(Nj,(function(t){return t.format===e.format})).each((function(e){return t.execCommand(e.command)}))}};return{tooltip:"Align",text:L.none(),icon:L.some("align-left"),isSelectedFor:n,getCurrentValue:L.none,getPreviewFor:r,onAction:u,updateText:o,dataset:i,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},Bj=function(t,e){return Ej(t,e,zj(t))},Lj=function(t,e){var n=Oj(t,e,zj(t));t.ui.registry.addNestedMenuItem("align",{text:e.shared.providers.translate("Align"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},Hj="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",Ij=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],Pj=function(t){var e=t.split(/\s*,\s*/);return $(e,(function(t){return t.replace(/^['"]+|['"]+$/g,"")}))},Fj=function(t){var e=function(){var e=Pj(t.toLowerCase());return ot(Ij,(function(t){return e.indexOf(t.toLowerCase())>-1}))};return 0===t.indexOf("-apple-system")&&e()},Vj=function(t){var e="System Font",n=function(){var n=function(t){return t?Pj(t)[0]:""},r=t.queryCommandValue("FontName"),o=c.data,i=r?r.toLowerCase():"",u=tt(o,(function(t){var e=t.format;return e.toLowerCase()===i||n(e).toLowerCase()===n(i).toLowerCase()})).orThunk((function(){return Lt(Fj(i),{title:e,format:i})}));return{matchOpt:u,font:r}},r=function(t){return function(e){return e.exists((function(e){return e.format===t}))}},o=function(){var t=n().matchOpt;return t},i=function(t){return function(){return L.some({tag:"div",styles:-1===t.indexOf("dings")?{"font-family":t}:{}})}},u=function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontName",!1,e.format)}))}},a=function(t){var e=n(),r=e.matchOpt,o=e.font,i=r.fold(w(o),(function(t){return t.title}));Sa(t,NB,{text:i})},c=Rj(t,"font_formats",Hj,XL.SemiColon);return{tooltip:"Fonts",text:L.some(e),icon:L.none(),isSelectedFor:r,getCurrentValue:o,getPreviewFor:i,onAction:u,updateText:a,dataset:c,shouldHide:!1,isInvalid:O}},Uj=function(t,e){return Ej(t,e,Vj(t))},jj=function(t,e){var n=Oj(t,e,Vj(t));t.ui.registry.addNestedMenuItem("fontformats",{text:e.shared.providers.translate("Fonts"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},Wj="8pt 10pt 12pt 14pt 18pt 24pt 36pt",qj={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},$j={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},Gj=function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n},Kj=function(t,e){return/[0-9.]+px$/.test(t)?Gj(72*parseInt(t,10)/96,e||0)+"pt":Ot($j,t).getOr(t)},Xj=function(t){return Ot(qj,t).getOr("")},Yj=function(t){var e=function(){var e=L.none(),n=a.data,r=t.queryCommandValue("FontSize");if(r)for(var o=function(t){var o=Kj(r,t),i=Xj(o);e=tt(n,(function(t){return t.format===r||t.format===o||t.format===i}))},i=3;e.isNone()&&i>=0;i--)o(i);return{matchOpt:e,size:r}},n=function(t){return function(e){return e.exists((function(e){return e.format===t}))}},r=function(){var t=e().matchOpt;return t},o=w(L.none),i=function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontSize",!1,e.format)}))}},u=function(t){var n=e(),r=n.matchOpt,o=n.size,i=r.fold(w(o),(function(t){return t.title}));Sa(t,NB,{text:i})},a=Rj(t,"fontsize_formats",Wj,XL.Space);return{tooltip:"Font sizes",text:L.some("12pt"),icon:L.none(),isSelectedFor:n,getPreviewFor:o,getCurrentValue:r,onAction:i,updateText:u,dataset:a,shouldHide:!1,isInvalid:O}},Jj=function(t,e){return Ej(t,e,Yj(t))},Qj=function(t,e){var n=Oj(t,e,Yj(t));t.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},Zj=function(t,e){var n=e(),r=$(n,(function(t){return t.format}));return L.from(t.formatter.closest(r)).bind((function(t){return tt(n,(function(e){return e.format===t}))})).orThunk((function(){return Lt(t.formatter.match("p"),{title:"Paragraph",format:"p"})}))},tW="Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",eW=function(t){var e="Paragraph",n=function(e){return function(){return t.formatter.match(e)}},r=function(e){return function(){var n=t.formatter.get(e);return L.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))})}},o=function(n){var r=Zj(t,(function(){return i.data})),o=r.fold(w(e),(function(t){return t.title}));Sa(n,NB,{text:o})},i=Rj(t,"block_formats",tW,XL.SemiColon);return{tooltip:"Blocks",text:L.some(e),icon:L.none(),isSelectedFor:n,getCurrentValue:L.none,getPreviewFor:r,onAction:Sj(t),updateText:o,dataset:i,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},nW=function(t,e){return Ej(t,e,eW(t))},rW=function(t,e){var n=Oj(t,e,eW(t));t.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})},oW=function(t,e){var n="Paragraph",r=function(e){return function(){return t.formatter.match(e)}},o=function(e){return function(){var n=t.formatter.get(e);return void 0!==n?L.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):L.none()}},i=function(e){var r=function(t){var e=t.items;return void 0!==e&&e.length>0?rt(e,r):[{title:t.title,format:t.format}]},o=rt(MI(t),r),i=Zj(t,w(o)),u=i.fold(w(n),(function(t){return t.title}));Sa(e,NB,{text:u})};return{tooltip:"Formats",text:L.some(n),icon:L.none(),isSelectedFor:r,getCurrentValue:L.none,getPreviewFor:o,onAction:Sj(t),updateText:i,shouldHide:t.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(e){return!t.formatter.canApply(e.format)},dataset:e}},iW=function(t,e){var n=A({type:"advanced"},e.styleselect);return Ej(t,e,oW(t,n))},uW=function(t,e){var n=A({type:"advanced"},e.styleselect),r=Oj(t,e,oW(t,n));t.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return r.items.validateItems(r.getStyleItems())}})},aW=function(t,e){var n=function(n,r){t.updateState.each((function(t){var o=t(n,r);e.set(o)})),t.renderComponents.each((function(t){var o=t(r,e.get()),i=$(o,n.getSystem().build);jg(n,i)}))};return _a([Ra(ta(),(function(e,r){var o=r;if(!o.universal){var i=t.channel;U(o.channels,i)&&n(e,o.data)}})),Ua((function(e,r){t.initialData.each((function(t){n(e,t)}))}))])},cW=Object.freeze({__proto__:null,events:aW}),sW=function(t,e,n){return n},lW=Object.freeze({__proto__:null,getState:sW}),fW=[Ai("channel"),Fi("renderComponents"),Fi("updateState"),Fi("initialData")],dW=function(){var t=ou(L.none()),e=function(){return t.set(L.none())},n=function(){return t.get().getOr("none")};return{readState:n,get:t.get,set:t.set,clear:e}},mW=Object.freeze({__proto__:null,init:dW}),gW=hf({fields:fW,name:"reflecting",active:cW,apis:lW,state:mW}),hW=w([Ai("toggleClass"),Ai("fetch"),sl("onExecute"),Ki("getHotspot",L.some),Ki("getAnchorOverrides",w({})),Pd(),sl("onItemExecute"),Fi("lazySink"),Ai("dom"),al("onOpen"),ep("splitDropdownBehaviours",[bD,Aw,Yw]),Ki("matchWidth",!1),Ki("useMinWidth",!1),Ki("eventOrder",{}),Fi("role")].concat(ND())),pW=Np({factory:SC,schema:[Ai("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:mf([Yw.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each(ka)},buttonBehaviours:mf([hx.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),vW=Np({factory:SC,schema:[Ai("dom")],name:"button",defaults:function(){return{buttonBehaviours:mf([Yw.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each((function(n){t.onExecute(n,e)}))}}}}),bW=w([pW,vW,Bp({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[Ai("text")],name:"aria-descriptor"}),zp({schema:[ol()],name:"menu",defaults:function(t){return{onExecute:function(e,n){e.getSystem().getByUid(t.uid).each((function(r){t.onItemExecute(r,e,n)}))}}}}),wD()]),yW=function(t,e,n,r){var o,i=function(t){bv.getCurrent(t).each((function(t){rb.highlightFirst(t),Aw.focusIn(t)}))},u=function(e){var n=i;ED(t,x,e,r,n,qA.HighlightFirst).get(p)},a=function(t){return u(t),L.some(!0)},c=function(e){var n=Xp(e,t,"button");return ka(n),L.some(!0)},s=A(A({},_a([Ua((function(e,n){var r=Kp(e,t,"aria-descriptor");r.each((function(t){var n=oc("aria");Fn(t.element,"id",n),Fn(e.element,"aria-describedby",n)}))}))])),vx(L.some(u))),l={repositionMenus:function(t){hx.isOn(t)&&RD(t)}};return{uid:t.uid,dom:t.dom,components:e,apis:l,eventOrder:A(A({},t.eventOrder),(o={},o[ea()]=["disabling","toggling","alloy.base.behaviour"],o)),events:s,behaviours:rp(t.splitDropdownBehaviours,[bD.config({others:{sandbox:function(e){var n=Xp(e,t,"arrow"),r={onOpen:function(){hx.on(n),hx.on(e)},onClose:function(){hx.off(n),hx.off(e)}};return MD(t,e,r)}}}),Aw.config({mode:"special",onSpace:c,onEnter:c,onDown:a}),Yw.config({}),hx.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:t.role.getOr("button"),"aria-haspopup":!0}}}},wW=mv({name:"SplitDropdown",configFields:hW(),partFields:bW(),factory:yW,apis:{repositionMenus:function(t,e){return t.repositionMenus(e)}}}),xW=function(t){return{isDisabled:function(){return Hv.isDisabled(t)},setDisabled:function(e){return Hv.set(t,e)}}},CW=function(t){return{setActive:function(e){hx.set(t,e)},isActive:function(){return hx.isOn(t)},isDisabled:function(){return Hv.isDisabled(t)},setDisabled:function(e){return Hv.set(t,e)}}},SW=function(t,e){return t.map((function(t){return{"aria-label":e.translate(t),title:e.translate(t)}})).getOr({})},kW=oc("focus-button"),TW=function(t,e,n,r,o,i){var u;return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]),attributes:SW(n,i)},components:yO([t.map((function(t){return EB(t,i.icons)})),e.map((function(t){return AB(t,"tox-tbtn",i)}))]),eventOrder:(u={},u[Nu()]=["focusing","alloy.base.behaviour","common-button-display-events"],u),buttonBehaviours:mf([mO.toolbarButton(i.isDisabled),cO(),Vw("common-button-display-events",[Ra(Nu(),(function(t,e){e.event.prevent(),Ca(t,kW)}))])].concat(r.map((function(n){return gW.config({channel:n,initialData:{icon:t,text:e},renderComponents:function(t,e){return yO([t.icon.map((function(t){return EB(t,i.icons)})),t.text.map((function(t){return AB(t,"tox-tbtn",i)}))])}})})).toArray()).concat(o.getOr([])))}},OW=function(t,e,n,r){var o=e.shared;return AU.sketch({lazySink:o.getSink,fetch:function(){return tD.nu((function(e){e($(n(t.items),$U))}))},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:TW(t.icon,t.text,t.tooltip,L.none(),L.none(),o.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:r}}}})},EW=function(t,e,n){var r=ou(p),o=TW(t.icon,t.text,t.tooltip,L.none(),L.none(),n);return SC.sketch({dom:o.dom,components:o.components,eventOrder:RB,buttonBehaviours:mf([Vw("toolbar-button-events",[MB({onAction:t.onAction,getApi:e.getApi}),hO(e,r),pO(e,r)]),mO.toolbarButton((function(){return t.disabled||n.isDisabled()})),cO()].concat(e.toolbarButtonBehaviours))})},_W=function(t,e){return AW(t,e,[])},AW=function(t,e,n){return EW(t,{toolbarButtonBehaviours:[].concat(n.length>0?[Vw("toolbarButtonWith",n)]:[]),getApi:xW,onSetup:t.onSetup},e)},DW=function(t,e){return MW(t,e,[])},MW=function(t,e,n){return Co(EW(t,{toolbarButtonBehaviours:[Pw.config({}),hx.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(n.length>0?[Vw("toolbarToggleButtonWith",n)]:[]),getApi:CW,onSetup:t.onSetup},e))},RW=function(t,e,n){return function(r){return tD.nu((function(t){return e.fetch(t)})).map((function(o){return L.from(R_(Co(n_(oc("menu-value"),o,(function(n){e.onItemAction(t(r),n)}),e.columns,e.presets,jS.CLOSE_ON_EXECUTE,e.select.getOr(O),n),{movement:o_(e.columns,e.presets),menuBehaviours:Qk.unnamedEvents("auto"!==e.columns?[]:[Ua((function(t,n){Xk(t,4,lk(e.presets)).each((function(e){var n=e.numRows,r=e.numColumns;Aw.setGridSize(t,n,r)}))}))])})))}))}},NW=function(t,e){var n,r=oc("channel-update-split-dropdown-display"),o=function(t){return{isDisabled:function(){return Hv.isDisabled(t)},setDisabled:function(e){return Hv.set(t,e)},setIconFill:function(e,n){Is(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){Fn(t,"fill",n)}))},setIconStroke:function(e,n){Is(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){Fn(t,"stroke",n)}))},setActive:function(e){Fn(t.element,"aria-pressed",e),Is(t.element,"span").each((function(n){t.getSystem().getByDom(n).each((function(t){return hx.set(t,e)}))}))},isActive:function(){return Is(t.element,"span").exists((function(e){return t.getSystem().getByDom(e).exists(hx.isOn)}))}}},i=ou(p),u={getApi:o,onSetup:t.onSetup};return wW.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:A({"aria-pressed":!1},SW(t.tooltip,e.providers))},onExecute:function(e){t.onAction(o(e))},onItemExecute:function(t,e,n){},splitDropdownBehaviours:mf([mO.splitButton(e.providers.isDisabled),cO(),Vw("split-dropdown-events",[Ra(kW,Yw.focus),hO(u,i),pO(u,i)]),VD.config({})]),eventOrder:(n={},n[da()]=["alloy.base.behaviour","split-dropdown-events"],n),toggleClass:"tox-tbtn--enabled",lazySink:e.getSink,fetch:RW(o,t,e.providers),parts:{menu:pk(!1,t.columns,t.presets)},components:[wW.parts.button(TW(t.icon,t.text,L.none(),L.some(r),L.some([hx.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),e.providers)),wW.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:MC("chevron-down",e.providers.icons)},buttonBehaviours:mf([mO.splitButton(e.providers.isDisabled),cO(),zC()])}),wW.parts["aria-descriptor"]({text:e.providers.translate("To open the popup, press Shift+Enter")})]})},zW=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],BW=function(t,e){return function(n,r,o){var i=t(n).mapError((function(t){return Si(t)})).getOrDie();return e(i,r,o)}},LW={button:BW(OS,(function(t,e){return _W(t,e.backstage.shared.providers)})),togglebutton:BW(AS,(function(t,e){return DW(t,e.backstage.shared.providers)})),menubutton:BW(WF,(function(t,e){return GB(t,"tox-tbtn",e.backstage,L.none())})),splitbutton:BW($F,(function(t,e){return NW(t,e.backstage.shared)})),grouptoolbarbutton:BW(VF,(function(t,e,n){var r,o=n.ui.registry.getAll().buttons,i=function(t){return WW(n,{buttons:o,toolbar:t,allowToolbarGroups:!1},e,L.none())},u=(r={},r[Hd]=e.backstage.shared.header.isPositionedAtTop()?Pf.TopToBottom:Pf.BottomToTop,r);switch(NT(n)){case US.floating:return OW(t,e.backstage,i,u);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}})),styleSelectButton:function(t,e){return iW(t,e.backstage)},fontsizeSelectButton:function(t,e){return Jj(t,e.backstage)},fontSelectButton:function(t,e){return Uj(t,e.backstage)},formatButton:function(t,e){return nW(t,e.backstage)},alignMenuButton:function(t,e){return Bj(t,e.backstage)}},HW=function(t,e,n){return Ot(LW,t.type).fold((function(){return console.error("skipping button defined by",t),L.none()}),(function(r){return L.some(r(t,e,n))}))},IW={styleselect:LW.styleSelectButton,fontsizeselect:LW.fontsizeSelectButton,fontselect:LW.fontSelectButton,formatselect:LW.formatButton,align:LW.alignMenuButton},PW=function(t){var e=$(zW,(function(e){var n=Y(e.items,(function(e){return Et(t,e)||Et(IW,e)}));return{name:e.name,items:n}}));return Y(e,(function(t){return t.items.length>0}))},FW=function(t){var e=t.split("|");return $(e,(function(t){return{items:t.trim().split(" ")}}))},VW=function(t){return h(t,(function(t){return Et(t,"name")&&Et(t,"items")}))},UW=function(t){var e=t.toolbar,n=t.buttons;return!1===e?[]:void 0===e||!0===e?PW(n):i(e)?FW(e):VW(e)?e:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},jW=function(t,e,n,r,o,i){return Ot(e,n.toLowerCase()).orThunk((function(){return i.bind((function(t){return gt(t,(function(t){return Ot(e,t+n.toLowerCase())}))}))})).fold((function(){return Ot(IW,n.toLowerCase()).map((function(e){return e(t,o)})).orThunk((function(){return L.none()}))}),(function(e){return"grouptoolbarbutton"!==e.type||r?HW(e,o,t):(console.warn("Ignoring the '"+n+"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested."),L.none())}))},WW=function(t,e,n,r){var o=UW(e),i=$(o,(function(o){var i=rt(o.items,(function(o){return 0===o.trim().length?[]:jW(t,e.buttons,o,e.allowToolbarGroups,n,r).toArray()}));return{title:L.from(t.translate(o.name)),items:i}}));return Y(i,(function(t){return t.items.length>0}))},qW=function(t,e,n,r){var o=e.outerContainer,u=n.toolbar,a=n.buttons;if(h(u,i)){var c=u.map((function(e){var o={toolbar:e,buttons:a,allowToolbarGroups:n.allowToolbarGroups};return WW(t,o,{backstage:r},L.none())}));aj.setToolbars(o,c)}else aj.setToolbar(o,WW(t,n,{backstage:r},L.none()))},$W=en(),GW=$W.os.isiOS()&&$W.os.version.major<=12,KW=function(t,e){var n=t.dom,r=t.getWin(),o=t.getDoc().documentElement,i=ou(lr(r.innerWidth,r.innerHeight)),u=ou(lr(o.offsetWidth,o.offsetHeight)),a=function(){var e=i.get();e.left===r.innerWidth&&e.top===r.innerHeight||(i.set(lr(r.innerWidth,r.innerHeight)),bE(t))},c=function(){var e=t.getDoc().documentElement,n=u.get();n.left===e.offsetWidth&&n.top===e.offsetHeight||(u.set(lr(e.offsetWidth,e.offsetHeight)),bE(t))},s=function(e){return yE(t,e)};n.bind(r,"resize",a),n.bind(r,"scroll",s);var l=ad(ee.fromDom(t.getBody()),"load",c),f=e.uiMothership.element;t.on("hide",(function(){Kn(f,"display","none")})),t.on("show",(function(){nr(f,"display")})),t.on("NodeChange",c),t.on("remove",(function(){l.unbind(),n.unbind(r,"resize",a),n.unbind(r,"scroll",s),r=null}))},XW=function(t,e,n,r,o){var i=ou(0),u=e.outerContainer;yj(t);var a=ee.fromDom(o.targetNode),c=Dn(An(a));Yg(a,e.mothership),Xg(c,e.uiMothership),t.on("PostRender",(function(){qW(t,e,n,r),i.set(t.getWin().innerWidth),aj.setMenubar(u,dj(t,n)),aj.setSidebar(u,n.sidebar),KW(t,e)}));var s=aj.getSocket(u).getOrDie("Could not find expected socket element");if(GW){Xn(s.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var l=jC((function(){t.fire("ScrollContent")}),20),f=ud(s.element,"scroll",l.throttle);t.on("remove",f.unbind)}aO(t,e),t.addCommand("ToggleSidebar",(function(e,n){aj.toggleSidebar(u,n),t.fire("ToggleSidebar")})),t.addQueryValueHandler("ToggleSidebar",(function(){return aj.whichSidebar(u)}));var d=NT(t),m=function(){aj.refreshToolbar(e.outerContainer)};d!==US.sliding&&d!==US.floating||t.on("ResizeWindow ResizeEditor ResizeContent",(function(){var e=t.getWin().innerWidth;e!==i.get()&&(m(),i.set(e))}));var g={enable:function(){uO(e,!1)},disable:function(){uO(e,!0)},isDisabled:function(){return Hv.isDisabled(u)}};return{iframeContainer:s.element.dom,editorContainer:u.element.dom,api:g}},YW=Object.freeze({__proto__:null,render:XW}),JW=function(t){var e=/^[0-9\.]+(|px)$/i;return e.test(""+t)?L.some(parseInt(""+t,10)):L.none()},QW=function(t){return g(t)?t+"px":t},ZW=function(t,e,n){var r=e.filter((function(e){return t<e})),o=n.filter((function(e){return t>e}));return r.or(o).getOr(t)},tq=function(t){var e=vT(t),n=wT(t),r=CT(t);return JW(e).map((function(t){return ZW(t,n,r)}))},eq=function(t){var e=tq(t);return e.getOr(vT(t))},nq=function(t){var e=bT(t),n=yT(t),r=xT(t);return JW(e).map((function(t){return ZW(t,n,r)}))},rq=function(t){var e=nq(t);return e.getOr(bT(t))},oq=function(t,e,n,r,o){var i=n.uiMothership,u=n.outerContainer,a=dT.DOM,c=UT(t),s=qT(t),l=xT(t).or(nq(t)),f=r.shared.header,d=f.isPositionedAtTop,m=NT(t),g=m===US.sliding||m===US.floating,h=ou(!1),p=function(){return h.get()&&!t.removed},v=function(t){return g?t.fold(w(0),(function(t){return t.components().length>1?ur(t.components()[1].element):0})):0},b=function(n){switch(LT(t)){case RT.auto:var r=aj.getToolbar(u),o=v(r),i=ur(n.element)-o,a=Jr(e),c=a.y>i;if(c)return"top";var s=hn(e),l=Math.max(s.dom.scrollHeight,ur(s)),f=a.bottom<l-i;if(f)return"bottom";var d=Zr(),m=d.bottom<a.bottom-i;return m?"bottom":"top";case RT.bottom:return"bottom";case RT.top:default:return"top"}},y=function(t){var e=o.get();CF.setModes(e,[t]),f.setDockingMode(t);var n=d()?Pf.TopToBottom:Pf.BottomToTop;Fn(e.element,Hd,n)},x=function(){var t=l.getOrThunk((function(){var t=JW(Jn(Hn(),"margin-left")).getOr(0);return vr(Hn())-mr(e).left+t}));Kn(o.get().element,"max-width",t+"px")},C=function(){var t=aj.getToolbar(u),n=v(t),r=Jr(e),i=d()?Math.max(r.y-ur(o.get().element)+n,0):r.bottom;Xn(u.element,{position:"absolute",top:Math.round(i)+"px",left:Math.round(r.x)+"px"})},S=function(){i.broadcastOn([wh()],{})},k=function(t){if(void 0===t&&(t=!1),p()){if(c||x(),g&&aj.refreshToolbar(u),c||C(),s){var e=o.get();t?CF.reset(e):CF.refresh(e)}S()}},T=function(t){if(void 0===t&&(t=!0),!c&&s&&p()){var e=f.getDockingMode(),n=b(o.get());n!==e&&(y(n),t&&k(!0))}},O=function(){h.set(!0),Kn(u.element,"display","flex"),a.addClass(t.getBody(),"mce-edit-focus"),nr(i.element,"display"),T(!1),k()},E=function(){h.set(!1),n.outerContainer&&(Kn(u.element,"display","none"),a.removeClass(t.getBody(),"mce-edit-focus")),Kn(i.element,"display","none")};return{isVisible:p,isPositionedAtTop:d,show:O,hide:E,update:k,updateMode:T,repositionPopups:S}},iq=function(t,e){var n=Jr(t);return{pos:e?n.y:n.bottom,bounds:n}},uq=function(t,e,n,r){var o=ou(iq(e,n.isPositionedAtTop())),i=function(r){var i=iq(e,n.isPositionedAtTop()),u=i.pos,a=i.bounds,c=o.get(),s=c.pos,l=c.bounds,f=a.height!==l.height||a.width!==l.width;o.set({pos:u,bounds:a}),f&&bE(t,r),n.isVisible()&&(s!==u?n.update(!0):f&&(n.updateMode(),n.repositionPopups()))};r||(t.on("activate",n.show),t.on("deactivate",n.hide)),t.on("SkinLoaded ResizeWindow",(function(){return n.update(!0)})),t.on("NodeChange keydown",(function(t){xC.requestAnimationFrame((function(){return i(t)}))})),t.on("ScrollWindow",(function(){return n.updateMode()}));var u=nd();u.set(ad(ee.fromDom(t.getBody()),"load",i)),t.on("remove",(function(){u.clear()}))},aq=function(t,e,n,r,o){var i=e.mothership,u=e.uiMothership,a=e.outerContainer,c=ou(null),s=ee.fromDom(o.targetNode),l=oq(t,s,e,r,c),f=FT(t);wj(t);var d=function(){if(c.get())l.show();else{c.set(aj.getHeader(a).getOrDie());var o=jT(t);Xg(o,i),Xg(o,u),qW(t,e,n,r),aj.setMenubar(a,dj(t,n)),l.show(),uq(t,s,l,f),t.nodeChanged()}};t.on("show",d),t.on("hide",l.hide),f||(t.on("focus",d),t.on("blur",l.hide)),t.on("init",(function(){(t.hasFocus()||f)&&d()})),aO(t,e);var m={show:function(){l.show()},hide:function(){l.hide()},enable:function(){uO(e,!1)},disable:function(){uO(e,!0)},isDisabled:function(){return Hv.isDisabled(a)}};return{editorContainer:a.element.dom,api:m}},cq=Object.freeze({__proto__:null,render:aq}),sq="contexttoolbar-show",lq="contexttoolbar-hide",fq=function(t){return{hide:function(){return Ca(t,ia())},getValue:function(){return tp.getValue(t)}}},dq=function(t,e){return Ra(DB,(function(n,r){var o=t.get(n),i=fq(o);e.onAction(i,r.event.buttonApi)}))},mq=function(t,e,n){var r=e.original;r.primary;var o=D(r,["primary"]),i=xi(OS(A(A({},o),{type:"button",onAction:p})));return AW(i,n.backstage.shared.providers,[dq(t,e)])},gq=function(t,e,n){var r=e.original;r.primary;var o=D(r,["primary"]),i=xi(AS(A(A({},o),{type:"togglebutton",onAction:p})));return MW(i,n.backstage.shared.providers,[dq(t,e)])},hq=function(t,e,n){var r={backstage:{shared:{providers:n}}};return"contextformtogglebutton"===e.type?gq(t,e,r):mq(t,e,r)},pq=function(t,e,n){var r=$(e,(function(e){return kC(hq(t,e,n))})),o=function(){return $(r,(function(t){return t.asSpec()}))},i=function(t){return gt(e,(function(e,n){return e.primary?L.from(r[n]).bind((function(e){return e.getOpt(t)})).filter(k(Hv.isDisabled)):L.none()}))};return{asSpecs:o,findPrimary:i}},vq=function(t,e){var n=t.label.fold((function(){return{}}),(function(t){return{"aria-label":t}})),r=kC(UA.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:n,selectOnFocus:!0,inputBehaviours:mf([Aw.config({mode:"special",onEnter:function(t){return o.findPrimary(t).map((function(t){return ka(t),!0}))},onLeft:function(t,e){return e.cut(),L.none()},onRight:function(t,e){return e.cut(),L.none()}})])})),o=pq(r,t.commands,e);return[{title:L.none(),items:[r.asSpec()]},{title:L.none(),items:o.asSpecs()}]},bq=function(t,e,n){return JU({type:t,uid:oc("context-toolbar"),initGroups:vq(e,n),onEscape:L.none,cyclicKeying:!0,providers:n})},yq={renderContextForm:bq,buildInitGroups:vq},wq=function(t,e,n){return void 0===n&&(n=.01),e.bottom-t.y>=n&&t.bottom-e.y>=n},xq=function(t){var e=t.getBoundingClientRect();if(e.height<=0&&e.width<=0){var n=Tn(ee.fromDom(t.startContainer),t.startOffset).element,r=fe(n)?vn(n):L.some(n);return r.filter(le).map((function(t){return t.dom.getBoundingClientRect()})).getOr(e)}return e},Cq=function(t){var e=t.selection.getRng(),n=xq(e);if(t.inline){var r=Hr();return Yr(r.left+n.left,r.top+n.top,n.width,n.height)}var o=Qr(ee.fromDom(t.getBody()));return Yr(o.x+n.left,o.y+n.top,n.width,n.height)},Sq=function(t,e){return e.filter(Ln).map(Qr).getOrThunk((function(){return Cq(t)}))},kq=function(t,e,n){var r=Math.max(t.x+n,e.x),o=Math.min(t.right-n,e.right);return{x:r,width:o-r}},Tq=function(t,e,n,r,o,i){var u=ee.fromDom(t.getContainer()),a=Is(u,".tox-editor-header").getOr(u),c=Jr(a),s=c.y>=e.bottom,l=r&&!s;if(t.inline&&l)return{y:Math.max(c.bottom+i,n.y),bottom:n.bottom};if(t.inline&&!l)return{y:n.y,bottom:Math.min(c.y-i,n.bottom)};var f="line"===o?Jr(u):e;return l?{y:Math.max(c.bottom+i,n.y),bottom:Math.min(f.bottom-i,n.bottom)}:{y:Math.max(f.y+i,n.y),bottom:Math.min(c.y-i,n.bottom)}},Oq=function(t,e,n,r){void 0===r&&(r=0);var o=Vr(window),i=Jr(ee.fromDom(t.getContentAreaContainer())),u=_T(t)||AT(t)||MT(t),a=kq(i,o,r),c=a.x,s=a.width;if(t.inline&&!u)return Yr(c,o.y,s,o.height);var l=e.header.isPositionedAtTop(),f=Tq(t,i,o,l,n,r),d=f.y,m=f.bottom;return Yr(c,d,s,m-d)},Eq=12,_q={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},Aq={maxHeightFunction:Ed(),maxWidthFunction:xU()},Dq=function(t,e){var n=t.selection.getRng(),r=Tn(ee.fromDom(n.startContainer),n.startOffset);return n.startContainer===n.endContainer&&n.startOffset===n.endOffset-1&&sn(r.element,e)},Mq=function(t,e,n){var r=Zn(t,"position");Kn(t,"position",e);var o=n(t);return r.each((function(e){return Kn(t,"position",e)})),o},Rq=function(t){return"node"===t},Nq=function(t,e,n,r,o){var i=Cq(t),u=r.lastElement().exists((function(t){return sn(n,t)}));if(Dq(t,n))return u?bC:mC;if(u)return Mq(e,r.getMode(),(function(){var t=wq(i,Jr(e));return t&&!r.isReposition()?wC:bC}));var a="fixed"===r.getMode()?o.y+Hr().top:o.y,c=ur(e)+Eq;return a+c<=i.y?mC:gC},zq=function(t,e,n,r){var o=function(e){return function(r,o,i,u,a){var c=Nq(t,u,e,n,a),s=A(A({},r),{y:a.y,height:a.height});return A(A({},c(s,o,i,u,a)),{alwaysFit:!0})}},i=function(t){return Rq(r)?[o(t)]:[]},u={onLtr:function(t){return[ql,$l,jl,Vl,Wl,Ul].concat(i(t))},onRtl:function(t){return[ql,$l,Wl,Ul,jl,Vl].concat(i(t))}},a={onLtr:function(t){return[$l,Vl,Ul,jl,Wl,ql].concat(i(t))},onRtl:function(t){return[$l,Ul,Vl,Wl,jl,ql].concat(i(t))}};return e?a:u},Bq=function(t,e,n,r){return"line"===e?{bubble:Rd(Eq,0,_q),layouts:{onLtr:function(){return[Gl]},onRtl:function(){return[Kl]}},overrides:Aq}:{bubble:Rd(0,Eq,_q,1/Eq),layouts:zq(t,n,r,e),overrides:Aq}},Lq=function(t,e){var n=Y(e,(function(e){return e.predicate(t.dom)})),r=X(n,(function(t){return"contexttoolbar"===t.type})),o=r.pass,i=r.fail;return{contextToolbars:o,contextForms:i}},Hq=function(t){if(t.length<=1)return t;var e=function(e){return j(t,(function(t){return t.position===e}))},n=function(e){return Y(t,(function(t){return t.position===e}))},r=e("selection"),o=e("node");if(r||o){if(o&&r){var i=n("node"),u=$(n("selection"),(function(t){return A(A({},t),{position:"node"})}));return i.concat(u)}return n(r?"selection":"node")}return n("line")},Iq=function(t){if(t.length<=1)return t;var e=function(e){return tt(t,(function(t){return t.position===e}))},n=e("selection").orThunk((function(){return e("node")})).orThunk((function(){return e("line")})).map((function(t){return t.position}));return n.fold((function(){return[]}),(function(e){return Y(t,(function(t){return t.position===e}))}))},Pq=function(t,e,n){var r=Lq(t,e);if(r.contextForms.length>0)return L.some({elem:t,toolbars:[r.contextForms[0]]});var o=Lq(t,n);if(o.contextForms.length>0)return L.some({elem:t,toolbars:[o.contextForms[0]]});if(r.contextToolbars.length>0||o.contextToolbars.length>0){var i=Hq(r.contextToolbars.concat(o.contextToolbars));return L.some({elem:t,toolbars:i})}return L.none()},Fq=function(t,e,n){return t(e)?L.none():yu(e,(function(t){if(le(t)){var e=Lq(t,n.inNodeScope),r=e.contextToolbars,o=e.contextForms,i=o.length>0?o:Iq(r);return i.length>0?L.some({elem:t,toolbars:i}):L.none()}return L.none()}),t)},Vq=function(t,e){var n=ee.fromDom(e.getBody()),r=function(t){return sn(t,n)},o=function(t){return!r(t)&&!dn(n,t)},i=ee.fromDom(e.selection.getNode());return o(i)?L.none():Pq(i,t.inNodeScope,t.inEditorScope).orThunk((function(){return Fq(r,i,t)}))},Uq=function(t,e){var n={},r=[],o=[],i={},u={},a=function(t,a){var c=xi(HS(a));n[t]=c,c.launch.map((function(n){i["form:"+t]=A(A({},a.launch),{type:"contextformtogglebutton"===n.type?"togglebutton":"button",onAction:function(){e(c)}})})),"editor"===c.scope?o.push(c):r.push(c),u[t]=c},c=function(t,e){PS(e).each((function(n){"editor"===e.scope?o.push(n):r.push(n),u[t]=n}))},s=ht(t);return G(s,(function(e){var n=t[e];"contextform"===n.type?a(e,n):"contexttoolbar"===n.type&&c(e,n)})),{forms:n,inNodeScope:r,inEditorScope:o,lookupTable:u,formNavigators:i}},jq=oc("forward-slide"),Wq=oc("backward-slide"),qq=oc("change-slide-event"),$q="tox-pop--resizing",Gq=function(t){var e=ou([]);return eC.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){e.set([]),eC.getContent(t).each((function(t){nr(t.element,"visibility")})),as(t.element,$q),nr(t.element,"width")},inlineBehaviours:mf([Vw("context-toolbar-events",[Va($u(),(function(t,e){"width"===e.event.raw.propertyName&&(as(t.element,$q),nr(t.element,"width"))})),Ra(qq,(function(t,e){var n=t.element;nr(n,"width");var r=vr(n);eC.setContent(t,e.event.contents),is(n,$q);var o=vr(n);Kn(n,"width",r+"px"),eC.getContent(t).each((function(t){e.event.focus.bind((function(t){return Sf(t),Ef(n)})).orThunk((function(){return Aw.focusIn(t),Of(An(n))}))})),xC.setTimeout((function(){Kn(t.element,"width",o+"px")}),0)})),Ra(jq,(function(t,n){eC.getContent(t).each((function(n){e.set(e.get().concat([{bar:n,focus:Of(An(t.element))}]))})),Sa(t,qq,{contents:n.event.forwardContents,focus:L.none()})})),Ra(Wq,(function(t,n){dt(e.get()).each((function(n){e.set(e.get().slice(0,e.get().length-1)),Sa(t,qq,{contents:_s(n.bar),focus:n.focus})}))}))]),Aw.config({mode:"special",onEscape:function(n){return dt(e.get()).fold((function(){return t.onEscape()}),(function(t){return Ca(n,Wq),L.some(!0)}))}})]),lazySink:function(){return ro.value(t.sink)}})},Kq="tox-pop--transition",Xq=function(t,e,n,r){var o=r.backstage,i=o.shared,u=en().deviceType.isTouch,a=od(),c=od(),s=od(),l=Es(Gq({sink:n,onEscape:function(){return t.focus(),L.some(!0)}})),f=function(){var e=s.get().getOr("node"),n=Rq(e)?1:0;return Oq(t,i,e,n)},d=function(){return!t.removed&&!(u()&&o.isContextMenuOpen())},m=function(t){return At(Nt(t,a.get(),sn),!0)},g=function(){if(d()){var e=f(),n=At(s.get(),"node")?Sq(t,a.get()):Cq(t);return e.height<=0||!wq(n,e)}return!0},h=function(){a.clear(),c.clear(),s.clear(),eC.hide(l)},v=function(){if(eC.isOpen(l)){var t=l.element;nr(t,"display"),g()?Kn(t,"display","none"):(c.set(0),eC.reposition(l))}},b=function(e){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[e],behaviours:mf([Aw.config({mode:"acyclic"}),Vw("pop-dialog-wrap-events",[Ua((function(e){t.shortcuts.add("ctrl+F9","focus statusbar",(function(){return Aw.focusIn(e)}))})),ja((function(e){t.shortcuts.remove("ctrl+F9")}))])])}},y=ge((function(){return Uq(e,(function(t){var e=C([t]);Sa(l,jq,{forwardContents:b(e)})}))})),w=function(e,n){return WW(t,{buttons:e,toolbar:n.items,allowToolbarGroups:!1},r,L.some(["form:"]))},x=function(t,e){return yq.buildInitGroups(t,e)},C=function(e){var n=t.ui.registry.getAll().buttons,r=y(),o=A(A({},n),r.formNavigators),u=NT(t)===US.scrolling?US.scrolling:US.default,a=nt($(e,(function(t){return"contexttoolbar"===t.type?w(o,t):x(t,i.providers)})));return JU({type:u,uid:oc("context-toolbar"),initGroups:a,onEscape:L.none,cyclicKeying:!0,providers:i.providers})},S=function(e,r){var o="node"===e?i.anchors.node(r):i.anchors.cursor(),s=Bq(t,e,u(),{lastElement:a.get,isReposition:function(){return At(c.get(),0)},getMode:function(){return Ig.getMode(n)}});return Co(o,s)},k=function(t,e){if(T.cancel(),d()){var r=C(t),o=t[0].position,i=S(o,e);s.set(o),c.set(1);var u=l.element;nr(u,"display"),m(e)||(as(u,Kq),Ig.reset(n,l)),eC.showWithinBounds(l,b(r),{anchor:i,transition:{classes:[Kq],mode:"placement"}},(function(){return L.some(f())})),e.fold(a.clear,a.set),g()&&Kn(u,"display","none")}},T=WC((function(){if(t.hasFocus()&&!t.removed)if(cs(l.element,Kq))T.throttle();else{var e=y();Vq(e,t).fold(h,(function(t){k(t.toolbars,L.some(t.elem))}))}}),17);t.on("init",(function(){t.on("remove",h),t.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",v),t.on("click keyup focus SetContent",T.throttle),t.on(lq,h),t.on(sq,(function(e){var n=y();Ot(n.lookupTable,e.toolbarKey).each((function(n){k([n],Lt(e.target!==t,e.target)),eC.getContent(l).each(Aw.focusIn)}))})),t.on("focusout",(function(e){xC.setEditorTimeout(t,(function(){Ef(n.element).isNone()&&Ef(l.element).isNone()&&h()}),0)})),t.on("SwitchMode",(function(){t.mode.isReadOnly()&&h()})),t.on("AfterProgressState",(function(e){e.state?h():t.hasFocus()&&T.throttle()})),t.on("NodeChange",(function(t){Ef(l.element).fold(T.throttle,p)}))}))},Yq=function(t){var e=[{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}];G(e,(function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onAction:kj(t,e.cmd),onSetup:xj(t,e.name)})})),t.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onAction:kj(t,"JustifyNone")})},Jq={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},Qq=function(){var t="[0-9]+",e="[+-]?"+t,n="[eE]"+e,r="\\.",o=function(t){return"(?:"+t+")?"},i=["Infinity",t+r+o(t)+o(n),r+t+o(n),t+o(n)].join("|"),u="[+-]?(?:"+i+")";return new RegExp("^("+u+")(.*)$")}(),Zq=function(t,e){return j(e,(function(e){return j(Jq[e],(function(e){return t===e}))}))},t$=function(t,e){var n=L.from(Qq.exec(t));return n.bind((function(t){var n=Number(t[1]),r=t[2];return Zq(r,e)?L.some({value:n,unit:r}):L.none()}))},e$=function(t,e){return t$(t,e).map((function(t){var e=t.value,n=t.unit;return e+n}))},n$=function(t,e){var n=function(){var n=e.getOptions(t),r=e.getCurrent(t).map(e.hash),o=od();return $(n,(function(n){return{type:"togglemenuitem",text:e.display(n),onSetup:function(i){var u=function(t){t&&(o.on((function(t){return t.setActive(!1)})),o.set(i)),i.setActive(t)};u(At(r,e.hash(n)));var a=e.watcher(t,n,u);return function(){o.clear(),a()}},onAction:function(){return e.setCurrent(t,n)}}}))};t.ui.registry.addMenuButton(e.name,{tooltip:e.text,icon:e.icon,fetch:function(t){return t(n())},onSetup:e.onToolbarSetup}),t.ui.registry.addNestedMenuItem(e.name,{type:"nestedmenuitem",text:e.text,getSubmenuItems:n,onSetup:e.onMenuSetup})},r$={name:"lineheight",text:"Line height",icon:"line-height",getOptions:TT,hash:function(t){return e$(t,["fixed","relative","empty"]).getOr(t)},display:x,watcher:function(t,e,n){return t.formatter.formatChanged("lineheight",n,!1,{value:e}).unbind},getCurrent:function(t){return L.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,e){return t.execCommand("LineHeight",!1,e)}},o$=function(t){var e=L.from(OT(t));return e.map((function(e){return{name:"language",text:"Language",icon:"language",getOptions:w(e),hash:function(t){return l(t.customCode)?t.code:t.code+"/"+t.customCode},display:function(t){return t.title},watcher:function(t,e,n){return t.formatter.formatChanged("lang",n,!1,{value:e.code,customValue:e.customCode}).unbind},getCurrent:function(t){var e=ee.fromDom(t.selection.getNode());return wu(e,(function(t){return L.some(t).filter(le).bind((function(t){var e=jn(t,"lang");return e.map((function(e){var n=jn(t,"data-mce-lang").getOrUndefined();return{code:e,customCode:n,title:""}}))}))}))},setCurrent:function(t,e){return t.execCommand("Lang",!1,e)},onToolbarSetup:function(e){var n=nd();return e.setActive(t.formatter.match("lang",{},void 0,!0)),n.set(t.formatter.formatChanged("lang",e.setActive,!0)),n.clear}}}))},i$=function(t){n$(t,r$),o$(t).each((function(e){return n$(t,e)}))},u$=function(t,e){Lj(t,e),jj(t,e),uW(t,e),rW(t,e),Qj(t,e)},a$=function(t){return Cj(t,"NodeChange",(function(e){e.setDisabled(!t.queryCommandState("outdent"))}))},c$=function(t){t.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:a$(t),onAction:kj(t,"outdent")}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:kj(t,"indent")})},s$=function(t){c$(t)},l$=function(t,e){return function(){t.execCommand("mceToggleFormat",!1,e)}},f$=function(t){QN.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(function(e,n){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onSetup:xj(t,e.name),onAction:l$(t,e.name)})}));for(var e=1;e<=6;e++){var n="h"+e;t.ui.registry.addToggleButton(n,{text:n.toUpperCase(),tooltip:"Heading "+e,onSetup:xj(t,n),onAction:l$(t,n)})}},d$=function(t){QN.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],(function(e){t.ui.registry.addButton(e.name,{tooltip:e.text,icon:e.icon,onAction:kj(t,e.action)})}))},m$=function(t){QN.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onAction:kj(t,e.action),onSetup:xj(t,e.name)})}))},g$=function(t){f$(t),d$(t),m$(t)},h$=function(t){QN.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],(function(e){t.ui.registry.addMenuItem(e.name,{text:e.text,icon:e.icon,shortcut:e.shortcut,onAction:kj(t,e.action)})})),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:l$(t,"code")})},p$=function(t){g$(t),h$(t)},v$=function(t,e){return Cj(t,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(function(n){n.setDisabled(t.mode.isReadOnly()||!t.undoManager[e]())}))},b$=function(t){t.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:v$(t,"hasUndo"),onAction:kj(t,"undo")}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:v$(t,"hasRedo"),onAction:kj(t,"redo")})},y$=function(t){t.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",disabled:!0,onSetup:v$(t,"hasUndo"),onAction:kj(t,"undo")}),t.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",disabled:!0,onSetup:v$(t,"hasRedo"),onAction:kj(t,"redo")})},w$=function(t){b$(t),y$(t)},x$=function(t){return Cj(t,"VisualAid",(function(e){e.setActive(t.hasVisual)}))},C$=function(t){t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:x$(t),onAction:kj(t,"mceToggleVisualAid")})},S$=function(t){t.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:kj(t,"mceToggleVisualAid")})},k$=function(t){S$(t),C$(t)},T$=function(t,e){Yq(t),p$(t),u$(t,e),w$(t),e_(t),k$(t),s$(t),i$(t)},O$=function(t,e){return{type:"makeshift",x:t,y:e}},E$=function(t,e,n){return O$(t.x+e,t.y+n)},_$=function(t){return"longpress"===t.type||0===t.type.indexOf("touch")},A$=function(t){if(_$(t)){var e=t.touches[0];return O$(e.pageX,e.pageY)}return O$(t.pageX,t.pageY)},D$=function(t){if(_$(t)){var e=t.touches[0];return O$(e.clientX,e.clientY)}return O$(t.clientX,t.clientY)},M$=function(t,e){var n=dT.DOM.getPos(t);return E$(e,n.x,n.y)},R$=function(t,e){return"contextmenu"===e.type||"longpress"===e.type?t.inline?A$(e):M$(t.getContentAreaContainer(),D$(e)):N$(t)},N$=function(t){return{type:"selection",root:ee.fromDom(t.selection.getNode())}},z$=function(t){return{type:"node",node:L.some(ee.fromDom(t.selection.getNode())),root:ee.fromDom(t.getBody())}},B$=function(t,e,n){switch(n){case"node":return z$(t);case"point":return R$(t,e);case"selection":return N$(t)}},L$=function(t,e,n,r,o,i){var u=n(),a=B$(t,e,i);qB(u,jS.CLOSE_ON_EXECUTE,r,!1).map((function(t){e.preventDefault(),eC.showMenuAt(o,{anchor:a},{menu:{markers:mk("normal")},data:t})}))},H$={onLtr:function(){return[$l,Vl,Ul,jl,Wl,ql,mC,gC,dC,lC,fC,sC]},onRtl:function(){return[$l,Ul,Vl,Wl,jl,ql,mC,gC,fC,sC,dC,lC]}},I$=12,P$={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},F$=function(t,e){var n=t.selection;if(n.isCollapsed()||e.touches.length<1)return!1;var r=e.touches[0],o=n.getRng(),i=ng(t.getWin(),km.domRange(o));return i.exists((function(t){return t.left<=r.clientX&&t.right>=r.clientX&&t.top<=r.clientY&&t.bottom>=r.clientY}))},V$=function(t){var e=t.selection.getRng(),n=function(){xC.setEditorTimeout(t,(function(){t.selection.setRng(e)}),10),i()};t.once("touchend",n);var r=function(t){t.preventDefault(),t.stopImmediatePropagation()};t.on("mousedown",r,!0);var o=function(){return i()};t.once("longpresscancel",o);var i=function(){t.off("touchend",n),t.off("longpresscancel",o),t.off("mousedown",r)}},U$=function(t,e,n){var r=B$(t,e,n),o="point"===n?I$:0;return A({bubble:Rd(0,o,P$),layouts:H$,overrides:{maxWidthFunction:xU(),maxHeightFunction:Ed()}},r)},j$=function(t,e,n,r,o,i,u){var a=U$(t,e,i);qB(n,jS.CLOSE_ON_EXECUTE,r,!0).map((function(n){e.preventDefault(),eC.showMenuWithinBounds(o,{anchor:a},{menu:{markers:mk("normal"),highlightImmediately:u},data:n,type:"horizontal"},(function(){return L.some(Oq(t,r.shared,"node"===i?"node":"selection"))})),t.fire(lq)}))},W$=function(t,e,n,r,o,i){var u=en(),a=u.os.isiOS(),c=u.os.isOSX(),s=u.os.isAndroid(),l=u.deviceType.isTouch(),f=function(){return!(s||a||c&&l)},d=function(){var u=n();j$(t,e,u,r,o,i,f())};if((c||a)&&"node"!==i){var m=function(){V$(t),d()};F$(t,e)?m():(t.once("selectionchange",m),t.once("touchend",(function(){return t.off("selectionchange",m)})))}else d()},q$=function(t){return"string"===typeof t?t.split(/[ ,]/):t},$$=function(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")},G$=function(t,e,n){var r=t.ui.registry.getAll().contextMenus;return L.from(t.getParam(e)).map(q$).getOrThunk((function(){return Y(q$(n),(function(t){return Et(r,t)}))}))},K$=function(t){return!1===t.getParam("contextmenu")},X$=function(t){return G$(t,"contextmenu","link linkchecker image imagetools table spellchecker configurepermanentpen")},Y$=function(t){return t.getParam("contextmenu_avoid_overlap","","string")},J$=function(t){return i(t)?"|"===t:"separator"===t.type},Q$={type:"separator"},Z$=function(t){var e=function(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}};if(i(t))return t;switch(t.type){case"separator":return Q$;case"submenu":return A(A({type:"nestedmenuitem"},e(t)),{getSubmenuItems:function(){var e=t.getSubmenuItems();return i(e)?e:$(e,Z$)}});default:return A(A({type:"menuitem"},e(t)),{onAction:v(t.onAction)})}},tG=function(t,e){if(0===e.length)return t;var n=dt(t).filter((function(t){return!J$(t)})),r=n.fold((function(){return[]}),(function(t){return[Q$]}));return t.concat(r).concat(e).concat([Q$])},eG=function(t,e,n){var r=Q(e,(function(e,r){return Ot(t,r.toLowerCase()).map((function(t){var r=t.update(n);if(i(r))return tG(e,r.split(" "));if(r.length>0){var o=$(r,Z$);return tG(e,o)}return e})).getOrThunk((function(){return e.concat([r])}))}),[]);return r.length>0&&J$(r[r.length-1])&&r.pop(),r},nG=function(t,e){return e.ctrlKey&&!$$(t)},rG=function(t,e){return"longpress"!==e.type&&(2!==e.button||e.target===t.getBody()&&""===e.pointerType)},oG=function(t,e){return rG(t,e)?t.selection.getStart(!0):e.target},iG=function(t,e){var n=Y$(t),r=rG(t,e)?"selection":"point";if(Gt(n)){var o=oG(t,e),i=L_(ee.fromDom(o),n);return i?"node":r}return r},uG=function(t,e,n){var r=en(),o=r.deviceType.isTouch,i=Es(eC.sketch({dom:{tag:"div"},lazySink:e,onEscape:function(){return t.focus()},onShow:function(){return n.setContextMenuState(!0)},onHide:function(){return n.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:mf([Vw("dismissContextMenu",[Ra(ga(),(function(e,n){bh.close(e),t.focus()}))])])})),u=function(t){return eC.hide(i)},a=function(e){if($$(t)&&e.preventDefault(),!nG(t,e)&&!K$(t)){var r=iG(t,e),u=function(){var n=oG(t,e),r=t.ui.registry.getAll(),o=X$(t);return eG(r.contextMenus,o,n)},a=o()?W$:L$;a(t,e,u,n,i,r)}};t.on("init",(function(){var e="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(o()?"":" ResizeWindow");t.on(e,u),t.on("longpress contextmenu",a)}))},aG=uu.generate([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),cG=function(t){return function(e){return e.translate(-t.left,-t.top)}},sG=function(t){return function(e){return e.translate(t.left,t.top)}},lG=function(t){return function(e,n){return Q(t,(function(t,e){return e(t)}),lr(e,n))}},fG=function(t,e,n){return t.fold(lG([sG(n),cG(e)]),lG([cG(e)]),lG([]))},dG=function(t,e,n){return t.fold(lG([sG(n)]),lG([]),lG([sG(e)]))},mG=function(t,e,n){return t.fold(lG([]),lG([cG(n)]),lG([sG(e),cG(n)]))},gG=function(t,e,n,r,o,i){var u=dG(t,o,i),a=dG(e,o,i);return Math.abs(u.left-a.left)<=n&&Math.abs(u.top-a.top)<=r},hG=function(t,e,n,r,o,i){var u=dG(t,o,i),a=dG(e,o,i),c=Math.abs(u.left-a.left),s=Math.abs(u.top-a.top);return lr(c,s)},pG=function(t,e,n){var r=t.fold((function(t,e){return{position:L.some("absolute"),left:L.some(t+"px"),top:L.some(e+"px")}}),(function(t,e){return{position:L.some("absolute"),left:L.some(t-n.left+"px"),top:L.some(e-n.top+"px")}}),(function(t,e){return{position:L.some("fixed"),left:L.some(t+"px"),top:L.some(e+"px")}}));return A({right:L.none(),bottom:L.none()},r)},vG=function(t,e,n){return t.fold((function(t,r){return yG(t+e,r+n)}),(function(t,r){return wG(t+e,r+n)}),(function(t,r){return xG(t+e,r+n)}))},bG=function(t,e,n,r){var o=function(t,o){return function(i,u){var a=t(e,n,r);return o(i.getOr(a.left),u.getOr(a.top))}};return t.fold(o(mG,yG),o(dG,wG),o(fG,xG))},yG=aG.offset,wG=aG.absolute,xG=aG.fixed,CG=function(t,e){var n=Un(t,e);return l(n)?NaN:parseInt(n,10)},SG=function(t,e){var n=t.element,r=CG(n,e.leftAttr),o=CG(n,e.topAttr);return isNaN(r)||isNaN(o)?L.none():L.some(lr(r,o))},kG=function(t,e,n){var r=t.element;Fn(r,e.leftAttr,n.left+"px"),Fn(r,e.topAttr,n.top+"px")},TG=function(t,e){var n=t.element;qn(n,e.leftAttr),qn(n,e.topAttr)},OG=function(t,e,n,r){return SG(t,e).fold((function(){return n}),(function(t){return xG(t.left+r.left,t.top+r.top)}))},EG=function(t,e,n,r,o,i){var u=OG(t,e,n,r),a=e.mustSnap?DG(t,e,u,o,i):MG(t,e,u,o,i),c=fG(u,o,i);return kG(t,e,c),a.fold((function(){return{coord:xG(c.left,c.top),extra:L.none()}}),(function(t){return{coord:t.output,extra:t.extra}}))},_G=function(t,e){TG(t,e)},AG=function(t,e,n,r){return gt(t,(function(t){var o=t.sensor,i=gG(e,o,t.range.left,t.range.top,n,r);return i?L.some({output:bG(t.output,e,n,r),extra:t.extra}):L.none()}))},DG=function(t,e,n,r,o){var i=e.getSnapPoints(t),u=AG(i,n,r,o);return u.orThunk((function(){var t=Q(i,(function(t,e){var i=e.sensor,u=hG(n,i,e.range.left,e.range.top,r,o);return t.deltas.fold((function(){return{deltas:L.some(u),snap:L.some(e)}}),(function(n){var r=(u.left+u.top)/2,o=(n.left+n.top)/2;return r<=o?{deltas:L.some(u),snap:L.some(e)}:t}))}),{deltas:L.none(),snap:L.none()});return t.snap.map((function(t){return{output:bG(t.output,n,r,o),extra:t.extra}}))}))},MG=function(t,e,n,r,o){var i=e.getSnapPoints(t);return AG(i,n,r,o)},RG=function(t,e,n){return{coord:bG(t.output,t.output,e,n),extra:t.extra}},NG=function(t,e,n,r){var o=e.getTarget(t.element);if(e.repositionTarget){var i=mn(t.element),u=Hr(i),a=qP(o),c=RG(r,u,a),s=pG(c.coord,u,a);Yn(o,s)}},zG=Object.freeze({__proto__:null,snapTo:NG}),BG="data-initial-z-index",LG=function(t){vn(t.element).filter(le).each((function(t){jn(t,BG).fold((function(){return nr(t,"z-index")}),(function(e){return Kn(t,"z-index",e)})),qn(t,BG)}))},HG=function(t){vn(t.element).filter(le).each((function(e){Zn(e,"z-index").each((function(t){Fn(e,BG,t)})),Kn(e,"z-index",Jn(t.element,"z-index"))}))},IG=function(t,e){t.getSystem().addToGui(e),HG(e)},PG=function(t){LG(t),t.getSystem().removeFromGui(t)},FG=function(t,e,n){return t.getSystem().build(sA.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[e]},events:n}))},VG=$i("snaps",[Ai("getSnapPoints"),al("onSensor"),Ai("leftAttr"),Ai("topAttr"),Ki("lazyViewport",Zr),Ki("mustSnap",!1)]),UG=[Ki("useFixed",O),Ai("blockerClass"),Ki("getTarget",x),Ki("onDrag",p),Ki("repositionTarget",!0),Ki("onDrop",p),tu("getBounds",Zr),VG],jG=function(t){return zt(Zn(t,"left"),Zn(t,"top"),Zn(t,"position"),(function(t,e,n){var r="fixed"===n?xG:yG;return r(parseInt(t,10),parseInt(e,10))})).getOrThunk((function(){var e=mr(t);return wG(e.left,e.top)}))},WG=function(t,e,n,r,o){var i=o.bounds,u=dG(e,n,r),a=_l(u.left,i.x,i.x+i.width-o.width),c=_l(u.top,i.y,i.y+i.height-o.height),s=wG(a,c);return e.fold((function(){var t=mG(s,n,r);return yG(t.left,t.top)}),w(s),(function(){var t=fG(s,n,r);return xG(t.left,t.top)}))},qG=function(t,e,n,r,o,i,u){var a=e.fold((function(){var t=vG(n,i.left,i.top),e=fG(t,r,o);return xG(e.left,e.top)}),(function(e){var u=EG(t,e,n,i,r,o);return u.extra.each((function(n){e.onSensor(t,n)})),u.coord}));return WG(t,a,r,o,u)},$G=function(t,e,n,r){var o=e.getTarget(t.element);if(e.repositionTarget){var i=mn(t.element),u=Hr(i),a=qP(o),c=jG(o),s=qG(t,e.snaps,c,u,a,r,n),l=pG(s,u,a);Yn(o,l)}e.onDrag(t,o,r)},GG=function(t,e){return{bounds:t.getBounds(),height:ar(e.element),width:br(e.element)}},KG=function(t,e,n,r,o){var i=n.update(r,o),u=n.getStartData().getOrThunk((function(){return GG(e,t)}));i.each((function(n){$G(t,e,u,n)}))},XG=function(t,e,n,r){e.each(PG),n.snaps.each((function(e){_G(t,e)}));var o=n.getTarget(t.element);r.reset(),n.onDrop(t,o)},YG=function(t){return function(e,n){var r=function(t){n.setStartData(GG(e,t))};return _a(M([Ra(la(),(function(t){n.getStartData().each((function(){return r(t)}))}))],t(e,n,r),!0))}},JG=function(t){return _a([Ra(Nu(),t.forceDrop),Ra(Lu(),t.drop),Ra(zu(),(function(e,n){t.move(n.event)})),Ra(Bu(),t.delayDrop)])},QG=function(t){return L.from(lr(t.x,t.y))},ZG=function(t,e){return lr(e.left-t.left,e.top-t.top)},tK=Object.freeze({__proto__:null,getData:QG,getDelta:ZG}),eK=function(t,e,n){return[Ra(Nu(),(function(r,o){var i=o.event.raw;if(0===i.button){o.stop();var u=function(){return XG(r,L.some(s),t,e)},a=H_(u,200),c={drop:u,delayDrop:a.schedule,forceDrop:u,move:function(n){a.cancel(),KG(r,t,e,tK,n)}},s=FG(r,t.blockerClass,JG(c)),l=function(){n(r),IG(r,s)};l()}}))]},nK=M(M([],UG,!0),[fl("dragger",{handlers:YG(eK)})],!1),rK=function(t){return _a([Ra(Au(),t.forceDrop),Ra(Mu(),t.drop),Ra(Ru(),t.drop),Ra(Du(),(function(e,n){t.move(n.event)}))])},oK=function(t){var e=t[0];return L.some(lr(e.clientX,e.clientY))},iK=function(t){var e=t.raw,n=e.touches;return 1===n.length?oK(n):L.none()},uK=function(t,e){return lr(e.left-t.left,e.top-t.top)},aK=Object.freeze({__proto__:null,getData:iK,getDelta:uK}),cK=function(t,e,n){var r=od(),o=function(n){XG(n,r.get(),t,e),r.clear()};return[Ra(Au(),(function(i,u){u.stop();var a=function(){return o(i)},c={drop:a,delayDrop:p,forceDrop:a,move:function(n){KG(i,t,e,aK,n)}},s=FG(i,t.blockerClass,rK(c));r.set(s);var l=function(){n(i),IG(i,s)};l()})),Ra(Du(),(function(n,r){r.stop(),KG(n,t,e,aK,r.event)})),Ra(Mu(),(function(t,e){e.stop(),o(t)})),Ra(Ru(),o)]},sK=M(M([],UG,!0),[fl("dragger",{handlers:YG(cK)})],!1),lK=function(t,e,n){return M(M([],eK(t,e,n),!0),cK(t,e,n),!0)},fK=M(M([],UG,!0),[fl("dragger",{handlers:YG(lK)})],!1),dK=nK,mK=sK,gK=fK,hK=Object.freeze({__proto__:null,mouse:dK,touch:mK,mouseOrTouch:gK}),pK=function(){var t=L.none(),e=L.none(),n=function(){t=L.none(),e=L.none()},r=function(e,n){var r=t.map((function(t){return e.getDelta(t,n)}));return t=L.some(n),r},o=function(t,e){return t.getData(e).bind((function(e){return r(t,e)}))},i=function(t){e=L.some(t)},u=function(){return e},a=w({});return Tc({readState:a,reset:n,update:o,getStartData:u,setStartData:i})},vK=Object.freeze({__proto__:null,init:pK}),bK=vf({branchKey:"mode",branches:hK,name:"dragging",active:{events:function(t,e){var n=t.dragger;return n.handlers(t,e)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:L.from(t.extra)}}},state:vK,apis:zG}),yK=40,wK=yK/2,xK=function(t,e,n,r,o,i){return t.fold((function(){return bK.snap({sensor:wG(n-wK,r-wK),range:lr(o,i),output:wG(L.some(n),L.some(r)),extra:{td:e}})}),(function(t){var o=n-wK,i=r-wK,u=yK,a=yK,c=t.element.dom.getBoundingClientRect();return bK.snap({sensor:wG(o,i),range:lr(u,a),output:wG(L.some(n-c.width/2),L.some(r-c.height/2)),extra:{td:e}})}))},CK=function(t,e,n){var r=function(t,e){return t.exists((function(t){return sn(t,e)}))};return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,o){var i=o.td;r(e.get(),i)||(e.set(i),n(i))},mustSnap:!0}},SK=function(t){return kC(SC.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:mf([bK.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),VD.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},kK=function(t,e){var n=ou([]),r=ou([]),o=ou(!1),i=od(),u=od(),a=function(t){var n=Qr(t);return xK(m.getOpt(e),t,n.x,n.y,n.width,n.height)},c=function(){return $(n.get(),(function(t){return a(t)}))},s=function(t){var n=Qr(t);return xK(g.getOpt(e),t,n.right,n.bottom,n.width,n.height)},l=function(){return $(r.get(),(function(t){return s(t)}))},f=CK(c,i,(function(e){u.get().each((function(n){t.fire("TableSelectorChange",{start:e,finish:n})}))})),d=CK(l,u,(function(e){i.get().each((function(n){t.fire("TableSelectorChange",{start:n,finish:e})}))})),m=SK(f),g=SK(d),h=Es(m.asSpec()),p=Es(g.asSpec()),v=function(e,n,r,o){var i=n.dom.getBoundingClientRect();nr(e.element,"display");var u=pn(ee.fromDom(t.getBody())).dom.innerHeight,a=r(i),c=o(i,u);(a||c)&&Kn(e.element,"display","none")},b=function(t,e,n,r){var o=n(e);bK.snapTo(t,o);var i=function(t){return t[r]<0},u=function(t,e){return t[r]>e};v(t,e,i,u)},y=function(t){return b(h,t,a,"top")},w=function(){return i.get().each(y)},x=function(t){return b(p,t,s,"bottom")},C=function(){return u.get().each(x)};en().deviceType.isTouch()&&(t.on("TableSelectionChange",(function(t){o.get()||(Wg(e,h),Wg(e,p),o.set(!0)),i.set(t.start),u.set(t.finish),t.otherCells.each((function(e){n.set(e.upOrLeftCells),r.set(e.downOrRightCells),y(t.start),x(t.finish)}))})),t.on("ResizeEditor ResizeWindow ScrollContent",(function(){w(),C()})),t.on("TableSelectionClear",(function(){o.get()&&(Gg(h),Gg(p),o.set(!1)),i.clear(),u.clear()})))},TK=function(t){if(1===t.nodeType){if("BR"===t.nodeName||t.getAttribute("data-mce-bogus"))return!0;if("bookmark"===t.getAttribute("data-mce-type"))return!0}return!1},OK=function(t,e,n){e.delimiter||(e.delimiter="»");var r=function(r){var o=r||[],i=$(o,(function(e,r){return SC.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":r,"tab-index":-1,"aria-level":r+1},innerHtml:e.name},action:function(n){t.focus(),t.selection.select(e.element),t.nodeChanged()},buttonBehaviours:mf([mO.button(n.isDisabled),cO()])})})),u={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+e.delimiter+" "}};return Q(i.slice(1),(function(t,e){var n=t;return n.push(u),n.push(e),n}),[i[0]])},o=function(e){var n=[],r=e.length;while(r-- >0){var o=e[r];if(1===o.nodeType&&!TK(o)){var i=t.fire("ResolveName",{name:o.nodeName.toLowerCase(),target:o});if(i.isDefaultPrevented()||n.push({name:i.name,element:o}),i.isPropagationStopped())break}}return n};return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:mf([Aw.config({mode:"flow",selector:"div[role=button]"}),Hv.config({disabled:n.isDisabled}),cO(),yA.config({}),Pw.config({}),Vw("elementPathEvents",[Ua((function(e,n){t.shortcuts.add("alt+F11","focus statusbar elementpath",(function(){return Aw.focusIn(e)})),t.on("NodeChange",(function(t){var n=o(t.parents);n.length>0?Pw.set(e,r(n)):Pw.set(e,[])}))}))])]),components:[]}};(function(t){t[t["None"]=0]="None",t[t["Both"]=1]="Both",t[t["Vertical"]=2]="Vertical"})(Dj||(Dj={}));var EK=function(t,e,n,r,o){var i={};return i.height=ZW(r+e.top,wT(t),CT(t)),n===Dj.Both&&(i.width=ZW(o+e.left,yT(t),xT(t))),i},_K=function(t,e,n){var r=ee.fromDom(t.getContainer()),o=EK(t,e,n,ur(r),vr(r));vt(o,(function(t,e){return Kn(r,e,QW(t))})),vE(t)},AK=function(t){var e=!t.hasPlugin("autoresize"),n=t.getParam("resize",e);return!1===n?Dj.None:"both"===n?Dj.Both:Dj.Vertical},DK=function(t,e,n,r){var o=20,i=lr(n*o,r*o);return _K(t,i,e),L.some(!0)},MK=function(t,e){var n=AK(t);return n===Dj.None?L.none():L.some(LC("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:e.translate("Resize")},behaviours:[bK.config({mode:"mouse",repositionTarget:!1,onDrag:function(e,r,o){return _K(t,o,n)},blockerClass:"tox-blocker"}),Aw.config({mode:"special",onLeft:function(){return DK(t,n,-1,0)},onRight:function(){return DK(t,n,1,0)},onUp:function(){return DK(t,n,0,-1)},onDown:function(){return DK(t,n,0,1)}}),yA.config({}),Yw.config({})]},e.icons))},RK=function(t,e){var n,r=function(t,n,r){return Pw.set(t,[Ss(e.translate(["{0} "+r,n[r]]))])};return SC.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:mf([mO.button(e.isDisabled),cO(),yA.config({}),Pw.config({}),tp.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Vw("wordcount-events",[qa((function(t){var e=tp.getValue(t),n="words"===e.mode?"characters":"words";tp.setValue(t,{mode:n,count:e.count}),r(t,e.count,n)})),Ua((function(e){t.on("wordCountUpdate",(function(t){var n=tp.getValue(e).mode;tp.setValue(e,{mode:n,count:t.wordCount}),r(e,t.wordCount,n)}))}))])]),eventOrder:(n={},n[ea()]=["disabling","alloy.base.behaviour","wordcount-events"],n)})},NK=function(t,e){var n=function(){var t=TC.translate(["Powered by {0}","Tiny"]),e='<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+t+'">'+t+"</a>";return{dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:e}}},r=function(){var r=[];return t.getParam("elementpath",!0,"boolean")&&r.push(OK(t,{},e)),t.hasPlugin("wordcount")&&r.push(RK(t,e)),t.getParam("branding",!0,"boolean")&&r.push(n()),r.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:r}]:[]},o=function(){var n=r(),o=MK(t,e);return n.concat(o.toArray())};return{dom:{tag:"div",classes:["tox-statusbar"]},components:o()}},zK=function(t){var e,n=t.inline,r=n?cq:YW,o=qT(t)?IF:jP,i=L.none(),u=en(),a=u.browser.isIE(),c=a?["tox-platform-ie"]:[],s=u.deviceType.isTouch(),l="tox-platform-touch",f=s?[l]:[],d=HT(t),m=jT(t),g=TC.isRtl()?{attributes:{dir:"rtl"}}:{},h={attributes:(e={},e[Hd]=d?Pf.BottomToTop:Pf.TopToBottom,e)},v=function(){return i.bind(aj.getHeader)},b=function(){return o.isDocked(v)},y=function(){Kn(Q.element,"width",document.body.clientWidth+"px")},w=function(){var t=sn(Hn(),m)&&"grid"===Jn(m,"display"),e={dom:A({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(c).concat(f)},g),behaviours:mf([Ig.config({useFixed:function(){return b()}})])},n={dom:{styles:{width:document.body.clientWidth+"px"}},events:_a([Ra(fa(),y)])};return Co(e,t?n:{})},x=Es(w()),C=function(){return ro.value(x)},S=kC({dom:{tag:"div",classes:["tox-anchorbar"]}}),k=function(){return i.bind((function(t){return S.getOpt(t)})).getOrDie("Could not find a anchor bar element")},T=function(){return i.bind((function(t){return aj.getToolbar(t)})).getOrDie("Could not find more toolbar element")},O=function(){return i.bind((function(t){return aj.getThrobber(t)})).getOrDie("Could not find throbber element")},E=kP(x,t,k),_=aj.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:E,onEscape:function(){t.focus()}}),D=NT(t),M=aj.parts.toolbar(A({dom:{tag:"div",classes:["tox-toolbar"]},getSink:C,providers:E.shared.providers,onEscape:function(){t.focus()},type:D,lazyToolbar:T,lazyHeader:function(){return v().getOrDie("Could not find header element")}},h)),R=aj.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:E.shared.providers,onEscape:function(){t.focus()},type:D}),N=aj.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),z=aj.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),B=aj.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:E}),H=t.getParam("statusbar",!0,"boolean"),I=H&&!n?L.some(NK(t,E.shared.providers)):L.none(),P={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[N,z]},F=MT(t),V=AT(t),U=_T(t),j=function(){return F?[R]:V?[M]:[]},W=aj.parts.header({dom:A({tag:"div",classes:["tox-editor-header"]},h),components:nt([U?[_]:[],j(),UT(t)?[]:[S.asSpec()]]),sticky:qT(t),editor:t,sharedBackstage:E.shared}),q=nt([d?[]:[W],n?[]:[P],d?[W]:[]]),$={dom:{tag:"div",classes:["tox-editor-container"]},components:q},G=nt([[$],n?[]:I.toArray(),[B]]),K=WT(t),X=A(A({role:"application"},TC.isRtl()?{dir:"rtl"}:{}),K?{"aria-hidden":"true"}:{}),Y=Es(aj.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(n?["tox-tinymce-inline"]:[]).concat(d?["tox-tinymce--toolbar-bottom"]:[]).concat(f).concat(c),styles:A({visibility:"hidden"},K?{opacity:"0",border:"0"}:{}),attributes:X},components:G,behaviours:mf([cO(),Hv.config({disableClass:"tox-tinymce--disabled"}),Aw.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])}));i=L.some(Y),t.shortcuts.add("alt+F9","focus menubar",(function(){aj.focusMenubar(Y)})),t.shortcuts.add("alt+F10","focus toolbar",(function(){aj.focusToolbar(Y)})),t.addCommand("ToggleToolbarDrawer",(function(){aj.toggleToolbarDrawer(Y)})),t.addQueryStateHandler("ToggleToolbarDrawer",(function(){return aj.isToolbarDrawerToggled(Y)}));var J=lA(Y),Q=lA(x);TP(t,J,Q);var Z=function(){var t={broadcastAll:Q.broadcast,broadcastOn:Q.broadcastOn,register:p};return{channels:t}},tt=function(){var e=QW(eq(t)),n=QW(rq(t));return t.inline||(er("div","width",n)&&Kn(Y.element,"width",n),er("div","height",e)?Kn(Y.element,"height",e):Kn(Y.element,"height","200px")),e},et=function(){o.setup(t,E.shared,v),T$(t,E),uG(t,C,E),RV(t),iU(t,O,E.shared),bt(BT(t),(function(e,n){t.ui.registry.addGroupToolbarButton(n,e)}));var e=t.ui.registry.getAll(),n=e.buttons,i=e.menuItems,u=e.contextToolbars,a=e.sidebars,c=DT(t),s={menuItems:i,menus:KT(t),menubar:XT(t),toolbar:c.getOrThunk((function(){return YT(t)})),allowToolbarGroups:D===US.floating,buttons:n,sidebar:a};Xq(t,u,x,{backstage:E}),kK(t,x);var l=t.getElement(),f=tt(),d={mothership:J,uiMothership:Q,outerContainer:Y},m={targetNode:l,height:f};return r.render(t,d,s,E,m)};return{mothership:J,uiMothership:Q,backstage:E,renderUI:et,getUi:Z}},BK=function(t,e){var n=L.from(Un(t,"id")).fold((function(){var t=oc("dialog-describe");return Fn(e,"id",t),t}),x);Fn(t,"aria-describedby",n)},LK=function(t,e){var n=jn(t,"id").fold((function(){var t=oc("dialog-label");return Fn(e,"id",t),t}),x);Fn(t,"aria-labelledby",n)},HK=w([Ai("lazySink"),Fi("dragBlockClass"),tu("getBounds",Zr),Ki("useTabstopAt",E),Ki("eventOrder",{}),ep("modalBehaviours",[Aw]),cl("onExecute"),ll("onEscape")]),IK={sketch:x},PK=w([Bp({name:"draghandle",overrides:function(t,e){return{behaviours:mf([bK.config({mode:"mouse",getTarget:function(t){return Ls(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(e,null,2)).message),getBounds:t.getDragBounds})])}}}),Np({schema:[Ai("dom")],name:"title"}),Np({factory:IK,schema:[Ai("dom")],name:"close"}),Np({factory:IK,schema:[Ai("dom")],name:"body"}),Bp({factory:IK,schema:[Ai("dom")],name:"footer"}),zp({factory:{sketch:function(t,e){return A(A({},t),{dom:e.dom,components:e.components})}},schema:[Ki("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Ki("components",[])],name:"blocker"})]),FK=function(t,e,n,r){var o,i=od(),u=function(e){i.set(e);var n=t.lazySink(e).getOrDie(),o=r.blocker(),u=n.getSystem().build(A(A({},o),{components:o.components.concat([_s(e)]),behaviours:mf([Yw.config({}),Vw("dialog-blocker-events",[Va(Iu(),(function(){Aw.focusIn(e)}))])])}));Wg(n,u),Aw.focusIn(e)},a=function(t){i.clear(),vn(t.element).each((function(e){t.getSystem().getByDom(e).each((function(t){Gg(t)}))}))},c=function(e){return Xp(e,t,"body")},s=function(e){return Xp(e,t,"footer")},l=function(t,e){KV.block(t,e)},f=function(t){KV.unblock(t)},d=oc("modal-events"),m=A(A({},t.eventOrder),(o={},o[da()]=[d].concat(t.eventOrder["alloy.system.attached"]||[]),o));return{uid:t.uid,dom:t.dom,components:e,apis:{show:u,hide:a,getBody:c,getFooter:s,setIdle:f,setBusy:l},eventOrder:m,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:rp(t.modalBehaviours,[Pw.config({}),Aw.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt}),KV.config({getRoot:i.get}),Vw(d,[Ua((function(e){LK(e.element,Xp(e,t,"title").element),BK(e.element,Xp(e,t,"body").element)}))])])}},VK=mv({name:"ModalDialog",configFields:HK(),partFields:PK(),factory:FK,apis:{show:function(t,e){t.show(e)},hide:function(t,e){t.hide(e)},getBody:function(t,e){return t.getBody(e)},getFooter:function(t,e){return t.getFooter(e)},setBusy:function(t,e,n){t.setBusy(e,n)},setIdle:function(t,e){t.setIdle(e)}}}),UK=ti([Ri("type"),Ri("name")].concat(Nk)),jK=li,WK=[Oi("name","name",To((function(){return oc("button-name")})),si),ji("icon"),Qi("align","end",["start","end"]),Zi("primary",!1),Zi("disabled",!1)],qK=M(M([],WK,!0),[Ri("text")],!1),$K=M([Ni("type",["submit","cancel","custom"])],qK,!0),GK=M([Ni("type",["menu"]),ji("text"),ji("tooltip"),ji("icon"),Pi("items",UK)],WK,!0),KK=ki("type",{submit:$K,cancel:$K,custom:$K,menu:GK}),XK=[Ri("type"),Ri("text"),Ni("level",["info","warn","error","success"]),Ri("icon"),Ki("url","")],YK=ti(XK),JK=function(t){return[Ri("type"),t]},QK=[Ri("type"),Ri("text"),Zi("disabled",!1),Zi("primary",!1),Oi("name","name",To((function(){return oc("button-name")})),si),ji("icon"),Zi("borderless",!1)],ZK=ti(QK),tX=[Ri("type"),Ri("name"),Ri("label"),Zi("disabled",!1)],eX=ti(tX),nX=li,rX=[Ri("type"),Ri("name")],oX=rX.concat([ji("label")]),iX=oX.concat([Ki("columns","auto")]),uX=ti(iX),aX=ii([Ri("value"),Ri("text"),Ri("icon")]),cX=oX,sX=ti(cX),lX=si,fX=oX,dX=ti(fX),mX=si,gX=rX.concat([Ji("tag","textarea"),Ri("scriptId"),Ri("scriptUrl"),eu("settings",void 0)]),hX=rX.concat([Ji("tag","textarea"),Bi("init")]),pX=vi((function(t){return wi("customeditor.old",Zo(hX),t).orThunk((function(){return wi("customeditor.new",Zo(gX),t)}))})),vX=si,bX=oX,yX=ti(bX),wX=pi(),xX=function(t){return[Ri("type"),Mi("columns"),t]},CX=[Ri("type"),Ri("html"),Qi("presets","presentation",["presentation","document"])],SX=ti(CX),kX=oX.concat([Zi("sandboxed",!0)]),TX=ti(kX),OX=si,EX=oX.concat([Di("currentState",ti([Ai("blob"),Ri("url")]))]),_X=ti(EX),AX=oX.concat([ji("inputMode"),ji("placeholder"),Zi("maximized",!1),Zi("disabled",!1)]),DX=ti(AX),MX=si,RX=function(t){return[Ri("type"),Ri("label"),t]},NX=[Ri("text"),Ri("value")],zX=[Ri("text"),Pi("items",Ti("items",(function(){return BX})))],BX=ni([ti(NX),ti(zX)]),LX=oX.concat([Pi("items",BX),Zi("disabled",!1)]),HX=ti(LX),IX=si,PX=oX.concat([Ii("items",[Ri("text"),Ri("value")]),Yi("size",1),Zi("disabled",!1)]),FX=ti(PX),VX=si,UX=oX.concat([Zi("constrain",!0),Zi("disabled",!1)]),jX=ti(UX),WX=ti([Ri("width"),Ri("height")]),qX=[Ri("type"),Pi("header",si),Pi("cells",ei(si))],$X=ti(qX),GX=oX.concat([ji("placeholder"),Zi("maximized",!1),Zi("disabled",!1)]),KX=ti(GX),XX=si,YX=oX.concat([Qi("filetype","file",["image","media","file"]),Ki("disabled",!1)]),JX=ti(YX),QX=ti([Ri("value"),Ki("meta",{})]),ZX=function(t){return Oi("items","items",ko(),ei(vi((function(e){return wi("Checking item of "+t,tY,e).fold((function(t){return ro.error(Si(t))}),(function(t){return ro.value(t)}))}))))},tY=Jo((function(){return hi("type",{alertbanner:YK,bar:ti(JK(ZX("bar"))),button:ZK,checkbox:eX,colorinput:sX,colorpicker:dX,dropzone:yX,grid:ti(xX(ZX("grid"))),iframe:TX,input:DX,listbox:HX,selectbox:FX,sizeinput:jX,textarea:KX,urlinput:JX,customeditor:pX,htmlpanel:SX,imagetools:_X,collection:uX,label:ti(RX(ZX("label"))),table:$X,panel:nY})})),eY=[Ri("type"),Ki("classes",[]),Pi("items",tY)],nY=ti(eY),rY=[Oi("name","name",To((function(){return oc("tab-name")})),si),Ri("title"),Pi("items",tY)],oY=[Ri("type"),Ii("tabs",rY)],iY=ti(oY),uY=qK,aY=KK,cY=ti([Ri("title"),Di("body",hi("type",{panel:nY,tabpanel:iY})),Ji("size","normal"),Pi("buttons",aY),Ki("initialData",{}),tu("onAction",p),tu("onChange",p),tu("onSubmit",p),tu("onClose",p),tu("onCancel",p),Ki("onTabChange",p)]),sY=function(t){return wi("dialog",cY,t)},lY=ti(M([Ni("type",["cancel","custom"])],uY,!0)),fY=ti([Ri("title"),Ri("url"),Ui("height"),Ui("width"),qi("buttons",lY),tu("onAction",p),tu("onCancel",p),tu("onClose",p),tu("onMessage",p)]),dY=function(t){return wi("dialog",fY,t)},mY=function(t){return u(t)?[t].concat(rt(Tt(t),mY)):a(t)?rt(t,mY):[]},gY=function(t){return i(t.type)&&i(t.name)},hY={checkbox:nX,colorinput:lX,colorpicker:mX,dropzone:wX,input:MX,iframe:OX,sizeinput:WX,selectbox:VX,listbox:IX,size:WX,textarea:XX,urlinput:QX,customeditor:vX,collection:aX,togglemenuitem:jK},pY=function(t){return L.from(hY[t.type])},vY=function(t){return Y(mY(t),gY)},bY=function(t){var e=vY(t),n=rt(e,(function(t){return pY(t).fold((function(){return[]}),(function(e){return[Di(t.name,e)]}))}));return ti(n)},yY=function(t){var e=xi(sY(t)),n=bY(t),r=t.initialData;return{internalDialog:e,dataValidator:n,initialData:r}},wY={open:function(t,e){var n=yY(e);return t(n.internalDialog,n.initialData,n.dataValidator)},openUrl:function(t,e){var n=xi(dY(e));return t(n)},redial:function(t){return yY(t)}},xY=function(t){var e=[],n={};return vt(t,(function(t,r){t.fold((function(){e.push(r)}),(function(t){n[r]=t}))})),e.length>0?ro.error(e):ro.value(n)},CY=function(t,e){var n=kC(NN.sketch((function(n){return{dom:{tag:"div",classes:["tox-form"].concat(t.classes)},components:$(t.items,(function(t){return aI(n,t,e)}))}})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[n.asSpec()]}],behaviours:mf([Aw.config({mode:"acyclic",useTabstopAt:k(vz)}),WN.memento(n),uz.memento(n,{postprocess:function(t){return xY(t).fold((function(t){return console.error(t),{}}),x)}})])}},SY=function(t,e){return{uid:t.uid,dom:t.dom,components:t.components,events:vx(t.action),behaviours:rp(t.tabButtonBehaviours,[Yw.config({}),Aw.config({mode:"execution",useSpace:!0,useEnter:!0}),tp.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}},kY=dv({name:"TabButton",configFields:[Ki("uid",void 0),Ai("value"),Oi("dom","dom",_o((function(){return{attributes:{role:"tab",id:oc("aria"),"aria-selected":"false"}}})),ui()),Fi("action"),Ki("domModification",{}),ep("tabButtonBehaviours",[Yw,Aw,tp]),Ai("view")],factory:SY}),TY=w([Ai("tabs"),Ai("dom"),Ki("clickToDismiss",!1),ep("tabbarBehaviours",[rb,Aw]),il(["tabClass","selectedClass"])]),OY=Lp({factory:kY,name:"tabs",unit:"tab",overrides:function(t){var e=function(t,e){rb.dehighlight(t,e),Sa(t,ya(),{tabbar:t,button:e})},n=function(t,e){rb.highlight(t,e),Sa(t,ba(),{tabbar:t,button:e})};return{action:function(r){var o=r.getSystem().getByUid(t.uid).getOrDie(),i=rb.isHighlighted(o,r),u=function(){return i&&t.clickToDismiss?e:i?p:n}();u(o,r)},domModification:{classes:[t.markers.tabClass]}}}}),EY=w([OY]),_Y=function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:rp(t.tabbarBehaviours,[rb.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,e){Fn(e.element,"aria-selected","true")},onDehighlight:function(t,e){Fn(e.element,"aria-selected","false")}}),Aw.config({mode:"flow",getInitial:function(t){return rb.getHighlighted(t).map((function(t){return t.element}))},selector:"."+t.markers.tabClass,executeOnMove:!0})])}},AY=mv({name:"Tabbar",configFields:TY(),partFields:EY(),factory:_Y}),DY=function(t,e){return{uid:t.uid,dom:t.dom,behaviours:rp(t.tabviewBehaviours,[Pw.config({})]),domModification:{attributes:{role:"tabpanel"}}}},MY=dv({name:"Tabview",configFields:[ep("tabviewBehaviours",[Pw])],factory:DY}),RY=w([Ki("selectFirst",!0),al("onChangeTab"),al("onDismissTab"),Ki("tabs",[]),ep("tabSectionBehaviours",[])]),NY=Np({factory:AY,schema:[Ai("dom"),Hi("markers",[Ai("tabClass"),Ai("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),zY=Np({factory:MY,name:"tabview"}),BY=w([NY,zY]),LY=function(t,e,n,r){var o=function(e){var n=tp.getValue(e);Kp(e,t,"tabview").each((function(r){var o=tt(t.tabs,(function(t){return t.value===n}));o.each((function(n){var o=n.view();jn(e.element,"id").each((function(t){Fn(r.element,"aria-labelledby",t)})),Pw.set(r,o),t.onChangeTab(r,e,o)}))}))},i=function(e,n){Kp(e,t,"tabbar").each((function(t){n(t).each(ka)}))};return{uid:t.uid,dom:t.dom,components:e,behaviours:np(t.tabSectionBehaviours),events:_a(nt([t.selectFirst?[Ua((function(t,e){i(t,rb.getFirst)}))]:[],[Ra(ba(),(function(t,e){var n=e.event.button;o(n)})),Ra(ya(),(function(e,n){var r=n.event.button;t.onDismissTab(e,r)}))]])),apis:{getViewItems:function(e){return Kp(e,t,"tabview").map((function(t){return Pw.contents(t)})).getOr([])},showTab:function(t,e){var n=function(t){var n=rb.getCandidates(t),r=tt(n,(function(t){return tp.getValue(t)===e}));return r.filter((function(e){return!rb.isHighlighted(t,e)}))};i(t,n)}}}},HY=mv({name:"TabSection",configFields:RY(),partFields:BY(),factory:LY,apis:{getViewItems:function(t,e){return t.getViewItems(e)},showTab:function(t,e,n){t.showTab(e,n)}}}),IY=function(t,e,n){return $(t,(function(r,o){Pw.set(n,t[o].view());var i=e.dom.getBoundingClientRect();return Pw.set(n,[]),i.height}))},PY=function(t){return ft(st(t,(function(t,e){return t>e?-1:t<e?1:0})))},FY=function(t,e,n){var r,o=hn(t).dom,i=Ls(t,".tox-dialog-wrap").getOr(t),u="fixed"===Jn(i,"position");r=u?Math.max(o.clientHeight,window.innerHeight):Math.max(o.offsetHeight,o.scrollHeight);var a=ur(e),c=e.dom.offsetLeft>=n.dom.offsetLeft+vr(n),s=c?Math.max(ur(n),a):a,l=parseInt(Jn(t,"margin-top"),10)||0,f=parseInt(Jn(t,"margin-bottom"),10)||0,d=ur(t)+l+f,m=d-s;return r-m},VY=function(t,e){ft(t).each((function(t){return HY.showTab(e,t.value)}))},UY=function(t,e){Kn(t,"height",e+"px"),en().browser.isIE()?nr(t,"flex-basis"):Kn(t,"flex-basis",e+"px")},jY=function(t,e,n){Ls(t,'[role="dialog"]').each((function(t){Is(t,'[role="tablist"]').each((function(r){n.get().map((function(n){return Kn(e,"height","0"),Kn(e,"flex-basis","0"),Math.min(n,FY(t,e,r))})).each((function(t){UY(e,t)}))}))}))},WY=function(t){return Is(t,'[role="tabpanel"]')},qY=function(t){var e=function(){var e=od(),n=[Ua((function(n){var r=n.element;WY(r).each((function(o){Kn(o,"visibility","hidden"),n.getSystem().getByDom(o).toOptional().each((function(n){var r=IY(t,o,n),i=PY(r);i.fold(e.clear,e.set)})),jY(r,o,e),nr(o,"visibility"),VY(t,n),xC.requestAnimationFrame((function(){jY(r,o,e)}))}))})),Ra(fa(),(function(t){var n=t.element;WY(n).each((function(t){jY(n,t,e)}))})),Ra(BA,(function(t,n){var r=t.element;WY(r).each((function(t){var n=Of(An(t));Kn(t,"visibility","hidden");var o=Zn(t,"height").map((function(t){return parseInt(t,10)}));nr(t,"height"),nr(t,"flex-basis");var i=t.dom.getBoundingClientRect().height,u=o.forall((function(t){return i>t}));u?(e.set(i),jY(r,t,e)):o.each((function(e){UY(t,e)})),nr(t,"visibility"),n.each(Sf)}))}))],r=!1;return{extraEvents:n,selectFirst:r}}(),n=function(){var t=[],e=!0;return{extraEvents:t,selectFirst:e}}();return{smartTabHeight:e,naiveTabHeight:n}},$Y="send-data-to-section",GY="send-data-to-view",KY=function(t,e){var n=ou({}),r=function(t){var e=tp.getValue(t),r=xY(e).getOr({}),o=n.get(),i=Co(o,r);n.set(i)},o=function(t){var e=n.get();tp.setValue(t,e)},i=ou(null),u=$(t.tabs,(function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:e.shared.providers.translate(t.title)},view:function(){return[NN.sketch((function(n){return{dom:{tag:"div",classes:["tox-form"]},components:$(t.items,(function(t){return aI(n,t,e)})),formBehaviours:mf([Aw.config({mode:"acyclic",useTabstopAt:k(vz)}),Vw("TabView.form.events",[Ua(o),ja(r)]),yf.config({channels:gu([{key:$Y,value:{onReceive:r}},{key:GY,value:{onReceive:o}}])})])}}))]}}})),a=qY(u).smartTabHeight;return HY.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,e,n){var r=tp.getValue(e);Sa(t,zA,{name:r,oldName:i.get()}),i.set(r)},tabs:u,components:[HY.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[AY.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:mf([yA.config({})])}),HY.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:a.selectFirst,tabSectionBehaviours:mf([Vw("tabpanel",a.extraEvents),Aw.config({mode:"acyclic"}),bv.config({find:function(t){return ft(HY.getViewItems(t))}}),tp.config({store:{mode:"manual",getValue:function(t){return t.getSystem().broadcastOn([$Y],{}),n.get()},setValue:function(t,e){n.set(e),t.getSystem().broadcastOn([GY],{})}}})])})},XY=oc("update-dialog"),YY=oc("update-title"),JY=oc("update-body"),QY=oc("update-footer"),ZY=oc("body-send-message"),tJ=function(t,e,n,r){var o=function(t){switch(t.body.type){case"tabpanel":return[KY(t.body,n)];default:return[CY(t.body,n)]}},i=function(t,e){return L.some({isTabPanel:function(){return"tabpanel"===e.body.type}})},u={"aria-live":"polite"};return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:A(A({},e.map((function(t){return{id:t}})).getOr({})),r?u:{})},components:[],behaviours:mf([WN.childAt(0),gW.config({channel:JY,updateState:i,renderComponents:o,initialData:t})])}},eJ=function(t,e,n,r){return tJ(t,L.some(e),n,r)},nJ=function(t,e){var n=tJ(t,L.none(),e,!1);return VK.parts.body(n)},rJ=function(t){var e={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[gz({dom:{tag:"iframe",attributes:{src:t.url}},behaviours:mf([yA.config({}),Yw.config({})])})]}],behaviours:mf([Aw.config({mode:"acyclic",useTabstopAt:k(vz)})])};return VK.parts.body(e)};function oJ(t){return oJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oJ(t)}function iJ(t,e){return iJ=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},iJ(t,e)}function uJ(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function aJ(t,e,n){return aJ=uJ()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=Function.bind.apply(t,r),i=new o;return n&&iJ(i,n.prototype),i},aJ.apply(null,arguments)}function cJ(t){return sJ(t)||lJ(t)||fJ(t)||mJ()}function sJ(t){if(Array.isArray(t))return dJ(t)}function lJ(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function fJ(t,e){if(t){if("string"===typeof t)return dJ(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dJ(t,e):void 0}}function dJ(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function mJ(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var gJ=Object.hasOwnProperty,hJ=Object.setPrototypeOf,pJ=Object.isFrozen,vJ=Object.getPrototypeOf,bJ=Object.getOwnPropertyDescriptor,yJ=Object.freeze,wJ=Object.seal,xJ=Object.create,CJ="undefined"!==typeof Reflect&&Reflect,SJ=CJ.apply,kJ=CJ.construct;SJ||(SJ=function(t,e,n){return t.apply(e,n)}),yJ||(yJ=function(t){return t}),wJ||(wJ=function(t){return t}),kJ||(kJ=function(t,e){return aJ(t,cJ(e))});var TJ=BJ(Array.prototype.forEach),OJ=BJ(Array.prototype.pop),EJ=BJ(Array.prototype.push),_J=BJ(String.prototype.toLowerCase),AJ=BJ(String.prototype.match),DJ=BJ(String.prototype.replace),MJ=BJ(String.prototype.indexOf),RJ=BJ(String.prototype.trim),NJ=BJ(RegExp.prototype.test),zJ=LJ(TypeError);function BJ(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return SJ(t,e,r)}}function LJ(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return kJ(t,n)}}function HJ(t,e){hJ&&hJ(t,null);var n=e.length;while(n--){var r=e[n];if("string"===typeof r){var o=_J(r);o!==r&&(pJ(e)||(e[n]=o),r=o)}t[r]=!0}return t}function IJ(t){var e,n=xJ(null);for(e in t)SJ(gJ,t,[e])&&(n[e]=t[e]);return n}function PJ(t,e){while(null!==t){var n=bJ(t,e);if(n){if(n.get)return BJ(n.get);if("function"===typeof n.value)return BJ(n.value)}t=vJ(t)}function r(t){return console.warn("fallback value for",t),null}return r}var FJ=yJ(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),VJ=yJ(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),UJ=yJ(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),jJ=yJ(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),WJ=yJ(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),qJ=yJ(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$J=yJ(["#text"]),GJ=yJ(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),KJ=yJ(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),XJ=yJ(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),YJ=yJ(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),JJ=wJ(/\{\{[\w\W]*|[\w\W]*\}\}/gm),QJ=wJ(/<%[\w\W]*|[\w\W]*%>/gm),ZJ=wJ(/^data-[\-\w.\u00B7-\uFFFF]/),tQ=wJ(/^aria-[\-\w]+$/),eQ=wJ(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nQ=wJ(/^(?:\w+script|data):/i),rQ=wJ(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),oQ=wJ(/^html$/i),iQ=function(){return"undefined"===typeof window?null:window},uQ=function(t,e){if("object"!==oJ(t)||"function"!==typeof t.createPolicy)return null;var n=null,r="data-tt-policy-suffix";e.currentScript&&e.currentScript.hasAttribute(r)&&(n=e.currentScript.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:function(t){return t}})}catch(i){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function aQ(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:iQ(),e=function(t){return aQ(t)};if(e.version="2.3.8",e.removed=[],!t||!t.document||9!==t.document.nodeType)return e.isSupported=!1,e;var n=t.document,r=t.document,o=t.DocumentFragment,i=t.HTMLTemplateElement,u=t.Node,a=t.Element,c=t.NodeFilter,s=t.NamedNodeMap,l=void 0===s?t.NamedNodeMap||t.MozNamedAttrMap:s,f=t.HTMLFormElement,d=t.DOMParser,m=t.trustedTypes,g=a.prototype,h=PJ(g,"cloneNode"),p=PJ(g,"nextSibling"),v=PJ(g,"childNodes"),b=PJ(g,"parentNode");if("function"===typeof i){var y=r.createElement("template");y.content&&y.content.ownerDocument&&(r=y.content.ownerDocument)}var w=uQ(m,n),x=w?w.createHTML(""):"",C=r,S=C.implementation,k=C.createNodeIterator,T=C.createDocumentFragment,O=C.getElementsByTagName,E=n.importNode,_={};try{_=IJ(r).documentMode?r.documentMode:{}}catch(Vt){}var A={};e.isSupported="function"===typeof b&&S&&"undefined"!==typeof S.createHTMLDocument&&9!==_;var D,M,R=JJ,N=QJ,z=ZJ,B=tQ,L=nQ,H=rQ,I=eQ,P=null,F=HJ({},[].concat(cJ(FJ),cJ(VJ),cJ(UJ),cJ(WJ),cJ($J))),V=null,U=HJ({},[].concat(cJ(GJ),cJ(KJ),cJ(XJ),cJ(YJ))),j=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,q=null,$=!0,G=!0,K=!1,X=!1,Y=!1,J=!1,Q=!1,Z=!1,tt=!1,et=!1,nt=!0,rt=!0,ot=!1,it={},ut=null,at=HJ({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ct=null,st=HJ({},["audio","video","img","source","image","track"]),lt=null,ft=HJ({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dt="http://www.w3.org/1998/Math/MathML",mt="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml",ht=gt,pt=!1,vt=["application/xhtml+xml","text/html"],bt="text/html",yt=null,wt=r.createElement("form"),xt=function(t){return t instanceof RegExp||t instanceof Function},Ct=function(t){yt&&yt===t||(t&&"object"===oJ(t)||(t={}),t=IJ(t),P="ALLOWED_TAGS"in t?HJ({},t.ALLOWED_TAGS):F,V="ALLOWED_ATTR"in t?HJ({},t.ALLOWED_ATTR):U,lt="ADD_URI_SAFE_ATTR"in t?HJ(IJ(ft),t.ADD_URI_SAFE_ATTR):ft,ct="ADD_DATA_URI_TAGS"in t?HJ(IJ(st),t.ADD_DATA_URI_TAGS):st,ut="FORBID_CONTENTS"in t?HJ({},t.FORBID_CONTENTS):at,W="FORBID_TAGS"in t?HJ({},t.FORBID_TAGS):{},q="FORBID_ATTR"in t?HJ({},t.FORBID_ATTR):{},it="USE_PROFILES"in t&&t.USE_PROFILES,$=!1!==t.ALLOW_ARIA_ATTR,G=!1!==t.ALLOW_DATA_ATTR,K=t.ALLOW_UNKNOWN_PROTOCOLS||!1,X=t.SAFE_FOR_TEMPLATES||!1,Y=t.WHOLE_DOCUMENT||!1,Z=t.RETURN_DOM||!1,tt=t.RETURN_DOM_FRAGMENT||!1,et=t.RETURN_TRUSTED_TYPE||!1,Q=t.FORCE_BODY||!1,nt=!1!==t.SANITIZE_DOM,rt=!1!==t.KEEP_CONTENT,ot=t.IN_PLACE||!1,I=t.ALLOWED_URI_REGEXP||I,ht=t.NAMESPACE||gt,t.CUSTOM_ELEMENT_HANDLING&&xt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&xt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(j.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),D=D=-1===vt.indexOf(t.PARSER_MEDIA_TYPE)?bt:t.PARSER_MEDIA_TYPE,M="application/xhtml+xml"===D?function(t){return t}:_J,X&&(G=!1),tt&&(Z=!0),it&&(P=HJ({},cJ($J)),V=[],!0===it.html&&(HJ(P,FJ),HJ(V,GJ)),!0===it.svg&&(HJ(P,VJ),HJ(V,KJ),HJ(V,YJ)),!0===it.svgFilters&&(HJ(P,UJ),HJ(V,KJ),HJ(V,YJ)),!0===it.mathMl&&(HJ(P,WJ),HJ(V,XJ),HJ(V,YJ))),t.ADD_TAGS&&(P===F&&(P=IJ(P)),HJ(P,t.ADD_TAGS)),t.ADD_ATTR&&(V===U&&(V=IJ(V)),HJ(V,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&HJ(lt,t.ADD_URI_SAFE_ATTR),t.FORBID_CONTENTS&&(ut===at&&(ut=IJ(ut)),HJ(ut,t.FORBID_CONTENTS)),rt&&(P["#text"]=!0),Y&&HJ(P,["html","head","body"]),P.table&&(HJ(P,["tbody"]),delete W.tbody),yJ&&yJ(t),yt=t)},St=HJ({},["mi","mo","mn","ms","mtext"]),kt=HJ({},["foreignobject","desc","title","annotation-xml"]),Tt=HJ({},["title","style","font","a","script"]),Ot=HJ({},VJ);HJ(Ot,UJ),HJ(Ot,jJ);var Et=HJ({},WJ);HJ(Et,qJ);var _t=function(t){var e=b(t);e&&e.tagName||(e={namespaceURI:gt,tagName:"template"});var n=_J(t.tagName),r=_J(e.tagName);return t.namespaceURI===mt?e.namespaceURI===gt?"svg"===n:e.namespaceURI===dt?"svg"===n&&("annotation-xml"===r||St[r]):Boolean(Ot[n]):t.namespaceURI===dt?e.namespaceURI===gt?"math"===n:e.namespaceURI===mt?"math"===n&&kt[r]:Boolean(Et[n]):t.namespaceURI===gt&&(!(e.namespaceURI===mt&&!kt[r])&&(!(e.namespaceURI===dt&&!St[r])&&(!Et[n]&&(Tt[n]||!Ot[n]))))},At=function(t){EJ(e.removed,{element:t});try{t.parentNode.removeChild(t)}catch(Vt){try{t.outerHTML=x}catch(Vt){t.remove()}}},Dt=function(t,n){try{EJ(e.removed,{attribute:n.getAttributeNode(t),from:n})}catch(Vt){EJ(e.removed,{attribute:null,from:n})}if(n.removeAttribute(t),"is"===t&&!V[t])if(Z||tt)try{At(n)}catch(Vt){}else try{n.setAttribute(t,"")}catch(Vt){}},Mt=function(t){var e,n;if(Q)t="<remove></remove>"+t;else{var o=AJ(t,/^[\r\n\t ]+/);n=o&&o[0]}"application/xhtml+xml"===D&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var i=w?w.createHTML(t):t;if(ht===gt)try{e=(new d).parseFromString(i,D)}catch(Vt){}if(!e||!e.documentElement){e=S.createDocument(ht,"template",null);try{e.documentElement.innerHTML=pt?"":i}catch(Vt){}}var u=e.body||e.documentElement;return t&&n&&u.insertBefore(r.createTextNode(n),u.childNodes[0]||null),ht===gt?O.call(e,Y?"html":"body")[0]:Y?e.documentElement:u},Rt=function(t){return k.call(t.ownerDocument||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Nt=function(t){return t instanceof f&&("string"!==typeof t.nodeName||"string"!==typeof t.textContent||"function"!==typeof t.removeChild||!(t.attributes instanceof l)||"function"!==typeof t.removeAttribute||"function"!==typeof t.setAttribute||"string"!==typeof t.namespaceURI||"function"!==typeof t.insertBefore)},zt=function(t){return"object"===oJ(u)?t instanceof u:t&&"object"===oJ(t)&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName},Bt=function(t,n,r){A[t]&&TJ(A[t],(function(t){t.call(e,n,r,yt)}))},Lt=function(t){var n;if(Bt("beforeSanitizeElements",t,null),Nt(t))return At(t),!0;if(NJ(/[\u0080-\uFFFF]/,t.nodeName))return At(t),!0;var r=M(t.nodeName);if(Bt("uponSanitizeElement",t,{tagName:r,allowedTags:P}),t.hasChildNodes()&&!zt(t.firstElementChild)&&(!zt(t.content)||!zt(t.content.firstElementChild))&&NJ(/<[/\w]/g,t.innerHTML)&&NJ(/<[/\w]/g,t.textContent))return At(t),!0;if("select"===r&&NJ(/<template/i,t.innerHTML))return At(t),!0;if(!P[r]||W[r]){if(!W[r]&&It(r)){if(j.tagNameCheck instanceof RegExp&&NJ(j.tagNameCheck,r))return!1;if(j.tagNameCheck instanceof Function&&j.tagNameCheck(r))return!1}if(rt&&!ut[r]){var o=b(t)||t.parentNode,i=v(t)||t.childNodes;if(i&&o)for(var u=i.length,c=u-1;c>=0;--c)o.insertBefore(h(i[c],!0),p(t))}return At(t),!0}return t instanceof a&&!_t(t)?(At(t),!0):"noscript"!==r&&"noembed"!==r||!NJ(/<\/no(script|embed)/i,t.innerHTML)?(X&&3===t.nodeType&&(n=t.textContent,n=DJ(n,R," "),n=DJ(n,N," "),t.textContent!==n&&(EJ(e.removed,{element:t.cloneNode()}),t.textContent=n)),Bt("afterSanitizeElements",t,null),!1):(At(t),!0)},Ht=function(t,e,n){if(nt&&("id"===e||"name"===e)&&(n in r||n in wt))return!1;if(G&&!q[e]&&NJ(z,e));else if($&&NJ(B,e));else if(!V[e]||q[e]){if(!(It(t)&&(j.tagNameCheck instanceof RegExp&&NJ(j.tagNameCheck,t)||j.tagNameCheck instanceof Function&&j.tagNameCheck(t))&&(j.attributeNameCheck instanceof RegExp&&NJ(j.attributeNameCheck,e)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(e))||"is"===e&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&NJ(j.tagNameCheck,n)||j.tagNameCheck instanceof Function&&j.tagNameCheck(n))))return!1}else if(lt[e]);else if(NJ(I,DJ(n,H,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==MJ(n,"data:")||!ct[t]){if(K&&!NJ(L,DJ(n,H,"")));else if(n)return!1}else;return!0},It=function(t){return t.indexOf("-")>0},Pt=function(t){var n,r,o,i;Bt("beforeSanitizeAttributes",t,null);var u=t.attributes;if(u){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V};i=u.length;while(i--){n=u[i];var c=n,s=c.name,l=c.namespaceURI;if(r="value"===s?n.value:RJ(n.value),o=M(s),a.attrName=o,a.attrValue=r,a.keepAttr=!0,a.forceKeepAttr=void 0,Bt("uponSanitizeAttribute",t,a),r=a.attrValue,!a.forceKeepAttr&&(Dt(s,t),a.keepAttr))if(NJ(/\/>/i,r))Dt(s,t);else{X&&(r=DJ(r,R," "),r=DJ(r,N," "));var f=M(t.nodeName);if(Ht(f,o,r))try{l?t.setAttributeNS(l,s,r):t.setAttribute(s,r),OJ(e.removed)}catch(Vt){}}}Bt("afterSanitizeAttributes",t,null)}},Ft=function t(e){var n,r=Rt(e);Bt("beforeSanitizeShadowDOM",e,null);while(n=r.nextNode())Bt("uponSanitizeShadowNode",n,null),Lt(n)||(n.content instanceof o&&t(n.content),Pt(n));Bt("afterSanitizeShadowDOM",e,null)};return e.sanitize=function(r,i){var a,c,s,l,f;if(pt=!r,pt&&(r="\x3c!--\x3e"),"string"!==typeof r&&!zt(r)){if("function"!==typeof r.toString)throw zJ("toString is not a function");if(r=r.toString(),"string"!==typeof r)throw zJ("dirty is not a string, aborting")}if(!e.isSupported){if("object"===oJ(t.toStaticHTML)||"function"===typeof t.toStaticHTML){if("string"===typeof r)return t.toStaticHTML(r);if(zt(r))return t.toStaticHTML(r.outerHTML)}return r}if(J||Ct(i),e.removed=[],"string"===typeof r&&(ot=!1),ot){if(r.nodeName){var d=M(r.nodeName);if(!P[d]||W[d])throw zJ("root node is forbidden and cannot be sanitized in-place")}}else if(r instanceof u)a=Mt("\x3c!----\x3e"),c=a.ownerDocument.importNode(r,!0),1===c.nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?a=c:a.appendChild(c);else{if(!Z&&!X&&!Y&&-1===r.indexOf("<"))return w&&et?w.createHTML(r):r;if(a=Mt(r),!a)return Z?null:et?x:""}a&&Q&&At(a.firstChild);var m=Rt(ot?r:a);while(s=m.nextNode())3===s.nodeType&&s===l||Lt(s)||(s.content instanceof o&&Ft(s.content),Pt(s),l=s);if(l=null,ot)return r;if(Z){if(tt){f=T.call(a.ownerDocument);while(a.firstChild)f.appendChild(a.firstChild)}else f=a;return V.shadowroot&&(f=E.call(n,f,!0)),f}var g=Y?a.outerHTML:a.innerHTML;return Y&&P["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&NJ(oQ,a.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+g),X&&(g=DJ(g,R," "),g=DJ(g,N," ")),w&&et?w.createHTML(g):g},e.setConfig=function(t){Ct(t),J=!0},e.clearConfig=function(){yt=null,J=!1},e.isValidAttribute=function(t,e,n){yt||Ct({});var r=M(t),o=M(e);return Ht(r,o,n)},e.addHook=function(t,e){"function"===typeof e&&(A[t]=A[t]||[],EJ(A[t],e))},e.removeHook=function(t){if(A[t])return OJ(A[t])},e.removeHooks=function(t){A[t]&&(A[t]=[])},e.removeAllHooks=function(){A={}},e}var cQ=aQ(),sQ=function(t){return cQ().sanitize(t)},lQ=CO.deviceType.isTouch(),fQ=function(t,e){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,e]}},dQ=function(t,e){return VK.parts.close(SC.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close")}},action:t,buttonBehaviours:mf([yA.config({})])}))},mQ=function(){return VK.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},gQ=function(t,e){return VK.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:JV("<p>"+sQ(e.translate(t))+"</p>")}]}]})},hQ=function(t){return VK.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},pQ=function(t,e){return[sA.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),sA.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:e})]},vQ=function(t){var e,n="tox-dialog",r=n+"-wrap",o=r+"__backdrop",i=n+"__disable-scroll";return VK.sketch({lazySink:t.lazySink,onEscape:function(e){return t.onEscape(e),L.some(!0)},useTabstopAt:function(t){return!vz(t)},dom:{tag:"div",classes:[n].concat(t.extraClasses),styles:A({position:"relative"},t.extraStyles)},components:M([t.header,t.body],t.footer.toArray(),!0),parts:{blocker:{dom:JV('<div class="'+r+'"></div>'),components:[{dom:{tag:"div",classes:lQ?[o,o+"--opaque"]:[o]}}]}},dragBlockClass:r,modalBehaviours:mf(M([Yw.config({}),Vw("dialog-events",t.dialogEvents.concat([Va(Iu(),(function(t,e){Aw.focusIn(t)}))])),Vw("scroll-lock",[Ua((function(){is(Hn(),i)})),ja((function(){as(Hn(),i)}))])],t.extraBehaviours,!0)),eventOrder:A((e={},e[ea()]=["dialog-events"],e[da()]=["scroll-lock","dialog-events","alloy.base.behaviour"],e[ma()]=["alloy.base.behaviour","dialog-events","scroll-lock"],e),t.eventOrder)})},bQ=function(t){return SC.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[LC("close",{tag:"div",classes:["tox-icon"]},t.icons)],action:function(t){Ca(t,AA)}})},yQ=function(t,e,n){var r=function(t){return[Ss(n.translate(t.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:A({},e.map((function(t){return{id:t}})).getOr({}))},components:r(t),behaviours:mf([gW.config({channel:YY,renderComponents:r})])}},wQ=function(){return{dom:JV('<div class="tox-dialog__draghandle"></div>')}},xQ=function(t,e,n){return sA.sketch({dom:JV('<div class="tox-dialog__header"></div>'),components:[yQ(t,L.some(e),n),wQ(),bQ(n)],containerBehaviours:mf([bK.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Ps(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])})},CQ=function(t,e){var n=VK.parts.title(yQ(t,L.none(),e)),r=VK.parts.draghandle(wQ()),o=VK.parts.close(bQ(e)),i=[n].concat(t.draggable?[r]:[]).concat([o]);return sA.sketch({dom:JV('<div class="tox-dialog__header"></div>'),components:i})},SQ=function(t,e){return CQ({title:e.shared.providers.translate(t),draggable:e.dialog.isDraggableModal()},e.shared.providers)},kQ=function(t,e,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":n.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:e,components:[{dom:JV('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}},TQ=function(t,e,n){return{onClose:function(){return n.closeWindow()},onBlock:function(n){VK.setBusy(t(),(function(t,r){return kQ(n.message,r,e)}))},onUnblock:function(){VK.setIdle(t())}}},OQ=function(t,e,n,r){var o,i=function(t,e){return L.some(e)};return Es(vQ(A(A({},t),{lazySink:r.shared.getSink,extraBehaviours:M([gW.config({channel:XY,updateState:i,initialData:e}),uz.memory({})],t.extraBehaviours,!0),onEscape:function(t){Ca(t,AA)},dialogEvents:n,eventOrder:(o={},o[ta()]=[gW.name(),yf.name()],o[da()]=["scroll-lock",gW.name(),"messages","dialog-events","alloy.base.behaviour"],o[ma()]=["alloy.base.behaviour","dialog-events","messages",gW.name(),"scroll-lock"],o)})))},EQ=function(t){var e=function(t){var e=$(t.items,(function(t){var e=ou(!1);return A(A({},t),{storage:e})}));return A(A({},t),{items:e})};return $(t,(function(t){return"menu"===t.type?e(t):t}))},_Q=function(t){return Q(t,(function(t,e){if("menu"===e.type){var n=e;return Q(n.items,(function(t,e){return t[e.name]=e.storage,t}),t)}return t}),{})},AQ=function(t,e){return[Ia(Iu(),pz),t(_A,(function(t,n){e.onClose(),n.onClose()})),t(AA,(function(t,e,n,r){e.onCancel(t),Ca(r,_A)})),Ra(NA,(function(t,n){return e.onUnblock()})),Ra(RA,(function(t,n){return e.onBlock(n.event)}))]},DQ=function(t,e){var n=function(e,n){return Ra(e,(function(e,o){r(e,(function(r,i){n(t(),r,o.event,e)}))}))},r=function(t,e){gW.getState(t).get().each((function(n){e(n,t)}))};return M(M([],AQ(n,e),!0),[n(DA,(function(t,e,n){e.onAction(t,{name:n.name})}))],!1)},MQ=function(t,e,n){var r=function(e,n){return Ra(e,(function(e,r){o(e,(function(o,i){n(t(),o,r.event,e)}))}))},o=function(t,e){gW.getState(t).get().each((function(n){e(n.internalDialog,t)}))};return M(M([],AQ(r,e),!0),[r(MA,(function(t,e){return e.onSubmit(t)})),r(EA,(function(t,e,n){e.onChange(t,{name:n.name})})),r(DA,(function(t,e,r,o){var i=function(){return Aw.focusIn(o)},u=function(t){return Wn(t,"disabled")||jn(t,"aria-disabled").exists((function(t){return"true"===t}))},a=An(o.element),c=Of(a);e.onAction(t,{name:r.name,value:r.value}),Of(a).fold(i,(function(t){u(t)||c.exists((function(e){return dn(t,e)&&u(e)}))?i():n().toOptional().filter((function(e){return!dn(e.element,t)})).each(i)}))})),r(zA,(function(t,e,n){e.onTabChange(t,{newTabName:n.name,oldTabName:n.oldName})})),ja((function(e){var n=t();tp.setValue(e,n.getData())}))],!1)},RQ={initUrlDialog:DQ,initDialog:MQ},NQ=function(t,e){return rL(t,t.type,e)},zQ=function(t,e,n){return tt(e,(function(t){return t.name===n})).bind((function(e){return e.memento.getOpt(t)}))},BQ=function(t,e){var n=e.map((function(t){return t.footerButtons})).getOr([]),r=X(n,(function(t){return"start"===t.align})),o=function(t,e){return sA.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:$(e,(function(t){return t.memento.asSpec()}))})},i=o("start",r.pass),u=o("end",r.fail);return[i,u]},LQ=function(t,e){var n=function(t,n){var r=$(n.buttons,(function(t){var n=kC(NQ(t,e));return{name:t.name,align:t.align,memento:n}})),o=function(t,e){return zQ(t,r,e)};return L.some({lookupByName:o,footerButtons:r})};return{dom:JV('<div class="tox-dialog__footer"></div>'),components:[],behaviours:mf([gW.config({channel:QY,initialData:t,updateState:n,renderComponents:BQ})])}},HQ=function(t,e){return LQ(t,e)},IQ=function(t,e){return VK.parts.footer(LQ(t,e))},PQ=function(t,e){var n=t.getRoot();if(n.getSystem().isConnected()){var r=bv.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return NN.getField(r,e).fold((function(){var n=t.getFooter(),o=gW.getState(n);return o.get().bind((function(t){return t.lookupByName(r,e)}))}),(function(t){return L.some(t)}))}return L.none()},FQ=function(t,e){var n=t.getRoot();return gW.getState(n).get().map((function(t){return xi(wi("data",t.dataValidator,e))})).getOr(e)},VQ=function(t,e,n){var r=function(e){var n=t.getRoot();n.getSystem().isConnected()&&e(n)},o=function(){var e=t.getRoot(),r=e.getSystem().isConnected()?t.getFormWrapper():e,o=tp.getValue(r),i=bt(n,(function(t){return t.get()}));return A(A({},o),i)},u=function(e){r((function(r){var o=h.getData(),i=A(A({},o),e),u=FQ(t,i),a=t.getFormWrapper();tp.setValue(a,u),vt(n,(function(t,e){Et(i,e)&&t.set(i[e])}))}))},a=function(e){PQ(t,e).each(Hv.disable)},c=function(e){PQ(t,e).each(Hv.enable)},s=function(e){PQ(t,e).each(Yw.focus)},l=function(t){if(!i(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");r((function(e){Sa(e,RA,{message:t})}))},f=function(){r((function(t){Ca(t,NA)}))},d=function(e){r((function(n){var r=t.getBody(),o=gW.getState(r);o.get().exists((function(t){return t.isTabPanel()}))&&bv.getCurrent(r).each((function(t){HY.showTab(t,e)}))}))},m=function(t){r((function(n){var r=e(t);n.getSystem().broadcastOn([XY],r),n.getSystem().broadcastOn([YY],r.internalDialog),n.getSystem().broadcastOn([JY],r.internalDialog),n.getSystem().broadcastOn([QY],r.internalDialog),h.setData(r.initialData)}))},g=function(){r((function(t){Ca(t,_A)}))},h={getData:o,setData:u,disable:a,enable:c,focus:s,block:l,unblock:f,showTab:d,redial:m,close:g};return h},UQ=function(t){switch(t){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}},jQ=function(t,e,n){var r=SQ(t.internalDialog.title,n),o=nJ({body:t.internalDialog.body},n),i=EQ(t.internalDialog.buttons),u=_Q(i),a=IQ({buttons:i},n),c=RQ.initDialog((function(){return m}),TQ((function(){return f}),n.shared.providers,e),n.shared.getSink),s=UQ(t.internalDialog.size),l={header:r,body:o,footer:L.some(a),extraClasses:s,extraBehaviours:[],extraStyles:{}},f=OQ(l,t,c,n),d=function(){var t=function(){var t=VK.getBody(f);return bv.getCurrent(t).getOr(t)};return{getRoot:w(f),getBody:function(){return VK.getBody(f)},getFooter:function(){return VK.getFooter(f)},getFormWrapper:t}}(),m=VQ(d,e.redial,u);return{dialog:f,instanceApi:m}},WQ=function(t,e,n,r){var o,i,u=oc("dialog-label"),a=oc("dialog-content"),c=function(t,e){return L.some(e)},s=kC(xQ({title:t.internalDialog.title,draggable:!0},u,n.shared.providers)),l=kC(eJ({body:t.internalDialog.body},a,n,r)),f=EQ(t.internalDialog.buttons),d=_Q(f),m=kC(HQ({buttons:f},n)),g=RQ.initDialog((function(){return p}),{onBlock:function(t){KV.block(h,(function(e,r){return kQ(t.message,r,n.shared.providers)}))},onUnblock:function(){KV.unblock(h)},onClose:function(){return e.closeWindow()}},n.shared.getSink),h=Es({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(o={role:"dialog"},o["aria-labelledby"]=u,o["aria-describedby"]=a,o)},eventOrder:(i={},i[ta()]=[gW.name(),yf.name()],i[ea()]=["execute-on-form"],i[da()]=["reflecting","execute-on-form"],i),behaviours:mf([Aw.config({mode:"cyclic",onEscape:function(t){return Ca(t,_A),L.some(!0)},useTabstopAt:function(t){return!vz(t)&&("button"!==ae(t)||"disabled"!==Un(t,"disabled"))}}),gW.config({channel:XY,updateState:c,initialData:t}),Yw.config({}),Vw("execute-on-form",g.concat([Va(Iu(),(function(t,e){Aw.focusIn(t)}))])),KV.config({getRoot:function(){return L.some(h)}}),Pw.config({}),uz.memory({})]),components:[s.asSpec(),l.asSpec(),m.asSpec()]}),p=VQ({getRoot:w(h),getFooter:function(){return m.get(h)},getBody:function(){return l.get(h)},getFormWrapper:function(){var t=l.get(h);return bv.getCurrent(t).getOr(t)}},e.redial,d);return{dialog:h,instanceApi:p}},qQ=tinymce.util.Tools.resolve("tinymce.util.URI"),$Q=function(t){var e=function(e){t.getSystem().isConnected()&&e(t)},n=function(t){if(!i(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");e((function(e){Sa(e,RA,{message:t})}))},r=function(){e((function(t){Ca(t,NA)}))},o=function(){e((function(t){Ca(t,_A)}))},u=function(t){e((function(e){e.getSystem().broadcastOn([ZY],t)}))};return{block:n,unblock:r,close:o,sendMessage:u}},GQ=["insertContent","setContent","execCommand","close","block","unblock"],KQ=function(t){return u(t)&&-1!==GQ.indexOf(t.mceAction)},XQ=function(t){return!KQ(t)&&u(t)&&Et(t,"mceAction")},YQ=function(t,e,n){switch(n.mceAction){case"insertContent":t.insertContent(n.content);break;case"setContent":t.setContent(n.content);break;case"execCommand":var r=!!s(n.ui)&&n.ui;t.execCommand(n.cmd,r,n.value);break;case"close":e.close();break;case"block":e.block(n.message);break;case"unblock":e.unblock();break}},JQ=function(t,e,n,r){var o,i=SQ(t.title,r),u=rJ(t),a=t.buttons.bind((function(t){return 0===t.length?L.none():L.some(IQ({buttons:t},r))})),c=RQ.initUrlDialog((function(){return v}),TQ((function(){return p}),r.shared.providers,e)),s=A(A({},t.height.fold((function(){return{}}),(function(t){return{height:t+"px","max-height":t+"px"}}))),t.width.fold((function(){return{}}),(function(t){return{width:t+"px","max-width":t+"px"}}))),l=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],f=new qQ(t.url,{base_uri:new qQ(window.location.href)}),d=f.protocol+"://"+f.host+(f.port?":"+f.port:""),m=nd(),g=[Vw("messages",[Ua((function(){var e=ud(ee.fromDom(window),"message",(function(e){if(f.isSameOrigin(new qQ(e.raw.origin))){var r=e.raw.data;KQ(r)?YQ(n,v,r):XQ(r)&&t.onMessage(v,r)}}));m.set(e)})),ja(m.clear)]),yf.config({channels:(o={},o[ZY]={onReceive:function(t,e){Is(t.element,"iframe").each((function(t){var n=t.dom.contentWindow;n.postMessage(e,d)}))}},o)})],h={header:i,body:u,footer:a,extraClasses:l,extraBehaviours:g,extraStyles:s},p=OQ(h,t,c,r),v=$Q(p);return{dialog:p,instanceApi:v}},QQ=function(t){var e=t.backstage.shared,n=function(n,r){var o=function(){VK.hide(c),r()},i=kC(rL({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:L.none()},"cancel",t.backstage)),u=mQ(),a=dQ(o,e.providers),c=Es(vQ({lazySink:function(){return e.getSink()},header:fQ(u,a),body:gQ(n,e.providers),footer:L.some(hQ(pQ([],[i.asSpec()]))),onEscape:o,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Ra(AA,o)],eventOrder:{}}));VK.show(c);var s=i.get(c);Yw.focus(s)};return{open:n}},ZQ=function(t){var e=t.backstage.shared,n=function(n,r){var o=function(t){VK.hide(s),r(t)},i=kC(rL({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:L.none()},"submit",t.backstage)),u=rL({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:L.none()},"cancel",t.backstage),a=mQ(),c=dQ((function(){return o(!1)}),e.providers),s=Es(vQ({lazySink:function(){return e.getSink()},header:fQ(a,c),body:gQ(n,e.providers),footer:L.some(hQ(pQ([],[u,i.asSpec()]))),onEscape:function(){return o(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Ra(AA,(function(){return o(!1)})),Ra(MA,(function(){return o(!0)}))],eventOrder:{}}));VK.show(s);var l=i.get(s);Yw.focus(l)};return{open:n}},tZ=function(t,e){return xi(wi("data",e,t))},eZ=function(t){return L_(t,".tox-alert-dialog")||L_(t,".tox-confirm-dialog")},nZ=function(t,e,n){return e&&n?[]:[CF.config({contextual:{lazyContext:function(){return L.some(Jr(ee.fromDom(t.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]},rZ=function(t){var e=t.backstage,n=t.editor,r=qT(n),o=QQ(t),i=ZQ(t),u=function(t,n,r){return void 0!==n&&"toolbar"===n.inline?l(t,e.shared.anchors.inlineDialog(),r,n.ariaAttrs):void 0!==n&&"cursor"===n.inline?l(t,e.shared.anchors.cursor(),r,n.ariaAttrs):s(t,r)},a=function(t,e){return c(t,e)},c=function(t,r){var o=function(t){var o=JQ(t,{closeWindow:function(){VK.hide(o.dialog),r(o.instanceApi)}},n,e);return VK.show(o.dialog),o.instanceApi};return wY.openUrl(o,t)},s=function(t,n){var r=function(t,r,o){var i=r,u={dataValidator:o,initialData:i,internalDialog:t},a=jQ(u,{redial:wY.redial,closeWindow:function(){VK.hide(a.dialog),n(a.instanceApi)}},e);return VK.show(a.dialog),a.instanceApi.setData(i),a.instanceApi};return wY.open(r,t)},l=function(t,o,i,u){var a=function(t,a,c){var s=tZ(a,c),l=od(),f=e.shared.header.isPositionedAtTop(),d={dataValidator:c,initialData:s,internalDialog:t},m=function(){return l.on((function(t){eC.reposition(t),CF.refresh(t)}))},g=WQ(d,{redial:wY.redial,closeWindow:function(){l.on(eC.hide),n.off("ResizeEditor",m),l.clear(),i(g.instanceApi)}},e,u),h=Es(eC.sketch(A(A({lazySink:e.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},f?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:mf(M([Vw("window-manager-inline-events",[Ra(ga(),(function(t,e){Ca(g.dialog,AA)}))])],nZ(n,r,f),!0)),isExtraPart:function(t,e){return eZ(e)}})));return l.set(h),eC.showWithin(h,_s(g.dialog),{anchor:o},L.some(Hn())),r&&f||(CF.refresh(h),n.on("ResizeEditor",m)),g.instanceApi.setData(s),Aw.focusIn(g.dialog),g.instanceApi};return wY.open(a,t)},f=function(t,e){i.open(t,(function(t){e(t)}))},d=function(t,e){o.open(t,(function(){e()}))},m=function(t){t.close()};return{open:u,openUrl:a,alert:d,close:m,confirm:f}};function oZ(){_.add("silver",(function(t){var e=zK(t),n=e.uiMothership,r=e.backstage,o=e.renderUI,i=e.getUi;B_.register(t,r.shared);var u=rZ({editor:t,backstage:r});return{renderUI:o,getWindowManagerImpl:w(u),getNotificationManagerImpl:function(){return VC(t,{backstage:r},n)},ui:i()}}))}oZ()})()}).call(this,n("c8ba"))},"07d1":function(t,e,n){n("94ce")},"09cf":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");function e(){t.add("textcolor",(function(){}))}e()})()},"0aa0":function(t,e,n){n("3b47")},"0efa":function(t,e,n){n("4bdc")},2401:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),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=n("string"),i=n("object"),u=n("array"),a=r("boolean"),c=r("function"),s=r("number"),l=function(){},f=function(t){return function(){return t}},d=function(t){return t},m=function(t,e){return t===e},g=function(t){return function(e){return!t(e)}},h=f(!1),p=f(!0),v=function(){return b},b=function(){var t=function(t){return t()},e=d,n={fold:function(t,e){return t()},isSome:h,isNone:p,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:f(null),getOrUndefined:f(void 0),or:e,orThunk:t,map:v,each:l,bind:v,exists:h,forall:p,filter:function(){return v()},toArray:function(){return[]},toString:f("none()")};return n}(),y=function(t){var e=f(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:p,isNone:h,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return y(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:b},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},w=function(t){return null===t||void 0===t?b:y(t)},x={some:y,none:v,from:w},C=Array.prototype.slice,S=Array.prototype.push,k=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},T=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},O=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},E=function(t,e){if(0===t.length)return[];for(var n=e(t[0]),r=[],o=[],i=0,u=t.length;i<u;i++){var a=t[i],c=e(a);c!==n&&(r.push(o),o=[]),n=c,o.push(a)}return 0!==o.length&&r.push(o),r},_=function(t,e,n){return T(t,(function(t,r){n=e(n,t,r)})),n},A=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return x.some(i);if(n(i,r))break}return x.none()},D=function(t,e){return A(t,e,h)},M=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!u(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);S.apply(e,t[n])}return e},R=function(t,e){return M(k(t,e))},N=function(t){var e=C.call(t,0);return e.reverse(),e},z=function(t,e){return e>=0&&e<t.length?x.some(t[e]):x.none()},B=function(t){return z(t,0)},L=function(t){return z(t,t.length-1)},H=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return x.none()},I=function(){return I=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},I.apply(this,arguments)};function P(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var F=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},V=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,u=t.isiOS()||t.isAndroid(),a=u||r("(pointer:coarse)"),c=o||!i&&u&&r("(min-device-width:768px)"),s=i||u&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),d=!s&&!c&&!l;return{isiPad:f(o),isiPhone:f(i),isTablet:f(c),isPhone:f(s),isTouch:f(a),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:f(l),isDesktop:f(d)}},U=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}},j=function(t,e){var n=U(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return $(r(1),r(2))},W=function(t,e){var n=String(e).toLowerCase();return 0===t.length?q():j(t,n)},q=function(){return $(0,0)},$=function(t,e){return{major:t,minor:e}},G={nu:$,detect:W,unknown:q},K=function(t,e){return H(e.brands,(function(e){var n=e.brand.toLowerCase();return D(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:G.nu(parseInt(e.version,10),0)}}))}))},X=function(t,e){var n=String(e).toLowerCase();return D(t,(function(t){return t.search(n)}))},Y=function(t,e){return X(t,e).map((function(t){var n=G.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},J=function(t,e){return X(t,e).map((function(t){var n=G.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},Q=function(t,e){return-1!==t.indexOf(e)},Z=function(t){return function(e){return e.replace(t,"")}},tt=Z(/^\s+|\s+$/g),et=function(t){return t.length>0},nt=function(t){return!et(t)},rt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ot=function(t){return function(e){return Q(e,t)}},it=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Q(t,"edge/")&&Q(t,"chrome")&&Q(t,"safari")&&Q(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,rt],search:function(t){return Q(t,"chrome")&&!Q(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Q(t,"msie")||Q(t,"trident")}},{name:"Opera",versionRegexes:[rt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ot("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ot("firefox")},{name:"Safari",versionRegexes:[rt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Q(t,"safari")||Q(t,"mobile/"))&&Q(t,"applewebkit")}}],ut=[{name:"Windows",search:ot("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Q(t,"iphone")||Q(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ot("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ot("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ot("linux"),versionRegexes:[]},{name:"Solaris",search:ot("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ot("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ot("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],at={browsers:f(it),oses:f(ut)},ct="Edge",st="Chrome",lt="IE",ft="Opera",dt="Firefox",mt="Safari",gt=function(){return ht({current:void 0,version:G.unknown()})},ht=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(ct),isChrome:r(st),isIE:r(lt),isOpera:r(ft),isFirefox:r(dt),isSafari:r(mt)}},pt={unknown:gt,nu:ht,edge:f(ct),chrome:f(st),ie:f(lt),opera:f(ft),firefox:f(dt),safari:f(mt)},vt="Windows",bt="iOS",yt="Android",wt="Linux",xt="OSX",Ct="Solaris",St="FreeBSD",kt="ChromeOS",Tt=function(){return Ot({current:void 0,version:G.unknown()})},Ot=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(vt),isiOS:r(bt),isAndroid:r(yt),isOSX:r(xt),isLinux:r(wt),isSolaris:r(Ct),isFreeBSD:r(St),isChromeOS:r(kt)}},Et={unknown:Tt,nu:Ot,windows:f(vt),ios:f(bt),android:f(yt),linux:f(wt),osx:f(xt),solaris:f(Ct),freebsd:f(St),chromeos:f(kt)},_t=function(t,e,n){var r=at.browsers(),o=at.oses(),i=e.bind((function(t){return K(r,t)})).orThunk((function(){return Y(r,t)})).fold(pt.unknown,pt.nu),u=J(o,t).fold(Et.unknown,Et.nu),a=V(u,i,t,n);return{browser:i,os:u,deviceType:a}},At={detect:_t},Dt=function(t){return window.matchMedia(t).matches},Mt=F((function(){return At.detect(navigator.userAgent,x.from(navigator.userAgentData),Dt)})),Rt=function(){return Mt()},Nt=function(t,e,n){return 0!==(t.compareDocumentPosition(e)&n)},zt=function(t,e){return Nt(t,e,Node.DOCUMENT_POSITION_CONTAINED_BY)},Bt=1,Lt=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Pt(r.childNodes[0])},Ht=function(t,e){var n=e||document,r=n.createElement(t);return Pt(r)},It=function(t,e){var n=e||document,r=n.createTextNode(t);return Pt(r)},Pt=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},Ft=function(t,e,n){return x.from(t.dom.elementFromPoint(e,n)).map(Pt)},Vt={fromHtml:Lt,fromTag:Ht,fromText:It,fromDom:Pt,fromPoint:Ft},Ut=function(t,e){var n=t.dom;if(n.nodeType!==Bt)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")},jt=function(t,e){return t.dom===e.dom},Wt=function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)},qt=function(t,e){return zt(t.dom,e.dom)},$t=function(t,e){return Rt().browser.isIE()?qt(t,e):Wt(t,e)},Gt=Ut,Kt=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Xt=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Yt=tinymce.util.Tools.resolve("tinymce.util.VK"),Jt=Object.keys,Qt=function(t,e){for(var n=Jt(t),r=0,o=n.length;r<o;r++){var i=n[r],u=t[i];e(u,i)}},Zt=function(t){return function(e,n){t[n]=e}},te=function(t,e,n,r){var o={};return Qt(t,(function(t,o){(e(t,o)?n:r)(t,o)})),o},ee=function(t,e){var n={};return te(t,e,Zt(n),l),n};"undefined"!==typeof window?window:Function("return this;")();var ne=function(t){var e=t.dom.nodeName;return e.toLowerCase()},re=function(t){return t.dom.nodeType},oe=function(t){return function(e){return re(e)===t}},ie=oe(Bt),ue=function(t){return function(e){return ie(e)&&ne(e)===t}},ae=function(t,e,n){if(!(o(n)||a(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},ce=function(t,e){var n=t.dom;Qt(e,(function(t,e){ae(n,e,t)}))},se=function(t){return _(t.dom.attributes,(function(t,e){return t[e.name]=e.value,t}),{})},le=function(t){return x.from(t.dom.parentNode).map(Vt.fromDom)},fe=function(t){return k(t.dom.childNodes,Vt.fromDom)},de=function(t,e){var n=t.dom.childNodes;return x.from(n[e]).map(Vt.fromDom)},me=function(t){return de(t,0)},ge=function(t){return de(t,t.dom.childNodes.length-1)},he=function(t,e){var n=le(t);n.each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},pe=function(t,e){t.dom.appendChild(e.dom)},ve=function(t,e){T(e,(function(e){he(t,e)}))},be=function(t,e){T(e,(function(e){pe(t,e)}))},ye=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},we=function(t,e){return Vt.fromDom(t.dom.cloneNode(e))},xe=function(t){return we(t,!0)},Ce=function(t,e){var n=Vt.fromTag(e),r=se(t);return ce(n,r),n},Se=function(t,e){var n=Ce(t,e);he(t,n);var r=fe(t);return be(n,r),ye(t),n},ke=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Te=tinymce.util.Tools.resolve("tinymce.util.Tools"),Oe=function(t){return function(e){return e&&e.nodeName.toLowerCase()===t}},Ee=function(t){return function(e){return e&&t.test(e.nodeName)}},_e=function(t){return t&&3===t.nodeType},Ae=Ee(/^(OL|UL|DL)$/),De=Ee(/^(OL|UL)$/),Me=Oe("ol"),Re=Ee(/^(LI|DT|DD)$/),Ne=Ee(/^(DT|DD)$/),ze=Ee(/^(TH|TD)$/),Be=Oe("br"),Le=function(t){return t.parentNode.firstChild===t},He=function(t,e){return e&&!!t.schema.getTextBlockElements()[e.nodeName]},Ie=function(t,e){return t&&t.nodeName in e},Pe=function(t,e){return!!Be(e)&&(t.isBlock(e.nextSibling)&&!Be(e.previousSibling))},Fe=function(t,e,n){var r=t.isEmpty(e);return!(n&&t.select("span[data-mce-type=bookmark]",e).length>0)&&r},Ve=function(t,e){return t.isChildOf(e,t.getRoot())},Ue=function(t){return t.getParam("lists_indent_on_tab",!0)},je=function(t){var e=t.getParam("forced_root_block","p");return!1===e?"":!0===e?"p":e},We=function(t){return t.getParam("forced_root_block_attrs",{})},qe=function(t,e){var n,r,o,i=t.dom,u=t.schema.getBlockElements(),a=i.createFragment(),c=je(t);if(c&&(r=i.create(c),r.tagName===c.toUpperCase()&&i.setAttribs(r,We(t)),Ie(e.firstChild,u)||a.appendChild(r)),e)while(n=e.firstChild){var s=n.nodeName;o||"SPAN"===s&&"bookmark"===n.getAttribute("data-mce-type")||(o=!0),Ie(n,u)?(a.appendChild(n),r=null):c?(r||(r=i.create(c),a.appendChild(r)),r.appendChild(n)):a.appendChild(n)}return c?o||r.appendChild(i.create("br",{"data-mce-bogus":"1"})):a.appendChild(i.create("br")),a},$e=ke.DOM,Ge=function(t,e,n){var r=function(t){Te.each(o,(function(e){t.parentNode.insertBefore(e,n.parentNode)})),$e.remove(t)},o=$e.select('span[data-mce-type="bookmark"]',e),i=qe(t,n),u=$e.createRng();u.setStartAfter(n),u.setEndAfter(e);for(var a=u.extractContents(),c=a.firstChild;c;c=c.firstChild)if("LI"===c.nodeName&&t.dom.isEmpty(c)){$e.remove(c);break}t.dom.isEmpty(a)||$e.insertAfter(a,e),$e.insertAfter(i,e),Fe(t.dom,n.parentNode)&&r(n.parentNode),$e.remove(n),Fe(t.dom,e)&&$e.remove(e)},Ke=ue("dd"),Xe=ue("dt"),Ye=function(t,e){Ke(e)?Se(e,"dt"):Xe(e)&&le(e).each((function(n){return Ge(t,n.dom,e.dom)}))},Je=function(t){Xe(t)&&Se(t,"dd")},Qe=function(t,e,n){T(n,"Indent"===e?Je:function(e){return Ye(t,e)})},Ze=function(t,e){if(_e(t))return{container:t,offset:e};var n=Kt.getNode(t,e);return _e(n)?{container:n,offset:e>=t.childNodes.length?n.data.length:0}:n.previousSibling&&_e(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&_e(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:t,offset:e}},tn=function(t){var e=t.cloneRange(),n=Ze(t.startContainer,t.startOffset);e.setStart(n.container,n.offset);var r=Ze(t.endContainer,t.endOffset);return e.setEnd(r.container,r.offset),e},en=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),nn=function(t,e){var n=e||t.selection.getStart(!0);return t.dom.getParent(n,"OL,UL,DL",ln(t,n))},rn=function(t,e){return t&&1===e.length&&e[0]===t},on=function(t){return O(t.querySelectorAll("ol,ul,dl"),Ae)},un=function(t){var e=nn(t),n=t.selection.getSelectedBlocks();return rn(e,n)?on(e):O(n,(function(t){return Ae(t)&&e!==t}))},an=function(t,e){var n=Te.map(e,(function(e){var n=t.dom.getParent(e,"li,dd,dt",ln(t,e));return n||e}));return en.unique(n)},cn=function(t){var e=t.selection.getSelectedBlocks();return O(an(t,e),Re)},sn=function(t){return O(cn(t),Ne)},ln=function(t,e){var n=t.dom.getParents(e,"TD,TH");return n.length>0?n[0]:t.getBody()},fn=function(t,e){var n=t.dom.getParents(e,"ol,ul",ln(t,e));return L(n)},dn=function(t){var e=fn(t,t.selection.getStart()),n=O(t.selection.getSelectedBlocks(),De);return e.toArray().concat(n)},mn=function(t){var e=dn(t);return gn(t,e)},gn=function(t,e){var n=k(e,(function(e){return fn(t,e).getOr(e)}));return en.unique(n)},hn=function(t,e,n){return void 0===n&&(n=m),t.exists((function(t){return n(t,e)}))},pn=function(t,e,n){return t.isSome()&&e.isSome()?x.some(n(t.getOrDie(),e.getOrDie())):x.none()},vn=function(t,e){var n=e||document,r=n.createDocumentFragment();return T(t,(function(t){r.appendChild(t.dom)})),Vt.fromDom(r)},bn=function(t,e,n){return t.fire("ListMutation",{action:e,element:n})},yn=function(t){return void 0!==t.style&&c(t.style.getPropertyValue)},wn=function(t,e,n){if(!o(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);yn(t)&&t.style.setProperty(e,n)},xn=function(t,e,n){var r=t.dom;wn(r,e,n)},Cn=function(t,e){pe(t.item,e.list)},Sn=function(t){for(var e=1;e<t.length;e++)Cn(t[e-1],t[e])},kn=function(t,e){pn(L(t),B(e),Cn)},Tn=function(t,e){var n={list:Vt.fromTag(e,t),item:Vt.fromTag("li",t)};return pe(n.list,n.item),n},On=function(t,e,n){for(var r=[],o=0;o<n;o++)r.push(Tn(t,e.listType));return r},En=function(t,e){for(var n=0;n<t.length-1;n++)xn(t[n].item,"list-style-type","none");L(t).each((function(t){ce(t.list,e.listAttributes),ce(t.item,e.itemAttributes),be(t.item,e.content)}))},_n=function(t,e){ne(t.list)!==e.listType&&(t.list=Se(t.list,e.listType)),ce(t.list,e.listAttributes)},An=function(t,e,n){var r=Vt.fromTag("li",t);return ce(r,e),be(r,n),r},Dn=function(t,e){pe(t.list,e),t.item=e},Mn=function(t,e,n){var r=e.slice(0,n.depth);return L(r).each((function(e){var r=An(t,n.itemAttributes,n.content);Dn(e,r),_n(e,n)})),r},Rn=function(t,e,n){var r=On(t,n,n.depth-e.length);return Sn(r),En(r,n),kn(e,r),e.concat(r)},Nn=function(t,e){var n=_(e,(function(e,n){return n.depth>e.length?Rn(t,e,n):Mn(t,e,n)}),[]);return B(n).map((function(t){return t.list}))},zn=function(t){return Gt(t,"OL,UL")},Bn=function(t){return me(t).exists(zn)},Ln=function(t){return ge(t).exists(zn)},Hn=function(t){return t.depth>0},In=function(t){return t.isSelected},Pn=function(t){var e=fe(t),n=Ln(t)?e.slice(0,-1):e;return k(n,xe)},Fn=function(t,e,n){return le(t).filter(ie).map((function(r){return{depth:e,dirty:!1,isSelected:n,content:Pn(t),itemAttributes:se(t),listAttributes:se(r),listType:ne(r)}}))},Vn=function(t,e){switch(t){case"Indent":e.depth++;break;case"Outdent":e.depth--;break;case"Flatten":e.depth=0}e.dirty=!0},Un=function(t,e){t.listType=e.listType,t.listAttributes=I({},e.listAttributes)},jn=function(t){t.listAttributes=ee(t.listAttributes,(function(t,e){return"start"!==e}))},Wn=function(t,e){var n=t[e].depth,r=function(t){return t.depth===n&&!t.dirty},o=function(t){return t.depth<n};return A(N(t.slice(0,e)),r,o).orThunk((function(){return A(t.slice(e+1),r,o)}))},qn=function(t){return T(t,(function(e,n){Wn(t,n).fold((function(){e.dirty&&jn(e)}),(function(t){return Un(e,t)}))})),t},$n=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},Gn=function(t,e,n,r){return me(r).filter(zn).fold((function(){e.each((function(t){jt(t.start,r)&&n.set(!0)}));var o=Fn(r,t,n.get());e.each((function(t){jt(t.end,r)&&n.set(!1)}));var i=ge(r).filter(zn).map((function(r){return Kn(t,e,n,r)})).getOr([]);return o.toArray().concat(i)}),(function(r){return Kn(t,e,n,r)}))},Kn=function(t,e,n,r){return R(fe(r),(function(r){var o=zn(r)?Kn:Gn,i=t+1;return o(i,e,n,r)}))},Xn=function(t,e){var n=$n(!1),r=0;return k(t,(function(t){return{sourceList:t,entries:Kn(r,e,n,t)}}))},Yn=function(t,e){var n=qn(e);return k(n,(function(e){var n=vn(e.content);return Vt.fromDom(qe(t,n.dom))}))},Jn=function(t,e){var n=qn(e);return Nn(t.contentDocument,n).toArray()},Qn=function(t,e){return R(E(e,Hn),(function(e){var n=B(e).exists(Hn);return n?Jn(t,e):Yn(t,e)}))},Zn=function(t,e){T(O(t,In),(function(t){return Vn(e,t)}))},tr=function(t){var e=k(cn(t),Vt.fromDom);return pn(D(e,g(Bn)),D(N(e),g(Bn)),(function(t,e){return{start:t,end:e}}))},er=function(t,e,n){var r=Xn(e,tr(t));T(r,(function(e){Zn(e.entries,n);var r=Qn(t,e.entries);T(r,(function(e){bn(t,"Indent"===n?"IndentList":"OutdentList",e.dom)})),ve(e.sourceList,r),ye(e.sourceList)}))},nr=function(t,e){var n=k(mn(t),Vt.fromDom),r=k(sn(t),Vt.fromDom),o=!1;if(n.length||r.length){var i=t.selection.getBookmark();er(t,n,e),Qe(t,e,r),t.selection.moveToBookmark(i),t.selection.setRng(tn(t.selection.getRng())),t.nodeChanged(),o=!0}return o},rr=function(t){return nr(t,"Indent")},or=function(t){return nr(t,"Outdent")},ir=function(t){return nr(t,"Flatten")},ur=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),ar=ke.DOM,cr=function(t){var e={},n=function(n){var r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"];if(1===r.nodeType){var i=ar.create("span",{"data-mce-type":"bookmark"});r.hasChildNodes()?(o=Math.min(o,r.childNodes.length-1),n?r.insertBefore(i,r.childNodes[o]):ar.insertAfter(i,r.childNodes[o])):r.appendChild(i),r=i,o=0}e[n?"startContainer":"endContainer"]=r,e[n?"startOffset":"endOffset"]=o};return n(!0),t.collapsed||n(),e},sr=function(t){var e=function(e){var n,r=function(t){var e=t.parentNode.firstChild,n=0;while(e){if(e===t)return n;1===e.nodeType&&"bookmark"===e.getAttribute("data-mce-type")||n++,e=e.nextSibling}return-1},o=n=t[e?"startContainer":"endContainer"],i=t[e?"startOffset":"endOffset"];o&&(1===o.nodeType&&(i=r(o),o=o.parentNode,ar.remove(n),!o.hasChildNodes()&&ar.isBlock(o)&&o.appendChild(ar.create("br"))),t[e?"startContainer":"endContainer"]=o,t[e?"startOffset":"endOffset"]=i)};e(!0),e();var n=ar.createRng();return n.setStart(t.startContainer,t.startOffset),t.endContainer&&n.setEnd(t.endContainer,t.endOffset),tn(n)},lr=function(t){switch(t){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},fr=function(t){return/\btox\-/.test(t.className)},dr=function(t,e,n){var r=function(t){var r=A(t.parents,Ae,ze).filter((function(t){return t.nodeName===e&&!fr(t)})).isSome();n(r)},o=t.dom.getParents(t.selection.getNode());return r({parents:o}),t.on("NodeChange",r),function(){return t.off("NodeChange",r)}},mr=function(t,e,n){var r=n["list-style-type"]?n["list-style-type"]:null;t.setStyle(e,"list-style-type",r)},gr=function(t,e){Te.each(e,(function(e,n){t.setAttribute(n,e)}))},hr=function(t,e,n){gr(e,n["list-attributes"]),Te.each(t.select("li",e),(function(t){gr(t,n["list-item-attributes"])}))},pr=function(t,e,n){mr(t,e,n),hr(t,e,n)},vr=function(t,e,n){Te.each(n,(function(n){var r;return t.setStyle(e,(r={},r[n]="",r))}))},br=function(t,e,n,r){var o=e[n?"startContainer":"endContainer"],i=e[n?"startOffset":"endOffset"];1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!n&&Be(o.nextSibling)&&(o=o.nextSibling);while(o.parentNode!==r){if(He(t,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},yr=function(t,e,n){for(var r,o=[],i=t.dom,u=br(t,e,!0,n),a=br(t,e,!1,n),c=[],s=u;s;s=s.nextSibling)if(c.push(s),s===a)break;return Te.each(c,(function(e){if(He(t,e))return o.push(e),void(r=null);if(i.isBlock(e)||Be(e))return Be(e)&&i.remove(e),void(r=null);var u=e.nextSibling;ur.isBookmarkNode(e)&&(Ae(u)||He(t,u)||!u&&e.parentNode===n)?r=null:(r||(r=i.create("p"),e.parentNode.insertBefore(r,e),o.push(r)),r.appendChild(e))})),o},wr=function(t,e,n){var r=t.getStyle(e,"list-style-type"),o=n?n["list-style-type"]:"";return o=null===o?"":o,r===o},xr=function(t,e,n){var r=t.selection.getRng(),o="LI",i=ln(t,t.selection.getStart(!0)),u=t.dom;if("false"!==u.getContentEditable(t.selection.getNode())){e=e.toUpperCase(),"DL"===e&&(o="DT");var a=cr(r),c=yr(t,r,i);Te.each(c,(function(r){var i,a=r.previousSibling,c=r.parentNode;Re(c)||(a&&Ae(a)&&a.nodeName===e&&wr(u,a,n)?(i=a,r=u.rename(r,o),a.appendChild(r)):(i=u.create(e),r.parentNode.insertBefore(i,r),i.appendChild(r),r=u.rename(r,o)),vr(u,r,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),pr(u,i,n),Or(t.dom,i))})),t.selection.setRng(sr(a))}},Cr=function(t,e){return t&&e&&Ae(t)&&t.nodeName===e.nodeName},Sr=function(t,e,n){var r=t.getStyle(e,"list-style-type",!0),o=t.getStyle(n,"list-style-type",!0);return r===o},kr=function(t,e){return t.className===e.className},Tr=function(t,e,n){return Cr(e,n)&&Sr(t,e,n)&&kr(e,n)},Or=function(t,e){var n,r;if(n=e.nextSibling,Tr(t,e,n)){while(r=n.firstChild)e.appendChild(r);t.remove(n)}if(n=e.previousSibling,Tr(t,e,n)){while(r=n.lastChild)e.insertBefore(r,e.firstChild);t.remove(n)}},Er=function(t,e,n,r){if(e.nodeName!==n){var o=t.dom.rename(e,n);pr(t.dom,o,r),bn(t,lr(n),o)}else pr(t.dom,e,r),bn(t,lr(n),e)},_r=function(t,e,n,r,o){var i=Ae(e);if(i&&e.nodeName===r&&!Ar(o))ir(t);else{xr(t,r,o);var u=cr(t.selection.getRng()),a=i?P([e],n,!0):n;Te.each(a,(function(e){Er(t,e,r,o)})),t.selection.setRng(sr(u))}},Ar=function(t){return"list-style-type"in t},Dr=function(t,e,n,r){if(e!==t.getBody())if(e)if(e.nodeName!==n||Ar(r)||fr(e)){var o=cr(t.selection.getRng());pr(t.dom,e,r);var i=t.dom.rename(e,n);Or(t.dom,i),t.selection.setRng(sr(o)),xr(t,n,r),bn(t,lr(n),i)}else ir(t);else xr(t,n,r),bn(t,lr(n),e)},Mr=function(t,e,n){var r=nn(t),o=un(t),u=i(n)?n:{};o.length>0?_r(t,r,o,e,u):Dr(t,r,e,u)},Rr=ke.DOM,Nr=function(t,e){var n=e.parentNode;if("LI"===n.nodeName&&n.firstChild===e){var r=n.previousSibling;r&&"LI"===r.nodeName?(r.appendChild(e),Fe(t,n)&&Rr.remove(n)):Rr.setStyle(n,"listStyleType","none")}if(Ae(n)){r=n.previousSibling;r&&"LI"===r.nodeName&&r.appendChild(e)}},zr=function(t,e){var n=Te.grep(t.select("ol,ul",e));Te.each(n,(function(e){Nr(t,e)}))},Br=function(t,e,n,r){var o=e.startContainer,i=e.startOffset;if(_e(o)&&(n?i<o.data.length:i>0))return o;var u=t.schema.getNonEmptyElements();1===o.nodeType&&(o=Kt.getNode(o,i));var a=new Xt(o,r);n&&Pe(t.dom,o)&&a.next();while(o=a[n?"next":"prev2"]()){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(u[o.nodeName])return o;if(_e(o)&&o.data.length>0)return o}},Lr=function(t,e){var n=e.childNodes;return 1===n.length&&!Ae(n[0])&&t.isBlock(n[0])},Hr=function(t,e){Lr(t,e)&&t.remove(e.firstChild,!0)},Ir=function(t,e,n){var r,o=Lr(t,n)?n.firstChild:n;if(Hr(t,e),!Fe(t,e,!0))while(r=e.firstChild)o.appendChild(r)},Pr=function(t,e,n){var r,o=e.parentNode;if(Ve(t,e)&&Ve(t,n)){Ae(n.lastChild)&&(r=n.lastChild),o===n.lastChild&&Be(o.previousSibling)&&t.remove(o.previousSibling);var i=n.lastChild;i&&Be(i)&&e.hasChildNodes()&&t.remove(i),Fe(t,n,!0)&&t.$(n).empty(),Ir(t,e,n),r&&n.appendChild(r);var u=$t(Vt.fromDom(n),Vt.fromDom(e)),a=u?t.getParents(e,Ae,n):[];t.remove(e),T(a,(function(e){Fe(t,e)&&e!==t.getRoot()&&t.remove(e)}))}},Fr=function(t,e,n){t.dom.$(n).empty(),Pr(t.dom,e,n),t.selection.setCursorLocation(n,0)},Vr=function(t,e,n,r){var o=t.dom;if(o.isEmpty(r))Fr(t,n,r);else{var i=cr(e);Pr(o,n,r),t.selection.setRng(sr(i))}},Ur=function(t,e,n,r){var o=cr(e);Pr(t.dom,n,r);var i=sr(o);t.selection.setRng(i)},jr=function(t,e){var n=t.dom,r=t.selection,o=r.getStart(),i=ln(t,o),u=n.getParent(r.getStart(),"LI",i);if(u){var a=u.parentNode;if(a===t.getBody()&&Fe(n,a))return!0;var c=tn(r.getRng()),s=n.getParent(Br(t,c,e,i),"LI",i);if(s&&s!==u)return t.undoManager.transact((function(){e?Vr(t,c,s,u):Le(u)?or(t):Ur(t,c,u,s)})),!0;if(!s&&!e&&0===c.startOffset&&0===c.endOffset)return t.undoManager.transact((function(){ir(t)})),!0}return!1},Wr=function(t,e,n){var r=t.getParent(e.parentNode,t.isBlock,n);t.remove(e),r&&t.isEmpty(r)&&t.remove(r)},qr=function(t,e){var n=t.dom,r=t.selection.getStart(),o=ln(t,r),i=n.getParent(r,n.isBlock,o);if(i&&n.isEmpty(i)){var u=tn(t.selection.getRng()),a=n.getParent(Br(t,u,e,o),"LI",o);if(a)return t.undoManager.transact((function(){Wr(n,i,o),Or(n,a.parentNode),t.selection.select(a,!0),t.selection.collapse(e)})),!0}return!1},$r=function(t,e){return jr(t,e)||qr(t,e)},Gr=function(t){var e=t.selection.getStart(),n=ln(t,e),r=t.dom.getParent(e,"LI,DT,DD",n);return!!(r||cn(t).length>0)&&(t.undoManager.transact((function(){t.execCommand("Delete"),zr(t.dom,t.getBody())})),!0)},Kr=function(t,e){return t.selection.isCollapsed()?$r(t,e):Gr(t)},Xr=function(t){t.on("keydown",(function(e){e.keyCode===Yt.BACKSPACE?Kr(t,!1)&&e.preventDefault():e.keyCode===Yt.DELETE&&Kr(t,!0)&&e.preventDefault()}))},Yr=function(t){return{backspaceDelete:function(e){Kr(t,e)}}},Jr=function(t,e){var n=nn(t);t.undoManager.transact((function(){i(e.styles)&&t.dom.setStyles(n,e.styles),i(e.attrs)&&Qt(e.attrs,(function(e,r){return t.dom.setAttrib(n,r,e)}))}))},Qr=function(t){var e=N(tt(t).split("")),n=k(e,(function(t,e){var n=t.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,e)*n}));return _(n,(function(t,e){return t+e}),0)},Zr=function(t){if(t--,t<0)return"";var e=t%26,n=Math.floor(t/26),r=Zr(n),o=String.fromCharCode("A".charCodeAt(0)+e);return r+o},to=function(t){return/^[A-Z]+$/.test(t)},eo=function(t){return/^[a-z]+$/.test(t)},no=function(t){return/^[0-9]+$/.test(t)},ro=function(t){return no(t)?2:to(t)?0:eo(t)?1:nt(t)?3:4},oo=function(t){switch(ro(t)){case 2:return x.some({listStyleType:x.none(),start:t});case 0:return x.some({listStyleType:x.some("upper-alpha"),start:Qr(t).toString()});case 1:return x.some({listStyleType:x.some("lower-alpha"),start:Qr(t).toString()});case 3:return x.some({listStyleType:x.none(),start:""});case 4:return x.none()}},io=function(t){var e=parseInt(t.start,10);return hn(t.listStyleType,"upper-alpha")?Zr(e):hn(t.listStyleType,"lower-alpha")?Zr(e).toLowerCase():t.start},uo=function(t){var e=nn(t);Me(e)&&t.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:io({start:t.dom.getAttrib(e,"start","1"),listStyleType:x.some(t.dom.getStyle(e,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var n=e.getData();oo(n.start).each((function(e){t.execCommand("mceListUpdate",!1,{attrs:{start:"1"===e.start?"":e.start},styles:{"list-style-type":e.listStyleType.getOr("")}})})),e.close()}})},ao=function(t,e){return function(){var n=nn(t);return n&&n.nodeName===e}},co=function(t){t.addCommand("mceListProps",(function(){uo(t)}))},so=function(t){t.on("BeforeExecCommand",(function(e){var n=e.command.toLowerCase();"indent"===n?rr(t):"outdent"===n&&or(t)})),t.addCommand("InsertUnorderedList",(function(e,n){Mr(t,"UL",n)})),t.addCommand("InsertOrderedList",(function(e,n){Mr(t,"OL",n)})),t.addCommand("InsertDefinitionList",(function(e,n){Mr(t,"DL",n)})),t.addCommand("RemoveList",(function(){ir(t)})),co(t),t.addCommand("mceListUpdate",(function(e,n){i(n)&&Jr(t,n)})),t.addQueryStateHandler("InsertUnorderedList",ao(t,"UL")),t.addQueryStateHandler("InsertOrderedList",ao(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",ao(t,"DL"))},lo=function(t){t.on("keydown",(function(e){e.keyCode!==Yt.TAB||Yt.metaKeyPressed(e)||t.undoManager.transact((function(){(e.shiftKey?or(t):rr(t))&&e.preventDefault()}))}))},fo=function(t){Ue(t)&&lo(t),Xr(t)},mo=function(t){var e=function(e){return function(){return t.execCommand(e)}};t.hasPlugin("advlist")||(t.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:e("InsertOrderedList"),onSetup:function(e){return dr(t,"OL",e.setActive)}}),t.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:e("InsertUnorderedList"),onSetup:function(e){return dr(t,"UL",e.setActive)}}))},go=function(t){var e={text:"List properties...",icon:"ordered-list",onAction:function(){return t.execCommand("mceListProps")},onSetup:function(e){return dr(t,"OL",(function(t){return e.setDisabled(!t)}))}};t.ui.registry.addMenuItem("listprops",e),t.ui.registry.addContextMenu("lists",{update:function(e){var n=nn(t,e);return Me(n)?["listprops"]:[]}})};function ho(){t.add("lists",(function(t){return!1===t.hasPlugin("rtc",!0)?(fo(t),so(t)):co(t),mo(t),go(t),Yr(t)}))}ho()})()},"24e8":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},n=function(t,e){return-1!==t.indexOf(e)},r=function(t,n){return e(t,n,0)},o=tinymce.util.Tools.resolve("tinymce.Env"),i=function(){return/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g},u=new RegExp("^"+i().source+"$","i"),a=function(t){return t.getParam("autolink_pattern",u)},c=function(t){return t.getParam("default_link_target",!1)},s=function(t){return t.getParam("link_default_protocol","http","string")},l=function(t){return/^[(\[{ \u00a0]$/.test(t)},f=function(t){return 3===t.nodeType},d=function(t){return 1===t.nodeType},m=function(t){return x(t,-1)},g=function(t){return x(t,0)},h=function(t){return x(t,-1)},p=function(t,e){if(e<0&&(e=0),f(t)){var n=t.data.length;e>n&&(e=n)}return e},v=function(t,e,n){!d(e)||e.hasChildNodes()?t.setStart(e,p(e,n)):t.setStartBefore(e)},b=function(t,e,n){!d(e)||e.hasChildNodes()?t.setEnd(e,p(e,n)):t.setEndAfter(e)},y=function(t){return/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(t)},w=function(t){return/[?!,.;:]/.test(t)},x=function(t,e){var o,i,u,d,m,g,h,p=a(t),x=c(t);if(null===t.dom.getParent(t.selection.getNode(),"a[href]")){var C=t.selection.getRng().cloneRange();if(C.startOffset<5){if(m=C.endContainer.previousSibling,!m){if(!C.endContainer.firstChild||!C.endContainer.firstChild.nextSibling)return;m=C.endContainer.firstChild.nextSibling}if(g=m.length,v(C,m,g),b(C,m,g),C.endOffset<5)return;o=C.endOffset,i=m}else{if(i=C.endContainer,!f(i)&&i.firstChild){while(!f(i)&&i.firstChild)i=i.firstChild;f(i)&&(v(C,i,0),b(C,i,i.nodeValue.length))}o=1===C.endOffset?2:C.endOffset-1-e}var S=o;do{v(C,i,o>=2?o-2:0),b(C,i,o>=1?o-1:0),o-=1,h=C.toString()}while(!l(h)&&o-2>=0);l(C.toString())?(v(C,i,o),b(C,i,S),o+=1):0===C.startOffset?(v(C,i,0),b(C,i,S)):(v(C,i,o),b(C,i,S)),d=C.toString(),w(d.charAt(d.length-1))&&b(C,i,S-1),d=C.toString().trim();var k=d.match(p),T=s(t);if(k){var O=k[0];r(O,"www.")?O=T+"://"+O:n(O,"@")&&!y(O)&&(O="mailto:"+O),u=t.selection.getBookmark(),t.selection.setRng(C),t.execCommand("createlink",!1,O),!1!==x&&t.dom.setAttrib(t.selection.getNode(),"target",x),t.selection.moveToBookmark(u),t.nodeChanged()}}},C=function(t){var e;t.on("keydown",(function(e){if(13===e.keyCode)return h(t)})),o.browser.isIE()?t.on("focus",(function(){if(!e){e=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(n){}}})):(t.on("keypress",(function(e){if(41===e.keyCode||93===e.keyCode||125===e.keyCode)return m(t)})),t.on("keyup",(function(e){if(32===e.keyCode)return g(t)})))};function S(){t.add("autolink",(function(t){C(t)}))}S()})()},"2b07":function(t,e,n){n("dbbc")},"2d33":function(t,e,n){n("303c")},"2fec":function(t,e,n){n("24e8")},"303c":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");function e(){t.add("colorpicker",(function(){}))}e()})()},3154:function(t,e,n){n("f034")},"34de":function(t,e,n){n("09cf")},3699:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.apply(this,arguments)},n=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},r=function(t){return function(e){return n(e)===t}},o=r("string"),i=r("object"),u=r("array"),a=function(t){return null===t||void 0===t},c=function(t){return!a(t)},s=function(){},l=function(t){return function(){return t}},f=function(t){return t},d=l(!1),m=l(!0),g=function(){return h},h=function(){var t=function(t){return t()},e=f,n={fold:function(t,e){return t()},isSome:d,isNone:m,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(void 0),or:e,orThunk:t,map:g,each:s,bind:g,exists:d,forall:m,filter:function(){return g()},toArray:function(){return[]},toString:l("none()")};return n}(),p=function(t){var e=l(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:m,isNone:d,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return p(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:h},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},v=function(t){return null===t||void 0===t?h:p(t)},b={some:p,none:g,from:v},y=Array.prototype.push,w=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},x=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!u(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);y.apply(e,t[n])}return e},C=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},S=Object.keys,k=Object.hasOwnProperty,T=function(t,e){for(var n=S(t),r=0,o=n.length;r<o;r++){var i=n[r],u=t[i];e(u,i)}},O=function(t,e){return E(t,e)?b.from(t[e]):b.none()},E=function(t,e){return k.call(t,e)},_=function(t){return t.getParam("media_scripts")},A=function(t){return t.getParam("audio_template_callback")},D=function(t){return t.getParam("video_template_callback")},M=function(t){return t.getParam("media_live_embeds",!0)},R=function(t){return t.getParam("media_filter_html",!0)},N=function(t){return t.getParam("media_url_resolver")},z=function(t){return t.getParam("media_alt_source",!0)},B=function(t){return t.getParam("media_poster",!0)},L=function(t){return t.getParam("media_dimensions",!0)},H=tinymce.util.Tools.resolve("tinymce.util.Tools"),I=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),P=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),F=function(t,e){if(t)for(var n=0;n<t.length;n++)if(-1!==e.indexOf(t[n].filter))return t[n]},V=I.DOM,U=function(t){return t.replace(/px$/,"")},j=function(t){var e=t.map.style,n=e?V.parseStyle(e):{};return{type:"ephox-embed-iri",source:t.map["data-ephox-embed-iri"],altsource:"",poster:"",width:O(n,"max-width").map(U).getOr(""),height:O(n,"max-height").map(U).getOr("")}},W=function(t,e){var n=C(!1),r={};return P({validate:!1,allow_conditional_comments:!0,start:function(e,o){if(n.get());else if(E(o.map,"data-ephox-embed-iri"))n.set(!0),r=j(o);else{if(r.source||"param"!==e||(r.source=o.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(r.type||(r.type=e),r=H.extend(o.map,r)),"script"===e){var i=F(t,o.map.src);if(!i)return;r={type:"script",source:o.map.src,width:String(i.width),height:String(i.height)}}"source"===e&&(r.source?r.altsource||(r.altsource=o.map.src):r.source=o.map.src),"img"!==e||r.poster||(r.poster=o.map.src)}}}).parse(e),r.source=r.source||r.src||r.data,r.altsource=r.altsource||"",r.poster=r.poster||"",r},q=function(t){var e={mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"},n=t.toLowerCase().split(".").pop(),r=e[n];return r||""},$=tinymce.util.Tools.resolve("tinymce.html.Schema"),G=tinymce.util.Tools.resolve("tinymce.html.Writer"),K=I.DOM,X=function(t){return/^[0-9.]+$/.test(t)?t+"px":t},Y=function(t,e){T(e,(function(e,n){var r=""+e;if(t.map[n]){var o=t.length;while(o--){var i=t[o];i.name===n&&(r?(t.map[n]=r,i.value=r):(delete t.map[n],t.splice(o,1)))}}else r&&(t.push({name:n,value:r}),t.map[n]=r)}))},J=function(t,e){var n=e.map.style,r=n?K.parseStyle(n):{};r["max-width"]=X(t.width),r["max-height"]=X(t.height),Y(e,{style:K.serializeStyle(r)})},Q=["source","altsource"],Z=function(t,e,n){var r,o=G(),i=C(!1),u=0;return P({validate:!1,allow_conditional_comments:!0,comment:function(t){o.comment(t)},cdata:function(t){o.cdata(t)},text:function(t,e){o.text(t,e)},start:function(t,a,c){if(i.get());else if(E(a.map,"data-ephox-embed-iri"))i.set(!0),J(e,a);else{switch(t){case"video":case"object":case"embed":case"img":case"iframe":void 0!==e.height&&void 0!==e.width&&Y(a,{width:e.width,height:e.height});break}if(n)switch(t){case"video":Y(a,{poster:e.poster,src:""}),e.altsource&&Y(a,{src:""});break;case"iframe":Y(a,{src:e.source});break;case"source":if(u<2&&(Y(a,{src:e[Q[u]],type:e[Q[u]+"mime"]}),!e[Q[u]]))return;u++;break;case"img":if(!e.poster)return;r=!0;break}}o.start(t,a,c)},end:function(t){if(!i.get()){if("video"===t&&n)for(var a=0;a<2;a++)if(e[Q[a]]){var c=[];c.map={},u<=a&&(Y(c,{src:e[Q[a]],type:e[Q[a]+"mime"]}),o.start("source",c,!0))}if(e.poster&&"object"===t&&n&&!r){var s=[];s.map={},Y(s,{src:e.poster,width:e.width,height:e.height}),o.start("img",s,!0)}}o.end(t)}},$({})).parse(t),o.getContent()},tt=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],et=function(t){var e=t.match(/^(https?:\/\/|www\.)(.+)$/i);return e&&e.length>1?"www."===e[1]?"https://":e[1]:"https://"},nt=function(t,e){for(var n=et(e),r=t.regex.exec(e),o=n+t.url,i=function(t){o=o.replace("$"+t,(function(){return r[t]?r[t]:""}))},u=0;u<r.length;u++)i(u);return o.replace(/\?$/,"")},rt=function(t){var e=tt.filter((function(e){return e.regex.test(t)}));return e.length>0?H.extend({},e[0],{url:nt(e[0],t)}):null},ot=function(t){var e=t.allowfullscreen?' allowFullscreen="1"':"";return'<iframe src="'+t.source+'" width="'+t.width+'" height="'+t.height+'"'+e+"></iframe>"},it=function(t){var e='<object data="'+t.source+'" width="'+t.width+'" height="'+t.height+'" type="application/x-shockwave-flash">';return t.poster&&(e+='<img src="'+t.poster+'" width="'+t.width+'" height="'+t.height+'" />'),e+="</object>",e},ut=function(t,e){return e?e(t):'<audio controls="controls" src="'+t.source+'">'+(t.altsource?'\n<source src="'+t.altsource+'"'+(t.altsourcemime?' type="'+t.altsourcemime+'"':"")+" />\n":"")+"</audio>"},at=function(t,e){return e?e(t):'<video width="'+t.width+'" height="'+t.height+'"'+(t.poster?' poster="'+t.poster+'"':"")+' controls="controls">\n<source src="'+t.source+'"'+(t.sourcemime?' type="'+t.sourcemime+'"':"")+" />\n"+(t.altsource?'<source src="'+t.altsource+'"'+(t.altsourcemime?' type="'+t.altsourcemime+'"':"")+" />\n":"")+"</video>"},ct=function(t){return'<script src="'+t.source+'"><\/script>'},st=function(t,e){var n=H.extend({},e);if(!n.source&&(H.extend(n,W(_(t),n.embed)),!n.source))return"";n.altsource||(n.altsource=""),n.poster||(n.poster=""),n.source=t.convertURL(n.source,"source"),n.altsource=t.convertURL(n.altsource,"source"),n.sourcemime=q(n.source),n.altsourcemime=q(n.altsource),n.poster=t.convertURL(n.poster,"poster");var r=rt(n.source);if(r&&(n.source=r.url,n.type=r.type,n.allowfullscreen=r.allowFullscreen,n.width=n.width||String(r.w),n.height=n.height||String(r.h)),n.embed)return Z(n.embed,n,!0);var o=F(_(t),n.source);o&&(n.type="script",n.width=String(o.width),n.height=String(o.height));var i=A(t),u=D(t);return n.width=n.width||"300",n.height=n.height||"150",H.each(n,(function(e,r){n[r]=t.dom.encode(""+e)})),"iframe"===n.type?ot(n):"application/x-shockwave-flash"===n.sourcemime?it(n):-1!==n.sourcemime.indexOf("audio")?ut(n,i):"script"===n.type?ct(n):at(n,u)},lt=function(t){return t.hasAttribute("data-mce-object")||t.hasAttribute("data-ephox-embed-iri")},ft=function(t){t.on("click keyup touchend",(function(){var e=t.selection.getNode();e&&t.dom.hasClass(e,"mce-preview-object")&&t.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")})),t.on("ObjectSelected",(function(t){var e=t.target.getAttribute("data-mce-object");"script"===e&&t.preventDefault()})),t.on("ObjectResized",(function(t){var e=t.target;if(e.getAttribute("data-mce-object")){var n=e.getAttribute("data-mce-html");n&&(n=unescape(n),e.setAttribute("data-mce-html",escape(Z(n,{width:String(t.width),height:String(t.height)}))))}}))},dt=tinymce.util.Tools.resolve("tinymce.util.Promise"),mt={},gt=function(t,e,n){return new dt((function(r,o){var i=function(n){return n.html&&(mt[t.source]=n),r({url:t.source,html:n.html?n.html:e(t)})};mt[t.source]?i(mt[t.source]):n({url:t.source},i,o)}))},ht=function(t,e){return dt.resolve({html:e(t),url:t.source})},pt=function(t){return function(e){return st(t,e)}},vt=function(t,e){var n=N(t);return n?gt(e,pt(t),n):ht(e,pt(t))},bt=function(t){return E(mt,t)},yt=function(t,e){return O(e,t).bind((function(t){return O(t,"meta")}))},wt=function(t,e,n){return function(r){var o,u=function(){return O(t,r)},a=function(){return O(e,r)},c=function(t){return O(t,"value").bind((function(t){return t.length>0?b.some(t):b.none()}))},s=function(){return u().bind((function(t){return i(t)?c(t).orThunk(a):a().orThunk((function(){return b.from(t)}))}))},l=function(){return a().orThunk((function(){return u().bind((function(t){return i(t)?c(t):b.from(t)}))}))};return o={},o[r]=(r===n?s():l()).getOr(""),o}},xt=function(t,e){var n={};return O(t,"dimensions").each((function(t){w(["width","height"],(function(r){O(e,r).orThunk((function(){return O(t,r)})).each((function(t){return n[r]=t}))}))})),n},Ct=function(t,n){var r=n?yt(n,t).getOr({}):{},o=wt(t,r,n);return e(e(e(e(e({},o("source")),o("altsource")),o("poster")),o("embed")),xt(t,r))},St=function(t){var n=e(e({},t),{source:{value:O(t,"source").getOr("")},altsource:{value:O(t,"altsource").getOr("")},poster:{value:O(t,"poster").getOr("")}});return w(["width","height"],(function(e){O(t,e).each((function(t){var r=n.dimensions||{};r[e]=t,n.dimensions=r}))})),n},kt=function(t){return function(e){var n=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";t.notificationManager.open({type:"error",text:n})}},Tt=function(t,e){return W(_(t),e)},Ot=function(t){var n=t.selection.getNode(),r=lt(n)?t.serializer.serialize(n,{selection:!0}):"";return e({embed:r},W(_(t),r))},Et=function(t,n){return function(r){if(o(r.url)&&r.url.trim().length>0){var i=r.html,u=Tt(n,i),a=e(e({},u),{source:r.url,embed:i});t.setData(St(a))}}},_t=function(t,e){for(var n=t.dom.select("*[data-mce-object]"),r=0;r<e.length;r++)for(var o=n.length-1;o>=0;o--)e[r]===n[o]&&n.splice(o,1);t.selection.select(n[0])},At=function(t,e){var n=t.dom.select("*[data-mce-object]");t.insertContent(e),_t(t,n),t.nodeChanged()},Dt=function(t,e,n){e.embed=Z(e.embed,e),e.embed&&(t.source===e.source||bt(e.source))?At(n,e.embed):vt(n,e).then((function(t){At(n,t.html)})).catch(kt(n))},Mt=function(t){var n=Ot(t),r=C(n),o=St(n),i=function(e,n){var r=Ct(n.getData(),"source");e.source!==r.source&&(Et(v,t)({url:r.source,html:""}),vt(t,r).then(Et(v,t)).catch(kt(t)))},u=function(e){var n=Ct(e.getData()),r=Tt(t,n.embed);e.setData(St(r))},a=function(n,r){var o=Ct(n.getData(),r),i=st(t,o);n.setData(St(e(e({},o),{embed:i})))},c=[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],s=L(t)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[],l={title:"General",name:"general",items:x([c,s])},f={type:"textarea",name:"embed",label:"Paste your embed code below:"},d={title:"Embed",items:[f]},m=[];z(t)&&m.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),B(t)&&m.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var g={title:"Advanced",name:"advanced",items:m},h=[l,d];m.length>0&&h.push(g);var p={type:"tabpanel",tabs:h},v=t.windowManager.open({title:"Insert/Edit Media",size:"normal",body:p,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var n=Ct(e.getData());Dt(r.get(),n,t),e.close()},onChange:function(t,e){switch(e.name){case"source":i(r.get(),t);break;case"embed":u(t);break;case"dimensions":case"altsource":case"poster":a(t,e.name);break}r.set(Ct(t.getData()))},initialData:o})},Rt=function(t){var e=function(){Mt(t)};return{showDialog:e}},Nt=function(t){var e=function(){Mt(t)};t.addCommand("mceMedia",e)},zt=tinymce.util.Tools.resolve("tinymce.html.Node"),Bt=tinymce.util.Tools.resolve("tinymce.Env"),Lt=tinymce.util.Tools.resolve("tinymce.html.DomParser"),Ht=function(t,e){if(!1===R(t))return e;var n,r=G();return P({validate:!1,allow_conditional_comments:!1,comment:function(t){n||r.comment(t)},cdata:function(t){n||r.cdata(t)},text:function(t,e){n||r.text(t,e)},start:function(e,o,i){if(n=!0,"script"!==e&&"noscript"!==e&&"svg"!==e){for(var u=o.length-1;u>=0;u--){var a=o[u].name;0===a.indexOf("on")&&(delete o.map[a],o.splice(u,1)),"style"===a&&(o[u].value=t.dom.serializeStyle(t.dom.parseStyle(o[u].value),e))}r.start(e,o,i),n=!1}},end:function(t){n||r.end(t)}},$({})).parse(e),r.getContent()},It=function(t){var e=t.name;return"iframe"===e||"video"===e||"audio"===e},Pt=function(t,e,n,r){void 0===r&&(r=null);var o=t.attr(n);return c(o)?o:E(e,n)?null:r},Ft=function(t,e,n){var r="img"===e.name||"video"===t.name,o=r?"300":null,i="audio"===t.name?"30":"150",u=r?i:null;e.attr({width:Pt(t,n,"width",o),height:Pt(t,n,"height",u)})},Vt=function(t,e,n,r){var o=Lt({forced_root_block:!1,validate:!1},t.schema).parse(r,{context:e});while(o.firstChild)n.append(o.firstChild)},Ut=function(t,e){var n=e.name,r=new zt("img",1);return r.shortEnded=!0,Wt(t,e,r),Ft(e,r,{}),r.attr({style:e.attr("style"),src:Bt.transparentSrc,"data-mce-object":n,class:"mce-object mce-object-"+n}),r},jt=function(t,e){var n=e.name,r=new zt("span",1);r.attr({contentEditable:"false",style:e.attr("style"),"data-mce-object":n,class:"mce-preview-object mce-object-"+n}),Wt(t,e,r);var o=t.dom.parseStyle(e.attr("style")),i=new zt(n,1);if(Ft(e,i,o),i.attr({src:e.attr("src"),style:e.attr("style"),class:e.attr("class")}),"iframe"===n)i.attr({allowfullscreen:e.attr("allowfullscreen"),frameborder:"0"});else{var u=["controls","crossorigin","currentTime","loop","muted","poster","preload"];w(u,(function(t){i.attr(t,e.attr(t))}));var a=r.attr("data-mce-html");c(a)&&Vt(t,n,i,unescape(a))}var s=new zt("span",1);return s.attr("class","mce-shim"),r.append(i),r.append(s),r},Wt=function(t,e,n){var r=e.attributes,o=r.length;while(o--){var i=r[o].name,u=r[o].value;"width"!==i&&"height"!==i&&"style"!==i&&("data"!==i&&"src"!==i||(u=t.convertURL(u,i)),n.attr("data-mce-p-"+i,u))}var a=e.firstChild&&e.firstChild.value;a&&(n.attr("data-mce-html",escape(Ht(t,a))),n.firstChild=null)},qt=function(t){var e=t.attr("class");return e&&/\btiny-pageembed\b/.test(e)},$t=function(t){while(t=t.parent)if(t.attr("data-ephox-embed-iri")||qt(t))return!0;return!1},Gt=function(t){return function(e){var n,r,o=e.length;while(o--)n=e[o],n.parent&&(n.parent.attr("data-mce-object")||("script"!==n.name||(r=F(_(t),n.attr("src")),r))&&(r&&(r.width&&n.attr("width",r.width.toString()),r.height&&n.attr("height",r.height.toString())),It(n)&&M(t)&&Bt.ceFalse?$t(n)||n.replace(jt(t,n)):$t(n)||n.replace(Ut(t,n))))}},Kt=function(t){t.on("preInit",(function(){var e=t.schema.getSpecialElements();H.each("video audio iframe object".split(" "),(function(t){e[t]=new RegExp("</"+t+"[^>]*>","gi")}));var n=t.schema.getBoolAttrs();H.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),(function(t){n[t]={}})),t.parser.addNodeFilter("iframe,video,audio,object,embed,script",Gt(t)),t.serializer.addAttributeFilter("data-mce-object",(function(e,n){var r,o,i,u,a,c,s,l,f=e.length;while(f--)if(r=e[f],r.parent){s=r.attr(n),o=new zt(s,1),"audio"!==s&&"script"!==s&&(l=r.attr("class"),l&&-1!==l.indexOf("mce-preview-object")?o.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):o.attr({width:r.attr("width"),height:r.attr("height")})),o.attr({style:r.attr("style")}),u=r.attributes,i=u.length;while(i--){var d=u[i].name;0===d.indexOf("data-mce-p-")&&o.attr(d.substr(11),u[i].value)}"script"===s&&o.attr("type","text/javascript"),a=r.attr("data-mce-html"),a&&(c=new zt("#text",3),c.raw=!0,c.value=Ht(t,unescape(a)),o.append(c)),r.replace(o)}}))})),t.on("SetContent",(function(){t.$("span.mce-preview-object").each((function(e,n){var r=t.$(n);0===r.find("span.mce-shim").length&&r.append('<span class="mce-shim"></span>')}))}))},Xt=function(t){t.on("ResolveName",(function(t){var e;1===t.target.nodeType&&(e=t.target.getAttribute("data-mce-object"))&&(t.name=e)}))},Yt=function(t){var e=function(){return t.execCommand("mceMedia")};t.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:e,onSetup:function(e){var n=t.selection;return e.setActive(lt(n.getNode())),n.selectorChangedWithUnbind("img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]",e.setActive).unbind}}),t.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:e})};function Jt(){t.add("media",(function(t){return Nt(t),Yt(t),Xt(t),Kt(t),ft(t),Rt(t)}))}Jt()})()},"3ad8":function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};function r(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var o=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},i=function(t){return function(e){return o(e)===t}},u=i("string"),a=i("object"),c=i("array"),s=function(){},l=function(t){return function(){return t}},f=function(t){return t},d=function(t){return function(){throw new Error(t)}},m=l(!1),g=l(!0),h=function(){return p},p=function(){var t=function(t){return t()},e=f,n={fold:function(t,e){return t()},isSome:m,isNone:g,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(void 0),or:e,orThunk:t,map:h,each:s,bind:h,exists:m,forall:g,filter:function(){return h()},toArray:function(){return[]},toString:l("none()")};return n}(),v=function(t){var e=l(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:g,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return v(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:p},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},b=function(t){return null===t||void 0===t?p:v(t)},y={some:v,none:h,from:b},w=Array.prototype.slice,x=Array.prototype.indexOf,C=function(t,e){return x.call(t,e)},S=function(t,e){return C(t,e)>-1},k=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},T=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},O=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];e(r,n)}},E=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},_=function(t,e,n){return O(t,(function(t,r){n=e(n,t,r)})),n},A=function(t,e,n){return T(t,(function(t,r){n=e(n,t,r)})),n},D=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return y.some(i);if(n(i,r))break}return y.none()},M=function(t,e){return D(t,e,m)},R=function(t,e){for(var n=0,r=t.length;n<r;++n){var o=t[n];if(!0!==e(o,n))return!1}return!0},N=function(t,e){var n=w.call(t,0);return n.sort(e),n},z=function(t,e){return e>=0&&e<t.length?y.some(t[e]):y.none()},B=function(t){return z(t,0)},L=Object.keys,H=Object.hasOwnProperty,I=function(t,e){return H.call(t,e)},P=function(t){if(!c(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 T(t,(function(r,o){var i=L(r);if(1!==i.length)throw new Error("one and only one name per case");var u=i[0],a=r[u];if(void 0!==n[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!c(a))throw new Error("case arguments must be an array");e.push(u),n[u]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==a.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+a.length+" ("+a+"), got "+i);var c=function(t){var r=L(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));var o=R(e,(function(t){return S(r,t)}));if(!o)throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[u].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:c,log:function(t){console.log(t,{constructors:e,constructor:u,params:n})}}}})),n},F={generate:P};F.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var V=function(t){var e=[],n=[];return T(t,(function(t){t.fold((function(t){e.push(t)}),(function(t){n.push(t)}))})),{errors:e,values:n}},U=function(t){var e=function(e){return U(t)},n=function(e){return U(t)},r=function(e){return U(e(t))},o=function(e){return U(t)},i=function(e){e(t)},u=function(e){return e(t)},a=function(e,n){return n(t)},c=function(e){return e(t)},s=function(e){return e(t)},f=function(){return y.some(t)};return{isValue:g,isError:m,getOr:l(t),getOrThunk:l(t),getOrDie:l(t),or:e,orThunk:n,fold:a,map:r,mapError:o,each:i,bind:u,exists:c,forall:s,toOptional:f}},j=function(t){var e=function(t){return t()},n=function(){return d(String(t))()},r=f,o=function(t){return t()},i=function(e){return j(t)},u=function(e){return j(e(t))},a=function(e){return j(t)},c=function(e,n){return e(t)};return{isValue:m,isError:g,getOr:f,getOrThunk:e,getOrDie:n,or:r,orThunk:o,fold:c,map:i,mapError:u,each:s,bind:a,exists:m,forall:g,toOptional:y.none}},W=function(t,e){return t.fold((function(){return j(e)}),U)},q={value:U,error:j,fromOption:W},$=function(t){return"inline-command"===t.type||"inline-format"===t.type},G=function(t){return"block-command"===t.type||"block-format"===t.type},K=function(t){return N(t,(function(t,e){return t.start.length===e.start.length?0:t.start.length>e.start.length?-1:1}))},X=function(t){var e=function(e){return q.error({message:e,pattern:t})},n=function(n,r,o){if(void 0!==t.format){var i=void 0;if(c(t.format)){if(!R(t.format,u))return e(n+" pattern has non-string items in the `format` array");i=t.format}else{if(!u(t.format))return e(n+" pattern has non-string `format` parameter");i=[t.format]}return q.value(r(i))}return void 0!==t.cmd?u(t.cmd)?q.value(o(t.cmd,t.value)):e(n+" pattern has non-string `cmd` parameter"):e(n+" pattern is missing both `format` and `cmd` parameters")};if(!a(t))return e("Raw pattern is not an object");if(!u(t.start))return e("Raw pattern is missing `start` parameter");if(void 0!==t.end){if(!u(t.end))return e("Inline pattern has non-string `end` parameter");if(0===t.start.length&&0===t.end.length)return e("Inline pattern has empty `start` and `end` parameters");var r=t.start,o=t.end;return 0===o.length&&(o=r,r=""),n("Inline",(function(t){return{type:"inline-format",start:r,end:o,format:t}}),(function(t,e){return{type:"inline-command",start:r,end:o,cmd:t,value:e}}))}return void 0!==t.replacement?u(t.replacement)?0===t.start.length?e("Replacement pattern has empty `start` parameter"):q.value({type:"inline-command",start:"",end:t.start,cmd:"mceInsertContent",value:t.replacement}):e("Replacement pattern has non-string `replacement` parameter"):0===t.start.length?e("Block pattern has empty `start` parameter"):n("Block",(function(e){return{type:"block-format",start:t.start,format:e[0]}}),(function(e,n){return{type:"block-command",start:t.start,cmd:e,value:n}}))},Y=function(t){return"block-command"===t.type?{start:t.start,cmd:t.cmd,value:t.value}:"block-format"===t.type?{start:t.start,format:t.format}:"inline-command"===t.type?"mceInsertContent"===t.cmd&&""===t.start?{start:t.end,replacement:t.value}:{start:t.start,end:t.end,cmd:t.cmd,value:t.value}:"inline-format"===t.type?{start:t.start,end:t.end,format:1===t.format.length?t.format[0]:t.format}:void 0},J=function(t){return{inlinePatterns:E(t,$),blockPatterns:K(E(t,G))}},Q=function(t){var e=function(e){var n=V(k(e,X));if(n.errors.length>0){var r=n.errors[0];throw new Error(r.message+":\n"+JSON.stringify(r.pattern,null,2))}t.set(J(n.values))},n=function(){return r(r([],k(t.get().inlinePatterns,Y),!0),k(t.get().blockPatterns,Y),!0)};return{setPatterns:e,getPatterns:n}},Z="undefined"!==typeof window?window:Function("return this;")(),tt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Z.console;n&&(n.error?n.error.apply(n,t):n.log.apply(n,t))},et=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],nt=function(t){var e=t.getParam("textpattern_patterns",et,"array");if(!c(e))return tt("The setting textpattern_patterns should be an array"),{inlinePatterns:[],blockPatterns:[]};var n=V(k(e,X));return T(n.errors,(function(t){return tt(t.message,t.pattern)})),J(n.values)},rt=function(t){var e=t.getParam("forced_root_block","p");return!1===e?"":!0===e?"p":e},ot=tinymce.util.Tools.resolve("tinymce.util.Delay"),it=tinymce.util.Tools.resolve("tinymce.util.VK"),ut="\ufeff",at=" ",ct=tinymce.util.Tools.resolve("tinymce.util.Tools"),st=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),lt=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),ft=function(t,e){return{container:t,offset:e}},dt=function(t){return t.nodeType===Node.TEXT_NODE},mt=function(t,e,n){if(e&&t.isEmpty(e)&&!n(e)){var r=e.parentNode;t.remove(e),mt(t,r,n)}},gt=function(t,e,n,r){void 0===r&&(r=!0);var o=e.startContainer.parentNode,i=e.endContainer.parentNode;e.deleteContents(),r&&!n(e.startContainer)&&(dt(e.startContainer)&&0===e.startContainer.data.length&&t.remove(e.startContainer),dt(e.endContainer)&&0===e.endContainer.data.length&&t.remove(e.endContainer),mt(t,o,n),o!==i&&mt(t,i,n))},ht=function(t,e){var n=e.get(t);return c(n)&&B(n).exists((function(t){return I(t,"block")}))},pt=function(t){return 0===t.start.length},vt=function(t,e){var n=y.from(t.dom.getParent(e.startContainer,t.dom.isBlock));return""===rt(t)?n.orThunk((function(){return y.some(t.getBody())})):n},bt=st.DOM,yt=function(t){return function(e){return t===e?-1:0}},wt=function(t){return function(e){return t.isBlock(e)||S(["BR","IMG","HR","INPUT"],e.nodeName)||"false"===t.getContentEditable(e)}},xt=function(t,e,n){if(dt(t)&&e>=0)return y.some(ft(t,e));var r=lt(bt);return y.from(r.backwards(t,e,yt(t),n)).map((function(t){return ft(t.container,t.container.data.length)}))},Ct=function(t,e,n){if(dt(t)&&e>=t.length)return y.some(ft(t,e));var r=lt(bt);return y.from(r.forwards(t,e,yt(t),n)).map((function(t){return ft(t.container,0)}))},St=function(t,e,n){if(!dt(t))return y.none();var r=t.textContent;if(e>=0&&e<=r.length)return y.some(ft(t,e));var o=lt(bt);return y.from(o.backwards(t,e,yt(t),n)).bind((function(t){var r=t.container.data;return St(t.container,e+r.length,n)}))},kt=function(t,e,n){if(!dt(t))return y.none();var r=t.textContent;if(e<=r.length)return y.some(ft(t,e));var o=lt(bt);return y.from(o.forwards(t,e,yt(t),n)).bind((function(t){return kt(t.container,e-r.length,n)}))},Tt=function(t,e,n,r,o){var i=lt(t,wt(t));return y.from(i.backwards(e,n,r,o))},Ot=function(t,e,n){if(dt(e)&&(n<0||n>e.data.length))return[];var r=[n],o=e;while(o!==t&&o.parentNode){for(var i=o.parentNode,u=0;u<i.childNodes.length;u++)if(i.childNodes[u]===o){r.push(u);break}o=i}return o===t?r.reverse():[]},Et=function(t,e,n,r,o){var i=Ot(t,e,n),u=Ot(t,r,o);return{start:i,end:u}},_t=function(t,e){var n=e.slice(),r=n.pop(),o=A(n,(function(t,e){return t.bind((function(t){return y.from(t.childNodes[e])}))}),y.some(t));return o.bind((function(t){return dt(t)&&(r<0||r>t.data.length)?y.none():y.some({node:t,offset:r})}))},At=function(t,e){return _t(t,e.start).bind((function(n){var r=n.node,o=n.offset;return _t(t,e.end).map((function(t){var e=t.node,n=t.offset,i=document.createRange();return i.setStart(r,o),i.setEnd(e,n),i}))}))},Dt=function(t,e){return Et(t,e.startContainer,e.startOffset,e.endContainer,e.endOffset)},Mt=function(t,e,n){var r=Ct(e,0,e);r.each((function(r){var o=r.container;kt(o,n.start.length,e).each((function(n){var r=t.createRng();r.setStart(o,0),r.setEnd(n.container,n.offset),gt(t,r,(function(t){return t===e}))}))}))},Rt=function(t,e){var n=t.dom,r=e.pattern,o=At(n.getRoot(),e.range).getOrDie("Unable to resolve path range");return vt(t,o).each((function(e){"block-format"===r.type?ht(r.format,t.formatter)&&t.undoManager.transact((function(){Mt(t.dom,e,r),t.formatter.apply(r.format)})):"block-command"===r.type&&t.undoManager.transact((function(){Mt(t.dom,e,r),t.execCommand(r.cmd,!1,r.value)}))})),!0},Nt=function(t,e){var n=e.replace(at," ");return M(t,(function(t){return 0===e.indexOf(t.start)||0===n.indexOf(t.start)}))},zt=function(t,e){var n=t.dom,r=t.selection.getRng();return vt(t,r).filter((function(e){var r=rt(t),o=""===r&&n.is(e,"body")||n.is(e,r);return null!==e&&o})).bind((function(t){var r=t.textContent,o=Nt(e,r);return o.map((function(e){return ct.trim(r).length===e.start.length?[]:[{pattern:e,range:Et(n.getRoot(),t,0,t,0)}]}))})).getOr([])},Bt=function(t,e){if(0!==e.length){var n=t.selection.getBookmark();T(e,(function(e){return Rt(t,e)})),t.selection.moveToBookmark(n)}},Lt=0,Ht=function(t){var e=new Date,n=e.getTime(),r=Math.floor(1e9*Math.random());return Lt++,t+"_"+r+Lt+String(n)},It=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},Pt=function(t,e){return It(t,e,t.length-e.length)},Ft=function(t,e){return t.create("span",{"data-mce-type":"bookmark",id:e})},Vt=function(t,e){var n=t.createRng();return n.setStartAfter(e.start),n.setEndBefore(e.end),n},Ut=function(t,e,n){var r=At(t.getRoot(),n).getOrDie("Unable to resolve path range"),o=r.startContainer,i=r.endContainer,u=0===r.endOffset?i:i.splitText(r.endOffset),a=0===r.startOffset?o:o.splitText(r.startOffset);return{prefix:e,end:u.parentNode.insertBefore(Ft(t,e+"-end"),u),start:a.parentNode.insertBefore(Ft(t,e+"-start"),a)}},jt=function(t,e,n){mt(t,t.get(e.prefix+"-end"),n),mt(t,t.get(e.prefix+"-start"),n)},Wt=function(t,e,n){return function(t,e){var r=t.data,o=r.substring(0,e),i=o.lastIndexOf(n.charAt(n.length-1)),u=o.lastIndexOf(n);return-1!==u?u+n.length:-1!==i?i+1:-1}},qt=function(t,e,n,r){var o=e.start,i=Tt(t,r.container,r.offset,Wt(t,n,o),n);return i.bind((function(r){if(r.offset>=o.length){var i=t.createRng();return i.setStart(r.container,r.offset-o.length),i.setEnd(r.container,r.offset),y.some(i)}var u=r.offset-o.length;return St(r.container,u,n).map((function(e){var n=t.createRng();return n.setStart(e.container,e.offset),n.setEnd(r.container,r.offset),n})).filter((function(t){return t.toString()===o})).orThunk((function(){return qt(t,e,n,ft(r.container,0))}))}))},$t=function(t,e,n,r,o,i){if(void 0===i&&(i=!1),0===e.start.length&&!i){var u=t.createRng();return u.setStart(n,r),u.setEnd(n,r),y.some(u)}return xt(n,r,o).bind((function(n){var r=qt(t,e,o,n);return r.bind((function(t){if(i){if(t.endContainer===n.container&&t.endOffset===n.offset)return y.none();if(0===n.offset&&t.endContainer.textContent.length===t.endOffset)return y.none()}return y.some(t)}))}))},Gt=function(t,e,n){var r=t.dom,o=r.getRoot(),i=n.pattern,u=n.position.container,a=n.position.offset;return St(u,a-n.pattern.end.length,e).bind((function(c){var s=Et(o,c.container,c.offset,u,a);if(pt(i))return y.some({matches:[{pattern:i,startRng:s,endRng:s}],position:c});var l=Kt(t,n.remainingPatterns,c.container,c.offset,e),f=l.getOr({matches:[],position:c}),d=f.position,m=$t(r,i,d.container,d.offset,e,l.isNone());return m.map((function(t){var e=Dt(o,t);return{matches:f.matches.concat([{pattern:i,startRng:e,endRng:s}]),position:ft(t.startContainer,t.startOffset)}}))}))},Kt=function(t,e,n,r,o){var i=t.dom;return xt(n,r,i.getRoot()).bind((function(u){var a=i.createRng();a.setStart(o,0),a.setEnd(n,r);for(var c=a.toString(),s=0;s<e.length;s++){var l=e[s];if(Pt(c,l.end)){var f=e.slice();f.splice(s,1);var d=Gt(t,o,{pattern:l,remainingPatterns:f,position:u});if(d.isSome())return d}}return y.none()}))},Xt=function(t,e,n){t.selection.setRng(n),"inline-format"===e.type?T(e.format,(function(e){t.formatter.apply(e)})):t.execCommand(e.cmd,!1,e.value)},Yt=function(t,e,n,r){var o=Vt(t.dom,n);gt(t.dom,o,r),Xt(t,e,o)},Jt=function(t,e,n,r,o){var i=t.dom,u=Vt(i,r),a=Vt(i,n);gt(i,a,o),gt(i,u,o);var c={prefix:n.prefix,start:n.end,end:r.start},s=Vt(i,c);Xt(t,e,s)},Qt=function(t,e){var r=Ht("mce_textpattern"),o=_(e,(function(e,o){var i=Ut(t,r+"_end"+e.length,o.endRng);return e.concat([n(n({},o),{endMarker:i})])}),[]);return _(o,(function(e,i){var u=o.length-e.length-1,a=pt(i.pattern)?i.endMarker:Ut(t,r+"_start"+u,i.startRng);return e.concat([n(n({},i),{startMarker:a})])}),[])},Zt=function(t,e,n){var r=t.selection.getRng();return!1===r.collapsed?[]:vt(t,r).bind((function(o){var i=r.startOffset-(n?1:0);return Kt(t,e,r.startContainer,i,o)})).fold((function(){return[]}),(function(t){return t.matches}))},te=function(t,e){if(0!==e.length){var n=t.dom,r=t.selection.getBookmark(),o=Qt(n,e);T(o,(function(e){var r=n.getParent(e.startMarker.start,n.isBlock),o=function(t){return t===r};pt(e.pattern)?Yt(t,e.pattern,e.endMarker,o):Jt(t,e.pattern,e.startMarker,e.endMarker,o),jt(n,e.endMarker,o),jt(n,e.startMarker,o)})),t.selection.moveToBookmark(r)}},ee=function(t,e){if(!t.selection.isCollapsed())return!1;var n=Zt(t,e.inlinePatterns,!1),r=zt(t,e.blockPatterns);return(r.length>0||n.length>0)&&(t.undoManager.add(),t.undoManager.extra((function(){t.execCommand("mceInsertNewLine")}),(function(){t.insertContent(ut),te(t,n),Bt(t,r);var e=t.selection.getRng(),o=xt(e.startContainer,e.startOffset,t.dom.getRoot());t.execCommand("mceInsertNewLine"),o.each((function(e){var n=e.container;n.data.charAt(e.offset-1)===ut&&(n.deleteData(e.offset-1,1),mt(t.dom,n.parentNode,(function(e){return e===t.dom.getRoot()})))}))})),!0)},ne=function(t,e){var n=Zt(t,e.inlinePatterns,!0);n.length>0&&t.undoManager.transact((function(){te(t,n)}))},re=function(t,e,n){for(var r=0;r<t.length;r++)if(n(t[r],e))return!0;return!1},oe=function(t,e){return re(t,e,(function(t,e){return t===e.keyCode&&!1===it.modifierPressed(e)}))},ie=function(t,e){return re(t,e,(function(t,e){return t.charCodeAt(0)===e.charCode}))},ue=function(t,e){var n=[",",".",";",":","!","?"],r=[32];t.on("keydown",(function(n){13!==n.keyCode||it.modifierPressed(n)||ee(t,e.get())&&n.preventDefault()}),!0),t.on("keyup",(function(n){oe(r,n)&&ne(t,e.get())})),t.on("keypress",(function(r){ie(n,r)&&ot.setEditorTimeout(t,(function(){ne(t,e.get())}))}))};function ae(){e.add("textpattern",(function(e){var n=t(nt(e));return ue(e,n),Q(n)}))}ae()})()},"3aea":function(t,e,n){n("3699")},"3b47":function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){var e=function(e){var n=t.get();n[e.name]=e,t.set(n)};return{addTab:e}},r=function(t,e){t.addCommand("mceHelp",e)},o=function(t,e){t.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:e}),t.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:e})},i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},u=function(){},a=function(t){return function(){return t}},c=function(t){return t},s=a(!1),l=a(!0),f=function(){return d},d=function(){var t=function(t){return t()},e=c,n={fold:function(t,e){return t()},isSome:s,isNone:l,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(void 0),or:e,orThunk:t,map:f,each:u,bind:f,exists:s,forall:l,filter:function(){return f()},toArray:function(){return[]},toString:a("none()")};return n}(),m=function(t){var e=a(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:l,isNone:s,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return m(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:d},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},g=function(t){return null===t||void 0===t?d:m(t)},h={some:m,none:f,from:g},p=Array.prototype.indexOf,v=function(t,e){return p.call(t,e)},b=function(t,e){return v(t,e)>-1},y=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},w=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},x=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return h.some(i);if(n(i,r))break}return h.none()},C=function(t,e){return x(t,e,s)},S=Object.keys,k=Object.hasOwnProperty,T=function(t,e){return O(t,e)?h.from(t[e]):h.none()},O=function(t,e){return k.call(t,e)},E=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},_=function(t){return h.from(t.getParam("help_tabs"))},A=function(t){return t.getParam("forced_plugins")},D="<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n <li>Focus the menubar: Alt + F9 (Windows) or &#x2325;F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or &#x2325;F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or &#x2325;F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n <li>the menubar</li>\n <li>each group of the toolbar </li>\n <li>the sidebar</li>\n <li>the element path in the footer </li>\n <li>the wordcount toggle button in the footer </li>\n <li>the branding link in the footer </li>\n <li>the editor resize handle in the footer</li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n <li>moving between menus in the menubar</li>\n <li>moving between buttons in a toolbar group</li>\n <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or &#x2303;F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tabs components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>",M=function(){var t={type:"htmlpanel",presets:"document",html:D};return{name:"keyboardnav",title:"Keyboard Navigation",items:[t]}},R=tinymce.util.Tools.resolve("tinymce.Env"),N=function(t){var e={alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"},n={meta:"Ctrl ",access:"Shift + Alt "},r=R.mac?e:n,o=t.split("+"),i=y(o,(function(t){var e=t.toLowerCase().trim();return O(r,e)?r[e]:t}));return R.mac?i.join("").replace(/\s/,""):i.join("+")},z=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Heading 1"},{shortcuts:["Access + 2"],action:"Heading 2"},{shortcuts:["Access + 3"],action:"Heading 3"},{shortcuts:["Access + 4"],action:"Heading 4"},{shortcuts:["Access + 5"],action:"Heading 5"},{shortcuts:["Access + 6"],action:"Heading 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],B=function(){var t=y(z,(function(t){var e=y(t.shortcuts,N).join(" or ");return[t.action,e]})),e={type:"table",header:["Action","Shortcut"],cells:t};return{name:"shortcuts",title:"Handy Shortcuts",items:[e]}},L=tinymce.util.Tools.resolve("tinymce.util.I18n"),H=y([{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"noneditable",name:"Noneditable"},{key:"pagebreak",name:"Page Break"},{key:"paste",name:"Paste"},{key:"preview",name:"Preview"},{key:"print",name:"Print"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"spellchecker",name:"Spell Checker"},{key:"tabfocus",name:"Tab Focus"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"textpattern",name:"Text Pattern"},{key:"toc",name:"Table of Contents"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"advcode",name:"Advanced Code Editor",type:"premium"},{key:"advtable",name:"Advanced Tables",type:"premium"},{key:"autocorrect",name:"Autocorrect",type:"premium"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"export",name:"Export",type:"premium"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium"},{key:"rtc",name:"Real-Time Collaboration",type:"premium"},{key:"tinymcespellchecker",name:"Spell Checker Pro",type:"premium"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium"}],(function(t){return i(i({},t),{type:t.type||"opensource",slug:t.slug||t.key})})),I=function(t){var e=function(){var t=w(H,(function(t){var e=t.key,n=t.type;return"autocorrect"!==e&&"premium"===n})),e=y(t,(function(t){return"<li>"+L.translate(t.name)+"</li>"})).join("");return'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+L.translate("Premium plugins:")+"</b></p><ul>"+e+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">'+L.translate("Learn more...")+"</a></li></ul></div>"},n=function(t){return'<a href="'+t.url+'" target="_blank" rel="noopener">'+t.name+"</a>"},r=function(t,e){return C(H,(function(t){return t.key===e})).fold((function(){var r=t.plugins[e].getMetadata;return"function"===typeof r?n(r()):e}),(function(t){var e="premium"===t.type?t.name+"*":t.name;return n({name:e,url:"https://www.tiny.cloud/docs/plugins/"+t.type+"/"+t.slug})}))},o=function(t){var e=S(t.plugins),n=A(t);return void 0===n?e:w(e,(function(t){return!b(n,t)}))},i=function(t){var e=o(t),n=y(e,(function(e){return"<li>"+r(t,e)+"</li>"})),i=n.length,u=n.join(""),a="<p><b>"+L.translate(["Plugins installed ({0}):",i])+"</b></p><ul>"+u+"</ul>";return a},u=function(t){return null==t?"":'<div data-mce-tabstop="1" tabindex="-1">'+i(t)+"</div>"},a={type:"htmlpanel",presets:"document",html:[u(t),e()].join("")};return{name:"plugins",title:"Plugins",items:[a]}},P=tinymce.util.Tools.resolve("tinymce.EditorManager"),F=function(){var t=function(t,e){return 0===t.indexOf("@")?"X.X.X":t+"."+e},e=t(P.majorVersion,P.minorVersion),n='<a href="https://www.tiny.cloud/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+e+"</a>",r={type:"htmlpanel",html:"<p>"+L.translate(["You are using {0}",n])+"</p>",presets:"document"};return{name:"versions",title:"Version",items:[r]}},V=function(t,e){var n={},r=y(t,(function(t){return"string"===typeof t?(O(e,t)&&(n[t]=e[t]),t):(n[t.name]=t,t.name)}));return{tabs:n,names:r}},U=function(t){var e=S(t),n=e.indexOf("versions");return-1!==n&&(e.splice(n,1),e.push("versions")),{tabs:t,names:e}},j=function(t,e){var n,r=B(),o=M(),u=I(t),a=F(),c=i((n={},n[r.name]=r,n[o.name]=o,n[u.name]=u,n[a.name]=a,n),e.get());return _(t).fold((function(){return U(c)}),(function(t){return V(t,c)}))},W=function(t,e){return function(){var n=j(t,e),r=n.tabs,o=n.names,i=y(o,(function(t){return T(r,t)})),u=E(i),a={type:"tabpanel",tabs:u};t.windowManager.open({title:"Help",size:"medium",body:a,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}};function q(){e.add("help",(function(e){var i=t({}),u=n(i),a=W(e,i);return o(e,a),r(e,a),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),u}))}q()})()},"466d":function(t,e,n){"use strict";var r=n("d784"),o=n("825a"),i=n("50c4"),u=n("1d80"),a=n("8aa5"),c=n("14c3");r("match",1,(function(t,e,n){return[function(e){var n=u(this),r=void 0==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var u=o(t),s=String(this);if(!u.global)return c(u,s);var l=u.unicode;u.lastIndex=0;var f,d=[],m=0;while(null!==(f=c(u,s))){var g=String(f[0]);d[m]=g,""===g&&(u.lastIndex=a(s,i(u.lastIndex),l)),m++}return 0===m?null:d}]}))},"4bdc":function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t,e){t.fire("VisualBlocks",{state:e})},r=function(t,e,r){var o=t.dom;o.toggleClass(t.getBody(),"mce-visualblocks"),r.set(!r.get()),n(t,r.get())},o=function(t,e,n){t.addCommand("mceVisualBlocks",(function(){r(t,e,n)}))},i=function(t){return t.getParam("visualblocks_default_state",!1,"boolean")},u=function(t,e,n){t.on("PreviewFormats AfterPreviewFormats",(function(e){n.get()&&t.dom.toggleClass(t.getBody(),"mce-visualblocks","afterpreviewformats"===e.type)})),t.on("init",(function(){i(t)&&r(t,e,n)}))},a=function(t,e){return function(n){n.setActive(e.get());var r=function(t){return n.setActive(t.state)};return t.on("VisualBlocks",r),function(){return t.off("VisualBlocks",r)}}},c=function(t,e){var n=function(){return t.execCommand("mceVisualBlocks")};t.ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:n,onSetup:a(t,e)}),t.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:n,onSetup:a(t,e)})};function s(){e.add("visualblocks",(function(e,n){var r=t(!1);o(e,n,r),c(e,r),u(e,n,r)}))}s()})()},"5e4ce":function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");function e(){t.add("contextmenu",(function(){}))}e()})()},"64d8":function(t,e,n){n("ef1f")},"78e4":function(t,e,n){n("3ad8")},8388:function(t,e,n){},"84ec8":function(t,e,n){n("2401")},9434:function(t,e,n){n("e8b0")},"94ce":function(t,e){(function(){"use strict";var t=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},e=function(e){return function(n){return t(n)===e}},n=function(t){return function(e){return typeof e===t}},r=function(t){return function(e){return t===e}},o=e("string"),i=e("object"),u=e("array"),a=r(null),c=n("boolean"),s=r(void 0),l=function(t){return null===t||void 0===t},f=function(t){return!l(t)},d=n("function"),m=n("number"),g=function(){},h=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},p=function(t,e){return function(n){return t(e(n))}},v=function(t){return function(){return t}},b=function(t){return t},y=function(t,e){return t===e};function w(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var x=function(t){return function(e){return!t(e)}},C=function(t){return function(){throw new Error(t)}},S=v(!1),k=v(!0),T=function(){return O},O=function(){var t=function(t){return t()},e=b,n={fold:function(t,e){return t()},isSome:S,isNone:k,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:v(null),getOrUndefined:v(void 0),or:e,orThunk:t,map:T,each:g,bind:T,exists:S,forall:k,filter:function(){return T()},toArray:function(){return[]},toString:v("none()")};return n}(),E=function(t){var e=v(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:k,isNone:S,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return E(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:O},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},_=function(t){return null===t||void 0===t?O:E(t)},A={some:E,none:T,from:_},D=Array.prototype.slice,M=Array.prototype.indexOf,R=Array.prototype.push,N=function(t,e){return M.call(t,e)},z=function(t,e){return N(t,e)>-1},B=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return!0}return!1},L=function(t,e){for(var n=[],r=0;r<t;r++)n.push(e(r));return n},H=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},I=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},P=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];e(r,n)}},F=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var u=t[o],a=e(u,o)?n:r;a.push(u)}return{pass:n,fail:r}},V=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},U=function(t,e,n){return P(t,(function(t,r){n=e(n,t,r)})),n},j=function(t,e,n){return I(t,(function(t,r){n=e(n,t,r)})),n},W=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return A.some(i);if(n(i,r))break}return A.none()},q=function(t,e){return W(t,e,S)},$=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return A.some(n)}return A.none()},G=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!u(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);R.apply(e,t[n])}return e},K=function(t,e){return G(H(t,e))},X=function(t,e){for(var n=0,r=t.length;n<r;++n){var o=t[n];if(!0!==e(o,n))return!1}return!0},Y=function(t){var e=D.call(t,0);return e.reverse(),e},J=function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n},Q=function(t){return[t]},Z=function(t,e){var n=D.call(t,0);return n.sort(e),n},tt=function(t,e){return e>=0&&e<t.length?A.some(t[e]):A.none()},et=function(t){return tt(t,0)},nt=function(t){return tt(t,t.length-1)},rt=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return A.none()},ot=function(){return ot=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ot.apply(this,arguments)};function it(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var ut=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},at=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,u=t.isiOS()||t.isAndroid(),a=u||r("(pointer:coarse)"),c=o||!i&&u&&r("(min-device-width:768px)"),s=i||u&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:v(o),isiPhone:v(i),isTablet:v(c),isPhone:v(s),isTouch:v(a),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:v(l),isDesktop:v(f)}},ct=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}},st=function(t,e){var n=ct(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return dt(r(1),r(2))},lt=function(t,e){var n=String(e).toLowerCase();return 0===t.length?ft():st(t,n)},ft=function(){return dt(0,0)},dt=function(t,e){return{major:t,minor:e}},mt={nu:dt,detect:lt,unknown:ft},gt=function(t,e){return rt(e.brands,(function(e){var n=e.brand.toLowerCase();return q(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:mt.nu(parseInt(e.version,10),0)}}))}))},ht=function(t,e){var n=String(e).toLowerCase();return q(t,(function(t){return t.search(n)}))},pt=function(t,e){return ht(t,e).map((function(t){var n=mt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},vt=function(t,e){return ht(t,e).map((function(t){var n=mt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},bt=function(t,e){return t.substring(e)},yt=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},wt=function(t,e){return Ct(t,e)?bt(t,e.length):t},xt=function(t,e){return-1!==t.indexOf(e)},Ct=function(t,e){return yt(t,e,0)},St=function(t,e){return yt(t,e,t.length-e.length)},kt=function(t){return function(e){return e.replace(t,"")}},Tt=kt(/^\s+|\s+$/g),Ot=function(t){return t.length>0},Et=function(t){return!Ot(t)},_t=function(t){var e=parseFloat(t);return isNaN(e)?A.none():A.some(e)},At=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Dt=function(t){return function(e){return xt(e,t)}},Mt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return xt(t,"edge/")&&xt(t,"chrome")&&xt(t,"safari")&&xt(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,At],search:function(t){return xt(t,"chrome")&&!xt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return xt(t,"msie")||xt(t,"trident")}},{name:"Opera",versionRegexes:[At,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Dt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Dt("firefox")},{name:"Safari",versionRegexes:[At,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(xt(t,"safari")||xt(t,"mobile/"))&&xt(t,"applewebkit")}}],Rt=[{name:"Windows",search:Dt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return xt(t,"iphone")||xt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Dt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Dt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Dt("linux"),versionRegexes:[]},{name:"Solaris",search:Dt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Dt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Dt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Nt={browsers:v(Mt),oses:v(Rt)},zt="Edge",Bt="Chrome",Lt="IE",Ht="Opera",It="Firefox",Pt="Safari",Ft=function(){return Vt({current:void 0,version:mt.unknown()})},Vt=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(zt),isChrome:r(Bt),isIE:r(Lt),isOpera:r(Ht),isFirefox:r(It),isSafari:r(Pt)}},Ut={unknown:Ft,nu:Vt,edge:v(zt),chrome:v(Bt),ie:v(Lt),opera:v(Ht),firefox:v(It),safari:v(Pt)},jt="Windows",Wt="iOS",qt="Android",$t="Linux",Gt="OSX",Kt="Solaris",Xt="FreeBSD",Yt="ChromeOS",Jt=function(){return Qt({current:void 0,version:mt.unknown()})},Qt=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(jt),isiOS:r(Wt),isAndroid:r(qt),isOSX:r(Gt),isLinux:r($t),isSolaris:r(Kt),isFreeBSD:r(Xt),isChromeOS:r(Yt)}},Zt={unknown:Jt,nu:Qt,windows:v(jt),ios:v(Wt),android:v(qt),linux:v($t),osx:v(Gt),solaris:v(Kt),freebsd:v(Xt),chromeos:v(Yt)},te=function(t,e,n){var r=Nt.browsers(),o=Nt.oses(),i=e.bind((function(t){return gt(r,t)})).orThunk((function(){return pt(r,t)})).fold(Ut.unknown,Ut.nu),u=vt(o,t).fold(Zt.unknown,Zt.nu),a=at(u,i,t,n);return{browser:i,os:u,deviceType:a}},ee={detect:te},ne=function(t){return window.matchMedia(t).matches},re=ut((function(){return ee.detect(navigator.userAgent,A.from(navigator.userAgentData),ne)})),oe=function(){return re()},ie=function(t,e,n){return 0!==(t.compareDocumentPosition(e)&n)},ue=function(t,e){return ie(t,e,Node.DOCUMENT_POSITION_CONTAINED_BY)},ae=8,ce=9,se=11,le=1,fe=3,de=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return he(r.childNodes[0])},me=function(t,e){var n=e||document,r=n.createElement(t);return he(r)},ge=function(t,e){var n=e||document,r=n.createTextNode(t);return he(r)},he=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},pe=function(t,e,n){return A.from(t.dom.elementFromPoint(e,n)).map(he)},ve={fromHtml:de,fromTag:me,fromText:ge,fromDom:he,fromPoint:pe},be=function(t,e){var n=t.dom;if(n.nodeType!==le)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")},ye=function(t){return t.nodeType!==le&&t.nodeType!==ce&&t.nodeType!==se||0===t.childElementCount},we=function(t,e){var n=void 0===e?document:e.dom;return ye(n)?[]:H(n.querySelectorAll(t),ve.fromDom)},xe=function(t,e){var n=void 0===e?document:e.dom;return ye(n)?A.none():A.from(n.querySelector(t)).map(ve.fromDom)},Ce=function(t,e){return t.dom===e.dom},Se=function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)},ke=function(t,e){return ue(t.dom,e.dom)},Te=function(t,e){return oe().browser.isIE()?ke(t,e):Se(t,e)},Oe=be,Ee=Object.keys,_e=Object.hasOwnProperty,Ae=function(t,e){for(var n=Ee(t),r=0,o=n.length;r<o;r++){var i=n[r],u=t[i];e(u,i)}},De=function(t,e){return Me(t,(function(t,n){return{k:n,v:e(t,n)}}))},Me=function(t,e){var n={};return Ae(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},Re=function(t){return function(e,n){t[n]=e}},Ne=function(t,e,n,r){var o={};return Ae(t,(function(t,o){(e(t,o)?n:r)(t,o)})),o},ze=function(t,e){var n={};return Ne(t,e,Re(n),g),n},Be=function(t,e){var n=[];return Ae(t,(function(t,r){n.push(e(t,r))})),n},Le=function(t){return Be(t,b)},He=function(t){return Ee(t).length},Ie=function(t,e){return Pe(t,e)?A.from(t[e]):A.none()},Pe=function(t,e){return _e.call(t,e)},Fe=function(t,e){return Pe(t,e)&&void 0!==t[e]&&null!==t[e]},Ve=function(t){for(var e in t)if(_e.call(t,e))return!1;return!0},Ue=["tfoot","thead","tbody","colgroup"],je=function(t){return z(Ue,t)},We=function(t,e){return{rows:t,columns:e}},qe=function(t,e){return{row:t,column:e}},$e=function(t,e,n){return{element:t,rowspan:e,colspan:n}},Ge=function(t,e,n,r){return{element:t,rowspan:e,colspan:n,isNew:r}},Ke=function(t,e,n,r,o,i){return{element:t,rowspan:e,colspan:n,row:r,column:o,isLocked:i}},Xe=function(t,e,n){return{element:t,cells:e,section:n}},Ye=function(t,e,n,r){return{element:t,cells:e,section:n,isNew:r}},Je=function(t,e,n){return{element:t,isNew:e,isLocked:n}},Qe=function(t,e,n,r){return{element:t,cells:e,section:n,isNew:r}},Ze=function(t,e,n,r){return{startRow:t,startCol:e,finishRow:n,finishCol:r}},tn=function(t,e,n){return{element:t,colspan:e,column:n}},en=function(t,e){return{element:t,columns:e}};"undefined"!==typeof window?window:Function("return this;")();var nn=function(t){var e=t.dom.nodeName;return e.toLowerCase()},rn=function(t){return t.dom.nodeType},on=function(t){return function(e){return rn(e)===t}},un=function(t){return rn(t)===ae||"#comment"===nn(t)},an=on(le),cn=on(fe),sn=on(ce),ln=on(se),fn=function(t){return function(e){return an(e)&&nn(e)===t}},dn=function(t){return ve.fromDom(t.dom.ownerDocument)},mn=function(t){return sn(t)?t:dn(t)},gn=function(t){return ve.fromDom(mn(t).dom.defaultView)},hn=function(t){return A.from(t.dom.parentNode).map(ve.fromDom)},pn=function(t){return A.from(t.dom.parentElement).map(ve.fromDom)},vn=function(t,e){var n=d(e)?e:S,r=t.dom,o=[];while(null!==r.parentNode&&void 0!==r.parentNode){var i=r.parentNode,u=ve.fromDom(i);if(o.push(u),!0===n(u))break;r=i}return o},bn=function(t){return A.from(t.dom.previousSibling).map(ve.fromDom)},yn=function(t){return A.from(t.dom.nextSibling).map(ve.fromDom)},wn=function(t){return H(t.dom.childNodes,ve.fromDom)},xn=function(t,e){var n=t.dom.childNodes;return A.from(n[e]).map(ve.fromDom)},Cn=function(t){return xn(t,0)},Sn=function(t){return ln(t)&&f(t.dom.host)},kn=d(Element.prototype.attachShadow)&&d(Node.prototype.getRootNode),Tn=v(kn),On=kn?function(t){return ve.fromDom(t.dom.getRootNode())}:mn,En=function(t){var e=On(t);return Sn(e)?A.some(e):A.none()},_n=function(t){return ve.fromDom(t.dom.host)},An=function(t){if(Tn()&&f(t.target)){var e=ve.fromDom(t.target);if(an(e)&&Dn(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return et(n)}}return A.from(t.target)},Dn=function(t){return f(t.dom.shadowRoot)},Mn=function(t){var e=cn(t)?t.dom.parentNode:t.dom;if(void 0===e||null===e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return En(ve.fromDom(e)).fold((function(){return n.body.contains(e)}),p(Mn,_n))},Rn=function(){return Nn(ve.fromDom(document))},Nn=function(t){var e=t.dom.body;if(null===e||void 0===e)throw new Error("Body is not available yet");return ve.fromDom(e)},zn=function(t,e,n){return V(vn(t,n),e)},Bn=function(t,e){return V(wn(t),e)},Ln=function(t,e){var n=[];return I(wn(t),(function(t){e(t)&&(n=n.concat([t])),n=n.concat(Ln(t,e))})),n},Hn=function(t,e,n){return zn(t,(function(t){return be(t,e)}),n)},In=function(t,e){return Bn(t,(function(t){return be(t,e)}))},Pn=function(t,e){return we(e,t)};function Fn(t,e,n,r,o){return t(n,r)?A.some(n):d(o)&&o(n)?A.none():e(n,r,o)}var Vn=function(t,e,n){var r=t.dom,o=d(n)?n:S;while(r.parentNode){r=r.parentNode;var i=ve.fromDom(r);if(e(i))return A.some(i);if(o(i))break}return A.none()},Un=function(t,e,n){var r=function(t,e){return e(t)};return Fn(r,Vn,t,e,n)},jn=function(t,e){var n=function(t){return e(ve.fromDom(t))},r=q(t.dom.childNodes,n);return r.map(ve.fromDom)},Wn=function(t,e){var n=function(t){for(var r=0;r<t.childNodes.length;r++){var o=ve.fromDom(t.childNodes[r]);if(e(o))return A.some(o);var i=n(t.childNodes[r]);if(i.isSome())return i}return A.none()};return n(t.dom)},qn=function(t,e,n){return Vn(t,(function(t){return be(t,e)}),n)},$n=function(t,e){return jn(t,(function(t){return be(t,e)}))},Gn=function(t,e){return xe(e,t)},Kn=function(t,e,n){var r=function(t,e){return be(t,e)};return Fn(r,qn,t,e,n)},Xn=function(t,e,n){if(!(o(n)||c(n)||m(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},Yn=function(t,e,n){Xn(t.dom,e,n)},Jn=function(t,e){var n=t.dom;Ae(e,(function(t,e){Xn(n,e,t)}))},Qn=function(t,e){Ae(e,(function(e,n){e.fold((function(){er(t,n)}),(function(e){Xn(t.dom,n,e)}))}))},Zn=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},tr=function(t,e){return A.from(Zn(t,e))},er=function(t,e){t.dom.removeAttribute(e)},nr=function(t){return j(t.dom.attributes,(function(t,e){return t[e.name]=e.value,t}),{})},rr=function(t,e,n){return void 0===n&&(n=y),t.exists((function(t){return n(t,e)}))},or=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},ir=function(t,e,n){return t.isSome()&&e.isSome()?A.some(n(t.getOrDie(),e.getOrDie())):A.none()},ur=function(t,e){return void 0!==t&&null!==t?e(t):A.none()},ar=function(t){return t.bind(b)},cr=function(t,e){return t?A.some(e):A.none()},sr=function(t){return void 0!==t.style&&d(t.style.getPropertyValue)},lr=function(t,e,n){if(!o(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);sr(t)&&t.style.setProperty(e,n)},fr=function(t,e){sr(t)&&t.style.removeProperty(e)},dr=function(t,e,n){var r=t.dom;lr(r,e,n)},mr=function(t,e){var n=t.dom;Ae(e,(function(t,e){lr(n,e,t)}))},gr=function(t,e){var n=t.dom,r=window.getComputedStyle(n),o=r.getPropertyValue(e);return""!==o||Mn(t)?o:hr(n,e)},hr=function(t,e){return sr(t)?t.style.getPropertyValue(e):""},pr=function(t,e){var n=t.dom,r=hr(n,e);return A.from(r).filter((function(t){return t.length>0}))},vr=function(t,e){var n=t.dom;fr(n,e),rr(tr(t,"style").map(Tt),"")&&er(t,"style")},br=function(t,e){var n=t.dom,r=e.dom;sr(n)&&sr(r)&&(r.style.cssText=n.style.cssText)},yr=function(t,e,n){return void 0===n&&(n=0),tr(t,e).map((function(t){return parseInt(t,10)})).getOr(n)},wr=function(t,e){return yr(t,e,1)},xr=function(t){return fn("col")(t)?yr(t,"span",1)>1:wr(t,"colspan")>1},Cr=function(t){return wr(t,"rowspan")>1},Sr=function(t,e){return parseInt(gr(t,e),10)},kr=v(10),Tr=v(10),Or=function(t,e){return Er(t,e,k)},Er=function(t,e,n){return K(wn(t),(function(t){return be(t,e)?n(t)?[t]:[]:Er(t,e,n)}))},_r=function(t,e,n){if(void 0===n&&(n=S),n(e))return A.none();if(z(t,nn(e)))return A.some(e);var r=function(t){return be(t,"table")||n(t)};return qn(e,t.join(","),r)},Ar=function(t,e){return _r(["td","th"],t,e)},Dr=function(t){return Or(t,"th,td")},Mr=function(t){return be(t,"colgroup")?In(t,"col"):K(zr(t),(function(t){return In(t,"col")}))},Rr=function(t,e){return Kn(t,"table",e)},Nr=function(t){return Or(t,"tr")},zr=function(t){return Rr(t).fold(v([]),(function(t){return In(t,"colgroup")}))},Br=function(t,e){return H(t,(function(t){if("colgroup"===nn(t)){var n=H(Mr(t),(function(t){var e=yr(t,"span",1);return $e(t,1,e)}));return Xe(t,n,"colgroup")}n=H(Dr(t),(function(t){var e=yr(t,"rowspan",1),n=yr(t,"colspan",1);return $e(t,e,n)}));return Xe(t,n,e(t))}))},Lr=function(t){return hn(t).map((function(t){var e=nn(t);return je(e)?e:"tbody"})).getOr("tbody")},Hr=function(t){var e=Nr(t),n=zr(t),r=it(it([],n,!0),e,!0);return Br(r,Lr)},Ir=function(t,e){return Br(t,(function(){return e}))},Pr=function(t,e,n){var r=t.cells,o=r.slice(0,e),i=r.slice(e),u=o.concat(n).concat(i);return Ur(t,u)},Fr=function(t,e,n){return Pr(t,e,[n])},Vr=function(t,e,n){var r=t.cells;r[e]=n},Ur=function(t,e){return Qe(t.element,e,t.section,t.isNew)},jr=function(t,e){var n=t.cells,r=H(n,e);return Qe(t.element,r,t.section,t.isNew)},Wr=function(t,e){return t.cells[e]},qr=function(t,e){return Wr(t,e).element},$r=function(t){return t.cells.length},Gr=function(t){var e=F(t,(function(t){return"colgroup"===t.section}));return{rows:e.fail,cols:e.pass}},Kr=function(t,e,n){var r=H(t.cells,n);return Qe(e(t.element),r,t.section,!0)},Xr="data-snooker-locked-cols",Yr=function(t){return tr(t,Xr).bind((function(t){return A.from(t.match(/\d+/g))})).map((function(t){return J(t,k)}))},Jr=function(t){var e=j(Gr(t).rows,(function(t,e){return I(e.cells,(function(e,n){e.isLocked&&(t[n]=!0)})),t}),{}),n=Be(e,(function(t,e){return parseInt(e,10)}));return Z(n)},Qr=function(t,e){return t+","+e},Zr=function(t,e,n){return A.from(t.access[Qr(e,n)])},to=function(t,e,n){var r=eo(t,(function(t){return n(e,t.element)}));return r.length>0?A.some(r[0]):A.none()},eo=function(t,e){var n=K(t.all,(function(t){return t.cells}));return V(n,e)},no=function(t){var e={},n=0;return I(t.cells,(function(t){var r=t.colspan;L(r,(function(o){var i=n+o;e[i]=tn(t.element,r,i)})),n+=r})),e},ro=function(t){var e={},n=[],r=et(t).map((function(t){return t.element})).bind(Rr),o=r.bind(Yr).getOr({}),i=0,u=0,a=0,c=F(t,(function(t){return"colgroup"===t.section})),s=c.pass,l=c.fail;I(l,(function(t){var r=[];I(t.cells,(function(t){var n=0;while(void 0!==e[Qr(a,n)])n++;for(var i=Fe(o,n.toString()),c=Ke(t.element,t.rowspan,t.colspan,a,n,i),s=0;s<t.colspan;s++)for(var l=0;l<t.rowspan;l++){var f=a+l,d=n+s,m=Qr(f,d);e[m]=c,u=Math.max(u,d+1)}r.push(c)})),i++,n.push(Xe(t.element,r,t.section)),a++}));var f=nt(s).map((function(t){var e=no(t),n=en(t.element,Le(e));return{colgroups:[n],columns:e}})).getOrThunk((function(){return{colgroups:[],columns:{}}})),d=f.columns,m=f.colgroups,g=We(i,u);return{grid:g,access:e,all:n,columns:d,colgroups:m}},oo=function(t){var e=Hr(t);return ro(e)},io=function(t){return K(t.all,(function(t){return t.cells}))},uo=function(t){return Le(t.columns)},ao=function(t){return Ee(t.columns).length>0},co=function(t,e){return A.from(t.columns[e])},so={fromTable:oo,generate:ro,getAt:Zr,findItem:to,filterItems:eo,justCells:io,justColumns:uo,hasColumns:ao,getColumnAt:co},lo=function(t,e){var n=e.column,r=e.column+e.colspan-1,o=e.row,i=e.row+e.rowspan-1;return n<=t.finishCol&&r>=t.startCol&&o<=t.finishRow&&i>=t.startRow},fo=function(t,e){return e.column>=t.startCol&&e.column+e.colspan-1<=t.finishCol&&e.row>=t.startRow&&e.row+e.rowspan-1<=t.finishRow},mo=function(t,e){for(var n=!0,r=w(fo,e),o=e.startRow;o<=e.finishRow;o++)for(var i=e.startCol;i<=e.finishCol;i++)n=n&&so.getAt(t,o,i).exists(r);return n?A.some(e):A.none()},go=function(t,e){return Ze(Math.min(t.row,e.row),Math.min(t.column,e.column),Math.max(t.row+t.rowspan-1,e.row+e.rowspan-1),Math.max(t.column+t.colspan-1,e.column+e.colspan-1))},ho=function(t,e,n){var r=so.findItem(t,e,Ce),o=so.findItem(t,n,Ce);return r.bind((function(t){return o.map((function(e){return go(t,e)}))}))},po=function(t,e,n){return ho(t,e,n).bind((function(e){return mo(t,e)}))},vo=function(t,e,n,r){return so.findItem(t,e,Ce).bind((function(e){var o=n>0?e.row+e.rowspan-1:e.row,i=r>0?e.column+e.colspan-1:e.column,u=so.getAt(t,o+n,i+r);return u.map((function(t){return t.element}))}))},bo=function(t,e,n){return ho(t,e,n).map((function(e){var n=so.filterItems(t,w(lo,e));return H(n,(function(t){return t.element}))}))},yo=function(t,e){var n=function(t,e){return Te(e,t)};return so.findItem(t,e,n).map((function(t){return t.element}))},wo=function(t,e,n){return Rr(t).bind((function(r){var o=ko(r);return vo(o,t,e,n)}))},xo=function(t,e,n){var r=ko(t);return bo(r,e,n)},Co=function(t,e,n,r,o){var i=ko(t),u=Ce(t,n)?A.some(e):yo(i,e),a=Ce(t,o)?A.some(r):yo(i,r);return u.bind((function(t){return a.bind((function(e){return bo(i,t,e)}))}))},So=function(t,e,n){var r=ko(t);return po(r,e,n)},ko=so.fromTable,To=function(t,e){var n=hn(t);n.each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},Oo=function(t,e){var n=yn(t);n.fold((function(){var n=hn(t);n.each((function(t){_o(t,e)}))}),(function(t){To(t,e)}))},Eo=function(t,e){var n=Cn(t);n.fold((function(){_o(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},_o=function(t,e){t.dom.appendChild(e.dom)},Ao=function(t,e,n){xn(t,n).fold((function(){_o(t,e)}),(function(t){To(t,e)}))},Do=function(t,e){To(t,e),_o(e,t)},Mo=function(t,e){I(e,(function(e){To(t,e)}))},Ro=function(t,e){I(e,(function(n,r){var o=0===r?t:e[r-1];Oo(o,n)}))},No=function(t,e){I(e,(function(e){_o(t,e)}))},zo=function(t){t.dom.textContent="",I(wn(t),(function(t){Bo(t)}))},Bo=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Lo=function(t){var e=wn(t);e.length>0&&Mo(t,e),Bo(t)},Ho=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)?A.from(e.dom.nodeValue):A.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}},Io=Ho(cn,"text"),Po=function(t){return Io.get(t)},Fo=function(t){return Io.getOption(t)},Vo=function(t,e){return Io.set(t,e)},Uo=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function jo(){var t=function(t){return ve.fromDom(t.dom.cloneNode(!1))},e=function(t){return mn(t).dom},n=function(t){return!!an(t)&&("body"===nn(t)||z(Uo,nn(t)))},r=function(t){return!!an(t)&&z(["br","img","hr","input"],nn(t))},o=function(t){return an(t)&&"false"===Zn(t,"contenteditable")},i=function(t,e){return t.dom.compareDocumentPosition(e.dom)},u=function(t,e){var n=nr(t);Jn(e,n)},a=function(t){var e=nn(t);return z(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],e)},c=function(t){return an(t)?tr(t,"lang"):A.none()};return{up:v({selector:qn,closest:Kn,predicate:Vn,all:vn}),down:v({selector:Pn,predicate:Ln}),styles:v({get:gr,getRaw:pr,set:dr,remove:vr}),attrs:v({get:Zn,set:Yn,remove:er,copyTo:u}),insert:v({before:To,after:Oo,afterAll:Ro,append:_o,appendAll:No,prepend:Eo,wrap:Do}),remove:v({unwrap:Lo,remove:Bo}),create:v({nu:ve.fromTag,clone:t,text:ve.fromText}),query:v({comparePosition:i,prevSibling:bn,nextSibling:yn}),property:v({children:wn,name:nn,parent:hn,document:e,isText:cn,isComment:un,isElement:an,isSpecial:a,getLanguage:c,getText:Po,setText:Vo,isBoundary:n,isEmptyTag:r,isNonEditable:o}),eq:Ce,is:Oe}}var Wo=function(t,e,n,r){var o=n[0],i=n.slice(1);return r(t,e,o,i)},qo=function(t,e,n){return n.length>0?Wo(t,e,n,$o):A.none()},$o=function(t,e,n,r){var o=e(t,n);return U(r,(function(n,r){var o=e(t,r);return Go(t,n,o)}),o)},Go=function(t,e,n){return e.bind((function(e){return n.filter(w(t.eq,e))}))},Ko=function(t,e){return w(t.eq,e)},Xo=function(t,e,n,r){void 0===r&&(r=S);var o=[e].concat(t.up().all(e)),i=[n].concat(t.up().all(n)),u=function(t){var e=$(t,r);return e.fold((function(){return t}),(function(e){return t.slice(0,e+1)}))},a=u(o),c=u(i),s=q(a,(function(e){return B(c,Ko(t,e))}));return{firstpath:a,secondpath:c,shared:s}},Yo=qo,Jo=Xo,Qo=jo(),Zo=function(t,e){return Yo(Qo,(function(e,n){return t(n)}),e)},ti=function(t,e,n){return Jo(Qo,t,e,n)},ei=function(t){return qn(t,"table")},ni=function(t,e,n){var r=function(t){return function(e){return void 0!==n&&n(e)||Ce(e,t)}};return Ce(t,e)?A.some({boxes:A.some([t]),start:t,finish:e}):ei(t).bind((function(o){return ei(e).bind((function(i){if(Ce(o,i))return A.some({boxes:xo(o,t,e),start:t,finish:e});if(Te(o,i)){var u=Hn(e,"td,th",r(o)),a=u.length>0?u[u.length-1]:e;return A.some({boxes:Co(o,t,o,e,i),start:t,finish:a})}if(Te(i,o)){u=Hn(t,"td,th",r(i));var c=u.length>0?u[u.length-1]:t;return A.some({boxes:Co(i,t,o,e,i),start:t,finish:c})}return ti(t,e).shared.bind((function(u){return Kn(u,"table",n).bind((function(n){var u=Hn(e,"td,th",r(n)),a=u.length>0?u[u.length-1]:e,c=Hn(t,"td,th",r(n)),s=c.length>0?c[c.length-1]:t;return A.some({boxes:Co(n,t,o,e,i),start:s,finish:a})}))}))}))}))},ri=function(t,e){var n=Pn(t,e);return n.length>0?A.some(n):A.none()},oi=function(t,e){return q(t,(function(t){return be(t,e)}))},ii=function(t,e,n){return Gn(t,e).bind((function(e){return Gn(t,n).bind((function(t){return Zo(ei,[e,t]).map((function(n){return{first:e,last:t,table:n}}))}))}))},ui=function(t,e){return qn(t,"table").bind((function(n){return Gn(n,e).bind((function(e){return ni(e,t).bind((function(t){return t.boxes.map((function(e){return{boxes:e,start:t.start,finish:t.finish}}))}))}))}))},ai=function(t,e,n,r,o){return oi(t,o).bind((function(t){return wo(t,e,n).bind((function(t){return ui(t,r)}))}))},ci=function(t,e){return ri(t,e)},si=function(t,e,n){return ii(t,e,n).bind((function(e){var n=function(e){return Ce(t,e)},r="thead,tfoot,tbody,table",o=qn(e.first,r,n),i=qn(e.last,r,n);return o.bind((function(t){return i.bind((function(n){return Ce(t,n)?So(e.table,e.first,e.last):A.none()}))}))}))},li=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 I(t,(function(r,o){var i=Ee(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],c=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(c))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==c.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+i);var u=function(t){var r=Ee(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));var o=X(e,(function(t){return z(r,t)}));if(!o)throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[a].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:u,log:function(t){console.log(t,{constructors:e,constructor:a,params:n})}}}})),n},fi={generate:li},di=fi.generate([{none:[]},{multiple:["elements"]},{single:["element"]}]),mi=function(t,e,n,r){return t.fold(e,n,r)},gi=di.none,hi=di.multiple,pi=di.single,vi=function(t,e,n){var r=function(){return ci(t(),n).fold((function(){return e().fold(gi,pi)}),(function(t){return hi(t)}))};return{get:r}},bi=tinymce.util.Tools.resolve("tinymce.PluginManager"),yi=function(t,e){return ve.fromDom(t.dom.cloneNode(e))},wi=function(t){return yi(t,!1)},xi=function(t){return yi(t,!0)},Ci=function(t,e){var n=ve.fromTag(e),r=nr(t);return Jn(n,r),n},Si=function(t,e){var n=Ci(t,e),r=wn(xi(t));return No(n,r),n},ki=function(t,e){var n=Ci(t,e);To(t,n);var r=wn(t);return No(n,r),Bo(t),n},Ti=function(t,e){var n=function(e,n){if(!m(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;sr(r)&&(r.style[t]=n+"px")},r=function(n){var r=e(n);if(r<=0||null===r){var o=gr(n,t);return parseFloat(o)||0}return r},o=r,i=function(t,e){return j(e,(function(e,n){var r=gr(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)},u=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:u}},Oi=function(){var t=oe().browser;return t.isIE()||t.isEdge()},Ei=function(t,e){return _t(t).getOr(e)},_i=function(t,e,n){return Ei(gr(t,e),n)},Ai=function(t){return gr(t,"box-sizing")},Di=function(t,e,n,r){var o=_i(t,"padding-"+n,0),i=_i(t,"padding-"+r,0),u=_i(t,"border-"+n+"-width",0),a=_i(t,"border-"+r+"-width",0);return e-o-i-u-a},Mi=function(t,e){var n=t.dom,r=n.getBoundingClientRect().height||n.offsetHeight;return"border-box"===e?r:Di(t,r,"top","bottom")},Ri=function(t,e){var n=t.dom,r=n.getBoundingClientRect().width||n.offsetWidth;return"border-box"===e?r:Di(t,r,"left","right")},Ni=function(t){return Oi()?Mi(t,Ai(t)):_i(t,"height",t.dom.offsetHeight)},zi=function(t){return Oi()?Ri(t,Ai(t)):_i(t,"width",t.dom.offsetWidth)},Bi=function(t){return Ri(t,"content-box")},Li=Ti("width",(function(t){return t.dom.offsetWidth})),Hi=function(t){return Li.get(t)},Ii=function(t){return Li.getOuter(t)},Pi=Bi,Fi=zi,Vi=function(t,e){void 0===e&&(e=k);var n=t.grid,r=L(n.columns,b),o=L(n.rows,b);return H(r,(function(n){var r=function(){return K(o,(function(e){return so.getAt(t,e,n).filter((function(t){return t.column===n})).toArray()}))},i=function(t){return 1===t.colspan&&e(t.element)},u=function(){return so.getAt(t,0,n)};return Ui(r,i,u)}))},Ui=function(t,e,n){var r=t(),o=q(r,e),i=o.orThunk((function(){return A.from(r[0]).orThunk(n)}));return i.map((function(t){return t.element}))},ji=function(t){var e=t.grid,n=L(e.rows,b),r=L(e.columns,b);return H(n,(function(e){var n=function(){return K(r,(function(n){return so.getAt(t,e,n).filter((function(t){return t.row===e})).fold(v([]),(function(t){return[t]}))}))},o=function(t){return 1===t.rowspan},i=function(){return so.getAt(t,e,0)};return Ui(n,o,i)}))},Wi=function(t,e){if(e<0||e>=t.length-1)return A.none();var n=t[e].fold((function(){var n=Y(t.slice(0,e));return rt(n,(function(t,e){return t.map((function(t){return{value:t,delta:e+1}}))}))}),(function(t){return A.some({value:t,delta:0})})),r=t[e+1].fold((function(){var n=t.slice(e+1);return rt(n,(function(t,e){return t.map((function(t){return{value:t,delta:e+1}}))}))}),(function(t){return A.some({value:t,delta:1})}));return n.bind((function(t){return r.map((function(e){var n=e.delta+t.delta;return Math.abs(e.value-t.value)/n}))}))},qi=function(t,e){return function(n){return"rtl"===$i(n)?e:t}},$i=function(t){return"rtl"===gr(t,"direction")?"rtl":"ltr"},Gi=Ti("height",(function(t){var e=t.dom;return Mn(t)?e.getBoundingClientRect().height:e.offsetHeight})),Ki=function(t){return Gi.get(t)},Xi=function(t){return Gi.getOuter(t)},Yi=Ni,Ji=function(t,e){var n=function(n,r){return Ji(t+n,e+r)};return{left:t,top:e,translate:n}},Qi=Ji,Zi=function(t){var e=t.getBoundingClientRect();return Qi(e.left,e.top)},tu=function(t,e){return void 0!==t?t:void 0!==e?e:0},eu=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return Qi(n.offsetLeft,n.offsetTop);var i=tu(null===r||void 0===r?void 0:r.pageYOffset,o.scrollTop),u=tu(null===r||void 0===r?void 0:r.pageXOffset,o.scrollLeft),a=tu(o.clientTop,n.clientTop),c=tu(o.clientLeft,n.clientLeft);return nu(t).translate(u-c,i-a)},nu=function(t){var e=t.dom,n=e.ownerDocument,r=n.body;return r===e?Qi(r.offsetLeft,r.offsetTop):Mn(t)?Zi(e):Qi(0,0)},ru=function(t,e){return{row:t,y:e}},ou=function(t,e){return{col:t,x:e}},iu=function(t){var e=eu(t);return e.left+Ii(t)},uu=function(t){return eu(t).left},au=function(t,e){return ou(t,uu(e))},cu=function(t,e){return ou(t,iu(e))},su=function(t){return eu(t).top},lu=function(t,e){return ru(t,su(e))},fu=function(t,e){return ru(t,su(e)+Xi(e))},du=function(t,e,n){if(0===n.length)return[];var r=H(n.slice(1),(function(e,n){return e.map((function(e){return t(n,e)}))})),o=n[n.length-1].map((function(t){return e(n.length-1,t)}));return r.concat([o])},mu=function(t){return-t},gu={delta:b,positions:function(t){return du(lu,fu,t)},edge:su},hu={delta:b,edge:uu,positions:function(t){return du(au,cu,t)}},pu={delta:mu,edge:iu,positions:function(t){return du(cu,au,t)}},vu=qi(hu,pu),bu={delta:function(t,e){return vu(e).delta(t,e)},positions:function(t,e){return vu(e).positions(t,e)},edge:function(t){return vu(t).edge(t)}},yu={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},wu=function(){var t="[0-9]+",e="[+-]?"+t,n="[eE]"+e,r="\\.",o=function(t){return"(?:"+t+")?"},i=["Infinity",t+r+o(t)+o(n),r+t+o(n),t+o(n)].join("|"),u="[+-]?(?:"+i+")";return new RegExp("^("+u+")(.*)$")}(),xu=function(t,e){return B(e,(function(e){return B(yu[e],(function(e){return t===e}))}))},Cu=function(t,e){var n=A.from(wu.exec(t));return n.bind((function(t){var n=Number(t[1]),r=t[2];return xu(r,e)?A.some({value:n,unit:r}):A.none()}))},Su=/(\d+(\.\d+)?)%/,ku=/(\d+(\.\d+)?)px|em/,Tu=fn("col"),Ou=function(t,e,n){var r=pn(t).getOrThunk((function(){return Nn(dn(t))}));return e(t)/n(r)*100},Eu=function(t,e){dr(t,"width",e+"px")},_u=function(t,e){dr(t,"width",e+"%")},Au=function(t,e){dr(t,"height",e+"px")},Du=function(t){return Yi(t)+"px"},Mu=function(t,e,n,r){var o=Rr(t).map((function(t){var r=n(t);return Math.floor(e/100*r)})).getOr(e);return r(t,o),o},Ru=function(t,e,n,r){var o=parseFloat(t);return St(t,"%")&&"table"!==nn(e)?Mu(e,o,n,r):o},Nu=function(t){var e=Du(t);return e?Ru(e,t,Ki,Au):Ki(t)},zu=function(t,e,n){var r=n(t),o=wr(t,e);return r/o},Bu=function(t,e){return pr(t,e).orThunk((function(){return tr(t,e).map((function(t){return t+"px"}))}))},Lu=function(t){return Bu(t,"width")},Hu=function(t){return Bu(t,"height")},Iu=function(t){return Ou(t,Hi,Pi)},Pu=function(t){return Tu(t)?Hi(t):Fi(t)},Fu=function(t){return zu(t,"rowspan",Nu)},Vu=function(t){var e=Lu(t);return e.bind((function(t){return Cu(t,["fixed","relative","empty"])}))},Uu=function(t,e,n){dr(t,"width",e+n)},ju=function(t){return Hi(t)+"px"},Wu=function(t){return Ou(t,Hi,Pi)+"%"},qu=function(t){return Lu(t).exists((function(t){return Su.test(t)}))},$u=function(t){return Lu(t).exists((function(t){return ku.test(t)}))},Gu=function(t){return Lu(t).isNone()},Ku=v(Su),Xu=fn("col"),Yu=function(t){return Lu(t).getOrThunk((function(){return Pu(t)+"px"}))},Ju=function(t){return Hu(t).getOrThunk((function(){return Fu(t)+"px"}))},Qu=function(t){return H(so.justColumns(t),(function(t){return A.from(t.element)}))},Zu=function(t){var e=oe().browser,n=e.isChrome()||e.isFirefox();return!Xu(t)||n},ta=function(t,e,n,r,o,i){return t.filter(r).fold((function(){return i(Wi(n,e))}),(function(t){return o(t)}))},ea=function(t,e,n,r){var o=Vi(t),i=so.hasColumns(t)?Qu(t):o,u=[A.some(bu.edge(e))].concat(H(bu.positions(o,e),(function(t){return t.map((function(t){return t.x}))}))),a=x(xr);return H(i,(function(t,e){return ta(t,e,u,a,(function(t){if(Zu(t))return n(t);var i=ur(o[e],b);return ta(i,e,u,a,(function(t){return r(A.some(Hi(t)))}),r)}),r)}))},na=function(t){return t.map((function(t){return t+"px"})).getOr("")},ra=function(t,e){return ea(t,e,Yu,na)},oa=function(t,e,n){return ea(t,e,Iu,(function(t){return t.fold((function(){return n.minCellWidth()}),(function(t){return t/n.pixelWidth()*100}))}))},ia=function(t,e,n){return ea(t,e,Pu,(function(t){return t.getOrThunk(n.minCellWidth)}))},ua=function(t,e,n,r,o){var i=ji(t),u=[A.some(n.edge(e))].concat(H(n.positions(i,e),(function(t){return t.map((function(t){return t.y}))})));return H(i,(function(t,e){return ta(t,e,u,x(Cr),r,o)}))},aa=function(t,e,n){return ua(t,e,n,Fu,(function(t){return t.getOrThunk(Tr)}))},ca=function(t,e,n){return ua(t,e,n,Ju,na)},sa=function(t,e){return function(){return Mn(t)?e(t):parseFloat(pr(t,"width").getOr("0"))}},la=function(t){var e=sa(t,Hi),n=v(0),r=function(e,n){return ia(e,t,n)};return{width:e,pixelWidth:e,getWidths:r,getCellDelta:n,singleColumnWidth:v([0]),minCellWidth:n,setElementWidth:g,adjustTableWidth:g,isRelative:!0,label:"none"}},fa=function(t){var e=sa(t,(function(t){return parseFloat(Wu(t))})),n=sa(t,Hi),r=function(t){return t/n()*100},o=function(t,e){return[100-t]},i=function(){return kr()/n()*100},u=function(n){var r=e(),o=n/100*r,i=r+o;_u(t,i)},a=function(e,n){return oa(e,t,n)};return{width:e,pixelWidth:n,getWidths:a,getCellDelta:r,singleColumnWidth:o,minCellWidth:i,setElementWidth:_u,adjustTableWidth:u,isRelative:!0,label:"percent"}},da=function(t){var e=sa(t,Hi),n=b,r=function(t,e){var n=Math.max(kr(),t+e);return[n-t]},o=function(n){var r=e()+n;Eu(t,r)},i=function(e,n){return ia(e,t,n)};return{width:e,pixelWidth:e,getWidths:i,getCellDelta:n,singleColumnWidth:r,minCellWidth:kr,setElementWidth:Eu,adjustTableWidth:o,isRelative:!1,label:"pixel"}},ma=function(t,e){var n=Ku().exec(e);return null!==n?fa(t):da(t)},ga=function(t){var e=Lu(t);return e.fold((function(){return la(t)}),(function(e){return ma(t,e)}))},ha={getTableSize:ga,pixelSize:da,percentageSize:fa,noneSize:la},pa=function(t,e,n,r,o,i){return{minRow:t,minCol:e,maxRow:n,maxCol:r,allCells:o,selectedCells:i}},va=function(t,e){var n=t.grid.columns,r=t.grid.rows,o=r,i=n,u=0,a=0,c=[],s=[];return Ae(t.access,(function(t){if(c.push(t),e(t)){s.push(t);var n=t.row,r=n+t.rowspan-1,l=t.column,f=l+t.colspan-1;n<o?o=n:r>u&&(u=r),l<i?i=l:f>a&&(a=f)}})),pa(o,i,u,a,c,s)},ba=function(t,e,n){var r=t[n].element,o=ve.fromTag("td");_o(o,ve.fromTag("br"));var i=e?_o:Eo;i(r,o)},ya=function(t,e,n,r){for(var o=e.grid.columns,i=e.grid.rows,u=0;u<i;u++)for(var a=!1,c=0;c<o;c++)if(!(u<n.minRow||u>n.maxRow||c<n.minCol||c>n.maxCol)){var s=so.getAt(e,u,c).filter(r).isNone();s?ba(t,a,u):a=!0}},wa=function(t,e,n,r){Ae(n.columns,(function(t){(t.column<e.minCol||t.column>e.maxCol)&&Bo(t.element)}));var o=V(Or(t,"tr"),(function(t){return 0===t.dom.childElementCount}));I(o,Bo),e.minCol!==e.maxCol&&e.minRow!==e.maxRow||I(Or(t,"th,td"),(function(t){er(t,"rowspan"),er(t,"colspan")})),er(t,Xr),er(t,"data-snooker-col-series");var i=ha.getTableSize(t);i.adjustTableWidth(r)},xa=function(t,e,n,r){if(0===r.minCol&&e.grid.columns===r.maxCol+1)return 0;var o=ia(e,t,n),i=j(o,(function(t,e){return t+e}),0),u=j(o.slice(r.minCol,r.maxCol+1),(function(t,e){return t+e}),0),a=u/i*n.pixelWidth(),c=a-n.pixelWidth();return n.getCellDelta(c)},Ca=function(t,e){var n=function(t){return be(t.element,e)},r=xi(t),o=Hr(r),i=ha.getTableSize(t),u=so.generate(o),a=va(u,n),c="th:not("+e+"),td:not("+e+")",s=Er(r,"th,td",(function(t){return be(t,c)}));I(s,Bo),ya(o,u,a,n);var l=so.fromTable(t),f=xa(t,l,i,a);return wa(r,a,u,f),r},Sa=" ",ka=function(t){return"img"===nn(t)?1:Fo(t).fold((function(){return wn(t).length}),(function(t){return t.length}))},Ta=function(t){return Fo(t).filter((function(t){return 0!==t.trim().length||t.indexOf(Sa)>-1})).isSome()},Oa=["img","br"],Ea=function(t){var e=Ta(t);return e||z(Oa,nn(t))},_a=function(t){return Wn(t,Ea)},Aa=function(t){return Da(t,Ea)},Da=function(t,e){var n=function(t){for(var r=wn(t),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return A.some(i);var u=n(i);if(u.isSome())return u}return A.none()};return n(t)},Ma={scope:["row","col"]},Ra=function(t){return function(){var e=ve.fromTag("td",t.dom);return _o(e,ve.fromTag("br",t.dom)),e}},Na=function(t){return function(){return ve.fromTag("col",t.dom)}},za=function(t){return function(){return ve.fromTag("colgroup",t.dom)}},Ba=function(t){return function(){return ve.fromTag("tr",t.dom)}},La=function(t,e,n){var r=Si(t,e);return Ae(n,(function(t,e){null===t?er(r,e):Yn(r,e,t)})),r},Ha=function(t){return t},Ia=function(t,e,n){var r=_a(t);return r.map((function(r){var o=n.join(","),i=Hn(r,o,(function(e){return Ce(e,t)}));return U(i,(function(t,e){var n=wi(e);return er(n,"contenteditable"),_o(t,n),n}),e)})).getOr(e)},Pa=function(t,e){Ae(Ma,(function(n,r){return tr(t,r).filter((function(t){return z(n,t)})).each((function(t){return Yn(e,r,t)}))}))},Fa=function(t,e,n){var r=function(t,e){br(t.element,e),vr(e,"height"),1!==t.colspan&&vr(e,"width")},o=function(o){var i=ve.fromTag(nn(o.element),e.dom),u=n.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),a=u.length>0?Ia(o.element,i,u):i;return _o(a,ve.fromTag("br")),r(o,i),Pa(o.element,i),t(o.element,i),i},i=function(n){var o=ve.fromTag(nn(n.element),e.dom);return r(n,o),t(n.element,o),o};return{col:i,colgroup:za(e),row:Ba(e),cell:o,replace:La,colGap:Na(e),gap:Ra(e)}},Va=function(t){return{col:Na(t),colgroup:za(t),row:Ba(t),cell:Ra(t),replace:Ha,colGap:Na(t),gap:Ra(t)}},Ua=function(t,e){var n=e||document,r=n.createElement("div");return r.innerHTML=t,wn(ve.fromDom(r))},ja=function(t){return H(t,ve.fromDom)},Wa=function(t){return t.nodeName.toLowerCase()},qa=function(t){return ve.fromDom(t.getBody())},$a=function(t){return t.getBoundingClientRect().width},Ga=function(t){return t.getBoundingClientRect().height},Ka=function(t){return function(e){return Ce(e,qa(t))}},Xa=function(t){return t?t.replace(/px$/,""):""},Ya=function(t){return/^\d+(\.\d+)?$/.test(t)?t+"px":t},Ja=function(t){er(t,"data-mce-style");var e=function(t){return er(t,"data-mce-style")};I(Dr(t),e),I(Mr(t),e),I(Nr(t),e)},Qa=function(t,e){var n=t.dom.getStyle(e,"width")||t.dom.getAttrib(e,"width");return A.from(n).filter(Ot)},Za=function(t){return/^(\d+(\.\d+)?)%$/.test(t)},tc=function(t){return/^(\d+(\.\d+)?)px$/.test(t)},ec=function(t){return ve.fromDom(t.selection.getStart())},nc=function(t){return ve.fromDom(t.selection.getEnd())},rc=function(t){return mi(t.get(),v([]),b,Q)},oc=function(t){var e=function(t,e){return tr(t,e).exists((function(t){return parseInt(t,10)>1}))},n=function(t){return e(t,"rowspan")||e(t,"colspan")},r=rc(t);return r.length>0&&X(r,n)?A.some(r):A.none()},ic=function(t,e,n){return mi(e.get(),A.none,(function(e){return e.length<=1?A.none():si(t,n.firstSelectedSelector,n.lastSelectedSelector).map((function(t){return{bounds:t,cells:e}}))}),A.none)},uc="data-mce-selected",ac="td["+uc+"],th["+uc+"]",cc="["+uc+"]",sc="data-mce-first-selected",lc="td["+sc+"],th["+sc+"]",fc="data-mce-last-selected",dc="td["+fc+"],th["+fc+"]",mc=cc,gc={selected:uc,selectedSelector:ac,firstSelected:sc,firstSelectedSelector:lc,lastSelected:fc,lastSelectedSelector:dc},hc=function(t){return{element:t,mergable:A.none(),unmergable:A.none(),selection:[t]}},pc=function(t,e,n){return{element:n,mergable:ic(e,t,gc),unmergable:oc(t),selection:rc(t)}},vc=function(t,e,n){return{element:t,clipboard:e,generators:n}},bc=function(t,e,n,r){return{selection:rc(t),clipboard:n,generators:r}},yc=function(t){return Rr(t).bind((function(t){return ci(t,gc.firstSelectedSelector)})).fold(v(t),(function(t){return t[0]}))},wc=function(t){return function(e,n){var r=nn(e),o="col"===r||"colgroup"===r?yc(e):e;return Kn(o,t,n)}},xc=wc("th,td,caption"),Cc=wc("th,td"),Sc=function(t){return rc(t)},kc=function(t,e){var n=Cc(t),r=n.bind((function(t){return Rr(t)})).map((function(t){return Nr(t)}));return ir(n,r,(function(t,n){return V(n,(function(n){return B(ja(n.dom.cells),(function(n){return"1"===Zn(n,e)||Ce(n,t)}))}))})).getOr([])},Tc=function(t){return Rr(t[0]).map((function(t){var e=Ca(t,mc);return Ja(e),[e]}))},Oc=function(t,e){return H(e,(function(e){return t.selection.serializer.serialize(e.dom,{})})).join("")},Ec=function(t){return H(t,(function(t){return t.dom.innerText})).join("")},_c=function(t,e,n){t.on("BeforeGetContent",(function(n){var r=function(e){n.preventDefault(),Tc(e).each((function(e){n.content="text"===n.format?Ec(e):Oc(t,e)}))};!0===n.selection&&mi(e.get(),g,r,g)})),t.on("BeforeSetContent",(function(r){if(!0===r.selection&&!0===r.paste){var o=Sc(e);et(o).each((function(e){Rr(e).each((function(o){var i=V(Ua(r.content),(function(t){return"meta"!==nn(t)})),u=fn("table");if(1===i.length&&u(i[0])){r.preventDefault();var a=ve.fromDom(t.getDoc()),c=Va(a),s=vc(e,i[0],c);n.pasteCells(o,s).each((function(){t.focus()}))}}))}))}}))},Ac=fi.generate([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),Dc=ot({},Ac),Mc=function(t,e){return 0===t.length?Dc.none():1===t.length?Dc.only(0):0===e?Dc.left(0,1):e===t.length-1?Dc.right(e-1,e):e>0&&e<t.length-1?Dc.middle(e-1,e,e+1):Dc.none()},Rc=function(t,e,n,r,o){var i=t.slice(0),u=Mc(t,e),a=v(H(i,v(0))),c=function(t){return r.singleColumnWidth(i[t],n)},s=function(t,e){return o.calcLeftEdgeDeltas(i,t,e,n,r.minCellWidth(),r.isRelative)},l=function(t,e,u){return o.calcMiddleDeltas(i,t,e,u,n,r.minCellWidth(),r.isRelative)},f=function(t,e){return o.calcRightEdgeDeltas(i,t,e,n,r.minCellWidth(),r.isRelative)};return u.fold(a,c,s,l,f)},Nc=function(t,e,n){for(var r=0,o=t;o<e;o++)r+=void 0!==n[o]?n[o]:0;return r},zc=function(t,e){var n=so.justCells(t);return H(n,(function(t){var n=Nc(t.column,t.column+t.colspan,e);return{element:t.element,width:n,colspan:t.colspan}}))},Bc=function(t,e){var n=so.justColumns(t);return H(n,(function(t,n){return{element:t.element,width:e[n],colspan:t.colspan}}))},Lc=function(t,e){var n=so.justCells(t);return H(n,(function(t){var n=Nc(t.row,t.row+t.rowspan,e);return{element:t.element,height:n,rowspan:t.rowspan}}))},Hc=function(t,e){return H(t.all,(function(t,n){return{element:t.element,height:e[n]}}))},Ic=function(t){return U(t,(function(t,e){return t+e}),0)},Pc=function(t,e){return so.hasColumns(t)?Bc(t,e):zc(t,e)},Fc=function(t,e,n){var r=Pc(t,e);I(r,(function(t){n.setElementWidth(t.element,t.width)}))},Vc=function(t,e,n,r,o){var i=so.fromTable(t),u=o.getCellDelta(e),a=o.getWidths(i,o),c=n===i.grid.columns-1,s=r.clampTableDelta(a,n,u,o.minCellWidth(),c),l=Rc(a,n,s,o,r),f=H(l,(function(t,e){return t+a[e]}));Fc(i,f,o),r.resizeTable(o.adjustTableWidth,s,c)},Uc=function(t,e,n,r){var o=so.fromTable(t),i=aa(o,t,r),u=H(i,(function(t,r){return n===r?Math.max(e+t,Tr()):t})),a=Lc(o,u),c=Hc(o,u);I(c,(function(t){Au(t.element,t.height)})),I(a,(function(t){Au(t.element,t.height)}));var s=Ic(u);Au(t,s)},jc=function(t,e,n,r,o){var i=so.generate(e),u=r.getWidths(i,r),a=r.pixelWidth(),c=o.calcRedestributedWidths(u,a,n.pixelDelta,r.isRelative),s=c.newSizes,l=c.delta;Fc(i,s,r),r.adjustTableWidth(l)},Wc=function(t,e,n,r){var o=so.generate(e),i=r.getWidths(o,r);Fc(o,i,r)},qc=function(t){return H(t,v(0))},$c=function(t,e,n,r,o){return o(t.slice(0,e)).concat(r).concat(o(t.slice(n)))},Gc=function(t){return function(e,n,r,o){if(t(r)){var i=Math.max(o,e[n]-Math.abs(r)),u=Math.abs(i-e[n]);return r>=0?u:-u}return r}},Kc=Gc((function(t){return t<0})),Xc=Gc(k),Yc=function(){var t=function(t,e,n,r,o){var i=Kc(t,e,r,o);return $c(t,e,n+1,[i,0],qc)},e=function(t,e,n,r){var o=(100+n)/100,i=Math.max(r,(t[e]+n)/o);return H(t,(function(t,n){var r=n===e?i:t/o;return r-t}))},n=function(n,r,o,i,u,a){return a?e(n,r,i,u):t(n,r,o,i,u)},r=function(t,e,r,o,i,u,a){return n(t,r,o,i,u,a)},o=function(t,e){return t(e)},i=function(t,n,r,o,i,u){if(u)return e(t,r,o,i);var a=Kc(t,r,o,i);return qc(t.slice(0,r)).concat([a])},u=function(t,e,n,r){if(r){var o=e+n,i=o/e,u=H(t,(function(t){return t/i}));return{delta:100*i-100,newSizes:u}}return{delta:n,newSizes:t}};return{resizeTable:o,clampTableDelta:Kc,calcLeftEdgeDeltas:n,calcMiddleDeltas:r,calcRightEdgeDeltas:i,calcRedestributedWidths:u}},Jc=function(){var t=function(t,e,n,r,o){var i=r>=0?n:e,u=Xc(t,i,r,o);return $c(t,e,n+1,[u,-u],qc)},e=function(e,n,r,o,i,u){return t(e,r,o,i,u)},n=function(t,e,n){n&&t(e)},r=function(t,e,n,r,o,i){if(i)return qc(t);var u=r/t.length;return H(t,v(u))},o=function(t,e,n,r,o){if(o){if(n>=0)return n;var i=j(t,(function(t,e){return t+e-r}),0);return Math.max(-i,n)}return Kc(t,e,n,r)},i=function(t,e,n,r){return{delta:0,newSizes:t}};return{resizeTable:n,clampTableDelta:o,calcLeftEdgeDeltas:t,calcMiddleDeltas:e,calcRightEdgeDeltas:r,calcRedestributedWidths:i}},Qc=function(t,e){var n=A.from(t.dom.documentElement).map(ve.fromDom).getOr(t);return{parent:v(n),view:v(t),origin:v(Qi(0,0)),isResizable:e}},Zc=function(t,e,n){var r=function(){return eu(e)};return{parent:v(e),view:v(t),origin:r,isResizable:n}},ts=function(t,e,n){return{parent:v(e),view:v(t),origin:v(Qi(0,0)),isResizable:n}},es={only:Qc,detached:Zc,body:ts},ns=fi.generate([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),rs=function(t,e,n){var r=n.substring(0,n.length-t.length),o=parseFloat(r);return r===o.toString()?e(o):ns.invalid(n)},os=function(t){return St(t,"%")?rs("%",ns.percent,t):St(t,"px")?rs("px",ns.pixels,t):ns.invalid(t)},is=ot(ot({},ns),{from:os}),us=function(t,e){return H(t,(function(t){var n=is.from(t);return n.fold((function(){return t}),(function(t){var n=t/e*100;return n+"%"}),(function(t){return t+"%"}))}))},as=function(t,e,n){var r=n/e;return H(t,(function(t){var e=is.from(t);return e.fold((function(){return t}),(function(t){return t*r+"px"}),(function(t){return t/100*n+"px"}))}))},cs=function(t,e){var n=t.fold((function(){return v("")}),(function(t){var n=t/e;return v(n+"px")}),(function(){var t=100/e;return v(t+"%")}));return L(e,n)},ss=function(t,e,n){return t.fold((function(){return e}),(function(t){return as(e,n,t)}),(function(t){return us(e,n)}))},ls=function(t,e,n){var r=is.from(n),o=X(t,(function(t){return"0px"===t}))?cs(r,t.length):ss(r,t,e);return gs(o)},fs=function(t,e){return 0===t.length?e:U(t,(function(t,e){return is.from(e).fold(v(0),b,b)+t}),0)},ds=function(t,e){var n=Math.floor(t);return{value:n+e,remainder:t-n}},ms=function(t,e){return is.from(t).fold(v(t),(function(t){return t+e+"px"}),(function(t){return t+e+"%"}))},gs=function(t){if(0===t.length)return t;var e=U(t,(function(t,e){var n=is.from(e).fold((function(){return{value:e,remainder:0}}),(function(t){return ds(t,"px")}),(function(t){return{value:t+"%",remainder:0}}));return{output:[n.value].concat(t.output),remainder:t.remainder+n.remainder}}),{output:[],remainder:0}),n=e.output;return n.slice(0,n.length-1).concat([ms(n[n.length-1],Math.round(e.remainder))])},hs=is.from,ps=function(t,e,n){I(e,(function(e){var r=t.slice(e.column,e.colspan+e.column),o=fs(r,kr());dr(e.element,"width",o+n)}))},vs=function(t,e,n){I(e,(function(e,r){var o=fs([t[r]],kr());dr(e.element,"width",o+n)}))},bs=function(t,e,n,r){I(n,(function(e){var n=t.slice(e.row,e.rowspan+e.row),o=fs(n,Tr());dr(e.element,"height",o+r)})),I(e,(function(e,n){dr(e.element,"height",t[n])}))},ys=function(t){return hs(t).fold(v("px"),v("px"),v("%"))},ws=function(t,e,n){var r=so.fromTable(t),o=r.all,i=so.justCells(r),u=so.justColumns(r);e.each((function(e){var n=ys(e),o=Hi(t),a=ra(r,t),c=ls(a,o,e);so.hasColumns(r)?vs(c,u,n):ps(c,i,n),dr(t,"width",e)})),n.each((function(e){var n=ys(e),u=Ki(t),a=ca(r,t,gu),c=ls(a,u,e);bs(c,o,i,n),dr(t,"height",e)}))},xs=qu,Cs=$u,Ss=Gu,ks=function(t){var e=so.fromTable(t);return e.grid},Ts=function(t){var e=[],n=function(t){if(void 0===t)throw new Error("Event bind error: undefined handler");e.push(t)},r=function(t){e=V(e,(function(e){return e!==t}))},o=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o={};I(t,(function(t,e){o[t]=n[e]})),I(e,(function(t){t(o)}))};return{bind:n,unbind:r,trigger:o}},Os=function(t){var e=De(t,(function(t){return{bind:t.bind,unbind:t.unbind}})),n=De(t,(function(t){return t.trigger}));return{registry:e,trigger:n}},Es=function(t,e){var n=null,r=function(){a(n)||(clearTimeout(n),n=null)},o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r(),n=setTimeout((function(){n=null,t.apply(null,o)}),e)};return{cancel:r,throttle:o}},_s=function(t){return t.slice(0).sort()},As=function(t,e){throw new Error("All required keys ("+_s(t).join(", ")+") were not specified. Specified keys were: "+_s(e).join(", ")+".")},Ds=function(t){throw new Error("Unsupported keys for object: "+_s(t).join(", "))},Ms=function(t,e){if(!u(e))throw new Error("The "+t+" fields must be an array. Was: "+e+".");I(e,(function(e){if(!o(e))throw new Error("The value "+e+" in the "+t+" fields was not a string.")}))},Rs=function(t,e){throw new Error("All values need to be of type: "+e+". Keys ("+_s(t).join(", ")+") were not.")},Ns=function(t){var e=_s(t),n=q(e,(function(t,n){return n<e.length-1&&t===e[n+1]}));n.each((function(t){throw new Error("The field: "+t+" occurs more than once in the combined fields: ["+e.join(", ")+"].")}))},zs=function(t,e){return Bs(t,e,{validate:d,label:"function"})},Bs=function(t,e,n){if(0===e.length)throw new Error("You must specify at least one required field.");return Ms("required",e),Ns(e),function(r){var o=Ee(r),i=X(e,(function(t){return z(o,t)}));i||As(e,o),t(e,o);var u=V(e,(function(t){return!n.validate(r[t],t)}));return u.length>0&&Rs(u,n.label),r}},Ls=function(t,e){var n=V(e,(function(e){return!z(t,e)}));n.length>0&&Ds(n)},Hs=function(t){return zs(Ls,t)},Is=Hs(["compare","extract","mutate","sink"]),Ps=Hs(["element","start","stop","destroy"]),Fs=Hs(["forceDrop","drop","move","delayDrop"]),Vs=function(){var t=A.none(),e=function(){t=A.none()},n=function(e,n){var r=t.map((function(t){return e.compare(t,n)}));return t=A.some(n),r},r=function(t,e){var r=e.extract(t);r.each((function(t){var r=n(e,t);r.each((function(t){o.trigger.move(t)}))}))},o=Os({move:Ts(["info"])});return{onEvent:r,reset:e,events:o.registry}},Us=function(){var t=Os({move:Ts(["info"])});return{onEvent:g,reset:g,events:t.registry}},js=function(){var t=Us(),e=Vs(),n=t,r=function(){n.reset(),n=e},o=function(){n.reset(),n=t},i=function(t,e){n.onEvent(t,e)},u=function(){return n===e};return{on:r,off:o,isOn:u,onEvent:i,events:e.events}},Ws=function(t,e,n){var r=!1,o=Os({start:Ts([]),stop:Ts([])}),i=js(),u=function(){m.stop(),i.isOn()&&(i.off(),o.trigger.stop())},a=Es(u,200),c=function(t){m.start(t),i.on(),o.trigger.start()},s=function(t){a.cancel(),i.onEvent(t,e)};i.events.move.bind((function(n){e.mutate(t,n.info)}));var l=function(){r=!0},f=function(){r=!1},d=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r&&t.apply(null,e)}},m=e.sink(Fs({forceDrop:u,drop:d(u),move:d(s),delayDrop:d(a.throttle)}),n),g=function(){m.destroy()};return{element:m.element,go:c,on:l,off:f,destroy:g,events:o.registry}},qs=function(t,e,n,r,o,i,u){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:u}},$s=function(t){var e=ve.fromDom(An(t).getOr(t.target)),n=function(){return t.stopPropagation()},r=function(){return t.preventDefault()},o=h(r,n);return qs(e,t.clientX,t.clientY,n,r,o,t)},Gs=function(t,e){return function(n){t(n)&&e($s(n))}},Ks=function(t,e,n,r,o){var i=Gs(n,r);return t.dom.addEventListener(e,i,o),{unbind:w(Ys,t,e,i,o)}},Xs=function(t,e,n,r){return Ks(t,e,n,r,!1)},Ys=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},Js=k,Qs=function(t,e,n){return Xs(t,e,Js,n)},Zs=$s,tl=function(t,e){var n=Zn(t,e);return void 0===n||""===n?[]:n.split(" ")},el=function(t,e,n){var r=tl(t,e),o=r.concat([n]);return Yn(t,e,o.join(" ")),!0},nl=function(t,e,n){var r=V(tl(t,e),(function(t){return t!==n}));return r.length>0?Yn(t,e,r.join(" ")):er(t,e),!1},rl=function(t){return void 0!==t.dom.classList},ol=function(t){return tl(t,"class")},il=function(t,e){return el(t,"class",e)},ul=function(t,e){return nl(t,"class",e)},al=function(t,e){rl(t)?t.dom.classList.add(e):il(t,e)},cl=function(t){var e=rl(t)?t.dom.classList:ol(t);0===e.length&&er(t,"class")},sl=function(t,e){if(rl(t)){var n=t.dom.classList;n.remove(e)}else ul(t,e);cl(t)},ll=function(t,e){return rl(t)&&t.dom.classList.contains(e)},fl=function(t){var e=t.replace(/\./g,"-"),n=function(t){return e+"-"+t};return{resolve:n}},dl=fl("ephox-dragster"),ml=dl.resolve,gl=function(t){var e=ot({layerClass:ml("blocker")},t),n=ve.fromTag("div");Yn(n,"role","presentation"),mr(n,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),al(n,ml("blocker")),al(n,e.layerClass);var r=v(n),o=function(){Bo(n)};return{element:r,destroy:o}},hl=function(t,e){return Qi(e.left-t.left,e.top-t.top)},pl=function(t){return A.some(Qi(t.x,t.y))},vl=function(t,e){t.mutate(e.left,e.top)},bl=function(t,e){var n=gl(e),r=Qs(n.element(),"mousedown",t.forceDrop),o=Qs(n.element(),"mouseup",t.drop),i=Qs(n.element(),"mousemove",t.move),u=Qs(n.element(),"mouseout",t.delayDrop),a=function(){n.destroy(),o.unbind(),i.unbind(),u.unbind(),r.unbind()},c=function(t){_o(t,n.element())},s=function(){Bo(n.element())};return Ps({element:n.element,start:c,stop:s,destroy:a})},yl=Is({compare:hl,extract:pl,sink:bl,mutate:vl}),wl=function(t,e){void 0===e&&(e={});var n=void 0!==e.mode?e.mode:yl;return Ws(t,n,e)},xl=function(t){return Kn(t,"[contenteditable]")},Cl=function(t,e){return void 0===e&&(e=!1),!oe().browser.isIE()&&Mn(t)?t.dom.isContentEditable:xl(t).fold(v(e),(function(t){return"true"===Sl(t)}))},Sl=function(t){return t.dom.contentEditable},kl=fl("ephox-snooker"),Tl=kl.resolve,Ol=function(){var t=Os({drag:Ts(["xDelta","yDelta"])}),e=function(e,n){t.trigger.drag(e,n)};return{mutate:e,events:t.registry}},El=function(){var t=Os({drag:Ts(["xDelta","yDelta","target"])}),e=A.none(),n=Ol();n.events.drag.bind((function(n){e.each((function(e){t.trigger.drag(n.xDelta,n.yDelta,e)}))}));var r=function(t){e=A.some(t)},o=function(){return e};return{assign:r,get:o,mutate:n.mutate,events:t.registry}},_l=function(t,e,n,r,o){var i=ve.fromTag("div");return mr(i,{position:"absolute",left:e-r/2+"px",top:n+"px",height:o+"px",width:r+"px"}),Jn(i,{"data-column":t,role:"presentation"}),i},Al=function(t,e,n,r,o){var i=ve.fromTag("div");return mr(i,{position:"absolute",left:e+"px",top:n-o/2+"px",height:o+"px",width:r+"px"}),Jn(i,{"data-row":t,role:"presentation"}),i},Dl=Tl("resizer-bar"),Ml=Tl("resizer-rows"),Rl=Tl("resizer-cols"),Nl=7,zl=function(t,e){return K(t.all,(function(t,n){return e(t.element)?[n]:[]}))},Bl=function(t,e){var n=[];return L(t.grid.columns,(function(r){var o=so.getColumnAt(t,r).map((function(t){return t.element}));o.forall(e)&&n.push(r)})),V(n,(function(n){var r=so.filterItems(t,(function(t){return t.column===n}));return X(r,(function(t){return e(t.element)}))}))},Ll=function(t){var e=Pn(t.parent(),"."+Dl);I(e,Bo)},Hl=function(t,e,n){var r=t.origin();I(e,(function(e){e.each((function(e){var o=n(r,e);al(o,Dl),_o(t.parent(),o)}))}))},Il=function(t,e,n,r){Hl(t,e,(function(t,e){var o=_l(e.col,e.x-t.left,n.top-t.top,Nl,r);return al(o,Rl),o}))},Pl=function(t,e,n,r){Hl(t,e,(function(t,e){var o=Al(e.row,n.left-t.left,e.y-t.top,r,Nl);return al(o,Ml),o}))},Fl=function(t,e,n,r,o){var i=eu(n),u=e.isResizable,a=r.length>0?gu.positions(r,n):[],c=a.length>0?zl(t,u):[],s=V(a,(function(t,e){return B(c,(function(t){return e===t}))}));Pl(e,s,i,Ii(n));var l=o.length>0?bu.positions(o,n):[],f=l.length>0?Bl(t,u):[],d=V(l,(function(t,e){return B(f,(function(t){return e===t}))}));Il(e,d,i,Xi(n))},Vl=function(t,e){if(Ll(t),t.isResizable(e)){var n=so.fromTable(e),r=ji(n),o=Vi(n);Fl(n,t,e,r,o)}},Ul=function(t,e){var n=Pn(t.parent(),"."+Dl);I(n,e)},jl=function(t){Ul(t,(function(t){dr(t,"display","none")}))},Wl=function(t){Ul(t,(function(t){dr(t,"display","block")}))},ql=function(t){return ll(t,Ml)},$l=function(t){return ll(t,Rl)},Gl=Tl("resizer-bar-dragging"),Kl=function(t){var e=El(),n=wl(e,{}),r=A.none(),o=function(t,e){return A.from(Zn(t,e))};e.events.drag.bind((function(t){o(t.target,"data-row").each((function(e){var n=Sr(t.target,"top");dr(t.target,"top",n+t.yDelta+"px")})),o(t.target,"data-column").each((function(e){var n=Sr(t.target,"left");dr(t.target,"left",n+t.xDelta+"px")}))}));var i=function(t,e){var n=Sr(t,e),r=yr(t,"data-initial-"+e,0);return n-r};n.events.stop.bind((function(){e.get().each((function(e){r.each((function(n){o(e,"data-row").each((function(t){var r=i(e,"top");er(e,"data-initial-top"),m.trigger.adjustHeight(n,r,parseInt(t,10))})),o(e,"data-column").each((function(t){var r=i(e,"left");er(e,"data-initial-left"),m.trigger.adjustWidth(n,r,parseInt(t,10))})),Vl(t,n)}))}))}));var u=function(r,o){m.trigger.startAdjust(),e.assign(r),Yn(r,"data-initial-"+o,Sr(r,o)),al(r,Gl),dr(r,"opacity","0.2"),n.go(t.parent())},a=Qs(t.parent(),"mousedown",(function(t){ql(t.target)&&u(t.target,"top"),$l(t.target)&&u(t.target,"left")})),c=function(e){return Ce(e,t.view())},s=function(t){return Kn(t,"table",c).filter(Cl)},l=Qs(t.view(),"mouseover",(function(e){s(e.target).fold((function(){Mn(e.target)&&Ll(t)}),(function(e){r=A.some(e),Vl(t,e)}))})),f=function(){a.unbind(),l.unbind(),n.destroy(),Ll(t)},d=function(e){Vl(t,e)},m=Os({adjustHeight:Ts(["table","delta","row"]),adjustWidth:Ts(["table","delta","column"]),startAdjust:Ts([])});return{destroy:f,refresh:d,on:n.on,off:n.off,hideBars:w(jl,t),showBars:w(Wl,t),events:m.registry}},Xl=function(t,e,n){var r=gu,o=bu,i=Kl(t),u=Os({beforeResize:Ts(["table","type"]),afterResize:Ts(["table","type"]),startDrag:Ts([])});return i.events.adjustHeight.bind((function(t){var e=t.table;u.trigger.beforeResize(e,"row");var n=r.delta(t.delta,e);Uc(e,n,t.row,r),u.trigger.afterResize(e,"row")})),i.events.startAdjust.bind((function(t){u.trigger.startDrag()})),i.events.adjustWidth.bind((function(t){var r=t.table;u.trigger.beforeResize(r,"col");var i=o.delta(t.delta,r),a=n(r);Vc(r,i,t.column,e,a),u.trigger.afterResize(r,"col")})),{on:i.on,off:i.off,hideBars:i.hideBars,showBars:i.showBars,destroy:i.destroy,events:u.registry}},Yl={create:Xl},Jl=function(t,e){return t.fire("newrow",{node:e})},Ql=function(t,e){return t.fire("newcell",{node:e})},Zl=function(t,e,n,r,o){t.fire("ObjectResizeStart",{target:e,width:n,height:r,origin:o})},tf=function(t,e,n,r,o){t.fire("ObjectResized",{target:e,width:n,height:r,origin:o})},ef=function(t,e,n,r,o){t.fire("TableSelectionChange",{cells:e,start:n,finish:r,otherCells:o})},nf=function(t){t.fire("TableSelectionClear")},rf=function(t,e,n){t.fire("TableModified",ot(ot({},n),{table:e}))},of={structure:!1,style:!0},uf={structure:!0,style:!1},af={structure:!0,style:!0},cf="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol",sf={"border-collapse":"collapse",width:"100%"},lf=L(5,(function(t){var e=t+1+"px";return{title:e,value:e}})),ff=H(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],(function(t){return{title:t,value:t.toLowerCase()}})),df=function(t){var e;if(Nf(t)){var n=t.dom,r=null!==(e=n.getParent(t.selection.getStart(),n.isBlock))&&void 0!==e?e:t.getBody(),o=Pi(ve.fromDom(r));return ot(ot({},sf),{width:o+"px"})}return zf(t)?ze(sf,(function(t,e){return"width"!==e})):sf},mf={border:"1"},gf="preservetable",hf=function(t){return t.getParam("table_sizing_mode","auto")},pf=function(t){return t.getParam("table_responsive_width")},vf=function(t){return t.getParam("table_border_widths",lf,"array")},bf=function(t){return t.getParam("table_border_styles",ff,"array")},yf=function(t){return t.getParam("table_default_attributes",mf,"object")},wf=function(t){return t.getParam("table_default_styles",df(t),"object")},xf=function(t){return t.getParam("table_resize_bars",!0,"boolean")},Cf=function(t){return t.getParam("table_tab_navigation",!0,"boolean")},Sf=function(t){return t.getParam("table_cell_advtab",!0,"boolean")},kf=function(t){return t.getParam("table_row_advtab",!0,"boolean")},Tf=function(t){return t.getParam("table_advtab",!0,"boolean")},Of=function(t){return t.getParam("table_appearance_options",!0,"boolean")},Ef=function(t){return t.getParam("table_grid",!0,"boolean")},_f=function(t){return t.getParam("table_style_by_css",!1,"boolean")},Af=function(t){return t.getParam("table_cell_class_list",[],"array")},Df=function(t){return t.getParam("table_row_class_list",[],"array")},Mf=function(t){return t.getParam("table_class_list",[],"array")},Rf=function(t){return"relative"===hf(t)||!0===pf(t)},Nf=function(t){return"fixed"===hf(t)||!1===pf(t)},zf=function(t){return"responsive"===hf(t)},Bf=function(t){return t.getParam("table_toolbar",cf)},Lf=function(t){return t.getParam("table_use_colgroups",!1,"boolean")},Hf=function(t){var e="section",n=t.getParam("table_header_type",e,"string"),r=["section","cells","sectionCells","auto"];return z(r,n)?n:e},If=function(t){var e=["preservetable","resizetable"],n=t.getParam("table_column_resizing",gf,"string");return q(e,(function(t){return t===n})).getOr(gf)},Pf=function(t){return"preservetable"===If(t)},Ff=function(t){return"resizetable"===If(t)},Vf=function(t){var e=t.getParam("table_clone_elements");return o(e)?A.some(e.split(/[ ,]/)):Array.isArray(e)?A.some(e):A.none()},Uf=function(t){var e=t.getParam("object_resizing",!0);return o(e)?"table"===e:e},jf=function(t){return t.getParam("table_background_color_map",[],"array")},Wf=function(t){return t.getParam("table_border_color_map",[],"array")},qf=function(t,e){return Rf(t)?ha.percentageSize(e):Nf(t)?ha.pixelSize(e):ha.getTableSize(e)},$f=function(t){er(t,"width")},Gf=function(t){var e=Wu(t);ws(t,A.some(e),A.none()),$f(t)},Kf=function(t){var e=ju(t);ws(t,A.some(e),A.none()),$f(t)},Xf=function(t){vr(t,"width");var e=Mr(t),n=e.length>0?e:Dr(t);I(n,(function(t){vr(t,"width"),$f(t)})),$f(t)},Yf=Gf,Jf=Kf,Qf=Xf,Zf=function(t){var e=so.fromTable(t);so.hasColumns(e)||I(Dr(t),(function(t){var e=gr(t,"width");dr(t,"width",e),er(t,"width")}))},td=function(){var t=ve.fromTag("div");return mr(t,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),_o(Rn(),t),t},ed=function(t,e){return t.inline?es.body(qa(t),td(),e):es.only(ve.fromDom(t.getDoc()),e)},nd=function(t,e){t.inline&&Bo(e.parent())},rd="bar-",od=function(t){return"false"!==Zn(t,"data-mce-resize")},id=function(t){var e,n,r=A.none(),o=A.none(),i=A.none(),u=function(t){return"TABLE"===t.nodeName},a=function(){return o},c=function(){return i.getOr(es.only(ve.fromDom(t.getBody()),od))},s=function(e){return qf(t,e)},l=function(){return Pf(t)?Jc():Yc()},f=function(t){return ks(t).columns},d=function(r,o,i){var u=St(o,"e");if(""===n&&Yf(r),i!==e&&""!==n){dr(r,"width",n);var a=l(),c=s(r),d=Pf(t)||u?f(r)-1:0;Vc(r,i-e,d,a,c)}else if(Za(n)){var m=parseFloat(n.replace("%","")),g=i*m/e;dr(r,"width",g+"%")}tc(n)&&Zf(r)},m=function(){o.each((function(t){t.destroy()})),i.each((function(e){nd(t,e)}))};return t.on("init",(function(){var e=ed(t,od);if(i=A.some(e),Uf(t)&&xf(t)){var n=l(),u=Yl.create(e,n,s);u.on(),u.events.startDrag.bind((function(e){r=A.some(t.selection.getRng())})),u.events.beforeResize.bind((function(e){var n=e.table.dom;Zl(t,n,$a(n),Ga(n),rd+e.type)})),u.events.afterResize.bind((function(e){var n=e.table,o=n.dom;Ja(n),r.each((function(e){t.selection.setRng(e),t.focus()})),tf(t,o,$a(o),Ga(o),rd+e.type),t.undoManager.add()})),o=A.some(u)}})),t.on("ObjectResizeStart",(function(r){var o=r.target;if(u(o)){var i=ve.fromDom(o);I(t.dom.select(".mce-clonedresizable"),(function(e){t.dom.addClass(e,"mce-"+If(t)+"-columns")})),!Cs(i)&&Nf(t)?Jf(i):!xs(i)&&Rf(t)&&Yf(i),Ss(i)&&Ct(r.origin,rd)&&Yf(i),e=r.width,n=zf(t)?"":Qa(t,o).getOr("")}})),t.on("ObjectResized",(function(e){var n=e.target;if(u(n)){var r=ve.fromDom(n),o=e.origin;Ct(o,"corner-")&&d(r,o,e.width),Ja(r),rf(t,r.dom,of)}})),t.on("SwitchMode",(function(){a().each((function(e){t.mode.isReadOnly()?e.hideBars():e.showBars()}))})),{lazyResize:a,lazyWire:c,destroy:m}},ud=function(t,e){return{element:t,offset:e}},ad=function(t,e,n){return t.property().isText(e)&&0===t.property().getText(e).trim().length||t.property().isComment(e)?n(e).bind((function(e){return ad(t,e,n).orThunk((function(){return A.some(e)}))})):A.none()},cd=function(t,e){if(t.property().isText(e))return t.property().getText(e).length;var n=t.property().children(e);return n.length},sd=function(t,e){var n=ad(t,e,t.query().prevSibling).getOr(e);if(t.property().isText(n))return ud(n,cd(t,n));var r=t.property().children(n);return r.length>0?sd(t,r[r.length-1]):ud(n,cd(t,n))},ld=sd,fd=jo(),dd=function(t){return ld(fd,t)},md=function(t,e){var n=wr(t,"colspan");if(1===n){var r=Vu(t);r.each((function(n){var r=n.value/2;Uu(t,r,n.unit),Uu(e,r,n.unit)}))}},gd=fn("th"),hd=function(t){return X(t,(function(t){return gd(t.element)}))},pd=function(t,e){return t&&e?"sectionCells":t?"section":"cells"},vd=function(t){var e="thead"===t.section,n=rr(bd(t.cells),"th");return e||n?{type:"header",subType:pd(e,n)}:"tfoot"===t.section?{type:"footer"}:{type:"body"}},bd=function(t){var e=V(t,(function(t){return gd(t.element)}));return 0===e.length?A.some("td"):e.length===t.length?A.some("th"):A.none()},yd=function(t){var e=H(t,(function(t){return vd(t).type})),n=z(e,"header"),r=z(e,"footer");if(n||r){var o=z(e,"body");return!n||o||r?n||o||!r?A.none():A.some("footer"):A.some("header")}return A.some("body")},wd=function(t){return rt(t.all,(function(t){var e=vd(t);return"header"===e.type?A.from(e.subType):A.none()}))},xd=function(t,e,n){return Je(n(t.element,e),!0,t.isLocked)},Cd=function(t,e){return t.section!==e?Qe(t.element,t.cells,e,t.isNew):t},Sd=function(){return{transformRow:Cd,transformCell:function(t,e,n){var r=n(t.element,e),o="td"!==nn(r)?ki(r,"td"):r;return Je(o,t.isNew,t.isLocked)}}},kd=function(){return{transformRow:Cd,transformCell:xd}},Td=function(){return{transformRow:function(t,e){var n="thead"===e?"tbody":e;return Cd(t,n)},transformCell:xd}},Od=function(){return{transformRow:b,transformCell:xd}},Ed=function(t,e){var n=so.fromTable(t),r=wd(n).getOr(e);switch(r){case"section":return Sd();case"sectionCells":return kd();case"cells":return Td()}},_d={getTableSectionType:Ed,section:Sd,sectionCells:kd,cells:Td,fallback:Od},Ad=function(t,e,n,r){n===r?er(t,e):Yn(t,e,n)},Dd=function(t,e,n){nt(In(t,e)).fold((function(){return Eo(t,n)}),(function(t){return Oo(t,n)}))},Md=function(t,e){var n=$n(t,e).getOrThunk((function(){var n=ve.fromTag(e,dn(t).dom);return"thead"===e?Dd(t,"caption,colgroup",n):"colgroup"===e?Dd(t,"caption",n):_o(t,n),n}));return zo(n),n},Rd=function(t,e){var n=[],r=[],o=function(t){return H(t,(function(t){t.isNew&&n.push(t.element);var e=t.element;return zo(e),I(t.cells,(function(t){t.isNew&&r.push(t.element),Ad(t.element,"colspan",t.colspan,1),Ad(t.element,"rowspan",t.rowspan,1),_o(e,t.element)})),e}))},i=function(t){return K(t,(function(t){return H(t.cells,(function(t){return Ad(t.element,"span",t.colspan,1),t.element}))}))},u=function(e,n){var r=Md(t,n),u="colgroup"===n?i:o,a=u(e);No(r,a)},a=function(e){$n(t,e).each(Bo)},c=function(t,e){t.length>0?u(t,e):a(e)},s=[],l=[],f=[],d=[];return I(e,(function(t){switch(t.section){case"thead":s.push(t);break;case"tbody":l.push(t);break;case"tfoot":f.push(t);break;case"colgroup":d.push(t);break}})),c(d,"colgroup"),c(s,"thead"),c(l,"tbody"),c(f,"tfoot"),{newRows:n,newCells:r}},Nd=function(t){return H(t,(function(t){var e=wi(t.element);return I(t.cells,(function(t){var n=xi(t.element);Ad(n,"colspan",t.colspan,1),Ad(n,"rowspan",t.rowspan,1),_o(e,n)})),e}))},zd=function(t,e){return H(t,(function(t){return Wr(t,e)}))},Bd=function(t,e){return t[e]},Ld=function(t,e){if(0===t.length)return 0;var n=t[0],r=$(t,(function(t){return!e(n.element,t.element)}));return r.getOr(t.length)},Hd=function(t,e,n,r){var o=Bd(t,e),i="colgroup"===o.section,u=Ld(o.cells.slice(n),r),a=i?1:Ld(zd(t.slice(e),n),r);return{colspan:u,rowspan:a}},Id=function(t,e){var n=H(t,(function(t){return H(t.cells,S)})),r=function(t,e,r,o){for(var i=t;i<t+r;i++)for(var u=e;u<e+o;u++)n[i][u]=!0};return H(t,(function(o,i){var u=K(o.cells,(function(o,u){if(!1===n[i][u]){var a=Hd(t,i,u,e);return r(i,u,a.rowspan,a.colspan),[Ge(o.element,a.rowspan,a.colspan,o.isNew)]}return[]}));return Ye(o.element,u,o.section,o.isNew)}))},Pd=function(t,e,n){var r=[];I(t.colgroups,(function(o){for(var i=[],u=0;u<t.grid.columns;u++){var a=so.getColumnAt(t,u).map((function(t){return Je(t.element,n,!1)})).getOrThunk((function(){return Je(e.colGap(),!0,!1)}));i.push(a)}r.push(Qe(o.element,i,"colgroup",n))}));for(var o=0;o<t.grid.rows;o++){for(var i=[],u=0;u<t.grid.columns;u++){var a=so.getAt(t,o,u).map((function(t){return Je(t.element,n,t.isLocked)})).getOrThunk((function(){return Je(e.gap(),!0,!1)}));i.push(a)}var c=t.all[o],s=Qe(c.element,i,c.section,n);r.push(s)}return r},Fd=function(t,e){return Pd(t,e,!1)},Vd=function(t){return Id(t,Ce)},Ud=function(t,e){return rt(t.all,(function(t){return q(t.cells,(function(t){return Ce(e,t.element)}))}))},jd=function(t,e,n){var r=H(e.selection,(function(e){return Ar(e).bind((function(e){return Ud(t,e)})).filter(n)})),o=or(r);return cr(o.length>0,o)},Wd=function(t,e,n,r,o){return function(i,u,a,c,s){var l=so.fromTable(u),f=A.from(null===s||void 0===s?void 0:s.section).getOrThunk(_d.fallback),d=e(l,a).map((function(e){var n=Fd(l,c),r=t(n,e,Ce,o(c),f),i=Jr(r.grid),u=Vd(r.grid);return{info:e,grid:u,cursor:r.cursor,lockedColumns:i}}));return d.bind((function(t){var e=Rd(u,t.grid),o=A.from(null===s||void 0===s?void 0:s.sizing).getOrThunk((function(){return ha.getTableSize(u)})),a=A.from(null===s||void 0===s?void 0:s.resize).getOrThunk(Jc);return n(u,t.grid,t.info,{sizing:o,resize:a,section:f}),r(u),Vl(i,u),er(u,Xr),t.lockedColumns.length>0&&Yn(u,Xr,t.lockedColumns.join(",")),A.some({cursor:t.cursor,newRows:e.newRows,newCells:e.newCells})}))}},qd=function(t,e){return Ar(e.element).bind((function(n){return Ud(t,n).map((function(t){var n=ot(ot({},t),{generators:e.generators,clipboard:e.clipboard});return n}))}))},$d=function(t,e){return jd(t,e,k).map((function(t){return{cells:t,generators:e.generators,clipboard:e.clipboard}}))},Gd=function(t,e){return e.mergable},Kd=function(t,e){return e.unmergable},Xd=function(t,e){return jd(t,e,k)},Yd=function(t,e){return jd(t,e,(function(t){return!t.isLocked}))},Jd=function(t,e){return Ud(t,e).exists((function(t){return!t.isLocked}))},Qd=function(t,e){return X(e,(function(e){return Jd(t,e)}))},Zd=function(t,e){return Gd(t,e).filter((function(e){return Qd(t,e.cells)}))},tm=function(t,e){return Kd(t,e).filter((function(e){return Qd(t,e)}))},em=function(t,e,n,r){var o=Gr(t).rows;if(0===o.length)return t;for(var i=e.startRow;i<=e.finishRow;i++)for(var u=e.startCol;u<=e.finishCol;u++){var a=o[i],c=Wr(a,u).isLocked;Vr(a,u,Je(r(),!1,c))}return t},nm=function(t,e,n,r){for(var o=Gr(t).rows,i=!0,u=0;u<o.length;u++)for(var a=0;a<$r(o[0]);a++){var c=o[u],s=Wr(c,a),l=s.element,f=n(l,e);!0===f&&!1===i?Vr(c,a,Je(r(),!0,s.isLocked)):!0===f&&(i=!1)}return t},rm=function(t,e){return j(t,(function(t,n){return B(t,(function(t){return e(t.element,n.element)}))?t:t.concat([n])}),[])},om=function(t,e,n,r){return e>0&&e<t[0].cells.length&&I(t,(function(t){var o=t.cells[e-1],i=t.cells[e],u=n(i.element,o.element);u&&Vr(t,e,Je(r(),!0,i.isLocked))})),t},im=function(t,e,n,r){var o=Gr(t).rows;if(e>0&&e<o.length){var i=o[e-1].cells,u=rm(i,n);I(u,(function(t){for(var i=A.none(),u=e;u<o.length;u++)for(var a=function(e){var a=o[u],c=Wr(a,e),s=n(c.element,t.element);s&&(i.isNone()&&(i=A.some(r())),i.each((function(t){Vr(a,e,Je(t,!0,c.isLocked))})))},c=0;c<$r(o[0]);c++)a(c)}))}return t},um=function(t){var e=function(e){return um(t)},n=function(e){return um(t)},r=function(e){return um(e(t))},o=function(e){return um(t)},i=function(e){e(t)},u=function(e){return e(t)},a=function(e,n){return n(t)},c=function(e){return e(t)},s=function(e){return e(t)},l=function(){return A.some(t)};return{isValue:k,isError:S,getOr:v(t),getOrThunk:v(t),getOrDie:v(t),or:e,orThunk:n,fold:a,map:r,mapError:o,each:i,bind:u,exists:c,forall:s,toOptional:l}},am=function(t){var e=function(t){return t()},n=function(){return C(String(t))()},r=b,o=function(t){return t()},i=function(e){return am(t)},u=function(e){return am(e(t))},a=function(e){return am(t)},c=function(e,n){return e(t)};return{isValue:S,isError:k,getOr:b,getOrThunk:e,getOrDie:n,or:r,orThunk:o,fold:c,map:i,mapError:u,each:g,bind:a,exists:S,forall:k,toOptional:A.none}},cm=function(t,e){return t.fold((function(){return am(e)}),um)},sm={value:um,error:am,fromOption:cm},lm=function(t,e,n){if(t.row>=e.length||t.column>$r(e[0]))return sm.error("invalid start address out of table bounds, row: "+t.row+", column: "+t.column);var r=e.slice(t.row),o=r[0].cells.slice(t.column),i=$r(n[0]),u=n.length;return sm.value({rowDelta:r.length-u,colDelta:o.length-i})},fm=function(t,e){var n=$r(t[0]),r=$r(e[0]);return{rowDelta:0,colDelta:n-r}},dm=function(t,e){var n=t.length,r=e.length;return{rowDelta:n-r,colDelta:0}},mm=function(t,e,n,r){var o="colgroup"===e.section?n.col:n.cell;return L(t,(function(t){return Je(o(),!0,r(t))}))},gm=function(t,e,n,r){var o=t[t.length-1];return t.concat(L(e,(function(){var t="colgroup"===o.section?n.colgroup:n.row,e=Kr(o,t,b),i=mm(e.cells.length,e,n,(function(t){return Pe(r,t.toString())}));return Ur(e,i)})))},hm=function(t,e,n,r){return H(t,(function(t){var o=mm(e,t,n,S);return Pr(t,r,o)}))},pm=function(t,e,n){return H(t,(function(t){return j(n,(function(n,r){var o=mm(1,t,e,k)[0];return Fr(n,r,o)}),t)}))},vm=function(t,e,n){var r=e.colDelta<0?hm:b,o=e.rowDelta<0?gm:b,i=Jr(t),u=$r(t[0]),a=B(i,(function(t){return t===u-1})),c=r(t,Math.abs(e.colDelta),n,a?u-1:u),s=Jr(c);return o(c,Math.abs(e.rowDelta),n,J(s,k))},bm=function(t,e,n,r){var o=Wr(t[e],n),i=w(r,o.element),u=t[e];return t.length>1&&$r(u)>1&&(n>0&&i(qr(u,n-1))||n<u.cells.length-1&&i(qr(u,n+1))||e>0&&i(qr(t[e-1],n))||e<t.length-1&&i(qr(t[e+1],n)))},ym=function(t,e,n,r,o,i){for(var u=t.row,a=t.column,c=n.length,s=$r(n[0]),l=u+c,f=a+s+i.length,d=J(i,k),m=u;m<l;m++)for(var g=0,h=a;h<f;h++)if(d[h])g++;else{bm(e,m,h,o)&&nm(e,qr(e[m],h),o,r.cell);var p=h-a-g,v=Wr(n[m-u],p),b=v.element,y=r.replace(b);Vr(e[m],h,Je(y,!0,v.isLocked))}return e},wm=function(t,e,n){var r=$r(e[0]),o=Gr(e).cols.length+t.row,i=L(r-t.column,(function(e){return e+t.column})),u=q(i,(function(t){return X(n,(function(e){return e!==t}))})).getOr(r-1);return{row:o,column:u}},xm=function(t,e,n){return V(n,(function(n){return n>=t.column&&n<=$r(e[0])+t.column}))},Cm=function(t,e,n,r,o){var i=Jr(e),u=wm(t,e,i),a=Gr(n).rows,c=xm(u,a,i),s=lm(u,e,a);return s.map((function(t){var n=ot(ot({},t),{colDelta:t.colDelta-c.length}),i=vm(e,n,r),s=Jr(i),l=xm(u,a,s);return ym(u,i,a,r,o,l)}))},Sm=function(t,e,n,r,o){om(e,t,o,r.cell);var i=dm(n,e),u=vm(n,i,r),a=dm(e,u),c=vm(e,a,r);return H(c,(function(e,n){return Pr(e,t,u[n].cells)}))},km=function(t,e,n,r,o){im(e,t,o,r.cell);var i=Jr(e),u=fm(e,n),a=ot(ot({},u),{colDelta:u.colDelta-i.length}),c=vm(e,a,r),s=Gr(c),l=s.cols,f=s.rows,d=Jr(c),m=fm(n,e),g=ot(ot({},m),{colDelta:m.colDelta+d.length}),h=pm(n,r,d),p=vm(h,g,r);return l.concat(f.slice(0,t)).concat(p).concat(f.slice(t,f.length))},Tm=function(t,e,n,r){return Kr(t,(function(t){return r(t,n)}),e)},Om=function(t,e,n,r,o){var i=Gr(t),u=i.rows,a=i.cols,c=u.slice(0,e),s=u.slice(e),l=Tm(u[n],(function(t,n){var i=e>0&&e<u.length&&r(qr(u[e-1],n),qr(u[e],n)),a=i?Wr(u[e],n):Je(o(t.element,r),!0,t.isLocked);return a}),r,o);return a.concat(c).concat([l]).concat(s)},Em=function(t,e,n,r,o,i,u){if("colgroup"!==n&&r)return Wr(t,e);var a=Wr(t,o);return Je(u(a.element,i),!0,!1)},_m=function(t,e,n,r,o){return H(t,(function(t){var i=e>0&&e<$r(t)&&r(qr(t,e-1),qr(t,e)),u=Em(t,e,t.section,i,n,r,o);return Fr(t,e,u)}))},Am=function(t,e){return K(t,(function(t){var n=t.cells,r=U(e,(function(t,e){return e>=0&&e<t.length?t.slice(0,e).concat(t.slice(e+1)):t}),n);return r.length>0?[Qe(t.element,r,t.section,t.isNew)]:[]}))},Dm=function(t,e,n){var r=Gr(t),o=r.rows,i=r.cols;return i.concat(o.slice(0,e)).concat(o.slice(n+1))},Mm=function(t,e,n,r){return void 0!==qr(t[e],n)&&e>0&&r(qr(t[e-1],n),qr(t[e],n))},Rm=function(t,e,n){return e>0&&n(qr(t,e-1),qr(t,e))},Nm=function(t,e,n,r){return Mm(t,e,n,r)||Rm(t[e],n,r)},zm=function(t,e){var n=X(e,b)&&hd(t.cells);return n?k:function(t,n,r){var o=nn(t.element);return!("th"===o&&e[r])}},Bm=function(t,e){var n=X(e,b)&&hd(t);return n?k:function(t,n,r){var o=nn(t.element);return!("th"===o&&e[n])}},Lm=function(t,e,n,r){var o=function(t){return"row"===t?Cr(e):xr(e)},i=function(t){return o(t)?t+"group":t};if(t)return gd(e)?i(n):null;if(r&&gd(e)){var u="row"===n?"col":"row";return i(u)}return null},Hm=function(t,e){return function(n,r,o){return A.some(Lm(t,n.element,"col",e[o]))}},Im=function(t,e){return function(n,r){return A.some(Lm(t,n.element,"row",e[r]))}},Pm=function(t,e,n){return Je(n(t.element,e),!0,t.isLocked)},Fm=function(t,e,n,r,o,i,u){var a=function(t){return B(e,(function(e){return n(t.element,e.element)}))};return H(t,(function(t,e){return jr(t,(function(t,c){if(a(t)){var s=u(t,e,c)?o(t,n,r):t;return i(s,e,c).each((function(t){Qn(s.element,{scope:A.from(t)})})),s}return t}))}))},Vm=function(t,e,n){return K(t,(function(r,o){return Nm(t,o,e,n)?[]:[Wr(r,e)]}))},Um=function(t,e,n){var r=t[e];return K(r.cells,(function(r,o){return Nm(t,e,o,n)?[]:[r]}))},jm=function(t,e,n,r,o){var i=Gr(t).rows,u=K(e,(function(t){return Vm(i,t,r)})),a=H(t,(function(t){return hd(t.cells)})),c=Bm(u,a),s=Im(n,a);return Fm(t,u,r,o,Pm,s,c)},Wm=function(t,e,n,r,o,i,u){var a=Gr(t),c=a.cols,s=a.rows,l=s[e[0]],f=K(e,(function(t){return Um(s,t,o)})),d=H(l.cells,(function(t,e){return hd(Vm(s,e,o))})),m=it([],s,!0);I(e,(function(t){m[t]=u.transformRow(s[t],n)}));var g=c.concat(m),h=zm(l,d),p=Hm(r,d);return Fm(g,f,o,i,u.transformCell,p,h)},qm=function(t,e,n,r){var o=Gr(t).rows,i=H(e,(function(t){return Wr(o[t.row],t.column)}));return Fm(t,i,n,r,Pm,A.none,k)},$m=function(t){var e=function(t,e){var n=B(t,(function(t){return t.column===e.column}));return n?t:t.concat([e])};return j(t,e,[]).sort((function(t,e){return t.column-e.column}))},Gm=fn("col"),Km=fn("colgroup"),Xm=function(t){return"tr"===nn(t)||Km(t)},Ym=function(t){var e=yr(t,"colspan",1),n=yr(t,"rowspan",1);return{element:t,colspan:e,rowspan:n}},Jm=function(t,e){void 0===e&&(e=Ym);var n=function(e){return Gm(e.element)?t.col(e):t.cell(e)},r=function(e){return Km(e.element)?t.colgroup(e):t.row(e)},o=function(t){if(Xm(t))return r({element:t});var o=n(e(t));return i=A.some({item:t,replacement:o}),o},i=A.none(),u=function(t,e){return i.fold((function(){return o(t)}),(function(n){return e(t,n.item)?n.replacement:o(t)}))};return{getOrInit:u}},Qm=function(t){return function(e){var n=[],r=function(t,e){return q(n,(function(n){return e(n.item,t)}))},o=function(r){var o="td"===t?{scope:null}:{},i=e.replace(r,t,o);return n.push({item:r,sub:i}),i},i=function(t,e){return Xm(t)||Gm(t)?t:r(t,e).fold((function(){return o(t)}),(function(n){return e(t,n.item)?n.sub:o(t)}))};return{replaceOrInit:i}}},Zm=function(t){return tr(t,"scope").map((function(t){return t.substr(0,3)}))},tg=function(t){var e=function(e){var n=Zm(e);return n.each((function(t){return Yn(e,"scope",t)})),function(){var r=t.cell({element:e,colspan:1,rowspan:1});return vr(r,"width"),vr(e,"width"),n.each((function(t){return Yn(r,"scope",t)})),r}},n=function(t){var e=function(){var e=or(H(t,Zm));if(0===e.length)return A.none();var n=e[0],r=["row","col"],o=B(e,(function(t){return t!==n&&z(r,t)}));return o?A.none():A.from(n)};return vr(t[0],"width"),e().fold((function(){return er(t[0],"scope")}),(function(e){return Yn(t[0],"scope",e+"group")})),v(t[0])};return{unmerge:e,merge:n}},eg={modification:Jm,transform:Qm,merging:tg},ng=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],rg=function(t,e){var n=t.property().name(e);return z(["ol","ul"],n)},og=function(t,e){var n=t.property().name(e);return z(ng,n)},ig=function(t,e){return z(["br","img","hr","input"],t.property().name(e))},ug=jo(),ag=function(t){return og(ug,t)},cg=function(t){return rg(ug,t)},sg=function(t){return ig(ug,t)},lg=function(t){var e=function(t){return"br"===nn(t)},n=function(t){return X(t,(function(t){return e(t)||cn(t)&&0===Po(t).trim().length}))},r=function(t){return"li"===nn(t)||Vn(t,cg).isSome()},o=function(t){return yn(t).map((function(t){return!!ag(t)||!!sg(t)&&"img"!==nn(t)})).getOr(!1)},i=function(t){return Aa(t).bind((function(n){var i=o(n);return hn(n).map((function(o){return!0===i||r(o)||e(n)||ag(o)&&!Ce(t,o)?[]:[ve.fromTag("br")]}))})).getOr([])},u=function(){var e=K(t,(function(t){var e=wn(t);return n(e)?[]:e.concat(i(t))}));return 0===e.length?[ve.fromTag("br")]:e},a=u();zo(t[0]),No(t[0],a)},fg=function(t){return Cl(t,!0)},dg=function(t){var e=Dr(t);0===e.length&&Bo(t)},mg=function(t,e){return{grid:t,cursor:e}},gg=function(t){return rt(t,(function(t){return rt(t.cells,(function(t){var e=t.element;return cr(fg(e),e)}))}))},hg=function(t,e,n){var r,o,i=Gr(t).rows;return A.from(null===(o=null===(r=i[e])||void 0===r?void 0:r.cells[n])||void 0===o?void 0:o.element).filter(fg).orThunk((function(){return gg(i)}))},pg=function(t,e,n){var r=hg(t,e,n);return mg(t,r)},vg=function(t){var e=function(t,e){var n=B(t,(function(t){return t.row===e.row}));return n?t:t.concat([e])};return j(t,e,[]).sort((function(t,e){return t.row-e.row}))},bg=function(t,e,n,r){var o=e[0].row,i=vg(e),u=U(i,(function(t,e){var i=Om(t.grid,o,e.row+t.delta,n,r.getOrInit);return{grid:i,delta:t.delta+1}}),{grid:t,delta:0}).grid;return pg(u,o,e[0].column)},yg=function(t,e,n,r){var o=vg(e),i=o[o.length-1],u=i.row+i.rowspan,a=U(o,(function(t,e){return Om(t,u,e.row,n,r.getOrInit)}),t);return pg(a,u,e[0].column)},wg=function(t,e,n,r){var o=e.details,i=$m(o),u=i[0].column,a=U(i,(function(t,e){var o=_m(t.grid,u,e.column+t.delta,n,r.getOrInit);return{grid:o,delta:t.delta+1}}),{grid:t,delta:0}).grid;return pg(a,o[0].row,u)},xg=function(t,e,n,r){var o=e.details,i=o[o.length-1],u=i.column+i.colspan,a=$m(o),c=U(a,(function(t,e){return _m(t,u,e.column,n,r.getOrInit)}),t);return pg(c,o[0].row,u)},Cg=function(t,e,n,r){var o=$m(e),i=H(o,(function(t){return t.column})),u=jm(t,i,!0,n,r.replaceOrInit);return pg(u,e[0].row,e[0].column)},Sg=function(t,e,n,r){var o=qm(t,e,n,r.replaceOrInit);return pg(o,e[0].row,e[0].column)},kg=function(t,e,n,r){var o=$m(e),i=H(o,(function(t){return t.column})),u=jm(t,i,!1,n,r.replaceOrInit);return pg(u,e[0].row,e[0].column)},Tg=function(t,e,n,r){var o=qm(t,e,n,r.replaceOrInit);return pg(o,e[0].row,e[0].column)},Og=function(t,e){return function(n,r,o,i,u){var a=vg(r),c=H(a,(function(t){return t.row})),s=Wm(n,c,t,e,o,i.replaceOrInit,u);return pg(s,r[0].row,r[0].column)}},Eg=Og("thead",!0),_g=Og("tbody",!1),Ag=Og("tfoot",!1),Dg=function(t,e,n,r){var o=$m(e.details),i=Am(t,H(o,(function(t){return t.column}))),u=i.length>0?i[0].cells.length-1:0;return pg(i,o[0].row,Math.min(o[0].column,u))},Mg=function(t,e,n,r){var o=vg(e),i=Dm(t,o[0].row,o[o.length-1].row),u=i.length>0?i.length-1:0;return pg(i,Math.min(e[0].row,u),e[0].column)},Rg=function(t,e,n,r){var o=e.cells;lg(o);var i=em(t,e.bounds,n,r.merge(o));return mg(i,A.from(o[0]))},Ng=function(t,e,n,r){var o=function(t,e){return nm(t,e,n,r.unmerge(e))},i=U(e,o,t);return mg(i,A.from(e[0]))},zg=function(t,e,n,r){var o=function(t,e){var n=so.fromTable(t);return Pd(n,e,!0)},i=o(e.clipboard,e.generators),u=qe(e.row,e.column),a=Cm(u,t,i,e.generators,n);return a.fold((function(){return mg(t,A.some(e.element))}),(function(t){return pg(t,e.row,e.column)}))},Bg=function(t,e,n){var r=Ir(t,n.section),o=so.generate(r);return Pd(o,e,!0)},Lg=function(t,e,n,r){var o=Gr(t).rows,i=e.cells[0].column,u=o[e.cells[0].row],a=Bg(e.clipboard,e.generators,u),c=Sm(i,t,a,e.generators,n);return pg(c,e.cells[0].row,e.cells[0].column)},Hg=function(t,e,n,r){var o=Gr(t).rows,i=e.cells[e.cells.length-1].column+e.cells[e.cells.length-1].colspan,u=o[e.cells[0].row],a=Bg(e.clipboard,e.generators,u),c=Sm(i,t,a,e.generators,n);return pg(c,e.cells[0].row,e.cells[0].column)},Ig=function(t,e,n,r){var o=Gr(t).rows,i=e.cells[0].row,u=o[i],a=Bg(e.clipboard,e.generators,u),c=km(i,t,a,e.generators,n);return pg(c,e.cells[0].row,e.cells[0].column)},Pg=function(t,e,n,r){var o=Gr(t).rows,i=e.cells[e.cells.length-1].row+e.cells[e.cells.length-1].rowspan,u=o[e.cells[0].row],a=Bg(e.clipboard,e.generators,u),c=km(i,t,a,e.generators,n);return pg(c,e.cells[0].row,e.cells[0].column)},Fg=function(t,e){var n=so.fromTable(t),r=Xd(n,e);return r.bind((function(t){var e=t[t.length-1],r=t[0].column,o=e.column+e.colspan,i=G(H(n.all,(function(t){return V(t.cells,(function(t){return t.column>=r&&t.column<o}))})));return bd(i)})).getOr("")},Vg=function(t,e){var n=so.fromTable(t),r=Xd(n,e);return r.bind(bd).getOr("")},Ug=function(t,e){var n=so.fromTable(t),r=Xd(n,e);return r.bind((function(t){var e=t[t.length-1],r=t[0].row,o=e.row+e.rowspan,i=n.all.slice(r,o);return yd(i)})).getOr("")},jg=function(t,e,n,r){return Wc(t,e,n,r.sizing)},Wg=function(t,e,n,r){return jc(t,e,n,r.sizing,r.resize)},qg=function(t,e){return B(e,(function(t){return 0===t.column&&t.isLocked}))},$g=function(t,e){return B(e,(function(e){return e.column+e.colspan>=t.grid.columns&&e.isLocked}))},Gg=function(t,e){var n=Vi(t),r=$m(e);return j(r,(function(t,e){var r=n[e.column],o=r.map(Ii).getOr(0);return t+o}),0)},Kg=function(t){return function(e,n){return Xd(e,n).filter((function(n){var r=t?qg:$g;return!r(e,n)})).map((function(t){return{details:t,pixelDelta:Gg(e,t)}}))}},Xg=function(t,e){return Yd(t,e).map((function(e){return{details:e,pixelDelta:-Gg(t,e)}}))},Yg=function(t){return function(e,n){return $d(e,n).filter((function(n){var r=t?qg:$g;return!r(e,n.cells)}))}},Jg=eg.transform("th"),Qg=eg.transform("td"),Zg=Wd(bg,Xd,g,g,eg.modification),th=Wd(yg,Xd,g,g,eg.modification),eh=Wd(wg,Kg(!0),Wg,g,eg.modification),nh=Wd(xg,Kg(!1),Wg,g,eg.modification),rh=Wd(Dg,Xg,Wg,dg,eg.modification),oh=Wd(Mg,Xd,g,dg,eg.modification),ih=Wd(Cg,Yd,g,g,Jg),uh=Wd(kg,Yd,g,g,Qg),ah=Wd(Eg,Yd,g,g,Jg),ch=Wd(_g,Yd,g,g,Qg),sh=Wd(Ag,Yd,g,g,Qg),lh=Wd(Sg,Yd,g,g,Jg),fh=Wd(Tg,Yd,g,g,Qg),dh=Wd(Rg,Zd,jg,g,eg.merging),mh=Wd(Ng,tm,jg,g,eg.merging),gh=Wd(zg,qd,jg,g,eg.modification),hh=Wd(Lg,Yg(!0),g,g,eg.modification),ph=Wd(Hg,Yg(!1),g,g,eg.modification),vh=Wd(Ig,$d,g,g,eg.modification),bh=Wd(Pg,$d,g,g,eg.modification),yh=Fg,wh=Vg,xh=Ug,Ch=function(t,e,n){var r=function(t){return"table"===nn(qa(t))},o=function(e){return!1===r(t)||ks(e).rows>1},i=function(e){return!1===r(t)||ks(e).columns>1},u=Vf(t),a=Ff(t)?g:md,c=function(e){switch(Hf(t)){case"section":return _d.section();case"sectionCells":return _d.sectionCells();case"cells":return _d.cells();default:return _d.getTableSectionType(e,"section")}},s=function(n,r){return r.cursor.fold((function(){var r=Dr(n);return et(r).filter(Mn).map((function(r){e.clear(n);var o=t.dom.createRng();return o.selectNode(r.dom),t.selection.setRng(o),Yn(r,"data-mce-selected","1"),o}))}),(function(r){var o=dd(r),i=t.dom.createRng();return i.setStart(o.element.dom,o.offset),i.setEnd(o.element.dom,o.offset),t.selection.setRng(i),e.clear(n),A.some(i)}))},l=function(e,n,r,o,i){return function(a,l,f){void 0===f&&(f=!1),Ja(a);var d=o(),m=ve.fromDom(t.getDoc()),g=Fa(r,m,u),h={sizing:qf(t,a),resize:Ff(t)?Yc():Jc(),section:c(a)};return n(a)?e(d,a,l,g,h).bind((function(e){I(e.newRows,(function(e){Jl(t,e.dom)})),I(e.newCells,(function(e){Ql(t,e.dom)}));var n=s(a,e);return Mn(a)&&(Ja(a),f||rf(t,a.dom,i)),n.map((function(t){return{rng:t,effect:i}}))})):A.none()}},f=l(oh,o,g,n,uf),d=l(rh,i,g,n,uf),m=l(Zg,k,g,n,uf),h=l(th,k,g,n,uf),p=l(eh,k,a,n,uf),v=l(nh,k,a,n,uf),b=l(dh,k,g,n,uf),y=l(mh,k,g,n,uf),w=l(hh,k,g,n,uf),x=l(ph,k,g,n,uf),C=l(vh,k,g,n,uf),S=l(bh,k,g,n,uf),T=l(gh,k,g,n,af),O=l(lh,k,g,n,uf),E=l(fh,k,g,n,uf),_=l(ih,k,g,n,uf),D=l(uh,k,g,n,uf),M=l(ah,k,g,n,uf),R=l(ch,k,g,n,uf),N=l(sh,k,g,n,uf),z=wh,B=yh,L=xh;return{deleteRow:f,deleteColumn:d,insertRowsBefore:m,insertRowsAfter:h,insertColumnsBefore:p,insertColumnsAfter:v,mergeCells:b,unmergeCells:y,pasteColsBefore:w,pasteColsAfter:x,pasteRowsBefore:C,pasteRowsAfter:S,pasteCells:T,makeCellsHeader:O,unmakeCellsHeader:E,makeColumnsHeader:_,unmakeColumnsHeader:D,makeRowsHeader:M,makeRowsBody:R,makeRowsFooter:N,getTableRowType:L,getTableCellType:z,getTableColType:B}},Sh={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},kh=function(){return ve.fromTag("th")},Th=function(){return ve.fromTag("td")},Oh=function(){return ve.fromTag("col")},Eh=function(t,e,n,r){for(var o=ve.fromTag("tr"),i=0;i<t;i++){var u=r<e||i<n?kh():Th();i<n&&Yn(u,"scope","row"),r<e&&Yn(u,"scope","col"),_o(u,ve.fromTag("br")),_o(o,u)}return o},_h=function(t){var e=ve.fromTag("colgroup");return L(t,(function(){return _o(e,Oh())})),e},Ah=function(t,e,n,r){return L(t,(function(t){return Eh(e,n,r,t)}))},Dh=function(t,e,n,r,o,i){void 0===i&&(i=Sh);var u=ve.fromTag("table"),a="cells"!==o;mr(u,i.styles),Jn(u,i.attributes),i.colGroups&&_o(u,_h(e));var c=Math.min(t,n);if(a&&n>0){var s=ve.fromTag("thead");_o(u,s);var l="sectionCells"===o?c:0,f=Ah(n,e,l,r);No(s,f)}var d=ve.fromTag("tbody");_o(u,d);var m=a?t-c:t,g=a?0:n,h=Ah(m,e,g,r);return No(d,h),u},Mh=function(t){return t.dom.innerHTML},Rh=function(t){var e=ve.fromTag("div"),n=ve.fromDom(t.dom.cloneNode(!0));return _o(e,n),Mh(e)},Nh=function(t,e){t.selection.select(e.dom,!0),t.selection.collapse(!0)},zh=function(t,e){Gn(e,"td,th").each(w(Nh,t))},Bh=function(t,e){I(Pn(e,"tr"),(function(e){Jl(t,e.dom),I(Pn(e,"th,td"),(function(e){Ql(t,e.dom)}))}))},Lh=function(t){return o(t)&&-1!==t.indexOf("%")},Hh=function(t,e,n,r,o){var i=wf(t),u={styles:i,attributes:yf(t),colGroups:Lf(t)};return t.undoManager.ignore((function(){var i=Dh(n,e,o,r,Hf(t),u);Yn(i,"data-mce-id","__mce");var a=Rh(i);t.insertContent(a),t.addVisual()})),Gn(qa(t),'table[data-mce-id="__mce"]').map((function(e){return Nf(t)?Jf(e):zf(t)?Qf(e):(Rf(t)||Lh(i.width))&&Yf(e),Ja(e),er(e,"data-mce-id"),Bh(t,e),zh(t,e),e.dom})).getOr(null)},Ih=function(t,e,n,r,o){void 0===r&&(r={});var i=function(t){return m(t)&&t>0};if(i(e)&&i(n)){var u=r.headerRows||0,a=r.headerColumns||0;return Hh(t,n,e,a,u)}return console.error(o),null},Ph=function(t){return function(){return t().fold((function(){return[]}),(function(t){return H(t,(function(t){return t.dom}))}))}},Fh=function(t){return function(e){var n=e.length>0?A.some(ja(e)):A.none();t(n)}},Vh=function(t){return function(e,n,r){void 0===r&&(r={});var o=Ih(t,n,e,r,"Invalid values for insertTable - rows and columns values are required to insert a table.");return t.undoManager.add(),o}},Uh=function(t,e,n,r){return{insertTable:Vh(t),setClipboardRows:Fh(e.setRows),getClipboardRows:Ph(e.getRows),setClipboardCols:Fh(e.setColumns),getClipboardCols:Ph(e.getColumns),resizeHandler:n,selectionTargets:r}},jh=function(t,e,n){var r=yr(t,e,1);1===n||r<=1?er(t,e):Yn(t,e,Math.min(n,r))},Wh=function(t,e,n){if(so.hasColumns(t)){var r=V(so.justColumns(t),(function(t){return t.column>=e&&t.column<n})),o=H(r,(function(t){var r=xi(t.element);return jh(r,"span",n-e),r})),i=ve.fromTag("colgroup");return No(i,o),[i]}return[]},qh=function(t,e,n){return H(t.all,(function(t){var r=V(t.cells,(function(t){return t.column>=e&&t.column<n})),o=H(r,(function(t){var r=xi(t.element);return jh(r,"colspan",n-e),r})),i=ve.fromTag("tr");return No(i,o),i}))},$h=function(t,e){var n=so.fromTable(t),r=Yd(n,e);return r.map((function(t){var e=t[t.length-1],r=t[0].column,o=e.column+e.colspan,i=Wh(n,r,o),u=qh(n,r,o);return it(it([],i,!0),u,!0)}))},Gh=function(t,e,n){var r=so.fromTable(t),o=Xd(r,e);return o.bind((function(t){var e=Pd(r,n,!1),o=Gr(e).rows,i=o.slice(t[0].row,t[t.length-1].row+t[t.length-1].rowspan),u=K(i,(function(t){var e=V(t.cells,(function(t){return!t.isLocked}));return e.length>0?[ot(ot({},t),{cells:e})]:[]})),a=Vd(u);return cr(a.length>0,a)})).map((function(t){return Nd(t)}))},Kh=tinymce.util.Tools.resolve("tinymce.util.Tools"),Xh=function(t,e,n){var r,o=t.select("td,th",e),i=function(e,r){for(var o=0;o<r.length;o++){var i=t.getStyle(r[o],n);if("undefined"===typeof e&&(e=i),e!==i)return""}return e};return i(r,o)},Yh=function(t,e,n){n&&t.formatter.apply("align"+n,{},e)},Jh=function(t,e,n){n&&t.formatter.apply("valign"+n,{},e)},Qh=function(t,e){Kh.each("left center right".split(" "),(function(n){t.formatter.remove("align"+n,{},e)}))},Zh=function(t,e){Kh.each("top middle bottom".split(" "),(function(n){t.formatter.remove("valign"+n,{},e)}))},tp=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],ep=function(t){return{value:t}},np=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,rp=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,op=function(t){return np.test(t)||rp.test(t)},ip=function(t){return wt(t,"#").toUpperCase()},up=function(t){return op(t)?A.some({value:ip(t)}):A.none()},ap=function(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()},cp=function(t){var e=ap(t.red)+ap(t.green)+ap(t.blue);return ep(e)},sp=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,lp=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,fp=function(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}},dp=function(t,e,n,r){var o=parseInt(t,10),i=parseInt(e,10),u=parseInt(n,10),a=parseFloat(r);return fp(o,i,u,a)},mp=function(t){if("transparent"===t)return A.some(fp(0,0,0,0));var e=sp.exec(t);if(null!==e)return A.some(dp(e[1],e[2],e[3],"1"));var n=lp.exec(t);return null!==n?A.some(dp(n[1],n[2],n[3],n[4])):A.none()},gp=function(t){return up(t).orThunk((function(){return mp(t).map(cp)})).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],u=r[2],a=r[3];return cp(fp(o,i,u,a))}))},hp=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},pp=function(t){var e=hp(A.none()),n=function(){return e.get().each(t)},r=function(){n(),e.set(A.none())},o=function(){return e.get().isSome()},i=function(){return e.get()},u=function(t){n(),e.set(A.some(t))};return{clear:r,isSet:o,get:i,set:u}},vp=function(){return pp((function(t){return t.unbind()}))},bp=function(){var t=pp(g),e=function(e){return t.get().each(e)};return ot(ot({},t),{on:e})},yp=function(t,e,n,r){return function(o){var i=vp(),u=Et(r),a=function(){var a=Sc(e),c=function(e){return t.formatter.match(n,{value:r},e.dom,u)};u?(o.setActive(!B(a,c)),i.set(t.formatter.formatChanged(n,(function(t){return o.setActive(!t)}),!0))):(o.setActive(X(a,c)),i.set(t.formatter.formatChanged(n,o.setActive,!1,{value:r})))};return t.initialized?a():t.on("init",a),i.clear}},wp=function(t){return Fe(t,"menu")},xp=function(t){return H(t,(function(t){var e=t.text||t.title;return wp(t)?{text:e,items:xp(t.menu)}:{text:e,value:t.value}}))},Cp=function(t,e,n,r,o){return H(n,(function(n){var i=n.text||n.title;return wp(n)?{type:"nestedmenuitem",text:i,getSubmenuItems:function(){return Cp(t,e,n.menu,r,o)}}:{text:i,type:"togglemenuitem",onAction:function(){return o(n.value)},onSetup:yp(t,e,r,n.value)}}))},Sp=function(t,e){return function(n){var r;t.execCommand("mceTableApplyCellStyle",!1,(r={},r[e]=n,r))}},kp=function(t){return K(t,(function(t){return wp(t)?[ot(ot({},t),{menu:kp(t.menu)})]:Ot(t.value)?[t]:[]}))},Tp=function(t,e,n,r,o){return function(i){return i(Cp(t,e,n,r,o))}},Op=function(t,e,n){var r=H(e,(function(t){return{text:t.title,value:"#"+gp(t.value).value,type:"choiceitem"}}));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:r.length>0?r:void 0,allowCustomColors:!1},onAction:function(e){var r,o="remove"===e.value?"":e.value;t.execCommand("mceTableApplyCellStyle",!1,(r={},r[n]=o,r))}}]},Ep=function(t){return function(){var e=t.queryCommandValue("mceTableRowType"),n="header"===e?"body":"header";t.execCommand("mceTableRowType",!1,{type:n})}},_p=function(t){return function(){var e=t.queryCommandValue("mceTableColType"),n="th"===e?"td":"th";t.execCommand("mceTableColType",!1,{type:n})}},Ap=function(t){var e=xp(Af(t));return e.length>0?A.some({name:"class",type:"listbox",label:"Class",items:e}):A.none()},Dp=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"listbox",label:"Horizontal align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"Vertical align",items:tp}],Mp=function(t){return Dp.concat(Ap(t).toArray())},Rp=function(t,e){var n=[{text:"Select...",value:""}],r=[{name:"borderstyle",type:"listbox",label:"Border style",items:n.concat(xp(bf(t)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}],o={name:"borderwidth",type:"input",label:"Border width"},i="cell"===e?[o].concat(r):r;return{title:"Advanced",name:"advanced",items:i}},Np=function(t){return function(e,n){var r=e.dom,o=function(e,o){t&&!o||r.setAttrib(n,e,o)},i=function(e,o){t&&!o||r.setStyle(n,e,o)},u=function(r,o){t&&!o||(""===o?e.formatter.remove(r,{value:null},n,!0):e.formatter.apply(r,{value:o},n))};return{setAttrib:o,setStyle:i,setFormat:u}}},zp={normal:Np(!1),ifTruthy:Np(!0)},Bp=function(t){return function(e){return Ct(e,"rgb")?t.toHex(e):e}},Lp=function(t,e){var n=ve.fromDom(e);return{borderwidth:pr(n,"border-width").getOr(""),borderstyle:pr(n,"border-style").getOr(""),bordercolor:pr(n,"border-color").map(Bp(t)).getOr(""),backgroundcolor:pr(n,"background-color").map(Bp(t)).getOr("")}},Hp=function(t){var e=t[0],n=t.slice(1);return I(n,(function(t){I(Ee(e),(function(n){Ae(t,(function(t,r){var o=e[n];""!==o&&n===r&&o!==t&&(e[n]="")}))}))})),e},Ip=function(t,e,n,r){return q(t,(function(t){return!s(n.formatter.matchNode(r,e+t))})).getOr("")},Pp=w(Ip,["left","center","right"],"align"),Fp=w(Ip,["top","middle","bottom"],"valign"),Vp=function(t,e){var n=wf(t),r=yf(t),o=function(t){return{borderstyle:Ie(n,"border-style").getOr(""),bordercolor:Bp(t)(Ie(n,"border-color").getOr("")),backgroundcolor:Bp(t)(Ie(n,"background-color").getOr(""))}},i={height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:""},u=function(){var e=n["border-width"];return _f(t)&&e?{border:e}:Ie(r,"border").fold((function(){return{}}),(function(t){return{border:t}}))},a=e?o(t.dom):{},c=function(){var t=Ie(n,"border-spacing").or(Ie(r,"cellspacing")).fold((function(){return{}}),(function(t){return{cellspacing:t}})),e=Ie(n,"border-padding").or(Ie(r,"cellpadding")).fold((function(){return{}}),(function(t){return{cellpadding:t}}));return ot(ot({},t),e)},s=ot(ot(ot(ot(ot(ot({},i),n),r),a),u()),c());return s},Up=function(t){return Rr(ve.fromDom(t)).map((function(e){var n={selection:ja(t.cells)};return xh(e,n)})).getOr("")},jp=function(t,e,n){var r=function(e,n){var r=pr(ve.fromDom(n),"border-width");return _f(t)&&r.isSome()?r.getOr(""):e.getAttrib(n,"border")||Xh(t.dom,n,"border-width")||Xh(t.dom,n,"border")},o=t.dom,i=_f(t)?o.getStyle(e,"border-spacing")||o.getAttrib(e,"cellspacing"):o.getAttrib(e,"cellspacing")||o.getStyle(e,"border-spacing"),u=_f(t)?Xh(o,e,"padding")||o.getAttrib(e,"cellpadding"):o.getAttrib(e,"cellpadding")||Xh(o,e,"padding");return ot({width:o.getStyle(e,"width")||o.getAttrib(e,"width"),height:o.getStyle(e,"height")||o.getAttrib(e,"height"),cellspacing:i,cellpadding:u,border:r(o,e),caption:!!o.select("caption",e)[0],class:o.getAttrib(e,"class",""),align:Pp(t,e)},n?Lp(o,e):{})},Wp=function(t,e,n){var r=t.dom;return ot({height:r.getStyle(e,"height")||r.getAttrib(e,"height"),class:r.getAttrib(e,"class",""),type:Up(e),align:Pp(t,e)},n?Lp(r,e):{})},qp=function(t,e,n,r){var o=t.dom,i=r.getOr(e),u=function(t,e){return o.getStyle(t,e)||o.getAttrib(t,e)};return ot({width:u(i,"width"),height:u(e,"height"),scope:o.getAttrib(e,"scope"),celltype:Wa(e),class:o.getAttrib(e,"class",""),halign:Pp(t,e),valign:Fp(t,e)},n?Lp(o,e):{})},$p=function(t,e){var n=so.fromTable(t),r=so.justCells(n),o=V(r,(function(t){return B(e,(function(e){return Ce(t.element,e)}))}));return H(o,(function(t){return{element:t.element.dom,column:so.getColumnAt(n,t.column).map((function(t){return t.element.dom}))}}))},Gp=function(t,e,n){t.setAttrib("scope",n.scope),t.setAttrib("class",n.class),t.setStyle("height",Ya(n.height)),e.setStyle("width",Ya(n.width))},Kp=function(t,e){t.setFormat("tablecellbackgroundcolor",e.backgroundcolor),t.setFormat("tablecellbordercolor",e.bordercolor),t.setFormat("tablecellborderstyle",e.borderstyle),t.setFormat("tablecellborderwidth",Ya(e.borderwidth))},Xp=function(t,e,n){var r=1===e.length;I(e,(function(e){var o=e.element,i=r?zp.normal(t,o):zp.ifTruthy(t,o),u=e.column.map((function(e){return r?zp.normal(t,e):zp.ifTruthy(t,e)})).getOr(i);Gp(i,u,n),Sf(t)&&Kp(i,n),r&&(Qh(t,o),Zh(t,o)),n.halign&&Yh(t,o,n.halign),n.valign&&Jh(t,o,n.valign)}))},Yp=function(t,e){t.execCommand("mceTableCellType",!1,{type:e.celltype,no_events:!0})},Jp=function(t,e,n,r){var o=ze(r,(function(t,e){return n[e]!==t}));He(o)>0&&e.length>=1&&Rr(e[0]).each((function(n){var i=$p(n,e),u=He(ze(o,(function(t,e){return"scope"!==e&&"celltype"!==e})))>0,a=Pe(o,"celltype");(u||Pe(o,"scope"))&&Xp(t,i,r),a&&Yp(t,r),rf(t,n.dom,{structure:a,style:u})}))},Qp=function(t,e,n,r){var o=r.getData();r.close(),t.undoManager.transact((function(){Jp(t,e,n,o),t.focus()}))},Zp=function(t,e){var n=Rr(e[0]).map((function(n){return H($p(n,e),(function(e){return qp(t,e.element,Sf(t),e.column)}))}));return Hp(n.getOrDie())},tv=function(t,e){var n=Sc(e);if(0!==n.length){var r=Zp(t,n),o={type:"tabpanel",tabs:[{title:"General",name:"general",items:Mp(t)},Rp(t,"cell")]},i={type:"panel",items:[{type:"grid",columns:2,items:Mp(t)}]};t.windowManager.open({title:"Cell Properties",size:"normal",body:Sf(t)?o:i,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onSubmit:w(Qp,t,n,r)})}},ev=function(t){var e=xp(Df(t));return e.length>0?A.some({name:"class",type:"listbox",label:"Class",items:e}):A.none()},nv=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],rv=function(t){return nv.concat(ev(t).toArray())},ov=function(t,e){t.setAttrib("class",e.class),t.setStyle("height",Ya(e.height))},iv=function(t,e){t.setStyle("background-color",e.backgroundcolor),t.setStyle("border-color",e.bordercolor),t.setStyle("border-style",e.borderstyle)},uv=function(t,e,n,r){var o=1===e.length;I(e,(function(e){var i=o?zp.normal(t,e):zp.ifTruthy(t,e);ov(i,n),kf(t)&&iv(i,n),n.align!==r.align&&(Qh(t,e),Yh(t,e,n.align))}))},av=function(t,e){t.execCommand("mceTableRowType",!1,{type:e.type,no_events:!0})},cv=function(t,e,n,r){var o=ze(r,(function(t,e){return n[e]!==t}));if(He(o)>0){var i=Pe(o,"type"),u=!i||He(o)>1;u&&uv(t,e,r,n),i&&av(t,r),Rr(ve.fromDom(e[0])).each((function(e){return rf(t,e.dom,{structure:i,style:u})}))}},sv=function(t,e,n,r){var o=r.getData();r.close(),t.undoManager.transact((function(){cv(t,e,n,o),t.focus()}))},lv=function(t){var e=kc(ec(t),gc.selected);if(0!==e.length){var n=H(e,(function(e){return Wp(t,e.dom,kf(t))})),r=Hp(n),o={type:"tabpanel",tabs:[{title:"General",name:"general",items:rv(t)},Rp(t,"row")]},i={type:"panel",items:[{type:"grid",columns:2,items:rv(t)}]};t.windowManager.open({title:"Row Properties",size:"normal",body:kf(t)?o:i,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onSubmit:w(sv,t,H(e,(function(t){return t.dom})),r)})}},fv=function(t,e,n){var r=n?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],o=[{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}],i=Of(t)?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],u=[{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}],a=e.length>0?[{type:"listbox",name:"class",label:"Class",items:e}]:[];return r.concat(o).concat(i).concat(u).concat(a)},dv=function(t,e,n,r){if("TD"===e.tagName||"TH"===e.tagName)o(n)?t.setStyle(e,n,r):t.setStyle(e,n);else if(e.children)for(var i=0;i<e.children.length;i++)dv(t,e.children[i],n,r)},mv=function(t,e,n){var r=t.dom,o={},i={};if(o.class=n.class,i.height=Ya(n.height),r.getAttrib(e,"width")&&!_f(t)?o.width=Xa(n.width):i.width=Ya(n.width),_f(t)?(i["border-width"]=Ya(n.border),i["border-spacing"]=Ya(n.cellspacing)):(o.border=n.border,o.cellpadding=n.cellpadding,o.cellspacing=n.cellspacing),_f(t)&&e.children)for(var u=0;u<e.children.length;u++)dv(r,e.children[u],{"border-width":Ya(n.border),padding:Ya(n.cellpadding)}),Tf(t)&&dv(r,e.children[u],{"border-color":n.bordercolor});Tf(t)&&(i["background-color"]=n.backgroundcolor,i["border-color"]=n.bordercolor,i["border-style"]=n.borderstyle),o.style=r.serializeStyle(ot(ot({},wf(t)),i)),r.setAttribs(e,ot(ot({},yf(t)),o))},gv=function(t,e,n,r){var o=t.dom,i=r.getData(),u=ze(i,(function(t,e){return n[e]!==t}));r.close(),""===i.class&&delete i.class,t.undoManager.transact((function(){if(!e){var n=parseInt(i.cols,10)||1,r=parseInt(i.rows,10)||1;e=Hh(t,n,r,0,0)}if(He(u)>0){mv(t,e,i);var a=o.select("caption",e)[0];(a&&!i.caption||!a&&i.caption)&&t.execCommand("mceTableToggleCaption"),""===i.align?Qh(t,e):Yh(t,e,i.align)}if(t.focus(),t.addVisual(),He(u)>0){var c=Pe(u,"caption"),s=!c||He(u)>1;rf(t,e,{structure:c,style:s})}}))},hv=function(t,e){var n,r=t.dom,o=Vp(t,Tf(t));!1===e?(n=r.getParent(t.selection.getStart(),"table",t.getBody()),n?o=jp(t,n,Tf(t)):Tf(t)&&(o.borderstyle="",o.bordercolor="",o.backgroundcolor="")):(o.cols="1",o.rows="1",Tf(t)&&(o.borderstyle="",o.bordercolor="",o.backgroundcolor=""));var i=xp(Mf(t));i.length>0&&o.class&&(o.class=o.class.replace(/\s*mce\-item\-table\s*/g,""));var u={type:"grid",columns:2,items:fv(t,i,e)},a=function(){return{type:"panel",items:[u]}},c=function(){return{type:"tabpanel",tabs:[{title:"General",name:"general",items:[u]},Rp(t,"table")]}},s=Tf(t)?c():a();t.windowManager.open({title:"Table Properties",size:"normal",body:s,onSubmit:w(gv,t,n,o),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o})},pv=function(t){return xc(ec(t),Ka(t))},vv=function(t){return Cc(ec(t),Ka(t))},bv=function(t,e,n,r,u){var a=Ka(t),c=function(){return pv(t).each((function(e){Rr(e,a).filter(x(a)).each((function(e){var n=ve.fromText("");if(Oo(e,n),Bo(e),t.dom.isEmpty(t.getBody()))t.setContent(""),t.selection.setCursorLocation();else{var r=t.dom.createRng();r.setStart(n.dom,0),r.setEnd(n.dom,0),t.selection.setRng(r),t.nodeChanged()}}))}))},s=function(e){return pv(t).each((function(n){var r=zf(t)||Nf(t)||Rf(t);r||Rr(n,a).each((function(n){"relative"!==e||xs(n)?"fixed"!==e||Cs(n)?"responsive"!==e||Ss(n)||Qf(n):Jf(n):Yf(n),Ja(n),rf(t,n.dom,uf)}))}))},l=function(t){return Rr(t,a)},f=function(e){return vv(t).bind((function(t){return l(t).map((function(n){return e(n,t)}))}))},d=function(e,n){f((function(e){t.formatter.toggle("tableclass",{value:n},e.dom),rf(t,e.dom,of)}))},m=function(e,n){f((function(e){var o=Sc(r),i=X(o,(function(e){return t.formatter.match("tablecellclass",{value:n},e.dom)})),u=i?t.formatter.remove:t.formatter.apply;I(o,(function(t){return u("tablecellclass",{value:n},t.dom)})),rf(t,e.dom,of)}))},h=function(){pv(t).each((function(e){Rr(e,a).each((function(n){$n(n,"caption").fold((function(){var e=ve.fromTag("caption");_o(e,ve.fromText("Caption")),Ao(n,e,0),t.selection.setCursorLocation(e.dom,0)}),(function(r){fn("caption")(e)&&xe("td",n).each((function(e){return t.selection.setCursorLocation(e.dom,0)})),Bo(r)})),rf(t,n.dom,uf)}))}))},p=function(e){t.focus()},v=function(t,e){return void 0===e&&(e=!1),f((function(n,o){var i=pc(r,n,o);t(n,i,e).each(p)}))},b=function(){return f((function(e,n){var o=pc(r,e,n),i=Fa(g,ve.fromDom(t.getDoc()),A.none());return Gh(e,o,i)}))},y=function(){return f((function(t,e){var n=pc(r,t,e);return $h(t,n)}))},C=function(e,n){return n().each((function(n){var o=H(n,(function(t){return xi(t)}));f((function(n,i){var u=Va(ve.fromDom(t.getDoc())),a=bc(r,i,o,u);e(n,a).each(p)}))}))},S=function(t){return function(e,n){return Ie(n,"type").each((function(e){v(t(e),n.no_events)}))}};Ae({mceTableSplitCells:function(){return v(e.unmergeCells)},mceTableMergeCells:function(){return v(e.mergeCells)},mceTableInsertRowBefore:function(){return v(e.insertRowsBefore)},mceTableInsertRowAfter:function(){return v(e.insertRowsAfter)},mceTableInsertColBefore:function(){return v(e.insertColumnsBefore)},mceTableInsertColAfter:function(){return v(e.insertColumnsAfter)},mceTableDeleteCol:function(){return v(e.deleteColumn)},mceTableDeleteRow:function(){return v(e.deleteRow)},mceTableCutCol:function(){return y().each((function(t){u.setColumns(t),v(e.deleteColumn)}))},mceTableCutRow:function(){return b().each((function(t){u.setRows(t),v(e.deleteRow)}))},mceTableCopyCol:function(){return y().each((function(t){return u.setColumns(t)}))},mceTableCopyRow:function(){return b().each((function(t){return u.setRows(t)}))},mceTablePasteColBefore:function(){return C(e.pasteColsBefore,u.getColumns)},mceTablePasteColAfter:function(){return C(e.pasteColsAfter,u.getColumns)},mceTablePasteRowBefore:function(){return C(e.pasteRowsBefore,u.getRows)},mceTablePasteRowAfter:function(){return C(e.pasteRowsAfter,u.getRows)},mceTableDelete:c,mceTableCellToggleClass:m,mceTableToggleClass:d,mceTableToggleCaption:h,mceTableSizingMode:function(t,e){return s(e)},mceTableCellType:S((function(t){return"th"===t?e.makeCellsHeader:e.unmakeCellsHeader})),mceTableColType:S((function(t){return"th"===t?e.makeColumnsHeader:e.unmakeColumnsHeader})),mceTableRowType:S((function(t){switch(t){case"header":return e.makeRowsHeader;case"footer":return e.makeRowsFooter;default:return e.makeRowsBody}}))},(function(e,n){return t.addCommand(n,e)})),Ae({mceTableProps:w(hv,t,!1),mceTableRowProps:w(lv,t),mceTableCellProps:w(tv,t,r)},(function(e,n){return t.addCommand(n,(function(){return e()}))})),t.addCommand("mceInsertTable",(function(e,n){i(n)&&Ee(n).length>0?Ih(t,n.rows,n.columns,n.options,"Invalid values for mceInsertTable - rows and columns values are required to insert a table."):hv(t,!0)})),t.addCommand("mceTableApplyCellStyle",(function(e,n){var u=function(t){return"tablecell"+t.toLowerCase().replace("-","")};if(i(n)){var a=Sc(r);if(0!==a.length){var c=ze(n,(function(e,n){return t.formatter.has(u(n))&&o(e)}));Ve(c)||(Ae(c,(function(e,n){I(a,(function(r){zp.normal(t,r.dom).setFormat(u(n),e)}))})),l(a[0]).each((function(e){return rf(t,e.dom,of)})))}}}))},yv=function(t,e,n){var r=Ka(t),o=function(e){return Cc(ec(t)).bind((function(t){return Rr(t,r).map((function(r){var o=pc(n,r,t);return e(r,o)}))})).getOr("")};Ae({mceTableRowType:function(){return o(e.getTableRowType)},mceTableCellType:function(){return o(e.getTableCellType)},mceTableColType:function(){return o(e.getTableColType)}},(function(e,n){return t.addQueryValueHandler(n,e)}))},wv=function(){var t=bp(),e=bp();return{getRows:t.get,setRows:function(n){n.fold(t.clear,t.set),e.clear()},clearRows:t.clear,getColumns:e.get,setColumns:function(n){n.fold(e.clear,e.set),t.clear()},clearColumns:e.clear}},xv={remove_similar:!0,inherit:!1},Cv=ot({selector:"td,th"},xv),Sv={tablecellbackgroundcolor:ot({styles:{backgroundColor:"%value"}},Cv),tablecellverticalalign:ot({styles:{"vertical-align":"%value"}},Cv),tablecellbordercolor:ot({styles:{borderColor:"%value"}},Cv),tablecellclass:ot({classes:["%value"]},Cv),tableclass:ot({selector:"table",classes:["%value"]},xv),tablecellborderstyle:ot({styles:{borderStyle:"%value"}},Cv),tablecellborderwidth:ot({styles:{borderWidth:"%value"}},Cv)},kv=function(t){t.formatter.register(Sv)},Tv=fi.generate([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),Ov=function(t){return void 0===t&&(t=void 0),Tv.none(t)},Ev=ot(ot({},Tv),{none:Ov}),_v=function(t,e,n,r,o){void 0===o&&(o=k);var i=1===r;if(!i&&n<=0)return Ev.first(t[0]);if(i&&n>=t.length-1)return Ev.last(t[t.length-1]);var u=n+r,a=t[u];return o(a)?Ev.middle(e,a):_v(t,e,u,r,o)},Av=function(t,e){return Rr(t,e).bind((function(e){var n=Dr(e),r=$(n,(function(e){return Ce(t,e)}));return r.map((function(t){return{index:t,all:n}}))}))},Dv=function(t,e,n){var r=Av(t,n);return r.fold((function(){return Ev.none(t)}),(function(n){return _v(n.all,t,n.index,1,e)}))},Mv=function(t,e,n){var r=Av(t,n);return r.fold((function(){return Ev.none()}),(function(n){return _v(n.all,t,n.index,-1,e)}))},Rv=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},Nv={create:Rv},zv=fi.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Bv=function(t,e,n,r){return t.fold(e,n,r)},Lv=function(t){return t.fold(b,b,b)},Hv=zv.before,Iv=zv.on,Pv=zv.after,Fv={before:Hv,on:Iv,after:Pv,cata:Bv,getStart:Lv},Vv=fi.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Uv=function(t){return Vv.exact(t.start,t.soffset,t.finish,t.foffset)},jv=function(t){return t.match({domRange:function(t){return ve.fromDom(t.startContainer)},relative:function(t,e){return Fv.getStart(t)},exact:function(t,e,n,r){return t}})},Wv=Vv.domRange,qv=Vv.relative,$v=Vv.exact,Gv=function(t){var e=jv(t);return gn(e)},Kv=Nv.create,Xv={domRange:Wv,relative:qv,exact:$v,exactFromRange:Uv,getWin:Gv,range:Kv},Yv=function(t,e){var n=t.document.createRange();return n.selectNode(e.dom),n},Jv=function(t,e){var n=t.document.createRange();return Qv(n,e),n},Qv=function(t,e){return t.selectNodeContents(e.dom)},Zv=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)}))},tb=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)}))},eb=function(t,e,n){var r=t.document.createRange();return Zv(r,e),tb(r,n),r},nb=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},rb=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},ob=function(t){var e=t.getClientRects(),n=e.length>0?e[0]:t.getBoundingClientRect();return n.width>0||n.height>0?A.some(n).map(rb):A.none()},ib=fi.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),ub=function(t,e,n){return e(ve.fromDom(n.startContainer),n.startOffset,ve.fromDom(n.endContainer),n.endOffset)},ab=function(t,e){return e.match({domRange:function(t){return{ltr:v(t),rtl:A.none}},relative:function(e,n){return{ltr:ut((function(){return eb(t,e,n)})),rtl:ut((function(){return A.some(eb(t,n,e))}))}},exact:function(e,n,r,o){return{ltr:ut((function(){return nb(t,e,n,r,o)})),rtl:ut((function(){return A.some(nb(t,r,o,e,n))}))}}})},cb=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 ib.rtl(ve.fromDom(t.endContainer),t.endOffset,ve.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return ub(t,ib.ltr,n)}))}return ub(t,ib.ltr,n)},sb=function(t,e){var n=ab(t,e);return cb(t,n)},lb=function(t,e){var n=sb(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}})};ib.ltr,ib.rtl;var fb=function(t,e,n,r,o){if(0===o)return 0;if(e===r)return o-1;for(var i=r,u=1;u<o;u++){var a=t(u),c=Math.abs(e-a.left);if(n<=a.bottom){if(n<a.top||c>i)return u-1;i=c}}return 0},db=function(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom},mb=function(t,e,n,r,o){var i=function(n){var r=t.dom.createRange();return r.setStart(e.dom,n),r.collapse(!0),r},u=function(t){var e=i(t);return e.getBoundingClientRect()},a=Po(e).length,c=fb(u,n,r,o.right,a);return i(c)},gb=function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getClientRects(),u=rt(i,(function(t){return db(t,n,r)?A.some(t):A.none()}));return u.map((function(o){return mb(t,e,n,r,o)}))},hb=function(t,e,n,r){var o=t.dom.createRange(),i=wn(e);return rt(i,(function(e){return o.selectNode(e.dom),db(o.getBoundingClientRect(),n,r)?pb(t,e,n,r):A.none()}))},pb=function(t,e,n,r){return cn(e)?gb(t,e,n,r):hb(t,e,n,r)},vb=function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getBoundingClientRect(),u=Math.max(i.left,Math.min(i.right,n)),a=Math.max(i.top,Math.min(i.bottom,r));return pb(t,e,u,a)},bb=!0,yb=!1,wb=function(t,e){return e-t.left<t.right-e?bb:yb},xb=function(t,e,n){var r=t.dom.createRange();return r.selectNode(e.dom),r.collapse(n),r},Cb=function(t,e,n){var r=t.dom.createRange();r.selectNode(e.dom);var o=r.getBoundingClientRect(),i=wb(o,n),u=i===bb?_a:Aa;return u(e).map((function(e){return xb(t,e,i)}))},Sb=function(t,e,n){var r=e.dom.getBoundingClientRect(),o=wb(r,n);return A.some(xb(t,e,o))},kb=function(t,e,n){var r=0===wn(e).length?Sb:Cb;return r(t,e,n)},Tb=function(t,e,n){var r,o;return A.from(null===(o=(r=t.dom).caretPositionFromPoint)||void 0===o?void 0:o.call(r,e,n)).bind((function(e){if(null===e.offsetNode)return A.none();var n=t.dom.createRange();return n.setStart(e.offsetNode,e.offset),n.collapse(),A.some(n)}))},Ob=function(t,e,n){var r,o;return A.from(null===(o=(r=t.dom).caretRangeFromPoint)||void 0===o?void 0:o.call(r,e,n))},Eb=function(t,e,n,r){var o=t.dom.createRange();o.selectNode(e.dom);var i=o.getBoundingClientRect(),u=Math.max(i.left,Math.min(i.right,n)),a=Math.max(i.top,Math.min(i.bottom,r));return vb(t,e,u,a)},_b=function(t,e,n){return ve.fromPoint(t,e,n).bind((function(r){var o=function(){return kb(t,r,e)};return 0===wn(r).length?o():Eb(t,r,e,n).orThunk(o)}))},Ab=function(){return document.caretPositionFromPoint?Tb:document.caretRangeFromPoint?Ob:_b}(),Db=function(t,e,n){var r=ve.fromDom(t.document);return Ab(r,e,n).map((function(t){return Nv.create(ve.fromDom(t.startContainer),t.startOffset,ve.fromDom(t.endContainer),t.endOffset)}))},Mb=function(t,e){var n=nn(t);return"input"===n?Fv.after(t):z(["br","img"],n)?0===e?Fv.before(t):Fv.after(t):Fv.on(t,e)},Rb=function(t,e){var n=t.fold(Fv.before,Mb,Fv.after),r=e.fold(Fv.before,Mb,Fv.after);return Xv.relative(n,r)},Nb=function(t,e,n,r){var o=Mb(t,e),i=Mb(n,r);return Xv.relative(o,i)},zb=function(t){return t.match({domRange:function(t){var e=ve.fromDom(t.startContainer),n=ve.fromDom(t.endContainer);return Nb(e,t.startOffset,n,t.endOffset)},relative:Rb,exact:Nb})},Bb=function(t,e,n,r){var o=dn(t),i=o.dom.createRange();return i.setStart(t.dom,e),i.setEnd(n.dom,r),i},Lb=function(t,e,n,r){var o=Bb(t,e,n,r),i=Ce(t,n)&&e===r;return o.collapsed&&!i},Hb=function(t){return A.from(t.getSelection())},Ib=function(t,e){Hb(t).each((function(t){t.removeAllRanges(),t.addRange(e)}))},Pb=function(t,e,n,r,o){var i=nb(t,e,n,r,o);Ib(t,i)},Fb=function(t,e,n,r,o,i){e.collapse(n.dom,r),e.extend(o.dom,i)},Vb=function(t,e){return sb(t,e).match({ltr:function(e,n,r,o){Pb(t,e,n,r,o)},rtl:function(e,n,r,o){Hb(t).each((function(i){if(i.setBaseAndExtent)i.setBaseAndExtent(e.dom,n,r.dom,o);else if(i.extend)try{Fb(t,i,e,n,r,o)}catch(u){Pb(t,r,o,e,n)}else Pb(t,r,o,e,n)}))}})},Ub=function(t,e,n,r,o){var i=Nb(e,n,r,o);Vb(t,i)},jb=function(t,e,n){var r=Rb(e,n);Vb(t,r)},Wb=function(t){var e=Xv.getWin(t).dom,n=function(t,n,r,o){return nb(e,t,n,r,o)},r=zb(t);return sb(e,r).match({ltr:n,rtl:n})},qb=function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return A.some(Nv.create(ve.fromDom(e.startContainer),e.startOffset,ve.fromDom(n.endContainer),n.endOffset))}return A.none()},$b=function(t){if(null===t.anchorNode||null===t.focusNode)return qb(t);var e=ve.fromDom(t.anchorNode),n=ve.fromDom(t.focusNode);return Lb(e,t.anchorOffset,n,t.focusOffset)?A.some(Nv.create(e,t.anchorOffset,n,t.focusOffset)):qb(t)},Gb=function(t,e,n){void 0===n&&(n=!0);var r=n?Jv:Yv,o=r(t,e);Ib(t,o)},Kb=function(t){return Hb(t).filter((function(t){return t.rangeCount>0})).bind($b)},Xb=function(t){return Kb(t).map((function(t){return Xv.exact(t.start,t.soffset,t.finish,t.foffset)}))},Yb=function(t,e){var n=lb(t,e);return ob(n)},Jb=function(t,e,n){return Db(t,e,n)},Qb=function(t){Hb(t).each((function(t){return t.removeAllRanges()}))},Zb=tinymce.util.Tools.resolve("tinymce.util.VK"),ty=function(t,e,n){return ry(t,e,Dv(n,Cl))},ey=function(t,e,n){return ry(t,e,Mv(n,Cl))},ny=function(t,e){var n=Xv.exact(e,0,e,0);return Wb(n)},ry=function(t,e,n){return n.fold(A.none,A.none,(function(e,n){return _a(n).map((function(e){return ny(t,e)}))}),(function(n){return t.execCommand("mceTableInsertRowAfter"),ty(t,e,n)}))},oy=["table","li","dl"],iy=function(t,e,n){if(t.keyCode===Zb.TAB){var r=qa(e),o=function(t){var e=nn(t);return Ce(t,r)||z(oy,e)},i=e.selection.getRng(),u=ve.fromDom(t.shiftKey?i.startContainer:i.endContainer);Ar(u,o).each((function(r){t.preventDefault(),Rr(r,o).each(n.clear),e.selection.collapse(t.shiftKey);var i=t.shiftKey?ey:ty,u=i(e,o,r);u.each((function(t){e.selection.setRng(t)}))}))}},uy=function(t,e){return{selection:t,kill:e}},ay={create:uy},cy=function(t,e,n,r){return{start:Fv.on(t,e),finish:Fv.on(n,r)}},sy={create:cy},ly=function(t,e){var n=lb(t,e);return Nv.create(ve.fromDom(n.startContainer),n.startOffset,ve.fromDom(n.endContainer),n.endOffset)},fy=sy.create,dy=function(t,e,n,r,o,i,u){return Ce(n,o)&&r===i?A.none():Kn(n,"td,th",e).bind((function(n){return Kn(o,"td,th",e).bind((function(r){return my(t,e,n,r,u)}))}))},my=function(t,e,n,r,o){return Ce(n,r)?A.none():ni(n,r,e).bind((function(e){var r=e.boxes.getOr([]);return r.length>1?(o(t,r,e.start,e.finish),A.some(ay.create(A.some(fy(n,0,n,ka(n))),!0))):A.none()}))},gy=function(t,e,n,r,o){var i=function(t){return o.clearBeforeUpdate(n),o.selectRange(n,t.boxes,t.start,t.finish),t.boxes};return ai(r,t,e,o.firstSelectedSelector,o.lastSelectedSelector).map(i)},hy=function(t,e){return{item:t,mode:e}},py=function(t,e,n,r){return void 0===r&&(r=vy),t.property().parent(e).map((function(t){return hy(t,r)}))},vy=function(t,e,n,r){return void 0===r&&(r=by),n.sibling(t,e).map((function(t){return hy(t,r)}))},by=function(t,e,n,r){void 0===r&&(r=by);var o=t.property().children(e),i=n.first(o);return i.map((function(t){return hy(t,r)}))},yy=[{current:py,next:vy,fallback:A.none()},{current:vy,next:by,fallback:A.some(py)},{current:by,next:by,fallback:A.some(vy)}],wy=function(t,e,n,r,o){void 0===o&&(o=yy);var i=q(o,(function(t){return t.current===n}));return i.bind((function(n){return n.current(t,e,r,n.next).orThunk((function(){return n.fallback.bind((function(n){return wy(t,e,n,r)}))}))}))},xy=function(){var t=function(t,e){return t.query().prevSibling(e)},e=function(t){return t.length>0?A.some(t[t.length-1]):A.none()};return{sibling:t,first:e}},Cy=function(){var t=function(t,e){return t.query().nextSibling(e)},e=function(t){return t.length>0?A.some(t[0]):A.none()};return{sibling:t,first:e}},Sy={left:xy,right:Cy},ky=function(t,e,n,r,o,i){var u=wy(t,e,r,o);return u.bind((function(e){return i(e.item)?A.none():n(e.item)?A.some(e.item):ky(t,e.item,n,e.mode,o,i)}))},Ty=function(t,e,n,r){return ky(t,e,n,vy,Sy.left(),r)},Oy=function(t,e,n,r){return ky(t,e,n,vy,Sy.right(),r)},Ey=function(t){return function(e){return 0===t.property().children(e).length}},_y=function(t,e,n){return Dy(t,e,Ey(t),n)},Ay=function(t,e,n){return My(t,e,Ey(t),n)},Dy=Ty,My=Oy,Ry=jo(),Ny=function(t,e){return _y(Ry,t,e)},zy=function(t,e){return Ay(Ry,t,e)},By=function(t,e,n){return Dy(Ry,t,e,n)},Ly=function(t,e,n){return My(Ry,t,e,n)},Hy=function(t,e,n){return Vn(t,e,n).isSome()},Iy=fi.generate([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),Py=function(t,e,n){var r=t.getRect(e),o=t.getRect(n);return o.right>r.left&&o.left<r.right},Fy=function(t){return Kn(t,"tr")},Vy=function(t,e,n,r,o,i,u){return Kn(r,"td,th",u).bind((function(n){return Kn(e,"td,th",u).map((function(e){return Ce(n,e)?Ce(r,n)&&ka(n)===o?i(e):Iy.none("in same cell"):Zo(Fy,[n,e]).fold((function(){return Py(t,e,n)?Iy.success():i(e)}),(function(t){return i(e)}))}))})).getOr(Iy.none("default"))},Uy=function(t,e,n,r,o){return t.fold(e,n,r,o)},jy=ot(ot({},Iy),{verify:Vy,cata:Uy}),Wy=function(t,e,n,r){return{parent:t,children:e,element:n,index:r}},qy=function(t){return hn(t).bind((function(e){var n=wn(e);return $y(n,t).map((function(r){return Wy(e,n,t,r)}))}))},$y=function(t,e){return $(t,w(Ce,e))},Gy=function(t){return"br"===nn(t)},Ky=function(t,e,n){return e(t,n).bind((function(t){return cn(t)&&0===Po(t).trim().length?Ky(t,e,n):A.some(t)}))},Xy=function(t,e,n){return n.traverse(e).orThunk((function(){return Ky(e,n.gather,t)})).map(n.relative)},Yy=function(t,e){return xn(t,e).filter(Gy).orThunk((function(){return xn(t,e-1).filter(Gy)}))},Jy=function(t,e,n,r){return Yy(e,n).bind((function(e){return r.traverse(e).fold((function(){return Ky(e,r.gather,t).map(r.relative)}),(function(t){return qy(t).map((function(t){return Fv.on(t.parent,t.index)}))}))}))},Qy=function(t,e,n,r){var o=Gy(e)?Xy(t,e,r):Jy(t,e,n,r);return o.map((function(t){return{start:t,finish:t}}))},Zy=function(t){return jy.cata(t,(function(t){return A.none()}),(function(){return A.none()}),(function(t){return A.some(ud(t,0))}),(function(t){return A.some(ud(t,ka(t)))}))},tw=function(t,e){return{left:t.left,top:t.top+e,right:t.right,bottom:t.bottom+e}},ew=function(t,e){return{left:t.left,top:t.top-e,right:t.right,bottom:t.bottom-e}},nw=function(t,e,n){return{left:t.left+e,top:t.top+n,right:t.right+e,bottom:t.bottom+n}},rw=function(t){return t.top},ow=function(t){return t.bottom},iw=function(t,e,n){return n>=0&&n<ka(e)?t.getRangedRect(e,n,e,n+1):n>0?t.getRangedRect(e,n-1,e,n):A.none()},uw=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}},aw=function(t,e){return A.some(t.getRect(e))},cw=function(t,e,n){return an(e)?aw(t,e).map(uw):cn(e)?iw(t,e,n).map(uw):A.none()},sw=function(t,e){return an(e)?aw(t,e).map(uw):cn(e)?t.getRangedRect(e,0,e,ka(e)).map(uw):A.none()},lw=5,fw=100,dw=fi.generate([{none:[]},{retry:["caret"]}]),mw=function(t,e){return t.left<e.left||Math.abs(e.right-t.left)<1||t.left>e.right},gw=function(t,e,n){return Un(e,ag).fold(S,(function(e){return sw(t,e).exists((function(t){return mw(n,t)}))}))},hw=function(t,e,n,r,o){var i=tw(o,lw);return Math.abs(n.bottom-r.bottom)<1||n.top>o.bottom?dw.retry(i):n.top===o.bottom?dw.retry(tw(o,1)):gw(t,e,o)?dw.retry(nw(i,lw,0)):dw.none()},pw=function(t,e,n,r,o){var i=ew(o,lw);return Math.abs(n.top-r.top)<1||n.bottom<o.top?dw.retry(i):n.bottom===o.top?dw.retry(ew(o,1)):gw(t,e,o)?dw.retry(nw(i,lw,0)):dw.none()},vw={point:rw,adjuster:pw,move:ew,gather:Ny},bw={point:ow,adjuster:hw,move:tw,gather:zy},yw=function(t,e,n){return t.elementFromPoint(e,n).filter((function(t){return"table"===nn(t)})).isSome()},ww=function(t,e,n,r,o){return xw(t,e,n,e.move(r,lw),o)},xw=function(t,e,n,r,o){return 0===o?A.some(r):yw(t,r.left,e.point(r))?ww(t,e,n,r,o-1):t.situsFromPoint(r.left,e.point(r)).bind((function(i){return i.start.fold(A.none,(function(i){return sw(t,i).bind((function(u){return e.adjuster(t,i,u,n,r).fold(A.none,(function(r){return xw(t,e,n,r,o-1)}))})).orThunk((function(){return A.some(r)}))}),A.none)}))},Cw=function(t,e){return t.situsFromPoint(e.left,e.bottom+lw)},Sw=function(t,e){return t.situsFromPoint(e.left,e.top-lw)},kw=function(t,e,n){return t.point(e)>n.getInnerHeight()?A.some(t.point(e)-n.getInnerHeight()):t.point(e)<0?A.some(-t.point(e)):A.none()},Tw=function(t,e,n){var r=t.move(n,lw),o=xw(e,t,n,r,fw).getOr(r);return kw(t,o,e).fold((function(){return e.situsFromPoint(o.left,t.point(o))}),(function(n){return e.scrollBy(0,n),e.situsFromPoint(o.left,t.point(o)-n)}))},Ow={tryUp:w(Tw,vw),tryDown:w(Tw,bw),ieTryUp:Sw,ieTryDown:Cw,getJumpSize:v(lw)},Ew=20,_w=function(t,e,n){return t.getSelection().bind((function(r){return Qy(e,r.finish,r.foffset,n).fold((function(){return A.some(ud(r.finish,r.foffset))}),(function(o){var i=t.fromSitus(o),u=jy.verify(t,r.finish,r.foffset,i.finish,i.foffset,n.failure,e);return Zy(u)}))}))},Aw=function(t,e,n,r,o,i){return 0===i?A.none():Rw(t,e,n,r,o).bind((function(u){var a=t.fromSitus(u),c=jy.verify(t,n,r,a.finish,a.foffset,o.failure,e);return jy.cata(c,(function(){return A.none()}),(function(){return A.some(u)}),(function(u){return Ce(n,u)&&0===r?Dw(t,n,r,ew,o):Aw(t,e,u,0,o,i-1)}),(function(u){return Ce(n,u)&&r===ka(u)?Dw(t,n,r,tw,o):Aw(t,e,u,ka(u),o,i-1)}))}))},Dw=function(t,e,n,r,o){return cw(t,e,n).bind((function(e){return Mw(t,o,r(e,Ow.getJumpSize()))}))},Mw=function(t,e,n){var r=oe().browser;return r.isChrome()||r.isSafari()||r.isFirefox()||r.isEdge()?e.otherRetry(t,n):r.isIE()?e.ieRetry(t,n):A.none()},Rw=function(t,e,n,r,o){return cw(t,n,r).bind((function(e){return Mw(t,o,e)}))},Nw=function(t,e,n){return _w(t,e,n).bind((function(r){return Aw(t,e,r.element,r.offset,n,Ew).map(t.fromSitus)}))},zw=function(t,e){return Hy(t,(function(t){return hn(t).exists((function(t){return Ce(t,e)}))}))},Bw=function(t,e,n,r,o){return Kn(r,"td,th",e).bind((function(r){return Kn(r,"table",e).bind((function(i){return zw(o,i)?Nw(t,e,n).bind((function(t){return Kn(t.finish,"td,th",e).map((function(e){return{start:r,finish:e,range:t}}))})):A.none()}))}))},Lw=function(t,e,n,r,o,i){return oe().browser.isIE()?A.none():i(r,e).orThunk((function(){return Bw(t,e,n,r,o).map((function(t){var e=t.range;return ay.create(A.some(fy(e.start,e.soffset,e.finish,e.foffset)),!0)}))}))},Hw=function(t,e){return Kn(t,"tr",e).bind((function(t){return Kn(t,"table",e).bind((function(n){var r=Pn(n,"tr");return Ce(t,r[0])?By(n,(function(t){return Aa(t).isSome()}),e).map((function(t){var e=ka(t);return ay.create(A.some(fy(t,e,t,e)),!0)})):A.none()}))}))},Iw=function(t,e){return Kn(t,"tr",e).bind((function(t){return Kn(t,"table",e).bind((function(n){var r=Pn(n,"tr");return Ce(t,r[r.length-1])?Ly(n,(function(t){return _a(t).isSome()}),e).map((function(t){return ay.create(A.some(fy(t,0,t,0)),!0)})):A.none()}))}))},Pw=function(t,e,n,r,o,i,u){return Bw(t,n,r,o,i).bind((function(t){return my(e,n,t.start,t.finish,u)}))},Fw=function(t,e){return Kn(t,"td,th",e)},Vw=function(t,e,n,r){var o=bp(),i=o.clear,u=function(i){o.on((function(o){r.clearBeforeUpdate(e),Fw(i.target,n).each((function(u){ni(o,u,n).each((function(n){var o=n.boxes.getOr([]);if(1===o.length){var a=o[0],c="false"===Sl(a),s=rr(xl(i.target),a,Ce);c&&s&&(r.selectRange(e,o,a,a),t.selectContents(a))}else o.length>1&&(r.selectRange(e,o,n.start,n.finish),t.selectContents(u))}))}))}))},a=function(t){r.clear(e),Fw(t.target,n).each(o.set)},c=function(t){u(t)},s=function(t){u(t),i()};return{clearstate:i,mousedown:a,mouseover:c,mouseup:s}},Uw={traverse:yn,gather:zy,relative:Fv.before,otherRetry:Ow.tryDown,ieRetry:Ow.ieTryDown,failure:jy.failedDown},jw={traverse:bn,gather:Ny,relative:Fv.before,otherRetry:Ow.tryUp,ieRetry:Ow.ieTryUp,failure:jy.failedUp},Ww=function(t){return function(e){return e===t}},qw=Ww(38),$w=Ww(40),Gw=function(t){return t>=37&&t<=40},Kw={isBackward:Ww(37),isForward:Ww(39)},Xw={isBackward:Ww(39),isForward:Ww(37)},Yw=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 Qi(n,r)},Jw=function(t,e,n){var r=void 0!==n?n.dom:document,o=r.defaultView;o&&o.scrollBy(t,e)},Qw=function(t){var e=function(e,n){return ve.fromPoint(ve.fromDom(t.document),e,n)},n=function(t){return t.dom.getBoundingClientRect()},r=function(e,n,r,o){var i=Xv.exact(e,n,r,o);return Yb(t,i)},o=function(){return Xb(t).map((function(e){return ly(t,e)}))},i=function(e){var n=Xv.relative(e.start,e.finish);return ly(t,n)},u=function(e,n){return Jb(t,e,n).map((function(t){return sy.create(t.start,t.soffset,t.finish,t.foffset)}))},a=function(){Qb(t)},c=function(e){void 0===e&&(e=!1),Xb(t).each((function(n){return n.fold((function(t){return t.collapse(e)}),(function(n,r){var o=e?n:r;jb(t,o,o)}),(function(n,r,o,i){var u=e?n:o,a=e?r:i;Ub(t,u,a,u,a)}))}))},s=function(e){Gb(t,e,!1)},l=function(e){Gb(t,e)},f=function(e){Ub(t,e.start,e.soffset,e.finish,e.foffset)},d=function(e,n){jb(t,e,n)},m=function(){return t.innerHeight},g=function(){var e=Yw(ve.fromDom(t.document));return e.top},h=function(e,n){Jw(e,n,ve.fromDom(t.document))};return{elementFromPoint:e,getRect:n,getRangedRect:r,getSelection:o,fromSitus:i,situsFromPoint:u,clearSelection:a,collapseSelection:c,setSelection:f,setRelativeSelection:d,selectNode:s,selectContents:l,getInnerHeight:m,getScrollY:g,scrollBy:h}},Zw=function(t,e){return{rows:t,cols:e}},tx=function(t,e,n,r){var o=Qw(t),i=Vw(o,e,n,r);return{clearstate:i.clearstate,mousedown:i.mousedown,mouseover:i.mouseover,mouseup:i.mouseup}},ex=function(t,e,n,r){var o=Qw(t),i=function(){return r.clear(e),A.none()},u=function(t,u,a,c,s,l){var f=t.raw,d=f.which,m=!0===f.shiftKey,g=ri(e,r.selectedSelector).fold((function(){return Gw(d)&&!m&&r.clearBeforeUpdate(e),$w(d)&&m?w(Pw,o,e,n,Uw,c,u,r.selectRange):qw(d)&&m?w(Pw,o,e,n,jw,c,u,r.selectRange):$w(d)?w(Lw,o,n,Uw,c,u,Iw):qw(d)?w(Lw,o,n,jw,c,u,Hw):A.none}),(function(t){var n=function(n){return function(){var i=rt(n,(function(n){return gy(n.rows,n.cols,e,t,r)}));return i.fold((function(){return ii(e,r.firstSelectedSelector,r.lastSelectedSelector).map((function(t){var n=$w(d)||l.isForward(d)?Fv.after:Fv.before;return o.setRelativeSelection(Fv.on(t.first,0),n(t.table)),r.clear(e),ay.create(A.none(),!0)}))}),(function(t){return A.some(ay.create(A.none(),!0))}))}};return $w(d)&&m?n([Zw(1,0)]):qw(d)&&m?n([Zw(-1,0)]):l.isBackward(d)&&m?n([Zw(0,-1),Zw(-1,0)]):l.isForward(d)&&m?n([Zw(0,1),Zw(1,0)]):Gw(d)&&!m?i:A.none}));return g()},a=function(t,o,i,u,a){return ri(e,r.selectedSelector).fold((function(){var c=t.raw,s=c.which,l=!0===c.shiftKey;return l&&Gw(s)?dy(e,n,o,i,u,a,r.selectRange):A.none()}),A.none)};return{keydown:u,keyup:a}},nx=function(t,e,n,r){var o=Qw(t);return function(t,i){r.clearBeforeUpdate(e),ni(t,i,n).each((function(t){var n=t.boxes.getOr([]);r.selectRange(e,n,t.start,t.finish),o.selectContents(i),o.collapseSelection()}))}},rx=function(t,e){I(e,(function(e){sl(t,e)}))},ox=function(t){return function(e){al(e,t)}},ix=function(t){return function(e){rx(e,t)}},ux=function(t){var e=ox(t.selected),n=ix([t.selected,t.lastSelected,t.firstSelected]),r=function(e){var r=Pn(e,t.selectedSelector);I(r,n)},o=function(n,o,i,u){r(n),I(o,e),al(i,t.firstSelected),al(u,t.lastSelected)};return{clearBeforeUpdate:r,clear:r,selectRange:o,selectedSelector:t.selectedSelector,firstSelectedSelector:t.firstSelectedSelector,lastSelectedSelector:t.lastSelectedSelector}},ax=function(t,e,n){var r=function(e){er(e,t.selected),er(e,t.firstSelected),er(e,t.lastSelected)},o=function(e){Yn(e,t.selected,"1")},i=function(t){u(t),n()},u=function(e){var n=Pn(e,t.selectedSelector+","+t.firstSelectedSelector+","+t.lastSelectedSelector);I(n,r)},a=function(n,r,u,a){i(n),I(r,o),Yn(u,t.firstSelected,"1"),Yn(a,t.lastSelected,"1"),e(r,u,a)};return{clearBeforeUpdate:u,clear:i,selectRange:a,selectedSelector:t.selectedSelector,firstSelectedSelector:t.firstSelectedSelector,lastSelectedSelector:t.lastSelectedSelector}},cx={byClass:ux,byAttr:ax},sx=function(t,e){var n=t.slice(0,e[e.length-1].row+1),r=Vd(n);return K(r,(function(t){var n=t.cells.slice(0,e[e.length-1].column+1);return H(n,(function(t){return t.element}))}))},lx=function(t,e){var n=t.slice(e[0].row+e[0].rowspan-1,t.length),r=Vd(n);return K(r,(function(t){var n=t.cells.slice(e[0].column+e[0].colspan-1,t.cells.length);return H(n,(function(t){return t.element}))}))},fx=function(t,e,n){var r=so.fromTable(t),o=Xd(r,e);return o.map((function(t){var e=Pd(r,n,!1),o=sx(e,t),i=lx(e,t);return{upOrLeftCells:o,downOrRightCells:i}}))},dx=tinymce.util.Tools.resolve("tinymce.Env"),mx=function(t){return!1===ll(ve.fromDom(t.target),"ephox-snooker-resizer-bar")};function gx(t,e,n){var r=function(e,r,o){n.targets().each((function(n){var i=Rr(r);i.each((function(i){var u=Vf(t),a=Fa(g,ve.fromDom(t.getDoc()),u),c=fx(i,n,a);ef(t,e,r,o,c)}))}))},o=function(){return nf(t)},i=cx.byAttr(gc,r,o);return t.on("init",(function(n){var r=t.getWin(),o=qa(t),u=Ka(t),a=function(){var e=t.selection,n=ve.fromDom(e.getStart()),r=ve.fromDom(e.getEnd()),u=Zo(Rr,[n,r]);u.fold((function(){return i.clear(o)}),g)},c=tx(r,o,u,i),s=ex(r,o,u,i),l=nx(r,o,u,i),f=function(t){return!0===t.raw.shiftKey};t.on("TableSelectorChange",(function(t){return l(t.start,t.finish)}));var d=function(e,n){f(e)&&(n.kill&&e.kill(),n.selection.each((function(e){var n=Xv.relative(e.start,e.finish),o=lb(r,n);t.selection.setRng(o)})))},m=function(e){var n=Zs(e);if(n.raw.shiftKey&&Gw(n.raw.which)){var r=t.selection.getRng(),o=ve.fromDom(r.startContainer),i=ve.fromDom(r.endContainer);s.keyup(n,o,r.startOffset,i,r.endOffset).each((function(t){d(n,t)}))}},h=function(n){var r=Zs(n);e().each((function(t){return t.hideBars()}));var o=t.selection.getRng(),i=ve.fromDom(o.startContainer),u=ve.fromDom(o.endContainer),a=qi(Kw,Xw)(ve.fromDom(t.selection.getStart()));s.keydown(r,i,o.startOffset,u,o.endOffset,a).each((function(t){d(r,t)})),e().each((function(t){return t.showBars()}))},p=function(t){return 0===t.button},v=function(t){return void 0===t.buttons||(!(!dx.browser.isEdge()||0!==t.buttons)||0!==(1&t.buttons))},b=function(t){c.clearstate()},y=function(t){p(t)&&mx(t)&&c.mousedown(Zs(t))},w=function(t){v(t)&&mx(t)&&c.mouseover(Zs(t))},x=function(t){p(t)&&mx(t)&&c.mouseup(Zs(t))},C=function(){var t=hp(ve.fromDom(o)),e=hp(0),n=function(n){var r=ve.fromDom(n.target);if("td"===nn(r)||"th"===nn(r)){var o=t.get(),i=e.get();Ce(o,r)&&n.timeStamp-i<300&&(n.preventDefault(),l(r,r))}t.set(r),e.set(n.timeStamp)};return{touchEnd:n}},S=C();t.on("dragstart",b),t.on("mousedown",y),t.on("mouseover",w),t.on("mouseup",x),t.on("touchend",S.touchEnd),t.on("keyup",m),t.on("keydown",h),t.on("NodeChange",a)})),{clear:i.clear}}var hx=function(t,e){return $n(t,e).isSome()},px=function(t,e){var n=hp(A.none()),r=hp([]),o=A.none(),i=fn("caption"),u=function(t){return o.forall((function(e){return!e[t]}))},a=function(){return xc(ec(t),Ka(t))},c=function(){return xc(nc(t),Ka(t))},s=function(){return a().bind((function(t){return ar(ir(Rr(t),c().bind(Rr),(function(n,r){return Ce(n,r)?i(t)?A.some(hc(t)):A.some(pc(e,n,t)):A.none()})))}))},l=function(t){var e=Rr(t.element);return e.map((function(e){var n=so.fromTable(e),r=Xd(n,t).getOr([]),o=j(r,(function(t,e){return e.isLocked&&(t.onAny=!0,0===e.column?t.onFirst=!0:e.column+e.colspan>=n.grid.columns&&(t.onLast=!0)),t}),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:Zd(n,t).isSome(),unmergeable:tm(n,t).isSome(),locked:o}}))},f=function(){n.set(ut(s)()),o=n.get().bind(l),I(r.get(),(function(t){return t()}))},d=function(t){return t(),r.set(r.get().concat([t])),function(){r.set(V(r.get(),(function(e){return e!==t})))}},m=function(t,e){return d((function(){return n.get().fold((function(){t.setDisabled(!0)}),(function(n){t.setDisabled(e(n))}))}))},g=function(t,e,r){return d((function(){return n.get().fold((function(){t.setDisabled(!0),t.setActive(!1)}),(function(n){t.setDisabled(e(n)),t.setActive(r(n))}))}))},h=function(t){return o.exists((function(e){return e.locked[t]}))},p=function(t){return m(t,(function(t){return!1}))},v=function(t){return m(t,(function(t){return i(t.element)}))},b=function(t){return function(e){return m(e,(function(e){return i(e.element)||h(t)}))}},y=function(t){return function(e){return m(e,(function(e){return i(e.element)||t().isNone()}))}},w=function(t,e){return function(n){return m(n,(function(n){return i(n.element)||t().isNone()||h(e)}))}},x=function(t){return m(t,(function(t){return u("mergeable")}))},C=function(t){return m(t,(function(t){return u("unmergeable")}))},k=function(e){return g(e,S,(function(e){var n=Rr(e.element,Ka(t));return n.exists((function(t){return hx(t,"caption")}))}))},T=function(e,n){return function(r){return g(r,(function(t){return i(t.element)}),(function(){return t.queryCommandValue(e)===n}))}},O=T("mceTableRowType","header"),E=T("mceTableColType","th");return t.on("NodeChange ExecCommand TableSelectorChange",f),{onSetupTable:p,onSetupCellOrRow:v,onSetupColumn:b,onSetupPasteable:y,onSetupPasteableColumn:w,onSetupMergeable:x,onSetupUnmergeable:C,resetTargets:f,onSetupTableWithCaption:k,onSetupTableRowHeaders:O,onSetupTableColumnHeaders:E,targets:n.get}},vx=function(t,e,n,r){t.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:function(t){return t("inserttable | cell row column | advtablesort | tableprops deletetable")}});var o=function(e){return function(){return t.execCommand(e)}};t.ui.registry.addButton("tableprops",{tooltip:"Table properties",onAction:o("mceTableProps"),icon:"table",onSetup:n.onSetupTable}),t.ui.registry.addButton("tabledelete",{tooltip:"Delete table",onAction:o("mceTableDelete"),icon:"table-delete-table",onSetup:n.onSetupTable}),t.ui.registry.addButton("tablecellprops",{tooltip:"Cell properties",onAction:o("mceTableCellProps"),icon:"table-cell-properties",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablemergecells",{tooltip:"Merge cells",onAction:o("mceTableMergeCells"),icon:"table-merge-cells",onSetup:n.onSetupMergeable}),t.ui.registry.addButton("tablesplitcells",{tooltip:"Split cell",onAction:o("mceTableSplitCells"),icon:"table-split-cells",onSetup:n.onSetupUnmergeable}),t.ui.registry.addButton("tableinsertrowbefore",{tooltip:"Insert row before",onAction:o("mceTableInsertRowBefore"),icon:"table-insert-row-above",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tableinsertrowafter",{tooltip:"Insert row after",onAction:o("mceTableInsertRowAfter"),icon:"table-insert-row-after",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tabledeleterow",{tooltip:"Delete row",onAction:o("mceTableDeleteRow"),icon:"table-delete-row",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablerowprops",{tooltip:"Row properties",onAction:o("mceTableRowProps"),icon:"table-row-properties",onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tableinsertcolbefore",{tooltip:"Insert column before",onAction:o("mceTableInsertColBefore"),icon:"table-insert-column-before",onSetup:n.onSetupColumn("onFirst")}),t.ui.registry.addButton("tableinsertcolafter",{tooltip:"Insert column after",onAction:o("mceTableInsertColAfter"),icon:"table-insert-column-after",onSetup:n.onSetupColumn("onLast")}),t.ui.registry.addButton("tabledeletecol",{tooltip:"Delete column",onAction:o("mceTableDeleteCol"),icon:"table-delete-column",onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablecutrow",{tooltip:"Cut row",icon:"cut-row",onAction:o("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablecopyrow",{tooltip:"Copy row",icon:"duplicate-row",onAction:o("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addButton("tablepasterowbefore",{tooltip:"Paste row before",icon:"paste-row-before",onAction:o("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addButton("tablepasterowafter",{tooltip:"Paste row after",icon:"paste-row-after",onAction:o("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addButton("tablecutcol",{tooltip:"Cut column",icon:"cut-column",onAction:o("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablecopycol",{tooltip:"Copy column",icon:"duplicate-column",onAction:o("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addButton("tablepastecolbefore",{tooltip:"Paste column before",icon:"paste-column-before",onAction:o("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onFirst")}),t.ui.registry.addButton("tablepastecolafter",{tooltip:"Paste column after",icon:"paste-column-after",onAction:o("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onLast")}),t.ui.registry.addButton("tableinsertdialog",{tooltip:"Insert table",onAction:o("mceInsertTable"),icon:"table"});var i=kp(Mf(t));0!==i.length&&t.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:Tp(t,e,i,"tableclass",(function(e){return t.execCommand("mceTableToggleClass",!1,e)})),onSetup:n.onSetupTable});var u=kp(Af(t));0!==u.length&&t.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:Tp(t,e,u,"tablecellclass",(function(e){return t.execCommand("mceTableCellToggleClass",!1,e)})),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:Tp(t,e,tp,"tablecellverticalalign",Sp(t,"vertical-align")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:Tp(t,e,vf(t),"tablecellborderwidth",Sp(t,"border-width")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:Tp(t,e,bf(t),"tablecellborderstyle",Sp(t,"border-style")),onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleButton("tablecaption",{tooltip:"Table caption",onAction:o("mceTableToggleCaption"),icon:"table-caption",onSetup:n.onSetupTableWithCaption}),t.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:function(e){return e(Op(t,jf(t),"background-color"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:function(e){return e(Op(t,Wf(t),"border-color"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleButton("tablerowheader",{tooltip:"Row header",icon:"table-top-header",onAction:Ep(t),onSetup:n.onSetupTableRowHeaders}),t.ui.registry.addToggleButton("tablecolheader",{tooltip:"Column header",icon:"table-left-header",onAction:_p(t),onSetup:n.onSetupTableColumnHeaders})},bx=function(t){var e=function(e){return t.dom.is(e,"table")&&t.getBody().contains(e)},n=Bf(t);n.length>0&&t.ui.registry.addContextToolbar("table",{predicate:e,items:n,scope:"node",position:"node"})},yx=function(t,e,n,r){var o=function(e){return function(){return t.execCommand(e)}},i=function(e){t.execCommand("mceInsertTable",!1,{rows:e.numRows,columns:e.numColumns})},u={text:"Table properties",onSetup:n.onSetupTable,onAction:o("mceTableProps")},a={text:"Delete table",icon:"table-delete-table",onSetup:n.onSetupTable,onAction:o("mceTableDelete")};t.ui.registry.addMenuItem("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",onAction:o("mceTableInsertRowBefore"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",onAction:o("mceTableInsertRowAfter"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tabledeleterow",{text:"Delete row",icon:"table-delete-row",onAction:o("mceTableDeleteRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablerowprops",{text:"Row properties",icon:"table-row-properties",onAction:o("mceTableRowProps"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablecutrow",{text:"Cut row",icon:"cut-row",onAction:o("mceTableCutRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablecopyrow",{text:"Copy row",icon:"duplicate-row",onAction:o("mceTableCopyRow"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",onAction:o("mceTablePasteRowBefore"),onSetup:n.onSetupPasteable(r.getRows)}),t.ui.registry.addMenuItem("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",onAction:o("mceTablePasteRowAfter"),onSetup:n.onSetupPasteable(r.getRows)});var c={type:"nestedmenuitem",text:"Row",getSubmenuItems:v("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")};t.ui.registry.addMenuItem("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",onAction:o("mceTableInsertColBefore"),onSetup:n.onSetupColumn("onFirst")}),t.ui.registry.addMenuItem("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",onAction:o("mceTableInsertColAfter"),onSetup:n.onSetupColumn("onLast")}),t.ui.registry.addMenuItem("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",onAction:o("mceTableDeleteCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablecutcolumn",{text:"Cut column",icon:"cut-column",onAction:o("mceTableCutCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",onAction:o("mceTableCopyCol"),onSetup:n.onSetupColumn("onAny")}),t.ui.registry.addMenuItem("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",onAction:o("mceTablePasteColBefore"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onFirst")}),t.ui.registry.addMenuItem("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",onAction:o("mceTablePasteColAfter"),onSetup:n.onSetupPasteableColumn(r.getColumns,"onLast")});var s={type:"nestedmenuitem",text:"Column",getSubmenuItems:v("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")};t.ui.registry.addMenuItem("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",onAction:o("mceTableCellProps"),onSetup:n.onSetupCellOrRow}),t.ui.registry.addMenuItem("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",onAction:o("mceTableMergeCells"),onSetup:n.onSetupMergeable}),t.ui.registry.addMenuItem("tablesplitcells",{text:"Split cell",icon:"table-split-cells",onAction:o("mceTableSplitCells"),onSetup:n.onSetupUnmergeable});var l={type:"nestedmenuitem",text:"Cell",getSubmenuItems:v("tablecellprops tablemergecells tablesplitcells")};!1===Ef(t)?t.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:o("mceInsertTable")}):t.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"inserttable",onAction:i}]}}),t.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:o("mceInsertTable")}),t.ui.registry.addMenuItem("tableprops",u),t.ui.registry.addMenuItem("deletetable",a),t.ui.registry.addNestedMenuItem("row",c),t.ui.registry.addNestedMenuItem("column",s),t.ui.registry.addNestedMenuItem("cell",l),t.ui.registry.addContextMenu("table",{update:function(){return n.resetTargets(),n.targets().fold(v(""),(function(t){return"caption"===nn(t.element)?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"}))}});var f=kp(Mf(t));0!==f.length&&t.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:function(){return Cp(t,e,f,"tableclass",(function(e){return t.execCommand("mceTableToggleClass",!1,e)}))},onSetup:n.onSetupTable});var d=kp(Af(t));0!==d.length&&t.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:function(){return Cp(t,e,d,"tablecellclass",(function(e){return t.execCommand("mceTableCellToggleClass",!1,e)}))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:function(){return Cp(t,e,tp,"tablecellverticalalign",Sp(t,"vertical-align"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:function(){return Cp(t,e,vf(t),"tablecellborderwidth",Sp(t,"border-width"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:function(){return Cp(t,e,bf(t),"tablecellborderstyle",Sp(t,"border-style"))},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleMenuItem("tablecaption",{icon:"table-caption",text:"Table caption",onAction:o("mceTableToggleCaption"),onSetup:n.onSetupTableWithCaption}),t.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:function(){return Op(t,jf(t),"background-color")},onSetup:n.onSetupCellOrRow}),t.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:function(){return Op(t,Wf(t),"border-color")},onSetup:n.onSetupCellOrRow}),t.ui.registry.addToggleMenuItem("tablerowheader",{text:"Row header",icon:"table-top-header",onAction:Ep(t),onSetup:n.onSetupTableRowHeaders}),t.ui.registry.addToggleMenuItem("tablecolheader",{text:"Column header",icon:"table-left-header",onAction:_p(t),onSetup:n.onSetupTableColumnHeaders})},wx=function(t){var e=vi((function(){return qa(t)}),(function(){return Cc(ec(t),Ka(t))}),gc.selectedSelector),n=px(t,e),r=id(t),o=gx(t,r.lazyResize,n),i=Ch(t,o,r.lazyWire),u=wv();return bv(t,i,o,e,u),yv(t,i,e),_c(t,e,i),yx(t,e,n,u),vx(t,e,n,u),bx(t),t.on("PreInit",(function(){t.serializer.addTempAttr(gc.firstSelected),t.serializer.addTempAttr(gc.lastSelected),kv(t)})),Cf(t)&&t.on("keydown",(function(e){iy(e,t,o)})),t.on("remove",(function(){r.destroy()})),Uh(t,u,r,n)};function xx(){bi.add("table",wx)}xx()})()},a15b:function(t,e,n){"use strict";var r=n("23e7"),o=n("44ad"),i=n("fc6a"),u=n("a640"),a=[].join,c=o!=Object,s=u("join",",");r({target:"Array",proto:!0,forced:c||!s},{join:function(t){return a.call(i(this),void 0===t?",":t)}})},a434:function(t,e,n){"use strict";var r=n("23e7"),o=n("23cb"),i=n("a691"),u=n("50c4"),a=n("7b0b"),c=n("65f0"),s=n("8418"),l=n("1dde"),f=n("ae40"),d=l("splice"),m=f("splice",{ACCESSORS:!0,0:0,1:2}),g=Math.max,h=Math.min,p=9007199254740991,v="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!d||!m},{splice:function(t,e){var n,r,l,f,d,m,b=a(this),y=u(b.length),w=o(t,y),x=arguments.length;if(0===x?n=r=0:1===x?(n=0,r=y-w):(n=x-2,r=h(g(i(e),0),y-w)),y+n-r>p)throw TypeError(v);for(l=c(b,r),f=0;f<r;f++)d=w+f,d in b&&s(l,f,b[d]);if(l.length=r,n<r){for(f=w;f<y-r;f++)d=f+r,m=f+n,d in b?b[m]=b[d]:delete b[m];for(f=y;f>y-r+n;f--)delete b[f-1]}else if(n>r)for(f=y-r;f>w;f--)d=f+r-1,m=f+n-1,d in b?b[m]=b[d]:delete b[m];for(f=0;f<n;f++)b[f+w]=arguments[f+2];return b.length=y-r+n,l}})},b85c:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0");var r=n("06c5");function o(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Object(r["a"])(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,u=t},f:function(){try{a||null==n["return"]||n["return"]()}finally{if(c)throw u}}}}},c4a9:function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return o}));var r=function(){return"undefined"!==typeof window?window:t},o=function(){var t=r();return t&&t.tinymce?t.tinymce:null}}).call(this,n("c8ba"))},ca72:function(t,e,n){"use strict";var r=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],o=function(t){return-1!==r.map((function(t){return t.toLowerCase()})).indexOf(t.toLowerCase())},i=function(t,e,n){Object.keys(e).filter(o).forEach((function(r){var o=e[r];"function"===typeof o&&("onInit"===r?o(t,n):n.on(r.substring(2),(function(t){return o(t,n)})))}))},u=function(t,e){var n=t.$props.modelEvents?t.$props.modelEvents:null,r=Array.isArray(n)?n.join(" "):n;e.on(r||"change input undo redo",(function(){t.$emit("input",e.getContent({format:t.$props.outputFormat}))}))},a=function(t,e,n){var r=e.$props.value?e.$props.value:"",o=e.$props.initialValue?e.$props.initialValue:"";n.setContent(r||(e.initialized?e.cache:o)),e.$watch("value",(function(t,r){n&&"string"===typeof t&&t!==r&&t!==n.getContent({format:e.$props.outputFormat})&&n.setContent(t)})),e.$listeners.input&&u(e,n),i(t,e.$listeners,n),e.initialized=!0},c=0,s=function(t){var e=Date.now(),n=Math.floor(1e9*Math.random());return c++,t+"_"+n+c+String(e)},l=function(t){return null!==t&&"textarea"===t.tagName.toLowerCase()},f=function(t){return"undefined"===typeof t||""===t?[]:Array.isArray(t)?t:t.split(" ")},d=function(t,e){return f(t).concat(f(e))},m=function(t){return null===t||void 0===t},g=function(){return{listeners:[],scriptId:s("tiny-script"),scriptLoaded:!1}},h=function(){var t=g(),e=function(t,e,n,r){var o=e.createElement("script");o.referrerPolicy="origin",o.type="application/javascript",o.id=t,o.src=n;var i=function(){o.removeEventListener("load",i),r()};o.addEventListener("load",i),e.head&&e.head.appendChild(o)},n=function(n,r,o){t.scriptLoaded?o():(t.listeners.push(o),n.getElementById(t.scriptId)||e(t.scriptId,n,r,(function(){t.listeners.forEach((function(t){return t()})),t.scriptLoaded=!0})))},r=function(){t=g()};return{load:n,reinitialize:r}},p=h(),v=n("c4a9"),b={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],value:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(t){return"html"===t||"text"===t}}},y=function(){return y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},y.apply(this,arguments)},w=function(t,e,n){return t(n||"div",{attrs:{id:e}})},x=function(t,e){return t("textarea",{attrs:{id:e},style:{visibility:"hidden"}})},C=function(t){return function(){var e=y(y({},t.$props.init),{readonly:t.$props.disabled,selector:"#"+t.elementId,plugins:d(t.$props.init&&t.$props.init.plugins,t.$props.plugins),toolbar:t.$props.toolbar||t.$props.init&&t.$props.init.toolbar,inline:t.inlineEditor,setup:function(e){t.editor=e,e.on("init",(function(n){return a(n,t,e)})),t.$props.init&&"function"===typeof t.$props.init.setup&&t.$props.init.setup(e)}});l(t.element)&&(t.element.style.visibility="",t.element.style.display=""),Object(v["a"])().init(e)}},S={props:b,created:function(){this.elementId=this.$props.id||s("tiny-vue"),this.inlineEditor=this.$props.init&&this.$props.init.inline||this.$props.inline,this.initialized=!1},watch:{disabled:function(){this.editor.setMode(this.disabled?"readonly":"design")}},mounted:function(){if(this.element=this.$el,null!==Object(v["a"])())C(this)();else if(this.element&&this.element.ownerDocument){var t=this.$props.cloudChannel?this.$props.cloudChannel:"5",e=this.$props.apiKey?this.$props.apiKey:"no-api-key",n=m(this.$props.tinymceScriptSrc)?"https://cdn.tiny.cloud/1/"+e+"/tinymce/"+t+"/tinymce.min.js":this.$props.tinymceScriptSrc;p.load(this.element.ownerDocument,n,C(this))}},beforeDestroy:function(){null!==Object(v["a"])()&&Object(v["a"])().remove(this.editor)},deactivated:function(){var t;this.inlineEditor||(this.cache=this.editor.getContent(),null===(t=Object(v["a"])())||void 0===t||t.remove(this.editor))},activated:function(){!this.inlineEditor&&this.initialized&&C(this)()},render:function(t){return this.inlineEditor?w(t,this.elementId,this.$props.tagName):x(t,this.elementId)}};e["a"]=S},dbbc:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){t.addCommand("InsertHorizontalRule",(function(){t.execCommand("mceInsertContent",!1,"<hr />")}))},n=function(t){var e=function(){return t.execCommand("InsertHorizontalRule")};t.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:e}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:e})};function r(){t.add("hr",(function(t){e(t),n(t)}))}r()})()},e562:function(t,e,n){(function(e){(function(){"use strict";var n=function(t){if(null===t)return"null";if(void 0===t)return"undefined";var e=typeof t;return"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},r=function(t){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(t)},o=function(t,e){var n=Array.prototype.slice.call(t);return n.sort(e)},i=function(t,e){return u((function(n,r){return t.eq(e(n),e(r))}))},u=function(t){return{eq:t}},a=u((function(t,e){return t===e})),c=a,s=function(t){return u((function(e,n){if(e.length!==n.length)return!1;for(var r=e.length,o=0;o<r;o++)if(!t.eq(e[o],n[o]))return!1;return!0}))},l=function(t,e){return i(s(t),(function(t){return o(t,e)}))},f=function(t){return u((function(e,n){var r=Object.keys(e),o=Object.keys(n);if(!l(c).eq(r,o))return!1;for(var i=r.length,u=0;u<i;u++){var a=r[u];if(!t.eq(e[a],n[a]))return!1}return!0}))},d=u((function(t,e){if(t===e)return!0;var o=n(t),i=n(e);return o===i&&(r(o)?t===e:"array"===o?s(d).eq(t,e):"object"===o&&f(d).eq(t,e))})),m=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},g=function(t){return function(e){return m(e)===t}},h=function(t){return function(e){return typeof e===t}},p=function(t){return function(e){return t===e}},v=g("string"),b=g("object"),y=g("array"),w=p(null),x=h("boolean"),C=p(void 0),S=function(t){return null===t||void 0===t},k=function(t){return!S(t)},T=h("function"),O=h("number"),E=function(){},_=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},A=function(t,e){return function(n){return t(e(n))}},D=function(t){return function(){return t}},M=function(t){return t},R=function(t,e){return t===e};function N(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var z=function(t){return function(e){return!t(e)}},B=function(t){return function(){throw new Error(t)}},L=function(t){return t()},H=function(t){t()},I=D(!1),P=D(!0),F=function(){return V},V=function(){var t=function(t){return t()},e=M,n={fold:function(t,e){return t()},isSome:I,isNone:P,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:D(null),getOrUndefined:D(void 0),or:e,orThunk:t,map:F,each:E,bind:F,exists:I,forall:P,filter:function(){return F()},toArray:function(){return[]},toString:D("none()")};return n}(),U=function(t){var e=D(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:P,isNone:I,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return U(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:V},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},j=function(t){return null===t||void 0===t?V:U(t)},W={some:U,none:F,from:j},q=Array.prototype.slice,$=Array.prototype.indexOf,G=Array.prototype.push,K=function(t,e){return $.call(t,e)},X=function(t,e){var n=K(t,e);return-1===n?W.none():W.some(n)},Y=function(t,e){return K(t,e)>-1},J=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return!0}return!1},Q=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},Z=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},tt=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];e(r,n)}},et=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var u=t[o],a=e(u,o)?n:r;a.push(u)}return{pass:n,fail:r}},nt=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},rt=function(t,e,n){return tt(t,(function(t,r){n=e(n,t,r)})),n},ot=function(t,e,n){return Z(t,(function(t,r){n=e(n,t,r)})),n},it=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return W.some(i);if(n(i,r))break}return W.none()},ut=function(t,e){return it(t,e,I)},at=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n))return W.some(n)}return W.none()},ct=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!y(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);G.apply(e,t[n])}return e},st=function(t,e){return ct(Q(t,e))},lt=function(t,e){for(var n=0,r=t.length;n<r;++n){var o=t[n];if(!0!==e(o,n))return!1}return!0},ft=function(t){var e=q.call(t,0);return e.reverse(),e},dt=function(t,e){return nt(t,(function(t){return!Y(e,t)}))},mt=function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n},gt=function(t,e){var n=q.call(t,0);return n.sort(e),n},ht=function(t,e){return e>=0&&e<t.length?W.some(t[e]):W.none()},pt=function(t){return ht(t,0)},vt=function(t){return ht(t,t.length-1)},bt=T(Array.from)?Array.from:function(t){return q.call(t)},yt=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return W.none()},wt=Object.keys,xt=Object.hasOwnProperty,Ct=function(t,e){for(var n=wt(t),r=0,o=n.length;r<o;r++){var i=n[r],u=t[i];e(u,i)}},St=function(t,e){return kt(t,(function(t,n){return{k:n,v:e(t,n)}}))},kt=function(t,e){var n={};return Ct(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},Tt=function(t){return function(e,n){t[n]=e}},Ot=function(t,e,n,r){var o={};return Ct(t,(function(t,o){(e(t,o)?n:r)(t,o)})),o},Et=function(t,e){var n={},r={};return Ot(t,e,Tt(n),Tt(r)),{t:n,f:r}},_t=function(t,e){var n={};return Ot(t,e,Tt(n),E),n},At=function(t,e){var n=[];return Ct(t,(function(t,r){n.push(e(t,r))})),n},Dt=function(t){return At(t,M)},Mt=function(t,e){return Rt(t,e)?W.from(t[e]):W.none()},Rt=function(t,e){return xt.call(t,e)},Nt=function(t,e){return Rt(t,e)&&void 0!==t[e]&&null!==t[e]},zt=function(t,e,n){return void 0===n&&(n=d),f(n).eq(t,e)},Bt=Array.isArray,Lt=function(t){if(Bt(t))return t;for(var e=[],n=0,r=t.length;n<r;n++)e[n]=t[n];return e},Ht=function(t,e,n){var r,o;if(!t)return!1;if(n=n||t,void 0!==t.length){for(r=0,o=t.length;r<o;r++)if(!1===e.call(n,t[r],r,t))return!1}else for(r in t)if(Rt(t,r)&&!1===e.call(n,t[r],r,t))return!1;return!0},It=function(t,e){var n=[];return Ht(t,(function(r,o){n.push(e(r,o,t))})),n},Pt=function(t,e){var n=[];return Ht(t,(function(r,o){e&&!e(r,o,t)||n.push(r)})),n},Ft=function(t,e){if(t)for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},Vt=function(t,e,n,r){for(var o=C(n)?t[0]:n,i=0;i<t.length;i++)o=e.call(r,o,t[i],i);return o},Ut=function(t,e,n){var r,o;for(r=0,o=t.length;r<o;r++)if(e.call(n,t[r],r,t))return r;return-1},jt=function(t){return t[t.length-1]},Wt=function(){return Wt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Wt.apply(this,arguments)};function qt(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function $t(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var Gt=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},Kt=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,u=t.isiOS()||t.isAndroid(),a=u||r("(pointer:coarse)"),c=o||!i&&u&&r("(min-device-width:768px)"),s=i||u&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:D(o),isiPhone:D(i),isTablet:D(c),isPhone:D(s),isTouch:D(a),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:D(l),isDesktop:D(f)}},Xt=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}},Yt=function(t,e){var n=Xt(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return Zt(r(1),r(2))},Jt=function(t,e){var n=String(e).toLowerCase();return 0===t.length?Qt():Yt(t,n)},Qt=function(){return Zt(0,0)},Zt=function(t,e){return{major:t,minor:e}},te={nu:Zt,detect:Jt,unknown:Qt},ee=function(t,e){return yt(e.brands,(function(e){var n=e.brand.toLowerCase();return ut(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:te.nu(parseInt(e.version,10),0)}}))}))},ne=function(t,e){var n=String(e).toLowerCase();return ut(t,(function(t){return t.search(n)}))},re=function(t,e){return ne(t,e).map((function(t){var n=te.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},oe=function(t,e){return ne(t,e).map((function(t){var n=te.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},ie=function(t,e){return t.substring(e)},ue=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},ae=function(t,e){return se(t,e)?ie(t,e.length):t},ce=function(t,e){return-1!==t.indexOf(e)},se=function(t,e){return ue(t,e,0)},le=function(t){return function(e){return e.replace(t,"")}},fe=le(/^\s+|\s+$/g),de=le(/^\s+/g),me=le(/\s+$/g),ge=function(t){return t.length>0},he=function(t){return!ge(t)},pe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ve=function(t){return function(e){return ce(e,t)}},be=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return ce(t,"edge/")&&ce(t,"chrome")&&ce(t,"safari")&&ce(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,pe],search:function(t){return ce(t,"chrome")&&!ce(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return ce(t,"msie")||ce(t,"trident")}},{name:"Opera",versionRegexes:[pe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ve("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ve("firefox")},{name:"Safari",versionRegexes:[pe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(ce(t,"safari")||ce(t,"mobile/"))&&ce(t,"applewebkit")}}],ye=[{name:"Windows",search:ve("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return ce(t,"iphone")||ce(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ve("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ve("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ve("linux"),versionRegexes:[]},{name:"Solaris",search:ve("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ve("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ve("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],we={browsers:D(be),oses:D(ye)},xe="Edge",Ce="Chrome",Se="IE",ke="Opera",Te="Firefox",Oe="Safari",Ee=function(){return _e({current:void 0,version:te.unknown()})},_e=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(xe),isChrome:r(Ce),isIE:r(Se),isOpera:r(ke),isFirefox:r(Te),isSafari:r(Oe)}},Ae={unknown:Ee,nu:_e,edge:D(xe),chrome:D(Ce),ie:D(Se),opera:D(ke),firefox:D(Te),safari:D(Oe)},De="Windows",Me="iOS",Re="Android",Ne="Linux",ze="OSX",Be="Solaris",Le="FreeBSD",He="ChromeOS",Ie=function(){return Pe({current:void 0,version:te.unknown()})},Pe=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(De),isiOS:r(Me),isAndroid:r(Re),isOSX:r(ze),isLinux:r(Ne),isSolaris:r(Be),isFreeBSD:r(Le),isChromeOS:r(He)}},Fe={unknown:Ie,nu:Pe,windows:D(De),ios:D(Me),android:D(Re),linux:D(Ne),osx:D(ze),solaris:D(Be),freebsd:D(Le),chromeos:D(He)},Ve=function(t,e,n){var r=we.browsers(),o=we.oses(),i=e.bind((function(t){return ee(r,t)})).orThunk((function(){return re(r,t)})).fold(Ae.unknown,Ae.nu),u=oe(o,t).fold(Fe.unknown,Fe.nu),a=Kt(u,i,t,n);return{browser:i,os:u,deviceType:a}},Ue={detect:Ve},je=function(t){return window.matchMedia(t).matches},We=Gt((function(){return Ue.detect(navigator.userAgent,W.from(navigator.userAgentData),je)})),qe=function(){return We()},$e=navigator.userAgent,Ge=qe(),Ke=Ge.browser,Xe=Ge.os,Ye=Ge.deviceType,Je=/WebKit/.test($e)&&!Ke.isEdge(),Qe="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,Ze=-1!==$e.indexOf("Windows Phone"),tn={opera:Ke.isOpera(),webkit:Je,ie:!(!Ke.isIE()&&!Ke.isEdge())&&Ke.version.major,gecko:Ke.isFirefox(),mac:Xe.isOSX()||Xe.isiOS(),iOS:Ye.isiPad()||Ye.isiPhone(),android:Xe.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:Ke.isIE()?document.documentMode||7:10,fileApi:Qe,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Ke.isIE(),desktop:Ye.isDesktop(),windowsPhone:Ze,browser:{current:Ke.current,version:Ke.version,isChrome:Ke.isChrome,isEdge:Ke.isEdge,isFirefox:Ke.isFirefox,isIE:Ke.isIE,isOpera:Ke.isOpera,isSafari:Ke.isSafari},os:{current:Xe.current,version:Xe.version,isAndroid:Xe.isAndroid,isChromeOS:Xe.isChromeOS,isFreeBSD:Xe.isFreeBSD,isiOS:Xe.isiOS,isLinux:Xe.isLinux,isOSX:Xe.isOSX,isSolaris:Xe.isSolaris,isWindows:Xe.isWindows},deviceType:{isDesktop:Ye.isDesktop,isiPad:Ye.isiPad,isiPhone:Ye.isiPhone,isPhone:Ye.isPhone,isTablet:Ye.isTablet,isTouch:Ye.isTouch,isWebView:Ye.isWebView}},en=/^\s*|\s*$/g,nn=function(t){return null===t||void 0===t?"":(""+t).replace(en,"")},rn=function(t,e){return e?!("array"!==e||!Bt(t))||typeof t===e:void 0!==t},on=function(t,e,n){var r;t=t||[],e=e||",","string"===typeof t&&(t=t.split(e)),n=n||{},r=t.length;while(r--)n[t[r]]={};return n},un=Rt,an=function(t,e,n){var r,o,i,u=this,a=0;t=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(t);var c=t[3].match(/(^|\.)(\w+)$/i)[2],s=u.createNS(t[3].replace(/\.\w+$/,""),n);if(!s[c]){if("static"===t[2])return s[c]=e,void(this.onCreate&&this.onCreate(t[2],t[3],s[c]));e[c]||(e[c]=function(){},a=1),s[c]=e[c],u.extend(s[c].prototype,e),t[5]&&(r=u.resolve(t[5]).prototype,o=t[5].match(/\.(\w+)$/i)[1],i=s[c],s[c]=a?function(){return r[o].apply(this,arguments)}:function(){return this.parent=r[o],i.apply(this,arguments)},s[c].prototype[c]=s[c],u.each(r,(function(t,e){s[c].prototype[e]=r[e]})),u.each(e,(function(t,e){r[e]?s[c].prototype[e]=function(){return this.parent=r[e],t.apply(this,arguments)}:e!==c&&(s[c].prototype[e]=t)}))),u.each(e.static,(function(t,e){s[c][e]=t}))}},cn=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var o=e[r];for(var i in o)if(Rt(o,i)){var u=o[i];void 0!==u&&(t[i]=u)}}return t},sn=function(t,e,n,r){r=r||this,t&&(n&&(t=t[n]),Ht(t,(function(t,o){if(!1===e.call(r,t,o,n))return!1;sn(t,e,n,r)})))},ln=function(t,e){var n,r;for(e=e||window,t=t.split("."),n=0;n<t.length;n++)r=t[n],e[r]||(e[r]={}),e=e[r];return e},fn=function(t,e){var n,r;for(e=e||window,t=t.split("."),n=0,r=t.length;n<r;n++)if(e=e[t[n]],!e)break;return e},dn=function(t,e){return!t||rn(t,"array")?t:It(t.split(e||","),nn)},mn=function(t){var e=tn.cacheSuffix;return e&&(t+=(-1===t.indexOf("?")?"?":"&")+e),t},gn={trim:nn,isArray:Bt,is:rn,toArray:Lt,makeMap:on,each:Ht,map:It,grep:Pt,inArray:Ft,hasOwn:un,extend:cn,create:an,walk:sn,createNS:ln,resolve:fn,explode:dn,_addCacheSuffix:mn},hn=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return bn(r.childNodes[0])},pn=function(t,e){var n=e||document,r=n.createElement(t);return bn(r)},vn=function(t,e){var n=e||document,r=n.createTextNode(t);return bn(r)},bn=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},yn=function(t,e,n){return W.from(t.dom.elementFromPoint(e,n)).map(bn)},wn={fromHtml:hn,fromTag:pn,fromText:vn,fromDom:bn,fromPoint:yn},xn=function(t,e){var n=[],r=function(t){return n.push(t),e(t)},o=e(t);do{o=o.bind(r)}while(o.isSome());return n},Cn=function(t,e,n){return 0!==(t.compareDocumentPosition(e)&n)},Sn=function(t,e){return Cn(t,e,Node.DOCUMENT_POSITION_CONTAINED_BY)},kn=8,Tn=9,On=11,En=1,_n=3,An=function(t,e){var n=t.dom;if(n.nodeType!==En)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")},Dn=function(t){return t.nodeType!==En&&t.nodeType!==Tn&&t.nodeType!==On||0===t.childElementCount},Mn=function(t,e){var n=void 0===e?document:e.dom;return Dn(n)?[]:Q(n.querySelectorAll(t),wn.fromDom)},Rn=function(t,e){var n=void 0===e?document:e.dom;return Dn(n)?W.none():W.from(n.querySelector(t)).map(wn.fromDom)},Nn=function(t,e){return t.dom===e.dom},zn=function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)},Bn=function(t,e){return Sn(t.dom,e.dom)},Ln=function(t,e){return qe().browser.isIE()?Bn(t,e):zn(t,e)};"undefined"!==typeof window?window:Function("return this;")();var Hn=function(t){var e=t.dom.nodeName;return e.toLowerCase()},In=function(t){return t.dom.nodeType},Pn=function(t){return function(e){return In(e)===t}},Fn=function(t){return In(t)===kn||"#comment"===Hn(t)},Vn=Pn(En),Un=Pn(_n),jn=Pn(Tn),Wn=Pn(On),qn=function(t){return function(e){return Vn(e)&&Hn(e)===t}},$n=function(t){return wn.fromDom(t.dom.ownerDocument)},Gn=function(t){return jn(t)?t:$n(t)},Kn=function(t){return wn.fromDom(Gn(t).dom.documentElement)},Xn=function(t){return wn.fromDom(Gn(t).dom.defaultView)},Yn=function(t){return W.from(t.dom.parentNode).map(wn.fromDom)},Jn=function(t,e){var n=T(e)?e:I,r=t.dom,o=[];while(null!==r.parentNode&&void 0!==r.parentNode){var i=r.parentNode,u=wn.fromDom(i);if(o.push(u),!0===n(u))break;r=i}return o},Qn=function(t){var e=function(e){return nt(e,(function(e){return!Nn(t,e)}))};return Yn(t).map(rr).map(e).getOr([])},Zn=function(t){return W.from(t.dom.previousSibling).map(wn.fromDom)},tr=function(t){return W.from(t.dom.nextSibling).map(wn.fromDom)},er=function(t){return ft(xn(t,Zn))},nr=function(t){return xn(t,tr)},rr=function(t){return Q(t.dom.childNodes,wn.fromDom)},or=function(t,e){var n=t.dom.childNodes;return W.from(n[e]).map(wn.fromDom)},ir=function(t){return or(t,0)},ur=function(t){return or(t,t.dom.childNodes.length-1)},ar=function(t){return t.dom.childNodes.length},cr=function(t){var e=t.dom.head;if(null===e||void 0===e)throw new Error("Head is not available yet");return wn.fromDom(e)},sr=function(t){return Wn(t)&&k(t.dom.host)},lr=T(Element.prototype.attachShadow)&&T(Node.prototype.getRootNode),fr=D(lr),dr=lr?function(t){return wn.fromDom(t.dom.getRootNode())}:Gn,mr=function(t){return sr(t)?t:cr(Gn(t))},gr=function(t){var e=dr(t);return sr(e)?W.some(e):W.none()},hr=function(t){return wn.fromDom(t.dom.host)},pr=function(t){if(fr()&&k(t.target)){var e=wn.fromDom(t.target);if(Vn(e)&&vr(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return pt(n)}}return W.from(t.target)},vr=function(t){return k(t.dom.shadowRoot)},br=function(t,e){var n=Yn(t);n.each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},yr=function(t,e){var n=tr(t);n.fold((function(){var n=Yn(t);n.each((function(t){xr(t,e)}))}),(function(t){br(t,e)}))},wr=function(t,e){var n=ir(t);n.fold((function(){xr(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},xr=function(t,e){t.dom.appendChild(e.dom)},Cr=function(t,e){br(t,e),xr(e,t)},Sr=function(t,e){Z(e,(function(e){br(t,e)}))},kr=function(t,e){Z(e,(function(e){xr(t,e)}))},Tr=function(t){t.dom.textContent="",Z(rr(t),(function(t){Or(t)}))},Or=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Er=function(t){var e=rr(t);e.length>0&&Sr(t,e),Or(t)},_r=function(t){var e=Un(t)?t.dom.parentNode:t.dom;if(void 0===e||null===e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return gr(wn.fromDom(e)).fold((function(){return n.body.contains(e)}),A(_r,hr))},Ar=function(t,e){var n=function(n,r){return Ar(t+n,e+r)};return{left:t,top:e,translate:n}},Dr=Ar,Mr=function(t){var e=t.getBoundingClientRect();return Dr(e.left,e.top)},Rr=function(t,e){return void 0!==t?t:void 0!==e?e:0},Nr=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return Dr(n.offsetLeft,n.offsetTop);var i=Rr(null===r||void 0===r?void 0:r.pageYOffset,o.scrollTop),u=Rr(null===r||void 0===r?void 0:r.pageXOffset,o.scrollLeft),a=Rr(o.clientTop,n.clientTop),c=Rr(o.clientLeft,n.clientLeft);return zr(t).translate(u-c,i-a)},zr=function(t){var e=t.dom,n=e.ownerDocument,r=n.body;return r===e?Dr(r.offsetLeft,r.offsetTop):_r(t)?Mr(e):Dr(0,0)},Br=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 Dr(n,r)},Lr=function(t,e,n){var r=void 0!==n?n.dom:document,o=r.defaultView;o&&o.scrollTo(t,e)},Hr=function(t,e){var n=qe().browser.isSafari();n&&T(t.dom.scrollIntoViewIfNeeded)?t.dom.scrollIntoViewIfNeeded(!1):t.dom.scrollIntoView(e)},Ir=function(t){var e=void 0===t?window:t;return qe().browser.isFirefox()?W.none():W.from(e["visualViewport"])},Pr=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Fr=function(t){var e=void 0===t?window:t,n=e.document,r=Br(wn.fromDom(n));return Ir(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return Pr(r.left,r.top,n,o)}),(function(t){return Pr(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},Vr=function(t){return function(e){return!!e&&e.nodeType===t}},Ur=function(t){return!!t&&!Object.getPrototypeOf(t)},jr=Vr(1),Wr=function(t){var e=t.map((function(t){return t.toLowerCase()}));return function(t){if(t&&t.nodeName){var n=t.nodeName.toLowerCase();return Y(e,n)}return!1}},qr=function(t,e){var n=e.toLowerCase().split(" ");return function(e){if(jr(e))for(var r=0;r<n.length;r++){var o=e.ownerDocument.defaultView.getComputedStyle(e,null),i=o?o.getPropertyValue(t):null;if(i===n[r])return!0}return!1}},$r=function(t){return function(e){return jr(e)&&e.hasAttribute(t)}},Gr=function(t,e){return function(n){return jr(n)&&n.getAttribute(t)===e}},Kr=function(t){return jr(t)&&t.hasAttribute("data-mce-bogus")},Xr=function(t){return jr(t)&&"all"===t.getAttribute("data-mce-bogus")},Yr=function(t){return jr(t)&&"TABLE"===t.tagName},Jr=function(t){return function(e){if(jr(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},Qr=Wr(["textarea","input"]),Zr=Vr(3),to=Vr(8),eo=Vr(9),no=Vr(11),ro=Wr(["br"]),oo=Wr(["img"]),io=Jr("true"),uo=Jr("false"),ao=Wr(["td","th"]),co=Wr(["video","audio","object","embed"]),so=function(t,e,n){return void 0===n&&(n=R),t.exists((function(t){return n(t,e)}))},lo=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},fo=function(t,e,n){return t.isSome()&&e.isSome()?W.some(n(t.getOrDie(),e.getOrDie())):W.none()},mo=function(t,e,n,r){return t.isSome()&&e.isSome()&&n.isSome()?W.some(r(t.getOrDie(),e.getOrDie(),n.getOrDie())):W.none()},go=function(t,e){return t?W.some(e):W.none()},ho=function(t){return void 0!==t.style&&T(t.style.getPropertyValue)},po=function(t,e,n){if(!(v(n)||x(n)||O(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},vo=function(t,e,n){po(t.dom,e,n)},bo=function(t,e){var n=t.dom;Ct(e,(function(t,e){po(n,e,t)}))},yo=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},wo=function(t,e){return W.from(yo(t,e))},xo=function(t,e){var n=t.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(e)},Co=function(t,e){t.dom.removeAttribute(e)},So=function(t){return ot(t.dom.attributes,(function(t,e){return t[e.name]=e.value,t}),{})},ko=function(t,e,n){if(!v(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);ho(t)&&t.style.setProperty(e,n)},To=function(t,e){var n=t.dom;Ct(e,(function(t,e){ko(n,e,t)}))},Oo=function(t,e){var n=t.dom,r=window.getComputedStyle(n),o=r.getPropertyValue(e);return""!==o||_r(t)?o:Eo(n,e)},Eo=function(t,e){return ho(t)?t.style.getPropertyValue(e):""},_o=function(t,e){var n=t.dom,r=Eo(n,e);return W.from(r).filter((function(t){return t.length>0}))},Ao=function(t){var e={},n=t.dom;if(ho(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);e[o]=n.style[o]}return e},Do=function(t){return t.dom.offsetWidth},Mo=qe().browser,Ro=function(t){return ut(t,Vn)},No=function(t){return Mo.isFirefox()&&"table"===Hn(t)?Ro(rr(t)).filter((function(t){return"caption"===Hn(t)})).bind((function(t){return Ro(nr(t)).map((function(e){var n=e.dom.offsetTop,r=t.dom.offsetTop,o=t.dom.offsetHeight;return n<=r?-o:0}))})).getOr(0):0},zo=function(t,e){return t.children&&Y(t.children,e)},Bo=function(t,e,n){var r=0,o=0,i=t.ownerDocument;if(n=n||t,e){if(n===t&&e.getBoundingClientRect&&"static"===Oo(wn.fromDom(t),"position")){var u=e.getBoundingClientRect();return r=u.left+(i.documentElement.scrollLeft||t.scrollLeft)-i.documentElement.clientLeft,o=u.top+(i.documentElement.scrollTop||t.scrollTop)-i.documentElement.clientTop,{x:r,y:o}}var a=e;while(a&&a!==n&&a.nodeType&&!zo(a,n)){var c=a;r+=c.offsetLeft||0,o+=c.offsetTop||0,a=c.offsetParent}a=e.parentNode;while(a&&a!==n&&a.nodeType&&!zo(a,n))r-=a.scrollLeft||0,o-=a.scrollTop||0,a=a.parentNode;o+=No(wn.fromDom(e))}return{x:r,y:o}},Lo={},Ho={exports:Lo};(function(t,n,r,o){(function(e,o){"object"===typeof n&&"undefined"!==typeof r?r.exports=o():"function"===typeof t&&t.amd?t(o):(e="undefined"!==typeof globalThis?globalThis:e||self,e.EphoxContactWrapper=o())})(this,(function(){var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},n={exports:{}};(function(e){(function(t){var n=setTimeout;function r(){}function o(t,e){return function(){t.apply(e,arguments)}}function i(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=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(t,this)}function u(t,e){while(3===t._state)t=t._value;0!==t._state?(t._handled=!0,i._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(o){return void c(e.promise,o)}a(e.promise,r)}else(1===t._state?a:c)(e.promise,t._value)}))):t._deferreds.push(e)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===typeof e||"function"===typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"===typeof n)return void f(o(n,e),t)}t._state=1,t._value=e,s(t)}catch(r){c(t,r)}}function c(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&i._immediateFn((function(){t._handled||i._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)u(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"===typeof t?t:null,this.onRejected="function"===typeof e?e:null,this.promise=n}function f(t,e){var n=!1;try{t((function(t){n||(n=!0,a(e,t))}),(function(t){n||(n=!0,c(e,t))}))}catch(r){if(n)return;n=!0,c(e,r)}}i.prototype["catch"]=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(r);return u(this,new l(t,e,n)),n},i.all=function(t){var e=Array.prototype.slice.call(t);return new i((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,u){try{if(u&&("object"===typeof u||"function"===typeof u)){var a=u.then;if("function"===typeof a)return void a.call(u,(function(t){o(i,t)}),n)}e[i]=u,0===--r&&t(e)}catch(c){n(c)}}for(var i=0;i<e.length;i++)o(i,e[i])}))},i.resolve=function(t){return t&&"object"===typeof t&&t.constructor===i?t:new i((function(e){e(t)}))},i.reject=function(t){return new i((function(e,n){n(t)}))},i.race=function(t){return new i((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},i._immediateFn="function"===typeof setImmediate?function(t){setImmediate(t)}:function(t){n(t,0)},i._unhandledRejectionFn=function(t){"undefined"!==typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},i._setImmediateFn=function(t){i._immediateFn=t},i._setUnhandledRejectionFn=function(t){i._unhandledRejectionFn=t},e.exports?e.exports=i:t.Promise||(t.Promise=i)})(t)})(n);var r=n.exports,o=function(){return"undefined"!==typeof window?window:Function("return this;")()}(),i={boltExport:o.Promise||r};return i}))})(void 0,Lo,Ho);var Io=Ho.exports.boltExport,Po=function(t){var e=W.none(),n=[],r=function(t){return Po((function(e){o((function(n){e(t(n))}))}))},o=function(t){u()?c(t):n.push(t)},i=function(t){u()||(e=W.some(t),a(n),n=[])},u=function(){return e.isSome()},a=function(t){Z(t,c)},c=function(t){e.each((function(e){setTimeout((function(){t(e)}),0)}))};return t(i),{get:o,map:r,isReady:u}},Fo=function(t){return Po((function(e){e(t)}))},Vo={nu:Po,pure:Fo},Uo=function(t){setTimeout((function(){throw t}),0)},jo=function(t){var e=function(e){t().then(e,Uo)},n=function(e){return jo((function(){return t().then(e)}))},r=function(e){return jo((function(){return t().then((function(t){return e(t).toPromise()}))}))},o=function(e){return jo((function(){return t().then((function(){return e.toPromise()}))}))},i=function(){return Vo.nu(e)},u=function(){var e=null;return jo((function(){return null===e&&(e=t()),e}))},a=t;return{map:n,bind:r,anonBind:o,toLazy:i,toCached:u,toPromise:a,get:e}},Wo=function(t){return jo((function(){return new Io(t)}))},qo=function(t){return jo((function(){return Io.resolve(t)}))},$o={nu:Wo,pure:qo},Go=function(t,e){return e((function(e){var n=[],r=0,o=function(o){return function(i){n[o]=i,r++,r>=t.length&&e(n)}};0===t.length?e([]):Z(t,(function(t,e){t.get(o(e))}))}))},Ko=function(t){return Go(t,$o.nu)},Xo=function(t){var e=function(e){return Xo(t)},n=function(e){return Xo(t)},r=function(e){return Xo(e(t))},o=function(e){return Xo(t)},i=function(e){e(t)},u=function(e){return e(t)},a=function(e,n){return n(t)},c=function(e){return e(t)},s=function(e){return e(t)},l=function(){return W.some(t)};return{isValue:P,isError:I,getOr:D(t),getOrThunk:D(t),getOrDie:D(t),or:e,orThunk:n,fold:a,map:r,mapError:o,each:i,bind:u,exists:c,forall:s,toOptional:l}},Yo=function(t){var e=function(t){return t()},n=function(){return B(String(t))()},r=M,o=function(t){return t()},i=function(e){return Yo(t)},u=function(e){return Yo(e(t))},a=function(e){return Yo(t)},c=function(e,n){return e(t)};return{isValue:I,isError:P,getOr:M,getOrThunk:e,getOrDie:n,or:r,orThunk:o,fold:c,map:i,mapError:u,each:E,bind:a,exists:I,forall:P,toOptional:W.none}},Jo=function(t,e){return t.fold((function(){return Yo(e)}),Xo)},Qo={value:Xo,error:Yo,fromOption:Jo},Zo=function(t){if(!y(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 Z(t,(function(r,o){var i=wt(r);if(1!==i.length)throw new Error("one and only one name per case");var u=i[0],a=r[u];if(void 0!==n[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!y(a))throw new Error("case arguments must be an array");e.push(u),n[u]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==a.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+a.length+" ("+a+"), got "+i);var c=function(t){var r=wt(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));var o=lt(e,(function(t){return Y(r,t)}));if(!o)throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[u].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:c,log:function(t){console.log(t,{constructors:e,constructor:u,params:n})}}}})),n},ti={generate:Zo};ti.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var ei=function(t){return t.fold(M,M)};function ni(t,e,n,r,o){return t(n,r)?W.some(n):T(o)&&o(n)?W.none():e(n,r,o)}var ri,oi,ii,ui,ai,ci,si,li,fi,di,mi,gi,hi,pi,vi,bi,yi,wi,xi,Ci=function(t,e,n){var r=t.dom,o=T(n)?n:I;while(r.parentNode){r=r.parentNode;var i=wn.fromDom(r);if(e(i))return W.some(i);if(o(i))break}return W.none()},Si=function(t,e,n){var r=function(t,e){return e(t)};return ni(r,Ci,t,e,n)},ki=function(t,e){var n=t.dom;return n.parentNode?Ti(wn.fromDom(n.parentNode),(function(n){return!Nn(t,n)&&e(n)})):W.none()},Ti=function(t,e){var n=function(t){return e(wn.fromDom(t))},r=ut(t.dom.childNodes,n);return r.map(wn.fromDom)},Oi=function(t,e,n){return Ci(t,(function(t){return An(t,e)}),n)},Ei=function(t,e){return Rn(e,t)},_i=function(t,e,n){var r=function(t,e){return An(t,e)};return ni(r,Oi,t,e,n)},Ai=window.Promise?window.Promise:Io,Di=function(t,e){for(var n=window.requestAnimationFrame,r=["ms","moz","webkit"],o=function(t){window.setTimeout(t,0)},i=0;i<r.length&&!n;i++)n=window[r[i]+"RequestAnimationFrame"];n||(n=o),n(t,e)},Mi=function(t,e){return"number"!==typeof e&&(e=0),setTimeout(t,e)},Ri=function(t,e){return"number"!==typeof e&&(e=1),setInterval(t,e)},Ni=function(t){return clearTimeout(t)},zi=function(t){return clearInterval(t)},Bi=function(t,e){var n,r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];clearTimeout(n),n=Mi((function(){t.apply(this,r)}),e)};return r.stop=function(){clearTimeout(n)},r},Li={requestAnimationFrame:function(t,e){ri?ri.then(t):ri=new Ai((function(t){e||(e=document.body),Di(t,e)})).then(t)},setTimeout:Mi,setInterval:Ri,setEditorTimeout:function(t,e,n){return Mi((function(){t.removed||e()}),n)},setEditorInterval:function(t,e,n){var r=Ri((function(){t.removed?clearInterval(r):e()}),n);return r},debounce:Bi,throttle:Bi,clearInterval:zi,clearTimeout:Ni},Hi=function(t,e){void 0===e&&(e={});var n=0,r={},o=wn.fromDom(t),i=Gn(o),u=e.maxLoadTime||5e3,a=function(t){e.referrerPolicy=t},c=function(t){xr(mr(o),t)},s=function(t){var e=mr(o);Ei(e,"#"+t).each(Or)},l=function(t){return Mt(r,t).getOrThunk((function(){return{id:"mce-u"+n++,passed:[],failed:[],count:0}}))},f=function(n,o,a){var s,f=gn._addCacheSuffix(n),d=l(f);r[f]=d,d.count++;var m=function(t,e){var n=t.length;while(n--)t[n]();d.status=e,d.passed=[],d.failed=[],s&&(s.onload=null,s.onerror=null,s=null)},g=function(){return m(d.passed,2)},h=function(){return m(d.failed,3)},p=function(t,e){t()||(Date.now()-y<u?Li.setTimeout(e):h())},v=function(){p((function(){var e=t.styleSheets,n=e.length;while(n--){var r=e[n],o=r.ownerNode;if(o&&o.id===s.id)return g(),!0}return!1}),v)};if(o&&d.passed.push(o),a&&d.failed.push(a),1!==d.status)if(2!==d.status)if(3!==d.status){d.status=1;var b=wn.fromTag("link",i.dom);bo(b,{rel:"stylesheet",type:"text/css",id:d.id});var y=Date.now();e.contentCssCors&&vo(b,"crossOrigin","anonymous"),e.referrerPolicy&&vo(b,"referrerpolicy",e.referrerPolicy),s=b.dom,s.onload=v,s.onerror=h,c(b),vo(b,"href",f)}else h();else g()},d=function(t){return $o.nu((function(e){f(t,_(e,D(Qo.value(t))),_(e,D(Qo.error(t))))}))},m=function(t,e,n){Ko(Q(t,d)).get((function(t){var r=et(t,(function(t){return t.isValue()}));r.fail.length>0?n(r.fail.map(ei)):e(r.pass.map(ei))}))},g=function(t){var e=gn._addCacheSuffix(t);Mt(r,e).each((function(t){var n=--t.count;0===n&&(delete r[e],s(t.id))}))},h=function(t){Z(t,(function(t){g(t)}))};return{load:f,loadAll:m,unload:g,unloadAll:h,_setReferrerPolicy:a}},Ii=function(){var t=new WeakMap,e=function(e,n){var r=dr(e),o=r.dom;return W.from(t.get(o)).getOrThunk((function(){var e=Hi(o,n);return t.set(o,e),e}))};return{forElement:e}},Pi=Ii(),Fi=function(){function t(t,e){this.node=t,this.rootNode=e,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}return t.prototype.current=function(){return this.node},t.prototype.next=function(t){return this.node=this.findSibling(this.node,"firstChild","nextSibling",t),this.node},t.prototype.prev=function(t){return this.node=this.findSibling(this.node,"lastChild","previousSibling",t),this.node},t.prototype.prev2=function(t){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",t),this.node},t.prototype.findSibling=function(t,e,n,r){var o,i;if(t){if(!r&&t[e])return t[e];if(t!==this.rootNode){if(o=t[n],o)return o;for(i=t.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n],o)return o}}},t.prototype.findPreviousNode=function(t,e,n,r){var o,i,u;if(t){if(o=t[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(u=o[e];u;u=u[e])if(!u[e])return u;return o}if(i=t.parentNode,i&&i!==this.rootNode)return i}},t}(),Vi=["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"],Ui=["td","th"],ji=["thead","tbody","tfoot"],Wi=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],qi=["h1","h2","h3","h4","h5","h6"],$i=["li","dd","dt"],Gi=["ul","ol","dl"],Ki=["pre","script","textarea","style"],Xi=function(t){var e;return function(n){return e=e||mt(t,P),Rt(e,Hn(n))}},Yi=Xi(qi),Ji=Xi(Vi),Qi=function(t){return"table"===Hn(t)},Zi=function(t){return Vn(t)&&!Ji(t)},tu=function(t){return Vn(t)&&"br"===Hn(t)},eu=Xi(Wi),nu=Xi(Gi),ru=Xi($i),ou=Xi(ji),iu=Xi(Ui),uu=Xi(Ki),au=function(t,e,n){return Oi(t,e,n).isSome()},cu="\ufeff",su=" ",lu=function(t){return t===cu},fu=function(t){return t.replace(/\uFEFF/g,"")},du=cu,mu=lu,gu=fu,hu=jr,pu=Zr,vu=function(t){return pu(t)&&(t=t.parentNode),hu(t)&&t.hasAttribute("data-mce-caret")},bu=function(t){return pu(t)&&mu(t.data)},yu=function(t){return vu(t)||bu(t)},wu=function(t){return t.firstChild!==t.lastChild||!ro(t.firstChild)},xu=function(t,e){var n=t.ownerDocument,r=n.createTextNode(du),o=t.parentNode;if(e){i=t.previousSibling;if(pu(i)){if(yu(i))return i;if(Eu(i))return i.splitText(i.data.length-1)}o.insertBefore(r,t)}else{var i=t.nextSibling;if(pu(i)){if(yu(i))return i;if(Ou(i))return i.splitText(1),i}t.nextSibling?o.insertBefore(r,t.nextSibling):o.appendChild(r)}return r},Cu=function(t){var e=t.container();return!!Zr(e)&&(e.data.charAt(t.offset())===du||t.isAtStart()&&bu(e.previousSibling))},Su=function(t){var e=t.container();return!!Zr(e)&&(e.data.charAt(t.offset()-1)===du||t.isAtEnd()&&bu(e.nextSibling))},ku=function(){var t=document.createElement("br");return t.setAttribute("data-mce-bogus","1"),t},Tu=function(t,e,n){var r=e.ownerDocument,o=r.createElement(t);o.setAttribute("data-mce-caret",n?"before":"after"),o.setAttribute("data-mce-bogus","all"),o.appendChild(ku());var i=e.parentNode;return n?i.insertBefore(o,e):e.nextSibling?i.insertBefore(o,e.nextSibling):i.appendChild(o),o},Ou=function(t){return pu(t)&&t.data[0]===du},Eu=function(t){return pu(t)&&t.data[t.data.length-1]===du},_u=function(t){var e=t.getElementsByTagName("br"),n=e[e.length-1];Kr(n)&&n.parentNode.removeChild(n)},Au=function(t){return t&&t.hasAttribute("data-mce-caret")?(_u(t),t.removeAttribute("data-mce-caret"),t.removeAttribute("data-mce-bogus"),t.removeAttribute("style"),t.removeAttribute("_moz_abspos"),t):null},Du=function(t){return vu(t.startContainer)},Mu=io,Ru=uo,Nu=ro,zu=Zr,Bu=Wr(["script","style","textarea"]),Lu=Wr(["img","input","textarea","hr","iframe","video","audio","object","embed"]),Hu=Wr(["table"]),Iu=yu,Pu=function(t){return!Iu(t)&&(zu(t)?!Bu(t.parentNode):Lu(t)||Nu(t)||Hu(t)||Vu(t))},Fu=function(t){return jr(t)&&"true"===t.getAttribute("unselectable")},Vu=function(t){return!1===Fu(t)&&Ru(t)},Uu=function(t,e){for(t=t.parentNode;t&&t!==e;t=t.parentNode){if(Vu(t))return!1;if(Mu(t))return!0}return!0},ju=function(t){return!!Vu(t)&&!0!==ot(bt(t.getElementsByTagName("*")),(function(t,e){return t||Mu(e)}),!1)},Wu=function(t){return Lu(t)||ju(t)},qu=function(t,e){return Pu(t)&&Uu(t,e)},$u=/^[ \t\r\n]*$/,Gu=function(t){return $u.test(t)},Ku=function(t,e){var n=wn.fromDom(e),r=wn.fromDom(t);return au(r,"pre,code",N(Nn,n))},Xu=function(t,e){return Zr(t)&&Gu(t.data)&&!1===Ku(t,e)},Yu=function(t){return jr(t)&&"A"===t.nodeName&&!t.hasAttribute("href")&&(t.hasAttribute("name")||t.hasAttribute("id"))},Ju=function(t,e){return Pu(t)&&!1===Xu(t,e)||Yu(t)||Qu(t)},Qu=$r("data-mce-bookmark"),Zu=$r("data-mce-bogus"),ta=Gr("data-mce-bogus","all"),ea=function(t,e){var n=0;if(Ju(t,t))return!1;var r=t.firstChild;if(!r)return!0;var o=new Fi(r,t);do{if(e){if(ta(r)){r=o.next(!0);continue}if(Zu(r)){r=o.next();continue}}if(ro(r))n++,r=o.next();else{if(Ju(r,t))return!1;r=o.next()}}while(r);return n<=1},na=function(t,e){return void 0===e&&(e=!0),ea(t.dom,e)},ra=function(t){return"span"===t.nodeName.toLowerCase()},oa=function(t,e){return k(t)&&(Ju(t,e)||Zi(wn.fromDom(t)))},ia=function(t,e){var n=new Fi(t,e).prev(!1),r=new Fi(t,e).next(!1),o=C(n)||oa(n,e),i=C(r)||oa(r,e);return o&&i},ua=function(t){return ra(t)&&"bookmark"===t.getAttribute("data-mce-type")},aa=function(t,e){return Zr(t)&&t.data.length>0&&ia(t,e)},ca=function(t){return!!jr(t)&&t.childNodes.length>0},sa=function(t){return no(t)||eo(t)},la=function(t,e,n){var r=n||e;if(jr(e)&&ua(e))return e;for(var o=e.childNodes,i=o.length-1;i>=0;i--)la(t,o[i],r);if(jr(e)){var u=e.childNodes;1===u.length&&ua(u[0])&&e.parentNode.insertBefore(u[0],e)}return sa(e)||Ju(e,r)||ca(e)||aa(e,r)||t.remove(e),e},fa=gn.makeMap,da=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ma=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ga=/[<>&\"\']/g,ha=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,pa={128:"€",130:"",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"",140:"Œ",142:"Ž",145:"",146:"",147:"“",148:"”",149:"•",150:"",151:"—",152:"˜",153:"™",154:"š",155:"",156:"œ",158:"ž",159:"Ÿ"},va={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},ba={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},ya=function(t){var e=wn.fromTag("div").dom;return e.innerHTML=t,e.textContent||e.innerText||t},wa=function(t,e){var n,r,o,i={};if(t){for(t=t.split(","),e=e||10,n=0;n<t.length;n+=2)r=String.fromCharCode(parseInt(t[n],e)),va[r]||(o="&"+t[n+1]+";",i[r]=o,i[o]=r);return i}},xa=wa("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),Ca=function(t,e){return t.replace(e?da:ma,(function(t){return va[t]||t}))},Sa=function(t){return(""+t).replace(ga,(function(t){return va[t]||t}))},ka=function(t,e){return t.replace(e?da:ma,(function(t){return t.length>1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":va[t]||"&#"+t.charCodeAt(0)+";"}))},Ta=function(t,e,n){return n=n||xa,t.replace(e?da:ma,(function(t){return va[t]||n[t]||t}))},Oa=function(t,e){var n=wa(e)||xa,r=function(t,e){return t.replace(e?da:ma,(function(t){return void 0!==va[t]?va[t]:void 0!==n[t]?n[t]:t.length>1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":"&#"+t.charCodeAt(0)+";"}))},o=function(t,e){return Ta(t,e,n)},i=fa(t.replace(/\+/g,","));return i.named&&i.numeric?r:i.named?e?o:Ta:i.numeric?ka:Ca},Ea=function(t){return t.replace(ha,(function(t,e){return e?(e="x"===e.charAt(0).toLowerCase()?parseInt(e.substr(1),16):parseInt(e,10),e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):pa[e]||String.fromCharCode(e)):ba[t]||xa[t]||ya(t)}))},_a={encodeRaw:Ca,encodeAllRaw:Sa,encodeNumeric:ka,encodeNamed:Ta,getEncodeFunc:Oa,decode:Ea},Aa={},Da={},Ma=gn.makeMap,Ra=gn.each,Na=gn.extend,za=gn.explode,Ba=gn.inArray,La=function(t,e){return t=gn.trim(t),t?t.split(e||" "):[]},Ha=function(t,e){var n=Ma(t," ",Ma(t.toUpperCase()," "));return Na(n,e)},Ia=function(t){return Ha("td th li dt dd figcaption caption details summary",t.getTextBlockElements())},Pa=function(t){var e,n,r,o,i,u,a={},c=function(t,n,r){var o,i,u,c=function(t,e){var n,r,o={};for(n=0,r=t.length;n<r;n++)o[t[n]]=e||{};return o};r=r||[],n=n||"","string"===typeof r&&(r=La(r));var s=La(t);o=s.length;while(o--)i=La([e,n].join(" ")),u={attributes:c(i),attributesOrder:i,children:c(r,Da)},a[s[o]]=u},s=function(t,e){var n,r,o,i,u=La(t);n=u.length;var c=La(e);while(n--)for(r=a[u[n]],o=0,i=c.length;o<i;o++)r.attributes[c[o]]={},r.attributesOrder.push(c[o])};return Aa[t]?Aa[t]:(e="id accesskey class dir lang style tabindex title role",n="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",r="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==t&&(e+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",n+=" article aside details dialog figure main header footer hgroup section nav",r+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==t&&(e+=" xml:lang",u="acronym applet basefont big font strike tt",r=[r,u].join(" "),Ra(La(u),(function(t){c(t,"",r)})),i="center dir isindex noframes",n=[n,i].join(" "),o=[n,r].join(" "),Ra(La(i),(function(t){c(t,"",o)}))),o=o||[n,r].join(" "),c("html","manifest","head body"),c("head","","base command link meta noscript script style title"),c("title hr noscript br"),c("base","href target"),c("link","href rel media hreflang type sizes hreflang"),c("meta","name http-equiv content charset"),c("style","media type scoped"),c("script","src async defer type charset"),c("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",o),c("address dt dd div caption","",o),c("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",r),c("blockquote","cite",o),c("ol","reversed start type","li"),c("ul","","li"),c("li","value",o),c("dl","","dt dd"),c("a","href target rel media hreflang type",r),c("q","cite",r),c("ins del","cite datetime",o),c("img","src sizes srcset alt usemap ismap width height"),c("iframe","src name width height",o),c("embed","src type width height"),c("object","data type typemustmatch name usemap form width height",[o,"param"].join(" ")),c("param","name value"),c("map","name",[o,"area"].join(" ")),c("area","alt coords shape href target rel media hreflang type"),c("table","border","caption colgroup thead tfoot tbody tr"+("html4"===t?" col":"")),c("colgroup","span","col"),c("col","span"),c("tbody thead tfoot","","tr"),c("tr","","td th"),c("td","colspan rowspan headers",o),c("th","colspan rowspan headers scope abbr",o),c("form","accept-charset action autocomplete enctype method name novalidate target",o),c("fieldset","disabled form name",[o,"legend"].join(" ")),c("label","form for",r),c("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),c("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===t?o:r),c("select","disabled form multiple name required size","option optgroup"),c("optgroup","disabled label","option"),c("option","disabled label selected value"),c("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),c("menu","type label",[o,"li"].join(" ")),c("noscript","",o),"html4"!==t&&(c("wbr"),c("ruby","",[r,"rt rp"].join(" ")),c("figcaption","",o),c("mark rt rp summary bdi","",r),c("canvas","width height",o),c("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[o,"track source"].join(" ")),c("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[o,"track source"].join(" ")),c("picture","","img source"),c("source","src srcset type media sizes"),c("track","kind src srclang label default"),c("datalist","",[r,"option"].join(" ")),c("article section nav aside main header footer","",o),c("hgroup","","h1 h2 h3 h4 h5 h6"),c("figure","",[o,"figcaption"].join(" ")),c("time","datetime",r),c("dialog","open",o),c("command","type label icon disabled checked radiogroup command"),c("output","for form name",r),c("progress","value max",r),c("meter","value min max low high optimum",r),c("details","open",[o,"summary"].join(" ")),c("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==t&&(s("script","language xml:space"),s("style","xml:space"),s("object","declare classid code codebase codetype archive standby align border hspace vspace"),s("embed","align name hspace vspace"),s("param","valuetype type"),s("a","charset name rev shape coords"),s("br","clear"),s("applet","codebase archive code object alt name width height align hspace vspace"),s("img","name longdesc align border hspace vspace"),s("iframe","longdesc frameborder marginwidth marginheight scrolling align"),s("font basefont","size color face"),s("input","usemap align"),s("select"),s("textarea"),s("h1 h2 h3 h4 h5 h6 div p legend caption","align"),s("ul","type compact"),s("li","type"),s("ol dl menu dir","compact"),s("pre","width xml:space"),s("hr","align noshade size width"),s("isindex","prompt"),s("table","summary width frame rules cellspacing cellpadding align bgcolor"),s("col","width align char charoff valign"),s("colgroup","width align char charoff valign"),s("thead","align char charoff valign"),s("tr","align char charoff valign bgcolor"),s("th","axis align char charoff valign nowrap bgcolor width height"),s("form","accept"),s("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),s("tfoot","align char charoff valign"),s("tbody","align char charoff valign"),s("area","nohref"),s("body","background bgcolor text link vlink alink")),"html4"!==t&&(s("input button select textarea","autofocus"),s("input textarea","placeholder"),s("a","download"),s("link script img","crossorigin"),s("img","loading"),s("iframe","sandbox seamless allowfullscreen loading")),Ra(La("a form meter progress dfn"),(function(t){a[t]&&delete a[t].children[t]})),delete a.caption.children.table,delete a.script,Aa[t]=a,a)},Fa=function(t,e){var n;return t&&(n={},"string"===typeof t&&(t={"*":t}),Ra(t,(function(t,r){n[r]=n[r.toUpperCase()]="map"===e?Ma(t,/[, ]/):za(t,/[, ]/)}))),n},Va=function(t){var e={},n={},r=[],o={},i={},u=function(e,n,r){var o=t[e];return o?o=Ma(o,/[, ]/,Ma(o.toUpperCase(),/[, ]/)):(o=Aa[e],o||(o=Ha(n,r),Aa[e]=o)),o};t=t||{};var a=Pa(t.schema);!1===t.verify_html&&(t.valid_elements="*[*]");var c=Fa(t.valid_styles),s=Fa(t.invalid_styles,"map"),l=Fa(t.valid_classes,"map"),f=u("whitespace_elements","pre script noscript style textarea video audio iframe object code"),d=u("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),m=u("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),g=u("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),h="td th iframe video audio object script code",p=u("non_empty_elements",h+" pre",m),v=u("move_caret_before_on_enter_elements",h+" table",m),b=u("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),y=u("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",b),w=u("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp");Ra((t.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),(function(t){i[t]=new RegExp("</"+t+"[^>]*>","gi")}));var x=function(t){return new RegExp("^"+t.replace(/([?+*])/g,".$1")+"$")},C=function(t){var n,o,i,u,a,c,s,l,f,d,m,g,h,p,v,b,y,w,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,S=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,k=/[*?+]/;if(t){var T=La(t,",");for(e["@"]&&(b=e["@"].attributes,y=e["@"].attributesOrder),n=0,o=T.length;n<o;n++)if(a=C.exec(T[n]),a){if(p=a[1],f=a[2],v=a[3],l=a[5],g={},h=[],c={attributes:g,attributesOrder:h},"#"===p&&(c.paddEmpty=!0),"-"===p&&(c.removeEmpty=!0),"!"===a[4]&&(c.removeEmptyAttrs=!0),b&&(Ct(b,(function(t,e){g[e]=t})),h.push.apply(h,y)),l)for(l=La(l,"|"),i=0,u=l.length;i<u;i++)if(a=S.exec(l[i]),a){if(s={},m=a[1],d=a[2].replace(/[\\:]:/g,":"),p=a[3],w=a[4],"!"===m&&(c.attributesRequired=c.attributesRequired||[],c.attributesRequired.push(d),s.required=!0),"-"===m){delete g[d],h.splice(Ba(h,d),1);continue}p&&("="===p&&(c.attributesDefault=c.attributesDefault||[],c.attributesDefault.push({name:d,value:w}),s.defaultValue=w),":"===p&&(c.attributesForced=c.attributesForced||[],c.attributesForced.push({name:d,value:w}),s.forcedValue=w),"<"===p&&(s.validValues=Ma(w,"?"))),k.test(d)?(c.attributePatterns=c.attributePatterns||[],s.pattern=x(d),c.attributePatterns.push(s)):(g[d]||h.push(d),g[d]=s)}b||"@"!==f||(b=g,y=h),v&&(c.outputName=f,e[v]=c),k.test(f)?(c.pattern=x(f),r.push(c)):e[f]=c}}},S=function(t){e={},r=[],C(t),Ra(a,(function(t,e){n[e]=t.children}))},k=function(t){var r=/^(~)?(.+)$/;t&&(Aa.text_block_elements=Aa.block_elements=null,Ra(La(t,","),(function(t){var i=r.exec(t),u="~"===i[1],a=u?"span":"div",c=i[2];if(n[c]=n[a],o[c]=a,u||(y[c.toUpperCase()]={},y[c]={}),!e[c]){var s=e[a];s=Na({},s),delete s.removeEmptyAttrs,delete s.removeEmpty,e[c]=s}Ra(n,(function(t,e){t[a]&&(n[e]=t=Na({},n[e]),t[c]=t[a])}))})))},T=function(e){var r=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;Aa[t.schema]=null,e&&Ra(La(e,","),(function(t){var e,o,i=r.exec(t);i&&(o=i[1],e=o?n[i[2]]:n[i[2]]={"#comment":{}},e=n[i[2]],Ra(La(i[3],"|"),(function(t){"-"===o?delete e[t]:e[t]={}})))}))},O=function(t){var n,o=e[t];if(o)return o;n=r.length;while(n--)if(o=r[n],o.pattern.test(t))return o};t.valid_elements?S(t.valid_elements):(Ra(a,(function(t,r){e[r]={attributes:t.attributes,attributesOrder:t.attributesOrder},n[r]=t.children})),"html5"!==t.schema&&Ra(La("strong/b em/i"),(function(t){var n=La(t,"/");e[n[1]].outputName=n[0]})),Ra(w,(function(n,r){e[r]&&(t.padd_empty_block_inline_children&&(e[r].paddInEmptyBlock=!0),e[r].removeEmpty=!0)})),Ra(La("ol ul blockquote a table tbody"),(function(t){e[t]&&(e[t].removeEmpty=!0)})),Ra(La("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),(function(t){e[t].paddEmpty=!0})),Ra(La("span"),(function(t){e[t].removeEmptyAttrs=!0}))),k(t.custom_elements),T(t.valid_children),C(t.extended_valid_elements),T("+ol[ul|ol],+ul[ul|ol]"),Ra({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},(function(t,n){e[n]&&(e[n].parentsRequired=La(t))})),t.invalid_elements&&Ra(za(t.invalid_elements),(function(t){e[t]&&delete e[t]})),O("span")||C("span[!data-mce-type|*]");var E=D(c),_=D(s),A=D(l),M=D(g),R=D(y),N=D(b),z=D(w),B=D(m),L=D(d),H=D(p),I=D(v),P=D(f),F=D(i),V=function(t,e){var r=n[t.toLowerCase()];return!(!r||!r[e.toLowerCase()])},U=function(t,e){var n,r,o=O(t);if(o){if(!e)return!0;if(o.attributes[e])return!0;if(n=o.attributePatterns,n){r=n.length;while(r--)if(n[r].pattern.test(t))return!0}}return!1},j=D(o);return{children:n,elements:e,getValidStyles:E,getValidClasses:A,getBlockElements:R,getInvalidStyles:_,getShortEndedElements:B,getTextBlockElements:N,getTextInlineElements:z,getBoolAttrs:M,getElementRule:O,getSelfClosingElements:L,getNonEmptyElements:H,getMoveCaretBeforeOnEnterElements:I,getWhiteSpaceElements:P,getSpecialElements:F,isValidChild:V,isValid:U,getCustomElements:j,addValidElements:C,setValidElements:S,addCustomElements:k,addValidChildren:T}},Ua=function(t,e,n,r){var o=function(t){return t=parseInt(t,10).toString(16),t.length>1?t:"0"+t};return"#"+o(e)+o(n)+o(r)},ja=function(t,e){var n,r,o,i=this,u=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,a=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,c=/\s*([^:]+):\s*([^;]+);?/g,s=/\s+$/,l={},f=cu;t=t||{},e&&(r=e.getValidStyles(),o=e.getInvalidStyles());var d=("\\\" \\' \\; \\: ; : "+f).split(" ");for(n=0;n<d.length;n++)l[d[n]]=f+n,l[f+n]=d[n];return{toHex:function(t){return t.replace(u,Ua)},parse:function(e){var r,o,d,m,g={},h=t.url_converter,p=t.url_converter_scope||i,v=function(t,e,r){var o=g[t+"-top"+e];if(o){var i=g[t+"-right"+e];if(i){var u=g[t+"-bottom"+e];if(u){var a=g[t+"-left"+e];if(a){var c=[o,i,u,a];n=c.length-1;while(n--)if(c[n]!==c[n+1])break;n>-1&&r||(g[t+e]=-1===n?c[0]:c.join(" "),delete g[t+"-top"+e],delete g[t+"-right"+e],delete g[t+"-bottom"+e],delete g[t+"-left"+e])}}}}},b=function(t){var e,n=g[t];if(n){n=n.split(" "),e=n.length;while(e--)if(n[e]!==n[0])return!1;return g[t]=n[0],!0}},y=function(t,e,n,r){b(e)&&b(n)&&b(r)&&(g[t]=g[e]+" "+g[n]+" "+g[r],delete g[e],delete g[n],delete g[r])},w=function(t){return m=!0,l[t]},x=function(t,e){return m&&(t=t.replace(/\uFEFF[0-9]/g,(function(t){return l[t]}))),e||(t=t.replace(/\\([\'\";:])/g,"$1")),t},C=function(t){return String.fromCharCode(parseInt(t.slice(1),16))},S=function(t){return t.replace(/\\[0-9a-f]+/gi,C)},k=function(e,n,r,o,i,u){if(i=i||u,i)return i=x(i),"'"+i.replace(/\'/g,"\\'")+"'";if(n=x(n||r||o),!t.allow_script_urls){var a=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(a))return"";if(!t.allow_svg_data_urls&&/^data:image\/svg/i.test(a))return""}return h&&(n=h.call(p,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(e){e=e.replace(/[\u0000-\u001F]/g,""),e=e.replace(/\\[\"\';:\uFEFF]/g,w).replace(/\"[^\"]+\"|\'[^\']+\'/g,(function(t){return t.replace(/[;:]/g,w)}));while(r=c.exec(e))if(c.lastIndex=r.index+r[0].length,o=r[1].replace(s,"").toLowerCase(),d=r[2].replace(s,""),o&&d){if(o=S(o),d=S(d),-1!==o.indexOf(f)||-1!==o.indexOf('"'))continue;if(!t.allow_script_urls&&("behavior"===o||/expression\s*\(|\/\*|\*\//.test(d)))continue;"font-weight"===o&&"700"===d?d="bold":"color"!==o&&"background-color"!==o||(d=d.toLowerCase()),d=d.replace(u,Ua),d=d.replace(a,k),g[o]=m?x(d,!0):d}v("border","",!0),v("border","-width"),v("border","-color"),v("border","-style"),v("padding",""),v("margin",""),y("border","border-width","border-style","border-color"),"medium none"===g.border&&delete g.border,"none"===g["border-image"]&&delete g["border-image"]}return g},serialize:function(t,e){var n="",i=function(e){var o,i=r[e];if(i)for(var u=0,a=i.length;u<a;u++)e=i[u],o=t[e],o&&(n+=(n.length>0?" ":"")+e+": "+o+";")},u=function(t,e){var n=o["*"];return(!n||!n[t])&&(n=o[e],!(n&&n[t]))};return e&&r?(i("*"),i(e)):Ct(t,(function(t,r){!t||o&&!u(r,e)||(n+=(n.length>0?" ":"")+r+": "+t+";")})),n}}},Wa={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},qa=function(t){return t instanceof Event||T(t.initEvent)},$a=function(t){return t.isDefaultPrevented===P||t.isDefaultPrevented===I},Ga=function(t){return S(t.preventDefault)||qa(t)},Ka=function(t,e){var n=null!==e&&void 0!==e?e:{};for(var r in t)Rt(Wa,r)||(n[r]=t[r]);return k(n.composedPath)&&(n.composedPath=function(){return t.composedPath()}),n},Xa=function(t,e,n,r){var o,i=Ka(e,r);return i.type=t,S(i.target)&&(i.target=null!==(o=i.srcElement)&&void 0!==o?o:n),Ga(e)&&(i.preventDefault=function(){i.defaultPrevented=!0,i.isDefaultPrevented=P,T(e.preventDefault)?e.preventDefault():qa(e)&&(e.returnValue=!1)},i.stopPropagation=function(){i.cancelBubble=!0,i.isPropagationStopped=P,T(e.stopPropagation)?e.stopPropagation():qa(e)&&(e.cancelBubble=!0)},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=P,i.stopPropagation()},$a(i)||(i.isDefaultPrevented=!0===i.defaultPrevented?P:I,i.isPropagationStopped=!0===i.cancelBubble?P:I,i.isImmediatePropagationStopped=I)),i},Ya="mce-data-",Ja=/^(?:mouse|contextmenu)|click/,Qa=function(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r||!1):t.attachEvent&&t.attachEvent("on"+e,n)},Za=function(t,e,n,r){t.removeEventListener?t.removeEventListener(e,n,r||!1):t.detachEvent&&t.detachEvent("on"+e,n)},tc=function(t){return k(t)&&Ja.test(t.type)},ec=function(t,e){var n=Xa(t.type,t,document,e);if(tc(t)&&C(t.pageX)&&!C(t.clientX)){var r=n.target.ownerDocument||document,o=r.documentElement,i=r.body,u=n;u.pageX=t.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),u.pageY=t.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)}return C(n.metaKey)&&(n.metaKey=!1),n},nc=function(t,e,n){var r=t.document,o={type:"ready"};if(n.domLoaded)e(o);else{var i=function(){return"complete"===r.readyState||"interactive"===r.readyState&&r.body},u=function(){Za(t,"DOMContentLoaded",u),Za(t,"load",u),n.domLoaded||(n.domLoaded=!0,e(o)),t=null};i()?u():Qa(t,"DOMContentLoaded",u),n.domLoaded||Qa(t,"load",u)}},rc=function(){function t(){this.domLoaded=!1,this.events={},this.count=1,this.expando=Ya+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in document.documentElement,this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}return t.prototype.bind=function(t,e,n,r){var o,i,u,a,c,s,l,f=this,d=window,m=function(t){f.executeHandlers(ec(t||d.event),o)};if(t&&3!==t.nodeType&&8!==t.nodeType){t[f.expando]?o=t[f.expando]:(o=f.count++,t[f.expando]=o,f.events[o]={}),r=r||t;var g=e.split(" ");u=g.length;while(u--)a=g[u],s=m,c=l=!1,"DOMContentLoaded"===a&&(a="ready"),f.domLoaded&&"ready"===a&&"complete"===t.readyState?n.call(r,ec({type:a})):(f.hasMouseEnterLeave||(c=f.mouseEnterLeave[a],c&&(s=function(t){var e=t.currentTarget,n=t.relatedTarget;if(n&&e.contains)n=e.contains(n);else while(n&&n!==e)n=n.parentNode;n||(t=ec(t||d.event),t.type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=e,f.executeHandlers(t,o))})),f.hasFocusIn||"focusin"!==a&&"focusout"!==a||(l=!0,c="focusin"===a?"focus":"blur",s=function(t){t=ec(t||d.event),t.type="focus"===t.type?"focusin":"focusout",f.executeHandlers(t,o)}),i=f.events[o][a],i?"ready"===a&&f.domLoaded?n(ec({type:a})):i.push({func:n,scope:r}):(f.events[o][a]=i=[{func:n,scope:r}],i.fakeName=c,i.capture=l,i.nativeHandler=s,"ready"===a?nc(t,s,f):Qa(t,c||a,s,l)));return t=i=null,n}},t.prototype.unbind=function(t,e,n){var r,o,i,u,a;if(!t||3===t.nodeType||8===t.nodeType)return this;var c=t[this.expando];if(c){if(a=this.events[c],e){var s=e.split(" ");o=s.length;while(o--)if(u=s[o],r=a[u],r){if(n){i=r.length;while(i--)if(r[i].func===n){var l=r.nativeHandler,f=r.fakeName,d=r.capture;r=r.slice(0,i).concat(r.slice(i+1)),r.nativeHandler=l,r.fakeName=f,r.capture=d,a[u]=r}}n&&0!==r.length||(delete a[u],Za(t,r.fakeName||u,r.nativeHandler,r.capture))}}else Ct(a,(function(e,n){Za(t,e.fakeName||n,e.nativeHandler,e.capture)})),a={};for(u in a)if(Rt(a,u))return this;delete this.events[c];try{delete t[this.expando]}catch(m){t[this.expando]=null}}return this},t.prototype.fire=function(t,e,n){var r;if(!t||3===t.nodeType||8===t.nodeType)return this;var o=ec({type:e,target:t},n);do{r=t[this.expando],r&&this.executeHandlers(o,r),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow}while(t&&!o.isPropagationStopped());return this},t.prototype.clean=function(t){var e,n;if(!t||3===t.nodeType||8===t.nodeType)return this;if(t[this.expando]&&this.unbind(t),t.getElementsByTagName||(t=t.document),t&&t.getElementsByTagName){this.unbind(t),n=t.getElementsByTagName("*"),e=n.length;while(e--)t=n[e],t[this.expando]&&this.unbind(t)}return this},t.prototype.destroy=function(){this.events={}},t.prototype.cancel=function(t){return t&&(t.preventDefault(),t.stopImmediatePropagation()),!1},t.prototype.executeHandlers=function(t,e){var n=this.events[e],r=n&&n[t.type];if(r)for(var o=0,i=r.length;o<i;o++){var u=r[o];if(u&&!1===u.func.call(u.scope,t)&&t.preventDefault(),t.isImmediatePropagationStopped())return}},t.Event=new t,t}(),oc="sizzle"+-new Date,ic=window.document,uc=0,ac=0,cc=Uc(),sc=Uc(),lc=Uc(),fc=function(t,e){return t===e&&(mi=!0),0},dc="undefined",mc=1<<31,gc={}.hasOwnProperty,hc=[],pc=hc.pop,vc=hc.push,bc=hc.push,yc=hc.slice,wc=hc.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(this[e]===t)return e;return-1},xc="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",Cc="[\\x20\\t\\r\\n\\f]",Sc="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",kc="\\["+Cc+"*("+Sc+")(?:"+Cc+"*([*^$|!~]?=)"+Cc+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+Sc+"))|)"+Cc+"*\\]",Tc=":("+Sc+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+kc+")*)|.*)\\)|)",Oc=new RegExp("^"+Cc+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Cc+"+$","g"),Ec=new RegExp("^"+Cc+"*,"+Cc+"*"),_c=new RegExp("^"+Cc+"*([>+~]|"+Cc+")"+Cc+"*"),Ac=new RegExp("="+Cc+"*([^\\]'\"]*?)"+Cc+"*\\]","g"),Dc=new RegExp(Tc),Mc=new RegExp("^"+Sc+"$"),Rc={ID:new RegExp("^#("+Sc+")"),CLASS:new RegExp("^\\.("+Sc+")"),TAG:new RegExp("^("+Sc+"|[*])"),ATTR:new RegExp("^"+kc),PSEUDO:new RegExp("^"+Tc),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+Cc+"*(even|odd|(([+-]|)(\\d*)n|)"+Cc+"*(?:([+-]|)"+Cc+"*(\\d+)|))"+Cc+"*\\)|)","i"),bool:new RegExp("^(?:"+xc+")$","i"),needsContext:new RegExp("^"+Cc+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+Cc+"*((?:-\\d)?\\d*)"+Cc+"*\\)|)(?=[^-]|$)","i")},Nc=/^(?:input|select|textarea|button)$/i,zc=/^h\d$/i,Bc=/^[^{]+\{\s*\[native \w/,Lc=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Hc=/[+~]/,Ic=/'|\\/g,Pc=new RegExp("\\\\([\\da-f]{1,6}"+Cc+"?|("+Cc+")|.)","ig"),Fc=function(t,e,n){var r="0x"+e-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{bc.apply(hc=yc.call(ic.childNodes),ic.childNodes),hc[ic.childNodes.length].nodeType}catch(bV){bc={apply:hc.length?function(t,e){vc.apply(t,yc.call(e))}:function(t,e){var n=t.length,r=0;while(t[n++]=e[r++]);t.length=n-1}}}var Vc=function(t,e,n,r){var o,i,u,a,c,s,l,f,d,m;if((e?e.ownerDocument||e:ic)!==hi&&gi(e),e=e||hi,n=n||[],!t||"string"!==typeof t)return n;if(1!==(a=e.nodeType)&&9!==a)return[];if(vi&&!r){if(o=Lc.exec(t))if(u=o[1]){if(9===a){if(i=e.getElementById(u),!i||!i.parentNode)return n;if(i.id===u)return n.push(i),n}else if(e.ownerDocument&&(i=e.ownerDocument.getElementById(u))&&xi(e,i)&&i.id===u)return n.push(i),n}else{if(o[2])return bc.apply(n,e.getElementsByTagName(t)),n;if((u=o[3])&&oi.getElementsByClassName)return bc.apply(n,e.getElementsByClassName(u)),n}if(oi.qsa&&(!bi||!bi.test(t))){if(f=l=oc,d=e,m=9===a&&t,1===a&&"object"!==e.nodeName.toLowerCase()){s=ci(t),(l=e.getAttribute("id"))?f=l.replace(Ic,"\\$&"):e.setAttribute("id",f),f="[id='"+f+"'] ",c=s.length;while(c--)s[c]=f+Yc(s[c]);d=Hc.test(t)&&Kc(e.parentNode)||e,m=s.join(",")}if(m)try{return bc.apply(n,d.querySelectorAll(m)),n}catch(g){}finally{l||e.removeAttribute("id")}}}return li(t.replace(Oc,"$1"),e,n,r)};function Uc(){var t=[];function e(n,r){return t.push(n+" ")>ii.cacheLength&&delete e[t.shift()],e[n+" "]=r}return e}function jc(t){return t[oc]=!0,t}function Wc(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||mc)-(~t.sourceIndex||mc);if(r)return r;if(n)while(n=n.nextSibling)if(n===e)return-1;return t?1:-1}function qc(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function $c(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function Gc(t){return jc((function(e){return e=+e,jc((function(n,r){var o,i=t([],n.length,e),u=i.length;while(u--)n[o=i[u]]&&(n[o]=!(r[o]=n[o]))}))}))}function Kc(t){return t&&typeof t.getElementsByTagName!==dc&&t}function Xc(){}function Yc(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function Jc(t,e,n){var r=e.dir,o=n&&"parentNode"===r,i=ac++;return e.first?function(e,n,i){while(e=e[r])if(1===e.nodeType||o)return t(e,n,i)}:function(e,n,u){var a,c,s=[uc,i];if(u){while(e=e[r])if((1===e.nodeType||o)&&t(e,n,u))return!0}else while(e=e[r])if(1===e.nodeType||o){if(c=e[oc]||(e[oc]={}),(a=c[r])&&a[0]===uc&&a[1]===i)return s[2]=a[2];if(c[r]=s,s[2]=t(e,n,u))return!0}}}function Qc(t){return t.length>1?function(e,n,r){var o=t.length;while(o--)if(!t[o](e,n,r))return!1;return!0}:t[0]}function Zc(t,e,n){for(var r=0,o=e.length;r<o;r++)Vc(t,e[r],n);return n}function ts(t,e,n,r,o){for(var i,u=[],a=0,c=t.length,s=null!=e;a<c;a++)(i=t[a])&&(n&&!n(i,r,o)||(u.push(i),s&&e.push(a)));return u}function es(t,e,n,r,o,i){return r&&!r[oc]&&(r=es(r)),o&&!o[oc]&&(o=es(o,i)),jc((function(i,u,a,c){var s,l,f,d=[],m=[],g=u.length,h=i||Zc(e||"*",a.nodeType?[a]:a,[]),p=!t||!i&&e?h:ts(h,d,t,a,c),v=n?o||(i?t:g||r)?[]:u:p;if(n&&n(p,v,a,c),r){s=ts(v,m),r(s,[],a,c),l=s.length;while(l--)(f=s[l])&&(v[m[l]]=!(p[m[l]]=f))}if(i){if(o||t){if(o){s=[],l=v.length;while(l--)(f=v[l])&&s.push(p[l]=f);o(null,v=[],s,c)}l=v.length;while(l--)(f=v[l])&&(s=o?wc.call(i,f):d[l])>-1&&(i[s]=!(u[s]=f))}}else v=ts(v===u?v.splice(g,v.length):v),o?o(null,u,v,c):bc.apply(u,v)}))}function ns(t){for(var e,n,r,o=t.length,i=ii.relative[t[0].type],u=i||ii.relative[" "],a=i?1:0,c=Jc((function(t){return t===e}),u,!0),s=Jc((function(t){return wc.call(e,t)>-1}),u,!0),l=[function(t,n,r){var o=!i&&(r||n!==fi)||((e=n).nodeType?c(t,n,r):s(t,n,r));return e=null,o}];a<o;a++)if(n=ii.relative[t[a].type])l=[Jc(Qc(l),n)];else{if(n=ii.filter[t[a].type].apply(null,t[a].matches),n[oc]){for(r=++a;r<o;r++)if(ii.relative[t[r].type])break;return es(a>1&&Qc(l),a>1&&Yc(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(Oc,"$1"),n,a<r&&ns(t.slice(a,r)),r<o&&ns(t=t.slice(r)),r<o&&Yc(t))}l.push(n)}return Qc(l)}function rs(t,e){var n=e.length>0,r=t.length>0,o=function(o,i,u,a,c){var s,l,f,d=0,m="0",g=o&&[],h=[],p=fi,v=o||r&&ii.find.TAG("*",c),b=uc+=null==p?1:Math.random()||.1,y=v.length;for(c&&(fi=i!==hi&&i);m!==y&&null!=(s=v[m]);m++){if(r&&s){l=0;while(f=t[l++])if(f(s,i,u)){a.push(s);break}c&&(uc=b)}n&&((s=!f&&s)&&d--,o&&g.push(s))}if(d+=m,n&&m!==d){l=0;while(f=e[l++])f(g,h,i,u);if(o){if(d>0)while(m--)g[m]||h[m]||(h[m]=pc.call(a));h=ts(h)}bc.apply(a,h),c&&!o&&h.length>0&&d+e.length>1&&Vc.uniqueSort(a)}return c&&(uc=b,fi=p),g};return n?jc(o):o}oi=Vc.support={},ai=Vc.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},gi=Vc.setDocument=function(t){var e,n=t?t.ownerDocument||t:ic,r=n.defaultView;function o(t){try{return t.top}catch(e){}return null}return n!==hi&&9===n.nodeType&&n.documentElement?(hi=n,pi=n.documentElement,vi=!ai(n),r&&r!==o(r)&&(r.addEventListener?r.addEventListener("unload",(function(){gi()}),!1):r.attachEvent&&r.attachEvent("onunload",(function(){gi()}))),oi.attributes=!0,oi.getElementsByTagName=!0,oi.getElementsByClassName=Bc.test(n.getElementsByClassName),oi.getById=!0,ii.find.ID=function(t,e){if(typeof e.getElementById!==dc&&vi){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},ii.filter.ID=function(t){var e=t.replace(Pc,Fc);return function(t){return t.getAttribute("id")===e}},ii.find.TAG=oi.getElementsByTagName?function(t,e){if(typeof e.getElementsByTagName!==dc)return e.getElementsByTagName(t)}:function(t,e){var n,r=[],o=0,i=e.getElementsByTagName(t);if("*"===t){while(n=i[o++])1===n.nodeType&&r.push(n);return r}return i},ii.find.CLASS=oi.getElementsByClassName&&function(t,e){if(vi)return e.getElementsByClassName(t)},yi=[],bi=[],oi.disconnectedMatch=!0,bi=bi.length&&new RegExp(bi.join("|")),yi=yi.length&&new RegExp(yi.join("|")),e=Bc.test(pi.compareDocumentPosition),xi=e||Bc.test(pi.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)while(e=e.parentNode)if(e===t)return!0;return!1},fc=e?function(t,e){if(t===e)return mi=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&r||!oi.sortDetached&&e.compareDocumentPosition(t)===r?t===n||t.ownerDocument===ic&&xi(ic,t)?-1:e===n||e.ownerDocument===ic&&xi(ic,e)?1:di?wc.call(di,t)-wc.call(di,e):0:4&r?-1:1)}:function(t,e){if(t===e)return mi=!0,0;var r,o=0,i=t.parentNode,u=e.parentNode,a=[t],c=[e];if(!i||!u)return t===n?-1:e===n?1:i?-1:u?1:di?wc.call(di,t)-wc.call(di,e):0;if(i===u)return Wc(t,e);r=t;while(r=r.parentNode)a.unshift(r);r=e;while(r=r.parentNode)c.unshift(r);while(a[o]===c[o])o++;return o?Wc(a[o],c[o]):a[o]===ic?-1:c[o]===ic?1:0},n):hi},Vc.matches=function(t,e){return Vc(t,null,null,e)},Vc.matchesSelector=function(t,e){if((t.ownerDocument||t)!==hi&&gi(t),e=e.replace(Ac,"='$1']"),oi.matchesSelector&&vi&&(!yi||!yi.test(e))&&(!bi||!bi.test(e)))try{var n=wi.call(t,e);if(n||oi.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(bV){}return Vc(e,hi,null,[t]).length>0},Vc.contains=function(t,e){return(t.ownerDocument||t)!==hi&&gi(t),xi(t,e)},Vc.attr=function(t,e){(t.ownerDocument||t)!==hi&&gi(t);var n=ii.attrHandle[e.toLowerCase()],r=n&&gc.call(ii.attrHandle,e.toLowerCase())?n(t,e,!vi):void 0;return void 0!==r?r:oi.attributes||!vi?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},Vc.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},Vc.uniqueSort=function(t){var e,n=[],r=0,o=0;if(mi=!oi.detectDuplicates,di=!oi.sortStable&&t.slice(0),t.sort(fc),mi){while(e=t[o++])e===t[o]&&(r=n.push(o));while(r--)t.splice(n[r],1)}return di=null,t},ui=Vc.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"===typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=ui(t)}else if(3===o||4===o)return t.nodeValue}else while(e=t[r++])n+=ui(e);return n},ii=Vc.selectors={cacheLength:50,createPseudo:jc,match:Rc,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Pc,Fc),t[3]=(t[3]||t[4]||t[5]||"").replace(Pc,Fc),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Vc.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Vc.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Rc.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&Dc.test(n)&&(e=ci(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Pc,Fc).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=cc[t+" "];return e||(e=new RegExp("(^|"+Cc+")"+t+"("+Cc+"|$)"))&&cc(t,(function(t){return e.test("string"===typeof t.className&&t.className||typeof t.getAttribute!==dc&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var o=Vc.attr(r,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,o){var i="nth"!==t.slice(0,3),u="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===o?function(t){return!!t.parentNode}:function(e,n,c){var s,l,f,d,m,g,h=i!==u?"nextSibling":"previousSibling",p=e.parentNode,v=a&&e.nodeName.toLowerCase(),b=!c&&!a;if(p){if(i){while(h){f=e;while(f=f[h])if(a?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;g=h="only"===t&&!g&&"nextSibling"}return!0}if(g=[u?p.firstChild:p.lastChild],u&&b){l=p[oc]||(p[oc]={}),s=l[t]||[],m=s[0]===uc&&s[1],d=s[0]===uc&&s[2],f=m&&p.childNodes[m];while(f=++m&&f&&f[h]||(d=m=0)||g.pop())if(1===f.nodeType&&++d&&f===e){l[t]=[uc,m,d];break}}else if(b&&(s=(e[oc]||(e[oc]={}))[t])&&s[0]===uc)d=s[1];else while(f=++m&&f&&f[h]||(d=m=0)||g.pop())if((a?f.nodeName.toLowerCase()===v:1===f.nodeType)&&++d&&(b&&((f[oc]||(f[oc]={}))[t]=[uc,d]),f===e))break;return d-=o,d===r||d%r===0&&d/r>=0}}},PSEUDO:function(t,e){var n,r=ii.pseudos[t]||ii.setFilters[t.toLowerCase()]||Vc.error("unsupported pseudo: "+t);return r[oc]?r(e):r.length>1?(n=[t,t,"",e],ii.setFilters.hasOwnProperty(t.toLowerCase())?jc((function(t,n){var o,i=r(t,e),u=i.length;while(u--)o=wc.call(t,i[u]),t[o]=!(n[o]=i[u])})):function(t){return r(t,0,n)}):r}},pseudos:{not:jc((function(t){var e=[],n=[],r=si(t.replace(Oc,"$1"));return r[oc]?jc((function(t,e,n,o){var i,u=r(t,null,o,[]),a=t.length;while(a--)(i=u[a])&&(t[a]=!(e[a]=i))})):function(t,o,i){return e[0]=t,r(e,null,i,n),e[0]=null,!n.pop()}})),has:jc((function(t){return function(e){return Vc(t,e).length>0}})),contains:jc((function(t){return t=t.replace(Pc,Fc),function(e){return(e.textContent||e.innerText||ui(e)).indexOf(t)>-1}})),lang:jc((function(t){return Mc.test(t||"")||Vc.error("unsupported lang: "+t),t=t.replace(Pc,Fc).toLowerCase(),function(e){var n;do{if(n=vi?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=window.location&&window.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===pi},focus:function(t){return t===hi.activeElement&&(!hi.hasFocus||hi.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!ii.pseudos.empty(t)},header:function(t){return zc.test(t.nodeName)},input:function(t){return Nc.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:Gc((function(){return[0]})),last:Gc((function(t,e){return[e-1]})),eq:Gc((function(t,e,n){return[n<0?n+e:n]})),even:Gc((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:Gc((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:Gc((function(t,e,n){for(var r=n<0?n+e:n;--r>=0;)t.push(r);return t})),gt:Gc((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},ii.pseudos.nth=ii.pseudos.eq,Z(["radio","checkbox","file","password","image"],(function(t){ii.pseudos[t]=qc(t)})),Z(["submit","reset"],(function(t){ii.pseudos[t]=$c(t)})),Xc.prototype=ii.filters=ii.pseudos,ii.setFilters=new Xc,ci=Vc.tokenize=function(t,e){var n,r,o,i,u,a,c,s=sc[t+" "];if(s)return e?0:s.slice(0);u=t,a=[],c=ii.preFilter;while(u){for(i in n&&!(r=Ec.exec(u))||(r&&(u=u.slice(r[0].length)||u),a.push(o=[])),n=!1,(r=_c.exec(u))&&(n=r.shift(),o.push({value:n,type:r[0].replace(Oc," ")}),u=u.slice(n.length)),ii.filter)ii.filter.hasOwnProperty(i)&&(!(r=Rc[i].exec(u))||c[i]&&!(r=c[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),u=u.slice(n.length)));if(!n)break}return e?u.length:u?Vc.error(t):sc(t,a).slice(0)},si=Vc.compile=function(t,e){var n,r=[],o=[],i=lc[t+" "];if(!i){e||(e=ci(t)),n=e.length;while(n--)i=ns(e[n]),i[oc]?r.push(i):o.push(i);i=lc(t,rs(o,r)),i.selector=t}return i},li=Vc.select=function(t,e,n,r){var o,i,u,a,c,s="function"===typeof t&&t,l=!r&&ci(t=s.selector||t);if(n=n||[],1===l.length){if(i=l[0]=l[0].slice(0),i.length>2&&"ID"===(u=i[0]).type&&oi.getById&&9===e.nodeType&&vi&&ii.relative[i[1].type]){if(e=(ii.find.ID(u.matches[0].replace(Pc,Fc),e)||[])[0],!e)return n;s&&(e=e.parentNode),t=t.slice(i.shift().value.length)}o=Rc.needsContext.test(t)?0:i.length;while(o--){if(u=i[o],ii.relative[a=u.type])break;if((c=ii.find[a])&&(r=c(u.matches[0].replace(Pc,Fc),Hc.test(i[0].type)&&Kc(e.parentNode)||e))){if(i.splice(o,1),t=r.length&&Yc(i),!t)return bc.apply(n,r),n;break}}}return(s||si(t,l))(r,e,!vi,n,Hc.test(t)&&Kc(e.parentNode)||e),n},oi.sortStable=oc.split("").sort(fc).join("")===oc,oi.detectDuplicates=!!mi,gi(),oi.sortDetached=!0;var os=document,is=Array.prototype.push,us=Array.prototype.slice,as=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,cs=rc.Event,ss=gn.makeMap("children,contents,next,prev"),ls=function(t){return"undefined"!==typeof t},fs=function(t){return"string"===typeof t},ds=function(t){return t&&t===t.window},ms=function(t,e){e=e||os;var n,r=e.createElement("div"),o=e.createDocumentFragment();r.innerHTML=t;while(n=r.firstChild)o.appendChild(n);return o},gs=function(t,e,n,r){var o;if(fs(e))e=ms(e,As(t[0]));else if(e.length&&!e.nodeType){if(e=Ns.makeArray(e),r)for(o=e.length-1;o>=0;o--)gs(t,e[o],n,r);else for(o=0;o<e.length;o++)gs(t,e[o],n,r);return t}if(e.nodeType){o=t.length;while(o--)n.call(t[o],e)}return t},hs=function(t,e){return t&&e&&-1!==(" "+t.className+" ").indexOf(" "+e+" ")},ps=function(t,e,n){var r,o;return e=Ns(e)[0],t.each((function(){var t=this;n&&r===t.parentNode||(r=t.parentNode,o=e.cloneNode(!1),t.parentNode.insertBefore(o,t)),o.appendChild(t)})),t},vs=gn.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),bs=gn.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),ys={for:"htmlFor",class:"className",readonly:"readOnly"},ws={float:"cssFloat"},xs={},Cs={},Ss=function(t,e){return new Ns.fn.init(t,e)},ks=function(t,e){var n;if(e.indexOf)return e.indexOf(t);n=e.length;while(n--)if(e[n]===t)return n;return-1},Ts=/^\s*|\s*$/g,Os=function(t){return null===t||void 0===t?"":(""+t).replace(Ts,"")},Es=function(t,e){var n,r,o,i;if(t)if(n=t.length,void 0===n){for(r in t)if(t.hasOwnProperty(r)&&(i=t[r],!1===e.call(i,r,i)))break}else for(o=0;o<n;o++)if(i=t[o],!1===e.call(i,o,i))break;return t},_s=function(t,e){var n=[];return Es(t,(function(t,r){e(r,t)&&n.push(r)})),n},As=function(t){return t?9===t.nodeType?t:t.ownerDocument:os};Ss.fn=Ss.prototype={constructor:Ss,selector:"",context:null,length:0,init:function(t,e){var n,r,o=this;if(!t)return o;if(t.nodeType)return o.context=o[0]=t,o.length=1,o;if(e&&e.nodeType)o.context=e;else{if(e)return Ns(t).attr(e);o.context=e=document}if(fs(t)){if(o.selector=t,n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:as.exec(t),!n)return Ns(e).find(t);if(n[1]){r=ms(t,As(e)).firstChild;while(r)is.call(o,r),r=r.nextSibling}else{if(r=As(e).getElementById(n[2]),!r)return o;if(r.id!==n[2])return o.find(t);o.length=1,o[0]=r}}else this.add(t,!1);return o},toArray:function(){return gn.toArray(this)},add:function(t,e){var n,r,o=this;if(fs(t))return o.add(Ns(t));if(!1!==e)for(n=Ns.unique(o.toArray().concat(Ns.makeArray(t))),o.length=n.length,r=0;r<n.length;r++)o[r]=n[r];else is.apply(o,Ns.makeArray(t));return o},attr:function(t,e){var n,r=this;if("object"===typeof t)Es(t,(function(t,e){r.attr(t,e)}));else{if(!ls(e)){if(r[0]&&1===r[0].nodeType){if(n=xs[t],n&&n.get)return n.get(r[0],t);if(bs[t])return r.prop(t)?t:void 0;e=r[0].getAttribute(t,2),null===e&&(e=void 0)}return e}this.each((function(){var n;if(1===this.nodeType){if(n=xs[t],n&&n.set)return void n.set(this,e);null===e?this.removeAttribute(t,2):this.setAttribute(t,e,2)}}))}return r},removeAttr:function(t){return this.attr(t,null)},prop:function(t,e){var n=this;if(t=ys[t]||t,"object"===typeof t)Es(t,(function(t,e){n.prop(t,e)}));else{if(!ls(e))return n[0]&&n[0].nodeType&&t in n[0]?n[0][t]:e;this.each((function(){1===this.nodeType&&(this[t]=e)}))}return n},css:function(t,e){var n,r,o=this,i=function(t){return t.replace(/-(\D)/g,(function(t,e){return e.toUpperCase()}))},u=function(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t}))};if("object"===typeof t)Es(t,(function(t,e){o.css(t,e)}));else if(ls(e))t=i(t),"number"!==typeof e||vs[t]||(e=e.toString()+"px"),o.each((function(){var n=this.style;if(r=Cs[t],r&&r.set)r.set(this,e);else{try{this.style[ws[t]||t]=e}catch(o){}null!==e&&""!==e||(n.removeProperty?n.removeProperty(u(t)):n.removeAttribute(t))}}));else{if(n=o[0],r=Cs[t],r&&r.get)return r.get(n);if(!n.ownerDocument.defaultView)return n.currentStyle?n.currentStyle[i(t)]:"";try{return n.ownerDocument.defaultView.getComputedStyle(n,null).getPropertyValue(u(t))}catch(a){return}}return o},remove:function(){var t,e=this,n=this.length;while(n--)t=e[n],cs.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){var t,e=this,n=this.length;while(n--){t=e[n];while(t.firstChild)t.removeChild(t.firstChild)}return this},html:function(t){var e,n=this;if(ls(t)){e=n.length;try{while(e--)n[e].innerHTML=t}catch(r){Ns(n[e]).empty().append(t)}return n}return n[0]?n[0].innerHTML:""},text:function(t){var e,n=this;if(ls(t)){e=n.length;while(e--)"innerText"in n[e]?n[e].innerText=t:n[0].textContent=t;return n}return n[0]?n[0].innerText||n[0].textContent:""},append:function(){return gs(this,arguments,(function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(t)}))},prepend:function(){return gs(this,arguments,(function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(t,this.firstChild)}),!0)},before:function(){var t=this;return t[0]&&t[0].parentNode?gs(t,arguments,(function(t){this.parentNode.insertBefore(t,this)})):t},after:function(){var t=this;return t[0]&&t[0].parentNode?gs(t,arguments,(function(t){this.parentNode.insertBefore(t,this.nextSibling)}),!0):t},appendTo:function(t){return Ns(t).append(this),this},prependTo:function(t){return Ns(t).prepend(this),this},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){return ps(this,t)},wrapAll:function(t){return ps(this,t,!0)},wrapInner:function(t){return this.each((function(){Ns(this).contents().wrapAll(t)})),this},unwrap:function(){return this.parent().each((function(){Ns(this).replaceWith(this.childNodes)}))},clone:function(){var t=[];return this.each((function(){t.push(this.cloneNode(!0))})),Ns(t)},addClass:function(t){return this.toggleClass(t,!0)},removeClass:function(t){return this.toggleClass(t,!1)},toggleClass:function(t,e){var n=this;return"string"!==typeof t||(-1!==t.indexOf(" ")?Es(t.split(" "),(function(){n.toggleClass(this,e)})):n.each((function(n,r){var o=hs(r,t);if(o!==e){var i=r.className;o?r.className=Os((" "+i+" ").replace(" "+t+" "," ")):r.className+=i?" "+t:t}}))),n},hasClass:function(t){return hs(this[0],t)},each:function(t){return Es(this,t)},on:function(t,e){return this.each((function(){cs.bind(this,t,e)}))},off:function(t,e){return this.each((function(){cs.unbind(this,t,e)}))},trigger:function(t){return this.each((function(){"object"===typeof t?cs.fire(this,t.type,t):cs.fire(this,t)}))},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return Ns(us.apply(this,arguments))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(t){var e,n,r=[];for(e=0,n=this.length;e<n;e++)Ns.find(t,this[e],r);return Ns(r)},filter:function(t){return Ns("function"===typeof t?_s(this.toArray(),(function(e,n){return t(n,e)})):Ns.filter(t,this.toArray()))},closest:function(t){var e=[];return t instanceof Ns&&(t=t[0]),this.each((function(n,r){while(r){if("string"===typeof t&&Ns(r).is(t)){e.push(r);break}if(r===t){e.push(r);break}r=r.parentNode}})),Ns(e)},offset:function(t){var e,n,r,o,i=0,u=0;return t?this.css(t):(e=this[0],e&&(n=e.ownerDocument,r=n.documentElement,e.getBoundingClientRect&&(o=e.getBoundingClientRect(),i=o.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,u=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:u})},push:is,sort:Array.prototype.sort,splice:Array.prototype.splice},gn.extend(Ss,{extend:gn.extend,makeArray:function(t){return ds(t)||t.nodeType?[t]:gn.toArray(t)},inArray:ks,isArray:gn.isArray,each:Es,trim:Os,grep:_s,find:Vc,expr:Vc.selectors,unique:Vc.uniqueSort,text:Vc.getText,contains:Vc.contains,filter:function(t,e,n){var r=e.length;n&&(t=":not("+t+")");while(r--)1!==e[r].nodeType&&e.splice(r,1);return e=1===e.length?Ns.find.matchesSelector(e[0],t)?[e[0]]:[]:Ns.find.matches(t,e),e}});var Ds=function(t,e,n){var r=[],o=t[e];"string"!==typeof n&&n instanceof Ns&&(n=n[0]);while(o&&9!==o.nodeType){if(void 0!==n){if(o===n)break;if("string"===typeof n&&Ns(o).is(n))break}1===o.nodeType&&r.push(o),o=o[e]}return r},Ms=function(t,e,n,r){var o=[];for(r instanceof Ns&&(r=r[0]);t;t=t[e])if(!n||t.nodeType===n){if(void 0!==r){if(t===r)break;if("string"===typeof r&&Ns(t).is(r))break}o.push(t)}return o},Rs=function(t,e,n){for(t=t[e];t;t=t[e])if(t.nodeType===n)return t;return null};Es({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return Ds(t,"parentNode")},next:function(t){return Rs(t,"nextSibling",1)},prev:function(t){return Rs(t,"previousSibling",1)},children:function(t){return Ms(t.firstChild,"nextSibling",1)},contents:function(t){return gn.toArray(("iframe"===t.nodeName?t.contentDocument||t.contentWindow.document:t).childNodes)}},(function(t,e){Ss.fn[t]=function(n){var r=this,o=[];r.each((function(){var t=e.call(o,this,n,o);t&&(Ns.isArray(t)?o.push.apply(o,t):o.push(t))})),this.length>1&&(ss[t]||(o=Ns.unique(o)),0===t.indexOf("parents")&&(o=o.reverse()));var i=Ns(o);return n?i.filter(n):i}})),Es({parentsUntil:function(t,e){return Ds(t,"parentNode",e)},nextUntil:function(t,e){return Ms(t,"nextSibling",1,e).slice(1)},prevUntil:function(t,e){return Ms(t,"previousSibling",1,e).slice(1)}},(function(t,e){Ss.fn[t]=function(n,r){var o=this,i=[];o.each((function(){var t=e.call(i,this,n,i);t&&(Ns.isArray(t)?i.push.apply(i,t):i.push(t))})),this.length>1&&(i=Ns.unique(i),0!==t.indexOf("parents")&&"prevUntil"!==t||(i=i.reverse()));var u=Ns(i);return r?u.filter(r):u}})),Ss.fn.is=function(t){return!!t&&this.filter(t).length>0},Ss.fn.init.prototype=Ss.fn,Ss.overrideDefaults=function(t){var e,n=function(r,o){return e=e||t(),0===arguments.length&&(r=e.element),o||(o=e.context),new n.fn.init(r,o)};return Ns.extend(n,this),n},Ss.attrHooks=xs,Ss.cssHooks=Cs;var Ns=Ss,zs=gn.each,Bs=gn.grep,Ls=tn.ie,Hs=/^([a-z0-9],?)+$/i,Is=function(t,e,n){var r=e.keep_values,o={set:function(t,r,o){e.url_converter&&null!==r&&(r=e.url_converter.call(e.url_converter_scope||n(),r,o,t[0])),t.attr("data-mce-"+o,r).attr(o,r)},get:function(t,e){return t.attr("data-mce-"+e)||t.attr(e)}},i={style:{set:function(e,n){null===n||"object"!==typeof n?(r&&e.attr("data-mce-style",n),null!==n&&"string"===typeof n?(e.removeAttr("style"),e.css(t.parse(n))):e.attr("style",n)):e.css(n)},get:function(e){var n=e.attr("data-mce-style")||e.attr("style");return n=t.serialize(t.parse(n),e[0].nodeName),n}}};return r&&(i.href=i.src=o),i},Ps=function(t,e){var n=e.attr("style"),r=t.serialize(t.parse(n),e[0].nodeName);r||(r=null),e.attr("data-mce-style",r)},Fs=function(t,e){var n,r,o=0;if(t)for(n=t.nodeType,t=t.previousSibling;t;t=t.previousSibling)r=t.nodeType,(!e||3!==r||r!==n&&t.nodeValue.length)&&(o++,n=r);return o},Vs=function(t,e){void 0===e&&(e={});var n={},r=window,o={},i=0,u=!0,a=!0,c=Pi.forElement(wn.fromDom(t),{contentCssCors:e.contentCssCors,referrerPolicy:e.referrerPolicy}),s=[],l=e.schema?e.schema:Va({}),f=ja({url_converter:e.url_converter,url_converter_scope:e.url_converter_scope},e.schema),d=e.ownEvents?new rc:rc.Event,m=l.getBlockElements(),g=Ns.overrideDefaults((function(){return{context:t,element:Mt.getRoot()}})),h=function(t){if("string"===typeof t)return!!m[t];if(t){var e=t.nodeType;if(e)return!(1!==e||!m[t.nodeName])}return!1},p=function(e){return e&&t&&v(e)?t.getElementById(e):e},b=function(t){return g("string"===typeof t?p(t):t)},y=function(t,e,n){var r,o,i=b(t);return i.length&&(r=Rt[e],o=r&&r.get?r.get(i,e):i.attr(e)),"undefined"===typeof o&&(o=n||""),o},w=function(t){var e=p(t);return e?e.attributes:[]},x=function(t,n,r){""===r&&(r=null);var o=b(t),i=o.attr(n);if(o.length){var u=Rt[n];u&&u.set?u.set(o,r,n):o.attr(n,r),i!==r&&e.onSetAttrib&&e.onSetAttrib({attrElm:o,attrName:n,attrValue:r})}},C=function(e,n){if(!Ls||1!==e.nodeType||n)return e.cloneNode(n);var r=t.createElement(e.nodeName);return zs(w(e),(function(t){x(r,t.nodeName,y(e,t.nodeName))})),r},k=function(){return e.root_element||t.body},T=function(t){var e=Fr(t);return{x:e.x,y:e.y,w:e.width,h:e.height}},O=function(e,n){return Bo(t.body,p(e),n)},_=function(t,n,r){var o=v(n)?b(t).css(n,r):b(t).css(n);e.update_styles&&Ps(f,o)},A=function(t,n){var r=b(t).css(n);e.update_styles&&Ps(f,r)},M=function(t,e,n){var r=b(t);return n?r.css(e):(e=e.replace(/-(\D)/g,(function(t,e){return e.toUpperCase()})),"float"===e&&(e=tn.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[e]:void 0)},R=function(t){var e,n;return t=p(t),e=M(t,"width"),n=M(t,"height"),-1===e.indexOf("px")&&(e=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(e,10)||t.offsetWidth||t.clientWidth,h:parseInt(n,10)||t.offsetHeight||t.clientHeight}},N=function(t){t=p(t);var e=O(t),n=R(t);return{x:e.x,y:e.y,w:n.w,h:n.h}},z=function(t,e){var n;if(!t)return!1;if(!Array.isArray(t)){if("*"===e)return 1===t.nodeType;if(Hs.test(e)){var r=e.toLowerCase().split(/,/),o=t.nodeName.toLowerCase();for(n=r.length-1;n>=0;n--)if(r[n]===o)return!0;return!1}if(t.nodeType&&1!==t.nodeType)return!1}var i=Array.isArray(t)?t:[t];return Vc(e,i[0].ownerDocument||i[0],null,i).length>0},B=function(t,e,n,r){var o,i=[],u=p(t);r=void 0===r,n=n||("BODY"!==k().nodeName?k().parentNode:null),gn.is(e,"string")&&(o=e,e="*"===e?function(t){return 1===t.nodeType}:function(t){return z(t,o)});while(u){if(u===n||S(u.nodeType)||eo(u)||no(u))break;if(!e||"function"===typeof e&&e(u)){if(!r)return[u];i.push(u)}u=u.parentNode}return r?i:null},L=function(t,e,n){var r=B(t,e,n,!1);return r&&r.length>0?r[0]:null},H=function(t,e,n){var r=e;if(t)for("string"===typeof e&&(r=function(t){return z(t,e)}),t=t[n];t;t=t[n])if("function"===typeof r&&r(t))return t;return null},I=function(t,e){return H(t,e,"nextSibling")},P=function(t,e){return H(t,e,"previousSibling")},F=function(n,r){return Vc(n,p(r)||e.root_element||t,[])},V=function(t,e,n){var r,o="string"===typeof t?p(t):t;if(!o)return!1;if(gn.isArray(o)&&(o.length||0===o.length))return r=[],zs(o,(function(t,o){t&&r.push(e.call(n,"string"===typeof t?p(t):t,o))})),r;var i=n||this;return e.call(i,o)},U=function(t,e){b(t).each((function(t,n){zs(e,(function(t,e){x(n,e,t)}))}))},j=function(t,e){var n=b(t);Ls?n.each((function(t,n){if(!1!==n.canHaveHTML){while(n.firstChild)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+e,n.removeChild(n.firstChild)}catch(r){Ns("<div></div>").html("<br>"+e).contents().slice(1).appendTo(n)}return e}})):n.html(e)},W=function(e,n,r,o,i){return V(e,(function(e){var u="string"===typeof n?t.createElement(n):n;return U(u,r),o&&("string"!==typeof o&&o.nodeType?u.appendChild(o):"string"===typeof o&&j(u,o)),i?u:e.appendChild(u)}))},q=function(e,n,r){return W(t.createElement(e),e,n,r,!0)},$=_a.decode,G=_a.encodeAllRaw,K=function(t,e,n){var r,o="";for(r in o+="<"+t,e)Nt(e,r)&&(o+=" "+r+'="'+G(e[r])+'"');return"undefined"!==typeof n?o+">"+n+"</"+t+">":o+" />"},X=function(e){var n,r=t.createElement("div"),o=t.createDocumentFragment();o.appendChild(r),e&&(r.innerHTML=e);while(n=r.firstChild)o.appendChild(n);return o.removeChild(r),o},Y=function(t,e){var n=b(t);return e?n.each((function(){var t;while(t=this.firstChild)3===t.nodeType&&0===t.data.length?this.removeChild(t):this.parentNode.insertBefore(t,this)})).remove():n.remove(),n.length>1?n.toArray():n[0]},J=function(t){return V(t,(function(t){var e,n=t.attributes;for(e=n.length-1;e>=0;e--)t.removeAttributeNode(n.item(e))}))},Q=function(t){return f.parse(t)},tt=function(t,e){return f.serialize(t,e)},et=function(e){var r,o;if(Mt!==Vs.DOM&&t===document){if(n[e])return;n[e]=!0}o=t.getElementById("mceDefaultStyles"),o||(o=t.createElement("style"),o.id="mceDefaultStyles",o.type="text/css",r=t.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)),o.styleSheet?o.styleSheet.cssText+=e:o.appendChild(t.createTextNode(e))},nt=function(t){t||(t=""),Z(t.split(","),(function(t){o[t]=!0,c.load(t,E)}))},rt=function(t,e,n){b(t).toggleClass(e,n).each((function(){""===this.className&&Ns(this).attr("class",null)}))},ot=function(t,e){b(t).addClass(e)},it=function(t,e){rt(t,e,!1)},ut=function(t,e){return b(t).hasClass(e)},at=function(t){b(t).show()},ct=function(t){b(t).hide()},st=function(t){return"none"===b(t).css("display")},lt=function(t){return(t||"mce_")+i++},ft=function(t){var e="string"===typeof t?p(t):t;return jr(e)?e.outerHTML:Ns("<div></div>").append(Ns(e).clone()).html()},dt=function(t,e){b(t).each((function(){try{if("outerHTML"in this)return void(this.outerHTML=e)}catch(t){}Y(Ns(this).html(e),!0)}))},mt=function(t,e){var n=p(e);return V(t,(function(t){var e=n.parentNode,r=n.nextSibling;return r?e.insertBefore(t,r):e.appendChild(t),t}))},gt=function(t,e,n){return V(e,(function(e){return gn.is(e,"array")&&(t=t.cloneNode(!0)),n&&zs(Bs(e.childNodes),(function(e){t.appendChild(e)})),e.parentNode.replaceChild(t,e)}))},ht=function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=q(e),zs(w(t),(function(e){x(n,e.nodeName,y(t,e.nodeName))})),gt(n,t,!0)),n||t},pt=function(t,e){var n,r=t;while(r){n=e;while(n&&r!==n)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&t.ownerDocument?t.ownerDocument.documentElement:r},vt=function(t){return f.toHex(gn.trim(t))},bt=function(t){if(jr(t)){var e="a"===t.nodeName.toLowerCase()&&!y(t,"href")&&y(t,"id");if(y(t,"name")||y(t,"data-mce-bookmark")||e)return!0}return!1},yt=function(t,e){var n,r,o=0;if(bt(t))return!1;if(t=t.firstChild,t){var i=new Fi(t,t.parentNode),u=l?l.getWhiteSpaceElements():{};e=e||(l?l.getNonEmptyElements():null);do{if(n=t.nodeType,jr(t)){var a=t.getAttribute("data-mce-bogus");if(a){t=i.next("all"===a);continue}if(r=t.nodeName.toLowerCase(),e&&e[r]){if("br"===r){o++,t=i.next();continue}return!1}if(bt(t))return!1}if(8===n)return!1;if(3===n&&!Gu(t.nodeValue))return!1;if(3===n&&t.parentNode&&u[t.parentNode.nodeName]&&Gu(t.nodeValue))return!1;t=i.next()}while(t)}return o<=1},wt=function(){return t.createRange()},xt=function(t,e,n){var r,o,i,u=wt();if(t&&e)return u.setStart(t.parentNode,Fs(t)),u.setEnd(e.parentNode,Fs(e)),r=u.extractContents(),u=wt(),u.setStart(e.parentNode,Fs(e)+1),u.setEnd(t.parentNode,Fs(t)+1),o=u.extractContents(),i=t.parentNode,i.insertBefore(la(Mt,r),t),n?i.insertBefore(n,t):i.insertBefore(e,t),i.insertBefore(la(Mt,o),t),Y(t),n||e},St=function(n,o,i,u){if(gn.isArray(n)){var a=n.length,c=[];while(a--)c[a]=St(n[a],o,i,u);return c}!e.collect||n!==t&&n!==r||s.push([n,o,i,u]);var l=d.bind(n,o,i,u||Mt);return l},kt=function(e,n,o){if(gn.isArray(e)){var i=e.length,u=[];while(i--)u[i]=kt(e[i],n,o);return u}if(s.length>0&&(e===t||e===r)){i=s.length;while(i--){var a=s[i];e!==a[0]||n&&n!==a[1]||o&&o!==a[2]||d.unbind(a[0],a[1],a[2])}}return d.unbind(e,n,o)},Tt=function(t,e,n){return d.fire(t,e,n)},Ot=function(t){if(t&&jr(t)){var e=t.getAttribute("data-mce-contenteditable");return e&&"inherit"!==e?e:"inherit"!==t.contentEditable?t.contentEditable:null}return null},Et=function(t){for(var e=k(),n=null;t&&t!==e;t=t.parentNode)if(n=Ot(t),null!==n)break;return n},_t=function(){if(s.length>0){var t=s.length;while(t--){var e=s[t];d.unbind(e[0],e[1],e[2])}}Ct(o,(function(t,e){c.unload(e),delete o[e]})),Vc.setDocument&&Vc.setDocument()},At=function(t,e){if(Ls){while(t){if(e===t)return!0;t=t.parentNode}return!1}return t===e||e.contains(t)},Dt=function(t){return"startContainer: "+t.startContainer.nodeName+", startOffset: "+t.startOffset+", endContainer: "+t.endContainer.nodeName+", endOffset: "+t.endOffset},Mt={doc:t,settings:e,win:r,files:o,stdMode:u,boxModel:a,styleSheetLoader:c,boundEvents:s,styles:f,schema:l,events:d,isBlock:h,$:g,$$:b,root:null,clone:C,getRoot:k,getViewPort:T,getRect:N,getSize:R,getParent:L,getParents:B,get:p,getNext:I,getPrev:P,select:F,is:z,add:W,create:q,createHTML:K,createFragment:X,remove:Y,setStyle:_,getStyle:M,setStyles:A,removeAllAttribs:J,setAttrib:x,setAttribs:U,getAttrib:y,getPos:O,parseStyle:Q,serializeStyle:tt,addStyle:et,loadCSS:nt,addClass:ot,removeClass:it,hasClass:ut,toggleClass:rt,show:at,hide:ct,isHidden:st,uniqueId:lt,setHTML:j,getOuterHTML:ft,setOuterHTML:dt,decode:$,encode:G,insertAfter:mt,replace:gt,rename:ht,findCommonAncestor:pt,toHex:vt,run:V,getAttribs:w,isEmpty:yt,createRng:wt,nodeIndex:Fs,split:xt,bind:St,unbind:kt,fire:Tt,getContentEditable:Ot,getContentEditableParent:Et,destroy:_t,isChildOf:At,dumpRng:Dt},Rt=Is(f,e,D(Mt));return Mt};Vs.DOM=Vs(document),Vs.nodeIndex=Fs;var Us=Vs.DOM,js=gn.each,Ws=gn.grep,qs=0,$s=1,Gs=2,Ks=3,Xs=function(){function t(t){void 0===t&&(t={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=t}return t.prototype._setReferrerPolicy=function(t){this.settings.referrerPolicy=t},t.prototype.loadScript=function(t,e,n){var r,o=Us,i=function(){o.remove(c),r&&(r.onerror=r.onload=r=null)},u=function(){i(),e()},a=function(){i(),T(n)?n():"undefined"!==typeof console&&console.log&&console.log("Failed to load script: "+t)},c=o.uniqueId();r=document.createElement("script"),r.id=c,r.type="text/javascript",r.src=gn._addCacheSuffix(t),this.settings.referrerPolicy&&o.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=u,r.onerror=a,(document.getElementsByTagName("head")[0]||document.body).appendChild(r)},t.prototype.isDone=function(t){return this.states[t]===Gs},t.prototype.markDone=function(t){this.states[t]=Gs},t.prototype.add=function(t,e,n,r){var o=this.states[t];this.queue.push(t),void 0===o&&(this.states[t]=qs),e&&(this.scriptLoadedCallbacks[t]||(this.scriptLoadedCallbacks[t]=[]),this.scriptLoadedCallbacks[t].push({success:e,failure:r,scope:n||this}))},t.prototype.load=function(t,e,n,r){return this.add(t,e,n,r)},t.prototype.remove=function(t){delete this.states[t],delete this.scriptLoadedCallbacks[t]},t.prototype.loadQueue=function(t,e,n){this.loadScripts(this.queue,t,e,n)},t.prototype.loadScripts=function(t,e,n,r){var o=this,i=[],u=function(t,e){js(o.scriptLoadedCallbacks[e],(function(e){T(e[t])&&e[t].call(e.scope)})),o.scriptLoadedCallbacks[e]=void 0};o.queueLoadedCallbacks.push({success:e,failure:r,scope:n||this});var a=function(){var e=Ws(t);if(t.length=0,js(e,(function(t){o.states[t]!==Gs?o.states[t]!==Ks?o.states[t]!==$s&&(o.states[t]=$s,o.loading++,o.loadScript(t,(function(){o.states[t]=Gs,o.loading--,u("success",t),a()}),(function(){o.states[t]=Ks,o.loading--,i.push(t),u("failure",t),a()}))):u("failure",t):u("success",t)})),!o.loading){var n=o.queueLoadedCallbacks.slice(0);o.queueLoadedCallbacks.length=0,js(n,(function(t){0===i.length?T(t.success)&&t.success.call(t.scope):T(t.failure)&&t.failure.call(t.scope,i)}))}};a()},t.ScriptLoader=new t,t}(),Ys=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},Js=function(t){return b(t)&&Rt(t,"raw")},Qs=function(t){return y(t)&&t.length>1},Zs={},tl=Ys("en"),el=function(){return Mt(Zs,tl.get())},nl=function(){return St(Zs,(function(t){return Wt({},t)}))},rl=function(t){t&&tl.set(t)},ol=function(){return tl.get()},il=function(t,e){var n=Zs[t];n||(Zs[t]=n={}),Ct(e,(function(t,e){n[e.toLowerCase()]=t}))},ul=function(t){var e=el().getOr({}),n=function(t){return T(t)?Object.prototype.toString.call(t):r(t)?"":""+t},r=function(t){return""===t||null===t||void 0===t},o=function(t){var r=n(t);return Mt(e,r.toLowerCase()).map(n).getOr(r)},i=function(t){return t.replace(/{context:\w+}$/,"")};if(r(t))return"";if(Js(t))return n(t.raw);if(Qs(t)){var u=t.slice(1),a=o(t[0]).replace(/\{([0-9]+)\}/g,(function(t,e){return Rt(u,e)?n(u[e]):t}));return i(a)}return i(o(t))},al=function(){return el().bind((function(t){return Mt(t,"_dir")})).exists((function(t){return"rtl"===t}))},cl=function(t){return Rt(Zs,t)},sl={getData:nl,setCode:rl,getCode:ol,add:il,translate:ul,isRtl:al,hasCode:cl},ll=function(){var t=[],e={},n={},r=[],o=function(t,e){var n=nt(r,(function(n){return n.name===t&&n.state===e}));Z(n,(function(t){return t.callback()}))},i=function(t){if(n[t])return n[t].instance},u=function(t){var e;return n[t]&&(e=n[t].dependencies),e||[]},a=function(t,n){!1!==ll.languageLoad&&g(t,(function(){var r=sl.getCode(),o=","+(n||"")+",";!r||n&&-1===o.indexOf(","+r+",")||Xs.ScriptLoader.add(e[t]+"/langs/"+r+".js")}),"loaded")},c=function(e,r,i){var u=r;return t.push(u),n[e]={instance:u,dependencies:i},o(e,"added"),u},s=function(t){delete e[t],delete n[t]},l=function(t,e){return"object"===typeof e?e:"string"===typeof t?{prefix:"",resource:e,suffix:""}:{prefix:t.prefix,resource:e,suffix:t.suffix}},f=function(t,n){var r=e[t];Z(n,(function(t){Xs.ScriptLoader.add(r+"/"+t)}))},d=function(t,e,n,r){var o=u(t);Z(o,(function(t){var n=l(e,t);m(n.resource,n,void 0,void 0)})),n&&(r?n.call(r):n.call(Xs))},m=function(t,r,i,u,a){if(!e[t]){var c="string"===typeof r?r:r.prefix+r.resource+r.suffix;0!==c.indexOf("/")&&-1===c.indexOf("://")&&(c=ll.baseURL+"/"+c),e[t]=c.substring(0,c.lastIndexOf("/"));var s=function(){o(t,"loaded"),d(t,r,i,u)};n[t]?s():Xs.ScriptLoader.add(c,s,u,a)}},g=function(t,o,i){void 0===i&&(i="added"),Rt(n,t)&&"added"===i||Rt(e,t)&&"loaded"===i?o():r.push({name:t,state:i,callback:o})};return{items:t,urls:e,lookup:n,_listeners:r,get:i,dependencies:u,requireLangPack:a,add:c,remove:s,createUrl:l,addComponents:f,load:m,waitFor:g}};ll.languageLoad=!0,ll.baseURL="",ll.PluginManager=ll(),ll.ThemeManager=ll();var fl=function(t){var e=Ys(W.none()),n=function(){return e.get().each(t)},r=function(){n(),e.set(W.none())},o=function(){return e.get().isSome()},i=function(){return e.get()},u=function(t){n(),e.set(W.some(t))};return{clear:r,isSet:o,get:i,set:u}},dl=function(){var t=fl(E),e=function(e){return t.get().each(e)};return Wt(Wt({},t),{on:e})},ml=function(t,e){var n=null,r=function(){w(n)||(clearTimeout(n),n=null)},o=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];w(n)&&(n=setTimeout((function(){n=null,t.apply(null,r)}),e))};return{cancel:r,throttle:o}},gl=function(t,e){var n=null,r=function(){w(n)||(clearTimeout(n),n=null)},o=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r(),n=setTimeout((function(){n=null,t.apply(null,o)}),e)};return{cancel:r,throttle:o}},hl=function(t,e){var n=yo(t,e);return void 0===n||""===n?[]:n.split(" ")},pl=function(t,e,n){var r=hl(t,e),o=r.concat([n]);return vo(t,e,o.join(" ")),!0},vl=function(t,e,n){var r=nt(hl(t,e),(function(t){return t!==n}));return r.length>0?vo(t,e,r.join(" ")):Co(t,e),!1},bl=function(t){return void 0!==t.dom.classList},yl=function(t){return hl(t,"class")},wl=function(t,e){return pl(t,"class",e)},xl=function(t,e){return vl(t,"class",e)},Cl=function(t,e){bl(t)?t.dom.classList.add(e):wl(t,e)},Sl=function(t){var e=bl(t)?t.dom.classList:yl(t);0===e.length&&Co(t,"class")},kl=function(t,e){if(bl(t)){var n=t.dom.classList;n.remove(e)}else xl(t,e);Sl(t)},Tl=function(t,e){return bl(t)&&t.dom.classList.contains(e)},Ol=function(t,e){var n=[];return Z(rr(t),(function(t){e(t)&&(n=n.concat([t])),n=n.concat(Ol(t,e))})),n},El=function(t,e){return Mn(e,t)},_l=D("mce-annotation"),Al=D("data-mce-annotation"),Dl=D("data-mce-annotation-uid"),Ml=function(t,e){var n=t.selection.getRng(),r=wn.fromDom(n.startContainer),o=wn.fromDom(t.getBody()),i=e.fold((function(){return"."+_l()}),(function(t){return"["+Al()+'="'+t+'"]'})),u=or(r,n.startOffset).getOr(r),a=_i(u,i,(function(t){return Nn(t,o)})),c=function(t,e){return xo(t,e)?W.some(yo(t,e)):W.none()};return a.bind((function(e){return c(e,""+Dl()).bind((function(n){return c(e,""+Al()).map((function(e){var r=Nl(t,n);return{uid:n,name:e,elements:r}}))}))}))},Rl=function(t){return Vn(t)&&Tl(t,_l())},Nl=function(t,e){var n=wn.fromDom(t.getBody());return El(n,"["+Dl()+'="'+e+'"]')},zl=function(t,e){var n=wn.fromDom(t.getBody()),r=El(n,"["+Al()+'="'+e+'"]'),o={};return Z(r,(function(t){var e=yo(t,Dl()),n=Mt(o,e).getOr([]);o[e]=n.concat([t])})),o},Bl=function(t,e){var n=Ys({}),r=function(){return{listeners:[],previous:dl()}},o=function(t,e){i(t,(function(t){return e(t),t}))},i=function(t,e){var o=n.get(),i=Mt(o,t).getOrThunk(r),u=e(i);o[t]=u,n.set(o)},u=function(t,e,n){o(t,(function(r){Z(r.listeners,(function(r){return r(!0,t,{uid:e,nodes:Q(n,(function(t){return t.dom}))})}))}))},a=function(t){o(t,(function(e){Z(e.listeners,(function(e){return e(!1,t)}))}))},c=gl((function(){var e=n.get(),r=gt(wt(e));Z(r,(function(e){i(e,(function(n){var r=n.previous.get();return Ml(t,W.some(e)).fold((function(){r.isSome()&&(a(e),n.previous.clear())}),(function(t){var e=t.uid,o=t.name,i=t.elements;so(r,e)||(u(o,e,i),n.previous.set(e))})),{previous:n.previous,listeners:n.listeners}}))}))}),30);t.on("remove",(function(){c.cancel()})),t.on("NodeChange",(function(){c.throttle()}));var s=function(t,e){i(t,(function(t){return{previous:t.previous,listeners:t.listeners.concat([e])}}))};return{addListener:s}},Ll=function(t,e){var n=function(t){return W.from(t.attr(Al())).bind(e.lookup)};t.on("init",(function(){t.serializer.addNodeFilter("span",(function(t){Z(t,(function(t){n(t).each((function(e){!1===e.persistent&&t.unwrap()}))}))}))}))},Hl=function(){var t={},e=function(e,n){t[e]={name:e,settings:n}},n=function(e){return Mt(t,e).map((function(t){return t.settings}))};return{register:e,lookup:n}},Il=0,Pl=function(t){var e=new Date,n=e.getTime(),r=Math.floor(1e9*Math.random());return Il++,t+"_"+r+Il+String(n)},Fl=function(t,e){Z(e,(function(e){Cl(t,e)}))},Vl=function(t,e){var n=e||document,r=n.createElement("div");return r.innerHTML=t,rr(wn.fromDom(r))},Ul=function(t){return Q(t,wn.fromDom)},jl=function(t){return t.dom.innerHTML},Wl=function(t,e){var n=$n(t),r=n.dom,o=wn.fromDom(r.createDocumentFragment()),i=Vl(e,r);kr(o,i),Tr(t),xr(t,o)},ql=function(t,e){return wn.fromDom(t.dom.cloneNode(e))},$l=function(t){return ql(t,!1)},Gl=function(t){return ql(t,!0)},Kl=function(t,e,n){void 0===n&&(n=I);var r=new Fi(t,e),o=function(t){var e;do{e=r[t]()}while(e&&!Zr(e)&&!n(e));return W.from(e).filter(Zr)};return{current:function(){return W.from(r.current()).filter(Zr)},next:function(){return o("next")},prev:function(){return o("prev")},prev2:function(){return o("prev2")}}},Xl=function(t,e){var n=e||function(e){return t.isBlock(e)||ro(e)||uo(e)},r=function(t,e,n,o){if(Zr(t)){var i=o(t,e,t.data);if(-1!==i)return W.some({container:t,offset:i})}return n().bind((function(t){return r(t.container,t.offset,n,o)}))},o=function(t,e,o,i){var u=Kl(t,i,n);return r(t,e,(function(){return u.prev().map((function(t){return{container:t,offset:t.length}}))}),o).getOrNull()},i=function(t,e,o,i){var u=Kl(t,i,n);return r(t,e,(function(){return u.next().map((function(t){return{container:t,offset:0}}))}),o).getOrNull()};return{backwards:o,forwards:i}},Yl=Math.round,Jl=function(t){return t?{left:Yl(t.left),top:Yl(t.top),bottom:Yl(t.bottom),right:Yl(t.right),width:Yl(t.width),height:Yl(t.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},Ql=function(t,e){return t=Jl(t),e||(t.left=t.left+t.width),t.right=t.left,t.width=0,t},Zl=function(t,e){return t.left===e.left&&t.top===e.top&&t.bottom===e.bottom&&t.right===e.right},tf=function(t,e,n){return t>=0&&t<=Math.min(e.height,n.height)/2},ef=function(t,e){var n=Math.min(e.height/2,t.height/2);return t.bottom-n<e.top||!(t.top>e.bottom)&&tf(e.top-t.bottom,t,e)},nf=function(t,e){return t.top>e.bottom||!(t.bottom<e.top)&&tf(e.bottom-t.top,t,e)},rf=function(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom},of=function(t,e,n){return Math.min(Math.max(t,e),n)},uf=function(t){var e=t.startContainer,n=t.startOffset;return e.hasChildNodes()&&t.endOffset===n+1?e.childNodes[n]:null},af=function(t,e){if(jr(t)&&t.hasChildNodes()){var n=t.childNodes,r=of(e,0,n.length-1);return n[r]}return t},cf=function(t,e){return e<0&&jr(t)&&t.hasChildNodes()?void 0:af(t,e)},sf=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),lf=function(t){return"string"===typeof t&&t.charCodeAt(0)>=768&&sf.test(t)},ff=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){for(var n=0;n<t.length;n++)if(t[n](e))return!0;return!1}},df=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){for(var n=0;n<t.length;n++)if(!t[n](e))return!1;return!0}},mf=jr,gf=Pu,hf=qr("display","block table"),pf=qr("float","left right"),vf=df(mf,gf,z(pf)),bf=z(qr("white-space","pre pre-line pre-wrap")),yf=Zr,wf=ro,xf=Vs.nodeIndex,Cf=cf,Sf=function(t){return"createRange"in t?t.createRange():Vs.DOM.createRng()},kf=function(t){return t&&/[\r\n\t ]/.test(t)},Tf=function(t){return!!t.setStart&&!!t.setEnd},Of=function(t){var e=t.startContainer,n=t.startOffset;if(kf(t.toString())&&bf(e.parentNode)&&Zr(e)){var r=e.data;if(kf(r[n-1])||kf(r[n+1]))return!0}return!1},Ef=function(t){var e=t.ownerDocument,n=Sf(e),r=e.createTextNode(su),o=t.parentNode;o.insertBefore(r,t),n.setStart(r,0),n.setEnd(r,1);var i=Jl(n.getBoundingClientRect());return o.removeChild(r),i},_f=function(t){var e=t.startContainer,n=t.endContainer,r=t.startOffset,o=t.endOffset;if(e===n&&Zr(n)&&0===r&&1===o){var i=t.cloneRange();return i.setEndAfter(n),Df(i)}return null},Af=function(t){return 0===t.left&&0===t.right&&0===t.top&&0===t.bottom},Df=function(t){var e,n=t.getClientRects();return e=n.length>0?Jl(n[0]):Jl(t.getBoundingClientRect()),!Tf(t)&&wf(t)&&Af(e)?Ef(t):Af(e)&&Tf(t)?_f(t):e},Mf=function(t,e){var n=Ql(t,e);return n.width=1,n.right=n.left+1,n},Rf=function(t){var e=[],n=function(t){0!==t.height&&(e.length>0&&Zl(t,e[e.length-1])||e.push(t))},r=function(t,r){var o=Sf(t.ownerDocument);if(r<t.data.length){if(lf(t.data[r]))return e;if(lf(t.data[r-1])&&(o.setStart(t,r),o.setEnd(t,r+1),!Of(o)))return n(Mf(Df(o),!1)),e}r>0&&(o.setStart(t,r-1),o.setEnd(t,r),Of(o)||n(Mf(Df(o),!1))),r<t.data.length&&(o.setStart(t,r),o.setEnd(t,r+1),Of(o)||n(Mf(Df(o),!0)))},o=t.container(),i=t.offset();if(yf(o))return r(o,i),e;if(mf(o))if(t.isAtEnd()){var u=Cf(o,i);yf(u)&&r(u,u.data.length),vf(u)&&!wf(u)&&n(Mf(Df(u),!1))}else{u=Cf(o,i);if(yf(u)&&r(u,0),vf(u)&&t.isAtEnd())return n(Mf(Df(u),!1)),e;var a=Cf(t.container(),t.offset()-1);vf(a)&&!wf(a)&&(hf(a)||hf(u)||!vf(u))&&n(Mf(Df(a),!1)),vf(u)&&n(Mf(Df(u),!0))}return e},Nf=function(t,e,n){var r=function(){return yf(t),0===e},o=function(){return yf(t)?e>=t.data.length:e>=t.childNodes.length},i=function(){var n=Sf(t.ownerDocument);return n.setStart(t,e),n.setEnd(t,e),n},u=function(){return n||(n=Rf(Nf(t,e))),n},a=function(){return u().length>0},c=function(n){return n&&t===n.container()&&e===n.offset()},s=function(n){return Cf(t,n?e-1:e)};return{container:D(t),offset:D(e),toRange:i,getClientRects:u,isVisible:a,isAtStart:r,isAtEnd:o,isEqual:c,getNode:s}};Nf.fromRangeStart=function(t){return Nf(t.startContainer,t.startOffset)},Nf.fromRangeEnd=function(t){return Nf(t.endContainer,t.endOffset)},Nf.after=function(t){return Nf(t.parentNode,xf(t)+1)},Nf.before=function(t){return Nf(t.parentNode,xf(t))},Nf.isAbove=function(t,e){return fo(pt(e.getClientRects()),vt(t.getClientRects()),ef).getOr(!1)},Nf.isBelow=function(t,e){return fo(vt(e.getClientRects()),pt(t.getClientRects()),nf).getOr(!1)},Nf.isAtStart=function(t){return!!t&&t.isAtStart()},Nf.isAtEnd=function(t){return!!t&&t.isAtEnd()},Nf.isTextPosition=function(t){return!!t&&Zr(t.container())},Nf.isElementPosition=function(t){return!1===Nf.isTextPosition(t)};var zf,Bf=function(t,e){Zr(e)&&0===e.data.length&&t.remove(e)},Lf=function(t,e,n){e.insertNode(n),Bf(t,n.previousSibling),Bf(t,n.nextSibling)},Hf=function(t,e,n){var r=W.from(n.firstChild),o=W.from(n.lastChild);e.insertNode(n),r.each((function(e){return Bf(t,e.previousSibling)})),o.each((function(e){return Bf(t,e.nextSibling)}))},If=function(t,e,n){no(n)?Hf(t,e,n):Lf(t,e,n)},Pf=Zr,Ff=Kr,Vf=Vs.nodeIndex,Uf=function(t){var e=t.parentNode;return Ff(e)?Uf(e):e},jf=function(t){return t?Vt(t.childNodes,(function(t,e){return Ff(e)&&"BR"!==e.nodeName?t=t.concat(jf(e)):t.push(e),t}),[]):[]},Wf=function(t,e){while(t=t.previousSibling){if(!Pf(t))break;e+=t.data.length}return e},qf=function(t){return function(e){return t===e}},$f=function(t){var e,n;e=jf(Uf(t)),n=Ut(e,qf(t),t),e=e.slice(0,n+1);var r=Vt(e,(function(t,n,r){return Pf(n)&&Pf(e[r-1])&&t++,t}),0);return e=Pt(e,Wr([t.nodeName])),n=Ut(e,qf(t),t),n-r},Gf=function(t){var e;return e=Pf(t)?"text()":t.nodeName.toLowerCase(),e+"["+$f(t)+"]"},Kf=function(t,e,n){var r=[];for(e=e.parentNode;e!==t;e=e.parentNode){if(n&&n(e))break;r.push(e)}return r},Xf=function(t,e){var n,r,o,i,u,a=[];return n=e.container(),r=e.offset(),Pf(n)?o=Wf(n,r):(i=n.childNodes,r>=i.length?(o="after",r=i.length-1):o="before",n=i[r]),a.push(Gf(n)),u=Kf(t,n),u=Pt(u,z(Kr)),a=a.concat(It(u,(function(t){return Gf(t)}))),a.reverse().join("/")+","+o},Yf=function(t,e,n){var r=jf(t);return r=Pt(r,(function(t,e){return!Pf(t)||!Pf(r[e-1])})),r=Pt(r,Wr([e])),r[n]},Jf=function(t,e){var n,r=t,o=0;while(Pf(r)){if(n=r.data.length,e>=o&&e<=o+n){t=r,e-=o;break}if(!Pf(r.nextSibling)){t=r,e=n;break}o+=n,r=r.nextSibling}return Pf(t)&&e>t.data.length&&(e=t.data.length),Nf(t,e)},Qf=function(t,e){var n;if(!e)return null;var r=e.split(","),o=r[0].split("/");n=r.length>1?r[1]:"before";var i=Vt(o,(function(t,e){var n=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(e);return n?("text()"===n[1]&&(n[1]="#text"),Yf(t,n[1],parseInt(n[2],10))):null}),t);return i?Pf(i)?Jf(i,parseInt(n,10)):(n="after"===n?Vf(i)+1:Vf(i),Nf(i.parentNode,n)):null},Zf=uo,td=function(t,e,n){var r,o;for(o=t(e.data.slice(0,n)).length,r=e.previousSibling;r&&Zr(r);r=r.previousSibling)o+=t(r.data).length;return o},ed=function(t,e,n,r,o){var i,u=r[o?"startContainer":"endContainer"],a=r[o?"startOffset":"endOffset"],c=[],s=0,l=t.getRoot();for(Zr(u)?c.push(n?td(e,u,a):a):(i=u.childNodes,a>=i.length&&i.length&&(s=1,a=Math.max(0,i.length-1)),c.push(t.nodeIndex(i[a],n)+s));u&&u!==l;u=u.parentNode)c.push(t.nodeIndex(u,n));return c},nd=function(t,e,n,r){var o=e.dom,i={};return i.start=ed(o,t,n,r,!0),e.isCollapsed()||(i.end=ed(o,t,n,r,!1)),Du(r)&&(i.isFakeCaret=!0),i},rd=function(t,e,n){var r=0;return gn.each(t.select(e),(function(t){if("all"!==t.getAttribute("data-mce-bogus"))return t!==n&&void r++})),r},od=function(t,e){var n,r,o,i=e?"start":"end";n=t[i+"Container"],r=t[i+"Offset"],jr(n)&&"TR"===n.nodeName&&(o=n.childNodes,n=o[Math.min(e?r:r-1,o.length-1)],n&&(r=e?0:n.childNodes.length,t["set"+(e?"Start":"End")](n,r)))},id=function(t){return od(t,!0),od(t,!1),t},ud=function(t,e){var n;if(jr(t)&&(t=af(t,e),Zf(t)))return t;if(yu(t)){if(Zr(t)&&vu(t)&&(t=t.parentNode),n=t.previousSibling,Zf(n))return n;if(n=t.nextSibling,Zf(n))return n}},ad=function(t){return ud(t.startContainer,t.startOffset)||ud(t.endContainer,t.endOffset)},cd=function(t,e,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Zf(r)||"IMG"===o)return{name:o,index:rd(n.dom,o,r)};var u=ad(i);return u?(o=u.tagName,{name:o,index:rd(n.dom,o,u)}):nd(t,n,e,i)},sd=function(t){var e=t.getRng();return{start:Xf(t.dom.getRoot(),Nf.fromRangeStart(e)),end:Xf(t.dom.getRoot(),Nf.fromRangeEnd(e))}},ld=function(t){return{rng:t.getRng()}},fd=function(t,e,n){var r={"data-mce-type":"bookmark",id:e,style:"overflow:hidden;line-height:0px"};return n?t.create("span",r,"&#xFEFF;"):t.create("span",r)},dd=function(t,e){var n=t.dom,r=t.getRng(),o=n.uniqueId(),i=t.isCollapsed(),u=t.getNode(),a=u.nodeName;if("IMG"===a)return{name:a,index:rd(n,a,u)};var c=id(r.cloneRange());if(!i){c.collapse(!1);var s=fd(n,o+"_end",e);If(n,c,s)}r=id(r),r.collapse(!0);var l=fd(n,o+"_start",e);return If(n,r,l),t.moveToBookmark({id:o,keep:!0}),{id:o}},md=function(t,e,n){return 2===e?cd(gu,n,t):3===e?sd(t):e?ld(t):dd(t,!1)},gd=N(cd,M,!0),hd=Vs.DOM,pd="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow",vd=function(t,e,n){var r=t.getParam(e,n);if(-1!==r.indexOf("=")){var o=t.getParam(e,"","hash");return Mt(o,t.id).getOr(n)}return r},bd=function(t){return t.getParam("iframe_attrs",{})},yd=function(t){return t.getParam("doctype","<!DOCTYPE html>")},wd=function(t){return t.getParam("document_base_url","")},xd=function(t){return vd(t,"body_id","tinymce")},Cd=function(t){return vd(t,"body_class","")},Sd=function(t){return t.getParam("content_security_policy","")},kd=function(t){return t.getParam("br_in_pre",!0)},Td=function(t){if(t.getParam("force_p_newlines",!1))return"p";var e=t.getParam("forced_root_block","p");return!1===e?"":!0===e?"p":e},Od=function(t){return t.getParam("forced_root_block_attrs",{})},Ed=function(t){return t.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")},_d=function(t){return t.getParam("no_newline_selector","")},Ad=function(t){return t.getParam("keep_styles",!0)},Dd=function(t){return t.getParam("end_container_on_empty_block",!1)},Md=function(t){return gn.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))},Rd=function(t){return gn.explode(t.getParam("font_size_classes",""))},Nd=function(t){return t.getParam("images_dataimg_filter",P,"function")},zd=function(t){return t.getParam("automatic_uploads",!0,"boolean")},Bd=function(t){return t.getParam("images_reuse_filename",!1,"boolean")},Ld=function(t){return t.getParam("images_replace_blob_uris",!0,"boolean")},Hd=function(t){return t.getParam("icons","","string")},Id=function(t){return t.getParam("icons_url","","string")},Pd=function(t){return t.getParam("images_upload_url","","string")},Fd=function(t){return t.getParam("images_upload_base_path","","string")},Vd=function(t){return t.getParam("images_upload_credentials",!1,"boolean")},Ud=function(t){return t.getParam("images_upload_handler",null,"function")},jd=function(t){return t.getParam("content_css_cors",!1,"boolean")},Wd=function(t){return t.getParam("referrer_policy","","string")},qd=function(t){return t.getParam("language","en","string")},$d=function(t){return t.getParam("language_url","","string")},Gd=function(t){return t.getParam("indent_use_margin",!1)},Kd=function(t){return t.getParam("indentation","40px","string")},Xd=function(t){var e=t.getParam("content_css");return v(e)?Q(e.split(","),fe):y(e)?e:!1===e||t.inline?[]:["default"]},Yd=function(t){var e=t.getParam("font_css",[]);return y(e)?e:Q(e.split(","),fe)},Jd=function(t){return t.getParam("directionality",sl.isRtl()?"rtl":void 0)},Qd=function(t){return t.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")},Zd=function(t){var e=t.getParam("object_resizing");return!1!==e&&!tn.iOS&&(v(e)?e:"table,img,figure.image,div,video,iframe")},tm=function(t){return t.getParam("resize_img_proportional",!0,"boolean")},em=function(t){return t.getParam("placeholder",hd.getAttrib(t.getElement(),"placeholder"),"string")},nm=function(t){return t.getParam("event_root")},rm=function(t){return t.getParam("service_message")},om=function(t){return t.getParam("theme")},im=function(t){return t.getParam("validate")},um=function(t){return!1!==t.getParam("inline_boundaries")},am=function(t){return t.getParam("formats")},cm=function(t){var e=t.getParam("preview_styles",pd);return v(e)?e:""},sm=function(t){return t.getParam("format_empty_lines",!1,"boolean")},lm=function(t){return t.getParam("custom_ui_selector","","string")},fm=function(t){return t.getParam("theme_url")},dm=function(t){return t.getParam("inline")},mm=function(t){return t.getParam("hidden_input")},gm=function(t){return t.getParam("submit_patch")},hm=function(t){return"xml"===t.getParam("encoding")},pm=function(t){return t.getParam("add_form_submit_trigger")},vm=function(t){return t.getParam("add_unload_trigger")},bm=function(t){return""!==Td(t)},ym=function(t){return t.getParam("custom_undo_redo_levels",0,"number")},wm=function(t){return t.getParam("disable_nodechange")},xm=function(t){return t.getParam("readonly")},Cm=function(t){return t.getParam("content_css_cors")},Sm=function(t){return t.getParam("plugins","","string")},km=function(t){return t.getParam("external_plugins")},Tm=function(t){return t.getParam("block_unsupported_drop",!0,"boolean")},Om=function(t){return t.getParam("visual",!0,"boolean")},Em=function(t){return t.getParam("visual_table_class","mce-item-table","string")},_m=function(t){return t.getParam("visual_anchor_class","mce-item-anchor","string")},Am=function(t){return t.getParam("iframe_aria_text","Rich Text Area. Press ALT-0 for help.","string")},Dm=jr,Mm=Zr,Rm=function(t){var e=t.parentNode;e&&e.removeChild(t)},Nm=function(t){var e=gu(t);return{count:t.length-e.length,text:e}},zm=function(t){var e;while(-1!==(e=t.data.lastIndexOf(du)))t.deleteData(e,1)},Bm=function(t,e){return Vm(t),e},Lm=function(t,e){var n=Nm(t.data.substr(0,e.offset())),r=Nm(t.data.substr(e.offset())),o=n.text+r.text;return o.length>0?(zm(t),Nf(t,e.offset()-n.count)):e},Hm=function(t,e){var n=e.container(),r=X(bt(n.childNodes),t).map((function(t){return t<e.offset()?Nf(n,e.offset()-1):e})).getOr(e);return Vm(t),r},Im=function(t,e){return Mm(t)&&e.container()===t?Lm(t,e):Bm(t,e)},Pm=function(t,e){return e.container()===t.parentNode?Hm(t,e):Bm(t,e)},Fm=function(t,e){return Nf.isTextPosition(e)?Im(t,e):Pm(t,e)},Vm=function(t){Dm(t)&&yu(t)&&(wu(t)?t.removeAttribute("data-mce-caret"):Rm(t)),Mm(t)&&(zm(t),0===t.data.length&&Rm(t))},Um=qe().browser,jm=uo,Wm=co,qm=ao,$m="*[contentEditable=false],video,audio,embed,object",Gm=function(t,e,n){var r,o,i=Ql(e.getBoundingClientRect(),n);if("BODY"===t.tagName){var u=t.ownerDocument.documentElement;r=t.scrollLeft||u.scrollLeft,o=t.scrollTop||u.scrollTop}else{var a=t.getBoundingClientRect();r=t.scrollLeft-a.left,o=t.scrollTop-a.top}i.left+=r,i.right+=r,i.top+=o,i.bottom+=o,i.width=1;var c=e.offsetWidth-e.clientWidth;return c>0&&(n&&(c*=-1),i.left+=c,i.right+=c),i},Km=function(t){for(var e=El(wn.fromDom(t),$m),n=0;n<e.length;n++){var r=e[n].dom,o=r.previousSibling;if(Eu(o)){var i=o.data;1===i.length?o.parentNode.removeChild(o):o.deleteData(i.length-1,1)}if(o=r.nextSibling,Ou(o)){i=o.data;1===i.length?o.parentNode.removeChild(o):o.deleteData(0,1)}}},Xm=function(t,e,n,r){var o,i,u=dl(),a=Td(t),c=a.length>0?a:"p",s=function(t,r){var o;if(l(),qm(r))return null;if(!n(r))return i=xu(r,t),o=r.ownerDocument.createRange(),Jm(i.nextSibling)?(o.setStart(i,0),o.setEnd(i,0)):(o.setStart(i,1),o.setEnd(i,1)),o;i=Tu(c,r,t);var a=Gm(e,r,t);Ns(i).css("top",a.top);var s=Ns('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(Wt({},a)).appendTo(e)[0];return u.set({caret:s,element:r,before:t}),t&&Ns(s).addClass("mce-visual-caret-before"),f(),o=r.ownerDocument.createRange(),o.setStart(i,0),o.setEnd(i,0),o},l=function(){Km(e),i&&(Vm(i),i=null),u.on((function(t){Ns(t.caret).remove(),u.clear()})),o&&(Li.clearInterval(o),o=void 0)},f=function(){o=Li.setInterval((function(){r()?Ns("div.mce-visual-caret",e).toggleClass("mce-visual-caret-hidden"):Ns("div.mce-visual-caret",e).addClass("mce-visual-caret-hidden")}),500)},d=function(){u.on((function(t){var n=Gm(e,t.element,t.before);Ns(t.caret).css(Wt({},n))}))},m=function(){return Li.clearInterval(o)},g=function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"};return{show:s,hide:l,getCss:g,reposition:d,destroy:m}},Ym=function(){return Um.isIE()||Um.isEdge()||Um.isFirefox()},Jm=function(t){return jm(t)||Wm(t)},Qm=function(t){return Jm(t)||Yr(t)&&Ym()},Zm=uo,tg=co,eg=qr("display","block table table-cell table-caption list-item"),ng=yu,rg=vu,og=jr,ig=Pu,ug=function(t){return t>0},ag=function(t){return t<0},cg=function(t,e){var n;while(n=t(e))if(!rg(n))return n;return null},sg=function(t,e,n,r,o){var i=new Fi(t,r),u=Zm(t)||rg(t);if(ag(e)){if(u&&(t=cg(i.prev.bind(i),!0),n(t)))return t;while(t=cg(i.prev.bind(i),o))if(n(t))return t}if(ug(e)){if(u&&(t=cg(i.next.bind(i),!0),n(t)))return t;while(t=cg(i.next.bind(i),o))if(n(t))return t}return null},lg=function(t,e){while(t&&t!==e){if(eg(t))return t;t=t.parentNode}return null},fg=function(t,e,n){return lg(t.container(),n)===lg(e.container(),n)},dg=function(t,e){if(!e)return null;var n=e.container(),r=e.offset();return og(n)?n.childNodes[r+t]:null},mg=function(t,e){var n=e.ownerDocument.createRange();return t?(n.setStartBefore(e),n.setEndBefore(e)):(n.setStartAfter(e),n.setEndAfter(e)),n},gg=function(t,e,n){return lg(e,t)===lg(n,t)},hg=function(t,e,n){var r=t?"previousSibling":"nextSibling";while(n&&n!==e){var o=n[r];if(ng(o)&&(o=o[r]),Zm(o)||tg(o)){if(gg(e,o,n))return o;break}if(ig(o))break;n=n.parentNode}return null},pg=N(mg,!0),vg=N(mg,!1),bg=function(t,e,n){var r,o=N(hg,!0,e),i=N(hg,!1,e),u=n.startContainer,a=n.startOffset;if(vu(u)){og(u)||(u=u.parentNode);var c=u.getAttribute("data-mce-caret");if("before"===c&&(r=u.nextSibling,Qm(r)))return pg(r);if("after"===c&&(r=u.previousSibling,Qm(r)))return vg(r)}if(!n.collapsed)return n;if(Zr(u)){if(ng(u)){if(1===t){if(r=i(u),r)return pg(r);if(r=o(u),r)return vg(r)}if(-1===t){if(r=o(u),r)return vg(r);if(r=i(u),r)return pg(r)}return n}if(Eu(u)&&a>=u.data.length-1)return 1===t&&(r=i(u),r)?pg(r):n;if(Ou(u)&&a<=1)return-1===t&&(r=o(u),r)?vg(r):n;if(a===u.data.length)return r=i(u),r?pg(r):n;if(0===a)return r=o(u),r?vg(r):n}return n},yg=function(t,e){return W.from(dg(t?0:-1,e)).filter(Zm)},wg=function(t,e,n){var r=bg(t,e,n);return-1===t?Nf.fromRangeStart(r):Nf.fromRangeEnd(r)},xg=function(t){return W.from(t.getNode()).map(wn.fromDom)},Cg=function(t){return W.from(t.getNode(!0)).map(wn.fromDom)},Sg=function(t,e){while(e=t(e))if(e.isVisible())return e;return e},kg=function(t,e){var n=fg(t,e);return!(n||!ro(t.getNode()))||n};(function(t){t[t["Backwards"]=-1]="Backwards",t[t["Forwards"]=1]="Forwards"})(zf||(zf={}));var Tg=uo,Og=Zr,Eg=jr,_g=ro,Ag=Pu,Dg=Wu,Mg=qu,Rg=function(t,e){var n=[];while(t&&t!==e)n.push(t),t=t.parentNode;return n},Ng=function(t,e){return t.hasChildNodes()&&e<t.childNodes.length?t.childNodes[e]:null},zg=function(t,e){if(ug(t)){if(Ag(e.previousSibling)&&!Og(e.previousSibling))return Nf.before(e);if(Og(e))return Nf(e,0)}if(ag(t)){if(Ag(e.nextSibling)&&!Og(e.nextSibling))return Nf.after(e);if(Og(e))return Nf(e,e.data.length)}return ag(t)?_g(e)?Nf.before(e):Nf.after(e):Nf.before(e)},Bg=function(t,e){var n=e.nextSibling;return n&&Ag(n)?Og(n)?Nf(n,0):Nf.before(n):Lg(zf.Forwards,Nf.after(e),t)},Lg=function(t,e,n){var r,o,i,u;if(!Eg(n)||!e)return null;if(e.isEqual(Nf.after(n))&&n.lastChild){if(u=Nf.after(n.lastChild),ag(t)&&Ag(n.lastChild)&&Eg(n.lastChild))return _g(n.lastChild)?Nf.before(n.lastChild):u}else u=e;var a=u.container(),c=u.offset();if(Og(a)){if(ag(t)&&c>0)return Nf(a,--c);if(ug(t)&&c<a.length)return Nf(a,++c);r=a}else{if(ag(t)&&c>0&&(o=Ng(a,c-1),Ag(o)))return!Dg(o)&&(i=sg(o,t,Mg,o),i)?Og(i)?Nf(i,i.data.length):Nf.after(i):Og(o)?Nf(o,o.data.length):Nf.before(o);if(ug(t)&&c<a.childNodes.length&&(o=Ng(a,c),Ag(o)))return _g(o)?Bg(n,o):!Dg(o)&&(i=sg(o,t,Mg,o),i)?Og(i)?Nf(i,0):Nf.before(i):Og(o)?Nf(o,0):Nf.after(o);r=o||u.getNode()}if((ug(t)&&u.isAtEnd()||ag(t)&&u.isAtStart())&&(r=sg(r,t,P,n,!0),Mg(r,n)))return zg(t,r);o=sg(r,t,Mg,n);var s=jt(nt(Rg(a,n),Tg));return!s||o&&s.contains(o)?o?zg(t,o):null:(u=ug(t)?Nf.after(s):Nf.before(s),u)},Hg=function(t){return{next:function(e){return Lg(zf.Forwards,e,t)},prev:function(e){return Lg(zf.Backwards,e,t)}}},Ig=function(t,e,n){var r=t?Nf.before(n):Nf.after(n);return qg(t,e,r)},Pg=function(t){return ro(t)?Nf.before(t):Nf.after(t)},Fg=function(t){return Nf.isTextPosition(t)?0===t.offset():Pu(t.getNode())},Vg=function(t){if(Nf.isTextPosition(t)){var e=t.container();return t.offset()===e.data.length}return Pu(t.getNode(!0))},Ug=function(t,e){return!Nf.isTextPosition(t)&&!Nf.isTextPosition(e)&&t.getNode()===e.getNode(!0)},jg=function(t){return!Nf.isTextPosition(t)&&ro(t.getNode())},Wg=function(t,e,n){return t?!Ug(e,n)&&!jg(e)&&Vg(e)&&Fg(n):!Ug(n,e)&&Fg(e)&&Vg(n)},qg=function(t,e,n){var r=Hg(e);return W.from(t?r.next(n):r.prev(n))},$g=function(t,e,n){return qg(t,e,n).bind((function(r){return fg(n,r,e)&&Wg(t,n,r)?qg(t,e,r):W.some(r)}))},Gg=function(t,e,n,r){return $g(t,e,n).bind((function(n){return r(n)?Gg(t,e,n,r):W.some(n)}))},Kg=function(t,e){var n=t?e.firstChild:e.lastChild;return Zr(n)?W.some(Nf(n,t?0:n.data.length)):n?Pu(n)?W.some(t?Nf.before(n):Pg(n)):Ig(t,e,n):W.none()},Xg=N(qg,!0),Yg=N(qg,!1),Jg=N(Kg,!0),Qg=N(Kg,!1),Zg="_mce_caret",th=function(t){return jr(t)&&t.id===Zg},eh=function(t,e){while(e&&e!==t){if(e.id===Zg)return e;e=e.parentNode}return null},nh=function(t){return v(t.start)},rh=function(t){return Rt(t,"rng")},oh=function(t){return Rt(t,"id")},ih=function(t){return Rt(t,"name")},uh=function(t){return gn.isArray(t.start)},ah=function(t,e){return jr(e)&&t.isBlock(e)&&!e.innerHTML&&!tn.ie&&(e.innerHTML='<br data-mce-bogus="1" />'),e},ch=function(t,e){var n,r=t.createRng();return n=Qf(t.getRoot(),e.start),r.setStart(n.container(),n.offset()),n=Qf(t.getRoot(),e.end),r.setEnd(n.container(),n.offset()),r},sh=function(t,e){var n=t.ownerDocument.createTextNode(du);t.appendChild(n),e.setStart(n,0),e.setEnd(n,0)},lh=function(t){return!1===t.hasChildNodes()},fh=function(t,e){return Qg(t).fold(I,(function(t){return e.setStart(t.container(),t.offset()),e.setEnd(t.container(),t.offset()),!0}))},dh=function(t,e,n){return!(!lh(e)||!eh(t,e))&&(sh(e,n),!0)},mh=function(t,e,n,r){var o,i,u,a,c=n[e?"start":"end"],s=t.getRoot();if(c){for(u=c[0],i=s,o=c.length-1;o>=1;o--){if(a=i.childNodes,dh(s,i,r))return!0;if(c[o]>a.length-1)return!!dh(s,i,r)||fh(i,r);i=a[c[o]]}3===i.nodeType&&(u=Math.min(c[0],i.nodeValue.length)),1===i.nodeType&&(u=Math.min(c[0],i.childNodes.length)),e?r.setStart(i,u):r.setEnd(i,u)}return!0},gh=function(t){return Zr(t)&&t.data.length>0},hh=function(t,e,n){var r,o,i,u,a,c,s=t.get(n.id+"_"+e),l=n.keep;if(s){if(r=s.parentNode,"start"===e?(l?s.hasChildNodes()?(r=s.firstChild,o=1):gh(s.nextSibling)?(r=s.nextSibling,o=0):gh(s.previousSibling)?(r=s.previousSibling,o=s.previousSibling.data.length):(r=s.parentNode,o=t.nodeIndex(s)+1):o=t.nodeIndex(s),a=r,c=o):(l?s.hasChildNodes()?(r=s.firstChild,o=1):gh(s.previousSibling)?(r=s.previousSibling,o=s.previousSibling.data.length):(r=s.parentNode,o=t.nodeIndex(s)):o=t.nodeIndex(s),a=r,c=o),!l){u=s.previousSibling,i=s.nextSibling,gn.each(gn.grep(s.childNodes),(function(t){Zr(t)&&(t.nodeValue=t.nodeValue.replace(/\uFEFF/g,""))}));while(s=t.get(n.id+"_"+e))t.remove(s,!0);u&&i&&u.nodeType===i.nodeType&&Zr(u)&&!tn.opera&&(o=u.nodeValue.length,u.appendData(i.nodeValue),t.remove(i),a=u,c=o)}return W.some(Nf(a,c))}return W.none()},ph=function(t,e){var n=t.createRng();return mh(t,!0,e,n)&&mh(t,!1,e,n)?W.some(n):W.none()},vh=function(t,e){var n=hh(t,"start",e),r=hh(t,"end",e);return fo(n,r.or(n),(function(e,n){var r=t.createRng();return r.setStart(ah(t,e.container()),e.offset()),r.setEnd(ah(t,n.container()),n.offset()),r}))},bh=function(t,e){return W.from(t.select(e.name)[e.index]).map((function(e){var n=t.createRng();return n.selectNode(e),n}))},yh=function(t,e){var n=t.dom;if(e){if(uh(e))return ph(n,e);if(nh(e))return W.some(ch(n,e));if(oh(e))return vh(n,e);if(ih(e))return bh(n,e);if(rh(e))return W.some(e.rng)}return W.none()},wh=function(t,e,n){return md(t,e,n)},xh=function(t,e){yh(t,e).each((function(e){t.setRng(e)}))},Ch=function(t){return jr(t)&&"SPAN"===t.tagName&&"bookmark"===t.getAttribute("data-mce-type")},Sh=function(t){return function(e){return t===e}},kh=Sh(su),Th=function(t){return""!==t&&-1!==" \f\n\r\t\v".indexOf(t)},Oh=function(t){return!Th(t)&&!kh(t)},Eh=function(t){return!!t.nodeType},_h=function(t){return t&&/^(IMG)$/.test(t.nodeName)},Ah=function(t,e,n){var r=n.startOffset,o=n.startContainer;if((o!==n.endContainer||!_h(o.childNodes[r]))&&jr(o)){var i=o.childNodes,u=void 0;r<i.length?(o=i[r],u=new Fi(o,t.getParent(o,t.isBlock))):(o=i[i.length-1],u=new Fi(o,t.getParent(o,t.isBlock)),u.next(!0));for(var a=u.current();a;a=u.next())if(Zr(a)&&!Nh(a))return n.setStart(a,0),void e.setRng(n)}},Dh=function(t,e,n){if(t){var r=e?"nextSibling":"previousSibling";for(t=n?t:t[r];t;t=t[r])if(jr(t)||!Nh(t))return t}},Mh=function(t,e){return Eh(e)&&(e=e.nodeName),!!t.schema.getTextBlockElements()[e.toLowerCase()]},Rh=function(t,e,n){return t.schema.isValidChild(e,n)},Nh=function(t,e){if(void 0===e&&(e=!1),k(t)&&Zr(t)){var n=e?t.data.replace(/ /g," "):t.data;return Gu(n)}return!1},zh=function(t){return k(t)&&Zr(t)&&0===t.length},Bh=function(t,e){return T(t)?t=t(e):k(e)&&(t=t.replace(/%(\w+)/g,(function(t,n){return e[n]||t}))),t},Lh=function(t,e){return t=t||"",e=e||"",t=""+(t.nodeName||t),e=""+(e.nodeName||e),t.toLowerCase()===e.toLowerCase()},Hh=function(t,e,n){return"color"!==n&&"backgroundColor"!==n||(e=t.toHex(e)),"fontWeight"===n&&700===e&&(e="bold"),"fontFamily"===n&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e},Ih=function(t,e,n){return Hh(t,t.getStyle(e,n),n)},Ph=function(t,e){var n;return t.getParent(e,(function(e){return n=t.getStyle(e,"text-decoration"),n&&"none"!==n})),n},Fh=function(t,e,n){return t.getParents(e,n,t.getRoot())},Vh=function(t,e){var n=function(t){var e=function(t){return t.length>1&&"%"===t.charAt(0)};return J(["styles","attributes"],(function(n){return Mt(t,n).exists((function(t){var n=y(t)?t:Dt(t);return J(n,e)}))}))};return J(t.formatter.get(e),n)},Uh=function(t,e,n){var r=["inline","block","selector","attributes","styles","classes"],o=function(t){return _t(t,(function(t,e){return J(r,(function(t){return t===e}))}))};return J(t.formatter.get(e),(function(e){var r=o(e);return J(t.formatter.get(n),(function(t){var e=o(t);return zt(r,e)}))}))},jh=function(t){return Nt(t,"block")},Wh=function(t){return Nt(t,"selector")},qh=function(t){return Nt(t,"inline")},$h=function(t){return Wh(t)&&qh(t)&&so(Mt(t,"mixed"),!0)},Gh=function(t){return Wh(t)&&!1!==t.expand&&!qh(t)},Kh=Ch,Xh=Fh,Yh=Nh,Jh=Mh,Qh=function(t){return ro(t)&&t.getAttribute("data-mce-bogus")&&!t.nextSibling},Zh=function(t,e){var n=e;while(n){if(jr(n)&&t.getContentEditable(n))return"false"===t.getContentEditable(n)?n:e;n=n.parentNode}return e},tp=function(t,e,n,r){for(var o=e.data,i=n;t?i>=0:i<o.length;t?i--:i++)if(r(o.charAt(i)))return t?i+1:i;return-1},ep=function(t,e,n){return tp(t,e,n,(function(t){return kh(t)||Th(t)}))},np=function(t,e,n){return tp(t,e,n,Oh)},rp=function(t,e,n,r,o,i){var u,a=t.getParent(n,t.isBlock)||e,c=function(e,n,r){var i=Xl(t),c=o?i.backwards:i.forwards;return W.from(c(e,n,(function(t,e){return Kh(t.parentNode)?-1:(u=t,r(o,t,e))}),a))},s=c(n,r,ep);return s.bind((function(t){return i?c(t.container,t.offset+(o?-1:0),np):W.some(t)})).orThunk((function(){return u?W.some({container:u,offset:o?0:u.length}):W.none()}))},op=function(t,e,n,r,o){Zr(r)&&he(r.data)&&r[o]&&(r=r[o]);for(var i=Xh(t,r),u=0;u<i.length;u++)for(var a=0;a<e.length;a++){var c=e[a];if((!k(c.collapsed)||c.collapsed===n.collapsed)&&(Wh(c)&&t.is(i[u],c.selector)))return i[u]}return r},ip=function(t,e,n,r){var o=n,i=t.dom,u=i.getRoot(),a=e[0];if(jh(a)&&(o=a.wrapper?null:i.getParent(n,a.block,u)),!o){var c=i.getParent(n,"LI,TD,TH");o=i.getParent(Zr(n)?n.parentNode:n,(function(e){return e!==u&&Jh(t,e)}),c)}if(o&&jh(a)&&a.wrapper&&(o=Xh(i,o,"ul,ol").reverse()[0]||o),!o){o=n;while(o[r]&&!i.isBlock(o[r]))if(o=o[r],Lh(o,"br"))break}return o||n},up=function(t,e,n,r){var o=n.parentNode;return!k(n[r])&&(!(o!==e&&!S(o)&&!t.isBlock(o))||up(t,e,o,r))},ap=function(t,e,n,r,o){var i=n,u=o?"previousSibling":"nextSibling",a=t.getRoot();if(Zr(n)&&!Yh(n)&&(o?r>0:r<n.data.length))return n;while(1){if(!e[0].block_expand&&t.isBlock(i))return i;for(var c=i[u];c;c=c[u]){var s=Zr(c)&&!up(t,a,c,u);if(!Kh(c)&&!Qh(c)&&!Yh(c,s))return i}if(i===a||i.parentNode===a){n=i;break}i=i.parentNode}return n},cp=function(t){return Kh(t.parentNode)||Kh(t)},sp=function(t,e,n,r){void 0===r&&(r=!1);var o=e.startContainer,i=e.startOffset,u=e.endContainer,a=e.endOffset,c=t.dom,s=n[0];if(jr(o)&&o.hasChildNodes()&&(o=af(o,i),Zr(o)&&(i=0)),jr(u)&&u.hasChildNodes()&&(u=af(u,e.collapsed?a:a-1),Zr(u)&&(a=u.nodeValue.length)),o=Zh(c,o),u=Zh(c,u),cp(o)&&(o=Kh(o)?o:o.parentNode,o=e.collapsed?o.previousSibling||o:o.nextSibling||o,Zr(o)&&(i=e.collapsed?o.length:0)),cp(u)&&(u=Kh(u)?u:u.parentNode,u=e.collapsed?u.nextSibling||u:u.previousSibling||u,Zr(u)&&(a=e.collapsed?0:u.length)),e.collapsed){var l=rp(c,t.getBody(),o,i,!0,r);l.each((function(t){var e=t.container,n=t.offset;o=e,i=n}));var f=rp(c,t.getBody(),u,a,!1,r);f.each((function(t){var e=t.container,n=t.offset;u=e,a=n}))}return(qh(s)||s.block_expand)&&(qh(s)&&Zr(o)&&0!==i||(o=ap(c,n,o,i,!0)),qh(s)&&Zr(u)&&a!==u.nodeValue.length||(u=ap(c,n,u,a,!1))),Gh(s)&&(o=op(c,n,e,o,"previousSibling"),u=op(c,n,e,u,"nextSibling")),(jh(s)||Wh(s))&&(o=ip(t,n,o,"previousSibling"),u=ip(t,n,u,"nextSibling"),jh(s)&&(c.isBlock(o)||(o=ap(c,n,o,i,!0)),c.isBlock(u)||(u=ap(c,n,u,a,!1)))),jr(o)&&(i=c.nodeIndex(o),o=o.parentNode),jr(u)&&(a=c.nodeIndex(u)+1,u=u.parentNode),{startContainer:o,startOffset:i,endContainer:u,endOffset:a}},lp=function(t,e,n){var r=e.startOffset,o=af(e.startContainer,r),i=e.endOffset,u=af(e.endContainer,i-1),a=function(t){var e=t[0];Zr(e)&&e===o&&r>=e.data.length&&t.splice(0,1);var n=t[t.length-1];return 0===i&&t.length>0&&n===u&&Zr(n)&&t.splice(t.length-1,1),t},c=function(t,e,n){for(var r=[];t&&t!==n;t=t[e])r.push(t);return r},s=function(e,n){return t.getParent(e,(function(t){return t.parentNode===n}),n)},l=function(t,e,r){for(var o=r?"nextSibling":"previousSibling",i=t,u=i.parentNode;i&&i!==e;i=u){u=i.parentNode;var s=c(i===t?i:i[o],o);s.length&&(r||s.reverse(),n(a(s)))}};if(o===u)return n(a([o]));var f=t.findCommonAncestor(o,u);if(t.isChildOf(o,u))return l(o,f,!0);if(t.isChildOf(u,o))return l(u,f);var d=s(o,f)||o,m=s(u,f)||u;l(o,d,!0);var g=c(d===o?d:d.nextSibling,"nextSibling",m===u?m.nextSibling:m);g.length&&n(a(g)),l(u,m)},fp=function(t){var e=[];if(t)for(var n=0;n<t.rangeCount;n++)e.push(t.getRangeAt(n));return e},dp=function(t){return st(t,(function(t){var e=uf(t);return e?[wn.fromDom(e)]:[]}))},mp=function(t){return fp(t).length>1},gp=function(t){return nt(dp(t),iu)},hp=function(t){return El(t,"td[data-mce-selected],th[data-mce-selected]")},pp=function(t,e){var n=hp(e);return n.length>0?n:gp(t)},vp=function(t){return pp(fp(t.selection.getSel()),wn.fromDom(t.getBody()))},bp=function(t,e){return Oi(t,"table",e)},yp=function(t){var e=t.startContainer,n=t.startOffset;return Zr(e)?0===n?W.some(wn.fromDom(e)):W.none():W.from(e.childNodes[n]).map(wn.fromDom)},wp=function(t){var e=t.endContainer,n=t.endOffset;return Zr(e)?n===e.data.length?W.some(wn.fromDom(e)):W.none():W.from(e.childNodes[n-1]).map(wn.fromDom)},xp=function(t){return ir(t).fold(D([t]),(function(e){return[t].concat(xp(e))}))},Cp=function(t){return ur(t).fold(D([t]),(function(e){return"br"===Hn(e)?Zn(e).map((function(e){return[t].concat(Cp(e))})).getOr([]):[t].concat(Cp(e))}))},Sp=function(t,e){return fo(yp(e),wp(e),(function(e,n){var r=ut(xp(t),N(Nn,e)),o=ut(Cp(t),N(Nn,n));return r.isSome()&&o.isSome()})).getOr(!1)},kp=function(t,e,n,r){var o=n,i=new Fi(n,o),u=_t(t.schema.getMoveCaretBeforeOnEnterElements(),(function(t,e){return!Y(["td","th","table"],e.toLowerCase())}));do{if(Zr(n)&&0!==gn.trim(n.nodeValue).length)return void(r?e.setStart(n,0):e.setEnd(n,n.nodeValue.length));if(u[n.nodeName])return void(r?e.setStartBefore(n):"BR"===n.nodeName?e.setEndBefore(n):e.setEndAfter(n))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?e.setStart(o,0):e.setEnd(o,o.childNodes.length))},Tp=function(t){var e=t.selection.getSel();return e&&e.rangeCount>0},Op=function(t,e){var n=vp(t);n.length>0?Z(n,(function(n){var r=n.dom,o=t.dom.createRng();o.setStartBefore(r),o.setEndAfter(r),e(o,!0)})):e(t.selection.getRng(),!1)},Ep=function(t,e,n){var r=dd(t,e);n(r),t.moveToBookmark(r)},_p=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)?W.from(e.dom.nodeValue):W.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}},Ap=_p(Un,"text"),Dp=function(t){return Ap.get(t)},Mp=function(t){return Un(t)&&Dp(t)===du},Rp=function(t,e,n,r){return Yn(e).fold((function(){return"skipping"}),(function(o){return"br"===r||Mp(e)?"valid":Rl(e)?"existing":th(e.dom)?"caret":Rh(t,n,r)&&Rh(t,Hn(o),n)?"valid":"invalid-child"}))},Np=function(t,e){var n=sp(t,e,[{inline:"span"}]);e.setStart(n.startContainer,n.startOffset),e.setEnd(n.endContainer,n.endOffset),t.selection.setRng(e)},zp=function(t,e,n,r){var o=e.uid,i=void 0===o?Pl("mce-annotation"):o,u=qt(e,["uid"]),a=wn.fromTag("span",t);Cl(a,_l()),vo(a,""+Dl(),i),vo(a,""+Al(),n);var c=r(i,u),s=c.attributes,l=void 0===s?{}:s,f=c.classes,d=void 0===f?[]:f;return bo(a,l),Fl(a,d),a},Bp=function(t,e,n,r,o){var i=[],u=zp(t.getDoc(),o,n,r),a=dl(),c=function(){a.clear()},s=function(){return a.get().getOrThunk((function(){var t=$l(u);return i.push(t),a.set(t),t}))},l=function(t){Z(t,f)},f=function(e){var n=Rp(t,e,"span",Hn(e));switch(n){case"invalid-child":c();var r=rr(e);l(r),c();break;case"valid":var o=s();Cr(e,o);break}},d=function(t){var e=Q(t,wn.fromDom);l(e)};return lp(t.dom,e,(function(t){c(),d(t)})),i},Lp=function(t,e,n,r){t.undoManager.transact((function(){var o=t.selection,i=o.getRng(),u=vp(t).length>0;if(i.collapsed&&!u&&Np(t,i),o.getRng().collapsed&&!u){var a=zp(t.getDoc(),r,e,n.decorate);Wl(a,su),o.getRng().insertNode(a.dom),o.select(a.dom)}else Ep(o,!1,(function(){Op(t,(function(o){Bp(t,o,e,n.decorate,r)}))}))}))},Hp=function(t){var e=Hl();Ll(t,e);var n=Bl(t);return{register:function(t,n){e.register(t,n)},annotate:function(n,r){e.lookup(n).each((function(e){Lp(t,n,e,r)}))},annotationChanged:function(t,e){n.addListener(t,e)},remove:function(e){Ml(t,W.some(e)).each((function(t){var e=t.elements;Z(e,Er)}))},getAll:function(e){var n=zl(t,e);return St(n,(function(t){return Q(t,(function(t){return t.dom}))}))}}},Ip=function(t){return{getBookmark:N(wh,t),moveToBookmark:N(xh,t)}};Ip.isBookmarkNode=Ch;var Pp=function(t,e){while(e&&e!==t){if(io(e)||uo(e))return e;e=e.parentNode}return null},Fp=function(t,e,n){if(n.collapsed)return!1;if(tn.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(jr(r))return J(r.getClientRects(),(function(n){return rf(n,t,e)}))}return J(n.getClientRects(),(function(n){return rf(n,t,e)}))},Vp=function(t,e){return t.fire("PreProcess",e)},Up=function(t,e){return t.fire("PostProcess",e)},jp=function(t){return t.fire("remove")},Wp=function(t){return t.fire("detach")},qp=function(t,e){return t.fire("SwitchMode",{mode:e})},$p=function(t,e,n,r,o){t.fire("ObjectResizeStart",{target:e,width:n,height:r,origin:o})},Gp=function(t,e,n,r,o){t.fire("ObjectResized",{target:e,width:n,height:r,origin:o})},Kp=function(t){return t.fire("PreInit")},Xp=function(t){return t.fire("PostRender")},Yp=function(t){return t.fire("Init")},Jp=function(t,e){return t.fire("PlaceholderToggle",{state:e})},Qp=function(t,e,n){return t.fire(e,n)},Zp=function(t,e,n,r){return t.fire("FormatApply",{format:e,node:n,vars:r})},tv=function(t,e,n,r){return t.fire("FormatRemove",{format:e,node:n,vars:r})},ev={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:function(t){return t.shiftKey||t.ctrlKey||t.altKey||ev.metaKeyPressed(t)},metaKeyPressed:function(t){return tn.mac?t.metaKey:t.ctrlKey&&!t.altKey}},nv=uo,rv=function(t,e){var n,r,o,i,u,a,c,s,l,f,d,m,g,h,p,v,b,y="data-mce-selected",w=e.dom,x=gn.each,C=e.getDoc(),S=document,T=Math.abs,O=Math.round,E=e.getBody(),_={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},A=function(t){return t&&("IMG"===t.nodeName||e.dom.is(t,"figure.image"))},D=function(t){return co(t)||w.hasClass(t,"mce-preview-object")},M=function(t,e){if("longpress"===t.type||0===t.type.indexOf("touch")){var n=t.touches[0];return A(t.target)&&!Fp(n.clientX,n.clientY,e)}return A(t.target)&&!Fp(t.clientX,t.clientY,e)},R=function(t){var n=t.target;M(t,e.selection.getRng())&&!t.isDefaultPrevented()&&e.selection.select(n)},N=function(t){return w.is(t,"figure.image")?[t.querySelector("img")]:w.hasClass(t,"mce-preview-object")&&k(t.firstElementChild)?[t,t.firstElementChild]:[t]},z=function(t){var n=Zd(e);return!!n&&("false"!==t.getAttribute("data-mce-resize")&&(t!==e.getBody()&&(w.hasClass(t,"mce-preview-object")?An(wn.fromDom(t.firstElementChild),n):An(wn.fromDom(t),n))))},B=function(t){return D(t)?w.create("img",{src:tn.transparentSrc}):t.cloneNode(!0)},L=function(t,n,r){if(k(r)){var o=N(t);Z(o,(function(t){t.style[n]||!e.schema.isValid(t.nodeName.toLowerCase(),n)?w.setStyle(t,n,r):w.setAttrib(t,n,""+r)}))}},H=function(t,e,n){L(t,"width",e),L(t,"height",n)},I=function(t){var u,y,x,C,S;u=t.screenX-a,y=t.screenY-c,h=u*i[2]+f,p=y*i[3]+d,h=h<5?5:h,p=p<5?5:p,x=(A(n)||D(n))&&!1!==tm(e)?!ev.modifierPressed(t):ev.modifierPressed(t),x&&(T(u)>T(y)?(p=O(h*m),h=O(p/m)):(h=O(p/m),p=O(h*m))),H(r,h,p),C=i.startPos.x+u,S=i.startPos.y+y,C=C>0?C:0,S=S>0?S:0,w.setStyles(o,{left:C,top:S,display:"block"}),o.innerHTML=h+" &times; "+p,i[2]<0&&r.clientWidth<=h&&w.setStyle(r,"left",s+(f-h)),i[3]<0&&r.clientHeight<=p&&w.setStyle(r,"top",l+(d-p)),u=E.scrollWidth-v,y=E.scrollHeight-b,u+y!==0&&w.setStyles(o,{left:C-u,top:S-y}),g||($p(e,n,f,d,"corner-"+i.name),g=!0)},P=function(){var t=g;g=!1,t&&(L(n,"width",h),L(n,"height",p)),w.unbind(C,"mousemove",I),w.unbind(C,"mouseup",P),S!==C&&(w.unbind(S,"mousemove",I),w.unbind(S,"mouseup",P)),w.remove(r),w.remove(o),w.remove(u),F(n),t&&(Gp(e,n,h,p,"corner-"+i.name),w.setAttrib(n,"style",w.getAttrib(n,"style"))),e.nodeChanged()},F=function(t){W();var s=w.getPos(t,E),l=s.x,g=s.y,k=t.getBoundingClientRect(),T=k.width||k.right-k.left,O=k.height||k.bottom-k.top;n!==t&&(V(),n=t,h=p=0);var A=e.fire("ObjectSelected",{target:t}),D=w.getAttrib(n,y,"1");z(t)&&!A.isDefaultPrevented()?x(_,(function(t,e){var s,h=function(s){var h=N(n)[0];a=s.screenX,c=s.screenY,f=h.clientWidth,d=h.clientHeight,m=d/f,i=t,i.name=e,i.startPos={x:T*t[0]+l,y:O*t[1]+g},v=E.scrollWidth,b=E.scrollHeight,u=w.add(E,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),w.setStyles(u,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),r=B(n),w.addClass(r,"mce-clonedresizable"),w.setAttrib(r,"data-mce-bogus","all"),r.contentEditable="false",w.setStyles(r,{left:l,top:g,margin:0}),H(r,T,O),r.removeAttribute(y),E.appendChild(r),w.bind(C,"mousemove",I),w.bind(C,"mouseup",P),S!==C&&(w.bind(S,"mousemove",I),w.bind(S,"mouseup",P)),o=w.add(E,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},f+" &times; "+d)};s=w.get("mceResizeHandle"+e),s&&w.remove(s),s=w.add(E,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===tn.ie&&(s.contentEditable=!1),w.bind(s,"mousedown",(function(t){t.stopImmediatePropagation(),t.preventDefault(),h(t)})),t.elm=s,w.setStyles(s,{left:T*t[0]+l-s.offsetWidth/2,top:O*t[1]+g-s.offsetHeight/2})})):V(),w.getAttrib(n,y)||n.setAttribute(y,D)},V=function(){W(),n&&n.removeAttribute(y),Ct(_,(function(t,e){var n=w.get("mceResizeHandle"+e);n&&(w.unbind(n),w.remove(n))}))},U=function(n){var r,o,i=function(t,e){if(t)do{if(t===e)return!0}while(t=t.parentNode)};g||e.removed||(x(w.select("img[data-mce-selected],hr[data-mce-selected]"),(function(t){t.removeAttribute(y)})),o="mousedown"===n.type?n.target:t.getNode(),o=w.$(o).closest("table,img,figure.image,hr,video,span.mce-preview-object")[0],i(o,E)&&(q(),r=t.getStart(!0),i(r,o)&&i(t.getEnd(!0),o))?F(o):V())},j=function(t){return nv(Pp(e.getBody(),t))},W=function(){Ct(_,(function(t){t.elm&&(w.unbind(t.elm),delete t.elm)}))},q=function(){try{e.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(t){}};e.on("init",(function(){if(q(),tn.browser.isIE()||tn.browser.isEdge()){e.on("mousedown click",(function(t){var n=t.target,r=n.nodeName;g||!/^(TABLE|IMG|HR)$/.test(r)||j(n)||(2!==t.button&&e.selection.select(n,"TABLE"===r),"mousedown"===t.type&&e.nodeChanged())}));var t=function(t){var n=function(t){Li.setEditorTimeout(e,(function(){return e.selection.select(t)}))};if(j(t.target)||co(t.target))return t.preventDefault(),void n(t.target);/^(TABLE|IMG|HR)$/.test(t.target.nodeName)&&(t.preventDefault(),"IMG"===t.target.tagName&&n(t.target))};w.bind(E,"mscontrolselect",t),e.on("remove",(function(){return w.unbind(E,"mscontrolselect",t)}))}var r=Li.throttle((function(t){e.composing||U(t)}));e.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",r),e.on("keyup compositionend",(function(t){n&&"TABLE"===n.nodeName&&r(t)})),e.on("hide blur",V),e.on("contextmenu longpress",R,!0)})),e.on("remove",W);var $=function(){n=r=u=null};return{isResizable:z,showResizeRect:F,hideResizeRect:V,updateResizeRect:U,destroy:$}},ov=function(t){return io(t)||uo(t)},iv=function(t,e,n){while(t&&t!==e){if(n(t))return t;t=t.parentNode}return null},uv=function(t,e,n){var r,o=n.elementFromPoint(t,e),i=n.body.createTextRange();if(o&&"HTML"!==o.tagName||(o=n.body),i.moveToElementText(o),r=gn.toArray(i.getClientRects()),r=r.sort((function(t,n){return t=Math.abs(Math.max(t.top-e,t.bottom-e)),n=Math.abs(Math.max(n.top-e,n.bottom-e)),t-n})),r.length>0){e=(r[0].bottom+r[0].top)/2;try{return i.moveToPoint(t,e),i.collapse(!0),i}catch(u){}}return null},av=function(t,e){var n=t&&t.parentElement?t.parentElement():null;return uo(iv(n,e,ov))?null:t},cv=function(t,e,n){var r,o,i=n;if(i.caretPositionFromPoint)o=i.caretPositionFromPoint(t,e),o&&(r=n.createRange(),r.setStart(o.offsetNode,o.offset),r.collapse(!0));else if(i.caretRangeFromPoint)r=i.caretRangeFromPoint(t,e);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(t,e),r.collapse(!0)}catch(u){r=uv(t,e,n)}return av(r,n.body)}return r},sv=function(t,e){return t&&e&&t.startContainer===e.startContainer&&t.startOffset===e.startOffset&&t.endContainer===e.endContainer&&t.endOffset===e.endOffset},lv=function(t,e,n){while(t&&t!==e){if(n(t))return t;t=t.parentNode}return null},fv=function(t,e,n){return null!==lv(t,e,n)},dv=function(t,e,n){return fv(t,e,(function(t){return t.nodeName===n}))},mv=function(t){return t&&"TABLE"===t.nodeName},gv=function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)},hv=function(t,e){return yu(t)&&!1===fv(t,e,th)},pv=function(t,e,n){var r=new Fi(e,t.getParent(e.parentNode,t.isBlock)||t.getRoot());while(e=r[n?"prev":"next"]())if(ro(e))return!0},vv=function(t,e){return t.previousSibling&&t.previousSibling.nodeName===e},bv=function(t,e){while(e&&e!==t){if(uo(e))return!0;e=e.parentNode}return!1},yv=function(t,e,n,r,o){var i,u,a=t.getRoot(),c=t.schema.getNonEmptyElements(),s=t.getParent(o.parentNode,t.isBlock)||a;if(r&&ro(o)&&e&&t.isEmpty(s))return W.some(Nf(o.parentNode,t.nodeIndex(o)));var l=new Fi(o,s);while(u=l[r?"prev":"next"]()){if("false"===t.getContentEditableParent(u)||hv(u,a))return W.none();if(Zr(u)&&u.nodeValue.length>0)return!1===dv(u,a,"A")?W.some(Nf(u,r?u.nodeValue.length:0)):W.none();if(t.isBlock(u)||c[u.nodeName.toLowerCase()])return W.none();i=u}return n&&i?W.some(Nf(i,0)):W.none()},wv=function(t,e,n,r){var o,i,u,a,c=t.getRoot(),s=!1;o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"];var l=jr(o)&&i===o.childNodes.length,f=t.schema.getNonEmptyElements();if(a=n,yu(o))return W.none();if(jr(o)&&i>o.childNodes.length-1&&(a=!1),eo(o)&&(o=c,i=0),o===c){if(a&&(u=o.childNodes[i>0?i-1:0],u)){if(yu(u))return W.none();if(f[u.nodeName]||mv(u))return W.none()}if(o.hasChildNodes()){if(i=Math.min(!a&&i>0?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=Zr(o)&&l?o.data.length:0,!e&&o===c.lastChild&&mv(o))return W.none();if(bv(c,o)||yu(o))return W.none();if(o.hasChildNodes()&&!1===mv(o)){u=o;var d=new Fi(o,c);do{if(uo(u)||yu(u)){s=!1;break}if(Zr(u)&&u.nodeValue.length>0){i=a?0:u.nodeValue.length,o=u,s=!0;break}if(f[u.nodeName.toLowerCase()]&&!gv(u)){i=t.nodeIndex(u),o=u.parentNode,a||i++,s=!0;break}}while(u=a?d.next():d.prev())}}}return e&&(Zr(o)&&0===i&&yv(t,l,e,!0,o).each((function(t){o=t.container(),i=t.offset(),s=!0})),jr(o)&&(u=o.childNodes[i],u||(u=o.childNodes[i-1]),!u||!ro(u)||vv(u,"A")||pv(t,u,!1)||pv(t,u,!0)||yv(t,l,e,!0,u).each((function(t){o=t.container(),i=t.offset(),s=!0})))),a&&!e&&Zr(o)&&i===o.nodeValue.length&&yv(t,l,e,!1,o).each((function(t){o=t.container(),i=t.offset(),s=!0})),s?W.some(Nf(o,i)):W.none()},xv=function(t,e){var n=e.collapsed,r=e.cloneRange(),o=Nf.fromRangeStart(e);return wv(t,n,!0,r).each((function(t){n&&Nf.isAbove(o,t)||r.setStart(t.container(),t.offset())})),n||wv(t,n,!1,r).each((function(t){r.setEnd(t.container(),t.offset())})),n&&r.collapse(!0),sv(e,r)?W.none():W.some(r)},Cv=function(t,e){return t.splitText(e)},Sv=function(t){var e=t.startContainer,n=t.startOffset,r=t.endContainer,o=t.endOffset;return e===r&&Zr(e)?n>0&&n<e.nodeValue.length&&(r=Cv(e,n),e=r.previousSibling,o>n?(o-=n,e=r=Cv(r,o).previousSibling,o=r.nodeValue.length,n=0):o=0):(Zr(e)&&n>0&&n<e.nodeValue.length&&(e=Cv(e,n),n=0),Zr(r)&&o>0&&o<r.nodeValue.length&&(r=Cv(r,o).previousSibling,o=r.nodeValue.length)),{startContainer:e,startOffset:n,endContainer:r,endOffset:o}},kv=function(t){var e=function(e,n){return lp(t,e,n)},n=Sv,r=function(e){return xv(t,e).fold(I,(function(t){return e.setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),!0}))};return{walk:e,split:n,normalize:r}};kv.compareRanges=sv,kv.getCaretRangeFromPoint=cv,kv.getSelectedNode=uf,kv.getNode=af;var Tv,Ov=function(t,e){var n=function(e,n){if(!O(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;ho(r)&&(r.style[t]=n+"px")},r=function(n){var r=e(n);if(r<=0||null===r){var o=Oo(n,t);return parseFloat(o)||0}return r},o=r,i=function(t,e){return ot(e,(function(e,n){var r=Oo(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)},u=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:u}},Ev=Ov("height",(function(t){var e=t.dom;return _r(t)?e.getBoundingClientRect().height:e.offsetHeight})),_v=function(t){return Ev.get(t)},Av=function(t,e){var n=t.view(e);return n.fold(D([]),(function(e){var n=t.owner(e),r=Av(t,n);return[e].concat(r)}))},Dv=function(t,e){var n=e.owner(t);return Av(e,n)},Mv=function(t){var e,n=t.dom===document?W.none():W.from(null===(e=t.dom.defaultView)||void 0===e?void 0:e.frameElement);return n.map(wn.fromDom)},Rv=function(t){return Gn(t)},Nv=Object.freeze({__proto__:null,view:Mv,owner:Rv}),zv=function(t){var e=wn.fromDom(document),n=Br(e),r=Dv(t,Nv),o=zr(t),i=rt(r,(function(t,e){var n=zr(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return Dr(i.left+o.left+n.left,i.top+o.top+n.top)},Bv=function(t){return"textarea"===Hn(t)},Lv=function(t,e){var n=t.fire("ScrollIntoView",e);return n.isDefaultPrevented()},Hv=function(t,e){t.fire("AfterScrollIntoView",e)},Iv=function(t,e){var n=rr(t);if(0===n.length||Bv(t))return{element:t,offset:e};if(e<n.length&&!Bv(n[e]))return{element:n[e],offset:0};var r=n[n.length-1];return Bv(r)?{element:t,offset:e}:"img"===Hn(r)?{element:r,offset:1}:Un(r)?{element:r,offset:Dp(r).length}:{element:r,offset:rr(r).length}},Pv=function(t,e){var n=Nr(t),r=_v(t);return{element:t,bottom:n.top+r,height:r,pos:n,cleanup:e}},Fv=function(t,e){var n=Iv(t,e),r=wn.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">'+du+"</span>");return br(n.element,r),Pv(r,(function(){return Or(r)}))},Vv=function(t){return Pv(wn.fromDom(t),E)},Uv=function(t,e,n,r){$v(t,(function(o,i){return Wv(t,e,n,r)}),n)},jv=function(t,e,n,r,o){var i={elm:r.element.dom,alignToTop:o};if(!Lv(t,i)){var u=Br(e).top;n(e,u,r,o),Hv(t,i)}},Wv=function(t,e,n,r){var o=wn.fromDom(t.getBody()),i=wn.fromDom(t.getDoc());Do(o);var u=Fv(wn.fromDom(n.startContainer),n.startOffset);jv(t,i,e,u,r),u.cleanup()},qv=function(t,e,n,r){var o=wn.fromDom(t.getDoc());jv(t,o,n,Vv(e),r)},$v=function(t,e,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,u=n.endOffset;e(wn.fromDom(r),wn.fromDom(i));var a=t.dom.createRng();a.setStart(r,o),a.setEnd(i,u),t.selection.setRng(n)},Gv=function(t,e,n,r){var o=t.pos;if(n)Lr(o.left,o.top,r);else{var i=o.top-e+t.height;Lr(o.left,i,r)}},Kv=function(t,e,n,r,o){var i=n+e,u=r.pos.top,a=r.bottom,c=a-u>=n;if(u<e)Gv(r,n,!1!==o,t);else if(u>i){var s=c?!1!==o:!0===o;Gv(r,n,s,t)}else a>i&&!c&&Gv(r,n,!0===o,t)},Xv=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Kv(t,e,o,n,r)},Yv=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Kv(t,e,o,n,r);var i=zv(n.element),u=Fr(window);i.top<u.y?Hr(n.element,!1!==r):i.top>u.bottom&&Hr(n.element,!0===r)},Jv=function(t,e,n){return Uv(t,Xv,e,n)},Qv=function(t,e,n){return qv(t,e,Xv,n)},Zv=function(t,e,n){return Uv(t,Yv,e,n)},tb=function(t,e,n){return qv(t,e,Yv,n)},eb=function(t,e,n){var r=t.inline?Qv:tb;r(t,e,n)},nb=function(t,e,n){var r=t.inline?Jv:Zv;r(t,e,n)},rb=function(){return wn.fromDom(document)},ob=function(t){return t.dom.focus()},ib=function(t){var e=dr(t).dom;return t.dom===e.activeElement},ub=function(t){return void 0===t&&(t=rb()),W.from(t.dom.activeElement).map(wn.fromDom)},ab=function(t){return ub(dr(t)).filter((function(e){return t.dom.contains(e.dom)}))},cb=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},sb={create:cb},lb=ti.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),fb=function(t,e,n,r){return t.fold(e,n,r)},db=function(t){return t.fold(M,M,M)},mb=lb.before,gb=lb.on,hb=lb.after,pb={before:mb,on:gb,after:hb,cata:fb,getStart:db},vb=ti.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),bb=function(t){return vb.exact(t.start,t.soffset,t.finish,t.foffset)},yb=function(t){return t.match({domRange:function(t){return wn.fromDom(t.startContainer)},relative:function(t,e){return pb.getStart(t)},exact:function(t,e,n,r){return t}})},wb=vb.domRange,xb=vb.relative,Cb=vb.exact,Sb=function(t){var e=yb(t);return Xn(e)},kb=sb.create,Tb={domRange:wb,relative:xb,exact:Cb,exactFromRange:bb,getWin:Sb,range:kb},Ob=qe().browser,Eb=function(t,e){var n=Un(e)?Dp(e).length:rr(e).length+1;return t>n?n:t<0?0:t},_b=function(t){return Tb.range(t.start,Eb(t.soffset,t.start),t.finish,Eb(t.foffset,t.finish))},Ab=function(t,e){return!Ur(e.dom)&&(Ln(t,e)||Nn(t,e))},Db=function(t){return function(e){return Ab(t,e.start)&&Ab(t,e.finish)}},Mb=function(t){return!0===t.inline||Ob.isIE()},Rb=function(t){return Tb.range(wn.fromDom(t.startContainer),t.startOffset,wn.fromDom(t.endContainer),t.endOffset)},Nb=function(t){var e=t.getSelection(),n=e&&0!==e.rangeCount?W.from(e.getRangeAt(0)):W.none();return n.map(Rb)},zb=function(t){var e=Xn(t);return Nb(e.dom).filter(Db(t))},Bb=function(t,e){return W.from(e).filter(Db(t)).map(_b)},Lb=function(t){var e=document.createRange();try{return e.setStart(t.start.dom,t.soffset),e.setEnd(t.finish.dom,t.foffset),W.some(e)}catch(n){return W.none()}},Hb=function(t){var e=Mb(t)?zb(wn.fromDom(t.getBody())):W.none();t.bookmark=e.isSome()?e:t.bookmark},Ib=function(t,e){var n=wn.fromDom(t.getBody()),r=Mb(t)?W.from(e):W.none(),o=r.map(Rb).filter(Db(n));t.bookmark=o.isSome()?o:t.bookmark},Pb=function(t){var e=t.bookmark?t.bookmark:W.none();return e.bind((function(e){return Bb(wn.fromDom(t.getBody()),e)})).bind(Lb)},Fb=function(t){Pb(t).each((function(e){return t.selection.setRng(e)}))},Vb=function(t){var e=t.className.toString();return-1!==e.indexOf("tox-")||-1!==e.indexOf("mce-")},Ub={isEditorUIElement:Vb},jb=function(t){return"nodechange"===t.type&&t.selectionChange},Wb=function(t,e){var n=function(){e.throttle()};Vs.DOM.bind(document,"mouseup",n),t.on("remove",(function(){Vs.DOM.unbind(document,"mouseup",n)}))},qb=function(t){t.on("focusout",(function(){Hb(t)}))},$b=function(t,e){t.on("mouseup touchend",(function(t){e.throttle()}))},Gb=function(t,e){var n=qe().browser;n.isIE()?qb(t):$b(t,e),t.on("keyup NodeChange",(function(e){jb(e)||Hb(t)}))},Kb=function(t){var e=ml((function(){Hb(t)}),0);t.on("init",(function(){t.inline&&Wb(t,e),Gb(t,e)})),t.on("remove",(function(){e.cancel()}))},Xb=Vs.DOM,Yb=function(t){return Ub.isEditorUIElement(t)},Jb=function(t){var e=t.classList;return void 0!==e&&(e.contains("tox-edit-area")||e.contains("tox-edit-area__iframe")||e.contains("mce-content-body"))},Qb=function(t,e){var n=lm(t),r=Xb.getParent(e,(function(e){return Yb(e)||!!n&&t.dom.is(e,n)}));return null!==r},Zb=function(t){try{var e=dr(wn.fromDom(t.getElement()));return ub(e).fold((function(){return document.body}),(function(t){return t.dom}))}catch(n){return document.body}},ty=function(t,e){var n=e.editor;Kb(n),n.on("focusin",(function(){var e=t.focusedEditor;e!==n&&(e&&e.fire("blur",{focusedEditor:n}),t.setActive(n),t.focusedEditor=n,n.fire("focus",{blurredEditor:e}),n.focus(!0))})),n.on("focusout",(function(){Li.setEditorTimeout(n,(function(){var e=t.focusedEditor;Qb(n,Zb(n))||e!==n||(n.fire("blur",{focusedEditor:null}),t.focusedEditor=null)}))})),Tv||(Tv=function(e){var n=t.activeEditor;n&&pr(e).each((function(e){e.ownerDocument===document&&(e===document.body||Qb(n,e)||t.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),t.focusedEditor=null))}))},Xb.bind(document,"focusin",Tv))},ey=function(t,e){t.focusedEditor===e.editor&&(t.focusedEditor=null),t.activeEditor||(Xb.unbind(document,"focusin",Tv),Tv=null)},ny=function(t){t.on("AddEditor",N(ty,t)),t.on("RemoveEditor",N(ey,t))},ry=function(t,e){return t.dom.getParent(e,(function(e){return"true"===t.dom.getContentEditable(e)}))},oy=function(t){return t.collapsed?W.from(af(t.startContainer,t.startOffset)).map(wn.fromDom):W.none()},iy=function(t,e){return oy(e).bind((function(e){return ou(e)?W.some(e):!1===Ln(t,e)?W.some(t):W.none()}))},uy=function(t,e){iy(wn.fromDom(t.getBody()),e).bind((function(t){return Jg(t.dom)})).fold((function(){t.selection.normalize()}),(function(e){return t.selection.setRng(e.toRange())}))},ay=function(t){if(t.setActive)try{t.setActive()}catch(e){t.focus()}else t.focus()},cy=function(t){return ib(t)||ab(t).isSome()},sy=function(t){return t.iframeElement&&ib(wn.fromDom(t.iframeElement))},ly=function(t){var e=t.getBody();return e&&cy(wn.fromDom(e))},fy=function(t){var e=dr(wn.fromDom(t.getElement()));return ub(e).filter((function(e){return!Jb(e.dom)&&Qb(t,e.dom)})).isSome()},dy=function(t){return t.inline?ly(t):sy(t)},my=function(t){return dy(t)||fy(t)},gy=function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable(),void 0!==t.bookmark&&!1===dy(t)&&Pb(t).each((function(e){t.selection.setRng(e),r=e}));var o=ry(t,e.getNode());if(t.$.contains(n,o))return ay(o),uy(t,r),void hy(t);t.inline||(tn.opera||ay(n),t.getWin().focus()),(tn.gecko||t.inline)&&(ay(n),uy(t,r)),hy(t)},hy=function(t){return t.editorManager.setActive(t)},py=function(t,e){t.removed||(e?hy(t):gy(t))},vy=function(t,e,n,r,o){var i=n?e.startContainer:e.endContainer,u=n?e.startOffset:e.endOffset;return W.from(i).map(wn.fromDom).map((function(t){return r&&e.collapsed?t:or(t,o(t,u)).getOr(t)})).bind((function(t){return Vn(t)?W.some(t):Yn(t).filter(Vn)})).map((function(t){return t.dom})).getOr(t)},by=function(t,e,n){return vy(t,e,!0,n,(function(t,e){return Math.min(ar(t),e)}))},yy=function(t,e,n){return vy(t,e,!1,n,(function(t,e){return e>0?e-1:e}))},wy=function(t,e){var n=t;while(t&&Zr(t)&&0===t.length)t=e?t.nextSibling:t.previousSibling;return t||n},xy=function(t,e){var n,r,o;if(!e)return t;r=e.startContainer,o=e.endContainer;var i=e.startOffset,u=e.endOffset;return n=e.commonAncestorContainer,!e.collapsed&&(r===o&&u-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?wy(r.nextSibling,!0):r.parentNode,o=0===u?wy(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n},Cy=function(t,e,n,r){var o,i=[],u=t.getRoot();if(n=t.getParent(n||by(u,e,e.collapsed),t.isBlock),r=t.getParent(r||yy(u,e,e.collapsed),t.isBlock),n&&n!==u&&i.push(n),n&&r&&n!==r){o=n;var a=new Fi(n,u);while((o=a.next())&&o!==r)t.isBlock(o)&&i.push(o)}return r&&n!==r&&r!==u&&i.push(r),i},Sy=function(t,e,n){return W.from(e).map((function(e){var r=t.nodeIndex(e),o=t.createRng();return o.setStart(e.parentNode,r),o.setEnd(e.parentNode,r+1),n&&(kp(t,o,e,!0),kp(t,o,e,!1)),o}))},ky=function(t,e){return Q(e,(function(e){var n=t.fire("GetSelectionRange",{range:e});return n.range!==e?n.range:e}))},Ty={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Oy=function(t,e,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(t[r])return t[r];if(t!==e){var i=t[o];if(i)return i;for(var u=t.parent;u&&u!==e;u=u.parent)if(i=u[o],i)return i}},Ey=function(t){if(!Gu(t.value))return!1;var e=t.parent;return!e||"span"===e.name&&!e.attr("style")||!/^[ ]+$/.test(t.value)},_y=function(t){var e="a"===t.name&&!t.attr("href")&&t.attr("id");return t.attr("name")||t.attr("id")&&!t.firstChild||t.attr("data-mce-bookmark")||e},Ay=function(){function t(t,e){this.name=t,this.type=e,1===e&&(this.attributes=[],this.attributes.map={})}return t.create=function(e,n){var r=new t(e,Ty[e]||1);return n&&Ct(n,(function(t,e){r.attr(e,t)})),r},t.prototype.replace=function(t){var e=this;return t.parent&&t.remove(),e.insert(t,e),e.remove(),e},t.prototype.attr=function(t,e){var n,r=this;if("string"!==typeof t)return void 0!==t&&null!==t&&Ct(t,(function(t,e){r.attr(e,t)})),r;if(n=r.attributes){if(void 0!==e){if(null===e){if(t in n.map){delete n.map[t];var o=n.length;while(o--)if(n[o].name===t)return n.splice(o,1),r}return r}if(t in n.map){o=n.length;while(o--)if(n[o].name===t){n[o].value=e;break}}else n.push({name:t,value:e});return n.map[t]=e,r}return n.map[t]}},t.prototype.clone=function(){var e,n=this,r=new t(n.name,n.type);if(e=n.attributes){var o=[];o.map={};for(var i=0,u=e.length;i<u;i++){var a=e[i];"id"!==a.name&&(o[o.length]={name:a.name,value:a.value},o.map[a.name]=a.value)}r.attributes=o}return r.value=n.value,r.shortEnded=n.shortEnded,r},t.prototype.wrap=function(t){var e=this;return e.parent.insert(t,e),t.append(e),e},t.prototype.unwrap=function(){for(var t=this,e=t.firstChild;e;){var n=e.next;t.insert(e,t,!0),e=n}t.remove()},t.prototype.remove=function(){var t=this,e=t.parent,n=t.next,r=t.prev;return e&&(e.firstChild===t?(e.firstChild=n,n&&(n.prev=null)):r.next=n,e.lastChild===t?(e.lastChild=r,r&&(r.next=null)):n.prev=r,t.parent=t.next=t.prev=null),t},t.prototype.append=function(t){var e=this;t.parent&&t.remove();var n=e.lastChild;return n?(n.next=t,t.prev=n,e.lastChild=t):e.lastChild=e.firstChild=t,t.parent=e,t},t.prototype.insert=function(t,e,n){t.parent&&t.remove();var r=e.parent||this;return n?(e===r.firstChild?r.firstChild=t:e.prev.next=t,t.prev=e.prev,t.next=e,e.prev=t):(e===r.lastChild?r.lastChild=t:e.next.prev=t,t.next=e.next,t.prev=e,e.next=t),t.parent=r,t},t.prototype.getAll=function(t){for(var e=this,n=[],r=e.firstChild;r;r=Oy(r,e))r.name===t&&n.push(r);return n},t.prototype.children=function(){for(var t=this,e=[],n=t.firstChild;n;n=n.next)e.push(n);return e},t.prototype.empty=function(){var t=this;if(t.firstChild){for(var e=[],n=t.firstChild;n;n=Oy(n,t))e.push(n);var r=e.length;while(r--){n=e[r];n.parent=n.firstChild=n.lastChild=n.next=n.prev=null}}return t.firstChild=t.lastChild=null,t},t.prototype.isEmpty=function(t,e,n){void 0===e&&(e={});var r=this,o=r.firstChild;if(_y(r))return!1;if(o)do{if(1===o.type){if(o.attr("data-mce-bogus"))continue;if(t[o.name])return!1;if(_y(o))return!1}if(8===o.type)return!1;if(3===o.type&&!Ey(o))return!1;if(3===o.type&&o.parent&&e[o.parent.name]&&Gu(o.value))return!1;if(n&&n(o))return!1}while(o=Oy(o,r));return!0},t.prototype.walk=function(t){return Oy(this,null,t)},t}(),Dy=function(t){var e,n=/data:[^;<"'\s]+;base64,([a-z0-9\+\/=\s]+)/gi,r=[],o={},i=Pl("img"),u=0,a=0;while(e=n.exec(t)){var c=e[0],s=i+"_"+a++;o[s]=c,u<e.index&&r.push(t.substr(u,e.index-u)),r.push(s),u=e.index+c.length}var l=new RegExp(i+"_[0-9]+","g");return 0===u?{prefix:i,uris:o,html:t,re:l}:(u<t.length&&r.push(t.substr(u)),{prefix:i,uris:o,html:r.join(""),re:l})},My=function(t,e){return t.replace(e.re,(function(t){return Mt(e.uris,t).getOr(t)}))},Ry=function(t){var e=/data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(t);return e?W.some({type:e[1],data:decodeURIComponent(e[2])}):W.none()},Ny=gn.each,zy=gn.trim,By="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),Ly={ftp:21,http:80,https:443,mailto:25},Hy=["img","video"],Iy=function(t,e){return k(t)?!t:!k(e)||!Y(Hy,e)},Py=function(t,e,n){return!t.allow_html_data_urls&&(/^data:image\//i.test(e)?Iy(t.allow_svg_data_urls,n)&&/^data:image\/svg\+xml/i.test(e):/^data:/i.test(e))},Fy=function(){function t(e,n){e=zy(e),this.settings=n||{};var r=this.settings.base_uri,o=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))o.source=e;else{var i=0===e.indexOf("//");if(0!==e.indexOf("/")||i||(e=(r&&r.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){var u=this.settings.base_uri?this.settings.base_uri.path:new t(document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)e="//mce_host"+o.toAbsPath(u,e);else{var a=/([^#?]*)([#?]?.*)/.exec(e);e=(r&&r.protocol||"http")+"://mce_host"+o.toAbsPath(u,a[1])+a[2]}}e=e.replace(/@@/g,"(mce_at)");var c=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);Ny(By,(function(t,e){var n=c[e];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[t]=n})),r&&(o.protocol||(o.protocol=r.protocol),o.userInfo||(o.userInfo=r.userInfo),o.port||"mce_host"!==o.host||(o.port=r.port),o.host&&"mce_host"!==o.host||(o.host=r.host),o.source=""),i&&(o.protocol="")}}return t.parseDataUri=function(t){var e,n=decodeURIComponent(t).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(e=r[1]),{type:e,data:n[1]}},t.isDomSafe=function(t,e,n){if(void 0===n&&(n={}),n.allow_script_urls)return!0;var r=_a.decode(t).replace(/[\s\u0000-\u001F]+/g,"");try{r=decodeURIComponent(r)}catch(o){r=unescape(r)}return!/((java|vb)script|mhtml):/i.test(r)&&!Py(n,r,e)},t.getDocumentBaseUrl=function(t){var e;return e=0!==t.protocol.indexOf("http")&&"file:"!==t.protocol?t.href:t.protocol+"//"+t.host+t.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/")),e},t.prototype.setPath=function(t){var e=/^(.*?)\/?(\w+)?$/.exec(t);this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},t.prototype.toRelative=function(e){var n;if("./"===e)return e;var r=new t(e,{base_uri:this});if("mce_host"!==r.host&&this.host!==r.host&&r.host||this.port!==r.port||this.protocol!==r.protocol&&""!==r.protocol)return r.getURI();var o=this.getURI(),i=r.getURI();return o===i||"/"===o.charAt(o.length-1)&&o.substr(0,o.length-1)===i?o:(n=this.toRelPath(this.path,r.path),r.query&&(n+="?"+r.query),r.anchor&&(n+="#"+r.anchor),n)},t.prototype.toAbsolute=function(e,n){var r=new t(e,{base_uri:this});return r.getURI(n&&this.isSameOrigin(r))},t.prototype.isSameOrigin=function(t){if(this.host==t.host&&this.protocol==t.protocol){if(this.port==t.port)return!0;var e=Ly[this.protocol];if(e&&(this.port||e)==(t.port||e))return!0}return!1},t.prototype.toRelPath=function(t,e){var n,r,o=0,i="",u=t.substring(0,t.lastIndexOf("/")).split("/"),a=e.split("/");if(u.length>=a.length)for(n=0,r=u.length;n<r;n++)if(n>=a.length||u[n]!==a[n]){o=n+1;break}if(u.length<a.length)for(n=0,r=a.length;n<r;n++)if(n>=u.length||u[n]!==a[n]){o=n+1;break}if(1===o)return e;for(n=0,r=u.length-(o-1);n<r;n++)i+="../";for(n=o-1,r=a.length;n<r;n++)i+=n!==o-1?"/"+a[n]:a[n];return i},t.prototype.toAbsPath=function(t,e){var n,r,o=0,i=[],u=/\/$/.test(e)?"/":"",a=t.split("/"),c=e.split("/");for(Ny(a,(function(t){t&&i.push(t)})),a=i,n=c.length-1,i=[];n>=0;n--)0!==c[n].length&&"."!==c[n]&&(".."!==c[n]?o>0?o--:i.push(c[n]):o++);return n=a.length-o,r=n<=0?ft(i).join("/"):a.slice(0,n).join("/")+"/"+ft(i).join("/"),0!==r.indexOf("/")&&(r="/"+r),u&&r.lastIndexOf("/")!==r.length-1&&(r+=u),r},t.prototype.getURI=function(t){var e;return void 0===t&&(t=!1),this.source&&!t||(e="",t||(this.protocol?e+=this.protocol+"://":e+="//",this.userInfo&&(e+=this.userInfo+"@"),this.host&&(e+=this.host),this.port&&(e+=":"+this.port)),this.path&&(e+=this.path),this.query&&(e+="?"+this.query),this.anchor&&(e+="#"+this.anchor),this.source=e),this.source},t}(),Vy=gn.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),Uy=function(t){return 0===t.indexOf("data-")||0===t.indexOf("aria-")},jy=Gt((function(){return document.implementation.createHTMLDocument("parser")})),Wy=function(t,e,n){var r=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,o=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,i=t.getShortEndedElements(),u=1,a=n;while(0!==u){r.lastIndex=a;while(1){var c=r.exec(e);if(null===c)return a;if("!"===c[1]){a=se(c[2],"--")?$y(e,!1,c.index+"!--".length):$y(e,!0,c.index+1);break}o.lastIndex=r.lastIndex;var s=o.exec(e);if(!w(s)&&s.index===r.lastIndex){"/"===c[1]?u-=1:Rt(i,c[2])||(u+=1),a=r.lastIndex+s[0].length;break}}}return a},qy=function(t,e){return/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(t.substr(e))},$y=function(t,e,n){void 0===n&&(n=0);var r=t.toLowerCase();if(-1!==r.indexOf("[if ",n)&&qy(r,n)){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(e){var i=r.indexOf(">",n);return-1!==i?i:r.length}var u=/--!?>/g;u.lastIndex=n;var a=u.exec(t);return a?a.index+a[0].length:r.length},Gy=function(t,e){var n=t.exec(e);if(n){var r=n[1],o=n[2];return"string"===typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null},Ky=function(t,e){void 0===e&&(e=Va()),t=t||{};var n=jy(),r=n.createElement("form");!1!==t.fix_self_closing&&(t.fix_self_closing=!0);var o=t.comment?t.comment:E,i=t.cdata?t.cdata:E,u=t.text?t.text:E,a=t.start?t.start:E,c=t.end?t.end:E,s=t.pi?t.pi:E,l=t.doctype?t.doctype:E,f=function(f,d){void 0===d&&(d="html");var m,g,h,p,v,b,y,w,x,C,S,k,T,O,E,_,A,D,M,R,N=f.html,z=0,B=[],L=0,H=_a.decode,I=gn.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),P="html"===d?0:1,F=function(t){var e,n;e=B.length;while(e--)if(B[e].name===t)break;if(e>=0){for(n=B.length-1;n>=e;n--)t=B[n],t.valid&&c(t.name);B.length=e}},V=function(t,e){return u(My(t,f),e)},U=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),t.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),o(My(e,f)))},j=function(t){return My(t,f)},W=function(t,e){var n=t||"",r=!se(n,"--"),o=$y(N,r,e);return t=N.substr(e,o-e),U(r?n+t:t),o+1},q=function(e,o,i,u,a){if(o=o.toLowerCase(),i=j(o in Y?o:H(i||u||a||"")),J&&!w&&!1===Uy(o)){var c=O[o];if(!c&&E){var s=E.length;while(s--)if(c=E[s],c.pattern.test(o))break;-1===s&&(c=null)}if(!c)return;if(c.validValues&&!(i in c.validValues))return}var l="name"===o||"id"===o;l&&e in Vy&&(i in n||i in r)||I[o]&&!Fy.isDomSafe(i,e,t)||w&&(o in I||0===o.indexOf("on"))||(p.map[o]=i,p.push({name:o,value:i}))},$=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^'\">]+(?:\"[^\"]*\"|'[^']*'))*[^\"'>]*(?:\"[^\">]*|'[^'>]*)?|\\s*|\\/)>))","g"),G=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,K=e.getShortEndedElements(),X=t.self_closing_elements||e.getSelfClosingElements(),Y=e.getBoolAttrs(),J=t.validate,Q=t.remove_internals,Z=t.fix_self_closing,tt=e.getSpecialElements(),et=N+">";while(m=$.exec(et)){var nt=m[0];if(z<m.index&&V(H(N.substr(z,m.index-z))),g=m[7])g=g.toLowerCase(),":"===g.charAt(0)&&(g=g.substr(1)),F(g);else if(g=m[8]){if(m.index+nt.length>N.length){V(H(N.substr(m.index))),z=m.index+nt.length;continue}g=g.toLowerCase(),":"===g.charAt(0)&&(g=g.substr(1)),x=g in K,Z&&X[g]&&B.length>0&&B[B.length-1].name===g&&F(g);var rt=Gy(G,m[9]);if(null!==rt){if("all"===rt){z=Wy(e,N,$.lastIndex),$.lastIndex=z;continue}S=!1}if(!J||(C=e.getElementRule(g))){if(S=!0,J&&(O=C.attributes,E=C.attributePatterns),(T=m[9])?(w=-1!==T.indexOf("data-mce-type"),w&&Q&&(S=!1),p=[],p.map={},T.replace(G,(function(t,e,n,r,o){return q(g,e,n,r,o),""}))):(p=[],p.map={}),J&&!w){if(_=C.attributesRequired,A=C.attributesDefault,D=C.attributesForced,M=C.removeEmptyAttrs,M&&!p.length&&(S=!1),D){v=D.length;while(v--)k=D[v],y=k.name,R=k.value,"{$uid}"===R&&(R="mce_"+L++),p.map[y]=R,p.push({name:y,value:R})}if(A){v=A.length;while(v--)k=A[v],y=k.name,y in p.map||(R=k.value,"{$uid}"===R&&(R="mce_"+L++),p.map[y]=R,p.push({name:y,value:R}))}if(_){v=_.length;while(v--)if(_[v]in p.map)break;-1===v&&(S=!1)}if(k=p.map["data-mce-bogus"]){if("all"===k){z=Wy(e,N,$.lastIndex),$.lastIndex=z;continue}S=!1}}S&&a(g,p,x)}else S=!1;if(h=tt[g]){h.lastIndex=z=m.index+nt.length,(m=h.exec(N))?(S&&(b=N.substr(z,m.index-z)),z=m.index+m[0].length):(b=N.substr(z),z=N.length),S&&(b.length>0&&V(b,!0),c(g)),$.lastIndex=z;continue}x||(T&&T.indexOf("/")===T.length-1?S&&c(g):B.push({name:g,valid:S}))}else if(g=m[1])U(g);else if(g=m[2]){var ot=1===P||t.preserve_cdata||B.length>0&&e.isValidChild(B[B.length-1].name,"#cdata");if(!ot){z=W("",m.index+2),$.lastIndex=z;continue}i(g)}else if(g=m[3])l(g);else{if((g=m[4])||"<!"===nt){z=W(g,m.index+nt.length),$.lastIndex=z;continue}if(g=m[5]){if(1!==P){z=W("?",m.index+2),$.lastIndex=z;continue}s(g,m[6])}}z=m.index+nt.length}for(z<N.length&&V(H(N.substr(z))),v=B.length-1;v>=0;v--)g=B[v],g.valid&&c(g.name)},d=function(t,e){void 0===e&&(e="html"),f(Dy(t),e)};return{parse:d}};Ky.findEndTag=Wy;var Xy=function(t,e){var n=new RegExp(["\\s?("+t.join("|")+')="[^"]+"'].join("|"),"gi");return e.replace(n,"")},Yy=function(t,e){var n,r=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,o=t.schema,i=Xy(t.getTempAttrs(),e),u=o.getShortEndedElements();while(n=r.exec(i)){var a=r.lastIndex,c=n[0].length,s=void 0;s=u[n[1]]?a:Ky.findEndTag(o,i,a),i=i.substring(0,a-c)+i.substring(s),r.lastIndex=a-c}return gu(i)},Jy=Yy,Qy=function(t,e){var n=Td(t),r=new RegExp("^(<"+n+"[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/"+n+">[\r\n]*|<br \\/>[\r\n]*)$");return e.replace(r,"")},Zy=function(t,e){return Wt(Wt({},t),{format:e,get:!0,getInner:!0})},tw=function(t,e,n,r){var o,i=Zy(e,n),u=e.no_events?i:t.fire("BeforeGetContent",i);return o="raw"===u.format?gn.trim(Jy(t.serializer,r.innerHTML)):"text"===u.format?t.dom.isEmpty(r)?"":gu(r.innerText||r.textContent):"tree"===u.format?t.serializer.serialize(r,u):Qy(t,t.serializer.serialize(r,u)),Y(["text","tree"],u.format)||uu(wn.fromDom(r))?u.content=o:u.content=gn.trim(o),u.no_events?u.content:t.fire("GetContent",u).content},ew=function(t,e,n){return W.from(t.getBody()).fold(D("tree"===e.format?new Ay("body",11):""),(function(r){return tw(t,e,n,r)}))},nw=gn.each,rw=function(t){var e=function(e,n){if(e.nodeName!==n.nodeName)return!1;var r=function(e){var n={};return nw(t.getAttribs(e),(function(r){var o=r.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&0!==o.indexOf("data-")&&(n[o]=t.getAttrib(e,o))})),n},o=function(t,e){var n,r;for(r in t)if(Rt(t,r)){if(n=e[r],"undefined"===typeof n)return!1;if(t[r]!==n)return!1;delete e[r]}for(r in e)if(Rt(e,r))return!1;return!0};return!!o(r(e),r(n))&&(!!o(t.parseStyle(t.getAttrib(e,"style")),t.parseStyle(t.getAttrib(n,"style")))&&(!Ch(e)&&!Ch(n)))};return{compare:e}},ow=gn.makeMap,iw=function(t){var e=[];t=t||{};var n=t.indent,r=ow(t.indent_before||""),o=ow(t.indent_after||""),i=_a.getEncodeFunc(t.entity_encoding||"raw",t.entities),u="html"===t.element_format;return{start:function(t,a,c){var s,l,f,d;if(n&&r[t]&&e.length>0&&(d=e[e.length-1],d.length>0&&"\n"!==d&&e.push("\n")),e.push("<",t),a)for(s=0,l=a.length;s<l;s++)f=a[s],e.push(" ",f.name,'="',i(f.value,!0),'"');e[e.length]=!c||u?">":" />",c&&n&&o[t]&&e.length>0&&(d=e[e.length-1],d.length>0&&"\n"!==d&&e.push("\n"))},end:function(t){var r;e.push("</",t,">"),n&&o[t]&&e.length>0&&(r=e[e.length-1],r.length>0&&"\n"!==r&&e.push("\n"))},text:function(t,n){t.length>0&&(e[e.length]=n?t:i(t))},cdata:function(t){e.push("<![CDATA[",t,"]]>")},comment:function(t){e.push("\x3c!--",t,"--\x3e")},pi:function(t,r){r?e.push("<?",t," ",i(r),"?>"):e.push("<?",t,"?>"),n&&e.push("\n")},doctype:function(t){e.push("<!DOCTYPE",t,">",n?"\n":"")},reset:function(){e.length=0},getContent:function(){return e.join("").replace(/\n$/,"")}}},uw=function(t,e){void 0===e&&(e=Va());var n=iw(t);t=t||{},t.validate=!("validate"in t)||t.validate;var r=function(r){var o=t.validate,i={3:function(t){n.text(t.value,t.raw)},8:function(t){n.comment(t.value)},7:function(t){n.pi(t.name,t.value)},10:function(t){n.doctype(t.value)},4:function(t){n.cdata(t.value)},11:function(t){if(t=t.firstChild)do{u(t)}while(t=t.next)}};n.reset();var u=function(t){var r=i[t.type];if(r)r(t);else{var a=t.name,c=t.shortEnded,s=t.attributes;if(o&&s&&s.length>1){var l=[];l.map={};var f=e.getElementRule(t.name);if(f){for(var d=0,m=f.attributesOrder.length;d<m;d++){var g=f.attributesOrder[d];if(g in s.map){var h=s.map[g];l.map[g]=h,l.push({name:g,value:h})}}for(d=0,m=s.length;d<m;d++){g=s[d].name;if(!(g in l.map)){h=s.map[g];l.map[g]=h,l.push({name:g,value:h})}}s=l}}if(n.start(t.name,s,c),!c){if(t=t.firstChild)do{u(t)}while(t=t.next);n.end(a)}}};return 1!==r.type||t.inner?i[11](r):u(r),n.getContent()};return{serialize:r}},aw=new Set;(function(){var t=["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"];Z(t,(function(t){aw.add(t)}))})();var cw=["font","text-decoration","text-emphasis"],sw=function(t,e){return wt(t.parseStyle(t.getAttrib(e,"style")))},lw=function(t){return aw.has(t)},fw=function(t,e){return lt(sw(t,e),(function(t){return!lw(t)}))},dw=function(t){return nt(t,(function(t){return J(cw,(function(e){return se(t,e)}))}))},mw=function(t,e,n){var r=sw(t,e),o=sw(t,n),i=function(r){var o=t.getStyle(e,r),i=t.getStyle(n,r);return ge(o)&&ge(i)&&o!==i};return J(r,(function(t){var e=function(e){return J(e,(function(e){return e===t}))};if(!e(o)&&e(cw)){var n=dw(o);return J(n,i)}return i(t)}))},gw=function(t,e,n){return W.from(n.container()).filter(Zr).exists((function(r){var o=t?0:-1;return e(r.data.charAt(n.offset()+o))}))},hw=N(gw,!0,Th),pw=N(gw,!1,Th),vw=function(t){var e=t.container();return Zr(e)&&(0===e.data.length||mu(e.data)&&Ip.isBookmarkNode(e.parentNode))},bw=function(t,e){return function(n){return W.from(dg(t?0:-1,n)).filter(e).isSome()}},yw=function(t){return oo(t)&&"block"===Oo(wn.fromDom(t),"display")},ww=function(t){return uo(t)&&!Xr(t)},xw=bw(!0,yw),Cw=bw(!1,yw),Sw=bw(!0,co),kw=bw(!1,co),Tw=bw(!0,Yr),Ow=bw(!1,Yr),Ew=bw(!0,ww),_w=bw(!1,ww),Aw=function(t){var e=[],n=t.dom;while(n)e.push(wn.fromDom(n)),n=n.lastChild;return e},Dw=function(t){var e=El(t,"br"),n=nt(Aw(t).slice(-1),tu);e.length===n.length&&Z(n,Or)},Mw=function(t){Tr(t),xr(t,wn.fromHtml('<br data-mce-bogus="1">'))},Rw=function(t){ur(t).each((function(e){Zn(e).each((function(n){Ji(t)&&tu(e)&&Ji(n)&&Or(e)}))}))},Nw=function(t){return t.slice(0,-1)},zw=function(t,e,n){return Ln(e,t)?Nw(Jn(t,(function(t){return n(t)||Nn(t,e)}))):[]},Bw=function(t,e){return zw(t,e,I)},Lw=function(t,e){return[t].concat(Bw(t,e))},Hw=function(t,e,n){return Gg(t,e,n,vw)},Iw=function(t,e){return ut(Lw(wn.fromDom(e.container()),t),Ji)},Pw=function(t,e,n){return Hw(t,e.dom,n).forall((function(t){return Iw(e,n).fold((function(){return!1===fg(t,n,e.dom)}),(function(r){return!1===fg(t,n,e.dom)&&Ln(r,wn.fromDom(t.container()))}))}))},Fw=function(t,e,n){return Iw(e,n).fold((function(){return Hw(t,e.dom,n).forall((function(t){return!1===fg(t,n,e.dom)}))}),(function(e){return Hw(t,e.dom,n).isNone()}))},Vw=N(Fw,!1),Uw=N(Fw,!0),jw=N(Pw,!1),Ww=N(Pw,!0),qw=function(t){return xg(t).exists(tu)},$w=function(t,e,n){var r=nt(Lw(wn.fromDom(n.container()),e),Ji),o=pt(r).getOr(e);return qg(t,o.dom,n).filter(qw)},Gw=function(t,e){return xg(e).exists(tu)||$w(!0,t,e).isSome()},Kw=function(t,e){return Cg(e).exists(tu)||$w(!1,t,e).isSome()},Xw=N($w,!1),Yw=N($w,!0),Jw=function(t){return Nf.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd()},Qw=function(t,e){var n=nt(Lw(wn.fromDom(e.container()),t),Ji);return pt(n).getOr(t)},Zw=function(t,e){return Jw(e)?pw(e):pw(e)||Yg(Qw(t,e).dom,e).exists(pw)},tx=function(t,e){return Jw(e)?hw(e):hw(e)||Xg(Qw(t,e).dom,e).exists(hw)},ex=function(t){return Y(["pre","pre-wrap"],t)},nx=function(t){return xg(t).bind((function(t){return Si(t,Vn)})).exists((function(t){return ex(Oo(t,"white-space"))}))},rx=function(t,e){return Yg(t.dom,e).isNone()},ox=function(t,e){return Xg(t.dom,e).isNone()},ix=function(t,e){return rx(t,e)||ox(t,e)||Vw(t,e)||Uw(t,e)||Kw(t,e)||Gw(t,e)},ux=function(t,e){return!nx(e)&&(ix(t,e)||Zw(t,e)||tx(t,e))},ax=function(t,e){return!nx(e)&&(Vw(t,e)||jw(t,e)||Kw(t,e)||Zw(t,e))},cx=function(t){var e=t.container(),n=t.offset();return Zr(e)&&n<e.data.length?Nf(e,n+1):t},sx=function(t,e){return!nx(e)&&(Uw(t,e)||Ww(t,e)||Gw(t,e)||tx(t,e))},lx=function(t,e){return ax(t,e)||sx(t,cx(e))},fx=function(t,e){return kh(t.charAt(e))},dx=function(t){var e=t.container();return Zr(e)&&ce(e.data,su)},mx=function(t){var e=t.split("");return Q(e,(function(t,n){return kh(t)&&n>0&&n<e.length-1&&Oh(e[n-1])&&Oh(e[n+1])?" ":t})).join("")},gx=function(t,e){var n=e.data,r=Nf(e,0);return!(!fx(n,0)||lx(t,r))&&(e.data=" "+n.slice(1),!0)},hx=function(t){var e=t.data,n=mx(e);return n!==e&&(t.data=n,!0)},px=function(t,e){var n=e.data,r=Nf(e,n.length-1);return!(!fx(n,n.length-1)||lx(t,r))&&(e.data=n.slice(0,-1)+" ",!0)},vx=function(t,e){return W.some(e).filter(dx).bind((function(e){var n=e.container(),r=gx(t,n)||hx(n)||px(t,n);return r?W.some(e):W.none()}))},bx=function(t){var e=wn.fromDom(t.getBody());t.selection.isCollapsed()&&vx(e,Nf.fromRangeStart(t.selection.getRng())).each((function(e){t.selection.setRng(e.toRange())}))},yx=function(t,e,n){var r=ot(t,(function(r,o){return Th(o)||kh(o)?r.previousCharIsSpace||""===r.str&&e||r.str.length===t.length-1&&n?{previousCharIsSpace:!1,str:r.str+su}:{previousCharIsSpace:!0,str:r.str+" "}:{previousCharIsSpace:!1,str:r.str+o}}),{previousCharIsSpace:!1,str:""});return r.str},wx=function(t,e,n){if(0!==n){var r=wn.fromDom(t),o=Ci(r,Ji).getOr(r),i=t.data.slice(e,e+n),u=e+n>=t.data.length&&sx(o,Nf(t,t.data.length)),a=0===e&&ax(o,Nf(t,0));t.replaceData(e,n,yx(i,a,u))}},xx=function(t,e){var n=t.data.slice(e),r=n.length-de(n).length;wx(t,e,r)},Cx=function(t,e){var n=t.data.slice(0,e),r=n.length-me(n).length;wx(t,e-r,r)},Sx=function(t,e,n,r){void 0===r&&(r=!0);var o=me(t.data).length,i=r?t:e,u=r?e:t;return r?i.appendData(u.data):i.insertData(0,u.data),Or(wn.fromDom(u)),n&&xx(i,o),i},kx=function(t,e){var n=t.container(),r=t.offset();return!1===Nf.isTextPosition(t)&&n===e.parentNode&&r>Nf.before(e).offset()},Tx=function(t,e){return kx(e,t)?Nf(e.container(),e.offset()-1):e},Ox=function(t){return Zr(t)?Nf(t,0):Nf.before(t)},Ex=function(t){return Zr(t)?Nf(t,t.data.length):Nf.after(t)},_x=function(t){return Pu(t.previousSibling)?W.some(Ex(t.previousSibling)):t.previousSibling?Qg(t.previousSibling):W.none()},Ax=function(t){return Pu(t.nextSibling)?W.some(Ox(t.nextSibling)):t.nextSibling?Jg(t.nextSibling):W.none()},Dx=function(t,e){var n=Nf.before(e.previousSibling?e.previousSibling:e.parentNode);return Yg(t,n).fold((function(){return Xg(t,Nf.after(e))}),W.some)},Mx=function(t,e){return Xg(t,Nf.after(e)).fold((function(){return Yg(t,Nf.before(e))}),W.some)},Rx=function(t,e){return _x(e).orThunk((function(){return Ax(e)})).orThunk((function(){return Dx(t,e)}))},Nx=function(t,e){return Ax(e).orThunk((function(){return _x(e)})).orThunk((function(){return Mx(t,e)}))},zx=function(t,e,n){return t?Nx(e,n):Rx(e,n)},Bx=function(t,e,n){return zx(t,e,n).map(N(Tx,n))},Lx=function(t,e,n){n.fold((function(){t.focus()}),(function(n){t.selection.setRng(n.toRange(),e)}))},Hx=function(t){return function(e){return e.dom===t}},Ix=function(t,e){return e&&Rt(t.schema.getBlockElements(),Hn(e))},Px=function(t){if(na(t)){var e=wn.fromHtml('<br data-mce-bogus="1">');return Tr(t),xr(t,e),W.some(Nf.before(e.dom))}return W.none()},Fx=function(t,e,n){var r=Zn(t).filter(Un),o=tr(t).filter(Un);return Or(t),mo(r,o,e,(function(t,e,r){var o=t.dom,i=e.dom,u=o.data.length;return Sx(o,i,n),r.container()===i?Nf(o,u):r})).orThunk((function(){return n&&(r.each((function(t){return Cx(t.dom,t.dom.length)})),o.each((function(t){return xx(t.dom,0)}))),e}))},Vx=function(t,e){return Rt(t.schema.getTextInlineElements(),Hn(e))},Ux=function(t,e,n,r){void 0===r&&(r=!0);var o=Bx(e,t.getBody(),n.dom),i=Ci(n,N(Ix,t),Hx(t.getBody())),u=Fx(n,o,Vx(t,n));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):i.bind(Px).fold((function(){r&&Lx(t,e,u)}),(function(n){r&&Lx(t,e,W.some(n))}))},jx=function(t){return function(e){return Nn(t,e)}},Wx=function(t){return El(t,"td,th")},qx=function(t,e){var n=function(t){return bp(wn.fromDom(t),e)},r=n(t.startContainer),o=n(t.endContainer),i=r.isSome(),u=o.isSome(),a=fo(r,o,Nn).getOr(!1),c=!a&&i&&u;return{startTable:r,endTable:o,isStartInTable:i,isEndInTable:u,isSameTable:a,isMultiTable:c}},$x=function(t,e){return{start:t,end:e}},Gx=function(t,e,n){return{rng:t,table:e,cells:n}},Kx=ti.generate([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),Xx=function(t,e){return _i(wn.fromDom(t),"td,th",e)},Yx=function(t){return!Nn(t.start,t.end)},Jx=function(t,e){return bp(t.start,e).bind((function(n){return bp(t.end,e).bind((function(t){return go(Nn(n,t),n)}))}))},Qx=function(t,e){return!Yx(t)&&Jx(t,e).exists((function(t){var e=t.dom.rows;return 1===e.length&&1===e[0].cells.length}))},Zx=function(t,e){var n=Xx(t.startContainer,e),r=Xx(t.endContainer,e);return fo(n,r,$x)},tC=function(t){return function(e){return bp(e,t).bind((function(t){return vt(Wx(t)).map((function(t){return $x(e,t)}))}))}},eC=function(t){return function(e){return bp(e,t).bind((function(t){return pt(Wx(t)).map((function(t){return $x(t,e)}))}))}},nC=function(t){return function(e){return Jx(e,t).map((function(t){return Gx(e,t,Wx(t))}))}},rC=function(t,e,n,r){if(n.collapsed||!t.forall(Yx))return W.none();if(e.isSameTable){var o=t.bind(nC(r));return W.some({start:o,end:o})}var i=Xx(n.startContainer,r),u=Xx(n.endContainer,r),a=i.bind(tC(r)).bind(nC(r)),c=u.bind(eC(r)).bind(nC(r));return W.some({start:a,end:c})},oC=function(t,e){return at(t,(function(t){return Nn(t,e)}))},iC=function(t){return fo(oC(t.cells,t.rng.start),oC(t.cells,t.rng.end),(function(e,n){return t.cells.slice(e,n+1)}))},uC=function(t,e,n){return t.exists((function(t){return Qx(t,n)&&Sp(t.start,e)}))},aC=function(t,e){var n=e.startTable,r=e.endTable,o=t.cloneRange();return n.each((function(t){return o.setStartAfter(t.dom)})),r.each((function(t){return o.setEndBefore(t.dom)})),o},cC=function(t,e,n,r){return rC(t,e,n,r).bind((function(t){var e=t.start,n=t.end;return e.or(n)})).bind((function(t){var r=e.isSameTable,o=iC(t).getOr([]);if(r&&t.cells.length===o.length)return W.some(Kx.fullTable(t.table));if(o.length>0){if(r)return W.some(Kx.partialTable(o,W.none()));var i=aC(n,e);return W.some(Kx.partialTable(o,W.some(Wt(Wt({},e),{rng:i}))))}return W.none()}))},sC=function(t,e,n,r){return rC(t,e,n,r).bind((function(t){var r=t.start,o=t.end,i=r.bind(iC).getOr([]),u=o.bind(iC).getOr([]);if(i.length>0&&u.length>0){var a=aC(n,e);return W.some(Kx.multiTable(i,u,a))}return W.none()}))},lC=function(t,e){var n=jx(t),r=Zx(e,n),o=qx(e,n);return uC(r,e,n)?r.map((function(t){return Kx.singleCellTable(e,t.start)})):o.isMultiTable?sC(r,o,e,n):cC(r,o,e,n)},fC=function(t){var e=Fn(t)?Zn(t):ur(t);return e.bind(fC).orThunk((function(){return W.some(t)}))},dC=function(t){return Z(t,(function(t){Co(t,"contenteditable"),Mw(t)}))},mC=function(t,e){return W.from(t.dom.getParent(e,t.dom.isBlock)).map(wn.fromDom)},gC=function(t,e,n){n.each((function(n){e?Or(n):(Mw(n),t.selection.setCursorLocation(n.dom,0))}))},hC=function(t,e,n,r){var o=n.cloneRange();r?(o.setStart(n.startContainer,n.startOffset),o.setEndAfter(e.dom.lastChild)):(o.setStartBefore(e.dom.firstChild),o.setEnd(n.endContainer,n.endOffset)),yC(t,o,e,!1)},pC=function(t){var e=vp(t),n=wn.fromDom(t.selection.getNode());ao(n.dom)&&na(n)?t.selection.setCursorLocation(n.dom,0):t.selection.collapse(!0),e.length>1&&J(e,(function(t){return Nn(t,n)}))&&vo(n,"data-mce-selected","1")},vC=function(t,e,n){var r=t.selection.getRng(),o=n.bind((function(n){var o=n.rng,i=n.isStartInTable,u=mC(t,i?o.endContainer:o.startContainer);o.deleteContents(),gC(t,i,u.filter(na));var a=i?e[0]:e[e.length-1];return hC(t,a,r,i),na(a)?W.none():W.some(i?e.slice(1):e.slice(0,-1))})).getOr(e);return dC(o),pC(t),!0},bC=function(t,e,n,r){var o=t.selection.getRng(),i=e[0],u=n[n.length-1];hC(t,i,o,!0),hC(t,u,o,!1);var a=na(i)?e:e.slice(1),c=na(u)?n:n.slice(0,-1);return dC(a.concat(c)),r.deleteContents(),pC(t),!0},yC=function(t,e,n,r){void 0===r&&(r=!0),e.deleteContents();var o=fC(n).getOr(n),i=wn.fromDom(t.dom.getParent(o.dom,t.dom.isBlock));if(na(i)&&(Mw(i),r&&t.selection.setCursorLocation(i.dom,0)),!Nn(n,i)){var u=so(Yn(i),n)?[]:Qn(i);Z(u.concat(rr(n)),(function(t){Nn(t,i)||Ln(t,i)||!na(t)||Or(t)}))}return!0},wC=function(t,e){return Ux(t,!1,e),!0},xC=function(t,e,n){return lC(e,n).map((function(e){return e.fold(N(yC,t),N(wC,t),N(vC,t),N(bC,t))}))},CC=function(t,e){return _C(t,e)},SC=function(t,e,n,r){return OC(e,r).fold((function(){return xC(t,e,n)}),(function(e){return CC(t,e)})).getOr(!1)},kC=function(t,e,n){var r=wn.fromDom(t.getBody()),o=t.selection.getRng();return 0!==n.length?vC(t,n,W.none()):SC(t,r,o,e)},TC=function(t,e){return ut(Lw(e,t),iu)},OC=function(t,e){return ut(Lw(e,t),qn("caption"))},EC=function(t,e,n,r,o){return $g(n,t.getBody(),o).bind((function(t){return TC(e,wn.fromDom(t.getNode())).map((function(t){return!1===Nn(t,r)}))}))},_C=function(t,e){return Mw(e),t.selection.setCursorLocation(e.dom,0),W.some(!0)},AC=function(t,e,n,r){return Jg(t.dom).bind((function(o){return Qg(t.dom).map((function(t){return e?n.isEqual(o)&&r.isEqual(t):n.isEqual(t)&&r.isEqual(o)}))})).getOr(!0)},DC=function(t,e){return _C(t,e)},MC=function(t,e,n){return OC(t,wn.fromDom(n.getNode())).map((function(t){return!1===Nn(t,e)}))},RC=function(t,e,n,r,o){return $g(n,t.getBody(),o).bind((function(i){return AC(r,n,o,i)?DC(t,r):MC(e,r,i)})).or(W.some(!0))},NC=function(t,e,n,r){var o=Nf.fromRangeStart(t.selection.getRng());return TC(n,r).bind((function(r){return na(r)?_C(t,r):EC(t,n,e,r,o)})).getOr(!1)},zC=function(t,e,n,r){var o=Nf.fromRangeStart(t.selection.getRng());return na(r)?_C(t,r):RC(t,n,e,r,o)},BC=function(t,e){return t?Tw(e):Ow(e)},LC=function(t,e){var n=Nf.fromRangeStart(t.selection.getRng());return BC(e,n)||qg(e,t.getBody(),n).exists((function(t){return BC(e,t)}))},HC=function(t,e,n){var r=wn.fromDom(t.getBody());return OC(r,n).fold((function(){return NC(t,e,r,n)||LC(t,e)}),(function(n){return zC(t,e,r,n).getOr(!1)}))},IC=function(t,e){var n=wn.fromDom(t.selection.getStart(!0)),r=vp(t);return t.selection.isCollapsed()&&0===r.length?HC(t,e,n):kC(t,n,r)},PC=function(t,e,n,r){var o=document.createRange();return o.setStart(t,e),o.setEnd(n,r),o},FC=function(t){var e=Nf.fromRangeStart(t),n=Nf.fromRangeEnd(t),r=t.commonAncestorContainer;return qg(!1,r,n).map((function(o){return!fg(e,n,r)&&fg(e,o,r)?PC(e.container(),e.offset(),o.container(),o.offset()):t})).getOr(t)},VC=function(t){return t.collapsed?t:FC(t)},UC=function(t){return t.firstChild&&t.firstChild===t.lastChild},jC=function(t){return"br"===t.name||t.value===su},WC=function(t,e){var n=t.getBlockElements();return n[e.name]&&UC(e)&&jC(e.firstChild)},qC=function(t,e){var n=t.getNonEmptyElements();return e&&(e.isEmpty(n)||WC(t,e))},$C=function(t,e){var n=e.firstChild,r=e.lastChild;return n&&"meta"===n.name&&(n=n.next),r&&"mce_marker"===r.attr("id")&&(r=r.prev),qC(t,r)&&(r=r.prev),!(!n||n!==r)&&("ul"===n.name||"ol"===n.name)},GC=function(t){var e=t.firstChild,n=t.lastChild;return e&&"META"===e.nodeName&&e.parentNode.removeChild(e),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),t},KC=function(t,e,n){var r=e.serialize(n),o=t.createFragment(r);return GC(o)},XC=function(t){return nt(t.childNodes,(function(t){return"LI"===t.nodeName}))},YC=function(t){return t.data===su||ro(t)},JC=function(t){return t&&t.firstChild&&t.firstChild===t.lastChild&&YC(t.firstChild)},QC=function(t){return!t.firstChild||JC(t)},ZC=function(t){return t.length>0&&QC(t[t.length-1])?t.slice(0,-1):t},tS=function(t,e){var n=t.getParent(e,t.isBlock);return n&&"LI"===n.nodeName?n:null},eS=function(t,e){return!!tS(t,e)},nS=function(t,e){var n=e.cloneRange(),r=e.cloneRange();return n.setStartBefore(t),r.setEndAfter(t),[n.cloneContents(),r.cloneContents()]},rS=function(t,e){var n=Nf.before(t),r=Hg(e),o=r.next(n);return o?o.toRange():null},oS=function(t,e){var n=Nf.after(t),r=Hg(e),o=r.prev(n);return o?o.toRange():null},iS=function(t,e,n,r){var o=nS(t,r),i=t.parentNode;return i.insertBefore(o[0],t),gn.each(e,(function(e){i.insertBefore(e,t)})),i.insertBefore(o[1],t),i.removeChild(t),oS(e[e.length-1],n)},uS=function(t,e,n){var r=t.parentNode;return gn.each(e,(function(e){r.insertBefore(e,t)})),rS(t,n)},aS=function(t,e,n,r){return r.insertAfter(e.reverse(),t),oS(e[0],n)},cS=function(t,e,n,r){var o=KC(e,t,r),i=tS(e,n.startContainer),u=ZC(XC(o.firstChild)),a=1,c=2,s=e.getRoot(),l=function(t){var r=Nf.fromRangeStart(n),o=Hg(e.getRoot()),u=t===a?o.prev(r):o.next(r);return!u||tS(e,u.getNode())!==i};return l(a)?uS(i,u,s):l(c)?aS(i,u,s,e):iS(i,u,s,n)},sS=function(t,e,n){var r=wn.fromDom(t.getRoot());return n=ax(r,Nf.fromRangeStart(e))?n.replace(/^ /,"&nbsp;"):n.replace(/^&nbsp;/," "),n=sx(r,Nf.fromRangeEnd(e))?n.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):n.replace(/&nbsp;(<br( \/)?>)?$/," "),n},lS=ao,fS=function(t,e,n){if(null!==n){var r=t.getParent(e.endContainer,lS);return n===r&&Sp(wn.fromDom(n),e)}return!1},dS=function(t,e,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(t.dom.createFragment(e),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?t.dom.setHTML(n,e):t.selection.setContent(e)}},mS=function(t,e){W.from(t.getParent(e,"td,th")).map(wn.fromDom).each(Rw)},gS=function(t,e){var n=t.schema.getTextInlineElements(),r=t.dom;if(e){var o=t.getBody(),i=rw(r);gn.each(r.select("*[data-mce-fragment]"),(function(t){var e=k(n[t.nodeName.toLowerCase()]);if(e&&fw(r,t))for(var u=t.parentNode;k(u)&&u!==o;u=u.parentNode){var a=mw(r,t,u);if(a)break;if(i.compare(u,t)){r.remove(t,!0);break}}}))}},hS=function(t){var e=t;while(e=e.walk())1===e.type&&e.attr("data-mce-fragment","1")},pS=function(t){gn.each(t.getElementsByTagName("*"),(function(t){t.removeAttribute("data-mce-fragment")}))},vS=function(t){return!!t.getAttribute("data-mce-fragment")},bS=function(t,e){return e&&!t.schema.getShortEndedElements()[e.nodeName]},yS=function(t,e){var n,r=t.dom,o=t.selection;if(e){o.scrollIntoView(e);var i=Pp(t.getBody(),e);if("false"===r.getContentEditable(i))return r.remove(e),void o.select(i);var u=r.createRng(),a=e.previousSibling;if(Zr(a)){if(u.setStart(a,a.nodeValue.length),!tn.ie){var c=e.nextSibling;Zr(c)&&(a.appendData(c.data),c.parentNode.removeChild(c))}}else u.setStartBefore(e),u.setEndBefore(e);var s=function(e){var n=Nf.fromRangeStart(e),r=Hg(t.getBody());if(n=r.next(n),n)return n.toRange()},l=r.getParent(e,r.isBlock);r.remove(e),l&&r.isEmpty(l)&&(t.$(l).empty(),u.setStart(l,0),u.setEnd(l,0),lS(l)||vS(l)||!(n=s(u))?r.add(l,r.create("br",{"data-mce-bogus":"1"})):(u=n,r.remove(l))),o.setRng(u)}},wS=function(t){var e=t.dom,n=VC(t.selection.getRng());t.selection.setRng(n);var r=e.getParent(n.startContainer,lS);fS(e,n,r)?yC(t,n,wn.fromDom(r)):t.getDoc().execCommand("Delete",!1,null)},xS=function(t,e,n){var r,o,i,u=t.selection,a=t.dom;/^ | $/.test(e)&&(e=sS(a,u.getRng(),e));var c=t.parser,s=n.merge,l=uw({validate:im(t)},t.schema),f='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>',d=t.fire("BeforeSetContent",{content:e,format:"html",selection:!0,paste:n.paste});if(d.isDefaultPrevented())t.fire("SetContent",{content:d.content,format:"html",selection:!0,paste:n.paste});else{e=d.content,-1===e.indexOf("{$caret}")&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,f),o=u.getRng();var m=o.startContainer||(o.parentElement?o.parentElement():null),g=t.getBody();m===g&&u.isCollapsed()&&a.isBlock(g.firstChild)&&bS(t,g.firstChild)&&a.isEmpty(g.firstChild)&&(o=a.createRng(),o.setStart(g.firstChild,0),o.setEnd(g.firstChild,0),u.setRng(o)),u.isCollapsed()||wS(t),r=u.getNode();var h={context:r.nodeName.toLowerCase(),data:n.data,insert:!0},p=c.parse(e,h);if(!0===n.paste&&$C(t.schema,p)&&eS(a,r))return o=cS(l,a,u.getRng(),p),u.setRng(o),void t.fire("SetContent",d);if(hS(p),i=p.lastChild,"mce_marker"===i.attr("id")){var v=i;for(i=i.prev;i;i=i.walk(!0))if(3===i.type||!a.isBlock(i.name)){t.schema.isValidChild(i.parent.name,"span")&&i.parent.insert(v,i,"br"===i.name);break}}if(t._selectionOverrides.showBlockCaretContainer(r),h.invalid){t.selection.setContent(f),r=u.getNode();var b=t.getBody();9===r.nodeType?r=i=b:i=r;while(i!==b)r=i,i=i.parentNode;e=r===b?b.innerHTML:a.getOuterHTML(r),e=l.serialize(c.parse(e.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,(function(){return l.serialize(p)})))),r===b?a.setHTML(b,e):a.setOuterHTML(r,e)}else e=l.serialize(p),dS(t,e,r);gS(t,s),yS(t,a.get("mce_marker")),pS(t.getBody()),mS(a,u.getStart()),t.fire("SetContent",d),t.addVisual()}},CS=function(t,e){e(t),t.firstChild&&CS(t.firstChild,e),t.next&&CS(t.next,e)},SS=function(t,e,n){var r={},o={},i=[];for(var u in n.firstChild&&CS(n.firstChild,(function(n){Z(t,(function(t){t.name===n.name&&(r[t.name]?r[t.name].nodes.push(n):r[t.name]={filter:t,nodes:[n]})})),Z(e,(function(t){"string"===typeof n.attr(t.name)&&(o[t.name]?o[t.name].nodes.push(n):o[t.name]={filter:t,nodes:[n]})}))})),r)Rt(r,u)&&i.push(r[u]);for(var a in o)Rt(o,a)&&i.push(o[a]);return i},kS=function(t,e,n){var r=SS(t,e,n);Z(r,(function(t){Z(t.filter.callbacks,(function(e){e(t.nodes,t.filter.name,{})}))}))},TS="html",OS=function(t){return t instanceof Ay},ES=function(t){dy(t)&&Jg(t.getBody()).each((function(e){var n=e.getNode(),r=Yr(n)?Jg(n).getOr(e):e;t.selection.setRng(r.toRange())}))},_S=function(t,e,n){t.dom.setHTML(t.getBody(),e),!0!==n&&ES(t)},AS=function(t,e,n,r){if(0===n.length||/^\s+$/.test(n)){var o='<br data-mce-bogus="1">';"TABLE"===e.nodeName?n="<tr><td>"+o+"</td></tr>":/^(UL|OL)$/.test(e.nodeName)&&(n="<li>"+o+"</li>");var i=Td(t);i&&t.schema.isValidChild(e.nodeName.toLowerCase(),i.toLowerCase())?(n=o,n=t.dom.createHTML(i,Od(t),n)):n||(n='<br data-mce-bogus="1">'),_S(t,n,r.no_selection),t.fire("SetContent",r)}else"raw"!==r.format&&(n=uw({validate:t.validate},t.schema).serialize(t.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=uu(wn.fromDom(e))?n:gn.trim(n),_S(t,r.content,r.no_selection),r.no_events||t.fire("SetContent",r);return r.content},DS=function(t,e,n,r){kS(t.parser.getNodeFilters(),t.parser.getAttributeFilters(),n);var o=uw({validate:t.validate},t.schema).serialize(n);return r.content=uu(wn.fromDom(e))?o:gn.trim(o),_S(t,r.content,r.no_selection),r.no_events||t.fire("SetContent",r),n},MS=function(t,e){return Wt(Wt({format:TS},t),{set:!0,content:OS(e)?"":e})},RS=function(t,e,n){var r=MS(n,e),o=n.no_events?r:t.fire("BeforeSetContent",r);return OS(e)||(e=o.content),W.from(t.getBody()).fold(D(e),(function(n){return OS(e)?DS(t,n,e,o):AS(t,n,e,o)}))},NS=function(t,e){return ki(t,e).isSome()},zS=function(t){return T(t)?t:I},BS=function(t,e,n){var r=t.dom,o=zS(n);while(r.parentNode){r=r.parentNode;var i=wn.fromDom(r),u=e(i);if(u.isSome())return u;if(o(i))break}return W.none()},LS=function(t,e,n){var r=e(t),o=zS(n);return r.orThunk((function(){return o(t)?W.none():BS(t,e,o)}))},HS=Lh,IS=function(t,e,n){var r=t.formatter.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o];if(Wh(i)&&!1===i.inherit&&t.dom.is(e,i.selector))return!0}return!1},PS=function(t,e,n,r,o){var i=t.dom.getRoot();return e!==i&&(e=t.dom.getParent(e,(function(e){return!!IS(t,e,n)||(e.parentNode===i||!!US(t,e,n,r,!0))})),!!US(t,e,n,r,o))},FS=function(t,e,n){return!!HS(e,n.inline)||(!!HS(e,n.block)||(n.selector?1===e.nodeType&&t.is(e,n.selector):void 0))},VS=function(t,e,n,r,o,i){var u=n[r];if(T(n.onmatch))return n.onmatch(e,n,r);if(u)if(C(u.length)){for(var a in u)if(Rt(u,a)){var c="attributes"===r?t.getAttrib(e,a):Ih(t,e,a),s=Bh(u[a],i),l=S(c)||he(c);if(l&&S(s))continue;if(o&&l&&!n.exact)return!1;if((!o||n.exact)&&!HS(c,Hh(t,s,a)))return!1}}else for(var f=0;f<u.length;f++)if("attributes"===r?t.getAttrib(e,u[f]):Ih(t,e,u[f]))return!0;return!0},US=function(t,e,n,r,o){var i=t.formatter.get(n),u=t.dom;if(i&&e)for(var a=0;a<i.length;a++){var c=i[a];if(FS(t.dom,e,c)&&VS(u,e,c,"attributes",o,r)&&VS(u,e,c,"styles",o,r)){var s=c.classes;if(s)for(var l=0;l<s.length;l++)if(!t.dom.hasClass(e,Bh(s[l],r)))return;return c}}},jS=function(t,e,n,r,o){if(r)return PS(t,r,e,n,o);if(r=t.selection.getNode(),PS(t,r,e,n,o))return!0;var i=t.selection.getStart();return!(i===r||!PS(t,i,e,n,o))},WS=function(t,e,n){var r=[],o={},i=t.selection.getStart();return t.dom.getParent(i,(function(i){for(var u=0;u<e.length;u++){var a=e[u];!o[a]&&US(t,i,a,n)&&(o[a]=!0,r.push(a))}}),t.dom.getRoot()),r},qS=function(t,e){var n=function(e){return Nn(e,wn.fromDom(t.getBody()))},r=function(e,n){return US(t,e.dom,n)?W.some(n):W.none()};return W.from(t.selection.getStart(!0)).bind((function(t){return LS(wn.fromDom(t),(function(t){return yt(e,(function(e){return r(t,e)}))}),n)})).getOrNull()},$S=function(t,e){var n=t.formatter.get(e),r=t.dom;if(n)for(var o=t.selection.getStart(),i=Fh(r,o),u=n.length-1;u>=0;u--){var a=n[u];if(!Wh(a)||k(a.defaultBlock))return!0;for(var c=i.length-1;c>=0;c--)if(r.is(i[c],a.selector))return!0}return!1},GS=function(t,e,n){return ot(n,(function(n,r){var o=Vh(t,r);return t.formatter.matchNode(e,r,{},o)?n.concat([r]):n}),[])},KS=du,XS="_mce_caret",YS=function(t,e){return t.importNode(e,!0)},JS=function(t){var e=[];while(t){if(3===t.nodeType&&t.nodeValue!==KS||t.childNodes.length>1)return[];1===t.nodeType&&e.push(t),t=t.firstChild}return e},QS=function(t){return JS(t).length>0},ZS=function(t){if(t){var e=new Fi(t,t);for(t=e.current();t;t=e.next())if(Zr(t))return t}return null},tk=function(t){var e=wn.fromTag("span");return bo(e,{id:XS,"data-mce-bogus":"1","data-mce-type":"format-caret"}),t&&xr(e,wn.fromText(KS)),e},ek=function(t){var e=ZS(t);return e&&e.nodeValue.charAt(0)===KS&&e.deleteData(0,1),e},nk=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(QS(e))Ux(t,!1,wn.fromDom(e),n);else{var i=o.getRng(),u=r.getParent(e,r.isBlock),a=i.startContainer,c=i.startOffset,s=i.endContainer,l=i.endOffset,f=ek(e);r.remove(e,!0),a===f&&c>0&&i.setStart(f,c-1),s===f&&l>0&&i.setEnd(f,l-1),u&&r.isEmpty(u)&&Mw(wn.fromDom(u)),o.setRng(i)}},rk=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(e)nk(t,e,n);else if(e=eh(t.getBody(),o.getStart()),!e)while(e=r.get(XS))nk(t,e,!1)},ok=function(t,e,n){var r=t.dom,o=r.getParent(n,N(Mh,t));o&&r.isEmpty(o)?n.parentNode.replaceChild(e,n):(Dw(wn.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(e,n):r.insertAfter(e,n))},ik=function(t,e){return t.appendChild(e),e},uk=function(t,e){var n=rt(t,(function(t,e){return ik(t,e.cloneNode(!1))}),e);return ik(n,n.ownerDocument.createTextNode(KS))},ak=function(t,e,n,r,o,i){var u=t.formatter,a=t.dom,c=nt(wt(u.get()),(function(t){return t!==r&&!ce(t,"removeformat")})),s=GS(t,n,c),l=nt(s,(function(e){return!Uh(t,e,r)}));if(l.length>0){var f=n.cloneNode(!1);return a.add(e,f),u.remove(r,o,f,i),a.remove(f),W.some(f)}return W.none()},ck=function(t,e,n){var r,o,i=t.selection,u=i.getRng(),a=u.startOffset,c=u.startContainer,s=c.nodeValue;r=eh(t.getBody(),i.getStart()),r&&(o=ZS(r));var l=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(s&&a>0&&a<s.length&&l.test(s.charAt(a))&&l.test(s.charAt(a-1))){var f=i.getBookmark();u.collapse(!0);var d=sp(t,u,t.formatter.get(e));d=Sv(d),t.formatter.apply(e,n,d),i.moveToBookmark(f)}else r&&o.nodeValue===KS||(r=YS(t.getDoc(),tk(!0).dom),o=r.firstChild,u.insertNode(r),a=1),t.formatter.apply(e,n,r),i.setCursorLocation(o,a)},sk=function(t,e,n,r){var o,i,u,a=t.dom,c=t.selection,s=[],l=c.getRng(),f=l.startContainer,d=l.startOffset;i=f,3===f.nodeType&&(d!==f.nodeValue.length&&(o=!0),i=i.parentNode);while(i){if(US(t,i,e,n,r)){u=i;break}i.nextSibling&&(o=!0),s.push(i),i=i.parentNode}if(u)if(o){var m=c.getBookmark();l.collapse(!0);var g=sp(t,l,t.formatter.get(e),!0);g=Sv(g),t.formatter.remove(e,n,g,r),c.moveToBookmark(m)}else{var h=eh(t.getBody(),u),p=tk(!1).dom;ok(t,p,null!==h?h:u);var v=ak(t,p,u,e,n,r),b=uk(s.concat(v.toArray()),p);nk(t,h,!1),c.setCursorLocation(b,1),a.isEmpty(u)&&a.remove(u)}},lk=function(t,e){var n=t.selection,r=t.getBody();rk(t,null,!1),8!==e&&46!==e||!n.isCollapsed()||n.getStart().innerHTML!==KS||rk(t,eh(r,n.getStart())),37!==e&&39!==e||rk(t,eh(r,n.getStart()))},fk=function(t){t.on("mouseup keydown",(function(e){lk(t,e.keyCode)}))},dk=function(t,e){var n=tk(!1),r=uk(e,n.dom);return br(wn.fromDom(t),n),Or(wn.fromDom(t)),Nf(r,0)},mk=function(t,e){var n=t.schema.getTextInlineElements();return Rt(n,Hn(e))&&!th(e.dom)&&!Kr(e.dom)},gk=function(t){return th(t.dom)&&QS(t.dom)},hk={},pk=Pt,vk=Ht,bk=function(t,e){var n=hk[t];n||(hk[t]=[]),hk[t].push(e)},yk=function(t,e){vk(hk[t],(function(t){t(e)}))};bk("pre",(function(t){var e,n=t.selection.getRng(),r=function(t){return i(t.previousSibling)&&-1!==Ft(e,t.previousSibling)},o=function(t,e){Ns(e).remove(),Ns(t).append("<br><br>").append(e.childNodes)},i=Wr(["pre"]);n.collapsed||(e=t.selection.getSelectedBlocks(),vk(pk(pk(e,i),r),(function(t){o(t.previousSibling,t)})))}));var wk=gn.each,xk=function(t){return jr(t)&&!Ch(t)&&!th(t)&&!Kr(t)},Ck=function(t,e){for(var n=t;n;n=n[e]){if(Zr(n)&&ge(n.data))return t;if(jr(n)&&!Ch(n))return n}return t},Sk=function(t,e,n){var r=rw(t);if(e&&n&&(e=Ck(e,"previousSibling"),n=Ck(n,"nextSibling"),r.compare(e,n))){for(var o=e.nextSibling;o&&o!==n;){var i=o;o=o.nextSibling,e.appendChild(i)}return t.remove(n),gn.each(gn.grep(n.childNodes),(function(t){e.appendChild(t)})),e}return n},kk=function(t,e,n,r){if(r&&!1!==e.merge_siblings){var o=Sk(t,Dh(r),r);Sk(t,o,Dh(o,!0))}},Tk=function(t,e,n){if(e.clear_child_styles){var r=e.links?"*:not(a)":"*";wk(t.select(r,n),(function(n){xk(n)&&wk(e.styles,(function(e,r){t.setStyle(n,r,"")}))}))}},Ok=function(t,e,n){wk(t.childNodes,(function(t){xk(t)&&(e(t)&&n(t),t.hasChildNodes()&&Ok(t,e,n))}))},Ek=function(t,e){"SPAN"===e.nodeName&&0===t.getAttribs(e).length&&t.remove(e,!0)},_k=function(t,e){return function(n){return!(!n||!Ih(t,n,e))}},Ak=function(t,e,n){return function(r){t.setStyle(r,e,n),""===r.getAttribute("style")&&r.removeAttribute("style"),Ek(t,r)}},Dk=ti.generate([{keep:[]},{rename:["name"]},{removed:[]}]),Mk=/^(src|href|style)$/,Rk=gn.each,Nk=Lh,zk=function(t){return/^(TR|TH|TD)$/.test(t.nodeName)},Bk=function(t,e,n){return t.isChildOf(e,n)&&e!==n&&!t.isBlock(n)},Lk=function(t,e,n){var r=e[n?"startContainer":"endContainer"],o=e[n?"startOffset":"endOffset"];if(jr(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[o>i?i:o]}return Zr(r)&&n&&o>=r.nodeValue.length&&(r=new Fi(r,t.getBody()).next()||r),Zr(r)&&!n&&0===o&&(r=new Fi(r,t.getBody()).prev()||r),r},Hk=function(t,e){var n=e?"firstChild":"lastChild";if(zk(t)&&t[n]){var r=t[n];return"TR"===t.nodeName&&r[n]||r}return t},Ik=function(t,e,n,r){var o=t.create(n,r);return e.parentNode.insertBefore(o,e),o.appendChild(e),o},Pk=function(t,e,n,r,o){var i=wn.fromDom(e),u=wn.fromDom(t.create(r,o)),a=n?nr(i):er(i);return kr(u,a),n?(br(i,u),wr(u,i)):(yr(i,u),xr(u,i)),u.dom},Fk=function(t,e,n){return!(!qh(n)||!Nk(e,n.inline))||(!(!jh(n)||!Nk(e,n.block))||(Wh(n)?jr(e)&&t.is(e,n.selector):void 0))},Vk=function(t,e){return e.links&&"A"===t.nodeName},Uk=function(t,e,n,r){var o=Dh(e,n,r);return S(o)||"BR"===o.nodeName||t.isBlock(o)},jk=function(t,e,n){var r,o=e.parentNode,i=t.dom,u=Td(t);jh(n)&&(u?o===i.getRoot()&&(n.list_block&&Nk(e,n.list_block)||Z(bt(e.childNodes),(function(e){Rh(t,u,e.nodeName.toLowerCase())?r?r.appendChild(e):(r=Ik(i,e,u),i.setAttribs(r,t.settings.forced_root_block_attrs)):r=null}))):i.isBlock(e)&&!i.isBlock(o)&&(Uk(i,e,!1)||Uk(i,e.firstChild,!0,!0)||e.insertBefore(i.create("br"),e.firstChild),Uk(i,e,!0)||Uk(i,e.lastChild,!1,!0)||e.appendChild(i.create("br")))),$h(n)&&!Nk(n.inline,e)||i.remove(e,!0)},Wk=function(t,e,n,r,o){var i,u=t.dom;if(!Fk(u,r,e)&&!Vk(r,e))return Dk.keep();var a=r;if(qh(e)&&"all"===e.remove&&y(e.preserve_attributes)){var c=nt(u.getAttribs(a),(function(t){return Y(e.preserve_attributes,t.name.toLowerCase())}));if(u.removeAllAttribs(a),Z(c,(function(t){return u.setAttrib(a,t.name,t.value)})),c.length>0)return Dk.rename("span")}if("all"!==e.remove){Rk(e.styles,(function(t,r){t=Hh(u,Bh(t,n),r+""),O(r)&&(r=t,o=null),(e.remove_similar||!o||Nk(Ih(u,o,r),t))&&u.setStyle(a,r,""),i=!0})),i&&""===u.getAttrib(a,"style")&&(a.removeAttribute("style"),a.removeAttribute("data-mce-style")),Rk(e.attributes,(function(t,r){var i;if(t=Bh(t,n),O(r)&&(r=t,o=null),e.remove_similar||!o||Nk(u.getAttrib(o,r),t)){if("class"===r&&(t=u.getAttrib(a,r),t&&(i="",Z(t.split(/\s+/),(function(t){/mce\-\w+/.test(t)&&(i+=(i?" ":"")+t)})),i)))return void u.setAttrib(a,r,i);if(Mk.test(r)&&a.removeAttribute("data-mce-"+r),"style"===r&&Wr(["li"])(a)&&"none"===u.getStyle(a,"list-style-type"))return a.removeAttribute(r),void u.setStyle(a,"list-style-type","none");"class"===r&&a.removeAttribute("className"),a.removeAttribute(r)}})),Rk(e.classes,(function(t){t=Bh(t,n),o&&!u.hasClass(o,t)||u.removeClass(a,t)}));for(var s=u.getAttribs(a),l=0;l<s.length;l++){var f=s[l].nodeName;if(0!==f.indexOf("_")&&0!==f.indexOf("data-"))return Dk.keep()}}return"none"!==e.remove?(jk(t,a,e),Dk.removed()):Dk.keep()},qk=function(t,e,n,r,o){return Wk(t,e,n,r,o).fold(I,(function(e){return t.dom.rename(r,e),!0}),P)},$k=function(t,e,n,r,o){var i;return Z(Fh(t.dom,e.parentNode).reverse(),(function(e){if(!i&&"_start"!==e.id&&"_end"!==e.id){var u=US(t,e,n,r,o);u&&!1!==u.split&&(i=e)}})),i},Gk=function(t,e,n,r){return Wk(t,e,n,r,r).fold(D(r),(function(e){var n=t.dom.createFragment();return n.appendChild(r),t.dom.rename(r,e)}),D(null))},Kk=function(t,e,n,r,o,i,u,a){var c,s,l,f=t.dom;if(n){for(var d=n.parentNode,m=r.parentNode;m&&m!==d;m=m.parentNode){c=f.clone(m,!1);for(var g=0;g<e.length;g++)if(c=Gk(t,e[g],a,c),null===c)break;c&&(s&&c.appendChild(s),l||(l=c),s=c)}!i||u.mixed&&f.isBlock(n)||(r=f.split(n,r)),s&&(o.parentNode.insertBefore(s,o),l.appendChild(o),qh(u)&&kk(f,u,a,s))}return r},Xk=function(t,e,n,r,o){var i=t.formatter.get(e),u=i[0],a=!0,c=t.dom,s=t.selection,l=function(r){var a=$k(t,r,e,n,o);return Kk(t,i,a,r,r,!0,u,n)},f=function(t){return Ch(t)&&jr(t)&&("_start"===t.id||"_end"===t.id)},d=function(e){return J(i,(function(r){return qk(t,r,n,e,e)}))},m=function(e){var n=!0,r=!1;jr(e)&&c.getContentEditable(e)&&(n=a,a="true"===c.getContentEditable(e),r=!0);var o=bt(e.childNodes);if(a&&!r){var s=d(e),l=s||J(i,(function(t){return FS(c,e,t)})),f=e.parentNode;!l&&k(f)&&Gh(u)&&d(f)}if(u.deep&&o.length){for(var g=0;g<o.length;g++)m(o[g]);r&&(a=n)}var h=["underline","line-through","overline"];Z(h,(function(n){jr(e)&&t.dom.getStyle(e,"text-decoration")===n&&e.parentNode&&Ph(c,e.parentNode)===n&&qk(t,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:n}},null,e)}))},g=function(t){var e=c.get(t?"_start":"_end"),n=e[t?"firstChild":"lastChild"];return f(n)&&(n=n[t?"firstChild":"lastChild"]),Zr(n)&&0===n.data.length&&(n=t?e.previousSibling||e.nextSibling:e.nextSibling||e.previousSibling),c.remove(e,!0),n},h=function(e){var n,r,o=sp(t,e,i,e.collapsed);if(u.split){if(o=Sv(o),n=Lk(t,o,!0),r=Lk(t,o),n!==r){if(n=Hk(n,!0),r=Hk(r,!1),Bk(c,n,r)){var a=W.from(n.firstChild).getOr(n);return l(Pk(c,a,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void g(!0)}if(Bk(c,r,n)){a=W.from(r.lastChild).getOr(r);return l(Pk(c,a,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void g(!1)}n=Ik(c,n,"span",{id:"_start","data-mce-type":"bookmark"}),r=Ik(c,r,"span",{id:"_end","data-mce-type":"bookmark"});var s=c.createRng();s.setStartAfter(n),s.setEndBefore(r),lp(c,s,(function(t){Z(t,(function(t){Ch(t)||Ch(t.parentNode)||l(t)}))})),l(n),l(r),n=g(!0),r=g()}else n=r=l(n);o.startContainer=n.parentNode?n.parentNode:n,o.startOffset=c.nodeIndex(n),o.endContainer=r.parentNode?r.parentNode:r,o.endOffset=c.nodeIndex(r)+1}lp(c,o,(function(t){Z(t,m)}))};if(r){if(Eh(r)){var p=c.createRng();p.setStartBefore(r),p.setEndAfter(r),h(p)}else h(r);tv(t,e,r,n)}else if("false"!==c.getContentEditable(s.getNode()))s.isCollapsed()&&qh(u)&&!vp(t).length?sk(t,e,n,o):(Ep(s,!0,(function(){Op(t,h)})),qh(u)&&jS(t,e,n,s.getStart())&&Ah(c,s,s.getRng()),t.nodeChanged()),tv(t,e,r,n);else{r=s.getNode();for(var v=0;v<i.length;v++)if(i[v].ceFalseOverride&&qk(t,i[v],n,r,r))break;tv(t,e,r,n)}},Yk=gn.each,Jk=function(t,e,n,r){var o=function(e){if(1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType){var n=Ph(t,e.parentNode);t.getStyle(e,"color")&&n?t.setStyle(e,"text-decoration",n):t.getStyle(e,"text-decoration")===n&&t.setStyle(e,"text-decoration",null)}};e.styles&&(e.styles.color||e.styles.textDecoration)&&(gn.walk(r,o,"childNodes"),o(r))},Qk=function(t,e,n,r){e.styles&&e.styles.backgroundColor&&Ok(r,_k(t,"fontSize"),Ak(t,"backgroundColor",Bh(e.styles.backgroundColor,n)))},Zk=function(t,e,n,r){!qh(e)||"sub"!==e.inline&&"sup"!==e.inline||(Ok(r,_k(t,"fontSize"),Ak(t,"fontSize","")),t.remove(t.select("sup"===e.inline?"sub":"sup",r),!0))},tT=function(t,e,n,r){Yk(e,(function(e){qh(e)&&Yk(t.dom.select(e.inline,r),(function(r){xk(r)&&qk(t,e,n,r,e.exact?r:null)})),Tk(t.dom,e,r)}))},eT=function(t,e,n,r,o){US(t,o.parentNode,n,r)&&qk(t,e,r,o)||e.merge_with_parents&&t.dom.getParent(o.parentNode,(function(i){if(US(t,i,n,r))return qk(t,e,r,o),!0}))},nT=gn.each,rT=function(t){return jr(t)&&!Ch(t)&&!th(t)&&!Kr(t)},oT=function(t,e,n,r){if(sm(t)&&qh(e)){var o=Ia(t.schema),i=NS(wn.fromDom(n),(function(t){return th(t.dom)}));return Nt(o,r)&&na(wn.fromDom(n.parentNode),!1)&&!i}return!1},iT=function(t,e,n,r){var o=t.formatter.get(e),i=o[0],u=!r&&t.selection.isCollapsed(),a=t.dom,c=t.selection,s=function(t,e){if(void 0===e&&(e=i),T(e.onformat)&&e.onformat(t,e,n,r),nT(e.styles,(function(e,r){a.setStyle(t,r,Bh(e,n))})),e.styles){var o=a.getAttrib(t,"style");o&&a.setAttrib(t,"data-mce-style",o)}nT(e.attributes,(function(e,r){a.setAttrib(t,r,Bh(e,n))})),nT(e.classes,(function(e){e=Bh(e,n),a.hasClass(t,e)||a.addClass(t,e)}))},l=function(t,e){var n=!1;return nT(t,(function(t){return!!Wh(t)&&(k(t.collapsed)&&t.collapsed!==u?void 0:a.is(e,t.selector)&&!th(e)?(s(e,t),n=!0,!1):void 0)})),n},f=function(t){if(v(t)){var e=a.create(t);return s(e),e}return null},d=function(r,u,a){var c=[],d=!0,m=i.inline||i.block,g=f(m);lp(r,u,(function(u){var f,h=function(u){var p=!1,v=d,b=u.nodeName.toLowerCase(),y=u.parentNode,w=y.nodeName.toLowerCase();if(jr(u)&&r.getContentEditable(u)&&(v=d,d="true"===r.getContentEditable(u),p=!0),ro(u)&&!oT(t,i,u,w))return f=null,void(jh(i)&&r.remove(u));if(jh(i)&&i.wrapper&&US(t,u,e,n))f=null;else{if(d&&!p&&jh(i)&&!i.wrapper&&Mh(t,b)&&Rh(t,w,m)){var x=r.rename(u,m);return s(x),c.push(x),void(f=null)}if(Wh(i)){var C=l(o,u);if(!C&&k(y)&&Gh(i)&&(C=l(o,y)),!qh(i)||C)return void(f=null)}!d||p||!Rh(t,m,b)||!Rh(t,w,m)||!a&&Zr(u)&&mu(u.data)||th(u)||qh(i)&&r.isBlock(u)?(f=null,Z(bt(u.childNodes),h),p&&(d=v),f=null):(f||(f=r.clone(g,!1),u.parentNode.insertBefore(f,u),c.push(f)),f.appendChild(u))}};Z(u,h)})),!0===i.links&&Z(c,(function(t){var e=function(t){"A"===t.nodeName&&s(t,i),Z(bt(t.childNodes),e)};e(t)})),Z(c,(function(u){var a=function(t){var e=0;return Z(t.childNodes,(function(t){zh(t)||Ch(t)||e++})),e},l=function(t){var e=ut(t.childNodes,rT).filter((function(t){return FS(r,t,i)}));return e.map((function(e){var n=r.clone(e,!1);return s(n),r.replace(n,t,!0),r.remove(e,!0),n})).getOr(t)},f=a(u);!(c.length>1)&&r.isBlock(u)||0!==f?(qh(i)||jh(i)&&i.wrapper)&&(i.exact||1!==f||(u=l(u)),tT(t,o,n,u),eT(t,i,e,n,u),Qk(r,i,n,u),Jk(r,i,n,u),Zk(r,i,n,u),kk(r,i,n,u)):r.remove(u,!0)}))};if("false"!==a.getContentEditable(c.getNode())){if(i){if(r)if(Eh(r)){if(!l(o,r)){var m=a.createRng();m.setStartBefore(r),m.setEndAfter(r),d(a,sp(t,m,o),!0)}}else d(a,r,!0);else if(u&&qh(i)&&!vp(t).length)ck(t,e,n);else{var g=c.getNode(),h=o[0];t.settings.forced_root_block||!h.defaultBlock||a.getParent(g,a.isBlock)||iT(t,h.defaultBlock),c.setRng(VC(c.getRng())),Ep(c,!0,(function(){Op(t,(function(e,n){var r=n?e:sp(t,e,o);d(a,r,!1)}))})),Ah(a,c,c.getRng()),t.nodeChanged()}yk(e,t)}Zp(t,e,r,n)}else{r=c.getNode();for(var p=0,b=o.length;p<b;p++){var y=o[p];if(y.ceFalseOverride&&Wh(y)&&a.is(r,y.selector)){s(r,y);break}}Zp(t,e,r,n)}},uT=function(t){return Rt(t,"vars")},aT=function(t,e){t.set({}),e.on("NodeChange",(function(n){fT(e,n.element,t.get())})),e.on("FormatApply FormatRemove",(function(n){var r=W.from(n.node).map((function(t){return Eh(t)?t:t.startContainer})).bind((function(t){return jr(t)?W.some(t):W.from(t.parentElement)})).getOrThunk((function(){return cT(e)}));fT(e,r,t.get())}))},cT=function(t){return t.selection.getStart()},sT=function(t,e,n,r,o){var i=function(e){var i=t.formatter.matchNode(e,n,null!==o&&void 0!==o?o:{},r);return!C(i)},u=function(e){return!!IS(t,e,n)||!r&&k(t.formatter.matchNode(e,n,o,!0))};return it(e,i,u)},lT=function(t,e){var n=null!==e&&void 0!==e?e:cT(t);return nt(Fh(t.dom,n),(function(t){return jr(t)&&!Kr(t)}))},fT=function(t,e,n){var r=lT(t,e);Ct(n,(function(n,o){var i=function(n){var i=sT(t,r,o,n.similar,uT(n)?n.vars:void 0),u=i.isSome();if(n.state.get()!==u){n.state.set(u);var a=i.getOr(e);uT(n)?n.callback(u,{node:a,format:o,parents:r}):Z(n.callbacks,(function(t){return t(u,{node:a,format:o,parents:r})}))}};Z([n.withSimilar,n.withoutSimilar],i),Z(n.withVars,i)}))},dT=function(t,e,n,r,o,i){var u=e.get();Z(n.split(","),(function(e){var n=Mt(u,e).getOrThunk((function(){var t={withSimilar:{state:Ys(!1),similar:!0,callbacks:[]},withoutSimilar:{state:Ys(!1),similar:!1,callbacks:[]},withVars:[]};return u[e]=t,t})),a=function(){var n=lT(t);return sT(t,n,e,o,i).isSome()};if(C(i)){var c=o?n.withSimilar:n.withoutSimilar;c.callbacks.push(r),1===c.callbacks.length&&c.state.set(a())}else n.withVars.push({state:Ys(a()),similar:o,vars:i,callback:r})})),e.set(u)},mT=function(t,e,n){var r=t.get();Z(e.split(","),(function(t){return Mt(r,t).each((function(e){r[t]={withSimilar:Wt(Wt({},e.withSimilar),{callbacks:nt(e.withSimilar.callbacks,(function(t){return t!==n}))}),withoutSimilar:Wt(Wt({},e.withoutSimilar),{callbacks:nt(e.withoutSimilar.callbacks,(function(t){return t!==n}))}),withVars:nt(e.withVars,(function(t){return t.callback!==n}))}}))})),t.set(r)},gT=function(t,e,n,r,o,i){return null===e.get()&&aT(e,t),dT(t,e,n,r,o,i),{unbind:function(){return mT(e,n,r)}}},hT=function(t,e,n,r){var o=t.formatter.get(e);!jS(t,e,n,r)||"toggle"in o[0]&&!o[0].toggle?iT(t,e,n,r):Xk(t,e,n,r)},pT=function(t,e){var n=e||document,r=n.createDocumentFragment();return Z(t,(function(t){r.appendChild(t.dom)})),wn.fromDom(r)},vT=function(t,e,n){return{element:t,width:e,rows:n}},bT=function(t,e){return{element:t,cells:e}},yT=function(t,e){return{x:t,y:e}},wT=function(t,e){var n=parseInt(yo(t,e),10);return isNaN(n)?1:n},xT=function(t,e,n,r,o){for(var i=wT(o,"rowspan"),u=wT(o,"colspan"),a=t.rows,c=n;c<n+i;c++){a[c]||(a[c]=bT(Gl(r),[]));for(var s=e;s<e+u;s++){var l=a[c].cells;l[s]=c===n&&s===e?o:$l(o)}}},CT=function(t,e,n){var r=t.rows,o=r[n]?r[n].cells:[];return!!o[e]},ST=function(t,e,n){while(CT(t,e,n))e++;return e},kT=function(t){return ot(t,(function(t,e){return e.cells.length>t?e.cells.length:t}),0)},TT=function(t,e){for(var n=t.rows,r=0;r<n.length;r++)for(var o=n[r].cells,i=0;i<o.length;i++)if(Nn(o[i],e))return W.some(yT(i,r));return W.none()},OT=function(t,e,n,r,o){for(var i=[],u=t.rows,a=n;a<=o;a++){var c=u[a].cells,s=e<r?c.slice(e,r+1):c.slice(r,e+1);i.push(bT(u[a].element,s))}return i},ET=function(t,e,n){var r=e.x,o=e.y,i=n.x,u=n.y,a=o<u?OT(t,r,o,i,u):OT(t,r,u,i,o);return vT(t.element,kT(a),a)},_T=function(t,e){var n=$l(t.element),r=wn.fromTag("tbody");return kr(r,e),xr(n,r),n},AT=function(t){return Q(t.rows,(function(t){var e=Q(t.cells,(function(t){var e=Gl(t);return Co(e,"colspan"),Co(e,"rowspan"),e})),n=$l(t.element);return kr(n,e),n}))},DT=function(t){var e=vT($l(t),0,[]);return Z(El(t,"tr"),(function(t,n){Z(El(t,"td,th"),(function(r,o){xT(e,ST(e,o,n),n,t,r)}))})),vT(e.element,kT(e.rows),e.rows)},MT=function(t){return _T(t,AT(t))},RT=function(t,e,n){return TT(t,e).bind((function(e){return TT(t,n).map((function(n){return ET(t,e,n)}))}))},NT=function(t){return ut(t,(function(t){return"ul"===Hn(t)||"ol"===Hn(t)}))},zT=function(t,e){return ut(t,(function(t){return"li"===Hn(t)&&Sp(t,e)})).fold(D([]),(function(e){return NT(t).map((function(t){var e=wn.fromTag(Hn(t)),n=_t(Ao(t),(function(t,e){return se(e,"list-style")}));return To(e,n),[wn.fromTag("li"),e]})).getOr([])}))},BT=function(t,e){var n=ot(e,(function(t,e){return xr(e,t),e}),t);return e.length>0?pT([n]):n},LT=function(t){return ru(t)?Yn(t).filter(nu).fold(D([]),(function(e){return[t,e]})):nu(t)?[t]:[]},HT=function(t,e){var n=wn.fromDom(e.commonAncestorContainer),r=Lw(n,t),o=nt(r,(function(t){return Zi(t)||Yi(t)})),i=zT(r,e),u=o.concat(i.length?i:LT(n));return Q(u,$l)},IT=function(){return pT([])},PT=function(t,e){return BT(wn.fromDom(e.cloneContents()),HT(t,e))},FT=function(t,e){return Oi(e,"table",N(Nn,t))},VT=function(t,e){return FT(t,e[0]).bind((function(t){var n=e[0],r=e[e.length-1],o=DT(t);return RT(o,n,r).map((function(t){return pT([MT(t)])}))})).getOrThunk(IT)},UT=function(t,e){return e.length>0&&e[0].collapsed?IT():PT(t,e[0])},jT=function(t,e){var n=pp(e,t);return n.length>0?VT(t,n):UT(t,e)},WT=function(t){return t.replace(/^[ \f\n\r\t\v]+/,"")},qT=function(t,e){return e>=0&&e<t.length&&Th(t.charAt(e))},$T=function(t,e){var n=gu(t.innerText);return e?WT(n):n},GT=function(t){return t.map((function(t){return t.nodeName})).getOr("div").toLowerCase()},KT=function(t){return W.from(t.selection.getRng()).map((function(e){var n=W.from(t.dom.getParent(e.commonAncestorContainer,t.dom.isBlock)),r=t.getBody(),o=GT(n),i=tn.browser.isIE()&&"pre"!==o,u=t.dom.add(r,o,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),a=$T(u,i),c=gu(u.textContent);if(t.dom.remove(u),qT(c,0)||qT(c,c.length-1)){var s=n.getOr(r),l=$T(s,i),f=l.indexOf(a);if(-1===f)return a;var d=qT(l,f-1),m=qT(l,f+a.length);return(d?" ":"")+a+(m?" ":"")}return a})).getOr("")},XT=function(t,e){var n=t.selection.getRng(),r=t.dom.create("body"),o=t.selection.getSel(),i=ky(t,fp(o)),u=e.contextual?jT(wn.fromDom(t.getBody()),i).dom:n.cloneContents();return u&&r.appendChild(u),t.selection.serializer.serialize(r,e)},YT=function(t,e){return Wt(Wt({},t),{format:e,get:!0,selection:!0})},JT=function(t,e,n){void 0===n&&(n={});var r=YT(n,e),o=t.fire("BeforeGetContent",r);if(o.isDefaultPrevented())return t.fire("GetContent",o),o.content;if("text"===o.format)return KT(t);o.getInner=!0;var i=XT(t,o);return"tree"===o.format?i:(o.content=t.selection.isCollapsed()?"":i,t.fire("GetContent",o),o.content)},QT=0,ZT=1,tO=2,eO=function(t,e){var n=t.length+e.length+2,r=new Array(n),o=new Array(n),i=function(t,e,n){return{start:t,end:e,diag:n}},u=function(n,r,o,i,a){var s=c(n,r,o,i);if(null===s||s.start===r&&s.diag===r-i||s.end===n&&s.diag===n-o){var l=n,f=o;while(l<r||f<i)l<r&&f<i&&t[l]===e[f]?(a.push([QT,t[l]]),++l,++f):r-n>i-o?(a.push([tO,t[l]]),++l):(a.push([ZT,e[f]]),++f)}else{u(n,s.start,o,s.start-s.diag,a);for(var d=s.start;d<s.end;++d)a.push([QT,t[d]]);u(s.end,r,s.end-s.diag,i,a)}},a=function(n,r,o,u){var a=n;while(a-r<u&&a<o&&t[a]===e[a-r])++a;return i(n,a,r)},c=function(n,i,u,c){var s=i-n,l=c-u;if(0===s||0===l)return null;var f,d,m,g,h,p=s-l,v=l+s,b=(v%2===0?v:v+1)/2;for(r[1+b]=n,o[1+b]=i+1,f=0;f<=b;++f){for(d=-f;d<=f;d+=2){m=d+b,d===-f||d!==f&&r[m-1]<r[m+1]?r[m]=r[m+1]:r[m]=r[m-1]+1,g=r[m],h=g-n+u-d;while(g<i&&h<c&&t[g]===e[h])r[m]=++g,++h;if(p%2!==0&&p-f<=d&&d<=p+f&&o[m-p]<=r[m])return a(o[m-p],d+n-u,i,c)}for(d=p-f;d<=p+f;d+=2){m=d+b-p,d===p-f||d!==p+f&&o[m+1]<=o[m-1]?o[m]=o[m+1]-1:o[m]=o[m-1],g=o[m]-1,h=g-n+u-d;while(g>=n&&h>=u&&t[g]===e[h])o[m]=g--,h--;if(p%2===0&&-f<=d&&d<=f&&o[m]<=r[m+p])return a(o[m],d+n-u,i,c)}}},s=[];return u(0,t.length,0,e.length,s),s},nO=function(t){return jr(t)?t.outerHTML:Zr(t)?_a.encodeRaw(t.data,!1):to(t)?"\x3c!--"+t.data+"--\x3e":""},rO=function(t){var e,n=document.createElement("div"),r=document.createDocumentFragment();t&&(n.innerHTML=t);while(e=n.firstChild)r.appendChild(e);return r},oO=function(t,e,n){var r=rO(e);if(t.hasChildNodes()&&n<t.childNodes.length){var o=t.childNodes[n];o.parentNode.insertBefore(r,o)}else t.appendChild(r)},iO=function(t,e){if(t.hasChildNodes()&&e<t.childNodes.length){var n=t.childNodes[e];n.parentNode.removeChild(n)}},uO=function(t,e){var n=0;Z(t,(function(t){t[0]===QT?n++:t[0]===ZT?(oO(e,t[1],n),n++):t[0]===tO&&iO(e,n)}))},aO=function(t){return nt(Q(bt(t.childNodes),nO),(function(t){return t.length>0}))},cO=function(t,e){var n=Q(bt(e.childNodes),nO);return uO(eO(n,t),e),e},sO=Gt((function(){return document.implementation.createHTMLDocument("undo")})),lO=function(t){return-1!==t.indexOf("</iframe>")},fO=function(t){return{type:"fragmented",fragments:t,content:"",bookmark:null,beforeBookmark:null}},dO=function(t){return{type:"complete",fragments:null,content:t,bookmark:null,beforeBookmark:null}},mO=function(t){var e=aO(t.getBody()),n=st(e,(function(e){var n=Yy(t.serializer,e);return n.length>0?[n]:[]})),r=n.join("");return lO(r)?fO(n):dO(r)},gO=function(t,e,n){var r=n?e.beforeBookmark:e.bookmark;"fragmented"===e.type?cO(e.fragments,t.getBody()):t.setContent(e.content,{format:"raw",no_selection:!k(r)||!uh(r)||!r.isFakeCaret}),t.selection.moveToBookmark(r)},hO=function(t){return"fragmented"===t.type?t.fragments.join(""):t.content},pO=function(t){var e=wn.fromTag("body",sO());return Wl(e,hO(t)),Z(El(e,"*[data-mce-bogus]"),Er),jl(e)},vO=function(t,e){return hO(t)===hO(e)},bO=function(t,e){return pO(t)===pO(e)},yO=function(t,e){return!(!t||!e)&&(!!vO(t,e)||bO(t,e))},wO=function(t){return 0===t.get()},xO=function(t,e,n){wO(n)&&(t.typing=e)},CO=function(t,e){t.typing&&(xO(t,!1,e),t.add())},SO=function(t){t.typing&&(t.typing=!1,t.add())},kO=function(t,e,n){wO(e)&&n.set(gd(t.selection))},TO=function(t,e,n,r,o,i,u){var a=mO(t);if(i=i||{},i=gn.extend(i,a),!1===wO(r)||t.removed)return null;var c=e.data[n.get()];if(t.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:u}).isDefaultPrevented())return null;if(c&&yO(c,i))return null;e.data[n.get()]&&o.get().each((function(t){e.data[n.get()].beforeBookmark=t}));var s=ym(t);if(s&&e.data.length>s){for(var l=0;l<e.data.length-1;l++)e.data[l]=e.data[l+1];e.data.length--,n.set(e.data.length)}i.bookmark=gd(t.selection),n.get()<e.data.length-1&&(e.data.length=n.get()+1),e.data.push(i),n.set(e.data.length-1);var f={level:i,lastLevel:c,originalEvent:u};return n.get()>0?(t.setDirty(!0),t.fire("AddUndo",f),t.fire("change",f)):t.fire("AddUndo",f),i},OO=function(t,e,n){e.data=[],n.set(0),e.typing=!1,t.fire("ClearUndos")},EO=function(t,e,n,r,o){if(e.transact(r)){var i=e.data[n.get()].bookmark,u=e.data[n.get()-1];gO(t,u,!0),e.transact(o)&&(e.data[n.get()-1].beforeBookmark=i)}},_O=function(t,e,n){var r;return e.get()<n.length-1&&(e.set(e.get()+1),r=n[e.get()],gO(t,r,!1),t.setDirty(!0),t.fire("Redo",{level:r})),r},AO=function(t,e,n,r){var o;return e.typing&&(e.add(),e.typing=!1,xO(e,!1,n)),r.get()>0&&(r.set(r.get()-1),o=e.data[r.get()],gO(t,o,!0),t.setDirty(!0),t.fire("Undo",{level:o})),o},DO=function(t){t.clear(),t.add()},MO=function(t,e,n){return n.get()>0||e.typing&&e.data[0]&&!yO(mO(t),e.data[0])},RO=function(t,e){return e.get()<t.data.length-1&&!t.typing},NO=function(t,e,n){return CO(t,e),t.beforeChange(),t.ignore(n),t.add()},zO=function(t,e){try{t.set(t.get()+1),e()}finally{t.set(t.get()-1)}},BO=function(t,e){var n=t.dom,r=k(e)?e:t.getBody();C(t.hasVisual)&&(t.hasVisual=Om(t)),Z(n.select("table,a",r),(function(e){switch(e.nodeName){case"TABLE":var r=Em(t),o=n.getAttrib(e,"border");o&&"0"!==o||!t.hasVisual?n.removeClass(e,r):n.addClass(e,r);break;case"A":if(!n.getAttrib(e,"href")){var i=n.getAttrib(e,"name")||e.id,u=_m(t);i&&t.hasVisual?n.addClass(e,u):n.removeClass(e,u)}break}})),t.fire("VisualAid",{element:e,hasVisual:t.hasVisual})},LO=function(t){return{undoManager:{beforeChange:function(e,n){return kO(t,e,n)},add:function(e,n,r,o,i,u){return TO(t,e,n,r,o,i,u)},undo:function(e,n,r){return AO(t,e,n,r)},redo:function(e,n){return _O(t,e,n)},clear:function(e,n){return OO(t,e,n)},reset:function(t){return DO(t)},hasUndo:function(e,n){return MO(t,e,n)},hasRedo:function(t,e){return RO(t,e)},transact:function(t,e,n){return NO(t,e,n)},ignore:function(t,e){return zO(t,e)},extra:function(e,n,r,o){return EO(t,e,n,r,o)}},formatter:{match:function(e,n,r,o){return jS(t,e,n,r,o)},matchAll:function(e,n){return WS(t,e,n)},matchNode:function(e,n,r,o){return US(t,e,n,r,o)},canApply:function(e){return $S(t,e)},closest:function(e){return qS(t,e)},apply:function(e,n,r){return iT(t,e,n,r)},remove:function(e,n,r,o){return Xk(t,e,n,r,o)},toggle:function(e,n,r){return hT(t,e,n,r)},formatChanged:function(e,n,r,o,i){return gT(t,e,n,r,o,i)}},editor:{getContent:function(e,n){return ew(t,e,n)},setContent:function(e,n){return RS(t,e,n)},insertContent:function(e,n){return xS(t,e,n)},addVisual:function(e){return BO(t,e)}},selection:{getContent:function(e,n){return JT(t,e,n)}},raw:{getModel:function(){return W.none()}}}},HO=function(t){var e=function(t){return b(t)?t:{}},n=t.undoManager,r=t.formatter,o=t.editor,i=t.selection,u=t.raw;return{undoManager:{beforeChange:n.beforeChange,add:n.add,undo:n.undo,redo:n.redo,clear:n.clear,reset:n.reset,hasUndo:n.hasUndo,hasRedo:n.hasRedo,transact:function(t,e,r){return n.transact(r)},ignore:function(t,e){return n.ignore(e)},extra:function(t,e,r,o){return n.extra(r,o)}},formatter:{match:function(t,n,o,i){return r.match(t,e(n),i)},matchAll:r.matchAll,matchNode:r.matchNode,canApply:function(t){return r.canApply(t)},closest:function(t){return r.closest(t)},apply:function(t,n,o){return r.apply(t,e(n))},remove:function(t,n,o,i){return r.remove(t,e(n))},toggle:function(t,n,o){return r.toggle(t,e(n))},formatChanged:function(t,e,n,o,i){return r.formatChanged(e,n,o,i)}},editor:{getContent:function(t,e){return o.getContent(t)},setContent:function(t,e){return o.setContent(t,e)},insertContent:function(t,e){return o.insertContent(t)},addVisual:o.addVisual},selection:{getContent:function(t,e){return i.getContent(e)}},raw:{getModel:function(){return W.some(u.getRawModel())}}}},IO=function(){var t=D(null),e=D("");return{undoManager:{beforeChange:E,add:t,undo:t,redo:t,clear:E,reset:E,hasUndo:I,hasRedo:I,transact:t,ignore:E,extra:E},formatter:{match:I,matchAll:D([]),matchNode:D(void 0),canApply:I,closest:e,apply:E,remove:E,toggle:E,formatChanged:D({unbind:E})},editor:{getContent:e,setContent:e,insertContent:E,addVisual:E},selection:{getContent:e},raw:{getModel:D(W.none())}}},PO=function(t){return Rt(t.plugins,"rtc")},FO=function(t){return Mt(t.plugins,"rtc").bind((function(t){return W.from(t.setup)}))},VO=function(t){var e=t;return FO(t).fold((function(){return e.rtcInstance=LO(t),W.none()}),(function(t){return e.rtcInstance=IO(),W.some((function(){return t().then((function(t){return e.rtcInstance=HO(t),t.rtc.isRemote}))}))}))},UO=function(t){return t.rtcInstance?t.rtcInstance:LO(t)},jO=function(t){var e=t.rtcInstance;if(e)return e;throw new Error("Failed to get RTC instance not yet initialized.")},WO=function(t,e,n){jO(t).undoManager.beforeChange(e,n)},qO=function(t,e,n,r,o,i,u){return jO(t).undoManager.add(e,n,r,o,i,u)},$O=function(t,e,n,r){return jO(t).undoManager.undo(e,n,r)},GO=function(t,e,n){return jO(t).undoManager.redo(e,n)},KO=function(t,e,n){jO(t).undoManager.clear(e,n)},XO=function(t,e){jO(t).undoManager.reset(e)},YO=function(t,e,n){return jO(t).undoManager.hasUndo(e,n)},JO=function(t,e,n){return jO(t).undoManager.hasRedo(e,n)},QO=function(t,e,n,r){return jO(t).undoManager.transact(e,n,r)},ZO=function(t,e,n){jO(t).undoManager.ignore(e,n)},tE=function(t,e,n,r,o){jO(t).undoManager.extra(e,n,r,o)},eE=function(t,e,n,r,o){return jO(t).formatter.match(e,n,r,o)},nE=function(t,e,n){return jO(t).formatter.matchAll(e,n)},rE=function(t,e,n,r,o){return jO(t).formatter.matchNode(e,n,r,o)},oE=function(t,e){return jO(t).formatter.canApply(e)},iE=function(t,e){return jO(t).formatter.closest(e)},uE=function(t,e,n,r){jO(t).formatter.apply(e,n,r)},aE=function(t,e,n,r,o){jO(t).formatter.remove(e,n,r,o)},cE=function(t,e,n,r){jO(t).formatter.toggle(e,n,r)},sE=function(t,e,n,r,o,i){return jO(t).formatter.formatChanged(e,n,r,o,i)},lE=function(t,e,n){return UO(t).editor.getContent(e,n)},fE=function(t,e,n){return UO(t).editor.setContent(e,n)},dE=function(t,e,n){return UO(t).editor.insertContent(e,n)},mE=function(t,e,n){return jO(t).selection.getContent(e,n)},gE=function(t,e){return jO(t).editor.addVisual(e)},hE=function(t,e){void 0===e&&(e={});var n=e.format?e.format:"html";return mE(t,n,e)},pE=function(t){return 0===t.dom.length?(Or(t),W.none()):W.some(t)},vE=function(t,e){return t.filter((function(t){return Ip.isBookmarkNode(t.dom)})).bind(e?tr:Zn)},bE=function(t,e,n,r){var o=t.dom,i=e.dom,u=r?o.length:i.length;r?(Sx(o,i,!1,!r),n.setStart(i,u)):(Sx(i,o,!1,!r),n.setEnd(i,u))},yE=function(t,e){Yn(t).each((function(n){var r=t.dom;e&&ax(n,Nf(r,0))?xx(r,0):!e&&sx(n,Nf(r,r.length))&&Cx(r,r.length)}))},wE=function(t,e,n,r){t.bind((function(t){var o=r?Cx:xx;return o(t.dom,r?t.dom.length:0),e.filter(Un).map((function(e){return bE(t,e,n,r)}))})).orThunk((function(){var t=vE(e,r).or(e).filter(Un);return t.map((function(t){return yE(t,r)}))}))},xE=function(t,e){var n=W.from(e.firstChild).map(wn.fromDom),r=W.from(e.lastChild).map(wn.fromDom);t.deleteContents(),t.insertNode(e);var o=n.bind(Zn).filter(Un).bind(pE),i=r.bind(tr).filter(Un).bind(pE);wE(o,n,t,!0),wE(i,r,t,!1),t.collapse(!1)},CE=function(t,e){return Wt(Wt({format:"html"},t),{set:!0,selection:!0,content:e})},SE=function(t,e){if("raw"!==e.format){var n=t.selection.getRng(),r=t.dom.getParent(n.commonAncestorContainer,t.dom.isBlock),o=r?{context:r.nodeName.toLowerCase()}:{},i=t.parser.parse(e.content,Wt(Wt({isRootContent:!0,forced_root_block:!1},o),e));return uw({validate:t.validate},t.schema).serialize(i)}return e.content},kE=function(t,e,n){void 0===n&&(n={});var r=CE(n,e),o=r;if(!r.no_events){var i=t.fire("BeforeSetContent",r);if(i.isDefaultPrevented())return void t.fire("SetContent",i);o=i}o.content=SE(t,o);var u=t.selection.getRng();xE(u,u.createContextualFragment(o.content)),t.selection.setRng(u),nb(t,u),o.no_events||t.fire("SetContent",o)},TE=function(t,e,n){if(t&&Rt(t,e)){var r=nt(t[e],(function(t){return t!==n}));0===r.length?delete t[e]:t[e]=r}};function OE(t,e){var n,r,o=function(e,n){return ut(n,(function(n){return t.is(n,e)}))},i=function(e){return t.getParents(e,null,t.getRoot())};return{selectorChangedWithUnbind:function(t,u){return n||(n={},r={},e.on("NodeChange",(function(t){var e=t.element,u=i(e),a={};gn.each(n,(function(t,e){o(e,u).each((function(n){r[e]||(Z(t,(function(t){t(!0,{node:n,selector:e,parents:u})})),r[e]=t),a[e]=t}))})),gn.each(r,(function(t,n){a[n]||(delete r[n],gn.each(t,(function(t){t(!1,{node:e,selector:n,parents:u})})))}))}))),n[t]||(n[t]=[]),n[t].push(u),o(t,i(e.selection.getStart())).each((function(){r[t]=n[t]})),{unbind:function(){TE(n,t,u),TE(r,t,u)}}}}}var EE=function(t){return!!t.select},_E=function(t){return!(!t||!t.ownerDocument)&&Ln(wn.fromDom(t.ownerDocument),wn.fromDom(t))},AE=function(t){return!!t&&(!!EE(t)||_E(t.startContainer)&&_E(t.endContainer))},DE=function(t,e,n,r){var o,i,u=OE(t,r).selectorChangedWithUnbind,a=function(e,n){var o=t.createRng();k(e)&&k(n)?(o.setStart(e,n),o.setEnd(e,n),y(o),p(!1)):(kp(t,o,r.getBody(),!0),y(o))},c=function(t){return hE(r,t)},s=function(t,e){return kE(r,t,e)},l=function(t){return by(r.getBody(),b(),t)},f=function(t){return yy(r.getBody(),b(),t)},d=function(t,e){return N.getBookmark(t,e)},m=function(t){return N.moveToBookmark(t)},g=function(e,n){return Sy(t,e,n).each(y),e},h=function(){var t=b(),e=v();return!(!t||t.item)&&(t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!e||t.collapsed)},p=function(t){var e=b();e.collapse(!!t),y(e)},v=function(){return e.getSelection?e.getSelection():e.document.selection},b=function(){var n,u,a,c=function(t,e,n){try{return e.compareBoundaryPoints(t,n)}catch(r){return-1}},s=e.document;if(void 0!==r.bookmark&&!1===dy(r)){var l=Pb(r);if(l.isSome())return l.map((function(t){return ky(r,[t])[0]})).getOr(s.createRange())}try{(n=v())&&!Ur(n.anchorNode)&&(u=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():s.createRange(),u=ky(r,[u])[0])}catch(f){}return u||(u=s.createRange?s.createRange():s.body.createTextRange()),u.setStart&&9===u.startContainer.nodeType&&u.collapsed&&(a=t.getRoot(),u.setStart(a,0),u.setEnd(a,0)),o&&i&&(0===c(u.START_TO_START,u,o)&&0===c(u.END_TO_END,u,o)?u=i:(o=null,i=null)),u},y=function(t,e){var n;if(AE(t)){var u=EE(t)?t:null;if(u){i=null;try{u.select()}catch(s){}}else{var a=v(),c=r.fire("SetSelectionRange",{range:t,forward:e});if(t=c.range,a){i=t;try{a.removeAllRanges(),a.addRange(t)}catch(s){}!1===e&&a.extend&&(a.collapse(t.endContainer,t.endOffset),a.extend(t.startContainer,t.startOffset)),o=a.rangeCount>0?a.getRangeAt(0):null}t.collapsed||t.startContainer!==t.endContainer||!a.setBaseAndExtent||tn.ie||t.endOffset-t.startOffset<2&&t.startContainer.hasChildNodes()&&(n=t.startContainer.childNodes[t.startOffset],n&&"IMG"===n.tagName&&(a.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset),a.anchorNode===t.startContainer&&a.focusNode===t.endContainer||a.setBaseAndExtent(n,0,n,1))),r.fire("AfterSetSelectionRange",{range:t,forward:e})}}},w=function(e){return s(t.getOuterHTML(e)),e},x=function(){return xy(r.getBody(),b())},C=function(e,n){return Cy(t,b(),e,n)},S=function(){var e=v(),n=null===e||void 0===e?void 0:e.anchorNode,r=null===e||void 0===e?void 0:e.focusNode;if(!e||!n||!r||Ur(n)||Ur(r))return!0;var o=t.createRng();o.setStart(n,e.anchorOffset),o.collapse(!0);var i=t.createRng();return i.setStart(r,e.focusOffset),i.collapse(!0),o.compareBoundaryPoints(o.START_TO_START,i)<=0},T=function(){var e=b(),n=v();if(!mp(n)&&Tp(r)){var o=xv(t,e);return o.each((function(t){y(t,S())})),o.getOr(e)}return e},O=function(t,e){return u(t,e),R},E=function(){var e,n=t.getRoot();while(n&&"BODY"!==n.nodeName){if(n.scrollHeight>n.clientHeight){e=n;break}n=n.parentNode}return e},_=function(t,e){k(t)?eb(r,t,e):nb(r,b(),e)},A=function(t,e){return y(cv(t,e,r.getDoc()))},D=function(){var t=b();return t.collapsed?Nf.fromRangeStart(t).getClientRects()[0]:t.getBoundingClientRect()},M=function(){e=o=i=null,z.destroy()},R={bookmarkManager:null,controlSelection:null,dom:t,win:e,serializer:n,editor:r,collapse:p,setCursorLocation:a,getContent:c,setContent:s,getBookmark:d,moveToBookmark:m,select:g,isCollapsed:h,isForward:S,setNode:w,getNode:x,getSel:v,setRng:y,getRng:b,getStart:l,getEnd:f,getSelectedBlocks:C,normalize:T,selectorChanged:O,selectorChangedWithUnbind:u,getScrollContainer:E,scrollIntoView:_,placeCaretAt:A,getBoundingClientRect:D,destroy:M},N=Ip(R),z=rv(R,r);return R.bookmarkManager=N,R.controlSelection=z,R},ME=function(t,e){Z(e,(function(e){t.attr(e,null)}))},RE=function(t,e,n){t.addNodeFilter("font",(function(t){Z(t,(function(t){var r=e.parse(t.attr("style")),o=t.attr("color"),i=t.attr("face"),u=t.attr("size");o&&(r.color=o),i&&(r["font-family"]=i),u&&(r["font-size"]=n[parseInt(t.attr("size"),10)-1]),t.name="span",t.attr("style",e.serialize(r)),ME(t,["color","face","size"])}))}))},NE=function(t,e){t.addNodeFilter("strike",(function(t){Z(t,(function(t){var n=e.parse(t.attr("style"));n["text-decoration"]="line-through",t.name="span",t.attr("style",e.serialize(n))}))}))},zE=function(t,e){var n=ja();e.convert_fonts_to_spans&&RE(t,n,gn.explode(e.font_size_legacy_values)),NE(t,n)},BE=function(t,e){e.inline_styles&&zE(t,e)},LE=function(t){return new Ai((function(e,n){var r=function(){n("Cannot convert "+t+" to Blob. Resource might not exist or is inaccessible.")};try{var o=new XMLHttpRequest;o.open("GET",t,!0),o.responseType="blob",o.onload=function(){200===o.status?e(o.response):r()},o.onerror=r,o.send()}catch(i){r()}}))},HE=function(t){var e,n=decodeURIComponent(t).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(e=r[1]),{type:e,data:n[1]}},IE=function(t,e){var n;try{n=atob(e)}catch(bV){return W.none()}for(var r=new Uint8Array(n.length),o=0;o<r.length;o++)r[o]=n.charCodeAt(o);return W.some(new Blob([r],{type:t}))},PE=function(t){return new Ai((function(e){var n=HE(t),r=n.type,o=n.data;IE(r,o).fold((function(){return e(new Blob([]))}),e)}))},FE=function(t){return 0===t.indexOf("blob:")?LE(t):0===t.indexOf("data:")?PE(t):null},VE=function(t){return new Ai((function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)}))},UE=0,jE=function(t){return(t||"blobid")+UE++},WE=function(t,e,n,r){var o,i;if(0===e.src.indexOf("blob:"))return i=t.getByUri(e.src),void(i?n({image:e,blobInfo:i}):FE(e.src).then((function(r){VE(r).then((function(u){o=HE(u).data,i=t.create(jE(),r,o),t.add(i),n({image:e,blobInfo:i})}))}),(function(t){r(t)})));var u=HE(e.src),a=u.data,c=u.type;o=a,i=t.getByData(o,c),i?n({image:e,blobInfo:i}):FE(e.src).then((function(r){i=t.create(jE(),r,o),t.add(i),n({image:e,blobInfo:i})}),(function(t){r(t)}))},qE=function(t){return t?bt(t.getElementsByTagName("img")):[]},$E=function(t,e){var n={},r=function(r,o){o||(o=P);var i=nt(qE(r),(function(e){var n=e.src;return!!tn.fileApi&&(!e.hasAttribute("data-mce-bogus")&&(!e.hasAttribute("data-mce-placeholder")&&(!(!n||n===tn.transparentSrc)&&(0===n.indexOf("blob:")?!t.isUploaded(n)&&o(e):0===n.indexOf("data:")&&o(e)))))})),u=Q(i,(function(t){if(void 0!==n[t.src])return new Ai((function(e){n[t.src].then((function(n){if("string"===typeof n)return n;e({image:t,blobInfo:n.blobInfo})}))}));var r=new Ai((function(n,r){WE(e,t,n,r)})).then((function(t){return delete n[t.image.src],t})).catch((function(e){return delete n[t.src],e}));return n[t.src]=r,r}));return Ai.all(u)};return{findAll:r}},GE=function(t,e,n,r){var o=t.padd_empty_with_br||e.insert;o&&n[r.name]?r.empty().append(new Ay("br",1)).shortEnded=!0:r.empty().append(new Ay("#text",3)).value=su},KE=function(t){return XE(t,"#text")&&t.firstChild.value===su},XE=function(t,e){return t&&t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.name===e},YE=function(t,e){var n=t.getElementRule(e.name);return n&&n.paddEmpty},JE=function(t,e,n,r){return r.isEmpty(e,n,(function(e){return YE(t,e)}))},QE=function(t,e){return t&&(Rt(e,t.name)||"br"===t.name)},ZE=function(t){return k(t.attr("data-mce-bogus"))},t_=function(t){return t.attr("src")===tn.transparentSrc||k(t.attr("data-mce-placeholder"))},e_=function(t,e){if(e.images_dataimg_filter){var n=new Image;return n.src=t.attr("src"),Ct(t.attributes.map,(function(t,e){n.setAttribute(e,t)})),e.images_dataimg_filter(n)}return!0},n_=function(t,e){var n=e.blob_cache,r=function(t){var r=t.attr("src");t_(t)||ZE(t)||Ry(r).filter((function(){return e_(t,e)})).bind((function(t){var e=t.type,r=t.data;return W.from(n.getByData(r,e)).orThunk((function(){return IE(e,r).map((function(t){var e=n.create(jE(),t,r);return n.add(e),e}))}))})).each((function(e){t.attr("src",e.blobUri())}))};n&&t.addAttributeFilter("src",(function(t){return Z(t,r)}))},r_=function(t,e){var n=t.schema;e.remove_trailing_brs&&t.addNodeFilter("br",(function(t,r,o){var i,u,a,c,s,l,f,d,m=t.length,g=gn.extend({},n.getBlockElements()),h=n.getNonEmptyElements(),p=n.getWhiteSpaceElements();for(g.body=1,i=0;i<m;i++)if(u=t[i],a=u.parent,g[u.parent.name]&&u===a.lastChild){s=u.prev;while(s){if(l=s.name,"span"!==l||"bookmark"!==s.attr("data-mce-type")){"br"===l&&(u=null);break}s=s.prev}u&&(u.remove(),JE(n,h,p,a)&&(f=n.getElementRule(a.name),f&&(f.removeEmpty?a.remove():f.paddEmpty&&GE(e,o,g,a))))}else{c=u;while(a&&a.firstChild===c&&a.lastChild===c){if(c=a,g[a.name])break;a=a.parent}c===a&&!0!==e.padd_empty_with_br&&(d=new Ay("#text",3),d.value=su,u.replace(d))}})),t.addAttributeFilter("href",(function(t){var n=t.length,r=function(t){var e=t.split(" ").filter((function(t){return t.length>0}));return e.concat(["noopener"]).sort().join(" ")},o=function(t){var e=t?gn.trim(t):"";return/\b(noopener)\b/g.test(e)?e:r(e)};if(!e.allow_unsafe_link_target)while(n--){var i=t[n];"a"===i.name&&"_blank"===i.attr("target")&&i.attr("rel",o(i.attr("rel")))}})),e.allow_html_in_named_anchor||t.addAttributeFilter("id,name",(function(t){var e,n,r,o,i=t.length;while(i--)if(o=t[i],"a"===o.name&&o.firstChild&&!o.attr("href")){r=o.parent,e=o.lastChild;do{n=e.prev,r.insert(e,o),e=n}while(e)}})),e.fix_list_elements&&t.addNodeFilter("ul,ol",(function(t){var e,n,r=t.length;while(r--)if(e=t[r],n=e.parent,"ul"===n.name||"ol"===n.name)if(e.prev&&"li"===e.prev.name)e.prev.append(e);else{var o=new Ay("li",1);o.attr("style","list-style-type: none"),e.wrap(o)}})),e.validate&&n.getValidClasses()&&t.addAttributeFilter("class",(function(t){var e=n.getValidClasses(),r=t.length;while(r--){for(var o=t[r],i=o.attr("class").split(" "),u="",a=0;a<i.length;a++){var c=i[a],s=!1,l=e["*"];l&&l[c]&&(s=!0),l=e[o.name],!s&&l&&l[c]&&(s=!0),s&&(u&&(u+=" "),u+=c)}u.length||(u=null),o.attr("class",u)}})),n_(t,e)},o_=gn.makeMap,i_=gn.each,u_=gn.explode,a_=gn.extend,c_=function(t,e){void 0===e&&(e=Va());var n={},r=[],o={},i={};t=t||{},t.validate=!("validate"in t)||t.validate,t.root_name=t.root_name||"body";var u=function(t){for(var n=o_("tr,td,th,tbody,thead,tfoot,table"),r=e.getNonEmptyElements(),o=e.getWhiteSpaceElements(),i=e.getTextBlockElements(),u=e.getSpecialElements(),c=function(t,n){if(void 0===n&&(n=t.parent),u[t.name])t.empty().remove();else{for(var r=t.children(),o=0,i=r;o<i.length;o++){var a=i[o];e.isValidChild(n.name,a.name)||c(a,n)}t.unwrap()}},s=0;s<t.length;s++){var l=t[s],f=void 0,d=void 0,m=void 0;if(l.parent&&!l.fixed)if(i[l.name]&&"li"===l.parent.name){var g=l.next;while(g){if(!i[g.name])break;g.name="li",g.fixed=!0,l.parent.insert(g,l.parent),g=g.next}l.unwrap()}else{var h=[l];for(f=l.parent;f&&!e.isValidChild(f.name,l.name)&&!n[f.name];f=f.parent)h.push(f);if(f&&h.length>1)if(e.isValidChild(f.name,l.name)){h.reverse(),d=a(h[0].clone());for(var p=d,v=0;v<h.length-1;v++){e.isValidChild(p.name,h[v].name)?(m=a(h[v].clone()),p.append(m)):m=p;for(var b=h[v].firstChild;b&&b!==h[v+1];){var y=b.next;m.append(b),b=y}p=m}JE(e,r,o,d)?f.insert(l,h[0],!0):(f.insert(d,h[0],!0),f.insert(l,d)),f=h[0],(JE(e,r,o,f)||XE(f,"br"))&&f.empty().remove()}else c(l);else if(l.parent){if("li"===l.name){g=l.prev;if(g&&("ul"===g.name||"ol"===g.name)){g.append(l);continue}if(g=l.next,g&&("ul"===g.name||"ol"===g.name)){g.insert(l,g.firstChild,!0);continue}l.wrap(a(new Ay("ul",1)));continue}e.isValidChild(l.parent.name,"div")&&e.isValidChild("div",l.name)?l.wrap(a(new Ay("div",1))):c(l)}}}},a=function(t){var e=t.name;if(e in n){var u=o[e];u?u.push(t):o[e]=[t]}var a=r.length;while(a--){var c=r[a].name;if(c in t.attributes.map){u=i[c];u?u.push(t):i[c]=[t]}}return t},c=function(t,e){i_(u_(t),(function(t){var r=n[t];r||(n[t]=r=[]),r.push(e)}))},s=function(){var t=[];for(var e in n)Rt(n,e)&&t.push({name:e,callbacks:n[e]});return t},l=function(t,e){i_(u_(t),(function(t){var n;for(n=0;n<r.length;n++)if(r[n].name===t)return void r[n].callbacks.push(e);r.push({name:t,callbacks:[e]})}))},f=function(){return[].concat(r)},d=function(a,c){var s,l,f,d,m,g,h,p,v=[],b=function(t){return!1===t?"":!0===t?"p":t};c=c||{},o={},i={};var y=a_(o_("script,style,head,html,body,title,meta,param"),e.getBlockElements()),w=Ia(e),x=e.getNonEmptyElements(),C=e.children,S=t.validate,T="forced_root_block"in c?c.forced_root_block:t.forced_root_block,O=b(T),E=e.getWhiteSpaceElements(),_=/^[ \t\r\n]+/,A=/[ \t\r\n]+$/,D=/[ \t\r\n]+/g,M=/^[ \t\r\n]+$/,R=Rt(E,c.context)||Rt(E,t.root_name),N=function(){var n=P.firstChild,r=null,o=function(t){t&&(n=t.firstChild,n&&3===n.type&&(n.value=n.value.replace(_,"")),n=t.lastChild,n&&3===n.type&&(n.value=n.value.replace(A,"")))};if(e.isValidChild(P.name,O.toLowerCase())){while(n){var i=n.next;3===n.type||1===n.type&&"p"!==n.name&&!y[n.name]&&!n.attr("data-mce-type")?(r||(r=z(O,1),r.attr(t.forced_root_block_attrs),P.insert(r,n)),r.append(n)):(o(r),r=null),n=i}o(r)}},z=function(t,e){var r,i=new Ay(t,e);return t in n&&(r=o[t],r?r.push(i):o[t]=[i]),i},B=function(t){for(var n=e.getBlockElements(),r=t.prev;r&&3===r.type;){var o=r.value.replace(A,"");if(o.length>0)return void(r.value=o);var i=r.next;if(i){if(3===i.type&&i.value.length){r=r.prev;continue}if(!n[i.name]&&"script"!==i.name&&"style"!==i.name){r=r.prev;continue}}var u=r.prev;r.remove(),r=u}},L=function(t){var e={};for(var n in t)"li"!==n&&"p"!==n&&(e[n]=t[n]);return e},H=function(t){var n=t;while(k(n)){if(n.name in w)return JE(e,x,E,n);n=n.parent}return!1},I=Ky({validate:S,document:t.document,allow_html_data_urls:t.allow_html_data_urls,allow_svg_data_urls:t.allow_svg_data_urls,allow_script_urls:t.allow_script_urls,allow_conditional_comments:t.allow_conditional_comments,preserve_cdata:t.preserve_cdata,self_closing_elements:L(e.getSelfClosingElements()),cdata:function(t){p.append(z("#cdata",4)).value=t},text:function(t,e){var n;R||(t=t.replace(D," "),QE(p.lastChild,y)&&(t=t.replace(_,""))),0!==t.length&&(n=z("#text",3),n.raw=!!e,p.append(n).value=t)},comment:function(t){p.append(z("#comment",8)).value=t},pi:function(t,e){p.append(z(t,7)).value=e,B(p)},doctype:function(t){var e=p.append(z("#doctype",10));e.value=t,B(p)},start:function(t,n,o){var u=S?e.getElementRule(t):{};if(u){var a=z(u.outputName||t,1);a.attributes=n,a.shortEnded=o,p.append(a);var c=C[p.name];c&&C[a.name]&&!c[a.name]&&v.push(a);var s=r.length;while(s--){var l=r[s].name;l in n.map&&(g=i[l],g?g.push(a):i[l]=[a])}y[t]&&B(a),o||(p=a),!R&&E[t]&&(R=!0)}},end:function(n){var r,o,i,u=S?e.getElementRule(n):{};if(u){if(y[n]&&!R){if(r=p.firstChild,r&&3===r.type)if(o=r.value.replace(_,""),o.length>0)r.value=o,r=r.next;else{i=r.next,r.remove(),r=i;while(r&&3===r.type)o=r.value,i=r.next,(0===o.length||M.test(o))&&(r.remove(),r=i),r=i}if(r=p.lastChild,r&&3===r.type)if(o=r.value.replace(A,""),o.length>0)r.value=o,r=r.prev;else{i=r.prev,r.remove(),r=i;while(r&&3===r.type)o=r.value,i=r.prev,(0===o.length||M.test(o))&&(r.remove(),r=i),r=i}}R&&E[n]&&(R=!1);var a=JE(e,x,E,p),s=p.parent;u.paddInEmptyBlock&&a&&H(p)?GE(t,c,y,p):u.removeEmpty&&a?y[p.name]?p.empty().remove():p.unwrap():u.paddEmpty&&(KE(p)||a)&&GE(t,c,y,p),p=s}}},e),P=p=new Ay(c.context||t.root_name,11);if(I.parse(a,c.format),S&&v.length&&(c.context?c.invalid=!0:u(v)),O&&("body"===P.name||c.isRootContent)&&N(),!c.invalid){for(h in o)if(Rt(o,h)){g=n[h],s=o[h],d=s.length;while(d--)s[d].parent||s.splice(d,1);for(l=0,f=g.length;l<f;l++)g[l](s,h,c)}for(l=0,f=r.length;l<f;l++)if(g=r[l],g.name in i){s=i[g.name],d=s.length;while(d--)s[d].parent||s.splice(d,1);for(d=0,m=g.callbacks.length;d<m;d++)g.callbacks[d](s,g.name,c)}}return P},m={schema:e,addAttributeFilter:l,getAttributeFilters:f,addNodeFilter:c,getNodeFilters:s,filterNode:a,parse:d};return r_(m,t),BE(m,t),m},s_=function(t,e,n){t.addAttributeFilter("data-mce-tabindex",(function(t,e){var n=t.length;while(n--){var r=t[n];r.attr("tabindex",r.attr("data-mce-tabindex")),r.attr(e,null)}})),t.addAttributeFilter("src,href,style",(function(t,r){var o="data-mce-"+r,i=e.url_converter,u=e.url_converter_scope,a=t.length;while(a--){var c=t[a],s=c.attr(o);void 0!==s?(c.attr(r,s.length>0?s:null),c.attr(o,null)):(s=c.attr(r),"style"===r?s=n.serializeStyle(n.parseStyle(s),c.name):i&&(s=i.call(u,s,r,c.name)),c.attr(r,s.length>0?s:null))}})),t.addAttributeFilter("class",(function(t){var e=t.length;while(e--){var n=t[e],r=n.attr("class");r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}})),t.addAttributeFilter("data-mce-type",(function(t,e,n){var r=t.length;while(r--){var o=t[r];if("bookmark"===o.attr("data-mce-type")&&!n.cleanup){var i=W.from(o.firstChild).exists((function(t){return!mu(t.value)}));i?o.unwrap():o.remove()}}})),t.addNodeFilter("noscript",(function(t){var e=t.length;while(e--){var n=t[e].firstChild;n&&(n.value=_a.decode(n.value))}})),t.addNodeFilter("script,style",(function(t,n){var r=function(t){return t.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")},o=t.length;while(o--){var i=t[o],u=i.firstChild?i.firstChild.value:"";if("script"===n){var a=i.attr("type");a&&i.attr("type","mce-no/type"===a?null:a.replace(/^mce\-/,"")),"xhtml"===e.element_format&&u.length>0&&(i.firstChild.value="// <![CDATA[\n"+r(u)+"\n// ]]>")}else"xhtml"===e.element_format&&u.length>0&&(i.firstChild.value="\x3c!--\n"+r(u)+"\n--\x3e")}})),t.addNodeFilter("#comment",(function(t){var r=t.length;while(r--){var o=t[r];e.preserve_cdata&&0===o.value.indexOf("[CDATA[")?(o.name="#cdata",o.type=4,o.value=n.decode(o.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===o.value.indexOf("mce:protected ")&&(o.name="#text",o.type=3,o.raw=!0,o.value=unescape(o.value).substr(14))}})),t.addNodeFilter("xml:namespace,input",(function(t,e){var n=t.length;while(n--){var r=t[n];7===r.type?r.remove():1===r.type&&("input"!==e||r.attr("type")||r.attr("type","text"))}})),t.addAttributeFilter("data-mce-type",(function(e){Z(e,(function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())}))})),t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-placeholder",(function(t,e){var n=t.length;while(n--)t[n].attr(e,null)}))},l_=function(t){var e=function(t){return t&&"br"===t.name},n=t.lastChild;if(e(n)){var r=n.prev;e(r)&&(n.remove(),r.remove())}},f_=function(t,e,n){var r,o=t.dom,i=e.cloneNode(!0),u=document.implementation;if(u.createHTMLDocument){var a=u.createHTMLDocument("");gn.each("BODY"===i.nodeName?i.childNodes:[i],(function(t){a.body.appendChild(a.importNode(t,!0))})),i="BODY"!==i.nodeName?a.body.firstChild:a.body,r=o.doc,o.doc=a}return Vp(t,Wt(Wt({},n),{node:i})),r&&(o.doc=r),i},d_=function(t,e){return t&&t.hasEventListeners("PreProcess")&&!e.no_events},m_=function(t,e,n){return d_(t,n)?f_(t,e,n):e},g_=function(t,e,n){-1===gn.inArray(e,n)&&(t.addAttributeFilter(n,(function(t,e){var n=t.length;while(n--)t[n].attr(e,null)})),e.push(n))},h_=function(t,e,n){if(!e.no_events&&t){var r=Up(t,Wt(Wt({},e),{content:n}));return r.content}return n},p_=function(t,e,n){var r=gu(n.getInner?e.innerHTML:t.getOuterHTML(e));return n.selection||uu(wn.fromDom(e))?r:gn.trim(r)},v_=function(t,e,n){var r=n.selection?Wt({forced_root_block:!1},n):n,o=t.parse(e,r);return l_(o),o},b_=function(t,e,n){var r=uw(t,e);return r.serialize(n)},y_=function(t,e,n,r,o){var i=b_(e,n,r);return h_(t,o,i)},w_=function(t,e){var n=["data-mce-selected"],r=e&&e.dom?e.dom:Vs.DOM,o=e&&e.schema?e.schema:Va(t);t.entity_encoding=t.entity_encoding||"named",t.remove_trailing_brs=!("remove_trailing_brs"in t)||t.remove_trailing_brs;var i=c_(t,o);s_(i,t,r);var u=function(n,u){void 0===u&&(u={});var a=Wt({format:"html"},u),c=m_(e,n,a),s=p_(r,c,a),l=v_(i,s,a);return"tree"===a.format?l:y_(e,t,o,l,a)};return{schema:o,addNodeFilter:i.addNodeFilter,addAttributeFilter:i.addAttributeFilter,serialize:u,addRules:o.addValidElements,setRules:o.setValidElements,addTempAttr:N(g_,i,n),getTempAttrs:D(n),getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}},x_=function(t,e){var n=w_(t,e);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters}},C_="html",S_=function(t,e){void 0===e&&(e={});var n=e.format?e.format:C_;return lE(t,e,n)},k_=function(t,e,n){return void 0===n&&(n={}),fE(t,e,n)},T_=Vs.DOM,O_=function(t){T_.setStyle(t.id,"display",t.orgDisplay)},E_=function(t){return W.from(t).each((function(t){return t.destroy()}))},__=function(t){t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null)},A_=function(t){var e=t.formElement;e&&(e._mceOldSubmit&&(e.submit=e._mceOldSubmit,e._mceOldSubmit=null),T_.unbind(e,"submit reset",t.formEventDelegate))},D_=function(t){if(!t.removed){var e=t._selectionOverrides,n=t.editorUpload,r=t.getBody(),o=t.getElement();r&&t.save({is_removing:!0}),t.removed=!0,t.unbindAllNativeEvents(),t.hasHiddenInput&&o&&T_.remove(o.nextSibling),jp(t),t.editorManager.remove(t),!t.inline&&r&&O_(t),Wp(t),T_.remove(t.getContainer()),E_(e),E_(n),t.destroy()}},M_=function(t,e){var n=t.selection,r=t.dom;t.destroyed||(e||t.removed?(e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),E_(n),E_(r)),A_(t),__(t),t.destroyed=!0):t.remove())},R_=function(t,e){var n=b(t)&&b(e);return n?z_(t,e):e},N_=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<e.length;o++){var i=e[o];for(var u in i)Rt(i,u)&&(r[u]=t(r[u],i[u]))}return r}},z_=N_(R_),B_="autoresize_on_init,content_editable_state,convert_fonts_to_spans,inline_styles,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists".split(","),L_="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),H_="imagetools,toc".split(","),I_=function(t){var e=nt(B_,(function(e){return Rt(t,e)})),n=t.forced_root_block;return!1!==n&&""!==n||e.push("forced_root_block (false only)"),gt(e)},P_=function(t){var e=gn.makeMap(t.plugins," "),n=function(t){return Rt(e,t)},r=$t($t([],nt(L_,n),!0),st(H_,(function(t){return n(t)?[t+" (moving to premium)"]:[]})),!0);return gt(r)},F_=function(t,e){var n=I_(t),r=P_(e),o=r.length>0,i=n.length>0,u="mobile"===e.theme;if(o||i||u){var a="\n- ",c=u?"\n\nThemes:"+a+"mobile":"",s=o?"\n\nPlugins:"+a+r.join(a):"",l=i?"\n\nSettings:"+a+n.join(a):"";console.warn("The following deprecated features are currently enabled, these will be removed in TinyMCE 6.0. See https://www.tiny.cloud/docs/release-notes/6.0-upcoming-changes/ for more information."+c+s+l)}},V_=function(t,e){return{sections:D(t),settings:D(e)}},U_=qe().deviceType,j_=U_.isTouch(),W_=U_.isPhone(),q_=U_.isTablet(),$_=["lists","autolink","autosave"],G_={table_grid:!1,object_resizing:!1,resize:!1},K_=function(t){var e=y(t)?t.join(" "):t,n=Q(v(e)?e.split(" "):[],fe);return nt(n,(function(t){return t.length>0}))},X_=function(t){return nt(t,N(Y,$_))},Y_=function(t,e){var n=Et(e,(function(e,n){return Y(t,n)}));return V_(n.t,n.f)},J_=function(t,e,n){void 0===n&&(n={});var r=t.sections(),o=Mt(r,e).getOr({});return gn.extend({},n,o)},Q_=function(t,e){return Rt(t.sections(),e)},Z_=function(t,e,n){var r=t.sections();return Q_(t,e)&&r[e].theme===n},tA=function(t,e){return Q_(t,e)?t.sections()[e]:{}},eA=function(t,e){return Mt(t,"toolbar_mode").orThunk((function(){return Mt(t,"toolbar_drawer").map((function(t){return!1===t?"wrap":t}))})).getOr(e)},nA=function(t,e,n,r,o){var i={id:e,theme:"silver",toolbar_mode:eA(t,"floating"),plugins:"",document_base_url:n,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o};return Wt(Wt({},i),r?G_:{})},rA=function(t,e){var n={resize:!1,toolbar_mode:eA(t,"scrolling"),toolbar_sticky:!1},r={menubar:!1};return Wt(Wt(Wt({},G_),n),e?r:{})},oA=function(t,e){var n=e.external_plugins?e.external_plugins:{};return t&&t.external_plugins?gn.extend({},t.external_plugins,n):n},iA=function(t,e){return[].concat(K_(t)).concat(K_(e))},uA=function(t,e,n,r){return t&&Z_(e,"mobile","mobile")?X_(r):t&&Q_(e,"mobile")?r:n},aA=function(t,e,n,r){var o=K_(n.forced_plugins),i=K_(r.plugins),u=tA(e,"mobile"),a=u.plugins?K_(u.plugins):i,c=uA(t,e,i,a),s=iA(o,c);if(tn.browser.isIE()&&Y(s,"rtc"))throw new Error("RTC plugin is not supported on IE 11.");return gn.extend(r,{plugins:s.join(" ")})},cA=function(t,e){return t&&Q_(e,"mobile")},sA=function(t,e,n,r,o){var i=t?{mobile:rA(o.mobile||{},e)}:{},u=Y_(["mobile"],z_(i,o)),a=gn.extend(n,r,u.settings(),cA(t,u)?J_(u,"mobile"):{},{validate:!0,external_plugins:oA(r,u.settings())});return aA(t,u,r,a)},lA=function(t,e,n,r,o){var i=nA(o,e,n,j_,t),u=sA(W_||q_,W_,i,r,o);return!1!==u.deprecation_warnings&&F_(o,u),u},fA=function(t,e,n){return W.from(e.settings[n]).filter(t)},dA=function(t){var e={};return"string"===typeof t?Z(t.indexOf("=")>0?t.split(/[;,](?![^=;,]*(?:[;,]|$))/):t.split(","),(function(t){var n=t.split("=");n.length>1?e[gn.trim(n[0])]=gn.trim(n[1]):e[gn.trim(n[0])]=gn.trim(n[0])})):e=t,e},mA=function(t){return function(e){return y(e)&&lt(e,t)}},gA=function(t,e,n,r){var o=e in t.settings?t.settings[e]:n;return"hash"===r?dA(o):"string"===r?fA(v,t,e).getOr(n):"number"===r?fA(O,t,e).getOr(n):"boolean"===r?fA(x,t,e).getOr(n):"object"===r?fA(b,t,e).getOr(n):"array"===r?fA(y,t,e).getOr(n):"string[]"===r?fA(mA(v),t,e).getOr(n):"function"===r?fA(T,t,e).getOr(n):o},hA=function(){var t={},e=function(e,n){t[e]=n},n=function(e){return t[e]?t[e]:{icons:{}}},r=function(e){return Rt(t,e)};return{add:e,get:n,has:r}},pA=hA(),vA=function(t,e){var n=e.dom;return n[t]},bA=function(t,e){return parseInt(Oo(e,t),10)},yA=N(vA,"clientWidth"),wA=N(vA,"clientHeight"),xA=N(bA,"margin-top"),CA=N(bA,"margin-left"),SA=function(t){return t.dom.getBoundingClientRect()},kA=function(t,e,n){var r=yA(t),o=wA(t);return e>=0&&n>=0&&e<=r&&n<=o},TA=function(t,e,n,r){var o=SA(e),i=t?o.left+e.dom.clientLeft+CA(e):0,u=t?o.top+e.dom.clientTop+xA(e):0,a=n-i,c=r-u;return{x:a,y:c}},OA=function(t,e,n){var r=wn.fromDom(t.getBody()),o=t.inline?r:Kn(r),i=TA(t.inline,o,e,n);return kA(o,i.x,i.y)},EA=function(t){return W.from(t).map(wn.fromDom)},_A=function(t){var e=t.inline?t.getBody():t.getContentAreaContainer();return EA(e).map(_r).getOr(!1)},AA=function(){var t=function(){throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:t,close:t,reposition:t,getArgs:t}},DA=function(t){var e=[],n=function(){var e=t.theme;return e&&e.getNotificationManagerImpl?e.getNotificationManagerImpl():AA()},r=function(){return W.from(e[0])},o=function(t,e){return t.type===e.type&&t.text===e.text&&!t.progressBar&&!t.timeout&&!e.progressBar&&!e.timeout},i=function(){e.length>0&&n().reposition(e)},u=function(t){e.push(t)},a=function(t){at(e,(function(e){return e===t})).each((function(t){e.splice(t,1)}))},c=function(c,s){if(void 0===s&&(s=!0),!t.removed&&_A(t))return s&&t.fire("BeforeOpenNotification",{notification:c}),ut(e,(function(t){return o(n().getArgs(t),c)})).getOrThunk((function(){t.editorManager.setActive(t);var e=n().open(c,(function(){a(e),i(),r().fold((function(){return t.focus()}),(function(t){return ob(wn.fromDom(t.getEl()))}))}));return u(e),i(),t.fire("OpenNotification",{notification:Wt({},e)}),e}))},s=function(){r().each((function(t){n().close(t),a(t),i()}))},l=D(e),f=function(t){t.on("SkinLoaded",(function(){var e=rm(t);e&&c({text:e,type:"warning",timeout:0},!1),i()})),t.on("show ResizeEditor ResizeWindow NodeChange",(function(){Li.requestAnimationFrame(i)})),t.on("remove",(function(){Z(e.slice(),(function(t){n().close(t)}))}))};return f(t),{open:c,close:s,getNotifications:l}},MA=ll.PluginManager,RA=ll.ThemeManager;function NA(){var t=function(){throw new Error("Theme did not provide a WindowManager implementation.")};return{open:t,openUrl:t,alert:t,confirm:t,close:t,getParams:t,setParams:t}}var zA=function(t){var e=[],n=function(){var e=t.theme;return e&&e.getWindowManagerImpl?e.getWindowManagerImpl():NA()},r=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e?e.apply(t,n):void 0}},o=function(e){t.fire("OpenWindow",{dialog:e})},i=function(e){t.fire("CloseWindow",{dialog:e})},u=function(t){e.push(t),o(t)},a=function(n){i(n),e=nt(e,(function(t){return t!==n})),0===e.length&&t.focus()},c=function(){return W.from(e[e.length-1])},s=function(e){t.editorManager.setActive(t),Hb(t);var n=e();return u(n),n},l=function(t,e){return s((function(){return n().open(t,e,a)}))},f=function(t){return s((function(){return n().openUrl(t,a)}))},d=function(t,e,o){var i=n();i.alert(t,r(o||i,e))},m=function(t,e,o){var i=n();i.confirm(t,r(o||i,e))},g=function(){c().each((function(t){n().close(t),a(t)}))};return t.on("remove",(function(){Z(e,(function(t){n().close(t)}))})),{open:l,openUrl:f,alert:d,confirm:m,close:g}},BA=function(t,e){t.notificationManager.open({type:"error",text:e})},LA=function(t,e){t._skinLoaded?BA(t,e):t.on("SkinLoaded",(function(){BA(t,e)}))},HA=function(t,e){LA(t,sl.translate(["Failed to upload image: {0}",e]))},IA=function(t,e,n){Qp(t,e,{message:n}),console.error(n)},PA=function(t,e,n){return n?"Failed to load "+t+": "+n+" from url "+e:"Failed to load "+t+" url: "+e},FA=function(t,e,n){IA(t,"PluginLoadError",PA("plugin",e,n))},VA=function(t,e,n){IA(t,"IconsLoadError",PA("icons",e,n))},UA=function(t,e,n){IA(t,"LanguageLoadError",PA("language",e,n))},jA=function(t,e,n){var r=sl.translate(["Failed to initialize plugin: {0}",e]);Qp(t,"PluginLoadError",{message:r}),WA(r,n),LA(t,r)},WA=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=window.console;r&&(r.error?r.error.apply(r,$t([t],e,!1)):r.log.apply(r,$t([t],e,!1)))},qA=function(t){return/^[a-z0-9\-]+$/i.test(t)},$A=function(t){return KA(t,Xd(t))},GA=function(t){return KA(t,Yd(t))},KA=function(t,e){var n=t.editorManager.baseURL+"/skins/content",r=t.editorManager.suffix,o="content"+r+".css",i=!0===t.inline;return Q(e,(function(e){return qA(e)&&!i?n+"/"+e+"/"+o:t.documentBaseURI.toAbsolute(e)}))},XA=function(t){t.contentCSS=t.contentCSS.concat($A(t),GA(t))},YA=function(){var t=1,e=2,n={},r=function(t,e){return{status:t,resultUri:e}},o=function(t){return t in n},i=function(t){var e=n[t];return e?e.resultUri:null},u=function(e){return!!o(e)&&n[e].status===t},a=function(t){return!!o(t)&&n[t].status===e},c=function(e){n[e]=r(t,null)},s=function(t,o){n[t]=r(e,o)},l=function(t){delete n[t]},f=function(){n={}};return{hasBlobUri:o,getResultUri:i,isPending:u,isUploaded:a,markPending:c,markUploaded:s,removeFailed:l,destroy:f}},JA=0,QA=function(){var t=function(){return Math.round(4294967295*Math.random()).toString(36)},e=(new Date).getTime();return"s"+e.toString(36)+t()+t()+t()},ZA=function(t){return t+JA+++QA()},tD=function(){var t=[],e=function(t){var e={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"};return e[t.toLowerCase()]||"dat"},n=function(t,e,n,o,i){if(v(t)){var u=t;return r({id:u,name:o,filename:i,blob:e,base64:n})}if(b(t))return r(t);throw new Error("Unknown input type")},r=function(t){if(!t.blob||!t.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");var n=t.id||ZA("blobid"),r=t.name||n,o=t.blob;return{id:D(n),name:D(r),filename:D(t.filename||r+"."+e(o.type)),blob:D(o),base64:D(t.base64),blobUri:D(t.blobUri||URL.createObjectURL(o)),uri:D(t.uri)}},o=function(e){u(e.id())||t.push(e)},i=function(e){return ut(t,e).getOrUndefined()},u=function(t){return i((function(e){return e.id()===t}))},a=function(t){return i((function(e){return e.blobUri()===t}))},c=function(t,e){return i((function(n){return n.base64()===t&&n.blob().type===e}))},s=function(e){t=nt(t,(function(t){return t.blobUri()!==e||(URL.revokeObjectURL(t.blobUri()),!1)}))},l=function(){Z(t,(function(t){URL.revokeObjectURL(t.blobUri())})),t=[]};return{create:n,add:o,get:u,getByUri:a,getByData:c,findFirst:i,removeByUri:s,destroy:l}},eD=function(t,e){var n={},r=function(t,e){return t?t.replace(/\/$/,"")+"/"+e.replace(/^\//,""):e},o=function(t,n,o,i){var u=new XMLHttpRequest;u.open("POST",e.url),u.withCredentials=e.credentials,u.upload.onprogress=function(t){i(t.loaded/t.total*100)},u.onerror=function(){o("Image upload failed due to a XHR Transport error. Code: "+u.status)},u.onload=function(){if(u.status<200||u.status>=300)o("HTTP Error: "+u.status);else{var t=JSON.parse(u.responseText);t&&"string"===typeof t.location?n(r(e.basePath,t.location)):o("Invalid JSON: "+u.responseText)}};var a=new FormData;a.append("file",t.blob(),t.filename()),u.send(a)},i=function(){return new Ai((function(t){t([])}))},u=function(t,e){return{url:e,blobInfo:t,status:!0}},a=function(t,e,n){return{url:"",blobInfo:t,status:!1,error:{message:e,options:n}}},c=function(t,e){gn.each(n[t],(function(t){t(e)})),delete n[t]},s=function(e,n,r){return t.markPending(e.blobUri()),new Ai((function(o){var i,s;try{var l=function(){i&&(i.close(),s=E)},f=function(n){l(),t.markUploaded(e.blobUri(),n),c(e.blobUri(),u(e,n)),o(u(e,n))},d=function(n,r){var i=r||{};l(),t.removeFailed(e.blobUri()),c(e.blobUri(),a(e,n,i)),o(a(e,n,i))};s=function(t){t<0||t>100||W.from(i).orThunk((function(){return W.from(r).map(L)})).each((function(e){i=e,e.progressBar.value(t)}))},n(e,f,d,s)}catch(m){o(a(e,m.message,{}))}}))},l=function(t){return t===o},f=function(t){var e=t.blobUri();return new Ai((function(t){n[e]=n[e]||[],n[e].push(t)}))},d=function(n,r){return n=gn.grep(n,(function(e){return!t.isUploaded(e.blobUri())})),Ai.all(gn.map(n,(function(n){return t.isPending(n.blobUri())?f(n):s(n,e.handler,r)})))},m=function(t,n){return!e.url&&l(e.handler)?i():d(t,n)};return!1===T(e.handler)&&(e.handler=o),{upload:m}},nD=function(t){return function(){return t.notificationManager.open({text:t.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}},rD=function(t,e){return eD(e,{url:Pd(t),basePath:Fd(t),credentials:Vd(t),handler:Ud(t)})},oD=function(t){var e=YA(),n=rD(t,e);return{upload:function(e,r){return void 0===r&&(r=!0),n.upload(e,r?nD(t):void 0)}}},iD=function(t){var e=Ys(null);t.on("change AddUndo",(function(t){e.set(Wt({},t.level))}));var n=function(){var n=t.undoManager.data;vt(n).filter((function(t){return!yO(e.get(),t)})).each((function(e){t.setDirty(!0),t.fire("change",{level:e,lastLevel:ht(n,n.length-2).getOrNull()})}))};return{fireIfChanged:n}},uD=function(t){var e,n,r=tD(),o=YA(),i=[],u=iD(t),a=function(e){return function(n){return t.selection?e(n):[]}},c=function(t){return t+(-1===t.indexOf("?")?"?":"&")+(new Date).getTime()},s=function(t,e,n){var r=0;do{r=t.indexOf(e,r),-1!==r&&(t=t.substring(0,r)+n+t.substr(r+e.length),r+=n.length-e.length+1)}while(-1!==r);return t},l=function(t,e,n){var r='src="'+n+'"'+(n===tn.transparentSrc?' data-mce-placeholder="1"':"");return t=s(t,'src="'+e+'"',r),t=s(t,'data-mce-src="'+e+'"','data-mce-src="'+n+'"'),t},f=function(e,n){Z(t.undoManager.data,(function(t){"fragmented"===t.type?t.fragments=Q(t.fragments,(function(t){return l(t,e,n)})):t.content=l(t.content,e,n)}))},d=function(e,n){var r=t.convertURL(n,"src");f(e.src,n),t.$(e).attr({src:Bd(t)?c(n):n,"data-mce-src":r})},m=function(n){return e||(e=rD(t,o)),v().then(a((function(o){var i=Q(o,(function(t){return t.blobInfo}));return e.upload(i,nD(t)).then(a((function(e){var i=[],a=Q(e,(function(e,n){var u=o[n].blobInfo,a=o[n].image;return e.status&&Ld(t)?(r.removeByUri(a.src),PO(t)||d(a,e.url)):e.error&&(e.error.options.remove&&(f(a.getAttribute("src"),tn.transparentSrc),i.push(a)),HA(t,e.error.message)),{element:a,status:e.status,uploadUri:e.url,blobInfo:u}}));return a.length>0&&u.fireIfChanged(),i.length>0&&(PO(t)?console.error("Removing images on failed uploads is currently unsupported for RTC"):t.undoManager.transact((function(){Z(i,(function(e){t.dom.remove(e),r.removeByUri(e.src)}))}))),n&&n(a),a})))})))},g=function(e){if(zd(t))return m(e)},h=function(e){if(!1===lt(i,(function(t){return t(e)})))return!1;if(0===e.getAttribute("src").indexOf("data:")){var n=Nd(t);return n(e)}return!0},p=function(t){i.push(t)},v=function(){return n||(n=$E(o,r)),n.findAll(t.getBody(),h).then(a((function(e){return e=nt(e,(function(e){return"string"!==typeof e||(LA(t,e),!1)})),PO(t)||Z(e,(function(t){f(t.image.src,t.blobInfo.blobUri()),t.image.src=t.blobInfo.blobUri(),t.image.removeAttribute("data-mce-src")})),e})))},b=function(){r.destroy(),o.destroy(),n=e=null},y=function(e){return e.replace(/src="(blob:[^"]+)"/g,(function(e,n){var i=o.getResultUri(n);if(i)return'src="'+i+'"';var u=r.getByUri(n);if(u||(u=ot(t.editorManager.get(),(function(t,e){return t||e.editorUpload&&e.editorUpload.blobCache.getByUri(n)}),null)),u){var a=u.blob();return'src="data:'+a.type+";base64,"+u.base64()+'"'}return e}))};return t.on("SetContent",(function(){zd(t)?g():v()})),t.on("RawSaveContent",(function(t){t.content=y(t.content)})),t.on("GetContent",(function(t){t.source_view||"raw"===t.format||"tree"===t.format||(t.content=y(t.content))})),t.on("PostRender",(function(){t.parser.addNodeFilter("img",(function(t){Z(t,(function(t){var e=t.attr("src");if(!r.getByUri(e)){var n=o.getResultUri(e);n&&t.attr("src",n)}}))}))})),{blobCache:r,addFilter:p,uploadImages:m,uploadImagesAuto:g,scanForImages:v,destroy:b}},aD=function(t){var e={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"s",remove:"all",preserve_attributes:["class","style"]}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",defaultBlock:"p",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(t,e,n){return jr(t)&&t.hasAttribute("href")},onformat:function(e,n,r){gn.each(r,(function(n,r){t.setAttrib(e,r,n)}))}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":function(t){var e;return null!==(e=null===t||void 0===t?void 0:t.customValue)&&void 0!==e?e:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return gn.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),(function(t){e[t]={block:t,remove:"all"}})),e},cD=function(t){var e={},n=function(t){return k(t)?e[t]:e},r=function(t){return Rt(e,t)},o=function(t,n){t&&(v(t)?(y(n)||(n=[n]),Z(n,(function(t){C(t.deep)&&(t.deep=!Wh(t)),C(t.split)&&(t.split=!Wh(t)||qh(t)),C(t.remove)&&Wh(t)&&!qh(t)&&(t.remove="none"),Wh(t)&&qh(t)&&(t.mixed=!0,t.block_expand=!0),v(t.classes)&&(t.classes=t.classes.split(/\s+/))})),e[t]=n):Ct(t,(function(t,e){o(e,t)})))},i=function(t){return t&&e[t]&&delete e[t],e};return o(aD(t.dom)),o(am(t)),{get:n,has:r,register:o,unregister:i}},sD=gn.each,lD=Vs.DOM,fD=function(t,e){var n,r,o,i=e&&e.schema||Va({}),u=function(t,e){e.classes.length&&lD.addClass(t,e.classes.join(" ")),lD.setAttribs(t,e.attrs)},a=function(t){r="string"===typeof t?{name:t,classes:[],attrs:{}}:t;var e=lD.create(r.name);return u(e,r),e},c=function(t,e){var n="string"!==typeof t?t.nodeName.toLowerCase():t,r=i.getElementRule(n),o=r&&r.parentsRequired;return!(!o||!o.length)&&(e&&-1!==gn.inArray(o,e)?e:o[0])},s=function(t,e,n){var r,o,i=e.length>0&&e[0],u=i&&i.name,l=c(t,u);if(l)u===l?(o=e[0],e=e.slice(1)):o=l;else if(i)o=e[0],e=e.slice(1);else if(!n)return t;return o&&(r=a(o),r.appendChild(t)),n&&(r||(r=lD.create("div"),r.appendChild(t)),gn.each(n,(function(e){var n=a(e);r.insertBefore(n,t)}))),s(r,e,o&&o.siblings)};return t&&t.length?(r=t[0],n=a(r),o=lD.create("div"),o.appendChild(s(n,t.slice(1),r.siblings)),o):""},dD=function(t){var e,n={classes:[],attrs:{}};return t=n.selector=gn.trim(t),"*"!==t&&(e=t.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(function(t,e,r,o,i){switch(e){case"#":n.attrs.id=r;break;case".":n.classes.push(r);break;case":":-1!==gn.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r);break}if("["===o){var u=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/);u&&(n.attrs[u[1]]=u[2])}return""}))),n.name=e||"div",n},mD=function(t){return t&&"string"===typeof t?(t=t.split(/\s*,\s*/)[0],t=t.replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),gn.map(t.split(/(?:>|\s+(?![^\[\]]+\]))/),(function(t){var e=gn.map(t.split(/(?:~\+|~|\+)/),dD),n=e.pop();return e.length&&(n.siblings=e),n})).reverse()):[]},gD=function(t,e){var n,r,o,i="",u=cm(t);if(""===u)return"";var a=function(t){return t.replace(/%(\w+)/g,"")};if("string"===typeof e){if(e=t.formatter.get(e),!e)return;e=e[0]}if("preview"in e){var c=Mt(e,"preview");if(so(c,!1))return"";u=c.getOr(u)}n=e.block||e.inline||"span";var s=mD(e.selector);s.length?(s[0].name||(s[0].name=n),n=e.selector,r=fD(s,t)):r=fD([n],t);var l=lD.select(n,r)[0]||r.firstChild;return sD(e.styles,(function(t,e){var n=a(t);n&&lD.setStyle(l,e,n)})),sD(e.attributes,(function(t,e){var n=a(t);n&&lD.setAttrib(l,e,n)})),sD(e.classes,(function(t){var e=a(t);lD.hasClass(l,e)||lD.addClass(l,e)})),t.fire("PreviewFormats"),lD.setStyles(r,{position:"absolute",left:-65535}),t.getBody().appendChild(r),o=lD.getStyle(t.getBody(),"fontSize",!0),o=/px$/.test(o)?parseInt(o,10):0,sD(u.split(" "),(function(e){var n=lD.getStyle(l,e,!0);if(("background-color"!==e||!/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)||(n=lD.getStyle(t.getBody(),e,!0),"#ffffff"!==lD.toHex(n).toLowerCase()))&&("color"!==e||"#000000"!==lD.toHex(n).toLowerCase())){if("font-size"===e&&/em|%$/.test(n)){if(0===o)return;var r=parseFloat(n)/(/%$/.test(n)?100:1);n=r*o+"px"}"border"===e&&n&&(i+="padding:0 2px;"),i+=e+":"+n+";"}})),t.fire("AfterPreviewFormats"),lD.remove(r),i},hD=function(t){t.addShortcut("meta+b","","Bold"),t.addShortcut("meta+i","","Italic"),t.addShortcut("meta+u","","Underline");for(var e=1;e<=6;e++)t.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);t.addShortcut("access+7","",["FormatBlock",!1,"p"]),t.addShortcut("access+8","",["FormatBlock",!1,"div"]),t.addShortcut("access+9","",["FormatBlock",!1,"address"])},pD=function(t){var e=cD(t),n=Ys(null);return hD(t),fk(t),{get:e.get,has:e.has,register:e.register,unregister:e.unregister,apply:function(e,n,r){uE(t,e,n,r)},remove:function(e,n,r,o){aE(t,e,n,r,o)},toggle:function(e,n,r){cE(t,e,n,r)},match:function(e,n,r,o){return eE(t,e,n,r,o)},closest:function(e){return iE(t,e)},matchAll:function(e,n){return nE(t,e,n)},matchNode:function(e,n,r,o){return rE(t,e,n,r,o)},canApply:function(e){return oE(t,e)},formatChanged:function(e,r,o,i){return sE(t,n,e,r,o,i)},getCssText:N(gD,t)}},vD=function(t){switch(t.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return!0;default:return!1}},bD=function(t,e,n){var r=Ys(!1),o=function(t){xO(e,!1,n),e.add({},t)};t.on("init",(function(){e.add()})),t.on("BeforeExecCommand",(function(t){var r=t.command;vD(r)||(CO(e,n),e.beforeChange())})),t.on("ExecCommand",(function(t){var e=t.command;vD(e)||o(t)})),t.on("ObjectResizeStart cut",(function(){e.beforeChange()})),t.on("SaveContent ObjectResized blur",o),t.on("dragend",o),t.on("keyup",(function(n){var i=n.keyCode;n.isDefaultPrevented()||((i>=33&&i<=36||i>=37&&i<=40||45===i||n.ctrlKey)&&(o(),t.nodeChanged()),46!==i&&8!==i||t.nodeChanged(),r.get()&&e.typing&&!1===yO(mO(t),e.data[0])&&(!1===t.isDirty()&&(t.setDirty(!0),t.fire("change",{level:e.data[0],lastLevel:null})),t.fire("TypingUndo"),r.set(!1),t.nodeChanged()))})),t.on("keydown",(function(t){var i=t.keyCode;if(!t.isDefaultPrevented())if(i>=33&&i<=36||i>=37&&i<=40||45===i)e.typing&&o(t);else{var u=t.ctrlKey&&!t.altKey||t.metaKey;!(i<16||i>20)||224===i||91===i||e.typing||u||(e.beforeChange(),xO(e,!0,n),e.add({},t),r.set(!0))}})),t.on("mousedown",(function(t){e.typing&&o(t)}));var i=function(t){return"insertReplacementText"===t.inputType},u=function(t){return"insertText"===t.inputType&&null===t.data},a=function(t){return"insertFromPaste"===t.inputType||"insertFromDrop"===t.inputType};t.on("input",(function(t){t.inputType&&(i(t)||u(t)||a(t))&&o(t)})),t.on("AddUndo Undo Redo ClearUndos",(function(e){e.isDefaultPrevented()||t.nodeChanged()}))},yD=function(t){t.addShortcut("meta+z","","Undo"),t.addShortcut("meta+y,meta+shift+z","","Redo")},wD=function(t){var e=dl(),n=Ys(0),r=Ys(0),o={data:[],typing:!1,beforeChange:function(){WO(t,n,e)},add:function(i,u){return qO(t,o,r,n,e,i,u)},undo:function(){return $O(t,o,n,r)},redo:function(){return GO(t,r,o.data)},clear:function(){KO(t,o,r)},reset:function(){XO(t,o)},hasUndo:function(){return YO(t,o,r)},hasRedo:function(){return JO(t,o,r)},transact:function(e){return QO(t,o,n,e)},ignore:function(e){ZO(t,n,e)},extra:function(e,n){tE(t,o,r,e,n)}};return PO(t)||bD(t,o,n),yD(t),o},xD=[9,27,ev.HOME,ev.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,ev.DOWN,ev.UP,ev.LEFT,ev.RIGHT].concat(tn.browser.isFirefox()?[224]:[]),CD="data-mce-placeholder",SD=function(t){return"keydown"===t.type||"keyup"===t.type},kD=function(t){var e=t.keyCode;return e===ev.BACKSPACE||e===ev.DELETE},TD=function(t){if(SD(t)){var e=t.keyCode;return!kD(t)&&(ev.metaKeyPressed(t)||t.altKey||e>=112&&e<=123||Y(xD,e))}return!1},OD=function(t){return SD(t)&&!(kD(t)||"keyup"===t.type&&229===t.keyCode)},ED=function(t,e,n){if(na(wn.fromDom(e),!1)){var r=""===n,o=e.firstElementChild;return!o||!t.getStyle(e.firstElementChild,"padding-left")&&!t.getStyle(e.firstElementChild,"padding-right")&&(r?!t.isBlock(o):n===o.nodeName.toLowerCase())}return!1},_D=function(t){var e=t.dom,n=Td(t),r=em(t),o=function(i,u){if(!TD(i)){var a=t.getBody(),c=!OD(i)&&ED(e,a,n),s=""!==e.getAttrib(a,CD);(s!==c||u)&&(e.setAttrib(a,CD,c?r:null),e.setAttrib(a,"aria-placeholder",c?r:null),Jp(t,c),t.on(c?"keydown":"keyup",o),t.off(c?"keyup":"keydown",o))}};r&&t.on("init",(function(e){o(e,!0),t.on("change SetContent ExecCommand",o),t.on("paste",(function(e){return Li.setEditorTimeout(t,(function(){return o(e)}))}))}))},AD=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,DD=function(t){return AD.test(t)},MD=function(t,e){return An(wn.fromDom(e),Qd(t))},RD=function(t){return"rtl"===Vs.DOM.getStyle(t,"direction",!0)||DD(t.textContent)},ND=function(t,e,n){return nt(Vs.DOM.getParents(n.container(),"*",e),t)},zD=function(t,e,n){var r=ND(t,e,n);return W.from(r[r.length-1])},BD=function(t,e,n){var r=lg(e,t),o=lg(n,t);return r&&r===o},LD=function(t){return Cu(t)||Su(t)},HD=function(t,e){if(!e)return e;var n=e.container(),r=e.offset();return t?bu(n)?Zr(n.nextSibling)?Nf(n.nextSibling,0):Nf.after(n):Cu(e)?Nf(n,r+1):e:bu(n)?Zr(n.previousSibling)?Nf(n.previousSibling,n.previousSibling.data.length):Nf.before(n):Su(e)?Nf(n,r-1):e},ID=N(HD,!0),PD=N(HD,!1),FD=function(t){return function(e){return Nn(t,wn.fromDom(e.dom.parentNode))}},VD=function(t){return eu(t)||ru(t)},UD=function(t,e){return Ln(t,e)?Si(e,VD,FD(t)):W.none()},jD=function(t){var e=t.getBody(),n=e.firstChild&&t.dom.isBlock(e.firstChild)?e.firstChild:e;t.selection.setCursorLocation(n,0)},WD=function(t){t.dom.isEmpty(t.getBody())&&(t.setContent(""),jD(t))},qD=function(t,e,n){return fo(Jg(n),Qg(n),(function(r,o){var i=HD(!0,r),u=HD(!1,o),a=HD(!1,e);return t?Xg(n,a).exists((function(t){return t.isEqual(u)&&e.isEqual(i)})):Yg(n,a).exists((function(t){return t.isEqual(i)&&e.isEqual(u)}))})).getOr(!0)},$D=function(t,e){return{block:t,position:e}},GD=function(t,e){return{from:t,to:e}},KD=function(t,e){var n=wn.fromDom(t),r=wn.fromDom(e.container());return UD(n,r).map((function(t){return $D(t,e)}))},XD=function(t){return!1===Nn(t.from.block,t.to.block)},YD=function(t){return Yn(t.from.block).bind((function(e){return Yn(t.to.block).filter((function(t){return Nn(e,t)}))})).isSome()},JD=function(t){return!1===uo(t.from.block.dom)&&!1===uo(t.to.block.dom)},QD=function(t,e,n){return ro(n.position.getNode())&&!1===na(n.block)?Kg(!1,n.block.dom).bind((function(r){return r.isEqual(n.position)?qg(e,t,r).bind((function(e){return KD(t,e)})):W.some(n)})).getOr(n):n},ZD=function(t,e,n){var r=KD(t,Nf.fromRangeStart(n)),o=r.bind((function(n){return qg(e,t,n.position).bind((function(n){return KD(t,n).map((function(n){return QD(t,e,n)}))}))}));return fo(r,o,GD).filter((function(t){return XD(t)&&YD(t)&&JD(t)}))},tM=function(t,e,n){return n.collapsed?ZD(t,e,n):W.none()},eM=function(t){var e=rr(t);return at(e,Ji).fold(D(e),(function(t){return e.slice(0,t)}))},nM=function(t){var e=eM(t);return Z(e,Or),e},rM=function(t,e){var n=Lw(e,t);return ut(n.reverse(),(function(t){return na(t)})).each(Or)},oM=function(t){return 0===nt(er(t),(function(t){return!na(t)})).length},iM=function(t,e,n,r){if(na(n))return Mw(n),Jg(n.dom);oM(r)&&na(e)&&br(r,wn.fromTag("br"));var o=Yg(n.dom,Nf.before(r.dom));return Z(nM(e),(function(t){br(r,t)})),rM(t,e),o},uM=function(t,e,n){if(na(n))return Or(n),na(e)&&Mw(e),Jg(e.dom);var r=Qg(n.dom);return Z(nM(e),(function(t){xr(n,t)})),rM(t,e),r},aM=function(t,e){var n=Lw(e,t);return W.from(n[n.length-1])},cM=function(t,e){return Ln(e,t)?aM(e,t):W.none()},sM=function(t,e){Kg(t,e.dom).map((function(t){return t.getNode()})).map(wn.fromDom).filter(tu).each(Or)},lM=function(t,e,n){return sM(!0,e),sM(!1,n),cM(e,n).fold(N(uM,t,e,n),N(iM,t,e,n))},fM=function(t,e,n,r){return e?lM(t,r,n):lM(t,n,r)},dM=function(t,e){var n=wn.fromDom(t.getBody()),r=tM(n.dom,e,t.selection.getRng()).bind((function(t){return fM(n,e,t.from.block,t.to.block)}));return r.each((function(e){t.selection.setRng(e.toRange())})),r.isSome()},mM=function(t,e){var n=e.getRng();return fo(UD(t,wn.fromDom(n.startContainer)),UD(t,wn.fromDom(n.endContainer)),(function(r,o){return!1===Nn(r,o)&&(n.deleteContents(),fM(t,!0,r,o).each((function(t){e.setRng(t.toRange())})),!0)})).getOr(!1)},gM=function(t,e){var n=wn.fromDom(e),r=N(Nn,t);return Ci(n,iu,r).isSome()},hM=function(t,e){return gM(t,e.startContainer)||gM(t,e.endContainer)},pM=function(t,e){var n=Yg(t.dom,Nf.fromRangeStart(e)).isNone(),r=Xg(t.dom,Nf.fromRangeEnd(e)).isNone();return!hM(t,e)&&n&&r},vM=function(t){return t.setContent(""),t.selection.setCursorLocation(),!0},bM=function(t){var e=wn.fromDom(t.getBody()),n=t.selection.getRng();return pM(e,n)?vM(t):mM(e,t.selection)},yM=function(t,e){return!t.selection.isCollapsed()&&bM(t)},wM=io,xM=uo,CM=function(t,e,n,r,o){return W.from(e._selectionOverrides.showCaret(t,n,r,o))},SM=function(t){var e=t.ownerDocument.createRange();return e.selectNode(t),e},kM=function(t,e){var n=t.fire("BeforeObjectSelected",{target:e});return n.isDefaultPrevented()?W.none():W.some(SM(e))},TM=function(t,e,n){var r=bg(1,t.getBody(),e),o=Nf.fromRangeStart(r),i=o.getNode();if(Jm(i))return CM(1,t,i,!o.isAtEnd(),!1);var u=o.getNode(!0);if(Jm(u))return CM(1,t,u,!1,!1);var a=t.dom.getParent(o.getNode(),(function(t){return xM(t)||wM(t)}));return Jm(a)?CM(1,t,a,!1,n):W.none()},OM=function(t,e,n){return e.collapsed?TM(t,e,n).getOr(e):e},EM=function(t){return Ew(t)||Sw(t)},_M=function(t){return _w(t)||kw(t)},AM=function(t,e){Zr(e)&&0===e.data.length&&t.remove(e)},DM=function(t,e,n,r,o,i){return CM(r,t,i.getNode(!o),o,!0).each((function(n){if(e.collapsed){var r=e.cloneRange();o?r.setEnd(n.startContainer,n.startOffset):r.setStart(n.endContainer,n.endOffset),r.deleteContents()}else e.deleteContents();t.selection.setRng(n)})),AM(t.dom,n),!0},MM=function(t,e){var n=t.selection.getRng();if(!Zr(n.commonAncestorContainer))return!1;var r=e?zf.Forwards:zf.Backwards,o=Hg(t.getBody()),i=N(Sg,e?o.next:o.prev),u=e?EM:_M,a=wg(r,t.getBody(),n),c=HD(e,i(a));if(!c||!kg(a,c))return!1;if(u(c))return DM(t,n,a.getNode(),r,e,c);var s=i(c);return!!(s&&u(s)&&kg(c,s))&&DM(t,n,a.getNode(),r,e,s)},RM=function(t,e){return MM(t,e)},NM=function(t){return iu(wn.fromDom(t))||ru(wn.fromDom(t))},zM=ti.generate([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),BM=function(t,e){var n=e.getNode(!1===t),r=t?"after":"before";return jr(n)&&n.getAttribute("data-mce-caret")===r},LM=function(t,e,n,r){var o=function(e){return Zi(wn.fromDom(e))&&!fg(n,r,t)};return yg(!e,n).fold((function(){return yg(e,r).fold(I,o)}),o)},HM=function(t,e,n,r){var o=r.getNode(!1===e);return UD(wn.fromDom(t),wn.fromDom(n.getNode())).map((function(t){return na(t)?zM.remove(t.dom):zM.moveToElement(o)})).orThunk((function(){return W.some(zM.moveToElement(o))}))},IM=function(t,e,n){return qg(e,t,n).bind((function(r){return NM(r.getNode())||LM(t,e,n,r)?W.none():e&&uo(r.getNode())||!1===e&&uo(r.getNode(!0))?HM(t,e,n,r):e&&_w(n)||!1===e&&Ew(n)?W.some(zM.moveToPosition(r)):W.none()}))},PM=function(t,e){return t&&uo(e.nextSibling)?W.some(zM.moveToElement(e.nextSibling)):!1===t&&uo(e.previousSibling)?W.some(zM.moveToElement(e.previousSibling)):W.none()},FM=function(t,e,n){return n.fold((function(t){return W.some(zM.remove(t))}),(function(t){return W.some(zM.moveToElement(t))}),(function(n){return fg(e,n,t)?W.none():W.some(zM.moveToPosition(n))}))},VM=function(t,e,n){return BM(e,n)?PM(e,n.getNode(!1===e)).fold((function(){return IM(t,e,n)}),W.some):IM(t,e,n).bind((function(e){return FM(t,n,e)}))},UM=function(t,e,n){var r=bg(e?1:-1,t,n),o=Nf.fromRangeStart(r),i=wn.fromDom(t);return!1===e&&_w(o)?W.some(zM.remove(o.getNode(!0))):e&&Ew(o)?W.some(zM.remove(o.getNode())):!1===e&&Ew(o)&&Kw(i,o)?Xw(i,o).map((function(t){return zM.remove(t.getNode())})):e&&_w(o)&&Gw(i,o)?Yw(i,o).map((function(t){return zM.remove(t.getNode())})):VM(t,e,o)},jM=function(t,e){return function(n){return t._selectionOverrides.hideFakeCaret(),Ux(t,e,wn.fromDom(n)),!0}},WM=function(t,e){return function(n){var r=e?Nf.before(n):Nf.after(n);return t.selection.setRng(r.toRange()),!0}},qM=function(t){return function(e){return t.selection.setRng(e.toRange()),!0}},$M=function(t,e){return W.from(Pp(t.getBody(),e))},GM=function(t,e){var n=t.selection.getNode();return $M(t,n).filter(uo).fold((function(){return UM(t.getBody(),e,t.selection.getRng()).exists((function(n){return n.fold(jM(t,e),WM(t,e),qM(t))}))}),P)},KM=function(t){Z(El(t,".mce-offscreen-selection"),Or)},XM=function(t,e){var n=t.selection.getNode();if(uo(n)&&!ao(n)){var r=$M(t,n.parentNode).filter(uo);return r.fold((function(){return KM(wn.fromDom(t.getBody())),Ux(t,e,wn.fromDom(t.selection.getNode())),WD(t),!0}),P)}return!1},YM=function(t){var e=t.dom,n=t.selection,r=Pp(t.getBody(),n.getNode());if(io(r)&&e.isBlock(r)&&e.isEmpty(r)){var o=e.create("br",{"data-mce-bogus":"1"});e.setHTML(r,""),r.appendChild(o),n.setRng(Nf.before(o).toRange())}return!0},JM=function(t,e){return t.selection.isCollapsed()?GM(t,e):XM(t,e)},QM=function(t,e){var n=Nf.fromRangeStart(t.selection.getRng());return qg(e,t.getBody(),n).filter((function(t){return e?xw(t):Cw(t)})).bind((function(t){return W.from(dg(e?0:-1,t))})).exists((function(e){return t.selection.select(e),!0}))},ZM=function(t,e){return!!t.selection.isCollapsed()&&QM(t,e)},tR=Zr,eR=function(t){return tR(t)&&t.data[0]===du},nR=function(t){return tR(t)&&t.data[t.data.length-1]===du},rR=function(t){return t.ownerDocument.createTextNode(du)},oR=function(t){if(tR(t.previousSibling))return nR(t.previousSibling)||t.previousSibling.appendData(du),t.previousSibling;if(tR(t))return eR(t)||t.insertData(0,du),t;var e=rR(t);return t.parentNode.insertBefore(e,t),e},iR=function(t){if(tR(t.nextSibling))return eR(t.nextSibling)||t.nextSibling.insertData(0,du),t.nextSibling;if(tR(t))return nR(t)||t.appendData(du),t;var e=rR(t);return t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e),e},uR=function(t,e){return t?oR(e):iR(e)},aR=N(uR,!0),cR=N(uR,!1),sR=function(t,e){return Zr(t.container())?uR(e,t.container()):uR(e,t.getNode())},lR=function(t,e){var n=e.get();return n&&t.container()===n&&bu(n)},fR=function(t,e){return e.fold((function(e){Vm(t.get());var n=aR(e);return t.set(n),W.some(Nf(n,n.length-1))}),(function(e){return Jg(e).map((function(e){if(lR(e,t))return Nf(t.get(),1);Vm(t.get());var n=sR(e,!0);return t.set(n),Nf(n,1)}))}),(function(e){return Qg(e).map((function(e){if(lR(e,t))return Nf(t.get(),t.get().length-1);Vm(t.get());var n=sR(e,!1);return t.set(n),Nf(n,n.length-1)}))}),(function(e){Vm(t.get());var n=cR(e);return t.set(n),W.some(Nf(n,1))}))},dR=function(t,e){for(var n=0;n<t.length;n++){var r=t[n].apply(null,e);if(r.isSome())return r}return W.none()},mR=ti.generate([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),gR=function(t,e){var n=lg(e,t);return n||t},hR=function(t,e,n){var r=ID(n),o=gR(e,r.container());return zD(t,o,r).fold((function(){return Xg(o,r).bind(N(zD,t,o)).map((function(t){return mR.before(t)}))}),W.none)},pR=function(t,e){return null===eh(t,e)},vR=function(t,e,n){return zD(t,e,n).filter(N(pR,e))},bR=function(t,e,n){var r=PD(n);return vR(t,e,r).bind((function(t){var e=Yg(t,r);return e.isNone()?W.some(mR.start(t)):W.none()}))},yR=function(t,e,n){var r=ID(n);return vR(t,e,r).bind((function(t){var e=Xg(t,r);return e.isNone()?W.some(mR.end(t)):W.none()}))},wR=function(t,e,n){var r=PD(n),o=gR(e,r.container());return zD(t,o,r).fold((function(){return Yg(o,r).bind(N(zD,t,o)).map((function(t){return mR.after(t)}))}),W.none)},xR=function(t){return!1===RD(SR(t))},CR=function(t,e,n){var r=dR([hR,bR,yR,wR],[t,e,n]);return r.filter(xR)},SR=function(t){return t.fold(M,M,M,M)},kR=function(t){return t.fold(D("before"),D("start"),D("end"),D("after"))},TR=function(t){return t.fold(mR.before,mR.before,mR.after,mR.after)},OR=function(t){return t.fold(mR.start,mR.start,mR.end,mR.end)},ER=function(t,e){return kR(t)===kR(e)&&SR(t)===SR(e)},_R=function(t,e,n,r,o,i){return fo(zD(e,n,r),zD(e,n,o),(function(e,r){return e!==r&&BD(n,e,r)?mR.after(t?e:r):i})).getOr(i)},AR=function(t,e){return t.fold(P,(function(t){return!ER(t,e)}))},DR=function(t,e,n,r,o){var i=HD(t,o),u=qg(t,n,i).map(N(HD,t)),a=u.fold((function(){return r.map(TR)}),(function(o){return CR(e,n,o).map(N(_R,t,e,n,i,o)).filter(N(AR,r))}));return a.filter(xR)},MR=function(t,e){return t?e.fold(_(W.some,mR.start),W.none,_(W.some,mR.after),W.none):e.fold(W.none,_(W.some,mR.before),W.none,_(W.some,mR.end))},RR=function(t,e,n,r){var o=HD(t,r),i=CR(e,n,o);return CR(e,n,o).bind(N(MR,t)).orThunk((function(){return DR(t,e,n,i,r)}))};N(RR,!1),N(RR,!0);var NR,zR=function(t){return T(t.selection.getSel().modify)},BR=function(t,e,n){var r=t?1:-1;return e.setRng(Nf(n.container(),n.offset()+r).toRange()),e.getSel().modify("move",t?"forward":"backward","word"),!0},LR=function(t,e){var n=e.selection.getRng(),r=t?Nf.fromRangeEnd(n):Nf.fromRangeStart(n);return!!zR(e)&&(t&&Cu(r)?BR(!0,e.selection,r):!(t||!Su(r))&&BR(!1,e.selection,r))};(function(t){t[t["Br"]=0]="Br",t[t["Block"]=1]="Block",t[t["Wrap"]=2]="Wrap",t[t["Eol"]=3]="Eol"})(NR||(NR={}));var HR,IR=function(t,e){return t===zf.Backwards?ft(e):e},PR=function(t,e,n){return t===zf.Forwards?e.next(n):e.prev(n)},FR=function(t,e,n,r){return ro(r.getNode(e===zf.Forwards))?NR.Br:!1===fg(n,r)?NR.Block:NR.Wrap},VR=function(t,e,n,r){var o=Hg(n),i=r,u=[];while(i){var a=PR(e,o,i);if(!a)break;if(ro(a.getNode(!1)))return e===zf.Forwards?{positions:IR(e,u).concat([a]),breakType:NR.Br,breakAt:W.some(a)}:{positions:IR(e,u),breakType:NR.Br,breakAt:W.some(a)};if(a.isVisible()){if(t(i,a)){var c=FR(n,e,i,a);return{positions:IR(e,u),breakType:c,breakAt:W.some(a)}}u.push(a),i=a}else i=a}return{positions:IR(e,u),breakType:NR.Eol,breakAt:W.none()}},UR=function(t,e,n,r){return e(n,r).breakAt.map((function(r){var o=e(n,r).positions;return t===zf.Backwards?o.concat(r):[r].concat(o)})).getOr([])},jR=function(t,e){return ot(t,(function(t,n){return t.fold((function(){return W.some(n)}),(function(r){return fo(pt(r.getClientRects()),pt(n.getClientRects()),(function(t,o){var i=Math.abs(e-t.left),u=Math.abs(e-o.left);return u<=i?n:r})).or(t)}))}),W.none())},WR=function(t,e){return pt(e.getClientRects()).bind((function(e){return jR(t,e.left)}))},qR=N(VR,Nf.isAbove,-1),$R=N(VR,Nf.isBelow,1),GR=N(UR,-1,qR),KR=N(UR,1,$R),XR=function(t,e){return qR(t,e).breakAt.isNone()},YR=function(t,e){return $R(t,e).breakAt.isNone()},JR=function(t){return Jg(t).map((function(e){return[e].concat($R(t,e).positions)})).getOr([])},QR=function(t){return Qg(t).map((function(e){return qR(t,e).positions.concat(e)})).getOr([])},ZR=function(t){var e=function(e){return Q(e,(function(e){var n=Jl(e);return n.node=t,n}))};if(jr(t))return e(t.getClientRects());if(Zr(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}},tN=function(t){return st(t,ZR)};(function(t){t[t["Up"]=-1]="Up",t[t["Down"]=1]="Down"})(HR||(HR={}));var eN,nN,rN=function(t,e,n,r){while(r=sg(r,t,qu,e))if(n(r))return},oN=function(t,e,n,r,o,i){var u=0,a=[],c=function(r){var i=tN([r]);-1===t&&(i=i.reverse());for(var c=0;c<i.length;c++){var l=i[c];if(!n(l,s)){if(a.length>0&&e(l,jt(a))&&u++,l.line=u,o(l))return!0;a.push(l)}}},s=jt(i.getClientRects());if(!s)return a;var l=i.getNode();return c(l),rN(t,r,c,l),a},iN=function(t,e){return e.line>t},uN=function(t,e){return e.line===t},aN=N(oN,HR.Up,ef,nf),cN=N(oN,HR.Down,nf,ef),sN=function(t,e,n,r){var o,i,u,a,c=Hg(e),s=[],l=0,f=function(t){return jt(t.getClientRects())};1===t?(o=c.next,i=nf,u=ef,a=Nf.after(r)):(o=c.prev,i=ef,u=nf,a=Nf.before(r));var d=f(a);do{if(a.isVisible()){var m=f(a);if(!u(m,d)){s.length>0&&i(m,jt(s))&&l++;var g=Jl(m);if(g.position=a,g.line=l,n(g))return s;s.push(g)}}}while(a=o(a));return s},lN=function(t){return function(e){return iN(t,e)}},fN=function(t){return function(e){return uN(t,e)}},dN=uo,mN=sg,gN=function(t,e){return Math.abs(t.left-e)},hN=function(t,e){return Math.abs(t.right-e)},pN=function(t,e){return t>=e.left&&t<=e.right},vN=function(t,e){return t>=e.top&&t<=e.bottom},bN=function(t){return Nt(t,"node")},yN=function(t,e,n){return void 0===n&&(n=P),Vt(t,(function(t,r){if(pN(e,r))return n(r)?r:t;if(pN(e,t))return n(t)?t:r;var o=Math.min(gN(t,e),hN(t,e)),i=Math.min(gN(r,e),hN(r,e));return i===o&&bN(r)&&dN(r.node)||i<o?r:t}))},wN=function(t,e,n,r,o){var i=mN(r,t,qu,e,!o);do{if(!i||n(i))return}while(i=mN(i,t,qu,e))},xN=function(t,e,n){void 0===n&&(n=!0);var r=[],o=function(t,n){var o=nt(tN([n]),(function(n){return!t(n,e)}));return r=r.concat(o),0===o.length};return r.push(e),wN(HR.Up,t,N(o,ef),e.node,n),wN(HR.Down,t,N(o,nf),e.node,n),r},CN=function(t){return nt(bt(t.getElementsByTagName("*")),Qm)},SN=function(t,e){return{node:t.node,before:gN(t,e)<hN(t,e)}},kN=function(t,e,n){var r=tN(CN(t)),o=nt(r,N(vN,n)),i=function(t){return!Yr(t.node)&&!co(t.node)},u=yN(o,e,i);if(u){var a=i(u);if(u=yN(xN(t,u,a),e,i),u&&Qm(u.node))return SN(u,e)}return null},TN=function(t,e){t.selection.setRng(e),nb(t,t.selection.getRng())},ON=function(t,e,n){return W.some(OM(t,e,n))},EN=function(t,e,n,r,o,i){var u=e===zf.Forwards,a=Hg(t.getBody()),c=N(Sg,u?a.next:a.prev),s=u?r:o;if(!n.collapsed){var l=uf(n);if(i(l))return CM(e,t,l,e===zf.Backwards,!1)}var f=wg(e,t.getBody(),n);if(s(f))return kM(t,f.getNode(!u));var d=HD(u,c(f)),m=Du(n);if(!d)return m?W.some(n):W.none();if(s(d))return CM(e,t,d.getNode(!u),u,!1);var g=c(d);return g&&s(g)&&kg(d,g)?CM(e,t,g.getNode(!u),u,!1):m?ON(t,d.toRange(),!1):W.none()},_N=function(t,e,n,r,o,i){var u=wg(e,t.getBody(),n),a=jt(u.getClientRects()),c=e===HR.Down;if(!a)return W.none();var s,l=c?cN:aN,f=l(t.getBody(),lN(1),u),d=nt(f,fN(1)),m=a.left,g=yN(d,m);if(g&&i(g.node)){var h=Math.abs(m-g.left),p=Math.abs(m-g.right);return CM(e,t,g.node,h<p,!1)}if(s=r(u)?u.getNode():o(u)?u.getNode(!0):uf(n),s){var v=sN(e,t.getBody(),lN(1),s),b=yN(nt(v,fN(1)),m);if(b)return ON(t,b.position.toRange(),!1);if(b=jt(nt(v,fN(0))),b)return ON(t,b.position.toRange(),!1)}return 0===d.length?AN(t,c).filter(c?o:r).map((function(e){return OM(t,e.toRange(),!1)})):W.none()},AN=function(t,e){var n=t.selection.getRng(),r=t.getBody();if(e){var o=Nf.fromRangeEnd(n),i=$R(r,o);return vt(i.positions)}o=Nf.fromRangeStart(n),i=qR(r,o);return pt(i.positions)},DN=function(t,e,n){return AN(t,e).filter(n).exists((function(e){return t.selection.setRng(e.toRange()),!0}))},MN=function(t,e){var n=t.dom.createRng();n.setStart(e.container(),e.offset()),n.setEnd(e.container(),e.offset()),t.selection.setRng(n)},RN=function(t,e){t?e.setAttribute("data-mce-selected","inline-boundary"):e.removeAttribute("data-mce-selected")},NN=function(t,e,n){return fR(e,n).map((function(e){return MN(t,e),n}))},zN=function(t,e,n){var r=t.getBody(),o=Nf.fromRangeStart(t.selection.getRng()),i=N(MD,t),u=RR(n,i,r,o);return u.bind((function(n){return NN(t,e,n)}))},BN=function(t,e,n){var r=Q(El(wn.fromDom(e.getRoot()),'*[data-mce-selected="inline-boundary"]'),(function(t){return t.dom})),o=nt(r,t),i=nt(n,t);Z(dt(o,i),N(RN,!1)),Z(dt(i,o),N(RN,!0))},LN=function(t,e){if(t.selection.isCollapsed()&&!0!==t.composing&&e.get()){var n=Nf.fromRangeStart(t.selection.getRng());Nf.isTextPosition(n)&&!1===LD(n)&&(MN(t,Fm(e.get(),n)),e.set(null))}},HN=function(t,e,n,r){if(e.selection.isCollapsed()){var o=nt(r,t);Z(o,(function(r){var o=Nf.fromRangeStart(e.selection.getRng());CR(t,e.getBody(),o).bind((function(t){return NN(e,n,t)}))}))}},IN=function(t,e,n){return!!um(t)&&zN(t,e,n).isSome()},PN=function(t,e,n){return!!um(e)&&LR(t,e)},FN=function(t){var e=Ys(null),n=N(MD,t);return t.on("NodeChange",(function(r){!um(t)||tn.browser.isIE()&&r.initial||(BN(n,t.dom,r.parents),LN(t,e),HN(n,t,e,r.parents))})),e},VN=N(PN,!0),UN=N(PN,!1),jN=function(t,e,n){if(um(t)){var r=AN(t,e).getOrThunk((function(){var n=t.selection.getRng();return e?Nf.fromRangeEnd(n):Nf.fromRangeStart(n)}));return CR(N(MD,t),t.getBody(),r).exists((function(e){var r=TR(e);return fR(n,r).exists((function(e){return MN(t,e),!0}))}))}return!1},WN=function(t,e){var n=document.createRange();return n.setStart(t.container(),t.offset()),n.setEnd(e.container(),e.offset()),n},qN=function(t){return fo(Jg(t),Qg(t),(function(e,n){var r=HD(!0,e),o=HD(!1,n);return Xg(t,r).forall((function(t){return t.isEqual(o)}))})).getOr(!0)},$N=function(t,e){return function(n){return fR(e,n).exists((function(e){return MN(t,e),!0}))}},GN=function(t,e,n,r){var o=t.getBody(),i=N(MD,t);t.undoManager.ignore((function(){t.selection.setRng(WN(n,r)),t.execCommand("Delete"),CR(i,o,Nf.fromRangeStart(t.selection.getRng())).map(OR).map($N(t,e))})),t.nodeChanged()},KN=function(t,e){var n=lg(e,t);return n||t},XN=function(t,e,n,r){var o=KN(t.getBody(),r.container()),i=N(MD,t),u=CR(i,o,r);return u.bind((function(t){return n?t.fold(D(W.some(OR(t))),W.none,D(W.some(TR(t))),W.none):t.fold(W.none,D(W.some(TR(t))),W.none,D(W.some(OR(t))))})).map($N(t,e)).getOrThunk((function(){var a=$g(n,o,r),c=a.bind((function(t){return CR(i,o,t)}));return fo(u,c,(function(){return zD(i,o,r).exists((function(e){return!!qN(e)&&(Ux(t,n,wn.fromDom(e)),!0)}))})).orThunk((function(){return c.bind((function(o){return a.map((function(o){return n?GN(t,e,r,o):GN(t,e,o,r),!0}))}))})).getOr(!1)}))},YN=function(t,e,n){if(t.selection.isCollapsed()&&um(t)){var r=Nf.fromRangeStart(t.selection.getRng());return XN(t,e,n,r)}return!1},JN=function(t,e){var n=Lw(e,t);return at(n,Ji).fold(D(n),(function(t){return n.slice(0,t)}))},QN=function(t){return 1===ar(t)},ZN=function(t,e,n,r){var o=N(mk,e),i=Q(nt(r,o),(function(t){return t.dom}));if(0===i.length)Ux(e,t,n);else{var u=dk(n.dom,i);e.selection.setRng(u.toRange())}},tz=function(t,e){var n=wn.fromDom(t.getBody()),r=wn.fromDom(t.selection.getStart()),o=nt(JN(n,r),QN);return vt(o).exists((function(n){var r=Nf.fromRangeStart(t.selection.getRng());return!(!qD(e,r,n.dom)||gk(n))&&(ZN(e,t,n,o),!0)}))},ez=function(t,e){return!!t.selection.isCollapsed()&&tz(t,e)},nz=function(t,e,n){return t._selectionOverrides.hideFakeCaret(),Ux(t,e,wn.fromDom(n)),!0},rz=function(t,e){var n=e?Sw:kw,r=e?zf.Forwards:zf.Backwards,o=wg(r,t.getBody(),t.selection.getRng());return n(o)?nz(t,e,o.getNode(!e)):W.from(HD(e,o)).filter((function(t){return n(t)&&kg(o,t)})).exists((function(n){return nz(t,e,n.getNode(!e))}))},oz=function(t,e){var n=t.selection.getNode();return!!co(n)&&nz(t,e,n)},iz=function(t,e){return t.selection.isCollapsed()?rz(t,e):oz(t,e)},uz=function(t){return Si(t,(function(t){return io(t.dom)||uo(t.dom)})).exists((function(t){return io(t.dom)}))},az=function(t){var e=parseInt(t,10);return isNaN(e)?0:e},cz=function(t,e){var n=t||Qi(e)?"margin":"padding",r="rtl"===Oo(e,"direction")?"-right":"-left";return n+r},sz=function(t,e,n,r,o,i){var u=cz(n,wn.fromDom(i));if("outdent"===e){var a=Math.max(0,az(i.style[u])-r);t.setStyle(i,u,a?a+o:"")}else{a=az(i.style[u])+r+o;t.setStyle(i,u,a)}},lz=function(t,e){return lt(e,(function(e){var n=cz(Gd(t),e),r=_o(e,n).map(az).getOr(0),o=t.dom.getContentEditable(e.dom);return"false"!==o&&r>0}))},fz=function(t){var e=gz(t);return!t.mode.isReadOnly()&&(e.length>1||lz(t,e))},dz=function(t){return nu(t)||ru(t)},mz=function(t){return Yn(t).exists(dz)},gz=function(t){return nt(Ul(t.selection.getSelectedBlocks()),(function(t){return!dz(t)&&!mz(t)&&uz(t)}))},hz=function(t,e){var n=t.dom,r=t.selection,o=t.formatter,i=Kd(t),u=/[a-z%]+$/i.exec(i)[0],a=parseInt(i,10),c=Gd(t),s=Td(t);t.queryCommandState("InsertUnorderedList")||t.queryCommandState("InsertOrderedList")||""!==s||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),Z(gz(t),(function(t){sz(n,e,c,a,u,t.dom)}))},pz=function(t,e){if(t.selection.isCollapsed()&&fz(t)){var n=t.dom,r=t.selection.getRng(),o=Nf.fromRangeStart(r),i=n.getParent(r.startContainer,n.isBlock);if(null!==i&&Vw(wn.fromDom(i),o))return hz(t,"outdent"),!0}return!1},vz=function(t,e){t.getDoc().execCommand(e,!1,null)},bz=function(t,e){pz(t)||JM(t,!1)||RM(t,!1)||YN(t,e,!1)||dM(t,!1)||IC(t)||ZM(t,!1)||iz(t,!1)||yM(t)||ez(t,!1)||(vz(t,"Delete"),WD(t))},yz=function(t,e){JM(t,!0)||RM(t,!0)||YN(t,e,!0)||dM(t,!0)||IC(t)||ZM(t,!0)||iz(t,!0)||yM(t)||ez(t,!0)||vz(t,"ForwardDelete")},wz=function(t,e){t.addCommand("delete",(function(){bz(t,e)})),t.addCommand("forwardDelete",(function(){yz(t,e)}))},xz=5,Cz=400,Sz=function(t){return void 0===t.touches||1!==t.touches.length?W.none():W.some(t.touches[0])},kz=function(t,e){var n=Math.abs(t.clientX-e.x),r=Math.abs(t.clientY-e.y);return n>xz||r>xz},Tz=function(t){var e=dl(),n=Ys(!1),r=gl((function(e){t.fire("longpress",Wt(Wt({},e),{type:"longpress"})),n.set(!0)}),Cz);t.on("touchstart",(function(t){Sz(t).each((function(o){r.cancel();var i={x:o.clientX,y:o.clientY,target:t.target};r.throttle(t),n.set(!1),e.set(i)}))}),!0),t.on("touchmove",(function(o){r.cancel(),Sz(o).each((function(r){e.on((function(o){kz(r,o)&&(e.clear(),n.set(!1),t.fire("longpresscancel"))}))}))}),!0),t.on("touchend touchcancel",(function(o){r.cancel(),"touchcancel"!==o.type&&e.get().filter((function(t){return t.target.isEqualNode(o.target)})).each((function(){n.get()?o.preventDefault():t.fire("tap",Wt(Wt({},o),{type:"tap"}))}))}),!0)},Oz=function(t,e){return Rt(t,e.nodeName)},Ez=function(t,e){return!!Zr(e)||!!jr(e)&&(!Oz(t,e)&&!Ch(e))},_z=function(t,e,n){return J(Bw(wn.fromDom(n),wn.fromDom(e)),(function(e){return Oz(t,e.dom)}))},Az=function(t,e){if(Zr(e)){if(0===e.nodeValue.length)return!0;if(/^\s+$/.test(e.nodeValue)&&(!e.nextSibling||Oz(t,e.nextSibling)))return!0}return!1},Dz=function(t){var e,n,r,o=t.dom,i=t.selection,u=t.schema,a=u.getBlockElements(),c=i.getStart(),s=t.getBody(),l=Td(t);if(c&&jr(c)&&l){var f=s.nodeName.toLowerCase();if(u.isValidChild(f,l.toLowerCase())&&!_z(a,s,c)){var d=i.getRng(),m=d.startContainer,g=d.startOffset,h=d.endContainer,p=d.endOffset,v=dy(t);c=s.firstChild;while(c)if(Ez(a,c)){if(Az(a,c)){n=c,c=c.nextSibling,o.remove(n);continue}e||(e=o.create(l,Od(t)),c.parentNode.insertBefore(e,c),r=!0),n=c,c=c.nextSibling,e.appendChild(n)}else e=null,c=c.nextSibling;r&&v&&(d.setStart(m,g),d.setEnd(h,p),i.setRng(d),t.nodeChanged())}}},Mz=function(t){Td(t)&&t.on("NodeChange",N(Dz,t))},Rz=function(t){return Ei(wn.fromDom(t.getBody()),"*[data-mce-caret]").map((function(t){return t.dom})).getOrNull()},Nz=function(t){t.selection.setRng(t.selection.getRng())},zz=function(t,e){e.hasAttribute("data-mce-caret")&&(Au(e),Nz(t),t.selection.scrollIntoView(e))},Bz=function(t,e){var n=Rz(t);if(n)return"compositionstart"===e.type?(e.preventDefault(),e.stopPropagation(),void zz(t,n)):void(wu(n)&&(zz(t,n),t.undoManager.add()))},Lz=function(t){t.on("keyup compositionstart",N(Bz,t))},Hz=uo,Iz=function(t,e,n){return EN(e,t,n,Ew,_w,Hz)},Pz=function(t,e,n){var r=function(t){return Ew(t)||Tw(t)},o=function(t){return _w(t)||Ow(t)};return _N(e,t,n,r,o,Hz)},Fz=function(t){var e=t.dom.create(Td(t));return(!tn.ie||tn.ie>=11)&&(e.innerHTML='<br data-mce-bogus="1">'),e},Vz=function(t,e,n){var r=Hg(t.getBody()),o=N(Sg,1===e?r.next:r.prev);if(n.collapsed&&bm(t)){var i=t.dom.getParent(n.startContainer,"PRE");if(!i)return;var u=o(Nf.fromRangeStart(n));if(!u){var a=Fz(t);1===e?t.$(i).after(a):t.$(i).before(a),t.selection.select(a,!0),t.selection.collapse()}}},Uz=function(t,e){var n=e?zf.Forwards:zf.Backwards,r=t.selection.getRng();return Iz(n,t,r).orThunk((function(){return Vz(t,n,r),W.none()}))},jz=function(t,e){var n=e?1:-1,r=t.selection.getRng();return Pz(n,t,r).orThunk((function(){return Vz(t,n,r),W.none()}))},Wz=function(t,e){return Uz(t,e).exists((function(e){return TN(t,e),!0}))},qz=function(t,e){return jz(t,e).exists((function(e){return TN(t,e),!0}))},$z=function(t,e){var n=e?_w:Ew;return DN(t,e,n)},Gz=function(t){return Y(["figcaption"],Hn(t))},Kz=function(t){var e=document.createRange();return e.setStartBefore(t.dom),e.setEndBefore(t.dom),e},Xz=function(t,e,n){n?xr(t,e):wr(t,e)},Yz=function(t,e){var n=wn.fromTag("br");return Xz(t,n,e),Kz(n)},Jz=function(t,e,n,r){var o=wn.fromTag(n),i=wn.fromTag("br");return bo(o,r),xr(o,i),Xz(t,o,e),Kz(i)},Qz=function(t,e,n,r){return""===e?Yz(t,r):Jz(t,r,e,n)},Zz=function(t,e){var n=N(Nn,e);return Si(wn.fromDom(t.container()),Ji,n).filter(Gz)},tB=function(t,e,n){return e?YR(t.dom,n):XR(t.dom,n)},eB=function(t,e){var n=wn.fromDom(t.getBody()),r=Nf.fromRangeStart(t.selection.getRng()),o=Td(t),i=Od(t);return Zz(r,n).exists((function(){if(tB(n,e,r)){var u=Qz(n,o,i,e);return t.selection.setRng(u),!0}return!1}))},nB=function(t,e){return!!t.selection.isCollapsed()&&eB(t,e)},rB=function(t){return Q(t,(function(t){return Wt({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:E},t)}))},oB=function(t,e){return e.keyCode===t.keyCode&&e.shiftKey===t.shiftKey&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey},iB=function(t,e){return st(rB(t),(function(t){return oB(t,e)?[t]:[]}))},uB=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(null,e)}},aB=function(t,e){return ut(iB(t,e),(function(t){return t.action()}))},cB=function(t,e){var n=e?zf.Forwards:zf.Backwards,r=t.selection.getRng();return EN(t,n,r,Sw,kw,co).exists((function(e){return TN(t,e),!0}))},sB=function(t,e){var n=e?1:-1,r=t.selection.getRng();return _N(t,n,r,Sw,kw,co).exists((function(e){return TN(t,e),!0}))},lB=function(t,e){var n=e?kw:Sw;return DN(t,e,n)},fB=function(t,e){return{left:t.left-e,top:t.top-e,right:t.right+2*e,bottom:t.bottom+2*e,width:t.width+e,height:t.height+e}},dB=function(t,e){return st(e,(function(e){var n=fB(Jl(e.getBoundingClientRect()),-1);return[{x:n.left,y:t(n),cell:e},{x:n.right,y:t(n),cell:e}]}))},mB=function(t,e,n){return ot(t,(function(t,r){return t.fold((function(){return W.some(r)}),(function(t){var o=Math.sqrt(Math.abs(t.x-e)+Math.abs(t.y-n)),i=Math.sqrt(Math.abs(r.x-e)+Math.abs(r.y-n));return W.some(i<o?r:t)}))}),W.none())},gB=function(t,e,n,r,o){var i=El(wn.fromDom(n),"td,th,caption").map((function(t){return t.dom})),u=nt(dB(t,i),(function(t){return e(t,o)}));return mB(u,r,o).map((function(t){return t.cell}))},hB=function(t){return t.bottom},pB=function(t){return t.top},vB=function(t,e){return t.y<e},bB=function(t,e){return t.y>e},yB=N(gB,hB,vB),wB=N(gB,pB,bB),xB=function(t,e){return pt(e.getClientRects()).bind((function(e){return yB(t,e.left,e.top)})).bind((function(t){return WR(QR(t),e)}))},CB=function(t,e){return vt(e.getClientRects()).bind((function(e){return wB(t,e.left,e.top)})).bind((function(t){return WR(JR(t),e)}))},SB=function(t,e,n){return n.breakAt.exists((function(n){return t(e,n).breakAt.isSome()}))},kB=function(t){return t.breakType===NR.Wrap&&0===t.positions.length},TB=function(t){return t.breakType===NR.Br&&1===t.positions.length},OB=function(t,e,n){var r=t(e,n);return kB(r)||!ro(n.getNode())&&TB(r)?!SB(t,e,r):r.breakAt.isNone()},EB=N(OB,qR),_B=N(OB,$R),AB=function(t,e,n){var r=Nf.fromRangeStart(e);return Kg(!t,n).exists((function(t){return t.isEqual(r)}))},DB=function(t,e,n,r){var o=t.selection.getRng(),i=e?1:-1;return!(!Ym()||!AB(e,o,n))&&(CM(i,t,n,!e,!1).each((function(e){TN(t,e)})),!0)},MB=function(t,e,n){return xB(e,n).orThunk((function(){return pt(n.getClientRects()).bind((function(n){return jR(GR(t,Nf.before(e)),n.left)}))})).getOr(Nf.before(e))},RB=function(t,e,n){return CB(e,n).orThunk((function(){return pt(n.getClientRects()).bind((function(n){return jR(KR(t,Nf.after(e)),n.left)}))})).getOr(Nf.after(e))},NB=function(t,e){var n=e.getNode(t);return jr(n)&&"TABLE"===n.nodeName?W.some(n):W.none()},zB=function(t,e,n,r){var o=Td(e);o?e.undoManager.transact((function(){var r=wn.fromTag(o);bo(r,Od(e)),xr(r,wn.fromTag("br")),t?yr(wn.fromDom(n),r):br(wn.fromDom(n),r);var i=e.dom.createRng();i.setStart(r.dom,0),i.setEnd(r.dom,0),TN(e,i)})):TN(e,r.toRange())},BB=function(t,e,n){var r=NB(!!e,n),o=!1===e;r.fold((function(){return TN(t,n.toRange())}),(function(r){return Kg(o,t.getBody()).filter((function(t){return t.isEqual(n)})).fold((function(){return TN(t,n.toRange())}),(function(o){return zB(e,t,r,n)}))}))},LB=function(t,e,n,r){var o=t.selection.getRng(),i=Nf.fromRangeStart(o),u=t.getBody();if(!e&&EB(r,i)){var a=MB(u,n,i);return BB(t,e,a),!0}if(e&&_B(r,i)){a=RB(u,n,i);return BB(t,e,a),!0}return!1},HB=function(t,e,n){return W.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind((function(r){return W.from(t.dom.getParent(r,"table")).map((function(o){return n(t,e,o,r)}))})).getOr(!1)},IB=function(t,e){return HB(t,e,DB)},PB=function(t,e){return HB(t,e,LB)},FB=function(t,e,n){var r=qe().os;aB([{keyCode:ev.RIGHT,action:uB(Wz,t,!0)},{keyCode:ev.LEFT,action:uB(Wz,t,!1)},{keyCode:ev.UP,action:uB(qz,t,!1)},{keyCode:ev.DOWN,action:uB(qz,t,!0)},{keyCode:ev.RIGHT,action:uB(IB,t,!0)},{keyCode:ev.LEFT,action:uB(IB,t,!1)},{keyCode:ev.UP,action:uB(PB,t,!1)},{keyCode:ev.DOWN,action:uB(PB,t,!0)},{keyCode:ev.RIGHT,action:uB(cB,t,!0)},{keyCode:ev.LEFT,action:uB(cB,t,!1)},{keyCode:ev.UP,action:uB(sB,t,!1)},{keyCode:ev.DOWN,action:uB(sB,t,!0)},{keyCode:ev.RIGHT,action:uB(IN,t,e,!0)},{keyCode:ev.LEFT,action:uB(IN,t,e,!1)},{keyCode:ev.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:uB(VN,t,e)},{keyCode:ev.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:uB(UN,t,e)},{keyCode:ev.UP,action:uB(nB,t,!1)},{keyCode:ev.DOWN,action:uB(nB,t,!0)}],n).each((function(t){n.preventDefault()}))},VB=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&FB(t,e,n)}))},UB=function(t,e,n){aB([{keyCode:ev.BACKSPACE,action:uB(pz,t,!1)},{keyCode:ev.BACKSPACE,action:uB(JM,t,!1)},{keyCode:ev.DELETE,action:uB(JM,t,!0)},{keyCode:ev.BACKSPACE,action:uB(RM,t,!1)},{keyCode:ev.DELETE,action:uB(RM,t,!0)},{keyCode:ev.BACKSPACE,action:uB(YN,t,e,!1)},{keyCode:ev.DELETE,action:uB(YN,t,e,!0)},{keyCode:ev.BACKSPACE,action:uB(IC,t,!1)},{keyCode:ev.DELETE,action:uB(IC,t,!0)},{keyCode:ev.BACKSPACE,action:uB(ZM,t,!1)},{keyCode:ev.DELETE,action:uB(ZM,t,!0)},{keyCode:ev.BACKSPACE,action:uB(iz,t,!1)},{keyCode:ev.DELETE,action:uB(iz,t,!0)},{keyCode:ev.BACKSPACE,action:uB(yM,t,!1)},{keyCode:ev.DELETE,action:uB(yM,t,!0)},{keyCode:ev.BACKSPACE,action:uB(dM,t,!1)},{keyCode:ev.DELETE,action:uB(dM,t,!0)},{keyCode:ev.BACKSPACE,action:uB(ez,t,!1)},{keyCode:ev.DELETE,action:uB(ez,t,!0)}],n).each((function(t){n.preventDefault()}))},jB=function(t,e){aB([{keyCode:ev.BACKSPACE,action:uB(YM,t)},{keyCode:ev.DELETE,action:uB(YM,t)}],e)},WB=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&UB(t,e,n)})),t.on("keyup",(function(e){!1===e.isDefaultPrevented()&&jB(t,e)}))},qB=function(t){while(t){if(1===t.nodeType||3===t.nodeType&&t.data&&/[\r\n\s]/.test(t.data))return t;t=t.nextSibling}},$B=function(t,e){var n,r=e,o=t.dom,i=t.schema.getMoveCaretBeforeOnEnterElements();if(e){if(/^(LI|DT|DD)$/.test(e.nodeName)){var u=qB(e.firstChild);u&&/^(UL|OL|DL)$/.test(u.nodeName)&&e.insertBefore(o.doc.createTextNode(su),e.firstChild)}var a=o.createRng();if(e.normalize(),e.hasChildNodes()){var c=new Fi(e,e);while(n=c.current()){if(Zr(n)){a.setStart(n,0),a.setEnd(n,0);break}if(i[n.nodeName.toLowerCase()]){a.setStartBefore(n),a.setEndBefore(n);break}r=n,n=c.next()}n||(a.setStart(r,0),a.setEnd(r,0))}else ro(e)?e.nextSibling&&o.isBlock(e.nextSibling)?(a.setStartBefore(e),a.setEndBefore(e)):(a.setStartAfter(e),a.setEndAfter(e)):(a.setStart(e,0),a.setEnd(e,0));t.selection.setRng(a),nb(t,a)}},GB=function(t,e){var n,r,o=t.getRoot();n=e;while(n!==o&&"false"!==t.getContentEditable(n))"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},KB=function(t){return W.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))},XB=function(t){return KB(t).fold(D(""),(function(t){return t.nodeName.toUpperCase()}))},YB=function(t){return KB(t).filter((function(t){return ru(wn.fromDom(t))})).isSome()},JB=function(t,e){return t.firstChild&&t.firstChild.nodeName===e},QB=function(t){var e;return(null===(e=t.parentNode)||void 0===e?void 0:e.firstChild)===t},ZB=function(t,e){return t&&t.parentNode&&t.parentNode.nodeName===e},tL=function(t){return t&&/^(OL|UL|LI)$/.test(t.nodeName)},eL=function(t){return tL(t)&&tL(t.parentNode)},nL=function(t){var e=t.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:t},rL=function(t,e,n){var r=t[n?"firstChild":"lastChild"];while(r){if(jr(r))break;r=r[n?"nextSibling":"previousSibling"]}return r===e},oL=function(t,e,n,r,o){var i=t.dom,u=t.selection.getRng();if(n!==t.getBody()){eL(n)&&(o="LI");var a=o?e(o):i.create("BR");if(rL(n,r,!0)&&rL(n,r,!1))if(ZB(n,"LI")){var c=nL(n);i.insertAfter(a,c),QB(n)?i.remove(c):i.remove(n)}else i.replace(a,n);else if(rL(n,r,!0))ZB(n,"LI")?(i.insertAfter(a,nL(n)),a.appendChild(i.doc.createTextNode(" ")),a.appendChild(n)):n.parentNode.insertBefore(a,n),i.remove(r);else if(rL(n,r,!1))i.insertAfter(a,nL(n)),i.remove(r);else{n=nL(n);var s=u.cloneRange();s.setStartAfter(r),s.setEndAfter(n);var l=s.extractContents();"LI"===o&&JB(l,"LI")?(a=l.firstChild,i.insertAfter(l,n)):(i.insertAfter(l,n),i.insertAfter(a,n)),i.remove(r)}$B(t,a)}},iL=function(t){Z(Ol(wn.fromDom(t),Un),(function(t){var e=t.dom;e.nodeValue=gu(e.nodeValue)}))},uL=function(t,e){return e&&"A"===e.nodeName&&t.isEmpty(e)},aL=function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)},cL=function(t){t.innerHTML='<br data-mce-bogus="1">'},sL=function(t,e){return t.nodeName===e||t.previousSibling&&t.previousSibling.nodeName===e},lL=function(t,e){return e&&t.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==t.getContentEditable(e)},fL=function(t,e,n){var r,o=n,i=[];if(o){while(o=o.firstChild){if(t.isBlock(o))return;jr(o)&&!e[o.nodeName.toLowerCase()]&&i.push(o)}r=i.length;while(r--)o=i[r],(!o.hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue||uL(t,o))&&t.remove(o)}},dL=function(t,e,n){return!1===Zr(e)?n:t?1===n&&e.data.charAt(n-1)===du?0:n:n===e.data.length-1&&e.data.charAt(n)===du?e.data.length:n},mL=function(t){var e=t.cloneRange();return e.setStart(t.startContainer,dL(!0,t.startContainer,t.startOffset)),e.setEnd(t.endContainer,dL(!1,t.endContainer,t.endOffset)),e},gL=function(t){do{Zr(t)&&(t.nodeValue=t.nodeValue.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)},hL=function(t,e){var n,r,o=t.getRoot();n=e;while(n!==o&&"false"!==t.getContentEditable(n))"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},pL=function(t,e,n){var r=t.dom;W.from(n.style).map(r.parseStyle).each((function(t){var n=Ao(wn.fromDom(e)),o=Wt(Wt({},n),t);r.setStyles(e,o)}));var o=W.from(n.class).map((function(t){return t.split(/\s+/)})),i=W.from(e.className).map((function(t){return nt(t.split(/\s+/),(function(t){return""!==t}))}));fo(o,i,(function(t,n){var o=nt(n,(function(e){return!Y(t,e)})),i=$t($t([],t,!0),o,!0);r.setAttrib(e,"class",i.join(" "))}));var u=["style","class"],a=_t(n,(function(t,e){return!Y(u,e)}));r.setAttribs(e,a)},vL=function(t,e){var n=Td(t);if(n&&n.toLowerCase()===e.tagName.toLowerCase()){var r=Od(t);pL(t,e,r)}},bL=function(t,e,n,r,o){var i,u,a,c,s,l,f=e||"P",d=t.dom,m=hL(d,r);if(u=d.getParent(r,d.isBlock),!u||!lL(d,u)){if(u=u||m,l=u===t.getBody()||aL(u)?u.nodeName.toLowerCase():u.parentNode.nodeName.toLowerCase(),!u.hasChildNodes())return i=d.create(f),vL(t,i),u.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;c=r;while(c.parentNode!==u)c=c.parentNode;while(c&&!d.isBlock(c))a=c,c=c.previousSibling;if(a&&t.schema.isValidChild(l,f.toLowerCase())){i=d.create(f),vL(t,i),a.parentNode.insertBefore(i,a),c=a;while(c&&!d.isBlock(c))s=c.nextSibling,i.appendChild(c),c=s;n.setStart(r,o),n.setEnd(r,o)}}return r},yL=function(t,e){e.normalize();var n=e.lastChild;n&&!/^(left|right)$/gi.test(t.getStyle(n,"float",!0))||t.add(e,"br")},wL=function(t,e){var n,r,o,i,u,a,c,s,l,f,d=t.dom,m=t.schema,g=m.getNonEmptyElements(),h=t.selection.getRng(),p=function(e){var n,o,u,a=r,c=m.getTextInlineElements();if(n=e||"TABLE"===s||"HR"===s?d.create(e||l):i.cloneNode(!1),u=n,!1===Ad(t))d.setAttrib(n,"style",null),d.setAttrib(n,"class",null);else do{if(c[a.nodeName]){if(th(a)||Ch(a))continue;o=a.cloneNode(!1),d.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(u=o,n.appendChild(o))}}while((a=a.parentNode)&&a!==x);return vL(t,n),cL(u),n},v=function(t){var e,n,u=dL(t,r,o);if(Zr(r)&&(t?u>0:u<r.nodeValue.length))return!1;if(r.parentNode===i&&f&&!t)return!0;if(t&&jr(r)&&r===i.firstChild)return!0;if(sL(r,"TABLE")||sL(r,"HR"))return f&&!t||!f&&t;var a=new Fi(r,i);Zr(r)&&(t&&0===u?a.prev():t||u!==r.nodeValue.length||a.next());while(e=a.current()){if(jr(e)){if(!e.getAttribute("data-mce-bogus")&&(n=e.nodeName.toLowerCase(),g[n]&&"br"!==n))return!1}else if(Zr(e)&&!Gu(e.nodeValue))return!1;t?a.prev():a.next()}return!0},b=function(){u=/^(H[1-6]|PRE|FIGURE)$/.test(s)&&"HGROUP"!==C?p(l):p(),Dd(t)&&lL(d,c)&&d.isEmpty(i)?u=d.split(c,i):d.insertAfter(u,i),$B(t,u)};xv(d,h).each((function(t){h.setStart(t.startContainer,t.startOffset),h.setEnd(t.endContainer,t.endOffset)})),r=h.startContainer,o=h.startOffset,l=Td(t);var y=!(!e||!e.shiftKey),w=!(!e||!e.ctrlKey);jr(r)&&r.hasChildNodes()&&(f=o>r.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=f&&Zr(r)?r.nodeValue.length:0);var x=hL(d,r);if(x){(l&&!y||!l&&y)&&(r=bL(t,l,h,r,o)),i=d.getParent(r,d.isBlock),c=i?d.getParent(i.parentNode,d.isBlock):null,s=i?i.nodeName.toUpperCase():"";var C=c?c.nodeName.toUpperCase():"";"LI"!==C||w||(i=c,c=c.parentNode,s=C),/^(LI|DT|DD)$/.test(s)&&d.isEmpty(i)?oL(t,p,c,i,l):l&&i===t.getBody()||(l=l||"P",vu(i)?(u=Au(i),d.isEmpty(i)&&cL(i),vL(t,u),$B(t,u)):v()?b():v(!0)?(u=i.parentNode.insertBefore(p(),i),$B(t,sL(i,"HR")?u:i)):(n=mL(h).cloneRange(),n.setEndAfter(i),a=n.extractContents(),iL(a),gL(a),u=a.firstChild,d.insertAfter(a,i),fL(d,g,u),yL(d,i),d.isEmpty(i)&&cL(i),u.normalize(),d.isEmpty(u)?(d.remove(u),b()):(vL(t,u),$B(t,u))),d.setAttrib(u,"id",""),t.fire("NewBlock",{newBlock:u}))}},xL=function(t,e,n){var r,o=new Fi(e,n),i=t.getNonEmptyElements();while(r=o.next())if(i[r.nodeName.toLowerCase()]||r.length>0)return!0},CL=function(t,e,n){var r=t.dom.createRng();n?(r.setStartBefore(e),r.setEndBefore(e)):(r.setStartAfter(e),r.setEndAfter(e)),t.selection.setRng(r),nb(t,r)},SL=function(t,e){var n,r,o=t.selection,i=t.dom,u=o.getRng();xv(i,u).each((function(t){u.setStart(t.startContainer,t.startOffset),u.setEnd(t.endContainer,t.endOffset)}));var a=u.startOffset,c=u.startContainer;if(1===c.nodeType&&c.hasChildNodes()){var s=a>c.childNodes.length-1;c=c.childNodes[Math.min(a,c.childNodes.length-1)]||c,a=s&&3===c.nodeType?c.nodeValue.length:0}var l=i.getParent(c,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=!(!e||!e.ctrlKey);"LI"!==d||m||(l=f),c&&3===c.nodeType&&a>=c.nodeValue.length&&(xL(t.schema,c,l)||(n=i.create("br"),u.insertNode(n),u.setStartAfter(n),u.setEndAfter(n),r=!0)),n=i.create("br"),If(i,u,n),CL(t,n,r),t.undoManager.add()},kL=function(t,e){var n=wn.fromTag("br");br(wn.fromDom(e),n),t.undoManager.add()},TL=function(t,e){EL(t.getBody(),e)||yr(wn.fromDom(e),wn.fromTag("br"));var n=wn.fromTag("br");yr(wn.fromDom(e),n),CL(t,n.dom,!1),t.undoManager.add()},OL=function(t){return ro(t.getNode())},EL=function(t,e){return!!OL(Nf.after(e))||Xg(t,Nf.after(e)).map((function(t){return ro(t.getNode())})).getOr(!1)},_L=function(t){return t&&"A"===t.nodeName&&"href"in t},AL=function(t){return t.fold(I,_L,_L,I)},DL=function(t){var e=N(MD,t),n=Nf.fromRangeStart(t.selection.getRng());return CR(e,t.getBody(),n).filter(AL)},ML=function(t,e){e.fold(E,N(kL,t),N(TL,t),E)},RL=function(t,e){var n=DL(t);n.isSome()?n.each(N(ML,t)):SL(t,e)},NL=function(t,e){return KB(t).filter((function(t){return e.length>0&&An(wn.fromDom(t),e)})).isSome()},zL=function(t){return NL(t,Ed(t))},BL=function(t){return NL(t,_d(t))},LL=ti.generate([{br:[]},{block:[]},{none:[]}]),HL=function(t,e){return BL(t)},IL=function(t){return function(e,n){var r=""===Td(e);return r===t}},PL=function(t){return function(e,n){return YB(e)===t}},FL=function(t,e){return function(n,r){var o=XB(n)===t.toUpperCase();return o===e}},VL=function(t){return FL("pre",t)},UL=function(){return FL("summary",!0)},jL=function(t){return function(e,n){return kd(e)===t}},WL=function(t,e){return zL(t)},qL=function(t,e){return e},$L=function(t){var e=Td(t),n=GB(t.dom,t.selection.getStart());return n&&t.schema.isValidChild(n.nodeName,e||"P")},GL=function(t,e){return function(n,r){var o=ot(t,(function(t,e){return t&&e(n,r)}),!0);return o?W.some(e):W.none()}},KL=function(t,e){return dR([GL([HL],LL.none()),GL([UL()],LL.br()),GL([VL(!0),jL(!1),qL],LL.br()),GL([VL(!0),jL(!1)],LL.block()),GL([VL(!0),jL(!0),qL],LL.block()),GL([VL(!0),jL(!0)],LL.br()),GL([PL(!0),qL],LL.br()),GL([PL(!0)],LL.block()),GL([IL(!0),qL,$L],LL.block()),GL([IL(!0)],LL.br()),GL([WL],LL.br()),GL([IL(!1),qL],LL.br()),GL([$L],LL.block())],[t,!(!e||!e.shiftKey)]).getOr(LL.none())},XL=function(t,e){KL(t,e).fold((function(){RL(t,e)}),(function(){wL(t,e)}),E)},YL=function(t,e){e.isDefaultPrevented()||(e.preventDefault(),SO(t.undoManager),t.undoManager.transact((function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),XL(t,e)})))},JL=function(t){t.on("keydown",(function(e){e.keyCode===ev.ENTER&&YL(t,e)}))},QL=function(t,e,n){aB([{keyCode:ev.END,action:uB($z,t,!0)},{keyCode:ev.HOME,action:uB($z,t,!1)},{keyCode:ev.END,action:uB(lB,t,!0)},{keyCode:ev.HOME,action:uB(lB,t,!1)},{keyCode:ev.END,action:uB(jN,t,!0,e)},{keyCode:ev.HOME,action:uB(jN,t,!1,e)}],n).each((function(t){n.preventDefault()}))},ZL=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&QL(t,e,n)}))},tH=qe().browser,eH=function(t){var e=ml((function(){t.composing||bx(t)}),0);tH.isIE()&&(t.on("keypress",(function(t){e.throttle()})),t.on("remove",(function(t){e.cancel()})))},nH=function(t){eH(t),t.on("input",(function(e){!1===e.isComposing&&bx(t)}))},rH=qe(),oH=function(t,e,n){aB([{keyCode:ev.PAGE_UP,action:uB(jN,t,!1,e)},{keyCode:ev.PAGE_DOWN,action:uB(jN,t,!0,e)}],n)},iH=function(t){return t.stopImmediatePropagation()},uH=function(t){return t.keyCode===ev.PAGE_UP||t.keyCode===ev.PAGE_DOWN},aH=function(t,e,n){n&&!t.get()?e.on("NodeChange",iH,!0):!n&&t.get()&&e.off("NodeChange",iH),t.set(n)},cH=function(t,e){if(!rH.os.isOSX()){var n=Ys(!1);t.on("keydown",(function(e){uH(e)&&aH(n,t,!0)})),t.on("keyup",(function(r){!1===r.isDefaultPrevented()&&oH(t,e,r),uH(r)&&n.get()&&(aH(n,t,!1),t.nodeChanged())}))}},sH=function(t,e){var n=e.container(),r=e.offset();return Zr(n)?(n.insertData(r,t),W.some(Nf(n,r+t.length))):xg(e).map((function(n){var r=wn.fromText(t);return e.isAtEnd()?yr(n,r):br(n,r),Nf(r.dom,t.length)}))},lH=N(sH,su),fH=N(sH," "),dH=function(t){return function(e){return e.fold((function(e){return Yg(t.dom,Nf.before(e))}),(function(t){return Jg(t)}),(function(t){return Qg(t)}),(function(e){return Xg(t.dom,Nf.after(e))}))}},mH=function(t,e){return function(n){return ux(t,n)?lH(e):fH(e)}},gH=function(t){return function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}},hH=function(t){var e=Nf.fromRangeStart(t.selection.getRng()),n=wn.fromDom(t.getBody());if(t.selection.isCollapsed()){var r=N(MD,t),o=Nf.fromRangeStart(t.selection.getRng());return CR(r,t.getBody(),o).bind(dH(n)).bind(mH(n,e)).exists(gH(t))}return!1},pH=function(t,e){aB([{keyCode:ev.SPACEBAR,action:uB(hH,t)}],e).each((function(t){e.preventDefault()}))},vH=function(t){t.on("keydown",(function(e){!1===e.isDefaultPrevented()&&pH(t,e)}))},bH=function(t){var e=FN(t);return Lz(t),VB(t,e),WB(t,e),JL(t),vH(t),nH(t),ZL(t,e),cH(t,e),e},yH=function(t){return PO(t)?Ys(null):bH(t)},wH=function(){function t(t){var e;this.lastPath=[],this.editor=t;var n=this;"onselectionchange"in t.getDoc()||t.on("NodeChange click mouseup keyup focus",(function(n){var r=t.selection.getRng(),o={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset};"nodechange"!==n.type&&sv(o,e)||t.fire("SelectionChange"),e=o})),t.on("contextmenu",(function(){t.fire("SelectionChange")})),t.on("SelectionChange",(function(){var e=t.selection.getStart(!0);!e||!tn.range&&t.selection.isCollapsed()||Tp(t)&&!n.isSameElementPath(e)&&t.dom.isChildOf(e,t.getBody())&&t.nodeChanged({selectionChange:!0})})),t.on("mouseup",(function(e){!e.isDefaultPrevented()&&Tp(t)&&("IMG"===t.selection.getNode().nodeName?Li.setEditorTimeout(t,(function(){t.nodeChanged()})):t.nodeChanged())}))}return t.prototype.nodeChanged=function(t){var e,n,r,o=this.editor.selection;this.editor.initialized&&o&&!wm(this.editor)&&!this.editor.mode.isReadOnly()&&(r=this.editor.getBody(),e=o.getStart(!0)||r,e.ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(e,r)||(e=r),n=[],this.editor.dom.getParent(e,(function(t){if(t===r)return!0;n.push(t)})),t=t||{},t.element=e,t.parents=n,this.editor.fire("NodeChange",t))},t.prototype.isSameElementPath=function(t){var e,n=this.editor.$(t).parentsUntil(this.editor.getBody()).add(t);if(n.length===this.lastPath.length){for(e=n.length;e>=0;e--)if(n[e]!==this.lastPath[e])break;if(-1===e)return this.lastPath=n,!0}return this.lastPath=n,!1},t}(),xH=function(t){t.on("click",(function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()}))},CH=function(t){t.parser.addNodeFilter("details",(function(t){Z(t,(function(t){t.attr("data-mce-open",t.attr("open")),t.attr("open","open")}))})),t.serializer.addNodeFilter("details",(function(t){Z(t,(function(t){var e=t.attr("data-mce-open");t.attr("open",v(e)?e:null),t.attr("data-mce-open",null)}))}))},SH=function(t){xH(t),CH(t)},kH=function(t){return jr(t)&&eu(wn.fromDom(t))},TH=function(t){var e=t.selection.getRng(),n=Nf.fromRangeStart(e),r=Nf.fromRangeEnd(e);if(Nf.isElementPosition(n)){var o=n.container();kH(o)&&Jg(o).each((function(t){return e.setStart(t.container(),t.offset())}))}if(Nf.isElementPosition(r)){o=n.container();kH(o)&&Qg(o).each((function(t){return e.setEnd(t.container(),t.offset())}))}t.selection.setRng(VC(e))},OH=function(t){t.on("click",(function(e){e.detail>=3&&TH(t)}))},EH=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:e.top+o.pageYOffset-r.clientTop,left:e.left+o.pageXOffset-r.clientLeft}},_H=function(t){return t.inline?EH(t.getBody()):{left:0,top:0}},AH=function(t){var e=t.getBody();return t.inline?{left:e.scrollLeft,top:e.scrollTop}:{left:0,top:0}},DH=function(t){var e=t.getBody(),n=t.getDoc().documentElement,r={left:e.scrollLeft,top:e.scrollTop},o={left:e.scrollLeft||n.scrollLeft,top:e.scrollTop||n.scrollTop};return t.inline?r:o},MH=function(t,e){if(e.target.ownerDocument!==t.getDoc()){var n=EH(t.getContentAreaContainer()),r=DH(t);return{left:e.pageX-n.left+r.left,top:e.pageY-n.top+r.top}}return{left:e.pageX,top:e.pageY}},RH=function(t,e,n){return{pageX:n.left-t.left+e.left,pageY:n.top-t.top+e.top}},NH=function(t,e){return RH(_H(t),AH(t),MH(t,e))},zH=uo,BH=io,LH=function(t,e){return zH(e)&&e!==t},HH=function(t,e,n){return e!==n&&!t.dom.isChildOf(e,n)&&!zH(e)},IH=function(t){var e=t.cloneNode(!0);return e.removeAttribute("data-mce-selected"),e},PH=function(t,e,n,r){var o=t.dom,i=e.cloneNode(!0);o.setStyles(i,{width:n,height:r}),o.setAttrib(i,"data-mce-selected",null);var u=o.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return o.setStyles(u,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),o.setStyles(i,{margin:0,boxSizing:"border-box"}),u.appendChild(i),u},FH=function(t,e){t.parentNode!==e&&e.appendChild(t)},VH=function(t,e,n,r,o,i){var u=0,a=0;t.style.left=e.pageX+"px",t.style.top=e.pageY+"px",e.pageX+n>o&&(u=e.pageX+n-o),e.pageY+r>i&&(a=e.pageY+r-i),t.style.width=n-u+"px",t.style.height=r-a+"px"},UH=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},jH=function(t){return 0===t.button},WH=function(t,e){return{pageX:e.pageX-t.relX,pageY:e.pageY+5}},qH=function(t,e){return function(n){if(jH(n)){var r=ut(e.dom.getParents(n.target),ff(zH,BH)).getOr(null);if(LH(e.getBody(),r)){var o=e.dom.getPos(r),i=e.getBody(),u=e.getDoc().documentElement;t.set({element:r,dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(e.inline?i.scrollWidth:u.offsetWidth)-2,maxY:(e.inline?i.scrollHeight:u.offsetHeight)-2,relX:n.pageX-o.x,relY:n.pageY-o.y,width:r.offsetWidth,height:r.offsetHeight,ghost:PH(e,r,r.offsetWidth,r.offsetHeight)})}}}},$H=function(t,e){var n=Li.throttle((function(t,n){e._selectionOverrides.hideFakeCaret(),e.selection.placeCaretAt(t,n)}),0);return e.on("remove",n.stop),function(r){return t.on((function(t){var o=Math.max(Math.abs(r.screenX-t.screenX),Math.abs(r.screenY-t.screenY));if(!t.dragging&&o>10){var i=e.fire("dragstart",{target:t.element});if(i.isDefaultPrevented())return;t.dragging=!0,e.focus()}if(t.dragging){var u=WH(t,NH(e,r));FH(t.ghost,e.getBody()),VH(t.ghost,u,t.width,t.height,t.maxX,t.maxY),n(r.clientX,r.clientY)}}))}},GH=function(t){var e=t.getSel().getRangeAt(0),n=e.startContainer;return 3===n.nodeType?n.parentNode:n},KH=function(t,e){return function(n){t.on((function(t){if(t.dragging){if(HH(e,GH(e.selection),t.element)){var r=IH(t.element),o=e.fire("drop",{clientX:n.clientX,clientY:n.clientY});o.isDefaultPrevented()||e.undoManager.transact((function(){UH(t.element),e.insertContent(e.dom.getOuterHTML(r)),e._selectionOverrides.hideFakeCaret()}))}e.fire("dragend")}})),YH(t)}},XH=function(t,e){return function(){t.on((function(t){t.dragging&&e.fire("dragend")})),YH(t)}},YH=function(t){t.on((function(t){UH(t.ghost)})),t.clear()},JH=function(t){var e=dl(),n=Vs.DOM,r=document,o=qH(e,t),i=$H(e,t),u=KH(e,t),a=XH(e,t);t.on("mousedown",o),t.on("mousemove",i),t.on("mouseup",u),n.bind(r,"mousemove",i),n.bind(r,"mouseup",a),t.on("remove",(function(){n.unbind(r,"mousemove",i),n.unbind(r,"mouseup",a)})),t.on("keydown",(function(t){t.keyCode===ev.ESC&&a()}))},QH=function(t){t.on("drop",(function(e){var n="undefined"!==typeof e.clientX?t.getDoc().elementFromPoint(e.clientX,e.clientY):null;(zH(n)||"false"===t.dom.getContentEditableParent(n))&&e.preventDefault()}))},ZH=function(t){var e=function(e){if(!e.isDefaultPrevented()){var n=e.dataTransfer;n&&(Y(n.types,"Files")||n.files.length>0)&&(e.preventDefault(),"drop"===e.type&&LA(t,"Dropped file type is not supported"))}},n=function(n){Qb(t,n.target)&&e(n)},r=function(){var r=Vs.DOM,o=t.dom,i=document,u=t.inline?t.getBody():t.getDoc(),a=["drop","dragover"];Z(a,(function(t){r.bind(i,t,n),o.bind(u,t,e)})),t.on("remove",(function(){Z(a,(function(t){r.unbind(i,t,n),o.unbind(u,t,e)}))}))};t.on("init",(function(){Li.setEditorTimeout(t,r,0)}))},tI=function(t){JH(t),QH(t),Tm(t)&&ZH(t)},eI=function(t){var e=ml((function(){if(!t.removed&&t.getBody().contains(document.activeElement)){var e=t.selection.getRng();if(e.collapsed){var n=OM(t,e,!1);t.selection.setRng(n)}}}),0);t.on("focus",(function(){e.throttle()})),t.on("blur",(function(){e.cancel()}))},nI=function(t){t.on("init",(function(){t.on("focusin",(function(e){var n=e.target;if(co(n)){var r=Pp(t.getBody(),n),o=uo(r)?r:n;t.selection.getNode()!==o&&kM(t,o).each((function(e){return t.selection.setRng(e)}))}}))}))},rI=io,oI=uo,iI=function(t,e){return Pp(t.getBody(),e)},uI=function(t){var e,n=t.selection,r=t.dom,o=r.isBlock,i=t.getBody(),u=Xm(t,i,o,(function(){return dy(t)})),a="sel-"+r.uniqueId(),c="data-mce-selected",s=function(t){return r.hasClass(t,"mce-offscreen-selection")},l=function(t){return t!==i&&(oI(t)||co(t))&&r.isChildOf(t,i)},f=function(t){return Ew(t)||_w(t)||Sw(t)||kw(t)},d=function(){var t=r.get(a);return t?t.getElementsByTagName("*")[0]:t},m=function(t){t&&n.setRng(t)},g=n.getRng,h=function(e,r,o,i){void 0===i&&(i=!0);var a=t.fire("ShowCaret",{target:r,direction:e,before:o});return a.isDefaultPrevented()?null:(i&&n.scrollIntoView(r,-1===e),u.show(o,r))},p=function(t){t.hasAttribute("data-mce-caret")&&(Au(t),m(g()),n.scrollIntoView(t))},v=function(){t.on("mouseup",(function(e){var n=g();n.collapsed&&OA(t,e.clientX,e.clientY)&&TM(t,n,!1).each(m)})),t.on("click",(function(e){var o=iI(t,e.target);o&&(oI(o)&&(e.preventDefault(),t.focus()),rI(o)&&r.isChildOf(o,n.getNode())&&T())})),t.on("blur NewBlock",T),t.on("ResizeWindow FullscreenStateChanged",u.reposition);var a=function(t){var e=t.firstChild;if(S(e))return!1;var n=Nf.before(e);if(ro(n.getNode())&&1===t.childNodes.length)return!f(n);var r=Hg(t),o=r.next(n);return o&&!f(o)},c=function(t,e){var n=r.getParent(t,o),i=r.getParent(e,o);return n===i},p=function(e,n){var i=r.getParent(e,o),u=r.getParent(n,o);return!S(i)&&(!(e===u||!r.isChildOf(i,u)||!1!==oI(iI(t,i)))||!r.isChildOf(u,i)&&!c(i,u)&&a(i))};t.on("tap",(function(e){var n=e.target,r=iI(t,n);oI(r)?(e.preventDefault(),kM(t,r).each(k)):l(n)&&kM(t,n).each(k)}),!0),t.on("mousedown",(function(e){var o=e.target;if((o===i||"HTML"===o.nodeName||r.isChildOf(o,i))&&!1!==OA(t,e.clientX,e.clientY)){var u=iI(t,o);if(u)oI(u)?(e.preventDefault(),kM(t,u).each(k)):(T(),rI(u)&&e.shiftKey||Fp(e.clientX,e.clientY,n.getRng())||(E(),n.placeCaretAt(e.clientX,e.clientY)));else if(l(o))kM(t,o).each(k);else if(!1===Qm(o)){T(),E();var a=kN(i,e.clientX,e.clientY);if(a&&!p(o,a.node)){e.preventDefault();var c=h(1,a.node,a.before,!1);m(c),t.getBody().focus()}}}})),t.on("keypress",(function(t){ev.modifierPressed(t)||oI(n.getNode())&&t.preventDefault()})),t.on("GetSelectionRange",(function(t){var n=t.range;if(e){if(!e.parentNode)return void(e=null);n=n.cloneRange(),n.selectNode(e),t.range=n}})),t.on("SetSelectionRange",(function(t){t.range=w(t.range);var e=k(t.range,t.forward);e&&(t.range=e)}));var v=function(t){return"mcepastebin"===t.id};t.on("AfterSetSelectionRange",(function(t){var e=t.range,n=e.startContainer.parentNode;y(e)||v(n)||E(),s(n)||T()})),t.on("copy",(function(t){var e=t.clipboardData;if(!t.isDefaultPrevented()&&t.clipboardData&&!tn.ie){var n=d();n&&(t.preventDefault(),e.clearData(),e.setData("text/html",n.outerHTML),e.setData("text/plain",n.outerText||n.innerText))}})),tI(t),eI(t),nI(t)},b=function(t){return yu(t)||Ou(t)||Eu(t)},y=function(t){return b(t.startContainer)||b(t.endContainer)},w=function(e){var n=t.schema.getShortEndedElements(),o=r.createRng(),i=e.startContainer,u=e.startOffset,a=e.endContainer,c=e.endOffset;return Rt(n,i.nodeName.toLowerCase())?0===u?o.setStartBefore(i):o.setStartAfter(i):o.setStart(i,u),Rt(n,a.nodeName.toLowerCase())?0===c?o.setEndBefore(a):o.setEndAfter(a):o.setEnd(a,c),o},x=function(e,o,i){var u=t.$,c=Ei(wn.fromDom(t.getBody()),"#"+a).fold((function(){return u([])}),(function(t){return u([t.dom])}));0===c.length&&(c=u('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",a),c.appendTo(t.getBody()));var s=r.createRng();o===i&&tn.ie?(c.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(o),s.setStartAfter(c[0].firstChild.firstChild),s.setEndAfter(o)):(c.empty().append(su).append(o).append(su),s.setStart(c[0].firstChild,1),s.setEnd(c[0].lastChild,0)),c.css({top:r.getPos(e,t.getBody()).y}),c[0].focus();var l=n.getSel();return l.removeAllRanges(),l.addRange(s),s},C=function(n){var o=n.cloneNode(!0),i=t.fire("ObjectSelected",{target:n,targetClone:o});if(i.isDefaultPrevented())return null;var u=x(n,i.targetClone,o),a=wn.fromDom(n);return Z(El(wn.fromDom(t.getBody()),"*[data-mce-selected]"),(function(t){Nn(a,t)||Co(t,c)})),r.getAttrib(n,c)||n.setAttribute(c,"1"),e=n,E(),u},k=function(t,e){if(!t)return null;if(t.collapsed){if(!y(t)){var n=e?1:-1,o=wg(n,i,t),u=o.getNode(!e);if(Qm(u))return h(n,u,!!e&&!o.isAtEnd(),!1);var a=o.getNode(e);if(Qm(a))return h(n,a,!e&&!o.isAtEnd(),!1)}return null}var c=t.startContainer,s=t.startOffset,f=t.endOffset;if(3===c.nodeType&&0===s&&oI(c.parentNode)&&(c=c.parentNode,s=r.nodeIndex(c),c=c.parentNode),1!==c.nodeType)return null;if(f===s+1&&c===t.endContainer){var d=c.childNodes[s];if(l(d))return C(d)}return null},T=function(){e&&e.removeAttribute(c),Ei(wn.fromDom(t.getBody()),"#"+a).each(Or),e=null},O=function(){u.destroy(),e=null},E=function(){u.hide()};return tn.ceFalse&&!PO(t)&&v(),{showCaret:h,showBlockCaretContainer:p,hideFakeCaret:E,destroy:O}},aI=function(t){var e=gn.each,n=ev.BACKSPACE,r=ev.DELETE,o=t.dom,i=t.selection,u=t.parser,a=tn.gecko,c=tn.ie,s=tn.webkit,l="data:text/mce-internal,",f=c?"Text":"URL",d=function(e,n){try{t.getDoc().execCommand(e,!1,n)}catch(r){}},m=function(t){return t.isDefaultPrevented()},g=function(e){var n,r;e.dataTransfer&&(t.selection.isCollapsed()&&"IMG"===e.target.tagName&&i.select(e.target),n=t.selection.getContent(),n.length>0&&(r=l+escape(t.id)+","+escape(n),e.dataTransfer.setData(f,r)))},h=function(t){var e;return t.dataTransfer&&(e=t.dataTransfer.getData(f),e&&e.indexOf(l)>=0)?(e=e.substr(l.length).split(","),{id:unescape(e[0]),html:unescape(e[1])}):null},p=function(e,n){t.queryCommandSupported("mceInsertClipboardContent")?t.execCommand("mceInsertClipboardContent",!1,{content:e,internal:n}):t.execCommand("mceInsertContent",!1,e)},v=function(){var e=function(t){var e=o.create("body"),n=t.cloneContents();return e.appendChild(n),i.serializer.serialize(e,{format:"html"})},u=function(n){var r=e(n),i=o.createRng();i.selectNode(t.getBody());var u=e(i);return r===u};t.on("keydown",(function(e){var i,a,c=e.keyCode;if(!m(e)&&(c===r||c===n)){if(i=t.selection.isCollapsed(),a=t.getBody(),i&&!o.isEmpty(a))return;if(!i&&!u(t.selection.getRng()))return;e.preventDefault(),t.setContent(""),a.firstChild&&o.isBlock(a.firstChild)?t.selection.setCursorLocation(a.firstChild,0):t.selection.setCursorLocation(a,0),t.nodeChanged()}}))},b=function(){t.shortcuts.add("meta+a",null,"SelectAll")},y=function(){t.inline||o.bind(t.getDoc(),"mousedown mouseup",(function(e){var n;if(e.target===t.getDoc().documentElement)if(n=i.getRng(),t.getBody().focus(),"mousedown"===e.type){if(yu(n.startContainer))return;i.placeCaretAt(e.clientX,e.clientY)}else i.setRng(n)}))},w=function(){t.on("keydown",(function(e){if(!m(e)&&e.keyCode===n){if(!t.getBody().getElementsByTagName("hr").length)return;if(i.isCollapsed()&&0===i.getRng().startOffset){var r=i.getNode(),u=r.previousSibling;if("HR"===r.nodeName)return o.remove(r),void e.preventDefault();u&&u.nodeName&&"hr"===u.nodeName.toLowerCase()&&(o.remove(u),e.preventDefault())}}}))},x=function(){Range.prototype.getClientRects||t.on("mousedown",(function(e){if(!m(e)&&"HTML"===e.target.nodeName){var n=t.getBody();n.blur(),Li.setEditorTimeout(t,(function(){n.focus()}))}}))},C=function(){t.on("click",(function(e){var n=e.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==o.getContentEditableParent(n)&&(e.preventDefault(),t.selection.select(n),t.nodeChanged()),"A"===n.nodeName&&o.hasClass(n,"mce-item-anchor")&&(e.preventDefault(),i.select(n))}))},S=function(){var n=function(){var n=o.getAttribs(i.getStart().cloneNode(!1));return function(){var r=i.getStart();r!==t.getBody()&&(o.setAttrib(r,"style",null),e(n,(function(t){r.setAttributeNode(t.cloneNode(!0))})))}},r=function(){return!i.isCollapsed()&&o.getParent(i.getStart(),o.isBlock)!==o.getParent(i.getEnd(),o.isBlock)};t.on("keypress",(function(e){var o;if(!m(e)&&(8===e.keyCode||46===e.keyCode)&&r())return o=n(),t.getDoc().execCommand("delete",!1,null),o(),e.preventDefault(),!1})),o.bind(t.getDoc(),"cut",(function(e){var o;!m(e)&&r()&&(o=n(),Li.setEditorTimeout(t,(function(){o()})))}))},k=function(){t.on("keydown",(function(t){if(!m(t)&&t.keyCode===n&&i.isCollapsed()&&0===i.getRng().startOffset){var e=i.getNode().previousSibling;if(e&&e.nodeName&&"table"===e.nodeName.toLowerCase())return t.preventDefault(),!1}}))},T=function(){t.on("keydown",(function(e){var n,r;if(!m(e)&&e.keyCode===ev.BACKSPACE){n=i.getRng();var u=n.startContainer,a=n.startOffset,c=o.getRoot();if(r=u,n.collapsed&&0===a){while(r&&r.parentNode&&r.parentNode.firstChild===r&&r.parentNode!==c)r=r.parentNode;"BLOCKQUOTE"===r.tagName&&(t.formatter.toggle("blockquote",null,r),n=o.createRng(),n.setStart(u,0),n.setEnd(u,0),i.setRng(n))}}}))},O=function(){var e=function(){d("StyleWithCSS",!1),d("enableInlineTableEditing",!1),Zd(t)||d("enableObjectResizing",!1)};xm(t)||t.on("BeforeExecCommand mousedown",e)},_=function(){var n=function(){e(o.select("a"),(function(t){var e=t.parentNode,n=o.getRoot();if(e.lastChild===t){while(e&&!o.isBlock(e)){if(e.parentNode.lastChild!==e||e===n)return;e=e.parentNode}o.add(e,"br",{"data-mce-bogus":1})}}))};t.on("SetContent ExecCommand",(function(t){"setcontent"!==t.type&&"mceInsertLink"!==t.command||n()}))},A=function(){Td(t)&&t.on("init",(function(){d("DefaultParagraphSeparator",Td(t))}))},D=function(){t.on("keyup focusin mouseup",(function(t){ev.modifierPressed(t)||i.normalize()}),!0)},M=function(){t.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},R=function(){t.inline||t.on("keydown",(function(){document.activeElement===document.body&&t.getWin().focus()}))},N=function(){t.inline||(t.contentStyles.push("body {min-height: 150px}"),t.on("click",(function(e){var n;if("HTML"===e.target.nodeName){if(tn.ie>11)return void t.getBody().focus();n=t.selection.getRng(),t.getBody().focus(),t.selection.setRng(n),t.selection.normalize(),t.nodeChanged()}})))},z=function(){tn.mac&&t.on("keydown",(function(e){if(ev.metaKeyPressed(e)&&!e.shiftKey&&(37===e.keyCode||39===e.keyCode)){e.preventDefault();var n=t.selection.getSel();n.modify("move",37===e.keyCode?"backward":"forward","lineboundary")}}))},B=function(){d("AutoUrlDetect",!1)},L=function(){t.on("click",(function(t){var e=t.target;do{if("A"===e.tagName)return void t.preventDefault()}while(e=e.parentNode)})),t.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},H=function(){t.on("init",(function(){t.dom.bind(t.getBody(),"submit",(function(t){t.preventDefault()}))}))},I=function(){u.addNodeFilter("br",(function(t){var e=t.length;while(e--)"Apple-interchange-newline"===t[e].attr("class")&&t[e].remove()}))},P=function(){t.on("dragstart",(function(t){g(t)})),t.on("drop",(function(e){if(!m(e)){var n=h(e);if(n&&n.id!==t.id){e.preventDefault();var r=cv(e.x,e.y,t.getDoc());i.setRng(r),p(n.html,!0)}}}))},F=E,V=function(){if(!a||t.removed)return!1;var e=t.selection.getSel();return!e||!e.rangeCount||0===e.rangeCount},U=function(){s&&(y(),C(),H(),b(),tn.iOS&&(R(),N(),L())),a&&(x(),O(),M(),z())},j=function(){T(),v(),tn.windowsPhone||D(),s&&(y(),C(),A(),H(),k(),I(),tn.iOS?(R(),N(),L()):b()),tn.ie>=11&&(N(),k()),tn.ie&&(b(),B(),P()),a&&(w(),x(),S(),O(),_(),M(),z(),k())};return PO(t)?U():j(),{refreshContentEditable:F,isHidden:V}},cI=Vs.DOM,sI=function(t,e){var n=wn.fromDom(t.getBody()),r=mr(dr(n)),o=wn.fromTag("style");vo(o,"type","text/css"),xr(o,wn.fromText(e)),xr(r,o),t.on("remove",(function(){Or(o)}))},lI=function(t){return t.inline?t.getElement().nodeName.toLowerCase():void 0},fI=function(t){return _t(t,(function(t){return!1===C(t)}))},dI=function(t){var e=t.settings;return fI({block_elements:e.block_elements,boolean_attributes:e.boolean_attributes,custom_elements:e.custom_elements,extended_valid_elements:e.extended_valid_elements,invalid_elements:e.invalid_elements,invalid_styles:e.invalid_styles,move_caret_before_on_enter_elements:e.move_caret_before_on_enter_elements,non_empty_elements:e.non_empty_elements,schema:e.schema,self_closing_elements:e.self_closing_elements,short_ended_elements:e.short_ended_elements,special:e.special,text_block_elements:e.text_block_elements,text_inline_elements:e.text_inline_elements,valid_children:e.valid_children,valid_classes:e.valid_classes,valid_elements:e.valid_elements,valid_styles:e.valid_styles,verify_html:e.verify_html,whitespace_elements:e.whitespace_elements,padd_empty_block_inline_children:e.format_empty_lines})},mI=function(t){var e=t.settings,n=t.editorUpload.blobCache;return fI({allow_conditional_comments:e.allow_conditional_comments,allow_html_data_urls:e.allow_html_data_urls,allow_svg_data_urls:e.allow_svg_data_urls,allow_html_in_named_anchor:e.allow_html_in_named_anchor,allow_script_urls:e.allow_script_urls,allow_unsafe_link_target:e.allow_unsafe_link_target,convert_fonts_to_spans:e.convert_fonts_to_spans,fix_list_elements:e.fix_list_elements,font_size_legacy_values:e.font_size_legacy_values,forced_root_block:e.forced_root_block,forced_root_block_attrs:e.forced_root_block_attrs,padd_empty_with_br:e.padd_empty_with_br,preserve_cdata:e.preserve_cdata,remove_trailing_brs:e.remove_trailing_brs,inline_styles:e.inline_styles,root_name:lI(t),validate:!0,blob_cache:n,document:t.getDoc(),images_dataimg_filter:e.images_dataimg_filter})},gI=function(t){var e=t.settings;return Wt(Wt(Wt({},mI(t)),dI(t)),fI({url_converter:e.url_converter,url_converter_scope:e.url_converter_scope,element_format:e.element_format,entities:e.entities,entity_encoding:e.entity_encoding,indent:e.indent,indent_after:e.indent_after,indent_before:e.indent_before}))},hI=function(t){var e=c_(mI(t),t.schema);return e.addAttributeFilter("src,href,style,tabindex",(function(e,n){var r,o,i=e.length,u=t.dom,a="data-mce-"+n;while(i--)if(r=e[i],o=r.attr(n),o&&!r.attr(a)){if(0===o.indexOf("data:")||0===o.indexOf("blob:"))continue;"style"===n?(o=u.serializeStyle(u.parseStyle(o),r.name),o.length||(o=null),r.attr(a,o),r.attr(n,o)):"tabindex"===n?(r.attr(a,o),r.attr(n,null)):r.attr(a,t.convertURL(o,n,r.name))}})),e.addNodeFilter("script",(function(t){var e=t.length;while(e--){var n=t[e],r=n.attr("type")||"no/type";0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}})),t.settings.preserve_cdata&&e.addNodeFilter("#cdata",(function(e){var n=e.length;while(n--){var r=e[n];r.type=8,r.name="#comment",r.value="[CDATA["+t.dom.encode(r.value)+"]]"}})),e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(function(e){var n=e.length,r=t.schema.getNonEmptyElements();while(n--){var o=e[n];o.isEmpty(r)&&0===o.getAll("br").length&&(o.append(new Ay("br",1)).shortEnded=!0)}})),e},pI=function(t){t.settings.auto_focus&&Li.setEditorTimeout(t,(function(){var e;e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus),e.destroyed||e.focus()}),100)},vI=function(t){var e=t.dom.getRoot();t.inline||Tp(t)&&t.selection.getStart(!0)!==e||Jg(e).each((function(e){var n=e.getNode(),r=Yr(n)?Jg(n).getOr(e):e;tn.browser.isIE()?Ib(t,r.toRange()):t.selection.setRng(r.toRange())}))},bI=function(t){t.bindPendingEventDelegates(),t.initialized=!0,Yp(t),t.focus(!0),vI(t),t.nodeChanged({initial:!0}),t.execCallback("init_instance_callback",t),pI(t)},yI=function(t){return t.inline?t.ui.styleSheetLoader:t.dom.styleSheetLoader},wI=function(t,e,n){var r=[new Ai((function(n,r){return yI(t).loadAll(e,n,r)}))];return t.inline?r:r.concat([new Ai((function(e,r){return t.ui.styleSheetLoader.loadAll(n,e,r)}))])},xI=function(t){var e=yI(t),n=Yd(t),r=t.contentCSS,o=function(){e.unloadAll(r),t.inline||t.ui.styleSheetLoader.unloadAll(n)},i=function(){t.removed?o():t.on("remove",o)};if(t.contentStyles.length>0){var u="";gn.each(t.contentStyles,(function(t){u+=t+"\r\n"})),t.dom.addStyle(u)}var a=Ai.all(wI(t,r,n)).then(i).catch(i);return t.settings.content_style&&sI(t,t.settings.content_style),a},CI=function(t){var e=t.settings,n=t.getDoc(),r=t.getBody();Kp(t),e.browser_spellcheck||e.gecko_spellcheck||(n.body.spellcheck=!1,cI.setAttrib(r,"spellcheck","false")),t.quirks=aI(t),Xp(t);var o=Jd(t);void 0!==o&&(r.dir=o),e.protect&&t.on("BeforeSetContent",(function(t){gn.each(e.protect,(function(e){t.content=t.content.replace(e,(function(t){return"\x3c!--mce:protected "+escape(t)+"--\x3e"}))}))})),t.on("SetContent",(function(){t.addVisual(t.getBody())})),t.on("compositionstart compositionend",(function(e){t.composing="compositionstart"===e.type}))},SI=function(t){PO(t)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"})},kI=function(t){!0!==t.removed&&(SI(t),bI(t))},TI=function(t,e){var n=t.settings,r=t.getElement(),o=t.getDoc();n.inline||(t.getElement().style.visibility=t.orgVisibility),e||t.inline||(o.open(),o.write(t.iframeHTML),o.close()),t.inline&&(cI.addClass(r,"mce-content-body"),t.contentDocument=o=document,t.contentWindow=window,t.bodyElement=r,t.contentAreaContainer=r);var i=t.getBody();i.disabled=!0,t.readonly=!!n.readonly,t.readonly||(t.inline&&"static"===cI.getStyle(i,"position",!0)&&(i.style.position="relative"),i.contentEditable=t.getParam("content_editable_state",!0)),i.disabled=!1,t.editorUpload=uD(t),t.schema=Va(dI(t)),t.dom=Vs(o,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:n.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:jd(t),referrerPolicy:Wd(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=hI(t),t.serializer=x_(gI(t),t),t.selection=DE(t.dom,t.getWin(),t.serializer,t),t.annotator=Hp(t),t.formatter=pD(t),t.undoManager=wD(t),t._nodeChangeDispatcher=new wH(t),t._selectionOverrides=uI(t),Tz(t),SH(t),PO(t)||OH(t);var u=yH(t);wz(t,u),Mz(t),_D(t);var a=VO(t);CI(t),a.fold((function(){xI(t).then((function(){return kI(t)}))}),(function(e){t.setProgressState(!0),xI(t).then((function(){e().then((function(e){t.setProgressState(!1),kI(t)}),(function(e){t.notificationManager.open({type:"error",text:String(e)}),kI(t)}))}))}))},OI=Vs.DOM,EI=function(t,e){if(document.domain!==window.location.hostname&&tn.browser.isIE()){var n=ZA("mce");t[n]=function(){TI(t)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return OI.setAttrib(e,"src",r),!0}return!1},_I=function(t,e,n,r){var o=wn.fromTag("iframe");return bo(o,r),bo(o,{id:t+"_ifr",frameBorder:"0",allowTransparency:"true",title:e}),Cl(o,"tox-edit-area__iframe"),o},AI=function(t){var e=yd(t)+"<html><head>";wd(t)!==t.documentBaseUrl&&(e+='<base href="'+t.documentBaseURI.getURI()+'" />'),e+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var n=xd(t),r=Cd(t),o=t.translate(Am(t));return Sd(t)&&(e+='<meta http-equiv="Content-Security-Policy" content="'+Sd(t)+'" />'),e+='</head><body id="'+n+'" class="mce-content-body '+r+'" data-id="'+t.id+'" aria-label="'+o+'"><br></body></html>',e},DI=function(t,e){var n=t.translate("Rich Text Area"),r=_I(t.id,n,e.height,bd(t)).dom;r.onload=function(){r.onload=null,t.fire("load")};var o=EI(t,r);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=r,t.iframeHTML=AI(t),OI.add(e.iframeContainer,r),o},MI=function(t,e){var n=DI(t,e);e.editorContainer&&(OI.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=OI.isHidden(e.editorContainer)),t.getElement().style.display="none",OI.setAttrib(t.id,"aria-hidden","true"),n||TI(t)},RI=Vs.DOM,NI=function(t,e,n){var r=MA.get(n),o=MA.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=gn.trim(n),r&&-1===gn.inArray(e,n)){if(gn.each(MA.dependencies(n),(function(n){NI(t,e,n)})),t.plugins[n])return;try{var i=new r(t,o,t.$);t.plugins[n]=i,i.init&&(i.init(t,o),e.push(n))}catch(bV){jA(t,n,bV)}}},zI=function(t){return t.replace(/^\-/,"")},BI=function(t){var e=[];gn.each(Sm(t).split(/[ ,]/),(function(n){NI(t,e,zI(n))}))},LI=function(t){var e=gn.trim(Hd(t)),n=t.ui.registry.getAll().icons,r=Wt(Wt({},pA.get("default").icons),pA.get(e).icons);Ct(r,(function(e,r){Rt(n,r)||t.ui.registry.addIcon(r,e)}))},HI=function(t){var e=om(t);if(v(e)){t.settings.theme=zI(e);var n=RA.get(e);t.theme=new n(t,RA.urls[e]),t.theme.init&&t.theme.init(t,RA.urls[e]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}},II=function(t){return t.theme.renderUI()},PI=function(t){var e=t.getElement(),n=om(t),r=n(t,e);return r.editorContainer.nodeType&&(r.editorContainer.id=r.editorContainer.id||t.id+"_parent"),r.iframeContainer&&r.iframeContainer.nodeType&&(r.iframeContainer.id=r.iframeContainer.id||t.id+"_iframecontainer"),r.height=r.iframeHeight?r.iframeHeight:e.offsetHeight,r},FI=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},VI=function(t){var e=RI.create("div");return RI.insertAfter(e,t),FI(e)},UI=function(t){var e=t.getElement();return t.inline?FI(null):VI(e)},jI=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,v(om(t))?II(t):T(om(t))?PI(t):UI(t)},WI=function(t,e){var n={show:W.from(e.show).getOr(E),hide:W.from(e.hide).getOr(E),disable:W.from(e.disable).getOr(E),isDisabled:W.from(e.isDisabled).getOr(I),enable:function(){t.mode.isReadOnly()||W.from(e.enable).map(H)}};t.ui=Wt(Wt({},t.ui),n)},qI=function(t){t.fire("ScriptsLoaded"),LI(t),HI(t),BI(t);var e=jI(t);WI(t,W.from(e.api).getOr({}));var n={editorContainer:e.editorContainer,iframeContainer:e.iframeContainer};return t.editorContainer=n.editorContainer?n.editorContainer:null,XA(t),t.inline?TI(t):MI(t,n)},$I=Vs.DOM,GI=function(t){return"-"===t.charAt(0)},KI=function(t,e){var n=qd(e),r=$d(e);if(!1===sl.hasCode(n)&&"en"!==n){var o=""!==r?r:e.editorManager.baseURL+"/langs/"+n+".js";t.add(o,E,void 0,(function(){UA(e,o,n)}))}},XI=function(t,e,n,r){var o=om(e);if(v(o)){if(!GI(o)&&!Rt(RA.urls,o)){var i=fm(e);i?RA.load(o,e.documentBaseURI.toAbsolute(i)):RA.load(o,"themes/"+o+"/theme"+n+".js")}t.loadQueue((function(){RA.waitFor(o,r)}))}else r()},YI=function(t){return W.from(Id(t)).filter((function(t){return t.length>0})).map((function(t){return{url:t,name:W.none()}}))},JI=function(t,e,n){return W.from(e).filter((function(t){return t.length>0&&!pA.has(t)})).map((function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons"+n+".js",name:W.some(e)}}))},QI=function(t,e,n){var r=JI(e,"default",n),o=YI(e).orThunk((function(){return JI(e,Hd(e),"")}));Z(lo([r,o]),(function(n){t.add(n.url,E,void 0,(function(){VA(e,n.url,n.name.getOrUndefined())}))}))},ZI=function(t,e){gn.each(km(t),(function(e,n){MA.load(n,e,E,void 0,(function(){FA(t,e,n)})),t.settings.plugins+=" "+n})),gn.each(Sm(t).split(/[ ,]/),(function(n){if(n=gn.trim(n),n&&!MA.urls[n])if(GI(n)){n=n.substr(1,n.length);var r=MA.dependencies(n);gn.each(r,(function(n){var r={prefix:"plugins/",resource:n,suffix:"/plugin"+e+".js"},o=MA.createUrl(r,n);MA.load(o.resource,o,E,void 0,(function(){FA(t,o.prefix+o.resource+o.suffix,o.resource)}))}))}else{var o={prefix:"plugins/",resource:n,suffix:"/plugin"+e+".js"};MA.load(n,o,E,void 0,(function(){FA(t,o.prefix+o.resource+o.suffix,n)}))}}))},tP=function(t,e){var n=Xs.ScriptLoader;XI(n,t,e,(function(){KI(n,t),QI(n,t,e),ZI(t,e),n.loadQueue((function(){t.removed||qI(t)}),t,(function(){t.removed||qI(t)}))}))},eP=function(t,e){return Pi.forElement(t,{contentCssCors:Cm(e),referrerPolicy:Wd(e)})},nP=function(t){var e=t.id;sl.setCode(qd(t));var n=function(){$I.unbind(window,"ready",n),t.render()};if(rc.Event.domLoaded){if(t.getElement()&&tn.contentEditable){var r=wn.fromDom(t.getElement()),o=So(r);t.on("remove",(function(){tt(r.dom.attributes,(function(t){return Co(r,t.name)})),bo(r,o)})),t.ui.styleSheetLoader=eP(r,t),dm(t)?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var i=t.getElement().form||$I.getParent(e,"form");i&&(t.formElement=i,mm(t)&&!Qr(t.getElement())&&($I.insertAfter($I.create("input",{type:"hidden",name:e}),e),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},$I.bind(i,"submit reset",t.formEventDelegate),t.on("reset",(function(){t.resetContent()})),!gm(t)||i.submit.nodeType||i.submit.length||i._mceOldSubmit||(i._mceOldSubmit=i.submit,i.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),i._mceOldSubmit(i)})),t.windowManager=zA(t),t.notificationManager=DA(t),hm(t)&&t.on("GetContent",(function(t){t.save&&(t.content=$I.encode(t.content))})),pm(t)&&t.on("submit",(function(){t.initialized&&t.save()})),vm(t)&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),tP(t,t.suffix)}}else $I.bind(window,"ready",n)},rP=function(t,e){return gE(t,e)},oP={"font-size":"size","font-family":"face"},iP=function(t,e,n){var r=function(e){return _o(e,t).orThunk((function(){return"font"===Hn(e)?Mt(oP,t).bind((function(t){return wo(e,t)})):W.none()}))},o=function(t){return Nn(wn.fromDom(e),t)};return LS(wn.fromDom(n),(function(t){return r(t)}),o)},uP=function(t){return t.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")},aP=function(t,e){return W.from(Vs.DOM.getStyle(e,t,!0))},cP=function(t){return function(e,n){return W.from(n).map(wn.fromDom).filter(Vn).bind((function(n){return iP(t,e,n.dom).or(aP(t,n.dom))})).getOr("")}},sP=cP("font-size"),lP=_(uP,cP("font-family")),fP=function(t){return Jg(t.getBody()).map((function(t){var e=t.container();return Zr(e)?e.parentNode:e}))},dP=function(t){return W.from(t.selection.getRng()).bind((function(e){var n=t.getBody(),r=e.startContainer===n&&0===e.startOffset;return r?W.none():W.from(t.selection.getStart(!0))}))},mP=function(t,e){return dP(t).orThunk(N(fP,t)).map(wn.fromDom).filter(Vn).bind(e)},gP=function(t,e){return mP(t,A(W.some,e))},hP=function(t,e){if(/^[0-9.]+$/.test(e)){var n=parseInt(e,10);if(n>=1&&n<=7){var r=Md(t),o=Rd(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},pP=function(t){var e=t.split(/\s*,\s*/);return Q(e,(function(t){return-1===t.indexOf(" ")||se(t,'"')||se(t,"'")?t:"'"+t+"'"})).join(",")},vP=function(t,e){var n=hP(t,e);t.formatter.toggle("fontname",{value:pP(n)}),t.nodeChanged()},bP=function(t){return gP(t,(function(e){return lP(t.getBody(),e.dom)})).getOr("")},yP=function(t,e){t.formatter.toggle("fontsize",{value:hP(t,e)}),t.nodeChanged()},wP=function(t){return gP(t,(function(e){return sP(t.getBody(),e.dom)})).getOr("")},xP=function(t){return gP(t,(function(e){var n=wn.fromDom(t.getBody()),r=LS(e,(function(t){return _o(t,"line-height")}),N(Nn,n)),o=function(){var t=parseFloat(Oo(e,"line-height")),n=parseFloat(Oo(e,"font-size"));return String(t/n)};return r.getOrThunk(o)})).getOr("")},CP=function(t,e){t.formatter.toggle("lineheight",{value:String(e)}),t.nodeChanged()},SP=function(t){if("string"!==typeof t){var e=gn.extend({paste:t.paste,data:{paste:t.paste}},t);return{content:t.content,details:e}}return{content:t,details:{}}},kP=function(t,e){var n=SP(e);dE(t,n.content,n.details)},TP=gn.each,OP=gn.map,EP=gn.inArray,_P=function(){function t(t){this.commands={state:{},exec:{},value:{}},this.editor=t,this.setupCommands(t)}return t.prototype.execCommand=function(t,e,n,r){var o,i=!1,u=this;if(!u.editor.removed){if("mcefocus"!==t.toLowerCase()&&(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||r&&r.skip_focus?Fb(u.editor):u.editor.focus()),r=u.editor.fire("BeforeExecCommand",{command:t,ui:e,value:n}),r.isDefaultPrevented())return!1;var a=t.toLowerCase();if(o=u.commands.exec[a])return o(a,e,n),u.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;if(TP(this.editor.plugins,(function(r){if(r.execCommand&&r.execCommand(t,e,n))return u.editor.fire("ExecCommand",{command:t,ui:e,value:n}),i=!0,!1})),i)return i;if(u.editor.theme&&u.editor.theme.execCommand&&u.editor.theme.execCommand(t,e,n))return u.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;try{i=u.editor.getDoc().execCommand(t,e,n)}catch(c){}return!!i&&(u.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0)}},t.prototype.queryCommandState=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.state[t])return e(t);try{return this.editor.getDoc().queryCommandState(t)}catch(n){}return!1}},t.prototype.queryCommandValue=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.value[t])return e(t);try{return this.editor.getDoc().queryCommandValue(t)}catch(n){}}},t.prototype.addCommands=function(t,e){void 0===e&&(e="exec");var n=this;TP(t,(function(t,r){TP(r.toLowerCase().split(","),(function(r){n.commands[e][r]=t}))}))},t.prototype.addCommand=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.exec[t]=function(t,o,i,u){return e.call(n||r.editor,o,i,u)}},t.prototype.queryCommandSupported=function(t){if(t=t.toLowerCase(),this.commands.exec[t])return!0;try{return this.editor.getDoc().queryCommandSupported(t)}catch(e){}return!1},t.prototype.addQueryStateHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.state[t]=function(){return e.call(n||r.editor)}},t.prototype.addQueryValueHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.value[t]=function(){return e.call(n||r.editor)}},t.prototype.hasCustomCommand=function(t){return t=t.toLowerCase(),!!this.commands.exec[t]},t.prototype.execNativeCommand=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(t,e,n)},t.prototype.isFormatMatch=function(t){return this.editor.formatter.match(t)},t.prototype.toggleFormat=function(t,e){this.editor.formatter.toggle(t,e),this.editor.nodeChanged()},t.prototype.storeSelection=function(t){this.selectionBookmark=this.editor.selection.getBookmark(t)},t.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},t.prototype.setupCommands=function(t){var e=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":E,"mceEndUndoLevel,mceAddUndoLevel":function(){t.undoManager.add()},mceFocus:function(e,n,r){py(t,r)},"Cut,Copy,Paste":function(n){var r,o=t.getDoc();try{e.execNativeCommand(n)}catch(u){r=!0}if("paste"!==n||o.queryCommandEnabled(n)||(r=!0),r||!o.queryCommandSupported(n)){var i=t.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");tn.mac&&(i=i.replace(/Ctrl\+/g,"⌘+")),t.notificationManager.open({text:i,type:"error"})}},unlink:function(){if(t.selection.isCollapsed()){var e=t.dom.getParent(t.selection.getStart(),"a");e&&t.dom.remove(e,!0)}else t.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(n){var r=n.substring(7);"full"===r&&(r="justify"),TP("left,center,right,justify".split(","),(function(e){r!==e&&t.formatter.remove("align"+e)})),"none"!==r&&e.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(n){var r;e.execNativeCommand(n);var o=t.dom.getParent(t.selection.getNode(),"ol,ul");o&&(r=o.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(e.storeSelection(),t.dom.split(r,o),e.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){e.toggleFormat(t)},"ForeColor,HiliteColor":function(t,n,r){e.toggleFormat(t,{value:r})},FontName:function(e,n,r){vP(t,r)},FontSize:function(e,n,r){yP(t,r)},LineHeight:function(e,n,r){CP(t,r)},Lang:function(t,n,r){e.toggleFormat(t,{value:r.code,customValue:r.customCode})},RemoveFormat:function(e){t.formatter.remove(e)},mceBlockQuote:function(){e.toggleFormat("blockquote")},FormatBlock:function(t,n,r){return e.toggleFormat(r||"p")},mceCleanup:function(){var e=t.selection.getBookmark();t.setContent(t.getContent()),t.selection.moveToBookmark(e)},mceRemoveNode:function(n,r,o){var i=o||t.selection.getNode();i!==t.getBody()&&(e.storeSelection(),t.dom.remove(i,!0),e.restoreSelection())},mceSelectNodeDepth:function(e,n,r){var o=0;t.dom.getParent(t.selection.getNode(),(function(e){if(1===e.nodeType&&o++===r)return t.selection.select(e),!1}),t.getBody())},mceSelectNode:function(e,n,r){t.selection.select(r)},mceInsertContent:function(e,n,r){kP(t,r)},mceInsertRawHTML:function(e,n,r){t.selection.setContent("tiny_mce_marker");var o=t.getContent();t.setContent(o.replace(/tiny_mce_marker/g,(function(){return r})))},mceInsertNewLine:function(e,n,r){XL(t,r)},mceToggleFormat:function(t,n,r){e.toggleFormat(r)},mceSetContent:function(e,n,r){t.setContent(r)},"Indent,Outdent":function(e){hz(t,e)},mceRepaint:E,InsertHorizontalRule:function(){t.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){t.hasVisual=!t.hasVisual,t.addVisual()},mceReplaceContent:function(e,n,r){t.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,t.selection.getContent({format:"text"})))},mceInsertLink:function(e,n,r){"string"===typeof r&&(r={href:r});var o=t.dom.getParent(t.selection.getNode(),"a");r.href=r.href.replace(/ /g,"%20"),o&&r.href||t.formatter.remove("link"),r.href&&t.formatter.apply("link",r,o)},selectAll:function(){var e=t.dom.getParent(t.selection.getStart(),io);if(e){var n=t.dom.createRng();n.selectNodeContents(e),t.selection.setRng(n)}},mceNewDocument:function(){t.setContent("")},InsertLineBreak:function(e,n,r){return RL(t,r),!0}});var n=function(e){return function(){var n=t.selection,r=n.isCollapsed()?[t.dom.getParent(n.getNode(),t.dom.isBlock)]:n.getSelectedBlocks(),o=OP(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==EP(o,!0)}};e.addCommands({JustifyLeft:n("alignleft"),JustifyCenter:n("aligncenter"),JustifyRight:n("alignright"),JustifyFull:n("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){return e.isFormatMatch(t)},mceBlockQuote:function(){return e.isFormatMatch("blockquote")},Outdent:function(){return fz(t)},"InsertUnorderedList,InsertOrderedList":function(e){var n=t.dom.getParent(t.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===e&&"UL"===n.tagName||"insertorderedlist"===e&&"OL"===n.tagName)}},"state"),e.addCommands({Undo:function(){t.undoManager.undo()},Redo:function(){t.undoManager.redo()}}),e.addQueryValueHandler("FontName",(function(){return bP(t)}),this),e.addQueryValueHandler("FontSize",(function(){return wP(t)}),this),e.addQueryValueHandler("LineHeight",(function(){return xP(t)}),this)},t}(),AP="data-mce-contenteditable",DP=function(t,e,n){Tl(t,e)&&!1===n?kl(t,e):n&&Cl(t,e)},MP=function(t,e,n){try{t.getDoc().execCommand(e,!1,String(n))}catch(r){}},RP=function(t,e){t.dom.contentEditable=e?"true":"false"},NP=function(t){Z(El(t,'*[contenteditable="true"]'),(function(t){vo(t,AP,"true"),RP(t,!1)}))},zP=function(t){Z(El(t,"*["+AP+'="true"]'),(function(t){Co(t,AP),RP(t,!0)}))},BP=function(t){W.from(t.selection.getNode()).each((function(t){t.removeAttribute("data-mce-selected")}))},LP=function(t){t.selection.setRng(t.selection.getRng())},HP=function(t,e){var n=wn.fromDom(t.getBody());DP(n,"mce-content-readonly",e),e?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),BP(t),t.readonly=!0,RP(n,!1),NP(n)):(t.readonly=!1,RP(n,!0),zP(n),MP(t,"StyleWithCSS",!1),MP(t,"enableInlineTableEditing",!1),MP(t,"enableObjectResizing",!1),my(t)&&t.focus(),LP(t),t.nodeChanged())},IP=function(t){return t.readonly},PP=function(t){t.parser.addAttributeFilter("contenteditable",(function(e){IP(t)&&Z(e,(function(t){t.attr(AP,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(AP,(function(e){IP(t)&&Z(e,(function(t){t.attr("contenteditable",t.attr(AP))}))})),t.serializer.addTempAttr(AP)},FP=function(t){t.serializer?PP(t):t.on("PreInit",(function(){PP(t)}))},VP=function(t){return"click"===t.type},UP=function(t,e){var n=function(e){return Nn(e,wn.fromDom(t.getBody()))};return _i(e,"a",n).bind((function(t){return wo(t,"href")}))},jP=function(t,e){if(VP(e)&&!ev.metaKeyPressed(e)){var n=wn.fromDom(e.target);UP(t,n).each((function(n){if(e.preventDefault(),/^#/.test(n)){var r=t.dom.select(n+',[name="'+ae(n,"#")+'"]');r.length&&t.selection.scrollIntoView(r[0],!0)}else window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")}))}},WP=function(t){t.on("ShowCaret",(function(e){IP(t)&&e.preventDefault()})),t.on("ObjectSelected",(function(e){IP(t)&&e.preventDefault()}))},qP=gn.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),$P=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||I}return t.isNative=function(t){return!!qP[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=Xa(n,e||{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(r);var o=this.bindings[n];if(o)for(var i=0,u=o.length;i<u;i++){var a=o[i];if(!a.removed){if(a.once&&this.off(n,a.func),r.isImmediatePropagationStopped())return r;if(!1===a.func.call(this.scope,r))return r.preventDefault(),r}}return r},t.prototype.on=function(t,e,n,r){if(!1===e&&(e=I),e){var o={func:e,removed:!1};r&&gn.extend(o,r);var i=t.toLowerCase().split(" "),u=i.length;while(u--){var a=i[u],c=this.bindings[a];c||(c=[],this.toggleEvent(a,!0)),c=n?$t([o],c,!0):$t($t([],c,!0),[o],!1),this.bindings[a]=c}}return this},t.prototype.off=function(t,e){var n=this;if(t){var r=t.toLowerCase().split(" "),o=r.length;while(o--){var i=r[o],u=this.bindings[i];if(!i)return Ct(this.bindings,(function(t,e){n.toggleEvent(e,!1),delete n.bindings[e]})),this;if(u){if(e){var a=et(u,(function(t){return t.func===e}));u=a.fail,this.bindings[i]=u,Z(a.pass,(function(t){t.removed=!0}))}else u.length=0;u.length||(this.toggleEvent(t,!1),delete this.bindings[i])}}}else Ct(this.bindings,(function(t,e){n.toggleEvent(e,!1)})),this.bindings={};return this},t.prototype.once=function(t,e,n){return this.on(t,e,n,{once:!0})},t.prototype.has=function(t){return t=t.toLowerCase(),!(!this.bindings[t]||0===this.bindings[t].length)},t}(),GP=function(t){return t._eventDispatcher||(t._eventDispatcher=new $P({scope:t,toggleEvent:function(e,n){$P.isNative(e)&&t.toggleNativeEvent&&t.toggleNativeEvent(e,n)}})),t._eventDispatcher},KP={fire:function(t,e,n){var r=this;if(r.removed&&"remove"!==t&&"detach"!==t)return e;var o=GP(r).fire(t,e);if(!1!==n&&r.parent){var i=r.parent();while(i&&!o.isPropagationStopped())i.fire(t,o,!1),i=i.parent()}return o},on:function(t,e,n){return GP(this).on(t,e,n)},off:function(t,e){return GP(this).off(t,e)},once:function(t,e){return GP(this).once(t,e)},hasEventListeners:function(t){return GP(this).has(t)}},XP=Vs.DOM,YP=function(t,e){if("selectionchange"===e)return t.getDoc();if(!t.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(e))return t.getDoc().documentElement;var n=nm(t);return n?(t.eventRoot||(t.eventRoot=XP.select(n)[0]),t.eventRoot):t.getBody()},JP=function(t){return!t.hidden&&!IP(t)},QP=function(t,e,n){JP(t)?t.fire(e,n):IP(t)&&jP(t,n)},ZP=function(t,e){var n;if(t.delegates||(t.delegates={}),!t.delegates[e]&&!t.removed){var r=YP(t,e);if(nm(t)){if(eN||(eN={},t.editorManager.on("removeEditor",(function(){t.editorManager.activeEditor||eN&&(Ct(eN,(function(e,n){t.dom.unbind(YP(t,n))})),eN=null)}))),eN[e])return;n=function(n){var r=n.target,o=t.editorManager.get(),i=o.length;while(i--){var u=o[i].getBody();(u===r||XP.isChildOf(r,u))&&QP(o[i],e,n)}},eN[e]=n,XP.bind(r,e,n)}else n=function(n){QP(t,e,n)},XP.bind(r,e,n),t.delegates[e]=n}},tF=Wt(Wt({},KP),{bindPendingEventDelegates:function(){var t=this;gn.each(t._pendingNativeEvents,(function(e){ZP(t,e)}))},toggleNativeEvent:function(t,e){var n=this;"focus"!==t&&"blur"!==t&&(n.removed||(e?n.initialized?ZP(n,t):n._pendingNativeEvents?n._pendingNativeEvents.push(t):n._pendingNativeEvents=[t]:n.initialized&&(n.dom.unbind(YP(n,t),t,n.delegates[t]),delete n.delegates[t])))},unbindAllNativeEvents:function(){var t=this,e=t.getBody(),n=t.dom;t.delegates&&(Ct(t.delegates,(function(e,n){t.dom.unbind(YP(t,n),n,e)})),delete t.delegates),!t.inline&&e&&n&&(e.onload=null,n.unbind(t.getWin()),n.unbind(t.getDoc())),n&&(n.unbind(e),n.unbind(t.getContainer()))}}),eF=["design","readonly"],nF=function(t,e,n,r){var o=n[e.get()],i=n[r];try{i.activate()}catch(bV){return void console.error("problem while activating editor mode "+r+":",bV)}o.deactivate(),o.editorReadOnly!==i.editorReadOnly&&HP(t,i.editorReadOnly),e.set(r),qp(t,r)},rF=function(t,e,n,r){if(r!==n.get()){if(!Rt(e,r))throw new Error("Editor mode '"+r+"' is invalid");t.initialized?nF(t,n,e,r):t.on("init",(function(){return nF(t,n,e,r)}))}},oF=function(t,e,n){var r;if(Y(eF,e))throw new Error("Cannot override default mode "+e);return Wt(Wt({},t),(r={},r[e]=Wt(Wt({},n),{deactivate:function(){try{n.deactivate()}catch(bV){console.error("problem while deactivating editor mode "+e+":",bV)}}}),r))},iF=function(t){var e=Ys("design"),n=Ys({design:{activate:E,deactivate:E,editorReadOnly:!1},readonly:{activate:E,deactivate:E,editorReadOnly:!0}});return FP(t),WP(t),{isReadOnly:function(){return IP(t)},set:function(r){return rF(t,n.get(),e,r)},get:function(){return e.get()},register:function(t,e){n.set(oF(n.get(),t,e))}}},uF=gn.each,aF=gn.explode,cF={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},sF=gn.makeMap("alt,ctrl,shift,meta,access"),lF=function(t){var e,n={};uF(aF(t.toLowerCase(),"+"),(function(t){t in sF?n[t]=!0:/^[0-9]{2,}$/.test(t)?n.keyCode=parseInt(t,10):(n.charCode=t.charCodeAt(0),n.keyCode=cF[t]||t.toUpperCase().charCodeAt(0))}));var r=[n.keyCode];for(e in sF)n[e]?r.push(e):n[e]=!1;return n.id=r.join(","),n.access&&(n.alt=!0,tn.mac?n.ctrl=!0:n.shift=!0),n.meta&&(tn.mac?n.meta=!0:(n.ctrl=!0,n.meta=!1)),n},fF=function(){function t(t){this.shortcuts={},this.pendingPatterns=[],this.editor=t;var e=this;t.on("keyup keypress keydown",(function(t){!e.hasModifier(t)&&!e.isFunctionKey(t)||t.isDefaultPrevented()||(uF(e.shortcuts,(function(n){if(e.matchShortcut(t,n))return e.pendingPatterns=n.subpatterns.slice(0),"keydown"===t.type&&e.executeShortcutAction(n),!0})),e.matchShortcut(t,e.pendingPatterns[0])&&(1===e.pendingPatterns.length&&"keydown"===t.type&&e.executeShortcutAction(e.pendingPatterns[0]),e.pendingPatterns.shift()))}))}return t.prototype.add=function(t,e,n,r){var o=this,i=o.normalizeCommandFunc(n);return uF(aF(gn.trim(t)),(function(t){var n=o.createShortcut(t,e,i,r);o.shortcuts[n.id]=n})),!0},t.prototype.remove=function(t){var e=this.createShortcut(t);return!!this.shortcuts[e.id]&&(delete this.shortcuts[e.id],!0)},t.prototype.normalizeCommandFunc=function(t){var e=this,n=t;return"string"===typeof n?function(){e.editor.execCommand(n,!1,null)}:gn.isArray(n)?function(){e.editor.execCommand(n[0],n[1],n[2])}:n},t.prototype.createShortcut=function(t,e,n,r){var o=gn.map(aF(t,">"),lF);return o[o.length-1]=gn.extend(o[o.length-1],{func:n,scope:r||this.editor}),gn.extend(o[0],{desc:this.editor.translate(e),subpatterns:o.slice(1)})},t.prototype.hasModifier=function(t){return t.altKey||t.ctrlKey||t.metaKey},t.prototype.isFunctionKey=function(t){return"keydown"===t.type&&t.keyCode>=112&&t.keyCode<=123},t.prototype.matchShortcut=function(t,e){return!!e&&(e.ctrl===t.ctrlKey&&e.meta===t.metaKey&&(e.alt===t.altKey&&e.shift===t.shiftKey&&(!!(t.keyCode===e.keyCode||t.charCode&&t.charCode===e.charCode)&&(t.preventDefault(),!0))))},t.prototype.executeShortcutAction=function(t){return t.func?t.func.call(t.scope):null},t}(),dF=function(){var t={},e={},n={},r={},o={},i={},u={},a=function(t,e){return function(n,r){return t[n.toLowerCase()]=Wt(Wt({},r),{type:e})}},c=function(t,e){return r[t.toLowerCase()]=e};return{addButton:a(t,"button"),addGroupToolbarButton:a(t,"grouptoolbarbutton"),addToggleButton:a(t,"togglebutton"),addMenuButton:a(t,"menubutton"),addSplitButton:a(t,"splitbutton"),addMenuItem:a(e,"menuitem"),addNestedMenuItem:a(e,"nestedmenuitem"),addToggleMenuItem:a(e,"togglemenuitem"),addAutocompleter:a(n,"autocompleter"),addContextMenu:a(o,"contextmenu"),addContextToolbar:a(i,"contexttoolbar"),addContextForm:a(i,"contextform"),addSidebar:a(u,"sidebar"),addIcon:c,getAll:function(){return{buttons:t,menuItems:e,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:u}}}},mF=function(){var t=dF();return{addAutocompleter:t.addAutocompleter,addButton:t.addButton,addContextForm:t.addContextForm,addContextMenu:t.addContextMenu,addContextToolbar:t.addContextToolbar,addIcon:t.addIcon,addMenuButton:t.addMenuButton,addMenuItem:t.addMenuItem,addNestedMenuItem:t.addNestedMenuItem,addSidebar:t.addSidebar,addSplitButton:t.addSplitButton,addToggleButton:t.addToggleButton,addGroupToolbarButton:t.addGroupToolbarButton,addToggleMenuItem:t.addToggleMenuItem,getAll:t.getAll}},gF=Vs.DOM,hF=gn.extend,pF=gn.each,vF=gn.resolve,bF=tn.ie,yF=function(){function t(t,e,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,hF(this,tF),this.settings=lA(this,t,this.documentBaseUrl,n.defaultSettings,e),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&(Xs.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),Vs.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),ll.languageLoad=this.settings.language_load,ll.baseURL=n.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new Fy(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new fF(this),this.editorCommands=new _P(this),this.settings.cache_suffix&&(tn.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:mF(),styleSheetLoader:void 0,show:E,hide:E,enable:E,disable:E,isDisabled:I};var o=this,i=iF(o);this.mode=i,this.setMode=i.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=Ns.overrideDefaults((function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}}))}return t.prototype.render=function(){nP(this)},t.prototype.focus=function(t){this.execCommand("mceFocus",!1,t)},t.prototype.hasFocus=function(){return dy(this)},t.prototype.execCallback=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r,o=this,i=o.settings[t];if(i)return o.callbackLookup&&(r=o.callbackLookup[t])&&(i=r.func,r=r.scope),"string"===typeof i&&(r=i.replace(/\.\w+$/,""),r=r?vF(r):0,i=vF(i),o.callbackLookup=o.callbackLookup||{},o.callbackLookup[t]={func:i,scope:r}),i.apply(r||o,e)},t.prototype.translate=function(t){return sl.translate(t)},t.prototype.getParam=function(t,e,n){return gA(this,t,e,n)},t.prototype.hasPlugin=function(t,e){var n=Y(Sm(this).split(/[ ,]/),t);return!!n&&(!e||void 0!==MA.get(t))},t.prototype.nodeChanged=function(t){this._nodeChangeDispatcher.nodeChanged(t)},t.prototype.addCommand=function(t,e,n){this.editorCommands.addCommand(t,e,n)},t.prototype.addQueryStateHandler=function(t,e,n){this.editorCommands.addQueryStateHandler(t,e,n)},t.prototype.addQueryValueHandler=function(t,e,n){this.editorCommands.addQueryValueHandler(t,e,n)},t.prototype.addShortcut=function(t,e,n,r){this.shortcuts.add(t,e,n,r)},t.prototype.execCommand=function(t,e,n,r){return this.editorCommands.execCommand(t,e,n,r)},t.prototype.queryCommandState=function(t){return this.editorCommands.queryCommandState(t)},t.prototype.queryCommandValue=function(t){return this.editorCommands.queryCommandValue(t)},t.prototype.queryCommandSupported=function(t){return this.editorCommands.queryCommandSupported(t)},t.prototype.show=function(){var t=this;t.hidden&&(t.hidden=!1,t.inline?t.getBody().contentEditable="true":(gF.show(t.getContainer()),gF.hide(t.id)),t.load(),t.fire("show"))},t.prototype.hide=function(){var t=this,e=t.getDoc();t.hidden||(bF&&e&&!t.inline&&e.execCommand("SelectAll"),t.save(),t.inline?(t.getBody().contentEditable="false",t===t.editorManager.focusedEditor&&(t.editorManager.focusedEditor=null)):(gF.hide(t.getContainer()),gF.setStyle(t.id,"display",t.orgDisplay)),t.hidden=!0,t.fire("hide"))},t.prototype.isHidden=function(){return!!this.hidden},t.prototype.setProgressState=function(t,e){this.fire("ProgressState",{state:t,time:e})},t.prototype.load=function(t){var e,n=this,r=n.getElement();if(n.removed)return"";if(r){t=t||{},t.load=!0;var o=Qr(r)?r.value:r.innerHTML;return e=n.setContent(o,t),t.element=r,t.no_events||n.fire("LoadContent",t),t.element=r=null,e}},t.prototype.save=function(t){var e,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return t=t||{},t.save=!0,t.element=o,e=t.content=r.getContent(t),t.no_events||r.fire("SaveContent",t),"raw"===t.format&&r.fire("RawSaveContent",t),e=t.content,Qr(o)?o.value=e:(!t.is_removing&&r.inline||(o.innerHTML=e),(n=gF.getParent(r.id,"form"))&&pF(n.elements,(function(t){if(t.name===r.id)return t.value=e,!1}))),t.element=o=null,!1!==t.set_dirty&&r.setDirty(!1),e},t.prototype.setContent=function(t,e){return k_(this,t,e)},t.prototype.getContent=function(t){return S_(this,t)},t.prototype.insertContent=function(t,e){e&&(t=hF({content:t},e)),this.execCommand("mceInsertContent",!1,t)},t.prototype.resetContent=function(t){void 0===t?k_(this,this.startContent,{format:"raw"}):k_(this,t),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},t.prototype.isDirty=function(){return!this.isNotDirty},t.prototype.setDirty=function(t){var e=!this.isNotDirty;this.isNotDirty=!t,t&&t!==e&&this.fire("dirty")},t.prototype.getContainer=function(){var t=this;return t.container||(t.container=gF.get(t.editorContainer||t.id+"_parent")),t.container},t.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},t.prototype.getElement=function(){return this.targetElm||(this.targetElm=gF.get(this.id)),this.targetElm},t.prototype.getWin=function(){var t,e=this;return e.contentWindow||(t=e.iframeElement,t&&(e.contentWindow=t.contentWindow)),e.contentWindow},t.prototype.getDoc=function(){var t,e=this;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},t.prototype.getBody=function(){var t=this.getDoc();return this.bodyElement||(t?t.body:null)},t.prototype.convertURL=function(t,e,n){var r=this,o=r.settings;return o.urlconverter_callback?r.execCallback("urlconverter_callback",t,n,!0,e):!o.convert_urls||n&&"LINK"===n.nodeName||0===t.indexOf("file:")||0===t.length?t:o.relative_urls?r.documentBaseURI.toRelative(t):(t=r.documentBaseURI.toAbsolute(t,o.remove_script_host),t)},t.prototype.addVisual=function(t){rP(this,t)},t.prototype.remove=function(){D_(this)},t.prototype.destroy=function(t){M_(this,t)},t.prototype.uploadImages=function(t){return this.editorUpload.uploadImages(t)},t.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},t.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},t.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},t.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},t.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},t}(),wF=Vs.DOM,xF=gn.explode,CF=gn.each,SF=gn.extend,kF=0,TF=!1,OF=[],EF=[],_F=function(t){return"length"!==t},AF=function(t){var e=t.type;CF(zF.get(),(function(n){switch(e){case"scroll":n.fire("ScrollWindow",t);break;case"resize":n.fire("ResizeWindow",t);break}}))},DF=function(t){t!==TF&&(t?Ns(window).on("resize scroll",AF):Ns(window).off("resize scroll",AF),TF=t)},MF=function(t){var e=EF;delete OF[t.id];for(var n=0;n<OF.length;n++)if(OF[n]===t){OF.splice(n,1);break}return EF=nt(EF,(function(e){return t!==e})),zF.activeEditor===t&&(zF.activeEditor=EF.length>0?EF[0]:null),zF.focusedEditor===t&&(zF.focusedEditor=null),e.length!==EF.length},RF=function(t){return t&&t.initialized&&!(t.getContainer()||t.getBody()).parentNode&&(MF(t),t.unbindAllNativeEvents(),t.destroy(!0),t.removed=!0,t=null),t},NF="CSS1Compat"!==document.compatMode,zF=Wt(Wt({},KP),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:Ns,majorVersion:"5",minorVersion:"10.7",releaseDate:"2022-12-06",editors:OF,i18n:sl,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,n=this,r="";e=Fy.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/"));var o=window.tinymce||window.tinyMCEPreInit;if(o)t=o.base||o.baseURL,r=o.suffix;else{for(var i=document.getElementsByTagName("script"),u=0;u<i.length;u++){var a=i[u].src||"";if(""!==a){var c=a.substring(a.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)){-1!==c.indexOf(".min")&&(r=".min"),t=a.substring(0,a.lastIndexOf("/"));break}}}if(!t&&document.currentScript){a=document.currentScript.src;-1!==a.indexOf(".min")&&(r=".min"),t=a.substring(0,a.lastIndexOf("/"))}}n.baseURL=new Fy(e).toAbsolute(t),n.documentBaseURL=e,n.baseURI=new Fy(n.baseURL),n.suffix=r,ny(n)},overrideDefaults:function(t){var e=t.base_url;e&&this._setBaseUrl(e);var n=t.suffix;t.suffix&&(this.suffix=n),this.defaultSettings=t;var r=t.plugin_base_urls;void 0!==r&&Ct(r,(function(t,e){ll.PluginManager.urls[e]=t}))},init:function(t){var e,n=this,r=gn.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," "),o=function(t,e){return t.inline&&e.tagName.toLowerCase()in r},i=function(t){var e=t.id;return e||(e=Mt(t,"name").filter((function(t){return!wF.get(t)})).getOrThunk(wF.uniqueId),t.setAttribute("id",e)),e},u=function(e){var r=t[e];if(r)return r.apply(n,[])},a=function(t,e){return e.constructor===RegExp?e.test(t.className):wF.hasClass(t,e)},c=function(t){var e=[];if(tn.browser.isIE()&&tn.browser.version.major<11)return WA("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(NF)return WA("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(t.types)return CF(t.types,(function(t){e=e.concat(wF.select(t.selector))})),e;if(t.selector)return wF.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":var n=t.elements||"";n.length>0&&CF(xF(n),(function(t){var n=wF.get(t);n?e.push(n):CF(document.forms,(function(n){CF(n.elements,(function(n){n.name===t&&(t="mce_editor_"+kF++,wF.setAttrib(n,"id",t),e.push(n))}))}))}));break;case"textareas":case"specific_textareas":CF(wF.select("textarea"),(function(n){t.editor_deselector&&a(n,t.editor_deselector)||t.editor_selector&&!a(n,t.editor_selector)||e.push(n)}));break}return e},s=function(t){e=t},l=function(){var e,r=0,a=[],f=function(t,o,i){var u=new yF(t,o,n);a.push(u),u.on("init",(function(){++r===e.length&&s(a)})),u.targetElm=u.targetElm||i,u.render()};wF.unbind(window,"ready",l),u("onpageload"),e=Ns.unique(c(t)),t.types?CF(t.types,(function(n){gn.each(e,(function(e){return!wF.is(e,n.selector)||(f(i(e),SF({},t,n),e),!1)}))})):(gn.each(e,(function(t){RF(n.get(t.id))})),e=gn.grep(e,(function(t){return!n.get(t.id)})),0===e.length?s([]):CF(e,(function(e){o(t,e)?WA("Could not initialize inline editor on invalid inline target element",e):f(i(e),t,e)})))};return n.settings=t,wF.bind(window,"ready",l),new Ai((function(t){e?t(e):s=function(e){t(e)}}))},get:function(t){return 0===arguments.length?EF.slice(0):v(t)?ut(EF,(function(e){return e.id===t})).getOr(null):O(t)&&EF[t]?EF[t]:null},add:function(t){var e=this,n=OF[t.id];return n===t||(null===e.get(t.id)&&(_F(t.id)&&(OF[t.id]=t),OF.push(t),EF.push(t)),DF(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),nN||(nN=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",nN))),t},createEditor:function(t,e){return this.add(new yF(t,e,this))},remove:function(t){var e,n,r=this;if(t){if(!v(t))return n=t,w(r.get(n.id))?null:(MF(n)&&r.fire("RemoveEditor",{editor:n}),0===EF.length&&window.removeEventListener("beforeunload",nN),n.remove(),DF(EF.length>0),n);CF(wF.select(t),(function(t){n=r.get(t.id),n&&r.remove(n)}))}else for(e=EF.length-1;e>=0;e--)r.remove(EF[e])},execCommand:function(t,e,n){var r=this,o=r.get(n);switch(t){case"mceAddEditor":return r.get(n)||new yF(n,r.settings,r).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(r.execCommand("mceAddEditor",!1,n),!0)}return!!r.activeEditor&&r.activeEditor.execCommand(t,e,n)},triggerSave:function(){CF(EF,(function(t){t.save()}))},addI18n:function(t,e){sl.add(t,e)},translate:function(t){return sl.translate(t)},setActive:function(t){var e=this.activeEditor;this.activeEditor!==t&&(e&&e.fire("deactivate",{relatedTarget:t}),t.fire("activate",{relatedTarget:e})),this.activeEditor=t},_setBaseUrl:function(t){this.baseURL=new Fy(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new Fy(this.baseURL)}});zF.setup();var BF,LF,HF=Math.min,IF=Math.max,PF=Math.round,FF=function(t,e,n){var r=e.x,o=e.y,i=t.w,u=t.h,a=e.w,c=e.h,s=(n||"").split("");return"b"===s[0]&&(o+=c),"r"===s[1]&&(r+=a),"c"===s[0]&&(o+=PF(c/2)),"c"===s[1]&&(r+=PF(a/2)),"b"===s[3]&&(o-=u),"r"===s[4]&&(r-=i),"c"===s[3]&&(o-=PF(u/2)),"c"===s[4]&&(r-=PF(i/2)),qF(r,o,i,u)},VF=function(t,e,n,r){var o,i;for(i=0;i<r.length;i++)if(o=FF(t,e,r[i]),o.x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},UF=function(t,e,n){return qF(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},jF=function(t,e){var n=IF(t.x,e.x),r=IF(t.y,e.y),o=HF(t.x+t.w,e.x+e.w),i=HF(t.y+t.h,e.y+e.h);return o-n<0||i-r<0?null:qF(n,r,o-n,i-r)},WF=function(t,e,n){var r=t.x,o=t.y,i=t.x+t.w,u=t.y+t.h,a=e.x+e.w,c=e.y+e.h,s=IF(0,e.x-r),l=IF(0,e.y-o),f=IF(0,i-a),d=IF(0,u-c);return r+=s,o+=l,n&&(i+=s,u+=l,r-=f,o-=d),i-=f,u-=d,qF(r,o,i-r,u-o)},qF=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},$F=function(t){return qF(t.left,t.top,t.width,t.height)},GF={inflate:UF,relativePosition:FF,findBestRelativePosition:VF,intersect:jF,clamp:WF,create:qF,fromClientRect:$F},KF=function(t,e,n){void 0===n&&(n=1e3);var r=!1,o=null,i=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(r=!0,null!==o&&(clearTimeout(o),o=null),t.apply(null,e))}},u=i(t),a=i(e),c=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];r||null!==o||(o=setTimeout((function(){return a.apply(null,t)}),n))};return{start:c,resolve:u,reject:a}},XF=function(){var t={},e={},n=function(n,r){var o='Script at URL "'+r+'" failed to load',i='Script at URL "'+r+"\" did not call `tinymce.Resource.add('"+n+"', data)` within 1 second";if(void 0!==t[n])return t[n];var u=new Ai((function(t,u){var a=KF(t,u);e[n]=a.resolve,Xs.ScriptLoader.loadScript(r,(function(){return a.start(i)}),(function(){return a.reject(o)}))}));return t[n]=u,u},r=function(n,r){void 0!==e[n]&&(e[n](r),delete e[n]),t[n]=Ai.resolve(r)};return{load:n,add:r}},YF=XF(),JF=gn.each,QF=gn.extend,ZF=function(){};ZF.extend=BF=function(t){var e=this,n=e.prototype,r=function(){var t,e,n,r=this;if(!LF&&(r.init&&r.init.apply(r,arguments),e=r.Mixins,e)){t=e.length;while(t--)n=e[t],n.init&&n.init.apply(r,arguments)}},o=function(){return this},i=function(t,e){return function(){var r=this,o=r._super;r._super=n[t];var i=e.apply(r,arguments);return r._super=o,i}};LF=!0;var u=new e;return LF=!1,t.Mixins&&(JF(t.Mixins,(function(e){for(var n in e)"init"!==n&&(t[n]=e[n])})),n.Mixins&&(t.Mixins=n.Mixins.concat(t.Mixins))),t.Methods&&JF(t.Methods.split(","),(function(e){t[e]=o})),t.Properties&&JF(t.Properties.split(","),(function(e){var n="_"+e;t[e]=function(t){var e=this;return void 0!==t?(e[n]=t,e):e[n]}})),t.Statics&&JF(t.Statics,(function(t,e){r[e]=t})),t.Defaults&&n.Defaults&&(t.Defaults=QF({},n.Defaults,t.Defaults)),Ct(t,(function(t,e){"function"===typeof t&&n[e]?u[e]=i(e,t):u[e]=t})),r.prototype=u,r.constructor=r,r.extend=BF,r};var tV,eV=Math.min,nV=Math.max,rV=Math.round,oV=function(t){var e={},n=0,r=0,o=0,i=function(t,e,n){var r,o,i;r=0,o=0,i=0,t/=255,e/=255,n/=255;var u=eV(t,eV(e,n)),a=nV(t,nV(e,n));if(u===a)return i=u,{h:0,s:0,v:100*i};var c=t===u?e-n:n===u?t-e:n-t;return r=t===u?3:n===u?1:5,r=60*(r-c/(a-u)),o=(a-u)/a,i=a,{h:rV(r),s:rV(100*o),v:rV(100*i)}},u=function(t,e,i){if(t=(parseInt(t,10)||0)%360,e=parseInt(e,10)/100,i=parseInt(i,10)/100,e=nV(0,eV(e,1)),i=nV(0,eV(i,1)),0!==e){var u=t/60,a=i*e,c=a*(1-Math.abs(u%2-1)),s=i-a;switch(Math.floor(u)){case 0:n=a,r=c,o=0;break;case 1:n=c,r=a,o=0;break;case 2:n=0,r=a,o=c;break;case 3:n=0,r=c,o=a;break;case 4:n=c,r=0,o=a;break;case 5:n=a,r=0,o=c;break;default:n=r=o=0}n=rV(255*(n+s)),r=rV(255*(r+s)),o=rV(255*(o+s))}else n=r=o=rV(255*i)},a=function(){var t=function(t){return t=parseInt(t,10).toString(16),t.length>1?t:"0"+t};return"#"+t(n)+t(r)+t(o)},c=function(){return{r:n,g:r,b:o}},s=function(){return i(n,r,o)},l=function(t){var i;return"object"===typeof t?"r"in t?(n=t.r,r=t.g,o=t.b):"v"in t&&u(t.h,t.s,t.v):(i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(t))?(n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10)):(i=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(t))?(n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16)):(i=/#([0-F])([0-F])([0-F])/gi.exec(t))&&(n=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16),o=parseInt(i[3]+i[3],16)),n=n<0?0:n>255?255:n,r=r<0?0:r>255?255:r,o=o<0?0:o>255?255:o,e};return t&&l(t),e.toRgb=c,e.toHsv=s,e.toHex=a,e.parse=l,e},iV=function(t){var e=JSON.stringify(t);return v(e)?e.replace(/[\u0080-\uFFFF]/g,(function(t){var e=t.charCodeAt(0).toString(16);return"\\u"+"0000".substring(e.length)+e})):e},uV={serialize:iV,parse:function(t){try{return JSON.parse(t)}catch(e){}}},aV={callbacks:{},count:0,send:function(t){var e=this,n=Vs.DOM,r=void 0!==t.count?t.count:e.count,o="tinymce_jsonp_"+r;e.callbacks[r]=function(i){n.remove(o),delete e.callbacks[r],t.callback(i)},n.add(n.doc.body,"script",{id:o,src:t.url,type:"text/javascript"}),e.count++}},cV=Wt(Wt({},KP),{send:function(t){var e,n=0,r=function(){!t.async||4===e.readyState||n++>1e4?(t.success&&n<1e4&&200===e.status?t.success.call(t.success_scope,""+e.responseText,e,t):t.error&&t.error.call(t.error_scope,n>1e4?"TIMED_OUT":"GENERAL",e,t),e=null):Li.setTimeout(r,10)};if(t.scope=t.scope||this,t.success_scope=t.success_scope||t.scope,t.error_scope=t.error_scope||t.scope,t.async=!1!==t.async,t.data=t.data||"",cV.fire("beforeInitialize",{settings:t}),e=new XMLHttpRequest,e.overrideMimeType&&e.overrideMimeType(t.content_type),e.open(t.type||(t.data?"POST":"GET"),t.url,t.async),t.crossDomain&&(e.withCredentials=!0),t.content_type&&e.setRequestHeader("Content-Type",t.content_type),t.requestheaders&&gn.each(t.requestheaders,(function(t){e.setRequestHeader(t.key,t.value)})),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e=cV.fire("beforeSend",{xhr:e,settings:t}).xhr,e.send(t.data),!t.async)return r();Li.setTimeout(r,10)}}),sV=gn.extend,lV=function(){function t(t){this.settings=sV({},t),this.count=0}return t.sendRPC=function(e){return(new t).send(e)},t.prototype.send=function(t){var e=t.error,n=t.success,r=sV(this.settings,t);r.success=function(t,o){t=uV.parse(t),"undefined"===typeof t&&(t={error:"JSON Parse error."}),t.error?e.call(r.error_scope||r.scope,t.error,o):n.call(r.success_scope||r.scope,t.result)},r.error=function(t,n){e&&e.call(r.error_scope||r.scope,t,n)},r.data=uV.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",cV.send(r)},t}(),fV=function(){return function(){var t={},e=[],n={getItem:function(e){var n=t[e];return n||null},setItem:function(n,r){e.push(n),t[n]=String(r)},key:function(t){return e[t]},removeItem:function(n){e=e.filter((function(t){return t===n})),delete t[n]},clear:function(){e=[],t={}},length:0};return Object.defineProperty(n,"length",{get:function(){return e.length},configurable:!1,enumerable:!1}),n}()};try{var dV="__storage_test__";tV=window.localStorage,tV.setItem(dV,dV),tV.removeItem(dV)}catch(bV){tV=fV()}var mV=tV,gV={geom:{Rect:GF},util:{Promise:Ai,Delay:Li,Tools:gn,VK:ev,URI:Fy,Class:ZF,EventDispatcher:$P,Observable:KP,I18n:sl,XHR:cV,JSON:uV,JSONRequest:lV,JSONP:aV,LocalStorage:mV,Color:oV,ImageUploader:oD},dom:{EventUtils:rc,Sizzle:Vc,DomQuery:Ns,TreeWalker:Fi,TextSeeker:Xl,DOMUtils:Vs,ScriptLoader:Xs,RangeUtils:kv,Serializer:x_,StyleSheetLoader:Hi,ControlSelection:rv,BookmarkManager:Ip,Selection:DE,Event:rc.Event},html:{Styles:ja,Entities:_a,Node:Ay,Schema:Va,SaxParser:Ky,DomParser:c_,Writer:iw,Serializer:uw},Env:tn,AddOnManager:ll,Annotator:Hp,Formatter:pD,UndoManager:wD,EditorCommands:_P,WindowManager:zA,NotificationManager:DA,EditorObservable:tF,Shortcuts:fF,Editor:yF,FocusManager:Ub,EditorManager:zF,DOM:Vs.DOM,ScriptLoader:Xs.ScriptLoader,PluginManager:MA,ThemeManager:RA,IconManager:pA,Resource:YF,trim:gn.trim,isArray:gn.isArray,is:gn.is,toArray:gn.toArray,makeMap:gn.makeMap,each:gn.each,map:gn.map,grep:gn.grep,inArray:gn.inArray,extend:gn.extend,create:gn.create,walk:gn.walk,createNS:gn.createNS,resolve:gn.resolve,explode:gn.explode,_addCacheSuffix:gn._addCacheSuffix,isOpera:tn.opera,isWebKit:tn.webkit,isIE:tn.ie,isGecko:tn.gecko,isMac:tn.mac},hV=gn.extend(zF,gV),pV=function(e){try{t.exports=e}catch(n){}},vV=function(t){window.tinymce=t,window.tinyMCE=t};vV(hV),pV(hV)})()}).call(this,n("c8ba"))},e8b0:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t){return t},n=function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},r="\ufeff",o=function(t){return t.replace(/\uFEFF/g,"")},i=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},u="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!----]_{}⦅-・]",a={aletter:"[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ--ℝℤΩℨK--ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA---하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]",midnumlet:"[-'\\.‘’․﹒'.]",midletter:"[:··״‧︓﹕:]",midnum:"[±+*/,;;։،؍٬߸⁄︐︔﹐﹔,;]",numeric:"[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",cr:"\\r",lf:"\\n",newline:"[\v\f…\u2028\u2029]",extend:"[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ऀ-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕౖౢౣಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣംഃാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈᧉᨗ-ᨛᩕ-ᩞ᩠-᩿᩼ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-᯦᮪-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ᷀-ᷦ᷼-᷿‌‍⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲꙼꙽꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣠-꣱ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꨩ-ꨶꩃꩌꩍꩻꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꯣ-ꯪ꯬꯭ﬞ︀-️︠-゙゚︦]",format:"[­؀-؃۝܏឴឵‎‏‪---\ufeff-]",katakana:"[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]",extendnumlet:"[=_‿⁀⁔︳︴-﹏_∀-<>]",punctuation:u},c={ALETTER:0,MIDNUMLET:1,MIDLETTER:2,MIDNUM:3,NUMERIC:4,CR:5,LF:6,NEWLINE:7,EXTEND:8,FORMAT:9,KATAKANA:10,EXTENDNUMLET:11,AT:12,OTHER:13},s=[new RegExp(a.aletter),new RegExp(a.midnumlet),new RegExp(a.midletter),new RegExp(a.midnum),new RegExp(a.numeric),new RegExp(a.cr),new RegExp(a.lf),new RegExp(a.newline),new RegExp(a.extend),new RegExp(a.format),new RegExp(a.katakana),new RegExp(a.extendnumlet),new RegExp("@")],l="",f=new RegExp("^"+a.punctuation+"$"),d=/^\s+$/,m=s,g=c.OTHER,h=function(t){for(var e=g,n=m.length,r=0;r<n;++r){var o=m[r];if(o&&o.test(t)){e=r;break}}return e},p=function(t){var e={};return function(n){if(e[n])return e[n];var r=t(n);return e[n]=r,r}},v=function(t){var e=p(h);return i(t,e)},b=function(t,e){var n=t[e],r=t[e+1];if(e<0||e>t.length-1&&0!==e)return!1;if(n===c.ALETTER&&r===c.ALETTER)return!1;var o=t[e+2];if(n===c.ALETTER&&(r===c.MIDLETTER||r===c.MIDNUMLET||r===c.AT)&&o===c.ALETTER)return!1;var i=t[e-1];return(n!==c.MIDLETTER&&n!==c.MIDNUMLET&&r!==c.AT||r!==c.ALETTER||i!==c.ALETTER)&&((n!==c.NUMERIC&&n!==c.ALETTER||r!==c.NUMERIC&&r!==c.ALETTER)&&((n!==c.MIDNUM&&n!==c.MIDNUMLET||r!==c.NUMERIC||i!==c.NUMERIC)&&((n!==c.NUMERIC||r!==c.MIDNUM&&r!==c.MIDNUMLET||o!==c.NUMERIC)&&(n!==c.EXTEND&&n!==c.FORMAT&&i!==c.EXTEND&&i!==c.FORMAT&&r!==c.EXTEND&&r!==c.FORMAT&&((n!==c.CR||r!==c.LF)&&(n===c.NEWLINE||n===c.CR||n===c.LF||(r===c.NEWLINE||r===c.CR||r===c.LF||(n!==c.KATAKANA||r!==c.KATAKANA)&&((r!==c.EXTENDNUMLET||n!==c.ALETTER&&n!==c.NUMERIC&&n!==c.KATAKANA&&n!==c.EXTENDNUMLET)&&((n!==c.EXTENDNUMLET||r!==c.ALETTER&&r!==c.NUMERIC&&r!==c.KATAKANA)&&n!==c.AT)))))))))},y=l,w=d,x=f,C=function(t){return"http"===t||"https"===t},S=function(t,e){var n;for(n=e;n<t.length;n++)if(w.test(t[n]))break;return n},k=function(t,e){var n=S(t,e+1),r=t.slice(e+1,n).join(y);return"://"===r.substr(0,3)?n:e},T=function(t,e,n,r){for(var o=[],i=[],u=0;u<n.length;++u)if(i.push(t[u]),b(n,u)){var a=e[u];if((r.includeWhitespace||!w.test(a))&&(r.includePunctuation||!x.test(a))){var c=u-i.length+1,s=u+1,l=e.slice(c,s).join(y);if(C(l)){var f=k(e,u),d=t.slice(s,f);Array.prototype.push.apply(i,d),u=f}o.push(i)}i=[]}return o},O=function(){return{includeWhitespace:!1,includePunctuation:!1}},E=function(t,e,o){o=n(n({},O()),o);for(var i=[],u=[],a=0;a<t.length;a++){var c=e(t[a]);c!==r&&(i.push(t[a]),u.push(c))}var s=v(u);return T(i,u,s,o)},_=E,A=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),D=function(t,e){var n=e.getBlockElements(),r=e.getShortEndedElements(),i=function(t){return n[t.nodeName]||r[t.nodeName]},u=[],a="",c=new A(t,t);while(t=c.next())3===t.nodeType?a+=o(t.data):i(t)&&a.length&&(u.push(a),a="");return a.length&&u.push(a),u},M=function(t){return t.replace(/\u200B/g,"")},R=function(t){return t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length},N=function(t,n){var r=M(D(t,n).join("\n"));return _(r.split(""),e).length},z=function(t,e){var n=D(t,e).join("");return R(n)},B=function(t,e){var n=D(t,e).join("").replace(/\s/g,"");return R(n)},L=function(t,e){return function(){return e(t.getBody(),t.schema)}},H=function(t,e){return function(){return e(t.selection.getRng().cloneContents(),t.schema)}},I=function(t){return L(t,N)},P=function(t){return{body:{getWordCount:I(t),getCharacterCount:L(t,z),getCharacterCountWithoutSpaces:L(t,B)},selection:{getWordCount:H(t,N),getCharacterCount:H(t,z),getCharacterCountWithoutSpaces:H(t,B)},getCount:I(t)}},F=function(t,e){t.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(e.body.getWordCount()),String(e.selection.getWordCount())],["Characters (no spaces)",String(e.body.getCharacterCountWithoutSpaces()),String(e.selection.getCharacterCountWithoutSpaces())],["Characters",String(e.body.getCharacterCount()),String(e.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})},V=function(t,e){t.addCommand("mceWordCount",(function(){return F(t,e)}))},U=tinymce.util.Tools.resolve("tinymce.util.Delay"),j=function(t,e){t.fire("wordCountUpdate",{wordCount:{words:e.body.getWordCount(),characters:e.body.getCharacterCount(),charactersWithoutSpaces:e.body.getCharacterCountWithoutSpaces()}})},W=function(t,e){j(t,e)},q=function(t,e,n){var r=U.debounce((function(){return W(t,e)}),n);t.on("init",(function(){W(t,e),U.setEditorTimeout(t,(function(){t.on("SetContent BeforeAddUndo Undo Redo ViewUpdate keyup",r)}),0)}))},$=function(t){var e=function(){return t.execCommand("mceWordCount")};t.ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:e}),t.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:e})};function G(e){void 0===e&&(e=300),t.add("wordcount",(function(t){var n=P(t);return V(t,n),$(t),q(t,n,e),n}))}G()})()},e9c4:function(t,e,n){var r=n("23e7"),o=n("d066"),i=n("d039"),u=o("JSON","stringify"),a=/[\uD800-\uDFFF]/g,c=/^[\uD800-\uDBFF]$/,s=/^[\uDC00-\uDFFF]$/,l=function(t,e,n){var r=n.charAt(e-1),o=n.charAt(e+1);return c.test(t)&&!s.test(o)||s.test(t)&&!c.test(r)?"\\u"+t.charCodeAt(0).toString(16):t},f=i((function(){return'"\\udf06\\ud834"'!==u("\udf06\ud834")||'"\\udead"'!==u("\udead")}));u&&r({target:"JSON",stat:!0,forced:f},{stringify:function(t,e,n){var r=u.apply(null,arguments);return"string"==typeof r?r.replace(a,l):r}})},ec27:function(t,e,n){n("fc39")},ef1f:function(t,e){(function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(t,e){t.focus(),t.undoManager.transact((function(){t.setContent(e)})),t.selection.setCursorLocation(),t.nodeChanged()},n=function(t){return t.getContent({source_view:!0})},r=function(t){var r=n(t);t.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:r},onSubmit:function(n){e(t,n.getData().code),n.close()}})},o=function(t){t.addCommand("mceCodeEditor",(function(){r(t)}))},i=function(t){var e=function(){return t.execCommand("mceCodeEditor")};t.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:e}),t.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:e})};function u(){t.add("code",(function(t){return o(t),i(t),{}}))}u()})()},f034:function(t,e){(function(){"use strict";var t=function(t){var e=t,n=function(){return e},r=function(t){e=t};return{get:n,set:r}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){return{isFullscreen:function(){return null!==t.get()}}},r=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},o=function(t){return function(e){return r(e)===t}},i=function(t){return function(e){return typeof e===t}},u=o("string"),a=o("array"),c=i("boolean"),s=function(t){return null===t||void 0===t},l=function(t){return!s(t)},f=i("function"),d=i("number"),m=function(){},g=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},h=function(t,e){return function(n){return t(e(n))}},p=function(t){return function(){return t}},v=function(t){return t};function b(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var y=p(!1),w=p(!0),x=function(){return C},C=function(){var t=function(t){return t()},e=v,n={fold:function(t,e){return t()},isSome:y,isNone:w,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:p(null),getOrUndefined:p(void 0),or:e,orThunk:t,map:x,each:m,bind:x,exists:y,forall:w,filter:function(){return x()},toArray:function(){return[]},toString:p("none()")};return n}(),S=function(t){var e=p(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:w,isNone:y,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return S(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:C},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},k=function(t){return null===t||void 0===t?C:S(t)},T={some:S,none:x,from:k},O=function(){return O=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},O.apply(this,arguments)},E=function(e){var n=t(T.none()),r=function(){return n.get().each(e)},o=function(){r(),n.set(T.none())},i=function(){return n.get().isSome()},u=function(){return n.get()},a=function(t){r(),n.set(T.some(t))};return{clear:o,isSet:i,get:u,set:a}},_=function(){return E((function(t){return t.unbind()}))},A=function(){var t=E(m),e=function(e){return t.get().each(e)};return O(O({},t),{on:e})},D=Array.prototype.push,M=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},R=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];e(o,n)}},N=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},z=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return T.some(i);if(n(i,r))break}return T.none()},B=function(t,e){return z(t,e,y)},L=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!a(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);D.apply(e,t[n])}return e},H=function(t,e){return L(M(t,e))},I=function(t,e){return e>=0&&e<t.length?T.some(t[e]):T.none()},P=function(t){return I(t,0)},F=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return T.none()},V=Object.keys,U=function(t,e){for(var n=V(t),r=0,o=n.length;r<o;r++){var i=n[r],u=t[i];e(u,i)}},j=function(t,e){return-1!==t.indexOf(e)},W=function(t){return void 0!==t.style&&f(t.style.getPropertyValue)},q=function(t,e){var n=e||document,r=n.createElement("div");if(r.innerHTML=t,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return K(r.childNodes[0])},$=function(t,e){var n=e||document,r=n.createElement(t);return K(r)},G=function(t,e){var n=e||document,r=n.createTextNode(t);return K(r)},K=function(t){if(null===t||void 0===t)throw new Error("Node cannot be null or undefined");return{dom:t}},X=function(t,e,n){return T.from(t.dom.elementFromPoint(e,n)).map(K)},Y={fromHtml:q,fromTag:$,fromText:G,fromDom:K,fromPoint:X};"undefined"!==typeof window?window:Function("return this;")();var J=9,Q=11,Z=1,tt=3,et=function(t){return t.dom.nodeType},nt=function(t){return function(e){return et(e)===t}},rt=nt(Z),ot=nt(tt),it=nt(J),ut=nt(Q),at=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},ct=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,u=t.isiOS()||t.isAndroid(),a=u||r("(pointer:coarse)"),c=o||!i&&u&&r("(min-device-width:768px)"),s=i||u&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:p(o),isiPhone:p(i),isTablet:p(c),isPhone:p(s),isTouch:p(a),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:p(l),isDesktop:p(f)}},st=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}},lt=function(t,e){var n=st(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return mt(r(1),r(2))},ft=function(t,e){var n=String(e).toLowerCase();return 0===t.length?dt():lt(t,n)},dt=function(){return mt(0,0)},mt=function(t,e){return{major:t,minor:e}},gt={nu:mt,detect:ft,unknown:dt},ht=function(t,e){return F(e.brands,(function(e){var n=e.brand.toLowerCase();return B(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:gt.nu(parseInt(e.version,10),0)}}))}))},pt=function(t,e){var n=String(e).toLowerCase();return B(t,(function(t){return t.search(n)}))},vt=function(t,e){return pt(t,e).map((function(t){var n=gt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},bt=function(t,e){return pt(t,e).map((function(t){var n=gt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))},yt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,wt=function(t){return function(e){return j(e,t)}},xt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return j(t,"edge/")&&j(t,"chrome")&&j(t,"safari")&&j(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,yt],search:function(t){return j(t,"chrome")&&!j(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return j(t,"msie")||j(t,"trident")}},{name:"Opera",versionRegexes:[yt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:wt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:wt("firefox")},{name:"Safari",versionRegexes:[yt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(j(t,"safari")||j(t,"mobile/"))&&j(t,"applewebkit")}}],Ct=[{name:"Windows",search:wt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return j(t,"iphone")||j(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:wt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:wt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:wt("linux"),versionRegexes:[]},{name:"Solaris",search:wt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:wt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:wt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],St={browsers:p(xt),oses:p(Ct)},kt="Edge",Tt="Chrome",Ot="IE",Et="Opera",_t="Firefox",At="Safari",Dt=function(){return Mt({current:void 0,version:gt.unknown()})},Mt=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(kt),isChrome:r(Tt),isIE:r(Ot),isOpera:r(Et),isFirefox:r(_t),isSafari:r(At)}},Rt={unknown:Dt,nu:Mt,edge:p(kt),chrome:p(Tt),ie:p(Ot),opera:p(Et),firefox:p(_t),safari:p(At)},Nt="Windows",zt="iOS",Bt="Android",Lt="Linux",Ht="OSX",It="Solaris",Pt="FreeBSD",Ft="ChromeOS",Vt=function(){return Ut({current:void 0,version:gt.unknown()})},Ut=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(Nt),isiOS:r(zt),isAndroid:r(Bt),isOSX:r(Ht),isLinux:r(Lt),isSolaris:r(It),isFreeBSD:r(Pt),isChromeOS:r(Ft)}},jt={unknown:Vt,nu:Ut,windows:p(Nt),ios:p(zt),android:p(Bt),linux:p(Lt),osx:p(Ht),solaris:p(It),freebsd:p(Pt),chromeos:p(Ft)},Wt=function(t,e,n){var r=St.browsers(),o=St.oses(),i=e.bind((function(t){return ht(r,t)})).orThunk((function(){return vt(r,t)})).fold(Rt.unknown,Rt.nu),u=bt(o,t).fold(jt.unknown,jt.nu),a=ct(u,i,t,n);return{browser:i,os:u,deviceType:a}},qt={detect:Wt},$t=function(t){return window.matchMedia(t).matches},Gt=at((function(){return qt.detect(navigator.userAgent,T.from(navigator.userAgentData),$t)})),Kt=function(){return Gt()},Xt=function(t,e){var n=t.dom;if(n.nodeType!==Z)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")},Yt=function(t){return t.nodeType!==Z&&t.nodeType!==J&&t.nodeType!==Q||0===t.childElementCount},Jt=function(t,e){var n=void 0===e?document:e.dom;return Yt(n)?[]:M(n.querySelectorAll(t),Y.fromDom)},Qt=function(t,e){return t.dom===e.dom},Zt=function(t){return Y.fromDom(t.dom.ownerDocument)},te=function(t){return it(t)?t:Zt(t)},ee=function(t){return T.from(t.dom.parentNode).map(Y.fromDom)},ne=function(t,e){var n=f(e)?e:y,r=t.dom,o=[];while(null!==r.parentNode&&void 0!==r.parentNode){var i=r.parentNode,u=Y.fromDom(i);if(o.push(u),!0===n(u))break;r=i}return o},re=function(t){var e=function(e){return N(e,(function(e){return!Qt(t,e)}))};return ee(t).map(oe).map(e).getOr([])},oe=function(t){return M(t.dom.childNodes,Y.fromDom)},ie=function(t){return ut(t)&&l(t.dom.host)},ue=f(Element.prototype.attachShadow)&&f(Node.prototype.getRootNode),ae=p(ue),ce=ue?function(t){return Y.fromDom(t.dom.getRootNode())}:te,se=function(t){var e=ce(t);return ie(e)?T.some(e):T.none()},le=function(t){return Y.fromDom(t.dom.host)},fe=function(t){if(ae()&&l(t.target)){var e=Y.fromDom(t.target);if(rt(e)&&de(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return P(n)}}return T.from(t.target)},de=function(t){return l(t.dom.shadowRoot)},me=function(t){var e=ot(t)?t.dom.parentNode:t.dom;if(void 0===e||null===e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return se(Y.fromDom(e)).fold((function(){return n.body.contains(e)}),h(me,le))},ge=function(t){var e=t.dom.body;if(null===e||void 0===e)throw new Error("Body is not available yet");return Y.fromDom(e)},he=function(t,e,n){if(!(u(n)||c(n)||d(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},pe=function(t,e,n){he(t.dom,e,n)},ve=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},be=function(t,e){t.dom.removeAttribute(e)},ye=function(t,e,n){if(!u(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);W(t)&&t.style.setProperty(e,n)},we=function(t,e){var n=t.dom;U(e,(function(t,e){ye(n,e,t)}))},xe=function(t,e){var n=t.dom,r=window.getComputedStyle(n),o=r.getPropertyValue(e);return""!==o||me(t)?o:Ce(n,e)},Ce=function(t,e){return W(t)?t.style.getPropertyValue(e):""},Se=function(t,e,n,r,o,i,u){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:u}},ke=function(t){var e=Y.fromDom(fe(t).getOr(t.target)),n=function(){return t.stopPropagation()},r=function(){return t.preventDefault()},o=g(r,n);return Se(e,t.clientX,t.clientY,n,r,o,t)},Te=function(t,e){return function(n){t(n)&&e(ke(n))}},Oe=function(t,e,n,r,o){var i=Te(n,r);return t.dom.addEventListener(e,i,o),{unbind:b(_e,t,e,i,o)}},Ee=function(t,e,n,r){return Oe(t,e,n,r,!1)},_e=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},Ae=w,De=function(t,e,n){return Ee(t,e,Ae,n)},Me=function(t,e){var n=function(n,r){return Me(t+n,e+r)};return{left:t,top:e,translate:n}},Re=Me,Ne=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 Re(n,r)},ze=function(t){var e=void 0===t?window:t;return Kt().browser.isFirefox()?T.none():T.from(e["visualViewport"])},Be=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Le=function(t){var e=void 0===t?window:t,n=e.document,r=Ne(Y.fromDom(n));return ze(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return Be(r.left,r.top,n,o)}),(function(t){return Be(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},He=function(t,e,n){return ze(n).map((function(n){var r=function(t){return e(ke(t))};return n.addEventListener(t,r),{unbind:function(){return n.removeEventListener(t,r)}}})).getOrThunk((function(){return{unbind:m}}))},Ie=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Pe=tinymce.util.Tools.resolve("tinymce.Env"),Fe=tinymce.util.Tools.resolve("tinymce.util.Delay"),Ve=function(t,e){t.fire("FullscreenStateChanged",{state:e}),t.fire("ResizeEditor")},Ue=function(t){return t.getParam("fullscreen_native",!1,"boolean")},je=function(t){var e=Y.fromDom(t.getElement());return se(e).map(le).getOrThunk((function(){return ge(Zt(e))}))},We=function(t){return void 0!==t.fullscreenElement?t.fullscreenElement:void 0!==t.msFullscreenElement?t.msFullscreenElement:void 0!==t.webkitFullscreenElement?t.webkitFullscreenElement:null},qe=function(){return void 0!==document.fullscreenElement?"fullscreenchange":void 0!==document.msFullscreenElement?"MSFullscreenChange":void 0!==document.webkitFullscreenElement?"webkitfullscreenchange":"fullscreenchange"},$e=function(t){var e=t.dom;e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},Ge=function(t){var e=t.dom;e.exitFullscreen?e.exitFullscreen():e.msExitFullscreen?e.msExitFullscreen():e.webkitCancelFullScreen&&e.webkitCancelFullScreen()},Ke=function(t){return t.dom===We(Zt(t).dom)},Xe=function(t,e,n){return N(ne(t,n),e)},Ye=function(t,e){return N(re(t),e)},Je=function(t){return Jt(t)},Qe=function(t,e,n){return Xe(t,(function(t){return Xt(t,e)}),n)},Ze=function(t,e){return Ye(t,(function(t){return Xt(t,e)}))},tn="data-ephox-mobile-fullscreen-style",en="display:none!important;",nn="position:absolute!important;",rn="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",on="background-color:rgb(255,255,255)!important;",un=Pe.os.isAndroid(),an=function(t){var e=xe(t,"background-color");return void 0!==e&&""!==e?"background-color:"+e+"!important":on},cn=function(t,e,n){var r=function(t){return Ze(t,"*:not(.tox-silver-sink)")},o=function(e){return function(n){var r=ve(n,"style"),o=void 0===r?"no-styles":r.trim();o!==e&&(pe(n,tn,o),we(n,t.parseStyle(e)))}},i=Qe(e,"*"),u=H(i,r),a=an(n);R(u,o(en)),R(i,o(nn+rn+a));var c=!0===un?"":nn;o(c+rn+a)(e)},sn=function(t){var e=Je("["+tn+"]");R(e,(function(e){var n=ve(e,tn);"no-styles"!==n?we(e,t.parseStyle(n)):be(e,"style"),be(e,tn)}))},ln=Ie.DOM,fn=function(){return Le(window)},dn=function(t){return window.scrollTo(t.x,t.y)},mn=ze().fold((function(){return{bind:m,unbind:m}}),(function(t){var e=A(),n=_(),r=_(),o=function(){document.body.scrollTop=0,document.documentElement.scrollTop=0},i=function(){window.requestAnimationFrame((function(){e.on((function(e){return we(e,{top:t.offsetTop+"px",left:t.offsetLeft+"px",height:t.height+"px",width:t.width+"px"})}))}))},u=Fe.throttle((function(){o(),i()}),50),a=function(t){e.set(t),u(),n.set(He("resize",u)),r.set(He("scroll",u))},c=function(){e.on((function(){n.clear(),r.clear()})),e.clear()};return{bind:a,unbind:c}})),gn=function(t,e){var n=document.body,r=document.documentElement,o=t.getContainer(),i=Y.fromDom(o),u=je(t),a=e.get(),c=Y.fromDom(t.getBody()),s=Pe.deviceType.isTouch(),l=o.style,f=t.iframeElement,d=f.style,m=function(t){t(n,"tox-fullscreen"),t(r,"tox-fullscreen"),t(o,"tox-fullscreen"),se(i).map((function(t){return le(t).dom})).each((function(e){t(e,"tox-fullscreen"),t(e,"tox-shadowhost")}))},g=function(){s&&sn(t.dom),m(ln.removeClass),mn.unbind(),T.from(e.get()).each((function(t){return t.fullscreenChangeHandler.unbind()}))};if(a)a.fullscreenChangeHandler.unbind(),Ue(t)&&Ke(u)&&Ge(Zt(u)),d.width=a.iframeWidth,d.height=a.iframeHeight,l.width=a.containerWidth,l.height=a.containerHeight,l.top=a.containerTop,l.left=a.containerLeft,g(),dn(a.scrollPos),e.set(null),Ve(t,!1),t.off("remove",g);else{var h=De(Zt(u),qe(),(function(n){Ue(t)&&(Ke(u)||null===e.get()||gn(t,e))})),p={scrollPos:fn(),containerWidth:l.width,containerHeight:l.height,containerTop:l.top,containerLeft:l.left,iframeWidth:d.width,iframeHeight:d.height,fullscreenChangeHandler:h};s&&cn(t.dom,i,c),d.width=d.height="100%",l.width=l.height="",m(ln.addClass),mn.bind(i),t.on("remove",g),e.set(p),Ue(t)&&$e(u),Ve(t,!0)}},hn=function(t,e){t.addCommand("mceFullScreen",(function(){gn(t,e)}))},pn=function(t,e){return function(n){n.setActive(null!==e.get());var r=function(t){return n.setActive(t.state)};return t.on("FullscreenStateChanged",r),function(){return t.off("FullscreenStateChanged",r)}}},vn=function(t,e){var n=function(){return t.execCommand("mceFullScreen")};t.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:n,onSetup:pn(t,e)}),t.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:n,onSetup:pn(t,e)})};function bn(){e.add("fullscreen",(function(e){var r=t(null);return e.inline||(hn(e,r),vn(e,r),e.addShortcut("Meta+Shift+F","","mceFullScreen")),n(r)}))}bn()})()},f557:function(t,e,n){n("5e4ce")},fc39:function(t,e){tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 01-1-1v-5c0-.6-.4-1-1-1a1 1 0 00-1 1v5c0 .6-.4 1-1 1a1 1 0 01-1-1V9H4a1 1 0 110-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 00-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 10-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 001.4-1.4L12 6.6l-7.7 7.7a1 1 0 001.4 1.4L12 9.4l6.3 6.3z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 110-2h9.2zm4 0h.8a1 1 0 010 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h6.8zm4 0H19a1 1 0 010 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h4.4zm4 0H19a1 1 0 010 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 010-2h2zm4 0h8a1 1 0 010 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 001.4-1V6a1 1 0 00-1.4-.9l-12 6a1 1 0 000 1.8z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 015 18V6a1 1 0 011.4-.9l12 6a1 1 0 010 1.8z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 01-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 00-1 1z" fill-rule="nonzero"/></svg>',"border-style":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="2" x="3" y="6" rx="1"/><rect width="2.8" height="2" x="3" y="16" rx="1"/><rect width="2.8" height="2" x="6.8" y="16" rx="1"/><rect width="2.8" height="2" x="10.6" y="16" rx="1"/><rect width="2.8" height="2" x="14.4" y="16" rx="1"/><rect width="2.8" height="2" x="18.2" y="16" rx="1"/><rect width="8" height="2" x="3" y="11" rx="1"/><rect width="8" height="2" x="13" y="11" rx="1"/></g></svg>',"border-width":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="5" x="3" y="5" rx="1"/><rect width="18" height="3.5" x="3" y="11.5" rx="1"/><rect width="18" height="2" x="3" y="17" rx="1"/></g></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 01-.7-.3A1 1 0 0111 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3h-1a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 01-.7.3H5a1 1 0 01-.7-.3A1 1 0 014 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 01-.8.3 1 1 0 01-.6-.3l-.8-.7a1 1 0 01-.3-.8c0-.2.1-.5.3-.7a1 1 0 011.4 0zm-10-7l-.7-.8a1 1 0 01-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.8-.3zm10 0a1 1 0 01-.8.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 010 1.4l-.8.8a1 1 0 01-.6.3 1 1 0 01-.8-.3 1 1 0 01-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 013.7 2.4 4 4 0 010 3.2A4 4 0 0112 16a4 4 0 01-3.7-2.4 4 4 0 010-3.2A4 4 0 0112 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 11-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 01-1.4 1.4L13 13.4V20a1 1 0 01-2 0v-6.6z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 110 14.8 7.4 7.4 0 010-14.8zM12 3a9 9 0 100 18 9 9 0 000-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',"cell-background-color":'<svg width="24" height="24"><path d="M15.7 2l1.6 1.6-2.7 2.6 5.9 5.8c.7.7.7 1.7 0 2.4l-6.3 6.1a1.7 1.7 0 01-2.4 0l-6.3-6.1c-.7-.7-.7-1.7 0-2.4L15.7 2zM18 12l-4.5-4L9 12h9zM4 16s2 2.4 2 3.8C6 21 5.1 22 4 22s-2-1-2-2.2C2 18.4 4 16 4 16z"/></svg>',"cell-border-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M5 13v5h2v2H5a2 2 0 01-2-2v-5h2zm8-7V4h6a2 2 0 012 2h-8z" opacity=".2"/><path fill-rule="nonzero" d="M13 4v2H5v7H3V6c0-1.1.9-2 2-2h8zm-2.6 14.1l.1-.1.1.1.2.3.2.2.2.2c.4.6.8 1.2.8 1.7 0 .8-.7 1.5-1.5 1.5S9 21.3 9 20.5c0-.5.4-1.1.8-1.7l.2-.2.2-.2.2-.3z"/><path d="M13 11l-2 2H5v-2h6V6h2z"/><path fill-rule="nonzero" d="M18.4 8l1 1-1.8 1.9 4 4c.5.4.5 1.1 0 1.6l-4.3 4.2a1.2 1.2 0 01-1.6 0l-4.4-4.2c-.4-.5-.4-1.2 0-1.7l7-6.8zm1.6 7l-3-3-3 3h6z"/></g></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 01-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 01-1 .7h-.2a.7.7 0 01-.7-1l4-12a1 1 0 012 0l4 12a.7.7 0 01-.8 1h-.2a1 1 0 01-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 01-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 00-.5-.1 1 1 0 00-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 00-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 001.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 00-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 00-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 01-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 01-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8a1 1 0 010 2h-8a1 1 0 010-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 011.6 1.2l-8 12a1 1 0 01-1.5.1l-5-5a1 1 0 111.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 010-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 010-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 010-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 010-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 010-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 01-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 01-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 011.5-1.5l3.8 3.9 3.8-3.9a1 1 0 011.5 1.5z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 01-.8 2 2.8 2.8 0 01.8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 01-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 01.8-2 2.8 2.8 0 01-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 01-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 01-.5-.5V17a3 3 0 001-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0118 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 01-3.7 3 5.7 5.7 0 01-3.2 0A5.9 5.9 0 017.6 18a6.2 6.2 0 01-1.4-2.6 6.7 6.7 0 010-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 012.3-4A20 20 0 0112 4a26.4 26.4 0 013.2 3.4 18.2 18.2 0 012.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 00-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 01-1.3 3 5.3 5.3 0 01-2.3 1.5 4.9 4.9 0 01-2 .1 4.3 4.3 0 002.4.8 4 4 0 002-.6 4 4 0 001.5-1.5z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 000 18 1.5 1.5 0 001.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 005-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3-4a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm5 0a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3 4a1.5 1.5 0 110-3 1.5 1.5 0 010 3z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 010 2h-2v2a1 1 0 01-2 0v-2H9a1 1 0 010-2h2V8a1 1 0 012 0v2z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-6 8a6 6 0 006 6V6a6 6 0 00-6 6z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 00-2 2v11h2V5h10V3zm1 4a2 2 0 012 2v10a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 01-1-1v-2H7V9H5a1 1 0 110-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',"cut-column":'<svg width="24" height="24"><path fill-rule="evenodd" d="M7.2 4.5c.9 0 1.6.4 2.2 1A3.7 3.7 0 0110.5 8v.5l1 1 4-4 1-.5a3.3 3.3 0 012 0c.4 0 .7.3 1 .5L17 8h4v13h-6V10l-1.5 1.5.5.5v4l-2.5-2.5-1 1v.5c0 .4 0 .8-.3 1.2-.2.5-.4.9-.8 1.2-.6.7-1.3 1-2.2 1-.8.2-1.5 0-2-.6l-.5-.8-.2-1c0-.4 0-.8.3-1.2A3.9 3.9 0 017 12.7c.5-.2 1-.3 1.5-.2l1-1-1-1c-.5 0-1 0-1.5-.2-.5-.1-1-.4-1.4-.9-.4-.3-.6-.7-.8-1.2L4.5 7c0-.4 0-.7.2-1 0-.3.3-.6.5-.8.5-.5 1.2-.8 2-.7zm12.3 5h-3v10h3v-10zM8 13.8h-.3l-.4.2a2.8 2.8 0 00-.7.4v.1a2.8 2.8 0 00-.6.8l-.1.4v.7l.2.5.5.2h.7a2.6 2.6 0 00.8-.3 2.4 2.4 0 00.7-.7 2.5 2.5 0 00.3-.8 1.5 1.5 0 000-.8 1 1 0 00-.2-.4 1 1 0 00-.5-.2H8zm3.5-3.7c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zM7 5.8h-.4a1 1 0 00-.5.3 1 1 0 00-.2.5v.7a2.5 2.5 0 00.3.8l.2.3h.1l.4.4.4.2.4.1h.7L9 9l.2-.4a1.6 1.6 0 000-.8 2.6 2.6 0 00-.3-.8A2.5 2.5 0 007.7 6l-.4-.1H7z"/></svg>',"cut-row":'<svg width="24" height="24"><path fill-rule="evenodd" d="M22 3v5H9l3 3 2-2h4l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8.7.6 1 1.3 1 2.2.2.8 0 1.5-.6 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l2 2V3h14zM8.5 15.3h-.3a2.6 2.6 0 00-.8.4 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3L9 18V18l.4-.4.2-.4.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2h-.5zm7 0H15a1 1 0 00-.4.3 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4a2.8 2.8 0 00.5.7h.1a2.8 2.8 0 00.8.6l.4.1h.7l.5-.2.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3h-.3zM12 11.6c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zm8.5-7.1h-11v2h11v-2z"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 010 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2 1.6 1.6 0 00-.8 0 2.6 2.6 0 00-.8.3 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3 2.8 2.8 0 001-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3 1.5 1.5 0 00-.8 0 1 1 0 00-.4.2 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4l.3.4.3.4a2.8 2.8 0 00.8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',"duplicate-column":'<svg width="24" height="24"><path d="M17 6v16h-7V6h7zm-2 2h-3v12h3V8zm-2-6v2H8v15H6V2h7z"/></svg>',"duplicate-row":'<svg width="24" height="24"><path d="M22 11v7H6v-7h16zm-2 2H8v3h12v-3zm-1-6v2H4v5H2V7h17z"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7a2 2 0 012 2v2z"/><path d="M17 14h1a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1h-1a1 1 0 010-2h1v-1a1 1 0 012 0v1z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 00-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 00-2-2H7v2h11v9zM6 17h15a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1H6a2 2 0 01-2-2V7H3a1 1 0 110-2h1V4a1 1 0 112 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0119 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 008 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 00-4 4.5h2.2zm-3.4 0a12 12 0 012.8-4 12 12 0 00-5 4h2.2z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 010 .8l-5.6 4A.5.5 0 019 16V8a.5.5 0 01.8-.4z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 100 16 8 8 0 000-16zm0 14.5a6.5 6.5 0 110-13 6.5 6.5 0 010 13z" fill-rule="nonzero"/></svg>',export:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M14.4 3L18 7v1h-5V5H7v14h9a1 1 0 012 0c0 1-.8 2-1.9 2H7c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2h7.5z"/><path d="M18.1 12c.5 0 .9.4.9 1 0 .5-.3 1-.8 1h-7.3c-.5 0-.9-.4-.9-1 0-.5.3-1 .8-1h7.3z"/><path d="M16.4 9.2a1 1 0 011.4.2l2.4 3.6-2.4 3.6a1 1 0 01-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 01.2-1.4z"/></g></svg>',fill:'<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 002.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 002-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 00-2 2zm14-2v2h2a2 2 0 00-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 002-2h-2v2z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 00-2 2v3h2V6h10v3h2V6a2 2 0 00-2-2zm2 14h-2v2a2 2 0 002-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 00-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',format:'<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 010 2h-4v11a1 1 0 01-2 0V7H7a1 1 0 110-2h10z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 110-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 11-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 111.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 110-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 110 1.7H5a.9.9 0 01-.9-.9v-4.4a.9.9 0 111.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 01-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 010 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 01-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 110-4 2 2 0 010 4zM4.5 4h15a.5.5 0 110 1h-15a.5.5 0 010-1zm2-2h11a.5.5 0 110 1h-11a.5.5 0 010-1z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 00-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 01.6.5l.1.3a8.5 8.5 0 01.3.6l1.9 4.6 2-5.2a1 1 0 011-.6.5.5 0 01.5.6L13 14v2.8a.7.7 0 01-1.4 0z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 00-6 9 6.3 6.3 0 001.4 2l1 1a6.3 6.3 0 003.6 1 6.5 6.5 0 006-9 6.3 6.3 0 00-1.4-2l-1-1a6.3 6.3 0 00-3.6-1zM12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4z"/><path d="M9.6 9.7a.7.7 0 01-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 00-.8.8.8.8 0 01-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 012.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 100-4 2 2 0 000 4z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 001.8-2.9 6.3 6.3 0 00-.1-4.1 5.8 5.8 0 00-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 00-3.9 1.8 6.3 6.3 0 00-1.3 6 6.2 6.2 0 001.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 014 11c0-1 .2-1.9.6-2.7A7 7 0 016.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 015.7 2 7 7 0 011.7 2.3 6 6 0 01.2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 01-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 100-14 7 7 0 000 14zm0 2a9 9 0 110-18 9 9 0 010 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 00-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 01-3.1 1.9 6.1 6.1 0 01-5.5-1.6A5.8 5.8 0 016 14v-.3l.1-1.2A13.9 13.9 0 017.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 00.2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 00-3-4.2L12 6a26.1 26.1 0 00-2.2 2.5l-1-1a20.9 20.9 0 012.9-3.3L12 4l1 .8a22.2 22.2 0 014 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',language:'<svg width="24" height="24"><path d="M12 3a9 9 0 110 18 9 9 0 010-18zm4.3 13.3c-.5 1-1.2 2-2 2.9a7.5 7.5 0 003.2-2.1l-.2-.2a6 6 0 00-1-.6zm-8.6 0c-.5.2-.9.5-1.2.8.9 1 2 1.7 3.2 2a10 10 0 01-2-2.8zm3.6-.8c-.8 0-1.6.1-2.2.3.5 1 1.2 1.9 2.1 2.7zm1.5 0v3c.9-.8 1.6-1.7 2.1-2.7-.6-.2-1.4-.3-2.1-.3zm-6-2.7H4.5c.2 1 .5 2.1 1 3h.3l1.3-1a10 10 0 01-.3-2zm12.7 0h-2.3c0 .7-.1 1.4-.3 2l1.6 1.1c.5-1 .9-2 1-3.1zm-3.8 0h-3V14c1 0 2 .1 2.7.4.2-.5.3-1 .3-1.6zm-4.4 0h-3l.3 1.6c.8-.3 1.7-.4 2.7-.4v-1.3zm-5.5-5c-.7 1-1.1 2.2-1.3 3.5h2.3c0-1 .2-1.8.5-2.6l-1.5-1zm2.9 1.4v.1c-.2.6-.4 1.3-.4 2h3V9.4c-1 0-1.8-.1-2.6-.3zm6.6 0h-.1l-2.4.3v1.8h3l-.5-2.1zm3-1.4l-.3.1-1.3.8c.3.8.5 1.6.5 2.6h2.3a7.5 7.5 0 00-1.3-3.5zm-9 0l2 .2V5.5a9 9 0 00-2 2.2zm3.5-2.3V8c.6 0 1.3 0 1.9-.2a9 9 0 00-2-2.3zm-3-.7h-.1c-1.1.4-2.1 1-3 1.8l1.2.7a10 10 0 011.9-2.5zm4.4 0l.1.1a10 10 0 011.8 2.4l1.1-.7a7.5 7.5 0 00-3-1.8z"/></svg>',"line-height":'<svg width="24" height="24"><path d="M21 5a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zM7 3.6l3.7 3.7a1 1 0 01-1.3 1.5h-.1L8 7.3v9.2l1.3-1.3a1 1 0 011.3 0h.1c.4.4.4 1 0 1.3v.1L7 20.4l-3.7-3.7a1 1 0 011.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 01-1.3 0h-.1a1 1 0 010-1.3v-.1L7 3.6z"/></svg>',line:'<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2.1 2a2 2 0 102.7 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2-2a2 2 0 10-2.6-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 26a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 36a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 00-.3-.7A1 1 0 0013 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 017.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 110-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 01-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 110-2zm13-1v3.5a.5.5 0 11-1 0V5h-.5a.5.5 0 110-1H19zm-1 8.8l.2.2h1.3a.5.5 0 110 1h-1.6a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2h-1.3a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 010-1h1.2a.3.3 0 100-.6h-1.3a.4.4 0 110-.8h1.3a.3.3 0 000-.6h-1.2a.5.5 0 110-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 110-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 01-.5-.5V5h-.5a.5.5 0 010-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2H4.5a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 010-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 110-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 110-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 010-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 11-4.3 16.9l1.5-1.5A7 7 0 1013 6h-1z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm1.6-3.8a1 1 0 01-1.2 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 011.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 01-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 01-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',paragraph:'<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z"/></svg>',"paste-column-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm8 7v12h-6V8h6zm-1.5 1.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-column-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm-2 7v12H4V8h6zM8.5 9.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 11v5H8v-5h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h12v-4h2v4c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 7v5H8V8h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 010-3L14 3l1 1-7.3 7.3a1 1 0 000 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 01-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 01.1 2H13v6a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H11V5c0-.6.4-1 1-1z"/></svg>',preferences:'<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 01-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 01-1.4 0l-1.5-1.2a6.2 6.2 0 01-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 01-1-.9l-.2-1.9a5.8 5.8 0 01-1.5-.6l-1.5 1.2a1 1 0 01-1.4 0l-.7-.7a1 1 0 010-1.4l1.2-1.5a6.2 6.2 0 01-.6-1.5l-1.9-.2a1 1 0 01-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 01.6-1.5L5.2 7.3a1 1 0 010-1.4l.7-.7a1 1 0 011.4 0l1.5 1.2a6.2 6.2 0 011.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 011.5.6l1.5-1.2a1 1 0 011.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 01.6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 100-6 3 3 0 000 6z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 002.1-2.8 15.7 15.7 0 00-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 00-6.7 3.2A16.2 16.2 0 003.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 012.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 01-2.8-3.7 1 1 0 010-1zm12-3.3a2 2 0 102.7 2.6 4 4 0 11-2.6-2.6z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 00-3 3v6h2v3h14v-3h2v-6a3 3 0 00-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 11-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 111.4-1.4l5 5a1 1 0 010 1.4l-5 5a1 1 0 01-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 011-1l5 .4a1 1 0 11-.2 2l-2.2-.2a7.8 7.8 0 008.4.2 7.5 7.5 0 003.5-6.4 1 1 0 112 0 9.5 9.5 0 01-4.5 8 9.9 9.9 0 01-10.2 0l.4 1.4a1 1 0 11-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 00-9.5-1 7.5 7.5 0 00-3.6 7 1 1 0 01-2 0 9.5 9.5 0 014.5-8.6 10 10 0 0110.9.3l-.3-1a1 1 0 012-.5l1.1 4.8a1 1 0 01-1 1.2l-5-.4a1 1 0 01-.9-1z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 010 .2l-2.6 10a1 1 0 01-1 .8h-.2a.8.8 0 01-.8-1l2.6-10H8a1 1 0 110-2h9a1 1 0 010 2h-3.8zM5 18h7a1 1 0 010 2H5a1 1 0 010-2zm13 1.5L16.5 18 15 19.5a.7.7 0 01-1-1l1.5-1.5-1.5-1.5a.7.7 0 011-1l1.5 1.5 1.5-1.5a.7.7 0 011 1L17.5 17l1.5 1.5a.7.7 0 01-1 1z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 010 2h-1v9a3 3 0 01-3 3H9a3 3 0 01-3-3V9H5a1 1 0 110-2h3V6a3 3 0 013-3h2a3 3 0 013 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 00-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 012 0v4a1 1 0 01-2 0v-4zm4 0a1 1 0 012 0v4a1 1 0 01-2 0v-4z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 119 2l-7 7A.5.5 0 111 8l7-7zM8.1 5.1A.5.5 0 119 6l-3 3A.5.5 0 115 8l3-3z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-6a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3A1 1 0 014 11V5z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 012 0v6c0 .6-.4 1-1 1h-6a1 1 0 010-2h4.3L16 7A7.2 7.2 0 007.7 6a7 7 0 003 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 011.4 1.5A9.2 9.2 0 012.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 014.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L8 5zm12 11.2a1 1 0 11-1 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 111 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 012 2v2a2 2 0 01-2 2H5a2 2 0 01-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 10-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 10-1.4-1.4L13 11.6V4a1 1 0 00-2 0v7.6z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 00-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 00-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 002-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 00-1 1L9.6 17 18 8.6a.7.7 0 000-1 .7.7 0 00-1 0l-7.4 7.3z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V8H5a1 1 0 110-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V13H5a1 1 0 010-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V18H5a1 1 0 010-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 010-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 00-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 01-.7-.3 1 1 0 01-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 017 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 010 2H5a1 1 0 010-2z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 00-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 01-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',"table-caption":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="12" height="2" x="3" y="4" rx="1"/><path d="M19 8a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2v-8c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></g></svg>',"table-cell-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M13 4v9H3V6c0-1.1.9-2 2-2h8zm-2 2H5v5h6V6z"/><path fill-rule="nonzero" d="M13 4h6a2 2 0 012 2v7h-8v-2h6V6h-6V4z" opacity=".2"/><path d="M18 20l-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3 .2-2.3 2 .7 3z"/><path fill-rule="nonzero" d="M3 13v5c0 1.1.9 2 2 2h8v-7h-2v5H5v-5H3z" opacity=".2"/></g></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8 0h-6v5h6v-5zm-8-7H5v5h6V6z"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z" opacity=".2"/></g></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z"/></g></svg>',"table-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v7h-8v7H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8-7h-6v5h6V6zm-8 0H5v5h6V6z"/><path d="M18 20l-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3 .2-2.3 2 .7 3z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2zm.3.5l1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6zm-4.7 1.8l1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 6v12h14V6H5z"/><path d="M14.4 8.6l1 1-2.3 2.4 2.3 2.4-1 1-2.4-2.3-2.4 2.3-1-1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 01-2 0V6h-8v12h8v-1a1 1 0 012 0v2c0 .5-.4 1-.9 1H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h15zM9 13H5v5h4v-5zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H17v2a1 1 0 01-2 .1V13h-2a1 1 0 01-.1-2H15V9c0-.6.4-1 1-1zM9 6H5v5h4V6z"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H4a1 1 0 01-1-1v-2a1 1 0 012 0v1h8V6H5v1a1 1 0 11-2 0V5c0-.6.4-1 1-1h15zm0 9h-4v5h4v-5zM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H9v2a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H7V9c0-.6.4-1 1-1zm11-2h-4v5h4V6z"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 110 2H5v6h14V6h-1a1 1 0 010-2h2c.6 0 1 .4 1 1v13a2 2 0 01-2 2H5a2 2 0 01-2-2V5c0-.6.4-1 1-1h2zm5 10H5v4h6v-4zm8 0h-6v4h6v-4zM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 010 2h-2v2a1 1 0 01-2 .1V8H9a1 1 0 010-2h2V4c0-.6.4-1 1-1z"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 01.1 2H13v2a1 1 0 01-2 .1V18H9a1 1 0 01-.1-2H11v-2c0-.6.4-1 1-1zm6 7a1 1 0 010-2h1v-6H5v6h1a1 1 0 010 2H4a1 1 0 01-1-1V6c0-1.1.9-2 2-2h14a2 2 0 012 2v13c0 .5-.4 1-.9 1H18zM11 6H5v4h6V6zm8 0h-6v4h6V6z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 9h-4v5h4v-5zm-6 0H9v5h4v-5zm0-7H9v5h4V6zm6 0h-4v5h4V6z"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15.5V18h3v-2.5H5zm14-5h-9V18h9v-7.5zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6zm-8 7.5h3v-3H5v3z"/></svg>',"table-row-numbering-rtl":'<svg width="24" height="24"><path d="M6 4a2 2 0 00-2 2v13c0 1.1.9 2 2 2h12a2 2 0 002-2V6a2 2 0 00-2-2H6zm0 12h8v3H6v-3zm11 0c.6 0 1 .4 1 1v1a1 1 0 01-2 0v-1c0-.6.4-1 1-1zM6 11h8v3H6v-3zm11 0c.6 0 1 .4 1 1v1a1 1 0 01-2 0v-1c0-.6.4-1 1-1zM6 6h8v3H6V6zm11 0c.6 0 1 .4 1 1v1a1 1 0 11-2 0V7c0-.6.4-1 1-1z"/></svg>',"table-row-numbering":'<svg width="24" height="24"><path d="M18 4a2 2 0 012 2v13a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2h12zm0 12h-8v3h8v-3zM7 16a1 1 0 00-1 1v1a1 1 0 002 0v-1c0-.6-.4-1-1-1zm11-5h-8v3h8v-3zM7 11a1 1 0 00-1 1v1a1 1 0 002 0v-1c0-.6-.4-1-1-1zm11-5h-8v3h8V6zM7 6a1 1 0 00-1 1v1a1 1 0 102 0V7c0-.6-.4-1-1-1z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-9h-6v3h6V6zM5 9h6V6H5v3z"/></svg>',"table-split-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM8 15.5H5V18h3v-2.5zm11-5h-9V18h9v-7.5zm-2.5 1l1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2zm-8.5-1H5v3h3v-3zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 11H5v3h6v-3zm8 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></svg>',table:'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 14v4h6v-4H5zm14 0h-6v4h6v-4zm0-6h-6v4h6V8zM5 12h6V8H5v4z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 116 0v4h4a2 2 0 012 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 10-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 111 0V6H15v1.6a8 8 0 11-6 0zm-2.6 5.3a.5.5 0 00.3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 013.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 00-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 01-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 01-.5.6h-.8a.5.5 0 01-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 00.5.6h1.6a.5.5 0 00.5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 010-1l3.1-3A12.4 12.4 0 016.7 9H8a10.1 10.1 0 001.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 110-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 01-1 2.4 13.5 13.5 0 01-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 01-.4.7 1 1 0 01-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 01-1 .7.5.5 0 01-.4-.7l2.7-7.4a1 1 0 012 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 01-.4 1.8l-1 1.4a5.3 5.3 0 01-5.5 1 5 5 0 01-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 01-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 002.2.8 3.4 3.4 0 002.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 01-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 11-1.4 1.4l-5-5a1 1 0 010-1.4l5-5a1 1 0 011.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2 2a2 2 0 102.6 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2.1-2a2 2 0 10-2.7-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2zM7.6 6.3a.8.8 0 01-1 1.1L3.3 4.2a.7.7 0 111-1l3.2 3.1zM5.1 8.6a.8.8 0 010 1.5H3a.8.8 0 010-1.5H5zm5-3.5a.8.8 0 01-1.5 0V3a.8.8 0 011.5 0V5zm6 11.8a.8.8 0 011-1l3.2 3.2a.8.8 0 01-1 1L16 17zm-2.2 2a.8.8 0 011.5 0V21a.8.8 0 01-1.5 0V19zm5-3.5a.7.7 0 110-1.5H21a.8.8 0 010 1.5H19z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 00-.3-.7A1 1 0 0016 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 00-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 012 0v3c0 .6-.4 1-1 1H5a1 1 0 01-1-1v-3a1 1 0 012 0v2h12zM11 6.4L8.7 8.7a1 1 0 01-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 11-1.4 1.4L13 6.4V16a1 1 0 01-2 0V6.4z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 110-24 12 12 0 010 24zm-8.7-5.3a11 11 0 0017.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',"vertical-align":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="18" height="2" x="3" y="11" rx="1"/><path d="M12 2c.6 0 1 .4 1 1v4l2-1.3a1 1 0 011.2 1.5l-.1.1-4.1 3-4-3a1 1 0 011-1.7l2 1.5V3c0-.6.4-1 1-1zm0 11.8l4 2.9a1 1 0 01-1 1.7l-2-1.5V21c0 .5-.4 1-.9 1H12a1 1 0 01-1-1v-4l-2 1.3a1 1 0 01-1.2-.1l-.1-.1a1 1 0 01.1-1.3l.1-.1 4.1-3z"/></g></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 01-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 01-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 010 2v7a1 1 0 01-2 0V9h-1v7a1 1 0 01-2 0v-4a2.5 2.5 0 01-.2-5H15zM5 15v2H3v-2h2zm16 0v2h-2v-2h2zM5 11v2H3v-2h2zm16 0v2h-2v-2h2zM5 7v2H3V7h2zm16 0v2h-2V7h2zM5 3v2H3c0-1.1.9-2 2-2zm8 0v2h-2V3h2zm6 0a2 2 0 012 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-1-9a1 1 0 012 0v6a1 1 0 01-2 0V8zm-2 4a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-3-5a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>'}})}}]);